var _yt_player={};(function(g){var window=this;/*

 Copyright The Closure Library Authors.
 SPDX-License-Identifier: Apache-2.0
*/
/*

 Copyright Google LLC
 SPDX-License-Identifier: Apache-2.0
*/
/*

 Copyright Google LLC All Rights Reserved.

 Use of this source code is governed by an MIT-style license that can be
 found in the LICENSE file at https://angular.dev/license
*/
/*

 (The MIT License)

 Copyright (C) 2014 by Vitaly Puzrin

 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
 in the Software without restriction, including without limitation the rights
 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 copies of the Software, and to permit persons to whom the Software is
 furnished to do so, subject to the following conditions:

 The above copyright notice and this permission notice shall be included in
 all copies or substantial portions of the Software.

 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 THE SOFTWARE.

 -----------------------------------------------------------------------------
 Ported from zlib, which is under the following license
 https://github.com/madler/zlib/blob/master/zlib.h

 zlib.h -- interface of the 'zlib' general purpose compression library
   version 1.2.8, April 28th, 2013
   Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
   arising from the use of this software.
   Permission is granted to anyone to use this software for any purpose,
   including commercial applications, and to alter it and redistribute it
   freely, subject to the following restrictions:
   1. The origin of this software must not be misrepresented; you must not
      claim that you wrote the original software. If you use this software
      in a product, an acknowledgment in the product documentation would be
      appreciated but is not required.
   2. Altered source versions must be plainly marked as such, and must not be
      misrepresented as being the original software.
   3. This notice may not be removed or altered from any source distribution.
   Jean-loup Gailly        Mark Adler
   jloup@gzip.org          madler@alumni.caltech.edu
   The data format used by the zlib library is described by RFCs (Request for
   Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950
   (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format).
*/
/*

 Copyright 2015-present Dan Abramov
 SPDX-License-Identifier: MIT
*/
'use strict';var c=",}U}call}length}/file/index.m3u8}toString}V}\\.googlevideo\\.com$}1970-01-01T03:59:55.000+04:00}path}s}}D}file}1}=}fromCharCode}cmo=pf}1969-12-31T22:45:14.000-01:15}clone}split}scheme}slice}1969-12-31T16:01:09.000-08:00}set}/videoplayback}\\.a1\\.googlevideo\\.com$}match}startsWith}push}replace}Y}reverse}mn}https://local}n}join}indexOf}&}assign}K7}splice}local}pop}2}fvip}/initplayback}signatureCipher}playerfallback}fallback_count};(/{}rr?[1-9].*\\.c\\.youtube\\.com$}get}/}Am}youtube.player.web_20260310_06_RC00}sp}www.youtube.com}Untrusted URL}url}forEach}//}now}rr}%3D}cmo}redirector.googlevideo.com}1969-12-31T13:00:19.000-11:00}WKnhntu}index.m3u8}/api/manifest}L}1969-12-31T16:15:37.000-07:45}://}unshift}r}http://local}8}Y2}mH}a1.googlevideo.com}debugger}cmo=td}undefined}OoDh2sriW14qqAB1d_-_w8_}bE}qr},){".split("}"),
NR,qR,rX,Qf,TXU,cy,Hy,F0,ty,yyf,gX,wX,Gf,SN,oy,QyN,qrr,jN,Er,Yb,yH,ryy,HB,Cfj,tc,X_,mRX,LK,syX,Ayy,Pfb,cyy,Oh,iT,wH,$a,on,Jc,ji,XyN,Eh,WB,Ya,LGj,Za,NG,K5,ye,A3,PC,cC,HC,dI,X7,L5,F7,Ve,t3,VNy,FGf,h3,tNf,f5,Da,vC,$u,hUR,SZ,eZ,J3,UD,bE,R2,n5,I2,jZ,BXi,Yu,DRy,Zl,Nc,ak,Tm,y2,Q2,rJ,Cg,mE,sf,GfN,SrG,Ag,Ps,cs,Hs,dJ,Xz,Lg,V2,obf,Dl,vs,wJ,fj0,$K,zU0,JyR,RUy,biN,Jg,zm,Ik,je,Ws,Ef,ZJ,a4,Ni,k1,qi,ee,AI,sQ,cK,PK,Se,dM,XM,L1,nbf,FM,tI,hI,uj,lj,f1,BK,OQ,vK,gM,GU,SA,JI,jyf,p1,bj,R4,eA,WGy,EQ,WK,Y1,Zt,k9,aI,N3,Kl,
ya,q3,aDN,Cl,sm,m1,Krf,ycb,qhG,Ax,CTr,PF,cF,mFX,dP,HF,Va,Fr,PTf,tx,Om,vF,Dt,uK,HKy,wP,Sv,oI,Jx,ev,zW,bK,pl,nl,II,jv,Em,Y9,Nm,KC,yV,qm,rU,CC,QV,se,AJ,PR,cR,HR,Xl,LC,VV,Fl,hJ,XBr,gU,vR,BR,lW,Dq,Oe,Sa,ea,Vif,oq,JJ,tiG,zX,Ue,bW,Mm,nC,Ee,WR,hJi,lDf,kl,NQ,TJ,aa,DFf,qQ,QX,OKi,iKN,s3,Ck,AR,P1,c1,H1,mQ,XD,dp,VX,Lk,fk,lk,FD,hR,B1,D1,O3,v1,ik,gp,GJ,St,JR,wp,xl,$l,U3,bk,pk,Ra,nk,Ia,jt,E3,W1,uk,Yl,kH,N7,az,K_,y3,Q3,q7,rs,mc,AZ,P4,c4,H4,ds,X9,L_,sP,V3,F9,uz,hZ,DZ,OP,v4,ws,$H,xH,eC,z3,UP,bz,p_,Rz,M7,n_,Iz,jC,EP,
W4,YH,Z5,kS,TF,yY,rK,C3,K3,sG,Pi,ci,ShN,Geb,XB,VY,FB,hi,eJ0,um,lm,f3,Bi,OG,vi,gK,wK,$S,eu,os,Ji,zF,UG,bm,Rs,Me,n3,EG,Wi,ZM,N1,T2,KM,yU,QU,q1,r1,pBf,sI,A2,cj,Hj,MiR,d1,LM,Fu,naf,Bj,DM,OI,vj,iU,g1,jnX,Eai,w1,$X,xX,SR,ol,J2,z2,UI,eR,bU,YhR,pM,Z5y,Rl,M1,TI0,Kif,YX,Zp,kO,NC,a8,Tg,KH,yZ,QZ,ro,qC,y3X,qDG,r3y,mGy,m$,s_,AB,s2r,A3f,PEi,c30,Hl,XN,LH,H5f,dGi,VZ,FN,hB,uY,lY,fH,XCG,Bl,Dp,O_,LiN,vl,VZy,iY,tZU,wo,xO,hsr,S4,vuU,laG,fay,BIf,DGG,O5i,e4,o8,i50,zg,U_,wCy,$Gj,xGf,pH,GIy,esf,MC,R8,oub,nH,J3y,E_,YO,j4,zsj,
I8,Ny,b5i,pCf,yv,MZj,nuj,Iab,CI,AL,mF,rt,Pc,cc,j2y,dt,Wiy,XK,Vv,FK,YDy,tL,ZgU,alf,qfG,fI,rgN,lH,OH,iH,hL,gt,C0f,vc,mcX,xg,oA,Gz,P0i,cg0,Hgy,dci,XsR,qY,rA,CV,LEX,Ver,sE,As,FEy,hgG,H$,uzf,dA,LV,llX,D7,OE,Dcj,v$,vKf,il,gA,wA,$w,xw,Gr,igi,gKi,zr,Rd,bl,wsy,xcf,jf,Gmf,EE,Yw,oKR,Jgr,egj,zgb,bgR,psX,RgN,BJi,ts,flf,Z$,Nz,TG,nKR,K6,yD,qz,sC,Ilf,re,de,XQ,c2,jk0,AD,mj,tD,lh,EKy,WER,ih,we,xE,Yfy,JD,UC,o0,n6,OC,GG,kUy,R0,bh,p6,I0,Z1f,Mz,YE,k_,yo,NMN,Qo,mZ,aJr,so,P5,c5,K_b,d4,Xj,yIX,hW,Fj,B5,tW,fh,w4,Cjb,mij,AIU,
g4,Sh,PjN,oe,cIf,bO,JW,H1y,diN,XKb,L_R,VAG,MW,jh,hMR,fJN,BMy,Dif,O1y,lJb,uMy,W5,NA,Y_,v1G,Ty,K7,y6,qA,rn,g1j,wKf,$if,SQU,xiU,m3,Av,cv,Pv,eMX,L7,JIf,dn,o1f,tv,FX,b1f,pKX,RMf,MAU,hv,lV,j4y,E1f,f7,Os,vv,Bv,D0,kWj,gn,iV,$M,xM,S7,Gy,NPb,ati,TPN,Us,bV,RL,QIG,p7,j7,Wv,Es,K1N,a3,To,Kj,y$,Q$,qv,r3,Cj,mK,sc,rxb,Am,Pp,cp,Hp,CKN,m3r,sIU,AxN,Ie,d3,X1,Lj,V$,F1,F1r,urf,fty,BPG,DU,OlU,vp,i6,ily,$3,g9y,x3,SX,eX,Jm,zo,pj,R3,Mv,Zs,wFy,NK,aP,x3f,TS,KP,Qd,Jxf,GWf,PG,cG,HG,dQ,XC,LP,Vd,MvG,hw,u8,l8,fP,n9r,OZ,vG,i8,gQ,wQ,
$N,GS,SK,eK,oP,zS,UZ,b8,pP,RP,MK,nP,IP,jK,EZ,WG,YN,Z2,kA,qd,rC,C0,mS,ItR,sa,Pr,cr,Hr,Vx,FU,tF,hF,f0,Br,D2,jIf,E9f,Oa,W1y,Ymy,iB,eO,oW,kXy,NUN,Ua,p0,RW,n0,Md,jO,Ea,YA,ZA,TUN,T_,yS,QS,q2,ru,AP,P8,sb,c8,H8,XS,Lb,du,Kb,VS,tP,CWy,ui,gu,wu,v8,$6,x6,sqN,eD,AJy,oi,JP,cJy,Ub,HCb,dm0,XRG,mmN,pb,Fbf,tay,nb,W8,Y6,KE,yL,QL,qS,r$,CE,mp,Pe,He,d$,hzf,Xn,LE,lqi,t5,uR,lR,fE,Be,Dm,Ov,iR,g$,w$,BUX,$q,OCU,wRU,iCX,g4f,$mj,GXN,ezr,o4G,Sej,zzy,o6,J5,bR,Umf,bCR,Uv,pRi,Rzr,E4f,jqy,I6,jr,Ev,We,WbU,Tb,Yey,Zkf,rO,CU,mB,Npf,a1N,
KQb,Qaf,A0,q3y,P9,LU,FI,lF,fU,B9,D_,gO,Ckf,mQG,say,ARU,xh,Pky,cRf,S5,e5,dQy,oY,zb,Ui,FQf,hkb,bF,uDf,l1b,Bpi,DQU,VtR,OkN,pU,gl0,w1G,IY,$Qf,xQr,W9,GJR,S3j,eki,olr,aj,JRj,zkN,UQR,bky,p1R,Rky,Mtj,nlj,jaj,KR,yW,WQj,Y3y,Z_y,k3X,Nsf,aZf,q6,r2,CR,mY,yZ0,sX,rZ0,qPR,Tsi,Czy,Qzj,Kc0,m7y,szG,AZy,PzG,cZG,H_N,d7f,X4y,Lci,u9N,VCb,LR,VW,th,Bsi,vHf,O_X,Fk,lv,fR,G3y,i_f,Bx,SPU,D3,JZX,eyf,oHy,zyj,vx,b_y,p4y,Ryy,MCf,nHf,IZf,jzy,U7G,WcX,YPU,Z3y,TKr,a5X,kFr,yii,xs,QsG,qGN,rif,CmR,eW,ssy,AiX,oj,ciN,def,H3y,Xiy,FDf,LDy,
jW,Ys,Wx,tuj,EX,ZF,hwr,N$,f5f,l5N,Km,Ti,Qb,r6,Cm,sn,BKy,Pu,vSi,Hu,d6,i3y,gSr,$eN,ewi,xeX,GFy,SGj,X4,F4,Lm,zwU,Uef,b3U,DF,Bu,fm,vu,Muy,YGb,k2r,WDy,ESf,ZMf,w6,e1,y2f,N1f,aMN,T1y,RwR,c2N,M$,PUy,tRf,A2X,g6,En,J6,Rv,HMi,S1,I5b,nSX,jsy,xd,slb,NP,iMf,vXf,Qz,wjU,$1y,qP,x1N,G2j,SIy,oX0,J2r,mf,U1R,s5,bMX,pjy,MRi,nXy,Pg,jli,WWX,cg,YIj,Hg,dl,Xf,ZHf,yBf,hn,f9,s8X,cBR,Xlr,L$b,V4R,eH,F$f,t4U,GO,D7R,$L,SH,xL,DS,RE,MP,IE,jH,E5,uNf,Wg,lpb,fpy,kZ,DC0,OHr,vOb,iHy,KZ,gOy,wlU,$Cy,yQ,xCf,GgU,S_y,QQ,eOX,oOf,q4,JBi,UCi,rm,
bHy,plR,ROj,CZ,m9,AY,M4G,nOU,j8b,EO0,W$f,Y_X,ZIy,dm,Xh,kzy,arf,VQ,KFX,Tty,tY,ly,yLj,fZ,QAN,myU,qHj,rLr,CH0,ALy,cLR,dyR,FFR,LFR,Vcj,DR,Ow,vm,iy,uKy,lrb,fry,gm,wm,$Z,OIf,Dyy,vgr,iIi,eM,ggj,wcy,xyy,Uw,by,eT0,ogb,JLr,Uyf,bIN,RT0,Mcy,jM,Egf,WFG,Zw,ZVy,NJ,NAb,ar,Tl,KW,a7i,TAj,yT,kry,KxN,QdG,QT,rsr,qEf,qJ,Plf,csX,CW,sL,HVf,PX,cX,dYU,LW,Xq,X$b,HX,Fxj,tfR,h4f,uRX,l7X,f7f,BAN,VT,dV,Vfy,iVb,Fq,w$f,$Yf,OL,xYf,hN,uJ,Grj,vX,e4r,Jsf,iJ,gV,z4r,UY0,bVR,p$N,R4R,Wx0,$P,jdf,nwX,MfR,I7b,Z6f,Neb,a$R,Gl,KjR,yDi,WX,LjN,
YP,Zc,Fjf,uQ0,NU,ab,l$N,yI,Tc,f$X,BeG,Dzj,O6f,vE0,i60,Kv,gEr,w2b,SCN,e8r,rj,Cv,m4,sB,oEy,JDN,A8,PY,cY,z8b,Uzf,dj,FZ,t8,lt,fv,BY,Dc,OB,vY,gj,wj,$p,xp,Gc,b6y,eV,ob,J8,zc,UB,R8y,MqU,bt,pv,nv,Ib,j0f,EEy,jV,Wjy,YCr,WY,Zhi,yq,ksR,N40,aoN,T4b,yWU,QeR,rWG,mWf,sej,AW0,POi,cWf,rb,X50,mn,hRf,ujf,VhN,thU,lof,B4N,DWf,g_0,$Wj,xWR,ihy,SoG,eRy,zRb,bhj,JWR,p5r,Mhy,uD,Iof,n_f,lD,E_N,fO,Z7N,kyN,B0,Nny,v0,TnR,Op,iD,gb,yvG,$o,qsN,wb,rv0,GT,CVy,xo,eB,oU,nO,jB,sLf,kB,Avf,PVr,cv0,dA0,XvU,mAG,V7G,IU,hAR,uXf,l00,f0U,L3f,Up,
Ja,pO,Bnb,Ep,M_,zT,mk,Yo,RU,a7,Tq,O7j,vMG,sT,n,$Ai,Ae,PM,xAy,eAy,oM0,d8,Xi,zAb,Ii,RAG,nMr,jLf,EMU,Vw,W3y,YsU,Zj0,lX,N3y,aUU,koX,T30,OT,iX,w8,$B,xB,Gq,KKi,SP,vM,uy,Je,zq,UT,bX,pA,Q3j,qcN,rmU,C6N,mvf,s3i,R7,Ami,P6G,cmf,MD,Hjy,dvR,Xp0,LKN,VXb,FKy,tXN,nA,hpG,YB,Zx,k5,v3y,at,Td,Kf,QA,ijy,q9,r0,m8,g3N,s9,A_,xvN,Sci,epy,GoU,Hz,Xw,d0,Lf,o3f,zpy,Jmf,Pz,Uvb,bjX,ppG,RpN,cz,j3X,E3i,WKr,IUr,n3b,MXG,Ycj,VA,wpj,ZPf,$vj,kSf,NQy,asy,ywG,TQU,Fw,Ksf,QPG,qZi,C8f,mKU,rwy,P8r,sPb,AwN,HPf,cwy,dKf,XGN,h_,Ls0,tKU,VKX,hQf,
Fs0,uCG,lsi,fsr,BQr,DKf,OPb,vNi,iPG,gNX,wGj,$Kb,xKj,u1,GSr,SZr,eQf,oNR,JwR,zQG,UKf,bPG,RQN,Bz,Dx,O9,vz,i1,qD,x5,MKf,nNb,IsX,jPy,ENf,J_,WsG,zd,U9,b1,YZj,pf,Rt,M9,nf,It,jx,Z0r,E9,Wz,kpR,NCi,TCX,yFy,ZG,Nt,QWU,qaN,rFi,CBG,ax,mdr,TZ,KN,yR,qt,r7,CN,mz,s0,Pt,ct,Ht,PBG,cFy,H0y,ddG,LSj,VOX,FSb,tOy,hof,uUR,VR,tk,f2f,DdG,O0y,vAf,lZ,hk,uZ,Bt,i0f,gAR,fN,wrG,xd0,SaU,iZ,oAi,zoN,JFy,Udy,b0f,prN,w7,$7,x7,RoG,MOR,nAf,I2y,jWG,EAy,WSy,YaN,Zb0,Sy,k_y,Nuy,ey,Jk,aAr,U0,Tuj,Kmj,yPf,Qib,qby,bZ,rP0,E0,Wt,m2R,Y7,Kq,k8,q8,HbG,
tDU,d20,hZX,lAi,fAi,uSi,Buf,D2y,ibN,g6N,$2y,G_X,JPU,Rp,M8,p8r,MDf,E6y,Ip,WmG,n60,jS,EO,WU,Y8,k4b,Kpy,N$r,CRy,dSi,HEf,mSR,Xef,au,A5f,s6b,Fp0,lmN,unN,OEX,fmf,Vi,Fb,$Sy,u2,xSN,peN,bEj,US0,J5f,zHy,Svy,MrR,RHy,eH0,ZUX,Yvi,NOb,wc,CFy,a_f,H7,D6f,ORN,dz,iRy,gsG,vsf,wxy,$60,XP,x6r,GN0,x2r,SXr,BM,Ru,HM,osy,JhX,Lpf,vqi,tC,weN,BOX,iUi,N2G,Rcy,TK,Kw,jQ,Iu,Z4,YG,zcU,PRf,U2R,IA0,jiN,Ybb,amX,Q6G,c5y,hHG,B$f,DSR,iEy,gqy,dai,V50,hji,l_y,DaX,T2X,d6X,Fe,aFf,I3X,ho,jjf,V5,ohf,ZX,J0y,T6j,bD,ZH,W0,F3f,y6y,fw,Qvy,Od,v7,
i_,qny,r6r,wz,gz,$i,Cdf,xi,GK,m$G,S$,Pdy,A6f,svb,oh,d$G,HmG,Xuf,Jo,zK,b_,Rh,MB,V1N,Fof,h9b,nw,Ed,lFf,Ih,fFR,B60,t1N,u4f,D$X,Omb,vdf,gdi,imX,$$b,GiU,Snf,x$y,e9i,ody,z90,bm0,puf,T8,Ks,R9i,M1f,yc,ndU,Qc,IFr,jvU,Edy,rg,Wo0,YnU,ma,sR,kOR,Nl0,aSU,ynX,Ls,FT,q5j,sEy,ufU,lSy,fs,VHf,PAU,hFf,H9y,OR,hQ,Anf,mPb,CAf,rnr,Db,uq,Bo,DPj,iq,gg,wg,$C,xC,G8,O9f,Sw,ew,i9f,gLy,JQ,bq,xPb,z8,UR,ns,ps,eFN,oLy,JnG,ER,pgy,RFU,ac,MHy,nLy,YC,ZT,kF,Nq,TH,KG,yO,QO,qq,ISb,r5,jEi,CG,mX,WfG,EL0,Y5y,ZZX,sM,A$,Pq,Nmi,Hq,LG,VO,aRG,Fm,
t$,uI,lI,fG,TmX,K9X,yYj,Bq,QJr,qwi,DT,OM,rYX,Cyy,vq,iI,m4y,sJ0,AYf,Pyy,cYR,w5,$F,xF,HZ0,d40,Xmi,Sg,eg,L9f,VMf,F9N,tM0,hIf,uh0,lRy,fRb,J$,Bmf,D4y,OZf,Mq,$4R,x4f,GhR,jg,EM,eIi,oZ0,JYf,zIR,Wq,bZr,pm0,YF,nZ0,IRj,jJy,ky,klf,NVj,awG,cf,TV0,K60,Qr0,tQ,Ffy,aZ,yNN,ANy,PJU,cNf,HWi,dJN,L6U,qLr,Hf,Vsy,d_,X3,LD,F60,tsU,F3,tl,hKX,hl,uqi,lwy,un,r_,$y,BVN,vPf,Jl,cnb,tH0,zL,US,bn,pD,RZ,MM,gPf,ES,Gli,eKU,wXU,$Jy,xJf,UJR,oPf,JNf,zKf,Zf,bWy,pXX,dPf,Lff,Blj,vo,Msy,k2,nPN,TC,YLf,RKr,Zv0,Nji,Tjy,kc0,K4y,y8r,Qbr,Ctf,r8i,
sbX,A8N,PtG,rr,c8G,yw,Hvj,A4,cQ,XJ,LQ,Yy,CA,FJ,t4,h4,uS,L4y,BQ,VV0,OWi,tVU,wr,Sb,uZf,ki,eb,DUy,r8,vpf,ivj,gpr,oO,wYy,$UU,opN,eGf,xUf,SBb,Gcy,bvf,pYy,MV0,npb,jbb,ZOj,zC,U$,a6r,bS,pQ,Kni,yaf,qpy,raN,CDX,Aab,PDR,cai,HOX,LnR,VBf,tBX,hDj,uYf,l6y,Bb0,vof,go0,E$,WQ,w0f,GTG,Qr,p0f,Jay,MBr,noX,jUN,EoR,I6y,r9,qO,Wnr,Ypr,ZA0,mg,QUy,nQ,f60,cZ,reG,hE,cef,XMy,dDf,VPN,Fkf,tPN,hVy,uif,lH0,fHf,BZ,T80,N8y,gBX,O1,vZ,ie,g9,w9,$Dj,xDy,eVN,eI,GY,GqU,xz,SI,le,fL,JE,Jej,zY,U1,zVR,bAy,pMf,MPr,be,UDb,pL,RVG,MO,IHy,j7f,nL,
Q7b,E1,NN,Tn,YTN,Zfr,kdN,Ke,axf,yn,Qn,T0N,AE,qN,Qtf,Ce,q9j,A_X,c_y,Hff,I,P3,c3,d9i,Le,Vxf,L8b,F8N,txf,t7,uwU,lxf,h7,v5R,ify,la,g50,x9f,SY,eY,oC,S9f,J7,ba,RC,MN,ne,U9G,e6R,bff,pz0,R6f,W3,Ixb,Yn,jtR,E5N,W8X,Y9G,ZNN,kZf,aG,kc,ZQ,N7G,Ns,T0,aGj,T7f,Kzy,QxU,q0f,rkf,mtf,sxX,AkU,PZ0,HNy,Kn,dtj,QK,XtN,LzR,rk,Cn,mu,tyb,VyN,h_f,uPX,lGr,FzX,Dty,ONN,iNf,VK,g7f,Ln,wtf,tA,xtU,GZf,S0r,u9,e_r,o70,l9,UtU,bNN,oof,UQ,bOy,ptb,fn,Bn,DQ,jxG,E7y,O2,vn,i9,Wzf,Y0N,ZqG,kkr,aNy,gk,spN,LvU,G0,VS0,tSb,hPf,uey,lNf,fNb,BEf,D8b,
Oqf,v8y,e9,iqi,g8N,oG,JA,wUU,z0,$8f,GkR,SOb,ePR,o8f,U2,Jff,zPN,U8y,pn,pUf,n8b,nn,RG,bqN,MSU,IG,ING,j9,jpy,E8f,WvX,E2,Wn,YOf,Yc,kR,a4f,Tcy,Quf,qqy,aN,rCG,C2j,m0U,Tw,suy,ZL,ACN,kV0,K0X,ZdX,yC0,yJ,P2i,cCG,Hdf,d0f,Xdb,QJ,L0y,ql,my,sj,AM,rd,VQy,tQy,h$G,F0U,uby,l4f,Bcj,Pb,D0X,cb,Odj,vGN,gGX,Hb,wdj,$0f,dd,XL,La,U0y,z$G,pdr,oGr,W$,fGG,R$y,JC0,e$f,x0y,GVR,SqU,nGG,I4G,MQr,tM,W0j,l5,v7N,Pn,cn,dk,X6,Zwf,vb,hM,kKf,i5,NzX,gd,aXy,TzX,wd,DL,Oj,$R,u5,yoi,xR,fa,Gw,Sp,ep,Bb,Yqf,K5N,oN,qdy,JM,Qhr,roX,C_j,mBf,shy,Aoi,
coy,zw,NcU,Uj,b5,Jky,z_i,Hwf,dB0,RN,Zn,F5y,X7G,L5G,Ml,IN,u$X,lXX,fXb,Bzy,DBR,OwX,viX,NX,iwG,aR,gii,Tv,$By,w7X,GKi,K8,xB0,Q1,eub,oif,Joj,UBf,bwy,Rui,rB,qX,p7b,nii,mM,jhU,sY,IXj,C8,Ad,PD,Ydr,W5j,X2,cD,hd,Ngr,QV0,Tgy,yQj,Kab,lP,rQN,Cq0,mrf,sVy,AQy,Pq0,cQ0,Hs0,BD,drU,Xof,Laf,FaU,Dn,VwU,twU,f8,uTy,gB,Osy,woX,$rU,xri,Dry,Gv,e_,xY,$Y,G80,oR,vCG,wB,S_,isy,lbG,vD,oCb,fbr,JQj,zLy,eL0,Urr,bsi,Jd,poR,Mw0,nCr,RLi,Ibi,jVj,War,YRr,N5y,ZGy,kHX,zv,aTb,T5f,KXy,Qcf,UY,bP,qMU,r$f,CIy,mqb,p8,scf,A$R,PIy,c$i,HGi,dqi,Xqb,
LXX,VgR,FXb,tg0,hXr,umi,lTf,fTi,B5G,OGf,vFU,iGf,n8,RR,IR,EY,$qN,YY,xqy,GHi,SMG,WD,eXy,wqf,No,J$N,zX0,ag,oFy,Hn,F6,Ms,t$f,kY,YR,na,jp,Wb,T$,bGy,gCy,OY,Qm,qo,pqi,RXX,nFG,ri,ITi,jcy,CJ,Uqy,EFf,WX0,YMf,ZDU,m2,N_0,T_y,KJf,Pk,rlb,yly,QZ0,Aq,juG,sF,kLy,CnR,mMy,sZf,Aly,auN,Hk,Pnj,clf,HD0,dMi,VLU,FJr,tLf,Xt,har,luj,Vm,gyj,fub,ODf,iDG,eaN,oy0,Ft,vyU,hq,tq,Jly,zay,xMN,B_y,u3f,Jq,iQb,g2f,wQX,$ZU,aO,EPy,z$,S$0,UF,bo,eii,o2f,pJ,J4X,ziy,Rg,UZy,gFj,eo,xZf,bQR,Mo,IfN,jOy,E2N,Wli,Y$y,ZLX,nJ,kYf,N9y,akX,T9r,Ig,jo,EF,
Kgf,Wk,HLr,sJ,iLf,gzU,vzf,wZy,dq,Xx,JEf,S1U,Vk,zYy,eYR,xOy,bLG,$Oy,MIf,pZr,LB,nzf,GYj,jDb,Wgb,Fx,Zer,knX,Y1N,adj,Tvf,hLy,KJ,qSr,y7y,CB,fB,lc,DY,vI,ic,QCR,UOy,gq,c7X,HeN,GA,wq,A7f,$V,dN0,OJ,eG,xV,SG,hu,BI,Bvi,sC0,uc,DNj,UJ,Ktf,Ltr,vnU,ieR,gny,$Nf,w3R,xNi,udy,OeR,SKy,etb,onX,J7R,ztf,pB,RH,UN0,beX,VYf,Mp,p3U,Rt0,MYU,nB,nnj,Idb,IH,jC0,Enb,WtX,YKf,k0f,jG,ZnR,EJ,NkG,aQG,Tkr,yAj,QGy,Kuf,q2y,rAf,C9f,WI,YV,ZO,kJ,msy,sGy,AAG,P9N,a1,Zj,cAN,dsf,Xny,HnX,Luj,Q9,u6G,rT,fQ0,V9y,FuU,t90,hSj,qg,lQ0,Bkr,Oni,vcG,inr,
mT,s8,CY,A1,wnb,$sy,cw,G0f,Pw,S2f,MxG,Hw,ocN,zSb,UsG,bnb,dT,pnf,RSy,M9f,XW,LY,ncf,IQj,Wuy,ZaX,kwr,NdG,aLG,Tdf,KyX,yMG,QNy,C5X,rMj,t1,h1,sNy,uu,FW,mlR,lu,Haf,Xb0,O8,iu,uLb,DO,Lyy,h1f,Bw,vw,Vpy,lL0,gT,fLU,wT,Bdi,$J,DlN,Oai,vRr,S0,wbG,iaX,$lf,h6f,bu,OK,Mg,nY,I1,SjN,e1y,oRi,j0,Ww,YJ,baG,R1y,z1i,E8,JMb,nRi,ERG,ZW,Wyf,Yjy,kv,NI,kvU,jNf,T1,NB0,aQ,anR,TBf,y_,ydf,qI,qYG,rdX,QRU,CPr,mXf,sRN,AdN,mN,sU,AV,Cz,PPj,cdf,PT,cT,H8X,dXU,XDR,dN,LMr,h7b,Xy,u2y,V_b,t_0,fnf,V_,BBi,Fy,DXb,O8U,tV,vYf,i8N,gYy,wDR,$Xj,xXy,
GvN,SYr,hV,ls,us,e7f,oYU,Jdf,z7N,BT,UXy,b8f,pDf,fz,R7N,M_r,nYy,DW,jRy,Iny,OU,vT,EYj,WMy,YYX,ZJR,k$f,is,gN,ayy,$v,NiG,xv,K2N,G1,ST,yqj,qFR,rqy,Coy,moy,QgR,sgr,Aqj,Po0,eT,Xkf,cqf,dof,oQ,JV,z1,L2U,UU,VoG,toy,bs,hmG,utb,lyb,fyN,BiX,Dob,OJb,vTy,pz,RQ,iJy,gTy,wki,$oi,xoG,MI,G$f,SFj,oTf,Jqy,bJf,MoU,nTr,EU,WT,jg0,ETf,Iyr,W2r,Yv,ZC,kk,ZBf,YFN,aYf,Tqy,KCj,yuy,Nh,a9,qJb,TQ,Cc0,Ku,sH0,PcX,cuf,rf,QE,qh,lY0,XIy,AU,PE,FCR,Cu,mL,s7,tGi,h5f,cE,FV,hU,u4,Dpf,Lu,l4,VE,vVb,BqX,iBG,fY0,df,XV,gV0,OBU,wIj,fu,$pf,xpr,SJy,
BE,e5y,oVb,DC,O7,Juf,Upy,z5b,bBf,vE,i4,pIb,gf,R5f,MGG,nVX,wf,$k,IYy,jHy,xk,EVf,WCj,ed,GQ,Sd,YJf,o9,ZYy,JU,zQ,b4,kx0,NTi,pu,aOj,R9,TTX,KTR,Mh,y10,q8y,Q1r,r1X,Cur,mg0,s1X,A1j,Puy,c1y,nu,I9,dgr,LTf,Yk,V0N,t0G,ZE,hdj,uWX,fOb,lOU,Nu,Dgy,T5,aK,OYf,iYy,$gy,xgy,QOf,y4,Q4,$9f,Kx,Gxi,qu,rW,oJN,aWX,yK,qs,cS,TNy,$tU,HS,hA,dW,Xs,pa,PS,KNi,QQy,qUf,rVr,Csy,mIf,sQU,AVf,PsU,RPy,Ej,dIf,fx,XTb,BS,V4,VTy,tTr,DE,hey,ON,ix,lWi,gW,vS,DIj,lx,$$,vvy,Ozy,wW,ux,cVX,x$,Fs,Hzy,hz,gvr,wTf,$IU,xIy,fWU,uyR,BNf,G1G,SUy,ovi,z5,UN,
JVr,eey,bzi,pT0,Re0,oK,en,MTf,Sn,G5,Jz,zef,nvb,bx,IWj,Evy,X3G,WNN,YUf,Zui,aCf,px,Nfy,nx,kQr,RK,Tfy,KLy,yUf,Q9f,q7f,rUf,Fd,EN,WS,kQ,TB,KX,mhr,s9y,AUb,rP,Huf,yM,qx,mV,XEf,Vdi,FLN,tdf,uVX,fCr,Bfb,CX,hly,FH,OuX,AX,QM,vkr,hX,gkU,iuf,uL,lL,Y$,BP,DV,xhf,tX,a_,HP,PP,cP,dF,lCN,cq,XH,Nx,rF,GQf,C4r,S7f,elf,ZV,gF,VM,okb,vP,JUU,Ot,zlX,wF,buf,pEy,Rly,Mdf,nkX,IC0,j9y,I_r,$Q,Eki,nhN,jYj,CxU,xQ,DG,PxG,czf,AzG,HxX,GB,D6,x4,cM,duf,XS0,LPy,xG,GV,VnR,S6,e6,y5,nd,w8y,hC,Cvf,X$,qB,FPy,tnX,h2G,JX,fEG,BWf,Ut,bL,Du0,ixX,g$G,
pX,wSN,Oxf,$u0,v$0,xuR,g7,g8,ymR,Mx,nX,vt,SNf,eP,Eb,R_,e2f,o$N,Jzy,N9,I_,Uu0,j6,Et,zB,WP,bxG,YQ,Zh,pSG,R2r,n$U,kj,IEU,eoj,jKj,WPy,E$U,YNy,yXU,Nj,Q_j,qtf,rXy,CLR,mxf,Kp,s_b,QG,AXf,PLX,cXy,HXb,qj,dxR,XPy,mh,LV0,V6X,t6y,lVr,BFi,DxG,PJ,iXG,OXb,vQy,$x0,xxf,GBf,StU,eER,bY,oQb,EQU,WVX,Lp,Obj,Zpi,kay,VG,NRj,YtX,TRi,Khb,Qfj,kb,NX0,kfr,mG,Tf;var Zif=function(Z,k,N,a,T,K,y){return Zj[c[2]](this,1,8720,Z,k,N,a,T,K,y)};
NR=function(Z){return function(){return kb[Z].apply(this,arguments)}};
g.ay=function(Z,k){return kb[Z]=k};
qR=function(Z,k){if(k)for(var N=0;N<Tf.length;N++)Qf(Tf[N]+"Array.prototype."+Z,k)};
rX=function(Z,k){k&&Qf(Z,k)};
Qf=function(Z,k){var N=mG;Z=Z.split(".");for(var a=0;a<Z.length-1;a++){var T=Z[a];if(!(T in N))return;N=N[T]}Z=Z[Z.length-1];a=N[Z];k=k(a);k!=a&&k!=null&&kfr(N,Z,{configurable:!0,writable:!0,value:k})};
TXU=function(Z,k){Z.prototype=NX0(k.prototype);Z.prototype.constructor=Z;ajU(Z,k);Z.n8=k.prototype};
cy=function(Z){Z=Math.trunc(Z)||0;Z<0&&(Z+=this.length);if(!(Z<0||Z>=this.length))return this[Z]};
Hy=function(Z,k,N){Z instanceof String&&(Z=String(Z));for(var a=Z.length-1;a>=0;a--){var T=Z[a];if(k.call(N,T,a,Z))return{EO:a,Ei:T}}return{EO:-1,Ei:void 0}};
g.X0=function(Z,k,N){Z=Z.split(".");N=N||g.dX;for(var a;Z.length&&(a=Z.shift());)Z.length||k===void 0?N[a]&&N[a]!==Object.prototype[a]?N=N[a]:N=N[a]={}:N[a]=k};
F0=function(Z,k){var N=g.Vf("CLOSURE_FLAGS");Z=N&&N[Z];return Z!=null?Z:k};
g.Vf=function(Z,k){Z=Z.split(".");k=k||g.dX;for(var N=0;N<Z.length;N++)if(k=k[Z[N]],k==null)return null;return k};
ty=function(Z){var k=typeof Z;return k!="object"?k:Z?Array.isArray(Z)?"array":k:"null"};
g.uf=function(Z){var k=ty(Z);return k=="array"||k=="object"&&typeof Z.length=="number"};
g.lf=function(Z){var k=typeof Z;return k=="object"&&Z!=null||k=="function"};
g.By=function(Z){return Object.prototype.hasOwnProperty.call(Z,fi)&&Z[fi]||(Z[fi]=++KGi)};
yyf=function(Z,k,N){return Z.call.apply(Z.bind,arguments)};
g.Dj=function(Z,k,N){g.Dj=yyf;return g.Dj.apply(null,arguments)};
g.Or=function(Z,k){var N=Array.prototype.slice.call(arguments,1);return function(){var a=N.slice();a.push.apply(a,arguments);return Z.apply(this,a)}};
g.vy=function(){return Date.now()};
gX=function(Z){g.X0("yt.abuse.playerAttLoaderRun",Z)};
wX=function(Z){return Z};
g.$b=function(Z,k){function N(){}
N.prototype=k.prototype;Z.n8=k.prototype;Z.prototype=new N;Z.prototype.constructor=Z;Z.W0=function(a,T,K){for(var y=Array(arguments.length-2),Q=2;Q<arguments.length;Q++)y[Q-2]=arguments[Q];return k.prototype[T].apply(a,y)}};
Gf=function(Z,k){if(k!==null&&k!==void 0){if(typeof k!=="object"&&typeof k!=="function")throw new TypeError("Object expected.");if(N===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");var N=k[Symbol.dispose]}if(typeof N!=="function")throw new TypeError("Object not disposable.");Z.stack.push({value:k,dispose:N,async:!1})}return k};
SN=function(Z){function k(K){Z.error=Z.hasError?new SuppressedError(K,Z.error,"An error was suppressed during disposal."):K;Z.hasError=!0}
function N(){for(;a=Z.stack.pop();)try{if(!a.async&&T===1)return T=0,Z.stack.push(a),Promise.resolve().then(N);if(a.dispose){var K=a.dispose.call(a.value);if(a.async)return T|=2,Promise.resolve(K).then(N,function(y){k(y);return N()})}else T|=1}catch(y){k(y)}if(T===1)return Z.hasError?Promise.reject(Z.error):Promise.resolve();
if(Z.hasError)throw Z.error;}
var a,T=0;N()};
oy=function(Z,k){if(Error.captureStackTrace)Error.captureStackTrace(this,oy);else{const N=Error().stack;N&&(this.stack=N)}Z&&(this.message=String(Z));k!==void 0&&(this.cause=k)};
QyN=function(){};
g.bf=function(Z){return Z[Z.length-1]};
g.pi=function(Z,k,N){Array.prototype.forEach.call(Z,k,N)};
qrr=function(Z,k){var N=Z.length;const a=typeof Z==="string"?Z.split(""):Z;for(--N;N>=0;--N)N in a&&k.call(void 0,a[N],N,Z)};
g.Ry=function(Z,k,N){return Array.prototype.filter.call(Z,k,N)};
g.ni=function(Z,k,N){return Array.prototype.map.call(Z,k,N)};
jN=function(Z,k,N){return Array.prototype.reduce.call(Z,k,N)};
Er=function(Z,k){return Array.prototype.some.call(Z,k,void 0)};
g.Wy=function(Z,k,N){return Array.prototype.every.call(Z,k,N)};
g.ZD=function(Z,k,N){k=Yb(Z,k,N);return k<0?null:typeof Z==="string"?Z.charAt(k):Z[k]};
Yb=function(Z,k,N){const a=Z.length,T=typeof Z==="string"?Z.split(""):Z;for(let K=0;K<a;K++)if(K in T&&k.call(N,T[K],K,Z))return K;return-1};
g.NF=function(Z,k,N){var a=Z.length;const T=typeof Z==="string"?Z.split(""):Z;for(--a;a>=0;a--)if(a in T&&k.call(N,T[a],a,Z))return a;return-1};
g.KK=function(Z,k){return Array.prototype.indexOf.call(Z,k,void 0)>=0};
yH=function(Z){if(!Array.isArray(Z))for(let k=Z.length-1;k>=0;k--)delete Z[k];Z.length=0};
g.qF=function(Z,k){k=Array.prototype.indexOf.call(Z,k,void 0);let N;(N=k>=0)&&g.QH(Z,k);return N};
g.QH=function(Z,k){return Array.prototype.splice.call(Z,k,1).length==1};
g.rH=function(Z,k){k=Yb(Z,k);k>=0&&g.QH(Z,k)};
ryy=function(Z,k){let N=0;qrr(Z,function(a,T){k.call(void 0,a,T,Z)&&g.QH(Z,T)&&N++})};
g.CK=function(Z){return Array.prototype.concat.apply([],arguments)};
g.mr=function(Z){const k=Z.length;if(k>0){const N=Array(k);for(let a=0;a<k;a++)N[a]=Z[a];return N}return[]};
g.Ac=function(Z,k){for(let N=1;N<arguments.length;N++){const a=arguments[N];if(g.uf(a)){const T=Z.length||0,K=a.length||0;Z.length=T+K;for(let y=0;y<K;y++)Z[T+y]=a[y]}else Z.push(a)}};
g.dH=function(Z,k,N,a){Array.prototype.splice.apply(Z,HB(arguments,1))};
HB=function(Z,k,N){return arguments.length<=2?Array.prototype.slice.call(Z,k):Array.prototype.slice.call(Z,k,N)};
Cfj=function(Z){let k=0,N=0;const a=new Set;for(;N<Z.length;){const T=Z[N++],K=T;a.has(K)||(a.add(K),Z[k++]=T)}Z.length=k};
g.F_=function(Z,k,N){return X_(Z,N||LK,!1,k)};
tc=function(Z,k){return X_(Z,k,!0)};
X_=function(Z,k,N,a){let T=0,K=Z.length,y;for(;T<K;){const Q=T+(K-T>>>1);let q;N?q=k.call(void 0,Z[Q],Q,Z):q=k(a,Z[Q]);q>0?T=Q+1:(K=Q,y=!q)}return y?T:-T-1};
g.hc=function(Z,k){Z.sort(k||LK)};
mRX=function(Z,k){const N=LK;g.hc(Z,function(a,T){return N(k(a),k(T))})};
g.uT=function(Z,k,N){if(!g.uf(Z)||!g.uf(k)||Z.length!=k.length)return!1;const a=Z.length;N=N||syX;for(let T=0;T<a;T++)if(!N(Z[T],k[T]))return!1;return!0};
LK=function(Z,k){return Z>k?1:Z<k?-1:0};
syX=function(Z,k){return Z===k};
g.lT=function(Z,k,N){N=g.F_(Z,k,N);N<0&&g.dH(Z,-(N+1),0,k)};
g.fK=function(Z,k,N){const a={};g.pi(Z,function(T,K){a[k.call(N,T,K,Z)]=T});
return a};
Ayy=function(Z){const k=[];for(let N=0;N<Z;N++)k[N]="";return k};
Pfb=function(Z,k){k=Array.prototype.splice.call(Z,k,1);Array.prototype.splice.call(Z,0,0,k[0])};
cyy=function(Z){const k={};g.pi(Z,N=>{const a=N.event,T=k[a];k.hasOwnProperty(a)?T!==null&&(N.equals(T)||(k[a]=null)):k[a]=N});
ryy(Z,N=>k[N.event]===null)};
g.BB=function(Z,k,N){for(const a in Z)k.call(N,Z[a],a,Z)};
g.DD=function(Z,k,N){const a={};for(const T in Z)k.call(N,Z[T],T,Z)&&(a[T]=Z[T]);return a};
Oh=function(Z,k){const N={};for(const a in Z)N[a]=k.call(void 0,Z[a],a,Z);return N};
g.vB=function(Z,k,N){for(const a in Z)if(k.call(N,Z[a],a,Z))return!0;return!1};
iT=function(Z,k){for(const N in Z)if(!k.call(void 0,Z[N],N,Z))return!1;return!0};
g.gH=function(Z){for(const k in Z)return k};
wH=function(Z){for(const k in Z)return Z[k]};
$a=function(Z){const k=[];let N=0;for(const a in Z)k[N++]=Z[a];return k};
g.xa=function(Z){const k=[];let N=0;for(const a in Z)k[N++]=a;return k};
g.Ge=function(Z,k){return Z!==null&&k in Z};
g.ei=function(Z,k){for(const N in Z)if(Z[N]==k)return!0;return!1};
on=function(Z,k){for(const N in Z)if(k.call(void 0,Z[N],N,Z))return N};
Jc=function(Z,k){return(k=on(Z,k))&&Z[k]};
g.ze=function(Z){for(const k in Z)return!1;return!0};
g.Uh=function(Z){for(const k in Z)delete Z[k]};
g.bT=function(Z,k,N){return Z!==null&&k in Z?Z[k]:N};
g.pK=function(Z,k){for(const N in Z)if(!(N in k)||Z[N]!==k[N])return!1;for(const N in k)if(!(N in Z))return!1;return!0};
g.Rn=function(Z){const k={};for(const N in Z)k[N]=Z[N];return k};
g.MF=function(Z){if(!Z||typeof Z!=="object")return Z;if(typeof Z.clone==="function")return Z.clone();if(typeof Map!=="undefined"&&Z instanceof Map)return new Map(Z);if(typeof Set!=="undefined"&&Z instanceof Set)return new Set(Z);if(Z instanceof Date)return new Date(Z.getTime());const k=Array.isArray(Z)?[]:typeof ArrayBuffer!=="function"||typeof ArrayBuffer.isView!=="function"||!ArrayBuffer.isView(Z)||Z instanceof DataView?{}:new Z.constructor(Z.length);for(const N in Z)k[N]=g.MF(Z[N]);return k};
g.In=function(Z,k){let N,a;for(let T=1;T<arguments.length;T++){a=arguments[T];for(N in a)Z[N]=a[N];for(let K=0;K<nK.length;K++)N=nK[K],Object.prototype.hasOwnProperty.call(a,N)&&(Z[N]=a[N])}};
ji=function(Z,k,N){Z.V[k]||(Z.V[k]=new Hir(N));return Z.V[k]};
XyN=function(Z){Z.V.queryid||(Z.V.queryid=new dRf)};
Eh=function(Z,k,N){(Z=Z.V[k])&&Z.D(N)};
WB=function(Z,k){if(g.Ge(Z.D,k))return Z.D[k];if(Z=Z.V[k])return Z.getValue()};
Ya=function(Z){const k={},N=g.DD(Z.V,a=>a.V);
g.BB(N,(a,T)=>{a=Z.D[T]!==void 0?String(Z.D[T]):a.V&&a.U!==null?String(a.U):"";a.length>0&&(k[T]=a)},Z);
return k};
LGj=function(Z){Z=Ya(Z);const k=[];g.BB(Z,(N,a)=>{a in Object.prototype||typeof N!="undefined"&&k.push([a,":",N].join(""))});
return k};
Za=function(Z,k){return Z.lastIndexOf(k,0)==0};
NG=function(Z,k){const N=Z.length-k.length;return N>=0&&Z.indexOf(k,N)==N};
g.a2=function(Z){return/^[\s\xa0]*$/.test(Z)};
g.TI=function(Z,k){return Z.indexOf(k)!=-1};
K5=function(Z,k){return g.TI(Z.toLowerCase(),k.toLowerCase())};
g.Qe=function(Z,k){let N=0;Z=String(Z).trim().split(".");k=String(k).trim().split(".");const a=Math.max(Z.length,k.length);for(let y=0;N==0&&y<a;y++){var T=Z[y]||"",K=k[y]||"";do{T=/(\d*)(\D*)(.*)/.exec(T)||["","","",""];K=/(\d*)(\D*)(.*)/.exec(K)||["","","",""];if(T[0].length==0&&K[0].length==0)break;N=ye(T[1].length==0?0:parseInt(T[1],10),K[1].length==0?0:parseInt(K[1],10))||ye(T[2].length==0,K[2].length==0)||ye(T[2],K[2]);T=T[3];K=K[3]}while(N==0)}return N};
ye=function(Z,k){return Z<k?-1:Z>k?1:0};
g.qG=function(){var Z=g.dX.navigator;return Z&&(Z=Z.userAgent)?Z:""};
A3=function(Z){if(!rI&&!C5||!sD)return!1;for(let k=0;k<sD.brands.length;k++){const {brand:N}=sD.brands[k];if(N&&g.TI(N,Z))return!0}return!1};
PC=function(Z){return g.TI(g.qG(),Z)};
cC=function(){return rI||C5?!!sD&&sD.brands.length>0:!1};
HC=function(){return cC()?!1:PC("Opera")};
dI=function(){return cC()?!1:PC("Trident")||PC("MSIE")};
X7=function(){return cC()?A3("Microsoft Edge"):PC("Edg/")};
L5=function(){return PC("Firefox")||PC("FxiOS")};
F7=function(){return PC("Safari")&&!(Ve()||(cC()?0:PC("Coast"))||HC()||(cC()?0:PC("Edge"))||X7()||(cC()?A3("Opera"):PC("OPR"))||L5()||PC("Silk")||PC("Android"))};
Ve=function(){return cC()?A3("Chromium"):(PC("Chrome")||PC("CriOS"))&&!(cC()?0:PC("Edge"))||PC("Silk")};
t3=function(){return PC("Android")&&!(Ve()||L5()||HC()||PC("Silk"))};
VNy=function(Z){const k={};Z.forEach(N=>{k[N[0]]=N[1]});
return N=>k[N.find(a=>a in k)]||""};
FGf=function(Z){var k=g.qG();if(Z==="Internet Explorer"){if(dI())if((Z=/rv: *([\d\.]*)/.exec(k))&&Z[1])k=Z[1];else{Z="";var N=/MSIE +([\d\.]+)/.exec(k);if(N&&N[1])if(k=/Trident\/(\d.\d)/.exec(k),N[1]=="7.0")if(k&&k[1])switch(k[1]){case "4.0":Z="8.0";break;case "5.0":Z="9.0";break;case "6.0":Z="10.0";break;case "7.0":Z="11.0"}else Z="7.0";else Z=N[1];k=Z}else k="";return k}const a=RegExp("([A-Z][\\w ]+)/([^\\s]+)\\s*(?:\\((.*?)\\))?","g");N=[];let T;for(;T=a.exec(k);)N.push([T[1],T[2],T[3]||void 0]);
k=VNy(N);switch(Z){case "Opera":if(HC())return k(["Version","Opera"]);if(cC()?A3("Opera"):PC("OPR"))return k(["OPR"]);break;case "Microsoft Edge":if(cC()?0:PC("Edge"))return k(["Edge"]);if(X7())return k(["Edg"]);break;case "Chromium":if(Ve())return k(["Chrome","CriOS","HeadlessChrome"])}return Z==="Firefox"&&L5()||Z==="Safari"&&F7()||Z==="Android Browser"&&t3()||Z==="Silk"&&PC("Silk")?(k=N[2])&&k[1]||"":""};
h3=function(Z){if(cC()&&Z!=="Silk"){var k=sD.brands.find(({brand:N})=>N===Z);
if(!k||!k.version)return NaN;k=k.version.split(".")}else{k=FGf(Z);if(k==="")return NaN;k=k.split(".")}return k.length===0?NaN:Number(k[0])};
tNf=function(){let Z=null;if(!uE)return Z;try{const k=N=>N;
Z=uE.createPolicy("goog#html",{createHTML:k,createScript:k,createScriptURL:k})}catch(k){}return Z};
f5=function(){lE===void 0&&(lE=tNf());return lE};
Da=function(Z){const k=f5();Z=k?k.createScriptURL(Z):Z;return new BC(Z)};
vC=function(Z){if(Z instanceof BC)return Z.V;throw Error("");};
g.gI=function(Z){if(Z instanceof iE)return Z.V;throw Error("");};
$u=function(Z){return new wI(k=>k.substr(0,Z.length+1).toLowerCase()===Z+":")};
hUR=function(Z,k=xu){if(Z instanceof iE)return Z;for(let N=0;N<k.length;++N){const a=k[N];if(a instanceof wI&&a.cG(Z))return new iE(Z)}};
g.GI=function(Z,k=xu){return hUR(Z,k)||u0i};
SZ=function(Z){if(lj0.test(Z))return Z};
eZ=function(Z){return Z instanceof iE?g.gI(Z):SZ(Z)};
g.o2=function(Z,k){k=eZ(k);k!==void 0&&(Z.href=k)};
J3=function(Z,k=`unexpected value ${Z}!`){throw Error(k);};
UD=function(Z){const k=f5();Z=k?k.createHTML(Z):Z;return new zI(Z)};
bE=function(Z){if(Z instanceof zI)return Z.V;throw Error("");};
g.p5=function(Z,k,N,a){k=eZ(k);return k!==void 0?Z.open(k,N,a):null};
R2=function(Z=document){Z=Z.querySelector?.("script[nonce]");return Z==null?"":Z.nonce||Z.getAttribute("nonce")||""};
n5=function(Z){const k=f5();Z=k?k.createScript(Z):Z;return new MG(Z)};
I2=function(Z){if(Z instanceof MG)return Z.V;throw Error("");};
jZ=function(Z){const k=R2(Z.ownerDocument);k&&Z.setAttribute("nonce",k)};
g.ED=function(Z,k){Z.src=vC(k);jZ(Z)};
BXi=function(Z){var k="true".toString(),N=[fj0`data-`];if(N.length===0)throw Error("");if(N.map(a=>{if(a instanceof WC)a=a.V;else throw Error("");return a}).every(a=>"data-loaded".indexOf(a)!==0))throw Error('Attribute "data-loaded" does not match any of the allowed prefixes.');
Z.setAttribute("data-loaded",k)};
Yu=function(Z,k){Z.__closure__error__context__984382||(Z.__closure__error__context__984382={});Z.__closure__error__context__984382.severity=k};
DRy=function(Z){var k=g.Vf("window.location.href");Z==null&&(Z='Unknown Error of type "null/undefined"');if(typeof Z==="string")return{message:Z,name:"Unknown error",lineNumber:"Not available",fileName:k,stack:"Not available"};let N,a;var T=!1;try{N=Z.lineNumber||Z.line||"Not available"}catch(K){N="Not available",T=!0}try{a=Z.fileName||Z.filename||Z.sourceURL||g.dX.$googDebugFname||k}catch(K){a="Not available",T=!0}k=Zl(Z);if(!(!T&&Z.lineNumber&&Z.fileName&&Z.stack&&Z.message&&Z.name)){T=Z.message;
if(T==null){if(Z.constructor&&Z.constructor instanceof Function){if(Z.constructor.name)T=Z.constructor.name;else if(T=Z.constructor,kK[T])T=kK[T];else{T=String(T);if(!kK[T]){const K=/function\s+([^\(]+)/m.exec(T);kK[T]=K?K[1]:"[Anonymous]"}T=kK[T]}T='Unknown Error of type "'+T+'"'}else T="Unknown Error of unknown type";typeof Z.toString==="function"&&Object.prototype.toString!==Z.toString&&(T+=": "+Z.toString())}return{message:T,name:Z.name||"UnknownError",lineNumber:N,fileName:a,stack:k||"Not available"}}return{message:Z.message,
name:Z.name,lineNumber:Z.lineNumber,fileName:Z.fileName,stack:k}};
Zl=function(Z,k){k||(k={});k[Nc(Z)]=!0;let N=Z.stack||"";var a=Z.cause;a&&!k[Nc(a)]&&(N+="\nCaused by: ",a.stack&&a.stack.indexOf(a.toString())==0||(N+=typeof a==="string"?a:a.message+"\n"),N+=Zl(a,k));Z=Z.errors;if(Array.isArray(Z)){a=1;let T;for(T=0;T<Z.length&&!(a>4);T++)k[Nc(Z[T])]||(N+="\nInner error "+a++ +": ",Z[T].stack&&Z[T].stack.indexOf(Z[T].toString())==0||(N+=typeof Z[T]==="string"?Z[T]:Z[T].message+"\n"),N+=Zl(Z[T],k));T<Z.length&&(N+="\n... "+(Z.length-T)+" more inner errors")}return N};
Nc=function(Z){let k="";typeof Z.toString==="function"&&(k=""+Z);return k+Z.stack};
ak=function(Z,k,N){return Z.parseFromString(bE(k),N)};
Tm=function(Z,k){return new Worker(vC(Z),k)};
g.Kg=function(Z){return encodeURIComponent(String(Z))};
y2=function(Z){return decodeURIComponent(Z.replace(/\+/g," "))};
Q2=function(Z){Oif.test(Z)&&(Z.indexOf("&")!=-1&&(Z=Z.replace(vby,"&amp;")),Z.indexOf("<")!=-1&&(Z=Z.replace(iif,"&lt;")),Z.indexOf(">")!=-1&&(Z=Z.replace(gbN,"&gt;")),Z.indexOf('"')!=-1&&(Z=Z.replace(wy0,"&quot;")),Z.indexOf("'")!=-1&&(Z=Z.replace($Ry,"&#39;")),Z.indexOf("\x00")!=-1&&(Z=Z.replace(xRG,"&#0;")));return Z};
g.qc=function(Z){return Z==null?"":String(Z)};
rJ=function(Z){let k=0;for(let N=0;N<Z.length;++N)k=31*k+Z.charCodeAt(N)>>>0;return k};
Cg=function(Z){const k=Number(Z);return k==0&&g.a2(Z)?NaN:k};
mE=function(Z){return String(Z).replace(/\-([a-z])/g,function(k,N){return N.toUpperCase()})};
sf=function(){return"googleAvInapp".replace(/([A-Z])/g,"-$1").toLowerCase()};
GfN=function(Z){return Z.replace(RegExp("(^|[\\s]+)([a-z])","g"),function(k,N,a){return N+a.toUpperCase()})};
SrG=function(Z){var k=1;Z=Z.split(":");const N=[];for(;k>0&&Z.length;)N.push(Z.shift()),k--;Z.length&&N.push(Z.join(":"));return N};
Ag=function(){return rI||C5?!!sD&&!!sD.platform:!1};
Ps=function(){return Ag()?sD.platform==="Android":PC("Android")};
cs=function(){return PC("iPhone")&&!PC("iPod")&&!PC("iPad")};
Hs=function(){return cs()||PC("iPad")||PC("iPod")};
dJ=function(){return Ag()?sD.platform==="macOS":PC("Macintosh")};
Xz=function(){return Ag()?sD.platform==="Windows":PC("Windows")};
Lg=function(Z){Lg[" "](Z);return Z};
V2=function(Z,k){try{return Lg(Z[k]),!0}catch(N){}return!1};
obf=function(Z,k){var N=eUN;return Object.prototype.hasOwnProperty.call(N,Z)?N[Z]:N[Z]=k(Z)};
g.hg=function(Z){return obf(Z,function(){return g.Qe(Fz,Z)>=0})};
g.u0=function(Z,k,N){return Math.min(Math.max(Z,k),N)};
g.l0=function(Z,k){Z%=k;return Z*k<0?Z+k:Z};
Dl=function(Z,k,N){return Z+N*(k-Z)};
g.Of=function(Z,k){this.x=Z!==void 0?Z:0;this.y=k!==void 0?k:0};
vs=function(Z,k){return Z==k?!0:Z&&k?Z.x==k.x&&Z.y==k.y:!1};
g.i0=function(Z,k){this.width=Z;this.height=k};
g.gJ=function(Z,k){return Z==k?!0:Z&&k?Z.width==k.width&&Z.height==k.height:!1};
wJ=function(Z){return Z.width*Z.height};
fj0=function(Z){return new WC(Z[0].toLowerCase())};
$K=function(Z){if(Z instanceof zI)return Z;Z=String(Z).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;");return UD(Z)};
zU0=function(Z){return JyR(Z)};
JyR=function(Z){const k=$K("");return UD(Z.map(N=>bE($K(N))).join(bE(k).toString()))};
RUy=function(Z){var k;if(!xK.test("div"))throw Error("");if(URy.indexOf("DIV")!==-1)throw Error("");let N="<div";Z&&(N+=biN(Z));Array.isArray(k)||(k=k===void 0?[]:[k]);pyi.indexOf("DIV")!==-1?N+=">":(Z=zU0(k.map(a=>a instanceof zI?a:$K(String(a)))),N+=">"+Z.toString()+"</div>");
return UD(N)};
biN=function(Z){var k="";const N=Object.keys(Z);for(let K=0;K<N.length;K++){var a=N[K],T=Z[a];if(!xK.test(a))throw Error("");if(T!==void 0&&T!==null){if(/^on./i.test(a))throw Error("");MNR.indexOf(a.toLowerCase())!==-1&&(T=T instanceof iE?T.toString():SZ(String(T))||"about:invalid#zClosurez");T=`${a}="${$K(String(T))}"`;k+=" "+T}}return k};
g.Gm=function(Z,...k){if(k.length===0)return Da(Z[0]);let N=Z[0];for(let a=0;a<k.length;a++)N+=encodeURIComponent(k[a])+Z[a+1];return Da(N)};
Jg=function(Z){return Z?new Se(ee(Z)):ok||(ok=new Se)};
zm=function(Z,k){return typeof k==="string"?Z.getElementById(k):k};
g.Uf=function(Z,k){return(k||document).getElementsByTagName(String(Z))};
g.pg=function(Z,k){return(k||document).querySelectorAll("."+Z)};
g.Mc=function(Z,k){var N=k||document;N.getElementsByClassName?Z=N.getElementsByClassName(Z)[0]:(N=document,Z=Z?(k||N).querySelector(Z?"."+Z:""):g.Rk(N,"*",Z,k)[0]||null);return Z||null};
g.Rk=function(Z,k,N,a){Z=a||Z;return(k=k&&k!="*"?String(k).toUpperCase():"")||N?Z.querySelectorAll(k+(N?"."+N:"")):Z.getElementsByTagName("*")};
Ik=function(Z,k){g.BB(k,function(N,a){a=="style"?Z.style.cssText=N:a=="class"?Z.className=N:a=="for"?Z.htmlFor=N:ng.hasOwnProperty(a)?Z.setAttribute(ng[a],N):Za(a,"aria-")||Za(a,"data-")?Z.setAttribute(a,N):Z[a]=N})};
je=function(Z){Z=Z.document;Z=Z.compatMode=="CSS1Compat"?Z.documentElement:Z.body;return new g.i0(Z.clientWidth,Z.clientHeight)};
Ws=function(Z){const k=Ef(Z);Z=Z.defaultView;return new g.Of(Z?.pageXOffset||k.scrollLeft,Z?.pageYOffset||k.scrollTop)};
Ef=function(Z){return Z.scrollingElement?Z.scrollingElement:g.YK||Z.compatMode!="CSS1Compat"?Z.body||Z.documentElement:Z.documentElement};
ZJ=function(Z){return Z?Z.defaultView:window};
a4=function(Z,k,N){var a=arguments,T=document;const K=a[1],y=k1(T,String(a[0]));K&&(typeof K==="string"?y.className=K:Array.isArray(K)?y.className=K.join(" "):Ik(y,K));a.length>2&&Ni(T,y,a,2);return y};
Ni=function(Z,k,N,a){function T(K){K&&k.appendChild(typeof K==="string"?Z.createTextNode(K):K)}
for(;a<N.length;a++){const K=N[a];!g.uf(K)||g.lf(K)&&K.nodeType>0?T(K):g.pi(K&&typeof K.length=="number"&&typeof K.item=="function"?g.mr(K):K,T)}};
g.TU=function(Z){return k1(document,Z)};
k1=function(Z,k){k=String(k);Z.contentType==="application/xhtml+xml"&&(k=k.toLowerCase());return Z.createElement(k)};
g.K1=function(Z){return document.createTextNode(String(Z))};
g.yp=function(Z,k){Z.appendChild(k)};
g.Qp=function(Z){let k;for(;k=Z.firstChild;)Z.removeChild(k)};
qi=function(Z,k,N){Z.insertBefore(k,Z.childNodes[N]||null)};
g.rM=function(Z){return Z&&Z.parentNode?Z.parentNode.removeChild(Z):null};
g.C1=function(Z,k){return Z&&k?Z==k||Z.contains(k):!1};
ee=function(Z){return Z.nodeType==9?Z:Z.ownerDocument||Z.document};
g.m_=function(Z,k){if("textContent"in Z)Z.textContent=k;else if(Z.nodeType==3)Z.data=String(k);else if(Z.firstChild&&Z.firstChild.nodeType==3){for(;Z.lastChild!=Z.firstChild;)Z.removeChild(Z.lastChild);Z.firstChild.data=String(k)}else g.Qp(Z),Z.appendChild(ee(Z).createTextNode(String(k)))};
AI=function(Z){return Z.tagName=="A"&&Z.hasAttribute("href")||Z.tagName=="INPUT"||Z.tagName=="TEXTAREA"||Z.tagName=="SELECT"||Z.tagName=="BUTTON"?!Z.disabled&&(!Z.hasAttribute("tabindex")||sQ(Z)):Z.hasAttribute("tabindex")&&sQ(Z)};
sQ=function(Z){Z=Z.tabIndex;return typeof Z==="number"&&Z>=0&&Z<32768};
cK=function(Z,k,N){if(!k&&!N)return null;const a=k?String(k).toUpperCase():null;return PK(Z,function(T){return(!a||T.nodeName==a)&&(!N||typeof T.className==="string"&&g.KK(T.className.split(/\s+/),N))},!0)};
PK=function(Z,k,N){Z&&!N&&(Z=Z.parentNode);for(N=0;Z;){if(k(Z))return Z;Z=Z.parentNode;N++}return null};
Se=function(Z){this.V=Z||g.dX.document||document};
dM=function(){return!(!HK||!HK.performance)};
XM=function(Z){return g.YK?"webkit"+Z:Z.toLowerCase()};
L1=function(Z){return function(){return Z}};
g.Vp=function(){};
nbf=function(Z){var k=k||0;return function(){return Z.apply(this,Array.prototype.slice.call(arguments,0,k))}};
FM=function(Z){let k=!1,N;return function(){k||(N=Z(),k=!0);return N}};
tI=function(Z){let k=Z;return function(){if(k){const N=k;k=null;N()}}};
hI=function(Z,k,N){let a=0;return function(T){g.dX.clearTimeout(a);const K=arguments;a=g.dX.setTimeout(function(){Z.apply(N,K)},k)}};
uj=function(Z,k,N,a){this.top=Z;this.right=k;this.bottom=N;this.left=a};
lj=function(Z){return Z.right-Z.left};
f1=function(Z,k){return Z==k?!0:Z&&k?Z.top==k.top&&Z.right==k.right&&Z.bottom==k.bottom&&Z.left==k.left:!1};
BK=function(Z,k,N){k instanceof g.Of?(Z.left+=k.x,Z.right+=k.x,Z.top+=k.y,Z.bottom+=k.y):(Z.left+=k,Z.right+=k,typeof N==="number"&&(Z.top+=N,Z.bottom+=N));return Z};
g.DJ=function(Z,k,N,a){this.left=Z;this.top=k;this.width=N;this.height=a};
OQ=function(Z,k){return Z==k?!0:Z&&k?Z.left==k.left&&Z.width==k.width&&Z.top==k.top&&Z.height==k.height:!1};
g.ij=function(Z,k,N){if(typeof k==="string")vK(Z,N,k);else for(const a in k)vK(Z,k[a],a)};
vK=function(Z,k,N){(N=gM(Z,N))&&(Ijy.test(N)?Z.style.setProperty(N,k):Z.style[N]=k)};
gM=function(Z,k){let N=wM[k];if(!N){var a=mE(k);N=a;Z.style[a]===void 0&&(a=(g.YK?"Webkit":$1?"Moz":null)+GfN(a),Z.style[a]!==void 0&&(N=a));wM[k]=N}return N};
g.x1=function(Z,k){const N=Z.style[mE(k)];return typeof N!=="undefined"?N:Z.style[gM(Z,k)]||""};
GU=function(Z,k){const N=ee(Z);return N.defaultView&&N.defaultView.getComputedStyle&&(Z=N.defaultView.getComputedStyle(Z,null))?Z[k]||Z.getPropertyValue(k)||"":""};
SA=function(Z,k){return GU(Z,k)||(Z.currentStyle?Z.currentStyle[k]:null)||Z.style&&Z.style[k]};
g.o4=function(Z,k,N){let a;k instanceof g.Of?(a=k.x,k=k.y):(a=k,k=N);Z.style.left=eA(a,!1);Z.style.top=eA(k,!1)};
JI=function(Z){try{return Z.getBoundingClientRect()}catch(k){return{left:0,top:0,right:0,bottom:0}}};
jyf=function(Z){const k=ee(Z);let N=SA(Z,"position"),a=N=="fixed"||N=="absolute";for(Z=Z.parentNode;Z&&Z!=k;Z=Z.parentNode)if(Z.nodeType==11&&Z.host&&(Z=Z.host),N=SA(Z,"position"),a=a&&N=="static"&&Z!=k.documentElement&&Z!=k.body,!a&&(Z.scrollWidth>Z.clientWidth||Z.scrollHeight>Z.clientHeight||N=="fixed"||N=="absolute"||N=="relative"))return Z;return null};
g.zU=function(Z){var k=ee(Z);const N=new g.Of(0,0);if(Z==(k?ee(k):document).documentElement)return N;Z=JI(Z);k=Jg(k);k=Ws(k.V);N.x=Z.left+k.x;N.y=Z.top+k.y;return N};
var Ebb=function(){return UQ[c[2]](this,24,8659)};
p1=function(Z,k){const N=new g.Of(0,0);let a=ZJ(ee(Z));if(!V2(a,"parent"))return N;do{const T=a==k?g.zU(Z):bj(Z);N.x+=T.x;N.y+=T.y}while(a&&a!=k&&a!=a.parent&&(Z=a.frameElement)&&(a=a.parent));return N};
g.Mi=function(Z,k){Z=R4(Z);k=R4(k);return new g.Of(Z.x-k.x,Z.y-k.y)};
bj=function(Z){Z=JI(Z);return new g.Of(Z.left,Z.top)};
R4=function(Z){if(Z.nodeType==1)return bj(Z);Z=Z.changedTouches?Z.changedTouches[0]:Z;return new g.Of(Z.clientX,Z.clientY)};
g.n1=function(Z,k,N){if(k instanceof g.i0)N=k.height,k=k.width;else if(N==void 0)throw Error("missing height argument");Z.style.width=eA(k,!0);Z.style.height=eA(N,!0)};
eA=function(Z,k){typeof Z=="number"&&(Z=(k?Math.round(Z):Z)+"px");return Z};
g.I4=function(Z){var k=WGy;if(SA(Z,"display")!="none")return k(Z);const N=Z.style,a=N.display,T=N.visibility,K=N.position;N.visibility="hidden";N.position="absolute";N.display="inline";Z=k(Z);N.display=a;N.position=K;N.visibility=T;return Z};
WGy=function(Z){const k=Z.offsetWidth,N=Z.offsetHeight,a=g.YK&&!k&&!N;return(k===void 0||a)&&Z.getBoundingClientRect?(Z=JI(Z),new g.i0(Z.right-Z.left,Z.bottom-Z.top)):new g.i0(k,N)};
g.jA=function(Z,k){Z.style.display=k?"":"none"};
EQ=function(Z){return Z?Z.passive&&YrX()?Z:Z.capture||!1:!1};
WK=function(Z,k,N,a){return typeof Z.addEventListener==="function"?(Z.addEventListener(k,N,EQ(a)),!0):!1};
Y1=function(Z){return Z.prerendering?3:{visible:1,hidden:2,prerender:3,preview:4,unloaded:5,"":0}[Z.visibilityState||Z.webkitVisibilityState||Z.mozVisibilityState||""]??0};
Zt=function(Z){try{return!!Z&&Z.location.href!=null&&V2(Z,"foo")}catch{return!1}};
k9=function(Z){let k=Z;for(;Z&&Z!=Z.parent;)Z=Z.parent,Zt(Z)&&(k=Z);return k};
aI=function(){return(rI||C5)&&sD?sD.mobile:!N3()&&(PC("iPod")||PC("iPhone")||PC("Android")||PC("IEMobile"))};
N3=function(){return(rI||C5)&&sD?!sD.mobile&&(PC("iPad")||PC("Android")||PC("Silk")):PC("iPad")||PC("Android")&&!PC("Mobile")||PC("Silk")};
Kl=function(){var Z=g.dX;const k=[];let N=null,a;do{a=Z;if(Zt(a)){var T=a.location.href;N=a.document&&a.document.referrer||null}else T=N,N=null;k.push(new TW(T||""));try{Z=a.parent}catch(K){Z=null}}while(Z&&a!==Z);for(let K=0,y=k.length-1;K<=y;++K)k[K].depth=y-K;a=g.dX;if(a.location&&a.location.ancestorOrigins&&a.location.ancestorOrigins.length===k.length-1)for(Z=1;Z<k.length;++Z)T=k[Z],T.url||(T.url=a.location.ancestorOrigins[Z-1]||"",T.V=!0);return k};
ya=function(Z){Z=Z||Kl();let k=new TW(g.dX.location.href,!1),N=null;const a=Z.length-1;for(var T=a;T>=0;--T){var K=Z[T];!N&&ZKy.test(K.url)&&(N=K);if(K.url&&!K.V){k=K;break}}T=null;K=Z.length&&Z[a].url;k.depth!==0&&K&&(T=Z[a]);return new kef(k,T,N)};
q3=function(Z,k){if(Z)for(const N in Z)Object.prototype.hasOwnProperty.call(Z,N)&&k(Z[N],N,Z)};
aDN=function(){const Z=[];q3(NHy,k=>{Z.push(k)});
return Z};
var THj=function(Z,k){return rP[c[2]](this,2,5113,Z,k)};
Cl=function(Z,k){const N={};N[Z]=k;return[N]};
sm=function(Z,k,N,a,T){const K=[];q3(Z,(y,Q)=>{(y=m1(y,k,N,a,T))&&K.push(`${Q}=${y}`)});
return K.join(k)};
m1=function(Z,k,N,a,T){if(Z==null)return"";k=k||"&";N=N||",$";typeof N==="string"&&(N=N.split(""));if(Z instanceof Array){if(a||(a=0),a<N.length){const K=[];for(let y=0;y<Z.length;y++)K.push(m1(Z[y],k,N,a+1,T));return K.join(N[a])}}else if(typeof Z==="object")return T||(T=0),T<2?encodeURIComponent(sm(Z,k,N,a,T+1)):"...";return encodeURIComponent(String(Z))};
Krf=function(Z){let k=1;for(const N in Z.U)N.length>k&&(k=N.length);return 3997-k-Z.D.length-1};
ycb=function(Z,k){g.Wy(k,T=>T.depth>=0);
const N=jN(k,(T,K)=>Math.max(T,K.depth),-1),a=Ayy(N+2);
a[0]=Z;g.pi(k,T=>a[T.depth+1]=T.V);
return a};
qhG=function(){return Qn0().map(Z=>m1(Z))};
Ax=function(Z){Z.Lop=!0;return Z};
CTr=function(){const Z=PF("IFRAME"),k={};g.pi(rcb(),N=>{Z.sandbox&&Z.sandbox.supports&&Z.sandbox.supports(N)&&(k[N]=!0)});
return k};
PF=function(Z,k=document){return k.createElement(String(Z).toLowerCase())};
cF=function(Z){HK.google_image_requests||(HK.google_image_requests=[]);const k=PF("IMG",HK.document);k.src=Z;HK.google_image_requests.push(k)};
mFX=function(){HF();const Z=HK.document;return!!(Z&&Z.body&&Z.body.getBoundingClientRect&&typeof HK.setInterval==="function"&&typeof HK.clearInterval==="function"&&typeof HK.setTimeout==="function"&&typeof HK.clearTimeout==="function")};
dP=function(){HF();return qhG()};
HF=function(){var Z=Xr(sny);if(!Z.V){if(!HK)throw Error("Context has not been set and window is undefined.");Z.V=Xr(Acy)}return Z.V};
Va=function(Z){return(Ll||(Ll=new TextEncoder)).encode(Z)};
Fr=function(Z){g.dX.setTimeout(()=>{throw Z;},0)};
PTf=function(Z){return Array.prototype.map.call(Z,function(k){k=k.toString(16);return k.length>1?k:"0"+k}).join("")};
tx=function(Z){const k=[];for(let N=0;N<Z.length;N+=2)k.push(parseInt(Z.substring(N,N+2),16));return k};
g.hx=function(Z){const k=[];let N=0;for(let a=0;a<Z.length;a++){let T=Z.charCodeAt(a);T<128?k[N++]=T:(T<2048?k[N++]=T>>6|192:((T&64512)==55296&&a+1<Z.length&&(Z.charCodeAt(a+1)&64512)==56320?(T=65536+((T&1023)<<10)+(Z.charCodeAt(++a)&1023),k[N++]=T>>18|240,k[N++]=T>>12&63|128):k[N++]=T>>12|224,k[N++]=T>>6&63|128),k[N++]=T&63|128)}return k};
g.fl=function(Z,k){k===void 0&&(k=0);uK();k=lK[k];const N=Array(Math.floor(Z.length/3)),a=k[64]||"";let T=0,K=0;for(;T<Z.length-2;T+=3){var y=Z[T],Q=Z[T+1],q=Z[T+2],r=k[y>>2];y=k[(y&3)<<4|Q>>4];Q=k[(Q&15)<<2|q>>6];q=k[q&63];N[K++]=""+r+y+Q+q}r=0;q=a;switch(Z.length-T){case 2:r=Z[T+1],q=k[(r&15)<<2]||a;case 1:Z=Z[T],N[K]=""+k[Z>>2]+k[(Z&3)<<4|r>>4]+q+a}return N.join("")};
g.BF=function(Z,k,N){if(k){const a=[];let T=0;for(let K=0;K<Z.length;K++){let y=Z.charCodeAt(K);if(y>255){const Q=Error("go/unicode-to-byte-error");if(N)throw Q;a[T++]=y&255;y>>=8}a[T++]=y}Z=g.fl(a,k)}else Z=g.dX.btoa(Z);return Z};
Om=function(Z){const k=[];Dt(Z,function(N){k.push(N)});
return k};
vF=function(Z){const k=Z.length;let N=k*3/4;N%3?N=Math.floor(N):g.TI("=.",Z[k-1])&&(N=g.TI("=.",Z[k-2])?N-2:N-1);const a=new Uint8Array(N);let T=0;Dt(Z,function(K){a[T++]=K});
return T!==N?a.subarray(0,T):a};
Dt=function(Z,k){function N(T){for(;a<Z.length;){const K=Z.charAt(a++),y=iK[K];if(y!=null)return y;if(!g.a2(K))throw Error("Unknown base64 encoding at char: "+K);}return T}
uK();let a=0;for(;;){const T=N(-1),K=N(0),y=N(64),Q=N(64);if(Q===64&&T===-1)break;k(T<<2|K>>4);y!=64&&(k(K<<4&240|y>>2),Q!=64&&k(y<<6&192|Q))}};
uK=function(){if(!iK){iK={};var Z="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),k=["+/=","+/","-_=","-_.","-_"];for(let N=0;N<5;N++){const a=Z.concat(k[N].split(""));lK[N]=a;for(let T=0;T<a.length;T++){const K=a[T];iK[K]===void 0&&(iK[K]=T)}}}};
HKy=function(Z){return ccy[Z]||""};
wP=function(Z){Z=gP.test(Z)?Z.replace(gP,HKy):Z;Z=atob(Z);const k=new Uint8Array(Z.length);for(let N=0;N<Z.length;N++)k[N]=Z.charCodeAt(N);return k};
Sv=function(){return $9||($9=new x9(null,GW))};
oI=function(Z){ev(GW);var k=Z.V;k=k==null||k!=null&&k instanceof Uint8Array?k:typeof k==="string"?wP(k):null;return k==null?k:Z.V=k};
Jx=function(Z){return new Uint8Array(oI(Z)||0)};
ev=function(Z){if(Z!==GW)throw Error("illegal external caller");};
zW=function(Z){Z=Error(Z);Yu(Z,"warning");return Z};
bK=function(Z,k){if(Z!=null){var N=Um??(Um={});var a=N[Z]||0;a>=k||(N[Z]=a+1,Z=Error(),Yu(Z,"incident"),Fr(Z))}};
pl=function(Z,k=!1){return k&&Symbol.for&&Z?Symbol.for(Z):Z!=null?Symbol(Z):Symbol()};
nl=function(Z,k){return k===void 0?Z.V!==RI&&!!(2&(Z.Sl[M3]|0)):!!(2&k)&&Z.V!==RI};
II=function(Z,k){if(Z!=null)if(typeof Z==="string")Z=Z?new x9(Z,GW):Sv();else if(Z.constructor!==x9)if(Z!=null&&Z instanceof Uint8Array)Z=Z.length?new x9(new Uint8Array(Z),GW):Sv();else{if(!k)throw Error();Z=void 0}return Z};
jv=function(Z,k){if(typeof k!=="number"||k<0||k>=Z.length)throw Error();};
Em=function(Z,k,N){const a=k&128?0:-1,T=Z.length;var K;if(K=!!T)K=Z[T-1],K=K!=null&&typeof K==="object"&&K.constructor===Object;const y=T+(K?-1:0);for(k=k&128?1:0;k<y;k++)N(k-a,Z[k]);if(K){Z=Z[T-1];for(const Q in Z)!isNaN(Q)&&N(+Q,Z[Q])}};
Y9=function(Z){return Z&128?WF:void 0};
Nm=function(Z){if(Zq(Z)){if(!/^\s*(?:-?[1-9]\d*|0)?\s*$/.test(Z))throw Error(String(Z));}else if(k4(Z)&&!Number.isSafeInteger(Z))throw Error(String(Z));return BigInt(Z)};
KC=function(Z){const k=Z>>>0;aq=k;TX=(Z-k)/4294967296>>>0};
yV=function(Z){if(Z<0){KC(0-Z);Z=aq;var k=TX;k=~k;Z?Z=~Z+1:k+=1;const [N,a]=[Z,k];aq=N>>>0;TX=a>>>0}else KC(Z)};
qm=function(Z,k){const N=k*4294967296+(Z>>>0);return Number.isSafeInteger(N)?N:QV(Z,k)};
rU=function(Z,k){const N=k&2147483648;N&&(Z=~Z+1>>>0,k=~k>>>0,Z==0&&(k=k+1>>>0));Z=qm(Z,k);return typeof Z==="number"?N?-Z:Z:N?"-"+Z:Z};
CC=function(Z,k){return Nm(BigInt.asIntN(64,(BigInt.asUintN(32,BigInt(k))<<BigInt(32))+BigInt.asUintN(32,BigInt(Z))))};
QV=function(Z,k){k>>>=0;Z>>>=0;var N;k<=2097151?N=""+(4294967296*k+Z):N=""+(BigInt(k)<<BigInt(32)|BigInt(Z));return N};
se=function(){var Z=aq,k=TX,N;k&2147483648?N=""+(BigInt(k|0)<<BigInt(32)|BigInt(Z>>>0)):N=QV(Z,k);return N};
AJ=function(Z){Z.length<16?yV(Number(Z)):(Z=BigInt(Z),aq=Number(Z&BigInt(4294967295))>>>0,TX=Number(Z>>BigInt(32)&BigInt(4294967295)))};
PR=function(Z){if(Z!=null&&typeof Z!=="number")throw Error(`Value of float/double field must be a number, found ${typeof Z}: ${Z}`);return Z};
cR=function(Z){return Z.displayName||Z.name||"unknown type name"};
HR=function(Z){if(Z!=null&&typeof Z!=="boolean")throw Error(`Expected boolean but got ${ty(Z)}: ${Z}`);return Z};
Xl=function(Z){switch(typeof Z){case "bigint":return!0;case "number":return dU(Z);case "string":return dFf.test(Z);default:return!1}};
LC=function(Z){if(typeof Z!=="number")throw zW("int32");if(!dU(Z))throw zW("int32");return Z|0};
VV=function(Z){return Z==null?Z:LC(Z)};
Fl=function(Z){if(Z==null)return Z;if(typeof Z==="string"&&Z)Z=+Z;else if(typeof Z!=="number")return;return dU(Z)?Z|0:void 0};
hJ=function(Z){if(Z==null)return Z;if(typeof Z==="string"&&Z)Z=+Z;else if(typeof Z!=="number")return;return dU(Z)?Z>>>0:void 0};
XBr=function(Z){var k=uW?1024:0;if(!Xl(Z))throw zW("int64");const N=typeof Z;switch(k){case 512:switch(N){case "string":return lW(Z);case "bigint":return String(fC(64,Z));default:return BR(Z)}case 1024:switch(N){case "string":return Dq(Z);case "bigint":return Nm(fC(64,Z));default:return Oe(Z)}case 0:switch(N){case "string":return lW(Z);case "bigint":return Nm(fC(64,Z));default:return vR(Z)}default:return J3(k,"Unknown format requested type for int64")}};
gU=function(Z){return Z==null?Z:XBr(Z)};
vR=function(Z){Xl(Z);Z=wU(Z);$4(Z)||(yV(Z),Z=rU(aq,TX));return Z};
BR=function(Z){Xl(Z);Z=wU(Z);$4(Z)?Z=String(Z):(yV(Z),Z=se());return Z};
lW=function(Z){Xl(Z);var k=wU(Number(Z));if($4(k))return String(k);k=Z.indexOf(".");k!==-1&&(Z=Z.substring(0,k));k=Z.length;(Z[0]==="-"?k<20||k===20&&Z<="-9223372036854775808":k<19||k===19&&Z<="9223372036854775807")||(AJ(Z),Z=se());return Z};
Dq=function(Z){var k=wU(Number(Z));if($4(k))return Nm(k);k=Z.indexOf(".");k!==-1&&(Z=Z.substring(0,k));return Nm(fC(64,BigInt(Z)))};
Oe=function(Z){return $4(Z)?Nm(vR(Z)):Nm(BR(Z))};
var Lrj=function(){return x4[c[2]](this,2,1129)};
Sa=function(Z){if(Z==null)return Z;if(typeof Z==="bigint")return GX(Z)?Z=Number(Z):(Z=fC(64,Z),Z=GX(Z)?Number(Z):String(Z)),Z;if(Xl(Z))return typeof Z==="number"?vR(Z):lW(Z)};
ea=function(Z){const k=typeof Z;if(Z==null)return Z;if(k==="bigint")return Nm(fC(64,Z));if(Xl(Z))return k==="string"?Dq(Z):Oe(Z)};
Vif=function(Z){if(Z==null)return Z;const k=typeof Z;if(k==="bigint")return String(fC(64,Z));if(Xl(Z)){if(k==="string")return lW(Z);if(k==="number")return vR(Z)}};
oq=function(Z){if(Z==null)return Z;var k=typeof Z;if(k==="bigint")return String(FrU(64,Z));if(Xl(Z)){if(k==="string")return Xl(Z),k=wU(Number(Z)),$4(k)&&k>=0?Z=String(k):(k=Z.indexOf("."),k!==-1&&(Z=Z.substring(0,k)),Z[0]==="-"?k=!1:(k=Z.length,k=k<20?!0:k===20&&Z<="18446744073709551615"),k||(AJ(Z),Z=QV(aq,TX))),Z;if(k==="number")return Xl(Z),Z=wU(Z),Z>=0&&$4(Z)||(yV(Z),Z=qm(aq,TX)),Z}};
JJ=function(Z){if(Z==null||typeof Z=="string"||Z instanceof x9)return Z};
tiG=function(Z){if(typeof Z!=="string")throw Error();return Z};
zX=function(Z){if(Z!=null&&typeof Z!=="string")throw Error();return Z};
Ue=function(Z){return Z==null||typeof Z==="string"?Z:void 0};
bW=function(Z,k){if(!(Z instanceof k))throw Error(`Expected instanceof ${cR(k)} but got ${Z&&cR(Z.constructor)}`);return Z};
Mm=function(Z,k,N){if(Z!=null&&Z[pC]===Rq)return Z;if(Array.isArray(Z)){var a=Z[M3]|0;N=a|N&32|N&2;N!==a&&(Z[M3]=N);return new k(Z)}};
nC=function(Z){return Z};
Ee=function(Z){const k=wX(Iq);return k?Z[k]:void 0};
WR=function(Z,k){for(const N in Z)!isNaN(N)&&k(Z,+N,Z[N])};
hJi=function(Z){const k=new Y4;WR(Z,(N,a,T)=>{k[a]=[...T]});
k.T6=Z.T6;return k};
lDf=function(Z,k){k<100||bK(u_i,1)};
kl=function(Z,k,N,a){const T=a!==void 0;a=!!a;var K=wX(Iq),y;!T&&K&&(y=Z[K])&&WR(y,lDf);K=[];var Q=Z.length;let q;y=4294967295;let r=!1;const C=!!(k&64),m=C?k&128?0:-1:void 0;k&1||(q=Q&&Z[Q-1],q!=null&&typeof q==="object"&&q.constructor===Object?(Q--,y=Q):q=void 0,!C||k&128||T||(r=!0,y=(Z1??nC)(y-m,m,Z,q,void 0)+m));k=void 0;for(var A=0;A<Q;A++){let P=Z[A];if(P!=null&&(P=N(P,a))!=null)if(C&&A>=y){const d=A-m;(k??(k={}))[d]=P}else K[A]=P}if(q)for(let P in q){Q=q[P];if(Q==null||(Q=N(Q,a))==null)continue;
A=+P;let d;C&&!Number.isNaN(A)&&(d=A+m)<y?K[d]=Q:(k??(k={}))[P]=Q}k&&(r?K.push(k):K[y]=k);T&&wX(Iq)&&(Z=Ee(Z))&&Z instanceof Y4&&(K[Iq]=hJi(Z));return K};
NQ=function(Z){switch(typeof Z){case "number":return Number.isFinite(Z)?Z:""+Z;case "bigint":return GX(Z)?Number(Z):""+Z;case "boolean":return Z?1:0;case "object":if(Array.isArray(Z)){var k=Z[M3]|0;return Z.length===0&&k&1?void 0:kl(Z,k,NQ)}if(Z!=null&&Z[pC]===Rq)return aa(Z);if(Z instanceof x9){k=Z.V;if(k==null)Z="";else if(typeof k==="string")Z=k;else{let N="",a=0;const T=k.length-10240;for(;a<T;)N+=String.fromCharCode.apply(null,k.subarray(a,a+=10240));N+=String.fromCharCode.apply(null,a?k.subarray(a):
k);Z=Z.V=btoa(N)}return Z}return}return Z};
TJ=function(Z,k){if(k){Z1=k==null||k===nC||k[fDr]!==BH0?nC:k;try{return aa(Z)}finally{Z1=void 0}}return aa(Z)};
aa=function(Z){Z=Z.Sl;return kl(Z,Z[M3]|0,NQ)};
DFf=function(Z){switch(typeof Z){case "boolean":return Kk||(Kk=[0,void 0,!0]);case "number":return Z>0?void 0:Z===0?yX||(yX=[0,void 0]):[-Z,void 0];case "string":return[0,Z];case "object":return Z}};
qQ=function(Z,k){return QX(Z,k[0],k[1])};
QX=function(Z,k,N,a=0){if(Z==null){var T=32;N?(Z=[N],T|=128):Z=[];k&&(T=T&-16760833|(k&1023)<<14)}else{if(!Array.isArray(Z))throw Error("narr");T=Z[M3]|0;if(rp&&1&T)throw Error("rfarr");2048&T&&!(2&T)&&OKi();if(T&256)throw Error("farr");if(T&64)return(T|a)!==T&&(Z[M3]=T|a),Z;if(N&&(T|=128,N!==Z[0]))throw Error("mid");a:{N=Z;T|=64;var K=N.length;if(K){var y=K-1;const q=N[y];if(q!=null&&typeof q==="object"&&q.constructor===Object){k=T&128?0:-1;y-=k;if(y>=1024)throw Error("pvtlmt");for(var Q in q)if(K=
+Q,K<y)N[K+k]=q[Q],delete q[Q];else break;T=T&-16760833|(y&1023)<<14;break a}}if(k){Q=Math.max(k,K-(T&128?0:-1));if(Q>1024)throw Error("spvt");T=T&-16760833|(Q&1023)<<14}}}Z[M3]=T|64|a;return Z};
OKi=function(){if(rp)throw Error("carr");bK(vab,5)};
iKN=function(Z,k){if(typeof Z!=="object")return Z;if(Array.isArray(Z)){var N=Z[M3]|0;Z.length===0&&N&1?Z=void 0:N&2||(!k||4096&N||16&N?Z=Ck(Z,N,!1,k&&!(N&16)):(Z[M3]|=34,N&4&&Object.freeze(Z)));return Z}if(Z!=null&&Z[pC]===Rq)return k=Z.Sl,N=k[M3]|0,nl(Z,N)?Z:mQ(Z,k,N)?s3(Z,k):Ck(k,N);if(Z instanceof x9)return Z};
s3=function(Z,k,N){Z=new Z.constructor(k);N&&(Z.V=RI);Z.Y=RI;return Z};
Ck=function(Z,k,N,a){a??(a=!!(34&k));Z=kl(Z,k,iKN,a);a=32;N&&(a|=2);k=k&16769217|a;Z[M3]=k;return Z};
AR=function(Z){const k=Z.Sl,N=k[M3]|0;return nl(Z,N)?mQ(Z,k,N)?s3(Z,k,!0):new Z.constructor(Ck(k,N,!1)):Z};
P1=function(Z){if(Z.V!==RI)return!1;var k=Z.Sl;k=Ck(k,k[M3]|0);k[M3]|=2048;Z.Sl=k;Z.V=void 0;Z.Y=void 0;return!0};
c1=function(Z){if(!P1(Z)&&nl(Z,Z.Sl[M3]|0))throw Error();};
H1=function(Z,k){k===void 0&&(k=Z[M3]|0);k&32&&!(k&4096)&&(Z[M3]=k|4096)};
mQ=function(Z,k,N){return N&2?!0:N&32&&!(N&4096)?(k[M3]=N|2,Z.V=RI,!0):!1};
XD=function(Z,k,N,a,T){Object.isExtensible(Z);k=dp(Z.Sl,k,N,T);if(k!==null||a&&Z.Y!==RI)return k};
dp=function(Z,k,N,a){if(k===-1)return null;const T=k+(N?0:-1),K=Z.length-1;let y,Q;if(!(K<1+(N?0:-1))){if(T>=K)if(y=Z[K],y!=null&&typeof y==="object"&&y.constructor===Object)N=y[k],Q=!0;else if(T===K)N=y;else return;else N=Z[T];if(a&&N!=null){a=a(N);if(a==null)return a;if(!Object.is(a,N))return Q?y[k]=a:Z[T]=a,a}return N}};
VX=function(Z,k,N,a){c1(Z);const T=Z.Sl;Lk(T,T[M3]|0,k,N,a);return Z};
Lk=function(Z,k,N,a,T){const K=N+(T?0:-1);var y=Z.length-1;if(y>=1+(T?0:-1)&&K>=y){const Q=Z[y];if(Q!=null&&typeof Q==="object"&&Q.constructor===Object)return Q[N]=a,k}if(K<=y)return Z[K]=a,k;a!==void 0&&(y=(k??(k=Z[M3]|0))>>14&1023||536870912,N>=y?a!=null&&(Z[y+(T?0:-1)]={[N]:a}):Z[K]=a);return k};
fk=function(Z,k,N,a,T){let K=Z.Sl,y=K[M3]|0;a=nl(Z,y)?1:a;T=!!T||a===3;a===2&&P1(Z)&&(K=Z.Sl,y=K[M3]|0);Z=FD(K,k);let Q=Z===tR?7:Z[M3]|0,q=hR(Q,y);var r=4&q?!1:!0;if(r){4&q&&(Z=[...Z],Q=0,q=uk(q,y),y=Lk(K,y,k,Z));let C=0,m=0;for(;C<Z.length;C++){const A=N(Z[C]);A!=null&&(Z[m++]=A)}m<C&&(Z.length=m);N=(q|4)&-513;q=N&=-1025;q&=-4097}q!==Q&&(Z[M3]=q,2&q&&Object.freeze(Z));return Z=lk(Z,q,K,y,k,void 0,a,r,T)};
lk=function(Z,k,N,a,T,K,y,Q,q){let r=k;y===1||(y!==4?0:2&k||!(16&k)&&32&a)?B1(k)||(k|=!Z.length||Q&&!(4096&k)||32&a&&!(4096&k||16&k)?2:256,k!==r&&(Z[M3]=k),Object.freeze(Z)):(y===2&&B1(k)&&(Z=[...Z],r=0,k=uk(k,a),a=Lk(N,a,T,Z,K)),B1(k)||(q||(k|=16),k!==r&&(Z[M3]=k)));2&k||!(4096&k||16&k)||H1(N,a);return Z};
FD=function(Z,k,N){Z=dp(Z,k,N);return Array.isArray(Z)?Z:tR};
hR=function(Z,k){2&k&&(Z|=2);return Z|1};
B1=function(Z){return!!(2&Z)&&!!(4&Z)||!!(256&Z)};
D1=function(Z){return II(Z,!0)};
O3=function(Z,k){Z=XD(Z,k,void 0,void 0,D1);return Z==null?Sv():Z};
v1=function(Z,k,N){c1(Z);const a=Z.Sl;let T=a[M3]|0;if(k==null)return Lk(a,T,3),Z;if(!Array.isArray(k))throw zW();let K=k===tR?7:k[M3]|0,y=K;var Q=B1(K);let q=Q||Object.isFrozen(k);Q||(K=0);q||(k=[...k],y=0,K=uk(K,T),q=!1);K|=5;Q=(4&K?512&K?512:1024&K?1024:0:void 0)??(uW?1024:0);K|=Q;for(let r=0;r<k.length;r++){const C=k[r],m=N(C,Q);Object.is(C,m)||(q&&(k=[...k],y=0,K=uk(K,T),q=!1),k[r]=m)}K!==y&&(q&&(k=[...k],K=uk(K,T)),k[M3]=K);Lk(a,T,3,k);return Z};
ik=function(Z,k,N,a,T){c1(Z);const K=Z.Sl;Lk(K,K[M3]|0,k,(a==="0"?Number(N)===0:N===a)?void 0:N,T);return Z};
gp=function(Z,k,N){if(k&2)throw Error();const a=Y9(k);let T=FD(Z,N,a),K=T===tR?7:T[M3]|0,y=hR(K,k);if(2&y||B1(y)||16&y)y===K||B1(y)||(T[M3]=y),T=[...T],K=0,y=uk(y,k),Lk(Z,k,N,T,a);y&=-13;y!==K&&(T[M3]=y);return T};
GJ=function(Z,k,N,a){c1(Z);const T=Z.Sl;let K=T[M3]|0;if(a==null){const y=wp(T);if($l(y,T,K,N)===k)y.set(N,0);else return Z}else K=xl(T,K,N,k);Lk(T,K,k,a);return Z};
St=function(Z,k,N,a){let T=Z[M3]|0;const K=Y9(T);T=xl(Z,T,N,k,K);Lk(Z,T,k,a,K)};
JR=function(Z,k,N){Z=Z.Sl;return $l(wp(Z),Z,void 0,k)===N?N:-1};
wp=function(Z){return Z[zJ]??(Z[zJ]=new Map)};
xl=function(Z,k,N,a,T){a===0||N.includes(a);const K=wp(Z),y=$l(K,Z,k,N,T);y!==a&&(y&&(k=Lk(Z,k,y,void 0,T)),K.set(N,a));return k};
$l=function(Z,k,N,a,T){let K=Z.get(a);if(K!=null)return K;K=0;for(let y=0;y<a.length;y++){const Q=a[y];dp(k,Q,T)!=null&&(K!==0&&(N=Lk(k,N,K,void 0,T)),K=Q)}Z.set(a,K);return K};
U3=function(Z,k,N){let a=Z[M3]|0;const T=Y9(a),K=dp(Z,N,T);let y;if(K!=null&&K[pC]===Rq){if(!nl(K))return P1(K),K.Sl;y=K.Sl}else Array.isArray(K)&&(y=K);if(y){const Q=y[M3]|0;Q&2&&(y=Ck(y,Q))}y=qQ(y,k);y!==K&&Lk(Z,a,N,y,T);return y};
bk=function(Z,k,N,a,T){let K=!1;a=dp(Z,a,T,y=>{const Q=Mm(y,N,k);K=Q!==y&&Q!=null;return Q});
if(a!=null)return K&&!nl(a)&&H1(Z,k),a};
pk=function(Z,k,N,a){let T=Z.Sl,K=T[M3]|0;k=bk(T,K,k,N,a);if(k==null)return k;K=T[M3]|0;if(!nl(Z,K)){const y=AR(k);y!==k&&(P1(Z)&&(T=Z.Sl,K=T[M3]|0),k=y,K=Lk(T,K,N,k,a),H1(T,K))}return k};
Ra=function(Z,k,N,a,T,K,y,Q,q){var r=nl(Z,N);K=r?1:K;Q=!!Q||K===3;r=q&&!r;(K===2||r)&&P1(Z)&&(k=Z.Sl,N=k[M3]|0);Z=FD(k,T,y);var C=Z===tR?7:Z[M3]|0,m=hR(C,N);if(q=!(4&m)){var A=Z,P=N;const d=!!(2&m);d&&(P|=2);let h=!d,B=!0,v=0,O=0;for(;v<A.length;v++){const x=Mm(A[v],a,P);if(x instanceof a){if(!d){const e=nl(x);h&&(h=!e);B&&(B=e)}A[O++]=x}}O<v&&(A.length=O);m|=4;m=B?m&-4097:m|4096;m=h?m|8:m&-9}m!==C&&(Z[M3]=m,2&m&&Object.freeze(Z));if(r&&!(8&m||!Z.length&&(K===1||(K!==4?0:2&m||!(16&m)&&32&N)))){B1(m)&&
(Z=[...Z],m=uk(m,N),N=Lk(k,N,T,Z,y));a=Z;r=m;for(C=0;C<a.length;C++)A=a[C],m=AR(A),A!==m&&(a[C]=m);r|=8;m=r=a.length?r|4096:r&-4097;Z[M3]=m}return Z=lk(Z,m,k,N,T,y,K,q,Q)};
nk=function(Z,k,N){const a=Z.Sl;return Ra(Z,a,a[M3]|0,k,N,void 0===MQ?2:4,void 0,!1,!0)};
Ia=function(Z,k){Z!=null?bW(Z,k):Z=void 0;return Z};
jt=function(Z,k,N,a,T){a=Ia(a,k);VX(Z,N,a,T);a&&!nl(a)&&H1(Z.Sl);return Z};
E3=function(Z,k,N,a,T){T=Ia(T,k);GJ(Z,N,a,T);T&&!nl(T)&&H1(Z.Sl);return Z};
W1=function(Z,k,N,a){c1(Z);const T=Z.Sl;let K=T[M3]|0;if(a==null)return Lk(T,K,N),Z;if(!Array.isArray(a))throw zW();let y=a===tR?7:a[M3]|0,Q=y;const q=B1(y),r=q||Object.isFrozen(a);let C=!0,m=!0;for(let P=0;P<a.length;P++){var A=a[P];bW(A,k);q||(A=nl(A),C&&(C=!A),m&&(m=A))}q||(y=C?13:5,y=m?y&-4097:y|4096);r&&y===Q||(a=[...a],Q=0,y=uk(y,K));y!==Q&&(a[M3]=y);K=Lk(T,K,N,a);2&y||!(4096&y||16&y)||H1(T,K);return Z};
uk=function(Z,k){return Z=(2&k?Z|2:Z&-3)&-273};
Yl=function(Z,k,N,a){var T=a;c1(Z);a=Z.Sl;Z=Ra(Z,a,a[M3]|0,N,k,2,void 0,!0);T=T!=null?bW(T,N):new N;Z.push(T);k=N=Z===tR?7:Z[M3]|0;(T=nl(T))?(N&=-9,Z.length===1&&(N&=-4097)):N|=4096;N!==k&&(Z[M3]=N);T||H1(a)};
g.ZZ=function(Z,k,N=0){return Fl(XD(Z,k))??N};
kH=function(Z,k,N=gab){return(uW?XD(Z,k,void 0,void 0,ea):ea(XD(Z,k)))??N};
N7=function(Z,k,N="",a){return Ue(XD(Z,k,a))??N};
az=function(Z,k){Z=XD(Z,k);return(Z==null?Z:dU(Z)?Z|0:void 0)??0};
K_=function(Z,k){return Ue(XD(Z,k,void 0,T3))};
y3=function(Z,k,N){return VX(Z,k,gU(N))};
Q3=function(Z,k,N){return VX(Z,k,zX(N))};
q7=function(Z,k,N,a){return ik(Z,k,zX(N),"",a)};
rs=function(Z,k,N){if(N!=null){if(!dU(N))throw zW("enum");N|=0}return VX(Z,k,N)};
mc=function(Z,k){if(typeof Z==="string")return new C_(wP(Z),k);if(Array.isArray(Z))return new C_(new Uint8Array(Z),k);if(Z.constructor===Uint8Array)return new C_(Z,!1);if(Z.constructor===ArrayBuffer)return Z=new Uint8Array(Z),new C_(Z,!1);if(Z.constructor===x9)return k=oI(Z)||new Uint8Array(0),new C_(k,!0,Z);if(Z instanceof Uint8Array)return Z=Z.constructor===Uint8Array?Z:new Uint8Array(Z.buffer,Z.byteOffset,Z.byteLength),new C_(Z,!1);throw Error();};
AZ=function(Z,k){let N,a=0,T=0,K=0;const y=Z.U;let Q=Z.V;do N=y[Q++],a|=(N&127)<<K,K+=7;while(K<32&&N&128);if(K>32)for(T|=(N&127)>>4,K=3;K<32&&N&128;K+=7)N=y[Q++],T|=(N&127)<<K;sP(Z,Q);if(!(N&128))return k(a>>>0,T>>>0);throw Error();};
P4=function(Z){let k=0,N=Z.V;const a=N+10,T=Z.U;for(;N<a;){const K=T[N++];k|=K;if((K&128)===0)return sP(Z,N),!!(k&127)}throw Error();};
c4=function(Z){const k=Z.U;let N=Z.V,a=k[N++],T=a&127;if(a&128&&(a=k[N++],T|=(a&127)<<7,a&128&&(a=k[N++],T|=(a&127)<<14,a&128&&(a=k[N++],T|=(a&127)<<21,a&128&&(a=k[N++],T|=a<<28,a&128&&k[N++]&128&&k[N++]&128&&k[N++]&128&&k[N++]&128&&k[N++]&128)))))throw Error();sP(Z,N);return T};
H4=function(Z){var k=Z.U;const N=Z.V,a=k[N+0],T=k[N+1],K=k[N+2];k=k[N+3];sP(Z,Z.V+4);return(a<<0|T<<8|K<<16|k<<24)>>>0};
ds=function(Z){const k=H4(Z);Z=H4(Z);return qm(k,Z)};
X9=function(Z){const k=H4(Z);Z=H4(Z);return Nm(BigInt.asUintN(64,(BigInt(Z>>>0)<<BigInt(32))+BigInt(k>>>0)))};
L_=function(Z){var k=Z.L;k||(k=Z.U,k=Z.L=new DataView(k.buffer,k.byteOffset,k.byteLength));k=k.getFloat64(Z.V,!0);sP(Z,Z.V+8);return k};
sP=function(Z,k){Z.V=k;if(k>Z.D)throw Error();};
V3=function(Z,k){if(k<0)throw Error();const N=Z.V;k=N+k;if(k>Z.D)throw Error();Z.V=k;return N};
F9=function(Z,k){if(k==0)return Sv();var N=V3(Z,k);Z.L1&&Z.G?N=Z.U.subarray(N,N+k):(Z=Z.U,k=N+k,N=N===k?new Uint8Array(0):Z.slice(N,k));return N.length==0?Sv():new x9(N,GW)};
uz=function(Z,k,N,a){if(tZ.length){const T=tZ.pop();hZ(T,a);T.V.init(Z,k,N,a);return T}return new wBf(Z,k,N,a)};
hZ=function(Z,{qG:k=!1}={}){Z.qG=k};
DZ=function(Z){var k=Z.V;if(k.V==k.D)return!1;Z.Y=Z.V.V;var N=c4(Z.V)>>>0;k=N>>>3;N&=7;if(!(N>=0&&N<=5))throw Error();if(k<1)throw Error();Z.D=k;Z.U=N;return!0};
OP=function(Z){switch(Z.U){case 0:Z.U!=0?OP(Z):P4(Z.V);break;case 1:Z=Z.V;sP(Z,Z.V+8);break;case 2:if(Z.U!=2)OP(Z);else{var k=c4(Z.V)>>>0;Z=Z.V;sP(Z,Z.V+k)}break;case 5:Z=Z.V;sP(Z,Z.V+4);break;case 3:k=Z.D;do{if(!DZ(Z))throw Error();if(Z.U==4){if(Z.D!=k)throw Error();break}OP(Z)}while(1);break;default:throw Error();}};
v4=function(Z,k,N){const a=Z.V.D;var T=c4(Z.V)>>>0;T=Z.V.V+T;let K=T-a;K<=0&&(Z.V.D=T,N(k,Z,void 0,void 0,void 0),K=T-Z.V.V);if(K)throw Error();Z.V.V=T;Z.V.D=a};
ws=function(Z){var k=c4(Z.V)>>>0,N=Z.V;Z=V3(N,k);var a=N.U;(N=iz)||(N=iz=new TextDecoder("utf-8",{fatal:!0}));k=Z+k;a=Z===0&&k===a.length?a:a.subarray(Z,k);try{var T=N.decode(a)}catch(K){if(gs===void 0){try{N.decode(new Uint8Array([128]))}catch(y){}try{N.decode(new Uint8Array([97])),gs=!0}catch(y){gs=!1}}!gs&&(iz=void 0);throw K;}return T};
$H=function(Z){const k=c4(Z.V)>>>0;return F9(Z.V,k)};
xH=function(Z,k,N){var a=c4(Z.V)>>>0;for(a=Z.V.V+a;Z.V.V<a;)N.push(k(Z.V))};
eC=function(Z){if(!Z)return G3||(G3=new SC(0,0));if(!/^\d+$/.test(Z))return null;AJ(Z);return new SC(aq,TX)};
z3=function(Z){if(!Z)return oz||(oz=new JZ(0,0));if(!/^-?\d+$/.test(Z))return null;AJ(Z);return new JZ(aq,TX)};
UP=function(Z,k,N,a){var T=k^Z;var K;Z-1&13||(K=N!==null);if((Z>>1&15)==3){for(var y=T^3128,Q=[];++y-Q[c[3]]-(T^3160);)switch(y){case T^3138:y=T^3096;continue;case T^3107:y=T^3156;break;case T^3129:y=T^3159;continue;case T^3158:y=T^3297;case T^3075:y-=T^3138;default:Q[c[T^3173]](String[c[T^3176]](y))}K=Q}if((Z>>1&7)==1){y=[];for(Q=T^5316;++Q-y[c[3]]-(T^5284);){switch(Q){case T^5310:Q-=T^5258;case T^5343:case T^5336:case T^5337:continue;case T^5375:Q=T^5291;case T^5338:case T^5339:case T^5348:continue;
case T^5290:Q=T^5339}y[c[T^5273]](String[c[T^5268]](Q))}K=Q}(Z|40)==Z&&(a=(a%N[c[3]]+N[c[3]])%N[c[3]],N[c[T^2841]](a,1));return K};
bz=function(Z,k,N){for(;N>0||k>127;)Z.V.push(k&127|128),k=(k>>>7|N<<25)>>>0,N>>>=7;Z.V.push(k)};
p_=function(Z,k){Z.V.push(k>>>0&255);Z.V.push(k>>>8&255);Z.V.push(k>>>16&255);Z.V.push(k>>>24&255)};
Rz=function(Z,k){for(;k>127;)Z.V.push(k&127|128),k>>>=7;Z.V.push(k)};
M7=function(Z,k){if(k>=0)Rz(Z,k);else{for(let N=0;N<9;N++)Z.V.push(k&127|128),k>>=7;Z.V.push(1)}};
n_=function(Z,k){k.length!==0&&(Z.D.push(k),Z.U+=k.length)};
Iz=function(Z,k,N){Rz(Z.V,k*8+N)};
jC=function(Z,k){Iz(Z,k,2);k=Z.V.end();n_(Z,k);k.push(Z.U);return k};
EP=function(Z,k){var N=k.pop();for(N=Z.U+Z.V.length()-N;N>127;)k.push(N&127|128),N>>>=7,Z.U++;k.push(N);Z.U++};
W4=function(Z,k,N){if(N!=null){switch(typeof N){case "string":eC(N)}Iz(Z,k,1);switch(typeof N){case "number":Z=Z.V;KC(N);p_(Z,aq);p_(Z,TX);break;case "bigint":N=BigInt.asUintN(64,N);N=new SC(Number(N&BigInt(4294967295)),Number(N>>BigInt(32)));Z=Z.V;k=N.V;p_(Z,N.U);p_(Z,k);break;default:N=eC(N),Z=Z.V,k=N.V,p_(Z,N.U),p_(Z,k)}}};
YH=function(Z,k,N){Iz(Z,k,2);Rz(Z.V,N.length);n_(Z,Z.V.end());n_(Z,N)};
Z5=function(){const Z=class{constructor(){throw Error();}};Object.setPrototypeOf(Z,Z.prototype);return Z};
kS=function(Z,k){if(k==null||k=="")return new Z;k=JSON.parse(k);if(!Array.isArray(k))throw Error("dnarr");k[M3]|=32;return new Z(k)};
TF=function(Z,k){return new Ne(Z,k,as)};
yY=function(Z,k,N,a,T){k=K3(k,a);k!=null&&(N=jC(Z,N),T(k,Z),EP(Z,N))};
rK=function(Z,k,N,a){var T=a[Z];if(T)return T;T={};T.ll=a;T.ph=DFf(a[0]);var K=a[1];let y=1;K&&K.constructor===Object&&(T.extensions=K,K=a[++y],typeof K==="function"&&(T.K$=!0,QY??(QY=K),qe??(qe=a[y+1]),K=a[y+=2]));const Q={};for(;K&&Array.isArray(K)&&K.length&&typeof K[0]==="number"&&K[0]>0;){for(var q=0;q<K.length;q++)Q[K[q]]=K;K=a[++y]}for(q=1;K!==void 0;){typeof K==="number"&&(q+=K,K=a[++y]);let m;var r=void 0;K instanceof Ne?m=K:(m=$Fb,y--);if(m?.V){K=a[++y];r=a;var C=y;typeof K==="function"&&
(K=K(),r[C]=K);r=K}K=a[++y];C=q+1;typeof K==="number"&&K<0&&(C-=K,K=a[++y]);for(;q<C;q++){const A=Q[q];r?N(T,q,m,r,A):k(T,q,m,A)}}return a[Z]=T};
C3=function(Z){return Array.isArray(Z)?Z[0]instanceof Ne?Z:[xFf,Z]:[Z,void 0]};
K3=function(Z,k){if(Z instanceof mD)return Z.Sl;if(Array.isArray(Z))return qQ(Z,k)};
sG=function(Z,k,N,a){const T=N.Zr;Z[k]=a?(K,y,Q)=>T(K,y,Q,a):T};
Pi=function(Z,k,N,a,T){const K=N.Zr;let y,Q;Z[k]=(q,r,C)=>K(q,r,C,Q||(Q=rK(Ai,sG,Pi,a).ph),y||(y=ci(a)),T)};
ci=function(Z){let k=Z[Hi];if(k!=null)return k;const N=rK(Ai,sG,Pi,Z);k=N.K$?(a,T)=>QY(a,T,N):(a,T)=>{for(;DZ(T)&&T.U!=4;){var K=T.D,y=N[K];
if(y==null){var Q=N.extensions;Q&&(Q=Q[K])&&(Q=Geb(Q),Q!=null&&(y=N[K]=Q))}if(y==null||!y(T,a,K)){Q=T;y=Q.Y;OP(Q);if(Q.qG)var q=void 0;else q=Q.V.V-y,Q.V.V=y,q=F9(Q.V,q);y=void 0;Q=a;q&&((y=Q[Iq]??(Q[Iq]=new Y4))[K]??(y[K]=[])).push(q)}}if(a=Ee(a))a.T6=N.ll[dK];return!0};
Z[Hi]=k;Z[dK]=ShN.bind(Z);return k};
ShN=function(Z,k,N,a){var T=this[Ai];const K=this[Hi],y=qQ(void 0,T.ph),Q=Ee(Z);if(Q){var q=!1,r=T.extensions;if(r){T=(C,m,A)=>{if(A.length!==0)if(r[m])for(const P of A){C=uz(P);try{q=!0,K(y,C)}finally{C.free()}}else a?.(Z,m,A)};
if(k==null)WR(Q,T);else if(Q!=null){const C=Q[k];C&&T(Q,k,C)}if(q){let C=Z[M3]|0;if(C&2&&C&2048&&!N?.dO)throw Error();const m=Y9(C),A=(P,d)=>{if(dp(Z,P,m)!=null)switch(N?.oXS){case 1:return;default:throw Error();}d!=null&&(C=Lk(Z,C,P,d,m));delete Q[P]};
k==null?Em(y,y[M3]|0,(P,d)=>{A(P,d)}):A(k,dp(y,k,m))}}}};
Geb=function(Z){Z=C3(Z);const k=Z[0].Zr;if(Z=Z[1]){const N=ci(Z),a=rK(Ai,sG,Pi,Z).ph;return(T,K,y)=>k(T,K,y,a,N)}return k};
XB=function(Z,k,N){Z[k]=N.CR};
VY=function(Z,k,N,a){let T,K;const y=N.CR;Z[k]=(Q,q,r)=>y(Q,q,r,K||(K=rK(L3,XB,VY,a).ph),T||(T=FB(a)))};
FB=function(Z){let k=Z[ti];if(!k){const N=rK(L3,XB,VY,Z);k=(a,T)=>hi(a,T,N);
Z[ti]=k}return k};
hi=function(Z,k,N){Em(Z,Z[M3]|0,(a,T)=>{if(T!=null){var K=eJ0(N,a);K?K(k,T,a):a<500||bK(oai,3)}});
(Z=Ee(Z))&&WR(Z,(a,T,K)=>{n_(k,k.V.end());for(a=0;a<K.length;a++)n_(k,oI(K[a])||new Uint8Array(0))})};
eJ0=function(Z,k){var N=Z[k];if(N)return N;if(N=Z.extensions)if(N=N[k]){N=C3(N);var a=N[0].CR;if(N=N[1]){const T=FB(N),K=rK(L3,XB,VY,N).ph;N=Z.K$?qe(K,T):(y,Q,q)=>a(y,Q,q,K,T)}else N=a;
return Z[k]=N}};
um=function(Z,k,N){if(Array.isArray(k)){var a=k[M3]|0;if(a&4)return k;for(var T=0,K=0;T<k.length;T++){const y=Z(k[T]);y!=null&&(k[K++]=y)}K<T&&(k.length=K);Z=a|1;N&&(Z=(Z|4)&-1537);Z!==a&&(k[M3]=Z);N&&Z&2&&Object.freeze(k);return k}};
lm=function(Z,k,N){return new Ne(Z,k,N)};
f3=function(Z,k,N){return new Ne(Z,k,N)};
Bi=function(Z,k,N){Lk(Z,Z[M3]|0,k,N,Y9(Z[M3]|0))};
OG=function(Z,k,N){k=k==null||typeof k==="number"?k:k==="NaN"||k==="Infinity"||k==="-Infinity"?Number(k):void 0;k!=null&&(Iz(Z,N,1),Z=Z.V,N=D5||(D5=new DataView(new ArrayBuffer(8))),N.setFloat64(0,+k,!0),aq=N.getUint32(0,!0),TX=N.getUint32(4,!0),p_(Z,aq),p_(Z,TX))};
vi=function(Z,k,N){k=Vif(k);if(k!=null){switch(typeof k){case "string":z3(k)}if(k!=null)switch(Iz(Z,N,0),typeof k){case "number":Z=Z.V;yV(k);bz(Z,aq,TX);break;case "bigint":N=BigInt.asUintN(64,k);N=new JZ(Number(N&BigInt(4294967295)),Number(N>>BigInt(32)));bz(Z.V,N.U,N.V);break;default:N=z3(k),bz(Z.V,N.U,N.V)}}};
gK=function(Z,k,N){k=Fl(k);k!=null&&k!=null&&(Iz(Z,N,0),M7(Z.V,k))};
wK=function(Z,k,N){k=k==null||typeof k==="boolean"?k:typeof k==="number"?!!k:void 0;k!=null&&(Iz(Z,N,0),Z.V.V.push(k?1:0))};
$S=function(Z,k,N){k=Ue(k);k!=null&&YH(Z,N,Va(k))};
eu=function(Z,k,N,a,T){k=K3(k,a);k!=null&&(N=jC(Z,N),T(k,Z),EP(Z,N))};
os=function(Z,k){return(N,a)=>{{const K={eH:!0};a&&Object.assign(K,a);N=uz(N,void 0,void 0,K);try{const y=new Z,Q=y.Sl;ci(k)(Q,N);var T=y}finally{N.free()}}return T}};
Ji=function(Z){return function(){const k=new Jcf;hi(this.Sl,k,rK(L3,XB,VY,Z));n_(k,k.V.end());const N=new Uint8Array(k.U),a=k.D,T=a.length;let K=0;for(let y=0;y<T;y++){const Q=a[y];N.set(Q,K);K+=Q.length}k.D=[N];return N}};
zF=function(Z){return k=>kS(Z,k)};
UG=function(Z,k){return(...N)=>{if(Z.V>-1)return k(...N);try{return Z.V=Z.D.V.now(),k(...N)}finally{Z.Y+=Z.D.V.now()-Z.V,Z.V=-1,Z.U+=1}}};
bm=function(){return Xr(zJf)};
Rs=function(Z,k,N,a){if(Math.random()<(a||Z.V))try{let T;N instanceof p3?T=N:(T=new p3,q3(N,function(y,Q){var q=T;const r=q.Y++;y=Cl(Q,y);q.V.push(r);q.U[r]=y}));
const K=T.mH(Z.U,"pagead2.googlesyndication.com","/pagead/gen_204?id="+k+"&");K&&(HF(),cF(K))}catch(T){}};
Me=function(){const Z=g.dX.performance;return Z&&Z.now&&Z.timing?Math.floor(Z.now()+Z.timing.navigationStart):g.vy()};
n3=function(){const Z=g.dX.performance;return Z&&Z.now?Z.now():null};
EG=function(Z){Z&&Is&&ju()&&(Is.clearMarks(`goog_${Z.label}_${Z.uniqueId}_start`),Is.clearMarks(`goog_${Z.label}_${Z.uniqueId}_end`))};
Wi=function(Z,k,N,a,T,K,y){let Q="";Z&&(Q+=Z+":");N&&(Q+="//",k&&(Q+=k+"@"),Q+=N,a&&(Q+=":"+a));T&&(Q+=T);K&&(Q+="?"+K);y&&(Q+="#"+y);return Q};
g.YS=function(Z){return Z.match(UF0)};
ZM=function(Z){return Z?decodeURI(Z):Z};
g.kX=function(Z){return ZM(g.YS(Z)[3]||null)};
var bKy=function(Z){return UP[c[2]](this,1,6528,Z)};
N1=function(Z){return ZM(g.YS(Z)[5]||null)};
g.al=function(Z){Z=g.YS(Z);return Wi(Z[1],Z[2],Z[3],Z[4])};
T2=function(Z){Z=g.YS(Z);return Wi(null,null,null,null,Z[5],Z[6],Z[7])};
KM=function(Z){const k=Z.indexOf("#");return k<0?Z:Z.slice(0,k)};
yU=function(Z,k){if(Z){Z=Z.split("&");for(let N=0;N<Z.length;N++){const a=Z[N].indexOf("=");let T,K=null;a>=0?(T=Z[N].substring(0,a),K=Z[N].substring(a+1)):T=Z[N];k(T,K?y2(K):"")}}};
QU=function(Z,k){if(!k)return Z;var N=Z.indexOf("#");N<0&&(N=Z.length);let a=Z.indexOf("?"),T;a<0||a>N?(a=N,T=""):T=Z.substring(a+1,N);Z=[Z.slice(0,a),T,Z.slice(N)];N=Z[1];Z[1]=k?N?N+"&"+k:k:N;return Z[0]+(Z[1]?"?"+Z[1]:"")+Z[2]};
q1=function(Z,k,N){if(Array.isArray(k))for(let a=0;a<k.length;a++)q1(Z,String(k[a]),N);else k!=null&&N.push(Z+(k===""?"":"="+g.Kg(k)))};
r1=function(Z,k){const N=[];for(k=k||0;k<Z.length;k+=2)q1(Z[k],Z[k+1],N);return N.join("&")};
g.CM=function(Z){const k=[];for(const N in Z)q1(N,Z[N],k);return k.join("&")};
pBf=function(Z,k){const N=arguments.length==2?r1(arguments[1],0):r1(arguments,1);return QU(Z,N)};
g.mW=function(Z,k){k=g.CM(k);return QU(Z,k)};
sI=function(Z,k,N){N=N!=null?"="+g.Kg(N):"";return QU(Z,k+N)};
A2=function(Z,k,N,a){const T=N.length;for(;(k=Z.indexOf(N,k))>=0&&k<a;){var K=Z.charCodeAt(k-1);if(K==38||K==63)if(K=Z.charCodeAt(k+T),!K||K==61||K==38||K==35)return k;k+=T+1}return-1};
cj=function(Z,k){const N=Z.search(Pj);let a=A2(Z,0,k,N);if(a<0)return null;let T=Z.indexOf("&",a);if(T<0||T>N)T=N;a+=k.length+1;return y2(Z.slice(a,T!==-1?T:0))};
Hj=function(Z,k){const N=Z.search(Pj);let a=0,T;const K=[];for(;(T=A2(Z,a,k,N))>=0;)K.push(Z.substring(a,T)),a=Math.min(Z.indexOf("&",T)+1||N,N);K.push(Z.slice(a));return K.join("").replace(RJy,"$1")};
MiR=function(Z,k,N){return sI(Hj(Z,k),k,N)};
d1=function(Z){let k=Z.toString();Z.name&&k.indexOf(Z.name)==-1&&(k+=": "+Z.name);Z.message&&k.indexOf(Z.message)==-1&&(k+=": "+Z.message);if(Z.stack)a:{Z=Z.stack;var N=k;try{Z.indexOf(N)==-1&&(Z=N+"\n"+Z);let a;for(;Z!=a;)a=Z,Z=Z.replace(/((https?:\/..*\/)[^\/:]*:\d+(?:.|\n)*)\2/,"$1");k=Z.replace(/\n */g,"\n");break a}catch(a){k=N;break a}k=void 0}return k};
LM=function(Z,k,N,a){return UG(bm().V.V,()=>{let T,K;try{Z.WI&&Z.WI.V?(K=Z.WI.start(k.toString(),3),T=N(),Z.WI.end(K)):T=N()}catch(y){let Q=Z.Hu;try{EG(K),Q=Z.U(k,new Xu(d1(y)),void 0,a)}catch(q){Z.nA(217,q)}if(!Q)throw y;}return T})()};
Fu=function(Z,k,N,a){var T=VU;return UG(bm().V.V,(...K)=>LM(T,Z,()=>k.apply(N,K),a))};
naf=function(){var Z=bm().D,k=t2>=0?Date.now()-h2-t2:-1;const N=uU?Date.now()-h2-lU:-1,a=fM>=0?Date.now()-h2-fM:-1;let T;if(Z==947190542)return 100;if(Z==79463069)return 200;Z=[2E3,4E3];T=[250,500,1E3];VU.nA(637,Error(),.001,void 0);let K=k;N!=-1&&N<k&&(K=N);let y;for(k=0;k<Z.length;++k)if(K<Z[k]){y=T[k];break}y===void 0&&(y=T[Z.length]);return a!=-1&&a>1500&&a<4E3?500:y};
Bj=function(Z){const k=Z!==Z.top,N=Z.top===k9(Z);let a=-1,T=0,K;k&&N&&Z.top.mraid?(a=3,K=Z.top.mraid):a=(K=Z.mraid)?k?N?2:1:0:-1;K&&(K.IS_GMA_SDK||(T=2),iT(ID0,y=>typeof K[y]==="function")||(T=1));
return{d8:K,compatibility:T,CB:a}};
DM=function(Z,k,N=!1){if(Z&&k!==null&&k!=k.top){if(!k.top)return new g.i0(-12245933,-12245933);k=k.top}try{return N?(new g.i0(k.innerWidth,k.innerHeight)).round():je(k||window).round()}catch(a){return new g.i0(-12245933,-12245933)}};
OI=function(Z,k,N){try{if(Z){if(!k.top)return new uj(-12245933,-12245933,-12245933,-12245933);k=k.top}const {height:T,width:K}=DM(Z,k,N);if(K===-12245933)return new uj(K,K,K,K);var a=Jg(k.document);const {x:y,y:Q}=Ws(a.V);return new uj(Q,y+K,Q+T,y)}catch{return new uj(-12245933,-12245933,-12245933,-12245933)}};
vj=function(Z){return new uj(Z.top,Z.right,Z.bottom,Z.left)};
iU=function(Z){const k=Z.top||0,N=Z.left||0;return new uj(k,N+(Z.width||0),k+(Z.height||0),N)};
g1=function(Z){return Z!=null&&Z>=0&&Z<=1};
jnX=function(Z,k=HK){k!==null&&k!=k.top&&(k=k.top);let N=0,a=0;try{const T=k.document,K=T.body,y=T.documentElement;if(T.compatMode=="CSS1Compat"&&y.scrollHeight)N=y.scrollHeight!=Z.height?y.scrollHeight:y.offsetHeight,a=y.scrollWidth!=Z.width?y.scrollWidth:y.offsetWidth;else{let Q=y.scrollHeight,q=y.scrollWidth,r=y.offsetHeight,C=y.offsetWidth;y.clientHeight!=r&&(Q=K.scrollHeight,q=K.scrollWidth,r=K.offsetHeight,C=K.offsetWidth);Q>Z.height?Q>r?(N=Q,a=q):(N=r,a=C):Q<r?(N=Q,a=q):(N=r,a=C)}return new g.i0(a,
N)}catch(T){return new g.i0(-12245933,-12245933)}};
Eai=function(){const Z=g.qG();return Z?Er("AmazonWebAppPlatform;Android TV;Apple TV;AppleTV;BRAVIA;BeyondTV;Freebox;GoogleTV;HbbTV;LongTV;MiBOX;MiTV;NetCast.TV;Netcast;Opera TV;PANASONIC;POV_TV;SMART-TV;SMART_TV;SWTV;Smart TV;SmartTV;TV Store;UnionTV;Version/8.0 Safari/601.1 WPE;WebOS".split(";"),k=>K5(Z,k))||K5(Z,"OMI/")&&!K5(Z,"XiaoMi/")?!0:K5(Z,"Presto")&&K5(Z,"Linux")&&!K5(Z,"X11")&&!K5(Z,"Android")&&!K5(Z,"Mobi"):!1};
w1=function(){return Xr(Wr0)};
$X=function(Z,k){k&&k.screen&&(Z.Y=new g.i0(k.screen.width,k.screen.height))};
xX=function(Z,k){const N=Z.V?new g.i0(lj(Z.V),Z.V.getHeight()):new g.i0(0,0);Z.L=jnX(N,k)};
SR=function(){var Z=w1();if(Z.G>0||Z.C)return!0;Z=HF().U.isVisible();const k=Y1(G2)===0;return Z||k};
ol=function(Z){const k=g.mr(Z.L);g.pi(k,N=>{N.Vz(Z.V)});
Z.V!=Z||eR(Z)};
J2=function(Z,k){g.KK(Z.L,k)||(Z.L.push(k),k.Vz(Z.V),k.G(Z.Y),k.sR()&&(Z.zt=!0))};
z2=function(Z){Z.zt=Z.L.length?Er(Z.L,k=>k.sR()):!1};
UI=function(Z){Z=Z.V;Z.MX();Z.tq();var k=w1();k.j=OI(!1,Z.D,k.isMobileDevice);xX(w1(),Z.D);Z.Y.V=Z.s6()};
eR=function(Z){const k=g.mr(Z.L);g.pi(k,N=>{N.G(Z.Y)})};
bU=function(Z,k){return Z.C?new uj(Math.max(k.top+Z.C.top,k.top),Math.min(k.left+Z.C.right,k.right),Math.min(k.top+Z.C.bottom,k.bottom),Math.max(k.left+Z.C.left,k.left)):k.clone()};
YhR=function(Z){switch(Math.trunc(Z.D)){case -16:return-16;case -8:return-8;case 0:return 0;case 8:return 8;case 16:return 16;default:return 16}};
pM=function(Z,k){return Z.D<k.D?!0:Z.D>k.D?!1:Z.U<k.U?!0:Z.U>k.U?!1:typeof Z.V<typeof k.V?!0:typeof Z.V>typeof k.V?!1:Z.V<k.V};
Z5y=function(Z,k){g.pi(k.V,N=>{Z.add(N.U,N.V,YhR(N))})};
Rl=function(Z,k){q3(k,(N,a)=>{N===void 0||Z.add(a,N,0)});
return Z};
M1=function(Z){var k=kIi;Z.U&&(g.hc(Z.V,(N,a)=>pM(a,N)?1:pM(N,a)?-1:0),Z.U=!1);
return jN(Z.V,(N,a)=>{a=k(a);return`${N}${N!=""&&a!=""?"&":""}${a}`},"")};
g.nM=function(Z){Z&&typeof Z.dispose=="function"&&Z.dispose()};
g.Il=function(Z){for(let k=0,N=arguments.length;k<N;++k){const a=arguments[k];g.uf(a)?g.Il.apply(null,a):g.nM(a)}};
g.jR=function(){this.gQ=this.gQ;this.e8=this.e8};
g.u=function(Z,k){Z.addOnDisposeCallback(g.Or(g.nM,k))};
TI0=function(Z,k,N){g.pi(Z.D,a=>{var T=Z.V;if(!a.V&&(a.D(k,N),a.Y())){a.V=!0;var K=a.U();const y=new EI;y.add("id","av-js");y.add("type","verif");y.add("vtype",a.L);a=Xr(NIf);y.add("i",a.V++);y.add("adk",T);Rl(y,K);T=new aaf(y);Wj(T)}})};
Kif=function(Z){return g.ni(Z,(k,N,a)=>N>0?a[N]-a[N-1]:a[N])};
YX=function(Z,k,N){Z=g.ni(Z.V,a=>k(a));
return N?Z:Kif(Z)};
Zp=function(Z,k=!0){return YX(Z,N=>N.V,k)};
kO=function(Z,k,N){const a=g.NF(Z.U,T=>k<=T);
return a==-1?0:N(Z.V[a])};
NC=function(Z,k){return kO(Z,k,N=>N.V)};
a8=function(Z,k=!0){return YX(Z,N=>N.D,k)};
Tg=function(Z,k){return kO(Z,k,N=>N.D)};
KH=function(Z,k){return kO(Z,k,N=>N.U)};
yZ=function(Z){g.pi(Z.V,k=>{k.U=0})};
QZ=function(Z,k=!0){return a8(Z.U,k)};
ro=function(Z,k){k=qC(k);return k===0?0:qC(Z)/k};
qC=function(Z){return Math.max(Z.bottom-Z.top,0)*Math.max(Z.right-Z.left,0)};
y3X=function(Z,k){if(!Z||!k)return!1;let N=0;for(;Z!==null&&N++<100;){if(Z===k)return!0;try{if(Z=Z.parentElement||Z){const a=ee(Z),T=a&&ZJ(a),K=T&&T.frameElement;K&&(Z=K)}}catch(a){break}}return!1};
qDG=function(Z,k,N){if(!Z||!k)return!1;k=BK(Z.clone(),-k.left,-k.top);Z=(k.left+k.right)/2;k=(k.top+k.bottom)/2;Zt(window.top)&&window.top&&window.top.document&&(window=window.top);if(!Q2y())return!1;Z=window.document.elementFromPoint(Z,k);if(!Z)return!1;k=(k=(k=ee(N))&&k.defaultView&&k.defaultView.frameElement)&&y3X(k,Z);const a=Z===N;Z=!a&&Z&&PK(Z,T=>T===N);
return!(k||a||Z)};
r3y=function(Z,k,N,a){return w1().D?!1:lj(Z)<=0||Z.getHeight()<=0?!0:N&&a?CH(208,()=>qDG(Z,k,N)):!1};
mGy=function(Z){Z=Z.Dc.VQ;var k;if(k=Z&&Z.getAttribute)k=/-[a-z]/.test("googleAvInapp")?!1:CEU&&Z.dataset?"googleAvInapp"in Z.dataset:Z.hasAttribute?Z.hasAttribute("data-"+sf()):!!Z.getAttribute("data-"+sf());k&&(w1().U=!0)};
m$=function(Z,k){k!=Z.FR&&(Z.FR=k,Z=w1(),k?Z.G++:Z.G>0&&Z.G--)};
s_=function(Z,k){if(Z.Qt){if(k.getName()===Z.Qt.getName())return;Z.Qt.dispose();Z.Qt=null}k=k.create(Z.Dc.V,Z.vI,Z.sR());if(k=k!=null&&k.observe()?k:null)Z.Qt=k};
AB=function(Z,k,N){if(!Z.iK||Z.Hh==-1||k.U===-1||Z.iK.U===-1)return 0;Z=k.U-Z.iK.U;return Z>N?0:Z};
s2r=function(Z,k,N){if(Z.Qt){Z.Qt.L();var a=Z.Qt.vD,T=a.Y,K=T.V;if(a.G!=null){var y=a.D;Z.xR=new g.Of(y.left-K.left,y.top-K.top)}K=Z.Iu()?Math.max(a.V,a.L):a.V;y={};T.volume!==null&&(y.volume=T.volume);T=Z.KM(a);Z.iK=a;Z.aq(K,k,N,!1,y,T,a.C)}};
A3f=function(Z){if(Z.MQ&&Z.Ip){var k=WB(Z.vI,"od")==1,N=w1().V,a=Z.Ip,T=Z.Qt?Z.Qt.getName():"ns",K=Z.xR,y=new g.i0(lj(N),N.getHeight());N=Z.Iu();Z={a$:T,xR:K,RL:y,Iu:N,iX:Z.UW.iX,FA:k};if(k=a.U){k.L();T=k.vD;K=T.Y.V;var Q=y=null;T.G!=null&&K&&(y=T.D,y=new g.Of(y.left-K.left,y.top-K.top),Q=new g.i0(K.right-K.left,K.bottom-K.top));T=N?Math.max(T.V,T.L):T.V;N={a$:k.getName(),xR:y,RL:Q,Iu:N,FA:!1,iX:T}}else N=null;N&&TI0(a,Z,N)}};
PEi=function(Z,k,N){k&&(Z.LJ=k);N&&(Z.VZ=N)};
g.Pl=function(){};
g.cl=function(Z){return{value:Z,done:!1}};
c30=function(Z){const k={ptlt:g.vy()-Z.L};var N=Z.U;N&&(k.pnk=N);(N=Z.D)&&(k.pnc=N);(N=Z.Y)&&(k.pnmm=N);(Z=Z.V)&&(k.pns=Z);return k};
Hl=function(Z){return g1(Z.volume)&&Z.volume>0};
XN=function(Z,k){const N={};if(Z!==void 0)if(k!=null)for(const a in k){const T=k[a];a in Object.prototype||T!=null&&(N[a]=typeof T==="function"?T(Z):Z[T])}else g.In(N,Z);return M1(Rl(new EI,N))};
LH=function(Z,k){const N=Z.U[k],a=N[1];Z.D+=N[0];a>0&&Z.V[k]==0&&(Z.V[k]=1)};
H5f=function(Z){const k=g.xa(Z.U);let N=0;for(const a in Z.V)g.KK(k,a)&&Z.V[a]==1&&(N+=Z.U[a][1],Z.V[a]=2);return N};
dGi=function(Z){let k=0;for(const N in Z.V){const a=Z.V[N];if(a==1||a==2)k+=Z.U[N][1]}return k};
VZ=function(Z,k,N){let a=Z.Rq;uU||N||Z.C==-1||(a+=k-Z.C);return a};
FN=function(Z){return[Z.top,Z.left,Z.bottom,Z.right]};
hB=function(Z){return Z===void 0?Z:Number(Z)?tB(Z,3):0};
uY=function(Z,k,N){let a=Z.length;for(;a<k+1;)Z.push(N()),a++};
lY=function(Z,k,N){const a=[k];if(Z!=k||N!=k)a.unshift(Z),a.push(N);return a};
fH=function(Z){Z.hasCompleted=!0;Z.jd!=0&&(Z.jd=3)};
XCG=function(Z,k){Z.Uh()?k=0:Z.Hh==-1?k=0:(k-=Z.Hh,k=k>Math.max(1E4,Z.D/3)?0:k);var N=Z.C(Z)||{};N=N.currentTime!==void 0?N.currentTime:Z.O;const a=N-Z.O;let T=0;a>=0?(Z.zt+=k,Z.vD+=Math.max(k-a,0),T=Math.min(a,Z.zt)):Z.tq+=Math.abs(a);a!=0&&(Z.zt=0);Z.MX==-1&&a>0&&(Z.MX=fM>=0?Date.now()-h2-fM:-1);Z.O=N;return T};
Bl=function(Z){const k=!!WB(bm().vI,"umt");return Z.Vz||!k&&!Z.Rq?0:1};
Dp=function(Z,k){return Z.xW[k!=null&&k<Z.xW.length?k:Z.xW.length-1]};
O_=function(Z,k,N=!1){return k>=15E3?!0:Z.Qz?N?!0:Z.D>0?k>=Z.D/2:Z.FS>0?k>=Z.FS:!1:!1};
LiN=function(Z,k){Er(Z.G,N=>N.D==k.D)||Z.G.push(k)};
vl=function(Z){const k=NC(Z.CX().V,1);return O_(Z,k)};
VZy=function(Z){const k=tB(Z.UW.iX,2),N=Z.iV.D;var a=Z.UW,T=Dp(Z);const K=hB(T.Y),y=hB(T.G),Q=hB(a.volume),q=tB(T.j,2),r=tB(T.O,2),C=tB(a.iX,2),m=tB(T.zt,2),A=tB(T.dA,2);a=tB(a.mO,2);const P=Z.cB().clone().round();Z=Z.Qt&&Z.Qt.D?(Z.Qt?Z.Qt.D:null).clone().round():null;T=QZ(T,!1);return{BE:k,iU:N,h2:K,mC:y,Od:Q,T5:q,Ie:r,iX:C,eD:m,wB:A,mO:a,position:P,Sn:Z,gB:T}};
iY=function(Z,k){uY(Z.V,k,()=>({BE:0,iU:void 0,h2:-1,mC:-1,Od:-1,T5:-1,Ie:-1,iX:-1,eD:-1,wB:-1,mO:-1,position:void 0,Sn:void 0,gB:[]}));
Z.V[k]=VZy(Z)};
tZU=function(Z,k){if(g.KK(Fif,k))return!0;const N=Z.FQ[k];return N!==void 0?(Z.FQ[k]=!0,!N):!1};
wo=function(Z,k,N,a,T){if(Z.Ac)return{"if":0,vs:0};var K=Z.cB().clone().round();const y=Z.Qt?Z.Qt.D:null,Q=w1();var q=bm();const r=Z.CX();var C=Z.Qt?Z.Qt.getName():"ns";const m={};m["if"]=Q.D?1:void 0;m.sdk=Z.Y?Z.Y:void 0;m.t=Z.timeCreated;m.p=[K.top,K.left,K.bottom,K.right];K&&y&&!f1(y,K)&&(K=y.round(),m.cp=[K.top,K.left,K.bottom,K.right]);m.tos=Zp(r.U,!1);m.mtos=QZ(r);m.mcvt=r.tq.D;m.ps=void 0;K=VZ(r,Date.now()-h2,Z.Uh());m.vht=K;m.mut=r.hq.D;m.a=hB(Z.UW.volume);m.mv=hB(r.G);m.fs=Z.FR?1:0;m.ft=
r.Vz.V;m.at=r.L.V;m.as=r.Y>0?1:0;m.atos=Zp(r.V);m.ssb=Zp(r.s6,!1);m.amtos=a8(r.V,!1);m.uac=Z.O6;m.vpt=r.D.V;C=="nio"&&(m.nio=1,m.avms="nio");m.gmm="4";m.gdr=O_(Z,r.D.V,!0)?1:0;m.efpf=Z.xl;if(C=="gsv"||C=="nis")C=Z.Qt,C.zt>0&&(m.nnut=C.zt);m.tcm=Bl(Z);m.nmt=Z.tq;m.bt=Z.vD;m.pst=Z.MX;m.vpaid=Z.Vz;m.dur=Z.D;m.vmtime=Z.O;m.is=Z.iV.D;Z.V.length>=1&&(m.i0=Z.V[0].iU,m.a0=[Z.V[0].Od],m.c0=[Z.V[0].iX],m.ss0=[Z.V[0].mO],C=Z.V[0].position,K=Z.V[0].Sn,m.p0=C?FN(C):void 0,C&&K&&!f1(K,C)&&(m.cp0=FN(K)));Z.V.length>=
2&&(m.i1=Z.V[1].iU,m.a1=lY(Z.V[1].h2,Z.V[1].Od,Z.V[1].mC),m.c1=lY(Z.V[1].T5,Z.V[1].iX,Z.V[1].Ie),m.ss1=lY(Z.V[1].eD,Z.V[1].mO,Z.V[1].wB),C=Z.V[1].position,K=Z.V[1].Sn,m.p1=C?FN(C):void 0,C&&K&&!f1(K,C)&&(m.cp1=FN(K)),m.mtos1=Z.V[1].gB);Z.V.length>=3&&(m.i2=Z.V[2].iU,m.a2=lY(Z.V[2].h2,Z.V[2].Od,Z.V[2].mC),m.c2=lY(Z.V[2].T5,Z.V[2].iX,Z.V[2].Ie),m.ss2=lY(Z.V[2].eD,Z.V[2].mO,Z.V[2].wB),C=Z.V[2].position,K=Z.V[2].Sn,m.p2=C?FN(C):void 0,C&&K&&!f1(K,C)&&(m.cp2=FN(K)),m.mtos2=Z.V[2].gB);Z.V.length>=4&&(m.i3=
Z.V[3].iU,m.a3=lY(Z.V[3].h2,Z.V[3].Od,Z.V[3].mC),m.c3=lY(Z.V[3].T5,Z.V[3].iX,Z.V[3].Ie),m.ss3=lY(Z.V[3].eD,Z.V[3].mO,Z.V[3].wB),C=Z.V[3].position,K=Z.V[3].Sn,m.p3=C?FN(C):void 0,C&&K&&!f1(K,C)&&(m.cp3=FN(K)),m.mtos3=Z.V[3].gB);m.cs=dGi(Z.iV);k&&(m.ic=H5f(Z.iV),m.dvpt=r.D.U,m.dvs=KH(r.U,.5),m.dfvs=KH(r.U,1),m.davs=KH(r.V,.5),m.dafvs=KH(r.V,1),N&&(r.D.U=0,yZ(r.U),yZ(r.V)),Z.Ty()&&(m.dtos=r.xW,m.dav=r.N,m.dtoss=Z.zj+1,N&&(r.xW=0,r.N=0,Z.zj++)),m.dat=r.L.U,m.dft=r.Vz.U,N&&(r.L.U=0,r.Vz.U=0));m.ps=[Q.L.width,
Q.L.height];m.bs=[lj(Q.V),Q.V.getHeight()];m.scs=[Q.Y.width,Q.Y.height];m.dom=Q.domain;Z.zr&&(m.vds=Z.zr);if(Z.G.length>0||Z.eh)k=g.mr(Z.G),Z.eh&&k.push(Z.eh),m.pings=g.ni(k,A=>A.toString());
k=g.ni(g.Ry(Z.G,A=>A.G()),A=>A.getId());
Cfj(k);m.ces=k;Z.U&&(m.vmer=Z.U);Z.N&&(m.vmmk=Z.N);Z.dA&&(m.vmiec=Z.dA);m.avms=Z.Qt?Z.Qt.getName():"ns";Z.Qt&&g.In(m,Z.Qt.ZB());a?(m.c=tB(Z.UW.iX,2),m.ss=tB(Z.UW.mO,2)):m.tth=Date.now()-h2-go;m.mc=tB(r.O,2);m.nc=tB(r.j,2);m.mv=hB(r.G);m.nv=hB(r.Y);m.lte=tB(Z.oz,2);a=Dp(Z,T);QZ(r);m.qmtos=QZ(a);m.qnc=tB(a.j,2);m.qmv=hB(a.G);m.qnv=hB(a.Y);m.qas=a.Y>0?1:0;m.qi=Z.kH;m.avms||(m.avms="geo");m.psm=r.FS.V;m.psv=r.FS.getValue();m.psfv=r.Kp.getValue();m.psa=r.MX.getValue();q=LGj(q.vI);q.length&&(m.veid=q);
Z.L&&g.In(m,c30(Z.L));m.avas=Z.CK();m.vs=Z.WK();m.co=hsr(Z);m.tm=r.vD;m.tu=r.Sm;return m};
xO=function(Z,k,N){var a=Z.lH[k];if(a!=null)return a;a=tZU(Z,k);const T=on($O,K=>K==k);
Z=wo(Z,a,a,N,u7i[$O[T]]);k=="fully_viewable_audible_half_duration_impression"&&(Z.std="csm");return Z};
hsr=function(Z){var k=Z.Sm.toString(10).padStart(2,"0");k=`${Z.pF}${k}`;Z.Sm<99&&Z.Sm++;return k};
S4=function(Z,k,N){Gg(N,"mousedown",()=>laG(Z),301);
Gg(k,"scroll",()=>fay(Z),302);
Gg(N,"touchmove",()=>BIf(Z),303);
Gg(N,"mousemove",()=>DGG(Z),304);
Gg(N,"keydown",()=>O5i(Z),305)};
vuU=function(){var Z=document.documentElement;try{if(!Zt(ZJ().top))return"2";var k;let N=[];const a=ZJ(Z.ownerDocument);for(Z=a;Z!=a.top;Z=Z.parent)if(Z.frameElement)N.push(Z.frameElement);else break;return(k=N)&&k.length!=0?"1":"0"}catch(N){return"2"}};
laG=function(Z){g.BB(Z.V,k=>{k.D>1E5||++k.D})};
fay=function(Z){g.BB(Z.V,k=>{k.V>1E5||++k.V})};
BIf=function(Z){g.BB(Z.V,k=>{k.V>1E5||++k.V})};
DGG=function(Z){g.BB(Z.V,k=>{k.Y>1E5||++k.Y})};
O5i=function(Z){g.BB(Z.V,k=>{k.U>1E5||++k.U})};
e4=function(Z,k){return g.ZD(Z.V,N=>N.kH==k)};
o8=function(Z,k){return k?g.ZD(Z.V,N=>N.Dc.VQ==k):null};
i50=function(Z,k){return g.ZD(Z.U,N=>N.Jb()==2&&N.kH==k)};
zg=function(){var Z=JB;return Z.V.length==0?Z.U:Z.U.length==0?Z.V:g.CK(Z.U,Z.V)};
U_=function(Z,k){Z=k.Jb()==1?Z.V:Z.U;const N=Yb(Z,a=>a==k);
return N!=-1?(Z.splice(N,1),k.Qt&&k.Qt.unobserve(),k.dispose(),!0):!1};
var guy=function(Z,k,N,a,T,K){return bY[c[2]](this,48,1918,Z,k,N,a,T,K)};
wCy=function(Z){var k=JB;let N;if(U_(k,Z)){switch(Z.Jb()){case 0:N=()=>null;
case 2:N=()=>i50(k,Z.kH);
break;case 1:N=()=>e4(k,Z.kH)}for(let a=N();a;a=N())U_(k,a)}};
$Gj=function(Z){var k=JB;Z=g.Ry(Z,N=>!o8(k,N.Dc.VQ));
k.V.push(...Z)};
xGf=function(Z){var k=JB;const N=[];g.pi(Z,a=>{Er(k.V,T=>T.Dc.VQ===a.Dc.VQ&&T.kH===a.kH)||(k.V.push(a),N.push(a))})};
pH=function(Z,k){if(Z.U==null)return!1;const N=(a,T)=>{k(a,T)};
Z.V=g.ZD(Z.U,a=>a!=null&&a.O());
Z.V&&(Z.V.init(N)?UI(Z.V.V):k(Z.V.V.N(),Z.V));return Z.V!=null};
GIy=function(Z){if(!Z.length)return[];Z=g.Ry(Z,k=>k!=null&&k.xW());
for(let k=1;k<Z.length;k++)J2(Z[k-1],Z[k]);return Z};
esf=function(Z){if(!Z.element)return!1;const k=Z.element,N=Z.U.V.D;var a=bm().V.V;Z.Y=new N.IntersectionObserver(UG(a,T=>R8(Z,T)),SDG);
a=UG(a,()=>{Z.Y.unobserve(k);Z.Y.observe(k);R8(Z,MC(Z))});
N.ResizeObserver?(Z.xW=new N.ResizeObserver(a),Z.xW.observe(k)):N.MutationObserver&&(Z.zt=new g.dX.MutationObserver(a),Z.zt.observe(k,{attributes:!0,childList:!0,characterData:!0,subtree:!0}));Z.Y.observe(k);R8(Z,MC(Z));return!0};
MC=function(Z){return Z.Y&&Z.Y.takeRecords?Z.Y.takeRecords():[]};
R8=function(Z,k){try{if(k.length){Z.Sm||(Z.Sm=Date.now()-h2);var N=oub(k),a=p1(Z.element,Z.U.V.D),T=a.x,K=a.y;Z.D=new uj(Math.round(K),Math.round(T)+N.boundingClientRect.width,Math.round(K)+N.boundingClientRect.height,Math.round(T));Z.V=bU(Z,Z.D);var y=vj(N.intersectionRect);Z.O=BK(y,Z.D.left-y.left,Z.D.top-y.top)}}catch(Q){Z.unobserve(),VU.nA(299,Q,void 0,void 0)}};
oub=function(Z){return jN(Z,(k,N)=>k.time>N.time?k:N,Z[0])};
nH=function(){bm();const Z=w1();return Z.D||Z.U?0:2};
J3y=function(Z,k){if(!Z.Y){k=Fu(142,k);HF();var N;G2.visibilityState?N="visibilitychange":G2.mozVisibilityState?N="mozvisibilitychange":G2.webkitVisibilityState&&(N="webkitvisibilitychange");N&&WK(G2,N,k,{capture:!1})&&(Z.Y=k)}};
E_=function(Z){const k=SR(),N=Date.now()-h2;k?(uU||(lU=N,g.pi(JB.V,a=>{var T=a.CX();T.Rq=VZ(T,N,a.jd!=1)})),uU=!0):(Z.G=I8(Z,N),uU=!1,go=N,g.pi(JB.V,a=>{a.MQ&&(a.CX().C=N)}));
j4(Z,zg(),!k)};
YO=function(){var Z=Wl;Z.L||(Z.L=!0,J3y(Z,(...k)=>E_(Z,...k)),E_(Z))};
j4=function(Z,k,N){if(!Z.done&&(Z.U.cancel(),k.length!=0)){Z.D=null;try{zsj();var a=Date.now()-h2;bm().L=a;if(Xr(Zr).V!=null)for(let T=0;T<k.length;T++)s2r(k[T],a,N);for(a=0;a<k.length;a++)A3f(k[a]);++Z.V.g6}finally{N?g.pi(k,T=>{T.UW.iX=0}):Z.U.schedule()}}};
zsj=function(){Xr(kg);const Z=Xr(Zr);Z.V!=null&&Z.V.V?UI(Z.V.V):w1().update(HK)};
I8=function(Z,k){Z=Z.G;uU&&(Z+=k-lU);return Z};
Ny=function(){const Z=Xr(Zr);if(Z.V!=null){var k=Z.V;g.pi(zg(),N=>s_(N,k))}};
b5i=function(Z=()=>({})){var k=Wl;
VU.Y0="av-js";aA.V=.01;UGy([N=>{var a=bm(),T={bin:a.U,type:"error"};a=Ya(a.vI);if(!k.D){var K=HK.document,y=t2>=0?Date.now()-h2-t2:-1;const C=Date.now()-h2;k.V.tK==-1&&(y=C);const m=w1(),A=bm(),P=Ya(A.vI),d=zg();try{if(d.length>0){var Q=m.V;Q&&(P.bs=[lj(Q),Q.getHeight()]);var q=m.L;q&&(P.ps=[q.width,q.height]);HK.screen&&(P.scs=[HK.screen.width,HK.screen.height])}else P.url=encodeURIComponent(HK.location.href.substring(0,512)),K.referrer&&(P.referrer=encodeURIComponent(K.referrer.substring(0,512)));
P.tt=y;P.pt=t2;P.bin=A.U;HK.google_osd_load_pub_page_exp!==void 0&&(P.olpp=HK.google_osd_load_pub_page_exp);P.deb=[1,k.V.qD,k.V.yX,k.V.g6,k.V.tK,0,k.U.U,k.V.bl,k.V.ul,k.V.aF,k.V.bB,-1].join(";");P.tvt=I8(k,C);m.U&&(P.inapp=1);if(HK!==null&&HK!=HK.top){d.length>0&&(P.iframe_loc=encodeURIComponent(HK.location.href.substring(0,512)));var r=m.j;P.is=[lj(r),r.getHeight()]}}catch(h){P.error=1}k.D=P}Q=g.Rn(k.D);q=bm().V;WB(q.D,"prf")==1?(r=new Tz,K=q.V,y=0,K.V>-1&&(y=K.D.V.now()-K.V),r=ik(r,1,PR(K.Y+y),
0),K=q.V,r=ik(r,5,VV(K.V>-1?K.U+1:K.U),0),r=ik(r,2,gU(q.U.V.D()),"0"),r=ik(r,3,gU(q.U.V.U()),"0"),q=ik(r,4,gU(q.U.V.V()),"0"),q={pf:g.fl(q.U())}):q={};g.In(Q,q);g.In(N,T,a,Q,Z())}])};
pCf=function(){var Z=KI||HK;if(!Z)return"";const k=[];if(!Z.location||!Z.location.href)return"";k.push(`${"url"}=${encodeURIComponent(Z.location.href.substring(0,512))}`);Z.document&&Z.document.referrer&&k.push(`${"referrer"}=${encodeURIComponent(Z.document.referrer.substring(0,512))}`);return k.join("&")};
yv=function(){let Z="youtube.player.web_20260310_06_RC00".match(/_(\d{8})_RC\d+$/)||"youtube.player.web_20260310_06_RC00".match(/_(\d{8})_\d+_\d+$/)||"youtube.player.web_20260310_06_RC00".match(/_(\d{8})_\d+\.\d+$/)||"youtube.player.web_20260310_06_RC00".match(/_(\d{8})_\d+_RC\d+$/);if(Z?.length==2)return Z[1];Z="youtube.player.web_20260310_06_RC00".match(/.*_(\d{2})\.(\d{4})\.\d+_RC\d+$/);return Z?.length==3?"20"+Z[1]+Z[2]:null};
MZj=function(Z){try{const k=Z.split(",");return k.length>g.xa(Rsf).length?null:jN(k,(N,a)=>{a=a.toLowerCase().split("=");if(a.length!=2||Qv[a[0]]===void 0||!Qv[a[0]](a[1]))throw Error(`Entry (${a[0]}, ${a[1]}) is invalid.`);N[a[0]]=a[1];return N},{})}catch(k){return null}};
nuj=function(Z,k){if(Z.V==void 0)return 0;switch(Z.L){case "mtos":return Z.U?Tg(k.V,Z.V):Tg(k.U,Z.V);case "tos":return Z.U?NC(k.V,Z.V):NC(k.U,Z.V)}return 0};
Iab=function(Z){const k=bm(),N=Xr(qy);Z&&!k.Y&&(k.Y=!0,N.Tt=!0,N.C&&N.fail("w",!0))};
CI=function(){try{const Z=Xr(qy);rt(Z,"removeEventListener","ready",CI);mF(Z)}catch(Z){VU.nA(541,Z,void 0,void 0)}};
AL=function(Z,k){try{var N=Xr(qy);N.vD=!0;let T;T=Z?new uj(Z.y,Z.x+Z.width,Z.y+Z.height,Z.x):new uj(0,0,0,0);const K=Date.now()-h2,y=SR();var a=new sH(K,y,N);a.V=T;a.volume=k;N.G(a)}catch(T){VU.nA(542,T,void 0,void 0)}};
mF=function(Z){typeof Z.U.d8.AFMA_LIDAR==="string"?(Z.Sm=!0,j2y(Z)):(Z.U.compatibility=3,Z.C="nc",Z.fail("w"))};
rt=function(Z,k,...N){try{return Z.U.d8[k].apply(Z.U.d8,N)}catch(a){Eui(a,T=>{T.method=k})}};
Pc=function(Z,k,N){rt(Z,"addEventListener",k,N)};
cc=function(Z){bm().Y=!!rt(Z,"isViewable");Pc(Z,"viewableChange",Iab);rt(Z,"getState")==="loading"?Pc(Z,"ready",CI):mF(Z)};
j2y=function(Z){Z.vD=!1;const k=WB(bm().vI,"rmmt")==1,N=!!rt(Z,"isViewable");(k?!N:1)&&HF().setTimeout(Hc(524,()=>{Z.vD||(dt(Z),VU.nA(540,Error(),void 0,void 0),Z.C="mt",Z.fail("w"))}),500);
Wiy(Z);Pc(Z,Z.U.d8.AFMA_LIDAR,AL)};
dt=function(Z){rt(Z,"removeEventListener",Z.U.d8.AFMA_LIDAR,AL);Z.Sm=!1};
Wiy=function(Z){var k=WB(bm().vI,"sneio")==1;const N=Z.U.d8.AFMA_LIDAR_EXP_1!==void 0,a=Z.U.d8.AFMA_LIDAR_EXP_2!==void 0;(k=k&&a)&&(Z.U.d8.AFMA_LIDAR_EXP_2=!0);N&&(Z.U.d8.AFMA_LIDAR_EXP_1=!k)};
XK=function(Z,k){if(rt(Z,"getState")==="loading")return new g.i0(-1,-1);k=rt(Z,k);if(!k)return new g.i0(-1,-1);Z=parseInt(k.width,10);k=parseInt(k.height,10);return isNaN(Z)||isNaN(k)?new g.i0(-1,-1):new g.i0(Z,k)};
Vv=function(){const Z=w1();return{sv:"968",...(LI!==null&&{v:LI}),["if"]:Z.D?"1":"0",nas:String(JB.V.length)}};
FK=function(Z,k){const N=Z[k];N!==void 0&&N>0&&(Z[k]=Math.floor(N*1E3))};
YDy=function(Z){b5i(()=>{const k=Vv();Z.U!=null&&(k.sdk=Z.U);const N=Xr(Zr);N.V!=null&&(k.avms=N.V.getName());return k})};
tL=function(Z,k,N,a){Z=Z.O(null,a,!0,k);Z.Y=N;$Gj([Z]);return Z};
ZgU=function(Z,k,N){k.Ac=!0;switch(k.Jb()){case 1:hL(k,N);break;case 2:Z.tq(k)}};
alf=function(Z,k,N){cyy(k);const a=Z.V;g.pi(k,T=>{const K=g.ni(T.criteria,y=>{var Q=MZj(y);if(Q==null)y=null;else if(y=new kmf,Q.visible!=null&&(y.V=Q.visible/100),Q.audible!=null&&(y.U=Q.audible==1),Q.time!=null){const q=Q.timetype=="mtos"?"mtos":"tos",r=NG(Q.time,"%")?"%":"ms";Q=parseInt(Q.time,10);r=="%"&&(Q/=100);y.setTime(Q,r,q)}return y});
Er(K,y=>y==null)||LiN(N,new NJy(T.id,T.event,K,a))})};
qfG=function(){const Z=[];var k=bm();Z.push(Xr(TJf));WB(k.vI,"mvp_lv")&&Z.push(Xr(qy));k=[new KE0,new ygr];k.push(new Qkf(Z));k.push(new uH(HK));return k};
fI=function(){const Z=[new uH(HK)],k=Xr(Zr);k.U=Z;pH(k,()=>{lH("i")})?Wl.done||(Ny(),YO()):lH("i")};
rgN=function(Z){if(!Z.isInitialized){Z.isInitialized=!0;try{const a=Date.now()-h2,T=bm(),K=w1();t2=a;T.D=79463069;Z.U!=="o"&&(KI=k9(HK));if(mFX()){Wl.V.yX=0;Wl.V.tK=Date.now()-h2-a;var k=qfG(),N=Xr(Zr);N.U=k;pH(N,()=>{fI()})?Wl.done||(Ny(),J2(N.V.V,Z),YO()):K.D?fI():YO()}else Bc=!0}catch(a){throw JB.reset(),a;
}}};
lH=function(Z){Wl.U.cancel();Dr=Z;Wl.done=!0};
OH=function(Z){if(Z.U)return Z.U;const k=Xr(Zr).V;if(k)switch(k.getName()){case "nis":Z.U="n";break;case "gsv":Z.U="m"}Z.U||(Z.U="h");return Z.U};
iH=function(Z,k,N){if(Z.V==null)return k.zr|=4,!1;Z=vc(Z.V,N,k);k.zr|=Z;return Z==0};
hL=function(Z,k){if(!Z.qX){var N=xO(Z,"start",SR());N=Z.G6.V(N).V;var a={id:"lidarv"};a.r=k;a.sv="968";LI!==null&&(a.v=LI);yU(N,(T,K)=>a[T]=T=="mtos"||T=="tos"?K:encodeURIComponent(K));
k=pCf();yU(k,(T,K)=>a[T]=encodeURIComponent(K));
k="//pagead2.googlesyndication.com/pagead/gen_204?"+M1(Rl(new EI,a));Wj(k);Z.qX=!0}};
gt=function(Z,k,N){j4(Wl,[Z],!SR());iY(Z,N);N!=4&&uY(Z.xW,N,Z.WM);return xO(Z,k,SR())};
C0f=function(Z,k,N,a){let T;T=o8(JB,N);T!==null&&T.kH!==k&&(Z.C(T),T=null);T||(k=Z.O(N,Date.now()-h2,!1,k),JB.U.length==0&&(bm().D=79463069),xGf([k]),T=k,T.Y=OH(Z),a&&(T.Kp=a));return T};
vc=function(Z,k,N){Z=Z.U();if(typeof Z==="function"){var a={...(LI!==null&&{v:LI}),sv:"968",cb:wt,e:mcX(k)};const T=xO(N,k,SR());g.In(a,T);N.lH[k]=T;a=N.Jb()==2?skr(a).join("&"):N.G6.V(a).V;try{return Z(N.kH,a,k),0}catch(K){return 2}}else return 1};
mcX=function(Z){const k=Za(Z,"custom_metric_viewable")?"custom_metric_viewable":Z;Z=on($O,N=>N==k);
return $g[Z]};
xg=function(Z){return{viewability:Z.V,googleViewability:Z.U}};
oA=function(Z,k,N={}){Z=Gz(Xr(Sc),k,N,Z);return xg(Z)};
Gz=function(Z,k,N={},a){var T={};g.In(T,{opt_adElement:void 0,opt_fullscreen:void 0},N);var K=Z.N(k,N);N=K?K.G6:Z.xW();if(T.opt_bounds)return N.V(KV("ol",a));if(a!==void 0)if(yg(a)!==void 0)if(Bc)Z=KV("ue",a);else if(rgN(Z),Dr=="i")Z=KV("i",a),Z["if"]=0;else if(k=Z.N(k,T)){b:{Dr=="i"&&(k.Ac=!0);K=T.opt_fullscreen;K!==void 0&&m$(k,!!K);if(K=!w1().U)(K=K5(g.qG(),"CrKey")&&!(K5(g.qG(),"CrKey")&&K5(g.qG(),"SmartSpeaker"))||K5(g.qG(),"PlayStation")||K5(g.qG(),"Roku")||Eai()||K5(g.qG(),"Xbox"))||(K=g.qG(),
K=K5(K,"AppleTV")||K5(K,"Apple TV")||K5(K,"CFNetwork")||K5(K,"tvOS")),K||(K=g.qG(),K=K5(K,"sdk_google_atv_x86")||K5(K,"Android TV")),K=!K;K&&(HF(),K=Y1(G2)===0);var y=K;if(y){switch(k.Jb()){case 1:hL(k,"pv");break;case 2:Z.tq(k)}lH("pv")}K=a.toLowerCase();if(!y&&(WB(bm().vI,"ssmol")&&K==="loaded"?0:g.KK(Agy,K))&&k.jd==0){Dr!="i"&&(Wl.done=!1);y=T!==void 0?T.opt_nativeTime:void 0;fM=y=typeof y==="number"?y:Date.now()-h2;k.MQ=!0;var Q=SR();k.jd=1;k.FQ={};k.FQ.start=!1;k.FQ.firstquartile=!1;k.FQ.midpoint=
!1;k.FQ.thirdquartile=!1;k.FQ.complete=!1;k.FQ.resume=!1;k.FQ.pause=!1;k.FQ.skip=!1;k.FQ.mute=!1;k.FQ.unmute=!1;k.FQ.viewable_impression=!1;k.FQ.measurable_impression=!1;k.FQ.fully_viewable_audible_half_duration_impression=!1;k.FQ.fullscreen=!1;k.FQ.exitfullscreen=!1;k.zj=0;Q||(k.CX().C=y);j4(Wl,[k],!Q)}(y=k.s1[K])&&LH(k.iV,y);WB(bm().vI,"fmd")||g.KK(Qg,K)&&k.eh&&k.eh.U(k,null);let q;switch(k.Jb()){case 1:q=Za(K,"custom_metric_viewable")?Z.s6.custom_metric_viewable:Z.s6[K];break;case 2:q=Z.Ap[K]}if(q&&
(a=q.call(Z,k,T,a),WB(bm().vI,"fmd")&&g.KK(Qg,K)&&k.eh&&k.eh.U(k,null),a!==void 0)){T=KV(void 0,K);g.In(T,a);a=T;break b}a=void 0}k.jd==3&&Z.C(k);Z=a}else Z=KV("nf",a);else Z=void 0;else Bc?Z=KV("ue"):K?(Z=KV(),g.In(Z,wo(K,!0,!1,!1))):Z=KV("nf");return typeof Z==="string"?N.V():N.V(Z)};
P0i=function(Z,k,N){let a=e4(JB,k);a||(a=tL(Z,k,"n",N.opt_nativeTime||-1));return a};
cg0=function(Z,k,N){var a=e4(JB,k);a||(a=N.opt_nativeTime||-1,a=tL(Z,k,OH(Z),a),N.opt_osdId&&(a.Kp=N.opt_osdId));return a};
Hgy=function(Z,k){let N=e4(JB,k);N||(N=tL(Z,k,"h",-1));return N};
dci=function(Z,k,N){N=N.opt_configurable_tracking_events;Z.V!=null&&Array.isArray(N)&&alf(Z,N,k)};
XsR=function(Z){bm();switch(OH(Z)){case "b":return"ytads.bulleit.triggerExternalActivityEvent";case "n":return"ima.bridge.triggerExternalActivityEvent";case "h":case "m":case "ml":return"ima.common.triggerExternalActivityEvent"}return null};
qY=function(Z,k){k&&(Z.zt=k)};
rA=function(Z,...k){k=k.filter(Boolean).join("&");if(!k)return Z;const N=Z.match(/[?&]adurl=/);return N?Z.slice(0,N.index+1)+k+"&"+Z.slice(N.index+1):Z+(Z.indexOf("?")<0?"?":"&")+k};
CV=function(Z,k){return k?"&"+Z+"="+encodeURIComponent(k):""};
LEX=function(Z){Z=Z.Y;if(!Z)return"";let k=CV("uap",Z.platform)+CV("uapv",Z.platformVersion)+CV("uafv",Z.uaFullVersion)+CV("uaa",Z.architecture)+CV("uam",Z.model)+CV("uab",Z.bitness);Z.fullVersionList&&(k+="&uafvl="+encodeURIComponent(Z.fullVersionList.map(N=>encodeURIComponent(N.brand)+";"+encodeURIComponent(N.version)).join("|")));
Z.wow64!=null&&(k+="&uaw="+Number(Z.wow64));return k.slice(1)};
Ver=function(Z,k,N,a,T){var K=window,y;N?y="//pagead2.googlesyndication.com/bg/"+Q2(N)+".js":y="";N=K.document;const Q={};k&&(Q._scs_=k);Q._bgu_=y;Q._bgp_=a;Q._li_="v_h.3.0.0.0";T&&(Q._upb_=T);(k=K.GoogleTyFxhY)&&typeof k.push=="function"||(k=K.GoogleTyFxhY=[]);k.push(Q);k=Jg(N).createElement("SCRIPT");k.type="text/javascript";k.async=!0;Z=(0,g.Gm)`//tpc.googlesyndication.com/sodar/${Q2(Z)+".js"}`;g.ED(k,Z);(K=(K.GoogleTyFxhYEET||{})[k.src])?K():N.getElementsByTagName("head")[0].appendChild(k)};
sE=function(Z="bevasrsg"){return new Promise(k=>{if(window===window.top)var N=window;else{try{N=!!window?.top?.location.href&&!1}catch(T){N=!0}N=N?window:window.top}let a=N[Z];a?.bevasrs?k(new mx(a.bevasrs)):(a||(a={nqfbel:[]},N[Z]=a),a.nqfbel.push(T=>{k(new mx(T))}))})};
As=function(Z){const k={c:Z.yr,e:Z.xG,mc:Z.Cr,me:Z.MS};Z.z3&&(k.co={c:Z.z3.Bp,a:Z.z3.o9,s:Z.z3.E7});return k};
FEy=function(Z){Z.U!==void 0&&(Z.D.forEach(k=>{Z.U?.removeEventListener(k,Z.Y)}),Z.U=void 0)};
hgG=async function(Z){if(!Z.L8.wpc)throw new P$(30,"NWA");if(Z.V)return Z.V;const k=await Z.L8.wpc();Z.V=new tey(k);return Z.V};
H$=function(Z){const k=[];nk(Z,c$,6).forEach(N=>{g.ZZ(N,2)<=53&&k.push(g.ZZ(N,1))});
return k};
uzf=function(Z){const k=[];nk(Z,c$,6).forEach(N=>{g.ZZ(N,2)>53&&k.push(g.ZZ(N,1))});
return k};
dA=function(Z){Z.then(()=>{},()=>{})};
LV=function(Z){return{fieldType:2,fieldName:Z}};
g.Vg=function(Z){return{fieldType:3,fieldName:Z}};
llX=function(Z,k){return v1(Z,k,LC)};
D7=function(Z){var k=new FR;k=Q3(k,1,Z.U);var N=flf(Z);k=v1(k,N,tiG);N=[];const a=[];for(var T of Z.V.keys())a.push(T.split(","));for(T=0;T<a.length;T++){const A=a[T];var K=Z.D,y=ts(Z,A)||[],Q=[];for(var q=0;q<y.length;q++){var r=y[q],C=r&&r.V;r=new hs;switch(K){case 3:C=Number(C);Number.isFinite(C)&&GJ(r,1,ul,gU(C));break;case 2:GJ(r,2,ul,PR(Number(C)))}Q.push(r)}K=Q;for(y=0;y<K.length;y++){q=K[y];Q=new ll;Q=jt(Q,hs,2,q);q=[];r=BJi(Z);for(C=0;C<r.length;C++){var m=r[C];const P=A[C],d=new fV;switch(m){case 3:GJ(d,
1,B$,zX(String(P)));break;case 2:m=Number(P);Number.isFinite(m)&&GJ(d,2,B$,VV(m));break;case 1:GJ(d,3,B$,HR(P==="true"))}q.push(d)}W1(Q,fV,1,q);N.push(Q)}}W1(k,ll,4,N);return k};
OE=function(Z){if(!Z)return"";if(/^about:(?:blank|srcdoc)$/.test(Z))return window.origin||"";Z.indexOf("blob:")===0&&(Z=Z.substring(5));Z=Z.split("#")[0].split("?")[0];Z=Z.toLowerCase();Z.indexOf("//")==0&&(Z=window.location.protocol+Z);/^[\w\-]*:\/\//.test(Z)||(Z=window.location.href);var k=Z.substring(Z.indexOf("://")+3),N=k.indexOf("/");N!=-1&&(k=k.substring(0,N));N=Z.substring(0,Z.indexOf("://"));if(!N)throw Error("URI is missing protocol: "+Z);if(N!=="http"&&N!=="https"&&N!=="chrome-extension"&&
N!=="moz-extension"&&N!=="file"&&N!=="android-app"&&N!=="chrome-search"&&N!=="chrome-untrusted"&&N!=="chrome"&&N!=="app"&&N!=="devtools")throw Error("Invalid URI scheme in origin: "+N);Z="";var a=k.indexOf(":");if(a!=-1){var T=k.substring(a+1);k=k.substring(0,a);if(N==="http"&&T!=="80"||N==="https"&&T!=="443")Z=":"+T}return N+"://"+k+Z};
Dcj=function(){function Z(){T[0]=1732584193;T[1]=4023233417;T[2]=2562383102;T[3]=271733878;T[4]=3285377520;C=r=0}
function k(m){for(var A=y,P=0;P<64;P+=4)A[P/4]=m[P]<<24|m[P+1]<<16|m[P+2]<<8|m[P+3];for(P=16;P<80;P++)m=A[P-3]^A[P-8]^A[P-14]^A[P-16],A[P]=(m<<1|m>>>31)&4294967295;m=T[0];var d=T[1],h=T[2],B=T[3],v=T[4];for(P=0;P<80;P++){if(P<40)if(P<20){var O=B^d&(h^B);var x=1518500249}else O=d^h^B,x=1859775393;else P<60?(O=d&h|B&(d|h),x=2400959708):(O=d^h^B,x=3395469782);O=((m<<5|m>>>27)&4294967295)+O+v+x+A[P]&4294967295;v=B;B=h;h=(d<<30|d>>>2)&4294967295;d=m;m=O}T[0]=T[0]+m&4294967295;T[1]=T[1]+d&4294967295;T[2]=
T[2]+h&4294967295;T[3]=T[3]+B&4294967295;T[4]=T[4]+v&4294967295}
function N(m,A){if(typeof m==="string"){m=unescape(encodeURIComponent(m));for(var P=[],d=0,h=m.length;d<h;++d)P.push(m.charCodeAt(d));m=P}A||(A=m.length);P=0;if(r==0)for(;P+64<A;)k(m.slice(P,P+64)),P+=64,C+=64;for(;P<A;)if(K[r++]=m[P++],C++,r==64)for(r=0,k(K);P+64<A;)k(m.slice(P,P+64)),P+=64,C+=64}
function a(){var m=[],A=C*8;r<56?N(Q,56-r):N(Q,64-(r-56));for(var P=63;P>=56;P--)K[P]=A&255,A>>>=8;k(K);for(P=A=0;P<5;P++)for(var d=24;d>=0;d-=8)m[A++]=T[P]>>d&255;return m}
for(var T=[],K=[],y=[],Q=[128],q=1;q<64;++q)Q[q]=0;var r,C;Z();return{reset:Z,update:N,digest:a,yD:function(){for(var m=a(),A="",P=0;P<m.length;P++)A+="0123456789ABCDEF".charAt(Math.floor(m[P]/16))+"0123456789ABCDEF".charAt(m[P]%16);return A}}};
var Ogb=function(){return bY[c[2]](this,12,7900)};
v$=function(Z,k,N){var a=String(g.dX.location.href);return a&&Z&&k?[k,vKf(OE(a),Z,N||null)].join(" "):null};
vKf=function(Z,k,N){var a=[];let T=[];if((Array.isArray(N)?2:1)==1)return T=[k,Z],g.pi(a,function(Q){T.push(Q)}),il(T.join(" "));
const K=[],y=[];g.pi(N,function(Q){y.push(Q.key);K.push(Q.value)});
N=Math.floor((new Date).getTime()/1E3);T=K.length==0?[N,k,Z]:[K.join(":"),N,k,Z];g.pi(a,function(Q){T.push(Q)});
Z=il(T.join(" "));Z=[N,Z];y.length==0||Z.push(y.join(""));return Z.join("_")};
il=function(Z){const k=Dcj();k.update(Z);return k.yD().toLowerCase()};
gA=function(Z){this.V=Z||{cookie:""}};
wA=function(Z){Z=(Z.V.cookie||"").split(";");const k=[],N=[];let a,T;for(let K=0;K<Z.length;K++)T=Z[K].trim(),a=T.indexOf("="),a==-1?(k.push(""),N.push(T)):(k.push(T.substring(0,a)),N.push(T.substring(a+1)));return{keys:k,values:N}};
$w=function(){var Z=g.dX.__SAPISID||g.dX.__APISID||g.dX.__3PSAPISID||g.dX.__1PSAPISID||g.dX.__OVERRIDE_SID;if(Z)return!0;typeof document!=="undefined"&&(Z=new gA(document),Z=Z.get("SAPISID")||Z.get("APISID")||Z.get("__Secure-3PAPISID")||Z.get("__Secure-1PAPISID"));return!!Z};
xw=function(Z,k,N,a){(Z=g.dX[Z])||typeof document==="undefined"||(Z=(new gA(document)).get(k));return Z?v$(Z,N,a):null};
Gr=function(Z){var k=OE(g.dX?.location.href);const N=[];if($w()){k=k.indexOf("https:")==0||k.indexOf("chrome-extension:")==0||k.indexOf("chrome-untrusted://new-tab-page")==0||k.indexOf("moz-extension:")==0;var a,T=(a=k)?g.dX.__SAPISID:g.dX.__APISID;T||typeof document==="undefined"||(T=new gA(document),T=T.get(a?"SAPISID":"APISID")||T.get("__Secure-3PAPISID"));(a=T?v$(T,a?"SAPISIDHASH":"APISIDHASH",Z):null)&&N.push(a);k&&((k=xw("__1PSAPISID","__Secure-1PAPISID","SAPISID1PHASH",Z))&&N.push(k),(Z=xw("__3PSAPISID",
"__Secure-3PAPISID","SAPISID3PHASH",Z))&&N.push(Z))}return N.length==0?null:N.join(" ")};
igi=function(Z){W1(Sf,ef,1,Z)};
gKi=function(Z,k=od){if(!Js){Z=Z.navigator?.userAgentData;if(!Z||typeof Z.getHighEntropyValues!=="function"||Z.brands&&typeof Z.brands.map!=="function")return Promise.reject(Error("UACH unavailable"));igi((Z.brands||[]).map(a=>{var T=new ef;T=Q3(T,1,a.brand);return Q3(T,2,a.version)}));
typeof Z.mobile==="boolean"&&VX(Sf,2,HR(Z.mobile));Js=Z.getHighEntropyValues(k)}const N=new Set(k);return Js.then(a=>{const T=Sf.clone();N.has("platform")&&Q3(T,3,a.platform);N.has("platformVersion")&&Q3(T,4,a.platformVersion);N.has("architecture")&&Q3(T,5,a.architecture);N.has("model")&&Q3(T,6,a.model);N.has("uaFullVersion")&&Q3(T,7,a.uaFullVersion);return T.W9()}).catch(()=>Sf.W9())};
zr=function(Z){return rs(Z,1,1)};
Rd=function(Z,k){jt(Z.V,UE,1,k);az(k,1)||zr(k);Z.No||(k=bl(Z),N7(k,5)||Q3(k,5,Z.locale));Z.uach&&(k=bl(Z),pk(k,pV,9)||jt(k,pV,9,Z.uach))};
bl=function(Z){var k=pk(Z.V,UE,1);k||(k=new UE,Rd(Z,k));Z=k;k=pk(Z,MY,11);k||(k=new MY,jt(Z,MY,11,k));return k};
wsy=function(Z,k){Z.U=k};
xcf=function(Z){const k=Z.No?void 0:ZJ();k?gKi(k,od).then(N=>{Z.uach=$cf(N??"[]");N=bl(Z);jt(N,pV,9,Z.uach);return!0}).catch(()=>!1):Promise.resolve(!1)};
g.nV=function(Z,k,N,a){this.Y=Z;this.L=k;this.V=this.D=Z;this.G=N||0;this.j=a||2};
g.Id=function(Z){Z.V=Math.min(Z.L,Z.V*Z.j);Z.D=Math.min(Z.L,Z.V+(Z.G?Math.round(Z.G*(Math.random()-.5)*2*Z.V):0));Z.U++};
jf=function(){return"https://play.google.com/log?format=json&hasfast=true"};
Gmf=function(Z,k){if(!Z.FS)return()=>{};
const N=()=>{Z.flush()};
return k?()=>{k().then(N)}:N};
EE=function(Z){Z.D.isFinal=!0;Z.flush();Z.D.isFinal=!1};
var Sff=function(Z,k,N,a,T,K,y,Q){return W$[c[2]](this,13,3593,Z,k,N,a,T,K,y,Q)};
Yw=function(Z){Z.C||(Z.C=jf());try{return(new URL(Z.C)).toString()}catch(k){return(new URL(Z.C,ZJ().location.origin)).toString()}};
oKR=function(Z){egj(Z,(k,N)=>{k=new URL(k);k.searchParams.set("format","json");let a=!1;try{a=ZJ().navigator.sendBeacon(k.toString(),N.W9())}catch{}a||(Z.N=!1);return a})};
Jgr=function(Z,k,N=null,a=Z.withCredentials){const T={},K=new URL(Yw(Z));N&&(T.Authorization=N);Z.sessionIndex&&(T["X-Goog-AuthUser"]=Z.sessionIndex,K.searchParams.set("authuser",Z.sessionIndex));Z.pageId&&(Object.defineProperty(T,"X-Goog-PageId",{value:Z.pageId}),K.searchParams.set("pageId",Z.pageId));return{url:K.toString(),body:k,JP:1,requestHeaders:T,requestType:"POST",withCredentials:a,timeoutMillis:Z.timeoutMillis}};
egj=function(Z,k){if(Z.V.length!==0){var N=new URL(Yw(Z));N.searchParams.delete("format");var a=Z.eW();a&&N.searchParams.set("auth",a);N.searchParams.set("authuser",Z.sessionIndex||"0");for(a=0;a<10&&Z.V.length;++a){const T=Z.V.slice(0,32),K=Z.D.build(T,Z.Y,Z.G,Z.oy,Z.O,Z.Vz);if(!k(N.toString(),K)){++Z.G;break}Z.Y=0;Z.G=0;Z.O=0;Z.Vz=0;Z.V=Z.V.slice(T.length)}Z.U.enabled&&Z.U.stop()}};
zgb=function(Z,k){Z.buildLabel=k;return Z};
bgR=function(Z){Z.network=new Ucy;return Z};
psX=function(Z,k){Z.V=k};
RgN=function(Z){Z.U=!0;return Z};
BJi=function(Z){return Z.fields.map(k=>k.fieldType)};
ts=function(Z,...k){k=Z$(k);return Z.V.has(k)?Z.V.get(k):void 0};
flf=function(Z){return Z.fields.map(k=>k.fieldName)};
Z$=function(...Z){return Z?Z.join(","):"key"};
g.kE=function(Z,k){this.type=Z;this.currentTarget=this.target=k;this.defaultPrevented=this.U=!1};
Nz=function(Z,k){g.kE.call(this,Z?Z.type:"");this.relatedTarget=this.currentTarget=this.target=null;this.button=this.screenY=this.screenX=this.clientY=this.clientX=0;this.key="";this.charCode=this.keyCode=0;this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.state=null;this.pointerId=0;this.pointerType="";this.V=null;Z&&this.init(Z,k)};
TG=function(Z){return!(!Z||!Z[a0])};
nKR=function(Z,k,N,a,T){this.listener=Z;this.proxy=null;this.src=k;this.type=N;this.capture=!!a;this.handler=T;this.key=++MeN;this.removed=this.MM=!1};
K6=function(Z){Z.removed=!0;Z.listener=null;Z.proxy=null;Z.src=null;Z.handler=null};
yD=function(Z){this.src=Z;this.listeners={};this.V=0};
g.QD=function(Z,k){const N=k.type;N in Z.listeners&&g.qF(Z.listeners[N],k)&&(K6(k),Z.listeners[N].length==0&&(delete Z.listeners[N],Z.V--))};
qz=function(Z,k,N,a){for(let T=0;T<Z.length;++T){const K=Z[T];if(!K.removed&&K.listener==k&&K.capture==!!N&&K.handler==a)return T}return-1};
g.C6=function(Z,k,N,a,T){if(a&&a.once)return re(Z,k,N,a,T);if(Array.isArray(k)){for(let K=0;K<k.length;K++)g.C6(Z,k[K],N,a,T);return null}N=mj(N);return TG(Z)?Z.listen(k,N,g.lf(a)?!!a.capture:!!a,T):sC(Z,k,N,!1,a,T)};
sC=function(Z,k,N,a,T,K){if(!k)throw Error("Invalid event type");const y=g.lf(T)?!!T.capture:!!T;let Q=AD(Z);Q||(Z[P2]=Q=new yD(Z));N=Q.add(k,N,a,y,K);if(N.proxy)return N;a=Ilf();N.proxy=a;a.src=Z;a.listener=N;if(Z.addEventListener)T===void 0&&(T=!1),Z.addEventListener(k.toString(),a,T);else if(Z.attachEvent)Z.attachEvent(c2(k.toString()),a);else if(Z.addListener&&Z.removeListener)Z.addListener(a);else throw Error("addEventListener and attachEvent are unavailable.");H2++;return N};
Ilf=function(){function Z(N){return k.call(Z.src,Z.listener,N)}
const k=jk0;return Z};
re=function(Z,k,N,a,T){if(Array.isArray(k)){for(let K=0;K<k.length;K++)re(Z,k[K],N,a,T);return null}N=mj(N);return TG(Z)?Z.TG(k,N,g.lf(a)?!!a.capture:!!a,T):sC(Z,k,N,!0,a,T)};
de=function(Z,k,N,a,T){if(Array.isArray(k))for(let K=0;K<k.length;K++)de(Z,k[K],N,a,T);else a=g.lf(a)?!!a.capture:!!a,N=mj(N),TG(Z)?Z.Ce(k,N,a,T):Z&&(Z=AD(Z))&&(k=Z.fY(k,N,a,T))&&XQ(k)};
XQ=function(Z){if(typeof Z!=="number"&&Z&&!Z.removed){var k=Z.src;if(TG(k))g.QD(k.kV,Z);else{var N=Z.type,a=Z.proxy;k.removeEventListener?k.removeEventListener(N,a,Z.capture):k.detachEvent?k.detachEvent(c2(N),a):k.addListener&&k.removeListener&&k.removeListener(a);H2--;(N=AD(k))?(g.QD(N,Z),N.V==0&&(N.src=null,k[P2]=null)):K6(Z)}}};
c2=function(Z){return Z in L6?L6[Z]:L6[Z]="on"+Z};
jk0=function(Z,k){if(Z.removed)Z=!0;else{k=new Nz(k,this);const N=Z.listener,a=Z.handler||Z.src;Z.MM&&XQ(Z);Z=N.call(a,k)}return Z};
AD=function(Z){Z=Z[P2];return Z instanceof yD?Z:null};
mj=function(Z){if(typeof Z==="function")return Z;Z[VD]||(Z[VD]=function(k){return Z.handleEvent(k)});
return Z[VD]};
g.FQ=function(){g.jR.call(this);this.kV=new yD(this);this.ey=this;this.JV=null};
tD=function(Z,k,N,a){k=Z.kV.listeners[String(k)];if(!k)return!0;k=k.concat();let T=!0;for(let K=0;K<k.length;++K){const y=k[K];if(y&&!y.removed&&y.capture==N){const Q=y.listener,q=y.handler||y.src;y.MM&&g.QD(Z.kV,y);T=Q.call(q,a)!==!1&&T}}return T&&!a.defaultPrevented};
lh=function(Z){Z=hD(Z);uh||(uh=EKy());uh(Z)};
EKy=function(){if(typeof MessageChannel!=="undefined"){const Z=new MessageChannel;let k={},N=k;Z.port1.onmessage=function(){if(k.next!==void 0){k=k.next;const a=k.jM;k.jM=null;a()}};
return function(a){N.next={jM:a};N=N.next;Z.port2.postMessage(0)}}return function(Z){g.dX.setTimeout(Z,0)}};
WER=function(){let Z;for(;Z=f6.remove();){try{Z.V.call(Z.scope)}catch(k){Fr(k)}B2.put(Z)}D$=!1};
g.v2=function(Z){this.V=0;this.j=void 0;this.Y=this.U=this.D=null;this.L=this.G=!1;if(Z!=g.Vp)try{const k=this;Z.call(void 0,function(N){OC(k,2,N)},function(N){OC(k,3,N)})}catch(k){OC(this,3,k)}};
ih=function(){this.next=this.context=this.U=this.D=this.V=null;this.Y=!1};
we=function(Z,k,N){const a=ge.get();a.D=Z;a.U=k;a.context=N;return a};
g.$E=function(Z){if(Z instanceof g.v2)return Z;const k=new g.v2(g.Vp);OC(k,2,Z);return k};
xE=function(Z){return new g.v2(function(k,N){N(Z)})};
g.eq=function(Z,k,N){GG(Z,k,N,null)||g.Sq(g.Or(k,Z))};
Yfy=function(Z){return new g.v2(function(k,N){Z.length||k(void 0);let a;for(let T=0;T<Z.length;T++)a=Z[T],g.eq(a,k,N)})};
JD=function(Z,k,N,a){o0(Z,we(k||g.Vp,N||null,a))};
g.zG=function(Z,k){k=hD(k);k=we(k,k);k.Y=!0;o0(Z,k);return Z};
UC=function(Z,k){if(Z.V==0)if(Z.D){var N=Z.D;if(N.U){var a=0,T=null,K=null;for(let y=N.U;y&&(y.Y||(a++,y.V==Z&&(T=y),!(T&&a>1)));y=y.next)T||(K=y);T&&(N.V==0&&a==1?UC(N,k):(K?(a=K,a.next==N.Y&&(N.Y=a),a.next=a.next.next):bh(N),p6(N,T,3,k)))}Z.D=null}else OC(Z,3,k)};
o0=function(Z,k){Z.U||Z.V!=2&&Z.V!=3||R0(Z);Z.Y?Z.Y.next=k:Z.U=k;Z.Y=k};
n6=function(Z,k,N,a){const T=we(null,null,null);T.V=new g.v2(function(K,y){T.D=k?function(Q){try{const q=k.call(a,Q);K(q)}catch(q){y(q)}}:K;
T.U=N?function(Q){try{const q=N.call(a,Q);q===void 0&&Q instanceof Mz?y(Q):K(q)}catch(q){y(q)}}:y});
T.V.D=Z;o0(Z,T);return T.V};
OC=function(Z,k,N){Z.V==0&&(Z===N&&(k=3,N=new TypeError("Promise cannot resolve to itself")),Z.V=1,GG(N,Z.Ui,Z.oL,Z)||(Z.j=N,Z.V=k,Z.D=null,R0(Z),k!=3||N instanceof Mz||Z1f(Z,N)))};
GG=function(Z,k,N,a){if(Z instanceof g.v2)return JD(Z,k,N,a),!0;if(Z)try{var T=!!Z.$goog_Thenable}catch(K){T=!1}else T=!1;if(T)return Z.then(k,N,a),!0;if(g.lf(Z))try{const K=Z.then;if(typeof K==="function")return kUy(Z,K,k,N,a),!0}catch(K){return N.call(a,K),!0}return!1};
kUy=function(Z,k,N,a,T){function K(q){Q||(Q=!0,a.call(T,q))}
function y(q){Q||(Q=!0,N.call(T,q))}
let Q=!1;try{k.call(Z,y,K)}catch(q){K(q)}};
R0=function(Z){Z.G||(Z.G=!0,g.Sq(Z.Pw,Z))};
bh=function(Z){let k=null;Z.U&&(k=Z.U,Z.U=k.next,k.next=null);Z.U||(Z.Y=null);return k};
p6=function(Z,k,N,a){if(N==3&&k.U&&!k.Y)for(;Z&&Z.L;Z=Z.D)Z.L=!1;if(k.V)k.V.D=null,I0(k,N,a);else try{k.Y?k.D.call(k.context):I0(k,N,a)}catch(T){jq.call(null,T)}ge.put(k)};
I0=function(Z,k,N){k==2?Z.D.call(Z.context,N):Z.U&&Z.U.call(Z.context,N)};
Z1f=function(Z,k){Z.L=!0;g.Sq(function(){Z.L&&jq.call(null,k)})};
Mz=function(Z){oy.call(this,Z)};
g.EC=function(Z,k){g.FQ.call(this);this.TP=Z||1;this.eG=k||g.dX;this.E_=(0,g.Dj)(this.nB,this);this.hj=g.vy()};
g.W2=function(Z,k,N){if(typeof Z==="function")N&&(Z=(0,g.Dj)(Z,N));else if(Z&&typeof Z.handleEvent=="function")Z=(0,g.Dj)(Z.handleEvent,Z);else throw Error("Invalid listener argument");return Number(k)>2147483647?-1:g.dX.setTimeout(Z,k||0)};
YE=function(Z,k){let N=null;return(new g.v2(function(a,T){N=g.W2(function(){a(k)},Z);
N==-1&&T(Error("Failed to schedule timer."))})).eK(function(a){g.dX.clearTimeout(N);
throw a;})};
k_=function(Z,k,...N){Z.U.has(k)||Z.U.set(k,new Zo(k,N))};
g.ae=function(Z,k,...N){Z.U.has(k)||Z.U.set(k,new NW(k,N))};
g.Kh=function(Z,k,...N){g.Ts(Z,k,1,N)};
yo=function(Z){Z.V.enabled||Z.V.start();Z.L++;Z.L>=Z.D&&Z.Y()};
NMN=function(Z){for(let k=0;k<Z.length;k++)Z[k].clear()};
Qo=function(Z,k){return Z.j.has(k)?void 0:Z.U.get(k)};
g.Ts=function(Z,k,N,...a){if((k=Qo(Z,k))&&k instanceof NW){a=[a];let K=0;var T;(T=(T=ts(k,[a]))&&T.length?T[0]:void 0)&&(K=T.V);k.V.set(Z$([a]),[new Ch(K+N)]);yo(Z)}};
mZ=function(Z){switch(Z){case 200:return 0;case 400:return 3;case 401:return 16;case 403:return 7;case 404:return 5;case 409:return 10;case 412:return 9;case 429:return 8;case 499:return 1;case 500:return 2;case 501:return 12;case 503:return 14;case 504:return 4;default:return 2}};
aJr=function(Z){switch(Z){case 0:return"OK";case 1:return"CANCELLED";case 2:return"UNKNOWN";case 3:return"INVALID_ARGUMENT";case 4:return"DEADLINE_EXCEEDED";case 5:return"NOT_FOUND";case 6:return"ALREADY_EXISTS";case 7:return"PERMISSION_DENIED";case 16:return"UNAUTHENTICATED";case 8:return"RESOURCE_EXHAUSTED";case 9:return"FAILED_PRECONDITION";case 10:return"ABORTED";case 11:return"OUT_OF_RANGE";case 12:return"UNIMPLEMENTED";case 13:return"INTERNAL";case 14:return"UNAVAILABLE";case 15:return"DATA_LOSS";
default:return""}};
g.AW=function(Z){return(new so).W9(Z)};
so=function(){};
P5=function(Z,k,N){if(k==null)N.push("null");else{if(typeof k=="object"){if(Array.isArray(k)){var a=k;k=a.length;N.push("[");var T="";for(var K=0;K<k;K++)N.push(T),P5(Z,a[K],N),T=",";N.push("]");return}if(k instanceof String||k instanceof Number||k instanceof Boolean)k=k.valueOf();else{N.push("{");T="";for(a in k)Object.prototype.hasOwnProperty.call(k,a)&&(K=k[a],typeof K!="function"&&(N.push(T),c5(a,N),N.push(":"),P5(Z,K,N),T=","));N.push("}");return}}switch(typeof k){case "string":c5(k,N);break;
case "number":N.push(isFinite(k)&&!isNaN(k)?String(k):"null");break;case "boolean":N.push(String(k));break;case "function":N.push("null");break;default:throw Error("Unknown type: "+typeof k);}}};
c5=function(Z,k){k.push('"',Z.replace(TMy,function(N){let a=H5[N];a||(a="\\u"+(N.charCodeAt(0)|65536).toString(16).slice(1),H5[N]=a);return a}),'"')};
K_b=function(Z){switch(Z){case 0:return"No Error";case 1:return"Access denied to content document";case 2:return"File not found";case 3:return"Firefox silently errored";case 4:return"Application custom error";case 5:return"An exception occurred";case 6:return"Http response at 400 or 500 level";case 7:return"Request was aborted";case 8:return"Request timed out";case 9:return"The resource is not available offline";default:return"Unrecognized error code"}};
d4=function(){};
Xj=function(){};
g.Lh=function(Z){g.FQ.call(this);this.headers=new Map;this.dA=Z||null;this.D=!1;this.V=null;this.C="";this.U=0;this.Y="";this.L=this.zt=this.N=this.O=!1;this.Vz=0;this.G=null;this.xW="";this.j=!1};
yIX=function(Z,k,N,a,T,K,y){const Q=new g.Lh;Vo.push(Q);k&&Q.listen("complete",k);Q.TG("ready",Q.Pe);K&&(Q.Vz=Math.max(0,K));y&&(Q.j=y);Q.send(Z,N,a,T)};
hW=function(Z,k){Z.D=!1;Z.V&&(Z.L=!0,Z.V.abort(),Z.L=!1);Z.Y=k;Z.U=5;Fj(Z);tW(Z)};
Fj=function(Z){Z.O||(Z.O=!0,Z.dispatchEvent("complete"),Z.dispatchEvent("error"))};
B5=function(Z){if(Z.D&&typeof uO!="undefined")if(Z.N&&g.lO(Z)==4)setTimeout(Z.eE.bind(Z),0);else if(Z.dispatchEvent("readystatechange"),Z.isComplete()){Z.getStatus();Z.D=!1;try{if(fh(Z))Z.dispatchEvent("complete"),Z.dispatchEvent("success");else{Z.U=6;try{var k=g.lO(Z)>2?Z.V.statusText:""}catch(N){k=""}Z.Y=k+" ["+Z.getStatus()+"]";Fj(Z)}}finally{tW(Z)}}};
tW=function(Z,k){if(Z.V){Z.G&&(clearTimeout(Z.G),Z.G=null);const N=Z.V;Z.V=null;k||Z.dispatchEvent("ready");try{N.onreadystatechange=null}catch(a){}}};
fh=function(Z){var k=Z.getStatus();a:switch(k){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var N=!0;break a;default:N=!1}if(!N){if(k=k===0)Z=g.YS(String(Z.C))[1]||null,!Z&&g.dX.self&&g.dX.self.location&&(Z=g.dX.self.location.protocol.slice(0,-1)),k=!Q4X.test(Z?Z.toLowerCase():"");N=k}return N};
g.lO=function(Z){return Z.V?Z.V.readyState:0};
g.Do=function(Z){try{return Z.V?Z.V.responseText:""}catch(k){return""}};
g.Oo=function(Z){try{if(!Z.V)return null;if("response"in Z.V)return Z.V.response;switch(Z.xW){case "":case "text":return Z.V.responseText;case "arraybuffer":if("mozResponseArrayBuffer"in Z.V)return Z.V.mozResponseArrayBuffer}return null}catch(k){return null}};
g.v5=function(Z){const k={};Z=(Z.V&&g.lO(Z)>=2?Z.V.getAllResponseHeaders()||"":"").split("\r\n");for(let a=0;a<Z.length;a++){if(g.a2(Z[a]))continue;var N=SrG(Z[a]);const T=N[0];N=N[1];if(typeof N!=="string")continue;N=N.trim();const K=k[T]||[];k[T]=K;K.push(N)}return Oh(k,function(a){return a.join(", ")})};
g.iO=function(Z,k){return Z.V?Z.V.getResponseHeader(k):null};
w4=function(Z,k,N){const a=g4();k=k();Z.D(N,g4()-a);return k};
Cjb=function(Z,k,N,a){Z=RgN(bgR(zgb(new $_,Z))).o3();k.length&&psX(Z,llX(new qQf,k));a!==void 0&&(Z.WX=a);const T=new rIj(Z.build());g.u(T,Z);const K=new x_({flush(y){try{T.flush(y)}catch(Q){N(Q)}}});K.addOnDisposeCallback(()=>{setTimeout(()=>{try{K.Y()}finally{T.dispose()}})});
K.D=1E5;K.flushInterval=3E4;K.V.setInterval(3E4);return K};
mij=function(Z){if(Z.timer===void 0){const k=Math.max(0,Z.V+Z.U-g4());Z.timer=setTimeout(()=>{try{Z.callback()}finally{Z.V=g4(),Z.timer=void 0}},k)}};
AIU=function(Z,k=[]){return new s4i(Z,k)};
g4=function(){return globalThis.performance?.now?.()??Date.now()};
Sh=function(Z,k){if(Z.disable)return new Gs;k=k?H$(k):[];return AIU({oU:Z.oU,GJ:Z.ju,xq:Z.ED,WX:Z.WX,dL:Z.dL,qE:Z.qE},k)};
PjN=function(Z){if(!Z)return null;Z=K_(Z,4);return Z===null||Z===void 0?null:Da(Z)};
oe=function(){eh.instance||(eh.instance=new eh);return eh.instance};
cIf=function(Z,k,N,a){if(!k&&!N)return Promise.resolve();if(!a)return JW(k,N);let T;(T=Z.U)[a]||(T[a]=new Promise((K,y)=>{JW(k,N).then(()=>{Z.V=a;K()},Q=>{delete Z.U[a];
y(Q)})}));
return Z.U[a]};
bO=function(Z,k){return cIf(Z,pk(k,zs,1,WF),pk(k,Uo,2,WF),N7(k,3,void 0,WF))};
JW=function(Z,k){return k?H1y(k):Z?diN(Z):Promise.resolve()};
H1y=function(Z){return new Promise((k,N)=>{const a=g.TU("SCRIPT"),T=PjN(Z);g.ED(a,T);a.onload=()=>{g.rM(a);k()};
a.onerror=()=>{g.rM(a);N(Error("EWLS"))};
(g.Uf("HEAD")[0]||document.documentElement).appendChild(a)})};
diN=function(Z){return new Promise(k=>{const N=g.TU("SCRIPT");if(Z){var a=K_(Z,6);a=a===null||a===void 0?null:n5(a)}else a=null;N.textContent=I2(a);jZ(N);(g.Uf("HEAD")[0]||document.documentElement).appendChild(N);g.rM(N);k()})};
XKb=function(Z,k){return q7(Z,1,k)};
L_R=function(Z,k){return q7(Z,2,k)};
VAG=function(Z,k){return q7(Z,3,k)};
MW=async function(Z,k,N,a,T){k=VAG(L_R(XKb(new ph,Z.requestKey),k),N);N=Z.V();Z=await a.L("c",Z.requestKey,T,Z.client.create(k,N));const K=Jx(O3(Z,2));if(K.length)return w4(a,()=>{var y=new Uint8Array(K.length);for(var Q=0;Q<K.length;Q++)y[Q]=K[Q]+97;if(g.dX.TextDecoder)y=(new TextDecoder).decode(y);else if(y.length<=8192)y=String.fromCharCode.apply(null,y);else{Q="";for(let q=0;q<y.length;q+=8192)Q+=String.fromCharCode.apply(null,Array.prototype.slice.call(y,q,q+8192));y=Q}return F_N(y)},"U");
a=pk(Z,Re,1);if(!a)throw Error("Missing field");return a};
jh=async function(Z,k,N,a){var T=Z.V();var K=new nh;K=q7(K,1,Z.requestKey);var y=q7(K,2,k);k=N.L;K=Z.requestKey;Z=Z.client;T=Ie(Z.V,Z.U+"/$rpc/google.internal.waa.v1.Waa/GenerateIT",y,T||{},tAy);return k.call(N,"g",K,a,T)};
hMR=function(Z,k,N,a,T){return Z instanceof Eo?MW(Z,a,T,k,N):MW(Z,a,T,new Gs,0)};
fJN=async function(Z,k,N,a=oe(),T=Promise.resolve(void 0),K){await 0;let y;for(;;){let Q=null;if(y){W5(Z,7);try{Q=await Y_(y.snapshot({}),K.K4,()=>Promise.resolve("E:CTO"))}catch(C){Q="E:UCE"}}let q;
const r=new g.nV(y?K.Gd:K.Em,K.Hw,K.Bw,K.Fy);for(let C=1;C<=K.maxAttempts;C++){if(C!==1){W5(Z,0);Z.V=new Z0(r.getValue(),K.y3,K.Ky);const m=await Z.V.promise;Z.V=void 0;m===1?(C=1,r.reset()):g.Id(r)}try{let m;N?m=N:(W5(Z,5),m=await Y_(hMR(k,Z.logger,C,a.V,Q),K.cw,()=>Promise.reject(Error("RGF:Fetch timed out"))));
W5(Z,3);await Y_(bO(a,m),K.fv,()=>Promise.reject(Error("DTZ:Script timed out")));
W5(Z,8);await T;const A=new kM({challenge:m,eC:Z.options.eC,DO:Z.options.DO});await Y_(A.jG,K.Bk,()=>Promise.reject(Error("QEG:Setup timed out")));
q=A;break}catch(m){Z.handleError(m),NA(Z)}}if(Z.jm())break;q&&(N=void 0,uMy(Z,y),y=q,lJb(Z,q),NA(Z));W5(Z,2);Z.V=new Z0(K.ke,K.y3,K.Ky);Z.isPaused&&Z.V.pause();await Z.V.promise;Z.V=void 0;if(Z.jm())break}y?.dispose()};
BMy=function(Z){Z.j=Error("Cancelled by dispose");Z.L.resolve();dA(Z.G.promise);Z.G.reject(Error("Cancelled by dispose"));Z.logger.dispose();Promise.all(Z.Y).then(async()=>{Z.D?.dispose();Z.D=void 0});
Z.Y=[];Z.V?.U();dA(Z.U.promise);Z.U.reject(Error("Cancelled by dispose"))};
Dif=async function(Z){if(Z.jm())throw Error("Already disposed");Z.V?.U();await Z.U.promise};
O1y=function(Z,k){const N=Z.vg;Z.vg=()=>{N();k()}};
lJb=function(Z,k){Z.jm()||(Z.D=k,Z.logger.update(k.sF()),Z.L.resolve(),Z.G.resolve(void 0),Z.vg())};
uMy=function(Z,k){k&&(Promise.all(Z.Y).then(()=>void k.dispose()),Z.Y=[])};
W5=function(Z,k){Z.C=k;Z.options.sxA?.(k)};
NA=function(Z){Z.jm()||(Z.U.resolve(),Z.U=new g.aL)};
Y_=function(Z,k,N){let a;const T=new Promise(K=>{a=setTimeout(K,k)});
return Promise.race([Z.finally(()=>void clearTimeout(a)),
T.then(N)])};
v1G=function(Z,k){Z.endTimeMs=Date.now()+k;Z.tick()};
Ty=function(Z){Z.V&&(clearTimeout(Z.V),Z.V=null)};
K7=function(Z,k){try{return globalThis.sessionStorage.setItem(Z,k),!0}catch(N){return!1}};
y6=function(Z,k=0,N=Z.length,a){let T=0;for(a&&(T=y6(a));k<N;k++)T=i1y(31,T)+(typeof Z==="string"?Z.charCodeAt(k):Z[k])|0;return T};
qA=function(Z){const [k,N]=[y6(Z,0,Z.length>>1,Q6),y6(Z,Z.length>>1)];return k.toString(16)+N.toString(16)};
rn=function(Z,k){var N=[y6(k,0,k.length>>1,void 0),y6(k,k.length>>1)];Z=new Uint32Array(Z.buffer);k=Z[0];const [a,T]=N;for(N=1;N<Z.length;N+=2){var K=k,y=N,Q=a,q=T;for(let r=0;r<22;r++)y=y>>>8|y<<24,y+=K|0,y^=Q+38293,K=K<<3|K>>>29,K^=y,q=q>>>8|q<<24,q+=Q|0,q^=r+38293,Q=Q<<3|Q>>>29,Q^=q;K=[K,y];Z[N]^=K[0];N+1<Z.length&&(Z[N+1]^=K[1])}};
g1j=function(Z,k,N,a,T){const K=(4-(Q6.length+N.length)%4)%4,y=new Uint8Array(4+K+Q6.length+4+N.length),Q=new DataView(y.buffer);let q=0;Q.setUint32(q,Math.random()*4294967295);q=q+4+K;y.set(Q6,q);q+=Q6.length;Q.setUint32(q,T);y.set(N,q+4);rn(y,a);return Z.Me(k,r=>void globalThis.sessionStorage.removeItem(r))?K7(k,g.fl(y))?"s":"t":"i"};
wKf=function(Z,k){var N=globalThis.sessionStorage.getItem(Z);if(!N)return["m"];let a;try{a=vF(N),rn(a,k)}catch(T){return globalThis.sessionStorage.removeItem(Z),["c"]}for(k=4;k<7&&a[k]===0;)k++;for(N=0;N<Q6.length;N++)if(a[k++]!==Q6[N])return globalThis.sessionStorage.removeItem(Z),["d"];N=(new DataView(a.buffer)).getUint32(k);return Math.floor(Date.now()/1E3)>=N?(globalThis.sessionStorage.removeItem(Z),["e"]):["a",new Uint8Array(a.buffer,k+4)]};
$if=function(Z){var k=globalThis.sessionStorage.getItem("iU5q-!O9@$");if(!k)return new C7(Z);var N=k.split(",");if(N.length<2)return globalThis.sessionStorage.removeItem("iU5q-!O9@$"),new C7(Z);k=N.slice(1);k.length===1&&k[0]===""&&(k=[]);N=Number(N[0]);return isNaN(N)||N<0||N>k.length?(globalThis.sessionStorage.removeItem("iU5q-!O9@$"),new C7(Z)):new C7(Z,N,k)};
SQU=function(Z){function k(){N-=a;N-=T;N^=T>>>13;a-=T;a-=N;a^=N<<8;T-=N;T-=a;T^=a>>>13;N-=a;N-=T;N^=T>>>12;a-=T;a-=N;a^=N<<16;T-=N;T-=a;T^=a>>>5;N-=a;N-=T;N^=T>>>3;a-=T;a-=N;a^=N<<10;T-=N;T-=a;T^=a>>>15}
Z=xiU(Z);let N=2654435769,a=2654435769,T=314159265;const K=Z.length;let y=K,Q=0;for(;y>=12;y-=12,Q+=12)N+=m3(Z,Q),a+=m3(Z,Q+4),T+=m3(Z,Q+8),k();T+=K;switch(y){case 11:T+=Z[Q+10]<<24;case 10:T+=Z[Q+9]<<16;case 9:T+=Z[Q+8]<<8;case 8:a+=Z[Q+7]<<24;case 7:a+=Z[Q+6]<<16;case 6:a+=Z[Q+5]<<8;case 5:a+=Z[Q+4];case 4:N+=Z[Q+3]<<24;case 3:N+=Z[Q+2]<<16;case 2:N+=Z[Q+1]<<8;case 1:N+=Z[Q+0]}k();return GUj.toString(T)};
xiU=function(Z){const k=[];for(let N=0;N<Z.length;N++)k.push(Z.charCodeAt(N));return k};
m3=function(Z,k){return Z[k+0]+(Z[k+1]<<8)+(Z[k+2]<<16)+(Z[k+3]<<24)};
Av=function(Z,k){const N=setTimeout(()=>{Z.Y.resolve()},k);
Z.addOnDisposeCallback(()=>void clearTimeout(N))};
cv=function(Z,k){var N=`${k(Z.error.message)}:${k(Z.error.stack)}`.substring(0,2048);k=N.length+1;N=Pv(N);const a=new Uint8Array(4+N.length);a.set([42,k&127|128,k>>7,Z.error.code]);a.set(N,4);return a};
Pv=function(Z){return globalThis.TextEncoder?(new TextEncoder).encode(Z):g.hx(Z)};
eMX=function(Z,k,N){return Z instanceof Eo?jh(Z,N,k,1):Z.lO(N)};
L7=async function(Z){let k=void 0;Z.L++;const N=new g.aL;Z.L8 instanceof Hv&&Z.L8.Y.push(N.promise);if(Z.HH){const K=new g.aL;setTimeout(()=>void K.resolve());
await K.promise}const a=Z.logger.share();try{Z.state=5;const K=[],y=await Y_(Z.L8.snapshot({yr:{},FB:K}),Z.yA.rO,()=>Promise.reject(new P$(15,"MDA:Timeout")));
dn(Z,"MDA:Disposed");const Q=K[0];Z.state=6;const q=await Y_(eMX(Z.Tv,a,y),Z.yA.Qf,()=>Promise.reject(new P$(10,"BWB:Timeout")));
dn(Z,"BWB:Disposed");Z.state=7;k=w4(a,()=>{const r=o1f(Z,q,N,Q);r.Y.promise.then(()=>void Z.G());
return r},"i")}catch(K){k?.dispose();
if(!Z.U){const y=JIf(Z,K);N.resolve();var T;if(T=Z.L8 instanceof Hv&&Z.L<2)a:if(K instanceof P$)T=K.code!==32&&K.code!==20&&K.code!==10;else{if(K instanceof XX)switch(K.code){case 2:case 13:case 14:case 4:break;default:T=!1;break a}T=!0}if(T){const Q=setTimeout(()=>void Z.G(),(1+Math.random()*.25)*(Z.V?6E4:1E3));
Z.addOnDisposeCallback(()=>void clearTimeout(Q));
return}Z.U=y}a.QV(Z.V?13:14);Z.Y.reject(Z.U);return}finally{a.dispose()}Z.state=8;Z.L=0;Z.V?.dispose();Z.V=k;Z.Y.resolve()};
JIf=function(Z,k){if(!(k instanceof P$))if(k instanceof XX){const N=Error(k.toString());N.stack=k.stack;k=new P$(11,"EBH:Error",N)}else k=new P$(12,"BSO:Unknown",k);return Z.reportError(k)};
dn=function(Z,k){if(Z.jm())throw new P$(Z.V?20:32,k);};
o1f=function(Z,k,N,a){const T=(hJ(XD(k,2))??0)*1E3;if(T<=0)throw new P$(31,"TTM:Invalid");if(N7(k,4))return new zMb(Z.logger,N7(k,4),T);if(!(hJ(XD(k,3))??0))return new Uir(Z.logger,Jx(O3(k,1)),T);if(!a)throw new P$(4,"PMD:Undefined");a=a(Jx(O3(k,1)));if(typeof a!=="function")throw new P$(16,"APF:Failed");Z.j=Math.floor((Date.now()+T)/1E3);Z=new V6(Z.logger,a,hJ(XD(k,3))??0,T);Z.addOnDisposeCallback(()=>void N.resolve());
return Z};
tv=function(Z,k,N){try{if(Z.jm())throw new P$(21,"BNT:disposed");if(!Z.V&&Z.U)throw Z.U;return b1f(Z,k,N)??pKX(Z,k,N)??RMf(Z,k,N)}catch(a){if(!k.MS)throw FX(Z,a);return MAU(Z,N,a)}};
FX=function(Z,k){k=k instanceof P$?k:new P$(5,"TVD:error",k);return Z.reportError(k)};
b1f=function(Z,k,N){return Z.V?.yb(()=>hv(Z,k),N,a=>{if(Z.V instanceof V6&&k.z3?.E7)try{Z.cache?.V(hv(Z,k),a,k.z3.Bp,Z.j-120)}catch(T){Z.reportError(new P$(24,"ELX:write",T))}})};
pKX=function(Z,k,N){if(k.z3?.o9)try{const a=Z.cache?.U(hv(Z,k),k.z3.Bp);return a?N?w4(Z.logger,()=>g.fl(a,2),"a"):a:void 0}catch(a){Z.reportError(new P$(23,"RXO:read",a))}};
RMf=function(Z,k,N){const a={stack:[],error:void 0,hasError:!1};try{if(!k.Cr)throw new P$(29,"SDF:notready");return Gf(a,new uV(Z.logger,0,Z.state)).yb(()=>hv(Z,k),N)}catch(T){a.error=T,a.hasError=!0}finally{SN(a)}};
MAU=function(Z,k,N){const a={stack:[],error:void 0,hasError:!1};try{const T=FX(Z,N);return Gf(a,new n1y(Z.logger,T)).yb(()=>[],k)}catch(T){a.error=T,a.hasError=!0}finally{SN(a)}};
hv=function(Z,k){return k.xG?k.xG:k.yr?w4(Z.logger,()=>k.xG=Pv(k.yr),"c"):[]};
lV=function(){let Z=0,k;return N=>{k||(k=new Gs);const a=new uV(k,Z,1),T=a.yb(()=>Pv(N),!0);
a.dispose();Z++;return T}};
j4y=function(Z,k={}){return new IJN(Z,k)};
E1f=function(Z){Z.G.SR("data",k=>{if("1"in k){var N=k["1"];let a;try{a=Z.j(N)}catch(T){f7(Z,new XX(13,`Error when deserializing response data; error: ${T}, response: ${N}`))}a&&Bv(Z,a)}if("2"in k)for(k=D0(Z,k["2"]),N=0;N<Z.L.length;N++)Z.L[N](k)});
Z.G.SR("end",()=>{Os(Z,vv(Z));for(let k=0;k<Z.D.length;k++)Z.D[k]()});
Z.G.SR("error",()=>{if(Z.V.length!==0){var k=Z.xhr.U;k!==0||fh(Z.xhr)||(k=6);var N=-1;switch(k){case 0:var a=2;break;case 7:a=10;break;case 8:a=4;break;case 6:N=Z.xhr.getStatus();a=mZ(N);break;default:a=14}Os(Z,vv(Z));k=K_b(k)+", error: "+Z.xhr.getLastError();N!==-1&&(k+=`, http status code: ${N}`);f7(Z,new XX(a,k))}})};
f7=function(Z,k){for(let N=0;N<Z.V.length;N++)Z.V[N](k)};
Os=function(Z,k){for(let N=0;N<Z.Y.length;N++)Z.Y[N](k)};
vv=function(Z){const k={},N=g.v5(Z.xhr);Object.keys(N).forEach(a=>{k[a]=N[a]});
return k};
Bv=function(Z,k){for(let N=0;N<Z.U.length;N++)Z.U[N](k)};
D0=function(Z,k){let N=2,a;const T={};try{let K;K=W_y(k);N=g.ZZ(K,1);a=K.getMessage();nk(K,YQf,3).length&&(T["grpc-web-status-details-bin"]=k)}catch(K){Z.xhr&&Z.xhr.getStatus()===404?(N=5,a="Not Found: "+String(Z.xhr.C)):(N=14,a=`Unable to parse RpcStatus: ${K}`)}return{code:N,details:a,metadata:T}};
kWj=function(Z,k){const N=new Zly;g.C6(Z.xhr,"complete",()=>{if(fh(Z.xhr)){var a=g.Do(Z.xhr);if(k&&Z.xhr.getResponseHeader("Content-Type")==="text/plain"){if(!atob)throw Error("Cannot decode Base64 response");a=atob(a)}try{var T=Z.j(a)}catch(y){f7(Z,iV(new XX(13,`Error when deserializing response data; error: ${y}, response: ${a}`),N));return}a=mZ(Z.xhr.getStatus());Os(Z,vv(Z));a===0?Bv(Z,T):f7(Z,iV(new XX(a,"Xhr succeeded but the status code is not 200"),N))}else{a=g.Do(Z.xhr);let y;T=vv(Z);if(a){var K=
D0(Z,a);a=K.code;y=K.details;K=K.metadata}else a=2,y=`Rpc failed due to xhr error. uri: ${String(Z.xhr.C)}, error code: ${Z.xhr.U}, error: ${Z.xhr.getLastError()}`,K=T;Os(Z,T);f7(Z,iV(new XX(a,y,K),N))}})};
gn=function(Z,k){k=Z.indexOf(k);k>-1&&Z.splice(k,1)};
iV=function(Z,k){k.stack&&(Z.stack+="\n"+k.stack);return Z};
g.wn=function(Z){this.Y=Z.C3||null;this.D=Z.HW||!1;this.U=void 0};
$M=function(Z,k){g.FQ.call(this);this.zt=Z;this.G=k;this.L=void 0;this.status=this.readyState=0;this.responseType=this.responseText=this.response=this.statusText="";this.onreadystatechange=this.responseXML=null;this.N=new Headers;this.U=null;this.O="GET";this.Vz="";this.V=!1;this.j=this.D=this.Y=null;this.C=new AbortController};
xM=function(Z){Z.D.read().then(Z.dX.bind(Z)).catch(Z.f_.bind(Z))};
S7=function(Z){Z.readyState=4;Z.Y=null;Z.D=null;Z.j=null;Gy(Z)};
Gy=function(Z){Z.onreadystatechange&&Z.onreadystatechange.call(Z)};
NPb=function(Z){if(Z.o5&&typeof Z.o5=="function")return Z.o5();if(typeof Map!=="undefined"&&Z instanceof Map||typeof Set!=="undefined"&&Z instanceof Set)return Array.from(Z.values());if(typeof Z==="string")return Z.split("");if(g.uf(Z)){const k=[],N=Z.length;for(let a=0;a<N;a++)k.push(Z[a]);return k}return $a(Z)};
ati=function(Z){if(Z.pP&&typeof Z.pP=="function")return Z.pP();if(!Z.o5||typeof Z.o5!="function"){if(typeof Map!=="undefined"&&Z instanceof Map)return Array.from(Z.keys());if(!(typeof Set!=="undefined"&&Z instanceof Set)){if(g.uf(Z)||typeof Z==="string"){const k=[];Z=Z.length;for(let N=0;N<Z;N++)k.push(N);return k}return g.xa(Z)}}};
TPN=function(Z,k,N){if(Z.forEach&&typeof Z.forEach=="function")Z.forEach(k,N);else if(g.uf(Z)||typeof Z==="string")Array.prototype.forEach.call(Z,k,N);else{const a=ati(Z),T=NPb(Z),K=T.length;for(let y=0;y<K;y++)k.call(N,T[y],a&&a[y],Z)}};
g.e7=function(Z){this.V=this.C=this.L="";this.D=null;this.G=this.U="";this.j=!1;let k;Z instanceof g.e7?(this.j=Z.j,g.oL(this,Z.L),this.C=Z.C,g.Jv(this,Z.V),g.zy(this,Z.D),this.U=Z.U,Us(this,Z.Y.clone()),this.G=Z.G):Z&&(k=g.YS(String(Z)))?(this.j=!1,g.oL(this,k[1]||"",!0),this.C=bV(k[2]||""),g.Jv(this,k[3]||"",!0),g.zy(this,k[4]),this.U=bV(k[5]||"",!0),Us(this,k[6]||"",!0),this.G=bV(k[7]||"")):(this.j=!1,this.Y=new p7(null,this.j))};
g.oL=function(Z,k,N){Z.L=N?bV(k,!0):k;Z.L&&(Z.L=Z.L.replace(/:$/,""))};
g.Jv=function(Z,k,N){Z.V=N?bV(k,!0):k};
g.zy=function(Z,k){if(k){k=Number(k);if(isNaN(k)||k<0)throw Error("Bad port number "+k);Z.D=k}else Z.D=null};
Us=function(Z,k,N){k instanceof p7?(Z.Y=k,K1N(Z.Y,Z.j)):(N||(k=RL(k,yx0)),Z.Y=new p7(k,Z.j))};
g.MA=function(Z,k,N){Z.Y.set(k,N)};
g.n7=function(Z){return Z instanceof g.e7?Z.clone():new g.e7(Z)};
bV=function(Z,k){return Z?k?decodeURI(Z.replace(/%25/g,"%2525")):decodeURIComponent(Z):""};
RL=function(Z,k,N){return typeof Z==="string"?(Z=encodeURI(Z).replace(k,QIG),N&&(Z=Z.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),Z):null};
QIG=function(Z){Z=Z.charCodeAt(0);return"%"+(Z>>4&15).toString(16)+(Z&15).toString(16)};
p7=function(Z,k){this.U=this.V=null;this.D=Z||null;this.Y=!!k};
j7=function(Z){Z.V||(Z.V=new Map,Z.U=0,Z.D&&yU(Z.D,function(k,N){Z.add(y2(k),N)}))};
Wv=function(Z,k){j7(Z);k=Es(Z,k);return Z.V.has(k)};
g.YM=function(Z,k,N){Z.remove(k);N.length>0&&(Z.D=null,Z.V.set(Es(Z,k),g.mr(N)),Z.U=Z.U+N.length)};
Es=function(Z,k){k=String(k);Z.Y&&(k=k.toLowerCase());return k};
K1N=function(Z,k){k&&!Z.Y&&(j7(Z),Z.D=null,Z.V.forEach(function(N,a){const T=a.toLowerCase();a!=T&&(this.remove(a),g.YM(this,T,N))},Z));
Z.Y=k};
g.ZU=function(Z){let k="";g.BB(Z,function(N,a){k+=a;k+=":";k+=N;k+="\r\n"});
return k};
g.k3=function(Z,k,N){if(g.ze(N))return Z;N=g.ZU(N);if(typeof Z==="string")return sI(Z,g.Kg(k),N);g.MA(Z,k,N);return Z};
g.Nv=function(Z){g.jR.call(this);this.U=Z;this.V={}};
a3=function(Z,k,N,a,T,K){if(Array.isArray(N))for(let y=0;y<N.length;y++)a3(Z,k,N[y],a,T,K);else{k=re(k,N,a||Z.handleEvent,T,K||Z.U||Z);if(!k)return Z;Z.V[k.key]=k}return Z};
To=function(Z,k,N){Z.D=!1;throw Error("The stream is broken @"+Z.U+". Error: "+N+". With input:\n"+k);};
Kj=function(){this.G=null;this.j=[];this.Y=this.U=this.D=this.V=this.N=0;this.L=null;this.C=0};
y$=function(Z,k,N,a){Z.V=3;Z.G="The stream is broken @"+Z.N+"/"+N+". Error: "+a+". With input:\n"+k;throw Error(Z.G);};
Q$=function(){this.V=null;this.U=0;this.D=new qmf;this.Y=new Kj};
qv=function(Z,k,N){Z.V="The stream is broken @"+Z.U+". Error: "+N+". With input:\n"+k;throw Error(Z.V);};
r3=function(Z){return Z=="\r"||Z=="\n"||Z==" "||Z=="\t"};
Cj=function(Z){this.N=null;this.G=[];this.Y="";this.O=[];this.D=this.U=0;this.j=!1;this.C=0;this.zt=/[\\"]/g;this.V=this.L=0;this.Vz=!(!Z||!Z.n4)};
mK=function(Z,k,N){Z.L=3;Z.N="The stream is broken @"+Z.D+"/"+N+". With input:\n"+k;throw Error(Z.N);};
sc=function(){this.L=this.D=null;this.U=this.V=0;this.Y=[];this.G=!1};
rxb=function(Z){let k=g.iO(Z,"Content-Type");if(!k)return null;k=k.toLowerCase();return k.startsWith("application/json")?k.startsWith("application/json+protobuf")?new sc:new Cj:k.startsWith("application/x-protobuf")?(Z=g.iO(Z,"Content-Transfer-Encoding"))?Z.toLowerCase()=="base64"?new Q$:null:new Kj:null};
Am=function(Z,k){Z.L!=k&&(Z.L=k,Z.j&&Z.j())};
Pp=function(Z){Z.C.removeAll();if(Z.V){const k=Z.V;Z.V=null;k.abort();k.dispose()}};
cp=function(Z,k){for(let N=0;N<Z.length;N++){const a=Z[N];k.forEach(function(T){try{T(a)}catch(K){}})}};
Hp=function(Z,k){var N=Z.U[k];N&&N.forEach(function(a){try{a()}catch(T){}});
(N=Z.V[k])&&N.forEach(function(a){a()});
Z.V[k]=[]};
CKN=function(Z,k){return k.reduce((N,a)=>T=>a.intercept(T,N),Z)};
m3r=function(Z,k){return k.reduce((N,a)=>T=>a.intercept(T,N),Z)};
sIU=function(Z,k,N){const a=k.P$,T=k.getMetadata(),K=d3(Z,!0);Z=X1(Z,T,K,N+a.getName());N=Lj(K,a.U,!1);kWj(N,T["X-Goog-Encode-Response-If-Executable"]==="base64");k=a.V(k.uW);K.send(Z,"POST",k);return N};
AxN=function(Z,k,N,a,T,K={}){const y=k.substring(0,k.length-T.name.length),Q=K?.signal;return m3r(q=>new Promise((r,C)=>{if(Q?.aborted){const P=new XX(1,"Aborted");P.cause=Q.reason;C(P)}else{var m={},A=sIU(Z,q,y);A.SR("error",P=>void C(P));
A.SR("metadata",P=>{m=P});
A.SR("data",P=>{r(j4y(P,m))});
Q&&Q.addEventListener("abort",()=>{A.cancel();const P=new XX(1,"Aborted");P.cause=Q.reason;C(P)})}}),Z.O7).call(Z,T.G(N,a)).then(q=>q.Dz)};
Ie=function(Z,k,N,a,T,K={}){return AxN(Z,k,N,a,T,K)};
d3=function(Z,k){k=Z.V&&!k;return Z.Yv||k?new g.Lh(new g.wn({C3:Z.Yv,HW:k})):new g.Lh};
X1=function(Z,k,N,a){k["Content-Type"]="application/json+protobuf";k["X-User-Agent"]="grpc-web-javascript/0.1";const T=k.Authorization;if(T&&PKb.has(T.split(" ")[0])||Z.withCredentials)N.j=!0;if(Z.PW)a=g.k3(a,"$httpHeaders",k);else for(const K of Object.keys(k))N.headers.set(K,k[K]);return a};
Lj=function(Z,k,N){let a;N&&(Z.isActive(),N=new cxU(Z),a=new Hly(N));return new d3f({xhr:Z,P2:a},k)};
V$=function(){this.V=new XFi;this.U="https://jnn-pa.googleapis.com".replace(/\/+$/,"")};
F1=function(Z){return Z.V.Aq(L1f)};
F1r=function(Z){if(g.a2(g.qc(Z)))return!1;if(Z.indexOf("://pagead2.googlesyndication.com/pagead/gen_204?id=yt3p&sr=1&")>=0)return!0;let k;try{k=new g.e7(Z)}catch(N){return g.ZD(tm,a=>Z.search(a)>0)!=null}return k.G.match(Vvi)?!0:g.ZD(tm,N=>Z.match(N)!=null)!=null};
g.hm=function(Z,k){return Z.replace(tvy,function(N,a){try{let T=g.bT(k,a);if(T==null||T.toString()==null)return N;T=T.toString();if(T==""||!g.a2(g.qc(T)))return encodeURIComponent(T).replace(/%2C/g,",")}catch(T){}return N})};
urf=function(Z){const k=Z.Sl;return Ra(Z,k,k[M3]|0,hNi,2,1)};
fty=function(Z){var k;if((k=Z[u6])!=null)Z=k;else{if(l6!==l6)throw Error();Z=Z[u6]=ltf(Z.V)}return Z};
BPG=function(Z){return Z[fj]??(Z[fj]=new Map(urf(fty(Z)).map(k=>[k.getName(),g.ZZ(k,2)])))};
DU=function(Z){if(Z.XT!==void 0){var k=Bp;Bp=!0;try{for(let N=Z.XT;N!==void 0;N=N.Kom){const a=N.ogW;a.mA||(a.mA=!0,DU(a),a.Mp?.(a))}}finally{Bp=k}}};
OlU=function(Z,k){const N=Object.create(D3j);N.value=Z;k!==void 0&&(N.D_=k);Z=()=>{if(Bp)throw Error("");return N.value};
Z[Oc]=N;return[Z,a=>vp(N,a),
a=>{vp(N,a(N.value))}]};
vp=function(Z,k){Z.D_(Z.value,k)||(Z.value=k,Z.version++,v9b++,DU(Z))};
i6=function(Z,k=""){var N={};Z=OlU(Z,N.equals);N=N.debugName;Z[0][Oc].debugName=N&&k?`${N}__${k}`:N??k??"[signal]"};
ily=function(){var Z=g.g3;w3.instance||(w3.instance=new w3(Z));return w3.instance};
$3=function(Z,k){return Z.Y?Z.Y:Z.Y=new Promise(async N=>{const a=window.AbortController?new window.AbortController:void 0,T=a?.signal;let K=!1;try{a&&(Z.U=Z.oV.IU(()=>{a.abort()},k||2E4)),await fetch("/generate_204",{method:"HEAD",
signal:T}),K=!0}catch{K=!1}finally{Z.Y=void 0,Z.U&&(Z.oV.Ux(Z.U),Z.U=0),K!==Z.V&&(Z.V=K,Z.V?Z.dispatchEvent("networkstatus-online"):Z.dispatchEvent("networkstatus-offline")),N(K)}})};
g9y=function(Z){Z.V===-1&&(Z.V=Z.data.reduce((k,N,a)=>k+(N?2**a:0),0));
return Z.V};
x3=function(Z){Z.setAttribute("role","link")};
SX=function(Z,k){Array.isArray(k)&&(k=k.join(" "));k===""||k==void 0?(Go||(Go={atomic:!1,autocomplete:"none",dropeffect:"none",haspopup:!1,live:"off",multiline:!1,multiselectable:!1,orientation:"vertical",readonly:!1,relevant:"additions text",required:!1,sort:"none",busy:!1,disabled:!1,hidden:!1,invalid:"false"}),k=Go,"label"in k?Z.setAttribute("aria-label",k.label):Z.removeAttribute("aria-label")):Z.setAttribute("aria-label",k)};
eX=function(Z){Z=Z.getAttribute("aria-label");return Z==null||Z==void 0?"":String(Z)};
g.o3=function(Z,k,N){g.jR.call(this);this.V=null;this.Y=!1;this.G=Z;this.L=N;this.U=k||window;this.D=(0,g.Dj)(this.xs,this)};
Jm=function(Z){Z=Z.U;return Z.requestAnimationFrame||Z.webkitRequestAnimationFrame||Z.mozRequestAnimationFrame||Z.oRequestAnimationFrame||Z.msRequestAnimationFrame||null};
zo=function(Z){Z=Z.U;return Z.cancelAnimationFrame||Z.cancelRequestAnimationFrame||Z.webkitCancelRequestAnimationFrame||Z.mozCancelRequestAnimationFrame||Z.oCancelRequestAnimationFrame||Z.msCancelRequestAnimationFrame||null};
g.Uc=function(Z,k,N){g.jR.call(this);this.V=Z;this.TP=k||0;this.U=N;this.D=(0,g.Dj)(this.Il,this)};
g.b6=function(Z){Z.stop();Z.Il()};
pj=function(Z){Z.WI=g.W2(()=>{Z.WI=null;Z.V&&!Z.U&&(Z.V=!1,pj(Z))},Z.TP);
const k=Z.D;Z.D=null;Z.L.apply(null,k)};
R3=function(Z){return typeof Z.className=="string"?Z.className:Z.getAttribute&&Z.getAttribute("class")||""};
Mv=function(Z){return Z.classList?Z.classList:R3(Z).match(/\S+/g)||[]};
g.nj=function(Z,k){typeof Z.className=="string"?Z.className=k:Z.setAttribute&&Z.setAttribute("class",k)};
g.I3=function(Z,k){return Z.classList?Z.classList.contains(k):g.KK(Mv(Z),k)};
g.jX=function(Z,k){if(Z.classList)Z.classList.add(k);else if(!g.I3(Z,k)){const N=R3(Z);g.nj(Z,N+(N.length>0?" "+k:k))}};
g.Ec=function(Z,k){if(Z.classList)Array.prototype.forEach.call(k,function(a){g.jX(Z,a)});
else{var N={};Array.prototype.forEach.call(Mv(Z),function(a){N[a]=!0});
Array.prototype.forEach.call(k,function(a){N[a]=!0});
k="";for(const a in N)k+=k.length>0?" "+a:a;g.nj(Z,k)}};
g.Wp=function(Z,k){Z.classList?Z.classList.remove(k):g.I3(Z,k)&&g.nj(Z,Array.prototype.filter.call(Mv(Z),function(N){return N!=k}).join(" "))};
g.Y3=function(Z,k){Z.classList?Array.prototype.forEach.call(k,function(N){g.Wp(Z,N)}):g.nj(Z,Array.prototype.filter.call(Mv(Z),function(N){return!g.KK(k,N)}).join(" "))};
g.D=function(Z,k,N){N?g.jX(Z,k):g.Wp(Z,k)};
Zs=function(Z,k){const N=!g.I3(Z,k);g.D(Z,k,N)};
g.kN=function(){g.FQ.call(this);this.V=0;this.endTime=this.startTime=null};
wFy=function(Z,k){Array.isArray(k)||(k=[k]);k=k.map(function(N){return typeof N==="string"?N:N.property+" "+N.duration+"s "+N.timing+" "+N.delay+"s"});
g.ij(Z,"transition",k.join(","))};
NK=function(Z,k,N,a,T){g.kN.call(this);this.U=Z;this.L=k;this.G=N;this.Y=a;this.j=Array.isArray(T)?T:[T]};
aP=function(Z,k,N,a){return new NK(Z,k,{opacity:N},{opacity:a},{property:"opacity",duration:k,timing:"ease-in",delay:0})};
x3f=function(Z){Z=Z.trim();if(Z=="")return null;var k=String(Z.slice(0,4)).toLowerCase();if(("url("<k?-1:"url("==k?0:1)==0)return!Z.endsWith(")")||(Z?Z.split("(").length-1:0)>1||Z&&Z.split(")"),null;if(Z.indexOf("(")>0){if(/"|'/.test(Z))return null;k=/([\-\w]+)\(/g;let N;for(;N=k.exec(Z);)if(!(N[1].toLowerCase()in $3f))return null}return Z};
TS=function(Z,k){Z=g.dX[Z];return Z&&Z.prototype?(k=Object.getOwnPropertyDescriptor(Z.prototype,k))&&k.get||null:null};
KP=function(Z){const k=g.dX.CSSStyleDeclaration;return k&&k.prototype&&k.prototype[Z]||null};
Qd=function(Z,k,N,a){if(Z)return Z.apply(k,a);if(g.yd&&document.documentMode<10){if(!k[N].call)throw Error("IE Clobbering detected");}else if(typeof k[N]!="function")throw Error("Clobbering detected");return k[N].apply(k,a)};
Jxf=function(Z){if(!Z)return"";const k=document.createElement("div").style;GWf(Z).forEach(function(N){const a=g.YK&&N in SmU?N:N.replace(/^-(?:apple|css|epub|khtml|moz|mso?|o|rim|wap|webkit|xv)-(?=[a-z])/i,"");Za(a,"--")||Za(a,"var")||(N=Qd(eNi,Z,Z.getPropertyValue?"getPropertyValue":"getAttribute",[N])||"",N=x3f(N),N!=null&&Qd(o9f,k,k.setProperty?"setProperty":"setAttribute",[a,N]))});
return k.cssText||""};
GWf=function(Z){g.uf(Z)?Z=g.mr(Z):(Z=g.xa(Z),g.qF(Z,"cssText"));return Z};
g.rQ=function(Z){var k;let N=k=0,a=!1;Z=Z.split(zNf);for(let T=0;T<Z.length;T++){const K=Z[T];g.qK.test(K)?(k++,N++):U3i.test(K)?a=!0:bly.test(K)?N++:pFy.test(K)&&(a=!0)}k=N==0?a?1:0:k/N>.4?-1:1;return(k==0?null:k)==-1?"rtl":"ltr"};
g.Aw=function(Z){if(Z instanceof CP||Z instanceof ms||Z instanceof sZ)return Z;if(typeof Z.next=="function")return new CP(()=>Z);
if(typeof Z[Symbol.iterator]=="function")return new CP(()=>Z[Symbol.iterator]());
if(typeof Z.hD=="function")return new CP(()=>Z.hD());
throw Error("Not an iterator or iterable.");};
PG=function(Z,k,N,a,T,K,y,Q){this.V=Z;this.j=k;this.D=N;this.L=a;this.Y=T;this.G=K;this.U=y;this.C=Q};
cG=function(Z,k){if(k==0)return Z.V;if(k==1)return Z.U;let N=Dl(Z.V,Z.D,k),a=Dl(Z.D,Z.Y,k);Z=Dl(Z.Y,Z.U,k);N=Dl(N,a,k);a=Dl(a,Z,k);return Dl(N,a,k)};
HG=function(Z,k){if(k==0)return Z.j;if(k==1)return Z.C;let N=Dl(Z.j,Z.L,k),a=Dl(Z.L,Z.G,k);Z=Dl(Z.G,Z.C,k);N=Dl(N,a,k);a=Dl(a,Z,k);return Dl(N,a,k)};
dQ=function(Z,k){let N=(k-Z.V)/(Z.U-Z.V);if(N<=0)return 0;if(N>=1)return 1;let a=0,T=1,K=0;for(var y=0;y<8;y++){K=cG(Z,N);const Q=(cG(Z,N+1E-6)-K)/1E-6;if(Math.abs(K-k)<1E-6)return N;if(Math.abs(Q)<1E-6)break;else K<k?a=N:T=N,N-=(K-k)/Q}for(y=0;Math.abs(K-k)>1E-6&&y<8;y++)K<k?(a=N,N=(N+T)/2):(T=N,N=(N+a)/2),K=cG(Z,N);return N};
XC=function(Z,k){this.start=Z<k?Z:k;this.end=Z<k?k:Z};
LP=function(Z){return(Z=Z.exec(g.qG()))?Z[1]:""};
Vd=function(Z){return g.Qe(RNf,Z)>=0};
g.FC=function(Z){g.jR.call(this);this.G=1;this.D=[];this.Y=0;this.V=[];this.U={};this.j=!!Z};
MvG=function(Z,k,N){g.Sq(function(){Z.apply(k,N)})};
g.tw=function(Z){this.Ur=Z};
hw=function(Z){this.Ur=Z};
u8=function(Z){this.data=Z};
l8=function(Z){return Z===void 0||Z instanceof u8?Z:new u8(Z)};
fP=function(Z){this.Ur=Z};
g.BG=function(Z){const k=Z.creation;Z=Z.expiration;return!!Z&&Z<g.vy()||!!k&&k>g.vy()};
g.Ds=function(Z){this.Ur=Z};
n9r=function(){};
OZ=function(){};
vG=function(Z){this.V=Z;this.U=null};
i8=function(Z){if(Z.V==null)throw Error("Storage mechanism: Storage unavailable");Z.isAvailable()||Fr(Error("Storage mechanism: Storage unavailable"))};
gQ=function(){let Z=null;try{Z=g.dX.localStorage||null}catch(k){}vG.call(this,Z)};
wQ=function(){let Z=null;try{Z=g.dX.sessionStorage||null}catch(k){}vG.call(this,Z)};
$N=function(Z,k){this.U=Z;this.V=k+"::"};
g.xN=function(Z){const k=new gQ;return k.isAvailable()?Z?new $N(k,Z):k:null};
GS=function(Z,k){this.V=Z;this.U=k};
SK=function(){};
eK=function(){let Z=Error();Z.name="SecurityError";throw Z;};
oP=function(){return{get opener(){return null},get closed(){return!0},get location(){eK()},get document(){eK()},postMessage:function(){},
close:function(){},
focus:function(){}}};
zS=function(Z){var k,N,a=Z.length,T=0;for(k=0;k<a;k++){var K=Z.charCodeAt(k);if((K&64512)===55296&&k+1<a){var y=Z.charCodeAt(k+1);(y&64512)===56320&&(K=65536+(K-55296<<10)+(y-56320),k++)}T+=K<128?1:K<2048?2:K<65536?3:4}var Q=new Jw.Iy(T);for(k=N=0;N<T;k++)K=Z.charCodeAt(k),(K&64512)===55296&&k+1<a&&(y=Z.charCodeAt(k+1),(y&64512)===56320&&(K=65536+(K-55296<<10)+(y-56320),k++)),K<128?Q[N++]=K:(K<2048?Q[N++]=192|K>>>6:(K<65536?Q[N++]=224|K>>>12:(Q[N++]=240|K>>>18,Q[N++]=128|K>>>12&63),Q[N++]=128|K>>>
6&63),Q[N++]=128|K&63);return Q};
UZ=function(Z){for(var k=Z.length;--k>=0;)Z[k]=0};
b8=function(Z,k,N,a,T){this.G8=Z;this.Cq=k;this.Z6=N;this.xE=a;this.Dj=T;this.DD=Z&&Z.length};
pP=function(Z,k){this.k0=Z;this.hH=0;this.An=k};
RP=function(Z,k){Z.Dd[Z.pending++]=k&255;Z.Dd[Z.pending++]=k>>>8&255};
MK=function(Z,k,N){Z.RU>16-N?(Z.RE|=k<<Z.RU&65535,RP(Z,Z.RE),Z.RE=k>>16-Z.RU,Z.RU+=N-16):(Z.RE|=k<<Z.RU&65535,Z.RU+=N)};
nP=function(Z,k,N){MK(Z,N[k*2],N[k*2+1])};
IP=function(Z,k){var N=0;do N|=Z&1,Z>>>=1,N<<=1;while(--k>0);return N>>>1};
jK=function(Z,k,N){var a=Array(16),T=0,K;for(K=1;K<=15;K++)a[K]=T=T+N[K-1]<<1;for(N=0;N<=k;N++)T=Z[N*2+1],T!==0&&(Z[N*2]=IP(a[T]++,T))};
EZ=function(Z){var k;for(k=0;k<286;k++)Z.YJ[k*2]=0;for(k=0;k<30;k++)Z.Nw[k*2]=0;for(k=0;k<19;k++)Z.Ad[k*2]=0;Z.YJ[512]=1;Z.Y1=Z.yd=0;Z.lN=Z.matches=0};
WG=function(Z){Z.RU>8?RP(Z,Z.RE):Z.RU>0&&(Z.Dd[Z.pending++]=Z.RE);Z.RE=0;Z.RU=0};
YN=function(Z,k,N){WG(Z);RP(Z,N);RP(Z,~N);Jw.HT(Z.Dd,Z.window,k,N,Z.pending);Z.pending+=N};
Z2=function(Z,k,N,a){var T=k*2,K=N*2;return Z[T]<Z[K]||Z[T]===Z[K]&&a[k]<=a[N]};
kA=function(Z,k,N){for(var a=Z.EP[N],T=N<<1;T<=Z.bf;){T<Z.bf&&Z2(k,Z.EP[T+1],Z.EP[T],Z.depth)&&T++;if(Z2(k,a,Z.EP[T],Z.depth))break;Z.EP[N]=Z.EP[T];N=T;T<<=1}Z.EP[N]=a};
qd=function(Z,k,N){var a=0;if(Z.lN!==0){do{var T=Z.Dd[Z.Br+a*2]<<8|Z.Dd[Z.Br+a*2+1];var K=Z.Dd[Z.ev+a];a++;if(T===0)nP(Z,K,k);else{var y=Nd[K];nP(Z,y+256+1,k);var Q=aW[y];Q!==0&&(K-=Tp[y],MK(Z,K,Q));T--;y=T<256?K0[T]:K0[256+(T>>>7)];nP(Z,y,N);Q=yx[y];Q!==0&&(T-=Qx[y],MK(Z,T,Q))}}while(a<Z.lN)}nP(Z,256,k)};
rC=function(Z,k){var N=k.k0,a=k.An.G8,T=k.An.DD,K=k.An.xE,y,Q=-1;Z.bf=0;Z.LT=573;for(y=0;y<K;y++)N[y*2]!==0?(Z.EP[++Z.bf]=Q=y,Z.depth[y]=0):N[y*2+1]=0;for(;Z.bf<2;){var q=Z.EP[++Z.bf]=Q<2?++Q:0;N[q*2]=1;Z.depth[q]=0;Z.Y1--;T&&(Z.yd-=a[q*2+1])}k.hH=Q;for(y=Z.bf>>1;y>=1;y--)kA(Z,N,y);q=K;do y=Z.EP[1],Z.EP[1]=Z.EP[Z.bf--],kA(Z,N,1),a=Z.EP[1],Z.EP[--Z.LT]=y,Z.EP[--Z.LT]=a,N[q*2]=N[y*2]+N[a*2],Z.depth[q]=(Z.depth[y]>=Z.depth[a]?Z.depth[y]:Z.depth[a])+1,N[y*2+1]=N[a*2+1]=q,Z.EP[1]=q++,kA(Z,N,1);while(Z.bf>=
2);Z.EP[--Z.LT]=Z.EP[1];y=k.k0;q=k.hH;a=k.An.G8;T=k.An.DD;K=k.An.Cq;var r=k.An.Z6,C=k.An.Dj,m,A=0;for(m=0;m<=15;m++)Z.vv[m]=0;y[Z.EP[Z.LT]*2+1]=0;for(k=Z.LT+1;k<573;k++){var P=Z.EP[k];m=y[y[P*2+1]*2+1]+1;m>C&&(m=C,A++);y[P*2+1]=m;if(!(P>q)){Z.vv[m]++;var d=0;P>=r&&(d=K[P-r]);var h=y[P*2];Z.Y1+=h*(m+d);T&&(Z.yd+=h*(a[P*2+1]+d))}}if(A!==0){do{for(m=C-1;Z.vv[m]===0;)m--;Z.vv[m]--;Z.vv[m+1]+=2;Z.vv[C]--;A-=2}while(A>0);for(m=C;m!==0;m--)for(P=Z.vv[m];P!==0;)a=Z.EP[--k],a>q||(y[a*2+1]!==m&&(Z.Y1+=(m-y[a*
2+1])*y[a*2],y[a*2+1]=m),P--)}jK(N,Q,Z.vv)};
C0=function(Z,k,N){var a,T=-1,K=k[1],y=0,Q=7,q=4;K===0&&(Q=138,q=3);k[(N+1)*2+1]=65535;for(a=0;a<=N;a++){var r=K;K=k[(a+1)*2+1];++y<Q&&r===K||(y<q?Z.Ad[r*2]+=y:r!==0?(r!==T&&Z.Ad[r*2]++,Z.Ad[32]++):y<=10?Z.Ad[34]++:Z.Ad[36]++,y=0,T=r,K===0?(Q=138,q=3):r===K?(Q=6,q=3):(Q=7,q=4))}};
mS=function(Z,k,N){var a,T=-1,K=k[1],y=0,Q=7,q=4;K===0&&(Q=138,q=3);for(a=0;a<=N;a++){var r=K;K=k[(a+1)*2+1];if(!(++y<Q&&r===K)){if(y<q){do nP(Z,r,Z.Ad);while(--y!==0)}else r!==0?(r!==T&&(nP(Z,r,Z.Ad),y--),nP(Z,16,Z.Ad),MK(Z,y-3,2)):y<=10?(nP(Z,17,Z.Ad),MK(Z,y-3,3)):(nP(Z,18,Z.Ad),MK(Z,y-11,7));y=0;T=r;K===0?(Q=138,q=3):r===K?(Q=6,q=3):(Q=7,q=4)}}};
ItR=function(Z){var k=4093624447,N;for(N=0;N<=31;N++,k>>>=1)if(k&1&&Z.YJ[N*2]!==0)return 0;if(Z.YJ[18]!==0||Z.YJ[20]!==0||Z.YJ[26]!==0)return 1;for(N=32;N<256;N++)if(Z.YJ[N*2]!==0)return 1;return 0};
sa=function(Z,k,N){Z.Dd[Z.Br+Z.lN*2]=k>>>8&255;Z.Dd[Z.Br+Z.lN*2+1]=k&255;Z.Dd[Z.ev+Z.lN]=N&255;Z.lN++;k===0?Z.YJ[N*2]++:(Z.matches++,k--,Z.YJ[(Nd[N]+256+1)*2]++,Z.Nw[(k<256?K0[k]:K0[256+(k>>>7)])*2]++);return Z.lN===Z.nY-1};
Pr=function(Z,k){Z.msg=AF[k];return k};
cr=function(Z){for(var k=Z.length;--k>=0;)Z[k]=0};
Hr=function(Z){var k=Z.state,N=k.pending;N>Z.Ti&&(N=Z.Ti);N!==0&&(Jw.HT(Z.output,k.Dd,k.Mi,N,Z.gs),Z.gs+=N,k.Mi+=N,Z.Wu+=N,Z.Ti-=N,k.pending-=N,k.pending===0&&(k.Mi=0))};
Vx=function(Z,k){var N=Z.Y9>=0?Z.Y9:-1,a=Z.Jp-Z.Y9,T=0;if(Z.level>0){Z.KC.Vo===2&&(Z.KC.Vo=ItR(Z));rC(Z,Z.jD);rC(Z,Z.OB);C0(Z,Z.YJ,Z.jD.hH);C0(Z,Z.Nw,Z.OB.hH);rC(Z,Z.vc);for(T=18;T>=3&&Z.Ad[dC[T]*2+1]===0;T--);Z.Y1+=3*(T+1)+5+5+4;var K=Z.Y1+3+7>>>3;var y=Z.yd+3+7>>>3;y<=K&&(K=y)}else K=y=a+5;if(a+4<=K&&N!==-1)MK(Z,k?1:0,3),YN(Z,N,a);else if(Z.strategy===4||y===K)MK(Z,2+(k?1:0),3),qd(Z,XU,L0);else{MK(Z,4+(k?1:0),3);N=Z.jD.hH+1;a=Z.OB.hH+1;T+=1;MK(Z,N-257,5);MK(Z,a-1,5);MK(Z,T-4,4);for(K=0;K<T;K++)MK(Z,
Z.Ad[dC[K]*2+1],3);mS(Z,Z.YJ,N-1);mS(Z,Z.Nw,a-1);qd(Z,Z.YJ,Z.Nw)}EZ(Z);k&&WG(Z);Z.Y9=Z.Jp;Hr(Z.KC)};
FU=function(Z,k){Z.Dd[Z.pending++]=k};
tF=function(Z,k){Z.Dd[Z.pending++]=k>>>8&255;Z.Dd[Z.pending++]=k&255};
hF=function(Z,k){var N=Z.GV,a=Z.Jp,T=Z.Qp,K=Z.mI,y=Z.Jp>Z.d0-262?Z.Jp-(Z.d0-262):0,Q=Z.window,q=Z.Uk,r=Z.rk,C=Z.Jp+258,m=Q[a+T-1],A=Q[a+T];Z.Qp>=Z.Ai&&(N>>=2);K>Z.eY&&(K=Z.eY);do{var P=k;if(Q[P+T]===A&&Q[P+T-1]===m&&Q[P]===Q[a]&&Q[++P]===Q[a+1]){a+=2;for(P++;Q[++a]===Q[++P]&&Q[++a]===Q[++P]&&Q[++a]===Q[++P]&&Q[++a]===Q[++P]&&Q[++a]===Q[++P]&&Q[++a]===Q[++P]&&Q[++a]===Q[++P]&&Q[++a]===Q[++P]&&a<C;);P=258-(C-a);a=C-258;if(P>T){Z.NZ=k;T=P;if(P>=K)break;m=Q[a+T-1];A=Q[a+T]}}}while((k=r[k&q])>y&&--N!==
0);return T<=Z.eY?T:Z.eY};
f0=function(Z){var k=Z.d0,N;do{var a=Z.vH-Z.eY-Z.Jp;if(Z.Jp>=k+(k-262)){Jw.HT(Z.window,Z.window,k,k,0);Z.NZ-=k;Z.Jp-=k;Z.Y9-=k;var T=N=Z.z5;do{var K=Z.head[--T];Z.head[T]=K>=k?K-k:0}while(--N);T=N=k;do K=Z.rk[--T],Z.rk[T]=K>=k?K-k:0;while(--N);a+=k}if(Z.KC.Ho===0)break;T=Z.KC;N=Z.window;K=Z.Jp+Z.eY;var y=T.Ho;y>a&&(y=a);y===0?N=0:(T.Ho-=y,Jw.HT(N,T.input,T.sL,y,K),T.state.wrap===1?T.vG=uB(T.vG,N,y,K):T.state.wrap===2&&(T.vG=lB(T.vG,N,y,K)),T.sL+=y,T.rN+=y,N=y);Z.eY+=N;if(Z.eY+Z.Me>=3)for(a=Z.Jp-Z.Me,
Z.I4=Z.window[a],Z.I4=(Z.I4<<Z.uf^Z.window[a+1])&Z.KA;Z.Me&&!(Z.I4=(Z.I4<<Z.uf^Z.window[a+3-1])&Z.KA,Z.rk[a&Z.Uk]=Z.head[Z.I4],Z.head[Z.I4]=a,a++,Z.Me--,Z.eY+Z.Me<3););}while(Z.eY<262&&Z.KC.Ho!==0)};
Br=function(Z,k){for(var N;;){if(Z.eY<262){f0(Z);if(Z.eY<262&&k===0)return 1;if(Z.eY===0)break}N=0;Z.eY>=3&&(Z.I4=(Z.I4<<Z.uf^Z.window[Z.Jp+3-1])&Z.KA,N=Z.rk[Z.Jp&Z.Uk]=Z.head[Z.I4],Z.head[Z.I4]=Z.Jp);N!==0&&Z.Jp-N<=Z.d0-262&&(Z.De=hF(Z,N));if(Z.De>=3)if(N=sa(Z,Z.Jp-Z.NZ,Z.De-3),Z.eY-=Z.De,Z.De<=Z.dt&&Z.eY>=3){Z.De--;do Z.Jp++,Z.I4=(Z.I4<<Z.uf^Z.window[Z.Jp+3-1])&Z.KA,Z.rk[Z.Jp&Z.Uk]=Z.head[Z.I4],Z.head[Z.I4]=Z.Jp;while(--Z.De!==0);Z.Jp++}else Z.Jp+=Z.De,Z.De=0,Z.I4=Z.window[Z.Jp],Z.I4=(Z.I4<<Z.uf^
Z.window[Z.Jp+1])&Z.KA;else N=sa(Z,0,Z.window[Z.Jp]),Z.eY--,Z.Jp++;if(N&&(Vx(Z,!1),Z.KC.Ti===0))return 1}Z.Me=Z.Jp<2?Z.Jp:2;return k===4?(Vx(Z,!0),Z.KC.Ti===0?3:4):Z.lN&&(Vx(Z,!1),Z.KC.Ti===0)?1:2};
D2=function(Z,k){for(var N,a;;){if(Z.eY<262){f0(Z);if(Z.eY<262&&k===0)return 1;if(Z.eY===0)break}N=0;Z.eY>=3&&(Z.I4=(Z.I4<<Z.uf^Z.window[Z.Jp+3-1])&Z.KA,N=Z.rk[Z.Jp&Z.Uk]=Z.head[Z.I4],Z.head[Z.I4]=Z.Jp);Z.Qp=Z.De;Z.tf=Z.NZ;Z.De=2;N!==0&&Z.Qp<Z.dt&&Z.Jp-N<=Z.d0-262&&(Z.De=hF(Z,N),Z.De<=5&&(Z.strategy===1||Z.De===3&&Z.Jp-Z.NZ>4096)&&(Z.De=2));if(Z.Qp>=3&&Z.De<=Z.Qp){a=Z.Jp+Z.eY-3;N=sa(Z,Z.Jp-1-Z.tf,Z.Qp-3);Z.eY-=Z.Qp-1;Z.Qp-=2;do++Z.Jp<=a&&(Z.I4=(Z.I4<<Z.uf^Z.window[Z.Jp+3-1])&Z.KA,Z.rk[Z.Jp&Z.Uk]=
Z.head[Z.I4],Z.head[Z.I4]=Z.Jp);while(--Z.Qp!==0);Z.c8=0;Z.De=2;Z.Jp++;if(N&&(Vx(Z,!1),Z.KC.Ti===0))return 1}else if(Z.c8){if((N=sa(Z,0,Z.window[Z.Jp-1]))&&Vx(Z,!1),Z.Jp++,Z.eY--,Z.KC.Ti===0)return 1}else Z.c8=1,Z.Jp++,Z.eY--}Z.c8&&(sa(Z,0,Z.window[Z.Jp-1]),Z.c8=0);Z.Me=Z.Jp<2?Z.Jp:2;return k===4?(Vx(Z,!0),Z.KC.Ti===0?3:4):Z.lN&&(Vx(Z,!1),Z.KC.Ti===0)?1:2};
jIf=function(Z,k){for(var N,a,T,K=Z.window;;){if(Z.eY<=258){f0(Z);if(Z.eY<=258&&k===0)return 1;if(Z.eY===0)break}Z.De=0;if(Z.eY>=3&&Z.Jp>0&&(a=Z.Jp-1,N=K[a],N===K[++a]&&N===K[++a]&&N===K[++a])){for(T=Z.Jp+258;N===K[++a]&&N===K[++a]&&N===K[++a]&&N===K[++a]&&N===K[++a]&&N===K[++a]&&N===K[++a]&&N===K[++a]&&a<T;);Z.De=258-(T-a);Z.De>Z.eY&&(Z.De=Z.eY)}Z.De>=3?(N=sa(Z,1,Z.De-3),Z.eY-=Z.De,Z.Jp+=Z.De,Z.De=0):(N=sa(Z,0,Z.window[Z.Jp]),Z.eY--,Z.Jp++);if(N&&(Vx(Z,!1),Z.KC.Ti===0))return 1}Z.Me=0;return k===
4?(Vx(Z,!0),Z.KC.Ti===0?3:4):Z.lN&&(Vx(Z,!1),Z.KC.Ti===0)?1:2};
E9f=function(Z,k){for(var N;;){if(Z.eY===0&&(f0(Z),Z.eY===0)){if(k===0)return 1;break}Z.De=0;N=sa(Z,0,Z.window[Z.Jp]);Z.eY--;Z.Jp++;if(N&&(Vx(Z,!1),Z.KC.Ti===0))return 1}Z.Me=0;return k===4?(Vx(Z,!0),Z.KC.Ti===0?3:4):Z.lN&&(Vx(Z,!1),Z.KC.Ti===0)?1:2};
Oa=function(Z,k,N,a,T){this.xa=Z;this.xD=k;this.tO=N;this.o0=a;this.func=T};
W1y=function(){this.KC=null;this.status=0;this.Dd=null;this.wrap=this.pending=this.Mi=this.vV=0;this.JI=null;this.q7=0;this.method=8;this.uE=-1;this.Uk=this.xv=this.d0=0;this.window=null;this.vH=0;this.head=this.rk=null;this.mI=this.Ai=this.strategy=this.level=this.dt=this.GV=this.Qp=this.eY=this.NZ=this.Jp=this.c8=this.tf=this.De=this.Y9=this.uf=this.KA=this.JK=this.z5=this.I4=0;this.YJ=new Jw.zy(1146);this.Nw=new Jw.zy(122);this.Ad=new Jw.zy(78);cr(this.YJ);cr(this.Nw);cr(this.Ad);this.vc=this.OB=
this.jD=null;this.vv=new Jw.zy(16);this.EP=new Jw.zy(573);cr(this.EP);this.LT=this.bf=0;this.depth=new Jw.zy(573);cr(this.depth);this.RU=this.RE=this.Me=this.matches=this.yd=this.Y1=this.Br=this.lN=this.nY=this.ev=0};
Ymy=function(Z,k){if(!Z||!Z.state||k>5||k<0)return Z?Pr(Z,-2):-2;var N=Z.state;if(!Z.output||!Z.input&&Z.Ho!==0||N.status===666&&k!==4)return Pr(Z,Z.Ti===0?-5:-2);N.KC=Z;var a=N.uE;N.uE=k;if(N.status===42)if(N.wrap===2)Z.vG=0,FU(N,31),FU(N,139),FU(N,8),N.JI?(FU(N,(N.JI.text?1:0)+(N.JI.mG?2:0)+(N.JI.extra?4:0)+(N.JI.name?8:0)+(N.JI.comment?16:0)),FU(N,N.JI.time&255),FU(N,N.JI.time>>8&255),FU(N,N.JI.time>>16&255),FU(N,N.JI.time>>24&255),FU(N,N.level===9?2:N.strategy>=2||N.level<2?4:0),FU(N,N.JI.os&
255),N.JI.extra&&N.JI.extra.length&&(FU(N,N.JI.extra.length&255),FU(N,N.JI.extra.length>>8&255)),N.JI.mG&&(Z.vG=lB(Z.vG,N.Dd,N.pending,0)),N.q7=0,N.status=69):(FU(N,0),FU(N,0),FU(N,0),FU(N,0),FU(N,0),FU(N,N.level===9?2:N.strategy>=2||N.level<2?4:0),FU(N,3),N.status=113);else{var T=8+(N.xv-8<<4)<<8;T|=(N.strategy>=2||N.level<2?0:N.level<6?1:N.level===6?2:3)<<6;N.Jp!==0&&(T|=32);N.status=113;tF(N,T+(31-T%31));N.Jp!==0&&(tF(N,Z.vG>>>16),tF(N,Z.vG&65535));Z.vG=1}if(N.status===69)if(N.JI.extra){for(T=
N.pending;N.q7<(N.JI.extra.length&65535)&&(N.pending!==N.vV||(N.JI.mG&&N.pending>T&&(Z.vG=lB(Z.vG,N.Dd,N.pending-T,T)),Hr(Z),T=N.pending,N.pending!==N.vV));)FU(N,N.JI.extra[N.q7]&255),N.q7++;N.JI.mG&&N.pending>T&&(Z.vG=lB(Z.vG,N.Dd,N.pending-T,T));N.q7===N.JI.extra.length&&(N.q7=0,N.status=73)}else N.status=73;if(N.status===73)if(N.JI.name){T=N.pending;do{if(N.pending===N.vV&&(N.JI.mG&&N.pending>T&&(Z.vG=lB(Z.vG,N.Dd,N.pending-T,T)),Hr(Z),T=N.pending,N.pending===N.vV)){var K=1;break}K=N.q7<N.JI.name.length?
N.JI.name.charCodeAt(N.q7++)&255:0;FU(N,K)}while(K!==0);N.JI.mG&&N.pending>T&&(Z.vG=lB(Z.vG,N.Dd,N.pending-T,T));K===0&&(N.q7=0,N.status=91)}else N.status=91;if(N.status===91)if(N.JI.comment){T=N.pending;do{if(N.pending===N.vV&&(N.JI.mG&&N.pending>T&&(Z.vG=lB(Z.vG,N.Dd,N.pending-T,T)),Hr(Z),T=N.pending,N.pending===N.vV)){K=1;break}K=N.q7<N.JI.comment.length?N.JI.comment.charCodeAt(N.q7++)&255:0;FU(N,K)}while(K!==0);N.JI.mG&&N.pending>T&&(Z.vG=lB(Z.vG,N.Dd,N.pending-T,T));K===0&&(N.status=103)}else N.status=
103;N.status===103&&(N.JI.mG?(N.pending+2>N.vV&&Hr(Z),N.pending+2<=N.vV&&(FU(N,Z.vG&255),FU(N,Z.vG>>8&255),Z.vG=0,N.status=113)):N.status=113);if(N.pending!==0){if(Hr(Z),Z.Ti===0)return N.uE=-1,0}else if(Z.Ho===0&&(k<<1)-(k>4?9:0)<=(a<<1)-(a>4?9:0)&&k!==4)return Pr(Z,-5);if(N.status===666&&Z.Ho!==0)return Pr(Z,-5);if(Z.Ho!==0||N.eY!==0||k!==0&&N.status!==666){a=N.strategy===2?E9f(N,k):N.strategy===3?jIf(N,k):vr[N.level].func(N,k);if(a===3||a===4)N.status=666;if(a===1||a===3)return Z.Ti===0&&(N.uE=
-1),0;if(a===2&&(k===1?(MK(N,2,3),nP(N,256,XU),N.RU===16?(RP(N,N.RE),N.RE=0,N.RU=0):N.RU>=8&&(N.Dd[N.pending++]=N.RE&255,N.RE>>=8,N.RU-=8)):k!==5&&(MK(N,0,3),YN(N,0,0),k===3&&(cr(N.head),N.eY===0&&(N.Jp=0,N.Y9=0,N.Me=0))),Hr(Z),Z.Ti===0))return N.uE=-1,0}if(k!==4)return 0;if(N.wrap<=0)return 1;N.wrap===2?(FU(N,Z.vG&255),FU(N,Z.vG>>8&255),FU(N,Z.vG>>16&255),FU(N,Z.vG>>24&255),FU(N,Z.rN&255),FU(N,Z.rN>>8&255),FU(N,Z.rN>>16&255),FU(N,Z.rN>>24&255)):(tF(N,Z.vG>>>16),tF(N,Z.vG&65535));Hr(Z);N.wrap>0&&
(N.wrap=-N.wrap);return N.pending!==0?0:1};
iB=function(Z){if(!(this instanceof iB))return new iB(Z);Z=this.options=Jw.assign({level:-1,method:8,chunkSize:16384,D9:15,Si:8,strategy:0,to:""},Z||{});Z.raw&&Z.D9>0?Z.D9=-Z.D9:Z.Dy&&Z.D9>0&&Z.D9<16&&(Z.D9+=16);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.KC=new gC;this.KC.Ti=0;var k=this.KC;var N=Z.level,a=Z.method,T=Z.D9,K=Z.Si,y=Z.strategy;if(k){var Q=1;N===-1&&(N=6);T<0?(Q=0,T=-T):T>15&&(Q=2,T-=16);if(K<1||K>9||a!==8||T<8||T>15||N<0||N>9||y<0||y>4)k=Pr(k,-2);else{T===8&&(T=9);var q=
new W1y;k.state=q;q.KC=k;q.wrap=Q;q.JI=null;q.xv=T;q.d0=1<<q.xv;q.Uk=q.d0-1;q.JK=K+7;q.z5=1<<q.JK;q.KA=q.z5-1;q.uf=~~((q.JK+3-1)/3);q.window=new Jw.Iy(q.d0*2);q.head=new Jw.zy(q.z5);q.rk=new Jw.zy(q.d0);q.nY=1<<K+6;q.vV=q.nY*4;q.Dd=new Jw.Iy(q.vV);q.Br=1*q.nY;q.ev=3*q.nY;q.level=N;q.strategy=y;q.method=a;if(k&&k.state){k.rN=k.Wu=0;k.Vo=2;N=k.state;N.pending=0;N.Mi=0;N.wrap<0&&(N.wrap=-N.wrap);N.status=N.wrap?42:113;k.vG=N.wrap===2?0:1;N.uE=0;if(!wC){a=Array(16);for(K=y=0;K<28;K++)for(Tp[K]=y,T=0;T<
1<<aW[K];T++)Nd[y++]=K;Nd[y-1]=K;for(K=y=0;K<16;K++)for(Qx[K]=y,T=0;T<1<<yx[K];T++)K0[y++]=K;for(y>>=7;K<30;K++)for(Qx[K]=y<<7,T=0;T<1<<yx[K]-7;T++)K0[256+y++]=K;for(T=0;T<=15;T++)a[T]=0;for(T=0;T<=143;)XU[T*2+1]=8,T++,a[8]++;for(;T<=255;)XU[T*2+1]=9,T++,a[9]++;for(;T<=279;)XU[T*2+1]=7,T++,a[7]++;for(;T<=287;)XU[T*2+1]=8,T++,a[8]++;jK(XU,287,a);for(T=0;T<30;T++)L0[T*2+1]=5,L0[T*2]=IP(T,5);$A=new b8(XU,aW,257,286,15);xA=new b8(L0,yx,0,30,15);Gp=new b8([],ZCr,0,19,7);wC=!0}N.jD=new pP(N.YJ,$A);N.OB=
new pP(N.Nw,xA);N.vc=new pP(N.Ad,Gp);N.RE=0;N.RU=0;EZ(N);N=0}else N=Pr(k,-2);N===0&&(k=k.state,k.vH=2*k.d0,cr(k.head),k.dt=vr[k.level].xD,k.Ai=vr[k.level].xa,k.mI=vr[k.level].tO,k.GV=vr[k.level].o0,k.Jp=0,k.Y9=0,k.eY=0,k.Me=0,k.De=k.Qp=2,k.c8=0,k.I4=0);k=N}}else k=-2;if(k!==0)throw Error(AF[k]);Z.header&&(k=this.KC)&&k.state&&k.state.wrap===2&&(k.state.JI=Z.header);if(Z.RN){var r;typeof Z.RN==="string"?r=zS(Z.RN):SO.call(Z.RN)==="[object ArrayBuffer]"?r=new Uint8Array(Z.RN):r=Z.RN;Z=this.KC;K=r;y=
K.length;if(Z&&Z.state)if(r=Z.state,k=r.wrap,k===2||k===1&&r.status!==42||r.eY)k=-2;else{k===1&&(Z.vG=uB(Z.vG,K,y,0));r.wrap=0;y>=r.d0&&(k===0&&(cr(r.head),r.Jp=0,r.Y9=0,r.Me=0),N=new Jw.Iy(r.d0),Jw.HT(N,K,y-r.d0,r.d0,0),K=N,y=r.d0);N=Z.Ho;a=Z.sL;T=Z.input;Z.Ho=y;Z.sL=0;Z.input=K;for(f0(r);r.eY>=3;){K=r.Jp;y=r.eY-2;do r.I4=(r.I4<<r.uf^r.window[K+3-1])&r.KA,r.rk[K&r.Uk]=r.head[r.I4],r.head[r.I4]=K,K++;while(--y);r.Jp=K;r.eY=2;f0(r)}r.Jp+=r.eY;r.Y9=r.Jp;r.Me=r.eY;r.eY=0;r.De=r.Qp=2;r.c8=0;Z.sL=a;Z.input=
T;Z.Ho=N;r.wrap=k;k=0}else k=-2;if(k!==0)throw Error(AF[k]);this.AWS=!0}};
eO=function(Z){var k=k||{};k.Dy=!0;k=new iB(k);k.push(Z,!0);if(k.err)throw k.msg||AF[k.err];return k.result};
oW=function(...Z){return Z.length===0?k=>k:Z.length===1?Z[0]:Z.reduce((k,N)=>(...a)=>k(N(...a)))};
kXy=function(){var Z=[];return k=>(N,a)=>{N=k(N,a);let T=()=>{throw Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.");};
const K={getState:N.getState,dispatch:(y,...Q)=>T(y,...Q)};
a=Z.map(y=>y(K));
T=oW(...a)(N.dispatch);return{...N,dispatch:T}}};
NUN=function(Z){Object.keys(Z).forEach(k=>{const N=Z[k];if(typeof N(void 0,{type:JF})==="undefined")throw Error(`The slice reducer for key "${k}" returned undefined during initialization. `+"If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.");if(typeof N(void 0,{type:`@@redux/PROBE_UNKNOWN_ACTION${zp()}`})==="undefined")throw Error(`The slice reducer for key "${k}" returned undefined when probed with a random type. Don't try to handle '${JF}' or other actions in "redux/*" `+
"namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.");})};
Ua=function(Z,k,N){function a(){if(C)throw Error("You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return Q}
function T(A){if(typeof A!=="function")throw Error(`Expected the listener to be a function. Instead, received: '${typeof A}'`);if(C)throw Error("You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let P=!0;r===q&&(r=q.slice());r.push(A);return function(){if(P){if(C)throw Error("You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");
P=!1;r===q&&(r=q.slice());r.splice(r.indexOf(A),1);q=null}}}
function K(A){if(typeof A!=="object"||A===null)var P=!1;else{for(P=A;Object.getPrototypeOf(P)!==null;)P=Object.getPrototypeOf(P);P=Object.getPrototypeOf(A)===P}if(!P)throw Error(`Actions must be plain objects. Instead, the actual type was: '${typeof A}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);
if(typeof A.type==="undefined")throw Error('Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(C)throw Error("Reducers may not dispatch actions.");try{C=!0,Q=y(Q,A)}finally{C=!1}P=q=r;for(let d=0;d<P.length;d++)(0,P[d])();return A}
if(typeof k==="function"&&typeof N==="function"||typeof N==="function"&&typeof arguments[3]==="function")throw Error("It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");typeof k==="function"&&typeof N==="undefined"&&(N=k,k=void 0);if(typeof N!=="undefined"){if(typeof N!=="function")throw Error(`Expected the enhancer to be a function. Instead, received: '${typeof N}'`);
return N(Ua)(Z,k)}if(typeof Z!=="function")throw Error(`Expected the root reducer to be a function. Instead, received: '${typeof Z}'`);let y=Z,Q=k,q=[],r=q,C=!1;K({type:JF});const m={dispatch:K,subscribe:T,getState:a,replaceReducer:function(A){if(typeof A!=="function")throw Error(`Expected the nextReducer to be a function. Instead, received: '${typeof A}`);y=A;K({type:aqb});return m},
[bB]:function(){return{subscribe(A){function P(){A.next&&A.next(a())}
if(typeof A!=="object"||A===null)throw new TypeError(`Expected the observer to be an object. Instead, received: '${typeof A}'`);P();return{unsubscribe:T(P)}},[bB](){return this}}}};
return m};
p0=function(Z){return Z?(Z=Z.privateDoNotAccessOrElseSafeScriptWrappedValue)?n5(Z):null:null};
RW=function(Z){return Z?(Z=Z.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue)?Da(Z):null:null};
n0=function(Z){Z=Md(Z);return UD(Z)};
g.IW=function(Z){Z=Md(Z);return Da(Z)};
Md=function(Z){return Z===null?"null":Z===void 0?"undefined":Z};
jO=function(){return g.Vf("yt.ads.biscotti.lastId_")||""};
Ea=function(Z){g.X0("yt.ads.biscotti.lastId_",Z)};
YA=function(...Z){Z=arguments;var k=Wr;Z.length>1?k[Z[0]]=Z[1]:Z.length===1&&Object.assign(k,Z[0])};
g.G=function(Z,k){return Z in Wr?Wr[Z]:k};
ZA=function(Z){const k=Wr.EXPERIMENT_FLAGS;return k?k[Z]:void 0};
TUN=function(Z){k6.forEach(k=>k(Z))};
g.ai=function(Z){return Z&&window.yterr?function(){try{return Z.apply(this,arguments)}catch(k){g.N2(k)}}:Z};
g.N2=function(Z){var k=g.Vf("yt.logging.errors.log");k?k(Z,"ERROR",void 0,void 0,void 0,void 0,void 0):(k=g.G("ERRORS",[]),k.push([Z,"ERROR",void 0,void 0,void 0,void 0,void 0]),YA("ERRORS",k));TUN(Z)};
T_=function(Z,k,N,a,T){var K=g.Vf("yt.logging.errors.log");K?K(Z,"WARNING",k,N,a,void 0,T):(K=g.G("ERRORS",[]),K.push([Z,"WARNING",k,N,a,void 0,T]),YA("ERRORS",K))};
yS=function(Z,k){k=Z.split(k);const N={};for(let K=0,y=k.length;K<y;K++){const Q=k[K].split("=");if(Q.length===1&&Q[0]||Q.length===2)try{const q=Kb(Q[0]||""),r=Kb(Q[1]||"");if(q in N){const C=N[q];Array.isArray(C)?g.Ac(C,r):N[q]=[C,r]}else N[q]=r}catch(q){var a=q,T=Q[0];const r=String(yS);a.args=[{key:T,value:Q[1],query:Z,method:Kbr===r?"unchanged":r}];yJG.hasOwnProperty(T)||T_(a)}}return N};
QS=function(Z){const k=[];g.BB(Z,(N,a)=>{const T=g.Kg(a);g.pi(Array.isArray(N)?N:[N],K=>{K==""?k.push(T):k.push(`${T}=${g.Kg(K)}`)})});
return k.join("&")};
q2=function(Z){Z.charAt(0)==="?"&&(Z=Z.substring(1));return yS(Z,"&")};
ru=function(Z){return Z.split(",").map(k=>q2(k))};
g.mm=function(Z){return Z.indexOf("?")!==-1?(Z=(Z||"").split("#")[0],Z=Z.split("?",2),q2(Z.length>1?Z[1]:Z[0])):{}};
AP=function(Z,k){return sb(Z,k||{},!0)};
P8=function(Z,k){return sb(Z,k||{},!1)};
sb=function(Z,k,N){var a=Z.split("#",2);Z=a[0];a=a.length>1?"#"+a[1]:"";var T=Z.split("?",2);Z=T[0];T=q2(T[1]||"");for(const K in k)if(N||!g.Ge(T,K))T[K]=k[K];return g.mW(Z,T)+a};
c8=function(Z){if(!k)var k=window.location.href;const N=g.YS(Z)[1]||null,a=g.kX(Z);N&&a?(Z=g.YS(Z),k=g.YS(k),Z=Z[3]==k[3]&&Z[1]==k[1]&&Z[4]==k[4]):Z=a?g.kX(k)===a&&(Number(g.YS(k)[4]||null)||null)===(Number(g.YS(Z)[4]||null)||null):!0;return Z};
H8=function(Z){Z||(Z=document.location.href);Z=g.YS(Z)[1]||null;return Z!==null&&Z==="https"};
XS=function(Z){Z=du(Z);return Z===null?!1:Z[0]==="com"&&Z[1].match(/^youtube(?:kids|-nocookie)?$/)?!0:!1};
Lb=function(Z){Z=du(Z);return Z===null?!1:Z[1]==="google"?!0:Z[2]==="google"?Z[0]==="au"&&Z[1]==="com"?!0:Z[0]==="uk"&&Z[1]==="co"?!0:!1:!1};
du=function(Z){Z=g.kX(Z);return Z!==null?Z.split(".").reverse():null};
Kb=function(Z){return Z&&Z.match(QqU)?Z:y2(Z)};
VS=function(Z){a:{let N;try{N=Z.V.top.location.href}catch(a){Z=2;break a}Z=N?N===Z.U.location.href?0:1:2}Z={dt:qeR,flash:"0",frm:Z};try{Z.u_tz=-(new Date).getTimezoneOffset();try{var k=HK.history.length}catch(N){k=0}Z.u_his=k;Z.u_h=HK.screen?.height;Z.u_w=HK.screen?.width;Z.u_ah=HK.screen?.availHeight;Z.u_aw=HK.screen?.availWidth;Z.u_cd=HK.screen?.colorDepth}catch(N){}return Z};
tP=function(Z=jO()){var k=FS,N=Object,a=N.assign,T=VS(k);var K=k.V;let y,Q,q,r,C,m,A;try{var P=K.screenX;var d=K.screenY}catch(B){}try{var h=K.outerWidth;y=K.outerHeight}catch(B){}try{Q=K.innerWidth,q=K.innerHeight}catch(B){}try{r=K.screenLeft,C=K.screenTop}catch(B){}try{Q=K.innerWidth,q=K.innerHeight}catch(B){}try{m=K.screen.availWidth,A=K.screen.availTop}catch(B){}K=[r,C,P,d,m,A,h,y,Q,q];P=DM(!1,k.V.top);d=new rJf;"SVGElement"in g.dX&&"createElementNS"in g.dX.document&&d.set(0);h=CTr();h["allow-top-navigation-by-user-activation"]&&
d.set(1);h["allow-popups-to-escape-sandbox"]&&d.set(2);g.dX.crypto&&g.dX.crypto.subtle&&d.set(3);"TextDecoder"in g.dX&&"TextEncoder"in g.dX&&d.set(4);d=g9y(d);k=a.call(N,T,{bc:d,bih:P.height,biw:P.width,brdim:K.join(),vis:Y1(k.U),wgl:!!HK.WebGLRenderingContext});k.ca_type="image";Z&&(k.bid=Z);return k};
CWy=function(){if(!hP)return null;const Z=hP();return"open"in Z?Z:null};
g.li=function(Z){switch(ui(Z)){case 200:case 201:case 202:case 203:case 204:case 205:case 206:case 304:return!0;default:return!1}};
ui=function(Z){return Z&&"status"in Z?Z.status:-1};
g.fb=function(Z,k){typeof Z==="function"&&(Z=g.ai(Z));return window.setTimeout(Z,k)};
g.B8=function(Z,k){typeof Z==="function"&&(Z=g.ai(Z));return window.setInterval(Z,k)};
g.DA=function(Z){window.clearTimeout(Z)};
g.Ob=function(Z){window.clearInterval(Z)};
g.ii=function(Z){Z=v8(Z);return typeof Z==="string"&&Z==="false"?!1:!!Z};
gu=function(Z,k){Z=v8(Z);return Z===void 0&&k!==void 0?k:Number(Z||0)};
wu=function(){return g.G("EXPERIMENTS_TOKEN","")};
v8=function(Z){return g.G("EXPERIMENT_FLAGS",{})[Z]};
$6=function(){const Z=[],k=g.G("EXPERIMENTS_FORCED_FLAGS",{});for(var N of Object.keys(k))Z.push({key:N,value:String(k[N])});N=g.G("EXPERIMENT_FLAGS",{});for(const a of Object.keys(N))a.startsWith("force_")&&k[a]===void 0&&Z.push({key:a,value:String(N[a])});return Z};
x6=function(Z,k,N="GET",a="",T,K,y,Q=!1,q){const r=CWy();if(!r)return null;const C=()=>{(r&&"readyState"in r?r.readyState:0)===4&&k&&g.ai(k)(r)};
"onloadend"in r?r.addEventListener("loadend",C,!1):r.onreadystatechange=C;g.ii("debug_forward_web_query_parameters")&&(Z=mmN(Z));r.open(N,Z,!0);K&&(r.responseType=K);y&&(r.withCredentials=!0);N=N==="POST"&&(window.FormData===void 0||!(a instanceof FormData));if(T=sqN(Z,T))for(const m in T)r.setRequestHeader(m,T[m]),"content-type"===m.toLowerCase()&&(N=!1);N&&r.setRequestHeader("Content-Type","application/x-www-form-urlencoded");q&&"onprogress"in r&&(r.onprogress=()=>{q(r.responseText)});
if(Q&&"setAttributionReporting"in XMLHttpRequest.prototype){Z={eventSourceEligible:!0,triggerEligible:!1};try{r.setAttributionReporting(Z)}catch(m){T_(m)}}r.send(a);return r};
sqN=function(Z,k={}){const N=c8(Z),a=g.G("INNERTUBE_CLIENT_NAME"),T=g.ii("web_ajax_ignore_global_headers_if_set");for(const Q in G_){let q=g.G(G_[Q]);const r=Q==="X-Goog-AuthUser"||Q==="X-Goog-PageId";Q!=="X-Goog-Visitor-Id"||q||(q=g.G("VISITOR_DATA"));var K;if(!(K=!q)){if(!(K=N||(g.kX(Z)?!1:!0))){K=Z;var y;if(y=g.ii("add_auth_headers_to_remarketing_google_dot_com_ping")&&Q==="Authorization"&&(a==="TVHTML5"||a==="TVHTML5_UNPLUGGED"||a==="TVHTML5_SIMPLY")&&Lb(K))K=N1(K)||"",K=K.split("/"),K="/"+(K.length>
1?K[1]:""),y=K==="/pagead";K=y?!0:!1}K=!K}K||T&&k[Q]!==void 0||a==="TVHTML5_UNPLUGGED"&&r||(k[Q]=q)}"X-Goog-EOM-Visitor-Id"in k&&"X-Goog-Visitor-Id"in k&&delete k["X-Goog-Visitor-Id"];if(N||!g.kX(Z))k["X-YouTube-Utc-Offset"]=String(-(new Date).getTimezoneOffset());if(N||!g.kX(Z)){let Q;try{Q=(new Intl.DateTimeFormat).resolvedOptions().timeZone}catch{}Q&&(k["X-YouTube-Time-Zone"]=Q)}document.location.hostname.endsWith("youtubeeducation.com")||!N&&g.kX(Z)||(k["X-YouTube-Ad-Signals"]=QS(tP()));return k};
eD=function(Z,k){k.method="POST";k.postParams||(k.postParams={});return g.SD(Z,k)};
AJy=function(Z,k){if(window.fetch&&k.format!=="XML"){var N={method:k.method||"GET",credentials:"same-origin"};k.headers&&(N.headers=k.headers);k.priority&&(N.priority=k.priority);Z=oi(Z,k);var a=JP(Z,k);a&&(N.body=a);k.withCredentials&&(N.credentials="include");var T=k.context||g.dX,K=!1,y;fetch(Z,N).then(Q=>{if(!K){K=!0;y&&g.DA(y);var q=Q.ok,r=C=>{C=C||{};q?k.onSuccess&&k.onSuccess.call(T,C,Q):k.onError&&k.onError.call(T,C,Q);k.onFinish&&k.onFinish.call(T,C,Q)};
(k.format||"JSON")==="JSON"&&(q||Q.status>=400&&Q.status<500)?Q.json().then(r,()=>{r(null)}):r(null)}}).catch(()=>{k.onError&&k.onError.call(T,{},{})});
Z=k.timeout||0;k.onFetchTimeout&&Z>0&&(y=g.fb(()=>{K||(K=!0,g.DA(y),k.onFetchTimeout.call(k.context||g.dX))},Z))}else g.SD(Z,k)};
g.SD=function(Z,k){const N=k.format||"JSON";Z=oi(Z,k);var a=JP(Z,k);let T=!1,K;const y=PWj(Z,Q=>{if(!T){T=!0;K&&g.DA(K);var q=g.li(Q),r=null,C=400<=Q.status&&Q.status<500,m=500<=Q.status&&Q.status<600;if(q||C||m)r=cJy(Z,N,Q,k.convertToSafeHtml);q&&(q=HCb(N,Q,r));r=r||{};C=k.context||g.dX;q?k.onSuccess&&k.onSuccess.call(C,Q,r):k.onError&&k.onError.call(C,Q,r);k.onFinish&&k.onFinish.call(C,Q,r)}},k.method,a,k.headers,k.responseType,k.withCredentials,!1,k.onProgress);
a=k.timeout||0;if(k.onTimeout&&a>0){const Q=k.onTimeout;K=g.fb(()=>{T||(T=!0,y.abort(),g.DA(K),Q.call(k.context||g.dX,y))},a)}return y};
oi=function(Z,k){k.includeDomain&&(Z=document.location.protocol+"//"+document.location.hostname+(document.location.port?":"+document.location.port:"")+Z);const N=g.G("XSRF_FIELD_NAME");if(k=k.urlParams)k[N]&&delete k[N],Z=AP(Z,k);return Z};
JP=function(Z,k){const N=g.G("XSRF_FIELD_NAME"),a=g.G("XSRF_TOKEN");var T=k.postBody||"",K=k.postParams;const y=g.G("XSRF_FIELD_NAME");let Q;k.headers&&(Q=k.headers["Content-Type"]);k.excludeXsrf||g.kX(Z)&&!k.withCredentials&&g.kX(Z)!==document.location.hostname||k.method!=="POST"||Q&&Q!=="application/x-www-form-urlencoded"||k.postParams&&k.postParams[y]||(K||(K={}),K[N]=a);(g.ii("ajax_parse_query_data_only_when_filled")&&K&&Object.keys(K).length>0||K)&&typeof T==="string"&&(T=q2(T),g.In(T,K),T=k.postBodyFormat&&
k.postBodyFormat==="JSON"?JSON.stringify(T):g.CM(T));K=T||K&&!g.ze(K);!z_&&K&&k.method!=="POST"&&(z_=!0,g.N2(Error("AJAX request with postData should use POST")));return T};
cJy=function(Z,k,N,a){let T=null;switch(k){case "JSON":let K;try{K=N.responseText}catch(y){throw a=Error("Error reading responseText"),a.params=Z,T_(a),y;}Z=N.getResponseHeader("Content-Type")||"";if(K&&Z.indexOf("json")>=0){K.substring(0,5)===")]}'\n"&&(K=K.substring(5));try{T=JSON.parse(K)}catch(y){}}break;case "XML":if(Z=(Z=N.responseXML)?dm0(Z):null)T={},g.pi(Z.getElementsByTagName("*"),y=>{T[y.tagName]=XRG(y)})}a&&Ub(T);
return T};
Ub=function(Z){if(g.lf(Z))for(const k in Z)k==="html_content"||NG(k,"_html")?Z[k]=UD(Z[k]):Ub(Z[k])};
HCb=function(Z,k,N){if(k&&k.status===204)return!0;switch(Z){case "JSON":return!!N;case "XML":return Number(N&&N.return_code)===0;case "RAW":return!0;default:return!!N}};
dm0=function(Z){return Z?(Z=("responseXML"in Z?Z.responseXML:Z).getElementsByTagName("root"))&&Z.length>0?Z[0]:null:null};
XRG=function(Z){let k="";g.pi(Z.childNodes,N=>{k+=N.nodeValue});
return k};
mmN=function(Z){var k=window.location.search,N=g.kX(Z);g.ii("debug_handle_relative_url_for_query_forward_killswitch")||!N&&c8(Z)&&(N=document.location.hostname);var a=N1(Z);a=(N=N&&(N.endsWith("youtube.com")||N.endsWith("youtube-nocookie.com")))&&a&&a.startsWith("/api/");if(!N||a)return Z;const T=q2(k),K={};g.pi(Lbr,y=>{T[y]&&(K[y]=T[y])});
return P8(Z,K)};
pb=function(Z,k){const N=g.Rn(k);let a;return(new g.v2((T,K)=>{N.onSuccess=y=>{g.li(y)?T(new Vaf(y)):K(new bi(`Request failed, status=${ui(y)}`,"net.badstatus",y))};
N.onError=y=>{K(new bi("Unknown request error","net.unknown",y))};
N.onTimeout=y=>{K(new bi("Request timed out","net.timeout",y))};
a=g.SD(Z,N)})).eK(T=>{T instanceof Mz&&a?.abort();
return xE(T)})};
g.Ri=function(Z,k,N,a,T=-1,K){const y=q=>new g.v2(r=>{setTimeout(r,q)}),Q=(q,r,C)=>q.eK(m=>{if(r<=0||ui(m.xhr)===403)return xE(new bi("Request retried too many times","net.retryexhausted",m.xhr));
const A=Math.pow(2,N-r+1)*C,P=T>0?Math.min(T,A):A;return y(C).then(()=>{K&&K(m,r-1);return Q(pb(Z,k),r-1,P)})});
return Q(pb(Z,k),N-1,a)};
Fbf=function(Z,k=null){Z.D=2;Z.U=k};
tay=function(Z,k=null){Z.D=1;Z.U=k};
nb=function(Z=null){const k=new M2;Fbf(k,Z);return k};
W8=function(Z,k,N,a,T){var K=k^Z;Z+8>>4||N[c[3]]==0||(a=(a%N[c[3]]+N[c[3]])%N[c[3]],N[c[41]](0,1,N[c[41]](a,1,N[0])[0]));if((Z&122)==Z){if(!(Ii(N[c[1]])||N[c[1]][c[K^7528]](c[K^7518])||N[c[1]][c[K^7528]](c[K^7510])||N[c[1]][c[K^7528]](c[K^7480])))throw new g.jD(c[K^7502],N[c[1]]);var y=g.n7(N[c[1]]);N[c[K^7521]]=y[c[K^7475]];N[c[K^7544]]=y[c[6]]+(y[c[K^7544]]!=null?`:${y[c[K^7544]]}`:c[K^7551]);var Q=y[c[1]];Q[c[K^7528]](c[K^7533])?(N[c[K^7549]]=c[K^7533],Q=Q[c[K^7522]](K^7546)):Q[c[K^7528]](c[K^
7514])?(N[c[K^7549]]=c[K^7514],Q=Q[c[K^7522]](K^7545)):Q[c[K^7528]](c[K^7474])?(Q=UQ(K^7508,K^6219,Q,N),Q=Q[0]):(N[c[K^7549]]=Q,Q=c[K^7551]);var q=N[c[6]];N[c[6]]=Eb(K^7521,K^1857,Q);Object[c[K^7507]](N[c[6]],W$(2,K^7550,y[c[K^7531]][c[5]]()));Object[c[K^7507]](N[c[6]],q);N[c[6]][c[K^7545]]===c[K^7473]&&(delete N[c[6]][c[K^7545]],N[c[K^7549]]+=c[4]);N[c[1]]=c[K^7551];N[c[K^7503]]=c[K^7551];N[c[K^7531]]&&(y=rP(5,K^700,N));var r=[]}(Z-4^27)<Z&&(Z-4|44)>=Z&&(a===c[K^8426]&&((y=T[c[K^8334]](c[K^8356]))>=
0?(a=`cmo=${T[c[K^8381]](0,y)}`,T=T[c[K^8381]](y+1)):(y=T[c[K^8334]](c[K^8427]))>=0&&(a=`cmo=${T[c[K^8381]](0,y)}`,T=T[c[K^8381]](y+3))),N[a]=T);return r};
Y6=function(Z=null){const k=new M2;tay(k,Z);return k};
g.NS=function(Z,k,N,a="youtube.com",T=!1){Zm||kq.set(""+Z,k,{X9:N,path:"/",domain:a,secure:T})};
g.a6=function(Z,k){if(!Zm)return kq.get(""+Z,k)};
g.T4=function(Z,k="/",N="youtube.com"){Zm||kq.remove(""+Z,k,N)};
KE=function(){if(!kq.isEnabled())return!1;if(!kq.isEmpty())return!0;kq.set("TESTCOOKIESENABLED","1",{X9:60});if(kq.get("TESTCOOKIESENABLED")!=="1")return!1;kq.remove("TESTCOOKIESENABLED");return!0};
g.J=function(Z,k){if(Z)return Z[k.name]};
yL=function(Z){const k=g.G("INNERTUBE_HOST_OVERRIDE");k&&(Z=String(k)+String(T2(Z)));return Z};
QL=function(Z){const k={};g.ii("json_condensed_response")&&(k.prettyPrint="false");return Z=P8(Z,k)};
qS=function(Z,k="POST"){Z={method:k,mode:c8(Z)?"same-origin":"cors",credentials:c8(Z)?"same-origin":"include"};k={};const N={};for(const a of Object.keys(k))k[a]&&(N[a]=k[a]);Object.keys(N).length>0&&(Z.headers=N);return Z};
r$=function(Z,k={}){return`${"service"}:${Z}/${Object.keys(k).sort().map(N=>N+":"+k[N]).join("/")}`};
CE=function(){const Z=/Chrome\/(\d+)/.exec(g.qG());return Z?parseFloat(Z[1]):NaN};
mp=function(){var Z=/\sCobalt\/(\S+)\s/.exec(g.qG());if(!Z)return NaN;const k=[];for(const N of Z[1].split("."))Z=parseInt(N,10),Z>=0&&k.push(Z);return parseFloat(k.join("."))};
Pe=function(){return g.A5("android")&&g.A5("chrome")&&!(g.A5("trident/")||g.A5("edge/"))&&!g.A5("cobalt")};
g.ce=function(){return g.A5("cobalt")};
He=function(){return g.A5("cobalt")&&g.A5("appletv")};
d$=function(){return g.A5("(ps3; leanback shell)")||g.A5("ps3")&&g.ce()};
hzf=function(){return g.A5("(ps4; leanback shell)")||g.A5("ps4")&&g.ce()};
g.uly=function(){return g.ce()&&(g.A5("ps4 vr")||g.A5("ps4 pro vr"))};
Xn=function(){const Z=/WebKit\/([0-9]+)/.exec(g.qG());return!!(Z&&parseInt(Z[1],10)>=600)};
LE=function(){const Z=/WebKit\/([0-9]+)/.exec(g.qG());return!!(Z&&parseInt(Z[1],10)>=602)};
lqi=function(){return g.A5("iemobile")||g.A5("windows phone")&&g.A5("edge")};
t5=function(){return(VL||Fn)&&g.A5("applewebkit")&&!g.A5("version")&&(!g.A5("safari")||g.A5("gsa/"))};
uR=function(){return g.h5&&g.A5("version/")};
lR=function(){return g.A5("smart-tv")&&g.A5("samsung")};
g.A5=function(Z){const k=g.qG();return k?k.toLowerCase().indexOf(Z)>=0:!1};
fE=function(){return $w()||t5()||uR()?!0:g.G("EOM_VISITOR_DATA")?!1:!0};
Be=function(Z,k){return k===void 0||k===null?Z:k==="1"||k===!0||k===1||k==="True"?!0:!1};
Dm=function(Z,k,N){for(const a in N)if(N[a]==k)return N[a];return Z};
Ov=function(Z,k){return k===void 0||k===null?Z:Number(k)};
iR=function(Z,k){return k===void 0||k===null?Z:k.toString()};
g$=function(Z,k){if(k){if(Z==="fullwidth")return Infinity;if(Z==="fullheight")return 0}return Z&&(k=Z.match(fqr))&&(Z=Number(k[2]),k=Number(k[1]),!isNaN(Z)&&!isNaN(k)&&Z>0)?k/Z:NaN};
w$=function(Z){var k=Z.docid||Z.video_id||Z.videoId||Z.id;if(k)return k;k=Z.raw_player_response;k||(Z=Z.player_response)&&(k=JSON.parse(Z));return k&&k.videoDetails&&k.videoDetails.videoId||null};
BUX=function(Z){return $q(Z,!1)==="EMBEDDED_PLAYER_MODE_PFL"};
g.xq=function(Z){return Z==="EMBEDDED_PLAYER_LITE_MODE_FIXED_PLAYBACK_LIMIT"||Z==="EMBEDDED_PLAYER_LITE_MODE_DYNAMIC_PLAYBACK_LIMIT"?!0:!1};
$q=function(Z,k=!1){k=k?"EMBEDDED_PLAYER_MODE_DEFAULT":"EMBEDDED_PLAYER_MODE_UNKNOWN";window.location.hostname.includes("youtubeeducation.com")&&(k="EMBEDDED_PLAYER_MODE_PFL");let N=Z.raw_embedded_player_response;if(!N&&(Z=Z.embedded_player_response))try{N=JSON.parse(Z)}catch(a){return k}return N?Dm(k,N.embeddedPlayerMode,Dmy):k};
OCU=function(){if(g.ii("disable_biscotti_fetch_entirely_for_all_web_clients"))return Error("Biscotti id fetching has been disabled entirely.");if(!fE())return Error("User has not consented - not fetching biscotti id.");const Z=g.G("PLAYER_VARS",{});if(g.bT(Z,"privembed",!1)=="1")return Error("Biscotti ID is not available in private embed mode");if(BUX(Z))return Error("Biscotti id fetching has been disabled for pfl.")};
wRU=function(){const Z=OCU();if(Z!==void 0)return xE(Z);G4||(G4=pb("//googleads.g.doubleclick.net/pagead/id",v4f).then(iCX).eK(k=>g4f(2,k)));
return G4};
iCX=function(Z){Z=Z.xhr.responseText;if(!Za(Z,")]}'"))throw new Sr;Z=JSON.parse(Z.substr(4));if((Z.type||1)>1)throw new Sr;Z=Z.id;Ea(Z);G4=Y6(Z);$mj(18E5,2);return Z};
g4f=function(Z,k){k=new xmb(k);Ea("");G4=nb(k);Z>0&&$mj(12E4,Z-1);throw k;};
$mj=function(Z,k){g.fb(function(){pb("//googleads.g.doubleclick.net/pagead/id",v4f).then(iCX,N=>g4f(k,N)).eK(g.Vp)},Z)};
GXN=function(){try{const Z=g.Vf("yt.ads.biscotti.getId_");return Z?Z():wRU()}catch(Z){return xE(Z)}};
ezr=function(Z){Z&&(Z.dataset?Z.dataset[Sej()]="true":BXi(Z))};
o4G=function(Z){return Z?Z.dataset?Z.dataset[Sej()]:Z.getAttribute("data-loaded"):null};
Sej=function(){return JJj.loaded||(JJj.loaded="loaded".replace(/\-([a-z])/g,(Z,k)=>k.toUpperCase()))};
zzy=function(){var Z=document;if("visibilityState"in Z)return Z.visibilityState;const k=er+"VisibilityState";if(k in Z)return Z[k]};
o6=function(Z,k){let N;Er(Z,a=>{N=k[a];return!!N});
return N};
J5=function(Z){if(Z.requestFullscreen)Z=Z.requestFullscreen(void 0);else if(Z.webkitRequestFullscreen)Z=Z.webkitRequestFullscreen();else if(Z.mozRequestFullScreen)Z=Z.mozRequestFullScreen();else if(Z.msRequestFullscreen)Z=Z.msRequestFullscreen();else if(Z.webkitEnterFullscreen)Z=Z.webkitEnterFullscreen();else return Promise.reject(Error("Fullscreen API unavailable"));return Z instanceof Promise?Z:Promise.resolve()};
bR=function(Z){var k;g.z4()?Uv()==Z&&(k=document):k=Z;return k&&(Z=o6(["exitFullscreen","webkitExitFullscreen","mozCancelFullScreen","msExitFullscreen"],k))?(k=Z.call(k),k instanceof Promise?k:Promise.resolve()):Promise.resolve()};
Umf=function(Z){return g.ZD(["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],k=>`on${k.toLowerCase()}`in Z)};
bCR=function(){var Z=document;return g.ZD(["fullscreenerror","webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"],k=>`on${k.toLowerCase()}`in Z)};
g.z4=function(){return!!o6(["fullscreenEnabled","webkitFullscreenEnabled","mozFullScreenEnabled","msFullscreenEnabled"],document)};
Uv=function(Z=!1){let k=o6(["fullscreenElement","webkitFullscreenElement","mozFullScreenElement","msFullscreenElement"],document);if(Z)for(;k&&k.shadowRoot;)k=k.shadowRoot.fullscreenElement;return k?k:null};
pRi=function(Z){if(document.body&&document.documentElement){const k=document.body.scrollTop+document.documentElement.scrollTop;Z.V=Z.clientX+(document.body.scrollLeft+document.documentElement.scrollLeft);Z.U=Z.clientY+k}};
Rzr=function(Z,k,N,a={}){Z.addEventListener&&(k!="mouseenter"||"onmouseenter"in document?k!="mouseleave"||"onmouseenter"in document?k=="mousewheel"&&"MozBoxSizing"in document.documentElement.style&&(k="MozMousePixelScroll"):k="mouseout":k="mouseover");return on(pE,T=>{const K=typeof T[4]==="boolean"&&T[4]==!!a,y=g.lf(T[4])&&g.lf(a)&&g.pK(T[4],a);return!!T.length&&T[0]==Z&&T[1]==k&&T[2]==N&&(K||y)})};
g.R6=function(Z,k,N,a={}){if(!Z||!Z.addEventListener&&!Z.attachEvent)return"";let T=Rzr(Z,k,N,a);if(T)return T;T=++Mar.count+"";const K=!(k!="mouseenter"&&k!="mouseleave"||!Z.addEventListener||"onmouseenter"in document);let y;y=K?Q=>{Q=new n4i(Q);if(!PK(Q.relatedTarget,q=>q==Z,!0))return Q.currentTarget=Z,Q.type=k,N.call(Z,Q)}:Q=>{Q=new n4i(Q);
Q.currentTarget=Z;return N.call(Z,Q)};
y=g.ai(y);Z.addEventListener?(k=="mouseenter"&&K?k="mouseover":k=="mouseleave"&&K?k="mouseout":k=="mousewheel"&&"MozBoxSizing"in document.documentElement.style&&(k="MozMousePixelScroll"),Iqf()||typeof a==="boolean"?Z.addEventListener(k,y,a):Z.addEventListener(k,y,!!a.capture)):Z.attachEvent(`on${k}`,y);pE[T]=[Z,k,N,y,a];return T};
E4f=function(Z){return jqy(Z,k=>g.I3(k,"ytp-ad-has-logging-urls"))};
jqy=function(Z,k){const N=document.body||document;return g.R6(N,"click",a=>{const T=PK(a.target,K=>K===N||k(K),!0);
T&&T!==N&&!T.disabled&&(a.currentTarget=T,Z.call(T,a))})};
g.nE=function(Z){Z&&(typeof Z=="string"&&(Z=[Z]),g.pi(Z,k=>{if(k in pE){var N=pE[k];const a=N[0],T=N[1],K=N[3];N=N[4];a.removeEventListener?Iqf()||typeof N==="boolean"?a.removeEventListener(T,K,N):a.removeEventListener(T,K,!!N.capture):a.detachEvent&&a.detachEvent(`on${T}`,K);delete pE[k]}}))};
I6=function(Z){for(let k in pE)pE[k][0]==Z&&g.nE(k)};
jr=function(Z){Z=Z||window.event;let k;Z.composedPath&&typeof Z.composedPath==="function"?k=Z.composedPath():k=Z.path;k&&k.length?Z=k[0]:(Z=Z||window.event,Z=Z.target||Z.srcElement,Z.nodeType==3&&(Z=Z.parentNode));return Z};
Ev=function(Z){this.j=Z;this.V=null;this.Y=0;this.G=null;this.L=0;this.U=[];for(Z=0;Z<4;Z++)this.U.push(0);this.D=0;this.O=g.R6(window,"mousemove",(0,g.Dj)(this.N,this));this.C=g.B8((0,g.Dj)(this.Vz,this),25)};
We=function(Z,k,N,a){for(let T=0;T<N.length;T++)Z.K(k,N[T],a)};
g.Z_=function(Z,k,N){var a=N&&N>0?N:0;N=a?Date.now()+a*1E3:0;if((a=a?g.Yq.V6():g.Yq.h5())&&window.JSON){typeof k!=="string"&&(k=JSON.stringify(k,void 0));try{a.set(Z,k,N)}catch(T){a.remove(Z)}}};
g.kh=function(Z){const k=g.Yq.h5(),N=g.Yq.V6();if(!k&&!N||!window.JSON)return null;let a;try{a=k.get(Z)}catch(T){}if(typeof a!=="string")try{a=N.get(Z)}catch(T){}if(typeof a!=="string")return null;try{a=JSON.parse(a,void 0)}catch(T){}return a};
WbU=function(){var Z=g.Yq.V6();if(Z&&(Z=Z.xZ("yt-player-quality")))return Z.creation};
g.Na=function(Z){try{const k=g.Yq.h5(),N=g.Yq.V6();k&&k.remove(Z);N&&N.remove(Z)}catch(k){}};
g.aY=function(){return g.kh("yt-remote-session-screen-id")};
Tb=function(){if(!g.dX.matchMedia)return"WEB_DISPLAY_MODE_UNKNOWN";try{return g.dX.matchMedia("(display-mode: standalone)").matches?"WEB_DISPLAY_MODE_STANDALONE":g.dX.matchMedia("(display-mode: minimal-ui)").matches?"WEB_DISPLAY_MODE_MINIMAL_UI":g.dX.matchMedia("(display-mode: fullscreen)").matches?"WEB_DISPLAY_MODE_FULLSCREEN":g.dX.matchMedia("(display-mode: browser)").matches?"WEB_DISPLAY_MODE_BROWSER":"WEB_DISPLAY_MODE_UNKNOWN"}catch(Z){return"WEB_DISPLAY_MODE_UNKNOWN"}};
Yey=function(){KU.instance||(KU.instance=new KU);return KU.instance};
Zkf=function(Z){switch(Z){case "DESKTOP":return 1;case "UNKNOWN_PLATFORM":return 0;case "TV":return 2;case "GAME_CONSOLE":return 3;case "MOBILE":return 4;case "TABLET":return 5}};
g.QC=function(){yC||(yC=new kJR);return yC};
rO=function(Z,k){var N=`f${Math.floor(Z/31)+1}`;Z=1<<Z%31;let a=Npf(N)||0;a=k?a|Z:a&~Z;a===0?delete qa[N]:(k=a.toString(16),qa[N]=k.toString())};
CU=function(Z){if(/^f([1-9][0-9]*)$/.test(Z))throw Error(`ExpectedRegexMatch: ${Z}`);};
mB=function(Z){if(!/^\w+$/.test(Z))throw Error(`ExpectedRegexMismatch: ${Z}`);};
Npf=function(Z){Z=qa[Z]!==void 0?qa[Z].toString():null;return Z!=null&&/^[A-Fa-f0-9]+$/.test(Z)?parseInt(Z,16):null};
a1N=function(){const Z=g.dX.navigator;return Z?Z.connection:void 0};
KQb=function(){var Z=a1N();if(Z){var k=Tpf[Z.type||"unknown"]||"CONN_UNKNOWN";Z=Tpf[Z.effectiveType||"unknown"]||"CONN_UNKNOWN";k==="CONN_CELLULAR_UNKNOWN"&&Z!=="CONN_UNKNOWN"&&(k=Z);if(k!=="CONN_UNKNOWN")return k;if(Z!=="CONN_UNKNOWN")return Z}};
Qaf=function(){var Z=a1N();if(Z?.effectiveType)return yRj.hasOwnProperty(Z.effectiveType)?yRj[Z.effectiveType]:"EFFECTIVE_CONNECTION_TYPE_UNKNOWN"};
A0=function(){try{return g.si(),!0}catch(Z){return!1}};
g.si=function(Z="unknown"){if(g.G("DATASYNC_ID")!==void 0)return g.G("DATASYNC_ID");throw new g.jD("Datasync ID not set",Z);};
g.c9=function(Z,k,N){return P9(k,0,N)};
q3y=function(Z){const k=g.Vf("yt.scheduler.instance.addImmediateJob");k?k(Z):Z()};
g.dO=function(){H9.instance||(H9.instance=new H9);return H9.instance};
P9=function(Z,k,N){N!==void 0&&Number.isNaN(Number(N))&&(N=void 0);const a=g.Vf("yt.scheduler.instance.addJob");return a?a(Z,k,N):N===void 0?(Z(),NaN):g.fb(Z,N||0)};
g.XI=function(){return!!g.Vf("yt.scheduler.instance")};
LU=function(Z){const k=g.Vf("yt.scheduler.instance.setPriorityThreshold");k&&k(Z)};
FI=function(){return VC()?.get("LAST_RESULT_ENTRY_KEY",!0)};
lF=function(Z){t0||(h0?h0.QV(Z):(uF.push({type:"ERROR",payload:Z}),uF.length>10&&uF.shift()))};
fU=function(Z,k){t0||(h0?h0.logEvent(Z,k):(uF.push({type:"EVENT",eventType:Z,payload:k}),uF.length>10&&uF.shift()))};
B9=function(Z){if(Z.indexOf(":")>=0)throw Error("Database name cannot contain ':'");};
D_=function(Z){return Z.substr(0,Z.indexOf(":"))||Z};
gO=function(Z,k,N,a){k=D_(k);let T;T=Z instanceof Error?Z:Error(`Unexpected error: ${Z}`);if(T instanceof g.Oi)return T;Z={objectStoreNames:N,dbName:k,dbVersion:a};if(T.name==="QuotaExceededError")return new g.Oi("QUOTA_EXCEEDED",Z);if(g.v9&&T.name==="UnknownError")return new g.Oi("QUOTA_MAYBE_EXCEEDED",Z);if(T instanceof iF)return new g.Oi("MISSING_INDEX",{...Z,objectStore:T.objectStore,index:T.index});if(T.name==="InvalidStateError"&&rRy.some(K=>T.message.includes(K)))return new g.Oi("EXECUTE_TRANSACTION_ON_CLOSED_DB",
Z);
if(T.name==="AbortError")return new g.Oi("UNKNOWN_ABORT",Z,T.message);T.args=[{...Z,name:"IdbError",jN:T.name}];T.level="WARNING";return T};
g.wO=function(Z,k,N){const a=FI();return new g.Oi("IDB_NOT_SUPPORTED",{context:{caller:Z,publicName:k,version:N,hasSucceededOnce:a?.hasSucceededOnce}})};
Ckf=function(Z){if(!Z)throw Error();throw Z;};
mQG=function(Z){return Z};
say=function(Z,k,N,a,T){try{if(Z.state.status!=="FULFILLED")throw Error("calling handleResolve before the promise is fulfilled.");const K=N(Z.state.value);K instanceof g.$h?xh(Z,k,K,a,T):a(K)}catch(K){T(K)}};
ARU=function(Z,k,N,a,T){try{if(Z.state.status!=="REJECTED")throw Error("calling handleReject before the promise is rejected.");const K=N(Z.state.reason);K instanceof g.$h?xh(Z,k,K,a,T):a(K)}catch(K){T(K)}};
xh=function(Z,k,N,a,T){k===N?T(new TypeError("Circular promise chain detected.")):N.then(K=>{K instanceof g.$h?xh(Z,k,K,a,T):a(K)},K=>{T(K)})};
Pky=function(Z,k,N){const a=()=>{try{Z.removeEventListener("success",T),Z.removeEventListener("error",K)}catch{}},T=()=>{k(Z.result);
a()},K=()=>{N(Z.error);
a()};
Z.addEventListener("success",T);Z.addEventListener("error",K)};
cRf=function(Z){return new Promise((k,N)=>{Pky(Z,k,N)})};
S5=function(Z){return new g.$h(new Gb((k,N)=>{Pky(Z,k,N)}))};
e5=function(Z,k){return new g.$h(new Gb((N,a)=>{const T=()=>{const K=Z?k(Z):null;K?K.then(y=>{Z=y;T()},a):N()};
T()}))};
dQy=function(Z){return S5(Z).then(k=>k?new Hky(Z,k):null)};
g.X1R=function(Z){Z.cursor.continue(void 0);return dQy(Z.request)};
oY=function(){return g.ii("idb_immediate_commit")};
g.J0=async function(Z,k,N,a){const T={mode:"readonly",Mx:!1,tag:"IDB_TRANSACTION_TAG_UNKNOWN"};typeof N==="string"?T.mode=N:Object.assign(T,N);Z.transactionCount++;N=T.Mx?3:1;let K=0,y;for(;!y;){K++;const C=Math.round((0,g.z)());try{var Q=Z.V.transaction(k,T.mode),q=a,r=!!T.commit;const m=new LQb(Q),A=await VtR(m,q,r),P=Math.round((0,g.z)());FQf(Z,C,P,K,void 0,k.join(),T);return A}catch(m){q=Math.round((0,g.z)());const A=gO(m,Z.V.name,k.join(),Z.V.version);if(A instanceof g.Oi&&!A.V||K>=N)FQf(Z,C,
q,K,A,k.join(),T),y=A}}return Promise.reject(y)};
zb=function(Z,k,N){Z=Z.V.createObjectStore(k,N);return new ttr(Z)};
Ui=function(Z,k){Z.V.objectStoreNames.contains(k)&&Z.V.deleteObjectStore(k)};
FQf=function(Z,k,N,a,T,K,y){k=N-k;T?(T instanceof g.Oi&&(T.type==="QUOTA_EXCEEDED"||T.type==="QUOTA_MAYBE_EXCEEDED")&&fU("QUOTA_EXCEEDED",{dbName:D_(Z.V.name),objectStoreNames:K,transactionCount:Z.transactionCount,transactionMode:y.mode}),T instanceof g.Oi&&T.type==="UNKNOWN_ABORT"&&(N-=Z.D,N<0&&N>=2147483648&&(N=0),fU("TRANSACTION_UNEXPECTEDLY_ABORTED",{objectStoreNames:K,transactionDuration:k,transactionCount:Z.transactionCount,dbDuration:N}),Z.U=!0),hkb(Z,!1,a,K,k,y.tag),lF(T)):hkb(Z,!0,a,K,k,
y.tag)};
hkb=function(Z,k,N,a,T,K="IDB_TRANSACTION_TAG_UNKNOWN"){fU("TRANSACTION_ENDED",{objectStoreNames:a,connectionHasUnknownAbortedTransaction:Z.U,duration:T,isSuccessful:k,tryCount:N,tag:K})};
bF=function(Z,k,N){Z.V.createIndex(k,N,{unique:!1})};
g.RY=function(Z,k,N){Z=Z.V.openCursor(k.query,k.direction);return pU(Z).then(a=>e5(a,N))};
uDf=function(Z,k){return g.RY(Z,{query:k},N=>N.delete().then(()=>g.Ma(N))).then(()=>{})};
l1b=function(Z,k,N){const a=[];return g.RY(Z,{query:k},T=>{if(!(N!==void 0&&a.length>=N))return a.push(T.getValue()),g.Ma(T)}).then(()=>a)};
Bpi=function(Z){const k=[];return g.f1G(Z,{query:void 0},N=>{k.push(N.cursor.primaryKey);return g.X1R(N)}).then(()=>k)};
DQU=function(Z){return"getAllKeys"in IDBObjectStore.prototype?S5(Z.V.getAllKeys(void 0,void 0)):Bpi(Z)};
g.f1G=function(Z,k,N){const a=k.query;k=k.direction;Z="openKeyCursor"in IDBObjectStore.prototype?Z.V.openKeyCursor(a,k):Z.V.openCursor(a,k);return dQy(Z).then(T=>e5(T,N))};
VtR=function(Z,k,N){const a=new Promise((T,K)=>{try{const y=k(Z);N&&Z.commit();y.then(Q=>{T(Q)}).catch(K)}catch(y){K(y),Z.abort()}});
return Promise.all([a,Z.done]).then(([T])=>T)};
g.nU=function(Z,k,N){const {query:a=null,direction:T="next"}=k;Z=Z.V.openCursor(a,T);return pU(Z).then(K=>e5(K,N))};
OkN=function(Z,k,N){const a=[];return g.nU(Z,{query:k},T=>{if(!(N!==void 0&&a.length>=N))return a.push(T.getValue()),g.Ma(T)}).then(()=>a)};
pU=function(Z){return S5(Z).then(k=>k?new vlX(Z,k):null)};
g.Ma=function(Z){Z.cursor.continue(void 0);return pU(Z.request)};
gl0=function(Z,k,N){return new Promise((a,T)=>{let K;K=k!==void 0?self.indexedDB.open(Z,k):self.indexedDB.open(Z);const y=N.blocked,Q=N.blocking,q=N.Wk,r=N.upgrade,C=N.closed;let m;const A=()=>{m||(m=new iky(K.result,{closed:C}));return m};
K.addEventListener("upgradeneeded",P=>{try{if(P.newVersion===null)throw Error("Invariant: newVersion on IDbVersionChangeEvent is null");if(K.transaction===null)throw Error("Invariant: transaction on IDbOpenDbRequest is null");P.dataLoss&&P.dataLoss!=="none"&&fU("IDB_DATA_CORRUPTED",{reason:P.dataLossMessage||"unknown reason",dbName:D_(Z)});const d=A(),h=new LQb(K.transaction);r&&r(d,B=>P.oldVersion<B&&P.newVersion>=B,h);
h.done.catch(B=>{T(B)})}catch(d){T(d)}});
K.addEventListener("success",()=>{const P=K.result;Q&&P.addEventListener("versionchange",()=>{Q(A())});
P.addEventListener("close",()=>{fU("IDB_UNEXPECTEDLY_CLOSED",{dbName:D_(Z),dbVersion:P.version});q&&q()});
a(A())});
K.addEventListener("error",()=>{T(K.error)});
y&&K.addEventListener("blocked",()=>{y()})})};
w1G=function(Z,k,N={}){return gl0(Z,k,N)};
IY=async function(Z,k={}){try{const N=self.indexedDB.deleteDatabase(Z),a=k.blocked;a&&N.addEventListener("blocked",()=>{a()});
await cRf(N)}catch(N){throw gO(N,Z,"",-1);}};
$Qf=function(Z,k){return new g.Oi("INCOMPATIBLE_DB_VERSION",{dbName:Z.name,oldVersion:Z.options.version,newVersion:k})};
g.j5=function(Z,k){if(!k)throw g.wO("openWithToken",D_(Z.name));return Z.open()};
xQr=async function(Z,k){return g.J0(await g.j5(Ei,k),["databases"],{Mx:!0,mode:"readwrite"},N=>{const a=N.objectStore("databases");return a.get(Z.actualName).then(T=>{if(T?Z.actualName!==T.actualName||Z.publicName!==T.publicName||Z.userIdentifier!==T.userIdentifier:1)return a.put(Z).then(()=>{})})})};
W9=async function(Z,k){return Z?(await g.j5(Ei,k)).delete("databases",Z):void 0};
GJR=async function(Z,k){const N=[];k=await g.j5(Ei,k);await g.J0(k,["databases"],{Mx:!0,mode:"readonly"},a=>{N.length=0;return g.RY(a.objectStore("databases"),{},T=>{Z(T.getValue())&&N.push(T.getValue());return g.Ma(T)})});
return N};
S3j=function(Z,k){return GJR(N=>N.publicName===Z&&N.userIdentifier!==void 0,k)};
eki=async function(){if(FI()?.hasSucceededOnce)return!0;var Z;if(!(Z=Yh&&Xn()&&!LE()||g.Z3)){try{Z=self;var k=!!(Z.indexedDB&&Z.IDBIndex&&Z.IDBKeyRange&&Z.IDBObjectStore)}catch(N){k=!1}Z=!k}if(Z||!("IDBTransaction"in self&&"objectStoreNames"in IDBTransaction.prototype))return!1;try{return await xQr({actualName:"yt-idb-test-do-not-use",publicName:"yt-idb-test-do-not-use",userIdentifier:void 0},ks),await W9("yt-idb-test-do-not-use",ks),!0}catch(N){return!1}};
olr=function(){if(N6!==void 0)return N6;t0=!0;return N6=eki().then(Z=>{t0=!1;if(VC()?.U()){var k={hasSucceededOnce:FI()?.hasSucceededOnce||Z};VC()?.set("LAST_RESULT_ENTRY_KEY",k,2592E3,!0)}return Z})};
aj=function(){return g.Vf("ytglobal.idbToken_")||void 0};
g.TN=function(){const Z=aj();return Z?Promise.resolve(Z):olr().then(k=>{k?(g.X0("ytglobal.idbToken_",ks),k=ks):k=void 0;return k})};
JRj=function(Z){if(!A0())throw Z=new g.Oi("AUTH_INVALID",{dbName:Z}),lF(Z),Z;const k=g.si();return{actualName:`${Z}:${k}`,publicName:Z,userIdentifier:k}};
zkN=async function(Z,k,N,a){var T=Error().stack??"";const K=await g.TN();if(!K)throw k=g.wO("openDbImpl",Z,k),g.ii("ytidb_async_stack_killswitch")||(k.stack=`${k.stack}\n${T.substring(T.indexOf("\n")+1)}`),lF(k),k;B9(Z);T=N?{actualName:Z,publicName:Z,userIdentifier:void 0}:JRj(Z);try{return await xQr(T,K),await w1G(T.actualName,k,a)}catch(y){try{await W9(T.actualName,K)}catch{}throw y;}};
UQR=function(Z,k,N={}){return zkN(Z,k,!1,N)};
bky=function(Z,k,N={}){return zkN(Z,k,!0,N)};
p1R=async function(Z,k={}){const N=await g.TN();N&&(B9(Z),Z=JRj(Z),await IY(Z.actualName,k),await W9(Z.actualName,N))};
Rky=function(Z,k,N){Z=Z.map(async a=>{await IY(a.actualName,k);await W9(a.actualName,N)});
return Promise.all(Z).then(()=>{})};
Mtj=async function(Z){var k={};const N=await g.TN();N&&(B9(Z),Z=await S3j(Z,N),await Rky(Z,k,N))};
nlj=async function(Z,k={}){const N=await g.TN();N&&(B9(Z),await IY(Z,k),await W9(Z,N))};
jaj=function(Z,k){let N;return()=>{N||(N=new I1y(Z,k));return N}};
KR=function(Z,k){return jaj(Z,k)};
yW=function(Z){return g.j5(Ely(),Z)};
WQj=async function(Z,k,N,a){Z={config:Z,hashData:k,timestamp:a!==void 0?a:(0,g.z)()};N=await yW(N);await N.clear("hotConfigStore");return await N.put("hotConfigStore",Z)};
Y3y=async function(Z,k,N,a,T){Z={config:Z,hashData:k,configData:N,timestamp:T!==void 0?T:(0,g.z)()};a=await yW(a);await a.clear("coldConfigStore");return await a.put("coldConfigStore",Z)};
Z_y=async function(Z){Z=await yW(Z);let k=void 0;await g.J0(Z,["coldConfigStore"],{mode:"readwrite",Mx:!0},N=>g.nU(N.objectStore("coldConfigStore").index("coldTimestampIndex"),{direction:"prev"},a=>{k=a.getValue()}));
return k};
k3X=async function(Z){Z=await yW(Z);let k=void 0;await g.J0(Z,["hotConfigStore"],{mode:"readwrite",Mx:!0},N=>g.nU(N.objectStore("hotConfigStore").index("hotTimestampIndex"),{direction:"prev"},a=>{k=a.getValue()}));
return k};
Nsf=async function(){await Mtj("ytGcfConfig")};
aZf=function(){if(!QW.instance){const Z=new QW;QW.instance=Z}return QW.instance};
q6=function(Z,k){Z.U=k;g.X0("yt.gcf.config.hotConfigGroup",Z.U||null)};
r2=function(Z,k){Z.V=k;g.X0("yt.gcf.config.coldConfigGroup",Z.V||null)};
CR=function(){return g.Vf("yt.gcf.config.coldConfigGroup")};
mY=function(){return g.Vf("yt.gcf.config.hotConfigGroup")};
yZ0=function(Z){if(!Z.U||!Z.V){if(!aj()){const k=g.wO("scheduleGetConfigs");T_(k)}Z.Y||(Z.Y=g.g3.IU(async()=>{try{await Tsi(Z)}catch{}try{await Kc0(Z)}catch{}Z.Y&&(Z.Y=0)},100))}};
sX=function(Z,k){Z.coldHashData=k;g.X0("yt.gcf.config.coldHashData",Z.coldHashData||null)};
rZ0=async function(Z){if(g.ii("start_client_gcf")||g.ii("delete_gcf_config_db"))g.ii("start_client_gcf")&&(await g.TN()&&A0()&&!g.ii("delete_gcf_config_db")?(Z.L=!0,yZ0(Z)):(Qzj(Z),qPR(Z))),g.ii("delete_gcf_config_db")&&await Nsf()};
qPR=function(Z){q6(Z,g.G("RAW_HOT_CONFIG_GROUP"));Z.tB(g.G("SERIALIZED_HOT_HASH_DATA"))};
Tsi=async function(Z){if(Z.U)return mY();if(!Z.L)return Z=g.wO("getHotConfig IDB not initialized"),T_(Z),Promise.reject(Z);const k=aj(),N=g.G("TIME_CREATED_MS");if(k){var a=await k3X(k);if(a&&a.timestamp>N)return q6(Z,a.config),Z.tB(a.hashData),mY()}else a=g.wO("getHotConfig token error"),T_(a);qPR(Z);k&&Z.U&&Z.hotHashData&&await WQj(Z.U,Z.hotHashData,k,N);return Z.U?mY():(Z=new g.jD("Config not available in ytConfig"),T_(Z),Promise.reject(Z))};
Czy=function(Z,k){Z.configData=k;g.X0("yt.gcf.config.coldConfigData",Z.configData||null)};
Qzj=function(Z){r2(Z,g.G("RAW_COLD_CONFIG_GROUP"));sX(Z,g.G("SERIALIZED_COLD_HASH_DATA"));Czy(Z,Z.V?.configData)};
Kc0=async function(Z){if(Z.V)return CR();if(!Z.L)return Z=g.wO("getColdConfig IDB not initialized"),T_(Z),Promise.reject(Z);const k=aj(),N=g.G("TIME_CREATED_MS");if(k){var a=await Z_y(k);if(a&&a.timestamp>N)return r2(Z,a.config),Czy(Z,a.configData),sX(Z,a.hashData),CR()}else a=g.wO("getColdConfig"),T_(a);Qzj(Z);k&&Z.V&&Z.coldHashData&&Z.configData&&await Y3y(Z.V,Z.coldHashData,Z.configData,k,N);return Z.V?CR():(Z=new g.jD("Config not available in ytConfig"),T_(Z),Promise.reject(Z))};
m7y=async function(Z,k,N){if(g.ii("start_client_gcf")){N&&q6(Z,N);Z.tB(k);const a=aj();a&&(N||(N=(await k3X(a))?.config),await WQj(N,k,a));if(N){Z=Z.G;for(const T of Z.V)T(N)}}};
szG=async function(Z,k,N){g.ii("start_client_gcf")&&(sX(Z,k),Z=aj())&&(N||(N=(await Z_y(Z))?.config),N&&await Y3y(N,k,N.configData,Z))};
AZy=function(){var Z=aZf(),k=(0,g.z)()-Z.D;if(!(Z.D!==0&&k<gu("send_config_hash_timer"))){k=g.Vf("yt.gcf.config.coldConfigData");var N=g.Vf("yt.gcf.config.hotHashData"),a=g.Vf("yt.gcf.config.coldHashData");k&&N&&a&&(Z.D=(0,g.z)());return{coldConfigData:k,hotHashData:N,coldHashData:a}}};
PzG=function(){return"INNERTUBE_API_KEY"in Wr&&"INNERTUBE_API_VERSION"in Wr};
g.Ah=function(){return{innertubeApiKey:g.G("INNERTUBE_API_KEY"),innertubeApiVersion:g.G("INNERTUBE_API_VERSION"),L_:g.G("INNERTUBE_CONTEXT_CLIENT_CONFIG_INFO"),P7:g.G("INNERTUBE_CONTEXT_CLIENT_NAME","WEB"),tj:g.G("INNERTUBE_CONTEXT_CLIENT_NAME",1),innertubeContextClientVersion:g.G("INNERTUBE_CONTEXT_CLIENT_VERSION"),CL:g.G("INNERTUBE_CONTEXT_HL"),Zq:g.G("INNERTUBE_CONTEXT_GL"),j1:g.G("INNERTUBE_HOST_OVERRIDE")||"",ZD:!!g.G("INNERTUBE_USE_THIRD_PARTY_AUTH",!1),MU:!!g.G("INNERTUBE_OMIT_API_KEY_WHEN_AUTH_HEADER_IS_PRESENT",
!1),appInstallData:g.G("SERIALIZED_CLIENT_CONFIG_DATA")}};
g.Px=function(Z){const k={client:{hl:Z.CL,gl:Z.Zq,clientName:Z.P7,clientVersion:Z.innertubeContextClientVersion,configInfo:Z.L_}};navigator.userAgent&&(k.client.userAgent=String(navigator.userAgent));var N=g.dX.devicePixelRatio;N&&N!=1&&(k.client.screenDensityFloat=String(N));N=wu();N!==""&&(k.client.experimentsToken=N);N=$6();N.length>0&&(k.request={internalExperimentFlags:N});cZG(Z,void 0,k);H_N(void 0,k);d7f(void 0,k);X4y(Z,void 0,k);Lci(void 0,k);g.ii("start_client_gcf")&&VCb(void 0,k);g.G("DELEGATED_SESSION_ID")&&
!g.ii("pageid_as_header_web")&&(k.user={onBehalfOfUser:g.G("DELEGATED_SESSION_ID")});!g.ii("fill_delegate_context_in_gel_killswitch")&&(Z=g.G("INNERTUBE_CONTEXT_SERIALIZED_DELEGATION_CONTEXT"))&&(k.user={...k.user,serializedDelegationContext:Z});Z=g.G("INNERTUBE_CONTEXT");g.ii("enable_persistent_device_token")&&Z?.client?.rolloutToken&&(k.client.rolloutToken=Z?.client?.rolloutToken);Z=Object;N=Z.assign;var a=k.client,T=g.G("DEVICE","");const K={};for(const [y,Q]of Object.entries(q2(T))){T=y;const q=
Q;T==="cbrand"?K.deviceMake=q:T==="cmodel"?K.deviceModel=q:T==="cbr"?K.browserName=q:T==="cbrver"?K.browserVersion=q:T==="cos"?K.osName=q:T==="cosver"?K.osVersion=q:T==="cplatform"&&(K.platform=q)}k.client=N.call(Z,a,K);return k};
cZG=function(Z,k,N){Z=Z.P7;if(Z==="WEB"||Z==="MWEB"||Z===1||Z===2)k?(N=pk(k,cx,96)||new cx,Z=Tb(),Z=Object.keys(Fcf).indexOf(Z),Z=Z===-1?null:Z,Z!==null&&rs(N,3,Z),jt(k,cx,96,N)):N&&(N.client.mainAppWebInfo=N.client.mainAppWebInfo??{},N.client.mainAppWebInfo.webDisplayMode=Tb())};
H_N=function(Z,k){const N=g.Vf("yt.embedded_player.embed_url");N&&(Z?(k=pk(Z,Hx,7)||new Hx,Q3(k,4,N),jt(Z,Hx,7,k)):k&&(k.thirdParty={embedUrl:N}))};
d7f=function(Z,k){if(g.ii("web_log_memory_total_kbytes")&&g.dX.navigator?.deviceMemory){const N=g.dX.navigator?.deviceMemory;Z?VX(Z,95,gU(N*1E6)):k&&(k.client.memoryTotalKbytes=`${N*1E6}`)}};
X4y=function(Z,k,N){Z.appInstallData&&(k?(N=pk(k,d2,62)??new d2,Q3(N,6,Z.appInstallData),jt(k,d2,62,N)):N&&(N.client.configInfo=N.client.configInfo||{},N.client.configInfo.appInstallData=Z.appInstallData))};
Lci=function(Z,k){var N=KQb();N&&(Z?rs(Z,61,tC0[N]):k&&(k.client.connectionType=N));g.ii("web_log_effective_connection_type")&&(N=Qaf())&&(Z?rs(Z,94,hyy[N]):k&&(k.client.effectiveConnectionType=N))};
u9N=function(Z,k,N={}){let a={};g.G("EOM_VISITOR_DATA")?a={"X-Goog-EOM-Visitor-Id":g.G("EOM_VISITOR_DATA")}:a={"X-Goog-Visitor-Id":N.visitorData||g.G("VISITOR_DATA","")};if(k&&k.includes("www.youtube-nocookie.com"))return a;k=N.Y3||g.G("AUTHORIZATION");k||(Z?k=`Bearer ${g.Vf("gapi.auth.getToken")().access_token}`:(Z=Yey().NQ(Xk),g.ii("pageid_as_header_web")||delete Z["X-Goog-PageId"],a={...a,...Z}));k&&(a.Authorization=k);return a};
VCb=function(Z,k){var N=AZy();if(N){var a=N.coldConfigData,T=N.coldHashData;N=N.hotHashData;Z?(k=pk(Z,d2,62)??new d2,a=Q3(k,1,a),Q3(a,3,T).tB(N),jt(Z,d2,62,k)):k&&(k.client.configInfo=k.client.configInfo||{},a&&(k.client.configInfo.coldConfigData=a),T&&(k.client.configInfo.coldHashData=T),N&&(k.client.configInfo.hotHashData=N))}};
LR=function(Z){this.version=1;this.args=Z};
VW=function(Z,k){this.topic=Z;this.V=k};
th=function(Z,k){const N=Fk();N&&N.publish.call(N,Z.toString(),Z,k)};
Bsi=function(Z){var k=lZy;const N=Fk();if(!N)return 0;const a=N.subscribe(k.toString(),(T,K)=>{var y=g.Vf("ytPubsub2Pubsub2SkipSubKey");y&&y==a||(y=()=>{if(hh[a])try{if(K&&k instanceof VW&&k!=T)try{{var Q=k.V,q=K;if(!q.args||!q.version)throw Error("yt.pubsub2.Data.deserialize(): serializedData is incomplete.");let r;try{if(!Q.zv){const C=new Q;Q.zv=C.version}r=Q.zv}catch(C){}if(!r||q.version!=r)throw Error("yt.pubsub2.Data.deserialize(): serializedData version is incompatible.");try{K=Reflect.construct(Q,
g.mr(q.args))}catch(C){throw C.message="yt.pubsub2.Data.deserialize(): "+C.message,C;}}}catch(r){throw r.message="yt.pubsub2.pubsub2 cross-binary conversion error for "+k.toString()+": "+r.message,r;}Z.call(window,K)}catch(r){g.N2(r)}},fZf[k.toString()]?g.XI()?g.g3.IU(y):g.fb(y,0):y())});
hh[a]=!0;uv[k.toString()]||(uv[k.toString()]=[]);uv[k.toString()].push(a);return a};
vHf=function(){var Z=D7R;const k=Bsi(function(N){Z.apply(void 0,arguments);O_X(k)});
return k};
O_X=function(Z){const k=Fk();k&&(typeof Z==="number"&&(Z=[Z]),g.pi(Z,N=>{k.unsubscribeByKey(N);delete hh[N]}))};
Fk=function(){return g.Vf("ytPubsub2Pubsub2Instance")};
lv=function(Z,k,N={sampleRate:.1}){Math.random()<Math.min(.02,N.sampleRate/100)&&th("meta_logging_csi_event",{timerName:Z,XdW:k})};
fR=function(Z,k,N,a){const T={startTime:(0,g.z)(),ticks:{},infos:{}};try{const y=i_f(k);if(y==null||!(y>gHi||y<w4X)){var K=eO($7R(k));const Q=(0,g.z)();T.ticks.gelc=Q;x7i++;g.ii("gel_compression_csi_killswitch")||!g.ii("log_gel_compression_latency")&&!g.ii("log_gel_compression_latency_lr")||lv("gel_compression",T,{sampleRate:.1});N.headers||(N.headers={});N.headers["Content-Encoding"]="gzip";N.postBody=K;N.postParams=void 0}a(Z,N)}catch(y){T_(y),a(Z,N)}};
G3y=function(Z){(0,g.z)();if(!Z.body)return Z;try{const k=typeof Z.body==="string"?Z.body:JSON.stringify(Z.body);let N=k;if(typeof k==="string"){const a=i_f(k);if(a!=null&&(a>gHi||a<w4X))return Z;N=eO($7R(k));(0,g.z)()}Z.headers={"Content-Encoding":"gzip",...(Z.headers||{})};Z.body=N;return Z}catch(k){return T_(k),Z}};
i_f=function(Z){try{return(new Blob(Z.split(""))).size}catch(k){return T_(k),null}};
Bx=function(Z){return!!Z.Wq||Z.ZW};
SPU=function(Z){Bx(Z)&&!Z.jn&&(Z.V=!0,Z.pK&&Math.random()<=Z.Xj&&Z.ux.tP(Z.Wq),Z.BC(),Z.lx.LN()&&Z.D(),Z.lx.listen(Z.oB,Z.D.bind(Z)),Z.lx.listen(Z.Pn,Z.Y.bind(Z)))};
D3=function(Z,k){Z.E8&&!Z.lx.LN()?Z.E8(k):Z.handleError(k)};
JZX=function(Z,k){if(!Bx(Z))throw Error("IndexedDB is not supported: updateRequestHandlers");const N=k.options.onError?k.options.onError:()=>{};
k.options.onError=async(T,K)=>{const y=eyf(K),Q=oHy(K);Q&&Z.yz&&Z.yz("web_enable_error_204")&&Z.handleError(Error("Request failed due to compression"),k.url,K);if(Z.yz&&Z.yz("nwl_consider_error_code")&&y||Z.yz&&!Z.yz("nwl_consider_error_code")&&Z.potentialEsfErrorCounter<=Z.wL)if(Z.lx.MB&&await Z.lx.MB(),!Z.lx.LN()){N(T,K);Z.yz&&Z.yz("nwl_consider_error_code")&&k?.id!==void 0&&await Z.ux.wq(k.id,Z.Wq,!1);return}Z.yz&&Z.yz("nwl_consider_error_code")&&!y&&Z.potentialEsfErrorCounter>Z.wL||(Z.potentialEsfErrorCounter++,
k?.id!==void 0&&(k.sendCount<Z.wm?(await Z.ux.wq(k.id,Z.Wq,!0,Q?!1:void 0),Z.oV.IU(()=>{Z.lx.LN()&&Z.D()},Z.I6)):await Z.ux.Xu(k.id,Z.Wq)),N(T,K))};
const a=k.options.onSuccess?k.options.onSuccess:()=>{};
k.options.onSuccess=async(T,K)=>{k?.id!==void 0&&await Z.ux.Xu(k.id,Z.Wq);Z.lx.aT&&Z.yz&&Z.yz("vss_network_hint")&&Z.lx.aT(!0);a(T,K)};
return k};
eyf=function(Z){return(Z=Z?.error?.code)&&Z>=400&&Z<=599?!1:!0};
oHy=function(Z){Z=Z?.error?.code;return!(Z!==400&&Z!==415)};
zyj=function(){if(OX)return OX();OX=KR("LogsDatabaseV2",{V5:{LogsRequestsStore:{cV:2}},shared:!1,upgrade(Z,k,N){k(2)&&zb(Z,"LogsRequestsStore",{keyPath:"id",autoIncrement:!0});k(3);k(5)&&(N=N.objectStore("LogsRequestsStore"),N.V.indexNames.contains("newRequest")&&N.V.deleteIndex("newRequest"),bF(N,"newRequestV2",["status","interface","timestamp"]));k(7)&&Ui(Z,"sapisid");k(9)&&Ui(Z,"SWHealthLog")},version:9});return OX()};
vx=function(Z){return g.j5(zyj(),Z)};
b_y=async function(Z,k){const N={startTime:(0,g.z)(),infos:{transactionType:"YT_IDB_TRANSACTION_TYPE_WRITE"},ticks:{}};k=await vx(k);Z={...Z,options:JSON.parse(JSON.stringify(Z.options)),interface:g.G("INNERTUBE_CONTEXT_CLIENT_NAME",0)};Z=await k.put("LogsRequestsStore",Z);N.ticks.tc=(0,g.z)();U7G(N);return Z};
p4y=async function(Z,k){const N={startTime:(0,g.z)(),infos:{transactionType:"YT_IDB_TRANSACTION_TYPE_READ"},ticks:{}};k=await vx(k);var a=g.G("INNERTUBE_CONTEXT_CLIENT_NAME",0),T=[Z,a,0];a=[Z,a,(0,g.z)()];const K=IDBKeyRange.bound(T,a);let y="prev";g.ii("use_fifo_for_networkless")&&(y="next");let Q=void 0;T=Z==="NEW"?"readwrite":"readonly";g.ii("use_readonly_for_get_most_recent_by_status_killswitch")&&(T="readwrite");await g.J0(k,["LogsRequestsStore"],{mode:T,Mx:!0},q=>g.nU(q.objectStore("LogsRequestsStore").index("newRequestV2"),
{query:K,direction:y},r=>{r.getValue()&&(Q=r.getValue(),Z==="NEW"&&(Q.status="QUEUED",r.update(Q)))}));
N.ticks.tc=(0,g.z)();U7G(N);return Q};
Ryy=async function(Z,k){return g.J0(await vx(k),["LogsRequestsStore"],{mode:"readwrite",Mx:!0},N=>{const a=N.objectStore("LogsRequestsStore");return a.get(Z).then(T=>{if(T)return T.status="QUEUED",a.put(T).then(()=>T)})})};
MCf=async function(Z,k,N=!0,a){return g.J0(await vx(k),["LogsRequestsStore"],{mode:"readwrite",Mx:!0},T=>{const K=T.objectStore("LogsRequestsStore");return K.get(Z).then(y=>y?(y.status="NEW",N&&(y.sendCount+=1),a!==void 0&&(y.options.compress=a),K.put(y).then(()=>y)):g.$h.resolve(void 0))})};
nHf=async function(Z,k){return(await vx(k)).delete("LogsRequestsStore",Z)};
IZf=async function(Z){Z=await vx(Z);const k=(0,g.z)()-2592E6;await g.J0(Z,["LogsRequestsStore"],{mode:"readwrite",Mx:!0},N=>g.RY(N.objectStore("LogsRequestsStore"),{},a=>{if(a.getValue().timestamp<=k)return a.delete().then(()=>g.Ma(a))}))};
jzy=async function(){await Mtj("LogsDatabaseV2")};
U7G=function(Z){g.ii("nwl_csi_killswitch")||lv("networkless_performance",Z,{sampleRate:1})};
WcX=function(Z){return g.j5(EH0(),Z)};
YPU=async function(Z){Z=await WcX(Z);const k=(0,g.z)()-2592E6;await g.J0(Z,["SWHealthLog"],{mode:"readwrite",Mx:!0},N=>g.RY(N.objectStore("SWHealthLog"),{},a=>{if(a.getValue().timestamp<=k)return a.delete().then(()=>g.Ma(a))}))};
Z3y=async function(Z){await (await WcX(Z)).clear("SWHealthLog")};
g.iv=function(Z,k,N,a,T="",K=!1,y=!1){if(Z)if(N&&!g.ce())T_(new g.jD("Legacy referrer-scrubbed ping detected")),Z&&kFr(Z,void 0,{scrubReferrer:!0});else if(T)x6(Z,k,"POST",T,a);else if(g.G("USE_NET_AJAX_FOR_PING_TRANSPORT",!1)||a||y)x6(Z,k,"GET","",a,void 0,K,y);else{b:{try{c:{var Q=new NKf({url:Z});if(Q.V.dsh==="1")var q=null;else{var r=Q.V.ae;if(r==="1"){const m=Q.V.adurl;if(m)try{q={version:3,qp:decodeURIComponent(m),oF:rA(Q.U,"act=1","ri=1",LEX(Q))};break c}catch(A){}}q=r==="2"?{version:4,qp:rA(Q.U,
"dct=1","suid="+Q.D,"ri=1"),oF:rA(Q.U,"act=1","ri=1","suid="+Q.D)}:null}}if(q){const m=N1(Z);var C=!(!m||!m.endsWith("/aclk")||cj(Z,"ri")!=="1");break b}}catch(m){}C=!1}C?a5X(Z)?(k&&k(),N=!0):N=!1:N=!1;N||kFr(Z,k)}};
TKr=function(Z,k=""){a5X(Z,k)||g.iv(Z,void 0,void 0,void 0,k)};
a5X=function(Z,k=""){try{if(window.navigator&&window.navigator.sendBeacon&&window.navigator.sendBeacon(Z,k))return!0}catch(N){}return!1};
kFr=function(Z,k,N={}){const a=new Image,T=""+KDj++;g2[T]=a;a.onload=a.onerror=()=>{k&&g2[T]&&k();delete g2[T]};
N.scrubReferrer&&(a.referrerPolicy="no-referrer");a.src=Z};
yii=function(Z){return document.featurePolicy?.allowedFeatures().includes("attribution-reporting")?Z+"&nis=6":Z+"&nis=5"};
xs=function(){w2||(w2=new $s("yt.offline"));return w2};
QsG=function(Z){if(g.ii("offline_error_handling")){var k=xs().get("errors",!0)||{};k[Z.message]={name:Z.name,stack:Z.stack};Z.level&&(k[Z.message].level=Z.level);xs().set("errors",k,2592E3,!0)}};
qGN=function(){if(!GN.instance){const Z=g.Vf("yt.networkRequestMonitor.instance")||new GN;g.X0("yt.networkRequestMonitor.instance",Z);GN.instance=Z}return GN.instance};
rif=function(){if(!SW.instance){const Z=g.Vf("yt.networkStatusManager.instance")||new SW;g.X0("yt.networkStatusManager.instance",Z);SW.instance=Z}return SW.instance};
CmR=function(Z,k){Z.rateLimit?Z.V?(g.g3.Ux(Z.Y),Z.Y=g.g3.IU(()=>{Z.D!==k&&(Z.dispatchEvent(k),Z.D=k,Z.V=(0,g.z)())},Z.rateLimit-((0,g.z)()-Z.V))):(Z.dispatchEvent(k),Z.D=k,Z.V=(0,g.z)()):Z.dispatchEvent(k)};
eW=function(){let Z=g.Vf("yt.networklessRequestController.instance");Z||(Z=new meN,g.X0("yt.networklessRequestController.instance",Z),g.ii("networkless_logging")&&g.TN().then(k=>{Z.Wq=k;SPU(Z);Z.L.resolve();Z.pK&&Math.random()<=Z.Xj&&Z.Wq&&YPU(Z.Wq);g.ii("networkless_immediately_drop_sw_health_store")&&ssy(Z)}));
return Z};
ssy=async function(Z){if(!Z.Wq)throw g.wO("clearSWHealthLogsDb");Z3y(Z.Wq).catch(k=>{Z.handleError(k)})};
AiX=function(Z,k,N){k=g.ii("web_fp_via_jspb")?Object.assign({},k):k;g.ii("use_request_time_ms_header")?k.headers&&c8(Z)&&(k.headers["X-Goog-Request-Time"]=JSON.stringify(Math.round((0,g.z)()))):k.postParams?.requestTimeMs&&(k.postParams.requestTimeMs=Math.round((0,g.z)()));N&&Object.keys(k).length===0?g.iv(Z):k.compress?k.postBody?(typeof k.postBody!=="string"&&(k.postBody=JSON.stringify(k.postBody)),fR(Z,k.postBody,k,g.SD)):fR(Z,JSON.stringify(k.postParams),k,eD):g.SD(Z,k)};
oj=function(Z,k){g.ii("use_event_time_ms_header")&&c8(Z)&&(k.headers||(k.headers={}),k.headers["X-Goog-Event-Time"]=JSON.stringify(Math.round((0,g.z)())));return k};
g.Jh=function(Z,k,N,a){!g.G("VISITOR_DATA")&&k!=="visitor_id"&&Math.random()<.01&&T_(new g.jD("Missing VISITOR_DATA when sending innertube request.",k,N,a));if(!Z.isReady())throw Z=new g.jD("innertube xhrclient not ready",k,N,a),g.N2(Z),Z;const T={headers:a.headers||{},method:"POST",postParams:N,postBody:a.postBody,postBodyFormat:a.postBodyFormat||"JSON",onTimeout:()=>{a.onTimeout()},
onFetchTimeout:a.onTimeout,onSuccess:(r,C)=>{if(a.onSuccess)a.onSuccess(C)},
onFetchSuccess:r=>{if(a.onSuccess)a.onSuccess(r)},
onProgress:r=>{if(a.onProgress)a.onProgress(r)},
onError:(r,C)=>{if(a.onError)a.onError(C)},
onFetchError:r=>{if(a.onError)a.onError(r)},
timeout:a.timeout,withCredentials:!0,compress:a.compress};T.headers["Content-Type"]||(T.headers["Content-Type"]="application/json");N="";var K=Z.config_.j1;K&&(N=K);K=Z.config_.ZD||!1;const y=u9N(K,N,a);Object.assign(T.headers,y);T.headers.Authorization&&!N&&K&&(T.headers["x-origin"]=window.location.origin);const Q=AP(`${N}${`/${"youtubei"}/${Z.config_.innertubeApiVersion}/${k}`}`,{alt:"json"}),q=(r=!1)=>{try{if(r&&a.retry&&!a.networklessOptions.bypassNetworkless)T.method="POST",a.networklessOptions.writeThenSend?
eW().writeThenSend(Q,T):eW().sendAndWrite(Q,T);else if(a.compress)if(T.postBody){let C=T.postBody;typeof C!=="string"&&(C=JSON.stringify(T.postBody));fR(Q,C,T,g.SD)}else fR(Q,JSON.stringify(T.postParams),T,eD);else eD(Q,T)}catch(C){if(C.name==="InvalidAccessError")T_(Error("An extension is blocking network request."));else throw C;}};
g.Vf("ytNetworklessLoggingInitializationOptions")&&PmN.isNwlInitialized?olr().then(r=>{q(r)}):q(!1)};
g.Rj=function(Z,k,N){const a=g.zN();if(a&&k){const T=a.subscribe(Z,function(){const K=arguments,y=()=>{UX[T]&&k.apply&&typeof k.apply=="function"&&k.apply(N||window,K)};
try{g.bv[Z]?y():g.fb(y,0)}catch(Q){g.N2(Q)}},N);
UX[T]=!0;pR[Z]||(pR[Z]=[]);pR[Z].push(T);return T}return 0};
ciN=function(Z){const k=g.Rj("LOGGED_IN",function(N){Z.apply(void 0,arguments);g.M6(k)})};
g.M6=function(Z){const k=g.zN();k&&(typeof Z==="number"?Z=[Z]:typeof Z==="string"&&(Z=[parseInt(Z,10)]),g.pi(Z,N=>{k.unsubscribeByKey(N);delete UX[N]}))};
g.nR=function(Z,k){const N=g.zN();return N?N.publish.apply(N,arguments):!1};
def=function(Z){const k=g.zN();if(k)if(k.clear(Z),Z)H3y(Z);else for(let N in pR)H3y(N)};
g.zN=function(){return g.dX.ytPubsubPubsubInstance};
H3y=function(Z){pR[Z]&&(Z=pR[Z],g.pi(Z,k=>{UX[k]&&delete UX[k]}),Z.length=0)};
g.Ij=function(Z,k,N=null){Xiy(Z,k,N)};
Xiy=function(Z,k,N=null){const a=LDy(typeof Z==="string"?Z:Z.toString());let T=document.getElementById(a);var K=T&&o4G(T);const y=T&&!K;K?k&&k():(k&&(K=g.Rj(a,k),k=`${g.By(k)}`,Vuf[k]=K),y||(T=FDf(Z,a,()=>{o4G(T)||(ezr(T),g.nR(a),g.fb(()=>{def(a)},0))},N)))};
FDf=function(Z,k,N,a=null){const T=g.TU("SCRIPT");T.id=k;T.onload=()=>{N&&setTimeout(N,0)};
T.onreadystatechange=()=>{switch(T.readyState){case "loaded":case "complete":T.onload()}};
a&&T.setAttribute("nonce",a);g.ED(T,typeof Z==="string"?g.IW(Z):Z);Z=document.getElementsByTagName("head")[0]||document.body;Z.insertBefore(T,Z.firstChild);return T};
LDy=function(Z){const k=document.createElement("a");g.o2(k,Z);Z=k.href.replace(/^[a-zA-Z]+:\/\//,"//");return`js-${rJ(Z)}`};
jW=function(Z,k){if(Z===k)Z=!0;else if(Array.isArray(Z)&&Array.isArray(k))Z=g.uT(Z,k,jW);else if(g.lf(Z)&&g.lf(k))a:if(g.xa(Z).length!=g.xa(k).length)Z=!1;else{for(let N in Z)if(!jW(Z[N],k[N])){Z=!1;break a}Z=!0}else Z=!1;return Z};
Ys=function(Z,...k){if(!EX(Z)||k.some(N=>!EX(N)))throw Error("Only objects may be merged.");
for(const N of k)Wx(Z,N)};
Wx=function(Z,k){for(const N in k)if(EX(k[N])){if(N in Z&&!EX(Z[N]))throw Error("Cannot merge an object into a non-object.");N in Z||(Z[N]={});Wx(Z[N],k[N])}else if(ZF(k[N])){if(N in Z&&!ZF(Z[N]))throw Error("Cannot merge an array into a non-array.");N in Z||(Z[N]=[]);tuj(Z[N],k[N])}else Z[N]=k[N];return Z};
tuj=function(Z,k){for(const N of k)EX(N)?Z.push(Wx({},N)):ZF(N)?Z.push(tuj([],N)):Z.push(N);return Z};
EX=function(Z){return typeof Z==="object"&&!Array.isArray(Z)};
ZF=function(Z){return typeof Z==="object"&&Array.isArray(Z)};
hwr=function(Z,k){if(!k)return!1;for(let N=0;N<k.length;N++){const a=k.item(N);if(a&&Z.D.includes(a.identifier))return!0}return!1};
N$=function(Z){if(window.crypto&&window.crypto.getRandomValues)try{var k=Array(Z),N=new Uint8Array(Z);window.crypto.getRandomValues(N);for(var a=0;a<k.length;a++)k[a]=N[a];return k}catch(T){}k=Array(Z);for(N=0;N<Z;N++){a=Date.now();for(let T=0;T<a%23;T++)k[N]=Math.random();k[N]=Math.floor(Math.random()*256)}if(kd)for(N=1,a=0;a<kd.length;a++)k[N%Z]^=k[(N-1)%Z]/4^kd.charCodeAt(a),N++;return k};
g.av=function(Z){Z=N$(Z);const k=[];for(let N=0;N<Z.length;N++)k.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".charAt(Z[N]&63));return k.join("")};
g.uBy=function(){return g.ni(N$(16),Z=>(Z&15).toString(16)).join("")};
f5f=function(){({nT6:k=!1,Egt:Z=!0}={});var Z,k;if(g.Vf("_lact",window)==null){var N=parseInt(g.G("LACT"),10);N=isFinite(N)?Date.now()-Math.max(N,0):-1;g.X0("_lact",N,window);g.X0("_fact",N,window);N==-1&&Ti();l5N(k,Z);new Ev(()=>{Km("mouse",100)})}};
l5N=function(Z=!1,k=!0){var N=window;g.R6(N.document,"keydown",Ti);g.R6(N.document,"keyup",Ti);g.R6(N.document,"mousedown",Ti);g.R6(N.document,"mouseup",Ti);Z?g.R6(N,"touchmove",()=>{Km("touchmove",200)},{passive:!0}):(g.R6(N,"resize",()=>{Km("resize",200)}),k&&g.R6(N,"scroll",()=>{Km("scroll",200)}));
g.R6(N.document,"touchstart",Ti,{passive:!0});g.R6(N.document,"touchend",Ti,{passive:!0})};
Km=function(Z,k){yb[Z]||(yb[Z]=!0,g.g3.IU(()=>{Ti();yb[Z]=!1},k))};
Ti=function(){g.Vf("_lact",window)==null&&(f5f(),g.Vf("_lact",window));var Z=Date.now();g.X0("_lact",Z,window);g.Vf("_fact",window)==-1&&g.X0("_fact",Z,window);(Z=g.Vf("ytglobal.ytUtilActivityCallback_"))&&Z()};
Qb=function(){const Z=g.Vf("_lact",window);return Z==null?-1:Math.max(Date.now()-Z,0)};
r6=function(Z){return new q$(Z)};
Cm=function(Z,k){Z.U.set(k.u9,k);const N=Z.D.get(k.u9);if(N)try{N.E1(Z.resolve(k.u9))}catch(a){N.bT(a)}};
sn=function(Z,k,N,a=!1){if(N.indexOf(k)>-1)throw Error(`Deps cycle for: ${k}`);if(Z.V.has(k))return Z.V.get(k);if(!Z.U.has(k)){if(a)return;throw Error(`No provider for: ${k}`);}a=Z.U.get(k);N.push(k);if(a.Ue!==void 0)var T=a.Ue;else if(a.Jw)T=a[mo]?BKy(Z,a[mo],N):[],T=a.Jw(...T);else if(a.pu){T=a.pu;const K=T[mo]?BKy(Z,T[mo],N):[];T=new T(...K)}else throw Error(`Could not resolve providers for: ${k}`);N.pop();a.QJ6||Z.V.set(k,T);return T};
BKy=function(Z,k,N){return k?k.map(a=>a instanceof q$?sn(Z,a.key,N,!0):sn(Z,a,N)):[]};
Pu=function(){A6||(A6=new Def);return A6};
vSi=function(){var Z=O3U;return()=>{const k=Pu();k.resolve(r6(Z))||Cm(k,{u9:Z,pu:Z,[mo]:void 0});return k.resolve(Z)}};
Hu=function(){return"h5vcc"in cu&&cu.h5vcc.traceEvent?.traceBegin&&cu.h5vcc.traceEvent?.traceEnd?1:"performance"in cu&&cu.performance.mark&&cu.performance.measure?2:0};
d6=function(Z){const k=Hu();switch(k){case 1:cu.h5vcc.traceEvent.traceBegin("YTLR",Z);break;case 2:cu.performance.mark(`${Z}-start`);break;case 0:break;default:J3(k,"unknown trace type")}};
i3y=function(Z){var k=Hu();switch(k){case 1:cu.h5vcc.traceEvent.traceEnd("YTLR",Z);break;case 2:k=`${Z}-start`;const N=`${Z}-end`;cu.performance.mark(N);cu.performance.measure(Z,k,N);break;case 0:break;default:J3(k,"unknown trace type")}};
gSr=function(Z){var k=Array.from(Z.V.keys()).sort((N,a)=>(Z.V[a].priority??0)-(Z.V[N].priority??0));
for(const N of k)k=Z.V[N],k.jobId===void 0||k.hs||(Z.scheduler.Ux(k.jobId),P9(k.Tn,10))};
$eN=function(Z,k,N){wib&&console.groupCollapsed&&console.groupEnd&&(console.groupCollapsed(`[${Z.constructor.name}] '${Z.state}' to '${k}'`),console.log("with message: ",N),console.groupEnd())};
ewi=function(Z,k){const N=k.filter(T=>(Z.U??T.priority??0)===10),a=k.filter(T=>(Z.U??T.priority??0)!==10);
return Z.Y.ZNm?async(...T)=>{await xeX(N,...T);GFy(Z,a,...T)}:(...T)=>{SGj(N,...T);
GFy(Z,a,...T)}};
xeX=async function(Z,...k){g.dO();for(const N of Z){let a;q3y(()=>{X4(N.name);const T=Lm(()=>N.callback(...k));
Vb(T)?a=g.ii("web_lifecycle_error_handling_killswitch")?T.then(()=>{F4(N.name)}):T.then(()=>{F4(N.name)},K=>{window.onerror?.(K.message,"",0,0,K);
F4(N.name)}):F4(N.name)});
a&&await a}};
GFy=function(Z,k,...N){k=k.map(a=>({Tn:()=>{X4(a.name);Lm(()=>a.callback(...N));
F4(a.name)},
priority:Z.U??a.priority??0}));
k.length&&(Z.D=new oS0(k))};
SGj=function(Z,...k){g.dO();for(const N of Z)q3y(()=>{X4(N.name);Lm(()=>N.callback(...k));
F4(N.name)})};
X4=function(Z){t6&&Z&&d6(Z)};
F4=function(Z){t6&&Z&&i3y(Z)};
Lm=function(Z){if(g.ii("web_lifecycle_error_handling_killswitch"))return Z();try{return Z()}catch(k){window.onerror?.(k.message,"",0,0,k)}};
zwU=function(){h6||(h6=new Jiy);return h6};
Uef=function(){ud||(ud=RW(g.G("WORKER_SERIALIZATION_URL")));return ud||void 0};
b3U=function(){const Z=Uef();ld||Z===void 0||(ld=Tm(Z));return ld};
DF=function(Z,k){const N=fm(k);if(Z.U[N])return Z.U[N];const a=Object.keys(Z.store)||[];if(a.length<=1&&fm(k)===a[0])return a;const T=[];for(let y=0;y<a.length;y++){const Q=a[y].split("/");if(Bu(k.auth,Q[0])){var K=k.isJspb;Bu(K===void 0?"undefined":K?"true":"false",Q[1])&&Bu(k.cttAuthInfo,Q[2])&&(K=k.tier,K=K===void 0?"undefined":JSON.stringify(K),Bu(K,Q[3])&&T.push(a[y]))}}return Z.U[N]=T};
Bu=function(Z,k){return Z===void 0||Z==="undefined"?!0:Z===k};
fm=function(Z){return[Z.auth===void 0?"undefined":Z.auth,Z.isJspb===void 0?"undefined":Z.isJspb,Z.cttAuthInfo===void 0?"undefined":Z.cttAuthInfo,Z.tier===void 0?"undefined":Z.tier].join("/")};
vu=function(){let Z=g.Vf("yt.logging.ims");Z||(Z=new On,g.X0("yt.logging.ims",Z));return Z};
Muy=function(){if(typeof Worker==="function"&&Uef()&&!piy){var Z=N=>{N=N.data;if(N.op==="serializedGelBatch"){var a=id.get(N.key);a&&(RwR(N.serializedBatch,a.client,a.resolve,a.networklessOptions,a.isIsolated,a.useVSSEndpoint,a.dangerousLogToVisitorSession,a.requestsOutstanding),id.delete(N.key))}},k=b3U();
k&&(k.addEventListener("message",Z),k.onerror=()=>{id.clear()});
piy=!0}};
YGb=function(Z,k){if(Z.endpoint==="log_event"){g6(Z);var N=w6(Z),a=nSX(Z.payload)||"",T=I5b(a),K=200;if(T){if(T.enabled===!1&&!g.ii("web_payload_policy_disabled_killswitch"))return;K=jsy(T.tier);if(K===400){ESf(Z,k);return}}$d[N]=!0;N={cttAuthInfo:N,isJspb:!1,tier:K};vu().storePayload(N,Z.payload);WDy(k,!1,N,xd(a))}};
k2r=function(Z,k,N){if(k.endpoint==="log_event"){g6(void 0,k);var a=w6(k,!0),T=I5b(Z),K=200;if(T){if(T.enabled===!1&&!g.ii("web_payload_policy_disabled_killswitch"))return;K=jsy(T.tier);if(K===400){ZMf(Z,k,N);return}}$d[a]=!0;a={cttAuthInfo:a,isJspb:!0,tier:K};vu().storePayload(a,TJ(k.payload));WDy(N,!0,a,xd(Z))}};
WDy=function(Z,k=!1,N,a=!1){Z&&(Gi=new Z);Z=gu("tvhtml5_logging_max_batch_ads_fork")||gu("tvhtml5_logging_max_batch")||gu("web_logging_max_batch")||100;const T=(0,g.z)(),K=S1(k,N.tier),y=K.Y;a&&(K.D=!0);a=0;N&&(a=vu().getSequenceCount(N));a>=1E3?e1("CODE_SECTION_FLUSH_LOGS_ON_HARD_MAX_QUEUE_SIZE",{writeThenSend:!0},k,N.tier):a>=Z?ov||(ov=J6(()=>{e1("CODE_SECTION_FLUSH_LOGS_ON_MAX_QUEUE_SIZE",{writeThenSend:!0},k,N.tier);ov=void 0},0)):T-y>=10&&(N1f(k,N.tier),K.Y=T)};
ESf=function(Z,k){if(Z.endpoint==="log_event"){g.ii("more_accurate_gel_parser")&&vu().storePayload({isJspb:!1},Z.payload);g6(Z);var N=w6(Z),a=new Map;a.set(N,[Z.payload]);var T=nSX(Z.payload)||"";k&&(Gi=new k);return new g.v2((K,y)=>{Gi&&Gi.isReady()?aMN(a,Gi,K,y,{bypassNetworkless:!0},!0,xd(T)):K()})}};
ZMf=function(Z,k,N){if(k.endpoint==="log_event"){g6(void 0,k);var a=w6(k,!0),T=new Map;T.set(a,[TJ(k.payload)]);N&&(Gi=new N);return new g.v2(K=>{Gi&&Gi.isReady()?T1y(T,Gi,K,{bypassNetworkless:!0},!0,xd(Z)):K()})}};
w6=function(Z,k=!1){var N="";if(Z.dangerousLogToVisitorSession)N="visitorOnlyApprovedKey";else if(Z.cttAuthInfo){if(k){k=Z.cttAuthInfo.token;N=Z.cttAuthInfo;const a=new KWN;N.videoId?a.setVideoId(N.videoId):N.playlistId&&GJ(a,2,zi,zX(N.playlistId));Un[k]=a}else k=Z.cttAuthInfo,N={},k.videoId?N.videoId=k.videoId:k.playlistId&&(N.playlistId=k.playlistId),bd[Z.cttAuthInfo.token]=N;N=Z.cttAuthInfo.token}return N};
e1=function(Z,k={},N=!1,a){if(g.ii("enable_flush_logs_call_source_trace")){let T=Z;Z===void 0&&(T=pm?"CODE_SECTION_FLUSH_LOGS_ON_THE_FIRST_TIME_AFTER_STARTUP":"CODE_SECTION_UNSPECIFIED");$d[""]=!0;vu().storePayload({cttAuthInfo:"",isJspb:!1,tier:200},{eventTimeMs:Math.round((0,g.z)()),context:{lastActivityMs:String(Qb())},tvhtml5StabilityTraceEvent:{codeSection:T}})}new g.v2((T,K)=>{const y=S1(N,a),Q=y.D;y.D=!1;Rv(y.U);Rv(y.V);y.V=0;Gi&&Gi.isReady()?a===void 0&&g.ii("enable_web_tiered_gel")?y2f(T,
K,k,N,300,Q):y2f(T,K,k,N,a,Q):(N1f(N,a),T())})};
y2f=function(Z,k,N={},a=!1,T=200,K=!1){var y=Gi,Q=new Map;const q=new Map,r={isJspb:a,cttAuthInfo:void 0,tier:T},C={isJspb:a,cttAuthInfo:void 0};if(a){for(const m of Object.keys($d))k=g.ii("enable_web_tiered_gel")?vu().smartExtractMatchingEntries({keys:[r,C],sizeLimit:1E3}):vu().extractMatchingEntries({isJspb:!0,cttAuthInfo:m}),k.length>0&&Q.set(m,k),(g.ii("web_fp_via_jspb_and_json")&&N.writeThenSend||!g.ii("web_fp_via_jspb_and_json"))&&delete $d[m];T1y(Q,y,Z,N,!1,K)}else{for(const m of Object.keys($d))Q=
g.ii("enable_web_tiered_gel")?vu().smartExtractMatchingEntries({keys:[{isJspb:!1,cttAuthInfo:m,tier:T},{isJspb:!1,cttAuthInfo:m}],sizeLimit:1E3}):vu().extractMatchingEntries({isJspb:!1,cttAuthInfo:m}),Q.length>0&&q.set(m,Q),(g.ii("web_fp_via_jspb_and_json")&&N.writeThenSend||!g.ii("web_fp_via_jspb_and_json"))&&delete $d[m];aMN(q,y,Z,k,N,!1,K)}};
N1f=function(Z=!1,k=200){const N=()=>{e1("CODE_SECTION_FLUSH_LOGS_ON_DEBOUNCE_LOGS_QUEUE",{writeThenSend:!0},Z,k)},a=S1(Z,k);
var T=a===Qlr||a===qIr?5E3:r2f;g.ii("web_gel_timeout_cap")&&!a.V&&(T=J6(()=>{N()},T),a.V=T);
Rv(a.U);T=g.G("LOGGING_BATCH_TIMEOUT",gu("web_gel_debounce_ms",1E4));g.ii("shorten_initial_gel_batch_timeout")&&pm&&(T=CUb);T=J6(()=>{gu("gel_min_batch_size")>0?vu().getSequenceCount({cttAuthInfo:void 0,isJspb:Z,tier:k})>=m1N&&N():N()},T);
a.U=T};
aMN=function(Z,k,N,a,T={},K,y){const Q=Math.round((0,g.z)());let q=Z.size;const r=slb(y);for(const [C,m]of Z){Z=C;y=m;const A=g.MF({context:g.Px(k.config_||g.Ah())});if(!g.uf(y)&&!g.ii("throw_err_when_logevent_malformed_killswitch")){a();break}A.events=y;(y=bd[Z])&&A2X(A,Z,y);delete bd[Z];const P=Z==="visitorOnlyApprovedKey";PUy(A,Q,P);c2N(T);const d=v=>{g.ii("start_client_gcf")&&g.g3.IU(async()=>{await HMi(v)});
q--;q||N()};
let h=0;const B=()=>{h++;if(T.bypassNetworkless&&h===1)try{g.Jh(k,r,A,M$({writeThenSend:!0},P,d,B,K)),pm=!1}catch(v){g.N2(v),a()}q--;q||N()};
try{g.Jh(k,r,A,M$(T,P,d,B,K)),pm=!1}catch(v){g.N2(v),a()}}};
T1y=function(Z,k,N,a={},T,K){const y=Math.round((0,g.z)()),Q={value:Z.size};var q=new Map([...Z]);for(const [B]of q){var r=B,C=Z.get(r);q=new g.nm;var m=k.config_||g.Ah(),A=new Iv,P=new d1b;Q3(P,1,m.CL);Q3(P,2,m.Zq);rs(P,16,m.tj);Q3(P,17,m.innertubeContextClientVersion);if(m.L_){var d=m.L_,h=new d2;d.coldConfigData&&Q3(h,1,d.coldConfigData);d.appInstallData&&Q3(h,6,d.appInstallData);d.coldHashData&&Q3(h,3,d.coldHashData);d.hotHashData&&h.tB(d.hotHashData);jt(P,d2,62,h)}(d=g.dX.devicePixelRatio)&&
d!=1&&VX(P,65,PR(d));d=wu();d!==""&&Q3(P,54,d);d=$6();if(d.length>0){h=new Xjf;for(let v=0;v<d.length;v++){const O=new LWb;Q3(O,1,d[v].key);GJ(O,2,VRf,zX(d[v].value));Yl(h,15,LWb,O)}jt(A,Xjf,5,h)}cZG(m,P);H_N(A);d7f(P);X4y(m,P);Lci(P);g.ii("start_client_gcf")&&VCb(P);g.G("DELEGATED_SESSION_ID")&&!g.ii("pageid_as_header_web")&&(m=new j1,Q3(m,3,g.G("DELEGATED_SESSION_ID")));!g.ii("fill_delegate_context_in_gel_killswitch")&&(d=g.G("INNERTUBE_CONTEXT_SERIALIZED_DELEGATION_CONTEXT"))&&(h=pk(A,j1,3)||new j1,
m=A,d=Q3(h,18,d),jt(m,j1,3,d));m=P;d=g.G("DEVICE","");for(const [v,O]of Object.entries(q2(d)))d=v,h=O,d==="cbrand"?Q3(m,12,h):d==="cmodel"?Q3(m,13,h):d==="cbr"?Q3(m,87,h):d==="cbrver"?Q3(m,88,h):d==="cos"?Q3(m,18,h):d==="cosver"?Q3(m,19,h):d==="cplatform"&&rs(m,42,Zkf(h));A.D(P);jt(q,Iv,1,A);if(P=Un[r])a:{if(P.S9())A=1;else if(P.getPlaylistId())A=2;else break a;jt(q,KWN,4,P);P=pk(q,Iv,1)||new Iv;m=pk(P,j1,3)||new j1;d=new FWy;d.setToken(r);rs(d,1,A);Yl(m,12,FWy,d);jt(P,j1,3,m)}delete Un[r];r=r===
"visitorOnlyApprovedKey";En()||y3(q,2,y);!r&&(A=g.G("EVENT_ID"))&&(P=tRf(),m=new hrb,Q3(m,1,A),y3(m,2,P),jt(q,hrb,5,m));c2N(a);if(g.ii("jspb_serialize_with_worker")&&(A=b3U())&&a.writeThenSend){id.set(Wu,{client:k,resolve:N,networklessOptions:a,isIsolated:T,useVSSEndpoint:K,dangerousLogToVisitorSession:r,requestsOutstanding:Q});A.postMessage({op:"gelBatchToSerialize",batchRequest:TJ(q),clientEvents:C,key:Wu});Wu++;break}if(C){A=[];for(P=0;P<C.length;P++)try{A.push(new Yd(C[P]))}catch{g.N2(new g.jD("Transport failed to deserialize "+
String(C[P])))}C=A}else C=[];for(const v of C)Yl(q,3,Yd,v);C={startTime:(0,g.z)(),ticks:{},infos:{}};q=q.W9();C.ticks.geljspc=(0,g.z)();g.ii("log_jspb_serialize_latency")&&lv("gel_jspb_serialize",C,{sampleRate:.1});RwR(q,k,N,a,T,K,r,Q)}};
RwR=function(Z,k,N,a={},T,K,y,Q={value:0}){K=slb(K);a=M$(a,y,q=>{g.ii("start_client_gcf")&&g.g3.IU(async()=>{await HMi(q)});
Q.value--;Q.value||N()},()=>{Q.value--;
Q.value||N()},T);
a.headers["Content-Type"]="application/json+protobuf";a.postBodyFormat="JSPB";a.postBody=Z;g.Jh(k,K,"",a);pm=!1};
c2N=function(Z){g.ii("always_send_and_write")&&(Z.writeThenSend=!1)};
M$=function(Z,k,N,a,T){Z={retry:!0,onSuccess:N,onError:a,networklessOptions:Z,dangerousLogToVisitorSession:k,q3D:!!T,headers:{},postBodyFormat:"",postBody:"",compress:g.ii("compress_gel")||g.ii("compress_gel_lr")};En()&&(Z.headers["X-Goog-Request-Time"]=JSON.stringify(Math.round((0,g.z)())));return Z};
PUy=function(Z,k,N){En()||(Z.requestTimeMs=String(k));g.ii("unsplit_gel_payloads_in_logs")&&(Z.unsplitGelPayloadsInLogs=!0);!N&&(k=g.G("EVENT_ID"))&&(N=tRf(),Z.serializedClientEventId={serializedEventId:k,clientCounter:String(N)})};
tRf=function(){let Z=g.G("BATCH_CLIENT_COUNTER")||0;Z||(Z=Math.floor(Math.random()*65535/2));Z++;Z>65535&&(Z=1);YA("BATCH_CLIENT_COUNTER",Z);return Z};
A2X=function(Z,k,N){let a;if(N.videoId)a="VIDEO";else if(N.playlistId)a="PLAYLIST";else return;Z.credentialTransferTokenTargetId=N;Z.context=Z.context||{};Z.context.user=Z.context.user||{};Z.context.user.credentialTransferTokens=[{token:k,scope:a}]};
g6=function(Z,k){var N=g.Vf("yt.logging.transport.enableScrapingForTest"),a=v8("il_payload_scraping");a=(a!==void 0?String(a):"")==="enable_il_payload_scraping";if(!N)if(a)ZS=[],g.X0("yt.logging.transport.enableScrapingForTest",!0),g.X0("yt.logging.transport.scrapedPayloadsForTesting",ZS),g.X0("yt.logging.transport.payloadToScrape","visualElementShown visualElementHidden visualElementAttached screenCreated visualElementGestured visualElementStateChanged".split(" ")),g.X0("yt.logging.transport.getScrapedPayloadFromClientEventsFunction"),
g.X0("yt.logging.transport.scrapeClientEvent",!0);else return;N=g.Vf("yt.logging.transport.scrapedPayloadsForTesting");a=g.Vf("yt.logging.transport.payloadToScrape");k&&(k=k.payload,(k=g.Vf("yt.logging.transport.getScrapedPayloadFromClientEventsFunction").bind(k)())&&N.push(k));k=g.Vf("yt.logging.transport.scrapeClientEvent");if(a&&a.length>=1)for(let T=0;T<a.length;T++)Z&&Z.payload[a[T]]&&(k?N.push(Z.payload):N.push((Z?.payload)[a[T]]));g.X0("yt.logging.transport.scrapedPayloadsForTesting",N)};
En=function(){return g.ii("use_request_time_ms_header")||g.ii("lr_use_request_time_ms_header")};
J6=function(Z,k){return g.ii("transport_use_scheduler")===!1?g.fb(Z,k):g.ii("logging_avoid_blocking_during_navigation")||g.ii("lr_logging_avoid_blocking_during_navigation")?g.c9(0,()=>{zwU().currentState==="none"?Z():zwU().install({none:{callback:Z}})},k):P9(Z,0,k)};
Rv=function(Z){g.ii("transport_use_scheduler")?g.g3.Ux(Z):g.DA(Z)};
HMi=async function(Z){Z=Z?.responseContext?.globalConfigGroup;var k=g.J(Z,uuf),N=Z?.hotHashData;const a=g.J(Z,lMN),T=Z?.coldHashData,K=Pu().resolve(r6(QW));K&&(N&&(k?await m7y(K,N,k):await m7y(K,N)),T&&(a?await szG(K,T,a):await szG(K,T)));k=Z?.rawFinchStaticConfigGroup;(Z=Z?.finchStaticHashData)?(N=Pu().resolve(r6(fMj)))?await N.qPX({config:k||{},U43:Z||""}):(k||Z)&&T_(new g.jD("FinchConfigManagerService is not present, but Finch config data is present.")):k&&T_(new g.jD("Finch config data is present, but hash is missing."))};
S1=function(Z,k=200){return Z?k===300?Qlr:B1b:k===300?qIr:D1i};
I5b=function(Z){if(g.ii("enable_web_tiered_gel")){Z=OMf[Z||""];var k=Pu().resolve(r6(QW))?.kC()?.loggingHotConfig?.eventLoggingConfig?.payloadPolicies;if(k)for(let N=0;N<k.length;N++)if(k[N].payloadNumber===Z)return k[N]}};
nSX=function(Z){Z=Object.keys(Z);for(const k of Z)if(OMf[k])return k};
jsy=function(Z){switch(Z){case "DELAYED_EVENT_TIER_UNSPECIFIED":return 0;case "DELAYED_EVENT_TIER_DEFAULT":return 100;case "DELAYED_EVENT_TIER_DISPATCH_TO_EMPTY":return 200;case "DELAYED_EVENT_TIER_FAST":return 300;case "DELAYED_EVENT_TIER_IMMEDIATE":return 400;default:return 200}};
xd=function(Z){return Z==="gelDebuggingEvent"};
slb=function(Z=!1){return Z&&g.ii("vss_through_gel_video_stats")?"video_stats":"log_event"};
NP=function(Z,k,N,a={}){const T={},K=Math.round(a.timestamp||(0,g.z)());T.eventTimeMs=K<Number.MAX_SAFE_INTEGER?K:0;T[Z]=k;Z=Qb();T.context={lastActivityMs:String(a.timestamp||!isFinite(Z)?-1:Z)};a.sequenceGroup&&!g.ii("web_gel_sequence_info_killswitch")&&(Z=T.context,k=a.sequenceGroup,k={index:vXf(k),groupKey:k},Z.sequence=k,a.endOfSequence&&delete kL[a.sequenceGroup]);g.ii("web_tag_automated_log_events")&&(T.context.automatedLogEventSource=a.automatedLogEventSource);(a.sendIsolatedPayload?ESf:YGb)({endpoint:"log_event",
payload:T,cttAuthInfo:a.cttAuthInfo,dangerousLogToVisitorSession:a.dangerousLogToVisitorSession},N)};
iMf=function(Z="CODE_SECTION_UNSPECIFIED",k=!1){e1(Z,void 0,k)};
vXf=function(Z){kL[Z]=Z in kL?kL[Z]+1:0;return kL[Z]};
g.TO=function(Z,k,N={}){let a=g.aE;g.G("ytLoggingEventsDefaultDisabled",!1)&&g.aE===g.aE&&(a=null);NP(Z,k,a,N)};
g.yz=function(Z){return new K9({trackingParams:Z})};
Qz=function(Z,k,N,a,T,K){const y=gXN++;return new K9({veType:Z,veCounter:y,elementIndex:N,dataElement:k,youtubeData:a,jspbYoutubeData:T,loggingDirectives:K})};
wjU=function(Z=0){return g.G("client-screen-nonce-store",{})[Z]};
$1y=function(Z,k=0){let N=g.G("client-screen-nonce-store");N||(N={},YA("client-screen-nonce-store",N));N[k]=Z};
qP=function(Z=0){return Z===0?"ROOT_VE_TYPE":`${"ROOT_VE_TYPE"}.${Z}`};
x1N=function(Z=0){return g.G(qP(Z))};
g.rl=function(Z=0){return(Z=x1N(Z))?new K9({veType:Z,youtubeData:void 0,jspbYoutubeData:void 0}):null};
G2j=function(){let Z=g.G("csn-to-ctt-auth-info");Z||(Z={},YA("csn-to-ctt-auth-info",Z));return Z};
SIy=function(){return Object.values(g.G("client-screen-nonce-store",{})).filter(Z=>Z!==void 0)};
g.C9=function(Z=0){Z=wjU(Z);if(!Z&&!g.G("USE_CSN_FALLBACK",!0))return null;Z||(Z="UNDEFINED_CSN");return Z?Z:null};
oX0=function(Z){for(const k of Object.values(erj))if(g.C9(k)===Z)return!0;return!1};
J2r=function(Z,k,N){const a=G2j();(N=g.C9(N))&&delete a[N];k&&(a[Z]=k)};
mf=function(Z){return G2j()[Z]};
U1R=function(Z,k,N=0,a){if(Z!==wjU(N)||k!==g.G(qP(N)))if(J2r(Z,a,N),$1y(Z,N),YA(qP(N),k),k=()=>{setTimeout(()=>{Z&&g.TO("foregroundHeartbeatScreenAssociated",{clientDocumentNonce:zr0,clientScreenNonce:Z})},0)},"requestAnimationFrame"in window)try{window.requestAnimationFrame(k)}catch(T){k()}else k()};
s5=function(Z,k){var N=g.G("VALID_SESSION_TEMPDATA_DOMAINS",[]),a=g.kX(window.location.href);a&&N.push(a);a=g.kX(Z);if(g.KK(N,a)||!a&&Za(Z,"/"))if(N=document.createElement("a"),g.o2(N,Z),Z=N.href)if(Z=T2(Z),Z=KM(Z))if(!k.csn&&(k.itct||k.ved)&&(k=Object.assign({csn:g.C9()},k)),T){var T=parseInt(T,10);isFinite(T)&&T>0&&bMX(Z,k,T)}else bMX(Z,k)};
bMX=function(Z,k,N){Z=pjy(Z);k=k?g.CM(k):"";N=N||5;fE()&&g.NS(Z,k,N)};
pjy=function(Z){for(let k of Rry)Z=Hj(Z,k);return"ST-"+rJ(Z).toString(36)};
MRi=function(Z){if(Z.name==="JavaException")return!0;Z=Z.stack;return Z.includes("chrome://")||Z.includes("-extension://")||Z.includes("webkit-masked-url://")};
nXy=function(Z){if(!Z.stack)return!0;const k=!Z.stack.includes("\n");return k&&Z.stack.includes("ErrorType: ")||k&&Z.stack.includes("Anonymous function (Unknown script")||Z.stack.toLowerCase()==="not available"||Z.fileName==="user-script"||Z.fileName.startsWith("user-script:")?!0:!1};
Pg=function(){if(!An){var Z=An=new IMb;Z.yP.length=0;Z.Ej.length=0;jli(Z,EX0)}return An};
jli=function(Z,k){k.yP&&Z.yP.unshift.apply(Z.yP,k.yP);k.Ej&&Z.Ej.unshift.apply(Z.Ej,k.Ej)};
WWX=function(Z){const k=Z.length;let N=0;const a=()=>Z.charCodeAt(N++);
do{var T=cg(a);if(T===Infinity)break;const K=T>>3;switch(T&7){case 0:T=cg(a);if(K===2)return T;break;case 1:if(K===2)return;N+=8;break;case 2:T=cg(a);if(K===2)return Z.substr(N,T);N+=T;break;case 5:if(K===2)return;N+=4;break;default:return}}while(N<k)};
cg=function(Z){let k=Z(),N=k&127;if(k<128)return N;k=Z();N|=(k&127)<<7;if(k<128)return N;k=Z();N|=(k&127)<<14;if(k<128)return N;k=Z();return k<128?N|(k&127)<<21:Infinity};
YIj=function(Z,k,N,a){if(Z)if(Array.isArray(Z)){var T=a;for(a=0;a<Z.length&&!(Z[a]&&(T+=Hg(a,Z[a],k,N),T>500));a++);a=T}else if(typeof Z==="object")for(T in Z){if(Z[T]){a:{var K=T;var y=Z[T],Q=k,q=N;if(typeof y!=="string"||K!=="clickTrackingParams"&&K!=="trackingParams"){K=0;break a}K=(y=WWX(atob(y.replace(/-/g,"+").replace(/_/g,"/"))))?Hg(`${K}.ve`,y,Q,q):0}a+=K;a+=Hg(T,Z[T],k,N);if(a>500)break}}else N[k]=dl(Z),a+=N[k].length;else N[k]=dl(Z),a+=N[k].length;return a};
Hg=function(Z,k,N,a){N+=`.${Z}`;Z=dl(k);a[N]=Z;return N.length+Z.length};
dl=function(Z){try{return(typeof Z==="string"?Z:String(JSON.stringify(Z))).substr(0,500)}catch(k){return`unable to serialize ${typeof Z} (${k.message})`}};
Xf=function(Z){g.b(Z)};
g.L9=function(Z){g.b(Z,"WARNING")};
g.b=function(Z,k="ERROR"){var N={};N.name=g.G("INNERTUBE_CONTEXT_CLIENT_NAME",1);N.version=g.G("INNERTUBE_CONTEXT_CLIENT_VERSION");ZHf(Z,N,k)};
ZHf=function(Z,k,N="ERROR"){if(Z){Z.hasOwnProperty("level")&&Z.level&&(N=Z.level);if(g.ii("console_log_js_exceptions")||["test","dev","autopush","staging"].includes(g.G("SERVER_VERSION"))){var a=[];a.push(`Name: ${Z.name}`);a.push(`Message: ${Z.message}`);Z.hasOwnProperty("params")&&a.push(`Error Params: ${JSON.stringify(Z.params)}`);Z.hasOwnProperty("args")&&a.push(`Error args: ${JSON.stringify(Z.args)}`);a.push(`File name: ${Z.fileName}`);a.push(`Stacktrace: ${Z.stack}`);window.console.log(a.join("\n"),
Z)}if(!(kgf>=5)){a=[];for(T of Noy)try{T()&&a.push(T())}catch(d){}var T=a;T=[...apf,...T];var K=DRy(Z);a=K.message||"Unknown Error";const A=K.name||"UnknownError";var y=K.stack||Z.U||"Not available";if(y.startsWith(`${A}: ${a}`)){var Q=y.split("\n");Q.shift();y=Q.join("\n")}Q=K.lineNumber||"Not available";K=K.fileName||"Not available";let P=0;if(Z.hasOwnProperty("args")&&Z.args&&Z.args.length)for(var q=0;q<Z.args.length&&!(P=YIj(Z.args[q],`params.${q}`,k,P),P>=500);q++);else if(Z.hasOwnProperty("params")&&
Z.params){const d=Z.params;if(typeof Z.params==="object")for(q in d){if(!d[q])continue;const h=`params.${q}`,B=dl(d[q]);k[h]=B;P+=h.length+B.length;if(P>500)break}else k.params=dl(d)}if(T.length)for(q=0;q<T.length&&!(P=YIj(T[q],`params.context.${q}`,k,P),P>=500);q++);navigator.vendor&&!k.hasOwnProperty("vendor")&&(k["device.vendor"]=navigator.vendor);k={message:a,name:A,lineNumber:Q,fileName:K,stack:y,params:k,sampleWeight:1};q=Number(Z.columnNumber);isNaN(q)||(k.lineNumber=`${k.lineNumber}:${q}`);
if(Z.level==="IGNORED")var r=0;else a:{Z=Pg();for(r of Z.yP)if(k.message&&k.message.match(r.Rr)){r=r.weight;break a}for(var C of Z.Ej)if(C.callback(k)){r=C.weight;break a}r=1}k.sampleWeight=r;r=k;for(var m of Toy){if(!m.rL[r.name])continue;C=m.rL[r.name];for(const d of C){C=r.message.match(d.NK);if(!C)continue;r.params["params.error.original"]=C[0];Z=d.groups;k={};for(q=0;q<Z.length;q++)k[Z[q]]=C[q+1],r.params[`params.error.${Z[q]}`]=C[q+1];r.message=m.Ff(k);break}}r.params||(r.params={});m=Pg();
r.params["params.errorServiceSignature"]=`msg=${m.yP.length}&cb=${m.Ej.length}`;r.params["params.serviceWorker"]="false";g.dX.document&&g.dX.document.querySelectorAll&&(r.params["params.fscripts"]=String(document.querySelectorAll("script:not([nonce])").length));(new Vz(Ff,"sample")).constructor!==Vz&&(r.params["params.fconst"]="true");window.yterr&&typeof window.yterr==="function"&&window.yterr(r);r.sampleWeight===0||K$f.has(r.message)||yBf(r,N)}}};
yBf=function(Z,k="ERROR"){if(k==="ERROR"){tn.publish("handleError",Z);if(g.ii("record_app_crashed_web")&&Q8f===0&&Z.sampleWeight===1){Q8f++;var N={appCrashType:"APP_CRASH_TYPE_BREAKPAD"};g.ii("report_client_error_with_app_crash_ks")||(N.systemHealth={crashData:{clientError:{logMessage:{message:Z.message}}}});g.TO("appCrashed",N)}q_b++}else k==="WARNING"&&tn.publish("handleWarning",Z);if(g.ii("kevlar_gel_error_routing")){N={};b:{for(a of rBX)if(g.A5(a.toLowerCase())){var a=!0;break b}a=!1}if(a)N=void 0;
else{var T={stackTrace:Z.stack};Z.fileName&&(T.filename=Z.fileName);a=Z.lineNumber&&Z.lineNumber.split?Z.lineNumber.split(":"):[];a.length!==0&&(a.length!==1||isNaN(Number(a[0]))?a.length!==2||isNaN(Number(a[0]))||isNaN(Number(a[1]))||(T.lineNumber=Number(a[0]),T.columnNumber=Number(a[1])):T.lineNumber=Number(a[0]));a={level:"ERROR_LEVEL_UNKNOWN",message:Z.message,errorClassName:Z.name,sampleWeight:Z.sampleWeight};k==="ERROR"?a.level="ERROR_LEVEL_ERROR":k==="WARNING"&&(a.level="ERROR_LEVEL_WARNNING");
T={isObfuscated:!0,browserStackInfo:T};N.pageUrl=window.location.href;N.kvPairs=[];g.G("FEXP_EXPERIMENTS")&&(N.experimentIds=g.G("FEXP_EXPERIMENTS"));var K=g.G("LATEST_ECATCHER_SERVICE_TRACKING_PARAMS");if(!ZA("web_disable_gel_stp_ecatcher_killswitch")&&K)for(var y of Object.keys(K))N.kvPairs.push({key:y,value:String(K[y])});if(y=Z.params)for(var Q of Object.keys(y))N.kvPairs.push({key:`client.${Q}`,value:String(y[Q])});Q=g.G("SERVER_NAME");y=g.G("SERVER_VERSION");Q&&y&&(N.kvPairs.push({key:"server.name",
value:Q}),N.kvPairs.push({key:"server.version",value:y}));(Q=g.G("PLAYER_CLIENT_VERSION"))&&N.kvPairs.push({key:"client.player.version",value:Q});N={errorMetadata:N,stackTrace:T,logMessage:a}}if(N&&(g.TO("clientError",N),k==="ERROR"||g.ii("errors_flush_gel_always_killswitch")))a:{if(g.ii("web_fp_via_jspb")){N=CYy;CYy=[];if(N)for(var q of N)NP(q.payloadName,q.payload,g.aE,q.options);iMf(void 0,!0);if(!g.ii("web_fp_via_jspb_and_json"))break a}iMf()}}if(!g.ii("suppress_error_204_logging")){q=Z.params||
{};k={urlParams:{a:"logerror",t:"jserror",type:Z.name,msg:Z.message.substr(0,250),line:Z.lineNumber,level:k,"client.name":q.name},postParams:{url:g.G("PAGE_NAME",window.location.href),file:Z.fileName},method:"POST"};q.version&&(k["client.version"]=q.version);if(k.postParams){Z.stack&&(k.postParams.stack=Z.stack);for(var r of Object.keys(q))k.postParams[`client.${r}`]=q[r];if(r=g.G("LATEST_ECATCHER_SERVICE_TRACKING_PARAMS"))for(var C of Object.keys(r))k.postParams[C]=r[C];(C=g.G("LAVA_VERSION"))&&
(k.postParams["lava.version"]=C);C=g.G("SERVER_NAME");r=g.G("SERVER_VERSION");C&&r&&(k.postParams["server.name"]=C,k.postParams["server.version"]=r);(C=g.G("PLAYER_CLIENT_VERSION"))&&(k.postParams["client.player.version"]=C)}g.SD(`${g.G("ECATCHER_REPORT_HOST","")}/error_204`,k)}try{K$f.add(Z.message)}catch(m){}kgf++};
hn=function(Z,...k){Z.args||(Z.args=[]);Array.isArray(Z.args)&&Z.args.push(...k)};
f9=function(Z){var k=g.J(Z,uA);if(k)return k;if((k=g.J(Z,mCR))&&k.commands)return s8X(k.commands);if((k=g.J(Z,ABf))&&k.commands)return s8X(k.commands);if((Z=g.J(Z,PYN))&&Z.identifier&&Z.command&&(lA||(lA=[]),!lA.includes(Z.identifier)))return lA.push(Z.identifier),g.J(Z.command,uA)};
s8X=function(Z){if(Z.length!==0){var k=[];for(const N of Z)(Z=f9(N))&&k.push(Z);return{commandExecutorCommand:{commands:k}}}};
g.Bg=function(Z,k,N){N===void 0?delete Z[k.name]:Z[k.name]=N};
cBR=function(Z){let k=0;for(let N=0;N<Z.length;N++)k=k*31+Z.charCodeAt(N),N<Z.length-1&&(k%=0x800000000000);return k%1E5};
Xlr=function(Z,k,N,a,T,K,y,Q,q){const r=HHf();K=new K9({veType:k,youtubeData:K,jspbYoutubeData:void 0});q=DS({automatedLogEventSource:q},r);T&&(q.cttAuthInfo=T);T={csn:r,pageVe:K.getAsJson()};g.ii("expectation_logging")&&Q&&Q.screenCreatedLoggingExpectations&&(T.screenCreatedLoggingExpectations=Q.screenCreatedLoggingExpectations);N&&N.visualElement?(T.implicitGesture={parentCsn:N.clientScreenNonce,gesturedVe:N.visualElement.getAsJson()},y&&(T.implicitGesture.gestureType=y)):N&&g.L9(new g.jD("newScreen() parent element does not have a VE - rootVe",
k));a&&(T.cloneCsn=a);Z?NP("screenCreated",T,Z,q):g.TO("screenCreated",T,q);th(lZy,new dCy(r));O5.clear();vg.clear();iA.clear();return r};
g.wl=function(Z,k,N,a,T=!1,K={}){g.gl(Z,k,N,[a],T,K)};
g.gl=function(Z,k,N,a,T=!1,K={}){Object.assign(K,DS({cttAuthInfo:mf(k)||void 0},k));for(const Q of a){var y=Q.getAsJson();(g.ze(y)||!y.trackingParams&&!y.veType)&&g.L9(Error("Child VE logged with no data"));if(g.ii("no_client_ve_attach_unless_shown")){const q=$L(Q,k);if(y.veType&&!vg.has(q)&&!iA.has(q)&&!T){if(!g.ii("il_attach_cache_limit")||O5.size<1E3){O5.set(q,[Z,k,N,Q]);return}g.ii("il_attach_cache_limit")&&O5.size>1E3&&g.L9(new g.jD("IL Attach cache exceeded limit"))}y=$L(N,k);O5.has(y)?xL(N,
k):iA.set(y,!0)}}a=a.filter(Q=>{Q.csn!==k?(Q.csn=k,Q=!0):Q=!1;return Q});
N={csn:k,parentVe:N.getAsJson(),childVes:g.ni(a,Q=>Q.getAsJson())};
k==="UNDEFINED_CSN"?GO("visualElementAttached",K,N):Z?NP("visualElementAttached",N,Z,K):g.TO("visualElementAttached",N,K)};
L$b=function(Z,k,N,a,T,K,y){SH(N,k);a=DS({cttAuthInfo:mf(k)||void 0,automatedLogEventSource:y},k);N={csn:k,ve:N.getAsJson(),eventType:1};T&&(N.clientData=T);k==="UNDEFINED_CSN"?GO("visualElementShown",a,N):Z?NP("visualElementShown",N,Z,a):g.TO("visualElementShown",N,a)};
V4R=function(Z,k,N,a=!1){const T=a?16:8;a=DS({cttAuthInfo:mf(k)||void 0,endOfSequence:a,automatedLogEventSource:void 0},k);N={csn:k,ve:N.getAsJson(),eventType:T};k==="UNDEFINED_CSN"?GO("visualElementHidden",a,N):Z?NP("visualElementHidden",N,Z,a):g.TO("visualElementHidden",N,a)};
eH=function(Z,k,N,a,T,K){F$f(Z,k,N,void 0,a,T,K)};
F$f=function(Z,k,N,a,T,K,y){SH(N,k);a=a||"INTERACTION_LOGGING_GESTURE_TYPE_GENERIC_CLICK";K=DS({cttAuthInfo:mf(k)||void 0,automatedLogEventSource:y},k);N={csn:k,ve:N.getAsJson(),gestureType:a};T&&(N.clientData=T);k==="UNDEFINED_CSN"?GO("visualElementGestured",K,N):Z?NP("visualElementGestured",N,Z,K):g.TO("visualElementGestured",N,K)};
t4U=function(){let Z;Z=N$(16);const k=[];for(let N=0;N<Z.length;N++)k.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".charAt(Z[N]&63));return k.join("")};
GO=function(Z,k,N){oE.push({payloadName:Z,payload:N,Fo3:void 0,options:k});Jn||(Jn=vHf())};
D7R=function(Z){if(oE){for(const k of oE)k.payload&&(k.payload.csn=Z.csn,g.TO(k.payloadName,k.payload,k.options));oE.length=0}Jn=0};
$L=function(Z,k){return`${Z.getAsJson().veType}${Z.getAsJson().veCounter}${k}`};
SH=function(Z,k){if(g.ii("no_client_ve_attach_unless_shown")){var N=$L(Z,k);vg.set(N,!0);xL(Z,k)}};
xL=function(Z,k){Z=$L(Z,k);O5.has(Z)&&(k=O5.get(Z)||[],g.wl(k[0],k[1],k[2],k[3],!0),O5.delete(Z))};
DS=function(Z,k){g.ii("log_sequence_info_on_gel_web")&&(Z.sequenceGroup=k);return Z};
g.zO=function(Z,k,N,a){g.ai(L$b)(void 0,Z,k,N,a,void 0)};
g.U5=function(Z,k){g.ai(()=>{g.pi(k,N=>{SH(N,Z);const a=DS({cttAuthInfo:mf(Z)||void 0,automatedLogEventSource:void 0},Z);N={csn:Z,ve:N.getAsJson(),eventType:4};Z==="UNDEFINED_CSN"?GO("visualElementShown",a,N):g.TO("visualElementShown",N,a)})})()};
g.bA=function(Z,k){g.ai(()=>{g.pi(k,N=>{V4R(void 0,Z,N)})})()};
g.p9=function(Z,k,N){g.ai(eH)(void 0,Z,k,N,void 0)};
RE=function(Z,k,N,a){g.ai(F$f)(void 0,Z,k,N,a,void 0)};
MP=function(Z){var k=":"+(SK.getInstance().V++).toString(36);return Z+k};
g.n9=function(Z=!1){g.jR.call(this);this.Ke=new g.FC(Z);g.u(this,this.Ke)};
IE=function(){const Z="ytp-id-"+hOi.toString();hOi++;return Z};
jH=function(Z,k,N,a){if(a.substring(0,2)==="{{")Z.fN[a]=[k,N];else return a};
E5=function(Z,k,N,a){if(N==="child"){g.Qp(k);let K;a===void 0?K=void 0:K=!Array.isArray(a)||a&&typeof a.J==="string"?[a]:a;N=uNf(Z,K);for(var T of N)k.appendChild(T)}else N==="style"?g.ij(k,"cssText",a?a:""):a===null||a===void 0?k.removeAttribute(N):(T=a.toString(),N==="href"&&(T=g.gI(g.GI(T))),k.setAttribute(N,T))};
uNf=function(Z,k){const N=[];if(!k)return N;for(const a of k){if(a==null)continue;k=a.nodeType;k===1||k===3?N.push(a):a&&typeof a.J==="string"?N.push(Z.createElement(a)):a.element?N.push(a.element):typeof a==="string"&&a.indexOf("\n")!==-1?a.split("\n").forEach((T,K)=>{K>0&&N.push(g.TU("BR"));N.push(g.K1(T))}):N.push(g.K1(a))}return N};
Wg=function(Z=null,k=null){if(Z==null)return g.L9(Error("Got null or undefined adText object")),"";let N=g.qc(Z.text);if(!Z.isTemplated)return N;if(k==null)return g.L9(Error("Missing required parameters for a templated message")),N;for(const [a,T]of Object.entries(k))N=N.replace("{"+a+"}",T);return N};
lpb=function(Z=null){return Z!=null&&(Z=Z.thumbnail,Z!=null&&Z.thumbnails!=null&&Z.thumbnails.length!=0&&Z.thumbnails[0].url!=null)?g.qc(Z.thumbnails[0].url):""};
fpy=function(Z=null){return Z!=null&&(Z=Z.thumbnail,Z!=null&&Z.thumbnails!=null&&Z.thumbnails.length!=0&&Z.thumbnails[0].width!=null&&Z.thumbnails[0].height!=null)?new g.i0(Z.thumbnails[0].width||0,Z.thumbnails[0].height||0):new g.i0(0,0)};
g.YL=function(Z){if(Z.simpleText)return Z.simpleText;if(Z.runs){const k=[];for(const N of Z.runs)N.text&&k.push(N.text);return k.join("")}return""};
g.ZR=function(Z){if(Z.simpleText)return Z=document.createTextNode(Z.simpleText),Z;const k=[];if(Z.runs)for(let Q=0;Q<Z.runs.length;Q++){var N=Z.runs[Q];if(N.text){var a=k,T=a.push,K=null;var y=N.text;N.bold&&(K=a4("B",null,K||y));N.italics&&(K=a4("I",null,K||y));N.strikethrough&&(K=a4("STRIKE",null,K||y));N.navigationEndpoint&&N.navigationEndpoint.urlEndpoint&&(N=N.navigationEndpoint.urlEndpoint,K=a4("A",null,K||y),g.o2(K,N.url),N.target=="TARGET_NEW_WINDOW"&&(K.target="_blank"));y=K||a4("SPAN",null,
y);T.call(a,y)}}return k.length==1?k[0]:a4("SPAN",null,k)};
g.Boi=function(){return{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},A:[{J:"path",Rv:!0,W:{d:"M7,24 L7,27 L10,27 C10,25.34 8.66,24 7,24 L7,24 Z M7,20 L7,22 C9.76,22 12,24.24 12,27 L14,27 C14,23.13 10.87,20 7,20 L7,20 Z M25,13 L11,13 L11,14.63 C14.96,15.91 18.09,19.04 19.37,23 L25,23 L25,13 L25,13 Z M7,16 L7,18 C11.97,18 16,22.03 16,27 L18,27 C18,20.92 13.07,16 7,16 L7,16 Z M27,9 L9,9 C7.9,9 7,9.9 7,11 L7,14 L9,14 L9,11 L27,11 L27,25 L20,25 L20,27 L27,27 C28.1,27 29,26.1 29,25 L29,11 C29,9.9 28.1,9 27,9 L27,9 Z",
fill:"#fff"}}]}};
kZ=function(){return{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},A:[{J:"path",W:{d:"m 14.8,21.9 -4.2,-4.2 -1.4,1.4 5.6,5.6 12,-12 -1.4,-1.4 -10.6,10.6 z",fill:"#fff"}}]}};
g.N4=function(){return{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 32 32",width:"100%"},A:[{J:"path",W:{d:"M 19.41,20.09 14.83,15.5 19.41,10.91 18,9.5 l -6,6 6,6 z",fill:"#fff"}}]}};
DC0=function(){return{J:"svg",W:{height:"100%",viewBox:"0 0 24 24",width:"100%"},A:[{J:"path",W:{d:"M7.41,8.59L12,13.17l4.59-4.58L18,10l-6,6l-6-6L7.41,8.59z",fill:"#fff"}}]}};
g.aJ=function(){return{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 32 32",width:"100%"},A:[{J:"path",W:{d:"m 12.59,20.34 4.58,-4.59 -4.58,-4.59 1.41,-1.41 6,6 -6,6 z",fill:"#fff"}}]}};
OHr=function(){return{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 14 14",width:"100%"},A:[{J:"path",W:{d:"M14,14 L14,0 L0,0 L0,14 L14,14 Z"}},{J:"path",W:{d:"M7.15,8.35 L9.25,10.45 L10.65,9.05 L8.55,6.95 L10.7,4.8 L9.3,3.4 L7.15,5.55 L5,3.4 L3.6,4.8 L5.75,6.95 L3.65,9.05 L5.05,10.45 L7.15,8.35 Z",fill:"#fff"}}]}};
vOb=function(){return{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 14 14",width:"100%"},A:[{J:"path",Rv:!0,W:{d:"M2,14 L5,11 L5,3 L2,0 L9,0 L9,14 L2,14 L2,14 Z",fill:"#eaeaea"}}]}};
iHy=function(){return{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 14 14",width:"100%"},A:[{J:"path",Rv:!0,W:{d:"M12,14 L9,11 L9,3 L12,0 L5,0 L5,14 L12,14 Z",fill:"#eaeaea"}}]}};
g.Th=function(){return{J:"svg",W:{height:"100%",viewBox:"0 0 24 24",width:"100%"},A:[{J:"path",W:{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z",fill:"#fff"}}]}};
KZ=function(){return{J:"svg",W:{height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{d:"M21.20 3.01L21 3H3L2.79 3.01C2.30 3.06 1.84 3.29 1.51 3.65C1.18 4.02 .99 4.50 1 5V19L1.01 19.20C1.05 19.66 1.26 20.08 1.58 20.41C1.91 20.73 2.33 20.94 2.79 20.99L3 21H21L21.20 20.98C21.66 20.94 22.08 20.73 22.41 20.41C22.73 20.08 22.94 19.66 22.99 19.20L23 19V5C23.00 4.50 22.81 4.02 22.48 3.65C22.15 3.29 21.69 3.06 21.20 3.01ZM3 19V5H21V19H3ZM6.97 8.34C6.42 8.64 5.96 9.09 5.64 9.63L5.50 9.87C5.16 10.53 4.99 11.26 5 12L5.00 12.27C5.04 12.92 5.21 13.55 5.50 14.12L5.64 14.36C5.96 14.90 6.42 15.35 6.97 15.65L7.21 15.77C7.79 16.01 8.43 16.06 9.03 15.91L9.29 15.83C9.88 15.61 10.39 15.23 10.77 14.73C10.93 14.53 11.00 14.27 10.97 14.02C10.94 13.77 10.82 13.53 10.63 13.37C10.44 13.20 10.19 13.11 9.93 13.12C9.68 13.13 9.44 13.24 9.26 13.43L9.19 13.50C9.05 13.70 8.85 13.85 8.62 13.94L8.54 13.97C8.35 14.02 8.16 14.00 7.99 13.92L7.91 13.88C7.67 13.75 7.48 13.56 7.35 13.32L7.28 13.20C7.11 12.88 7.02 12.52 7.00 12.16L7 12C6.99 11.58 7.09 11.16 7.28 10.79L7.35 10.67C7.48 10.43 7.67 10.24 7.91 10.11C8.10 10.00 8.32 9.97 8.54 10.02L8.62 10.05C8.81 10.12 8.98 10.24 9.11 10.39L9.19 10.49L9.26 10.57C9.43 10.74 9.66 10.85 9.91 10.87C10.15 10.89 10.40 10.81 10.59 10.66C10.79 10.51 10.92 10.29 10.96 10.05C11.01 9.80 10.96 9.55 10.83 9.34L10.77 9.26L10.60 9.05C10.24 8.65 9.79 8.35 9.29 8.16L9.03 8.08C8.34 7.91 7.60 8.00 6.97 8.34ZM14.97 8.34C14.42 8.64 13.96 9.09 13.64 9.63L13.50 9.87C13.16 10.53 12.99 11.26 13 12L13.00 12.27C13.04 12.92 13.21 13.55 13.50 14.12L13.64 14.36C13.96 14.90 14.42 15.35 14.97 15.65L15.21 15.77C15.79 16.01 16.43 16.06 17.03 15.91L17.29 15.83C17.88 15.61 18.39 15.23 18.77 14.73C18.93 14.53 19.00 14.27 18.97 14.02C18.94 13.77 18.82 13.53 18.63 13.37C18.44 13.20 18.19 13.11 17.93 13.12C17.68 13.13 17.44 13.24 17.26 13.43L17.19 13.50C17.05 13.70 16.85 13.85 16.62 13.94L16.54 13.97C16.35 14.02 16.16 14.00 15.99 13.92L15.91 13.88C15.67 13.75 15.48 13.56 15.35 13.32L15.28 13.20C15.11 12.88 15.02 12.52 15.00 12.16L15 12C14.99 11.58 15.09 11.16 15.28 10.79L15.35 10.67C15.48 10.43 15.67 10.24 15.91 10.11C16.10 10.00 16.32 9.97 16.54 10.02L16.62 10.05C16.81 10.12 16.98 10.24 17.11 10.39L17.19 10.49L17.26 10.57C17.43 10.74 17.66 10.85 17.91 10.87C18.15 10.89 18.40 10.81 18.59 10.66C18.79 10.51 18.92 10.29 18.96 10.05C19.01 9.80 18.96 9.55 18.83 9.34L18.77 9.26L18.60 9.05C18.24 8.65 17.79 8.35 17.29 8.16L17.03 8.08C16.34 7.91 15.60 8.00 14.97 8.34Z",
fill:"white"}}]}};
gOy=function(){return{J:"svg",W:{height:"100%",viewBox:"0 0 36 36",width:"100%"},A:[{J:"path",W:{d:"M14.1 24.9L7.2 18.0l6.9-6.9L12.0 9.0l-9.0 9.0 9.0 9.0 2.1-2.1zm7.8 .0l6.9-6.9-6.9-6.9L24.0 9.0l9.0 9.0-9.0 9.0-2.1-2.1z",fill:"#fff"}}]}};
wlU=function(){return{J:"svg",W:{viewBox:"0 0 24 24"},A:[{J:"path",W:{d:"M0 0h24v24H0z",fill:"none"}},{J:"path",W:{d:"M15 3H6c-.83 0-1.54.5-1.84 1.22l-3.02 7.05c-.09.23-.14.47-.14.73v1.91l.01.01L1 14c0 1.1.9 2 2 2h6.31l-.95 4.57-.03.32c0 .41.17.79.44 1.06L9.83 23l6.59-6.59c.36-.36.58-.86.58-1.41V5c0-1.1-.9-2-2-2zm4 0v12h4V3h-4z",fill:"#fff"}}]}};
$Cy=function(){return{J:"svg",W:{fill:"currentColor",height:"100%",viewBox:"0 0 36 36",width:"100%"},A:[{J:"path",W:{d:"M 10.00 13.37 v 9.24 c .00 1.12 1.15 1.76 1.98 1.11 L 18.33 18.66 v 3.95 c .00 1.12 1.15 1.77 1.98 1.11 L 27.50 18.00 l -7.18 -5.73 C 19.49 11.60 18.33 12.25 18.33 13.37 v 3.95 l -6.34 -5.06 C 11.15 11.60 10.00 12.25 10.00 13.37 Z"}}]}};
yQ=function(){return{J:"svg",W:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{"clip-rule":"evenodd",d:"M2 12C2 6.48 6.48 2 12 2C17.52 2 22 6.48 22 12C22 17.52 17.52 22 12 22C6.48 22 2 17.52 2 12ZM13 16V18H11V16H13ZM12 20C7.59 20 4 16.41 4 12C4 7.59 7.59 4 12 4C16.41 4 20 7.59 20 12C20 16.41 16.41 20 12 20ZM8 10C8 7.79 9.79 6 12 6C14.21 6 16 7.79 16 10C16 11.28 15.21 11.97 14.44 12.64C13.71 13.28 13 13.90 13 15H11C11 13.17 11.94 12.45 12.77 11.82C13.42 11.32 14 10.87 14 10C14 8.9 13.1 8 12 8C10.9 8 10 8.9 10 10H8Z",
fill:"white","fill-rule":"evenodd"}}]}};
xCf=function(){return{J:"svg",W:{fill:"#fff",height:"100%",version:"1.1",viewBox:"0 0 48 48",width:"100%"},A:[{J:"path",W:{d:"M0 0h48v48H0z",fill:"none"}},{J:"path",W:{d:"M22 34h4V22h-4v12zm2-30C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16zm-2-22h4v-4h-4v4z"}}]}};
GgU=function(){return{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},A:[{J:"path",Rv:!0,Z:"ytp-svg-fill",W:{d:"m 17,23 h 2 V 17 H 17 Z M 18,8 C 12.47,8 8,12.47 8,18 8,23.52 12.47,28 18,28 23.52,28 28,23.52 28,18 28,12.47 23.52,8 18,8 Z m 0,18 c -4.41,0 -8,-3.59 -8,-8 0,-4.41 3.59,-8 8,-8 4.41,0 8,3.59 8,8 0,4.41 -3.59,8 -8,8 z M 17,15 h 2 v -2 h -2 z"}}]}};
S_y=function(){return{J:"svg",W:{viewBox:"0 0 24 24"},A:[{J:"path",W:{d:"M0 0h24v24H0z",fill:"none"}},{J:"path",W:{d:"M1 21h4V9H1v12zm22-11c0-1.1-.9-2-2-2h-6.31l.95-4.57.03-.32c0-.41-.17-.79-.44-1.06L14.17 1 7.59 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73v-1.91l-.01-.01L23 10z",fill:"#fff"}}]}};
QQ=function(){return{J:"svg",W:{height:"100%",viewBox:"0 0 36 36",width:"100%"},A:[{J:"path",W:{d:"M5.85 18.0c0.0-2.56 2.08-4.65 4.65-4.65h6.0V10.5H10.5c-4.14 .0-7.5 3.36-7.5 7.5s3.36 7.5 7.5 7.5h6.0v-2.85H10.5c-2.56 .0-4.65-2.08-4.65-4.65zM12.0 19.5h12.0v-3.0H12.0v3.0zm13.5-9.0h-6.0v2.85h6.0c2.56 .0 4.65 2.08 4.65 4.65s-2.08 4.65-4.65 4.65h-6.0V25.5h6.0c4.14 .0 7.5-3.36 7.5-7.5s-3.36-7.5-7.5-7.5z",fill:"#fff"}}]}};
eOX=function(){return{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 14 14",width:"100%"},A:[{J:"path",Rv:!0,W:{d:"M5,0 L9,0 L9,14 L5,14 L5,0 Z",fill:"#eaeaea"}}]}};
oOf=function(){return{J:"svg",W:{height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{d:"M21.20 3.01C21.66 3.05 22.08 3.26 22.41 3.58C22.73 3.91 22.94 4.33 22.98 4.79L23 5V19C23.00 19.49 22.81 19.97 22.48 20.34C22.15 20.70 21.69 20.93 21.20 20.99L21 21H3L2.79 20.99C2.30 20.93 1.84 20.70 1.51 20.34C1.18 19.97 .99 19.49 1 19V13H3V19H21V5H11V3H21L21.20 3.01ZM1.29 3.29C1.10 3.48 1.00 3.73 1.00 4C1.00 4.26 1.10 4.51 1.29 4.70L5.58 9H3C2.73 9 2.48 9.10 2.29 9.29C2.10 9.48 2 9.73 2 10C2 10.26 2.10 10.51 2.29 10.70C2.48 10.89 2.73 11 3 11H9V5C9 4.73 8.89 4.48 8.70 4.29C8.51 4.10 8.26 4 8 4C7.73 4 7.48 4.10 7.29 4.29C7.10 4.48 7 4.73 7 5V7.58L2.70 3.29C2.51 3.10 2.26 3.00 2 3.00C1.73 3.00 1.48 3.10 1.29 3.29ZM19.10 11.00L19 11H12L11.89 11.00C11.66 11.02 11.45 11.13 11.29 11.29C11.13 11.45 11.02 11.66 11.00 11.89L11 12V17C10.99 17.24 11.09 17.48 11.25 17.67C11.42 17.85 11.65 17.96 11.89 17.99L12 18H19L19.10 17.99C19.34 17.96 19.57 17.85 19.74 17.67C19.90 17.48 20.00 17.24 20 17V12L19.99 11.89C19.97 11.66 19.87 11.45 19.70 11.29C19.54 11.13 19.33 11.02 19.10 11.00ZM13 16V13H18V16H13Z",
fill:"white"}}]}};
q4=function(){return{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},A:[{J:"path",Rv:!0,Z:"ytp-svg-fill",W:{d:"M 12,24 20.5,18 12,12 V 24 z M 22,12 v 12 h 2 V 12 h -2 z"}}]}};
JBi=function(){return{J:"svg",W:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{d:"M20 20C20.26 20 20.51 19.89 20.70 19.70C20.89 19.51 21 19.26 21 19V5C21 4.73 20.89 4.48 20.70 4.29C20.51 4.10 20.26 4 20 4C19.73 4 19.48 4.10 19.29 4.29C19.10 4.48 19 4.73 19 5V19C19 19.26 19.10 19.51 19.29 19.70C19.48 19.89 19.73 20 20 20ZM5.04 19.77L18 12L5.04 4.22C4.84 4.10 4.60 4.03 4.36 4.03C4.12 4.03 3.89 4.09 3.68 4.21C3.47 4.32 3.30 4.49 3.18 4.70C3.06 4.91 2.99 5.14 3 5.38V18.61C2.99 18.85 3.06 19.08 3.18 19.29C3.30 19.50 3.47 19.67 3.68 19.79C3.89 19.90 4.12 19.96 4.36 19.96C4.60 19.96 4.84 19.89 5.04 19.77Z",
fill:"white"}}]}};
g.zOr=function(){return{J:"svg",W:{fill:"#fff",height:"24px",viewBox:"0 0 24 24",width:"24px"},A:[{J:"path",W:{d:"M7.58 4.08L6.15 2.65C3.75 4.48 2.17 7.3 2.03 10.5h2c.15-2.65 1.51-4.97 3.55-6.42zm12.39 6.42h2c-.15-3.2-1.73-6.02-4.12-7.85l-1.42 1.43c2.02 1.45 3.39 3.77 3.54 6.42zM18 11c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2v-5zm-6 11c.14 0 .27-.01.4-.04.65-.14 1.18-.58 1.44-1.18.1-.24.15-.5.15-.78h-4c.01 1.1.9 2 2.01 2z"}}]}};
UCi=function(){return{J:"svg",W:{fill:"currentColor",height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{d:"M12 1c1.44 0 2.87.28 4.21.83a11 11 0 0 1 3.45 2.27l-1.81 1.05A9 9 0 0 0 3 12a9 9 0 0 0 18-.00l-.01-.44a8.99 8.99 0 0 0-.14-1.20l1.81-1.05A11.00 11.00 0 0 1 10.51 22.9 11 11 0 0 1 12 1Zm7.08 6.25-7.96 3.25a1.74 1.74 0 1 0 1.73 2.99l6.8-5.26a.57.57 0 0 0-.56-.98Z"}}]}};
rm=function(){return{J:"svg",W:{fill:"#fff",height:"100%",version:"1.1",viewBox:"0 0 48 48",width:"100%"},A:[{J:"path",W:{d:"M0 0h48v48H0z",fill:"none"}},{J:"path",W:{d:"M38 38H10V10h14V6H10c-2.21 0-4 1.79-4 4v28c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V24h-4v14zM28 6v4h7.17L15.51 29.66l2.83 2.83L38 12.83V20h4V6H28z"}}]}};
bHy=function(){return{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},A:[{J:"path",Rv:!0,Z:"ytp-svg-fill",W:{d:"M 12,26 16,26 16,10 12,10 z M 21,26 25,26 25,10 21,10 z"}}]}};
plR=function(){return{J:"svg",W:{fill:"none",height:"36",viewBox:"0 0 36 36",width:"36"},A:[{J:"path",W:{d:"M 12.75 4.5 L 9.75 4.5 C 9.15 4.5 8.58 4.73 8.15 5.15 C 7.73 5.58 7.5 6.15 7.5 6.75 L 7.5 29.25 C 7.5 29.84 7.73 30.41 8.15 30.84 C 8.58 31.26 9.15 31.5 9.75 31.5 L 12.75 31.5 C 13.34 31.5 13.91 31.26 14.34 30.84 C 14.76 30.41 15 29.84 15 29.25 L 15 6.75 C 15 6.15 14.76 5.58 14.34 5.15 C 13.91 4.73 13.34 4.5 12.75 4.5 Z M 26.25 4.5 L 23.25 4.5 C 22.65 4.5 22.08 4.73 21.65 5.15 C 21.23 5.58 21 6.15 21 6.75 V 29.25 C 21 29.84 21.23 30.41 21.65 30.84 C 22.08 31.26 22.65 31.5 23.25 31.5 L 26.25 31.5 C 26.84 31.5 27.41 31.26 27.84 30.84 C 28.26 30.41 28.5 29.84 28.5 29.25 V 6.75 L 28.5 6.75 C 28.5 6.15 28.26 5.58 27.84 5.15 C 27.41 4.73 26.84 4.5 26.25 4.5 Z",
fill:"white"}}]}};
ROj=function(){return{J:"svg",W:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",Z:"ytp-svg-fill",W:{"clip-rule":"evenodd",d:"M12 4C9.79 4 8 5.79 8 8C8 10.21 9.79 12 12 12C14.21 12 16 10.21 16 8C16 5.79 14.21 4 12 4ZM14 8C14 6.9 13.1 6 12 6C10.9 6 10 6.9 10 8C10 9.1 10.9 10 12 10C13.1 10 14 9.1 14 8ZM18 17C17.8 16.29 14.7 15 12 15C9.3 15 6.2 16.29 6 17.01V18H18V17ZM4 17C4 14.34 9.33 13 12 13C14.67 13 20 14.34 20 17V20H4V17Z","fill-rule":"evenodd"}}]}};
CZ=function(){return{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},A:[{J:"path",Rv:!0,W:{d:"M25,17 L17,17 L17,23 L25,23 L25,17 L25,17 Z M29,25 L29,10.98 C29,9.88 28.1,9 27,9 L9,9 C7.9,9 7,9.88 7,10.98 L7,25 C7,26.1 7.9,27 9,27 L27,27 C28.1,27 29,26.1 29,25 L29,25 Z M27,25.02 L9,25.02 L9,10.97 L27,10.97 L27,25.02 L27,25.02 Z",fill:"#fff"}}]}};
m9=function(){return{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},A:[{J:"path",Rv:!0,Z:"ytp-svg-fill",W:{d:"M 12,26 18.5,22 18.5,14 12,10 z M 18.5,22 25,18 25,18 18.5,14 z"}}]}};
AY=function(){return{J:"svg",W:{fill:"none",height:"36",viewBox:"0 0 36 36",width:"36"},A:[{J:"path",W:{d:"M 17 8.6 L 10.89 4.99 C 9.39 4.11 7.5 5.19 7.5 6.93 C 7.5 6.93 7.5 6.93 7.5 6.93 L 7.5 29.06 C 7.5 30.8 9.39 31.88 10.89 31 C 10.89 31 10.89 31 10.89 31 L 17 27.4 C 17 27.4 17 27.4 17 27.4 C 17 27.4 17 27.4 17 27.4 L 17 8.6 C 17 8.6 17 8.6 17 8.6 C 17 8.6 17 8.6 17 8.6 Z M 17 8.6 L 17 8.6 C 17 8.6 17 8.6 17 8.6 C 17 8.6 17 8.6 17 8.6 V 27.4 C 17 27.4 17 27.4 17 27.4 C 17 27.4 17 27.4 17 27.4 L 33 18 C 33 18 33 18 33 18 C 33 18 33 18 33 18 V 18 L 17 8.6 C 17 8.6 17 8.6 17 8.6 C 17 8.6 17 8.6 17 8.6 Z",
fill:"white"}}]}};
M4G=function(){return{J:"svg",W:{height:"24px",version:"1.1",viewBox:"-2 -2 24 24",width:"24px"},A:[{J:"path",W:{d:"M 0 1.43 C 0 .64 .64 0 1.43 0 L 18.56 0 C 19.35 0 20 .64 20 1.43 L 20 18.56 C 20 19.35 19.35 20 18.56 20 L 1.43 20 C .64 20 0 19.35 0 18.56 Z M 0 1.43 ",fill:"#c00"}},{J:"path",W:{d:"M 7.88 11.42 L 7.88 15.71 L 5.37 15.71 L 5.37 3.52 L 10.12 3.52 C 11.04 3.52 11.84 3.69 12.54 4.02 C 13.23 4.36 13.76 4.83 14.14 5.45 C 14.51 6.07 14.70 6.77 14.70 7.56 C 14.70 8.75 14.29 9.69 13.48 10.38 C 12.66 11.07 11.53 11.42 10.08 11.42 Z M 7.88 9.38 L 10.12 9.38 C 10.79 9.38 11.30 9.23 11.64 8.91 C 11.99 8.60 12.17 8.16 12.17 7.57 C 12.17 6.98 11.99 6.5 11.64 6.12 C 11.29 5.76 10.80 5.57 10.18 5.56 L 7.88 5.56 Z M 7.88 9.38 ",
fill:"#fff","fill-rule":"nonzero"}}]}};
nOU=function(){return{J:"svg",W:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"rect",W:{fill:"white",height:"20",rx:"5",width:"20",x:"2",y:"2"}},{J:"rect",W:{fill:"url(#ytp-premium-standalone-gradient)",height:"20",rx:"5",width:"20",x:"2",y:"2"}},{J:"path",W:{d:"M12.75 13.02H9.98V11.56H12.75C13.24 11.56 13.63 11.48 13.93 11.33C14.22 11.17 14.44 10.96 14.58 10.68C14.72 10.40 14.79 10.09 14.79 9.73C14.79 9.39 14.72 9.08 14.58 8.78C14.44 8.49 14.22 8.25 13.93 8.07C13.63 7.89 13.24 7.80 12.75 7.80H10.54V17H8.70V6.33H12.75C13.58 6.33 14.28 6.48 14.86 6.77C15.44 7.06 15.88 7.46 16.18 7.97C16.48 8.48 16.64 9.06 16.64 9.71C16.64 10.40 16.48 10.99 16.18 11.49C15.88 11.98 15.44 12.36 14.86 12.62C14.28 12.89 13.58 13.02 12.75 13.02Z",
fill:"white"}},{J:"defs",A:[{J:"linearGradient",W:{gradientUnits:"userSpaceOnUse",id:"ytp-premium-standalone-gradient",x1:"2",x2:"22",y1:"22",y2:"2"},A:[{J:"stop",W:{offset:"0.3","stop-color":"#E1002D"}},{J:"stop",W:{offset:"0.9","stop-color":"#E01378"}}]}]}]}};
var Ipy=function(){return x4[c[2]](this,64,5105)};
j8b=function(){return{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},A:[{J:"path",Rv:!0,Z:"ytp-svg-fill",W:{d:"m 12,12 h 2 v 12 h -2 z m 3.5,6 8.5,6 V 12 z"}}]}};
EO0=function(){return{J:"svg",W:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{d:"M7 7H17V10L21 6L17 2V5H5V11H7V7ZM17 17H7V14L3 18L7 22V19H19V13H17V17Z",fill:"white"}}]}};
g.Pm=function(){return{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},A:[{J:"path",Rv:!0,Z:"ytp-svg-fill",W:{d:"M 18,11 V 7 l -5,5 5,5 v -4 c 3.3,0 6,2.7 6,6 0,3.3 -2.7,6 -6,6 -3.3,0 -6,-2.7 -6,-6 h -2 c 0,4.4 3.6,8 8,8 4.4,0 8,-3.6 8,-8 0,-4.4 -3.6,-8 -8,-8 z"}}]}};
g.cm=function(){return{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},A:[{J:"path",Rv:!0,W:{d:"m 23.94,18.78 c .03,-0.25 .05,-0.51 .05,-0.78 0,-0.27 -0.02,-0.52 -0.05,-0.78 l 1.68,-1.32 c .15,-0.12 .19,-0.33 .09,-0.51 l -1.6,-2.76 c -0.09,-0.17 -0.31,-0.24 -0.48,-0.17 l -1.99,.8 c -0.41,-0.32 -0.86,-0.58 -1.35,-0.78 l -0.30,-2.12 c -0.02,-0.19 -0.19,-0.33 -0.39,-0.33 l -3.2,0 c -0.2,0 -0.36,.14 -0.39,.33 l -0.30,2.12 c -0.48,.2 -0.93,.47 -1.35,.78 l -1.99,-0.8 c -0.18,-0.07 -0.39,0 -0.48,.17 l -1.6,2.76 c -0.10,.17 -0.05,.39 .09,.51 l 1.68,1.32 c -0.03,.25 -0.05,.52 -0.05,.78 0,.26 .02,.52 .05,.78 l -1.68,1.32 c -0.15,.12 -0.19,.33 -0.09,.51 l 1.6,2.76 c .09,.17 .31,.24 .48,.17 l 1.99,-0.8 c .41,.32 .86,.58 1.35,.78 l .30,2.12 c .02,.19 .19,.33 .39,.33 l 3.2,0 c .2,0 .36,-0.14 .39,-0.33 l .30,-2.12 c .48,-0.2 .93,-0.47 1.35,-0.78 l 1.99,.8 c .18,.07 .39,0 .48,-0.17 l 1.6,-2.76 c .09,-0.17 .05,-0.39 -0.09,-0.51 l -1.68,-1.32 0,0 z m -5.94,2.01 c -1.54,0 -2.8,-1.25 -2.8,-2.8 0,-1.54 1.25,-2.8 2.8,-2.8 1.54,0 2.8,1.25 2.8,2.8 0,1.54 -1.25,2.8 -2.8,2.8 l 0,0 z",
fill:"#fff"}}]}};
g.Hm=function(){return{J:"svg",W:{height:"100%",viewBox:"0 0 16 16",width:"100%"},A:[{J:"path",W:{d:"M13 4L12 3 8 7 4 3 3 4 7 8 3 12 4 13 8 9 12 13 13 12 9 8z",fill:"#fff"}}]}};
W$f=function(){return{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},A:[{J:"path",Rv:!0,Z:"ytp-svg-fill",W:{d:"M 12,25 19,25 19,11 12,11 z M 19,25 26,25 26,11 19,11 z"}}]}};
Y_X=function(){return{J:"svg",W:{fill:"none",height:"36",viewBox:"0 0 36 36",width:"36"},A:[{J:"path",W:{d:"M 18 6 L 9 6 C 8.20 6 7.44 6.31 6.87 6.87 C 6.31 7.44 6 8.20 6 9 L 6 27 C 6 27.79 6.31 28.55 6.87 29.12 C 7.44 29.68 8.20 30 9 30 L 18 30 C 18 30 18 30 18 30 C 18 30 18 30 18 30 L 18 6 C 18 30 18 30 18 30 C 18 30 18 30 18 30 Z M 27 6 L 18 6 C 18 6 18 6 18 6 C 18 6 18 6 18 6 V 30 C 18 30 18 30 18 30 C 18 30 18 30 18 30 L 27 30 C 27.79 30 28.55 29.68 29.12 29.12 C 29.68 28.55 30 27.79 30 27 V 9 L 30 9 C 30 8.20 29.68 7.44 29.12 6.87 C 28.55 6.31 27.79 6 27 6 Z",
fill:"white"}}]}};
ZIy=function(){return{J:"svg",W:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{d:"M21.20 3.01L21 3H3L2.79 3.01C2.30 3.06 1.84 3.29 1.51 3.65C1.18 4.02 .99 4.50 1 5V19L1.01 19.20C1.05 19.66 1.26 20.08 1.58 20.41C1.91 20.73 2.33 20.94 2.79 20.99L3 21H21L21.20 20.98C21.66 20.94 22.08 20.73 22.41 20.41C22.73 20.08 22.94 19.66 22.99 19.20L23 19V5C23.00 4.50 22.81 4.02 22.48 3.65C22.15 3.29 21.69 3.06 21.20 3.01ZM3 19V5H21V19H3ZM8 11H6C5.73 11 5.48 11.10 5.29 11.29C5.10 11.48 5 11.73 5 12C5 12.26 5.10 12.51 5.29 12.70C5.48 12.89 5.73 13 6 13H8C8.26 13 8.51 12.89 8.70 12.70C8.89 12.51 9 12.26 9 12C9 11.73 8.89 11.48 8.70 11.29C8.51 11.10 8.26 11 8 11ZM18 11H12C11.73 11 11.48 11.10 11.29 11.29C11.10 11.48 11 11.73 11 12C11 12.26 11.10 12.51 11.29 12.70C11.48 12.89 11.73 13 12 13H18C18.26 13 18.51 12.89 18.70 12.70C18.89 12.51 19 12.26 19 12C19 11.73 18.89 11.48 18.70 11.29C18.51 11.10 18.26 11 18 11ZM18 15H16C15.73 15 15.48 15.10 15.29 15.29C15.10 15.48 15 15.73 15 16C15 16.26 15.10 16.51 15.29 16.70C15.48 16.89 15.73 17 16 17H18C18.26 17 18.51 16.89 18.70 16.70C18.89 16.51 19 16.26 19 16C19 15.73 18.89 15.48 18.70 15.29C18.51 15.10 18.26 15 18 15ZM12 15H6C5.73 15 5.48 15.10 5.29 15.29C5.10 15.48 5 15.73 5 16C5 16.26 5.10 16.51 5.29 16.70C5.48 16.89 5.73 17 6 17H12C12.26 17 12.51 16.89 12.70 16.70C12.89 16.51 13 16.26 13 16C13 15.73 12.89 15.48 12.70 15.29C12.51 15.10 12.26 15 12 15Z",
fill:"white"}}]}};
dm=function(){return{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},A:[{J:"path",Rv:!0,Z:"ytp-svg-fill",W:{d:"m 21.48,17.98 c 0,-1.77 -1.02,-3.29 -2.5,-4.03 v 2.21 l 2.45,2.45 c .03,-0.2 .05,-0.41 .05,-0.63 z m 2.5,0 c 0,.94 -0.2,1.82 -0.54,2.64 l 1.51,1.51 c .66,-1.24 1.03,-2.65 1.03,-4.15 0,-4.28 -2.99,-7.86 -7,-8.76 v 2.05 c 2.89,.86 5,3.54 5,6.71 z M 9.25,8.98 l -1.27,1.26 4.72,4.73 H 7.98 v 6 H 11.98 l 5,5 v -6.73 l 4.25,4.25 c -0.67,.52 -1.42,.93 -2.25,1.18 v 2.06 c 1.38,-0.31 2.63,-0.95 3.69,-1.81 l 2.04,2.05 1.27,-1.27 -9,-9 -7.72,-7.72 z m 7.72,.99 -2.09,2.08 2.09,2.09 V 9.98 z"}}]}};
Xh=function(Z,k=!1,N=!1,a=!1){if(!Z)return null;switch(Z.iconType){case "OPEN_IN_NEW":case "EXTERNAL_LINK":return N?{J:"svg",W:{fill:"#fff",height:"100%",version:"1.1",viewBox:"0 0 24 24",width:"100%"},A:[{J:"path",W:{d:"M21 21H3V3h9v1H4v16h16v-8h1v9zM15 3v1h4.32l-8.03 8.03.71.71 8-8V9h1V3h-6z"}}]}:rm();case "CHECK_BOX":return{J:"svg",W:{height:"100%",viewBox:"0 0 24 24",width:"100%"},A:[{J:"path",W:{d:"M0 0h24v24H0z",fill:"none"}},{J:"path",W:{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z",
fill:"#d4d4d4"}}]};case "CHECK_BOX_OUTLINE_BLANK":return{J:"svg",W:{height:"100%",viewBox:"0 0 24 24",width:"100%"},A:[{J:"path",W:{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z",fill:"#d4d4d4"}},{J:"path",W:{d:"M0 0h24v24H0z",fill:"none"}}]};case "CLOSE":return g.Th();case "INFO_OUTLINE":return k?{J:"svg",W:{fill:"#fff",height:"12px",style:"padding-top: 8px",viewBox:"0 -960 960 960",width:"12px"},A:[{J:"path",W:{d:"M430.09-270.8h101.34V-528H430.09v257.2Zm49.52-338.03q20.94 0 35.34-14.01 14.4-14.01 14.4-34.95 0-20.94-14.01-35.34-14.01-14.39-34.95-14.39-20.94 0-35.34 14.01-14.4 14.01-14.4 34.95 0 20.94 14.01 35.34 14.01 14.39 34.95 14.39Zm.67 548.18q-86.64 0-163.19-32.66-76.56-32.66-133.84-89.94t-89.94-133.8q-32.66-76.51-32.66-163.41 0-87.15 32.72-163.31t90.14-133.61q57.42-57.44 133.79-89.7 76.38-32.27 163.16-32.27 87.14 0 163.31 32.26 76.16 32.26 133.61 89.71 57.45 57.45 89.71 133.86 32.26 76.42 32.26 163.33 0 86.91-32.27 163.08-32.26 76.18-89.7 133.6-57.45 57.42-133.83 90.14-76.39 32.72-163.27 32.72Zm-.33-105.18q131.13 0 222.68-91.49 91.54-91.49 91.54-222.63 0-131.13-91.49-222.68-91.49-91.54-222.63-91.54-131.13 0-222.68 91.49-91.54 91.49-91.54 222.63 0 131.13 91.49 222.68 91.49 91.54 222.63 91.54ZM480-480Z"}}]}:
xCf();case "REMOVE_CIRCLE":return{J:"svg",W:{fill:"#fff",height:"100%",version:"1.1",viewBox:"0 0 24 24",width:"100%"},A:[{J:"path",W:{d:"M0 0h24v24H0z",fill:"none"}},{J:"path",W:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11H7v-2h10v2z",fill:"#757575"}}]};case "SKIP_NEXT":return q4();case "SKIP_NEXT_NEW":return a?JBi():{J:"svg",W:{height:"100%",viewBox:"-6 -6 36 36",width:"100%"},A:[{J:"path",W:{d:"M5,18l10-6L5,6V18L5,18z M19,6h-2v12h2V6z",fill:"#fff"}}]};case "LIKE":return S_y();
case "DISLIKE":return wlU();default:return g.L9(new g.jD("Unexpected icon:",Z)),null}};
kzy=function(Z){let k=null;Z.V!=null&&(k=[Z.V.serviceEndpoint,Z.V.navigationEndpoint].filter(N=>N!=null),Z.V.command&&(k=k.concat(Z.V.command)));
return k||[]};
arf=function(){LZ==null&&(LZ=new NtU);return LZ};
VQ=function(Z,k){if(Z.simpleText){a:{Z=Z.simpleText;if(k&&(k=Tty(Z))){k=a4("SPAN",null,k);break a}k=g.K1(Z)}return k}const N=[];if(Z.runs)for(let a=0;a<Z.runs.length;a++){const T=Z.runs[a];T.text&&N.push(KFX(T,k))}return N.length==1?N[0]:a4("SPAN",null,N)};
KFX=function(Z,k){var N=null;let a=Z.text;k&&(a=Tty(a)||a);Z.bold&&(N=a4("B",null,N||a));Z.italics&&(N=a4("I",null,N||a));Z.strikethrough&&(N=a4("STRIKE",null,N||a));Z.navigationEndpoint&&g.J(Z.navigationEndpoint,g.Fh)&&(k=g.J(Z.navigationEndpoint,g.Fh),N=a4("A",null,N||a),g.o2(N,k.url),k.target=="TARGET_NEW_WINDOW"&&(N.target="_blank"),Z=Z.navigationEndpoint.loggingUrls)&&(Z=Z.map(T=>T.baseUrl),arf().register(N,Z),g.jX(N,"ytp-ad-has-logging-urls"));
return N||a4("SPAN",null,a)};
Tty=function(Z){Z=Z.split(/(?:\r\n|\r|\n)/g);if(Z.length>1){const k=[Z[0]];for(let N=1;N<Z.length;N++)k.push(a4("BR")),k.push(Z[N]);return k}return null};
tY=function(Z){return Z&&Z.thumbnails&&(Z.thumbnails||null).length!=0&&Z.thumbnails[0].url?g.qc(Z.thumbnails[0].url):""};
ly=function(Z,k="",N=""){Z=new g.hY(Z,!0);Z.set("alr","yes");N&&(N=uy(3,6799,bY(91,1913,N)),Z[c[24]](k,Eb(24,7633,N)));return Z};
yLj=function(Z,k){if(k.title){var N=g.YL(k.title);Z.updateValue("title",N)}if(k.dialogMessages)for(var a of k.dialogMessages)N=VQ(a),Z.Sm.appendChild(N);k.cancelLabel&&(a=g.YL(k.cancelLabel),Z.updateValue("cancelLabel",a),Z.V.K(Z.j,"click",T=>Z.Y(T)));
k.confirmLabel&&(k=g.YL(k.confirmLabel),Z.updateValue("confirmLabel",k),Z.V.K(Z.O,"click",T=>Z.G(T)));
Z.V.K(Z.xW,"click",T=>Z.L(T))};
fZ=function(Z){Z.O&&(Z.isToggled()?(g.jA(Z.G,!1),g.jA(Z.L,!0),Z.U.setAttribute("aria-checked",!0)):(g.jA(Z.G,!0),g.jA(Z.L,!1),Z.U.setAttribute("aria-checked",!1)))};
QAN=function(Z,k){let N=null;Z.D&&(N=(k?[Z.D.defaultServiceEndpoint,Z.D.defaultNavigationEndpoint]:[Z.D.toggledServiceEndpoint]).filter(a=>a!=null));
return N||[]};
myU=function(Z,k){var N=k.cancelRenderer&&k.cancelRenderer.buttonRenderer||null;N&&(Z.V=new Bm(Z.api,Z.layoutId,Z.interactionLoggingClientData,Z.Iq,["ytp-ad-feedback-dialog-close-button"],"button"),g.u(Z,Z.V),Z.V.init(MP("button"),N,Z.macros),Z.V.listen("click",Z.j,Z),Z.V.HD(Z.element));k.title&&(N=g.YL(k.title),Z.updateValue("title",N));k.reasonsTitle&&(N=g.YL(k.reasonsTitle),Z.updateValue("reasonsTitle",N));k.reasons&&qHj(Z,k.reasons);k.cancelLabel&&(N=g.YL(k.cancelLabel),Z.updateValue("cancelLabel",
N),g.R6(Z.L,"click",()=>Z.j()));
k.confirmLabel&&(N=g.YL(k.confirmLabel),Z.updateValue("confirmLabel",N),g.R6(Z.G,"click",()=>rLr(Z)));
k.undoRenderer&&CH0(Z,k.undoRenderer)};
qHj=function(Z,k){for(const a of k){k=a.reason;if(k==null){g.L9(Error("AdFeedbackReason.reason was not set."));continue}var N=a.endpoint;if(N==null){g.L9(Error("AdFeedbackReason.endpoint was not set."));continue}const T=new sAj(k,N);g.u(Z,T);k=Z.O;N=T.lq();k.appendChild(N);Z.Y.push(T)}};
rLr=function(Z){var k=Z.Y.filter(N=>N.isChecked());
k.length!==0&&(k=k[0].getCommand(),Z.layoutId?Z.Iq.executeCommand(k,Z.layoutId):g.b(Error("Missing layoutId for ad feedback dialog.")),Z.api.onAdUxClicked("ad-feedback-dialog-confirm-button",Z.layoutId),Z.publish("a"),Z.hide())};
CH0=function(Z,k){if(k=k&&k.buttonRenderer||null)k.serviceEndpoint?(Z.U=new Bm(Z.api,Z.layoutId,Z.interactionLoggingClientData,Z.Iq,["ytp-ad-feedback-dialog-undo-mute-button"],"ad-feedback-undo-mute-button"),g.u(Z,Z.U),Z.U.init(MP("ad-feedback-undo-mute-button"),k,Z.macros),Z.U.listen("click",Z.Sm,Z),Z.U.HD(Z.xW)):g.L9(Error("AdFeedbackRenderer.undoRenderer.undoButtonRenderer was specified but did not contain a service endpoint."))};
ALy=function(Z){Z.V&&Z.V.listen("click",Z.xW,Z);g.R6(Z.G,"click",()=>Z.xW())};
cLR=function(Z,k){if(k=k.content&&k.content.adFeedbackRenderer||null)Z.U=new PHf(Z.api,Z.layoutId,Z.interactionLoggingClientData,Z.Iq),g.u(Z,Z.U),Z.U.init(MP("ad-feedback-dialog"),k,Z.macros),Z.U.HD(Z.O),Z.U.subscribe("a",()=>Z.publish("c"))};
dyR=function(Z,k){if(k=k.content&&k.content.confirmDialogRenderer||null)Z.Y=new HIG(Z.api,Z.layoutId,Z.interactionLoggingClientData,Z.Iq),g.u(Z,Z.Y),Z.Y.init(MP("ad-mute-confirm-dialog"),k,Z.macros),Z.Y.HD(Z.O),Z.Y.subscribe("b",()=>Z.publish("c"))};
FFR=function(Z,k,N){Z.button==null?g.b(Error("AdInfoHoverTextButton.button was expected but it was not created.")):(Z.U&&g.jX(Z.U.element,"ytp-ad-info-hover-text-short"),(k=k&&k.serviceEndpoint&&g.J(k.serviceEndpoint,XcU)||null)?(LFR(Z,k,N),Z.button.listen("click",()=>{Z.V&&!Z.V.LF&&(Z.V.show(),Vcj(Z))})):Z.button.listen("click",()=>Vcj(Z)))};
LFR=function(Z,k,N){k=k.dialog&&g.J(k.dialog,tcy)||null;k==null?g.b(Error("AdInfoDialogEndpoint did not contain an AdInfoDialogRenderer.")):(Z.V=new hTG(Z.api,Z.layoutId,Z.interactionLoggingClientData,Z.Iq,Z.Y),g.u(Z,Z.V),Z.V.init(MP("ad-info-dialog"),k,N),Z.V.HD(Z.Y),Z.V.subscribe("d",()=>Z.publish("f")),Z.V.subscribe("c",()=>Z.publish("e")))};
Vcj=function(Z){Z.api.onAdUxClicked("ad-info-icon-button",Z.layoutId)};
DR=function(Z,k){k&&g.m_(Z.element,Wg(Z.V,k))};
Ow=function(Z){Z.V&&Z.O===-1&&(Z.O=Z.V.subscribe("h",Z.D,Z),Z.MX=Z.V.subscribe("g",Z.L,Z),Z.D())};
vm=function(Z){Z.V!=null&&Z.O!==-1&&(Z.V.eO(Z.O),Z.V.eO(Z.MX),Z.MX=-1,Z.O=-1)};
iy=function(Z,k){Z=Z.element.element;k?Z.setAttribute("aria-hidden","true"):Z.removeAttribute("aria-hidden")};
uKy=function(Z){switch(Z){case 2:return 0;case 1:return 2;case 0:return 3;case 4:case 3:return 1;default:J3(Z,"unknown result type")}};
lrb=function(Z,k){let N=1;Z.isTrusted===!1&&(N=0);YA("ISDSTAT",N);gm(N,"i.s_",{triggerContext:"sk",metadata:k});return N};
fry=function(Z,k){const N=[];k?k.isTrusted===!0?N.push("BISCOTTI_BASED_DETECTION_STATE_AS_SEEK_EVENT_TRUSTED"):k.isTrusted===!1?N.push("BISCOTTI_BASED_DETECTION_STATE_AS_SEEK_EVENT_NOT_TRUSTED"):N.push("BISCOTTI_BASED_DETECTION_STATE_AS_SEEK_EVENT_TRUSTED_PROPERTY_UNDEFINED"):N.push("BISCOTTI_BASED_DETECTION_STATE_AS_SEEK_EVENT_UNDEFINED");gm(0,"a.s_",{metadata:Z,states:N});YA("ASDSTAT",0)};
gm=function(Z,k,N){k=BtR[k];const a={detected:Z===0,source:`${k.U}${N.triggerContext??""}${N.k_??""}`,detectionStates:N.states,durationMs:N.gp};N.metadata&&(a.contentCpn=N.metadata.contentCpn,a.adCpn=N.metadata.adCpn);g.TO("biscottiBasedDetection",a);k.V!==void 0&&(N=Number(g.G("CATSTAT",0)),k.V!==void 0?(k=k.V,Z=uKy(Z),Z=N&~(3<<k)|Z<<k):Z=N,YA("CATSTAT",Z))};
wm=function(Z,k,N,a={},T){if(!T||Math.random()<5E-4){k=k||null;N=N||null;Z=Z instanceof Error?Z:new g.jD(Z);if(Z.args)for(const K of Z.args)K instanceof Object&&(a={...K,...a});a.category="H5 Ads Control Flow";k&&(a.slot=k?`slot: ${""} ${k.slotType}`:"");N&&(a.layout=N?`layout: ${""} ${N.layoutType}`:"",a.layoutId=N.layoutId);T&&(a.known_error_aggressively_sampled=!0);Z.args=[a];g.L9(Z)}};
$Z=function(Z,k){return Z.state.V(k)&&!Z.oldState.V(k)?1:!Z.state.V(k)&&Z.oldState.V(k)?-1:0};
OIf=function(Z){Z=Z.xW&&Z.xW.adRendererCommands;return(Z&&Z.clickCommand&&g.J(Z.clickCommand,g.xZ)&&g.J(Z.clickCommand,g.xZ).commands||[]).some(k=>k.adLifecycleCommand?Dyy(k.adLifecycleCommand):!1)};
Dyy=function(Z){return Z.action==="END_LINEAR_AD"||Z.action==="END_LINEAR_AD_PLACEMENT"};
vgr=function(Z,k){Z.G||(Z.G=!0,Z.U&&(k?Z.U.xW.hide():Z.U.hide()),k?(Z=Z.Y,Z.qX.show(),Z.show()):Z.Y.show())};
g.Gh=function(Z,k){var N=Math.abs(Math.floor(Z)),a=Math.floor(N/86400);const T=Math.floor(N%86400/3600),K=Math.floor(N%3600/60);N=Math.floor(N%60);if(k){k="";a>0&&(k+=` ${a} `+"Days");if(a>0||T>0)k+=` ${T} `+"Hours";k+=` ${K} `+"Minutes";k+=` ${N} `+"Seconds";a=k.trim()}else{k="";a>0&&(k+=`${a}:`,T<10&&(k+="0"));if(a>0||T>0)k+=`${T}:`,K<10&&(k+="0");k+=`${K}:`;N<10&&(k+="0");a=k+N}return Z>=0?a:`-${a}`};
g.SM=function(Z){return(!("button"in Z)||typeof Z.button!=="number"||Z.button===0)&&!("shiftKey"in Z&&Z.shiftKey)&&!("altKey"in Z&&Z.altKey)&&!("metaKey"in Z&&Z.metaKey)&&!("ctrlKey"in Z&&Z.ctrlKey)};
iIi=function(Z,k){return Z.U+k*(Z.V-Z.U)};
eM=function(Z,k,N){return Z.V-Z.U?g.u0((k-Z.U)/(Z.V-Z.U),0,1):N!=null?N:Infinity};
ggj=function(Z){Z=Z.api.X();return g.oJ(Z)&&Z.U||Z.B("embeds_desktoff_enable_ads_top_bar")&&!1};
wcy=function(Z){Z&=16777215;var k=[(Z&16711680)>>16,(Z&65280)>>8,Z&255];Z=k[0];var N=k[1];k=k[2];Z=Number(Z);N=Number(N);k=Number(k);if(Z!=(Z&255)||N!=(N&255)||k!=(k&255))throw Error('"('+Z+","+N+","+k+'") is not a valid RGB color');N=Z<<16|N<<8|k;return Z<16?"#"+(16777216|N).toString(16).slice(1):"#"+N.toString(16)};
g.zh=function(){if(!JY){JY=new x_(new $yG);const Z=gu("client_streamz_web_flush_count",-1);Z!==-1&&(JY.D=Z)}return JY};
xyy=function(){let Z=!1;try{Z=!!window.sessionStorage.getItem("session_logininfo")}catch{Z=!0}return(g.G("INNERTUBE_CLIENT_NAME")==="WEB"||g.G("INNERTUBE_CLIENT_NAME")==="WEB_CREATOR")&&Z};
Uw=function(){try{window.sessionStorage.removeItem("stickiness_reload");window.sessionStorage.removeItem("session_logininfo");YA("LOGIN_INFO","");window.sessionStorage.setItem("from_switch_account","1");var Z;let N=Gz0;N||(N=document.querySelector("#persist_identity"));if(Z=N){var k=Z.src?(new URL(Z.src)).origin:"*";Z.contentWindow?.postMessage({action:"clear"},k)}}catch{}};
by=function(Z){Z&&(Z.startsWith("https://accounts.google.com/AddSession")?Uw():Z.startsWith("https://accounts.google.com/ServiceLogin")?Uw():Z.startsWith("https://myaccount.google.com")&&g.n7(Z).U.endsWith("/youtubeoptions")&&Uw());if(g.G("LOGGED_IN",!0)&&xyy()){var k=g.G("VALID_SESSION_TEMPDATA_DOMAINS",[]);var N=g.kX(window.location.href);N&&k.push(N);N=g.kX(Z);g.KK(k,N)||!N&&Za(Z,"/")?(k=T2(Z),(k=KM(k))?(k=pjy(k),k=(k=g.a6(k)||null)?q2(k):{}):k=null):k=null;k==null&&(k={});N=k;var a=void 0;xyy()?
(a||(a=g.G("LOGIN_INFO")),a?(N.session_logininfo=a,N=!0):N=!1):N=!1;N&&s5(Z,k)}};
g.SHR=function(Z){var k=window;Z=g.mW(Z,{});by(Z);Z=g.GI(Z+"");k=k.location;Z=eZ(Z);Z!==void 0&&(k.href=Z)};
g.pZ=function(Z,k={},N=!1){const a=g.G("EVENT_ID");a&&(k.ei||(k.ei=a));k&&s5(Z,k);N||(by(Z),g.SHR(Z))};
g.RJ=function(Z,k,N,a,T=!1){N&&s5(Z,N);N=g.GI(Z);const K=g.gI(N);Z!=K&&T_(Error(`Unsafe window.open URL: ${Z}`));Z=K;k=k||rJ(Z).toString(36);try{if(T)return T=Z,T=yii(T),by(T),g.p5(window,T,k,"attributionsrc")}catch(y){g.N2(y)}by(Z);return g.p5(window,N,k,a)};
eT0=function(Z){M4=Z};
ogb=function(Z){nZ=Z};
JLr=function(Z){IJ=Z};
Uyf=function(){zTf=IJ=nZ=M4=null};
bIN=function(Z){Z.addEventListener("updateKevlarOrC3Companion",eT0);Z.addEventListener("updateEngagementPanelAction",ogb);Z.addEventListener("changeEngagementPanelVisibility",JLr);window.addEventListener("yt-navigate-start",Uyf)};
RT0=function(){var Z=window.location.href;if(g.ii("kevlar_disable_theme_param"))return null;N1(Z);try{const k=g.mm(Z).theme;return pcX.get(k)||null}catch(k){}return null};
Mcy=function(Z,k){if(k.encryptedTokenJarContents&&(Z.V[k.encryptedTokenJarContents]=k,typeof k.expirationSeconds==="string")){const N=Number(k.expirationSeconds);setTimeout(()=>{delete Z.V[k.encryptedTokenJarContents]},N*1E3);
Z.U&&g.NS("CONSISTENCY",k.encryptedTokenJarContents,N,void 0,!0)}};
jM=function(Z){return Z.localStorage===void 0?new $s("yt-client-location"):Z.localStorage};
g.YZ=function(Z,k=!1,N=!1){var a=g.G("INNERTUBE_CONTEXT");if(!a)return g.b(Error("Error: No InnerTubeContext shell provided in ytconfig.")),{};a=g.MF(a);g.ii("web_no_tracking_params_in_shell_killswitch")||delete a.clickTracking;a.client||(a.client={});var T=a.client;T.clientName==="MWEB"&&T.clientFormFactor!=="AUTOMOTIVE_FORM_FACTOR"&&(T.clientFormFactor=g.G("IS_TABLET")?"LARGE_FORM_FACTOR":"SMALL_FORM_FACTOR");T.screenWidthPoints=window.innerWidth;T.screenHeightPoints=window.innerHeight;T.screenPixelDensity=
Math.round(window.devicePixelRatio||1);T.screenDensityFloat=window.devicePixelRatio||1;T.utcOffsetMinutes=-Math.floor((new Date).getTimezoneOffset());var K=g.QC();var y="USER_INTERFACE_THEME_LIGHT";K.Aq(165)?y="USER_INTERFACE_THEME_DARK":K.Aq(174)?y="USER_INTERFACE_THEME_LIGHT":!g.ii("kevlar_legacy_browsers")&&window.matchMedia&&window.matchMedia("(prefers-color-scheme)").matches&&window.matchMedia("(prefers-color-scheme: dark)").matches&&(y="USER_INTERFACE_THEME_DARK");K=RT0()||y;T.userInterfaceTheme=
K;if(!k){if(K=KQb())T.connectionType=K;g.ii("web_log_effective_connection_type")&&(K=Qaf())&&(a.client.effectiveConnectionType=K)}g.ii("web_log_memory_total_kbytes")&&g.dX.navigator?.deviceMemory&&(a.client.memoryTotalKbytes=`${g.dX.navigator?.deviceMemory*1E6}`);if(g.ii("web_gcf_hashes_innertube")){var Q=AZy();Q&&(K=Q.coldConfigData,y=Q.coldHashData,Q=Q.hotHashData,a.client.configInfo=a.client.configInfo||{},K&&(a.client.configInfo.coldConfigData=K),y&&(a.client.configInfo.coldHashData=y),Q&&(a.client.configInfo.hotHashData=
Q))}K=g.mm(g.dX.location.href);!g.ii("web_populate_internal_geo_killswitch")&&K.internalcountrycode&&(T.internalGeo=K.internalcountrycode);T.clientName==="MWEB"||T.clientName==="WEB"?(T.mainAppWebInfo||(T.mainAppWebInfo={}),T.mainAppWebInfo.graftUrl=g.dX.location.href,g.ii("kevlar_woffle")&&ng0.instance&&(K=ng0.instance,T.mainAppWebInfo.pwaInstallabilityStatus=!K.V&&K.U?"PWA_INSTALLABILITY_STATUS_CAN_BE_INSTALLED":"PWA_INSTALLABILITY_STATUS_UNKNOWN"),T.mainAppWebInfo.webDisplayMode=Tb(),T.mainAppWebInfo.isWebNativeShareAvailable=
navigator&&navigator.share!==void 0):T.clientName==="TVHTML5"&&(!g.ii("web_lr_app_quality_killswitch")&&(K=g.G("LIVING_ROOM_APP_QUALITY"))&&(T.tvAppInfo=Object.assign(T.tvAppInfo||{},{appQuality:K})),K=g.G("LIVING_ROOM_CERTIFICATION_SCOPE"))&&(T.tvAppInfo=Object.assign(T.tvAppInfo||{},{certificationScope:K}));if(!g.ii("web_populate_time_zone_itc_killswitch")){a:{if(typeof Intl!=="undefined")try{var q=(new Intl.DateTimeFormat).resolvedOptions().timeZone;break a}catch{}q=void 0}q&&(T.timeZone=q)}(q=
wu())?T.experimentsToken=q:delete T.experimentsToken;T=$6();Ew.instance||(Ew.instance=new Ew);q=$a(Ew.instance.V);a.request={...a.request,internalExperimentFlags:T,consistencyTokenJars:q};!g.ii("web_prequest_context_killswitch")&&(T=g.G("INNERTUBE_CONTEXT_PREQUEST_CONTEXT"))&&(a.request.externalPrequestContext=T);q=g.QC();T=q.Aq(58);q=q.get("gsml","");a.user={...a.user};T&&(a.user.enableSafetyMode=T);q&&(a.user.lockedSafetyMode=!0);g.ii("warm_op_csn_cleanup")?N&&(k=g.C9())&&(a.clientScreenNonce=k):
!k&&(k=g.C9())&&(a.clientScreenNonce=k);Z&&(a.clickTracking={clickTrackingParams:Z});if(Z=g.Vf("yt.mdx.remote.remoteClient_"))a.remoteClient=Z;Wm.getInstance().setLocationOnInnerTubeContext(a);try{var r=tP(),C=r.bid;delete r.bid;a.adSignalsInfo={params:[],bid:C};for(const [m,A]of Object.entries(r))r=m,C=A,a.adSignalsInfo.params?.push({key:r,value:`${C}`});if(a.client?.clientName==="TVHTML5"||a.client?.clientName==="TVHTML5_UNPLUGGED"){const m=g.G("INNERTUBE_CONTEXT");m.adSignalsInfo&&(a.adSignalsInfo.advertisingId=
m.adSignalsInfo.advertisingId,a.adSignalsInfo.advertisingIdSignalType="DEVICE_ID_TYPE_CONNECTED_TV_IFA",a.adSignalsInfo.limitAdTracking=m.adSignalsInfo.limitAdTracking)}}catch(m){g.b(m)}return a};
Egf=function(Z,k){if(!Z)return!1;var N=g.J(Z,Irf)?.signal;if(N&&k.ZZ)return!!k.ZZ[N];if((N=g.J(Z,jAG)?.request)&&k.wl)return!!k.wl[N];for(const a in Z)if(k.a_[a])return!0;return!1};
WFG=function(Z){const k={"Content-Type":"application/json"};g.G("EOM_VISITOR_DATA")?k["X-Goog-EOM-Visitor-Id"]=g.G("EOM_VISITOR_DATA"):g.G("VISITOR_DATA")&&(k["X-Goog-Visitor-Id"]=g.G("VISITOR_DATA"));k["X-Youtube-Bootstrap-Logged-In"]=g.G("LOGGED_IN",!1);g.G("DEBUG_SETTINGS_METADATA")&&(k["X-Debug-Settings-Metadata"]=g.G("DEBUG_SETTINGS_METADATA"));Z!=="cors"&&((Z=g.G("INNERTUBE_CONTEXT_CLIENT_NAME"))&&(k["X-Youtube-Client-Name"]=Z),(Z=g.G("INNERTUBE_CONTEXT_CLIENT_VERSION"))&&(k["X-Youtube-Client-Version"]=
Z),(Z=g.G("CHROME_CONNECTED_HEADER"))&&(k["X-Youtube-Chrome-Connected"]=Z),(Z=g.G("DOMAIN_ADMIN_STATE"))&&(k["X-Youtube-Domain-Admin-State"]=Z));(Z=g.G("SERIALIZED_LAVA_DEVICE_CONTEXT"))&&(k["X-YouTube-Lava-Device-Context"]=Z);return k};
Zw=function(Z){return()=>new Z};
ZVy=function(Z){if(Z.length===1)return Z[0];var k=YHR.UNKNOWN_INTERFACE;if(k){k=new RegExp(k);for(var N of Z)if(k.exec(N))return N}const a=[];Object.entries(YHR).forEach(([T,K])=>{"UNKNOWN_INTERFACE"!==T&&a.push(K)});
N=new RegExp(a.join("|"));Z.sort((T,K)=>T.length-K.length);
for(const T of Z)if(!N.exec(T))return T;return Z[0]};
g.kP=function(Z){return`/youtubei/v1/${ZVy(Z)}`};
NJ=function(Z){return g.Vf("ytcsi."+(Z||"")+"data_")||kry(Z)};
NAb=function(){const Z=NJ();Z.info||(Z.info={});return Z.info};
ar=function(Z){Z=NJ(Z);Z.metadata||(Z.metadata={});return Z.metadata};
Tl=function(Z){Z=NJ(Z);Z.tick||(Z.tick={});return Z.tick};
KW=function(Z){Z=NJ(Z);if(Z.gel){const k=Z.gel;k.gelInfos||(k.gelInfos={});k.gelTicks||(k.gelTicks={})}else Z.gel={gelTicks:{},gelInfos:{}};return Z.gel};
a7i=function(Z){Z=KW(Z);Z.gelInfos||(Z.gelInfos={});return Z.gelInfos};
TAj=function(){const Z=KW();Z.preLoggedGelInfos||(Z.preLoggedGelInfos=[]);return Z.preLoggedGelInfos};
yT=function(Z){let k=NJ(Z).nonce;k||(k=g.av(16),NJ(Z).nonce=k);return k};
kry=function(Z){const k={tick:{},info:{}};g.X0("ytcsi."+(Z||"")+"data_",k);return k};
KxN=function(){let Z=g.Vf("ytcsi.debug");Z||(Z=[],g.X0("ytcsi.debug",Z),g.X0("ytcsi.reference",{}));return Z};
QdG=function(Z){const k=KxN();k.push(Z);g.ii("limit_ytcsi_debug_array_size")&&k.length>ysf&&k.splice(0,k.length-ysf)};
QT=function(Z){Z=Z||"";const k=qEf();if(k[Z])return k[Z];const N={timerName:Z,info:{},tick:{},span:{},jspbInfo:[]};QdG(N);return k[Z]=N};
rsr=function(Z){Z=Z||"";const k=qEf();k[Z]&&delete k[Z];const N={timerName:Z,info:{},tick:{},span:{},jspbInfo:[]};QdG(N);k[Z]=N};
qEf=function(){const Z=g.Vf("ytcsi.reference");if(Z)return Z;KxN();return g.Vf("ytcsi.reference")};
qJ=function(Z){return Clj[Z]||"LATENCY_ACTION_UNKNOWN"};
Plf=function(Z,k,N={}){var a=Math.round(N.timestamp||(0,g.z)());y3(Z,1,a<Number.MAX_SAFE_INTEGER?a:0);a=new mYr;if(N.lact)y3(a,1,isFinite(N.lact)?N.lact:-1);else if(N.timestamp)y3(a,1,-1);else{var T=Qb();y3(a,1,isFinite(T)?T:-1)}if(N.sequenceGroup&&!g.ii("web_gel_sequence_info_killswitch")){T=N.sequenceGroup;const K=vXf(T),y=new sdy;y3(y,2,K);Q3(y,1,T);jt(a,sdy,3,y);N.endOfSequence&&delete AsN[N.sequenceGroup]}jt(Z,mYr,33,a);(N.sendIsolatedPayload?ZMf:k2r)("latencyActionInfo",{endpoint:"log_event",
payload:Z,cttAuthInfo:N.cttAuthInfo,dangerousLogToVisitorSession:N.dangerousLogToVisitorSession},k)};
csX=function(Z,k={}){let N=!1;g.G("ytLoggingEventsDefaultDisabled",!1)&&(N=!0);Plf(Z,N?null:g.aE,k)};
CW=function(){rV.instance||(rV.instance=new rV);return rV.instance};
sL=function(Z,k){m6[k]=m6[k]||{count:0};var N=m6[k];N.count++;N.time=(0,g.z)();Z.V||(Z.V=g.c9(0,()=>{const a=(0,g.z)();for(const T in m6)m6[T]&&a-m6[T].time>6E4&&delete m6[T];Z&&(Z.V=0)},5E3));
return N.count>5?(N.count===6&&Math.random()*1E5<1&&(N=new g.jD("CSI data exceeded logging limit with key",k.split("_")),k.indexOf("plev")>=0||g.L9(N)),!0):!1};
HVf=function(){var Z;g.ii("csi_use_performance_navigation_timing")?(Z=AN?.getEntriesByType?.("navigation")?.[0]?.toJSON?.())?(Z.requestStart=PX(Z.requestStart),Z.responseEnd=PX(Z.responseEnd),Z.redirectStart=PX(Z.redirectStart),Z.redirectEnd=PX(Z.redirectEnd),Z.domainLookupEnd=PX(Z.domainLookupEnd),Z.connectStart=PX(Z.connectStart),Z.connectEnd=PX(Z.connectEnd),Z.responseStart=PX(Z.responseStart),Z.secureConnectionStart=PX(Z.secureConnectionStart),Z.domainLookupStart=PX(Z.domainLookupStart),Z.isPerformanceNavigationTiming=
!0):Z=AN.timing:Z=g.ii("csi_performance_timing_to_object")?JSON.parse(JSON.stringify(AN.timing)):AN.timing;return Z};
PX=function(Z){return Math.round(cX()+Z)};
cX=function(){return(g.ii("csi_use_time_origin")||g.ii("csi_use_time_origin_tvhtml5"))&&AN.timeOrigin?Math.floor(AN.timeOrigin):AN.timing.navigationStart};
dYU=function(){const Z=TAj(),k=a7i();var N=void 0;for(var a=0;a<Z.length;a++){const Q=Z[a];if(Q.loadType){N=Q.loadType;break}}if(ar().loadType==="cold"&&(k.loadType==="cold"||N==="cold")){N=Tl();a=KW();a=a.gelTicks?a.gelTicks:a.gelTicks={};for(var T in N)T in a||typeof N[T]==="number"&&HX(T,dV(T));var K={},y=!1;T=Q=>{Ys(k,Q);Ys(K,Q);y=!0};
for(const Q of Z)T(Q);y&&Xq(K)}};
LW=function(Z,k){HX("_start",Z,k)};
Xq=function(Z,k){if(!g.ii("web_csi_action_sampling_enabled")||!NJ(k).actionDisabled){var N=QT(k||"");Ys(N.info,Z);Z.loadType&&(N=Z.loadType,ar(k).loadType=N);Ys(a7i(k),Z);N=yT(k);k=NJ(k).cttAuthInfo;CW().info(Z,N,k)}};
X$b=function(){return(Pu().resolve(r6(QW))?.kC()?.loggingHotConfig?.csiConfig?.debugTicks??[]).map(Z=>Object.values(Z)[0])};
HX=function(Z,k,N){if(!g.ii("web_csi_action_sampling_enabled")||!NJ(N).actionDisabled){var a=yT(N),T;if(T=g.ii("web_csi_debug_sample_enabled")&&a){Pu().resolve(r6(QW))?.kC()&&!LxR&&(LxR=!0,HX("gcfl",(0,g.z)(),N));T=Pu().resolve(r6(QW))?.kC()?.loggingHotConfig?.csiConfig?.debugSampleWeight||0;var K;if(K=T!==0)b:{K=X$b();if(K.length>0)for(let Q=0;Q<K.length;Q++)if(Z===K[Q]){K=!0;break b}K=!1}K?(T=cBR(a)%T!==0,NJ(N).debugTicksExcludedLogged||(K={},K.debugTicksExcluded=T,Xq(K,N)),NJ(N).debugTicksExcludedLogged=
!0):T=!1}if(!T){if(Z[0]!=="_"&&(T=Z,K=k,AN.mark))if(T.startsWith("mark_")||(T="mark_"+T),N&&(T+=` (${N})`),K===void 0||g.ii("web_csi_disable_alt_time_performance_mark"))AN.mark(T);else{K=g.ii("csi_use_performance_navigation_timing")?K-AN.timeOrigin:K-(AN.timeOrigin||AN.timing.navigationStart);try{AN.mark(T,{startTime:K})}catch(Q){}}T=QT(N||"");T.tick[Z]=k||(0,g.z)();if(T.callback&&T.callback[Z])for(var y of T.callback[Z])y();y=KW(N);y.gelTicks&&(y.gelTicks[Z]=!0);T=Tl(N);y=k||(0,g.z)();T[Z]=y;T=NJ(N).cttAuthInfo;
Z==="_start"?(Z=CW(),sL(Z,`baseline_${a}`)||g.TO("latencyActionBaselined",{clientActionNonce:a},{timestamp:k,cttAuthInfo:T})):CW().tick(Z,a,k,T);Vfy(N);return y}}};
Fxj=function(){const Z=AN.getEntriesByType?.("mark");Z&&Z.forEach(k=>{k.name.startsWith("mark_")&&AN.clearMarks?.(k.name)})};
tfR=function(){switch(zzy()){case "hidden":return 0;case "visible":return 1;case "prerender":return 2;case "unloaded":return 3;default:return-1}};
h4f=function(Z){const k={},N=(a,T,K)=>{T=T.match("_rid")?T.split("_rid")[0]:T;typeof K==="number"&&(K=JSON.stringify(K));a.requestIds?a.requestIds.push({endpoint:T,id:K}):a.requestIds=[{endpoint:T,id:K}]};
for(const [a,T]of Object.entries(Z)){Z=a;const K=T;switch(Z){case "GetBrowse_rid":N(k,Z,K);break;case "GetGuide_rid":N(k,Z,K);break;case "GetHome_rid":N(k,Z,K);break;case "GetPlayer_rid":N(k,Z,K);break;case "GetSearch_rid":N(k,Z,K);break;case "GetSettings_rid":N(k,Z,K);break;case "GetTrending_rid":N(k,Z,K);break;case "GetWatchNext_rid":N(k,Z,K);break;case "yt_red":k.isRedSubscriber=!!K;break;case "yt_ad":k.isMonetized=!!K}}return k};
uRX=function(Z,k){Z=document.querySelector(Z);if(!Z)return!1;var N="";const a=Z.nodeName;a==="SCRIPT"?(N=Z.src,N||(N=Z.getAttribute("data-timing-href"))&&(N=window.location.protocol+N)):a==="LINK"&&(N=Z.href);R2(document)&&Z.setAttribute("nonce",R2(document));return N?(Z=AN.getEntriesByName(N))&&Z[0]&&(Z=Z[0],N=cX(),HX("rsf_"+k,N+Math.round(Z.fetchStart)),HX("rse_"+k,N+Math.round(Z.responseEnd)),Z.transferSize!==void 0&&Z.transferSize===0)?!0:!1:!1};
l7X=function(){const Z=window.location.protocol;var k=AN.getEntriesByType("resource");k=g.Ry(k,N=>N.name.indexOf(`${Z}//fonts.gstatic.com/s/`)===0);
(k=jN(k,(N,a)=>a.duration>N.duration?a:N,{duration:0}))&&k.startTime>0&&k.responseEnd>0&&(HX("wffs",PX(k.startTime)),HX("wffe",PX(k.responseEnd)))};
f7f=function(Z,k,N){AN&&AN.measure&&(Z.startsWith("measure_")||(Z="measure_"+Z),N?AN.measure(Z,k,N):k?AN.measure(Z,k):AN.measure(Z))};
BAN=function(Z){var k=dV("aft",Z);if(k)return k;k=g.G((Z||"")+"TIMING_AFT_KEYS",["ol"]);const N=k.length;for(let a=0;a<N;a++){const T=dV(k[a],Z);if(T)return T}return NaN};
VT=function(Z,k){g.X0("ytglobal.timing"+(k||"")+"ready_",Z)};
dV=function(Z,k){if(Z=Tl(k)[Z])return typeof Z==="number"?Z:Z[Z.length-1]};
Vfy=function(Z){const k=dV("_start",Z),N=BAN(Z),a=!DYX;k&&N&&a&&(th(OVf,new vwU(Math.round(N-k),Z)),DYX=!0)};
iVb=function(){if(AN.getEntriesByType){var Z=AN.getEntriesByType("paint");if(Z=g.ZD(Z,N=>N.name==="first-paint"))return PX(Z.startTime)}let k;
g.ii("csi_use_performance_navigation_timing")?k=AN.getEntriesByType("first-paint")[0].startTime:k=AN.timing.M86;return k?Math.max(0,k):0};
Fq=function(Z){kry(Z);gwN();Fxj();Z||(g.G("TIMING_ACTION")&&YA("PREVIOUS_ACTION",g.G("TIMING_ACTION")),YA("TIMING_ACTION",""))};
w$f=function(){var Z=["pbs","pbu"];g.ai(()=>{QT("").info.actionType="watch";Z&&YA("TIMING_AFT_KEYS",Z);YA("TIMING_ACTION","watch");var k=h4f(g.G("TIMING_INFO",{}));Object.keys(k).length>0&&Xq(k);k={isNavigation:!0,actionType:qJ(g.G("TIMING_ACTION"))};var N=g.G("PREVIOUS_ACTION");N&&(k.previousAction=qJ(N));if(N=g.G("CLIENT_PROTOCOL"))k.httpProtocol=N;if(N=g.G("CLIENT_TRANSPORT"))k.transportProtocol=N;(N=g.C9())&&N!=="UNDEFINED_CSN"&&(k.clientScreenNonce=N);N=tfR();if(N===1||N===-1)k.isVisible=!0;
N=ar().loadType==="cold";var a=NAb();N||(N=a.yt_lt==="cold");if(N){k.loadType="cold";N=NAb();a=HVf();let y=cX();const Q=g.G("CSI_START_TIMESTAMP_MILLIS",0);Q>0&&!g.ii("embeds_web_enable_csi_start_override_killswitch")&&(y=Q);y&&(HX("srt",a.responseStart),N.prerender!==1&&LW(y));N=iVb();N>0&&HX("fpt",N);N=HVf();N.isPerformanceNavigationTiming&&Xq({performanceNavigationTiming:!0},void 0);HX("nreqs",N.requestStart,void 0);HX("nress",N.responseStart,void 0);HX("nrese",N.responseEnd,void 0);N.redirectEnd-
N.redirectStart>0&&(HX("nrs",N.redirectStart,void 0),HX("nre",N.redirectEnd,void 0));N.domainLookupEnd-N.domainLookupStart>0&&(HX("ndnss",N.domainLookupStart,void 0),HX("ndnse",N.domainLookupEnd,void 0));N.connectEnd-N.connectStart>0&&(HX("ntcps",N.connectStart,void 0),HX("ntcpe",N.connectEnd,void 0));N.secureConnectionStart>=cX()&&N.connectEnd-N.secureConnectionStart>0&&(HX("nstcps",N.secureConnectionStart,void 0),HX("ntcpe",N.connectEnd,void 0));AN&&"getEntriesByType"in AN&&l7X();N=[];if(document.querySelector&&
AN&&AN.getEntriesByName)for(T in tN)tN.hasOwnProperty(T)&&(a=tN[T],uRX(T,a)&&N.push(a));var T=N;if(T.length>0){k.resourceInfo=[];for(var K of T)k.resourceInfo.push({resourceCache:K})}}Xq(k);dYU();VT(!0);K=g.G("TIMING_ACTION");g.Vf("ytglobal.timingready_")&&K&&hN()&&BAN()&&Vfy()})()};
$Yf=function(){var Z={};g.ai(()=>{hN()&&uJ("aa",void 0,void 0);rsr();Fq();VT(!1);Z.cttAuthInfo&&(NJ().cttAuthInfo=Z.cttAuthInfo);YA("TIMING_AFT_KEYS",[]);Z.ldt?g.lJ({loadType:"hot"}):g.lJ({loadType:"warm"});YA("TIMING_ACTION","");delete g.G("TIMING_INFO",{}).yt_lt;g.ai(LW)(Z.startTime,void 0)})()};
OL=function(Z,k={}){g.ai(()=>{xYf(Z);var N=k.sampleRate;if(!g.ii("web_csi_action_sampling_enabled")||N===void 0||N<=1)N=!1;else{var a=yT(Z);N=cBR(a)%N!==0}N&&(NJ(Z).actionDisabled=!0);QT(Z||"").info.actionType=Z;k.cttAuthInfo&&(NJ(Z).cttAuthInfo=k.cttAuthInfo);YA(Z+"TIMING_ACTION",Z);g.ai(LW)(k.startTime,Z);N={actionType:qJ(Z)};k.H3q&&(N.previousAction=qJ(g.G("TIMING_ACTION")));(a=g.C9())&&a!=="UNDEFINED_CSN"&&(N.clientScreenNonce=a);g.lJ(N,Z);VT(!0,Z)})()};
xYf=function(Z){g.ai(()=>{hN(Z)&&uJ("aa",void 0,Z);rsr(Z);Fq(Z)})()};
hN=function(Z){return g.ai(()=>vX("_start",Z))()};
g.lJ=function(Z,k,N=!1){g.ai(Xq)(Z,k,N)};
uJ=function(Z,k,N){return g.ai(HX)(Z,k,N)};
Grj=function(Z){g.ai(f7f)("action_finished",Z,void 0)};
vX=function(Z,k){return g.ai(()=>{const N=Tl(k);return Z in N})()};
e4r=function(Z){if(!g.ii("universal_csi_network_ticks"))return"";Z=N1(Z)||"";const k=Object.keys(SEr);for(let N=0;N<k.length;N++){const a=k[N];if(Z.includes(a))return a}return""};
Jsf=function(Z){if(!g.ii("universal_csi_network_ticks"))return()=>{};
const k=SEr[Z];return k?(iJ(k),()=>{var N=g.ii("universal_csi_network_ticks")?(N=owf[Z])?iJ(N):!1:!1;return N}):()=>{}};
iJ=function(Z,k,N){return g.ai(()=>{if(vX(Z,N))return!1;uJ(Z,k,N);return!0})()};
gV=function(Z,k,N){g.ai(()=>{if(!hN(N)||vX(Z,N))return!1;uJ(Z,k,N);return!0})()};
z4r=function(){g.ai(()=>{const Z=yT();requestAnimationFrame(()=>{setTimeout(()=>{Z===yT()&&uJ("ftl",void 0,void 0)},0)})})()};
UY0=function(Z,k,N,a,T){if(wV.instance!==void 0){if(a=wV.instance,Z=[Z!==a.Y,k!==a.lx,N!==a.V,T!==a.D,!1,!1,!1],Z.some(K=>K))throw new g.jD("InnerTubeTransportService is already initialized",Z);
}else wV.instance=new wV(Z,k,N,a,T)};
bVR=function(Z,k){a:{Z=Z.Y;var N=g.J(k,Irf)?.signal;if(N&&Z.ZZ&&(N=Z.ZZ[N])){var a=N();break a}if((N=g.J(k,jAG)?.request)&&Z.wl&&(N=Z.wl[N])){a=N();break a}for(a in k)if(Z.a_[a]&&(k=Z.a_[a])){a=k();break a}a=void 0}if(a!==void 0)return Promise.resolve(a)};
p$N=function(Z,k,N){Z=Z.V.NQ(k?.RC?.identity||Xk,{sessionIndex:k?.RC?.sessionIndex});return{...WFG(N),...Z}};
R4R=async function(Z,k,N){Z=await g.$E(Z.V.NQ(k?.RC?.identity||Xk,{sessionIndex:k?.RC?.sessionIndex}));return Promise.resolve({...WFG(N),...Z})};
Wx0=async function(Z,k,N,a=()=>{}){var T=k.config?.sU?.NB;
if(T&&Z.D&&Z.D.has(T)&&!k.config?.sU?.disableCache){var K=await Z.D.get(T);if(K&&!K.isExpired())return a=MfR(K),g.ii("web_process_response_store_responses")&&!K.isProcessed()&&(nwX(Z,a,k),await I7b(Z.D,T)),Promise.resolve(a)}await jdf(k);(T=k.config?.requestKey)&&Z.U.has(T)?N=Z.U.get(T):(K=JSON.stringify(k.Hf),k.El={...k.El,headers:{...(k.El?.headers??{}),...N}},N={...k.El},k.El.method==="POST"&&(N={...N,body:K}),k.config?.UV&&uJ(k.config.UV),N=Z.lx.fetch(k.input,N,k.config),T&&Z.U.set(T,N));(N=await N)&&
g.ii("web_streaming_player")&&Array.isArray(N)&&(N=N[0].playerResponse);if(N&&"error"in N&&N?.error?.details){K=N.error.details;for(const y of K)(K=y["@type"])&&Ewf.indexOf(K)>-1&&(delete y["@type"],N=y)}T&&Z.U.has(T)&&Z.U.delete(T);k.config?.Ye&&uJ(k.config.Ye);nwX(Z,N,k);k.config?.Tb&&uJ(k.config.Tb);a();return N||void 0};
$P=function(Z,k,N){const a=bVR(Z,k);return a?new g.v2(async(T,K)=>{const y=(await a).L(k,N,Xk);y?(by(y.input),K=y.El?.mode==="cors"?"cors":void 0,K=Z.V.jp?p$N(Z,y.config,K):await R4R(Z,y.config,K),T(Wx0(Z,y,K))):K(new g.jD("Error: Failed to build request for command.",k))}):xE(new g.jD("Error: No request builder found for command.",k))};
g.xP=function(Z,k,N,a,T={RC:{identity:Xk}}){let K=()=>{};
K=Jsf(e4r(N));k.context||(k.context=g.YZ(a,!0));return new g.v2(async y=>{var Q=yL(N);Q=c8(Q)?"same-origin":"cors";Q=Z.V.jp?p$N(Z,T,Q):await R4R(Z,T,Q);var q=QL(yL(N));q={input:q,El:qS(q),Hf:k,config:T};y(Wx0(Z,q,Q,K))})};
jdf=async function(Z){if(Z?.Hf?.context){Z=Z.Hf.context;for(const k of[])await k.O3R(Z)}};
nwX=function(Z,k,N){if(k&&!k?.sequenceMetaData?.skipProcessing&&Z.L)for(const a of YEf)Z.L[a]&&Z.L[a].handleResponse(k,N)};
MfR=function(Z){return{...Z.data.innertubeResponse,cacheMetadata:{isCacheHit:!0}}};
I7b=async function(Z,k){const N=Z.V.get(k);N&&(N.entryData.isProcessed=!0,await Z6f(Z,k,N.entryData))};
Z6f=async function(Z,k,N){var a=Z.U;if(N.expireTimestampMs){a=Number(N.expireTimestampMs)-Math.round((0,g.z)());const T=gu("mweb_override_response_store_expiration_ms");T>0&&T<a&&(a=T)}a=setTimeout(()=>{Z.remove(k)},a);
Z.V.set(k,{entryData:N,timer:a})};
Neb=function(Z,k){if(Z=Z.V.get(k))return new kG0(Z.entryData)};
a$R=function(Z,k){const N=Z.V.get(k);N&&(clearTimeout(N.timer),Z.V.delete(k))};
Gl=function(Z,k,N){if(!g.ii("state_tags_killswitch")){var a=new Tef(k);if((a.V?.stateTagsModified||[]).length>0){var T=Z.V.pP();for(var K of T){var y=Neb(Z.V,K);if(y){a:{T=a.V?.stateTagsModified||[];y=(new Tef(MfR(y))).V?.relevantStateTags||[];for(var Q of y)if(Q.stateTag!=null&&T.includes(Q.stateTag)&&Q.onStateTagModified==="STATE_TAG_CACHE_INSTRUCTION_EVICT_RESPONSE"){T=!0;break a}T=!1}T&&a$R(Z.V,K)}}}}a=k.responseContext?.maxAgeSeconds;if(N&&a&&Number(a)>0){a=Number(a)*1E3;K=Math.round((0,g.z)());
Q=K.toString();k={innertubeResponse:k,serverDateTimestampMs:Q,lastModifiedTimestampMs:Q,expireTimestampMs:(K+a).toString(),isProcessed:!0};if(a=g.G("INNERTUBE_CONTEXT_CLIENT_NAME"))k.clientName=a;Z.V.put(N,new kG0(k))}};
KjR=function(Z,k,N){if(Z.V){const a=N1(Hj(k,"key"))||"/UNKNOWN_PATH";Z.V.start(a)}Z=N;g.ii("wug_networking_gzip_request")&&(Z=G3y(N));return new window.Request(k,Z)};
yDi=async function(Z,k,N,a,T){const {value:K,done:y}=await k.read();if(y)return Z.V?.success(),a;let Q;try{Q=N.parse(K)}catch(q){throw new g.Ss("Failed to parse streaming response",K);}if(Q!=null)for(const q of Q)a.push(q),T?.(q);return yDi(Z,k,N,a,T)};
g.bJ=function(Z,k,N){if(!es){const y=Pu();Cm(y,{u9:Q0G,pu:qCX});if(N?.pZ){Cm(y,{u9:or,Ue:g.G("INNERTUBE_CONTEXT_CLIENT_NAME",N.clientInterface)});Cm(y,{u9:JN,Ue:5184E6});Cm(y,{u9:zl,pu:rDy,[mo]:[or,JN]});Cm(y,{u9:UL,pu:Chj});var a=y.resolve(UL),T=window;if(T.ytInitialVideoId){var K=T.ytInitialVideoId;T.ytInitialPlayerResponse&&Gl(a,T.ytInitialPlayerResponse,r$("player",{videoId:K}));T.ytInitialWatchNextResponse&&Gl(a,T.ytInitialWatchNextResponse,r$("next",{videoId:K}));T.ytInitialReelItemWatchResponse&&
Gl(a,T.ytInitialReelItemWatchResponse,r$("reel_item_watch",{videoId:K}))}}a={a_:{feedbackEndpoint:Zw(mzf),modifyChannelNotificationPreferenceEndpoint:Zw(s0X),playlistEditEndpoint:Zw(ADy),shareEntityEndpoint:Zw(Phf),subscribeEndpoint:Zw(cDr),unsubscribeEndpoint:Zw(H6i),webPlayerShareEntityServiceEndpoint:Zw(dzy)}};T=Wm.getInstance();K={};T&&(K.client_location=T);N?.pZ&&(T=y.resolve(UL),K.store=T);Z===void 0&&(Z=Yey());k===void 0&&(k=y.resolve(Q0G));UY0(a,k,Z,K,N?.pZ?y.resolve(zl):void 0);Cm(y,{u9:X2X,
Ue:wV.instance});es=y.resolve(X2X)}return es};
WX=function(Z){const k={};Z=Z.split("&");for(const N of Z)Z=N.split("="),Z.length===2&&(k[Z[0]]=Z[1]);return k};
LjN=async function(){var Z=window;await sE(YP());const k=Z.bgevmc;if(!k)throw Error("BGE Controls not exposed");return{pause:()=>{k.p()},
resume:()=>{k.r()},
checkForRefresh:()=>k.cr()}};
YP=function(){return g.ii("bg_st_hr")?"havuokmhhs-0":`${"havuokmhhs"}-${Math.floor(globalThis.performance?.timeOrigin||0)}`};
Zc=function(Z){window.bgens=Z};
Fjf=function(){return new Promise(Z=>{const k=window;k.ntpevasrs!==void 0?Z(new VqU(k.ntpevasrs)):(k.ntpqfbel===void 0&&(k.ntpqfbel=[]),k.ntpqfbel.push(N=>{Z(new VqU(N))}))})};
uQ0=function(){if(fE()){var Z=g.G("PLAYER_VARS",{});if(g.bT(Z,"privembed",!1)!="1"&&!BUX(Z)){var k=()=>{kp=!0;"google_ad_status"in window?YA("DCLKSTAT",1):YA("DCLKSTAT",2)};
try{const N=R2(document);g.Ij(tqi,k,N)}catch(N){}h8U.push(g.g3.IU(()=>{if(!(kp||"google_ad_status"in window)){try{if(tqi.toString()&&k){var N=`${g.By(k)}`,a=Vuf[N];a&&g.M6(a)}}catch(T){}kp=!0;YA("DCLKSTAT",3)}},5E3))}}};
NU=function(){const Z=Number(g.G("DCLKSTAT",0));return isNaN(Z)?0:Z};
ab=function(Z,k){Z.V=k};
l$N=async function(Z){let k;if(g.dX.ytAtP&&!g.ii("ytatp_ks")){var N=await g.dX.ytAtP;delete g.dX.ytAtP;let T=N?.R;k=N?.T;T?Z.U.V(1,Z.D++):(Z.U.V(2,Z.D++),N=await Tc(Z,Kv(k,null)),T=JSON.stringify(N));g.dX.ytAtRC?g.dX.ytAtRC(T):g.L9(Error("ytAtRC not defined for ytAtP."))}else g.dX.ytAtRC?P9(async()=>{k=g.dX.ytAtT;delete g.dX.ytAtT;if(g.dX.ytAtRC){Z.U.V(2,Z.D++);var T=await Tc(Z,Kv(k,null));g.dX.ytAtRC&&g.dX.ytAtRC(JSON.stringify(T))}else Z.U.V(6,Z.D++)},2,gu("att_init_delay",0)):(k=g.dX.ytAtT,delete g.dX.ytAtT,
Z.U.V(1,Z.D++));
N=await Fjf();N.bindInnertubeChallengeFetcher(T=>{Z.U.V(3,Z.D++);return Tc(Z,Kv(k,T))});
N.registerChallengeFetchedCallback(T=>{T=T.challenge;if(!T)throw Error("BGE_MACR");T={challenge:T,Qa:WX(T),L8:a,bgChallenge:new Re};T=Promise.resolve(T);Z.V=T});
const a=await sE(YP());N=N.getLatestChallengeResponse().challenge;if(!N)throw Error("BGE_MACIL");return{challenge:N,Qa:WX(N),L8:a,bgChallenge:new Re}};
yI=async function(Z){var k=Kv(void 0,oe().V);try{var N=await f$X(Z,k)}catch(Q){return g.L9(Error("Failed to fetch attestation challenge after 5 attempts; not retrying for 24h.")),BeG(Z,864E5),{challenge:"",Qa:{},L8:void 0,bgChallenge:void 0}}k=N.Ca;const a=N.iS;BeG(Z,(Number(a.t)||7200)*1E3);Z=void 0;if("c1a"in a&&N.bgChallenge){N=N.bgChallenge;var T=new Re;if(N.interpreterJavascript){var K=p0(N.interpreterJavascript);K=I2(K).toString();var y=new zs;Q3(y,6,K);jt(T,zs,1,y,WF)}else N.interpreterUrl&&
(K=RW(N.interpreterUrl),K=vC(K).toString(),y=new Uo,Q3(y,4,K),jt(T,Uo,2,y,WF));N.interpreterHash&&q7(T,3,N.interpreterHash,WF);N.program&&q7(T,4,N.program,WF);N.globalName&&q7(T,5,N.globalName,WF);N.clientExperimentsStateBlob&&q7(T,7,N.clientExperimentsStateBlob,WF);try{await bO(oe(),T)}catch(Q){return g.L9(Q),{challenge:k,Qa:a,L8:Z,bgChallenge:T}}try{Z=new kM({challenge:T,eC:{oU:"aGIf"}}),await Z.jG}catch(Q){g.L9(Q),Z=void 0}}return{challenge:k,Qa:a,L8:Z,bgChallenge:T}};
Tc=async function(Z,k){const N=Z.Y;if(!N||N.LN())return Dzj(Z,k);gV("att_pna",void 0,"attestation_challenge_fetch");return new Promise(a=>{N.TG("publicytnetworkstatus-online",()=>{Dzj(Z,k).then(a)})})};
f$X=async function(Z,k){let N=void 0,a=0;for(;a<5;){if(a>0){const T=1E3*Math.pow(2,a-1)+Math.random()*1E3;await new Promise(K=>{g.c9(0,()=>{K(void 0)},T)})}try{Z.U.V(4,Z.D++);
const T=await Tc(Z,k);return O6f(T)}catch(T){N=T,T instanceof Error&&g.L9(T)}a++}throw N;};
BeG=function(Z,k){const N=Date.now()+k,a=async()=>{const T=N-Date.now();T<1E3?await vE0(Z):P9(a,0,Math.min(T,6E4))};
a()};
Dzj=async function(Z,k){Zc(2);try{const N=await Tc(Z.network,k);N?N.challenge&&!N.bgChallenge?Zc(1):Zc(4):Zc(3);return N}catch(N){Zc(3)}};
O6f=function(Z){if(!Z)throw Error("Fetching Attestation challenge returned falsy");if(!Z.challenge)throw Error("Missing Attestation challenge");const k=Z.challenge,N=WX(k);if("c1a"in N&&(!Z.bgChallenge||!Z.bgChallenge.program))throw Error("Expected bg challenge but missing.");return{...Z,Ca:k,iS:N}};
vE0=async function(Z){const k=await Promise.race([Z.V,null]);var N=yI(Z);Z.V=N;k?.L8?.dispose()};
i60=function(Z,k){return new Promise(N=>{g.c9(0,()=>{N(k())},Z)})};
Kv=function(Z,k){const N={engagementType:"ENGAGEMENT_TYPE_UNBOUND"};Z&&(N.eacrToken=Z);k&&(N.interpreterHash=k);return N};
gEr=function(){return new Promise(Z=>{const k=window;k.attmp!==void 0?Z(k.attmp):(k.attmq===void 0&&(k.attmq=[]),k.attmq.push(N=>{Z(N)}))})};
g.$zb=async function(Z,k){if(w2b()){var N=window;return N.attmp!==void 0?N.attmp.s("ENGAGEMENT_TYPE_PLAYBACK",Z,k):(await gEr()).s("ENGAGEMENT_TYPE_PLAYBACK",Z,k)}return(N=(N=g.Vf("yt.aba.att"))?N:QI.instance!==void 0?QI.instance.L.bind(QI.instance):null)?N("ENGAGEMENT_TYPE_PLAYBACK",Z,k):Promise.resolve({error:"ATTESTATION_ERROR_API_NOT_READY"})};
g.xzX=async function(){if(w2b())return window.attmp===void 0?!1:(await gEr()).ir();var Z;return(Z=(Z=g.Vf("yt.aba.att2"))?Z:QI.instance!==void 0?QI.instance.G.bind(QI.instance):null)?Z():Promise.resolve(!1)};
w2b=function(){return(g.ii("attmusi")||g.ii("attmusiw"))&&g.ii("attmusi_ue")};
SCN=function(Z,k){var N=g.Vf("ytDebugData.callbacks");N||(N={},g.X0("ytDebugData.callbacks",N));if(g.ii("web_dd_iu")||GGf.includes(Z))N[Z]=k};
g.qU=function(Z,k,N){const a={...Z};for(const T of Object.keys(k)){const K=Z[T],y=k[T];if(y===void 0)delete a[T];else if(K===void 0)a[T]=y;else if(Array.isArray(y)&&Array.isArray(K))a[T]=N?[...K,...y]:y;else if(!Array.isArray(y)&&g.lf(y)&&!Array.isArray(K)&&g.lf(K))a[T]=g.qU(K,y,N);else if(typeof y===typeof K)a[T]=y;else return k=new g.jD("Attempted to merge fields of differing types.",{name:"DeepMergeError",key:T,mjp:K,updateValue:y}),g.b(k),Z}return a};
e8r=function(Z,k){return Z.V.length===0?!1:(Z=Z.V[Z.V.length-1])&&Z.buffer===k.buffer&&Z.byteOffset+Z.length===k.byteOffset};
rj=function(Z){Z.Y=void 0;Z.U=0;Z.D=0};
Cv=function(Z,k){for(const N of k.V)Z.append(N)};
m4=function(Z,k,N){let {Rg:a,ma:T}=Z.split(k);({Rg:a}=T.split(N));return a};
sB=function(Z,k,N){Z.isFocused(k);return k-Z.D+N<=Z.V[Z.U].length};
oEy=function(Z){if(!Z.Y){const k=Z.V[Z.U];Z.Y=new DataView(k.buffer,k.byteOffset,k.length)}return Z.Y};
JDN=function(Z,k=0,N=-1){if(!Z.totalLength||!N)return new DataView(new ArrayBuffer(0));N<0&&(N=Z.totalLength-k);Z.focus(k);if(!sB(Z,k,N)){var a=Z.U,T=Z.D;Z.focus(k+N-1);T=new Uint8Array(Z.D+Z.V[Z.U].length-T);let K=0;for(let y=a;y<=Z.U;y++)T.set(Z.V[y],K),K+=Z.V[y].length;Z.V.splice(a,Z.U-a+1,T);rj(Z);Z.focus(k)}a=Z.V[Z.U];return new DataView(a.buffer,a.byteOffset+k-Z.D,N)};
A8=function(Z,k=0,N=-1){Z=JDN(Z,k,N);return new Uint8Array(Z.buffer,Z.byteOffset,Z.byteLength)};
PY=function(Z,k=0,N=-1){Z=A8(Z,k,N);k=new Uint8Array(Z.length);try{k.set(Z)}catch(a){for(N=0;N<Z.length;N++)k[N]=Z[N]}return k};
cY=function(Z,k){Z.focus(k);return Z.V[Z.U][k-Z.D]};
z8b=function(Z,k){Z.focus(k);return sB(Z,k,4)?oEy(Z).getUint32(k-Z.D):256*(256*(256*cY(Z,k)+cY(Z,k+1))+cY(Z,k+2))+cY(Z,k+3)};
Uzf=function(Z){const k=new Uint8Array(Z.length);for(let N=0;N<Z.length;N++)k[N]=Z.charCodeAt(N);return k};
dj=function(Z){return Z.length?HY?HY.decode(Z):String.fromCharCode.apply(null,Z):""};
g.Lv=function(Z){if(!Z.length)return"";try{if(HY)return HY.decode(Z);if("FetchInternal"in window)return FetchInternal.decodeFromUTF8(Z)}catch{}let k=0;const N=[],a=Z.length;for(;k<a;){let K=0;for(;K<1024&&k<a;){var T=Z[k++];if(T<128){XZ[K++]=T;continue}if(T<224)T=(T&31)<<6|Z[k++]&63;else if(T<240)T=(T&15)<<12|(Z[k++]&63)<<6|Z[k++]&63;else{if(K+1===1024){--k;break}T=(T&7)<<18|(Z[k++]&63)<<12|(Z[k++]&63)<<6|Z[k++]&63;T-=65536;XZ[K++]=55296|T>>10;T=56320|T&1023}XZ[K++]=T}T=String.fromCharCode.apply(String,
XZ);K<1024&&(T=T.substring(0,K));N.push(T)}return N.join("")};
FZ=function(Z,k){if(VI?.encodeInto){const {read:a,written:T}=VI.encodeInto(Z,k);return a<Z.length?Z.length*4:T}let N=0;for(let a=0;a<Z.length;a++){let T=Z.charCodeAt(a);T<128?k[N++]=T:(T<2048?k[N++]=T>>6|192:((T&64512)===55296&&a+1<Z.length&&(Z.charCodeAt(a+1)&64512)===56320?(T=65536+((T&1023)<<10)+(Z.charCodeAt(++a)&1023),k[N++]=T>>18|240,k[N++]=T>>12&63|128):k[N++]=T>>12|224,k[N++]=T>>6&63|128),k[N++]=T&63|128)}return N};
t8=function(Z){if(VI)return VI.encode(Z);let k=new Uint8Array(Math.ceil(Z.length*1.2)),N=FZ(Z,k);k.length<N&&(k=new Uint8Array(N),N=FZ(Z,k));k.length>N&&(k=k.subarray(0,N));return k};
lt=function(Z,k){Z=Z instanceof Uint8Array?new h8([Z]):Z;return k(new ut(Z))};
fv=function(Z){let k=cY(Z.V,Z.pos);++Z.pos;if(k<128)return k;let N=k&127,a=1;for(;k>=128;)k=cY(Z.V,Z.pos),++Z.pos,a*=128,N+=(k&127)*a;return N};
BY=function(Z,k){let N=Z.U;for(Z.U=-1;Z.pos+1<=Z.V.totalLength;){N<0&&(N=fv(Z));var a=N>>3;const T=N&7;if(a===k)return!0;if(a>k){Z.U=N;break}N=-1;switch(T){case 0:fv(Z);break;case 1:Z.pos+=8;break;case 2:a=fv(Z);Z.pos+=a;break;case 5:Z.pos+=4}}return!1};
Dc=function(Z,k){if(BY(Z,k))return fv(Z)};
OB=function(Z,k){if(BY(Z,k))return k=A8(Z.V,Z.pos,8),Z.pos+=8,(new DataView(k.buffer,k.byteOffset,k.byteLength)).getFloat64(0,!0)};
vY=function(Z,k){if(BY(Z,k))return!!fv(Z)};
gj=function(Z,k){if(BY(Z,k)){k=fv(Z);var N=A8(Z.V,Z.pos,k);Z.pos+=k;return N}};
wj=function(Z,k){if(Z=gj(Z,k))return g.Lv(Z)};
$p=function(Z,k,N){if(Z=gj(Z,k))return N(new ut(new h8([Z])))};
xp=function(Z,k){const N=[];for(;BY(Z,k);)N.push(fv(Z));return N.length?N:void 0};
Gc=function(Z,k,N){const a=[];let T;for(;T=gj(Z,k);)a.push(N(new ut(new h8([T]))));return a.length?a:void 0};
b6y=function(Z,k){Z=new Uint8Array(Z);k&&Z.set(k);return Z};
g.SV=function(Z,k){const N=new p2f(4096);k(N,Z);return new Uint8Array(N.V.buffer,N.V.byteOffset,N.pos)};
eV=function(Z,k){k=Z.pos+k;if(!(Z.V.length>=k)){for(var N=Z.V.length*2;N<k;)N*=2;Z.V=b6y(N,Z.V.subarray(0,Z.pos));Z.view=new DataView(Z.V.buffer,Z.V.byteOffset,Z.V.byteLength)}};
ob=function(Z,k){if(k>268435455){eV(Z,4);let N=k&1073741823;for(let a=0;a<4;a++)Z.view.setUint8(Z.pos,N&127|128),N>>=7,Z.pos+=1;k=Math.floor(k/268435456)}for(eV(Z,4);k>127;)Z.view.setUint8(Z.pos,k&127|128),k>>=7,Z.pos+=1;Z.view.setUint8(Z.pos,k);Z.pos+=1};
J8=function(Z,k,N){N!==void 0&&(ob(Z,k*8),ob(Z,N))};
zc=function(Z,k,N){N!==void 0&&J8(Z,k,N?1:0)};
UB=function(Z,k,N){N!==void 0&&(ob(Z,k*8+2),k=N.length,ob(Z,k),eV(Z,k),Z.V.set(N,Z.pos),Z.pos+=k)};
R8y=function(Z,k,N=2){ob(Z,k*8+2);Z.U.push(Z.pos);Z.U.push(N);Z.pos+=N};
MqU=function(Z){let k=Z.U.pop(),N=Z.U.pop(),a=Z.pos-N-k;for(;k--;){const T=k?128:0;Z.view.setUint8(N++,a&127|T);a>>=7}};
bt=function(Z,k,N){N!==void 0&&(R8y(Z,k,Math.ceil(Math.log2(N.length*4+2)/7)),eV(Z,N.length*1.2),k=FZ(N,Z.V.subarray(Z.pos)),Z.pos+k>Z.V.length&&(eV(Z,k),k=FZ(N,Z.V.subarray(Z.pos))),Z.pos+=k,MqU(Z))};
pv=function(Z,k,N,a,T=3){N&&(R8y(Z,k,T),a(Z,N),MqU(Z))};
g.Rb=function(Z){var k=new ut(new h8([vF(decodeURIComponent(Z))]));Z=wj(k,2);k=Dc(k,4);const N=nEr[k];if(typeof N==="undefined")throw Z=new g.jD("Failed to recognize field number",{name:"EntityKeyHelperError",fieldNumber:k}),g.b(Z),Z;return{Su:k,entityType:N,entityId:Z}};
g.MU=function(Z,k){const N=new p2f;UB(N,2,t8(Z));Z=I$r[k];if(typeof Z==="undefined")throw k=new g.jD("Failed to recognize entity type",{name:"EntityKeyHelperError",entityType:k}),g.b(k),k;J8(N,4,Z);J8(N,5,1);k=new Uint8Array(N.V.buffer,N.V.byteOffset,N.pos);return encodeURIComponent(g.fl(k,0))};
nv=function(Z){Z=Z.key||Z.id;if(!Z)throw Error("Entity key is missing");return Z};
Ib=function(Z,k,N,a){if(a===void 0){const {[N]:T,...K}=Z[k]||{};return{...Z,[k]:K}}return{...Z,[k]:{...Z[k],[N]:a}}};
j0f=function(Z,k,N,a,T){const K=Z[k]||{},y=K[N];if(!y&&!g.ii("web_enable_entity_upsert_on_update"))return Z;a=g.qU(y||{},a,T==="REPEATED_FIELDS_MERGE_OPTION_APPEND");return{...Z,[k]:{...K,[N]:a}}};
EEy=function(Z={},k){switch(k.type){case "ENTITY_LOADED":return k.payload.reduce((N,a)=>{const T=a.options?.persistenceOption;if(T&&T!=="ENTITY_PERSISTENCE_OPTION_UNKNOWN"&&T!=="ENTITY_PERSISTENCE_OPTION_INMEMORY_AND_PERSIST")return N;if(!a.entityKey)return g.b(Error("Missing entity key")),N;if(a.type==="ENTITY_MUTATION_TYPE_REPLACE"){if(!a.payload)return a=new g.jD("REPLACE entity mutation is missing a payload",{entityKey:a.entityKey}),g.b(a),N;var K=g.gH(a.payload);return Ib(N,K,a.entityKey,a.payload[K])}if(a.type===
"ENTITY_MUTATION_TYPE_DELETE"){a:{a=a.entityKey;try{const y=g.Rb(a).entityType;K=Ib(N,y,a);break a}catch(y){if(y instanceof Error){a=new g.jD("Failed to deserialize entity key",{entityKey:a,originalMessage:y.message});g.b(a);K=N;break a}throw y;}K=void 0}return K}if(a.type==="ENTITY_MUTATION_TYPE_UPDATE"){if(!a.payload)return a=new g.jD("UPDATE entity mutation is missing a payload",{entityKey:a.entityKey}),g.b(a),N;K=g.gH(a.payload);return j0f(N,K,a.entityKey,a.payload[K],a.fieldMask?.mergeOptions?.repeatedFieldsMergeOption)}return N},
Z);
case "REPLACE_ENTITY":return Ib(Z,k.payload.entityType,k.payload.key,k.payload.JE);case "REPLACE_ENTITIES":return Object.keys(k.payload).reduce((N,a)=>{const T=k.payload[a];return Object.keys(T).reduce((K,y)=>Ib(K,a,y,T[y]),N)},Z);
case "UPDATE_ENTITY":return j0f(Z,k.payload.entityType,k.payload.key,k.payload.JE,k.payload.jxp);default:return Z}};
jV=function(Z,k,N){return Z[k]?Z[k][N]||null:null};
Wjy=function(){if(EB)return EB();EB=KR("PersistentEntityStoreDb",{V5:{EntityStore:{cV:1},EntityAssociationStore:{cV:2}},shared:!1,upgrade(Z,k){k(1)&&bF(zb(Z,"EntityStore",{keyPath:"key"}),"entityType","entityType");k(2)&&(Z=zb(Z,"EntityAssociationStore",{keyPath:["parentEntityKey","childEntityKey"]}),bF(Z,"byParentEntityKey","parentEntityKey"),bF(Z,"byChildEntityKey","childEntityKey"))},version:3});return EB()};
YCr=function(Z){return g.j5(Wjy(),Z)};
WY=function(Z){return window.Int32Array?new Int32Array(Z):Array(Z)};
Zhi=function(Z){const k=Z.key;let N=Z.counter[0]^k[0],a=Z.counter[1]^k[1],T=Z.counter[2]^k[2],K=Z.counter[3]^k[3];for(var y=3;y>=0&&!(Z.counter[y]=-~Z.counter[y]);y--);let Q,q,r=4;for(;r<40;)y=Yp[N>>>24]^Z6[a>>16&255]^ko[T>>8&255]^N_[K&255]^k[r++],Q=Yp[a>>>24]^Z6[T>>16&255]^ko[K>>8&255]^N_[N&255]^k[r++],q=Yp[T>>>24]^Z6[K>>16&255]^ko[N>>8&255]^N_[a&255]^k[r++],K=Yp[K>>>24]^Z6[N>>16&255]^ko[a>>8&255]^N_[T&255]^k[r++],N=y,a=Q,T=q;Z=Z.U;y=k[40];Z[0]=aU[N>>>24]^y>>>24;Z[1]=aU[a>>16&255]^y>>16&255;Z[2]=
aU[T>>8&255]^y>>8&255;Z[3]=aU[K&255]^y&255;y=k[41];Z[4]=aU[a>>>24]^y>>>24;Z[5]=aU[T>>16&255]^y>>16&255;Z[6]=aU[K>>8&255]^y>>8&255;Z[7]=aU[N&255]^y&255;y=k[42];Z[8]=aU[T>>>24]^y>>>24;Z[9]=aU[K>>16&255]^y>>16&255;Z[10]=aU[N>>8&255]^y>>8&255;Z[11]=aU[a&255]^y&255;y=k[43];Z[12]=aU[K>>>24]^y>>>24;Z[13]=aU[N>>16&255]^y>>16&255;Z[14]=aU[a>>8&255]^y>>8&255;Z[15]=aU[T&255]^y&255};
yq=function(){if(!TT&&!g.Z3){if(KO)return KO;KO=window.crypto?.subtle;if(KO?.importKey&&KO?.sign&&KO?.encrypt)return KO;KO=void 0}};
ksR=async function(Z,k,N){Z.V||(Z.V=await Z.subtleCrypto.importKey("raw",Z.U,{name:"AES-CTR"},!1,["encrypt"]));Z=await Z.subtleCrypto.encrypt({name:"AES-CTR",counter:N,length:128},Z.V,k);return new Uint8Array(Z)};
N40=function(Z){Z.V=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];Z.j=[];Z.j.length=64;Z.Y=0;Z.U=0};
aoN=function(Z,k,N){const a=Z.j;let T=Z.V[0],K=Z.V[1],y=Z.V[2],Q=Z.V[3],q=Z.V[4],r=Z.V[5],C=Z.V[6],m=Z.V[7],A,P,d;for(let h=0;h<64;)h<16?(a[h]=d=k[N]<<24|k[N+1]<<16|k[N+2]<<8|k[N+3],N+=4):(A=a[h-2],P=a[h-15],d=a[h-7]+a[h-16]+((A>>>17|A<<15)^(A>>>19|A<<13)^A>>>10)+((P>>>7|P<<25)^(P>>>18|P<<14)^P>>>3),a[h]=d),A=m+Qq[h]+d+((q>>>6|q<<26)^(q>>>11|q<<21)^(q>>>25|q<<7))+(q&r^~q&C),P=((T>>>2|T<<30)^(T>>>13|T<<19)^(T>>>22|T<<10))+(T&K^T&y^K&y),m=A+P,Q+=A,h++,h<16?(a[h]=d=k[N]<<24|k[N+1]<<16|k[N+2]<<8|k[N+
3],N+=4):(A=a[h-2],P=a[h-15],d=a[h-7]+a[h-16]+((A>>>17|A<<15)^(A>>>19|A<<13)^A>>>10)+((P>>>7|P<<25)^(P>>>18|P<<14)^P>>>3),a[h]=d),A=C+Qq[h]+d+((Q>>>6|Q<<26)^(Q>>>11|Q<<21)^(Q>>>25|Q<<7))+(Q&q^~Q&r),P=((m>>>2|m<<30)^(m>>>13|m<<19)^(m>>>22|m<<10))+(m&T^m&K^T&K),C=A+P,y+=A,h++,h<16?(a[h]=d=k[N]<<24|k[N+1]<<16|k[N+2]<<8|k[N+3],N+=4):(A=a[h-2],P=a[h-15],d=a[h-7]+a[h-16]+((A>>>17|A<<15)^(A>>>19|A<<13)^A>>>10)+((P>>>7|P<<25)^(P>>>18|P<<14)^P>>>3),a[h]=d),A=r+Qq[h]+d+((y>>>6|y<<26)^(y>>>11|y<<21)^(y>>>25|
y<<7))+(y&Q^~y&q),P=((C>>>2|C<<30)^(C>>>13|C<<19)^(C>>>22|C<<10))+(C&m^C&T^m&T),r=A+P,K+=A,h++,h<16?(a[h]=d=k[N]<<24|k[N+1]<<16|k[N+2]<<8|k[N+3],N+=4):(A=a[h-2],P=a[h-15],d=a[h-7]+a[h-16]+((A>>>17|A<<15)^(A>>>19|A<<13)^A>>>10)+((P>>>7|P<<25)^(P>>>18|P<<14)^P>>>3),a[h]=d),A=q+Qq[h]+d+((K>>>6|K<<26)^(K>>>11|K<<21)^(K>>>25|K<<7))+(K&y^~K&Q),P=((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&C^r&m^C&m),d=m,m=Q,Q=d,d=C,C=y,y=d,d=r,r=K,K=d,q=T+A,T=A+P,h++;Z.V[0]=T+Z.V[0]|0;Z.V[1]=K+Z.V[1]|0;Z.V[2]=y+Z.V[2]|
0;Z.V[3]=Q+Z.V[3]|0;Z.V[4]=q+Z.V[4]|0;Z.V[5]=r+Z.V[5]|0;Z.V[6]=C+Z.V[6]|0;Z.V[7]=m+Z.V[7]|0};
T4b=function(Z){const k=new Uint8Array(32);var N=64-Z.U;Z.U>55&&(N+=64);const a=new Uint8Array(N);a[0]=128;let T=Z.Y*8;for(let K=1;K<9;K++){const y=T%256;a[N-K]=y;T=(T-y)/256}Z.update(a);for(N=0;N<8;N++)k[N*4]=Z.V[N]>>>24,k[N*4+1]=Z.V[N]>>>16&255,k[N*4+2]=Z.V[N]>>>8&255,k[N*4+3]=Z.V[N]&255;N40(Z);return k};
yWU=function(Z,k,N){Z=new KZr(Z.V);Z.update(k);Z.update(N);k=T4b(Z);Z.update(Z.L);Z.update(k);k=T4b(Z);Z.reset();return k};
QeR=async function(Z,k,N){Z.V||(Z.V=await Z.subtleCrypto.importKey("raw",Z.U,{name:"HMAC",hash:"SHA-256"},!1,["sign"]));const a=new Uint8Array(k.length+N.length);a.set(k);a.set(N,k.length);Z=await Z.subtleCrypto.sign({name:"HMAC",hash:"SHA-256"},Z.V,a);return new Uint8Array(Z)};
rWG=async function(Z,k,N,a){Z.U||(Z.U=new qob(Z.V,a));return QeR(Z.U,k,N)};
mWf=function(Z,k,N){Z.D||(Z.D=new COf(Z.V));return yWU(Z.D,k,N)};
sej=async function(Z,k,N){const a=yq();if(a)try{return await rWG(Z,k,N,a)}catch(T){return g.L9(T),TT=!0,mWf(Z,k,N)}else return mWf(Z,k,N)};
AW0=function(Z){return Z instanceof Error?new q_("UNKNOWN_ENCODE_ERROR",{originalMessage:Z.message}):new q_("UNKNOWN_ENCODE_ERROR")};
POi=function(Z){return Z instanceof Error?new q_("UNKNOWN_DECODE_ERROR",{originalMessage:Z.message}):new q_("UNKNOWN_DECODE_ERROR")};
cWf=function(Z,k){Z=Z instanceof q_?Z:k(Z);g.b(Z);throw Z;};
g.Hhr=function(Z,k,N){try{return Z.D(k,N)}catch(a){cWf(a,AW0)}};
rb=function(Z){Z=(new TextEncoder).encode(Z).subarray(0,16);const k=new Uint8Array(16);k.set(Z);return k};
X50=function(Z){const k=dWU[Z];if(k)return k;g.L9(new g.jD("Entity model not found.",{entityType:Z}))};
var LZf=function(){return UQ[c[2]](this,29,5733)};
mn=function(Z,k){a:{Z=g.CO(Z.U,k.version);try{var N=Z.U(k.data,k.key);break a}catch(a){cWf(a,POi)}N=void 0}return N};
g.sp=function(Z,k,N){return Z.V.objectStore("EntityStore").get(k).then(a=>{if(a){if(N&&a.entityType!==N)throw Error("Incorrect entity type");return mn(Z,a)}})};
g.Aa=function(Z,k,N){return N?(N=N.map(a=>g.sp(Z,a,k)),g.$h.all(N)):Z.V.objectStore("EntityStore").index("entityType").getAll(IDBKeyRange.only(k)).then(a=>a.map(T=>mn(Z,T)))};
g.FZj=function(Z,k,N){const a=nv(k);return g.P0(Z,a).then(()=>VhN(Z,k,N))};
g.c0=function(Z,k,N){let a=Z.D[N];a||(a=new Set,Z.D[N]=a);a.add(k)};
g.H0=function(Z,k,N){const a=nv(k),T=g.CO(Z.U,1),K={...k};return Z.V.objectStore("EntityStore").get(a).then(y=>{if(y){if(y.entityType!==N)throw Error("Incorrect entity type");K.entityMetadata||(y=mn(Z,y),K.entityMetadata=y.entityMetadata)}}).then(()=>{const y={key:a,
entityType:N,data:g.Hhr(T,K,a),version:1};return g.$h.all([Z.V.objectStore("EntityStore").put(y),g.FZj(Z,K,N)])}).then(()=>{g.c0(Z,a,N);
return a})};
hRf=function(Z,k,N){if(N.has(k))return g.$h.resolve(void 0);N.add(k);return thU(Z,k).then(a=>Z.V.objectStore("EntityAssociationStore").index("byParentEntityKey").delete(IDBKeyRange.only(k)).then(()=>a)).then(a=>{let T=g.$h.resolve(void 0);
for(const K of a)T=T.then(()=>hRf(Z,K,N));
return T}).then(()=>{})};
g.db=function(Z,k,N){if(N?.cX){const T=new Set;return hRf(Z,k,T).then(()=>{const K=[];for(const y of T)K.push(g.db(Z,y));return g.$h.all(K).then(()=>{})})}const a=g.Rb(k).entityType;
return g.$h.all([Z.V.objectStore("EntityStore").delete(k),g.P0(Z,k)]).then(()=>{g.c0(Z,k,a)})};
g.P0=function(Z,k){return Z.V.objectStore("EntityAssociationStore").index("byParentEntityKey").delete(IDBKeyRange.only(k))};
ujf=function(Z,k){k=k.map(N=>g.db(Z,N));
return g.$h.all(k).then(()=>{})};
VhN=function(Z,k,N){const a=nv(k);N=X50(N);if(!N)return g.$h.resolve([]);k=new N(k);Z=Z.V.objectStore("EntityAssociationStore");N=[];for(const T of k.U())N.push(Z.put({parentEntityKey:a,childEntityKey:T}));return g.$h.all(N).then(T=>T.map(K=>K[1]))};
thU=function(Z,k){const N=Z.V.objectStore("EntityAssociationStore");return N.index("byParentEntityKey").getAll(IDBKeyRange.only(k)).then(a=>{const T=[];for(const K of a)T.push(N.index("byChildEntityKey").getAll(K.childEntityKey));return g.$h.all(T)}).then(a=>{const T=[];
for(const K of a)K.length===1&&T.push(K[0].childEntityKey);return T})};
g.CO=function(Z,k=0){Z=Z.V[k];if(!Z)throw k=new q_("INVALID_ENCODER_VERSION",{zO:k}),g.b(k),k;return Z};
lof=function(Z,k){for(const N of Z.observers)N(k)};
g.XY=async function(Z,k,N){var a=await YCr(Z.token);let T;k=await g.J0(a,["EntityStore","EntityAssociationStore"],k,K=>{T=new foy(K,Z.V);return N(T)});
T&&(a=T.D,Object.keys(a).length>0&&(Z.channel.postMessage(a),lof(Z,a)));return k};
g.LO=function(Z,k,N){return g.XY(Z,{mode:"readwrite",Mx:!0},a=>g.H0(a,k,N))};
g.Vq=function(Z,k){return g.XY(Z,{mode:"readwrite",Mx:!0},N=>g.db(N,k))};
B4N=function(Z,k){return g.XY(Z,{mode:"readwrite",Mx:!0},N=>ujf(N,k))};
g.FY=function(Z,k,N){return g.XY(Z,{mode:"readonly",Mx:!0},a=>g.Aa(a,k,N))};
g.ha=function(){ta||(ta=DWf());return ta};
DWf=async function(){try{const k=await g.TN();if(k&&A0()&&typeof g.dX.BroadcastChannel!=="undefined"){var Z=new OhX;return new v_j(k,Z)}}catch(k){k instanceof Error&&g.b(k)}};
g_0=function(Z){let k="";for(let a=0;a<Z.length;a++){var N=Z[a];if(a===0)N=`M ${N.x.toFixed(1)},${N.y.toFixed(1)}`;else{const T=ihy(Z[a-1],Z[a-2],N),K=ihy(N,Z[a-1],Z[a+1],!0);N=` ${`C ${T.x.toFixed(1)},${T.y.toFixed(1)} ${K.x.toFixed(1)},${K.y.toFixed(1)} ${N.x.toFixed(1)},${N.y.toFixed(1)}`}`}k+=N}return k};
$Wj=function(Z,k,N,a,T=!1){const K=1E3/Z.length,y=[];y.push({x:0,y:100});for(let Q=0;Q<Z.length;Q++){const q=(Q+.5)*K,r=100-g.u0((g.J(Z[Q],w5G)?.heatMarkerIntensityScoreNormalized||0)*100,k/N*100,a/N*100);Q!==0||T||y.push({x:0,y:r});y.push({x:q,y:r});Q===Z.length-1&&y.push({x:1E3,y:r})}y.push({x:1E3,y:100});return y};
xWR=function(Z,k,N,a,T=!1){const K=1E3/Z.length,y=[];y.push({x:0,y:100});for(let Q=0;Q<Z.length;Q++){const q=(Q+.5)*K,r=100-g.u0((Z[Q].intensityScoreNormalized||0)*100,k/N*100,a/N*100);Q!==0||T||y.push({x:0,y:r});y.push({x:q,y:r});Q===Z.length-1&&y.push({x:1E3,y:r})}y.push({x:1E3,y:100});return y};
ihy=function(Z,k,N,a=!1){k=new GsN(k||Z,N||Z);return{x:Z.x+SoG(k,a)*.2,y:Z.y+eRy(k,a)*.2}};
SoG=function(Z,k=!1){return k?Z.V*-1:Z.V};
eRy=function(Z,k=!1){return k?Z.U*-1:Z.U};
zRb=async function(Z,k){k={context:g.YZ(),settingItemIds:k};const N=g.kP(o_0);Z=await g.xP(Z,k,N);if(!Z||Z.errorMetadata)JWR("GetSettingValuesRequest",Z);else return Z.settingValues};
bhj=async function(Z,k,N){k={context:g.YZ(),settingItemId:k,newValue:N};N=g.kP(UW0);(Z=await g.xP(Z,k,N))&&!Z.errorMetadata||JWR("SetSettingRequest",Z)};
JWR=function(Z,k){k?k.errorMetadata&&g.L9(new g.jD(`${Z} failed with status ${k.errorMetadata.status}`)):g.L9(new g.jD(`${Z} failed with empty response`))};
p5r=function(Z){return A2(Z,0,"gclid",Z.search(Pj))>=0||A2(Z,0,"gad_source",Z.search(Pj))>=0};
Mhy=function(Z,k){var N=Pu().resolve(RRX);if(p5r(k)){var a=cj(k,"gclid");k={handleEvent:T=>{Z&&!Z.closed&&typeof Z.postMessage==="function"&&T&&T.origin&&T.source===Z&&T.data&&T.data.action==="gcl_setup"&&Z.postMessage({action:"gcl_transfer",...(a&&{gclid:a}),gadSource:2},T.origin)}};
for(const [T,K]of N.V){const y=T,Q=K;if(y.closed)try{window.removeEventListener("message",Q),N.V.delete(y)}catch(q){g.b(q)}}Z&&N.V.size<15&&(N.V.set(Z,k),window.addEventListener("message",k))}};
uD=function(Z,k,N){if(!k)return Z.length>=1?Z[Z.length-1]:null;for(const a of Z)if(a.width&&a.height&&(N&&a.width>=k||!N&&a.height>=k))return a;for(k=Z.length-1;k>=0;k--)if(N&&Z[k].width||!N&&Z[k].height)return Z[k];return Z[0]};
Iof=function(Z,k,N,a,T,K){N?(Z.Qn(2),g.Ij(g.IW(N),()=>{if(window.trayride)n_f(Z,a,T);else{Z.Qn(3);const y=LDy(N),Q=document.getElementById(y);Q&&(def(y),Q.parentNode.removeChild(Q));g.L9(new g.jD("BL:ULB",`${N}`))}},K)):k?(K=g.TU("SCRIPT"),k instanceof MG?(K.textContent=I2(k),jZ(K)):K.textContent=k,K.nonce=R2(document),document.head.appendChild(K),document.head.removeChild(K),window.trayride?n_f(Z,a,T):(Z.Qn(4),g.L9(new g.jD("BL:ULBJ")))):g.L9(new g.jD("BL:ULV"))};
n_f=function(Z,k,N){Z.Qn(5);const a=!!Z.Bo&&jef.includes(g.kX(Z.Bo)||"");try{const T=new kM({program:k,globalName:"trayride",eC:{disable:!g.ii("att_web_record_metrics")||!g.ii("att_skip_metrics_for_cookieless_domains_ks")&&a,oU:"aGIf"}});T.jG.then(()=>{Z.Qn(6);N&&N(k)});
Z.V(T)}catch(T){Z.Qn(7),T instanceof Error&&g.L9(T)}};
lD=function(){const Z=g.Vf("yt.abuse.playerAttLoader");return Z&&["bgvma","bgvmb","bgvmc"].every(k=>k in Z)?Z:null};
E_N=function(Z,k,N){let a=!1;for(const [T]of Z.zk.entries()){const K=T;K.slotType==="SLOT_TYPE_PLAYER_BYTES"&&K.mp==="core"&&(a=!0)}if(a){a:if(!N){for(const [T,K]of Z.zk.entries())if(Z=T,N=K,Z.slotType==="SLOT_TYPE_IN_PLAYER"&&Z.mp==="core"){N=N.layoutId;break a}N=void 0}N?k.oh(N):wm("No triggering layout ID available when attempting to mute.")}};
fO=function(Z,k,N){Z.jm();Z.V.get(k)&&g.b(Error(`Extension name ${k} already registered`));Z.V.set(k,N)};
Z7N=function(Z,k=[],N,a){Z.jm();const T=[],K=[];for(const y of k)g.J(y,WZU)||g.J(y,Yoy)?T.push(y):K.push(y);for(const y of T)B0(Z,y,N,a);for(const y of K)B0(Z,y,N,a)};
kyN=function(Z,k){fO(Z,k.Z4(),(N,a,T)=>{k.bu(N,a,T)})};
B0=function(Z,k,N,a){Z.jm();k.loggingUrls&&Nny(Z,"loggingUrls",k.loggingUrls,N,a);for(const [T,K]of Object.entries(k)){k=T;const y=K;k==="openPopupAction"?D6(Z.fC.get(),"innertubeCommand",{openPopupAction:y}):k==="confirmDialogEndpoint"?D6(Z.fC.get(),"innertubeCommand",{confirmDialogEndpoint:y}):a0r.hasOwnProperty(k)||Nny(Z,k,y,N,a)}};
Nny=function(Z,k,N,a,T){if((Z=Z.V.get(k))&&typeof Z==="function")try{Z(N,a,T)}catch(K){g.b(K)}else k=new g.jD("Unhandled field",k),g.L9(k)};
v0=function(Z,k,N){if(N&&!N.includes(Z.layoutType))return!1;for(const a of k)if(!Op(Z.clientMetadata,a))return!1;return!0};
TnR=function(Z,k){switch(Z){case "TRIGGER_CATEGORY_LAYOUT_EXIT_NORMAL":return 0;case "TRIGGER_CATEGORY_LAYOUT_EXIT_USER_SKIPPED":return 1;case "TRIGGER_CATEGORY_LAYOUT_EXIT_USER_MUTED":return 2;case "TRIGGER_CATEGORY_SLOT_EXPIRATION":return 3;case "TRIGGER_CATEGORY_SLOT_FULFILLMENT":return 4;case "TRIGGER_CATEGORY_SLOT_ENTRY":return 5;case "TRIGGER_CATEGORY_LAYOUT_EXIT_USER_INPUT_SUBMITTED":return 6;case "TRIGGER_CATEGORY_LAYOUT_EXIT_USER_CANCELLED":return 7;default:return k(Z),8}};
Op=function(Z,k){return Z.V.has(k)};
iD=function(Z){return Array.from(Z.V.keys())};
gb=function(Z,k,N){if(N&&N!==Z.slotType)return!1;for(const a of k)if(!Op(Z.clientMetadata,a))return!1;return!0};
yvG=function(Z){return K3N.get(Z)?.Mn||"ADS_CLIENT_EVENT_TYPE_UNSPECIFIED"};
$o=function(Z,k){const N={type:k.slotType,controlFlowManagerLayer:QLy.get(k.mp)||"CONTROL_FLOW_MANAGER_LAYER_UNSPECIFIED"};k.slotEntryTrigger&&(N.entryTriggerType=k.slotEntryTrigger.triggerType);k.slotPhysicalPosition!==1&&(N.slotPhysicalPosition=k.slotPhysicalPosition);if(Z){N.debugData={slotId:k.slotId};if(Z=k.slotEntryTrigger)N.debugData.slotEntryTriggerData=wb(Z);Z=k.slotFulfillmentTriggers;N.debugData.fulfillmentTriggerData=[];for(const a of Z)N.debugData.fulfillmentTriggerData.push(wb(a));k=
k.slotExpirationTriggers;N.debugData.expirationTriggerData=[];for(const a of k)N.debugData.expirationTriggerData.push(wb(a))}return N};
qsN=function(Z,k){const N={type:k.layoutType,controlFlowManagerLayer:QLy.get(k.mp)||"CONTROL_FLOW_MANAGER_LAYER_UNSPECIFIED"};Z&&(N.debugData={layoutId:k.layoutId});return N};
wb=function(Z,k){const N={type:Z.triggerType};k!=null&&(N.category=k);Z.triggeringSlotId!=null&&(N.triggerSourceData||(N.triggerSourceData={}),N.triggerSourceData.associatedSlotId=Z.triggeringSlotId);Z.triggeringLayoutId!=null&&(N.triggerSourceData||(N.triggerSourceData={}),N.triggerSourceData.associatedLayoutId=Z.triggeringLayoutId);return N};
rv0=function(Z,k,N,a){k={opportunityType:k};Z&&(a||N)&&(a=g.ni(a||[],T=>$o(Z,T)),k.debugData={...(N&&N.length>0?{associatedSlotId:N}:{}),
...(a.length>0?{slots:a}:{})});return k};
GT=function(Z,k){return N=>CVy(xo(Z),k.slotId,k.slotType,k.slotPhysicalPosition,k.mp,k.slotEntryTrigger,k.slotFulfillmentTriggers,k.slotExpirationTriggers,N.layoutId,N.layoutType,N.mp)};
CVy=function(Z,k,N,a,T,K,y,Q,q,r,C){return{adClientDataEntry:{slotData:$o(Z,{slotId:k,slotType:N,slotPhysicalPosition:a,mp:T,slotEntryTrigger:K,slotFulfillmentTriggers:y,slotExpirationTriggers:Q,clientMetadata:new SB([])}),layoutData:qsN(Z,{layoutId:q,layoutType:r,mp:C,layoutExitNormalTriggers:[],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],d5:new Map,clientMetadata:new SB([]),KF:{}})}}};
xo=function(Z){return Z.V||Z.Gt.get().S.X().B("html5_force_debug_data_for_client_tmp_logs")};
eB=function(Z,k){Z.U.add(k)};
oU=function(Z,k){Z.U.delete(k)};
nO=function(Z,k,N){if(Ja(Z.V,k)){a:switch(zT(Z.V,k).V){case "exit_requested":var a=!0;break a;default:a=!1}if(!a)a:switch(zT(Z.V,k).V){case "rendering_stop_requested":a=!0;break a;default:a=!1}if(a&&(zT(Z.V,k).L=!0,!N))return;if(Up(zT(Z.V,k)))zT(Z.V,k).L=!0,mAG(Z,k,N);else{a:switch(zT(Z.V,k).Y){case "fill_requested":N=!0;break a;default:N=!1}if(N)zT(Z.V,k).L=!0,Ja(Z.V,k)&&(bD(Z.sH,"ADS_CLIENT_EVENT_TYPE_CANCEL_SLOT_FULFILLMENT_REQUESTED",k),Z=zT(Z.V,k),Z.Y="fill_cancel_requested",Z.j.jq());else{N=
pO(Z.V,k);(a=Z.Gt.get().S.X().experiments.yz("h5_enable_layout_unscheduling_events"))&&(N?Z.VT(k,N):wm(Error("Layout is null for LayoutUnscheduled event."),k,N,void 0,!1));bD(Z.sH,"ADS_CLIENT_EVENT_TYPE_UNSCHEDULE_SLOT_REQUESTED",k);const Q=zT(Z.V,k);var T=k.slotEntryTrigger;const q=Q.zt.get(T.triggerId);q&&(q.Aa(T),Q.zt.delete(T.triggerId));for(var K of k.slotFulfillmentTriggers)if(T=Q.Vz.get(K.triggerId))T.Aa(K),Q.Vz.delete(K.triggerId);for(var y of k.slotExpirationTriggers)if(K=Q.N.get(y.triggerId))K.Aa(y),
Q.N.delete(y.triggerId);Q.layout!=null&&(y=Q.layout,RU(Q,y.layoutExitNormalTriggers),RU(Q,y.layoutExitSkipTriggers),RU(Q,y.layoutExitMuteTriggers),RU(Q,y.layoutExitUserInputSubmittedTriggers),RU(Q,y.layoutExitUserCancelledTriggers));Q.j=void 0;Q.U!=null&&(Q.U.release(),Q.U=void 0);Q.D!=null&&(Q.D.release(),Q.D=void 0);y=Z.V;zT(y,k)&&(y=M_(y,`${k.slotType}_${k.slotPhysicalPosition}`))&&y.delete(k.slotId);bD(Z.sH,"ADS_CLIENT_EVENT_TYPE_SLOT_UNSCHEDULED",k);for(const r of Z.U)r.wQ(k),N&&!a&&r.VT(k,N)}}}};
jB=function(Z,k){if(Ja(Z.V,k)){zT(Z.V,k).G=!1;var N=IU;k=zT(Z.V,k);const a=[...k.C];yH(k.C);N(Z,a)}};
sLf=function(Z,k){Ja(Z.V,k)&&Up(zT(Z.V,k))&&pO(Z.V,k)&&!Ep(Z.V,k)&&(W0(Z.sH,"ADS_CLIENT_EVENT_TYPE_ENTER_LAYOUT_REQUESTED",k,pO(Z.V,k)??void 0),Z=zT(Z.V,k),Z.V!=="entered"&&Yo(Z.slot,Z.V,"enterLayoutForSlot"),Z.V="rendering",Z.D.startRendering(Z.layout))};
kB=function(Z,k,N,a){wm(N,k,void 0,void 0,N.BX);N.Do?ZH(Z.sH,a,N.Do,k):wm("adsClientErrorMessage is missing.",k);nO(Z,k,!0)};
Avf=function(Z,k,N){if(Ja(Z.V,k))if(zT(Z.V,k).Y=N?"filled":"not_filled",N===null){W0(Z.sH,"ADS_CLIENT_EVENT_TYPE_SLOT_FULFILLED_EMPTY",k);for(var a of Z.U)a.sQ(k);nO(Z,k,!1)}else{W0(Z.sH,"ADS_CLIENT_EVENT_TYPE_SLOT_FULFILLED_NON_EMPTY",k,N);W0(Z.sH,"ADS_CLIENT_EVENT_TYPE_LAYOUT_RECEIVED",k,N);if(a=N.C5??N.clientMetadata.PD("metadata_type_sub_layouts"))for(const y of a)W0(Z.sH,"ADS_CLIENT_EVENT_TYPE_LAYOUT_RECEIVED",k,y);for(const y of Z.U)y.IJ(k);if(Ja(Z.V,k))if(zT(Z.V,k).L)nO(Z,k,!1);else{W0(Z.sH,
"ADS_CLIENT_EVENT_TYPE_SCHEDULE_LAYOUT_REQUESTED",k,N);try{var T=Z.V;if(!zT(T,k))throw new ND("Unknown slotState for onLayout",void 0,"ADS_CLIENT_ERROR_MESSAGE_SLOT_STATE_IS_NULL");if(!T.GQ.qN.get(k.slotType))throw new ND("No LayoutRenderingAdapterFactory registered for slot of type: "+k.slotType,void 0,"ADS_CLIENT_ERROR_MESSAGE_CANNOT_FIND_MATCHING_LAYOUT_RENDERING_ADAPTER_FACTORY");if(N.layoutExitNormalTriggers.length==0&&N.layoutExitSkipTriggers.length==0&&N.layoutExitMuteTriggers.length==0&&N.layoutExitUserInputSubmittedTriggers.length==
0&&N.layoutExitUserCancelledTriggers.length==0)throw new ND("Layout has no exit triggers.",void 0,"ADS_CLIENT_ERROR_MESSAGE_EMPTY_LAYOUT_EXIT_TRIGGER");a7(T,"TRIGGER_CATEGORY_LAYOUT_EXIT_NORMAL",N.layoutExitNormalTriggers);a7(T,"TRIGGER_CATEGORY_LAYOUT_EXIT_USER_SKIPPED",N.layoutExitSkipTriggers);a7(T,"TRIGGER_CATEGORY_LAYOUT_EXIT_USER_MUTED",N.layoutExitMuteTriggers);a7(T,"TRIGGER_CATEGORY_LAYOUT_EXIT_USER_INPUT_SUBMITTED",N.layoutExitUserInputSubmittedTriggers);a7(T,"TRIGGER_CATEGORY_LAYOUT_EXIT_USER_CANCELLED",
N.layoutExitUserCancelledTriggers)}catch(y){y instanceof ND?Z.aJ(k,N,y,"ADS_CLIENT_ERROR_TYPE_SCHEDULE_LAYOUT_FAILED"):Z.aJ(k,N,new ND(`Unexpected error: ${y}`,void 0,"ADS_CLIENT_ERROR_MESSAGE_UNEXPECTED_ERROR"),"ADS_CLIENT_ERROR_TYPE_SCHEDULE_LAYOUT_FAILED");nO(Z,k,!0);return}zT(Z.V,k).G=!0;try{var K=Z.V;const y=zT(K,k),Q=K.GQ.qN.get(k.slotType).get().build(K.Y,K.U,k,N);Q.init();y.layout=N;if(y.D)throw new ND("Already had LayoutRenderingAdapter registered for slot",void 0,"ADS_CLIENT_ERROR_MESSAGE_BUILD_DUPLICATE_LAYOUT_RENDERING_ADAPTER");
y.D=Q;Tq(K,y,"TRIGGER_CATEGORY_LAYOUT_EXIT_NORMAL",N.layoutExitNormalTriggers);Tq(K,y,"TRIGGER_CATEGORY_LAYOUT_EXIT_USER_SKIPPED",N.layoutExitSkipTriggers);Tq(K,y,"TRIGGER_CATEGORY_LAYOUT_EXIT_USER_MUTED",N.layoutExitMuteTriggers);Tq(K,y,"TRIGGER_CATEGORY_LAYOUT_EXIT_USER_INPUT_SUBMITTED",N.layoutExitUserInputSubmittedTriggers);Tq(K,y,"TRIGGER_CATEGORY_LAYOUT_EXIT_USER_CANCELLED",N.layoutExitUserCancelledTriggers)}catch(y){jB(Z,k);y instanceof ND?Z.aJ(k,N,y,"ADS_CLIENT_ERROR_TYPE_SCHEDULE_LAYOUT_FAILED"):
Z.aJ(k,N,new ND(`Unexpected error: ${y}`,void 0,"ADS_CLIENT_ERROR_MESSAGE_UNEXPECTED_ERROR"),"ADS_CLIENT_ERROR_TYPE_SCHEDULE_LAYOUT_FAILED");nO(Z,k,!0);return}W0(Z.sH,"ADS_CLIENT_EVENT_TYPE_LAYOUT_SCHEDULED",k,N);for(const y of Z.U)y.JQ(k,N);jB(Z,k);sLf(Z,k)}else Z=Z.Gt.get(),g.KA(Z.S.X())||yw(Z.S.X())||g.Qw(Z.S.X())?Z=!0:(wm("Composite VOD on legacy path."),Z=!1),Z&&wm("slot is unscheduled after been fulfilled.",k,N)}};
PVr=function(Z,k,N){k.mp!=="core"&&W0(Z.sH,"ADS_CLIENT_EVENT_TYPE_LAYOUT_RECEIVED",k,N)};
cv0=function(Z,k,N){W0(Z.sH,"ADS_CLIENT_EVENT_TYPE_LAYOUT_SCHEDULED",k,N);for(const a of Z.U)a.JQ(k,N)};
dA0=function(Z,k,N,a){const T=[];for(const Q of N){if(!Q.url)continue;N=new g.hY(Q.url,!0);if(Q.s){var K=N,y=Q.sp;const q=uy(2,6798,bY(88,1914,Q.s));K[c[24]](y,Eb(26,7635,q))}for(const q of Object.keys(a))N.set(q,a[q]);K=qD(Q.type,Q.quality,Q.itag,Q.width,Q.height);T.push(new H7f(K,N))}return r8(Z.L,T,CA(Z,k),!1)};
XvU=function(Z,k,N){W0(Z.sH,"ADS_CLIENT_EVENT_TYPE_LAYOUT_ENTERED",k,N);for(const a of Z.U)a.l0(k,N)};
mAG=function(Z,k,N){if(Ja(Z.V,k)&&Up(zT(Z.V,k))){var a=pO(Z.V,k);if(a&&Ep(Z.V,k))L3f(Z,k,a,N?"error":"abandoned");else{bD(Z.sH,"ADS_CLIENT_EVENT_TYPE_EXIT_SLOT_REQUESTED",k);try{const T=zT(Z.V,k);if(!T)throw new p("Cannot exit slot it is unregistered",void 0,"ADS_CLIENT_ERROR_MESSAGE_SLOT_WAS_UNREGISTERED");T.V!=="enter_requested"&&T.V!=="entered"&&T.V!=="rendering"&&Yo(T.slot,T.V,"exitSlot");T.V="exit_requested";if(T.U===void 0)throw T.V="scheduled",new p("Cannot exit slot because adapter is not defined",
void 0,"ADS_CLIENT_ERROR_MESSAGE_NO_SLOT_ADAPTER_REGISTERED");T.U.SJ()}catch(T){T instanceof p&&T.Do?(ZH(Z.sH,"ADS_CLIENT_ERROR_TYPE_EXIT_SLOT_FAILED",T.Do,k),wm(T,k,void 0,void 0,T.BX)):(ZH(Z.sH,"ADS_CLIENT_ERROR_TYPE_EXIT_SLOT_FAILED","ADS_CLIENT_ERROR_MESSAGE_UNEXPECTED_ERROR",k),wm(T,k))}}}};
V7G=function(Z,k,N,a){W0(Z.sH,yvG(a),k,N);for(const T of Z.U)T.eI(k,N,a)};
IU=function(Z,k){k.sort((T,K)=>{if(T.category===K.category)return T.trigger.triggerId.localeCompare(K.trigger.triggerId);const y=Q=>{wm("TriggerCategoryOrder enum does not contain trigger category: "+Q)};
return TnR(T.category,y)-TnR(K.category,y)});
var N=new Map;for(var a of k){if(!Ja(Z.V,a.slot))continue;if(zT(Z.V,a.slot).G){zT(Z.V,a.slot).C.push(a);continue}F3f(Z.sH,a.slot,a,a.layout);(k=N.get(a.category))||(k=[]);k.push(a);N.set(a.category,k)}for(const [T,K]of t7G)a=K,(k=N.get(T))&&hAR(Z,k,a);(a=N.get("TRIGGER_CATEGORY_SLOT_EXPIRATION"))&&uXf(Z,a);(a=N.get("TRIGGER_CATEGORY_SLOT_FULFILLMENT"))&&l00(Z,a);(N=N.get("TRIGGER_CATEGORY_SLOT_ENTRY"))&&f0U(Z,N)};
hAR=function(Z,k,N){for(const a of k)a.layout&&Ep(Z.V,a.slot)&&L3f(Z,a.slot,a.layout,N)};
uXf=function(Z,k){for(const N of k)nO(Z,N.slot,!1)};
l00=function(Z,k){for(const N of k){a:switch(zT(Z.V,N.slot).Y){case "not_filled":k=!0;break a;default:k=!1}k&&(bD(Z.sH,"ADS_CLIENT_EVENT_TYPE_FULFILL_SLOT_REQUESTED",N.slot),Z.V.aN(N.slot))}};
f0U=function(Z,k){for(const T of k){bD(Z.sH,"ADS_CLIENT_EVENT_TYPE_ENTER_SLOT_REQUESTED",T.slot);for(const K of Z.U)K.X8(T.slot);try{var N=Z.V,a=T.slot;const K=zT(N,a);if(!K)throw new p("Got enter request for unknown slot",void 0,"ADS_CLIENT_ERROR_MESSAGE_SLOT_STATE_IS_NULL");if(!K.U)throw new p("Tried to enter slot with no assigned slotAdapter",void 0,"ADS_CLIENT_ERROR_MESSAGE_NO_SLOT_ADAPTER_REGISTERED");if(K.V!=="scheduled")throw new p("Tried to enter a slot from stage: "+K.V,void 0,"ADS_CLIENT_ERROR_MESSAGE_ILLEGAL_SLOT_STATE");
if(Up(K))throw new p("Got enter request for already active slot",void 0,"ADS_CLIENT_ERROR_MESSAGE_SLOT_COLLISION");for(const y of M_(N,`${a.slotType}_${a.slotPhysicalPosition}`).values())if(K!==y&&Up(y)&&(K.slot.fulfilledLayout?.layoutType!=="LAYOUT_TYPE_VIDEO_INTERSTITIAL_CENTERED"||y.layout?.layoutType!=="LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY"))throw new p("Trying to enter a slot when a slot of same type is already active.",{activeSlotStatus:y.V},"ADS_CLIENT_ERROR_MESSAGE_DUPLICATE_SLOT");}catch(K){K instanceof
p&&K.Do?(ZH(Z.sH,"ADS_CLIENT_ERROR_TYPE_ENTER_SLOT_FAILED",K.Do,T.slot),wm(K,T.slot,pO(Z.V,T.slot),void 0,K.BX)):(ZH(Z.sH,"ADS_CLIENT_ERROR_TYPE_ENTER_SLOT_FAILED","ADS_CLIENT_ERROR_MESSAGE_UNEXPECTED_ERROR",T.slot),wm(K,T.slot));nO(Z,T.slot,!0);continue}k=zT(Z.V,T.slot);k.V!=="scheduled"&&Yo(k.slot,k.V,"enterSlot");k.V="enter_requested";k.U.dS()}};
L3f=function(Z,k,N,a){Ja(Z.V,k)&&(W0(Z.sH,K3N.get(a)?.vN||"ADS_CLIENT_EVENT_TYPE_UNSPECIFIED",k,N),Z=zT(Z.V,k),Z.V!=="rendering"&&Yo(Z.slot,Z.V,"exitLayout"),Z.V="rendering_stop_requested",Z.D.C8(N,a))};
Up=function(Z){return Z.V==="enter_requested"||Z.isActive()};
Ja=function(Z,k){return zT(Z,k)!=null};
pO=function(Z,k){(Z=zT(Z,k))?Z.layout!=null&&!Z.layout&&wm("Unexpected empty layout",k):wm("Unexpected undefined slotState",k);return Z?.layout||null};
Bnb=function(Z){const k=[];Z.V.forEach(N=>{for(const a of N.values())k.push(a.slot)});
return k};
Ep=function(Z,k){Z=zT(Z,k);if(k=Z.layout!=null)a:switch(Z.V){case "rendering":case "rendering_stop_requested":k=!0;break a;default:k=!1}return k};
M_=function(Z,k){return(Z=Z.V.get(k))?Z:new Map};
zT=function(Z,k){return M_(Z,`${k.slotType}_${k.slotPhysicalPosition}`).get(k.slotId)};
mk=function(Z,k,N){if(N.length==0)throw new p(`No ${DAj.get(k)} triggers found for slot.`,void 0,O7j(k));for(const a of N)if(!Z.GQ.jw.get(a.triggerType))throw new p("No trigger adapter registered for "+k+" trigger of type: "+a.triggerType,void 0,"ADS_CLIENT_ERROR_MESSAGE_NO_TRIGGER_ADAPTER_REGISTERED_FOR_TYPE");};
Yo=function(Z,k,N){wm(`Slot stage was ${k} when calling method ${N}`,Z)};
RU=function(Z,k){for(const N of k)if(k=Z.O.get(N.triggerId))k.Aa(N),Z.O.delete(N.triggerId)};
a7=function(Z,k,N){for(const a of N)if(!Z.GQ.jw.get(a.triggerType))throw new ND(`No trigger adapter registered for ${DAj.get(k)} trigger of type: ${a.triggerType}`,void 0,"ADS_CLIENT_ERROR_MESSAGE_NO_TRIGGER_ADAPTER_REGISTERED_FOR_TYPE");};
Tq=function(Z,k,N,a){for(const T of a)a=Z.GQ.jw.get(T.triggerType),a.b7(N,T,k.slot,k.layout?k.layout:null),k.O.set(T.triggerId,a)};
O7j=function(Z){switch(Z){case "TRIGGER_CATEGORY_SLOT_ENTRY":return"ADS_CLIENT_ERROR_MESSAGE_EMPTY_SLOT_ENTRY_TRIGGER";case "TRIGGER_CATEGORY_SLOT_EXPIRATION":return"ADS_CLIENT_ERROR_MESSAGE_EMPTY_SLOT_EXPIRATION_TRIGGER";case "TRIGGER_CATEGORY_SLOT_FULFILLMENT":return"ADS_CLIENT_ERROR_MESSAGE_EMPTY_SLOT_FULFILLMENT_TRIGGER";default:return"ADS_CLIENT_ERROR_MESSAGE_INVALID_TRIGGER"}};
vMG=function(Z){return sT(Z.lM).concat(sT(Z.jw)).concat(sT(Z.Rj)).concat(sT(Z.wF)).concat(sT(Z.qN))};
sT=function(Z){const k=[];for(const N of Z.values())N.DQ&&k.push(N);return k};
n=function(Z){return new i7y(Z)};
$Ai=function(Z){const k=new gMf((N,a,T,K)=>new wv0(Z.V.GQ,N,a,T,K,Z.V.Gt),new Set(vMG(Z.V.GQ).concat(Z.V.listeners)),Z.V.sH,Z.V.Gt);
g.u(Z,k);return k};
Ae=function(Z,k,N){Z7N(Z.V(),k,N)};
PM=function(Z,k,N,a){(Z=Z.V())||wm("Could not initiate a command router instance.");B0(Z,k,N,a)};
xAy=function(Z,k){const N=k.bgp&&k.bgub,a=!!k.upb;k.siub&&k.scs&&(N||a)&&(a&&cM(Z.Gt.get(),"html5_export_sodar_snapshot")&&gX(async T=>(await sE(YP())).snapshot(T)),Ver(k.siub,k.scs,k.bgub,k.bgp,k.upb))};
eAy=function(Z,k,N,a){Z.V&&wm("Currently active request ongoing for slot. This should never happen",Z.slot);Z.V=k();Z.V.then(T=>{Z.V=null;a&&a(T);const K=T.Oy?"LAYOUT_TYPE_THROTTLED_AD_BREAK_RESPONSE":"LAYOUT_TYPE_AD_BREAK_RESPONSE";var y=Z.U.get(),Q=Z.slot.slotId,q=GT(Z.k8.get(),{slotId:Z.slot.slotId,slotType:Z.slot.slotType,slotPhysicalPosition:Z.slot.slotPhysicalPosition,mp:Z.slot.mp,slotEntryTrigger:Z.slot.slotEntryTrigger,slotFulfillmentTriggers:Z.slot.slotFulfillmentTriggers,slotExpirationTriggers:Z.slot.slotExpirationTriggers});
const r=HM(y.U.get(),K,Q),C={layoutId:r,layoutType:K,mp:"core"};T={layoutId:r,layoutType:K,d5:new Map,layoutExitNormalTriggers:[new Gyi(y.V,Q)],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],mp:"core",clientMetadata:new SB([new Ssy(T)]),KF:q(C)};Avf(Z.callback,Z.slot,T)},T=>{Z.V=null;
N&&N();T instanceof Mz||kB(Z.callback,Z.slot,new p(T,void 0,"ADS_CLIENT_ERROR_MESSAGE_AD_BREAK_REQUEST_ERROR",!0),"ADS_CLIENT_ERROR_TYPE_FULFILL_SLOT_FAILED")})};
oM0=function(Z){if(Z.V==null)Z.callback.EX(Z.slot);else try{Z.V.cancel(),Z.V=null,Z.callback.EX(Z.slot)}catch(k){Z.V=null,kB(Z.callback,Z.slot,new p(k,void 0,"ADS_CLIENT_ERROR_MESSAGE_CANCEL_SLOT_FULFILLMENT_FAILURE"),"ADS_CLIENT_ERROR_TYPE_CANCEL_FULFILL_SLOT_FAILED")}};
d8=function(Z,k,N=!1,a=""){!Z&&N&&g.L9(Error(`Player URL validator detects invalid url. ${a}: ${k}`));return Z};
Xi=function(Z,k){return k&&k.test(Z)?!0:!1};
zAb=function(Z){return(Z=Jvy&&Jvy.exec(Z))?Z[0]:""};
Ii=function(Z){return d8(Xi(Z,UA0),Z,!1,"Trusted Stream URL")};
g.LA=function(Z){return d8(Xi(Z,b7R),Z,!1,"Trusted Image URL")};
RAG=function(Z){return d8(Xi(Z,pvR),Z,!1,"Trusted Promoted Video Domain URL")};
nMr=function(Z){return d8(Xi(Z,M7i),Z,!1,"Drm Licensor URL")};
jLf=function(Z,k=!1){return d8(Xi(Z,I0N),Z,k,"Captions URL")};
EMU=function(Z){Z=new g.e7(Z);g.oL(Z,document.location.protocol);g.Jv(Z,document.location.hostname);document.location.port&&g.zy(Z,document.location.port);return Z.toString()};
Vw=function(Z){Z=new g.e7(Z);g.oL(Z,document.location.protocol);return Z.toString()};
W3y=function(Z){return Z===-0x8000000000000?"BEFORE_MEDIA_START":Z===0?"MEDIA_START":Z===0x7ffffffffffff?"MEDIA_END":Z===0x8000000000000?"AFTER_MEDIA_END":Z.toString()};
g.Fi=function(Z,k){return Z.start-k.start||Z.priority-k.priority||Z.U-k.U};
g.te=function(Z){return`crn_${Z}`};
g.he=function(Z){return`crx_${Z}`};
YsU=function(Z,k){switch(Z.style){case uX.CHAPTER_MARKER:return k?8:5;case uX.AD_MARKER:return 6;case uX.TIME_MARKER:return Number.POSITIVE_INFINITY;default:return 0}};
Zj0=function(Z){Z.wD?.get().vl(Z.slot.clientMetadata.PD("metadata_type_cue_point").identifier)};
lX=function(Z,k){return gb(Z,k.Eb,k.slotType)?!0:!1};
N3y=function(Z){if(Z.slot.clientMetadata.PD("metadata_type_allow_pause_ad_break_request_slot_reschedule")){const k=koX(Z,Z.slot);fA(Z.V.get(),"OPPORTUNITY_TYPE_PAUSE_AD_BREAK_REQUEST_SLOT_RESCHEDULE",()=>[k])}};
aUU=function(Z){if(Z.slot.clientMetadata.PD("metadata_type_prefetch_metadata")){const k=koX(Z,Z.slot);fA(Z.V.get(),"OPPORTUNITY_TYPE_PLAYER_RESPONSE_RECEIVED",()=>[k])}};
koX=function(Z,k){const N=BM(Z.U.get(),Z.slot.slotType);Z={...Z.slot};if(k.slotEntryTrigger){var a=k.slotId;var T=k.slotEntryTrigger;a=T.triggeringSlotId!=null&&T.triggeringSlotId===a?T.clone(N):T}else a=void 0;return{...Z,slotId:N,slotEntryTrigger:a,slotFulfillmentTriggers:T30(k.slotId,N,k.slotFulfillmentTriggers),slotExpirationTriggers:T30(k.slotId,N,k.slotExpirationTriggers)}};
T30=function(Z,k,N){const a=[];for(const T of N)a.push(T.triggeringSlotId!=null&&T.triggeringSlotId===Z?T.clone(k):T);return a};
g.DH=function(Z,k){for(const N of Object.keys(k)){const a=k[N];Z=Z.replace(new RegExp("\\$"+N,"gi"),()=>a)}return Z};
OT=function(Z,k,N){k.layoutId!==Z.layout.layoutId?Z.V.aJ(Z.slot,k,new ND("Unknown layout received. "+`Required LayoutId: ${Z.layout.layoutId}`+`and LayoutType: ${Z.layout.layoutType}`,void 0,"ADS_CLIENT_ERROR_MESSAGE_UNKNOWN_LAYOUT"),"ADS_CLIENT_ERROR_TYPE_ENTER_LAYOUT_FAILED"):N()};
iX=function(Z,k,N,a,T,K,y,Q){a=a||N.clientMetadata.PD(K);Z=vM(Z);const q=tI(()=>{T.l0(k,N)});
Q.push(y(a,Z,N.layoutId,{adsClientData:N.KF},()=>{q()}))};
w8=function(Z,k,N,a,T,K,y,Q,q){if(k===Z)if(q){if(q===Q.layoutId){a:{for(const r of N.keys())if(r.slotType==="SLOT_TYPE_PLAYER_BYTES"&&K===N.get(r).layoutId){Z=!0;break a}Z=!1}Z?g8(a,1):T?T():wm("Tried to call engagePingCallback but it is null",y,Q)}}else wm("Companion AdUxClick received without a layoutId",y,Q)};
$B=function(Z){return!!Z.get("active_view_viewable")?.length||!!Z.get("active_view_measurable")?.length||!!Z.get("active_view_fully_viewable_audible_half_duration")?.length||!!Z.get("audio_audible")?.length||!!Z.get("audio_measurable")?.length};
xB=function(Z){return Z?.activeViewTracking?.trafficType??"ACTIVE_VIEW_TRAFFIC_TYPE_UNSPECIFIED"};
Gq=function(Z){return new Map([["impression",Z.impressionPings||[]],["error",Z.errorPings||[]],["mute",Z.mutePings||[]],["unmute",Z.unmutePings||[]],["pause",Z.pausePings||[]],["rewind",Z.rewindPings||[]],["resume",Z.resumePings||[]],["skip",Z.skipPings||[]],["swipe",Z.swipePings||[]],["close",Z.closePings||[]],["progress",Z.progressPings||[]],["clickthrough",Z.clickthroughPings||[]],["fullscreen",Z.fullscreenPings||[]],["active_view_viewable",Z.activeViewViewablePings||[]],["active_view_measurable",
Z.activeViewMeasurablePings||[]],["active_view_fully_viewable_audible_half_duration",Z.activeViewFullyViewableAudibleHalfDurationPings||[]],["audio_audible",Z.activeViewTracking?.activeViewAudioAudiblePings||[]],["audio_measurable",Z.activeViewTracking?.activeViewAudioMeasurablePings||[]],["end_fullscreen",Z.endFullscreenPings||[]],["channel_clickthrough",Z.channelClickthroughPings||[]],["abandon",Z.abandonPings||[]],["start",Z.startPings||[]],["first_quartile",Z.firstQuartilePings||[]],["midpoint",
Z.secondQuartilePings||[]],["third_quartile",Z.thirdQuartilePings||[]],["complete",Z.completePings||[]],["unmuted_impression",Z.unmutedImpressionPings||[]],["unmuted_error",Z.unmutedErrorPings||[]],["unmuted_mute",Z.unmutedMutePings||[]],["unmuted_unmute",Z.unmutedUnmutePings||[]],["unmuted_pause",Z.unmutedPausePings||[]],["unmuted_resume",Z.unmutedResumePings||[]],["unmuted_close",Z.unmutedClosePings||[]],["unmuted_progress",Z.unmutedProgressPings||[]],["unmuted_clickthrough",Z.unmutedClickthroughPings||
[]],["unmuted_fullscreen",Z.unmutedFullscreenPings||[]],["unmuted_end_fullscreen",Z.unmutedEndFullscreenPings||[]],["unmuted_abandon",Z.unmutedAbandonPings||[]],["unmuted_start",Z.unmutedStartPings||[]],["unmuted_first_quartile",Z.unmutedFirstQuartilePings||[]],["unmuted_midpoint",Z.unmutedSecondQuartilePings||[]],["unmuted_third_quartile",Z.unmutedThirdQuartilePings||[]],["unmuted_complete",Z.unmutedCompletePings||[]],["unmuted_skip",Z.unmutedSkipPings||[]]])};
KKi=function(Z){switch(Z){case "abandon":return"unmuted_abandon";case "active_view_fully_viewable_audible_half_duration":return null;case "active_view_measurable":return null;case "active_view_viewable":return null;case "audio_audible":return null;case "audio_measurable":return null;case "channel_clickthrough":return null;case "clickthrough":return"unmuted_clickthrough";case "close":return"unmuted_close";case "companion_engagement":return null;case "complete":return"unmuted_complete";case "end_fullscreen":return"unmuted_end_fullscreen";
case "error":return"unmuted_error";case "first_quartile":return"unmuted_first_quartile";case "fullscreen":return"unmuted_fullscreen";case "impression":return"unmuted_impression";case "midpoint":return"unmuted_midpoint";case "mute":return"unmuted_mute";case "pause":return"unmuted_pause";case "progress":return"unmuted_progress";case "resume":return"unmuted_resume";case "rewind":return null;case "skip":return"unmuted_skip";case "swipe":return null;case "start":return"unmuted_start";case "third_quartile":return"unmuted_third_quartile";
case "unmute":return"unmuted_unmute";case "seek":return null;case "unmuted_abandon":case "unmuted_clickthrough":case "unmuted_complete":case "unmuted_end_fullscreen":case "unmuted_error":case "unmuted_first_quartile":case "unmuted_fullscreen":case "unmuted_impression":case "unmuted_midpoint":case "unmuted_mute":case "unmuted_pause":case "unmuted_close":case "unmuted_progress":case "unmuted_resume":case "unmuted_start":case "unmuted_third_quartile":case "unmuted_unmute":case "unmuted_skip":return null;
default:return null}};
SP=function(){return["metadata_type_ad_placement_config"]};
vM=function(Z){var k=Z.Za.get();return eP(k,Z.j)};
uy=function(Z,k,N,a){var T=k^Z;if((Z|16)==Z){N=(N%a[c[3]]+a[c[3]])%a[c[3]];var K=a[0];a[0]=a[N];a[N]=K;var y=[N]}(Z|1)>=-66&&(Z-2&4)<4&&(K=N[c[T^6808]](c[T^6791]),o7[c[T^6842]](K,T^6848),o7[c[T^6873]](K,T^6837),o7[c[T^6842]](K,T^6791),y=K[c[T^6824]](c[T^6791]));return y};
Je=function(Z,k,N){ymR(Z.Za.get(),Z.layoutId,k,N,Z.G??void 0,Z.L)};
zq=function(Z,k,N=!1){Z.V.has(k)?Je(Z,k,[]):Z.Nx(k,N)};
UT=function(Z,k,N=!1){for(;Z.Y<Z.U.length;){const a=Z.U[Z.Y];if(a.offsetMilliseconds<=k||N)Je(Z,"progress",[a]),Z.Y++;else break}};
bX=function(Z,k){return Z.V.has(k)};
pA=function(Z){return Z.U.every(k=>k.hasOwnProperty("offsetMilliseconds"))};
Q3j=function(Z,k,N){Z.G=k;Z.L=N};
qcN=function(){const Z=["metadata_type_ads_engagement_panel_layout_view_model","metadata_type_linked_player_bytes_layout_id"];SP().forEach(k=>{Z.push(k)});
return{Eb:Z,x8:["LAYOUT_TYPE_PANEL"]}};
rmU=function(){const Z=["metadata_type_banner_image_layout_view_model","metadata_type_linked_player_bytes_layout_id"];SP().forEach(k=>{Z.push(k)});
return{Eb:Z,x8:["LAYOUT_TYPE_COMPANION_WITH_IMAGE"]}};
C6N=function(){const Z=["metadata_type_action_companion_ad_renderer","metadata_type_linked_player_bytes_layout_id"];SP().forEach(k=>{Z.push(k)});
return{Eb:Z,x8:["LAYOUT_TYPE_COMPANION_WITH_ACTION_BUTTON"]}};
mvf=function(){const Z=["metadata_type_image_companion_ad_renderer","metadata_type_linked_player_bytes_layout_id"];SP().forEach(k=>{Z.push(k)});
return{Eb:Z,x8:["LAYOUT_TYPE_COMPANION_WITH_IMAGE"]}};
s3i=function(){const Z=["metadata_type_shopping_companion_carousel_renderer","metadata_type_linked_player_bytes_layout_id"];SP().forEach(k=>{Z.push(k)});
return{Eb:Z,x8:["LAYOUT_TYPE_COMPANION_WITH_SHOPPING"]}};
R7=function(Z,k,N=!1){var a=Z.L();if(a){for(;Z.Y<Z.U.length;){const T=Z.U[Z.Y];if(T.adVideoOffset.percent*a<=k||N)Z.tp.get().executeCommand(T.command,Z.layoutId),Z.Y++;else break}for(;Z.D<Z.V.length;)if(a=Z.V[Z.D],Number(a.adVideoOffset.milliseconds)<=k||N)Z.tp.get().executeCommand(a.command,Z.layoutId),Z.D++;else break}};
Ami=function(){const Z=["metadata_type_action_companion_ad_renderer"];SP().forEach(k=>{Z.push(k)});
return{Eb:Z,x8:["LAYOUT_TYPE_COMPANION_WITH_ACTION_BUTTON"]}};
P6G=function(){const Z=["metadata_type_top_banner_image_text_icon_buttoned_layout_view_model"];SP().forEach(k=>{Z.push(k)});
return{Eb:Z,x8:["LAYOUT_TYPE_COMPANION_WITH_ACTION_BUTTON"]}};
cmf=function(){const Z=["metadata_type_ad_action_interstitial_renderer"];SP().forEach(k=>{Z.push(k)});
return{Eb:Z,x8:["LAYOUT_TYPE_ENDCAP"]}};
MD=function(Z,k){return v0(Z,k.Eb,k.x8)?!0:!1};
Hjy=function(){const Z=["metadata_type_ads_engagement_panel_renderer","metadata_type_linked_player_bytes_layout_id"];SP().forEach(k=>{Z.push(k)});
return{Eb:Z,x8:["LAYOUT_TYPE_PANEL_TEXT_ICON_IMAGE_TILES_BUTTON"]}};
dvR=function(){const Z=["metadata_type_top_banner_image_text_icon_buttoned_layout_view_model","metadata_type_linked_player_bytes_layout_id"];SP().forEach(k=>{Z.push(k)});
return{Eb:Z,x8:["LAYOUT_TYPE_COMPANION_WITH_ACTION_BUTTON"]}};
Xp0=function(){const Z=["metadata_type_client_forecasting_ad_renderer"];SP().forEach(k=>{Z.push(k)});
return{Eb:Z,x8:["LAYOUT_TYPE_FORECASTING"]}};
LKN=function(Z,k){return Op(Z.clientMetadata,"metadata_type_ad_info_ad_metadata")?Z.clientMetadata.PD("metadata_type_ad_info_ad_metadata"):k?{channelId:k.WZ,channelThumbnailUrl:k.profilePicture,channelTitle:k.author,videoTitle:k.title}:(wm("No layout metadata nor AdPlayback specified for AdMetaData"),{channelId:"",channelThumbnailUrl:"",channelTitle:"",videoTitle:""})};
VXb=function(Z,k){return Op(Z.clientMetadata,"metadata_ad_video_is_listed")?Z.clientMetadata.PD("metadata_ad_video_is_listed"):k?k.isListed:(wm("No layout metadata nor AdPlayback specified for ad video isListed"),!1)};
FKy=function(Z){return Z.layout.renderingContent?Z.layout.clientMetadata.PD("metadata_type_player_bytes_callback_ref")?.current:Z.layout.clientMetadata.PD("metadata_type_player_bytes_callback")};
tXN=function(){return{Eb:["metadata_type_instream_ad_player_overlay_renderer","metadata_type_player_bytes_callback","metadata_type_linked_player_bytes_layout_id","METADATA_TYPE_MEDIA_LAYOUT_DURATION_seconds"],x8:["LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY"]}};
nA=function(Z){return Z.layout.renderingContent?Z.layout.clientMetadata.PD("metadata_type_player_bytes_callback_ref")?.current:Z.layout.clientMetadata.PD("metadata_type_player_bytes_callback")};
hpG=function(){return{Eb:["metadata_type_valid_ad_message_renderer"],x8:["LAYOUT_TYPE_TEXT_BANNER_OVERLAY"]}};
YB=function(Z,k,N,a,T,K,y,Q,q){return MD(N,tXN())||N.layoutType==="LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY"&&g.J(N.renderingContent,I7)!==void 0?new u1X(Z,k,N,a,T,K,y,Q,q):MD(N,{Eb:["metadata_type_player_overlay_layout_renderer","metadata_type_player_bytes_callback","metadata_type_linked_player_bytes_layout_id","METADATA_TYPE_MEDIA_LAYOUT_DURATION_seconds"],x8:["LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY"]})||N.layoutType==="LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY"&&g.J(N.renderingContent,jP)!==void 0?
new lUX(Z,k,N,a,T,K,y,Q,q):MD(N,cmf())||N.layoutType==="LAYOUT_TYPE_ENDCAP"&&g.J(N.renderingContent,ET)!==void 0?new fUf(Z,k,N,a,K):MD(N,hpG())?new B3f(k,N,Z,a,T,q):MD(N,{Eb:["metadata_type_instream_ad_player_overlay_renderer"],x8:["LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY"]})?new Dvy(Z,k,N,a,T,Q):N.layoutType==="LAYOUT_TYPE_ENDCAP"&&g.J(N.renderingContent,WM)!==void 0?new Ojy(Z,k,N,a,K):null};
Zx=function(Z){return!Z.oldState.isPlaying()&&Z.state.isPlaying()};
k5=function(Z,k,N){return Z<k?!1:N!=null?N<=k:Z<=k+1};
v3y=function(Z){Z.layout.renderingContent?(Z=Z.XS.get(),Z=N9(Z,1).D$/1E3):Z=Z.layout.clientMetadata.PD("metadata_type_video_length_seconds");return Z};
at=function(Z,k){Z.V||(Z.WD.Nx(k),Z.V=!0)};
Td=function(Z){const k=[];if(Z)for(const [a,T]of Object.entries(Z)){Z=a;var N=T;if(N===void 0)continue;N=typeof N==="boolean"?`${+N}`:`${N}`.replace(/[:,=]/g,"_");k.push(`${Z}.${N}`)}return k.join(";")};
Kf=function(Z){return Z===1||Z===2};
QA=function(Z,k=0){if(Z instanceof g.yA)return Z;Z=Z&&Z instanceof Error?Z:Error(`${Z}`);Kf(k)?g.b(Z):g.L9(Z);return new g.yA(k===1?"player.fatalexception":"player.exception",{name:`${Z.name}`,message:`${Z.message}`},k)};
ijy=function(Z,k){const N=(...a)=>{Z.removeEventListener("playing",N);k(...a)};
Z.addEventListener("playing",N)};
q9=function(){let Z=g.Vf("yt.player.utils.videoElement_");Z||(Z=g.TU("VIDEO"),g.X0("yt.player.utils.videoElement_",Z));return Z};
r0=function(Z){const k=q9();return!!(k&&k.canPlayType&&k.canPlayType(Z))};
m8=function(Z){if(/opus/.test(Z)&&g.Cf&&!Vd("38")&&!g.ce())return!1;if(window.MediaSource&&window.MediaSource.isTypeSupported)return window.MediaSource.isTypeSupported(Z);if(window.ManagedMediaSource&&window.ManagedMediaSource.isTypeSupported)return window.ManagedMediaSource.isTypeSupported(Z);if(/webm/.test(Z)&&!hzf())return!1;Z==='audio/mp4; codecs="mp4a.40.2"'&&(Z='video/mp4; codecs="avc1.4d401f"');return!!r0(Z)};
g3N=function(Z){try{const k=m8('video/mp4; codecs="avc1.42001E"')||m8('video/webm; codecs="vp9"');return(m8('audio/mp4; codecs="mp4a.40.2"')||m8('audio/webm; codecs="opus"'))&&(k||!Z)||r0('video/mp4; codecs="avc1.42001E, mp4a.40.2"')?null:"fmt.noneavailable"}catch{return"html5.missingapi"}};
s9=function(){const Z=q9();return!(!Z.webkitSupportsPresentationMode||typeof Z.webkitSetPresentationMode!=="function")};
A_=function(){const Z=q9();try{const k=Z.muted;Z.muted=!k;return Z.muted!==k}catch{}return!1};
xvN=function(Z,k){pv(Z,2,k.ob,Pz,3);pv(Z,3,k.innertubeRequest,wpj,3);UB(Z,4,k.onesieUstreamerConfig);UB(Z,9,k.by);pv(Z,10,k.wj,cz,3);pv(Z,15,k.reloadPlaybackParams,$vj,3);bt(Z,18,k.B2)};
Sci=function(Z,k){pv(Z,1,k.formatId,Hz,3);J8(Z,2,k.startTimeMs);J8(Z,3,k.durationMs);J8(Z,4,k.Uq);J8(Z,5,k.e9);pv(Z,9,k.n4p,GoU,3);pv(Z,11,k.Nnq,d0,1);pv(Z,12,k.SQ,d0,1)};
epy=function(Z,k){bt(Z,1,k.videoId);J8(Z,2,k.lmt)};
GoU=function(Z,k){if(k.gi)for(let N=0;N<k.gi.length;N++)pv(Z,1,k.gi[N],epy,3)};
Hz=function(Z,k){J8(Z,1,k.itag);J8(Z,2,k.lmt);bt(Z,3,k.xtags)};
Xw=function(Z){return{itag:Dc(Z,1),lmt:Dc(Z,2),xtags:wj(Z,3)}};
d0=function(Z,k){J8(Z,1,k.startTicks);J8(Z,2,k.Sf);J8(Z,3,k.timescale)};
Lf=function(Z){return{startTicks:Dc(Z,1),Sf:Dc(Z,2),timescale:Dc(Z,3)}};
o3f=function(Z,k){J8(Z,1,k.defaultPolicy);J8(Z,2,k.smooth);J8(Z,3,k.visibility);J8(Z,4,k.l4);J8(Z,5,k.performance);J8(Z,6,k.speed)};
zpy=function(Z,k){if(k.authorizedFormats)for(let N=0;N<k.authorizedFormats.length;N++)pv(Z,1,k.authorizedFormats[N],Jmf,1);UB(Z,2,k.sabrLicenseConstraint)};
Jmf=function(Z,k){J8(Z,1,k.trackType);zc(Z,2,k.isHdr)};
Pz=function(Z,k){J8(Z,13,k.timeSinceLastManualFormatSelectionMs);var N=k.lastManualDirection;N!==void 0&&(ob(Z,112),ob(Z,N<<1^N>>31));J8(Z,16,k.yc);J8(Z,17,k.detailedNetworkType);J8(Z,18,k.b2);J8(Z,19,k.u2);J8(Z,21,k.Xn);J8(Z,23,k.dw);J8(Z,28,k.s0);J8(Z,29,k.yB);J8(Z,34,k.visibility);N=k.playbackRate;if(N!==void 0){var a=new ArrayBuffer(4);(new Float32Array(a))[0]=N;N=(new Uint32Array(a))[0];if(N!==void 0)for(ob(Z,285),eV(Z,4),a=0;a<4;)Z.view.setUint8(Z.pos,N&255),N>>=8,Z.pos+=1,a+=1}J8(Z,36,k.Um);
pv(Z,38,k.mediaCapabilities,Uvb,3);J8(Z,39,k.ej);J8(Z,40,k.KS);J8(Z,44,k.playerState);zc(Z,46,k.gw);J8(Z,48,k.HV);J8(Z,50,k.jb);J8(Z,51,k.cN);J8(Z,54,k.Xs);if(k.d6)for(N=0;N<k.d6.length;N++)J8(Z,55,k.d6[N]);zc(Z,56,k.H2);J8(Z,57,k.il);zc(Z,58,k.Gh);J8(Z,59,k.Eq);J8(Z,60,k.Xz);zc(Z,61,k.isPrefetch);J8(Z,62,k.r6);UB(Z,63,k.sabrLicenseConstraint);J8(Z,64,k.kD);J8(Z,66,k.gX);J8(Z,67,k.Z3q);J8(Z,68,k.zH);bt(Z,69,k.audioTrackId);zc(Z,71,k.Mw);pv(Z,72,k.q3,o3f,1);J8(Z,73,k.Gy);J8(Z,74,k.q$);J8(Z,75,k.gK);
J8(Z,76,k.jg);pv(Z,79,k.VL,zpy,3);J8(Z,80,k.Km)};
Uvb=function(Z,k){if(k.videoFormatCapabilities)for(var N=0;N<k.videoFormatCapabilities.length;N++)pv(Z,1,k.videoFormatCapabilities[N],bjX,1);if(k.audioFormatCapabilities)for(N=0;N<k.audioFormatCapabilities.length;N++)pv(Z,2,k.audioFormatCapabilities[N],ppG,1);pv(Z,4,k.perPlaybackAttributes,RpN,3);J8(Z,5,k.hdrModeBitmask)};
bjX=function(Z,k){J8(Z,1,k.videoCodec);zc(Z,2,k.efficient);J8(Z,3,k.maxHeight);J8(Z,4,k.maxWidth);J8(Z,11,k.maxFramerate);J8(Z,12,k.maxBitrateBps);zc(Z,15,k.is10BitSupported)};
ppG=function(Z,k){J8(Z,1,k.audioCodec);J8(Z,2,k.numChannels);J8(Z,3,k.maxBitrateBps);J8(Z,6,k.spatialCapabilityBitmask)};
RpN=function(Z,k){if(k.itagDenylist)for(let N=0;N<k.itagDenylist.length;N++)J8(Z,1,k.itagDenylist[N])};
cz=function(Z,k){pv(Z,1,k.clientInfo,MXG,3);UB(Z,2,k.w2);UB(Z,3,k.playbackCookie);UB(Z,4,k.by);if(k.BN)for(var N=0;N<k.BN.length;N++)pv(Z,5,k.BN[N],n3b,3);if(k.fu)for(N=0;N<k.fu.length;N++)J8(Z,6,k.fu[N]);bt(Z,7,k.cQS);pv(Z,8,k.Kh,IUr,3)};
j3X=function(Z,k){J8(Z,1,k.vTD);J8(Z,2,k.CVD)};
E3i=function(Z,k){var N=k.code;N!==void 0&&(ob(Z,8),ob(Z,N<<1^N>>31));bt(Z,2,k.message)};
WKr=function(Z,k){J8(Z,1,k.clientState);pv(Z,2,k.i3D,j3X,1)};
IUr=function(Z,k){UB(Z,1,k.rY);pv(Z,2,k.Q$,E3i,3);pv(Z,3,k.coldStartInfo,WKr,3)};
n3b=function(Z,k){J8(Z,1,k.type);UB(Z,2,k.value)};
MXG=function(Z,k){bt(Z,1,k.hl);bt(Z,12,k.deviceMake);bt(Z,13,k.deviceModel);J8(Z,16,k.clientName);bt(Z,17,k.clientVersion);bt(Z,18,k.osName);bt(Z,19,k.osVersion)};
Ycj=function(Z,k){bt(Z,1,k.name);bt(Z,2,k.value)};
VA=function(Z,k){bt(Z,1,k.url);if(k.v7)for(let N=0;N<k.v7.length;N++)pv(Z,2,k.v7[N],Ycj,3);UB(Z,3,k.postBody);zc(Z,4,k.ek);zc(Z,6,k.Cd)};
wpj=function(Z,k){UB(Z,2,k.Lq);UB(Z,5,k.encryptedClientKey);UB(Z,6,k.iv);UB(Z,7,k.tX);zc(Z,10,k.GS);zc(Z,13,k.D6);zc(Z,14,k.VS);UB(Z,16,k.x$);zc(Z,17,k.Sg)};
ZPf=function(Z){return{kB:Dc(Z,1),httpStatus:Dc(Z,2),body:gj(Z,4)}};
$vj=function(Z,k){bt(Z,1,k.token)};
kSf=function(Z){return{token:wj(Z,1)}};
NQy=function(Z){const k=[];let N;for(;N=wj(Z,1);)k.push(N);return{url:k.length?k:void 0}};
asy=function(Z){return{Tx:Dc(Z,1),VB:Dc(Z,2)}};
ywG=function(Z,k){pv(Z,1,k.ob,Pz,3);if(k.EC)for(var N=0;N<k.EC.length;N++)pv(Z,2,k.EC[N],Hz,3);if(k.jI)for(N=0;N<k.jI.length;N++)pv(Z,3,k.jI[N],Sci,3);UB(Z,5,k.videoPlaybackUstreamerConfig);if(k.Md)for(N=0;N<k.Md.length;N++)pv(Z,6,k.Md[N],TQU,3);if(k.GA)for(N=0;N<k.GA.length;N++)pv(Z,16,k.GA[N],Hz,3);if(k.EU)for(N=0;N<k.EU.length;N++)pv(Z,17,k.EU[N],Hz,3);if(k.vJ)for(N=0;N<k.vJ.length;N++)pv(Z,18,k.vJ[N],Hz,3);pv(Z,19,k.wj,cz,3);pv(Z,21,k.Ib,Fw,3);J8(Z,22,k.cO);J8(Z,23,k.C_);if(k.uv)for(N=0;N<k.uv.length;N++)pv(Z,
24,k.uv[N],Fw,3);UB(Z,25,k.dM);if(k.Sp)for(N=0;N<k.Sp.length;N++)pv(Z,1E3,k.Sp[N],Ksf,3)};
TQU=function(Z,k){pv(Z,1,k.formatId,Hz,3);J8(Z,2,k.Tk);J8(Z,3,k.sequenceNumber);pv(Z,4,k.Rw,d0,1);J8(Z,5,k.gx);J8(Z,6,k.dP)};
Fw=function(Z,k){if(k.w8)for(let N=0;N<k.w8.length;N++)bt(Z,1,k.w8[N]);UB(Z,2,k.adsConfig);bt(Z,3,k.wG);J8(Z,4,k.NE);J8(Z,5,k.dW);bt(Z,6,k.Lk);bt(Z,7,k.cuepointId);J8(Z,8,k.mB)};
Ksf=function(Z,k){if(k.EC)for(var N=0;N<k.EC.length;N++)pv(Z,1,k.EC[N],Hz,3);if(k.jI)for(N=0;N<k.jI.length;N++)pv(Z,2,k.jI[N],Sci,3);bt(Z,3,k.clipId)};
g.t_=function(Z,k){pv(Z,1,k.ob,Pz,3);UB(Z,3,k.videoPlaybackUstreamerConfig);pv(Z,5,k.wj,cz,3);pv(Z,6,k.Ib,Fw,3)};
QPG=function(Z){return{type:Dc(Z,1)}};
qZi=function(Z,k){bt(Z,1,k.clientPlaybackNonce);UB(Z,2,k.serializedPlaybackPingContextData)};
C8f=function(Z,k){if(k.v1)for(let N=0;N<k.v1.length;N++)pv(Z,1,k.v1[N],rwy,3)};
mKU=function(Z,k){pv(Z,1047,k.HE,C8f,3)};
rwy=function(Z,k){if(k.pX)for(var N=0;N<k.pX.length;N++)UB(Z,1,k.pX[N]);if(k.rE)for(N=0;N<k.rE.length;N++)UB(Z,2,k.rE[N])};
P8r=function(Z,k){bt(Z,1,k.cpn);J8(Z,2,k.sequenceNumber);bt(Z,3,k.serializedWatchEndpointLoggingContext);if(k.decoderInfo)for(var N=0;N<k.decoderInfo.length;N++)pv(Z,6,k.decoderInfo[N],sPb,3);bt(Z,9,k.playerResponseCpn);J8(Z,10,k.transitionStitchType);bt(Z,11,k.qoePingUrl);J8(Z,12,k.timestampOffsetMsecs);J8(Z,15,k.remoteControlMode);if(k.remoteConnectedDevices)for(N=0;N<k.remoteConnectedDevices.length;N++)pv(Z,16,k.remoteConnectedDevices[N],AwN,3);UB(Z,17,k.serializedHouseBrandPlayerServiceLoggingContext);
if(k.serializedQoeContextData)for(N=0;N<k.serializedQoeContextData.length;N++)UB(Z,19,k.serializedQoeContextData[N]);if(k.serializedOneTimeQoeContextData)for(N=0;N<k.serializedOneTimeQoeContextData.length;N++)UB(Z,21,k.serializedOneTimeQoeContextData[N])};
sPb=function(Z,k){J8(Z,1,k.elapsedTimeMs);bt(Z,3,k.videoDecoderName)};
AwN=function(Z,k){J8(Z,1,k.deviceInterface);bt(Z,2,k.deviceVersion);zc(Z,3,k.isSleeping)};
HPf=function(Z){return{lX:$p(Z,1,cwy),trackType:Dc(Z,2),Ne:Dc(Z,3),timeRange:$p(Z,4,Lf),tileContext:wj(Z,5),Mc:Dc(Z,6)}};
cwy=function(Z){return{type:Dc(Z,1),event:Dc(Z,2),gO:OB(Z,3),SX:OB(Z,4),AP:wj(Z,5),identifier:wj(Z,6),Uq:Dc(Z,9)}};
dKf=function(Z){return{first:Dc(Z,1),mP:Dc(Z,2)}};
XGN=function(Z){return{bitrate:Dc(Z,6),width:Dc(Z,7),height:Dc(Z,8),fps:Dc(Z,25),averageBitrate:Dc(Z,31),audioSampleRate:Dc(Z,45),audioChannels:Dc(Z,46),qualityOrdinal:Dc(Z,56)}};
h_=function(Z){return{itagDenylist:xp(Z,1)}};
Ls0=function(Z){return{u8t:vY(Z,1),zKt:Dc(Z,2),bNm:vY(Z,3),KHp:OB(Z,4),cryptoPeriodIndex:Dc(Z,5),LHA:Dc(Z,6),aQp:Dc(Z,7)}};
tKU=function(Z){return{M3:Dc(Z,1),itag:wj(Z,3),lW:$p(Z,4,VKX),lmt:Dc(Z,5),cIz:Dc(Z,7),xtags:wj(Z,15),JO:$p(Z,23,Fs0),aO:$p(Z,34,h_)}};
VKX=function(Z){return{iv:gj(Z,5),sI:vY(Z,7)}};
hQf=function(Z){return{Y_:xp(Z,2),videoId:wj(Z,3),ol:Dc(Z,4)}};
Fs0=function(Z){return{videoId:wj(Z,2)}};
uCG=function(Z){return{Bz:Dc(Z,3),YZ:Dc(Z,4),DP:Dc(Z,5),IH:vY(Z,8),V8p:Dc(Z,10),jE:Dc(Z,12),Zx:Dc(Z,13),SE:Dc(Z,14),FU:Dc(Z,15),K_:Dc(Z,16)}};
lsi=function(Z){return{targetAudioReadaheadMs:Dc(Z,1),targetVideoReadaheadMs:Dc(Z,2),backoffTimeMs:Dc(Z,4),playbackCookie:gj(Z,7),videoId:wj(Z,8)}};
fsr=function(Z){return{minBandwidthBytesPerSec:Dc(Z,1),minReadaheadMs:Dc(Z,2)}};
BQr=function(Z){return{startMinReadaheadPolicy:Gc(Z,1,fsr),resumeMinReadaheadPolicy:Gc(Z,2,fsr)}};
DKf=function(Z){return{label:wj(Z,1),text:wj(Z,2)}};
OPb=function(Z){return{videoId:wj(Z,1),formatId:$p(Z,2,Xw),debugInfo:Gc(Z,3,DKf)}};
vNi=function(Z){return{BK:Gc(Z,1,OPb)}};
iPG=function(Z){return{EJ:Dc(Z,1),n_:Dc(Z,2),minReadaheadMs:Dc(Z,3)}};
gNX=function(Z){return{E$:Dc(Z,1),items:Gc(Z,2,iPG),g9:Dc(Z,3)}};
wGj=function(Z){return{token:wj(Z,1),videoId:wj(Z,2)}};
$Kb=function(Z){return{G3:Dc(Z,1)}};
xKj=function(Z){return{OX:wj(Z,1),action:Dc(Z,2),Af:$p(Z,3,$Kb)}};
u1=function(Z){return{PC:Dc(Z,1),gq:Dc(Z,2),seekSource:Dc(Z,3)}};
GSr=function(Z){return{QD:$p(Z,2,Lf),cpn:wj(Z,5),loggingMetadata:gj(Z,6),j5:$p(Z,7,Lf),Rf:Dc(Z,8),rd:vY(Z,9)}};
SZr=function(Z){return{mS:Gc(Z,1,GSr)}};
eQf=function(Z){return{metadata:Gc(Z,1,SZr),trackType:Dc(Z,2)}};
oNR=function(Z,k){J8(Z,1,k.id);bt(Z,2,k.url)};
JwR=function(Z,k){J8(Z,1,k.id);bt(Z,2,k.name);J8(Z,3,k.resourceId);J8(Z,4,k.line);J8(Z,5,k.column)};
zQG=function(Z,k){J8(Z,1,k.id);J8(Z,2,k.timestampMs);J8(Z,3,k.stackId)};
UKf=function(Z,k){J8(Z,1,k.id);J8(Z,2,k.frameId);J8(Z,3,k.parentId)};
bPG=function(Z,k){if(k.resources)for(var N=0;N<k.resources.length;N++)pv(Z,1,k.resources[N],oNR,3);if(k.frames)for(N=0;N<k.frames.length;N++)pv(Z,2,k.frames[N],JwR,3);if(k.samples)for(N=0;N<k.samples.length;N++)pv(Z,3,k.samples[N],zQG,1);if(k.stacks)for(N=0;N<k.stacks.length;N++)pv(Z,4,k.stacks[N],UKf,1)};
RQN=function(Z){return Object.values(pGj).includes(Z)};
Bz=function(Z,k){const N=Math.max(Z,k);Z=Math.min(Z,k);k=l1[0];for(let a=0;a<l1.length;a++){const T=l1[a],K=g.ff[T];if(N>=Math.floor(K*16/9)*1.3||Z>=K*1.3)return k;k=T}return"tiny"};
Dx=function(Z){return Z.indexOf("/mp4")>=0?1:Z.indexOf("/webm")>=0?2:Z.indexOf("/x-flv")>=0?3:Z.indexOf("/vtt")>=0?4:0};
O9=function(Z){return Z.includes("vtt")||Z.includes("text/mp4")};
vz=function(Z){return/(opus|mp4a|dtse|ac-3|ec-3|iamf)/.test(Z)};
i1=function(Z){return/(vp9|vp09|vp8|avc1|av01|av02)/.test(Z)};
qD=function(Z,k,N,a,T,K,y){const Q=new g0;k in g.ff||(k="small");k==="light"&&(k="tiny");a&&T?(T=Number(T),a=Number(a)):(T=g.ff[k],a=Math.round(T*16/9));K=new w0(a,T,0,null,void 0,k,K,y);Z=unescape(Z.replace(/&quot;/g,'"'));return new $5(N,Z,{audio:Q,video:K})};
x5=function(Z){return Z.gA==="9h"||Z.gA==="(h"};
MKf=function(Z){return!!Z.contentProtection&&!!Z.contentProtection.fairplay&&(Z.gA==="("||Z.gA==="(h"||Z.gA==="A"||Z.gA==="MEAC3")||Gd&&!!Z.contentProtection&&Z.gA==="1e"};
nNb=function(Z){return Z.gA==="MAC3"||Z.gA==="MEAC3"||Z.gA==="M"||Z.gA==="I"};
g.Sx=function(Z){return Z.containerType===1};
IsX=function(Z){return Z.gA==="("||Z.gA==="(h"||Z.gA==="H"||Gd&&Z.gA==="1e"};
jPy=function(Z,k=1){const N={};Z.video&&(Z.video.width&&(N[ex.WIDTH.name]=Z.video.width),Z.video.height&&(N[ex.HEIGHT.name]=Z.video.height),Z.video.fps&&(N[ex.FRAMERATE.name]=Z.video.fps*k),Z.video.V&&(N[ex.EOTF.name]=Z.video.V),Z.UH&&(N[ex.BITRATE.name]=Z.UH*8*k),Z.gA==="("&&(N[ex.CRYPTOBLOCKFORMAT.name]="subsample"),Z.video.projectionType==="EQUIRECTANGULAR"||Z.video.projectionType==="EQUIRECTANGULAR_THREED_TOP_BOTTOM"||Z.video.projectionType==="MESH")&&(N[ex.DECODETOTEXTURE.name]="true");Z.audio?.numChannels&&
Z.gA!=="i"&&Z.gA!=="I"&&(N[ex.CHANNELS.name]=Z.audio.numChannels);return N};
g.ot=function(Z,k){return{itag:+Z.itag,lmt:k?0:Z.lastModified,xtags:Z.U||""}};
ENf=function(Z){const k=navigator.mediaCapabilities;if(!k?.decodingInfo||Z.gA==="f")return Promise.resolve();const N={type:Z.audio&&Z.video?"file":"media-source"};Z.video&&(N.video={contentType:Z.mimeType,width:Z.video.width||640,height:Z.video.height||360,bitrate:Z.UH*8||1E6,framerate:Z.video.fps||30});Z.audio&&(N.audio={contentType:Z.mimeType,channels:`${Z.audio.numChannels||2}`,bitrate:Z.UH*8||128E3,samplerate:Z.audio.sampleRate||44100});return k.decodingInfo(N).then(a=>{Z.L=a})};
J_=function(Z,k){return{start(N){return Z[N]},end(N){return k[N]},length:Z.length}};
WsG=function(Z,k,N){const a=[],T=[];for(let K=0;K<Z.length;K++)a.push(Z.start(K)),T.push(Z.end(K));a.push(k);T.push(N);a.sort((K,y)=>K-y);
T.sort((K,y)=>K-y);
return J_(a,T)};
zd=function(Z,k=",",N=Z?Z.length:0){const a=[];if(Z)for(N=Math.max(Z.length-N,0);N<Z.length;N++)a.push(`${Z.start(N).toFixed(3)}-${Z.end(N).toFixed(3)}`);return a.join(k)};
U9=function(Z,k){if(!Z)return-1;try{for(let N=0;N<Z.length;N++)if(Z.start(N)<=k&&Z.end(N)>=k)return N}catch(N){}return-1};
b1=function(Z,k){return U9(Z,k)>=0};
YZj=function(Z,k){if(!Z)return NaN;k=U9(Z,k);return k>=0?Z.start(k):NaN};
pf=function(Z,k){if(!Z)return NaN;k=U9(Z,k);return k>=0?Z.end(k):NaN};
Rt=function(Z){return Z&&Z.length?Z.end(Z.length-1):NaN};
M9=function(Z){return Rt(Z)>0};
nf=function(Z,k){Z=pf(Z,k);return Z>=0?Z-k:0};
It=function(Z,k,N){const a=[],T=[];for(let K=0;K<Z.length;K++)Z.end(K)<k||Z.start(K)>N||(a.push(Math.max(k,Z.start(K))-k),T.push(Math.min(N,Z.end(K))-k));return J_(a,T)};
jx=function(){return window.SourceBuffer?!!SourceBuffer.prototype.changeType:!1};
Z0r=function(){return!!(window.MediaSource||window.ManagedMediaSource||window.WebKitMediaSource||window.HTMLMediaElement&&HTMLMediaElement.prototype.webkitSourceAddId)};
E9=function(){return!(!window.MediaSource||!window.MediaSource.isTypeSupported)||window.ManagedMediaSource};
Wz=function(Z){try{return Z.D()==="open"}catch(k){return!1}};
kpR=function(Z,k){Wz(Z)?g.Sq(()=>{k(Z)}):Z.callback=k};
NCi=function(Z,k,N){Y5&&(ZG(Z.mediaElement,{l:"mswssb",sr:Z.mediaElement.u3?.EQ()},!1),k.tZ(Z.N,Z),N.tZ(Z.N,Z));Z.V=k;Z.U=N;g.u(Z,k);g.u(Z,N)};
TCX=function(Z,k,N,a=""){a=k.mimeType+a;const T=N.mimeType;k=k.gA;N=N.gA;Z.Rq=Z.b3?.addSourceBuffer(T);Z.tq=a.split(";")[0]==="fakesb"?void 0:Z.b3?.addSourceBuffer(a);Z.SO&&(Z.SO.webkitSourceAddId("0",T),Z.SO.webkitSourceAddId("1",a));N=new a2b(Z.Rq,Z.SO,"0",Dx(T),N,!1);a=new a2b(Z.tq,Z.SO,"1",Dx(a),k,!0);NCi(Z,N,a)};
yFy=function(Z,k,N,a){if(!Z.V||!Z.U)return null;const T=Z.V.isView()?Z.V.Dl:Z.V,K=Z.U.isView()?Z.U.Dl:Z.U,y=new k7(Z.mediaElement,Z.b3,!0);y.Y=Z.Y;NCi(y,new KSj(T,k,N,a),new KSj(K,k,N,a));Wz(Z)||Z.V.PF(Z.V.mx());return y};
ZG=function(Z,k,N=!1){Z.u3?.Xa()&&Z.u3.U6("rms",k,N)};
Nt=function(Z){Z=Z.C();return Z.length<1?NaN:Z.end(Z.length-1)};
QWU=function(Z,k){Z.EH&&Z.EH.equals(k)||(Z.EH&&Z.EH.dispose(),Z.EH=k)};
qaN=function(Z){!Z.U&&Z0r()&&(Z.Y?Z.Y.then(()=>qaN(Z)):Z.zP()||(Z.U=Z.zX()))};
rFi=function(Z){Z.U&&(Z.U.dispose(),Z.U=void 0)};
CBG=function(Z,k,N){Z.isPaused()||Z.getCurrentTime()>k||N>10||(Z.play(),g.fb(()=>{CBG(Z,Z.getCurrentTime(),N+1)},500))};
ax=function(Z){return nf(Z.pN(),Z.getCurrentTime())};
mdr=function(Z,k){if(Z.D()===0||Z.hasError())return!1;const N=Z.getCurrentTime()>0;return k>=0&&(Z=Z.C(),Z.length||!N)?b1(Z,k):N};
TZ=function(Z){Z.zP()&&(Z.u3&&Z.u3.Tq("rs_s"),Yh&&Z.getCurrentTime()>0&&Z.seekTo(0),Z.Kp(),Z.load(),QWU(Z,null));delete Z.Y};
KN=function(Z){switch(Z.zQ()){case 2:return"progressive.net.retryexhausted";case 3:return Z=Z.qR(),Z?.includes("MEDIA_ERR_CAPABILITY_CHANGED")||sWf&&Z?.includes("audio_output_change")?"capability.changed":"fmt.decode";case 4:return"fmt.unplayable";case 5:return"drm.unavailable";case 1E3:return"capability.changed";default:return null}};
yR=function(Z){return Z.isPlaying()&&!Z.V(16)&&!Z.V(32)};
qt=function(Z,k,N,a){if(!(k===Z.state&&N===Z.RJ&&a===Z.seekSource||k!==void 0&&(k&128&&!N||k&2&&k&16))){var T;if(T=k)T=k||Z.state,T=!!(T&16||T&32);Z=new g.QR(k,N,T?a?a:Z.seekSource:null)}return Z};
r7=function(Z,k,N=!1){return AFy(Z,k.getCurrentTime(),(0,g.z)(),ax(k),N)};
CN=function(Z,k,N=null){return qt(Z,Z.state|k,null,N)};
mz=function(Z,k){return qt(Z,Z.state&~k,null,null)};
s0=function(Z,k,N,a=null){return qt(Z,(Z.state|k)&~N,null,a)};
g.Ak=function(Z,k){return k.state===Z.state&&k.RJ===Z.RJ};
Pt=function(Z){return Z.V(128)?-1:Z.V(2)?0:Z.V(2048)?3:Z.V(64)?-1:Z.V(1)&&!Z.V(32)?3:Z.V(8)?1:Z.V(4)?2:-1};
ct=function(Z){return Z.layout.clientMetadata.PD("METADATA_TYPE_INTERACTIONS_AND_PROGRESS_LAYOUT_COMMANDS")};
Ht=function(Z,k){zq(Z.WD,k,!Z.V)};
PBG=function(Z){wm("Received layout exit signal when not in layout exit flow.",Z.slot,Z.layout)};
cFy=function(Z){if(Z.x4==="rendering"){Ht(Z,"pause");var k=ct(Z)?.pauseCommands||[];Ae(Z.tp.get(),k,Z.layout.layoutId);Z.KZ(2)}};
H0y=function(Z){if(Z.x4==="rendering"){Ht(Z,"resume");var k=ct(Z)?.resumeCommands||[];Ae(Z.tp.get(),k,Z.layout.layoutId)}};
ddG=function(Z,k,N=!1){Z.V||UT(Z.WD,k,N)};
LSj=function(Z){return(ct(Z)?.progressCommands||[]).findIndex(k=>!!g.J(k?.command,Xry))!==-1};
VOX=function(Z,k){switch(k){case "normal":Z.Nx("complete");break;case "skipped":Z.Nx("skip");break;case "abandoned":bX(Z.WD,"impression")&&Z.Nx("abandon")}};
FSb=function(Z,k){Z.D||(k=new g.d7(k.state,new g.QR),Z.D=!0);return k};
tOy=function(Z,k){Zx(k)?Z.KZ(1):k.Ub(4)&&!k.Ub(2)&&cFy(Z);$Z(k,4)<0&&!($Z(k,2)<0)&&H0y(Z)};
hof=function(Z){Z.position===0&&(Z.Zf.get(),Z=Z.layout.clientMetadata.PD("metadata_type_ad_placement_config").kind,Z={adBreakType:XP(Z)},uJ("ad_bl"),g.lJ(Z))};
g.LN=function(Z,k,N){vX(Z,N)||gV(Z,k,N);vX(Z,"video_to_ad")||gV(Z,k,"video_to_ad");vX(Z,"ad_to_video")||gV(Z,k,"ad_to_video");vX(Z,"ad_to_ad")||gV(Z,k,"ad_to_ad")};
uUR=function(Z){Z.pJ=Date.now();VR(Z,Z.xH);Z.timer.start()};
VR=function(Z,k){k={current:k/1E3,duration:Z.kZ()/1E3};D6(Z.fC.get(),"onAdPlaybackProgress",k)};
tk=function(Z){return g.J(Z.layout.renderingContent,FP)?.isSeekableWithNoAdElements};
f2f=function(Z){return new l2f({...Z,yl:Z.callback,KZ:()=>{}})};
DdG=function(Z){return new BCj({...Z,KZ:k=>{D6(Z.fC.get(),"onAdIntroStateChange",k)}})};
O0y=function(Z){return new BCj({...Z,KZ:k=>{Z.fC.get().Ws(k)}})};
vAf=function(Z){var k=Z.Nj,N=["METADATA_TYPE_MEDIA_BREAK_LAYOUT_DURATION_MILLISECONDS"];for(const a of SP())N.push(a);if(MD(k,{Eb:N,x8:["LAYOUT_TYPE_MEDIA_BREAK"]}))return f2f(Z);k=Z.Nj;N=["metadata_type_player_vars","metadata_type_player_bytes_callback_ref"];for(const a of SP())N.push(a);if(MD(k,{Eb:N,x8:["LAYOUT_TYPE_MEDIA"]}))return Op(Z.Nj.clientMetadata,"metadata_type_ad_intro")?DdG(Z):O0y(Z)};
lZ=function(Z,k,N){const a=hk(Z);Z.sW===Z.sS.length-1&&wm("Unexpected skip with target requested during the last sublayout");if(N.renderingContent===void 0&&N.layoutId!==uZ(a,k,N)){wm("onSkipWithAdPodSkipTargetRequested for a PlayerBytes layout that is not currently active",a.zM(),a.zZ(),{requestingSlot:k,requestingLayout:N});var T=!1}else T=!0;if(T){a:{if((T=a.zZ().clientMetadata.PD("metadata_type_ad_pod_skip_target"))&&T>0&&T<Z.sS.length){b:{let K=T;for(;K<Z.sS.length;){if(T===Z.sS[K].zZ().clientMetadata.PD("metadata_type_ad_pod_skip_index")){T=
K;break b}K++}T=void 0}if(T===void 0)wm("Skip-to-index was requested but target index was not found",a.zM(),a.zZ(),{requestingSlot:k,requestingLayout:N});else{k=T;break a}}else wm("Invalid ad pod skip target index",a.zM(),a.zZ(),{requestingSlot:k,requestingLayout:N});k=void 0}k!==void 0&&i0f(Z,a.zM(),a.zZ(),k)}};
hk=function(Z){return Z.sS[Z.sW]};
uZ=function(Z,k,N){const a=Z.zZ().clientMetadata.PD("metadata_type_linked_in_player_layout_id");return a?a:(wm("Tried to retrieve Linked InPlayer LayoutId but missing ClientMetadata",Z.zM(),Z.zZ(),{requestingSlot:k,requestingLayout:N}),null)};
Bt=function(Z,k,N,a){gAR(Z,k,N,a,()=>{fN(Z,Z.sW+1)})};
i0f=function(Z,k,N,a){gAR(Z,k,N,"skipped",()=>{fN(Z,a)})};
gAR=function(Z,k,N,a,T){if(!Z.c7){var K=hk(Z);K?(K.zZ().layoutId!==N.layoutId&&wm("SubLayout mismatch in exitSubLayout",k,N,{exitingSubLayout:N.layoutId,activeSubLayout:K.zZ().layoutId}),Z.c7=!0,K.C8(K.zZ(),a),V7G(Z.iz,k,N,a),Z.c7=!1,Z.F7?(Z.F7(),DG(Z.Zf.get())):T()):wm("No active adapter when exitSubLayout in PlayerBytesVodCompositeLayoutRenderingAdapter. This should never happen.",k,N)}};
fN=function(Z,k){if(Z.sW===Z.sS.length-1)Z.sW++,O0(Z.Jh,Z.layout),DG(Z.Zf.get());else a:{if(Z.sW===-1&&(Z.callback.l0(Z.slot,Z.layout),k>0)){wm("Invalid index for playLayoutAtIndexOrExit when no ad has played yet.",Z.slot,Z.layout,{indexToPlay:k,layoutId:Z.layout.layoutId});break a}Z.sW=k;k=hk(Z);if(Z.sW>0){var N=Z.Zf.get();N.U=!1;const a={};N.V&&N.videoId&&(a.cttAuthInfo={token:N.V,videoId:N.videoId});OL("ad_to_ad",a)}N=g.J(k.zZ().renderingContent,ET);!N?.isEligibleToBeSkippedWhenNoEngagementOnLayoutId||
(Z.dn.get().uS.get(N.isEligibleToBeSkippedWhenNoEngagementOnLayoutId)??!1)?k.startRendering(k.zZ()):fN(Z,Z.sW+1)}};
wrG=function(Z){(Z=hk(Z))&&Z.FW()};
xd0=function(Z){return new $db(Z.qc,Z.XS,Z.wD,Z.s3,Z.E6,Z.dn,Z.Zf,Z.iz,Z.slot,Z.layout,Z.Ra,Z.Jh,Z.GM,Z.Gt)};
SaU=function(Z,k,N,a,T,K,y,Q,q,r,C,m,A,P,d,h,B,v,O,x,e,Ki){const yf={Za:Q,Qi:q,ub:r,s3:C,XS:m,E6:A,dn:P,JW:d,Zf:h,fC:B,tp:v,Rx:O,Gt:x,context:Ki};Q=MD(a,{Eb:["metadata_type_sub_layouts"],x8:["LAYOUT_TYPE_COMPOSITE_PLAYER_BYTES"]})||a.C5!==void 0&&a.layoutType==="LAYOUT_TYPE_COMPOSITE_PLAYER_BYTES";q=MD(a,{Eb:[],x8:["LAYOUT_TYPE_MEDIA","LAYOUT_TYPE_MEDIA_BREAK"]});r=()=>{const Jy=a.C5??a.clientMetadata.PD("metadata_type_sub_layouts"),hy=xd0({qc:Z,XS:m,wD:e,s3:C,E6:A,dn:P,Zf:h,iz:k,slot:N,layout:a,
Ra:K,Jh:y,GM:T,Gt:x}),zf=[];for(let MR=0;MR<Jy.length;MR++){const OD=vAf({...yf,callback:{l0:hy.Ev.bind(hy),eI:hy.B5.bind(hy),aJ:hy.H5.bind(hy)},slot:N,Nj:Jy[MR],DU:Ur=>{Ur.C8(Jy[MR],"normal")},
nZ:MR,wc:Jy.length,BO:!1});if(!OD)return;zf.push(OD)}hy.sS=zf;return hy};
d=()=>{const Jy=vAf({...yf,callback:{l0:Z.l0.bind(Z),eI:Z.eI.bind(Z),aJ:Z.aJ.bind(Z)},slot:N,Nj:a,DU:()=>{O0(y,a)},
nZ:0,wc:1,BO:!0});return Jy?new Gpf(Z,C,A,h,Jy,T,x):Jy};
if(Q)return r();if(q)return d()};
iZ=function(Z,k){vt(Z.Za.get(),{driftRecoveryInfo:{contentCpn:Z.XS.get().mK?.clientPlaybackNonce,adClientData:Z.layout.KF.adClientDataEntry,...k}})};
oAi=function(Z){var k=Z.layout.clientMetadata.PD("metadata_type_layout_enter_ms");const N=Z.layout.clientMetadata.PD("metadata_type_layout_exit_ms");Z=Z.a4.get();k=eoj(Z.D,k,N);return Math.min(N,k!==null?k:Infinity)};
zoN=function(Z,k){const N=JFy(Z,k);N||wm("Expected subLRA found by layout ID",Z.slot,Z.layout,{layoutId:k});Z.V={M7:N};N?N.startRendering(N.zZ()):k===Z.U&&wm("Failed to find rendering adapter for survey media layout",Z.slot,Z.layout,{surveyMediaLayoutId:k})};
JFy=function(Z,k){return k==null?null:Z.D.find(N=>N.zZ().layoutId===k)||null};
Udy=function(Z,k,N,a,T,K,y,Q,q,r){var C=T-a;const m=(Z.fulfilledLayout||Z.clientMetadata.PD("metadata_type_fulfilled_layout"))?.clientMetadata.PD("metadata_type_ssdai_ads_config")||"",A=Z.clientMetadata.PD("metadata_type_triggering_cue_point")?.current?.identifier;A||g7(r,"ads_cpu",`slid.${k.layoutId}`);if(!C)return y.CY(N,m,2,K,a,T,Z.slotId,A),g7(r,"ads_iraot",`slid.${k.layoutId};enterMs.${a};exitMs.${T};vid.${N.video_id}`),null;C=y.eT(N,m,2,K,a,T,Z.slotId,A);g7(r,"ads_atct",`slid.${k.layoutId};enterMs.${a};exitMs.${T};vid.${N.video_id};pid.${C};cid.${A}`);
if(!C)return wm("Unexpected failure to add to playback timeline",Z,k,q()),null;Z=Z.slotId;k=k.layoutId;C?(Q.V.has(C)&&wm("Unexpected remap of timeline playback"),Q.V.set(C,{slotId:Z,layoutId:k})):wm("Invalid timeline playback ID");a+K>T&&y.pj(C,T-a);return C};
b0f=function(Z,k,N){const a=k.clientMetadata.PD("metadata_type_sodar_extension_data");if(a)try{xAy(N,a)}catch(T){wm("Unexpected error when loading Sodar",Z,k,{error:T})}};
prN=function(Z,k,N,a,T,K,y){w7(Z,k,new g.d7(N,new g.QR),a,T,y,!1,K)};
w7=function(Z,k,N,a,T,K,y=!0,Q){Zx(N)&&k5(T,0,null)&&(!bX(Z,"impression")&&Q&&Q(),Z.Nx("impression"));bX(Z,"impression")&&(N.Ub(4)&&!N.Ub(2)&&Z.nN("pause"),$Z(N,4)<0&&!($Z(N,2)<0)&&Z.nN("resume"),N.Ub(16)&&T>=.5&&Z.nN("seek"),y&&N.Ub(2)&&$7(Z,N.state,k,a,T,K))};
$7=function(Z,k,N,a,T,K,y,Q,q){bX(Z,"impression")&&(K?(K=T-a,K=K>=-1&&K<=2):K=Math.abs(a-T)<=1,x7(Z,k,K?a:T,N,a,y,Q&&K),K&&!q&&Z.Nx("complete"))};
x7=function(Z,k,N,a,T,K,y){UT(Z,N*1E3,y);T<=0||N<=0||k?.V(16)||k?.V(32)||(k5(N,T*.25,a)&&(K&&!bX(Z,"first_quartile")&&K("first"),Z.Nx("first_quartile")),k5(N,T*.5,a)&&(K&&!bX(Z,"midpoint")&&K("second"),Z.Nx("midpoint")),k5(N,T*.75,a)&&(K&&!bX(Z,"third_quartile")&&K("third"),Z.Nx("third_quartile")))};
RoG=function(Z,k){bX(Z,"impression")&&Z.nN(k?"fullscreen":"end_fullscreen")};
MOR=function(Z){bX(Z,"impression")&&Z.nN("clickthrough")};
nAf=function(Z){Z.nN("active_view_measurable")};
I2y=function(Z){bX(Z,"impression")&&!bX(Z,"seek")&&Z.nN("active_view_fully_viewable_audible_half_duration")};
jWG=function(Z){bX(Z,"impression")&&!bX(Z,"seek")&&Z.nN("active_view_viewable")};
EAy=function(Z){bX(Z,"impression")&&!bX(Z,"seek")&&Z.nN("audio_audible")};
WSy=function(Z){bX(Z,"impression")&&!bX(Z,"seek")&&Z.nN("audio_measurable")};
YaN=function(Z,k){g7(Z.Za.get(),"ads_imp",`cpn.${Z.layout.clientMetadata.PD("metadata_type_content_cpn")};acpn.${N9(Z.XS.get(),2)?.clientPlaybackNonce};clr.${k};skp.${!!g.J(Z.layout.clientMetadata.PD("metadata_type_instream_ad_player_overlay_renderer")?.skipOrPreviewRenderer,GZ)}`)};
Zb0=function(Z,k,N){g7(Z.Za.get(),"ads_qua",`cpn.${Z.layout.clientMetadata.PD("metadata_type_content_cpn")};acpn.${N9(Z.XS.get(),2)?.clientPlaybackNonce};qt.${k};clr.${N}`)};
Sy=function(Z){return{enterMs:Z.clientMetadata.PD("metadata_type_layout_enter_ms"),exitMs:Z.clientMetadata.PD("metadata_type_layout_exit_ms")}};
k_y=function(Z,k){g7(Z.Za.get(),"ads_imp",`acpn.${N9(Z.XS.get(),2)?.clientPlaybackNonce};clr.${k}`)};
Nuy=function(Z,k,N){g7(Z.Za.get(),"ads_qua",`cpn.${Z.layout.clientMetadata.PD("metadata_type_content_cpn")};acpn.${N9(Z.XS.get(),2)?.clientPlaybackNonce};qt.${k};clr.${N}`)};
ey=function(Z){return`${Math.round(Z.width)}x${Math.round(Z.height)}`};
Jk=function(Z,k,N=ox){N.width<ox.width&&(N=ox);if(Z.width<N.width||Z.height<N.height)return{j3:3,du:501,errorMessage:`ad(${ey(N)}) larger than container(${ey(Z)}).`};if(N.width*N.height>Z.width*Z.height*.2)return{j3:3,du:501,errorMessage:`ad(${ey(N)}) to container(${ey(Z)}) ratio exceeds limit.`};if(N.height>Z.height/3-k)return{j3:3,du:501,errorMessage:`ad(${ey(N)}) covers container(${ey(Z)}) center.`}};
aAr=function(Z,k){const N=Z.clientMetadata.PD("metadata_type_ad_placement_config");return new zZ(Z.d5,k,N,Z.layoutId)};
U0=function(Z){return Z.clientMetadata.PD("metadata_type_invideo_overlay_ad_renderer")};
Tuj=function(){const Z=["metadata_type_invideo_overlay_ad_renderer"];SP().forEach(k=>{Z.push(k)});
return{Eb:Z,x8:["LAYOUT_TYPE_IN_VIDEO_TEXT_OVERLAY","LAYOUT_TYPE_IN_VIDEO_ENHANCED_TEXT_OVERLAY"]}};
Kmj=function(){const Z=["metadata_type_invideo_overlay_ad_renderer"];for(const k of SP())Z.push(k);return{Eb:Z,x8:["LAYOUT_TYPE_IN_VIDEO_IMAGE_OVERLAY"]}};
yPf=function(Z=null){return Z!=null&&(Z=Z.thumbnail,Z!=null&&Z.thumbnails!=null&&Z.thumbnails.length!=0&&Z.thumbnails[0].width!=null&&Z.thumbnails[0].height!=null)?new g.i0(Z.thumbnails[0].width||0,Z.thumbnails[0].height||0):new g.i0(0,0)};
Qib=function(){const Z=tXN();Z.Eb.push("metadata_type_ad_info_ad_metadata");return Z};
qby=function(Z){switch(Z){case "LAYOUT_EXIT_REASON_UNSPECIFIED":return"unknown";case "LAYOUT_EXIT_REASON_NORMAL":return"normal";case "LAYOUT_EXIT_REASON_ERROR":return"error";case "LAYOUT_EXIT_REASON_USER_SKIPPED":return"skipped";case "LAYOUT_EXIT_REASON_USER_MUTED":return"muted";case "LAYOUT_EXIT_REASON_ABANDONED":return"abandoned";case "LAYOUT_EXIT_REASON_USER_INPUT_SUBMITTED":return"user_input_submitted";case "LAYOUT_EXIT_REASON_USER_CANCELLED":return"user_cancelled";default:return new p(`Invalid layout exit reason: ${Z}`)}};
bZ=function(Z){return Z?.layoutId!=null&&Z?.layoutType!=null};
rP0=function(Z){if(!bZ(Z.adLayoutMetadata))return!1;Z=Z.renderingContent;return g.J(Z,pN)||g.J(Z,Rx)||g.J(Z,Mt)||g.J(Z,nN)||g.J(Z,Ix)||g.J(Z,jy)?!0:!1};
E0=function(Z){return!!(Z.K2&&Z.slot&&Z.layout)};
Wt=function(Z){const k=Z.config?.adPlacementConfig;Z=Z.renderer;return!(!k||k.kind==null||!Z)};
m2R=function(Z){if(!bZ(Z.adLayoutMetadata))return!1;Z=Z.renderingContent;return g.J(Z,ET)||g.J(Z,WM)||g.J(Z,Cif)||g.J(Z,I7)||g.J(Z,jP)?!0:!1};
Y7=function(Z){return Z.playerVars!==void 0&&Z.pings!==void 0&&Z.externalVideoId!==void 0};
Kq=function(Z){if(!bZ(Z.adLayoutMetadata))return!1;Z=Z.renderingContent;var k=g.J(Z,ZN);return k?k8(k):(k=g.J(Z,FP))?Y7(k):(k=g.J(Z,N8))?k.playerVars!==void 0:(k=g.J(Z,ET))?k.durationMilliseconds!==void 0:g.J(Z,ap)||g.J(Z,Tk)?!0:!1};
k8=function(Z){Z=(Z.sequentialLayouts||[]).map(k=>g.J(k,yy));
return Z.length>0&&Z.every(Kq)};
q8=function(Z){return bZ(Z.adLayoutMetadata)?(Z=g.J(Z.renderingContent,Qy))&&Z.pings?!0:!1:!1};
HbG=function(Z){if(!bZ(Z.adLayoutMetadata))return!1;if(g.J(Z.renderingContent,siX)||g.J(Z.renderingContent,rE))return!0;const k=g.J(Z.renderingContent,Cq);return g.J(Z.renderingContent,mv)||g.J(k?.sidePanel,APb)||g.J(k?.sidePanel,Pij)||g.J(k?.sidePanel,cPf)?!0:!1};
tDU=function(Z){var k;(k=!Z)||(k=Z.adSlotMetadata,k=!(k?.slotId!==void 0&&k?.slotType!==void 0));if(k||!(d20(Z)||Z.slotEntryTrigger&&Z.slotFulfillmentTriggers&&Z.slotExpirationTriggers))return!1;Z=Z.fulfillmentContent?.fulfilledLayout;return(k=g.J(Z,yy))?Kq(k):(k=g.J(Z,sO))?HbG(k):(k=g.J(Z,X8b))?m2R(k):(k=g.J(Z,LmU))?rP0(k):(k=g.J(Z,VDU))?bZ(k.adLayoutMetadata)?g.J(k.renderingContent,pN)?!0:!1:!1:(k=g.J(Z,Af))?q8(k):(Z=g.J(Z,FmG))?bZ(Z.adLayoutMetadata)?g.J(Z.renderingContent,rE)?!0:!1:!1:!1};
d20=function(Z){return(Z=g.J(Z.fulfillmentContent?.fulfilledLayout,sO))&&Z.adLayoutMetadata?.layoutType==="LAYOUT_TYPE_PANEL_QR_CODE"&&Z.layoutExitNormalTriggers===void 0};
hZX=function(Z){for(const k of Z||[]){Z=g.J(k,PU);if(Z===void 0||!tDU(Z))break;if((Z=g.J(Z.fulfillmentContent?.fulfilledLayout,Af))&&q8(Z))return!0}return!1};
lAi=function(Z,k=!1){if(!Z.questions?.length||!Z.playbackCommands||!k&&Z.questions.length!==1)return!1;for(const N of Z.questions)if(!uSi(g.J(N,cU)?.surveyAdQuestionCommon||g.J(N,HU)?.surveyAdQuestionCommon))return!1;return!0};
fAi=function(Z){({instreamSurveyAdRenderer:Z}=Z?.playerOverlay||{});return Z?Z.playbackCommands&&Z.questions&&Z.questions.length===1?uSi(g.J(Z.questions[0],cU)?.surveyAdQuestionCommon||g.J(Z.questions[0],HU)?.surveyAdQuestionCommon):!1:!1};
uSi=function(Z){if(!Z)return!1;Z=g.J(Z.instreamAdPlayerOverlay,dE);const k=g.J(Z?.skipOrPreviewRenderer,GZ),N=g.J(Z?.adInfoRenderer,Xe);return(g.J(Z?.skipOrPreviewRenderer,Lq)||k)&&N?!0:!1};
Buf=function(Z){return Z.linearAds!=null&&bZ(Z.adLayoutMetadata)};
D2y=function(Z){return Z.linearAd!=null&&Z.adVideoStart!=null};
ibN=function(Z,k,N){const a=(N.adSlots??[]).map(y=>g.J(y,PU));
if(N.Oy)if(k.clientMetadata.PD("metadata_type_allow_pause_ad_break_request_slot_reschedule"))fA(Z.V.get(),"OPPORTUNITY_TYPE_AD_BREAK_SERVICE_RESPONSE_RECEIVED",()=>[],k.slotId);
else{if(Z.Gt.get().S.X().B("h5_check_forecasting_renderer_for_throttled_midroll")){var T=N.HX.filter(y=>y.renderer?.clientForecastingAdRenderer!=null);
T.length!==0?Obj(Z.D,T,a,k.slotId,N.ssdaiAdsConfig):fA(Z.V.get(),"OPPORTUNITY_TYPE_AD_BREAK_SERVICE_RESPONSE_RECEIVED",()=>[],k.slotId)}else fA(Z.V.get(),"OPPORTUNITY_TYPE_AD_BREAK_SERVICE_RESPONSE_RECEIVED",()=>[],k.slotId);
v6G(Z.Y,k)}else{T={FM:Math.round(k.clientMetadata.PD("metadata_type_ad_break_request_data")?.FM||0),SP:k.clientMetadata.PD("metadata_type_ad_break_request_data")?.SP};var K=k.clientMetadata.PD("metadata_type_cue_point");Obj(Z.D,N.HX,a,k.slotId,N.ssdaiAdsConfig,T,K)}};
g6N=function(Z,k){for(const N of k){if(N.slotType==="SLOT_TYPE_PLAYER_BYTES"&&N.fulfilledLayout)if(k=void 0,N.fulfilledLayout.renderingContent)k=N.fulfilledLayout.clientMetadata.PD("metadata_type_player_vars");else{if(N.fulfilledLayout.C5)for(const a of N.fulfilledLayout.C5)if(a.renderingContent&&(k=a.clientMetadata.PD("metadata_type_player_vars")))break}else k=void 0;if(k){Z.s3.get().S.preloadVideoByPlayerVars(k,2,300);break}}};
$2y=function(Z,k,N,a,T,K,y,Q){const q=N9(Z.XS.get(),1);if(w8y(Z.Gt.get())){const r=Vy(Z.U.get(),N,a,T,q.clientPlaybackNonce,q.td,q.daiEnabled,q,K,y);g6N(Z,r);fA(Z.V.get(),"OPPORTUNITY_TYPE_AD_BREAK_SERVICE_RESPONSE_RECEIVED",()=>r,k)}else fA(Z.V.get(),"OPPORTUNITY_TYPE_AD_BREAK_SERVICE_RESPONSE_RECEIVED",()=>Vy(Z.U.get(),N,a,T,q.clientPlaybackNonce,q.td,q.daiEnabled,q,K,y,Q),k)};
G_X=function(Z,k,N,a,T,K,y){k=x2r(k,K,Number(a.prefetchMilliseconds)||0,y);Z=k instanceof p?k:Fe(Z,a,T,k,N);return Z instanceof p?Z:[Z]};
JPU=function(Z,k,N,a,T){const K=BM(Z.U.get(),"SLOT_TYPE_AD_BREAK_REQUEST");a=[new Sbj({getAdBreakUrl:a.getAdBreakUrl,FM:0,SP:0}),new eZi];Z=k.pauseDurationMs?k.lactThresholdMs?{slotId:K,slotType:"SLOT_TYPE_AD_BREAK_REQUEST",slotPhysicalPosition:2,slotEntryTrigger:new tf(Z.V,K),slotFulfillmentTriggers:[new o6r(Z.V)],slotExpirationTriggers:[new hf(Z.V,T),new ub(Z.V,K)],mp:"core",clientMetadata:new SB(a),adSlotLoggingData:N}:new p("AdPlacementConfig for Pause Ads is missing lact_threshold_ms"):new p("AdPlacementConfig for Pause Ads is missing pause_duration_ms");
return Z instanceof p?Z:[Z]};
Rp=function(Z,k,N){if(Z.beforeContentVideoIdStartedTrigger)Z=Z.beforeContentVideoIdStartedTrigger?new lb(fq,k,Z.id):new p("Not able to create BeforeContentVideoIdStartedTrigger");else if(Z.layoutIdExitedTrigger)Z=Z.layoutIdExitedTrigger?.triggeringLayoutId?new BU(fq,Z.layoutIdExitedTrigger.triggeringLayoutId,Z.id):new p("Not able to create LayoutIdExitedTrigger");else if(Z.layoutExitedForReasonTrigger)Z.layoutExitedForReasonTrigger?.triggeringLayoutId&&Z.layoutExitedForReasonTrigger?.layoutExitReason?
(k=qby(Z.layoutExitedForReasonTrigger.layoutExitReason),Z=k instanceof p?k:new DN(fq,Z.layoutExitedForReasonTrigger.triggeringLayoutId,[k],Z.id)):Z=new p("Not able to create LayoutIdExitedForReasonTrigger");else if(Z.onLayoutSelfExitRequestedTrigger)Z=Z.onLayoutSelfExitRequestedTrigger?.triggeringLayoutId?new OO(fq,Z.onLayoutSelfExitRequestedTrigger.triggeringLayoutId,Z.id):new p("Not able to create OnLayoutSelfExitRequestedTrigger");else if(Z.onNewPlaybackAfterContentVideoIdTrigger)Z=Z.onNewPlaybackAfterContentVideoIdTrigger?
new hf(fq,k,Z.id):new p("Not able to create OnNewPlaybackAfterContentVideoIdTrigger");else if(Z.skipRequestedTrigger)Z=Z.skipRequestedTrigger?.triggeringLayoutId?new vU(fq,Z.skipRequestedTrigger.triggeringLayoutId,Z.id):new p("Not able to create SkipRequestedTrigger");else if(Z.slotIdEnteredTrigger)Z=Z.slotIdEnteredTrigger?.triggeringSlotId?new ib(fq,Z.slotIdEnteredTrigger.triggeringSlotId,Z.id):new p("Not able to create SlotIdEnteredTrigger");else if(Z.slotIdExitedTrigger)Z=Z.slotIdExitedTrigger?.triggeringSlotId?
new ub(fq,Z.slotIdExitedTrigger.triggeringSlotId,Z.id):new p("Not able to create SkipRequestedTrigger");else if(Z.surveySubmittedTrigger)Z=Z.surveySubmittedTrigger?.triggeringLayoutId?new gE(fq,Z.surveySubmittedTrigger.triggeringLayoutId,Z.id):new p("Not able to create SurveySubmittedTrigger");else if(Z.mediaResumedTrigger)Z=Z.mediaResumedTrigger&&Z.id?new zZf(Z.id):new p("Not able to create MediaResumedTrigger");else if(Z.closeRequestedTrigger)Z=Z.closeRequestedTrigger?.triggeringLayoutId?new wE(fq,
Z.closeRequestedTrigger.triggeringLayoutId,Z.id):new p("Not able to create CloseRequestedTrigger");else if(Z.slotIdScheduledTrigger)Z=Z.slotIdScheduledTrigger?.triggeringSlotId?new tf(fq,Z.slotIdScheduledTrigger.triggeringSlotId,Z.id):new p("Not able to create SlotIdScheduledTrigger");else if(Z.mediaTimeRangeTrigger){var a=Number(Z.mediaTimeRangeTrigger?.offsetStartMilliseconds),T=Number(Z.mediaTimeRangeTrigger?.offsetEndMilliseconds);isFinite(a)&&isFinite(T)?(T===-1&&(T=N),N=a>T?new p("AD_PLACEMENT_KIND_MILLISECONDS endMs needs to be >= startMs.",
{offsetStartMs:a,offsetEndMs:T},"ADS_CLIENT_ERROR_MESSAGE_AD_PLACEMENT_END_SHOULD_GREATER_THAN_START",T===N&&a-500<=T):new XC(a,T),Z=N instanceof p?N:new $8(fq,k,N,!1,Z.id)):Z=new p("Not able to create MediaTimeRangeTrigger")}else Z=Z.contentVideoIdEndedTrigger?Z.contentVideoIdEndedTrigger?new x8(fq,k,!1,Z.id):new p("Not able to create ContentVideoIdEndedTrigger"):Z.layoutIdEnteredTrigger?Z.layoutIdEnteredTrigger?.triggeringLayoutId?new Gk(fq,Z.layoutIdEnteredTrigger.triggeringLayoutId,Z.id):new p("Not able to create LayoutIdEnteredTrigger"):
Z.timeRelativeToLayoutEnterTrigger?Z.timeRelativeToLayoutEnterTrigger?.triggeringLayoutId?new SS(fq,Number(Z.timeRelativeToLayoutEnterTrigger.durationMs),Z.timeRelativeToLayoutEnterTrigger.triggeringLayoutId,Z.id):new p("Not able to create TimeRelativeToLayoutEnterTrigger"):Z.onDifferentLayoutIdEnteredTrigger?Z.onDifferentLayoutIdEnteredTrigger?.triggeringLayoutId&&Z.onDifferentLayoutIdEnteredTrigger.slotType&&Z.onDifferentLayoutIdEnteredTrigger.layoutType?new eS(fq,Z.onDifferentLayoutIdEnteredTrigger.triggeringLayoutId,
Z.onDifferentLayoutIdEnteredTrigger.slotType,Z.onDifferentLayoutIdEnteredTrigger.layoutType,Z.id):new p("Not able to create CloseRequestedTrigger"):Z.liveStreamBreakStartedTrigger?Z.liveStreamBreakStartedTrigger&&Z.id?new op(fq,Z.id):new p("Not able to create LiveStreamBreakStartedTrigger"):Z.liveStreamBreakEndedTrigger?Z.liveStreamBreakEndedTrigger&&Z.id?new Jf(fq,Z.id):new p("Not able to create LiveStreamBreakEndedTrigger"):Z.liveStreamBreakScheduledDurationMatchedTrigger?Z.liveStreamBreakScheduledDurationMatchedTrigger?.breakDurationMs?
new zk(Number(Z.liveStreamBreakScheduledDurationMatchedTrigger.breakDurationMs||"0")||0,Z.id):new p("Not able to create LiveStreamBreakScheduledDurationMatchedTrigger"):Z.liveStreamBreakScheduledDurationNotMatchedTrigger?Z.liveStreamBreakScheduledDurationNotMatchedTrigger?.breakDurationMs?new UO(Number(Z.liveStreamBreakScheduledDurationNotMatchedTrigger.breakDurationMs||"0")||0,Z.id):new p("Not able to create LiveStreamBreakScheduledDurationNotMatchedTrigger"):Z.newSlotScheduledWithBreakDurationTrigger?
Z.newSlotScheduledWithBreakDurationTrigger?.breakDurationMs?new bb(Number(Z.newSlotScheduledWithBreakDurationTrigger.breakDurationMs||"0")||0,Z.id):new p("Not able to create NewSlotScheduledWithBreakDurationTrigger"):Z.prefetchCacheExpiredTrigger?new pq(fq,Z.id):new p("Not able to convert an AdsControlflowTrigger.");return Z};
M8=function(Z,k){k.V>=2&&(Z.slot_pos=k.adPodIndex);Z.autoplay="1"};
p8r=function(Z,k,N,a,T,K,y,Q){return k===null?new p("Invalid slot type when get discovery companion fromActionCompanionAdRenderer",{slotType:k,ActionCompanionAdRenderer:a}):[U2R(Z,k,y,K,q=>{var r=q.slotId;q=Q(q);var C=a.adLayoutLoggingData;const m=new SB([new bby(a),new nq(T)]);r=HM(N.U.get(),"LAYOUT_TYPE_COMPANION_WITH_ACTION_BUTTON",r);const A={layoutId:r,layoutType:"LAYOUT_TYPE_COMPANION_WITH_ACTION_BUTTON",mp:"core"};return{layoutId:r,layoutType:"LAYOUT_TYPE_COMPANION_WITH_ACTION_BUTTON",d5:new Map,
layoutExitNormalTriggers:[new hf(N.V,y)],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],mp:"core",clientMetadata:m,KF:q(A),adLayoutLoggingData:C}})]};
MDf=function(Z,k,N,a,T,K,y,Q){return k===null?new p("Invalid slot type when get discovery companion fromTopBannerImageTextIconButtonedLayoutViewModel",{slotType:k,TopBannerImageTextIconButtonedLayoutViewModel:a}):[U2R(Z,k,y,K,q=>{var r=q.slotId;q=Q(q);var C=a.adLayoutLoggingData;const m=new SB([new RZ0(a),new nq(T)]);r=HM(N.U.get(),"LAYOUT_TYPE_COMPANION_WITH_ACTION_BUTTON",r);const A={layoutId:r,layoutType:"LAYOUT_TYPE_COMPANION_WITH_ACTION_BUTTON",mp:"core"};return{layoutId:r,layoutType:"LAYOUT_TYPE_COMPANION_WITH_ACTION_BUTTON",
d5:new Map,layoutExitNormalTriggers:[new hf(N.V,y)],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],mp:"core",clientMetadata:m,KF:q(A),adLayoutLoggingData:C}})]};
E6y=function(Z,k,N,a,T,K){if(!K)for(const y of k)Ip(Z,y.renderer,y.config.adPlacementConfig.kind);Z=Array.from(Z.values()).filter(y=>n60(y));
k=[];for(const y of Z)for(const Q of y.xI)K=q=>Q.Te(q,y.instreamVideoAdRenderer.elementId,Q.o_),Q.isContentVideoCompanion?k.push(IA0(N,a,T,y.instreamVideoAdRenderer.elementId,Q.associatedCompositePlayerBytesLayoutId,Q.adSlotLoggingData,K)):Z.length>1?k.push(jiN(N,a,T,y.instreamVideoAdRenderer.elementId,Q.adSlotLoggingData,q=>Q.Te(q,y.instreamVideoAdRenderer.elementId,Q.o_,Q.associatedCompositePlayerBytesLayoutId))):k.push(jiN(N,a,T,y.instreamVideoAdRenderer.elementId,Q.adSlotLoggingData,K));
return k};
Ip=function(Z,k,N){if(k=WmG(k))for(const a of k)a&&a.externalVideoId?(k=jS(Z,a.externalVideoId),k.instreamVideoAdRenderer||(k.instreamVideoAdRenderer=a,k.M$=N)):wm("InstreamVideoAdRenderer without externalVideoId")};
WmG=function(Z){const k=[],N=Z.sandwichedLinearAdRenderer&&Z.sandwichedLinearAdRenderer.linearAd&&g.J(Z.sandwichedLinearAdRenderer.linearAd,FP);if(N)return k.push(N),k;if(Z.instreamVideoAdRenderer)return k.push(Z.instreamVideoAdRenderer),k;if(Z.linearAdSequenceRenderer&&Z.linearAdSequenceRenderer.linearAds){for(const a of Z.linearAdSequenceRenderer.linearAds)g.J(a,FP)&&k.push(g.J(a,FP));return k}return null};
n60=function(Z){if(Z.instreamVideoAdRenderer===void 0)return wm("AdPlacementSupportedRenderers without matching InstreamVideoAdRenderer"),!1;for(const k of Z.xI){if(k.Te===void 0)return!1;if(k.o_===void 0)return wm("AdPlacementConfig for AdPlacementSupportedRenderers that matches an InstreamVideoAdRenderer is undefined"),!1;if(Z.M$===void 0||k.JR===void 0||Z.M$!==k.JR&&k.JR!=="AD_PLACEMENT_KIND_SELF_START")return!1;if(Z.instreamVideoAdRenderer.elementId===void 0)return wm("InstreamVideoAdRenderer has no elementId",
void 0,void 0,{kind:Z.M$,"matching APSR kind":k.JR}),!1}return!0};
jS=function(Z,k){Z.has(k)||Z.set(k,{instreamVideoAdRenderer:void 0,M$:void 0,adVideoId:k,xI:[]});return Z.get(k)};
EO=function(Z,k,N,a,T,K,y,Q,q){T?jS(Z,T).xI.push({NDp:k,JR:N,isContentVideoCompanion:a,o_:y,associatedCompositePlayerBytesLayoutId:K,adSlotLoggingData:Q,Te:q}):wm("Companion AdPlacementSupportedRenderer without adVideoId")};
WU=function(Z){let k=0;for(const N of Z.questions)(Z=g.J(N,cU)||g.J(N,HU))&&(k+=Z.surveyAdQuestionCommon?.durationMilliseconds||0);return k};
Y8=function(Z){var k=g.J(Z.questions?.[0],cU)?.surveyAdQuestionCommon||g.J(Z.questions?.[0],HU)?.surveyAdQuestionCommon;k=[...(Z.playbackCommands?.instreamAdCompleteCommands||[]),...(k?.timeoutCommands||[])];return{impressionCommands:Z.playbackCommands?.impressionCommands,errorCommands:Z.playbackCommands?.errorCommands,muteCommands:Z.playbackCommands?.muteCommands,unmuteCommands:Z.playbackCommands?.unmuteCommands,pauseCommands:Z.playbackCommands?.pauseCommands,rewindCommands:Z.playbackCommands?.rewindCommands,
resumeCommands:Z.playbackCommands?.resumeCommands,skipCommands:Z.playbackCommands?.skipCommands,progressCommands:Z.playbackCommands?.progressCommands,Vlm:Z.playbackCommands?.clickthroughCommands,fullscreenCommands:Z.playbackCommands?.fullscreenCommands,activeViewViewableCommands:Z.playbackCommands?.activeViewViewableCommands,activeViewMeasurableCommands:Z.playbackCommands?.activeViewMeasurableCommands,activeViewFullyViewableAudibleHalfDurationCommands:Z.playbackCommands?.activeViewFullyViewableAudibleHalfDurationCommands,
activeViewAudioAudibleCommands:Z.playbackCommands?.activeViewTracking?.activeViewAudioAudibleCommands,activeViewAudioMeasurableCommands:Z.playbackCommands?.activeViewTracking?.activeViewAudioMeasurableCommands,endFullscreenCommands:Z.playbackCommands?.endFullscreenCommands,abandonCommands:Z.playbackCommands?.abandonCommands,completeCommands:k}};
k4b=function(Z,k,N,a,T,K,y){return(Q,q)=>Ybb(Z,q.slotId,Q,K,(r,C)=>{var m=q.layoutId;r=y(r);return Z4(k,m,C,T,r,"LAYOUT_TYPE_SURVEY",[new ZEj(N),a],N.adLayoutLoggingData)})};
Kpy=function(Z,k,N,a,T,K,y){if(!N$r(Z))return new p("Invalid InstreamVideoAdRenderer for SlidingText.",{instreamVideoAdRenderer:Z});const Q=Z.additionalPlayerOverlay.slidingTextPlayerOverlayRenderer;return[amX(K,k,N,a,q=>{var r=q.slotId;q=y(q);r=HM(T.U.get(),"LAYOUT_TYPE_SLIDING_TEXT_PLAYER_OVERLAY",r);const C={layoutId:r,layoutType:"LAYOUT_TYPE_SLIDING_TEXT_PLAYER_OVERLAY",mp:"core"},m=new BU(T.V,a);return{layoutId:r,layoutType:"LAYOUT_TYPE_SLIDING_TEXT_PLAYER_OVERLAY",d5:new Map,layoutExitNormalTriggers:[m],
layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],mp:"core",clientMetadata:new SB([new T$f(Q)]),KF:q(C)}})]};
N$r=function(Z){Z=g.J(Z?.additionalPlayerOverlay,y5i);if(!Z)return!1;const k=Z.slidingMessages;return Z.title&&k&&k.length!==0?!0:!1};
CRy=function(Z,k,N,a,T){if(!Z.playerOverlay?.instreamSurveyAdRenderer)return()=>[];
if(!fAi(Z))return()=>new p("Received invalid InstreamVideoAdRenderer for DAI survey.",{instreamVideoAdRenderer:Z});
const K=Z.playerOverlay.instreamSurveyAdRenderer,y=WU(K);return y<=0?()=>new p("InstreamSurveyAdRenderer should have valid duration.",{instreamSurveyAdRenderer:K}):(Q,q)=>{const r=Q6G(Q,N,a,C=>{var m=C.slotId;
C=q(C);var A=Y8(K);m=HM(T.U.get(),"LAYOUT_TYPE_SURVEY",m);const P={layoutId:m,layoutType:"LAYOUT_TYPE_SURVEY",mp:"core"},d=new BU(T.V,a),h=new vU(T.V,m),B=new gE(T.V,m),v=new qvy(T.V);return{layoutId:m,layoutType:"LAYOUT_TYPE_SURVEY",d5:new Map,layoutExitNormalTriggers:[d,v],layoutExitSkipTriggers:[h],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[B],layoutExitUserCancelledTriggers:[],mp:"core",clientMetadata:new SB([new r5f(K),new nq(k),new kG(y/1E3),new N0(A)]),KF:C(P),adLayoutLoggingData:K.adLayoutLoggingData}});
Q=Kpy(Z,N,r.slotId,a,T,Q,q);return Q instanceof p?Q:[r,...Q]}};
dSi=function(Z,k,N,a,T,K,y){const Q=[];try{let q,r=[];if(N.renderer.linearAdSequenceRenderer)q=m=>{m=mSR(m.slotId,N,k,T(m),a,K);r=m.I$;return m.Np};
else if(N.renderer.instreamVideoAdRenderer)q=m=>{var A=m.slotId;m=T(m);const P=N.config.adPlacementConfig,{x0:d,LM:h}=s6b(P);var B=N.renderer.instreamVideoAdRenderer;if(B?.playerOverlay?.instreamSurveyAdRenderer)throw new TypeError("Survey overlay should not be set on single video.");var v=au(B);const O=Math.min(d+v.videoLengthSeconds*1E3,h),x=new TV(0,[v.videoLengthSeconds]);var e=v.videoLengthSeconds,Ki=v.playerVars,yf=v.instreamAdPlayerOverlayRenderer,Jy=v.playerOverlayLayoutRenderer,hy=v.adVideoId,
zf=A5f(N),MR=v.d5;v=v.Ol;var OD=B?.adLayoutLoggingData;B=B?.sodarExtensionData;A=HM(k.U.get(),"LAYOUT_TYPE_MEDIA",A);const Ur={layoutId:A,layoutType:"LAYOUT_TYPE_MEDIA",mp:"core"};return{layoutId:A,layoutType:"LAYOUT_TYPE_MEDIA",d5:MR,layoutExitNormalTriggers:[new Jf(k.V)],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],mp:"core",clientMetadata:new SB([new Kd(a),new yi(e),new Qi(Ki),new q0(d),new rc(O),yf&&new Cd(yf),Jy&&
new m0(Jy),new nq(P),new sq(hy),new AC(x),new Pd(zf),B&&new cd(B),new Hd({current:null}),new dc,new Xb(v)].filter(PRf)),KF:m(Ur),adLayoutLoggingData:OD}};
else throw new TypeError("Expected valid AdPlacementRenderer for DAI");const C=c5y(Z,a,N.adSlotLoggingData,q,y);Q.push(C);for(const m of r){const A=m(Z,T);if(A instanceof p)return A;Q.push(...A)}}catch(q){return new p(q,{errorMessage:q.message,AdPlacementRenderer:N,numberOfSurveyRenderers:HEf(N)})}return Q};
HEf=function(Z){({linearAds:Z}=Z.renderer.linearAdSequenceRenderer||{});return Z?.length?Z.filter(k=>g.J(k,FP)?.playerOverlay?.instreamSurveyAdRenderer!=null).length:0};
mSR=function(Z,k,N,a,T,K){const y=k.config.adPlacementConfig,{x0:Q,LM:q}=s6b(y);var {linearAds:r}=k.renderer.linearAdSequenceRenderer||{};if(!r?.length)throw new TypeError("Expected linear ads");const C=[],m={WJ:Q,nZ:0,Xk:C};r=r.map(P=>Xef(Z,P,m,N,a,y,T,q)).map((P,d)=>{d=new TV(d,C);
return P(d)});
const A=r.map(P=>P.hP);
return{Np:Lpf(N,Z,Q,A,y,A5f(k),a,q,K),I$:r.map(P=>P.mz)}};
Xef=function(Z,k,N,a,T,K,y,Q){const q=au(g.J(k,FP)),r=N.WJ,C=N.nZ,m=Math.min(r+q.videoLengthSeconds*1E3,Q);N.WJ=m;N.nZ++;N.Xk.push(q.videoLengthSeconds);const A=g.J(k,FP)?.playerOverlay?.instreamSurveyAdRenderer;if(q.adVideoId==="nPpU29QrbiU"&&A==null)throw new TypeError("Survey slate media has no survey overlay");return P=>{M8(q.playerVars,P);var d=q.videoLengthSeconds,h=q.playerVars,B=q.d5,v=q.Ol,O=q.instreamAdPlayerOverlayRenderer,x=q.playerOverlayLayoutRenderer,e=q.adVideoId,Ki=g.J(k,FP)?.adLayoutLoggingData,
yf=g.J(k,FP)?.sodarExtensionData;const Jy=HM(a.U.get(),"LAYOUT_TYPE_MEDIA",Z),hy={layoutId:Jy,layoutType:"LAYOUT_TYPE_MEDIA",mp:"adapter"};P={layoutId:Jy,layoutType:"LAYOUT_TYPE_MEDIA",d5:B,layoutExitNormalTriggers:[],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],mp:"adapter",clientMetadata:new SB([new Kd(y),new yi(d),new Qi(h),new q0(r),new rc(m),new Ld(C),new Hd({current:null}),O&&new Cd(O),x&&new m0(x),new nq(K),new sq(e),
new AC(P),yf&&new cd(yf),A&&new VrG(A),new dc,new Xb(v)].filter(PRf)),KF:T(hy),adLayoutLoggingData:Ki};d=CRy(g.J(k,FP),K,y,P.layoutId,a);return{hP:P,mz:d}}};
au=function(Z){if(!Z)throw new TypeError("Expected instream video ad renderer");if(!Z.playerVars)throw new TypeError("Expected player vars in url encoded string");const k=q2(Z.playerVars);var N=Number(k.length_seconds);if(isNaN(N))throw new TypeError("Expected valid length seconds in player vars");var a=Number(Z.trimmedMaxNonSkippableAdDurationMs);N=isNaN(a)?N:Math.min(N,a/1E3);({instreamAdPlayerOverlayRenderer:a=null}=Z.playerOverlay||{});const {playerOverlayLayoutRenderer:T=null}=Z.playerOverlay||
{};var K=k.video_id;K||(K=(K=Z.externalVideoId)?K:void 0);if(!K)throw new TypeError("Expected valid video id in IVAR");return{playerVars:k,videoLengthSeconds:N,instreamAdPlayerOverlayRenderer:a,playerOverlayLayoutRenderer:T,adVideoId:K,d5:Z.pings?Gq(Z.pings):new Map,Ol:xB(Z.pings)}};
A5f=function(Z){Z=Number(Z.driftRecoveryMs);return isNaN(Z)||Z<=0?null:Z};
s6b=function(Z){const {offsetStartMilliseconds:k,offsetEndMilliseconds:N}=Z.adTimeOffset||{};Z=Number(k);if(isNaN(Z))throw new TypeError("Expected valid start offset");const a=Number(N);if(isNaN(a))throw new TypeError("Expected valid end offset");return{x0:Z,LM:a}};
Fp0=function(Z){const k=Z.clientMetadata.PD("metadata_type_player_bytes_callback_ref")?.current;if(!k)return null;const N=Z.clientMetadata.PD("metadata_type_ad_pod_skip_target_callback_ref");var a=Z.layoutId,T=Z.clientMetadata.PD("metadata_type_content_cpn"),K=Z.clientMetadata.PD("metadata_type_instream_ad_player_overlay_renderer"),y=Z.clientMetadata.PD("metadata_type_player_underlay_renderer"),Q=Z.clientMetadata.PD("metadata_type_ad_placement_config"),q=Z.clientMetadata.PD("metadata_type_video_length_seconds");
var r=Op(Z.clientMetadata,"metadata_type_layout_enter_ms")&&Op(Z.clientMetadata,"metadata_type_layout_exit_ms")?(Z.clientMetadata.PD("metadata_type_layout_exit_ms")-Z.clientMetadata.PD("metadata_type_layout_enter_ms"))/1E3:void 0;return{OR:a,contentCpn:T,HS:k,Ds:N,instreamAdPlayerOverlayRenderer:K,instreamAdPlayerUnderlayRenderer:y,adPlacementConfig:Q,videoLengthSeconds:q,A2:r,inPlayerLayoutId:Z.clientMetadata.PD("metadata_type_linked_in_player_layout_id"),inPlayerSlotId:Z.clientMetadata.PD("metadata_type_linked_in_player_slot_id")}};
lmN=function(Z,k,N,a,T,K,y,Q,q,r,C,m,A,P,d){a=BM(a,"SLOT_TYPE_PLAYER_BYTES");Z=hHG(T,Z,y,N,a,q,r);if(Z instanceof p)return Z;r=Z.clientMetadata.PD("metadata_type_fulfilled_layout")?.layoutId;if(!r)return new p("Invalid adNotify layout");k=unN(r,T,K,N,Q,k,q,C,m,A,P,d,y);return k instanceof p?k:[Z,...k]};
unN=function(Z,k,N,a,T,K,y,Q,q,r,C,m,A){N=fmf(k,N,a,K,y,Q,q,r,C,m,A);if(N instanceof p)return N;Z=B$f(k,Z,y,T,N);return Z instanceof p?Z:[...Z.Ze,Z.VK]};
OEX=function(Z,k,N,a,T,K,y,Q,q,r,C,m,A,P){k=fmf(Z,k,N,T,K,Q,q,r,C,m,A,P);if(k instanceof p)return k;Z=DSR(Z,N,K,y,a,Q.Rn,k);return Z instanceof p?Z:Z.Ze.concat(Z.VK)};
fmf=function(Z,k,N,a,T,K,y,Q,q,r,C,m){const A=Vi(a);return A instanceof ND?new p(A):r.S.X().experiments.yz("html5_refactor_in_player_slot_generation")?P=>{var d=new TV(0,[A.Ah]);P=vqi(k,A.layoutId,A.K5,N,Fb(A.playerVars,A.tS,K,q,d),A.Ah,T,d,y(P),Q.get(A.K5.externalVideoId),m);d=[];if(A.K5.playerOverlay.instreamAdPlayerOverlayRenderer){const h=Fp0(P);if(!h)return wm("Expected MediaLayout to carry valid data to create InPlayerSlot and PlayerOverlayForMediaLayout",void 0,P),{layout:P,Ze:[]};d=[iEy(Z,
h.contentCpn,h.OR,B=>tC(k,B.slotId,"core",h,GT(C,B)),h.inPlayerSlotId),
...d];if(h.instreamAdPlayerUnderlayRenderer&&hC(r)){const B=h.instreamAdPlayerUnderlayRenderer;d=[gqy(Z,h.contentCpn,h.OR,v=>weN(k,v.slotId,B,h.adPlacementConfig,h.OR,GT(C,v))),
...d]}}return{layout:P,Ze:d}}:P=>{const d=new TV(0,[A.Ah]);
return{layout:vqi(k,A.layoutId,A.K5,N,Fb(A.playerVars,A.tS,K,q,d),A.Ah,T,d,y(P),Q.get(A.K5.externalVideoId),m),Ze:[]}}};
Vi=function(Z){if(!Z.playerVars)return new ND("No playerVars available in InstreamVideoAdRenderer.");if(Z.elementId==null||Z.playerVars==null||Z.playerOverlay==null||Z.playerOverlay?.instreamAdPlayerOverlayRenderer==null&&Z.playerOverlay?.playerOverlayLayoutRenderer==null||Z.pings==null||Z.externalVideoId==null)return new ND("Received invalid VOD InstreamVideoAdRenderer",{instreamVideoAdRenderer:Z});const k=q2(Z.playerVars);let N=Number(k.length_seconds);isNaN(N)&&(N=0,wm("Expected valid length seconds in player vars but got NaN"));
return{layoutId:Z.elementId,K5:Z,playerVars:k,tS:Z.playerVars,Ah:N}};
Fb=function(Z,k,N,a,T){Z.iv_load_policy=a;k=q2(k);if(k.cta_conversion_urls)try{Z.cta_conversion_urls=JSON.parse(k.cta_conversion_urls)}catch(K){wm(K)}N.fX&&(Z.ctrl=N.fX);N.sx&&(Z.ytr=N.sx);N.lL&&(Z.ytrcc=N.lL);N.isMdxPlayback&&(Z.mdx="1");Z.vvt&&(Z.vss_credentials_token=Z.vvt,N.ZT&&(Z.vss_credentials_token_type=N.ZT),N.mdxEnvironment&&(Z.mdx_environment=N.mdxEnvironment));M8(Z,T);return Z};
$Sy=function(Z){const k=new Map;for(const N of Z)(Z=N.renderer.remoteSlotsRenderer)&&Z.hostElementId&&k.set(Z.hostElementId,Z);return k};
u2=function(Z){return Z.adSlotMetadata.slotType==="SLOT_TYPE_PLAYER_BYTES"};
xSN=function(Z){return Z!=null};
peN=function(Z,k,N,a,T,K,y,Q,q,r,C,m,A,P,d){const h=[];for(const e of Z){if(d20(e))continue;if(e?.adSlotMetadata?.slotType==="SLOT_TYPE_IN_PLAYER")continue;var B=G4G(e,a,N.td);if(B instanceof p)return B;var v={slotId:e.adSlotMetadata.slotId,slotType:e.adSlotMetadata.slotType,slotPhysicalPosition:e.adSlotMetadata.slotPhysicalPosition??1,mp:"core",slotEntryTrigger:B.slotEntryTrigger,slotFulfillmentTriggers:B.slotFulfillmentTriggers,slotExpirationTriggers:B.slotExpirationTriggers},O=g.J(e.fulfillmentContent.fulfilledLayout,
yy);if(O){if(!Kq(O))return new p("Invalid PlayerBytesAdLayoutRenderer");var x=m&&!(u2(e)&&e.slotEntryTrigger.beforeContentVideoIdStartedTrigger);B=B.slotFulfillmentTriggers.some(Ki=>Ki instanceof zk);
O=x?Svy(v,e.adSlotMetadata.triggerEvent,O,N,a,K,Z,A,B,q,P):eH0(v,e.adSlotMetadata.triggerEvent,O,k,N,a,T,K,y,Q,q,r,Z,C,e.adSlotMetadata.triggeringSourceLayoutId);if(O instanceof p)return O;B=[];d?B.push(new l2({current:d})):B.push(new l2({current:null}));u2(e)&&B.push(new fd({T3:u2(e)&&!!e.slotEntryTrigger.beforeContentVideoIdStartedTrigger}));x&&B.push(new dc);N.Rn&&B.push(new oqj({}));v={...v,clientMetadata:new SB(B),fulfilledLayout:O.layout,adSlotLoggingData:e.adSlotMetadata.adSlotLoggingData};
h.push(...O.Ze);h.push(v);continue}if(x=g.J(e.fulfillmentContent.fulfilledLayout,sO)){if(!HbG(x))return new p("Invalid PlayerUnderlayAdLayoutRenderer");x=J5f(x,a,N.td,K,v,e.adSlotMetadata.triggerEvent,e.adSlotMetadata.triggeringSourceLayoutId);if(x instanceof p)return x;v={...v,clientMetadata:new SB([]),fulfilledLayout:x,adSlotLoggingData:e.adSlotMetadata.adSlotLoggingData};h.push(v);continue}if(x=g.J(e.fulfillmentContent.fulfilledLayout,FmG)){if(!bZ(x.adLayoutMetadata)||!g.J(x.renderingContent,rE))return new p("Invalid InPlayerOrganicOverlayAdLayoutRenderer");
x=x.adLayoutMetadata.layoutType==="LAYOUT_TYPE_PLAYER_ORGANIC_BANNER_OVERLAY"?zHy(x,a,N.td,K,v):new p(`LayoutType [${x.adLayoutMetadata.layoutType}] is invalid for InPlayerOrganicOverlaySlot`);if(x instanceof p)return x;v={...v,clientMetadata:new SB([]),fulfilledLayout:x,adSlotLoggingData:e.adSlotMetadata.adSlotLoggingData};h.push(v);continue}if(x=g.J(e.fulfillmentContent.fulfilledLayout,LmU)){if(!rP0(x))return new p("Invalid AboveFeedAdLayoutRenderer");x=US0(x,a,N.td,K,v,e.adSlotMetadata.triggerEvent,
e.adSlotMetadata.triggeringSourceLayoutId);if(x instanceof p)return x;v={...v,clientMetadata:new SB([]),fulfilledLayout:x,adSlotLoggingData:e.adSlotMetadata.adSlotLoggingData};h.push(v);continue}if(x=g.J(e.fulfillmentContent.fulfilledLayout,VDU)){if(!bZ(x.adLayoutMetadata)||!g.J(x.renderingContent,pN))return new p("Invalid BelowPlayerAdLayoutRenderer");x=US0(x,a,N.td,K,v,e.adSlotMetadata.triggerEvent,e.adSlotMetadata.triggeringSourceLayoutId);if(x instanceof p)return x;v={...v,clientMetadata:new SB([]),
fulfilledLayout:x,adSlotLoggingData:e.adSlotMetadata.adSlotLoggingData};h.push(v);continue}if(x=g.J(e.fulfillmentContent.fulfilledLayout,Af)){if(!q8(x))return new p("Invalid PlayerBytesSequenceItemAdLayoutRenderer");x=bEj(x,a,N.td,K,v,e.adSlotMetadata.triggerEvent);if(x instanceof p)return x;v={...v,clientMetadata:new SB([]),fulfilledLayout:x,adSlotLoggingData:e.adSlotMetadata.adSlotLoggingData};h.push(v)}else return new p(`Unable to retrieve a client slot [${v.slotType}] from a given AdSlotRenderer`)}return h};
bEj=function(Z,k,N,a,T,K){const y={layoutId:Z.adLayoutMetadata.layoutId,layoutType:Z.adLayoutMetadata.layoutType,mp:"core"};k=Bd(Z,k,N);return k instanceof p?k:(N=g.J(Z.renderingContent,Qy))&&N.pings?{...y,renderingContent:Z.renderingContent,d5:Gq(N.pings),...k,KF:GT(a,T)(y),clientMetadata:new SB([new nq(D4(K)),new N0({progressCommands:N.progressCommands})]),adLayoutLoggingData:Z.adLayoutMetadata.adLayoutLoggingData}:new p("VideoAdTracking is missing from PlayerBytesSequenceItemAdLayoutRenderer")};
US0=function(Z,k,N,a,T,K,y){const Q={layoutId:Z.adLayoutMetadata.layoutId,layoutType:Z.adLayoutMetadata.layoutType,mp:"core"};k=Bd(Z,k,N);if(k instanceof p)return k;N=[];N.push(new nq(D4(K)));K==="SLOT_TRIGGER_EVENT_LAYOUT_ID_ENTERED"&&y!==void 0&&N.push(new Oq(y));return{...Q,renderingContent:Z.renderingContent,d5:new Map([["impression",g.J(Z.renderingContent,Mt)?g.J(Z.renderingContent,Mt)?.impressionPings||[]:g.J(Z.renderingContent,pN)?g.J(Z.renderingContent,pN)?.impressionPings||[]:g.J(Z.renderingContent,
Rx)?g.J(Z.renderingContent,Rx)?.impressionPings||[]:[]]]),...k,KF:GT(a,T)(Q),clientMetadata:new SB(N),adLayoutLoggingData:Z.adLayoutMetadata.adLayoutLoggingData}};
J5f=function(Z,k,N,a,T,K,y){if(Z.adLayoutMetadata.layoutType==="LAYOUT_TYPE_DISMISSABLE_PANEL_TEXT_PORTRAIT_IMAGE")a:{var Q=g.J(Z.renderingContent,Cq);const q=g.J(Z.renderingContent,rE);y=new Map;if(Q){y=g.J(Q.sidePanel,Pij);if(!y){Z=new p("DismissablePanelTextPortraitImageRenderer is missing");break a}y=new Map([["impression",y.impressionPings||[]],["resume",y.resumePings||[]]])}else if(!q){Z=new p("AdsEngagementPanelSectionListViewModel is missing");break a}Q={layoutId:Z.adLayoutMetadata.layoutId,
layoutType:Z.adLayoutMetadata.layoutType,mp:"core"};k=Bd(Z,k,N);Z=k instanceof p?k:{...Q,renderingContent:Z.renderingContent,d5:y,...k,KF:GT(a,T)(Q),clientMetadata:new SB([new nq(D4(K))]),adLayoutLoggingData:Z.adLayoutMetadata.adLayoutLoggingData}}else Z.adLayoutMetadata.layoutType==="LAYOUT_TYPE_DISPLAY_TRACKING"?g.J(Z.renderingContent,siX)?(y={layoutId:Z.adLayoutMetadata.layoutId,layoutType:Z.adLayoutMetadata.layoutType,mp:"core"},k=Bd(Z,k,N),Z=k instanceof p?k:{...y,renderingContent:Z.renderingContent,
d5:new Map,...k,KF:GT(a,T)(y),clientMetadata:new SB([new nq(D4(K))]),adLayoutLoggingData:Z.adLayoutMetadata.adLayoutLoggingData}):Z=new p("CounterfactualRenderer is missing"):Z.adLayoutMetadata.layoutType==="LAYOUT_TYPE_PANEL_QR_CODE"?Z=new p("PlayerUnderlaySlot cannot be created because adUxReadyApiProvider is null"):Z.adLayoutMetadata.layoutType==="LAYOUT_TYPE_PANEL_QR_CODE_CAROUSEL"?Z=new p("PlayerUnderlaySlot cannot be created because adUxReadyApiProvider is null"):Z.adLayoutMetadata.layoutType===
"LAYOUT_TYPE_DISPLAY_UNDERLAY_TEXT_GRID_CARDS"?g.J(Z.renderingContent,mv)?(K={layoutId:Z.adLayoutMetadata.layoutId,layoutType:Z.adLayoutMetadata.layoutType,mp:"core"},k=Bd(Z,k,N),Z=k instanceof p?k:y?{...K,renderingContent:Z.renderingContent,d5:new Map,...k,KF:GT(a,T)(K),clientMetadata:new SB([new Oq(y)]),adLayoutLoggingData:Z.adLayoutMetadata.adLayoutLoggingData}:new p("Not able to parse an SDF PlayerUnderlay layout because the triggeringMediaLayoutId in AdSlotMetadata is missing")):Z=new p("DisplayUnderlayTextGridCardsLayoutViewModel is missing"):
Z.adLayoutMetadata.layoutType==="LAYOUT_TYPE_VIDEO_AD_INFO"?g.J(Z.renderingContent,rE)?(K={layoutId:Z.adLayoutMetadata.layoutId,layoutType:Z.adLayoutMetadata.layoutType,mp:"core"},k=Bd(Z,k,N),Z=k instanceof p?k:{...K,renderingContent:Z.renderingContent,d5:new Map([]),...k,KF:GT(a,T)(K),adLayoutLoggingData:Z.adLayoutMetadata.adLayoutLoggingData,clientMetadata:new SB([])}):Z=new p("AdsEngagementPanelSectionListViewModel is missing"):(Z.adLayoutMetadata.layoutType==="LAYOUT_TYPE_PANEL_IMAGE_QR_CODE"?
Q=new p("PlayerUnderlaySlot cannot be created because adUxReadyApiProvider is null"):Q=new p(`LayoutType [${Z.adLayoutMetadata.layoutType}] is invalid for PlayerUnderlaySlot`),Z=Q);return Z};
zHy=function(Z,k,N,a,T){if(!g.J(Z.renderingContent,rE))return new p("AdsEngagementPanelSectionListViewModel is missing");const K={layoutId:Z.adLayoutMetadata.layoutId,layoutType:Z.adLayoutMetadata.layoutType,mp:"core"};k=Bd(Z,k,N);return k instanceof p?k:{...K,renderingContent:Z.renderingContent,d5:new Map([]),...k,KF:GT(a,T)(K),adLayoutLoggingData:Z.adLayoutMetadata.adLayoutLoggingData,clientMetadata:new SB([])}};
Svy=function(Z,k,N,a,T,K,y,Q,q,r,C){if(C?.FM===void 0||C?.SP===void 0)return new p("Cached ad break range from cue point is missing");var m=Bd(N,T,a.td);if(m instanceof p)return m;m={layoutExitMuteTriggers:[],layoutExitNormalTriggers:m.layoutExitNormalTriggers,layoutExitSkipTriggers:[],layoutExitUserCancelledTriggers:[],layoutExitUserInputSubmittedTriggers:[]};if(g.J(N.renderingContent,FP))return Z=RHy(Z,k,N,m,T,K,y,a.td,C.FM,C.SP,r),Z instanceof p?Z:Z.rV===void 0?new p("Expecting associatedInPlayerSlot for single DAI media layout"):
{layout:Z.layout,Ze:[Z.rV]};var A=g.J(N.renderingContent,ZN);if(A){if(!bZ(N.adLayoutMetadata))return new p("Invalid ad layout metadata");if(!k8(A))return new p("Invalid sequential layout");A=A.sequentialLayouts.map(P=>P.playerBytesAdLayoutRenderer);
Z=MrR(Z,k,N,m,A,T,a,K,y,Q,C.FM,C.SP,q,r);return Z instanceof p?Z:{layout:Z.Xr,Ze:Z.Ze}}return new p("Not able to convert a sequential layout")};
MrR=function(Z,k,N,a,T,K,y,Q,q,r,C,m,A,P){var d=nqU(T,C,m);if(d instanceof p)return d;const h=[],B=[];for(const hy of d){a:{var v=Z,O=T[hy.nZ],x=hy,e=k;d=K;var Ki=y,yf=Q,Jy=q;const zf=vd(O);if(zf instanceof p){d=zf;break a}const MR={layoutId:O.adLayoutMetadata.layoutId,layoutType:O.adLayoutMetadata.layoutType,mp:"adapter"};x=ImR(e,O,x,d,void 0,P);if(x instanceof p){d=x;break a}v={...MR,...i2,d5:zf,renderingContent:O.renderingContent,clientMetadata:new SB(x),KF:GT(yf,v)(MR),adLayoutLoggingData:O.adLayoutMetadata.adLayoutLoggingData};
d=(d=wc(Jy,v,d,Ki.td,yf,void 0,!0))?d instanceof p?d:{layout:v,rV:d}:new p("Expecting associatedInPlayerSlot")}if(d instanceof p)return d;h.push(d.layout);B.push(d.rV)}T={layoutId:N.adLayoutMetadata.layoutId,layoutType:N.adLayoutMetadata.layoutType,mp:"core"};k=[new Pd(Number(N.driftRecoveryMs)),new q0(C),new rc(m),new nq(D4(k)),new j6f(r),new dc];A&&k.push(new Eq0);return{Xr:{...T,...a,C5:h,d5:new Map,clientMetadata:new SB(k),KF:GT(Q,Z)(T)},Ze:B}};
RHy=function(Z,k,N,a,T,K,y,Q,q,r,C){if(!Kq(N))return new p("Invalid PlayerBytesAdLayoutRenderer");const m=vd(N);if(m instanceof p)return m;const A={layoutId:N.adLayoutMetadata.layoutId,layoutType:N.adLayoutMetadata.layoutType,mp:"core"};var P=g.J(N.renderingContent,FP);if(!P)return new p("Invalid rendering content for DAI media layout");P=au(P);q={ge:P,nZ:0,WJ:q,tY:Math.min(q+P.videoLengthSeconds*1E3,r),WF:new TV(0,[P.videoLengthSeconds])};k=ImR(k,N,q,T,Number(N.driftRecoveryMs)??void 0,C);if(k instanceof
p)return k;Z={...A,...a,d5:m,renderingContent:N.renderingContent,clientMetadata:new SB(k),KF:GT(K,Z)(A),adLayoutLoggingData:N.adLayoutMetadata.adLayoutLoggingData};return(T=wc(y,Z,T,Q,K,void 0,!0))?T instanceof p?T:{layout:Z,rV:T}:new p("Expecting associatedInPlayerSlot")};
eH0=function(Z,k,N,a,T,K,y,Q,q,r,C,m,A,P,d){const h=Bd(N,K,T.td);if(h instanceof p)return h;if(g.J(N.renderingContent,FP)){q=Wpf([N],T,q);if(q instanceof p)return q;if(q.length!==1)return new p("Only expected one media layout.");Z=Yvi(Z,k,N,h,q[0],void 0,"core",a,K,y,Q,r,A,P,T.td,void 0,d);return Z instanceof p?Z:{layout:Z.layout,Ze:Z.rV?[Z.rV]:[]}}var B=g.J(N.renderingContent,ZN);if(B){if(!bZ(N.adLayoutMetadata))return new p("Invalid ad layout metadata");if(!k8(B))return new p("Invalid sequential layout");
B=B.sequentialLayouts.map(v=>v.playerBytesAdLayoutRenderer);
Z=ZUX(Z,k,N.adLayoutMetadata,h,B,a,K,T,q,y,Q,r,C,m,A,P,d);return Z instanceof p?Z:{layout:Z.Xr,Ze:Z.Ze}}return new p("Not able to convert a sequential layout")};
ZUX=function(Z,k,N,a,T,K,y,Q,q,r,C,m,A,P,d,h,B){const v=new $G({current:null}),O=Wpf(T,Q,q);if(O instanceof p)return O;q=[];const x=[];var e=void 0;for(let zf=0;zf<T.length;zf++){var Ki=T[zf];if(g.J(Ki.renderingContent,FP)){e=xG(A)&&GV(A)?O[zf+1]:void 0;e=Yvi(Z,k,Ki,i2,O[zf],e,"adapter",K,y,r,C,m,d,h,Q.td,v,B);if(e instanceof p)return e;q.push(e.layout);e.rV&&x.push(e.rV);e=O[zf]}else if(g.J(Ki.renderingContent,N8)){a:{var yf=Z;var Jy=C;if(!Kq(Ki)){yf=new p("Invalid PlayerBytesAdLayoutRenderer");
break a}var hy=g.J(Ki.renderingContent,N8);if(!hy||hy.playerVars===void 0){yf=new p("Invalid ad intro renderer");break a}const MR={layoutId:Ki.adLayoutMetadata.layoutId,layoutType:Ki.adLayoutMetadata.layoutType,mp:"adapter"};hy=q2(hy.playerVars);hy.autoplay="1";yf={...MR,...i2,renderingContent:Ki.renderingContent,clientMetadata:new SB([new kbi,new nq({kind:"AD_PLACEMENT_KIND_START"}),new Hd({current:null}),new Qi(hy)]),d5:new Map,KF:GT(Jy,yf)(MR),adLayoutLoggingData:Ki.adLayoutMetadata.adLayoutLoggingData}}if(yf instanceof
p)return yf;q.push(yf)}else if(g.J(Ki.renderingContent,ET))if(h){yf=NOb(Z,Ki,C,D4(k),e);if(yf instanceof p)return yf;q.push(yf);yf=wc(d,yf,y,Q.td,C,v,!1);if(yf instanceof p)return yf;if(yf)x.push(yf);else return new p("Not able to retrieve InPlayer slot for endcap")}else{a:{for(const MR of K){yf=MR.renderer?.linearAdSequenceRenderer?.linearAds||[];for(const OD of yf)if((yf=g.J(OD,ET))&&yf.inPlayerSlotId!==void 0&&yf.inPlayerLayoutId!==void 0&&yf.associatedPlayerBytesLayoutId!==void 0&&yf.associatedPlayerBytesLayoutId===
Ki.adLayoutMetadata.layoutId){yf={DL:yf,adPlacementConfig:MR.config.adPlacementConfig};break a}}yf=new p("Not able to find associated InPlayer slot for endcap")}if(yf instanceof p)return yf;Ki=NOb(Z,Ki,C,yf.adPlacementConfig,e);if(Ki instanceof p)return Ki;q.push(Ki);yf=a_f(Ki.layoutId,P,y,yf,v,C);if(yf instanceof p)return yf;x.push(yf)}}k={layoutId:N.layoutId,layoutType:N.layoutType,mp:"core"};return{Xr:{...k,...a,C5:q,d5:new Map,clientMetadata:new SB([v]),KF:GT(C,Z)(k)},Ze:x}};
Yvi=function(Z,k,N,a,T,K,y,Q,q,r,C,m,A,P,d,h,B){if(!Kq(N))return new p("Invalid PlayerBytesAdLayoutRenderer");const v=vd(N);if(v instanceof p)return v;y={layoutId:N.adLayoutMetadata.layoutId,layoutType:N.adLayoutMetadata.layoutType,mp:y};a:{const Ki=N.adLayoutMetadata.layoutId,yf=g.J(N.renderingContent,FP);if(yf&&Y7(yf)){var O=[];if(P||yf.isSeekableWithNoAdElements)O.push(new nq(D4(k)));else{b:{k=Ki;for(e of Q){Q=WmG(e.renderer)||[];for(var x of Q)if(x.associatedPlayerBytesLayoutId===k){c:{if(!x.associatedPlayerBytesLayoutId){Q=
!1;break c}Q=x.playerOverlay;k=Q!==void 0&&Q.playerOverlayLayoutRenderer!==void 0&&Q.playerOverlayLayoutRenderer.inPlayerSlotId!==void 0&&Q.playerOverlayLayoutRenderer.inPlayerLayoutId!==void 0;Q=Q!==void 0&&Q.instreamAdPlayerOverlayRenderer!==void 0&&Q.instreamAdPlayerOverlayRenderer.inPlayerSlotId!==void 0&&Q.instreamAdPlayerOverlayRenderer.inPlayerLayoutId!==void 0||k}var e=Q?{instreamVideoAdRenderer:x,adPlacementConfig:e.config.adPlacementConfig}:new p("Invalid InPlayer shim");break b}}e=new p("Not able to find associated InPlayer slot")}if(e instanceof
p){K=e;break a}x=e.instreamVideoAdRenderer.playerOverlay.instreamAdPlayerOverlayRenderer;Q=e.instreamVideoAdRenderer.playerOverlay.playerOverlayLayoutRenderer;k=x?.inPlayerSlotId??Q?.inPlayerSlotId;const Jy=x?.inPlayerLayoutId??Q?.inPlayerLayoutId;if(k===void 0){K=new p("InPlayer shim slot id is undefined");break a}if(Jy===void 0){K=new p("InPlayer shim layout id is undefined");break a}O.push(new SQ(Jy),new TOr(k),new Ld(T.WF.adPodIndex),new nq(e.adPlacementConfig));x&&O.push(new Cd(x));Q&&O.push(new m0(Q))}O.push(new AC(T.WF),
new sq(yf.externalVideoId),new Kd(q),new N0({impressionCommands:yf.impressionCommands,abandonCommands:yf.onAbandonCommands,completeCommands:yf.completeCommands,progressCommands:yf.adVideoProgressCommands}),new Qi(T.gz),new Hd({current:null}),new yi(T.aH.Ah),new Xb(xB(yf.pings)),new eQ(T.WF.adPodIndex));B&&O.push(new Oq(B));(T=KBU(Ki,A))&&O.push(new y00(T));K&&O.push(new QYU(K.gz));yf.adNextParams&&O.push(new ou(yf.adNextParams));yf.clickthroughEndpoint&&O.push(new JC(yf.clickthroughEndpoint));yf.legacyInfoCardVastExtension&&
O.push(new qif(yf.legacyInfoCardVastExtension));yf.sodarExtensionData&&O.push(new cd(yf.sodarExtensionData));h&&yf.adPodSkipTarget&&yf.adPodSkipTarget>0&&(O.push(h),O.push(new zV(yf.adPodSkipTarget)));(K=r.get(yf.externalVideoId))&&O.push(new Uq(K));K=O}else K=new p("Invalid vod media renderer")}if(K instanceof p)return K;Z={...y,...a,d5:v,renderingContent:N.renderingContent,clientMetadata:new SB(K),KF:GT(C,Z)(y),adLayoutLoggingData:N.adLayoutMetadata.adLayoutLoggingData};N=g.J(N.renderingContent,
FP);if(!N||!Y7(N))return new p("Invalid meida renderer");m=jS(m,N.externalVideoId);m.instreamVideoAdRenderer=N;m.M$="AD_PLACEMENT_KIND_START";return P?(q=wc(A,Z,q,d,C,h,!1),q instanceof p?q:KBU(Z.layoutId,A)&&q?{layout:{...Z,clientMetadata:new SB(K.concat(new r0b(q)))}}:{layout:Z,rV:q}):{layout:Z}};
NOb=function(Z,k,N,a,T){if(!Kq(k))return new p("Invalid PlayerBytesAdLayoutRenderer");const K=g.J(k.renderingContent,ET);if(!K||K.durationMilliseconds===void 0)return new p("Invalid endcap renderer");const y={layoutId:k.adLayoutMetadata.layoutId,layoutType:k.adLayoutMetadata.layoutType,mp:"adapter"};a=[new b2(K.durationMilliseconds),new N0({impressionCommands:void 0,abandonCommands:K.abandonCommands?[{commandExecutorCommand:K.abandonCommands}]:void 0,completeCommands:K.completionCommands}),new nq(a),
new pd("LAYOUT_TYPE_ENDCAP")];T&&(a.push(new eQ(T.WF.adPodIndex-1)),a.push(new Ld(T.WF.adPodIndex)),a.push(new zV(T.adPodSkipTarget??-1)));return{...y,...i2,renderingContent:k.renderingContent,clientMetadata:new SB(a),d5:K.skipPings?new Map([["skip",K.skipPings]]):new Map,KF:GT(N,Z)(y),adLayoutLoggingData:k.adLayoutMetadata.adLayoutLoggingData}};
wc=function(Z,k,N,a,T,K,y){Z=Z.filter(m=>m.adSlotMetadata.slotType==="SLOT_TYPE_IN_PLAYER"&&m.adSlotMetadata.triggeringSourceLayoutId===k.layoutId);
if(Z.length!==0){if(Z.length!==1)return new p("Invalid InPlayer slot association for the given PlayerBytes layout");var Q=Z[0];Z=G4G(Q,N,a);if(Z instanceof p)return Z;Z={slotId:Q.adSlotMetadata.slotId,slotType:Q.adSlotMetadata.slotType,slotPhysicalPosition:Q.adSlotMetadata.slotPhysicalPosition??1,mp:"core",slotEntryTrigger:Z.slotEntryTrigger,slotFulfillmentTriggers:Z.slotFulfillmentTriggers,slotExpirationTriggers:Z.slotExpirationTriggers};var q=g.J(Q.fulfillmentContent.fulfilledLayout,X8b);if(!q||
!m2R(q))return new p("Invalid InPlayerAdLayoutRenderer");var r={layoutId:q.adLayoutMetadata.layoutId,layoutType:q.adLayoutMetadata.layoutType,mp:"core"};N=Bd(q,N,a);if(N instanceof p)return N;a=[];var C=q.adLayoutMetadata.layoutType;y&&a.push(new dc);if(C==="LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY")a.push(...CFy(Q.adSlotMetadata.triggerEvent,k)),(K=maN(N,k.layoutId))&&a.push(new sYN(K));else if(C==="LAYOUT_TYPE_ENDCAP"||C==="LAYOUT_TYPE_VIDEO_INTERSTITIAL_CENTERED"){a.push(new nq(D4(Q.adSlotMetadata.triggerEvent)));
if(C==="LAYOUT_TYPE_VIDEO_INTERSTITIAL_CENTERED")return new p("Cannot parse endcap layout since AdUxReadyApi is not provided");K&&a.push(K)}else return new p("Not able to parse an SDF InPlayer layout");T={...r,...N,renderingContent:q.renderingContent,d5:new Map,KF:GT(T,Z)(r),clientMetadata:new SB(a),adLayoutLoggingData:q.adLayoutMetadata.adLayoutLoggingData};return{...Z,fulfilledLayout:T,clientMetadata:new SB([])}}};
CFy=function(Z,k){const N=[];N.push(new nq(D4(Z)));N.push(new Oq(k.layoutId));(Z=k.clientMetadata.PD("metadata_type_player_bytes_callback_ref"))&&N.push(new Hd(Z));(Z=k.clientMetadata.PD("metadata_type_ad_pod_skip_target_callback_ref"))&&N.push(new $G(Z));(Z=k.clientMetadata.PD("metadata_type_remote_slots_data"))&&N.push(new Uq(Z));(Z=k.clientMetadata.PD("metadata_type_ad_next_params"))&&N.push(new ou(Z));(Z=k.clientMetadata.PD("metadata_type_ad_video_clickthrough_endpoint"))&&N.push(new JC(Z));(Z=
k.clientMetadata.PD("metadata_type_ad_pod_info"))&&N.push(new AC(Z));(k=k.clientMetadata.PD("metadata_type_ad_video_id"))&&N.push(new sq(k));return N};
a_f=function(Z,k,N,a,T,K){const y=a.DL.inPlayerSlotId,Q=r=>Ru(k,r),q={layoutId:a.DL.inPlayerLayoutId,
layoutType:"LAYOUT_TYPE_ENDCAP",mp:"core"};N={slotId:y,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,mp:"core",slotEntryTrigger:new Gk(Q,Z),slotFulfillmentTriggers:[new ib(Q,y)],slotExpirationTriggers:[new ub(Q,y),new hf(Q,N)]};Z={...q,layoutExitNormalTriggers:[new BU(Q,Z)],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],d5:new Map,clientMetadata:new SB([new A0f(a.DL),new nq(a.adPlacementConfig),T]),KF:GT(K,N)(q),
adLayoutLoggingData:a.DL.adLayoutLoggingData};return{...N,clientMetadata:new SB([new M0(Z)])}};
var PF0=function(){return UP[c[2]](this,6,3198)};
var KBU=function(Z,k){for(const N of k)if(N.adSlotMetadata.slotType==="SLOT_TYPE_PLAYER_UNDERLAY"){k=g.J(N.fulfillmentContent.fulfilledLayout,sO);if(!k)continue;if((k=g.J(k.renderingContent,Cq))&&k.associatedPlayerBytesLayoutId===Z)return N}},G4G=function(Z,k,N){const a=Rp(Z.slotEntryTrigger,k,N);
if(a instanceof p)return a;const T=[];for(var K of Z.slotFulfillmentTriggers){const y=Rp(K,k,N);if(y instanceof p)return y;T.push(y)}K=[];for(const y of Z.slotExpirationTriggers){Z=Rp(y,k,N);if(Z instanceof p)return Z;K.push(Z)}return{slotEntryTrigger:a,slotFulfillmentTriggers:T,slotExpirationTriggers:K}};
var c0f=function(){return UP[c[2]](this,2,5254)};
var Bd=function(Z,k,N){const a=[];for(var T of Z.layoutExitNormalTriggers||[]){var K=Rp(T,k,N);if(K instanceof p)return K;a.push(K)}T=[];for(var y of Z.layoutExitSkipTriggers||[]){K=Rp(y,k,N);if(K instanceof p)return K;T.push(K)}y=[];for(var Q of Z.layoutExitMuteTriggers||[]){K=Rp(Q,k,N);if(K instanceof p)return K;y.push(K)}Q=[];for(const q of Z.layoutExitUserInputSubmittedTriggers||[]){Z=Rp(q,k,N);if(Z instanceof p)return Z;Q.push(Z)}return{layoutExitNormalTriggers:a,layoutExitSkipTriggers:T,layoutExitMuteTriggers:y,
layoutExitUserInputSubmittedTriggers:Q,layoutExitUserCancelledTriggers:[]}},vd=function(Z){const k=g.J(Z.renderingContent,FP);
if(k?.pings)return Gq(k.pings);Z=g.J(Z.renderingContent,ET);return Z?.skipPings?new Map([["skip",Z.skipPings]]):new Map},ImR=function(Z,k,N,a,T,K){k=g.J(k.renderingContent,FP);
if(!k)return new p("Invalid rendering content for DAI media layout");Z=[new Kd(a),new yi(N.ge.videoLengthSeconds),...(nd(K)?[new N0({impressionCommands:k.impressionCommands,abandonCommands:k.onAbandonCommands,completeCommands:k.completeCommands,progressCommands:k.adVideoProgressCommands})]:[]),new Qi(N.ge.playerVars),new q0(N.WJ),new rc(N.tY),new Ld(N.nZ),new nq(D4(Z)),new sq(N.ge.adVideoId),new AC(N.WF),k.sodarExtensionData&&new cd(k.sodarExtensionData),new Hd({current:null}),new dc,new Xb(xB(k.pings))].filter(xSN);
T!==void 0&&Z.push(new Pd(T));return Z},nqU=function(Z,k,N){Z=Z.map(q=>au(g.J(q.renderingContent,FP)));
const a=Z.map(q=>q.videoLengthSeconds),T=a.map((q,r)=>new TV(r,a));
let K=k,y=N;const Q=[];Z.forEach((q,r)=>{y=Math.min(K+q.videoLengthSeconds*1E3,N);M8(q.playerVars,T[r]);Q.push({ge:q,WJ:K,tY:y,nZ:r,WF:T[r]});K=y});
return Q},Wpf=function(Z,k,N){const a=[];
for(var T of Z){var K=g.J(T.renderingContent,FP);if(K){if(!Y7(K))return new p("Invalid vod media renderer");a.push(HUy(K))}}T=a.map(Q=>Q.Ah);
K=[];let y=0;for(let Q=0;Q<Z.length;Q++){const q=g.J(Z[Q].renderingContent,FP);if(!q)continue;const r=new TV(y,T),C=Fb(a[y].playerVars,a[y].tS,k,N,r);K[Q]={WF:r,adPodSkipTarget:q.adPodSkipTarget,aH:a[y],gz:C};y++}return K},HUy=function(Z){const k=q2(Z.playerVars);
let N=Number(k.length_seconds);isNaN(N)&&(N=0,wm("Expected valid length seconds in player vars but got NaN"));return{playerVars:k,tS:Z.playerVars,Ah:N}},D4=function(Z){switch(Z){case "SLOT_TRIGGER_EVENT_LAYOUT_ID_ENTERED":return{kind:"AD_PLACEMENT_KIND_LAYOUT_ID_ENTERED"};
case "SLOT_TRIGGER_EVENT_BEFORE_CONTENT":return{kind:"AD_PLACEMENT_KIND_START"};case "SLOT_TRIGGER_EVENT_CONTENT_OFFSET":return{kind:"AD_PLACEMENT_KIND_MILLISECONDS"};case "SLOT_TRIGGER_EVENT_AFTER_CONTENT":return{kind:"AD_PLACEMENT_KIND_END"};case "SLOT_TRIGGER_EVENT_CONTENT_PAUSED":return{kind:"AD_PLACEMENT_KIND_PAUSE"};default:return{kind:"AD_PLACEMENT_KIND_UNKNOWN"}}},maN=function(Z,k){return Z.layoutExitNormalTriggers.find(N=>N instanceof BU&&N?.triggeringLayoutId!==k)?.triggeringLayoutId},LBN=
function(Z,k,N,a,T,K,y,Q,q){const r=N.pings;
return r?[dai(Z,K,Q,T,C=>{var m=C.slotId;C=q(C);var A=N.adLayoutLoggingData,P=N.progressCommands;m=HM(k.U.get(),"LAYOUT_TYPE_DISCOVERY_PLAYBACK_TRACKER",m);const d={layoutId:m,layoutType:"LAYOUT_TYPE_DISCOVERY_PLAYBACK_TRACKER",mp:"core"};return{layoutId:m,layoutType:"LAYOUT_TYPE_DISCOVERY_PLAYBACK_TRACKER",d5:Gq(r),layoutExitNormalTriggers:[new hf(k.V,K)],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],mp:"core",clientMetadata:new SB([new nq(a),
new Xb(xB(r)),new X9N(r?.activeViewTracking?.identifier),new yi(y/1E3),new N0({progressCommands:P}),new kG(y/1E3)]),KF:C(d),adLayoutLoggingData:A}})]:new p("VideoAdTrackingRenderer without VideoAdTracking pings filled.",{videoAdTrackingRenderer:N})},t5R=function(Z,k,N,a,T,K,y,Q){Z=V50(Z,N,K,y,a,q=>{var r=q.slotId;
q=Q(q);r=HM(k.U.get(),"LAYOUT_TYPE_FORECASTING",r);const C={layoutId:r,layoutType:"LAYOUT_TYPE_FORECASTING",mp:"core"},m=new Map,A=T.impressionUrls;A&&m.set("impression",A);return{layoutId:r,layoutType:"LAYOUT_TYPE_FORECASTING",d5:m,layoutExitNormalTriggers:[new OO(k.V,r)],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],mp:"core",clientMetadata:new SB([new FBN(T),new nq(N)]),KF:q(C)}});
return Z instanceof p?Z:[Z]},uI0=function(Z,k,N,a,T,K,y){return[hji(Z,K,a,Q=>{var q=Q.slotId;
Q=y(Q);q=HM(k.U.get(),"LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY",q);const r={layoutId:q,layoutType:"LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY",mp:"core"};return{layoutId:q,layoutType:"LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY",d5:new Map,layoutExitNormalTriggers:[new hf(k.V,K)],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],mp:"core",clientMetadata:new SB([new Cd(T),new nq(N)]),KF:Q(r),adLayoutLoggingData:T.adLayoutLoggingData}})]},
f_f=function(Z,k,N,a,T,K,y,Q){Z=l_y(Z,N,K,y,a,(q,r)=>{var C=q.slotId;
q=Q(q);var m=T.contentSupportedRenderer;m?m.textOverlayAdContentRenderer?(m=HM(k.U.get(),"LAYOUT_TYPE_IN_VIDEO_TEXT_OVERLAY",C),r=Iu(k,m,"LAYOUT_TYPE_IN_VIDEO_TEXT_OVERLAY",T,N,q,jQ(k,r,C))):m.enhancedTextOverlayAdContentRenderer?(m=HM(k.U.get(),"LAYOUT_TYPE_IN_VIDEO_ENHANCED_TEXT_OVERLAY",C),r=Iu(k,m,"LAYOUT_TYPE_IN_VIDEO_ENHANCED_TEXT_OVERLAY",T,N,q,jQ(k,r,C))):m.imageOverlayAdContentRenderer?(m=HM(k.U.get(),"LAYOUT_TYPE_IN_VIDEO_IMAGE_OVERLAY",C),r=jQ(k,r,C),r.push(new SS(k.V,45E3,m)),r=Iu(k,m,
"LAYOUT_TYPE_IN_VIDEO_IMAGE_OVERLAY",T,N,q,r)):r=new ND("InvideoOverlayAdRenderer without appropriate sub renderer"):r=new ND("InvideoOverlayAdRenderer without contentSupportedRenderer");return r});
return Z instanceof p?Z:[Z]},OU0=function(Z,k,N,a,T,K,y,Q,q){const r=Number(a.durationMilliseconds);
return isNaN(r)?new p("Expected valid duration for AdActionInterstitialRenderer."):C=>BOX(k,C.slotId,N,r,{impressionCommands:void 0,abandonCommands:a.abandonCommands?[{commandExecutorCommand:a.abandonCommands}]:void 0,completeCommands:a.completionCommands},a.skipPings?new Map([["skip",a.skipPings]]):new Map,y(C),m=>DaX(Z,m,T,(A,P)=>{var d=A.slotId;A=y(A);d=HM(k.U.get(),"LAYOUT_TYPE_ENDCAP",d);return Z4(k,d,P,N,A,"LAYOUT_TYPE_ENDCAP",[new A0f(a),Q],a.adLayoutLoggingData)}),q,K-1,a.adLayoutLoggingData,
K)},vhf=function(Z,k,N,a){if(!N.playerVars)return new p("No playerVars available in AdIntroRenderer.");
const T=q2(N.playerVars);T.autoplay="1";return K=>{var y=K.slotId;K=a(K);y=HM(Z.U.get(),"LAYOUT_TYPE_MEDIA",y);const Q={layoutId:y,layoutType:"LAYOUT_TYPE_MEDIA",mp:"adapter"};return{Nj:{layoutId:y,layoutType:"LAYOUT_TYPE_MEDIA",d5:new Map,layoutExitNormalTriggers:[],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],mp:"adapter",clientMetadata:new SB([new kbi,new nq(k),new Hd({current:null}),new Qi(T)]),KF:K(Q)},OS:[new DN(Z.V,
y,["error"])],xJ:[],rH:[],QC:[]}}},ghy=function(Z,k,N,a,T,K,y,Q,q,r=!1){const C=WU(T);
if(!lAi(T,r))return new p("Received invalid InstreamSurveyAdRenderer for VOD composite survey.",{InstreamSurveyAdRenderer:T});if(C<=0)return new p("InstreamSurveyAdRenderer should have valid duration.",{instreamSurveyAdRenderer:T});const m=k4b(Z,k,T,K,N,a,y);return m instanceof p?m:A=>iUi(k,A.slotId,N,C,Y8(T),y(A),m,Q,q)},$aX=function(Z,k,N,a,T,K,y,Q){if(!(!isNaN(Number(T.timeoutSeconds))&&T.text&&T.ctaButton&&g.J(T.ctaButton,Eq)&&T.brandImage&&T.backgroundImage&&g.J(T.backgroundImage,Wd)&&g.J(T.backgroundImage,
Wd)?.landscape))return new p("Received invalid SurveyTextInterstitialRenderer.",{SurveyTextInterstitialRenderer:T});
const q=T.timeoutSeconds*1E3,r=(m,A)=>{var P=m.slotId;m=y(m);P=HM(k.U.get(),"LAYOUT_TYPE_VIDEO_INTERSTITIAL_BUTTONED_LEFT",P);return Z4(k,P,A,N,m,"LAYOUT_TYPE_VIDEO_INTERSTITIAL_BUTTONED_LEFT",[new w9f(T),K],T.adLayoutLoggingData)},C=m=>DaX(Z,m,a,r);
return m=>{var A=m.slotId,P={impressionCommands:T.impressionCommands,completeCommands:T.timeoutCommands,skipCommands:T.dismissCommands};m=y(m);A=YG(k,A,N,q,P,new Map,m,C);P=new SQ(A.Z3);m=new eQ(Q);return{Nj:{layoutId:A.layoutId,layoutType:A.layoutType,d5:A.d5,layoutExitNormalTriggers:[],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],mp:A.mp,clientMetadata:new SB([...A.ML,P,m]),KF:A.KF,adLayoutLoggingData:A.adLayoutLoggingData},
OS:[],xJ:A.layoutExitMuteTriggers,rH:A.layoutExitUserInputSubmittedTriggers,QC:A.layoutExitUserCancelledTriggers,rV:A.rV}}},Gby=function(Z,k,N,a,T,K,y,Q,q,r,C,m,A,P,d,h){Z=BM(Z,"SLOT_TYPE_PLAYER_BYTES");
a=hHG(k,y,a,T,Z,r,C);if(a instanceof p)return a;y=a.clientMetadata.PD("metadata_type_fulfilled_layout")?.layoutId;if(!y)return new p("Invalid adNotify layout");k=xay(y,k,N,T,K,q,Q,r,m,A,P,d,h);return k instanceof p?k:[a,...k]},xay=function(Z,k,N,a,T,K,y,Q,q,r,C,m,A){N=Si0(k,N,a,K,y,Q,q,r,C,m,A);
ejr(K)?(a=ohf(k,Z),Z=BM(k.U.get(),"SLOT_TYPE_IN_PLAYER"),K=HM(k.U.get(),"LAYOUT_TYPE_SURVEY",Z),Q=ZX(k,a,Q),k=[...Q.slotExpirationTriggers,new wE(k.V,K)],Z=N({slotId:Q.slotId,slotType:Q.slotType,slotPhysicalPosition:Q.slotPhysicalPosition,slotEntryTrigger:Q.slotEntryTrigger,slotFulfillmentTriggers:Q.slotFulfillmentTriggers,slotExpirationTriggers:k,mp:Q.mp},{slotId:Z,layoutId:K}),T=Z instanceof p?Z:{VK:{...Q,slotExpirationTriggers:k,clientMetadata:new SB([new M0(Z.layout)]),adSlotLoggingData:T},Ze:Z.Ze}):
T=B$f(k,Z,Q,T,N);return T instanceof p?T:[...T.Ze,T.VK]},zjj=function(Z,k,N,a,T,K,y,Q,q,r,C,m,A,P){k=Si0(Z,k,N,T,K,y,q,r,C,m,A,P);
ejr(T)?(y=J0y(Z,N,y,Q),y instanceof p?Z=y:(Q=BM(Z.U.get(),"SLOT_TYPE_IN_PLAYER"),q=HM(Z.U.get(),"LAYOUT_TYPE_SURVEY",Q),T=[...y.slotExpirationTriggers,new wE(Z.V,q)],Q=k({slotId:y.slotId,slotType:y.slotType,slotPhysicalPosition:y.slotPhysicalPosition,mp:y.mp,slotEntryTrigger:y.slotEntryTrigger,slotFulfillmentTriggers:y.slotFulfillmentTriggers,slotExpirationTriggers:T},{slotId:Q,layoutId:q}),Z=Q instanceof p?Q:{VK:{slotId:y.slotId,slotType:y.slotType,slotPhysicalPosition:y.slotPhysicalPosition,slotEntryTrigger:y.slotEntryTrigger,
slotFulfillmentTriggers:y.slotFulfillmentTriggers,slotExpirationTriggers:T,mp:y.mp,clientMetadata:new SB([new M0(Q.layout),new fd({T3:Z.T3(N)})]),adSlotLoggingData:a},Ze:Q.Ze})):Z=DSR(Z,N,y,Q,a,q.Rn,k);return Z instanceof p?Z:Z.Ze.concat(Z.VK)},ZRf=function(Z,k,N,a,T,K){const y=N.DRIFT_FROM_HEAD_MS&&!Number.isNaN(N.DRIFT_FROM_HEAD_MS)?Math.trunc(N.DRIFT_FROM_HEAD_MS):0;
var Q=Ua0.exec(k);Q=Q!=null&&Q.length>=2?Q[1]:"";const q=bUN.test(k);var r=p9f.exec(k);r=r!=null&&r.length>=2?r[1]:"";var C=RjN.exec(k);C=C!=null&&C.length>=2&&!Number.isNaN(Number(C[1]))?Number(C[1]):1;var m=M5R.exec(k);m=m!=null&&m.length>=2?m[1]:"0";const A=ki(Z.player.X().Bo);var P=Z.player.getVideoData({playerType:1});const d=g.YZ(P.O,!0),h="BISCOTTI_ID"in N?N.BISCOTTI_ID:"";nhN(Z,d,k,h.toString(),Z.player.X(),P);P={splay:!1,lactMilliseconds:N.LACT.toString(),playerHeightPixels:Math.trunc(N.P_H),
playerWidthPixels:Math.trunc(N.P_W),vis:Math.trunc(N.VIS),signatureTimestamp:20522,autonavState:I_r(Z.player.X())};Z.player.B("embeds_enable_encrypted_host_flags_enforcement")&&(P.encryptedHostFlags=Z.player.X().getWebPlayerContextConfig()?.encryptedHostFlags);a&&(a={},jYj(a,N.YT_REMOTE)&&(P.mdxContext=a));if(a=EhU.includes(A)?void 0:g.a6("PREF")){var B=a.split(RegExp("[:&]"));for(let O=0,x=B.length;O<x;O++){var v=B[O].split("=");if((v[0].toUpperCase()==="SML"||v[0].toUpperCase()==="GSML")&&v.length>
1&&v[1].toUpperCase()==="TRUE"){d.user.lockedSafetyMode=!0;break}}a:{if("FLAG_AUTO_CAPTIONS_DEFAULT_ON"in WBf){a=a.split(RegExp("[:&]"));v=WBf.FLAG_AUTO_CAPTIONS_DEFAULT_ON;B="f"+(1+Math.floor(v/31)).toString();v=1<<Math.floor(v%31);for(let O=0,x=a.length;O<x;O++){const e=a[O].split("=");if(e[0]===B&&parseInt("0x"+e[1],16)&v){a=!0;break a}}}a=!1}P.autoCaptionsDefaultOn=a}k=Yif.exec(k);(k=k!=null&&k.length>=2?k[1]:"")&&r&&(d.user.credentialTransferTokens=[{token:k,scope:"VIDEO"}]);k={contentPlaybackContext:P};
Q={adBlock:Math.trunc(N.AD_BLOCK),params:Q,breakIndex:C,breakPositionMs:m,clientPlaybackNonce:N.CPN,topLevelDomain:A,isProxyAdTagRequest:q,context:d,adSignalsInfoString:QS(tP(h.toString())),overridePlaybackContext:k};T!==void 0&&(Q.cueProcessedMs=Math.round(T).toString());K&&(Q.cuepointId=K);r&&(Q.videoId=r);N.LIVE_TARGETING_CONTEXT&&(Q.liveTargetingParams=N.LIVE_TARGETING_CONTEXT);N.AD_BREAK_LENGTH&&(Q.breakLengthMs=Math.trunc(N.AD_BREAK_LENGTH*1E3).toString());y&&(Q.driftFromHeadMs=y.toString());
Q.currentMediaTimeMs=Math.round(Z.player.getCurrentTime({playerType:1})*1E3);(Z=Z.player.getGetAdBreakContext())&&(Q.getAdBreakContext=Z);return Q},ejr=function(Z){for(const k of Z)if(g.J(k,ap))return!0;
return!1},Si0=function(Z,k,N,a,T,K,y,Q,q,r,C,m){return(A,P)=>{if(xG(C)&&GV(C))a:{var d=kNf(a);
if(d instanceof p)P=d;else{var h=0,B=[],v=[],O=[],x=[],e=[],Ki=[],yf=new NB,Jy=new $G({current:null}),hy=!1,zf=[],MR=0,OD=[];for(var Ur=0;Ur<a.length;Ur++){var tg=a[Ur],b0=g.J(tg,FP);if(!b0)continue;b0=Vi(b0);if(b0 instanceof ND){P=new p(b0);break a}const IL=new TV(MR,d),Cb=Fb(b0.playerVars,b0.tS,y,r,IL);MR++;OD[Ur]={renderer:tg,data:b0,WF:IL,gz:Cb}}d=-1;for(MR=0;MR<a.length;MR++){Ur=a[MR];if(tg=g.J(Ur,N8)){Ur=vhf(k,N,tg,Q);if(Ur instanceof p){P=Ur;break a}Ur=Ur(A);B.push(Ur.Nj);v=[...Ur.OS,...v];
O=[...Ur.xJ,...O];Ur.rV&&(zf=[Ur.rV,...zf]);continue}if(g.J(Ur,FP)){tg=OD[MR];d=tg.data;Ur=tg.WF;tg=tg.gz;b0=OD[MR+1];var tJ=void 0;b0&&(tJ=b0.gz);Ur=N2G(k,d.layoutId,d.K5,N,tg,d.Ah,K,Ur,Q(A),Jy,q.get(d.K5.externalVideoId),tJ,m);h++;B.push(Ur.Nj);v=[...Ur.OS,...v];O=[...Ur.xJ,...O];hy||(Ki.push(Jy),hy=!0);d=(d=d.K5.adPodSkipTarget)&&d>0?d:-1;continue}if(tg=g.J(Ur,ET)){Ur=OU0(Z,k,N,tg,K,h,Q,Jy,d);if(Ur instanceof p){P=Ur;break a}Ur=Ur(A);B.push(Ur.Nj);v=[...Ur.OS,...v];O=[...Ur.xJ,...O];Ur.rV&&(zf=
[Ur.rV,...zf]);continue}if(tg=g.J(Ur,ap)){if(P===void 0){P=new p("Composite Survey must already have a Survey Bundle with required metadata.",{instreamSurveyAdRenderer:tg});break a}Ur=ghy(Z,k,N,K,tg,yf,Q,P,h,cM(C,"supports_multi_step_on_desktop"));if(Ur instanceof p){P=Ur;break a}Ur=Ur(A);B.push(Ur.Nj);Ur.rV&&zf.push(Ur.rV);v=[...Ur.OS,...v];O=[...Ur.xJ,...O];x=[...Ur.rH,...x];e=[...Ur.QC,...e];Ki=[yf,...Ki];continue}if(Ur=g.J(Ur,Tk)){Ur=$aX(Z,k,N,K,Ur,yf,Q,h);if(Ur instanceof p){P=Ur;break a}Ur=
Ur(A);B.push(Ur.Nj);Ur.rV&&zf.push(Ur.rV);O=[...Ur.xJ,...O]}else{P=new p("Unsupported linearAd found in LinearAdSequenceRenderer.");break a}}P={C5:B,layoutExitSkipTriggers:v,layoutExitUserInputSubmittedTriggers:x,layoutExitUserCancelledTriggers:e,layoutExitMuteTriggers:O,ML:Ki,Ze:zf}}}else a:if(OD=kNf(a),OD instanceof p)P=OD;else{tJ=0;B=[];v=[];O=[];x=[];e=[];Ki=[];yf=new NB;Jy=new $G({current:null});hy=!1;zf=[];MR=-1;for(h of a)if(g.J(h,N8)){d=vhf(k,N,g.J(h,N8),Q);if(d instanceof p){P=d;break a}d=
d(A);B.push(d.Nj);v=[...d.OS,...v];O=[...d.xJ,...O];d.rV&&(zf=[d.rV,...zf])}else if(g.J(h,FP)){MR=Vi(g.J(h,FP));if(MR instanceof ND){P=new p(MR);break a}d=new TV(tJ,OD);d=N2G(k,MR.layoutId,MR.K5,N,Fb(MR.playerVars,MR.tS,y,r,d),MR.Ah,K,d,Q(A),Jy,q.get(MR.K5.externalVideoId),void 0,m);tJ++;B.push(d.Nj);v=[...d.OS,...v];O=[...d.xJ,...O];hy||(Ki.push(Jy),hy=!0);MR=(MR=MR.K5.adPodSkipTarget)&&MR>0?MR:-1}else if(g.J(h,ET)){d=OU0(Z,k,N,g.J(h,ET),K,tJ,Q,Jy,MR);if(d instanceof p){P=d;break a}d=d(A);B.push(d.Nj);
v=[...d.OS,...v];O=[...d.xJ,...O];d.rV&&(zf=[d.rV,...zf])}else if(g.J(h,ap)){if(P===void 0){P=new p("Composite Survey must already have a Survey Bundle with required metadata.",{instreamSurveyAdRenderer:g.J(h,ap)});break a}d=ghy(Z,k,N,K,g.J(h,ap),yf,Q,P,tJ,cM(C,"supports_multi_step_on_desktop"));if(d instanceof p){P=d;break a}d=d(A);B.push(d.Nj);d.rV&&zf.push(d.rV);v=[...d.OS,...v];O=[...d.xJ,...O];x=[...d.rH,...x];e=[...d.QC,...e];Ki=[yf,...Ki]}else if(g.J(h,Tk)){d=$aX(Z,k,N,K,g.J(h,Tk),yf,Q,tJ);
if(d instanceof p){P=d;break a}d=d(A);B.push(d.Nj);d.rV&&zf.push(d.rV);O=[...d.xJ,...O]}else{P=new p("Unsupported linearAd found in LinearAdSequenceRenderer.");break a}P={C5:B,layoutExitSkipTriggers:v,layoutExitUserInputSubmittedTriggers:x,layoutExitUserCancelledTriggers:e,layoutExitMuteTriggers:O,ML:Ki,Ze:zf}}P instanceof p?A=P:(e=A.slotId,tJ=P.C5,h=P.layoutExitSkipTriggers,B=P.layoutExitMuteTriggers,v=P.layoutExitUserInputSubmittedTriggers,O=P.ML,A=Q(A),x=T?T.layoutType:"LAYOUT_TYPE_COMPOSITE_PLAYER_BYTES",
e=T?T.layoutId:HM(k.U.get(),x,e),Ki={layoutId:e,layoutType:x,mp:"core"},A={layout:{layoutId:e,layoutType:x,d5:new Map,layoutExitNormalTriggers:[new OO(k.V,e)],layoutExitSkipTriggers:h,layoutExitMuteTriggers:B,layoutExitUserInputSubmittedTriggers:v,layoutExitUserCancelledTriggers:[],mp:"core",clientMetadata:new SB([new a3r(tJ),...O]),KF:A(Ki)},Ze:P.Ze});return A}},kNf=function(Z){const k=[];
for(const N of Z){if(!g.J(N,FP))continue;Z=Vi(g.J(N,FP));if(Z instanceof ND)return new p(Z);k.push(Z.Ah)}return k},KYf=function(Z,k,N,a,T,K,y,Q=!1){if(!lAi(N,Q))return new p("Received invalid InstreamSurveyAdRenderer for VOD single survey.",{InstreamSurveyAdRenderer:N});
const q=WU(N);if(q<=0)return new p("InstreamSurveyAdRenderer should have valid duration.",{instreamSurveyAdRenderer:N});const r=new NB,C=k4b(Z,k,N,r,a,K,y);return T2X(Z,a,K,q,T,(m,A)=>{var P=m.slotId,d=Y8(N);m=y(m);P=HM(k.U.get(),"LAYOUT_TYPE_MEDIA_BREAK",P);const h={layoutId:P,layoutType:"LAYOUT_TYPE_MEDIA_BREAK",mp:"core"},B=C(P,A),v=B.clientMetadata.PD("metadata_type_fulfilled_layout");v||wm("Could not retrieve overlay layout ID during VodMediaBreakLayout for survey creation. This should never happen.");
d=[new nq(a),new b2(q),new N0(d),r];v&&d.push(new pd(v.layoutType));return{lw:{layoutId:P,layoutType:"LAYOUT_TYPE_MEDIA_BREAK",d5:new Map,layoutExitNormalTriggers:[new OO(k.V,P)],layoutExitSkipTriggers:[new vU(k.V,A.layoutId)],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[new gE(k.V,A.layoutId)],layoutExitUserCancelledTriggers:[],mp:"core",clientMetadata:new SB(d),KF:m(h)},jA:B}})},yhy=function(Z){if(!D2y(Z))return!1;
const k=g.J(Z.adVideoStart,ah);return k?g.J(Z.linearAd,FP)&&E0(k)?!0:(wm("Invalid Sandwich with notify"),!1):!1},Qjy=function(Z){if(Z.linearAds==null)return!1;
Z=g.J(Z.adStart,ah);return Z?E0(Z)?!0:(wm("Invalid LASR with notify"),!1):!1},qXG=function(Z){if(!Buf(Z))return!1;
Z=g.J(Z.adStart,ah);return Z?E0(Z)?!0:(wm("Invalid LASR with notify"),!1):!1},Vy=function(Z,k,N,a,T,K,y,Q,q,r,C){const m=[];
if(k.length===0&&a.length===0&&N.length===0)return m;k=k.filter(Wt);const A=N.filter(tDU),P=a.filter(Wt),d=new Map,h=$Sy(k),B=N.some(Ki=>Ki?.adSlotMetadata?.slotType==="SLOT_TYPE_PLAYER_BYTES"),v=N.some(Ki=>Ki?.adSlotMetadata?.slotType==="SLOT_TYPE_PLAYER_UNDERLAY"),O=N.some(Ki=>Ki?.adSlotMetadata?.slotType==="SLOT_TYPE_IN_PLAYER"),x=N.some(Ki=>Ki?.adSlotMetadata?.slotType==="SLOT_TYPE_BELOW_PLAYER"||Ki?.adSlotMetadata?.slotType==="SLOT_TYPE_ABOVE_FEED"),e=N.some(Ki=>Ki?.adSlotMetadata?.slotType===
"SLOT_TYPE_PLAYER_BYTES_SEQUENCE_ITEM");
N=N.some(Ki=>Ki?.adSlotMetadata?.slotType==="SLOT_TYPE_IN_PLAYER_ORGANIC_OVERLAY");
if(B||v||O||x||e||N)r=peN(A,k,Q,T,h,Z.k8.get(),Z.loadPolicy,d,Z.Gt.get(),Z.Y.get(),O,y,q,r,C),r instanceof p?wm(r,void 0,void 0,{contentCpn:T}):m.push(...r);for(const Ki of k)r=rhU(Z,d,Ki,T,K,y,B,Q,h,q,A,Z.Gt.get().S.X().experiments.yz("html5_enable_triggering_cuepoint_for_slot")?C:void 0),r instanceof p?wm(r,void 0,void 0,{renderer:Ki.renderer,config:Ki.config.adPlacementConfig,kind:Ki.config.adPlacementConfig.kind,contentCpn:T,daiEnabled:y}):m.push(...r);Cvf(Z.Gt.get())||(K=m6r(Z,P,T,Q,h,d),m.push(...K));
if(Z.D===null||y&&!Q.T4)return Z=Q.Rn&&k.length===1&&k[0].config?.adPlacementConfig?.kind==="AD_PLACEMENT_KIND_CUE_POINT_TRIGGERED"&&k[0].renderer?.adBreakServiceRenderer,m.length||Z||wm("Expected slots parsed from AdPlacementRenderers for DAI",void 0,void 0,{"AdPlacementRenderer count":k.length,contentCpn:T,"first APR kind":k[0]?.config?.adPlacementConfig?.kind,renderer:k[0]?.renderer}),m;a=a.filter(Wt);m.push(...E6y(d,a,Z.U.get(),Z.D,T,B));m.length||wm("Expected slots parsed from AdPlacementRenderers",
void 0,void 0,{"AdPlacementRenderer count":k.length,contentCpn:T,daiEnabled:y.toString(),"first APR kind":k[0]?.config?.adPlacementConfig?.kind,renderer:k[0]?.renderer});return m},rhU=function(Z,k,N,a,T,K,y,Q,q,r,C,m){const A=N.renderer,P=N.config.adPlacementConfig,d=P.kind,h=N.adSlotLoggingData,B=O=>GT(Z.k8.get(),O);
var v=Q.T4&&d==="AD_PLACEMENT_KIND_START";v=K&&!v;if(A.adsEngagementPanelRenderer!=null)return EO(k,N.elementId,d,A.adsEngagementPanelRenderer.isContentVideoEngagementPanel,A.adsEngagementPanelRenderer.adVideoId,A.adsEngagementPanelRenderer.associatedCompositePlayerBytesLayoutId,P,h,(O,x,e,Ki)=>{var yf=Z.V.get(),Jy=O.slotId,hy=A.adsEngagementPanelRenderer;O=GT(Z.k8.get(),O);return TK(yf,Jy,"LAYOUT_TYPE_PANEL_TEXT_ICON_IMAGE_TILES_BUTTON",new sjG(hy),x,e,hy.impressionPings,O,A.adsEngagementPanelRenderer.adLayoutLoggingData,
Ki)}),[];
if(A.adsEngagementPanelLayoutViewModel)return EO(k,N.elementId,d,A.adsEngagementPanelLayoutViewModel.isContentVideoEngagementPanel,A.adsEngagementPanelLayoutViewModel.adVideoId,A.adsEngagementPanelLayoutViewModel.associatedCompositePlayerBytesLayoutId,P,h,(O,x,e,Ki)=>{var yf=Z.V.get(),Jy=O.slotId,hy=A.adsEngagementPanelLayoutViewModel;O=GT(Z.k8.get(),O);return Kw(yf,Jy,"LAYOUT_TYPE_PANEL",new Ahf(hy),x,e,O,A.adsEngagementPanelLayoutViewModel.adLayoutLoggingData,Ki)}),[];
if(A.actionCompanionAdRenderer!=null){if(A.actionCompanionAdRenderer.showWithoutLinkedMediaLayout)return p8r(Z.U.get(),Z.D,Z.V.get(),A.actionCompanionAdRenderer,P,h,a,B);EO(k,N.elementId,d,A.actionCompanionAdRenderer.isContentVideoCompanion,A.actionCompanionAdRenderer.adVideoId,A.actionCompanionAdRenderer.associatedCompositePlayerBytesLayoutId,P,h,(O,x,e,Ki)=>{var yf=Z.V.get(),Jy=O.slotId,hy=A.actionCompanionAdRenderer;O=GT(Z.k8.get(),O);return TK(yf,Jy,"LAYOUT_TYPE_COMPANION_WITH_ACTION_BUTTON",
new bby(hy),x,e,hy.impressionPings,O,A.actionCompanionAdRenderer.adLayoutLoggingData,Ki)})}else if(A.topBannerImageTextIconButtonedLayoutViewModel!==void 0){if(A.topBannerImageTextIconButtonedLayoutViewModel.showWithoutLinkedMediaLayout)return MDf(Z.U.get(),Z.D,Z.V.get(),A.topBannerImageTextIconButtonedLayoutViewModel,P,h,a,B);
EO(k,N.elementId,d,A.topBannerImageTextIconButtonedLayoutViewModel.isContentVideoCompanion,A.topBannerImageTextIconButtonedLayoutViewModel.adVideoId,A.topBannerImageTextIconButtonedLayoutViewModel.associatedCompositePlayerBytesLayoutId,P,h,(O,x,e,Ki)=>{var yf=Z.V.get(),Jy=O.slotId,hy=A.topBannerImageTextIconButtonedLayoutViewModel;O=GT(Z.k8.get(),O);return Kw(yf,Jy,"LAYOUT_TYPE_COMPANION_WITH_ACTION_BUTTON",new RZ0(hy),x,e,O,A.topBannerImageTextIconButtonedLayoutViewModel.adLayoutLoggingData,Ki)})}else if(A.imageCompanionAdRenderer)EO(k,
N.elementId,d,A.imageCompanionAdRenderer.isContentVideoCompanion,A.imageCompanionAdRenderer.adVideoId,A.imageCompanionAdRenderer.associatedCompositePlayerBytesLayoutId,P,h,(O,x,e,Ki)=>{var yf=Z.V.get(),Jy=O.slotId,hy=A.imageCompanionAdRenderer;
O=GT(Z.k8.get(),O);return TK(yf,Jy,"LAYOUT_TYPE_COMPANION_WITH_IMAGE",new PvU(hy),x,e,hy.impressionPings,O,A.imageCompanionAdRenderer.adLayoutLoggingData,Ki)});
else if(A.bannerImageLayoutViewModel)EO(k,N.elementId,d,A.bannerImageLayoutViewModel.isContentVideoCompanion,A.bannerImageLayoutViewModel.adVideoId,A.bannerImageLayoutViewModel.associatedCompositePlayerBytesLayoutId,P,h,(O,x,e,Ki)=>{var yf=Z.V.get(),Jy=O.slotId,hy=A.bannerImageLayoutViewModel;O=GT(Z.k8.get(),O);return Kw(yf,Jy,"LAYOUT_TYPE_COMPANION_WITH_IMAGE",new chy(hy),x,e,O,A.bannerImageLayoutViewModel.adLayoutLoggingData,Ki)});
else if(A.shoppingCompanionCarouselRenderer)EO(k,N.elementId,d,A.shoppingCompanionCarouselRenderer.isContentVideoCompanion,A.shoppingCompanionCarouselRenderer.adVideoId,A.shoppingCompanionCarouselRenderer.associatedCompositePlayerBytesLayoutId,P,h,(O,x,e,Ki)=>{var yf=Z.V.get(),Jy=O.slotId,hy=A.shoppingCompanionCarouselRenderer;O=GT(Z.k8.get(),O);return TK(yf,Jy,"LAYOUT_TYPE_COMPANION_WITH_SHOPPING",new HRX(hy),x,e,hy.impressionPings,O,A.shoppingCompanionCarouselRenderer.adLayoutLoggingData,Ki)});
else if(A.adBreakServiceRenderer){if(N.renderer?.adBreakServiceRenderer?.getAdBreakUrl===void 0)return[];if(d==="AD_PLACEMENT_KIND_PAUSE")return JPU(Z.U.get(),P,h,N.renderer.adBreakServiceRenderer,a);if(d!=="AD_PLACEMENT_KIND_CUE_POINT_TRIGGERED"&&d!=="AD_PLACEMENT_KIND_PREFETCH_TRIGGERED")return G_X(Z.U.get(),P,h,N.renderer.adBreakServiceRenderer,a,T,K);Q.Rn||wm("Received non-live cue point triggered AdBreakServiceRenderer",void 0,void 0,{kind:d,adPlacementConfig:P,daiEnabledForContentVideo:String(K),
isServedFromLiveInfra:String(Q.Rn),clientPlaybackNonce:Q.clientPlaybackNonce});if(d==="AD_PLACEMENT_KIND_PREFETCH_TRIGGERED"){if(!Z.E6)return new p("Received AD_PLACEMENT_KIND_PREFETCH_TRIGGERED with no playerControlsApiProvider set for interface");if(!Z.r_)return new p("Received AD_PLACEMENT_KIND_PREFETCH_TRIGGERED with no PrefetchTriggerAdapter set for interface");Z.r_.Qe({adPlacementRenderer:N,contentCpn:a,td:T});T=Z.E6.get().getCurrentTimeSec(1,!1);return d6X(Z.U.get(),N.renderer.adBreakServiceRenderer,
P,T,a,h,K)}if(!Z.Bd)return new p("Received AD_PLACEMENT_KIND_CUE_POINT_TRIGGERED with no CuePointOpportunityAdapter set for interface");Z.Bd.Qe({adPlacementRenderer:N,contentCpn:a,td:T})}else{if(A.clientForecastingAdRenderer)return t5R(Z.U.get(),Z.V.get(),P,h,A.clientForecastingAdRenderer,a,T,B);if(A.invideoOverlayAdRenderer)return f_f(Z.U.get(),Z.V.get(),P,h,A.invideoOverlayAdRenderer,a,T,B);if(A.instreamAdPlayerOverlayRenderer)return uI0(Z.U.get(),Z.V.get(),P,h,A.instreamAdPlayerOverlayRenderer,
a,B);if((A.linearAdSequenceRenderer||A.instreamVideoAdRenderer)&&v)return dSi(Z.U.get(),Z.V.get(),N,a,B,r,m);if(A.linearAdSequenceRenderer&&!v){if(y)return[];Ip(k,A,d);if(A.linearAdSequenceRenderer.adLayoutMetadata){if(!Buf(A.linearAdSequenceRenderer))return new p("Received invalid LinearAdSequenceRenderer.")}else if(A.linearAdSequenceRenderer.linearAds==null)return new p("Received invalid LinearAdSequenceRenderer.");if(g.J(A.linearAdSequenceRenderer.adStart,ah)){wm("Found AdNotify in LinearAdSequenceRenderer");
N=g.J(A.linearAdSequenceRenderer.adStart,ah);if(!(N?.durationMs!=null&&N?.durationMs>0))return new p("Invalid AdMessageRenderer.");K=A.linearAdSequenceRenderer.linearAds;return Gby(Z.Y.get(),Z.U.get(),Z.V.get(),Z.k8.get(),P,h,N,bZ(A.linearAdSequenceRenderer.adLayoutMetadata)?A.linearAdSequenceRenderer.adLayoutMetadata:void 0,K,a,T,Q,B,q,Z.loadPolicy,Z.Gt.get())}return zjj(Z.U.get(),Z.V.get(),P,h,A.linearAdSequenceRenderer.linearAds,bZ(A.linearAdSequenceRenderer.adLayoutMetadata)?A.linearAdSequenceRenderer.adLayoutMetadata:
void 0,a,T,Q,B,q,Z.loadPolicy,Z.Gt.get(),C)}if(!A.remoteSlotsRenderer||K){if(A.instreamVideoAdRenderer&&!v){if(y)return[];Ip(k,A,d);return OEX(Z.U.get(),Z.V.get(),P,h,A.instreamVideoAdRenderer,a,T,Q,B,q,Z.loadPolicy,Z.Gt.get(),Z.k8.get(),C)}if(A.instreamSurveyAdRenderer)return KYf(Z.U.get(),Z.V.get(),A.instreamSurveyAdRenderer,P,h,a,B,cM(Z.Gt.get(),"supports_multi_step_on_desktop"));if(A.sandwichedLinearAdRenderer!=null)return D2y(A.sandwichedLinearAdRenderer)?g.J(A.sandwichedLinearAdRenderer.adVideoStart,
ah)?(wm("Found AdNotify in SandwichedLinearAdRenderer"),N=g.J(A.sandwichedLinearAdRenderer.adVideoStart,ah),N?.durationMs!=null&&N?.durationMs>0?(K=g.J(A.sandwichedLinearAdRenderer.linearAd,FP))?lmN(N,K,P,Z.Y.get(),Z.U.get(),Z.V.get(),Z.k8.get(),h,a,T,Q,B,q,Z.loadPolicy,Z.Gt.get()):new p("Missing IVAR from Sandwich"):new p("Invalid AdMessageRenderer.")):zjj(Z.U.get(),Z.V.get(),P,h,[A.sandwichedLinearAdRenderer.adVideoStart,A.sandwichedLinearAdRenderer.linearAd],void 0,a,T,Q,B,q,Z.loadPolicy,Z.Gt.get()):
new p("Received invalid SandwichedLinearAdRenderer.");if(A.videoAdTrackingRenderer!=null)return LBN(Z.U.get(),Z.V.get(),A.videoAdTrackingRenderer,P,h,a,T,Q.rQ,B)}}return[]},m6r=function(Z,k,N,a,T,K){const y=C=>GT(Z.k8.get(),C),Q=[];
for(const C of k){k=C.renderer;var q=k.sandwichedLinearAdRenderer,r=k.linearAdSequenceRenderer;q&&yhy(q)?(wm("Found AdNotify with SandwichedLinearAdRenderer"),r=g.J(q.adVideoStart,ah),q=g.J(q.linearAd,FP),Ip(K,k,C.config.adPlacementConfig.kind),k=unN(r?.layout.layoutId,Z.U.get(),Z.V.get(),C.config.adPlacementConfig,C.adSlotLoggingData,q,N,a,y,T,Z.loadPolicy,Z.Gt.get(),Z.k8.get()),k instanceof p?wm(k):Q.push(...k)):r&&(!r.adLayoutMetadata&&Qjy(r)||r.adLayoutMetadata&&qXG(r))&&(wm("Found AdNotify with LinearAdSequenceRenderer"),
Ip(K,k,C.config.adPlacementConfig.kind),k=xay(g.J(r.adStart,ah)?.layout.layoutId,Z.U.get(),Z.V.get(),C.config.adPlacementConfig,C.adSlotLoggingData,r.linearAds,bZ(r.adLayoutMetadata)?r.adLayoutMetadata:void 0,N,a,y,T,Z.loadPolicy,Z.Gt.get()),k instanceof p?wm(k):Q.push(...k))}return Q},rz=function(Z,k,N){const a=Z.E6.get().getCurrentTimeSec(1,!1);
Z.Gt.get().S.X().Xa()&&g7(Z.Za.get(),"sdai",`onopp.1;evt.${N.event};start.${N.startSecs.toFixed(3)};d.${N.Xl.toFixed(3)}`);fA(Z.U.get(),"OPPORTUNITY_TYPE_LIVE_STREAM_BREAK_SIGNAL",()=>{var T=Z.D.get(),K=k.adPlacementRenderer.renderer.adBreakServiceRenderer,y=k.contentCpn,Q=k.adPlacementRenderer.adSlotLoggingData;y5(Z.Gt.get());var q=Z.Za;var r=T.Gt.get();r=g.Q5(r.S.X().experiments,"max_prefetch_window_sec_for_livestream_optimization");var C=T.Gt.get();var m=g.Q5(C.S.X().experiments,"min_prefetch_offset_sec_for_livestream_optimization");
{C=N.startSecs*1E3;C={vF:new XC(C,C+N.Xl*1E3),TL:!1,cueProcessedMs:a*1E3};const P=N.startSecs+N.Xl;if(a===0)C.UR=new XC(0,P*1E3);else{m=N.startSecs-m;var A=m-a;C.UR=A<=0?new XC(m*1E3,P*1E3):new XC(Math.floor(a+Math.random()*Math.min(A,r))*1E3,P*1E3)}r=C}K=Fe(T,K,y,r,Q,[new Xxi(N)]);qB(T.Gt.get())&&g7(q.get(),"abrsm",`cpi.${N.identifier};cps.${N.startSecs};cpd.${N.Xl};cts.${a};rbf.${r.UR.start}`);q.get().S.Zw(N.startSecs-a,r.UR.start/1E3-a);return[K]})},Cw=function(Z){const k=Z.clientMetadata.PD("metadata_type_player_bytes_callback_ref")?.current;
if(!k)return null;const N=Z.clientMetadata.PD("metadata_type_ad_pod_skip_target_callback_ref");var a=Z.layoutId,T=Z.clientMetadata.PD("metadata_type_content_cpn"),K=Z.clientMetadata.PD("metadata_type_instream_ad_player_overlay_renderer"),y=Z.clientMetadata.PD("metadata_type_player_overlay_layout_renderer"),Q=Z.clientMetadata.PD("metadata_type_player_underlay_renderer"),q=Z.clientMetadata.PD("metadata_type_ad_placement_config"),r=Z.clientMetadata.PD("metadata_type_video_length_seconds");var C=Op(Z.clientMetadata,
"METADATA_TYPE_MEDIA_LAYOUT_DURATION_seconds")?Z.clientMetadata.PD("METADATA_TYPE_MEDIA_LAYOUT_DURATION_seconds"):Op(Z.clientMetadata,"metadata_type_layout_enter_ms")&&Op(Z.clientMetadata,"metadata_type_layout_exit_ms")?(Z.clientMetadata.PD("metadata_type_layout_exit_ms")-Z.clientMetadata.PD("metadata_type_layout_enter_ms"))/1E3:void 0;return{OR:a,contentCpn:T,HS:k,Ds:N,instreamAdPlayerOverlayRenderer:K,playerOverlayLayoutRenderer:y,instreamAdPlayerUnderlayRenderer:Q,adPlacementConfig:q,videoLengthSeconds:r,
A2:C,inPlayerLayoutId:Z.clientMetadata.PD("metadata_type_linked_in_player_layout_id"),inPlayerSlotId:Z.clientMetadata.PD("metadata_type_linked_in_player_slot_id")}},VWf=function(Z,k){return LYb(Z,k)},FYy=function(Z,k){k=LYb(Z,k);
if(!k)return null;k.A2=Z.clientMetadata.PD("metadata_type_ad_pod_info")?.adBreakRemainingLengthSeconds;return k},LYb=function(Z,k){const N=Z.clientMetadata.PD("metadata_type_player_bytes_callback_ref")?.current;
if(!N)return null;const a=VXb(Z,k);return{Og:LKN(Z,k),adPlacementConfig:Z.clientMetadata.PD("metadata_type_ad_placement_config"),f4:a,contentCpn:Z.clientMetadata.PD("metadata_type_content_cpn"),inPlayerLayoutId:Z.clientMetadata.PD("metadata_type_linked_in_player_layout_id"),inPlayerSlotId:Z.clientMetadata.PD("metadata_type_linked_in_player_slot_id"),instreamAdPlayerOverlayRenderer:Z.clientMetadata.PD("metadata_type_instream_ad_player_overlay_renderer"),playerOverlayLayoutRenderer:void 0,instreamAdPlayerUnderlayRenderer:void 0,
A2:void 0,HS:N,OR:Z.layoutId,videoLengthSeconds:Z.clientMetadata.PD("metadata_type_video_length_seconds")}},tWr=function(Z,k,N){return gqy(Z.V.get(),k.contentCpn,k.OR,a=>weN(Z.U.get(),a.slotId,N,k.adPlacementConfig,k.OR,GT(Z.k8.get(),a)))},fA=function(Z,k,N,a){Z.V().Xi(k,a);
N=N();Z=Z.V();Z.sH.V("ADS_CLIENT_EVENT_TYPE_OPPORTUNITY_PROCESSED",k,a,N);for(const Q of N)a:{k=Z;bD(k.sH,"ADS_CLIENT_EVENT_TYPE_SLOT_RECEIVED",Q);bD(k.sH,"ADS_CLIENT_EVENT_TYPE_SCHEDULE_SLOT_REQUESTED",Q);try{var T=k.V;if(g.a2(Q.slotId))throw new p("Slot ID was empty",void 0,"ADS_CLIENT_ERROR_MESSAGE_INVALID_SLOT");if(zT(T,Q))throw new p("Duplicate registration for slot.",{slotId:Q.slotId,slotEntryTriggerType:Q.slotEntryTrigger.triggerType},"ADS_CLIENT_ERROR_MESSAGE_DUPLICATE_SLOT");if(!T.GQ.Rj.has(Q.slotType))throw new p("No fulfillment adapter factory registered for slot of type: "+
Q.slotType,void 0,"ADS_CLIENT_ERROR_MESSAGE_NO_FULFILLMENT_ADAPTER_REGISTERED");if(!T.GQ.wF.has(Q.slotType))throw new p("No SlotAdapterFactory registered for slot of type: "+Q.slotType,void 0,"ADS_CLIENT_ERROR_MESSAGE_NO_SLOT_ADAPTER_REGISTERED");mk(T,"TRIGGER_CATEGORY_SLOT_ENTRY",Q.slotEntryTrigger?[Q.slotEntryTrigger]:[]);mk(T,"TRIGGER_CATEGORY_SLOT_FULFILLMENT",Q.slotFulfillmentTriggers);mk(T,"TRIGGER_CATEGORY_SLOT_EXPIRATION",Q.slotExpirationTriggers);var K=k.V;const q=`${Q.slotType}_${Q.slotPhysicalPosition}`,
r=M_(K,q);if(zT(K,Q))throw new p("Duplicate slots not supported",void 0,"ADS_CLIENT_ERROR_MESSAGE_DUPLICATE_SLOT");r.set(Q.slotId,new hcf(Q));K.V.set(q,r)}catch(q){q instanceof p&&q.Do?(ZH(k.sH,"ADS_CLIENT_ERROR_TYPE_REGISTER_SLOT_FAILED",q.Do,Q),wm(q,Q,void 0,void 0,q.BX)):(ZH(k.sH,"ADS_CLIENT_ERROR_TYPE_REGISTER_SLOT_FAILED","ADS_CLIENT_ERROR_MESSAGE_UNEXPECTED_ERROR",Q),wm(q,Q));break a}zT(k.V,Q).G=!0;try{var y=k.V;const q=zT(y,Q),r=Q.slotEntryTrigger,C=y.GQ.jw.get(r.triggerType);C&&(C.b7("TRIGGER_CATEGORY_SLOT_ENTRY",
r,Q,null),q.zt.set(r.triggerId,C));for(const P of Q.slotFulfillmentTriggers){const d=y.GQ.jw.get(P.triggerType);d&&(d.b7("TRIGGER_CATEGORY_SLOT_FULFILLMENT",P,Q,null),q.Vz.set(P.triggerId,d))}for(const P of Q.slotExpirationTriggers){const d=y.GQ.jw.get(P.triggerType);d&&(d.b7("TRIGGER_CATEGORY_SLOT_EXPIRATION",P,Q,null),q.N.set(P.triggerId,d))}const m=y.GQ.Rj.get(Q.slotType).get().build(y.D,Q);q.j=m;const A=y.GQ.wF.get(Q.slotType).get().build(y.L,Q);A.init();q.U=A}catch(q){q instanceof p&&q.Do?(ZH(k.sH,
"ADS_CLIENT_ERROR_TYPE_SCHEDULE_SLOT_FAILED",q.Do,Q),wm(q,Q,void 0,void 0,q.BX)):(ZH(k.sH,"ADS_CLIENT_ERROR_TYPE_SCHEDULE_SLOT_FAILED","ADS_CLIENT_ERROR_MESSAGE_UNEXPECTED_ERROR",Q),wm(q,Q));nO(k,Q,!0);break a}bD(k.sH,"ADS_CLIENT_EVENT_TYPE_SLOT_SCHEDULED",Q);k.V.sP(Q);for(const q of k.U)q.sP(Q);jB(k,Q)}},v6G=function(Z,k){var N=0x8000000000000;
let a=0,T=0x8000000000000;for(const q of k.slotFulfillmentTriggers){if(!(q instanceof $8)){wm("Found unexpected fulfillment trigger for throttled slot.",k,null,{fulfillmentTrigger:q});continue}const r=q.V.start;N=Math.min(N,r);a=Math.max(a,q.V.end);q.visible&&(T=Math.min(T,r))}const {startMs:K,endMs:y,PE:Q}={startMs:N,endMs:a,PE:T<0x8000000000000&&N<T?T:void 0};N=`${"throttledadcuerange"}:${k.slotId}`;Z.V.set(N,k);k=cM(Z.context.Gt.get(),"use_cue_range_marker_position")?Q:void 0;Z.JW.get().addCueRange(N,
K,y,!1,Z,void 0,void 0,void 0,k)},m5=function(Z,k){for(const N of Z.zk.values())if(N.layoutId===k)return!0;
return!1},sd=function(Z,k){for(const N of Z.V.values())for(const a of N)if(a.layoutId===k)return a;
wm("Trying to retrieve an unknown layout",void 0,void 0,{isEmpty:String(g.a2(k)),layoutId:k})},Ao=function(Z,k){const N=[];
for(const a of Z.CF.values()){const T=a.trigger;T instanceof gE&&T.triggeringLayoutId===k&&N.push(a)}N.length?IU(Z.Oz(),N):wm("Survey is submitted but no registered triggers can be activated.")},P7=function(Z,k){const N=[];
for(const a of Z.CF.values())a.trigger.V===k.layoutId&&N.push(a);N.length&&IU(Z.V(),N)},uk0=function(Z,k,N,a,T,K,y,Q,q,r){if(N9(Z.XS.get(),1).clientPlaybackNonce!==q)throw new p("Cannot register CueRange-based trigger for different content CPN",{trigger:N});
Z.CF.set(N.triggerId,{Hc:new c7(k,N,a,T),cueRangeId:K});Z.JW.get().addCueRange(K,y,Q,r,Z)},l3b=function(Z,k){for(const [N,
a]of Z.CF.entries())if(Z=N,k===a.cueRangeId)return Z;return""},f3r=function(Z,k){const N=[];
for(const a of Z.values())a.slot.slotId===k&&N.push(a);return N},O0=function(Z,k){k=k.layoutId;
const N=[];for(const T of Z.CF.values())if(T.trigger instanceof OO){var a;if(a=T.trigger.layoutId===k)a=(a=t7G.get(T.category))?a==="normal":!1;a&&N.push(T)}N.length&&IU(Z.V(),N)};
var B2f=function(Z,k){return W8[c[2]](this,1,220,Z,k)};
H7=function(Z,k,N,a,T){const K=[];for(const y of Z.CF.values()){const Q=y.trigger,q=y.slot;if(Q.triggerType===k){if(Q instanceof zk||Q instanceof UO||Q instanceof bb){if(T&&Q.breakDurationMs!==N)continue;if(!T&&Q.breakDurationMs===N)continue;if(a.has(q.slotId))continue}K.push(y)}}K.length>0&&IU(Z.G(),K)};
D6f=function(Z,k){k=(k.Xl+1)*1E3;let N=void 0;for(const {trigger:a,slot:T}of Z.CF.values())a instanceof zk&&a.breakDurationMs<=k&&(!N||a.breakDurationMs>N.trigger.breakDurationMs)&&(N={slot:T,trigger:a});return N};
ORN=function(Z){const k=[];for(const {trigger:N}of Z.CF.values())N instanceof zk&&k.push(N.breakDurationMs);return k};
dz=function(Z){Z.V=null;Z.CF.clear();Z.U&&Z.U.stop();Z.L&&Z.L.stop();Z.D?.stop();delete Z.D};
iRy=function(Z){g7(Z.Za.get(),"ads_ce",`bdc.${ORN(Z).length};fi.${!!Z.V};fet.${!!Z.U}`);Z.V&&(Z.Y=!0,Z.U&&(Z.U.stop(),Z.U.start()),vsf(Z,"TRIGGER_TYPE_PREFETCH_CACHE_EXPIRED"))};
gsG=function(Z){Z=Z.adPlacementRenderer.config.adPlacementConfig;if(Z.prefetchModeConfig&&Z.prefetchModeConfig.cacheFetchRefreshDurationMs&&(Z=Number(Z.prefetchModeConfig.cacheFetchRefreshDurationMs),!(isNaN(Z)||Z<=0)))return Z};
vsf=function(Z,k){const N=[];for(const a of Z.CF.values())a.trigger.triggerType===k&&N.push(a);N.length>0&&IU(Z.G(),N)};
wxy=function(Z){Z=Z.adPlacementRenderer.config.adPlacementConfig;if(!Z.prefetchModeConfig||!Z.prefetchModeConfig.cacheFetchSmearingDurationMs)return 0;Z=Number(Z.prefetchModeConfig.cacheFetchSmearingDurationMs);return isNaN(Z)||Z<=0?0:Math.floor(Math.random()*Z)};
$60=function(Z,k){const N=[];if(k=Z.V.get(k.layoutId))for(const a of k)(k=Z.U.get(a.triggerId))&&N.push(k);return N};
XP=function(Z){switch(Z){case "AD_PLACEMENT_KIND_START":return"LATENCY_AD_BREAK_TYPE_PREROLL";case "AD_PLACEMENT_KIND_MILLISECONDS":case "AD_PLACEMENT_KIND_COMMAND_TRIGGERED":case "AD_PLACEMENT_KIND_CUE_POINT_TRIGGERED":return"LATENCY_AD_BREAK_TYPE_MIDROLL";case "AD_PLACEMENT_KIND_END":return"LATENCY_AD_BREAK_TYPE_POSTROLL";default:return"LATENCY_AD_BREAK_TYPE_UNKNOWN"}};
x6r=function(Z){switch(Z){case "LAYOUT_TYPE_ENDCAP":return"adVideoEnd";case "LAYOUT_TYPE_SURVEY":return"surveyAd";case "LAYOUT_TYPE_VIDEO_INTERSTITIAL_BUTTONED_LEFT":return"surveyInterstitialAd";default:return"unknown"}};
GN0=function(Z,k){const N={slotId:BM(k,"SLOT_TYPE_IN_PLAYER"),slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,slotEntryTrigger:void 0,slotFulfillmentTriggers:[],slotExpirationTriggers:[],mp:"surface",clientMetadata:new SB([])};k=HM(k,"LAYOUT_TYPE_TEXT_BANNER_OVERLAY",N.slotId);k={layoutId:k,layoutType:"LAYOUT_TYPE_TEXT_BANNER_OVERLAY",d5:new Map,layoutExitNormalTriggers:[],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],
mp:"surface",clientMetadata:new SB([]),KF:CVy(!1,N.slotId,N.slotType,N.slotPhysicalPosition,N.mp,N.slotEntryTrigger,N.slotFulfillmentTriggers,N.slotExpirationTriggers,k,"LAYOUT_TYPE_TEXT_BANNER_OVERLAY","surface")};return{...Z,K2:!0,slot:N,layout:k}};
x2r=function(Z,k,N,a){var T=Z.kind;a=a?!1:!Z.hideCueRangeMarker;switch(T){case "AD_PLACEMENT_KIND_START":return a={vF:new XC(-0x8000000000000,-0x8000000000000),TL:a},N!=null&&(a.UR=new XC(-0x8000000000000,-0x8000000000000)),a;case "AD_PLACEMENT_KIND_END":return a={vF:new XC(0x7ffffffffffff,0x8000000000000),TL:a},N!=null&&(a.UR=new XC(Math.max(0,k-N),0x8000000000000)),a;case "AD_PLACEMENT_KIND_MILLISECONDS":T=Z.adTimeOffset;T.offsetStartMilliseconds||wm("AD_PLACEMENT_KIND_MILLISECONDS missing start milliseconds.");
T.offsetEndMilliseconds||wm("AD_PLACEMENT_KIND_MILLISECONDS missing end milliseconds.");Z=Number(T.offsetStartMilliseconds);T=Number(T.offsetEndMilliseconds);T===-1&&(T=k);if(Number.isNaN(Z)||Number.isNaN(T)||Z>T)return new p("AD_PLACEMENT_KIND_MILLISECONDS endMs needs to be >= startMs.",{offsetStartMs:Z,offsetEndMs:T},"ADS_CLIENT_ERROR_MESSAGE_AD_PLACEMENT_END_SHOULD_GREATER_THAN_START",T===k&&Z-500<=T);a={vF:new XC(Z,T),TL:a};if(N!=null){Z=Math.max(0,Z-N);if(Z===T)return a;a.UR=new XC(Z,T)}return a;
default:return new p("AdPlacementKind not supported in convertToRange.",{kind:T,adPlacementConfig:Z})}};
SXr=function(Z){if(!Z||!Z.adPlacements&&!Z.adSlots)return!1;for(const k of Z.adPlacements||[]){if(!k)continue;const N=k.adPlacementRenderer;if(N!=null&&(N.config&&N.config.adPlacementConfig&&N.config.adPlacementConfig.kind)==="AD_PLACEMENT_KIND_START")return!0}for(const k of Z.adSlots||[])if(g.J(k,PU)?.adSlotMetadata?.triggerEvent==="SLOT_TRIGGER_EVENT_BEFORE_CONTENT")return!0;return!1};
BM=function(Z,k){if(X$(Z.Gt.get())){let N=Z.U.get(k)||0;N++;Z.U.set(k,N);return`${k}_${N}`}return g.av(16)};
Ru=function(Z,k){if(X$(Z.Gt.get())){let N=Z.D.get(k)||0;N++;Z.D.set(k,N);return`${k}_${N}`}return g.av(16)};
HM=function(Z,k,N){if(X$(Z.Gt.get())){let a=Z.V.get(k)||0;a++;Z.V.set(k,a);return`${N}_${k}_${a}`}return g.av(16)};
osy=function(Z){const k=[new Oq(Z.OR),new ecf(Z.HS),new nq(Z.adPlacementConfig),new yi(Z.videoLengthSeconds),new kG(Z.A2)];Z.instreamAdPlayerOverlayRenderer&&k.push(new Cd(Z.instreamAdPlayerOverlayRenderer));Z.playerOverlayLayoutRenderer&&k.push(new m0(Z.playerOverlayLayoutRenderer));Z.Ds&&k.push(new $G(Z.Ds));return k};
JhX=function(Z,k,N,a,T,K){Z=N.inPlayerLayoutId?N.inPlayerLayoutId:HM(K,"LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY",Z);const y=N.instreamAdPlayerOverlayRenderer?N.instreamAdPlayerOverlayRenderer?.adLayoutLoggingData:N.playerOverlayLayoutRenderer?.adLayoutLoggingData,Q={layoutId:Z,layoutType:"LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY",mp:k};return{layoutId:Z,layoutType:"LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY",d5:new Map,layoutExitNormalTriggers:[new BU(q=>Ru(K,q),N.OR)],
layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],mp:k,clientMetadata:a,KF:T(Q),adLayoutLoggingData:y}};
Lpf=function(Z,k,N,a,T,K,y,Q,q){a.every(C=>v0(C,[],["LAYOUT_TYPE_MEDIA"]))||wm("Unexpect subLayout type for DAI composite layout");
k=HM(Z.U.get(),"LAYOUT_TYPE_COMPOSITE_PLAYER_BYTES",k);const r={layoutId:k,layoutType:"LAYOUT_TYPE_COMPOSITE_PLAYER_BYTES",mp:"core"};return{layoutId:k,layoutType:"LAYOUT_TYPE_COMPOSITE_PLAYER_BYTES",d5:new Map,layoutExitNormalTriggers:[new Jf(Z.V)],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],mp:"core",clientMetadata:new SB([new q0(N),new rc(Q),new a3r(a),new nq(T),new Pd(K),new dc,new j6f(q)]),KF:y(r)}};
vqi=function(Z,k,N,a,T,K,y,Q,q,r,C){Z=zcU(Z,k,"core",N,a,T,K,y,Q,q,r,void 0,C);return{layoutId:Z.layoutId,layoutType:Z.layoutType,d5:Z.d5,layoutExitNormalTriggers:Z.layoutExitNormalTriggers,layoutExitSkipTriggers:Z.layoutExitSkipTriggers,layoutExitMuteTriggers:Z.layoutExitMuteTriggers,layoutExitUserInputSubmittedTriggers:Z.layoutExitUserInputSubmittedTriggers,layoutExitUserCancelledTriggers:Z.layoutExitUserCancelledTriggers,mp:Z.mp,clientMetadata:new SB(Z.QY),KF:Z.KF,adLayoutLoggingData:Z.adLayoutLoggingData}};
tC=function(Z,k,N,a,T){const K=osy(a);return JhX(k,N,a,new SB(K),T,Z.U.get())};
weN=function(Z,k,N,a,T,K){N=new SB([new U6y(N),new nq(a)]);k=HM(Z.U.get(),"LAYOUT_TYPE_UNDERLAY_TEXT_ICON_BUTTON",k);a={layoutId:k,layoutType:"LAYOUT_TYPE_UNDERLAY_TEXT_ICON_BUTTON",mp:"core"};return{layoutId:k,layoutType:"LAYOUT_TYPE_UNDERLAY_TEXT_ICON_BUTTON",d5:new Map,layoutExitNormalTriggers:[new BU(y=>Ru(Z.U.get(),y),T)],
layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],mp:"core",clientMetadata:N,KF:K(a),adLayoutLoggingData:void 0}};
BOX=function(Z,k,N,a,T,K,y,Q,q,r,C,m){Z=YG(Z,k,N,a,T,K,y,Q,C,m);k=Z.ML;N=new SQ(Z.Z3);a=Z.layoutExitSkipTriggers;q>0&&(k.push(N),k.push(new zV(q)),a=[]);k.push(new eQ(r));return{Nj:{layoutId:Z.layoutId,layoutType:Z.layoutType,d5:Z.d5,layoutExitNormalTriggers:[],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],mp:Z.mp,clientMetadata:new SB(k),KF:Z.KF,adLayoutLoggingData:Z.adLayoutLoggingData},OS:a,xJ:Z.layoutExitMuteTriggers,
rH:Z.layoutExitUserInputSubmittedTriggers,QC:Z.layoutExitUserCancelledTriggers,rV:Z.rV}};
iUi=function(Z,k,N,a,T,K,y,Q,q){k=YG(Z,k,N,a,T,new Map,K,r=>y(r,Q));
Z=new gE(Z.V,k.Z3);N=new SQ(k.Z3);q=new eQ(q);return{Nj:{layoutId:k.layoutId,layoutType:k.layoutType,d5:k.d5,layoutExitNormalTriggers:[],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],mp:k.mp,clientMetadata:new SB([...k.ML,N,q]),KF:k.KF,adLayoutLoggingData:k.adLayoutLoggingData},OS:k.layoutExitSkipTriggers,xJ:k.layoutExitMuteTriggers,rH:[...k.layoutExitUserInputSubmittedTriggers,Z],QC:k.layoutExitUserCancelledTriggers,
rV:k.rV}};
N2G=function(Z,k,N,a,T,K,y,Q,q,r,C,m,A){k=zcU(Z,k,"adapter",N,a,T,K,y,Q,q,C,m,A);a=k.layoutExitSkipTriggers;T=k.QY;N.adPodSkipTarget&&N.adPodSkipTarget>0&&(T.push(r),T.push(new zV(N.adPodSkipTarget)),a=[]);T.push(new eQ(Q.adPodIndex));N.isCritical&&(a=[new DN(Z.V,k.layoutId,["error"]),...a]);return{Nj:{layoutId:k.layoutId,layoutType:k.layoutType,d5:k.d5,layoutExitNormalTriggers:[],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],
mp:k.mp,clientMetadata:new SB(T),KF:k.KF,adLayoutLoggingData:k.adLayoutLoggingData},OS:a,xJ:k.layoutExitMuteTriggers,rH:k.layoutExitUserInputSubmittedTriggers,QC:k.layoutExitUserCancelledTriggers}};
Rcy=function(Z,k,N,a,T){const K=osy(a);K.push(new bRr(a.Og));K.push(new pxR(a.f4));return JhX(k,N,a,new SB(K),T,Z.U.get())};
TK=function(Z,k,N,a,T,K,y,Q,q,r){k=HM(Z.U.get(),N,k);const C={layoutId:k,layoutType:N,mp:"core"},m=new Map;y&&m.set("impression",y);y=[new eS(Z.V,T,"SLOT_TYPE_PLAYER_BYTES","LAYOUT_TYPE_MEDIA")];r&&y.push(new DN(Z.V,r,["normal"]));return{layoutId:k,layoutType:N,d5:m,layoutExitNormalTriggers:y,layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],mp:"core",clientMetadata:new SB([a,new nq(K),new Oq(T)]),KF:Q(C),adLayoutLoggingData:q}};
Kw=function(Z,k,N,a,T,K,y,Q,q){k=HM(Z.U.get(),N,k);const r={layoutId:k,layoutType:N,mp:"core"},C=[new eS(Z.V,T,"SLOT_TYPE_PLAYER_BYTES","LAYOUT_TYPE_MEDIA")];q&&C.push(new DN(Z.V,q,["normal"]));return{layoutId:k,layoutType:N,d5:new Map,layoutExitNormalTriggers:C,layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],mp:"core",clientMetadata:new SB([a,new nq(K),new Oq(T)]),KF:y(r),adLayoutLoggingData:Q}};
jQ=function(Z,k,N){const a=[];a.push(new Lw(Z.V,N));k&&a.push(k);return a};
Iu=function(Z,k,N,a,T,K,y){const Q={layoutId:k,layoutType:N,mp:"core"};return{layoutId:k,layoutType:N,d5:new Map,layoutExitNormalTriggers:y,layoutExitSkipTriggers:[new wE(Z.V,k)],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],mp:"core",clientMetadata:new SB([new MWr(a),new nq(T)]),KF:K(Q),adLayoutLoggingData:a.adLayoutLoggingData}};
Z4=function(Z,k,N,a,T,K,y,Q){const q={layoutId:k,layoutType:K,mp:"core"};return{layoutId:k,layoutType:K,d5:new Map,layoutExitNormalTriggers:[new BU(Z.V,N)],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],mp:"core",clientMetadata:new SB([new nq(a),...y]),KF:T(q),adLayoutLoggingData:Q}};
YG=function(Z,k,N,a,T,K,y,Q,q,r){k=HM(Z.U.get(),"LAYOUT_TYPE_MEDIA_BREAK",k);const C={layoutId:k,layoutType:"LAYOUT_TYPE_MEDIA_BREAK",mp:"adapter"};Q=Q(k);const m=Q.clientMetadata.PD("metadata_type_fulfilled_layout");m||wm("Could not retrieve overlay layout ID during VodSkippableMediaBreakLayout creation. This should never happen.");const A=m?m.layoutId:"";N=[new nq(N),new b2(a),new N0(T)];m&&N.push(new pd(m.layoutType));r&&N.push(new Ld(r));return{layoutId:k,layoutType:"LAYOUT_TYPE_MEDIA_BREAK",
d5:K,layoutExitNormalTriggers:[],layoutExitSkipTriggers:[new vU(Z.V,A)],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],mp:"adapter",ML:N,KF:y(C),adLayoutLoggingData:q,rV:Q,Z3:A}};
zcU=function(Z,k,N,a,T,K,y,Q,q,r,C,m,A){const P={layoutId:k,layoutType:"LAYOUT_TYPE_MEDIA",mp:N};T=[new nq(T),new AC(q),new sq(a.externalVideoId),new Kd(Q),new N0({impressionCommands:a.impressionCommands,abandonCommands:a.onAbandonCommands,completeCommands:a.completeCommands,progressCommands:a.adVideoProgressCommands}),new Qi(K),new Hd({current:null}),new yi(y)];(K=a.playerOverlay.instreamAdPlayerOverlayRenderer)&&T.push(new Cd(K));(y=a.playerOverlay.playerOverlayLayoutRenderer)&&T.push(new m0(y));
m&&T.push(new QYU(m));(m=a.playerUnderlay)&&T.push(new U6y(m));Q=BM(Z.U.get(),"SLOT_TYPE_IN_PLAYER");m=(m=K?K.elementId:y?.layoutId)?m:HM(Z.U.get(),"LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY",Q);T.push(new SQ(m));T.push(new TOr(Q));T.push(new Ld(q.adPodIndex));a.adNextParams&&T.push(new ou(a.adNextParams));a.shrunkenPlayerBytesConfig&&T.push(new nsf(a.shrunkenPlayerBytesConfig));a.clickthroughEndpoint&&T.push(new JC(a.clickthroughEndpoint));a.legacyInfoCardVastExtension&&T.push(new qif(a.legacyInfoCardVastExtension));
a.sodarExtensionData&&T.push(new cd(a.sodarExtensionData));C&&T.push(new Uq(C));T.push(new Xb(xB(a.pings)));q=Gq(a.pings);if(A){a:{for(d of A)if(d.adSlotMetadata.slotType==="SLOT_TYPE_PLAYER_UNDERLAY"){A=g.J(d.fulfillmentContent.fulfilledLayout,sO);if(!A)continue;if((A=g.J(A.renderingContent,Cq))&&A.associatedPlayerBytesLayoutId===k)break a}var d=void 0}d&&T.push(new y00(d))}return{layoutId:k,layoutType:"LAYOUT_TYPE_MEDIA",d5:q,layoutExitNormalTriggers:[new OO(Z.V,k)],layoutExitSkipTriggers:a.skipOffsetMilliseconds?
[new vU(Z.V,m)]:[],layoutExitMuteTriggers:[new vU(Z.V,m)],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],mp:N,QY:T,KF:r(P),adLayoutLoggingData:a.adLayoutLoggingData}};
PRf=function(Z){return Z!=null};
U2R=function(Z,k,N,a,T){const K=BM(Z.U.get(),k);return V5(Z,K,k,new lb(Z.V,N),[new hf(Z.V,N),new ub(Z.V,K)],a,T)};
IA0=function(Z,k,N,a,T,K,y){const Q=BM(Z.U.get(),k);return V5(Z,Q,k,new DN(Z.V,T,["normal"]),[new hf(Z.V,N),new ub(Z.V,Q),new DN(Z.V,a,["error"])],K,y)};
jiN=function(Z,k,N,a,T,K){const y=BM(Z.U.get(),k);return V5(Z,y,k,new Gk(Z.V,a),[new hf(Z.V,N),new ub(Z.V,y),new DN(Z.V,a,["error"])],T,K)};
Ybb=function(Z,k,N,a,T){return I3X(Z,k,N,a,T)};
amX=function(Z,k,N,a,T){const K=BM(Z.U.get(),"SLOT_TYPE_IN_PLAYER");N=new F$(Z.V,a,N);a=[new ib(Z.V,K)];Z=[new hf(Z.V,k)];return{slotId:K,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,slotEntryTrigger:N,slotFulfillmentTriggers:a,slotExpirationTriggers:Z,mp:"core",clientMetadata:new SB([new M0(T({slotId:K,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,mp:"core",slotEntryTrigger:N,slotFulfillmentTriggers:a,slotExpirationTriggers:Z}))])}};
Q6G=function(Z,k,N,a){const T=BM(Z.U.get(),"SLOT_TYPE_IN_PLAYER");N=new Gk(Z.V,N);var K=[new ib(Z.V,T)];const y=[new ub(Z.V,T),new hf(Z.V,k)];K={slotId:T,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,mp:"core",slotEntryTrigger:N,slotFulfillmentTriggers:K,slotExpirationTriggers:y};return{slotId:T,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,slotEntryTrigger:N,slotFulfillmentTriggers:[new ib(Z.V,T)],slotExpirationTriggers:[new hf(Z.V,k),new ub(Z.V,T)],mp:"core",clientMetadata:new SB([new M0(a(K))])}};
c5y=function(Z,k,N,a,T){const K=BM(Z.U.get(),"SLOT_TYPE_PLAYER_BYTES"),y=new op(Z.V),Q=[new tf(Z.V,K)];Z=[new hf(Z.V,k)];k=[];k.push(new M0(a({slotId:K,slotType:"SLOT_TYPE_PLAYER_BYTES",slotPhysicalPosition:1,mp:"core",slotEntryTrigger:y,slotFulfillmentTriggers:Q,slotExpirationTriggers:Z})));k.push(new dc);T&&k.push(new l2({current:T}));return{slotId:K,slotType:"SLOT_TYPE_PLAYER_BYTES",slotPhysicalPosition:1,slotEntryTrigger:y,slotFulfillmentTriggers:Q,slotExpirationTriggers:Z,mp:"core",clientMetadata:new SB(k),
adSlotLoggingData:N}};
hHG=function(Z,k,N,a,T,K,y){const Q=BM(Z.U.get(),"SLOT_TYPE_IN_PLAYER"),q=HM(Z.U.get(),"LAYOUT_TYPE_TEXT_BANNER_OVERLAY",Q);a=jjf(Z,a,K,y,q);if(a instanceof p)return a;y=[new ib(Z.V,Q)];T=[new hf(Z.V,K),new ib(Z.V,T),new to(Z.V,T)];N=GT(N,{slotId:Q,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,mp:"core",slotEntryTrigger:a,slotFulfillmentTriggers:y,slotExpirationTriggers:T});Z=Z.D.get();K={layoutId:q,layoutType:"LAYOUT_TYPE_TEXT_BANNER_OVERLAY",mp:"core"};k={layoutId:q,layoutType:"LAYOUT_TYPE_TEXT_BANNER_OVERLAY",
d5:new Map,layoutExitNormalTriggers:[new Esy(Z.V,q,k.durationMs)],layoutExitSkipTriggers:[new WY0(Z.V,q,k.durationMs)],layoutExitUserCancelledTriggers:[new YXU(Z.V,q)],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],mp:"core",clientMetadata:new SB([new Zm0(k)]),KF:N(K)};return{slotId:Q,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,mp:"core",slotEntryTrigger:a,slotFulfillmentTriggers:y,slotExpirationTriggers:T,clientMetadata:new SB([new M0(k)])}};
B$f=function(Z,k,N,a,T){k=ohf(Z,k);Z=ZX(Z,k,N);T=T({slotId:Z.slotId,slotType:Z.slotType,slotPhysicalPosition:Z.slotPhysicalPosition,slotEntryTrigger:Z.slotEntryTrigger,slotFulfillmentTriggers:Z.slotFulfillmentTriggers,slotExpirationTriggers:Z.slotExpirationTriggers,mp:Z.mp});return T instanceof p?T:{VK:{...Z,clientMetadata:new SB([new M0(T.layout)]),adSlotLoggingData:a},Ze:T.Ze}};
DSR=function(Z,k,N,a,T,K,y){N=J0y(Z,k,N,a);if(N instanceof p)return N;y=y({slotId:N.slotId,slotType:N.slotType,slotPhysicalPosition:N.slotPhysicalPosition,slotEntryTrigger:N.slotEntryTrigger,slotFulfillmentTriggers:N.slotFulfillmentTriggers,slotExpirationTriggers:N.slotExpirationTriggers,mp:N.mp});if(y instanceof p)return y;Z=[new M0(y.layout),new fd({T3:Z.T3(k)})];K&&Z.push(new oqj({}));return{VK:{slotId:N.slotId,slotType:N.slotType,slotPhysicalPosition:N.slotPhysicalPosition,slotEntryTrigger:N.slotEntryTrigger,
slotFulfillmentTriggers:N.slotFulfillmentTriggers,slotExpirationTriggers:N.slotExpirationTriggers,mp:N.mp,clientMetadata:new SB(Z),adSlotLoggingData:T},Ze:y.Ze}};
iEy=function(Z,k,N,a,T){T=T?T:BM(Z.U.get(),"SLOT_TYPE_IN_PLAYER");N=new Gk(Z.V,N);const K=[new ib(Z.V,T)];Z=[new hf(Z.V,k),new ub(Z.V,T)];return{slotId:T,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,slotEntryTrigger:N,slotFulfillmentTriggers:K,slotExpirationTriggers:Z,mp:"core",clientMetadata:new SB([new M0(a({slotId:T,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,mp:"core",slotEntryTrigger:N,slotFulfillmentTriggers:K,slotExpirationTriggers:Z}))])}};
gqy=function(Z,k,N,a){const T=BM(Z.U.get(),"SLOT_TYPE_PLAYER_UNDERLAY");N=new Gk(Z.V,N);const K=[new ib(Z.V,T)];Z=[new hf(Z.V,k),new ub(Z.V,T)];return{slotId:T,slotType:"SLOT_TYPE_PLAYER_UNDERLAY",slotPhysicalPosition:1,slotEntryTrigger:N,slotFulfillmentTriggers:K,slotExpirationTriggers:Z,mp:"core",clientMetadata:new SB([new M0(a({slotId:T,slotType:"SLOT_TYPE_PLAYER_UNDERLAY",slotPhysicalPosition:1,mp:"core",slotEntryTrigger:N,slotFulfillmentTriggers:K,slotExpirationTriggers:Z}))])}};
dai=function(Z,k,N,a,T){N=N?"SLOT_TYPE_PLAYER_BYTES_SEQUENCE_ITEM":"SLOT_TYPE_PLAYBACK_TRACKING";const K=BM(Z.U.get(),N);k=new lb(Z.V,k);const y=[new ib(Z.V,K)];Z=[new ub(Z.V,K)];return{slotId:K,slotType:N,slotPhysicalPosition:1,slotEntryTrigger:k,slotFulfillmentTriggers:y,slotExpirationTriggers:Z,mp:"core",clientMetadata:new SB([new M0(T({slotId:K,slotType:N,slotPhysicalPosition:1,mp:"core",slotEntryTrigger:k,slotFulfillmentTriggers:y,slotExpirationTriggers:Z}))]),adSlotLoggingData:a}};
V50=function(Z,k,N,a,T,K){const y=BM(Z.U.get(),"SLOT_TYPE_FORECASTING");k=ho(Z,k,N,a);if(k instanceof p)return k;a=[new ib(Z.V,y)];Z=[new ub(Z.V,y),new hf(Z.V,N)];return{slotId:y,slotType:"SLOT_TYPE_FORECASTING",slotPhysicalPosition:1,slotEntryTrigger:k,slotFulfillmentTriggers:a,slotExpirationTriggers:Z,mp:"core",clientMetadata:new SB([new M0(K({slotId:y,slotType:"SLOT_TYPE_FORECASTING",slotPhysicalPosition:1,mp:"core",slotEntryTrigger:k,slotFulfillmentTriggers:a,slotExpirationTriggers:Z}))]),adSlotLoggingData:T}};
hji=function(Z,k,N,a){const T=BM(Z.U.get(),"SLOT_TYPE_IN_PLAYER"),K=new lb(Z.V,k),y=[new tf(Z.V,T)];Z=[new hf(Z.V,k),new ub(Z.V,T)];return{slotId:T,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,slotEntryTrigger:K,slotFulfillmentTriggers:y,slotExpirationTriggers:Z,mp:"core",clientMetadata:new SB([new M0(a({slotId:T,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,mp:"core",slotEntryTrigger:K,slotFulfillmentTriggers:y,slotExpirationTriggers:Z}))]),adSlotLoggingData:N}};
l_y=function(Z,k,N,a,T,K){k=ho(Z,k,N,a);if(k instanceof p)return k;const y=k instanceof $8?new kir(Z.V,N,k.V):null;a=BM(Z.U.get(),"SLOT_TYPE_IN_PLAYER");const Q=[new ib(Z.V,a)];Z=[new hf(Z.V,N),new ub(Z.V,a)];K=K({slotId:a,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,mp:"core",slotEntryTrigger:k,slotFulfillmentTriggers:Q,slotExpirationTriggers:Z},y);return K instanceof ND?new p(K):{slotId:a,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,slotEntryTrigger:k,slotFulfillmentTriggers:Q,
slotExpirationTriggers:Z,mp:"core",clientMetadata:new SB([new M0(K)]),adSlotLoggingData:T}};
DaX=function(Z,k,N,a){const T=BM(Z.U.get(),"SLOT_TYPE_IN_PLAYER");return I3X(Z,T,k,N,a)};
T2X=function(Z,k,N,a,T,K){const y=BM(Z.U.get(),"SLOT_TYPE_PLAYER_BYTES"),Q=BM(Z.U.get(),"SLOT_TYPE_IN_PLAYER"),q=HM(Z.U.get(),"LAYOUT_TYPE_SURVEY",Q);a=ho(Z,k,N,a);const r=[new ib(Z.V,y)];N=[new ub(Z.V,y),new hf(Z.V,N),new wE(Z.V,q)];if(a instanceof p)return a;const {lw:C,jA:m}=K({slotId:y,slotType:"SLOT_TYPE_PLAYER_BYTES",slotPhysicalPosition:1,mp:"core",slotEntryTrigger:a,slotFulfillmentTriggers:r,slotExpirationTriggers:N},{slotId:Q,layoutId:q});return[{slotId:y,slotType:"SLOT_TYPE_PLAYER_BYTES",
slotPhysicalPosition:1,slotEntryTrigger:a,slotFulfillmentTriggers:r,slotExpirationTriggers:N,mp:"core",clientMetadata:new SB([new M0(C),new fd({T3:Z.T3(k)})]),adSlotLoggingData:T},m]};
d6X=function(Z,k,N,a,T,K,y){if(!N.prefetchModeConfig)return new p("AdPlacementConfig for Live Prefetch is missing prefetch_config");N=N.prefetchModeConfig;a*=1E3;const Q=[];if(!N.breakLengthMs)return new p("AdPlacementConfig for Live Prefetch is missing break_length_ms");for(const C of N.breakLengthMs)if(Number(C)>0){var q=a+Number(N.startTimeOffsetMs),r=q+Number(N.cacheFetchSmearingDurationMs);q={vF:new XC(r,r+Number(C)),TL:!1,UR:new XC(Math.floor(q+Math.random()*Number(N.cacheFetchSmearingDurationMs)),
r),cueProcessedMs:a?a:q};r=[];r.push(new Eq0);const m=[];m.push(new pq(Z.V));m.push(new N6r(Z.V));y&&r.push(new dc);Q.push(Fe(Z,k,T,q,K,r,m))}return Q};
Fe=function(Z,k,N,a,T,K=[],y){const Q=BM(Z.U.get(),"SLOT_TYPE_AD_BREAK_REQUEST");y||(y=[],a.UR&&a.UR.start!==a.vF.start&&y.push(new $8(Z.V,N,new XC(a.UR.start,a.vF.start),!1)),y.push(new $8(Z.V,N,new XC(a.vF.start,a.vF.end),a.TL)));a={getAdBreakUrl:k.getAdBreakUrl,FM:a.vF.start,SP:a.vF.end,cueProcessedMs:a.cueProcessedMs};k=new u_(Z.V,Q);K=[new Sbj(a),...K];return{slotId:Q,slotType:"SLOT_TYPE_AD_BREAK_REQUEST",slotPhysicalPosition:1,slotEntryTrigger:k,slotFulfillmentTriggers:y,slotExpirationTriggers:[new hf(Z.V,
N),new ub(Z.V,Q),new l_(Z.V,Q)],mp:"core",clientMetadata:new SB(K),adSlotLoggingData:T}};
aFf=function(Z,k,N){const a=[];for(const T of N)a.push(T.triggeringSlotId!=null&&T.triggeringSlotId===Z?T.clone(k):T);return a};
I3X=function(Z,k,N,a,T){const K=new Gk(Z.V,N),y=[new ib(Z.V,k)];Z=[new ub(Z.V,k),new hf(Z.V,a)];return{slotId:k,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,slotEntryTrigger:K,slotFulfillmentTriggers:y,slotExpirationTriggers:Z,mp:"core",clientMetadata:new SB([new M0(T({slotId:k,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,mp:"core",slotEntryTrigger:K,slotFulfillmentTriggers:y,slotExpirationTriggers:Z},N))]),adSlotLoggingData:void 0}};
ho=function(Z,k,N,a){return T6j(Z,k,N,a,(T,K)=>new $8(Z.V,N,T,K))};
jjf=function(Z,k,N,a,T){return T6j(Z,k,N,a,(K,y)=>new KoN(Z.V,N,K,y,T))};
V5=function(Z,k,N,a,T,K,y){Z=[new tf(Z.V,k)];return{slotId:k,slotType:N,slotPhysicalPosition:1,slotEntryTrigger:a,slotFulfillmentTriggers:Z,slotExpirationTriggers:T,mp:"core",clientMetadata:new SB([new M0(y({slotId:k,slotType:N,slotPhysicalPosition:1,mp:"core",slotEntryTrigger:a,slotFulfillmentTriggers:Z,slotExpirationTriggers:T}))]),adSlotLoggingData:K}};
ohf=function(Z,k){return Cvf(Z.Gt.get())?new DN(Z.V,k,["normal","error","skipped"]):new DN(Z.V,k,["normal"])};
ZX=function(Z,k,N){const a=BM(Z.U.get(),"SLOT_TYPE_PLAYER_BYTES"),T=[new ib(Z.V,a)];Z=[new ub(Z.V,a),new hf(Z.V,N)];return{slotId:a,slotType:"SLOT_TYPE_PLAYER_BYTES",slotPhysicalPosition:1,slotEntryTrigger:k,slotFulfillmentTriggers:T,slotExpirationTriggers:Z,mp:"core"}};
J0y=function(Z,k,N,a){k=ho(Z,k,N,a);return k instanceof p?k:ZX(Z,k,N)};
T6j=function(Z,k,N,a,T){const K=!k.hideCueRangeMarker;switch(k.kind){case "AD_PLACEMENT_KIND_START":return new lb(Z.V,N);case "AD_PLACEMENT_KIND_MILLISECONDS":return Z=x2r(k,a),Z instanceof p?Z:T(Z.vF,K);case "AD_PLACEMENT_KIND_END":return new x8(Z.V,N,K);default:return new p("Cannot construct entry trigger",{kind:k.kind})}};
bD=function(Z,k,N){Z.V(k,void 0,void 0,void 0,N,void 0,void 0,void 0,N.adSlotLoggingData)};
ZH=function(Z,k,N,a,T){Z.V("ADS_CLIENT_EVENT_TYPE_ERROR",void 0,void 0,void 0,a,T,void 0,void 0,a.adSlotLoggingData,T?T.adLayoutLoggingData:void 0,{errorType:k,errorMessage:N})};
W0=function(Z,k,N,a){Z.V(k,void 0,void 0,void 0,N,a?a:void 0,void 0,void 0,N.adSlotLoggingData,a?a.adLayoutLoggingData:void 0);k=Pu().resolve(r6(QW))?.kC();N=k?.adsHotConfig;k?.adsSeenHotConfig?.logOnAdsSeen&&N?.webEnablePremiumAdsSeenLogging&&y6y(Z,a?a:void 0)};
F3f=function(Z,k,N,a){cM(Z.Gt.get(),"h5_enable_pacf_debug_logs")&&console.log("[PACF]: ADS_CLIENT_EVENT_TYPE_TRIGGER_ACTIVATED","trigger:",N,"slot:",k,"layout:",a);xo(Z.U.get())&&Z.V("ADS_CLIENT_EVENT_TYPE_TRIGGER_ACTIVATED",void 0,void 0,void 0,k,a?a:void 0,void 0,N,k.adSlotLoggingData,a?a.adLayoutLoggingData:void 0)};
y6y=function(Z,k){if(k){var N=k.adLayoutLoggingData;g.c9(g.dO(),()=>{Z.D?.V(N)},0)}};
fw=function(Z,k){return Z.V.get(k)||null};
Qvy=function(){let Z,k;return{tM:new B7((N,a)=>{Z=N;k=a}),
resolve:Z,reject:k}};
Od=function(Z){return DX(Z)?Z:Vb(Z)?new B7((k,N)=>{Z.then(k,N)}):new B7(k=>{k(Z)})};
v7=function(Z){return new B7((k,N)=>{N(Z)})};
i_=function(Z){try{return Od(Z())}catch(k){return v7(k)}};
qny=function(Z){return new Promise((k,N)=>{gz(Z,k,N)})};
r6r=async function(Z){return qny(Z)};
wz=function(Z){if(Z.V==="fulfilled"){var k=Z.U;Z.U=[];Z.D=[];for(var N of k)N(Z.result)}else if(Z.V==="rejected"){N=Z.D;Z.U=[];Z.D=[];for(k of N)k(Z.error)}};
gz=function(Z,k,N){const {tM:a,resolve:T,reject:K}=Qvy();Z.U.push(y=>{if(k)try{const Q=k(y);T(Q)}catch(Q){K(Q)}else T(y)});
Z.D.push(y=>{if(N)try{const Q=N(y);T(Q)}catch(Q){K(Q)}else K(y)});
wz(Z);return a};
$i=function(Z,k){return gz(Z,void 0,k)};
Cdf=function(Z,k){gz(Z,N=>gz(Od(k()),()=>N),N=>gz(Od(k()),()=>v7(N)))};
xi=function(Z,k){return m$G(k.call(Z))};
GK=function(Z){return function*(){return yield{tM:Od(Z)}}()};
m$G=function(Z){return i_(()=>S$(Z,Z.next()))};
S$=function(Z,k){return k.done?Od(k.value):$i(gz(k.value.tM,N=>S$(Z,Z.next(N))),N=>S$(Z,Z.throw(N)))};
Pdy=function(Z){const k=svb(Z);return gz(A6f(k),()=>k.map(N=>N.state()))};
A6f=function(Z){if(Z.length===0)return Od(NaN);const {tM:k,resolve:N}=Qvy();let a=Z.length;for(const [T,K]of Z.entries()){const y=T;Cdf(K,()=>{k.V==="pending"&&(c6y(void 0)&&(void 0)(y)&&k.V==="pending"?N(y):(--a,a===0&&N(NaN)))})}return k};
svb=function(Z){return Z.map(k=>Od(k))};
oh=function(Z){var k=Z.hours||0;var N=Z.minutes||0,a=Z.seconds||0;k=a+N*60+k*3600+(Z.days||0)*86400+(Z.weeks||0)*604800+(Z.months||0)*2629800+(Z.years||0)*31557600;k<=0?k={hours:0,minutes:0,seconds:0}:(Z=k,k=Math.floor(Z/3600),Z%=3600,N=Math.floor(Z/60),a=Math.floor(Z%60),k={hours:k,minutes:N,seconds:a});const {hours:T=0,minutes:K=0,seconds:y=0}=k;N=T>0;k=[];if(N){Z=(new Intl.NumberFormat("en-u-nu-latn")).format(T);a=["fr"];const Q="az bs ca da de el es eu gl hr id is it km lo mk nl pt-BR ro sl sr sr-Latn tr vi".split(" ");
Z="af be bg cs et fi fr-CA hu hy ka kk ky lt lv no pl pt-PT ru sk sq sv uk uz".split(" ").includes(e$)?Z.replace(",","\u00a0"):a.includes(e$)?Z.replace(",","\u202f"):Q.includes(e$)?Z.replace(",","."):Z;k.push(Z)}N=HmG(K,N);k.push(N);N=d$G().format(y);k.push(N);N=":";"da fi id si sr sr-Latn".split(" ").includes(e$)&&(N=".");return k.join(N)};
d$G=function(){return new Intl.NumberFormat("en-u-nu-latn",{minimumIntegerDigits:2})};
HmG=function(Z,k=!1){return(["af","be","lt"].includes(e$)||k)&&Z<10?d$G().format(Z):(new Intl.NumberFormat("en-u-nu-latn")).format(Z)};
Xuf=function(Z,k){Z=Z.watchEndpointSupportedAuthorizationTokenConfig?.videoAuthorizationToken?.credentialTransferTokens||[];for(let N=0;N<Z.length;++N)if(Z[N].scope===k)return Z[N].token||void 0};
Jo=function(Z){if(Z&&Z.simpleText)return Z.simpleText;let k="";if(Z&&Z.runs)for(let N=0;N<Z.runs.length;N++)Z.runs[N].text&&(k+=Z.runs[N].text);return k};
zK=function(Z){return Z?function(){try{return Z.apply(this,arguments)}catch(k){g.b(k)}}:Z};
b_=function(){Ud.instance||(Ud.instance=new Ud);return Ud.instance};
Rh=function(){pw.instance||(pw.instance=new pw);return pw.instance};
MB=function(Z,k,N,a={}){g.ai(()=>{LoG.includes(k)||(g.L9(new g.jD("createClientScreen() called with a non-page VE",k)),k=83769);a.isHistoryNavigation||Z.V.push({rootVe:k,key:a.key||""});Z.C=[];Z.N=[];a.eM?V1N(Z,k,N,a):Fof(Z,k,N,a)})()};
V1N=function(Z,k,N,a={}){Z.U.add(a.layer||0);Z.L=()=>{Fof(Z,k,N,a);const T=g.rl(a.layer);if(T){for(const K of Z.C)nw(Z,K[0],K[1]||T,a.layer);for(const K of Z.N)t1N(Z,K[0],K[1])}};
N||g.C9(a.layer)||Z.L();if(a.eM)for(const T of a.eM)h9b(Z,T,a.layer);else g.b(Error("Delayed screen needs a data promise."))};
Fof=function(Z,k,N,a={}){var T=void 0;a.layer||(a.layer=0);T=a.parentLayer!==void 0?a.parentLayer:a.layer;const K=g.C9(T);T=g.rl(T);const y=N||T;let Q;y&&(a.parentCsn!==void 0?Q={clientScreenNonce:a.parentCsn,visualElement:y}:K&&K!=="UNDEFINED_CSN"&&(Q={clientScreenNonce:K,visualElement:y}));let q;const r=g.G("EVENT_ID");K==="UNDEFINED_CSN"&&r&&(q={servletData:{serializedServletEventId:r}});g.ii("combine_ve_grafts")&&K&&Ih(Z,K);g.ii("no_client_ve_attach_unless_shown")&&y&&K&&xL(y,K);let C;try{C=Xlr(Z.client,
k,Q,a.I9,a.cttAuthInfo,q,a.implicitGestureType,a.loggingExpectations,a.automatedLogEventSource)}catch(A){hn(A,{JJ:k,rootVe:T,Art:N,JIt:K,WoS:Q,I9:a.I9});g.b(A);return}U1R(C,k,a.layer,a.cttAuthInfo);K&&K!=="UNDEFINED_CSN"&&T&&!oX0(K)&&V4R(Z.client,K,T,!0);Z.V[Z.V.length-1]&&!Z.V[Z.V.length-1].csn&&(Z.V[Z.V.length-1].csn=C||"");g.lJ({clientScreenNonce:C});j$.instance||(j$.instance=new j$);g.ai(b_().V).bind(b_())();const m=g.rl(a.layer);K&&K!=="UNDEFINED_CSN"&&m&&g.ii("music_web_mark_root_visible")&&
g.zO(C,m);Z.U.delete(a.layer||0);Z.L=void 0;Z.xW.get(a.layer)?.forEach((A,P)=>{A?nw(Z,P,A,a.layer):m&&nw(Z,P,m,a.layer)});
u4f(Z)};
h9b=function(Z,k,N=0){g.ai(()=>{k.then(a=>{Z.U.has(N)&&Z.L&&Z.L();const T=g.C9(N),K=g.rl(N);if(T&&K){var y={automatedLogEventSource:3};a?.response?.trackingParams&&g.wl(Z.client,T,K,g.yz(a.response.trackingParams),!1,y);a?.playerResponse?.trackingParams&&g.wl(Z.client,T,K,g.yz(a.playerResponse.trackingParams),!1,y)}})})()};
nw=function(Z,k,N,a=0){return g.ai(()=>{if(Z.U.has(a))return Z.C.push([k,N]),!0;const T=g.C9(a),K=N||g.rl(a);if(T&&K){if(g.ii("combine_ve_grafts")){const y=Z.Y.get(K.toString());y?y.push(k):(Z.j.set(K.toString(),K),Z.Y.set(K.toString(),[k]));Z.O||(Z.O=g.c9(0,()=>{Ih(Z,T)},1200))}else g.wl(Z.client,T,K,k);
return!0}return!1})()};
Ed=function(Z){var k=Rh();g.ai(()=>{const N=g.yz(Z);nw(k,N);return N})()};
lFf=function(Z){var k={veType:253246};return g.ai(()=>{if(!k.veType)return Xf(new g.jD("Error: Trying to graft a client VE without a veType.")),null;if(k.visibilityTypes){var N=k.visibilityTypes.reduce((a,T)=>a|T);
N={visibility:{types:String(N)}}}N=Qz(k.veType,k.visualElement,k.elementIndex,k.clientYouTubeData,void 0,N);return nw(Z,N)?N:null})()};
Ih=function(Z,k){if(k===void 0){const N=SIy();for(let a=0;a<N.length;a++)N[a]!==void 0&&Ih(Z,N[a])}else Z.Y.forEach((N,a)=>{(a=Z.j.get(a))&&g.gl(Z.client,k,a,N)}),Z.Y.clear(),Z.j.clear(),Z.O=void 0};
fFR=function(Z,k){const N=g.C9(0);N&&eH(Z.client,N,k,void 0)};
B60=function(Z,k,N,a=0){if(!k)return!1;a=g.C9(a);if(!a)return!1;eH(Z.client,a,g.yz(k),N);return!0};
t1N=function(Z,k,N,a=0){const T=g.C9(a);k=k||g.rl(a);T&&k&&(Z=Z.client,a=DS({cttAuthInfo:mf(T)||void 0},T),N={csn:T,ve:k.getAsJson(),clientData:N},T==="UNDEFINED_CSN"?GO("visualElementStateChanged",a,N):Z?NP("visualElementStateChanged",N,Z,a):g.TO("visualElementStateChanged",N,a))};
u4f=function(Z){for(var k=0;k<Z.G.length;k++){var N=Z.G[k];try{N()}catch(a){g.b(a)}}Z.G.length=0;for(k=0;k<Z.Vz.length;k++){N=Z.Vz[k];try{N()}catch(a){g.b(a)}}};
D$X=function(){W7.instance||(W7.instance=new W7);return W7.instance};
Omb=function(Z,k,N){const a=new XMLHttpRequest;N?.DJ&&(a.onreadystatechange=T=>{N.DJ(a,T)});
a.open(k.method??"GET",Z,!0);a.responseType="text";a.withCredentials=!0;if(k.headers)for(const [T,K]of Object.entries(k.headers))a.setRequestHeader(T,K);return a};
vdf=function(){const Z=navigator;return new Promise((k,N)=>{Z.webkitTemporaryStorage?.queryUsageAndQuota?Z.webkitTemporaryStorage.queryUsageAndQuota((a,T)=>{k({usage:a,quota:T})},a=>{N(a)}):N(Error("webkitTemporaryStorage is not supported."))})};
gdi=function(Z,k){Yi.getInstance().estimate().then(N=>{Z.V("idbQuotaExceeded",{...k,isSw:self.document===void 0,isIframe:self!==self.top,deviceStorageUsageMbytes:imX(N?.usage),deviceStorageQuotaMbytes:imX(N?.quota)})})};
imX=function(Z){return typeof Z==="undefined"?"-1":String(Math.ceil(Z/1048576))};
$$b=function(){const Z=g.QC();return Z.Aq(192)?Z.Aq(190):!(g.ii("web_watch_cinematics_disabled_by_default")||g.ii("web_watch_cinematics_preferred_reduced_motion_default_disabled")&&wuf())};
GiU=function(Z,k){x$y(Z.program,k.fB)&&(gV("bg_i",void 0,"player_att"),g.Zb.initialize(Z,()=>{gV("bg_l",void 0,"player_att");kC=(0,g.z)()},k.cspNonce,k.Bo))};
Snf=function(Z={}){return g.Zb.invoke(Z)};
x$y=function(Z,k){if(Z){var N;g.Zb.isLoading()?N=!1:N=!kC||(0,g.z)()-kC>k;Z=N}else Z=!1;return Z};
e9i=function(Z,k){if(k.partnerId===38&&Z.playerStyle==="books")return Z=k.videoId.indexOf(":"),g.mW(`//play.google.com/books/volumes/${k.videoId.slice(0,Z)}/content/media`,{aid:k.videoId.slice(Z+1),sig:k.r4});if(k.partnerId===30&&Z.playerStyle==="docs")return g.mW("https://docs.google.com/get_video_info",{docid:k.videoId,authuser:k.qg,authkey:k.J8,eurl:Z.LC});if(k.partnerId===33&&Z.playerStyle==="google-live")return g.mW("//google-liveplayer.appspot.com/get_video_info",{key:k.videoId});throw Error("getVideoInfoUrl for invalid namespace: "+
Z.Vz);};
g.Nr=function(Z,k){return Z.Bo+"timedtext_video?ref=player&v="+k.videoId};
ody=function(Z){const k={};Z.O1&&(k.ytrext=Z.O1);return g.ze(k)?void 0:k};
g.aV=function(Z,k){GiU(Z,{fB:g.Q5(k.experiments,"bg_vm_reinit_threshold"),cspNonce:k.cspNonce,Bo:k.Bo||""})};
g.J6X=function(Z){if(Z.videoData&&Z.videoData.F_){const k=[Z.videoData.F_];for(const N of Object.keys(Z.V))if(Z.Qa[N]&&Z.V[N]){const a=Z.V[N](Z.Qa);a&&k.push(a)}return k.join("&")}return null};
z90=function(){const Z=XMLHttpRequest.prototype.fetch;return!!Z&&Z.length===3};
bm0=function(Z){U$N=2592E3*(Z||1)};
puf=function(Z){g.Z_("yt-player-bandwidth",Z,2592E3)};
T8=function(Z=U$N){if(Z>0&&!(WbU()>(0,g.z)()-Z*1E3))return 0;Z=g.kh("yt-player-quality");if(typeof Z==="string"){if(Z=g.ff[Z],Z>0)return Z}else if(Z instanceof Object)return Z.quality;return 0};
Ks=function(){const Z=g.kh("yt-player-proxima-pref");return Z==null?null:Z};
R9i=function(){const Z=g.kh("yt-player-quality");if(Z instanceof Object&&Z.quality&&Z.previousQuality){if(Z.quality>Z.previousQuality)return 1;if(Z.quality<Z.previousQuality)return-1}return 0};
M1f=function(){const Z={values:{},SV:{}};try{const k=JSON.parse(JSON.parse(window.localStorage["yt-player-memory"]).data);Z.values=k.values;Z.halfLives=k.halfLives}catch{}return Z};
yc=function(){return g.kh("yt-player-performance-cap")||{}};
ndU=function(Z=!1){if(Z){Z=yc();for(const k of Object.keys(Z))k.indexOf("1")!==0&&delete Z[k];g.Z_("yt-player-performance-cap",Z,2592E3)}else g.Na("yt-player-performance-cap")};
Qc=function(){return g.kh("yt-player-performance-cap-active-set")??[]};
IFr=function(Z=!1){Z?(Z=Qc().filter(k=>k.startsWith("1")),g.Z_("yt-player-performance-cap-active-set",Z,2592E3)):g.Z_("yt-player-performance-cap-active-set",[],2592E3)};
jvU=function(Z){g.Z_("yt-player-watch-later-pending",Z)};
Edy=function(){return!!g.kh("yt-player-headers-readable")};
g.qr=function(){const Z=g.kh("yt-player-caption-language-preferences");return Z?Z:[]};
rg=function(){const Z=g.kh("yt-player-user-settings"),k=new Map;if(Z)for(const [N,a]of Object.entries(Z))k.set(N,a);return k};
Wo0=function(){return g.kh("yt-player-voice-boost")??void 0};
YnU=function(){return g.kh("yt-player-audio-quality-setting")??2};
ma=function(){try{const Z=window.navigator;if(Z.getAutoplayPolicy&&typeof Z.getAutoplayPolicy==="function"){const k=document.getElementsByClassName(g.Cs.pO);let N;N=k.length>0&&k[0]?Z.getAutoplayPolicy(k[0]):Z.getAutoplayPolicy("mediaelement");if(Z9G[N])return Z9G[N]}}catch(Z){}return"AUTOPLAY_BROWSER_POLICY_UNSPECIFIED"};
sR=function(Z){return Z.Ap||Z.Ix||Z.mutedAutoplay};
kOR=function(Z,k){return sR(Z)?k!==1&&k!==2&&k!==0?"AUTOPLAY_STATUS_UNAVAILABLE":Z.fS?"AUTOPLAY_STATUS_BLOCKED":"AUTOPLAY_STATUS_OCCURRED":"AUTOPLAY_STATUS_NOT_ATTEMPTED"};
Nl0=function(Z,k,N){const a=k.X();Z.thirdParty||(Z.thirdParty={});Z.thirdParty={...Z.thirdParty,embedUrl:a.loaderUrl};a.ancestorOrigins&&(Z.thirdParty.embeddedPlayerContext={...Z.thirdParty.embeddedPlayerContext,ancestorOrigins:a.ancestorOrigins});a.nm!=null&&(Z.thirdParty.embeddedPlayerContext={...Z.thirdParty.embeddedPlayerContext,visibilityFraction:Number(a.nm)});a.eL&&(Z.thirdParty.embeddedPlayerContext={...Z.thirdParty.embeddedPlayerContext,visibilityFractionSource:a.eL});Z.thirdParty.embeddedPlayerContext=
{...Z.thirdParty.embeddedPlayerContext,autoplayBrowserPolicy:ma(),autoplayIntended:sR(k),autoplayStatus:kOR(k,N)}};
aSU=function(Z){const k=[];for(let N of Z.split(",")){if(!N)continue;(Z=N.startsWith("!"))&&(N=N.substring(1));const a=N.split("-");a.length<3||k.push({dU:a[0],platform:a[1],deviceVersion:a[2],G_:Z})}return k};
ynX=function(Z){return aSU(Z).map(({dU:k,deviceVersion:N,G_:a})=>({deviceInterface:Tly[KfU[k]]||0,deviceVersion:N||"",isSleeping:a}))};
g.AQ=function(Z){const k=[];if(Z.displayName)k.push(Z.displayName);else{const N=Z.languageName||"";k.push(N);Z.kind==="asr"&&N.indexOf("(")===-1&&k.push(" (Automatic Captions)");Z.name&&k.push(` - ${Z.name}`)}Z.translationLanguage&&k.push(` >> ${Z.translationLanguage.languageName}`);return k.join("")};
g.Po=function(Z){const k={languageCode:Z.languageCode,languageName:Z.languageName,displayName:g.AQ(Z),kind:Z.kind,name:Z.name,id:Z.id,is_servable:Z.V,is_default:Z.isDefault,is_translateable:Z.isTranslateable,vss_id:Z.vssId};Z.xtags&&(k.xtags=Z.xtags);Z.captionId&&(k.captionId=Z.captionId);Z.translationLanguage&&(k.translationLanguage=Z.translationLanguage);return k};
g.co=function(Z){return Z.translationLanguage?Z.translationLanguage.languageCode:Z.languageCode};
g.QEr=function(Z){let k=Z.vssId;Z.translationLanguage&&k&&(k=`t${k}.${g.co(Z)}`);return k};
g.dg=function(Z,k,N,a){return new Ho(g.ff[Z]||0,g.ff[k]||0,N,a)};
Ls=function(Z){if(XT&&Z.UH)return!1;const k=g.ff.auto;return Z.U===k&&Z.V===k};
FT=function(Z){return Vc[Z.V||Z.U]||"auto"};
q5j=function(Z,k){k=g.ff[k];return Z.U<=k&&(!Z.V||Z.V>=k)};
sEy=function(Z,k,N,a,T,K,y){if(Z.U)return Z.U;const Q={},q=new Set,r={};if(tQ(a)){for(var C in a.V){if(!a.V.hasOwnProperty(C))continue;Z=a.V[C];r[Z.info.gA]=[Z.info]}return r}C=rnr(k,a,Q);K&&T({aftsrt:hQ(C)});const m={};for(const A of Object.keys(C)){const P=A;for(const d of C[P]){const h=d.itag,B=`${P}_${Number(d.video?.fps||0)}_${!!d.audio?.U}`;if(m.hasOwnProperty(B)){m[B]===!0?r[P].push(d):Q[h]=m[B];continue}const v=uq(k,d,N,a.isLive,q);v!==!0?(y.add(P),Q[h]=v,v==="disablevp9hfr"&&(m[B]="disablevp9hfr")):
(r[P]=r[P]||[],r[P].push(d),m[B]=!0)}}K&&T({bfflt:hQ(r)});for(const A in r){if(!r.hasOwnProperty(A))continue;a=A;r[a]&&r[a][0].xT()&&(r[a]=r[a],r[a]=CAf(k,r[a],Q),r[a]=mPb(r[a],Q))}K&&Object.keys(Q).length>0&&T({rjr:Td(Q)});for(const A of q.values())(k=N.D.get(A))&&--k.mD;K&&T({aftflt:hQ(r)});Z.U=g.DD(r,A=>!!A.length);
return Z.U};
ufU=function(Z,k,N,a,T,K,y){var Q=k.V||!!T;const q=Q&&k.xl?K:void 0;var r=new Set;let C=sEy(Z,k,N,a,K,Q,r);a.L()&&(C=Anf(N,C,T,Q,K,k),Q&&K({enflt:hQ(C)}));k.s6=PAU(C,k);T=Ki=>!!C[Ki];
var m=cnb(k);N=[];for(var A of Object.values(C))A?.length&&A[0].H9()&&N.push(...A);if(tQ(a))return K=g.ZD(Object.values(C),Ki=>!!Ki.length&&!!Ki[0].audio),Q=g.ZD(Object.values(C),Ki=>!!Ki.length&&!!Ki[0].video),K&&Q||nb(),Y6(new lq(Q,K,q,N));
A=C.a;var P=!1;k.u7&&m[0]!=="a"&&H9y(A)&&(m.unshift("a"),P=!0);Q&&(K({audioPrefOrder:m.join("_")}),K({preferHighQualityAudio:k.u7}),K({forcedAacForHqa:P}));A=[];if(k.HA){m=g.Ry(m,T);P=new Set;for(var d of m){var h=C[d];const Ki=new Set;for(var B of h)if(h=B.ZF?.id)P.has(h)?Ki.has(h)&&A.push(B):(Ki.add(h),P.add(h),A.push(B))}if(A.length===0){if(m.length===0)return Q&&K({noaudio:1}),nb();A=C[m[0]]}}else{A=g.ZD(m,T);if(!A)return Q&&K({noaudio:1}),nb();A=C[A]}C["9"]&&C.h&&a.Rn&&!k.Rq&&(Q&&K({dltvp9:1}),
delete C["9"]);if(y){Q&&K({bfsflt:hQ(C),bfsflta:fs(Z)});k.vD?Z.V=dPf(r,Z.V):Z.V.clear();Q&&K({bfsfltb:fs(Z)});for(var v in C){if(!C.hasOwnProperty(v))continue;y=v;if(!(y==="f"||k.xY===0&&Xg0.has(y)))for(var O of C[y])k.vD?Lff(y,O,Z.V):VHf(Z,y,O)}Q&&K({aftsflt:fs(Z)})}v=C["1h"]?"1h":"1";Z=C["9h"]?"9h":"9";y=C[v];r=C["2"];d=C[Z];y&&y.length&&(k.U.highestAv1Resolution=y[y.length-1].video.qualityOrdinal);d&&d.length&&(k.U.highestVp9Resolution=d[d.length-1].video.qualityOrdinal);O=[];B=[];if(k.tW&&r)O=
r,B=["2"];else if(k.FN&&y)O=y,B=[v],K({forceAv1:v});else if(k.C&&!k.Gh){B=Ffy(a)?C["1h"]||C["9h"]?["1h","9h"]:["9","h"]:["1","9","h"];Q&&K({newhybpref:B.join(".")});for(var x of B)O=O.concat(C[x]).filter(Ki=>Ki)}else k.Eq>0&&d&&y&&(B=[v,
Z],O=y.concat(d).filter(Ki=>Ki));
if(O.length&&!k.Gh){Bo(O,B);if(Q){Q=[];for(var e of O)Q.push(e.itag);K({hbdfmt:Q.join(".")})}return Y6(new lq(O,A,q,N))}e=tH0(k);e=g.ZD(e,T);if(!e){if(C[v])return K=C[v],Bo(K),Y6(new lq(K,A,q,N));Q&&K({novideo:1});return nb()}e!=="1"&&e!=="1h"||!C[Z]||(x=Db(C[e]),T=Db(C[Z]),T>x?e=Z:T===x&&hFf(C[Z])&&(e=Z));e==="9"&&C.h&&Db(C.h)>Db(C["9"])&&(e="h");k.hq&&a.isLive&&e==="("&&C.H&&Db(C["("])<1440&&(e="H");Q&&K({vfmly:OR(e)});k=C[e];if(!k.length)return Q&&K({novfmly:OR(e)}),nb();Bo(k);return Y6(new lq(k,
A,q,N))};
lSy=function(Z,k,N,a,T,K,y,Q=!1){if(k.hp&&y&&y.length>1&&!(k.Eq>0||k.C)){const m=k.V||!!T,A=m&&k.xl?K:void 0,P=rnr(k,a),d=[],h=[],B={};for(let v=0;v<y.length;v++){var q=y[v],r=a.Y.get(q);if(r&&r.info){var C=r.info;r=C.gA;if(uq(k,C,N,a.isLive)){q=C.xT()?d:h;C=P[r];for(const O of C)C=`${r}_${Number(O.video?.fps||0)}_${!!O.audio?.U}`,B.hasOwnProperty(C)?B[C]===!0&&q.push(O):uq(k,O,N,a.isLive)&&(q.push(O),B[C]=!0)}else m&&K({opfu:q})}}if(d.length&&h.length)return m&&K({opfm:d[0].itag+","+h[0].itag}),
Y6(new lq(d,h,A))}return ufU(Z,k,N,a,T,K,Q)};
fs=function(Z){const k=[];for(const N of Z.V.keys()){const a=Z.V.get(N);k.push(`${N}_${a.maxWidth}_${a.maxHeight}`)}return k.join(".")};
VHf=function(Z,k,N){const a=N.video?.fps||0,T=`${k}_${a}`;var K=!!N.audio;const y=Z.V.get(T);var Q=Z.V.get(T);const q=!!N.audio;Q&&(q||!q&&N.video?.height&&Q.maxHeight&&Q.maxHeight>=N.video?.height)||(Q=N.itag,k=y?y:{itag:Q,gA:k,H9:K},K?k.numChannels=N.audio.numChannels:(K=N.video,k.maxWidth=K?.width,k.maxHeight=K?.height,k.maxFramerate=a,k.maxBitrateBps=N.UH*8,k.Q6=K?.isHdr()),Z.V.set(T,k))};
PAU=function(Z,k){const N=!(!Z.m&&!Z.M),a=!(!Z.mac3&&!Z.MAC3),T=!(!Z.meac3&&!Z.MEAC3);Z=!(!Z.i&&!Z.I);k.bq=Z;return N||a||T||Z};
hFf=function(Z){for(const k of Z)if(k.itag&&fSj.has(k.itag))return!0;return!1};
H9y=function(Z){for(const k of Z)if(k.audio.audioQuality==="AUDIO_QUALITY_HIGH")return!0;return!1};
OR=function(Z){switch(Z){case "*":return"v8e";case "(":return"v9e";case "(h":return"v9he";default:return Z}};
hQ=function(Z){const k=[];for(const N in Z){if(!Z.hasOwnProperty(N))continue;const a=N;k.push(OR(a));for(const T of Z[a])k.push(T.itag)}return k.join(".")};
Anf=function(Z,k,N,a,T,K){const y={},Q={};g.BB(k,(q,r)=>{q=q.filter(C=>{const m=C.itag;if(!C.contentProtection)return Q[m]="noenc",!1;if(K.qX&&C.gA==="(h"&&K.zt)return Q[m]="lichdr",!1;if(!Z.Y&&C.gA==="1e")return Q[m]="noav1enc",!1;if(C.gA==="("||C.gA==="(h"){if(Z.U&&N&&N.flavor==="widevine"){var A=C.mimeType+"; experimental=allowed";(A=!!C.contentProtection[N.flavor]&&!!N.U[A])||(Q[m]=C.contentProtection[N.flavor]?"unspt":"noflv");return A}if(!vo(Z,ex.CRYPTOBLOCKFORMAT)&&!Z.xW||Z.O)return Q[m]=Z.O?
"disvp":"vpsub",!1}return N&&C.contentProtection[N.flavor]&&N.U[C.mimeType]?!0:(Q[m]=N?C.contentProtection[N.flavor]?"unspt":"noflv":"nosys",!1)});
q.length&&(y[r]=q)});
a&&Object.entries(Q).length&&T({rjr:Td(Q)});return y};
mPb=function(Z,k){const N=jN(Z,(a,T)=>T.video.U()?Math.min(a,T.video.width):a,Infinity);
N<Infinity&&(Z=Z.filter(a=>{if(a.video.U()||a.video.width<N)return!0;k[a.itag]="hfrfirst";return!1}));
d$()&&(Z=Z.filter(a=>{if(a.itag!=="299")return!0;k[a.itag]="ps3hfr1080";return!1}));
return Z};
CAf=function(Z,k,N){return k=k.filter(a=>{if(a.video.qualityOrdinal<=Z.r5)return!0;N[a.itag]="maxquality";return!1})};
rnr=function(Z,k,N){const a={};for(const T in k.V){if(!k.V.hasOwnProperty(T))continue;const K=k.V[T].info;if(Z.j&&K.video&&K.video.qualityOrdinal<Z.j){N&&(N[K.itag]=`min${Z.j}`);continue}const y=K.gA;a[y]=a[y]||[];a[y].push(K)}for(const T of Object.keys(a))Bo(a[T]);return a};
Db=function(Z){return jN(Z,(k,N)=>Math.max(k,N.video.qualityOrdinal),0)};
uq=function(Z,k,N,a=!1,T=new Set){if(k.gA==="")return"unkn";if((k.itag==="304"||k.itag==="266")&&Z.O)return"blk2khfr";if(Z.G&&k.video&&k.video.qualityOrdinal>Z.G)return`max${Z.G}`;if(Z.Qz&&k.gA==="h"&&k.video&&k.video.qualityOrdinal>1080)return"blkhigh264";if(k.gA==="(h"&&!N.G)return"enchdr";if(a&&nNb(k)&&!Z.Sm)return"blk51live";if((k.gA==="MAC3"||k.gA==="mac3")&&!Z.Y)return"blkac3";if((k.gA==="MEAC3"||k.gA==="meac3")&&!Z.L)return"blkeac3";if(k.gA==="M"||k.gA==="m")return"blkaac51";if((k.gA==="so"||
k.gA==="sa")&&!Z.Vz)return"blkamb";if(!Z.qX&&MKf(k)&&(!N.Y||k.gA!=="1e"))return"cbc";if(!N.Y&&MKf(k)&&k.gA==="1e")return"cbcav1";if((k.gA==="i"||k.gA==="I")&&!Z.pF)return"blkiamf";if(Z.O6&&k.audio?.U===!0)return"blkvbcabr";if(Z.MX&&(k.gA==="1"||k.gA==="1h"||N.Y&&k.gA==="1e")&&k.video?.qualityOrdinal&&k.video?.qualityOrdinal>Z.MX)return"av1cap";a=N.D.get(k.gA);if(!Z.Tt&&a&&a.mD>0)return T.add(k.gA),"byerr";if(k.video?.U()){if(!N.zt&&!vo(N,ex.FRAMERATE))return"capHfr";if(Z.Kp&&k.video.qualityOrdinal>=
4320)return"blk8khfr";if(k.Y()&&Z.ov&&k.contentProtection&&k.video.qualityOrdinal>=1440)return"disablevp9hfr"}if(Z.UH&&k.UH>Z.UH)return"ratecap";if(Z.xW>0&&k.xT()&&k.video.height>Z.xW)return"mvhcap";Z=Blj(N,k);return Z!==!0?Z:!0};
Bo=function(Z,k=[]){g.hc(Z,(N,a)=>{const T=a.UH-N.UH;if(!N.xT()||!a.xT())return T;let K=a.video.height*a.video.width-N.video.height*N.video.width;!K&&k&&k.length>0&&(N=k.indexOf(N.gA)+1,a=k.indexOf(a.gA)+1,K=N===0||a===0?a||-1:N-a);K||(K=T);return K})};
DPj=function(Z,k){if(k>Z.hW())Z.segments=[];else{var N=Yb(Z.segments,a=>a.Cp>=k,Z);
N>0&&Z.segments.splice(0,N)}};
iq=function(Z){const k=Z.data.getUint8(Z.offset+Z.V);Z.V+=1;return k};
gg=function(Z){const k=Z.data.getUint16(Z.offset+Z.V);Z.V+=2;return k};
wg=function(Z){const k=Z.data.getInt32(Z.offset+Z.V);Z.V+=4;return k};
$C=function(Z){const k=Z.data.getUint32(Z.offset+Z.V);Z.V+=4;return k};
xC=function(Z){var k=Z.data;var N=Z.offset+Z.V;k=k.getUint32(N)*4294967296+k.getUint32(N+4);Z.V+=8;return k};
G8=function(Z,k=NaN){let N;if(isNaN(k))N=Z.size;else for(N=Z.V;N<Z.size&&Z.data.getUint8(Z.offset+N)!==k;)++N;k=new Uint8Array(Z.data.buffer,Z.offset+Z.V+Z.data.byteOffset,N-Z.V);Z.V=Math.min(N+1,Z.size);return dj(k)};
O9f=function(Z){return new Uint8Array(Z.data.buffer,Z.offset+Z.data.byteOffset,Z.size)};
Sw=function(Z,k,N,a){(new Uint8Array(Z.data.buffer,Z.offset,a)).set(new Uint8Array(k.buffer,N+k.byteOffset,a));Z.offset+=a};
ew=function(Z,k){return Number(Z.data[k])||0};
i9f=function(Z){return Z.data["Cuepoint-Type"]?new oV(-(Number(Z.data["Cuepoint-Playhead-Time-Sec"])||0),Number(Z.data["Cuepoint-Total-Duration-Sec"])||0,Z.data["Cuepoint-Context"],Z.data["Cuepoint-Identifier"]||"",vLG[Z.data["Cuepoint-Event"]||""]||"unknown",(Number(Z.data["Cuepoint-Playhead-Time-Sec"])||0)*1E3):null};
gLy=function(Z){return Number(Z.data["Start-Media-Time-Us"])/1E6||0};
g.wgU=function(Z){return Z.data["Serialized-State"]?Z.data["Serialized-State"]:""};
g.$PX=function(Z){switch(Z.data["Is-Ad-Break-Finished"]){case "true":return 1;case "false":return 2;default:return 0}};
JQ=function(Z){const k={};Z=Z.split("\r\n");for(let N=0;N<Z.length;N++){if(Z[N].length===0)return k;const a=Z[N].match(/([^:]+):\s+([\S\s]+)/);a!=null&&(k[a[1]]=a[2])}return null};
bq=function(Z,k,N){for(;z8(Z,k);){const a=UR(Z,k);if(a.type===N)return a;k+=a.size}return null};
g.RV=function(Z,k,N){for(;z8(Z,k);){const a=UR(Z,k);if(a.type===N)return a;k=ps(a.type)?k+8:k+a.size}return null};
xPb=function(Z,k){var N=g.RV(Z,0,1952868452);Z=g.RV(Z,0,1953658222);if(N&&Z){N.skip(1);var a=iq(N)<<16|gg(N);N.skip(4);a&1&&N.skip(8);a&2&&N.skip(4);if(a&8){a=N.V;var T=$C(N);N.data.setUint32(N.offset+a,k>1?Math.ceil(T*k):Math.floor(T*k))}Z.skip(1);N=iq(Z)<<16|gg(Z);if(N&256){a=N&1;T=N&4;var K=N&512,y=N&1024,Q=N&2048;N=$C(Z);a&&Z.skip(4);T&&Z.skip(4);a=(K?4:0)+(y?4:0)+(Q?4:0);for(T=0;T<N;T++)K=Z.V,y=$C(Z),Z.data.setUint32(Z.offset+K,k>1?Math.ceil(y*k):Math.floor(y*k)),Z.skip(a)}}};
z8=function(Z,k){if(Z.byteLength-k<8)return!1;var N=Z.getUint32(k);if(N<8||Z.byteLength-k<N)return!1;for(N=4;N<8;N++){const a=Z.getInt8(k+N);if(a<48||a>122)return!1}return!0};
UR=function(Z,k){const N=Z.getUint32(k),a=Z.getUint32(k+4);return new GOf(Z,k,N,a)};
g.Mr=function(Z){const k=Z.data.getUint8(Z.dataOffset)?20:12;return Z.data.getUint32(Z.dataOffset+k)};
ns=function(Z){Z=new DataView(Z.buffer,Z.byteOffset,Z.byteLength);return(Z=g.RV(Z,0,1836476516))?g.Mr(Z):NaN};
ps=function(Z){return Z===1701082227||Z===1836019558||Z===1836019574||Z===1835297121||Z===1835626086||Z===1937007212||Z===1953653094||Z===1953653099||Z===1836475768};
eFN=function(Z){var k=g.RV(Z,0,1937011556);if(!k)return null;k=bq(Z,k.dataOffset+8,1635148593)||bq(Z,k.dataOffset+8,1635135537);if(!k)return null;var N=bq(Z,k.dataOffset+78,1936995172),a=bq(Z,k.dataOffset+78,1937126244);if(!a)return null;k=null;if(N)switch(N.skip(4),iq(N)){default:k=0;break;case 1:k=2;break;case 2:k=1;break;case 3:k=255}let T=N=null,K=null;if(a=bq(Z,a.dataOffset,1886547818)){const y=bq(Z,a.dataOffset,1886546020);let Q=bq(Z,a.dataOffset,2037673328);if(!Q&&(Q=bq(Z,a.dataOffset,1836279920),
!Q))return null;y&&(y.skip(4),N=wg(y)/65536,K=wg(y)/65536,T=wg(y)/65536);Z=O9f(Q);Z=new DataView(Z.buffer,Z.byteOffset+8,Z.byteLength-8);return new S5b(k,N,K,T,Z)}return null};
g.IV=function(Z){if(Z.data.getUint8(Z.dataOffset)){var k=Z.data;Z=Z.dataOffset+4;k=k.getUint32(Z)*4294967296+k.getUint32(Z+4)}else k=Z.data.getUint32(Z.dataOffset+4);return k};
oLy=function(Z){Z=new GOf(Z.data,Z.offset,Z.size,Z.type,Z.U);var k=iq(Z);Z.skip(7);const N=$C(Z);let a;k===0?(k=$C(Z),a=$C(Z)):(k=xC(Z),a=xC(Z));Z.skip(2);const T=gg(Z),K=[],y=[];for(let Q=0;Q<T;Q++){const q=$C(Z);K.push(q);y.push($C(Z));Z.skip(4)}return{timescale:N,Vf:k,Kq:a,Ov:K,u6:y}};
g.jw=function(Z,k){var N=0;const a=[];for(;z8(Z,N);){const T=UR(Z,N);T.type===k&&a.push(T);N=ps(T.type)?N+8:N+T.size}return a};
JnG=function(Z){Z.skip(4);return{Jx:G8(Z,0),value:G8(Z,0),timescale:$C(Z),yrS:$C(Z),eventDuration:$C(Z),id:$C(Z),tU:G8(Z),offset:Z.offset}};
g.UPy=function(Z){const k=bq(Z,0,1701671783);if(!k)return null;var N=JnG(k);const a=N.Jx;N=JQ(N.tU);if(Z=bq(Z,k.offset+k.size,1701671783))if(Z=JnG(Z),Z=JQ(Z.tU),N&&Z)for(const T of Object.keys(Z))N[T]=Z[T];return N?new zFy(N,a):null};
ER=function(Z,k){let N=bq(Z,0,k);for(;N;){var a=N;a.type=1936419184;a.data.setUint32(a.offset+4,1936419184);N=bq(Z,N.offset+N.size,k)}};
pgy=function(Z,k){var N=g.RV(Z,0,1937011556),a=g.RV(Z,0,1953654136);if(!N||!a||Z.getUint32(N.offset+12)>=2)return null;const T=new DataView(k.buffer,k.byteOffset,k.length),K=g.RV(T,0,1937011556);if(!K)return null;k=T.getUint32(K.dataOffset+8);a=T.getUint32(K.dataOffset+12);if(a!==1701733217&&a!==1701733238)return null;a=new b9b(Z.byteLength+k);Sw(a,Z,0,N.offset+12);a.data.setInt32(a.offset,2);a.offset+=4;Sw(a,Z,N.offset+16,N.size-16);Sw(a,T,T.byteOffset+K.dataOffset+8,k);Sw(a,Z,N.offset+N.size,Z.byteLength-
(N.offset+N.size));N=[1836019574,1953653099,1835297121,1835626086,1937007212,1937011556];for(const y of N)N=g.RV(Z,0,y),a.data.setUint32(N.offset,N.size+k);Z=g.RV(a.data,0,1953654136);a.data.setUint32(Z.offset+16,2);return a.data};
RFU=function(Z){var k=g.RV(Z,0,1937011556);if(!k)return null;var N=Z.getUint32(k.dataOffset+12);if(N!==1701733217&&N!==1701733238)return null;k=bq(Z,k.offset+24+(N===1701733217?28:78),1936289382);if(!k)return null;N=bq(Z,k.offset+8,1935894637);if(!N||Z.getUint32(N.offset+12)!==1667392371)return null;k=bq(Z,k.offset+8,1935894633);if(!k)return null;k=bq(Z,k.offset+8,1952804451);if(!k)return null;N=new Uint8Array(16);for(let a=0;a<16;a++)N[a]=Z.getInt8(k.offset+16+a);return N};
ac=function(Z,k,N){var a=new Wo(N);if(!YC(a,Z))return!1;a=ZT(a);if(!kF(a,k))return!1;for(Z=0;k;)k>>>=8,Z++;k=a.start+a.pos;const T=Nq(a,!0);a=Z+(a.start+a.pos-k)+T;a=a>9?MHy(a-9,8):MHy(a-2,1);Z=k-Z;N.setUint8(Z++,236);for(k=0;k<a.length;k++)N.setUint8(Z++,a[k]);return!0};
MHy=function(Z,k){k||(k=Math.ceil(Math.log(Z+2)/Math.log(2)/7));const N=1<<8-k,a=[];for(;a.length<k-1;)a.unshift(Z%256),Z=Math.floor(Z/256);a.unshift(Z|N);return a};
nLy=function(Z){var k=new Wo(Z);k.p5();if(YC(k,[408125543,374648427,174,224]))k=ZT(k);else return null;let N=Z=null;for(;!TH(k);){var a=Nq(k,!1);if(a===21432)switch(KG(k)){default:Z=0;break;case 1:Z=1;break;case 3:Z=2;break;case 15:Z=255}else a===30320?N=ZT(k):yO(k)}if(!N)return null;let T=a=k=null;for(;!TH(N);)switch(Nq(N,!1)){case 30321:if(KG(N)!==3)return null;break;case 30324:k=QO(N);break;case 30323:T=QO(N);break;case 30325:a=QO(N);break;case 30322:var K=Nq(N,!0);K=qq(N,K);K=new DataView(K.buffer,
K.byteOffset,K.byteLength);break;default:yO(N)}return K?new S5b(Z,k,T,a,K):null};
YC=function(Z,k){for(let N=0;N<k.length;N++){if(!kF(Z,k[N]))return!1;N!==k.length-1&&Nq(Z,!0)}return!0};
ZT=function(Z){const k=Nq(Z,!0);var N=Z.V.byteOffset+Z.pos;N=new DataView(Z.V.buffer,N,Math.min(k,Z.V.buffer.byteLength-N));N=new Wo(N,Z.start+Z.pos);Z.pos+=k;return N};
kF=function(Z,k,N=!1){if(TH(Z))return!1;let a=Z.pos;for(;Nq(Z,!1)!==k;)if(yO(Z),a=Z.pos,TH(Z))return!1;N&&(Z.pos=a);return!0};
Nq=function(Z,k){let N=r5(Z);if(N===1){N=0;for(k=0;k<7;k++)N=N*256+r5(Z);return N}let a=128;for(let T=0;T<6&&a>N;T++)N=N*256+r5(Z),a*=128;return k?N-a:N};
TH=function(Z){return Z.pos>=Z.V.byteLength};
KG=function(Z){const k=Nq(Z,!0);let N=r5(Z);for(let a=1;a<k;a++)N=N*256+r5(Z);return N};
yO=function(Z){const k=Nq(Z,!0);Z.pos+=k};
QO=function(Z){const k=Nq(Z,!0);let N=0;k===4?N=Z.V.getFloat32(Z.pos):k===8&&(N=Z.V.getFloat64(Z.pos));Z.pos+=k;return N};
qq=function(Z,k){const N=new Uint8Array(Z.V.buffer,Z.V.byteOffset+Z.pos,k);Z.pos+=k;return N};
ISb=function(Z){const k=Nq(Z,!0);return dj(qq(Z,k))};
r5=function(Z){return Z.V.getUint8(Z.pos++)};
jEi=function(Z){if(!kF(Z,440786851,!0))return null;const k=Z.pos;Nq(Z,!1);const N=Nq(Z,!0)+Z.pos-k;Z.pos=k+N;if(!kF(Z,408125543,!1))return null;Nq(Z,!0);if(!kF(Z,357149030,!0))return null;const a=Z.pos;Nq(Z,!1);const T=Nq(Z,!0)+Z.pos-a;Z.pos=a+T;if(!kF(Z,374648427,!0))return null;const K=Z.pos;Nq(Z,!1);const y=Nq(Z,!0)+Z.pos-K,Q=new Uint8Array(N+12+T+y),q=new DataView(Q.buffer);Q.set(new Uint8Array(Z.V.buffer,Z.V.byteOffset+k,N));q.setUint32(N,408125543);q.setUint32(N+4,33554431);q.setUint32(N+8,
4294967295);Q.set(new Uint8Array(Z.V.buffer,Z.V.byteOffset+a,T),N+12);Q.set(new Uint8Array(Z.V.buffer,Z.V.byteOffset+K,y),N+12+T);return Q};
CG=function(Z){const k=Z.pos;Z.pos=0;let N=1E6;YC(Z,[408125543,357149030,2807729])&&(N=KG(Z));Z.pos=k;return N};
mX=function(Z){if(!EL0(Z)||!kF(Z,524531317))return!1;Nq(Z,!0);return!0};
WfG=function(Z,k){const N=Z.pos;Z.pos=0;if(Z.V.getUint8(Z.pos)!==160&&!mX(Z)||!kF(Z,160))return Z.pos=N,NaN;Nq(Z,!0);var a=Z.pos;if(!kF(Z,161))return Z.pos=N,NaN;Nq(Z,!0);r5(Z);const T=r5(Z)<<8|r5(Z);Z.pos=a;if(!kF(Z,155))return Z.pos=N,NaN;a=KG(Z);Z.pos=N;return(T+a)*k/1E9};
EL0=function(Z){if(Z.p5()){if(!kF(Z,408125543))return!1;Nq(Z,!0)}return!0};
Y5y=function(Z,k){const N=k.indexOf("?");if(N>0){const a=W$(3,11,k.substring(N+1));g.BB(a,function(T,K){this.set(K,T)},Z);
k=k.substring(0,N)}k=Eb(17,6705,k);g.BB(k,function(a,T){this.set(T,a)},Z)};
ZZX=function(Z){const k=Z.W0.mH(),N=[];g.BB(Z.V,(T,K)=>{N.push(`${K}=${T}`)});
if(!N.length)return k;const a=N.join("&");Z=UQ(2,1928,Z.W0)?"&":"?";return k+Z+a};
sM=function(Z,k){Z[k]||(Z[k]=new khG);return Z[k]};
A$=function(Z){Z.Y=(0,g.z)();Z.started=0;Z.timedOut=0;Z.V=0};
Pq=function(Z,k){let N=Z.started+Z.V*4;k&&(N+=Z.U);N=Math.max(0,N-3);return 1.6**N};
Nmi=function(Z,k,N){if(cq(31,5788,Z.V))return!1;var a=sM(N,bY(62,6432,Z.V));if(a.timedOut<1&&a.V<1)return!1;a=a.timedOut+a.V;Z=Hq(Z,k);N=sM(N,bY(38,6456,Z));return N.timedOut+N.V+0<a};
Hq=function(Z,k){k=k?k.eP:!1;Z.D||(Z.D=d5(Z.Y,k));return Z.D};
LG=function(Z,k,N){Z=k?Hq(Z,N):Z.V;return new Xm(Z)};
VO=function(Z,k,N){return bY(22,6408,k?Hq(Z,N):Z.V)};
aRG=function(Z,k,N,a,T){++Z.U;k&&++Z.L;bY(46,6448,N.W0).startsWith("redirector.")&&(Z.V=Z.Y.clone(),delete Z.D,a.WL&&delete T[bY(62,6432,Z.V)])};
Fm=function(Z){return Z?`${Z.itag||""};${Z.lmt||0};${Z.xtags||""}`:""};
t$=function(Z,k){return Fm(g.ot(Z.info,k))};
uI=function(Z){Z=Z.split("-");const k=Number(Z[0]),N=Number(Z[1]);if(!isNaN(k)&&!isNaN(N)&&Z.length===2&&(Z=new h$(k,N),!isNaN(Z.start)&&!isNaN(Z.end)&&!isNaN(Z.length)&&Z.length>0))return Z};
lI=function(Z,k){return new h$(Z,Z+k-1)};
fG=function(Z){if(!Z)return new h$(0,0);var k=Number(Z.start);Z=Number(Z.end);if(!isNaN(k)&&!isNaN(Z)&&(k=new h$(k,Z),k.length>0))return k};
TmX=function(Z){Z.length===1||g.Wy(Z,N=>!!N.range);
for(var k=1;k<Z.length;k++);k=Z[Z.length-1];return new h$(Z[0].range.start+Z[0].V,k.range.start+k.V+k.U-1)};
K9X=function(Z){for(let k=1;k<Z.length;k++)if(!Bq(Z[k-1],Z[k]))return!1;return!0};
yYj=function(Z){let k=0;for(const N of Z)k+=N.range.length;return k};
Bq=function(Z,k){return Z.l3===k.l3?Z.range&&k.range?Z.range.start+Z.V+Z.U===k.range.start+k.V:Z.Cp===k.Cp?Z.V+Z.U===k.V:Z.Cp+1===k.Cp&&k.V===0&&Z.D:!1};
QJr=function(Z){Z.Y=Z.startTime;Z.C=Z.duration;Z.L=Z.Y+Z.C};
qwi=function(Z,k,N){const a=!(!k||k.l3!==Z.l3||k.type!==Z.type||k.Cp!==Z.Cp);return N?a&&!!k&&(Z.range&&k.range?k.range.end===Z.range.end:k.range===Z.range)&&k.V+k.U===Z.V+Z.U:a};
DT=function(Z){return Z.type===1||Z.type===2};
OM=function(Z){return Z.type===3||Z.type===6};
rYX=function(Z,k){return Bq(Z,k)||Math.abs(Z.L-k.Y)<=1E-6||Z.Cp+1===k.Cp&&k.V===0&&Z.D?!0:!1};
Cyy=function(Z,k){return Z.Cp!==k.Cp&&k.Cp!==Z.Cp+1||Z.type!==k.type?!1:Bq(Z,k)?!0:Math.abs(Z.Y-k.Y)<=1E-6&&Z.Cp===k.Cp?!1:rYX(Z,k)};
vq=function(Z){return Z.Cp+(Z.D?1:0)};
iI=function(Z){const k={};k.itag=Z.l3.info.itag;k.type=`${Z.type}`;k.src=`${Z.source}`;k.segsrc=Z.j;k.seg=String(Z.Cp);Z.range&&(k.range=`${Z.range.start+Z.V}-${Z.range.start+Z.V+Z.U-1}`);k.time=`${Z.Y.toFixed(1)}-${(Z.Y+Z.C).toFixed(1)}`;k.off=String(Z.V);k.len=String(Z.U);Z.D&&(k.end="1");Z.G()&&(k.eos="1");Z.clipId&&(k.cid=Z.clipId);return k};
m4y=function(Z){return new g5(Z.type,Z.l3,Z.range,"getEmptyStubBefore"+Z.j,Z.Cp,Z.startTime,0,Z.V,0)};
sJ0=function(Z){return new g5(Z.type,Z.l3,Z.range,"getEmptyStubAfter"+Z.j,Z.Cp,Z.startTime+Z.duration,0,Z.V+Z.U,0)};
AYf=function(Z,k,N,a){return new g5(Z.type,Z.l3,Z.range,"reslice"+Z.j,Z.Cp,Z.startTime,Z.duration,k,N,a,Z.Tk,Z.clipId)};
Pyy=function(Z,k){return Z.l3!==k.l3?!1:Z.range&&k.range?Z.range.start+Z.V>=k.range.start+k.V&&Z.range.start+Z.V+Z.U<=k.range.start+k.V+k.U:Z.Cp===k.Cp&&Z.V>=k.V&&(Z.V+Z.U<=k.V+k.U||k.D)};
cYR=function(Z,k){return Z.l3!==k.l3?!1:Z.N()&&k.type===3&&Z.l3.V()?(Z=Z.l3.FS(Z),Er(Z,N=>cYR(N,k))):Z.Cp===k.Cp&&!!k.U&&k.V+k.U>Z.V&&k.V+k.U<=Z.V+Z.U};
w5=function(Z,k){var N=k.Cp;Z.j="updateWithSegmentInfo";Z.Cp=N;if(Z.startTime!==k.startTime||Z.duration!==k.duration)Z.startTime=k.startTime,Z.duration=k.duration,QJr(Z)};
$F=function(Z){return!DT(Z.Vi[Z.Vi.length-1])};
xF=function(Z){return Z.Vi[Z.Vi.length-1].N()};
g.GH=function(Z,k,N){let a;N=Z.yg===null?Z.EH.yg(k,N,Z.Vi[0].type):Z.yg;Z.V?(k=N?d5(Z.V,k.eP):Z.V,a=new Xm(k),a.get("alr")||a.set("alr","yes"),Z.U&&Y5y(a,Z.U)):/http[s]?:\/\//.test(Z.U)?a=new Xm(new g.hY(Z.U)):(a=LG(Z.EH,N,k),Z.U&&Y5y(a,Z.U));(k=Z.range)?a.set("range",k.toString()):Z.Vi[0].l3.C()&&Z.Vi.length===1&&Z.Vi[0].V&&a.set("range",`${Z.Vi[0].V}-`);Z.requestId&&a.set("req_id",Z.requestId);isNaN(Z.oJ)||a.set("headm",Z.oJ.toString());isNaN(Z.L)||a.set("mffa",`${Z.L}ms`);Z.urlParams&&g.BB(Z.urlParams,
(T,K)=>{a.set(K,T)});
return a};
HZ0=function(Z){if(Z.range)return Z.D;Z=Z.Vi[0];return Math.round(Z.C*Z.l3.info.UH)};
d40=function(Z,k){return Math.max(0,Z.Vi[0].Y-k)};
Xmi=function(Z,k){for(const N of Z.Vi)if(N.type===3&&k>=N.Y&&k<=N.L)return!0;return!1};
Sg=function(Z,k,N){for(;Z;Z=Z.parentNode){if(!Z.attributes||N&&Z.nodeName!==N)continue;const a=Z.getAttribute(k);if(a)return a}return""};
eg=function(Z,k){for(;Z;Z=Z.parentNode){const N=Z.getElementsByTagName(k);if(N.length>0)return N[0]}return null};
L9f=function(Z){if(!Z)return 0;const k=Z.match(/PT(([0-9]*)H)?(([0-9]*)M)?(([0-9.]*)S)?/);return k?(Number(k[2])|0)*3600+(Number(k[4])|0)*60+(Number(k[6])|0):Number(Z)|0};
VMf=function(Z){return Z.match(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})\.(\d{3})$/)?`${Z}Z`:Z};
F9N=function(Z){const k=Z.D;Z.D=[];return k};
tM0=function(Z){Z.V||(Z.V=new oc);return Z.V};
hIf=function(Z,k){Z.U[k]||(Z.U[k]=new oc);return Z.U[k]};
uh0=function(Z,k){Z.D[k]||(Z.D[k]=new oc);return Z.D[k]};
lRy=function(Z,k){const N=[];k=Array.from(k.getElementsByTagName("SegmentTimeline"));for(const a of k){k=a.parentNode.parentNode;let T=null;k.nodeName==="Period"?T=tM0(Z):k.nodeName==="AdaptationSet"?(k=k.getAttribute("id")||k.getAttribute("mimetype")||"",T=hIf(Z,k)):k.nodeName==="Representation"&&(k=k.getAttribute("id")||"",T=uh0(Z,k));if(T==null)return;T.update(a);g.Ac(N,F9N(T))}g.Ac(Z.Y,N);mRX(Z.Y,a=>a.startSecs*1E3+a.V)};
fRb=function(Z){Z.V&&(Z.V.V=[]);g.BB(Z.U,k=>{k.V=[]});
g.BB(Z.D,k=>{k.V=[]})};
J$=function(Z,k){return tc(Z.segments,N=>k-N.Cp)};
Bmf=function(Z,k,N){const a=Z.index.C(k),T=Z.index.getStartTime(k);let K=Z.index.getDuration(k);N?K=N=0:N=Z.info.UH*K;return new zH([new g5(3,Z,void 0,"otfCreateRequestInfoForSegment",k,T,K,0,N)],a)};
D4y=function(Z,k){if(!Z.index.isLoaded()){var N=[],a=k.L;k=k.j.split(",").filter(r=>r.length>0);
var T=0,K=0,y=0,Q=/^(\d+)/,q=/r=(\d+)/;for(let r=0;r<a;r++){if(y<=0)if(y=k.shift(),K=(K=Q.exec(y))?+K[1]/1E3:0)y=(y=q.exec(y))?+y[1]:0,y+=1;else return;N.push(new UM(r,T,K,NaN,"sq/"+(r+1)));T+=K;y--}Z.index.append(N)}};
g.pG=function(Z,k,...N){OZf(5,Z instanceof g.bI?Z.tag:Z,k,...N)};
OZf=function(Z,k,N,...a){var T=Z===6?"ERROR":"WARNING";N=`b${N}`;g.b(new g.jD(N,...a),T);a.unshift(N);a=a.join(", ");T=vZU.get(k);if(!T){T=`${"ytplog"}.${k}`;N=5;try{window.localStorage&&!isNaN(+window.localStorage[T])&&(N=+window.localStorage[T]),window.sessionStorage&&!isNaN(+window.sessionStorage[T])&&(N=+window.sessionStorage[T])}catch{}vZU.set(k,N);T=N}Z<T||(Z=iZf,T=Z.V.get(k),T||(T=new gZX,Z.V.set(k,T)),Z=T,T=Date.now(),N=Math.floor((T-Z.U)*.01),N>0&&(Z.V=Math.min(Z.V+N,10),Z.U=T),Z.V>0?(Z.V--,
Z=!0):Z=!1,Z?(typeof a==="function"&&(a=a()),console.log(`${"plyr"}.${k}`,a)):(a=(wmX.get(k)??0)+1,wmX.set(k,a),a%100===1&&console.warn("plyr",`${"plyr"}.${k} is chatty, dropping logs.`)))};
Mq=function(Z){if(!Z.j){if(g.Sx(Z.info.l3.info)){var k=g.Rc(Z);var N=bq(k,0,1836019574);if(N){N=N.offset+N.size;var a=new Uint8Array(N);a.set(new Uint8Array(k.buffer,k.byteOffset,N));k=a}else k=null}else k=jEi(new Wo(g.Rc(Z)));k&&(Z.info.l3.U=k,Z.j=!0)}};
g.Rc=function(Z){return JDN(Z.U)};
$4R=function(Z,k){k=Math.min(k,Z.info.U);const {Rg:N,ma:a}=Z.U.split(k),T=new nG(new g5(Z.info.type,Z.info.l3,Z.info.range,Z.info.j,Z.info.Cp,Z.info.startTime,Z.info.duration,Z.info.V,k,!1,Z.info.Tk,Z.info.clipId),N);T.Y=Z.Y;T.D=Z.D;k=new nG(new g5(Z.info.type,Z.info.l3,Z.info.range,Z.info.j,Z.info.Cp,Z.info.startTime,Z.info.duration,Z.info.V+k,Z.info.U-k,Z.info.D,Z.info.Tk,Z.info.clipId),a);k.Y=Z.Y;k.D=Z.D;return[T,k]};
g.Ic=function(Z){g.Sx(Z.info.l3.info)||Z.info.l3.info.oa();if(Z.D!==-1)return Z.D;if(Z.V&&gLy(Z.V))return Z.D=gLy(Z.V),Z.D;if(g.Sx(Z.info.l3.info)){var k=g.Rc(Z);var N=Z.info.l3.U,a=NaN;let T=NaN,K=0;for(;z8(k,K);){const y=UR(k,K);y.type===1936286840?T=y.data.getUint32(y.dataOffset+8):y.type===1836476516?T=g.Mr(y):y.type===1952867444&&isNaN(a)&&(a=g.IV(y));K=ps(y.type)?K+8:K+y.size}!T&&N&&(T=ns(N));k=a/T}else k=new Wo(g.Rc(Z)),N=Z.L?k:new Wo(new DataView(Z.info.l3.U.buffer)),a=CG(N),N=k.pos,k.pos=
0,mX(k)?kF(k,231)?(a=KG(k)*a/1E9,k.pos=N,k=a):(k.pos=N,k=NaN):(k.pos=N,k=NaN);Z.D=k||Z.info.Y;return Z.D};
x4f=function(Z,k){g.Sx(Z.info.l3.info)||Z.info.l3.info.oa();Z.D=k;if(g.Sx(Z.info.l3.info)){var N=g.Rc(Z);Z=Z.info.l3.U;var a=NaN,T=NaN;let q=0;for(;z8(N,q);){const r=UR(N,q);isNaN(a)&&(r.type===1936286840?a=r.data.getUint32(r.dataOffset+8):r.type===1836476516&&(a=g.Mr(r)));if(r.type===1952867444){!a&&Z&&(a=ns(Z));var K=g.IV(r);isNaN(T)&&(T=Math.round(k*a)-K);var y=r;K+=T;if(y.data.getUint8(y.dataOffset)){var Q=y.data;y=y.dataOffset+4;Q.setUint32(y,Math.floor(K/4294967296));Q.setUint32(y+4,K&4294967295)}else y.data.setUint32(y.dataOffset+
4,K)}q=ps(r.type)?q+8:q+r.size}return!0}N=new Wo(g.Rc(Z));Z=Z.L?N:new Wo(new DataView(Z.info.l3.U.buffer));a=CG(Z);Z=N.pos;N.pos=0;if(mX(N)&&kF(N,231))if(T=Nq(N,!0),k=Math.floor(k*1E9/a),Math.ceil(Math.log(k)/Math.log(2)/8)>T)k=!1;else{for(a=T-1;a>=0;a--)N.V.setUint8(N.pos+a,k&255),k>>>=8;N.pos=Z;k=!0}else k=!1;return k};
GhR=function(Z,k){Z.timestampOffset>0&&(k-=Z.timestampOffset);var N=g.Ic(Z)+k;x4f(Z,N);Z.timestampOffset=k};
jg=function(Z){g.Sx(Z.info.l3.info)||Z.info.l3.info.oa();if(Z.V&&Z.info.type===6)return Z.V.Wi;if(g.Sx(Z.info.l3.info)){var k=g.Rc(Z);var N=0;k=g.jw(k,1936286840);for(var a of k)k=oLy(a),N+=k.u6[0]/k.timescale;N=N||NaN;if(!(N>=0))a:{N=g.Rc(Z);a=Z.info.l3.U;let m=k=0;for(var T=0;z8(N,k);){const A=UR(N,k);if(A.type===1836476516)m=g.Mr(A);else if(A.type===1836019558){!m&&a&&(m=ns(a));if(!m){N=NaN;break a}var K=bq(A.data,A.dataOffset,1953653094),y=K;K=m;var Q=bq(y.data,y.dataOffset,1952868452);y=bq(y.data,
y.dataOffset,1953658222);var q=wg(Q);wg(Q);q&2&&wg(Q);Q=q&8?wg(Q):0;var r=wg(y),C=r&1;q=r&4;const P=r&256,d=r&512,h=r&1024;r&=2048;const B=$C(y);C&&wg(y);q&&wg(y);C=0;for(let v=0;v<B;v++){const O=P?wg(y):Q;d&&wg(y);q&&v===0||!h||wg(y);r&&wg(y);C+=O}T+=C/K}k=ps(A.type)?k+8:k+A.size}N=T||NaN}N||g.L9(new g.jD("Missing duration while parsing bmff",Z.info.E3()))}else N=new Wo(g.Rc(Z)),Z=Z.L?N:new Wo(new DataView(Z.info.l3.U.buffer)),N=WfG(N,CG(Z));return N};
EM=function(Z,k=!1){const N=jg(Z);Z=k?0:Z.info.C;return N||Z};
g.Sw0=function(Z){if(Z.info.l3.D())return Z.info.duration;Z.Y===-1&&(Z.Y=jg(Z));return Z.Y||Z.info.duration};
eIi=function(Z){var k=g.Rc(Z),N=g.RV(k,0,1936286840);N=N?N.data.getUint32(N.dataOffset+8):NaN;isNaN(N)&&(Z=Z.info.l3.U,N=(k=g.RV(k,0,1836476516))?g.Mr(k):Z?ns(Z):NaN);return N};
oZ0=function(Z){return Z.info.l3.info.oa()&&cY(Z.U,0)===160};
JYf=function(Z){if(!Z.V){g.Sx(Z.info.l3.info)||Z.info.l3.info.oa();if(g.Sx(Z.info.l3.info))var k=g.UPy(g.Rc(Z));else{k=new Wo(g.Rc(Z));const a=k.pos;k.pos=0;let T=null,K=null;if(YC(k,[408125543,307544935])){const y=k.pos+Nq(k,!0);for(;k.pos<y;){if(Nq(k,!1)!==29555){yO(k);continue}const Q=k.pos+Nq(k,!0);for(;k.pos<Q;){if(Nq(k,!1)!==26568){yO(k);continue}const q=k.pos+Nq(k,!0);for(;k.pos<q;){var N=Nq(k,!1);if(N===17543){if(N=ISb(k),N=JQ(N))if(K)for(const r of Object.keys(N))K[r]=N[r];else K=N}else N===
17827?(N=ISb(k),T||(T=N)):yO(k)}}}}k.pos=a;k=K?new zFy(K,T):null}Z.V=k}};
zIR=function(Z,k){return k+1<Z.count||Z.D?Z.offsets[k+1]-Z.offsets[k]:-1};
Wq=function(Z){Z.offsets.length<Z.count+1&&Z.resize(Z.offsets.length*2)};
bZr=function(Z){if(Z=Z.colorInfo)if(Z=Z.transferCharacteristics)return U4f[Z];return null};
pm0=function(Z){return YF((k,N)=>g.Ri(k,N,4,1E3),Z,{format:"RAW",
method:"GET",withCredentials:!0})};
g.RIU=function(Z){let k;Z.responseType&&Z.responseType!=="text"?Z.responseType==="arraybuffer"&&(k=dj(new Uint8Array(Z.response))):k=Z.responseText;return!k||k.length>2048?"":k.indexOf("https://")===0?k:""};
YF=function(Z,k,N){k.match(MMX);return Z(k,N).then(a=>{const T=g.RIU(a.xhr);return T?YF(Z,T,N):a.xhr})};
nZ0=function(Z){return Er(Z,k=>"FORMAT_STREAM_TYPE_OTF"===k.type)?"FORMAT_STREAM_TYPE_OTF":"FORMAT_STREAM_TYPE_UNKNOWN"};
IRj=function(Z,k,N=0,a){a=new g.Zu("",a,!1);a.duration=N||0;for(const T of Z){Z=ky(T,k,a.duration);const {Y2:K,s:y,K7:Q}=NM(18,5998,T);(N=ly(K||T.url||"",Q,y))&&(Z.streamType==="FORMAT_STREAM_TYPE_OTF"?aZ(a,new Qj(N,Z)):aZ(a,new qM(N,Z,fG(T.initRange),fG(T.indexRange))))}a.isOtf=!0;return a};
jJy=function(Z,k,N=0,a){a=new g.Zu("",a.experiments,!1);a.duration=N||0;for(const T of Z){Z=ky(T,k,a.duration);N=fG(T.initRange);const K=fG(T.indexRange),{Y2:y,s:Q,K7:q}=NM(38,5978,T),r=ly(y||T.url||"",q,Q);r&&aZ(a,new qM(r,Z,N,K))}return a};
ky=function(Z,k,N=0){let a=Z.mimeType||"";var T=Z.itag;var K=Z.xtags;T=T?T.toString():"";K&&(T+=`;${K}`);K=T;if(i1(a)){var y=Z.width||640;T=Z.height||360;var Q=Z.fps,q=Z.qualityLabel;const h=Z.qualityOrdinal,B=Z.colorInfo,v=Z.projectionType;var r;Z.stereoLayout&&(r=EZf[Z.stereoLayout]);const O=bZr(Z)||void 0;var C;B?.primaries&&(C=W9y[B.primaries]||void 0);y=new w0(y,T,Q,v,r,void 0,q,h&&YwR[h],O,C);a=r_(a,y,CD[Z.itag||""]);mJ&&(a+="; enableflushduringseek=true");sS&&(a+="; enableresetaudiodecoder=true")}let m;
if(vz(a)){var A=Z.audioSampleRate;r=Z.audioTrack;A=new g0(A?+A:void 0,Z.audioChannels,Z.spatialAudioType,Z.isDrc,Z.loudnessDb,Z.trackAbsoluteLoudnessLkfs,Z.audioQuality||"AUDIO_QUALITY_UNKNOWN",Z.isVb);r&&(C=r.displayName,T=r.id,Q=r.audioIsDefault,r=r.isAutoDubbed,C&&(m=new g.Al(C,T||"",!!Q,!!r)))}let P;Z.captionTrack&&(r=Z.captionTrack.displayName,C=Z.captionTrack.vssId,T=Z.captionTrack.languageCode,Q=Z.captionTrack.kind,q=Z.captionTrack.id,r&&C&&T&&(P=new ZWG(r,C,T,Q,Z.xtags,q)));r=Number(Z.bitrate)/
8;C=Number(Z.contentLength);T=Number(Z.lastModified);q=Z.drmFamilies;Q=Z.type;Z=Number(Z.approxDurationMs);let d;if(k&&q){d={};for(const h of q)(q=Pf[h])&&(d[q]=k[q])}return new $5(K,a,{audio:A,video:y,ZF:m,contentProtection:d,UH:r,RR:N&&C?C/N:0,contentLength:C,lastModified:T,captionTrack:P,streamType:Q,approxDurationMs:Z})};
klf=function(Z){return Er(Z,k=>"FORMAT_STREAM_TYPE_OTF"===k.stream_type)?"FORMAT_STREAM_TYPE_OTF":"FORMAT_STREAM_TYPE_UNKNOWN"};
NVj=function(Z,k,N=0,a){a=new g.Zu("",a,!1);a.duration=N||0;for(const T of Z)if(Z=cf(T,k,a.duration),N=ly(T.url,T.sp,T.s))if(Z.streamType==="FORMAT_STREAM_TYPE_OTF")aZ(a,new Qj(N,Z));else{const K=uI(T.init),y=uI(T.index);aZ(a,new qM(N,Z,K,y))}a.isOtf=!0;return a};
awG=function(Z,k,N=0,a){a=new g.Zu("",a?.experiments,!1);a.duration=N||0;for(const T of Z){Z=cf(T,k,a.duration);N=uI(T.init);const K=uI(T.index),y=ly(T.url,T.sp,T.s);y&&aZ(a,new qM(y,Z,N,K))}return a};
cf=function(Z,k,N=0){let a=Z.type;var T=Z.itag;var K=Z.xtags;K&&(T=Z.itag+";"+K);if(i1(a)){var y=(Z.size||"640x360").split("x");y=new w0(+y[0],+y[1],+Z.fps,Z.projection_type,+Z.stereo_layout,void 0,Z.quality_label,+Z.quality_ordinal,Z.eotf,Z.primaries);a=r_(a,y,CD[Z.itag]);mJ&&(a+="; enableflushduringseek=true");sS&&(a+="; enableresetaudiodecoder=true")}let Q,q;vz(a)&&(Q=new g0(+Z.audio_sample_rate||void 0,+Z.audio_channels||0,Z.spatial_audio_type,!!Z.drc),Z.name&&(q=new g.Al(Z.name,Z.audio_track_id,
Z.isDefault==="1",Z.isAutoDubbed==="1")));let r;Z.caption_display_name&&Z.caption_vss_id&&Z.caption_language_code&&(r=new ZWG(Z.caption_display_name,Z.caption_vss_id,Z.caption_language_code,Z.caption_kind,Z.xtags,Z.caption_id));K=Number(Z.bitrate)/8;const C=Number(Z.clen),m=Number(Z.lmt);N=N&&C?C/N:0;let A;if(k&&Z.drm_families){A={};for(const P of Z.drm_families.split(","))A[P]=k[P]}return new $5(T,a,{audio:Q,video:y,ZF:q,contentProtection:A,UH:K,RR:N,contentLength:C,lastModified:m,captionTrack:r,
streamType:Z.stream_type,approxDurationMs:Number(Z.approx_duration_ms)})};
TV0=function(Z){switch(Z){case "equirectangular":return"EQUIRECTANGULAR";case "equirectangular_threed_top_bottom":return"EQUIRECTANGULAR_THREED_TOP_BOTTOM";case "mesh":return"MESH";case "rectangular":return"RECTANGULAR";default:return"UNKNOWN"}};
K60=function(Z){switch(Z){case "spatial_audio_type_ambisonics_5_1":return"SPATIAL_AUDIO_TYPE_AMBISONICS_5_1";case "spatial_audio_type_ambisonics_quad":return"SPATIAL_AUDIO_TYPE_AMBISONICS_QUAD";case "spatial_audio_type_foa_with_non_diegetic":return"SPATIAL_AUDIO_TYPE_FOA_WITH_NON_DIEGETIC";default:return"SPATIAL_AUDIO_TYPE_NONE"}};
Qr0=function(Z,k,N){return yNN(new g.Zu(Z,k,N),Z)};
tQ=function(Z){return g.vB(Z.V,k=>cq(15,5772,k.EH.V))};
Ffy=function(Z){return g.vB(Z.V,k=>!!k.info.video&&k.info.video.isHdr())};
aZ=function(Z,k){Z.V[k.info.id]=k;Z.Y.set(t$(k,Z.Rn),k)};
yNN=function(Z,k=""){Z.state=1;Z.Sm=(0,g.z)();return pm0(k||Z.sourceUrl).then(N=>{if(!Z.jm()){Z.B9=N.status;N=N.responseText;const T=new DOMParser;N=ak(T,n0(N),"text/xml").getElementsByTagName("MPD")[0];Z.zt=L9f(Sg(N,"minimumUpdatePeriod"))*1E3||Infinity;b:{if(N.attributes)for(a of N.attributes)if(a.value==="http://youtube.com/yt/2012/10/10"){var a=a.name.split(":")[1];break b}a=""}Z.j=a;Z.isLive=Z.zt<Infinity&&Z.isLivePlayback;Z.tq=Number(Sg(N,Z.j+":earliestMediaSequence"))||0;if(a=Date.parse(VMf(Sg(N,
Z.j+":mpdResponseTime"))))Z.FS=((0,g.z)()-a)/1E3;Z.isLive&&N.getElementsByTagName("SegmentTimeline").length<=0||g.Wy(N.getElementsByTagName("Period"),Z.qX,Z);Z.state=2;Z.publish("loaded");qLr(Z)}return Z}).eK(N=>{let a;
N instanceof bi&&(a=N.xhr,Z.B9=a.status);Z.state=3;Z.publish("loaderror");return xE(a)})};
g.rNf=function(Z){return g.vB(Z.V,k=>O9(k.info.mimeType))};
ANy=function(Z){return g.vB(Z.V,k=>k.info.video?k.info.video.projectionType==="EQUIRECTANGULAR":!1)};
PJU=function(Z){return g.vB(Z.V,k=>k.info.video?k.info.video.projectionType==="EQUIRECTANGULAR_THREED_TOP_BOTTOM":!1)};
cNf=function(Z){return g.vB(Z.V,k=>k.info.video?k.info.video.projectionType==="MESH":!1)};
HWi=function(Z){return g.vB(Z.V,k=>k.info.video?k.info.video.stereoLayout===1:!1)};
dJN=function(Z){return iT(Z.V,k=>k.info.video?k.tq():!0)};
L6U=function(Z,k){let N=Sg(k,"id");N=N.replace(":",";");let a=Sg(k,"mimeType");var T=Sg(k,"codecs");a=T?`${a}; codecs="${T}"`:a;T=Number(Sg(k,"bandwidth"))/8;const K=Number(eg(k,"BaseURL").getAttribute(Z.j+":contentLength")),y=Z.duration&&K?K/Z.duration:0;if(i1(a)){var Q=Number(Sg(k,"width")),q=Number(Sg(k,"height")),r=Number(Sg(k,"frameRate"));const d=TV0(Sg(k,Z.j+":projectionType"));a:switch(Sg(k,Z.j+":stereoLayout")){case "layout_left_right":var C=1;break a;case "layout_top_bottom":C=2;break a;
default:C=0}C=new w0(Q,q,r,d,C)}if(vz(a)){var m=Number(Sg(k,"audioSamplingRate"));var A=Number(Sg(k.getElementsByTagName("AudioChannelConfiguration")[0],"value"));Q=K60(Sg(k,Z.j+":spatialAudioType"));m=new g0(m,A,Q);a:{q=Sg(k,"lang")||"und";if(A=eg(k,"Role"))if(r=Sg(A,"value")||"",g.Ge(XX0,r)){A=`${q}.${XX0[r]}`;Q=r==="main";Z=Sg(k,Z.j+":langName")||`${q} - ${r}`;A=new g.Al(Z,A,Q);break a}A=void 0}}if(k=eg(k,"ContentProtection"))if(k.getAttribute("schemeIdUri")==="http://youtube.com/drm/2012/10/10"){var P=
{};for(k=k.firstChild;k!=null;k=k.nextSibling){if(!(k instanceof Element))continue;if(!/SystemURL/.test(k.nodeName))continue;Z=k.getAttribute("type");Q=k.textContent;Z&&Q&&(P[Z]=Q.trim())}}else P=void 0;return new $5(N,a,{audio:m,video:C,ZF:A,contentProtection:P,UH:T,RR:y,contentLength:K})};
qLr=function(Z){var k=Z.zt;isFinite(k)&&(Hf(Z)?Z.refresh():(k=Math.max(0,Z.Sm+k-(0,g.z)()),Z.G||(Z.G=new g.Uc(Z.refresh,k,Z),g.u(Z,Z.G)),Z.G.start(k)))};
Hf=function(Z){return Z.isLive&&(0,g.z)()-Z.Sm>=Z.zt};
Vsy=function(Z){Z=Z.V;for(const k in Z){const N=Z[k].index;if(N.isLoaded())return N.hW()+1}return 0};
d_=function(Z){return Z.Y5?Z.Y5-(Z.N||Z.timestampOffset):0};
X3=function(Z){return Z.aE?Z.aE-(Z.N||Z.timestampOffset):0};
LD=function(Z){if(!isNaN(Z.vD))return Z.vD;var k=Z.V;for(var N in k){var a=k[N].index;if(a.isLoaded()&&!O9(k[N].info.mimeType)){k=0;for(N=a.N7();N<=a.hW();N++)k+=a.getDuration(N);k/=a.Vy();k=Math.round(k/.5)*.5;a.Vy()>10&&(Z.vD=k);return k}if(Z.isLive&&(a=k[N],a.Wi))return a.Wi}return NaN};
F60=function(Z,k){Z=Jc(Z.V,a=>a.index.isLoaded());
if(!Z)return NaN;Z=Z.index;const N=Z.pn(k);return Z.getStartTime(N)===k?k:N<Z.hW()?Z.getStartTime(N+1):NaN};
tsU=function(Z,k){if(!Z.V["0"]){var N=new $5("0","fakesb",{video:new w0(0,0,0,void 0,void 0,"auto")});Z.V["0"]=k?new Vj(new g.hY("http://www.youtube.com/videoplayback"),N,"fake"):new qM(new g.hY("http://www.youtube.com/videoplayback"),N,new h$(0,0),new h$(0,0))}};
F3=function(Z){if(Z.isManifestless)for(const k in Z.V)Z.V[k].index.segments=[]};
tl=function(Z,k,N){for(const a in Z.V){const T=O9(Z.V[a].info.mimeType)||Z.V[a].info.xT();N===T&&Z.V[a].index?.Vz(k)}};
hKX=function(Z){for(const k in Z.V)O9(Z.V[k].info.mimeType)||DPj(Z.V[k].index,Infinity)};
hl=function(Z,k,N){for(const y in Z.V){var a=Z.V[y].index,T=k,K=N;a.Nu&&(T&&(a.Fs=Math.max(a.Fs,T)),K&&(a.YV=Math.max(a.YV||0,K)))}N&&(Z.xW=N/1E3)};
uqi=function(Z,k,N,a=!1){a&&N===Z.Tt||(Z.dA.push(k),Z.Tt=N,Z.publish("cuepointsadded",N))};
lwy=function(Z){Z.aE=0;Z.Y5=0;Z.Nm=0};
un=function(Z){return Z.Rq&&Z.isManifestless?Z.isLiveHeadPlayable:Z.isLive};
r_=function(Z,k,N){ln===null&&(ln=window.MediaSource&&MediaSource.isTypeSupported&&MediaSource.isTypeSupported('video/webm; codecs="vp09.02.51.10.01.09.16.09.00"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.02.51.10.01.09.99.99.00"'));if(fwf&&window.MediaSource&&MediaSource.isTypeSupported!==void 0)return ln||N!=="9"&&N!=="("?ln||N!=="9h"&&N!=="(h"||(Z='video/webm; codecs="vp9.2"'):Z='video/webm; codecs="vp9"',Z;if(!ln&&!g_||Z!=='video/webm; codecs="vp9"'&&Z!=='video/webm; codecs="vp9.2"')return Z;
N="00";let a="08",T="01",K="01",y="01";Z==='video/webm; codecs="vp9.2"'&&(N="02",a="10",k.primaries==="bt2020"&&(y=T="09"),k.V==="smpte2084"&&(K="16"),k.V==="arib-std-b67"&&(K="18"));return`video/webm; codecs="${["vp09",N,"51",a,"01",T,K,y,"00"].join(".")}"`};
$y=function(Z,k,N){Z=`${Z}${k>49?"p60":k>32?"p48":""}`;k=yc()[Z];if(k!=null&&k>0)return k;k=w_.get(Z);if(k!=null&&k>0)return k;N=N?.get(Z);return N!=null&&N>0?N:8192};
BVN=function(Z,k=!1){ndU(k);IFr(k);if(k){for(const N of w_.keys())N.startsWith("1")||w_.delete(N);for(const N of GL.values())N.startsWith("1")||GL.delete(N);for(const N of Z.keys())N.startsWith("1")||Z.delete(N)}else w_.clear(),GL.clear(),Z.clear()};
vPf=function(Z,{isOtf:k,tH:N,IY:a,ES:T,x_:K,u7:y,wY:Q,E4:q,xY:r,disableAv1:C,Xb:m}){const A=new DJr(Z);if(Z.Xa()||Z.B("html5_logging_format_selection"))A.V=!0;A.tq=K;A.u7=y&&Z.C;A.xY=r;g.A5("windows nt 5.1")&&!g.SL&&(A.Gh=!0);if(K=N)K=g.eL(Z)?OWi(Z):!1;K&&(A.Vz=!0);Q&&(A.Gh=!0,A.jY=!0);k&&!Z.B("html5_otf_prefer_vp9")&&(A.Gh=!0);Z.playerStyle==="picasaweb"&&(k&&(A.Gh=!1),A.O=!1);T&&(A.Gh=!0);vo(Z.L,ex.CHANNELS)&&(Z.B("html5_enable_ac3")&&(A.Y=!0),Z.B("html5_enable_eac3")&&(A.L=!0),Z.B("html5_enable_ac3_gapless")&&
(A.FS=!0));Z.B("html5_block_8k_hfr")&&(A.Kp=!0);A.G=g.Q5(Z.experiments,"html5_max_selectable_quality_ordinal");A.j=g.Q5(Z.experiments,"html5_min_selectable_quality_ordinal");oZ&&(A.r5=480);if(a||N)A.O=!1;A.Qz=!1;A.disableAv1=C;k=Jl(Z,A.U,void 0,A.disableAv1);k>0&&k<2160&&(jx()||Z.B("html5_format_hybridization"))&&(A.U.supportsChangeType=+jx(),A.Eq=k);k>=2160&&(A.dA=!0);A.E4=q;A.Rq=g.Z3||lR()&&!q?!1:!0;A.C=Z.B("html5_format_hybridization");A.hq=Z.B("html5_disable_encrypted_vp9_live_non_2k_4k");A.Tt=
m;return A};
Jl=function(Z,k={},N,a=!1){if(a)return k.disabled=1,0;if(vo(Z.L,ex.AV1_CODECS)&&vo(Z.L,ex.HEIGHT)&&vo(Z.L,ex.BITRATE))return k.isCapabilityUsable=1,8192;a=1080;var T=navigator.hardwareConcurrency;T<=2&&(a=480);k.coreCount=T;if(T=g.Q5(Z.experiments,"html5_default_av1_threshold"))a=k["default"]=T;if(Z=Z.L.Vz)k.mcap=Z,a=Math.max(a,Z);if(N){if(Z=N.videoInfos.find(K=>K.V())?.L?.powerEfficient)a=8192,k.isEfficient=1;
N=N.videoInfos[0].video;T=Math.min($y("1",N.fps),$y("1",30));k.perfCap=T;a=Math.min(a,T);N.isHdr()&&!Z&&(k.hdr=1,a*=.75)}else N=$y("1",30),k.perfCap30=N,a=Math.min(a,N),N=$y("1",60),k.perfCap60=N,a=Math.min(a,N);return k.av1Threshold=a};
cnb=function(Z){let k=["o","a","A"];Z.xY===1&&(Z.Y&&(k=["mac3","MAC3"].concat(k)),Z.L&&(k=["meac3","MEAC3"].concat(k)),Z.pF&&(k=["i","I"].concat(k)));Z.Vz&&(k=["so","sa"].concat(k));!Z.jY||Z.FS||Z.D||Z.Ap||k.unshift("a");Z.D&&(k=(iWG[Z.D]||[Z.D]).concat(k));return k};
tH0=function(Z){if(Z.tq)return["f"];if(g.A5("appletv5"))return"h 9h 9 8 H (h ( *".split(" ");let k=["9h","9","h","8"];Z.iq&&k.push("1e");k=k.concat(["(h","(","H","*"]);Z.dA&&(k.unshift("1"),k.unshift("1h"));Z.Gh&&k.unshift("h");Z.N&&(k=(iWG[Z.N]||[Z.N]).concat(k));return k};
zL=function(){const Z=window;let k=Z.MSMediaKeys;Xn()&&!k&&(k=Z.WebKitMediaKeys);return k&&k.isTypeSupported?k:null};
US=function(Z){return navigator.requestMediaKeySystemAccess?g.Cf&&!g.ce()?Vd("45"):g.Z3||g.yd?Z.yz("edge_nonprefixed_eme"):g.SL?Vd("47"):g.v9&&Z.yz("html5_enable_safari_fairplay")?!1:!0:!1};
bn=function(Z){return Z.Y?!1:!Z.keySystemAccess&&!!zL()&&Z.keySystem==="com.microsoft.playready"};
pD=function(Z){return Z.keySystem==="com.microsoft.playready"};
RZ=function(Z){return!Z.keySystemAccess&&!!zL()&&Z.keySystem==="com.apple.fps.1_0"};
MM=function(Z){return Z.keySystem==="com.youtube.fairplay"};
g.nD=function(Z){return Z.flavor==="fairplay"};
gPf=function(Z,k,N,a){const T=He(),K=(N=T||N&&Xn())?["com.youtube.fairplay"]:["com.widevine.alpha"];k&&K.unshift("com.youtube.widevine.l3");T&&a&&K.unshift("com.youtube.fairplay.sbdl");return N?K:Z?[...K,...IZ.playready]:[...IZ.playready,...K]};
ES=function(Z){if(!Z.jm())if(Z.U.length===0)Z.callback(Z.Y);else{var k=Z.U[0],N=Z.D[k],a=wXU(Z,N);jL&&jL.keySystem===k&&jL.o$===JSON.stringify(a)?(Z.U6("remksa",{re:!0}),$Jy(Z,N,jL.keySystemAccess)):(Z.U6("remksa",{re:!1,ok:jL?.keySystem??""}),jL=void 0,navigator.requestMediaKeySystemAccess(k,a).then(zK(T=>{$Jy(Z,N,T,a)}),zK(()=>{Z.L=!Z.L&&Z.D[Z.U[0]].flavor==="widevine";
Z.L||Z.U.shift();ES(Z)})))}};
Gli=function(Z){if(zL()&&(g.v9||VL))Z.Y.push(new Wf("fairplay","com.apple.fps.1_0","",Z.Jq.experiments));else{var k=xJf(),N=g.ZD(Z.U,a=>{const T=Z.D[a];let K=!1,y=!1;for(const Q in Z.V[T.flavor])k(Q,a)&&(T.U[Q]=!0,K=K||Q.indexOf("audio/")===0,y=y||Q.indexOf("video/")===0);return K&&y});
N&&Z.Y.push(Z.D[N]);Z.U=[]}Z.callback(Z.Y)};
var SLf=function(Z,k,N,a,T){return bY[c[2]](this,1,3045,Z,k,N,a,T)};
eKU=function(Z,k){Z.callback=k;Z.Y=[];US(Z.Jq.experiments)?ES(Z):Gli(Z)};
wXU=function(Z,k){const N={initDataTypes:["cenc","webm"],audioCapabilities:[],videoCapabilities:[]};if(Z.B("html5_enable_vp9_fairplay")&&MM(k))return N.audioCapabilities.push({contentType:'audio/mp4; codecs="mp4a.40.5"'}),N.videoCapabilities.push({contentType:'video/mp4; codecs="avc1.4d400b"'}),[N];pD(k)&&(N.initDataTypes=["keyids","cenc"]);for(const T of Object.keys(Z.V[k.flavor])){var a=T.indexOf("audio/")===0;const K=a?N.audioCapabilities:N.videoCapabilities;k.flavor!=="widevine"||Z.L?K.push({contentType:T}):
a?K.push({contentType:T,robustness:"SW_SECURE_CRYPTO"}):(g.Cf&&g.A5("windows nt")&&!Z.B("html5_drm_enable_moho")||K.push({contentType:T,robustness:"HW_SECURE_ALL"}),a=T,Z.Jq.L.U&&T.includes("vp09")&&(a=T+"; experimental=allowed"),K.push({contentType:a,robustness:"SW_SECURE_DECODE"}),Yy(Z.Jq)==="MWEB"&&(uR()||Pe())&&(Z.U6("swcrypto",{}),K.push({contentType:T,robustness:"SW_SECURE_CRYPTO"})))}return[N]};
$Jy=function(Z,k,N,a){if(!Z.jm()){a&&(jL={keySystem:k.keySystem,keySystemAccess:N,o$:JSON.stringify(a)});k.keySystemAccess=N;if(pD(k)){var T=q9();for(var K of Object.keys(Z.V[k.flavor]))k.U[K]=!!T.canPlayType(K)}else{K=k.keySystemAccess.getConfiguration();if(K.audioCapabilities)for(T of K.audioCapabilities)k.U[T.contentType]=!0;if(K.videoCapabilities)for(const y of K.videoCapabilities)k.U[y.contentType]=!0}Z.Y.push(k);Z.useCobaltWidevine||Z.B("html5_enable_vp9_fairplay")&&k.V()?(Z.U.shift(),ES(Z)):
Z.callback(Z.Y)}};
xJf=function(){const Z=zL();if(Z){const N=Z.isTypeSupported;return(a,T)=>N(T,a)}const k=q9();
return k&&(k.addKey||k.webkitAddKey)?(N,a)=>!!k.canPlayType(N,a):()=>!1};
UJR=function(Z,k){switch(k.St){case "bool":return Z.yz(k.EN);case "int":return Z=oPf(Z,k.EN),Nm(Z);case "double":return oPf(Z,k.EN);case "string":return JNf(Z,k.EN);case "int32_list":return zKf(Z,k.EN);case "int64_list":return zKf(Z,k.EN).map(N=>Nm(N));
case "string_list":throw Error("String list flags are not supported in WPCC");default:throw Error("Unknown flag type");}};
oPf=function(Z,k){Z=Z.flags.get(`${k}`);return Number(Z)||0};
JNf=function(Z,k){return(Z=Z.flags.get(`${k}`))?Z.toString():""};
zKf=function(Z,k){if(Z=Z.flags.get(`${k}`))if(Z=Z.replace(/\[ *(.*?) *\]/,"$1"))return Z.split(",").map(Number);return[]};
Zf=function(Z,k){return(Z=Z.Aq(k))?Z.toString():""};
g.Q5=function(Z,k,N=0){Z=Z.Aq(k);JSON.stringify(Z);return Z===void 0?N:Number(Z)};
bWy=function(Z){if(Z=Z.Aq("html5_web_po_experiment_ids"))if(Z=Z.replace(/\[ *(.*?) *\]/,"$1"))return Z.split(",").map(Number);return[]};
pXX=function(Z){if(Z.V)return Z.V;if(Z.experimentIds.length<=1)return Z.V=Z.experimentIds,Z.V;const k=[...Z.experimentIds].map(N=>Number(N));
k.sort();for(let N=k.length-1;N>0;--N)k[N]-=k[N-1];Z.V=k.map(N=>N.toString());
Z.V.unshift("v1");return Z.V};
dPf=function(Z,k){const N=new Map;for(const a of k.keys()){const T=a.split("_")[0];Z.has(T)||N.set(a,k.get(a))}return N};
Lff=function(Z,k,N){const a=k.video?.fps||0,T=`${Z}_${a}`,K=!!k.audio,y={itag:k.itag,gA:Z,H9:K};if(K)y.numChannels=k.audio.numChannels;else{var Q=k.video;y.maxWidth=Q?.width;y.maxHeight=Q?.height;y.maxFramerate=a;y.maxBitrateBps=k.UH*8;y.Q6=Q?.isHdr()}Q=N.get(T);Q?K||(k=Math.max(Q.maxWidth||0,Q.maxHeight||0)>Math.max(y.maxWidth||0,y.maxHeight||0)?Q:y,Z={itag:k.itag,gA:Z,H9:K,maxWidth:Math.max(Q.maxWidth||0,y.maxWidth||0),maxHeight:Math.max(Q.maxHeight||0,y.maxHeight||0),maxFramerate:a,Q6:k.Q6},Z.maxBitrateBps=
k.maxBitrateBps,N.set(T,Z)):N.set(T,y)};
Blj=function(Z,k,N=1){const a=k.itag;if(a==="0")return!0;let T=k.mimeType;if(k.gA==="1e"&&!Z.Y)return"dav1enc";if(k.V()&&Z.N)return"dav1";if(k.video&&(k.video.isHdr()||k.video.primaries==="bt2020")&&!(vo(Z,ex.EOTF)||window.matchMedia&&(window.matchMedia("(dynamic-range: high), (video-dynamic-range: high)").matches||window.screen.pixelDepth>24&&window.matchMedia("(color-gamut: p3)").matches)))return"dhdr";if(a==="338"&&!(g.Cf?Vd(53):g.SL&&Vd(64)))return"dopus";N=jPy(k,N);Z.U&&k.Y()&&(N[ex.EXPERIMENTAL.name]=
"allowed");for(const Q of Object.keys(ex)){const q=ex[Q];var K;if(K=N[q.name])if(K=!(q===ex.EOTF&&k.mimeType.indexOf("vp09.02")>0)){K=q;var y=k;K=!(Z.experiments.yz("html5_ignore_h264_framerate_cap")&&K===ex.FRAMERATE&&(y.gA==="H"||y.gA==="h"))}if(K)if(vo(Z,q))if(Z.L){if(Z.L[q.name]<N[q.name])return q.name}else T=`${T}; ${q.name}=${N[q.name]}`;else if(x5(k)&&q===ex.EOTF)return"dvp92"}Z.C&&k.video&&k.video.qualityOrdinal>1080&&k.contentProtection&&(T+="; hdcp=2.2");return a==="227"?"hqcenc":a!=="585"&&
a!=="588"&&a!=="583"&&a!=="586"&&a!=="584"&&a!=="587"&&a!=="591"&&a!=="592"||Z.experiments.yz("html5_enable_new_hvc_enc")?He()&&mp()>=21&&g.A5("appletv5")&&(a==="410"||a==="845")?!0:Z.isTypeSupported(T)?!0:"tpus":"newhvc"};
vo=function(Z,k){k.name in Z.j||(Z.j[k.name]=RKr(Z,k));return Z.j[k.name]};
Msy=function(Z){navigator.mediaCapabilities?.decodingInfo&&navigator.mediaCapabilities.decodingInfo({type:"media-source",video:{contentType:'video/mp4; codecs="av01.0.12M.08"',width:3840,height:2160,bitrate:32E6,framerate:60}}).then(k=>{k.smooth&&k.powerEfficient&&(Z.Vz=2160)})};
k2=function(){const Z=Pe()&&!Vd(29),k=g.A5("google tv")&&g.A5("chrome")&&!Vd(30);return Z||k?!1:Z0r()};
nPN=function(Z,k,N){let a=480;for(const T of k)k=T.video.qualityOrdinal,k<=1080&&k>a&&Blj(Z,T,N)===!0&&(a=k);return a};
g.NZ=function(Z,k=!1){return k2()&&Z.isTypeSupported('audio/mp4; codecs="mp4a.40.2"')||!k&&Z.canPlayType(q9(),"application/x-mpegURL")?!0:!1};
TC=function(Z){const k={ns:Z.HA,el:Z.eventLabel,cpn:Z.clientPlaybackNonce,ver:2,cmt:Z.U(Z.V),fmt:Z.FN,fs:Z.xl?"1":"0",rt:Z.U(Z.bq),adformat:Z.adFormat,content_v:Z.contentVideoId,euri:Z.gQ,lact:Z.ov,live:Z.gV,cl:(881726199).toString(),mos:Z.LC,state:Z.playerState,volume:Z.j9};Z.subscribed&&(k.subscribed="1");Object.assign(k,Z.tW);Z.C==="all"?Object.assign(k,Z.qX):Z.C==="once"&&Z.D&&Object.assign(k,Z.qX);Z.autoplay&&(k.autoplay="1");Z.hp&&(k.sautoplay="1");Z.O6&&(k.dni="1");!Z.L&&Z.Sm&&(k.epm=Iwf[Z.Sm]);
Z.isFinal&&(k["final"]="1");Z.MX&&(k.splay="1");Z.g8&&(k.delay=Z.g8);Z.tq&&(k.hl=Z.tq);Z.region&&(k.cr=Z.region);Z.userGenderAge&&(k.uga=Z.userGenderAge);Z.userAge!==void 0&&Z.s6&&(k.uga=Z.s6+Z.userAge);Z.vD!==void 0&&(k.len=Z.U(Z.vD));(!Z.L||Z.pF)&&Z.experimentIds.length>0&&(k.fexp=Z.experimentIds.toString());Z.j!==null&&(k.rtn=Z.U(Z.j));Z.VA&&(k.feature=Z.VA);Z.fX&&(k.ctrl=Z.fX);Z.sx&&(k.ytr=Z.sx);Z.hq&&(k.afmt=Z.hq);Z.offlineDownloadUserChoice&&(k.ODUC=Z.offlineDownloadUserChoice);Z.Vz&&(k.lio=
Z.U(Z.Vz));Z.L?(k.idpj=Z.e8,k.ldpj=Z.rD,Z.delayThresholdMet&&(k.dtm="1"),Z.N!=null&&(k.rti=Z.U(Z.N)),Z.xu&&(k.ald=Z.xu),Z.compositeLiveIngestionOffsetToken&&(k.clio=Z.compositeLiveIngestionOffsetToken)):Z.adType!==void 0&&(k.at=Z.adType);Z.jY&&(Z.D||Z.L)&&(k.size=Z.jY);Z.D&&Z.G.length&&(k.pbstyle=Z.G.join(","));Z.iq!=null&&(Z.D||Z.L)&&(k.inview=Z.U(Z.iq));Z.heartbeatLoggingToken&&(k.hb_data=Z.heartbeatLoggingToken);Z.L&&(k.volume=aO(Z,g.ni(Z.segments,N=>N.volume)),k.st=aO(Z,g.ni(Z.segments,N=>N.startTime)),
k.et=aO(Z,g.ni(Z.segments,N=>N.endTime)),Er(Z.segments,N=>N.playbackRate!==1)&&(k.rate=aO(Z,g.ni(Z.segments,N=>N.playbackRate))),Er(Z.segments,N=>N.V!=="-")&&(k.als=g.ni(Z.segments,N=>N.V).join(",")),Er(Z.segments,N=>N.previouslyEnded)&&(k.pe=g.ni(Z.segments,N=>`${+N.previouslyEnded}`).join(",")));
k.muted=aO(Z,g.ni(Z.segments,N=>N.muted?1:0));
Er(Z.segments,N=>N.visibilityState!==0)&&(k.vis=aO(Z,g.ni(Z.segments,N=>N.visibilityState)));
Er(Z.segments,N=>N.connectionType!==0)&&(k.conn=aO(Z,g.ni(Z.segments,N=>N.connectionType)));
Er(Z.segments,N=>N.U!==0)&&(k.blo=aO(Z,g.ni(Z.segments,N=>N.U)));
Er(Z.segments,N=>!!N.L)&&(k.blo=g.ni(Z.segments,N=>N.L).join(","));
Er(Z.segments,N=>!!N.compositeLiveStatusToken)&&(k.cbs=g.ni(Z.segments,N=>N.compositeLiveStatusToken).join(","));
Er(Z.segments,N=>N.D!=="-")&&(k.cc=g.ni(Z.segments,N=>N.D).join(","));
Er(Z.segments,N=>N.clipId!=="-")&&(k.clipid=g.ni(Z.segments,N=>N.clipId).join(","));
if(Er(Z.segments,N=>!!N.audioId)){let N="au";
Z.D&&(N="au_d");k[N]=g.ni(Z.segments,a=>a.audioId).join(",")}H8()&&Z.O&&(k.ctt=Z.O,k.cttype=Z.Tt,k.mdx_environment=Z.mdxEnvironment);
Z.gD&&(k.etype=Z.zt!==void 0?Z.zt:0);Z.Qz&&(k.uoo=Z.Qz);Z.livingRoomAppMode&&Z.livingRoomAppMode!=="LIVING_ROOM_APP_MODE_UNSPECIFIED"&&(k.clram=jrb[Z.livingRoomAppMode]||Z.livingRoomAppMode);Z.Y?EPy(Z,k):(k.docid=Z.videoId,k.referrer=Z.referrer,k.ei=Z.eventId,k.of=Z.Lg,k.osid=Z.osid,k.vm=Z.videoMetadata,Z.adQueryId&&(k.aqi=Z.adQueryId),Z.autonav&&(k.autonav="1"),Z.playlistId&&(k.list=Z.playlistId),Z.C7&&(k.ssrt="1"),Z.zf&&(k.upt=Z.zf));Z.D&&(Z.embedsRct&&(k.rct=Z.embedsRct),Z.embedsRctn&&(k.rctn=
Z.embedsRctn),Z.compositeLiveIngestionOffsetToken&&(k.clio=Z.compositeLiveIngestionOffsetToken));Z.Rq&&(k.host_cpn=Z.Rq);return k};
YLf=function(Z){W6i(()=>{for(const k of Object.keys(ex))vo(Z,ex[k])})};
RKr=function(Z,k){if(Z.L)return!!Z.L[k.name];if(k===ex.BITRATE&&Z.isTypeSupported('video/webm; codecs="vp9"; width=3840; height=2160; bitrate=2000000')&&!Z.isTypeSupported('video/webm; codecs="vp9"; width=3840; height=2160; bitrate=20000000'))return!1;if(k===ex.AV1_CODECS)return Z.isTypeSupported(`video/mp4; codecs=${k.valid}`)&&!Z.isTypeSupported(`video/mp4; codecs=${k.dR}`);let N;k.video?(N='video/webm; codecs="vp9"',Z.isTypeSupported(N)||(N='video/mp4; codecs="avc1.4d401e"')):(N='audio/webm; codecs="opus"',
Z.isTypeSupported(N)||(N='audio/mp4; codecs="mp4a.40.2"'));return Z.isTypeSupported(`${N}; ${k.name}=${k.valid}`)&&!Z.isTypeSupported(`${N}; ${k.name}=${k.dR}`)};
Zv0=function(Z,k){let N=0;Z.D.has(k)&&(N=Z.D.get(k).i4);Z.D.set(k,{i4:N+1,mD:2**(N+1)});Z.V=!0};
Nji=function(Z,k,N,a,T){if(k&&typeof k==="object"){const K=y=>kc0(Z,y,N,a,T);
if(Vb(k))return k.then(K);if(DX(k))return gz(k,K)}return kc0(Z,k,N,a,T)};
Tjy=function(Z,k,N,a=1){N>=0&&(k in Z.V||(Z.V[k]=new acy),Z.V[k].Wd(N,a))};
kc0=function(Z,k,N,a,T){const K=(0,g.z)();T=T?T(k):void 0;const y=T?.CE??1;y!==0&&Tjy(Z,T?.profile??N,K-a,y);return k};
K4y=function(Z){const k=window;k.ywc||(k.ywc={});var N=k.ywc[Z];if(N)return N;N={};return k.ywc[Z]=N};
y8r=function(Z){const k=window;k.ywc&&delete k.ywc[Z]};
Qbr=function(Z){const k=K4y(Z);if(k.binP)return k.binP;k.binP=Promise.resolve().then(()=>fetch(Z)).then(N=>{if(!N.ok)throw Error(`HTTP${N.statusText}`);
return N.arrayBuffer()});
k.binP.then(N=>{k.bin=N},()=>{y8r(Z)});
return k.binP};
Ctf=function(Z,k,N){return xi(void 0,function(){return function*(){const a=KQ.uD(),T=Z&&y7;if(!T&&!k)return N?.("wasmns",{p:Z?"1":"0",a:k?"1":"0",s:y7?"1":"0"}),v7(Error("wasm.wm.ns"));const K=new qBy;if(T)try{const y=yield*GK(r8i(K,Z)),Q=new Q7(y,K,!1,!0);KQ.NL("winit",a);N?.("wasmsw",{});return Q}catch(y){if(N?.("wasmerrw",{e:`${y}`}),!k)throw Error(`wasm.wm.iw: ${y}`);}if(!k)throw Error("wasm.wm.xx");try{const y=yield*GK(k(K)),Q=new Q7({exports:y},K,!0,!0);KQ.NL("winitjs",a);N?.("wasmsa",{});return Q}catch(y){throw N?.("wasmerra",
{e:`${y}`}),Error(`wasm.wm.ia: ${y}`);}}()})};
r8i=function(Z,k){return xi(mUr,function(){const N=this;return function*(){if(!N.V)throw"wasm.ps.ns";const a=yield*GK(sbX(N,k));if(!a)throw"wasm.ps.um";return yield*GK(WebAssembly.instantiate(a,Z))}()})};
sbX=function(Z,k){return xi(Z,function(){const N=this;return function*(){const a=[],T=()=>"wasm.ps.c: ["+a.map(Q=>`"${Q}"`).join(", ")+"]",K=K4y(k);
if(K.mod)return K.mod;if(K.modP)try{return yield*GK(K.modP)}catch(Q){a.unshift("pcm")}let y=K.bin;if(!y&&K.binP)try{y=yield*GK(K.binP)}catch(Q){a.unshift("pfb")}if(!y)try{y=yield*GK(Qbr(k))}catch(Q){throw N.V=!1,a.unshift(`fb: ${Q}`),T();}try{return yield*GK(WebAssembly.compile(y))}catch(Q){y8r(k),a.unshift(`ca: ${Q}`)}throw T();}()})};
A8N=function(Z,k,N,a){N=Z.V.uh(N);var T=Z.U;T.V.exports.AES128CTRCipher_setCounter(T.cipher,N.byteOffset);k=Z.V.uh(k);Z.U.encrypt(k);T=void 0;if(a){a=Z.V;T=Z.D;const K=new Uint8Array(a.exports.memory.buffer,a.malloc(32),32);a.exports.Sha256Hmac(T.byteOffset,T.byteLength,N.byteOffset,N.byteLength,k.byteOffset,k.byteLength,K.byteOffset);T=Z.V.Oo(K)}Z.V.free(N.byteOffset);return{D8:Z.V.Oo(k),signature:T}};
PtG=function(Z){Z.Y||(Z.Y=new qZ(Z.U));return Z.Y};
rr=function(Z){try{return vF(Z)}catch(k){return null}};
c8G=function(Z){var k=M1f();if(k.values){k=k.values;const y={};for(var N of Object.keys(Z.values)){k[N]&&Z.U[N]&&(Z.values[N]+=k[N]-Z.U[N]);var a=Z,T=a;if(!T.values[N]){var K=M1f();T.values=K.values||{};T.SV=K.halfLives||{};T.U=K.values?Object.assign({},K.values):{}}y[N]=a.values[N]&&a.SV[N]?a.values[N]/2**(a.V/a.SV[N]):0}Z.U=y}N=Z.SV;k={};k.values=Z.U;k.halfLives=N;g.Z_("yt-player-memory",k,2592E3)};
yw=function(Z){return/web/i.test(Yy(Z))};
g.CQ=function(Z){return Yy(Z)==="WEB_UNPLUGGED"};
g.oJ=function(Z){return Yy(Z)==="WEB_REMIX"};
g.ml=function(Z){return Z.B("html5_local_playsinline")?VL&&!g.hg(602)&&!("playsInline"in q9()):VL&&!Z.x9||g.A5("nintendo wiiu")?!0:!1};
g.PQ=function(Z){return Z.Y&&g.s$(Z)&&!A4(Z)&&!Z.G};
Hvj=function(Z){return Yy(Z)==="TVHTML5_SIMPLY_EMBEDDED_PLAYER"};
A4=function(Z){return Z.zt==="adunit"||Z.playerStyle==="gvn"};
cQ=function(Z){return Z.zt==="detailpage"};
g.s$=function(Z){return Z.zt==="embedded"};
g.HQ=function(Z){return Z.zt==="profilepage"};
g.dr=function(Z){if(!Z.webPlayerContextConfig?.embedsHostFlags?.enableLiteUx||Z.HA||Z.G||Z.D||Z.dA==="EMBEDDED_PLAYER_MODE_PFP")return"EMBEDDED_PLAYER_LITE_MODE_NONE";Z=g.Q5(Z.experiments,"embeds_web_lite_mode");return Z===void 0?"EMBEDDED_PLAYER_LITE_MODE_UNKNOWN":Z>=0&&Z<dUX.length?dUX[Z]:"EMBEDDED_PLAYER_LITE_MODE_UNKNOWN"};
XJ=function(Z,k,N=!1){Z.Tt=iR(Z.Tt,k.video_id);Z.tW=iR(Z.tW,k.eventid);Z.tW&&(kd=Z.tW);const a=[];for(const T of Object.keys(XY0)){const K=XY0[T],y=k[K];y!=null&&(y!==Z.V[K]&&a.push(K),Z.V[K]=y)}!N&&a.length>0&&Z.gF&&(a.sort(),g.L9(new g.jD("Player client parameters changed after startup",a)));Z.userAge=Ov(Z.userAge,k.user_age);Z.GF=iR(Z.GF,k.user_display_email);Z.userDisplayImage=iR(Z.userDisplayImage,k.user_display_image);g.LA(Z.userDisplayImage)||(Z.userDisplayImage="");Z.userDisplayName=iR(Z.userDisplayName,
k.user_display_name);Z.ix=iR(Z.ix,k.user_gender);Z.csiPageType=iR(Z.csiPageType,k.csi_page_type);Z.csiServiceName=iR(Z.csiServiceName,k.csi_service_name);Z.SK=Be(Z.SK,k.enablecsi);Z.pageId=iR(Z.pageId,k.pageid);if(N=k.enabled_engage_types)Z.enabledEngageTypes=new Set(N.split(","));k.living_room_session_po_token&&(Z.gV=k.living_room_session_po_token.toString())};
LQ=function(Z){return Yy(Z)==="WEB_KIDS"};
Yy=function(Z){return Z.V.c};
CA=function(Z,k){return!Z.G&&Pe()&&Vd(55)&&Z.controlsType==="3"&&!k};
g.V7=function(Z){Z=ki(Z.Bo);return Z==="www.youtube-nocookie.com"?"www.youtube.com":Z};
FJ=function(Z,k,N){return Z.protocol+"://i1.ytimg.com/vi/"+k+"/"+(N||"hqdefault.jpg")};
t4=function(Z){return cQ(Z)&&!g.CQ(Z)};
h4=function(Z){return Z.zt==="leanback"};
g.Qw=function(Z){return/^TVHTML5/.test(Yy(Z))};
uS=function(Z){return Yy(Z)==="TVHTML5"};
L4y=function(Z){return Z.V.cmodel==="CHROMECAST ULTRA/STEAK"||Z.V.cmodel==="CHROMECAST/STEAK"};
g.lS=function(){return window.devicePixelRatio>1?window.devicePixelRatio:1};
g.fQ=function(Z){return Yy(Z).toUpperCase()==="WEB"};
BQ=function(Z){return Yy(Z)==="TVHTML5_UNPLUGGED"};
g.KA=function(Z){return g.CQ(Z)||Yy(Z)==="TV_UNPLUGGED_CAST"||BQ(Z)};
g.Df=function(Z){return Yy(Z)==="WEB_MUSIC_INTEGRATIONS"};
g.O$=function(Z){return Yy(Z)==="WEB_EMBEDDED_PLAYER"};
VV0=function(Z,k=!1,N=!0){return!g.fQ(Z)||!k||!N};
g.eL=function(Z){return(Z.deviceIsAudioOnly||!g.Cf||Yh||Z.controlsType==="3"?!1:g.h5?Z.Y&&g.hg(51):!0)||(Z.deviceIsAudioOnly||!g.SL||Yh||Z.controlsType==="3"?!1:g.h5?Z.Y&&g.hg(48):g.hg(38))||(Z.deviceIsAudioOnly||!g.vQ||Yh||Z.controlsType==="3"?!1:g.h5?Z.Y&&g.hg(37):g.hg(27))||!Z.deviceIsAudioOnly&&g.iS&&!lqi()&&g.hg(11)||!Z.deviceIsAudioOnly&&g.v9&&g.hg("604.4")};
OWi=function(Z){if(g.s$(Z)&&gr)return!1;if(g.SL){if(!g.hg(47)||!g.hg(52)&&g.hg(51))return!1}else if(g.v9)return!1;return window.AudioContext||window.webkitAudioContext?!0:!1};
tVU=function(Z,k){return Z.enabledEngageTypes.has(k.toString())||F4f.includes(k)};
wr=function(Z){if(!Z.userDisplayImage)return"";const k=Z.userDisplayImage.split("/");if(k.length===5)return Z=k[k.length-1].split("="),Z[1]="s20-c",k[k.length-1]=Z.join("="),k.join("/");if(k.length===8)return k.splice(7,0,"s20-c"),k.join("/");if(k.length===9)return k[7]+="-s20-c",k.join("/");g.L9(new g.jD("Profile image not a FIFE URL.",Z.userDisplayImage));return Z.userDisplayImage};
g.$2=function(Z){let k=g.V7(Z);hGr.includes(k)&&(k="www.youtube.com");return Z.protocol+"://"+k};
g.GC=function(Z,k=""){if(Z.Ox){const N=new x2;let a;const T=Z.Ox();T.signedOut?a="":T.token?a=T.token:T.pendingResult.then(K=>{T.signedOut?N.resolve(""):N.resolve(K.token)},K=>{g.L9(new g.jD("b189348328_oauth_callback_failed",{error:K}));
N.resolve(k)});
return a!==void 0?Y6(a):new M2(N)}return Y6(k)};
Sb=function(Z,k=""){return Z.lk?Od(!0):$i(gz(Od(g.GC(Z,k)),N=>Od(!!N)),()=>Od(!1))};
uZf=function(Z,k){Z.s6=k;Z.jY?.V?.G(k);k.V?Z.JB.push("asmjs"):Z.JB.push("wasm")};
ki=function(Z){const k=g.kX(Z);return(Z=Number(g.YS(Z)[4]||null)||null)?`${k}:${Z}`:k};
eb=function(Z,k=!1){const N=CD[Z];let a=lcX[N];const T=fci[Z];if(!T||!a)return null;k=new w0(k?T.height:T.width,k?T.width:T.height,T.fps);a=r_(a,k,N);return new $5(Z,a,{video:k,UH:T.bitrate/8})};
DUy=function(Z){const k=lcX[CD[Z]],N=BjN[Z];return N&&k?new $5(Z,k,{audio:new g0(N.audioSampleRate,N.numChannels)}):null};
r8=function(Z,k,N,a){if(N)return nb();N={};const T=q9();for(const K of k)if(Z.canPlayType(T,K.getInfo().mimeType)||a)if(k=K.V.video.quality,!N[k]||N[k].getInfo().oa())N[k]=K;Z=[];N.auto&&Z.push(N.auto);for(const K of l1)(a=N[K])&&Z.push(a);return Z.length?Y6(Z):nb()};
vpf=function(Z,k=!1,N=!0,a={}){const T={};for(const y of Z){if(k&&MediaSource&&MediaSource.isTypeSupported&&(Z=y.type,y.audio_channels&&(Z=Z+"; channels="+y.audio_channels),!MediaSource.isTypeSupported(Z))){a[y.itag]="tpus";continue}if(!N&&y.drm_families&&(y.eotf==="smpte2084"||y.eotf==="arib-std-b67")){a[y.itag]="enchdr";continue}Z=void 0;const Q={bt709:"SDR",bt2020:"SDR",smpte2084:"PQ","arib-std-b67":"HLG"};var K=y.type.match(/codecs="([^"]*)"/);K=K?K[1]:"";y.audio_track_id&&(Z=new g.Al(y.name,
y.audio_track_id,!!y.is_default));const q=y.eotf;Z=new Ovf({itag:y.itag,url:y.url,codecs:K,width:Number(y.width),height:Number(y.height),fps:Number(y.fps),bitrate:Number(y.bitrate),audioItag:y.audio_itag,Ud:q?Q[q]:void 0,contentProtection:y.drm_families,ZF:Z,audioChannels:Number(y.audio_channels)});T[Z.itag]=T[Z.itag]||[];T[Z.itag].push(Z)}return T};
ivj=function(Z,k){Z.D.some(N=>N.ZF?.getId()===k);
Z.V=k};
gpr=function(Z){const k=[],N=[];for(const a of Z.U)a.bitrate<=Z.Y?k.push(a):N.push(a);k.sort((a,T)=>T.bitrate-a.bitrate);
N.sort((a,T)=>a.bitrate-T.bitrate);
Z.U=k.concat(N)};
oO=function(Z,k,N){Z.cpn&&(k=g.mW(k,{cpn:Z.cpn}));N&&(k=g.mW(k,{paired:N}));return k};
wYy=function(Z,k){Z=Z.itag.toString();k!==null&&(Z+=k.itag.toString());return Z};
$UU=function(Z,k){if(!(Yh||Xn()||He()))return null;Z=vpf(k,Z.B("html5_filter_fmp4_in_hls"));if(!Z)return null;k=[];const N={};for(const a of Object.keys(Z))for(const T of Z[a])if(T.ZF){const K=T.ZF.getId();if(!N[K]){const y=new g.J4(K,T.ZF);N[K]=y;k.push(y)}}return k.length>0?k:null};
opN=function(Z,k,N,a,T,K,y){if(!(Yh||Xn()||He()))return nb();const Q={},q=xUf(N),r=vpf(N,Z.B("html5_filter_fmp4_in_hls"),Z.L.G,Q);if(!r)return y({noplst:1}),nb();Gcy(r);const C={fairplay:"https://youtube.com/api/drm/fps?ek=uninitialized"};let m;N=[];const A=[],P=[];var d=null;let h="";a=a&&a.match(/hls_timedtext_playlist/)?new Ovf({itag:"0",url:a,codecs:"vtt",width:0,height:0,fps:0,bitrate:0,ZF:new g.Al("English","en",!1)}):null;for(const x of Object.keys(r))if(!Z.B("html5_disable_drm_hfr_1080")||
x!=="383"&&x!=="373")for(const e of r[x])if(e.width){for(const Jy of e.U)if(r[Jy]){e.V=Jy;break}e.V||(e.V=SBb(r,e));const Ki=r[e.V];if(!Ki)continue;N.push(e);e.contentProtection==="fairplay"&&(m=C);let yf="";e.Ud==="PQ"?yf="smpte2084":e.Ud==="HLG"&&(yf="arib-std-b67");yf&&(h=yf);P.push(eGf(Ki,[e],a,K,e.itag,e.width,e.height,e.fps,q,void 0,void 0,m,yf));if(!d||e.width*e.height*e.fps>d.width*d.height*d.fps)d=e}else A.push(e);else Q[x]="disdrmhfr";P.reduce((x,e)=>e.getInfo().isEncrypted()&&x,!0)&&(m=
C);
T=Math.max(T,0);const {fps:B=0,width:v=0,height:O=0}=d||{};d=Z.B("html5_native_audio_track_switching");P.push(eGf(A,N,a,K,"93",v,O,B,q,"auto",T,m,h,d));Object.entries(Q).length&&y(Q);return r8(Z.L,P,CA(Z,k),!1)};
eGf=function(Z,k,N,a,T,K,y,Q,q,r,C,m,A,P){let d=0,h="";for(const B of Z)h||(h=B.itag),B.audioChannels&&B.audioChannels>d&&(d=B.audioChannels,h=B.itag);T=new $5(T,"application/x-mpegURL",{audio:new g0(0,d),video:new w0(K,y,Q,null,void 0,r,void 0,void 0,A),contentProtection:m,rC:h});Z=new J8f(Z,k,N?[N]:[],a,!!P);Z.Y=C?C:1369843;return new zGy(T,Z,q)};
xUf=function(Z){for(const k of Z)if(k.url&&(Z=k.url.split("expire/"),!(Z.length<=1)))return+Z[1].split("/")[0];return NaN};
SBb=function(Z,k){for(const N of Object.keys(Z)){const a=Z[N][0];if(!a.width&&a.contentProtection===k.contentProtection&&!a.audioChannels)return N}return""};
Gcy=function(Z){const k=new Set;for(var N of Object.values(Z))if(N.length){var a=N[0];a.height&&a.codecs.startsWith("vp09")&&k.add(a.height)}N=[];if(k.size)for(const T of Object.keys(Z))Z[T].length&&(a=Z[T][0],a.height&&k.has(a.height)&&!a.codecs.startsWith("vp09")&&N.push(T));for(const T of N)delete Z[T]};
bvf=function(Z,k,N){const a=[];for(const T of N){if(!T||!T.url)continue;N=qD(T.type,"medium","0");a.push(new UUf(N,T.url))}return r8(Z.L,a,CA(Z,k),!1)};
pYy=function(Z,k){const N=[],a=qD(k.type,"auto",k.itag);N.push(new UUf(a,k.url));return r8(Z.L,N,!1,!0)};
MV0=function(Z){return Z&&RGN[Z]?RGN[Z]:null};
npb=function(Z){switch(Z){case "multiview.ustreamer_disabled":case "sabr.invalid_input_stream":case "sabr.live_no_max_sq":case "sabr.live_unauthorized_request":case "sabr.malformed_config":case "sabr.media_serving_enforcement_id_error":case "sabr.metadata_fetcher_error":case "sabr.no_audio_selected":case "sabr.no_available_formats":case "sabr.no_redirect_url":case "sabr.no_video_selected":case "sabr.too_many_chunk_reader_error_retries":return Z;default:return"sabr.config"}};
jbb=function(Z,k){if(k=k?.watchEndpointSupportedOnesieConfig?.html5PlaybackOnesieConfig)Z.Pg=new Icy(k)};
ZOj=function(Z,k,N,a){Z||(Z=k&&EpU.hasOwnProperty(k)&&W4N.hasOwnProperty(k)?W4N[k]+"_"+EpU[k]:void 0);k=Z;if(!k)return null;Z=k.match(YBR);if(!Z||Z.length!==5)return null;{const K=k.match(YBR);if(K){Z=Number(K[3]);var T=[7,8,10,5,6];Z=!(Number(K[1])===1&&Z===8)&&T.indexOf(Z)>=0}else Z=!1}return N||a||Z?k:null};
zC=function(Z,k){const N={};for(const T of Object.keys(kTf)){var a=k?k+T:T;a=Z[a+"_webp"]||Z[a];g.LA(a)&&(N[kTf[T]]=a)}return N};
U$=function(Z){const k={};if(!Z||!Z.thumbnails)return k;Z=Z.thumbnails.filter(T=>!!T.url);
Z.sort((T,K)=>T.width-K.width||T.height-K.height);
for(var N of Object.keys(Nbf)){var a=Number(N);const T=Nbf[a];for(const K of Z)if(K.width>=a){a=a6r(K.url);g.LA(a)&&(k[T]=a);break}}(N=Z.pop())&&N.width>=1280&&(N=a6r(N.url),g.LA(N)&&(k["maxresdefault.jpg"]=N));return k};
a6r=function(Z){return Z.startsWith("//")?"https:"+Z:Z};
bS=function(Z){return Z&&Z.baseUrl||""};
pQ=function(Z){Z=g.mm(Z);for(const k of Object.keys(Z)){const N=Z[k];Z[k]=Array.isArray(N)?N[0]:N}return Z};
Kni=function(Z,k){for(var N of k)if(k=N.playerAnnotationsUrlsRenderer){k.adsOnly&&(Z.EB=!0);if(N=k.loadPolicy)Z.annotationsLoadPolicy=TbR[N];if(N=k.invideoUrl)Z.fI=Vw(N);Z.hK=!0;break}};
yaf=function(Z,k){Z.botguardData=k.playerAttestationRenderer.botguardData;k=k.playerAttestationRenderer.challenge;k!=null&&(Z.F_=k)};
qpy=function(Z,k){Z.captionTracks=[];if(k.captionTracks)for(var N of k.captionTracks){var a=QUy(N.baseUrl);if(!a)return;a={is_translateable:!!N.isTranslatable,languageCode:N.languageCode,languageName:N.name&&g.YL(N.name),url:a,vss_id:N.vssId,kind:N.kind};a.name=N.trackName;a.displayName=N.name&&g.YL(N.name);Z.captionTracks.push(new g.RO(a))}Z.Zs=k.audioTracks||[];Z.Pc=k.defaultAudioTrackIndex||0;Z.b$=[];if(k.translationLanguages)for(const T of k.translationLanguages){N={};N.languageCode=T.languageCode;
N.languageName=g.YL(T.languageName);if(T.translationSourceTrackIndices){N.translationSourceTrackIndices=[];for(const K of T.translationSourceTrackIndices)N.translationSourceTrackIndices.push(K)}if(T.excludeAudioTrackIndices){N.excludeAudioTrackIndices=[];for(const K of T.excludeAudioTrackIndices)N.excludeAudioTrackIndices.push(K)}Z.b$.push(N)}Z.C1=[];if(k.defaultTranslationSourceTrackIndices)for(const T of k.defaultTranslationSourceTrackIndices)Z.C1.push(T);Z.u$=!!k.contribute&&!!k.contribute.captionsMetadataRenderer};
raN=function(Z,k,N){var a=k.errorScreen;if(!(a&&(a.playerLegacyDesktopYpcOfferRenderer||a.playerLegacyDesktopYpcTrailerRenderer||a.ypcTrailerRenderer)||N&&N.isUpcoming||["OK","LIVE_STREAM_OFFLINE","FULLSCREEN_ONLY"].includes(k.status))){Z.errorCode=MV0(k.errorCode)||"auth";if(N=a&&a.playerErrorMessageRenderer){Z.playerErrorMessageRenderer=N;const T=N.reason;T&&(Z.errorReason=g.YL(T));if(N=N.subreason)Z.sf=g.YL(N),Z.BM=N}else Z.errorReason=k.reason||null;N=k.status;N==="LOGIN_REQUIRED"?Z.errorDetail=
"1":N==="CONTENT_CHECK_REQUIRED"?Z.errorDetail="2":N==="AGE_CHECK_REQUIRED"?(k=(k=k.errorScreen)&&k.playerKavRenderer,Z.errorDetail=k&&k.kavUrl?"4":"3"):(a=a?.playerErrorMessageRenderer?.proceedButton?.buttonRenderer?.command,Z.errorDetail=k.isBlockedInRestrictedMode?"5":g.J(a,g.MZ)?.signal==="RELOAD_PAGE"?"7":"0")}};
CDX=function(Z,k){Z.V2=!0;const N=k.heartbeatToken;N&&(Z.drmSessionId=k.drmSessionId||"",Z.heartbeatToken=N,Z.Uo=Number(k.intervalMilliseconds),Z.Yn=Number(k.maxRetries),Z.L$=!!k.softFailOnError,Z.Pm=!!k.useInnertubeHeartbeatsForDrm);Z.heartbeatServerData=k.heartbeatServerData;Z.ZJ=!!k.heartbeatAttestationConfig?.requiresAttestation};
Aab=function(Z,k){for(const N of k){k=N.interstitials.map(a=>{const T=g.J(a,m_y);if(T)return{is_yto_interstitial:!0,raw_player_response:T};if(a=g.J(a,sUG))return Object.assign({is_yto_interstitial:!0},q2(a))});
for(const a of k)switch(N.podConfig.playbackPlacement){case "INTERSTITIAL_PLAYBACK_PLACEMENT_PRE":Z.interstitials=Z.interstitials.concat({time:0,playerVars:a,uy:5});break;case "INTERSTITIAL_PLAYBACK_PLACEMENT_POST":Z.interstitials=Z.interstitials.concat({time:0x7ffffffffffff,playerVars:a,uy:6});break;case "INTERSTITIAL_PLAYBACK_PLACEMENT_INSERT_AT_VIDEO_TIME":k=Number(N.podConfig.timeToInsertAtMillis),Z.interstitials=Z.interstitials.concat({time:k,playerVars:a,uy:k===0?5:7})}}};
PDR=function(Z,k){if(k=k.find(N=>!(!N||!N.tooltipRenderer)))Z.tooltipRenderer=k.tooltipRenderer};
cai=function(Z,k){k.subscribeCommand&&(Z.subscribeCommand=k.subscribeCommand);k.unsubscribeCommand&&(Z.unsubscribeCommand=k.unsubscribeCommand);k.addToWatchLaterCommand&&(Z.addToWatchLaterCommand=k.addToWatchLaterCommand);k.removeFromWatchLaterCommand&&(Z.removeFromWatchLaterCommand=k.removeFromWatchLaterCommand);k.getSharePanelCommand&&(Z.getSharePanelCommand=k.getSharePanelCommand)};
HOX=function(Z,k){k!=null?(Z.Vl=k,Z.o4=!0):(Z.Vl="",Z.o4=!1)};
LnR=function(Z,k){if(k=k.playerControlsOverlayRenderer)HOX(Z,k.controlBgHtml),k.mutedAutoplay?(k=g.J(k.mutedAutoplay,d_U))&&k.endScreen&&(k=g.J(k.endScreen,X0i))&&k.text&&(Z.QL=g.YL(k.text)):Z.mutedAutoplay=!1};
VBf=function(Z,k){var N=k.backgroundability;N&&N.backgroundabilityRenderer.backgroundable&&(Z.backgroundable=!0);k.offlineability?.offlineabilityRenderer?.offlineable&&(Z.offlineable=!0);if(N=k.contextParams)Z.contextParams=N;(N=k.pictureInPicture)&&N.pictureInPictureRenderer.playableInPip&&(Z.pipable=!0);k.playableInEmbed&&(Z.allowEmbed=!0);if(N=k.ypcClickwrap)k=N.playerLegacyDesktopYpcClickwrapRenderer,N=N.ypcRentalActivationRenderer,k?(Z.Bx=k.durationMessage||"",Z.Jl=!0):N&&(k=N.durationMessage,
Z.Bx=k?g.YL(k):"",Z.Jl=!0)};
tBX=function(Z,k,N){var a=bS(k.googleRemarketingUrl);a&&(Z.googleRemarketingUrl=a);if(a=bS(k.youtubeRemarketingUrl))Z.youtubeRemarketingUrl=a;if(a=k.heartbeatLoggingToken)Z.heartbeatLoggingToken=a;a={};var T=bS(k.ptrackingUrl);if(T){T=pQ(T);var K=T.oid;K&&(Z.U$=K);if(K=T.pltype)Z.o6=K;if(K=T.ptchn)Z.zg=K;if(K=T.ptk)Z.cg=encodeURIComponent(K);if(T=T.m)Z.xt=T}if(T=bS(k.qoeUrl)){T=g.mm(T);for(y of Object.keys(T))K=T[y],T[y]=Array.isArray(K)?K.join(","):K;var y=T;Z.G4=y;if(T=y.cat)Z.B("html5_enable_qoe_cat_list")?
Z.Ni=Z.Ni.concat(T.split(",")):Z.JB=T;if(T=y.live)Z.UJ=T;if(y=y.drm_product)Z.drmProduct=y}if(y=bS(k.videostatsPlaybackUrl)){y=pQ(y);if(T=y.adformat)if(N.adformat=T,K=Z.X(),K=ZOj(T,Z.FY,K.Y,K.C))Z.adFormat=K;if(K=y.aqi)N.ad_query_id=K;if(N=y.autoplay)Z.Ix=N=="1",Z.RV=N=="1";if(N=y.autonav)Z.isAutonav=N=="1";if(N=y.delay)Z.g8=Cg(N);if(N=y.ei)Z.eventId=N;if(N=rr(y.adcontext))try{var Q=Fny(N);Q&&(Z.qa=Q)}catch(q){g.L9(Error("Malformed adContext"))}if(N||T)Z.Ix=!0;if(Q=y.feature)Z.VA=Q;if(Q=y.list)Z.playlistId=
Q;if(Q=y.of)Z.Lg=Q;if(Q=y.osid)Z.osid=Q;if(Q=y.referrer)Z.referrer=Q;if(Q=y.sdetail)Z.lQ=Q;if(Q=y.sourceid)Z.pd6=Q;if(Q=y.ssrt)Z.C7=Q=="1";if(Q=y.subscribed)Z.subscribed=Q=="1";if(Q=y.uga)Z.userGenderAge=Q;if(Q=y.upt)Z.zf=Q;if(Q=y.vm)Z.videoMetadata=Q;a.playback=y}if(Q=bS(k.videostatsWatchtimeUrl)){Q=pQ(Q);if(N=Q.ald)Z.xu=N;a.watchtime=Q}if(Q=bS(k.atrUrl))Q=pQ(Q),a.atr=Q;if(Q=bS(k.engageUrl))Q=pQ(Q),a.engage=Q;Z.Qu=a;k.promotedPlaybackTracking&&(a=k.promotedPlaybackTracking,a.startUrls&&(Z.eN=a.startUrls),
a.firstQuartileUrls&&(Z.iT=a.firstQuartileUrls),a.secondQuartileUrls&&(Z.Mk=a.secondQuartileUrls),a.thirdQuartileUrls&&(Z.cS=a.thirdQuartileUrls),a.completeUrls&&(Z.Cg=a.completeUrls),a.engagedViewUrls&&(a.engagedViewUrls.length>1&&g.L9(new g.jD("There are more than one engaged_view_urls.")),Z.y7=a.engagedViewUrls[0]));Z.B("html5_send_serialized_one_time_qoe_context_data")&&k.serializedOneTimeQoeContextData&&(Z.serializedOneTimeQoeContextData=k.serializedOneTimeQoeContextData)};
hDj=function(Z,k,N){for(const a of k)if(a&&(k=a.playerLegacyDesktopWatchAdsRenderer)&&(k=k.playerAdParams)){k.autoplay=="1"&&(Z.Ix=!0,Z.RV=!0);Z.SB=k.encodedAdSafetyReason||null;k.showContentThumbnail!==void 0&&(Z.WU=!!k.showContentThumbnail);N.enabled_engage_types=k.enabledEngageTypes;break}};
uYf=function(Z,k){var N=k.manifestlessWindowedLiveConfig;if(N){var a=Number(N.minDvrSequence),T=Number(N.maxDvrSequence),K=Number(N.minDvrMediaTimeMs),y=Number(N.maxDvrMediaTimeMs);N=Number(N.startWalltimeMs);a&&(Z.Y8=a);K&&(Z.aE=K/1E3,Z.B("html5_sabr_parse_live_metadata_playback_boundaries")&&nQ(Z)&&(Z.SG=K/1E3));T&&(Z.rr=T);y&&(Z.Y5=y/1E3,Z.B("html5_sabr_parse_live_metadata_playback_boundaries")&&nQ(Z)&&(Z.cU=y/1E3));N&&(Z.Nm=N/1E3);(a||K)&&(T||y)&&(Z.KX=!0,Z.isLivePlayback=!0,Z.allowLiveDvr=!0,
Z.M4=!1)}if(a=k.daiConfig){if(a.enableDai){Z.g_=!0;if(T=a.enableServerStitchedDai)Z.enableServerStitchedDai=T;if(T=a.enablePreroll)Z.Uu=T}if(a.daiType==="DAI_TYPE_SS_DISABLED"||a.debugInfo?.isDisabledUnpluggedChannel)Z.J2=!0;a.daiType==="DAI_TYPE_CLIENT_STITCHED"&&(Z.Q2=!0);a.allowUstreamerRequestAdconfig&&(Z.hS=!0);a.sendSsdaiMissingAdBreakReasons&&(Z.KB=!0)}if(a=k.audioConfig){T=a.loudnessDb;T!=null&&(Z.lz=T);T=a.trackAbsoluteLoudnessLkfs;T!=null&&(Z.Ji=T);T=a.loudnessTargetLkfs;T!=null&&(Z.loudnessTargetLkfs=
T);a.audioMuted&&(Z.BT=!0);a.muteOnStart&&(Z.Di=!0);if(T=a.loudnessNormalizationConfig)T.applyStatefulNormalization&&(Z.applyStatefulNormalization=!0),T.preserveStatefulLoudnessTarget&&(Z.preserveStatefulLoudnessTarget=!0),K=T.minimumLoudnessTargetLkfs,K!=null&&(Z.minimumLoudnessTargetLkfs=K),T=T.maxStatefulTimeThresholdSec,T!=null&&(Z.maxStatefulTimeThresholdSec=T);a.playAudioOnly&&(Z.oC=!0)}if(T=k.playbackEndConfig)a=T.endSeconds,T=T.limitedPlaybackDurationInSeconds,Z.mutedAutoplay&&(a&&(Z.endSeconds=
a),T&&(Z.limitedPlaybackDurationInSeconds=T));if(a=k.fairPlayConfig){if(T=a.certificate)Z.fP=rr(T);T=Number(a.keyRotationPeriodMs);T>0&&(Z.HM=T);a=Number(a.keyPrefetchMarginMs);a>0&&(Z.Eu=a)}if(a=k.playbackStartConfig){Z.FZ=Number(a.startSeconds);K=a.liveUtcStartSeconds;T=!!Z.liveUtcStartSeconds&&Z.liveUtcStartSeconds>0;K&&!T&&(Z.liveUtcStartSeconds=Number(K));if(K=a.startPosition)if((y=K.utcTimeMillis)&&!T&&(Z.liveUtcStartSeconds=Number(y)*.001),T=K.streamTimeMillis)Z.Q5=Number(T)*.001;Z.progressBarStartPosition=
a.progressBarStartPosition;Z.progressBarEndPosition=a.progressBarEndPosition}else if(a=k.skippableSegmentsConfig){if(T=a.introSkipDurationMs)Z.Bf=Number(T)/1E3;if(a=a.outroSkipDurationMs)Z.xf=Number(a)/1E3}if(T=k.skippableIntroConfig)a=Number(T.startMs),T=Number(T.endMs),isNaN(a)||isNaN(T)||(Z.Ym=a,Z.WB=T);if(a=k.streamSelectionConfig)Z.aM=Number(a.maxBitrate);if(a=k.vrConfig)Z.Zn=a.partialSpherical=="1";if(a=k.webDrmConfig){a.skipWidevine&&(Z.z8=!0);if(T=a.widevineServiceCert)Z.xO=rr(T);a.useCobaltWidevine&&
(Z.useCobaltWidevine=!0);a.startWithNoQualityConstraint&&(Z.Al=!0)}if(a=k.mediaCommonConfig){if(T=a.dynamicReadaheadConfig){Z.maxReadAheadMediaTimeMs=T.maxReadAheadMediaTimeMs||NaN;Z.minReadAheadMediaTimeMs=T.minReadAheadMediaTimeMs||NaN;Z.readAheadGrowthRateMs=T.readAheadGrowthRateMs||NaN;if(T=a?.mediaUstreamerRequestConfig?.videoPlaybackUstreamerConfig)Z.aU=rr(T);if((T=a?.sabrContextUpdates)&&T.length>0)for(var Q of T)Q.type&&Q.value&&(T={type:Q.type,scope:Q.scope,value:rr(Q.value)||void 0,sendByDefault:Q.sendByDefault},
Z.sabrContextUpdates.set(Q.type,T))}if(Q=a.serverPlaybackStartConfig)Z.serverPlaybackStartConfig=Q;a.useServerDrivenAbr&&(Z.XD=!0);if(Q=a.requestPipeliningConfig)Z.requestPipeliningConfig=Q}if(Q=k.inlinePlaybackConfig)Z.pM=!!Q.showAudioControls;if(Q=k.embeddedPlayerConfig){Z.embeddedPlayerConfig=Q;if(T=Q.embeddedPlayerMode)a=Z.X(),a.dA=T,a.D=T==="EMBEDDED_PLAYER_MODE_PFL";if(Q=Q.permissions)Z.allowImaMonetization=!!Q.allowImaMonetization}if(Q=k.webPlayerConfig)Q.gatewayExperimentGroup&&(Z.gatewayExperimentGroup=
Q.gatewayExperimentGroup),Q.isProximaEligible&&(Z.isProximaLatencyEligible=!0);k=k.playerControlsConfig;k?.isSeekable!==void 0&&(Z.isSeekable=!!k.isSeekable)};
l6y=function(Z,k,N){var a=k.formats;if(a){var T=[];for(var K of a)T.push(`${K.itag}/${K.width}x${K.height}`);Z.F$=T.join(",");T=[];for(var y of a){a={itag:y.itag,type:y.mimeType,quality:y.quality};(K=y.url)&&(a.url=K);const {qr:A,Y2:P,K7:d,s:h}=NM(39,5979,y);A&&(a.url=P,a.sp=d,a.s=h);T.push(g.CM(a))}Z.VR=T.join(",")}if(y=k.hlsFormats){T={};if(N&&(N=N.audioPairingConfig)&&N.pairs)for(var Q of N.pairs)N=Q.videoItag,T[N]||(T[N]=[]),T[N].push(Q.audioItag);Q={};for(var q of y)Q[q.itag]=q.bitrate;q=[];
for(var r of y){N={itag:r.itag,type:r.mimeType,url:r.url,bitrate:r.bitrate,width:r.width,height:r.height,fps:r.fps};if(y=r.audioTrack)if(a=y.displayName)N.name=a,N.audio_track_id=y.id,y.audioIsDefault&&(N.is_default="1");if(r.drmFamilies){y=[];for(var C of r.drmFamilies)y.push(Pf[C]);N.drm_families=y.join(",")}(y=T[r.itag])&&y.length&&(N.audio_itag=y.join(","),(y=Q[y[0]])&&(N.bitrate+=y));(y=bZr(r))&&(N.eotf=y);r.audioChannels&&(N.audio_channels=r.audioChannels);q.push(g.CM(N))}Z.hlsFormats=q.join(",")}if((C=
k.licenseInfos)&&C.length>0){r={};for(var m of C)C=m.drmFamily,T=m.url,C&&T&&(r[Pf[C]]=T);Z.contentProtection=r}if(m=k.drmParams)Z.drmParams=m;if(m=k.dashManifestUrl)Z.Hv=g.mW(m,{cpn:Z.clientPlaybackNonce});if(m=k.hlsManifestUrl)Z.hlsvp=m;if(m=k.probeUrl)Z.probeUrl=Vw(g.mW(m,{cpn:Z.clientPlaybackNonce}));if(k=k.serverAbrStreamingUrl)Z.Ry=new g.hY(k,!0)};
Bb0=function(Z,k,N){var a=k.videoId;a&&(Z.videoId=a,N.video_id||(N.video_id=a));if(a=k.title)Z.title=a,N.title||(N.title=a);if(a=k.lengthSeconds)Z.lengthSeconds=Number(a),N.length_seconds||(N.length_seconds=a);if(a=k.keywords)Z.keywords=f60(a);if(a=k.channelId)Z.WZ=a,N.ucid||(N.ucid=a);if(a=k.viewCount)Z.rawViewCount=Number(a);if(a=k.author)Z.author=a,N.author||(N.author=a);if(N=k.shortDescription)Z.shortDescription=N;if(N=k.isCrawlable)Z.isListed=N;if(N=k.musicVideoType)Z.musicVideoType=N;N=k.isLive;
N!=null&&(Z.isLivePlayback=N);if(N||k.isUpcoming)Z.isPremiere=!k.isLiveContent;if(N=k.thumbnail)Z.TQ=U$(N);if(N=k.isExternallyHostedPodcast)Z.isExternallyHostedPodcast=N;(N=k.stationType)&&N!=="STATION_TYPE_UNKNOWN"&&(Z.NU=!0);N=k.viewerLivestreamJoinPosition;N?.utcTimeMillis&&(Z.Gf=Cg(N.utcTimeMillis));Z.X().experiments.yz("enable_centered_caption_for_tvfilm_video")&&k.isTvfilmVideo!=null&&(Z.isTvfilmVideo=k.isTvfilmVideo)};
vof=function(Z,k){if(k.playerLegacyDesktopYpcTrailerRenderer){var N=k.playerLegacyDesktopYpcTrailerRenderer;Z.Cj=N.trailerVideoId||"";var a=(a=k.playerLegacyDesktopYpcTrailerRenderer.ypcTrailer)&&a.ypcTrailerRenderer}else k.playerLegacyDesktopYpcOfferRenderer?N=k.playerLegacyDesktopYpcOfferRenderer:k.ypcTrailerRenderer&&(a=k.ypcTrailerRenderer,k=a.fullVideoMessage,Z.Rc=k?g.YL(k):"",Z.Cj=g.J(a,D_r)?.videoDetails?.videoId||"");N&&(Z.Px=N.itemTitle||"",N.itemUrl&&(Z.B1=N.itemUrl),N.itemBuyUrl&&(Z.Ez=
N.itemBuyUrl),Z.H1=N.itemThumbnail||"",Z.P1=N.offerHeadline||"",Z.j_=N.offerDescription||"",Z.DN=N.offerId||"",Z.RA=N.offerButtonText||"",Z.lZ=N.offerButtonFormattedText||null,Z.Z0=N.overlayDurationMsec||NaN,Z.Rc=N.fullVideoMessage||"",Z.m1=!0);a&&((N=g.J(a,D_r))?Z.YO={raw_player_response:N}:(N=g.J(a,OOi),Z.YO=N?q2(N):null),Z.m1=!0)};
go0=function(Z,k,N,a){k.isLiveDefaultBroadcast&&(Z.isLiveDefaultBroadcast=!0);k.isUpcoming&&(Z.isUpcoming=!0);if(k.isPostLiveDvr){Z.M4=!0;if(a=k.latencyClass)Z.latencyClass=iOj[a]||"UNKNOWN";k.isLowLatencyLiveStream&&(Z.isLowLatencyLiveStream=!0)}else{let T=!1;Z.ES?(Z.allowLiveDvr=k2()?!0:Fn&&IO<5?!1:!0,Z.isLivePlayback=!0):k.isLive?(a.livestream="1",Z.allowLiveDvr=k.isLiveDvrEnabled?k2()?!0:Fn&&IO<5?!1:!0:!1,Z.partnerId=27,T=!0):k.isUpcoming&&(T=!0);if(k.isLive||Z.ES){k.isLowLatencyLiveStream&&(Z.isLowLatencyLiveStream=
!0);const K=k.latencyClass;K&&(Z.latencyClass=iOj[K]||"UNKNOWN");if(k=k.liveChunkReadahead)Z.liveChunkReadahead=k;if(k=N&&N.livePlayerConfig){k.hasSubfragmentedFmp4&&(Z.hasSubfragmentedFmp4=!0);k.hasSubfragmentedWebm&&(Z.p_=!0);k.defraggedFromSubfragments&&(Z.defraggedFromSubfragments=!0);if(N=k.liveExperimentalContentId)Z.liveExperimentalContentId=Number(N);k=k.isLiveHeadPlayable;Z.B("html5_live_head_playable")&&k!=null&&(Z.isLiveHeadPlayable=k)}}T&&(Z.isLivePlayback=!0,a.adformat&&a.adformat.split("_")[1]!==
"8"||Z.Wo.push("heartbeat"))}};
E$=function(Z){return new jb(Z.substring(0,2),Z.substring(2))};
WQ=function(Z,k){return jV(Z,"macroMarkersListEntity",k)};
w0f=function(Z){const k=Z.getWatchNextResponse()?.contents?.twoColumnWatchNextResults;(Z=Z.getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.endScreen?.watchNextEndScreenRenderer?.results)||(Z=k?.endScreen?.endScreen?.results);return Z};
g.Zk=function(Z){Z=g.J(Z.getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.decoratedPlayerBarRenderer,Y2);return g.J(Z?.playerBar,$_U)};
GTG=function(){if(kz===void 0){try{window.localStorage.removeItem("yt-player-lv")}catch(k){}a:{try{var Z=!!self.localStorage}catch{Z=!1}if(Z&&(Z=g.xN(`${g.si()}::${"yt-player"}`))){kz=new x_y(Z);break a}kz=void 0}}return kz};
g.NO=function(){const Z=GTG();if(!Z)return{};try{const k=Z.get("yt-player-lv");return JSON.parse(k||"{}")}catch(k){return{}}};
g.Spf=function(Z){const k=GTG();k&&(Z=JSON.stringify(Z),k.set("yt-player-lv",Z))};
g.aD=function(Z){return g.NO()[Z]||0};
g.TY=function(Z,k){const N=g.NO();k!==N[Z]&&(k!==0?N[Z]=k:delete N[Z],g.Spf(N))};
g.KL=async function(Z){return g.j5(eDf(),Z)};
Qr=async function(Z,k,N,a,T,K,y,Q){if(g.aD(Z)===4)return 4;const q=await g.TN();if(!q)throw g.wO("wiac");Q&&y!==void 0&&(y=await oof(Q,y));const r=N.lastModified||"0";Q=await g.KL(q);try{return yr++,await g.J0(Q,["index","media"],{mode:"readwrite",tag:"IDB_TRANSACTION_TAG_WIAC",Mx:!0},C=>{if(K!==void 0&&y!==void 0){var m=`${Z}${"|"}${k.id}${"|"}${r}${"|"}${String(K).padStart(10,"0")}`;m=C.objectStore("media").put(y,m)}else m=g.$h.resolve(void 0);var A=Jay(Z,k.xT());const P=Jay(Z,!k.xT());var d={fmts:QS({dlt:a.downloadedEndTime.toString(),
mket:a.maxKnownEndTime.toString(),avbr:a.averageByteRate.toString()}),format:N||{}};A=C.objectStore("index").put(d,A);const h=a.downloadedEndTime===-1;d=h?C.objectStore("index").get(P):g.$h.resolve(void 0);const B={fmts:"music",format:{}};C=h&&T&&!k.xT()?C.objectStore("index").put(B,P):g.$h.resolve(void 0);return g.$h.all([C,d,m,A]).then(([,v])=>{yr--;let O=g.aD(Z);if(O!==4&&h&&T||v!==void 0&&g.zDy(v.fmts))O=1,g.TY(Z,O);return O})})}catch(C){yr--;
Q=g.aD(Z);if(Q===4)return Q;g.TY(Z,4);throw C;}};
g.U_f=async function(Z){const k=await g.TN();if(!k)throw g.wO("ri");return g.J0(await g.KL(k),["index"],{mode:"readonly",tag:"IDB_TRANSACTION_TAG_LMRI"},N=>{const a=IDBKeyRange.bound(Z+"|",Z+"~");return N.objectStore("index").getAll(a).then(T=>T.map(K=>K?K.format:{}))})};
p0f=async function(Z,k,N,a,T){var K=await g.TN();if(!K)throw g.wO("rc");K=g.J0(await g.KL(K),["media"],{mode:"readonly",tag:"IDB_TRANSACTION_TAG_LMRM"},y=>{const Q=`${Z}${"|"}${k}${"|"}${N}${"|"}${String(a).padStart(10,"0")}`;return y.objectStore("media").get(Q)});
return T?K.then(y=>{if(y===void 0)throw Error("No data from indexDb");return bOy(T,y)}).catch(y=>{throw new g.jD(`Error while reading chunk: ${y.name}, ${y.message}`);
}):K};
g.zDy=function(Z){return Z?Z==="music"?!0:Z.includes("dlt=-1")||!Z.includes("dlt="):!1};
Jay=function(Z,k){return`${Z}${"|"}${k?"v":"a"}`};
MBr=function(Z){const k={},N={};for(const K of Z){var a=K.split("|");if(!K.match(g.RDf)){N[K]="?";continue}Z=Number(a.pop());if(isNaN(Z)){N[K]="?";continue}var T=a.join("|");(a=k[T])?(T=a[a.length-1],Z===T.end+1?T.end=Z:a.push({start:Z,end:Z})):k[T]=[{start:Z,end:Z}]}for(const K of Object.keys(k))N[K]=k[K].map(y=>`${y.start}-${y.end}`).join(",");
return N};
noX=function(Z,k,N){for(N=qO(Z,N);N>=0;){var a=Z.levels[N];if(a.isLoaded(r9(a,k))&&(a=g.CL(a,k)))return a;N--}return g.CL(Z.levels[0],k)};
jUN=function(Z){if(!Z.V&&!Z.D.isEmpty()){var k=Z.D.remove();Z.V=I6y(Z,k)}};
EoR=function(Z,k,N){N=qO(Z,N);for(let y,Q;N>=0;N--)if(y=Z.levels[N],Q=r9(y,k),!y.isLoaded(Q)){var a=Z,T=N,K=Q;const q=`${T}-${K}`;a.G.has(q)||(a.G.add(q),a.D.enqueue(T,{k6:T,c$:K}))}jUN(Z)};
I6y=function(Z,k){const N=document.createElement("img");Z.crossOrigin&&(N.crossOrigin=Z.crossOrigin);N.src=Z.levels[k.k6].mH(k.c$);N.onload=()=>{var a=k.k6,T=k.c$;Z.V!==null&&(Z.V.onload=null,Z.V=null);a=Z.levels[a];a.loaded.add(T);jUN(Z);const K=a.columns*a.rows;T*=K;a=Math.min(T+K-1,a.L()-1);T=[T,a];Z.publish("l",T[0],T[1])};
return N};
g.CL=function(Z,k){k>=Z.G()&&Z.U();const N=r9(Z,k);var a=Z.columns*Z.rows,T=k%a;k=T%Z.columns;T=Math.floor(T/Z.columns);let K;const y=Z.U()+1-a*N;y<Z.columns?(K=y,a=1):(K=Z.columns,a=y<a?Math.ceil(y/Z.columns):Z.rows);return{url:Z.mH(N),column:k,columns:K,row:T,rows:a,U0:Z.width*K,ra:Z.height*a}};
r9=function(Z,k){return Math.floor(k/(Z.columns*Z.rows))};
qO=function(Z,k){var N=Z.Y.get(k);if(N)return N;N=Z.levels.length;for(let a=0;a<N;a++)if(Z.levels[a].width>=k)return Z.Y.set(k,a),a;Z.Y.set(k,N-1);return N-1};
Wnr=function(Z,k,N){return(Z=Z.levels[k])?Z.Y(N):-1};
Ypr=function(Z,k,N){k={cpn:k};Z.indexOf("/ibw/")===-1&&(k.ibw=N?String(N):"1369843");return{url:g.mW(Z,k),type:"application/x-mpegURL",quality:"auto",itag:"93"}};
ZA0=function(Z){try{const k=(new g.hY(Z,!0)).get("n");if(k){const N=Z.match(/\/n\/([^/]+)/);if(N&&N[1]&&N[1]!==k)return Z.replace(`/n/${N[1]}`,`/n/${k}`)}}catch(k){g.L9(k)}return Z};
mg=function(Z){if(Z.isAd()&&(Z.Qz?Z.videoId!==Z.Jq.Tt:Z.videoId!=Z.Jq.Tt))return Z.Jq.Tt};
QUy=function(Z){if(Z){if(jLf(Z))return Z;Z=EMU(Z);if(jLf(Z,!0))return Z}return""};
nQ=function(Z){var k=Z.B("html5_enable_sabr_on_drive")&&Z.Jq.Vz==="gd";if(Z.OU)return Z.XD&&Z.U6("fds",{fds:!0},!0),!1;if(Z.Jq.Vz!=="yt"&&!k)return Z.XD&&Z.U6("dsvn",{ns:Z.Jq.Vz},!0),!1;if(Z.cotn||!Z.V||Z.V.isOtf&&!Z.B("html5_enable_sabr_otf_in_client")||Z.D&&!Z.D.V()||Z.Q2&&!Z.B("html5_enable_sabr_csdai"))return!1;if(Z.B("html5_use_sabr_requests_for_debugging"))return!0;Z.XD&&Z.U6("esfw",{usbc:Z.XD,hsu:!!Z.Ry},!0);if(Z.XD&&Z.Ry)return!0;if(Z.B("html5_remove_client_sabr_determination"))return!1;var N=
!Z.V.Rn&&!Z.kT();k=N&&s1&&Z.B("html5_enable_sabr_vod_streaming_xhr");N=N&&!s1&&Z.B("html5_enable_sabr_vod_non_streaming_xhr");const a=AE(Z),T=Z.B("html5_enable_sabr_drm_vod_streaming_xhr")&&s1&&Z.kT()&&!Z.V.Rn&&(Z.drmProduct==="1"?!1:!0);(k=k||N||a||T)&&!Z.Ry&&Z.U6("sabr",{loc:"m"},!0);return k&&!!Z.Ry};
f60=function(Z){const k={};for(const N of Z)Z=N.split("="),Z.length===2?k[Z[0]]=Z[1]:k[N]=!0;return k};
cZ=function(Z){if(Z.B("html5_onesie")&&Z.errorCode)return!1;let k=g.KK(Z.Wo,"ypc");Z.ypcPreview&&(k=!1);return Z.cG()&&!Z.loading&&(g.PZ(Z)||g.KK(Z.Wo,"heartbeat")||k)};
reG=function(Z,k){var N=k.raw_embedded_player_response;if(!N){var a=k.embedded_player_response;a&&(N=JSON.parse(a))}N&&(Z.P0=N);if(Z.P0){Z.embeddedPlayerConfig=Z.P0.embeddedPlayerConfig||null;if(N=Z.P0.videoFlags)N.playableInEmbed&&(Z.allowEmbed=!0),N.isPrivate&&(Z.isPrivate=!0),N.userDisplayName&&(k.user_display_name=N.userDisplayName),N.userDisplayImage&&(k.user_display_image=N.userDisplayImage);if((N=Z.P0.embedPreview)&&N.thumbnailPreviewRenderer){N=N.thumbnailPreviewRenderer;HOX(Z,N.controlBgHtml);
if(a=N.defaultThumbnail)Z.TQ=U$(a);Z.B("embeds_web_enable_search_button")&&N.searchButton&&(a=g.J(N.searchButton,Eq))&&(Z.XY=g.J(a.navigationEndpoint,g.HZ));(a=g.J(N?.videoDetails,kqU))&&N8y(Z,k,a);a=g.J(N?.videoDetails,aHN);Z.hp=!!N.addToWatchLaterButton;T80(Z,N.shareButton);a?.musicVideoType&&(Z.musicVideoType=a.musicVideoType);if(a=g.J(Z.getEmbeddedPlayerResponse()?.embedPreview?.thumbnailPreviewRenderer?.playButton?.buttonRenderer?.navigationEndpoint,g.d9))jbb(Z,a),Z.videoId=a.videoId||Z.videoId;
N.videoDurationSeconds&&(Z.lengthSeconds=Cg(N.videoDurationSeconds));N.webPlayerActionsPorting&&cai(Z,N.webPlayerActionsPorting);if(N=g.J(N?.playlist,Kky)){Z.fN=!0;a=[];var T=Number(N.currentIndex);if(N.contents)for(let K=0,y=N.contents.length;K<y;K++){const Q=N.contents[K].playlistPanelVideoRenderer;if(!Q)continue;const q=Q.shortBylineText?g.YL(Q.shortBylineText):"",r=Q.title?g.YL(Q.title):"";a.push({author:q,encrypted_id:Q.videoId,title:r,channel_path:K===T?k.channel_path:"",profile_picture:K===
T?k.profile_picture:"",is_private:K===T?Z.isPrivate:!0,is_dni:K===T?Z.o4:!1,dni_color:K===T?Z.Vl:""})}k={index:N.currentIndex,list:N.playlistId,playlist_length:N.totalVideos,video:a};N.titleText&&(k.title=g.YL(N.titleText));N.shortBylineText&&(k.author=g.YL(N.shortBylineText));Z.nh=k}if(k=g.J(Z.getEmbeddedPlayerResponse()?.embedPreview?.thumbnailPreviewRenderer?.infoPanel,yey))Z.Sb=Number(k?.durationMs)||NaN,k?.infoPanelOverviewViewModel&&(Z.tq=k?.infoPanelOverviewViewModel),k?.infoPanelDetailsViewModel&&
(Z.hI=k?.infoPanelDetailsViewModel)}if(Z.P0.previewPlayabilityStatus){if(Z.Vp=Z.P0.previewPlayabilityStatus,k=Z.Vp,!["OK","LIVE_STREAM_OFFLINE"].includes(k.status)){Z.errorCode=MV0(k.errorCode);N=k.errorScreen;if(a=N?.playerErrorMessageRenderer){Z.gF=a;if(T=a.reason)Z.errorReason=g.YL(T);if(a=a.subreason)Z.sf=g.YL(a)}else Z.errorReason=k.reason||null;switch(k.status){case "LOGIN_REQUIRED":Z.errorDetail="1";break;case "CONTENT_CHECK_REQUIRED":Z.errorDetail="2";break;case "AGE_CHECK_REQUIRED":Z.errorDetail=
N?.playerKavRenderer?.kavUrl?"4":"3";break;default:Z.errorDetail=k.isBlockedInRestrictedMode?"5":"0"}}}else Z.P0.playabilityStatus&&(Z.xd=Z.P0.playabilityStatus,Q7b(Z)&&(Z.errorDetail="0",Z.xd&&((k=Z.xd.embeddedPlayerErrorMessageRenderer)?Z.gF=g.J(k,qTG):Z.errorReason=Z.xd.reason||null)));(k=Z.P0.attestation)&&yaf(Z,k);(k=Z.P0.permissions)&&k.allowImaMonetization&&(Z.allowImaMonetization=!0)}};
hE=function(Z,k){var N=k.raw_watch_next_response;if(!N){var a=k.watch_next_response;a&&(N=JSON.parse(a))}if(N){Z.xW=N;(N=Z.xW.playerCueRangeSet)&&g.XG(Z,N);N=Z.xW.playerOverlays;if(N&&(N=N.playerOverlayRenderer)){if(a=N.autonavToggle)Z.autoplaySwitchButtonRenderer=g.J(a,CX0),Z.B("web_player_autonav_use_server_provided_state")&&Z.xF()&&(Z.autonavState=Z.autoplaySwitchButtonRenderer.enabled?2:1);if(a=N.videoDetails){var T=a.embeddedPlayerOverlayVideoDetailsRenderer;if(a=a.playerOverlayVideoDetailsRenderer)a.title&&
(k.title=g.YL(a.title)),a.subtitle&&(k.subtitle=g.YL(a.subtitle))}g.s$(Z.Jq)&&(Z.hp=!!N.addToMenu);T80(Z,N.shareButton);N.startPosition&&N.endPosition&&(Z.progressBarStartPosition=N.startPosition,Z.progressBarEndPosition=N.endPosition);if(a=N.gatedActionsOverlayRenderer)Z.di=g.J(a,mD0);if(a=g.J(Z.getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.infoPanel,yey))Z.Sb=Number(a?.durationMs)||NaN,a?.infoPanelOverviewViewModel&&(Z.tq=a?.infoPanelOverviewViewModel),a?.infoPanelDetailsViewModel&&
(Z.hI=a?.infoPanelDetailsViewModel);Z.showSeekingControls=!!N.showSeekingControls}if(N=Z.getWatchNextResponse()?.contents?.twoColumnWatchNextResults)if(N=N.desktopOverlay&&g.J(N.desktopOverlay,s7X))N.suppressShareButton&&(Z.showShareButton=!1),N.suppressWatchLaterButton&&(Z.hp=!1);T&&N8y(Z,k,T);N=Ov(0,k.autoplay_count);var K=Z.getWatchNextResponse();a=K.contents?.twoColumnWatchNextResults;T=K.playerOverlays?.playerOverlayRenderer?.autoplay?.playerOverlayAutoplayRenderer;var y=w0f(Z);if((K=K.contents?.singleColumnWatchNextResults)&&
K.autoplay?.autoplay&&!K.playlist){const h=K.autoplay.autoplay.sets;K={};var Q=new LL(Z.X()),q=null,r;if(h){for(var C of h)if((r=C.autoplayVideoRenderer)&&r.compactVideoRenderer){q=r.compactVideoRenderer;break}if(r=h[0].autoplayVideo)(C=r.clickTrackingParams)&&(K.itct=C),K.autonav="1",K.playnext=String(N)}else K.feature="related-auto";r=g.J(r,g.d9);if(q){Q.videoId=q.videoId;if(r=q.shortBylineText)Q.author=g.YL(r);if(r=q.title)Q.title=g.YL(r)}else r!=null&&r.videoId&&(Q.videoId=r.videoId);Q.uL=K;Z.suggestions=
[];Z.Ta=Q}if(y){r=[];for(var m of y){y=void 0;C=null;if(m.endScreenVideoRenderer){K=m.endScreenVideoRenderer;Q=K.title;C=new LL(Z.X());C.videoId=K.videoId;C.lengthSeconds=K.lengthInSeconds||0;if(q=K.publishedTimeText)C.publishedTimeText=g.YL(q);if(q=K.shortBylineText)C.author=g.YL(q);if(q=K.shortViewCountText)C.shortViewCount=g.YL(q);Q&&(C.title=g.YL(Q),(Q=Q.accessibility)&&(Q=Q.accessibilityData)&&Q.label&&(C.ariaLabel=Q.label));if(q=K.navigationEndpoint)y=q.clickTrackingParams,Q=g.J(q,g.d9),q=g.J(q,
g.Fh),Q?C.wH=Q:q!=null&&(C.watchUrl=q.url);if(Q=K.thumbnailOverlays)for(var A of Q)if(Q=A.thumbnailOverlayTimeStatusRenderer)if(Q.style==="LIVE"){C.isLivePlayback=!0;break}else if(Q.style==="UPCOMING"){C.isUpcoming=!0;break}C.TQ=U$(K.thumbnail)}else if(m.endScreenPlaylistRenderer){K=m.endScreenPlaylistRenderer;y=K.navigationEndpoint;if(!y)continue;C=g.J(y,g.d9);if(!C)continue;Q=C.videoId;C=new Vr(Z.X());C.playlistId=K.playlistId;C.playlistLength=Number(K.videoCount)||0;C.V=Q||null;C.videoId=Q;if(Q=
K.title)C.title=g.YL(Q);if(Q=K.shortBylineText)C.author=g.YL(Q);y=y.clickTrackingParams;C.TQ=U$(K.thumbnail)}C&&(y&&(C.sessionData={itct:y}),r.push(C))}Z.suggestions=r}if(T){Z.us=!!T.preferImmediateRedirect;Z.pF=Z.pF||!!T.webShowNewAutonavCountdown;Z.gV=Z.gV||!!T.webShowBigThumbnailEndscreen;if(Z.pF||Z.gV){A=T;a=a||null;m=new LL(Z.X());m.videoId=A.videoId;if(r=A.videoTitle)m.title=g.YL(r),(r=r.accessibility)&&(r=r.accessibilityData)&&r.label&&(m.ariaLabel=r.label);if(r=A.byline)m.author=g.YL(r);if(r=
A.publishedTimeText)m.publishedTimeText=g.YL(r);if(r=A.shortViewCountText)m.shortViewCount=g.YL(r);if(r=A.thumbnailOverlays)for(var P of r)if(r=P.thumbnailOverlayTimeStatusRenderer)if(r.style==="LIVE"){m.isLivePlayback=!0;break}else if(r.style==="UPCOMING"){m.isUpcoming=!0;break}else if(r.style==="DEFAULT"&&r.text){m.lengthText=g.YL(r.text);(P=r.text.accessibility)&&(P=P.accessibilityData)&&P.label&&(m.Cx=P.label||"");break}m.TQ=U$(A.background);if(P=A.nextButton)if(P=P.buttonRenderer)if(P=P.navigationEndpoint)if(P=
g.J(P,g.d9))m.wH=P;A.topBadges&&(P=A.topBadges[0])&&(P=g.J(P,Aei))&&P.style==="BADGE_STYLE_TYPE_PREMIUM"&&(m.jj=!0);if(P=A.alternativeTitle)m.V9=g.YL(P);P=m;N={autonav:"1",playnext:String(N)};P.playlistId&&(N.autoplay="1");if(a){if(A=a.autoplay?.autoplay?.sets?.[0]?.autoplayVideo)if((a=A.clickTrackingParams)&&(N.itct=a),A=g.J(A,g.d9))P.l2=A}else A&&(A=A.nextButton?.buttonRenderer?.navigationEndpoint?.clickTrackingParams)&&(N.itct=A);N.itct||(N.feature="related-auto");P.uL=N;Z.suggestions||(Z.suggestions=
[]);Z.Ta=m}T.countDownSecs!=null&&(Z.bL=T.countDownSecs*1E3);T.countDownSecsForFullscreen!=null&&(Z.nD=T.countDownSecsForFullscreen>=0?T.countDownSecsForFullscreen*1E3:-1)}if(T=w0f(Z))T=T?.[0]?.endScreenVideoRenderer?.navigationEndpoint?.clickTrackingParams,P=Z.N(),T&&P&&(P.sessionData={itct:T});Z.xW.currentVideoThumbnail&&(Z.TQ=U$(Z.xW.currentVideoThumbnail));(T=Z.xW?.contents?.twoColumnWatchNextResults?.results?.results?.contents)&&T[0]&&(P=T[0].videoPrimaryInfoRenderer)&&P&&P.subtitle&&(Z.zN=g.YL(P.subtitle));
T&&T[1]&&(T=T[1].videoSecondaryInfoRenderer?.owner?.videoOwnerRenderer?.thumbnail?.thumbnails)&&T.length&&(Z.profilePicture=T[T.length-1].url);k=w$(k);if(T=Z.getWatchNextResponse()?.onResponseReceivedEndpoints)for(var d of T)g.J(d,FG)&&(Z.vy=g.J(d,FG)),T=g.J(d,PXr),T?.entityKeys&&(Z.Ox=T.entityKeys||[],T.visibleOnLoadKeys&&(Z.visibleOnLoadKeys=T.visibleOnLoadKeys));Z.B("web_key_moments_markers")&&(d=g.tE.getState().entities,T=g.MU("visibility_override","markersVisibilityOverrideEntity"),d=jV(d,"markersVisibilityOverrideEntity",
T),Z.vD=d?.videoId===(Z.videoId||k)&&d?.visibilityOverrideMarkersKey?d.visibilityOverrideMarkersKey:Z.visibleOnLoadKeys,Z.visibleOnLoadKeys=[...Z.vD])}};
cef=function(Z,k){if(k=k.raw_reel_item_watch_response)Z.reelItemWatchResponse=k};
XMy=function(Z,k){Z.fflags=iR(Z.fflags,k.fflags);var N=k.iv_invideo_url;N&&(Z.fI=Vw(N));Z.EB=Be(Z.EB,k.iv_ads_only);if(N=k.cta_conversion_urls)Z.LU=N;Z.isPharma=Be(Z.isPharma,k.is_pharma);Z.author=iR(Z.author,k.author);Z.HA=QUy(k.ttsurl)||Z.HA;Z.GF=Be(Z.GF,k.cc_asr);Z.Rq=iR(Z.Rq,k.channel_path);if(N=k.profile_picture)Z.profilePicture=iR(Z.profilePicture,N);Z.videoCountText=iR(Z.videoCountText,k.video_count_text);Z.autonavState=Dm(Z.autonavState,k.autonav_state,HAi);Z.clientPlaybackNonce=iR(Z.clientPlaybackNonce,
k.cpn);Z.subscribed=Be(Z.subscribed,k.subscribed);Z.rawViewCount=Ov(Z.rawViewCount,k.view_count);Z.shortViewCount=iR(Z.shortViewCount,k.short_view_count_text);Z.publishedTimeText=iR(Z.publishedTimeText||"",k.publishedTimeText);Z.lengthText=iR(Z.lengthText||"",k.lengthText);Z.Cx=iR(Z.Cx||"",k.Cx);Z.V9=iR(Z.V9||"",k.V9);Z.title=iR(Z.title,k.title);Z.subtitle=iR(Z.subtitle,k.subtitle);Z.expandedTitle=iR(Z.expandedTitle,k.expanded_title);Z.expandedSubtitle=iR(Z.expandedSubtitle,k.expanded_subtitle);Z.ypcPreview=
iR(Z.ypcPreview,k.ypc_preview);Z.Li=iR(Z.Li,k.ypc_origin);Z.gD=Be(Z.gD,k.ypc_is_premiere_trailer);Z.Bx=iR(Z.Bx,k.ypc_clickwrap_message);Z.paygated=Be(Z.paygated,k.paygated);Z.zW=Be(Z.zW,k.requires_purchase);Z.showShareButton=!Be(!Z.showShareButton,k.ss);Z.hp=Be(Z.hp,k.showwatchlater);Z.mq=Be(Z.mq,k.shownotifybutton);Z.J$=Be(Z.J$,k.copy_share);if(N=k.el)Z.eventLabel=N;if(N=k.keywords)Z.keywords=f60(N.split(","));if(N=k.rvs)Z.suggestions=ru(N).map(a=>a.playlist||a.list||a.api?new Vr(Z.Jq,a):new LL(Z.Jq,
a));
Z.contentCheckOk=Be(Z.contentCheckOk,k.cco);Z.racyCheckOk=Be(Z.racyCheckOk,k.rco);Z.isLivingRoomDeeplink=Be(Z.isLivingRoomDeeplink,k.is_living_room_deeplink);Z.oauthToken=iR(Z.oauthToken,k.oauth_token);Z.hq=iR(Z.hq,k.kpt);Z.visitorData=iR(Z.visitorData,k.visitor_data);if(N=k.session_data)Z.sessionData=yS(N,"&");Z.NT=iR(Z.NT,k.endscreen_ad_tracking_data);Z.rB=Be(Z.rB,k.wait_for_vast_info_cards_xml);Z.U4=Be(Z.U4,k.suppress_creator_endscreen);Z.Jy=Be(Z.Jy,k.is_trueview_action);Z.PO=iR(Z.PO,k.tracking_list);
dDf(Z,k)};
g.ue=function(Z,k,N){k&&k.cpn&&g.L9(new g.jD("CPN provided in VideoData update",{QxR:k.cpn,w_:Z.clientPlaybackNonce,fdt:N}));N?(w$(k),Z.setData(k),cZ(Z)&&Z.oW()):(k=k||{},reG(Z,k),hE(Z,k),cef(Z,k),XMy(Z,k),Z.publish("dataupdated"))};
dDf=function(Z,k){k.inlineMetricEnabled&&(Z.inlineMetricEnabled=!0);k.playback_progress_0s_url&&(Z.pH=new Lky(k));if(k=k.video_masthead_ad_quartile_urls)Z.Nn=k.quartile_0_url,Z.wu=k.quartile_25_url,Z.Wx=k.quartile_50_url,Z.Ak=k.quartile_75_url,Z.Ic=k.quartile_100_url,Z.eN=k.quartile_0_urls,Z.iT=k.quartile_25_urls,Z.Mk=k.quartile_50_urls,Z.cS=k.quartile_75_urls,Z.Cg=k.quartile_100_urls};
g.XG=function(Z,k){for(const N of k)N.cueRangeSetIdentifier&&Z.zC.set(N.cueRangeSetIdentifier,N.playerCueRanges??[])};
VPN=function(Z){if(!Z)return null;for(const k of Z)if(Z=k.adPlacementRenderer?.renderer?.videoAdTrackingRenderer)return Z;return null};
Fkf=function(Z){const k=Z.playerResponse?.playerConfig?.compositeVideoConfig?.sourceConfigs;Z=Z.playerResponse?.playerConfig?.compositeVideoConfig?.defaultActiveSourceVideoId;if(!k||!k.length)return"";Z||(Z=k[0].videoId||"");for(const N of k)if(N.videoId===Z&&N.audioTracks)for(const a of N.audioTracks)if(a.isDefaultForSource)return a.id||"";return""};
tPN=function(Z,k,N){switch(k){case "EMBEDDED_PLAYER_LITE_MODE_FIXED_PLAYBACK_LIMIT":N>30?Z.limitedPlaybackDurationInSeconds=30:N<30&&N>10&&(Z.limitedPlaybackDurationInSeconds=10);break;case "EMBEDDED_PLAYER_LITE_MODE_DYNAMIC_PLAYBACK_LIMIT":Z.limitedPlaybackDurationInSeconds=N*.2}};
hVy=function(Z,k){return k!=null?Be(Z.j,k):Z.j?Z.j:Z.Jq.preferGapless&&Z.Jq.supportsGaplessShorts()};
uif=function(Z){return!!Z&&isFinite(Z)&&Z>1E9};
lH0=function(Z){return He()&&le(Z)?!1:fL(Z)&&(g.KA(Z.Jq)?!Z.isLivePlayback:Z.hlsvp)||!k2()||Z.ef?!0:!1};
fHf=function(Z){Z=g.mm(Z);return Number(Z.expire)||0};
BZ=function(Z){const k=Z.X();return Z.Jq.Vz==="hm"||Z.Jq.Vz==="gd"||k.experiments.Yl().V.Aq(B8R)&&Z.Jq.G?!0:!1};
T80=function(Z,k){Z.showShareButton=!!k;if(k=g.J(k,Eq)?.navigationEndpoint||g.J(k,Eq)?.command)Z.J$=!!g.J(k,DDy)};
N8y=function(Z,k,N){var a=N.channelThumbnail;a&&(a=a.thumbnails)&&(a=a[0])&&(k.profile_picture=a.url);if(a=g.J(g.J(N?.channelThumbnailEndpoint,OAf)?.urlEndpoint,g.Fh))k.channel_path=a.url;if(a=N.collapsedRenderer)if(a=g.J(a,vBb)){const T=a.title;T&&(k.title=g.YL(T));if(a=a.subtitle)k.subtitle=g.YL(a)}if(N=N.expandedRenderer)if(N=g.J(N,iAr)){if(a=N.title)k.expanded_title=g.YL(a);if(a=N.subtitle)k.expanded_subtitle=g.YL(a);if(N=N.subscribeButton)Z.subscribeButtonRenderer=g.J(N,g.Dk),Z.subscribeButtonRenderer&&
(k.ucid=Z.subscribeButtonRenderer.channelId,k.subscribed=Z.subscribeButtonRenderer.subscribed,Z.mq=!!Z.subscribeButtonRenderer.notificationPreferenceToggleButton,Z.subscribeButtonRenderer.notificationPreferenceToggleButton&&Z.subscribeButtonRenderer.notificationPreferenceToggleButton.toggleButtonRenderer&&(k=Z.subscribeButtonRenderer.notificationPreferenceToggleButton.toggleButtonRenderer,k.isToggled?(Z.xw=k.toggledServiceEndpoint||null,Z.oR=k.defaultServiceEndpoint||null):(Z.xw=k.defaultServiceEndpoint||
null,Z.oR=k.toggledServiceEndpoint||null)))}};
gBX=function(Z){return!!Z.y7||!!Z.Nn||!!Z.eN||!!Z.pH||Z.Ee};
O1=function(Z){return!!(Z.D&&Z.D.videoInfos&&Z.D.videoInfos.length)};
vZ=function(Z){return Z.rQ()&&Z.X().supportsGaplessShorts()};
ie=function(Z){var k=["MUSIC_VIDEO_TYPE_ATV","MUSIC_VIDEO_TYPE_PRIVATELY_OWNED_TRACK"],N=Yy(Z.Jq)==="TVHTML5_SIMPLY"&&Z.Jq.V.ctheme==="MUSIC";!Z.oC&&(g.oJ(Z.Jq)||g.Df(Z.Jq)||N)&&(k.includes(Z.musicVideoType)||Z.isExternallyHostedPodcast)&&(Z.oC=!0);if(k=g.ce())k=/Starboard\/([0-9]+)/.exec(g.qG()),k=(k?parseInt(k[1],10):NaN)<10;N=Z.Jq;N=(Yy(N)==="TVHTML5_CAST"||Yy(N)==="TVHTML5"&&(N.V.cver.startsWith("6.20130725")||N.V.cver.startsWith("6.20130726")))&&Z.Jq.V.ctheme==="MUSIC";var a;if(a=!Z.oC)N||(N=
Z.Jq,N=Yy(N)==="TVHTML5"&&N.V.cver.startsWith("7")),a=N;a&&!k&&(k=Z.musicVideoType==="MUSIC_VIDEO_TYPE_PRIVATELY_OWNED_TRACK",N=(Z.B("cast_prefer_audio_only_for_atv_and_uploads")||Z.B("kabuki_pangea_prefer_audio_only_for_atv_and_uploads"))&&Z.musicVideoType==="MUSIC_VIDEO_TYPE_ATV",k||N||Z.isExternallyHostedPodcast)&&(Z.oC=!0);return Z.Jq.deviceIsAudioOnly||Z.oC&&Z.Jq.C};
g9=function(Z){return Z.Jq.B("html5_disable_av1")?!0:!1};
w9=function(Z){return Z.playerResponse?.playerConfig?.compositeVideoConfig?.compositeBroadcastType==="COMPOSITE_BROADCAST_TYPE_COMPRESSED_DOMAIN_COMPOSITE"};
g.$z=function(Z){var k=Z.j;Z.B("html5_gapless_unlimit_format_selection")&&vZ(Z)&&(k=!1);const N=!!Z.V&&Z.V.Rn;k=vPf(Z.Jq,{tH:Z.tH(),IY:N,x_:ie(Z),u7:Z.u7,wY:k,isOtf:Z.isOtf(),E4:Z.E4(),ES:Z.ES,xY:Z.getUserAudio51Preference(),disableAv1:g9(Z),Xb:w9(Z)});nQ(Z)&&(k.HA=!0);He()&&Z.playerResponse&&Z.playerResponse.playerConfig&&Z.playerResponse.playerConfig.webPlayerConfig&&Z.playerResponse.playerConfig.webPlayerConfig.useCobaltTvosDogfoodFeatures&&(k.Y=!0,k.L=!0);Z.j&&Z.isAd()&&(Z.FE&&(k.N=Z.FE),Z.SK&&
(k.D=Z.SK));Z.rQ()&&(k.xW=g.Q5(Z.Jq.experiments,"html5_hard_cap_max_vertical_resolution_for_shorts"));k.Sm=Z.isLivePlayback&&Z.kT()&&Z.Jq.B("html5_drm_live_audio_51");k.zt=Z.y9;Z.B("html5_disable_vp9_hdr_fairplay")&&He()&&(k.zt=!0);k.O6=!nQ(Z);return Z.s6=k};
$Dj=function(Z){uJ("drm_pb_s",void 0,Z.Vz);Z.fP||Z.V&&Z.V.L();var k={};Z.V&&(k=sEy(Z.ix,g.$z(Z),Z.Jq.L,Z.V,N=>Z.publish("ctmp","fmtflt",N),!0,new Set));
k=new wMG(k,Z.Jq,Z.z8,Z.useCobaltWidevine?He()?le(Z):!1:!1,(N,a)=>{Z.U6(N,a)});
g.u(Z,k);Z.Vg=!1;Z.loading=!0;eKU(k,N=>{uJ("drm_pb_f",void 0,Z.Vz);for(var a of N)switch(a.flavor){case "fairplay":a.fP=Z.fP;a.HM=Z.HM;a.Eu=Z.Eu;break;case "widevine":a.xO=Z.xO}Z.YH=N;if(Z.YH.length>0&&(Z.L=Z.YH[0],Z.Jq.Xa())){N={};for(const [T,K]of Object.entries(Z.L.U)){a=K;let y="unk";const Q=T.match(/(.*)codecs="(.*)"/);Q&&(y=Q[2]);N[y]=a}Z.U6("drmProbe",N)}Z.oW()})};
xDy=function(Z){var k;if(k=!!Z.cotn)k=Z.videoId,k=!!k&&g.aD(k)===1;return k&&!Z.eL};
eVN=function(Z){var k=Z.playerResponse?.streamingData?.adaptiveFormats||[],N=null;if(k.length>0)N=GqU(Z,k);else if(!Z.B("html5_deprecate_adaptive_formats_string")){Z.U6("pafmtstr",{s:Z.adaptiveFormats.substring(0,50)});if((k=Z.adaptiveFormats)&&!fL(Z)){Z.Jq.L.U&&(g_=!0);k=xz(k);N=Z.contentProtection;var a=Z.lengthSeconds,T=Z.isLivePlayback,K=Z.M4,y=Z.Jq,Q=klf(k);if(T||K){a=y?.experiments;T=new g.Zu("",a,!0);T.Rn=!0;T.isManifestless=!0;T.D=!K;T.isLive=!K;T.M4=K;for(r of k){y=cf(r,N);Q=ly(r.url,r.sp,
r.s);var q=Q.get("id");q&&q.includes("%7E")&&(T.O=!0);q=a?.yz("html5_max_known_end_time_rebase");const C=Number(r.target_duration_sec)||5,m=Number(r.max_dvr_duration_sec)||14400,A=Number(Q.get("mindsq")||Q.get("min_sq")||"0"),P=Number(Q.get("maxdsq")||Q.get("max_sq")||"0")||Infinity;T.Y8=T.Y8||A;T.rr=T.rr||P;const d=!O9(y.mimeType);Q&&aZ(T,new STX(Q,y,{Wi:C,Nu:d,FJ:m,Y8:A,rr:P,On:300,M4:K,YN:q}))}var r=T}else r=Q==="FORMAT_STREAM_TYPE_OTF"?NVj(k,N,a,y?.experiments):awG(k,N,a,y);k.length>0&&(k=k[0],
BZ(Z)&&k.url&&(Z.NW=Z.NW||fHf(k.url)));k=Z.isLivePlayback&&!Z.M4&&!Z.KX&&!Z.isPremiere;Z.B("html5_live_head_playable")&&(!GY(Z)&&k&&Z.U6("missingLiveHeadPlayable",{}),Z.Jq.Vz==="yt"&&(r.Rq=!0));N=r}else N=null;Z.U6("pafmts",{isManifestFilled:!!N})}if(!N)return!1;SI(Z,N);return!0};
eI=function(Z){return!(!Z.V||!Z.V.isManifestless)};
GY=function(Z){return Z.B("html5_live_head_playable")&&eI(Z)&&Z.Jq.Vz==="yt"?Z.isLiveHeadPlayable:Z.isLivePlayback};
GqU=function(Z,k){if(k.length===0||fL(Z))return null;Z.Jq.L.U&&(g_=!0);var N=Z.contentProtection;var a=Z.lengthSeconds,T=Z.isLivePlayback,K=Z.M4,y=Z.Jq,Q=nZ0(k);if(T||K){a=y.experiments;T=new g.Zu("",a,!0);T.D=!K;T.Rn=!0;T.isManifestless=!0;T.isLive=!K;T.M4=K;for(const r of k){y=ky(r,N);const {Y2:C,s:m,K7:A}=NM(6,6010,r);Q=ly(C||r.url||"",A,m);var q=Q.get("id");q&&q.includes("%7E")&&(T.O=!0);q=a?.yz("html5_max_known_end_time_rebase");const P=Number(r.targetDurationSec||5),d=Number(r.maxDvrDurationSec||
14400),h=Number(Q.get("mindsq")||Q.get("min_sq")||"0"),B=Number(Q.get("maxdsq")||Q.get("max_sq")||"0")||Infinity;T.Y8=T.Y8||h;T.rr=T.rr||B;const v=!O9(y.mimeType);Q&&aZ(T,new STX(Q,y,{Wi:P,Nu:v,FJ:d,Y8:h,rr:B,On:300,M4:K,YN:q}))}N=T}else N=Q==="FORMAT_STREAM_TYPE_OTF"?IRj(k,N,a,y.experiments):jJy(k,N,a,y);k.length>0&&(k=k[0],BZ(Z)&&k.url&&(Z.NW=Z.NW||fHf(k.url)));k=Z.isLivePlayback&&!Z.M4&&!Z.KX&&!Z.isPremiere;Z.B("html5_live_head_playable")&&(!GY(Z)&&k&&Z.U6("missingLiveHeadPlayable",{}),Z.Jq.Vz===
"yt"&&(N.Rq=!0));return N};
xz=function(Z,k){Z=ru(Z);const N={};if(k)for(var a of k.split(","))(k=a.match(/^([0-9]+)\/([0-9]+)x([0-9]+)(\/|$)/))&&(N[k[1]]={width:k[2],height:k[3]});for(const T of Z)if(a=N[T.itag])T.width=a.width,T.height=a.height;return Z};
SI=function(Z,k,N=!1){Z.nm=void 0;Z.V=k;g.u(Z,k);k.Y8=Z.Y8;k.rr=Z.rr;k.aE=Z.aE;k.Y5=Z.Y5;k.Nm=Z.Nm;Z.Ry&&(k.Vz=new oBX(Z.Ry));(Z.tH()||g.oD(Z))&&Z.Wo.push("webgl");Z.V.isLive||(Z.isLivePlayback=!1);const a=k.sourceUrl.split("/");if(Z.Qz?a.indexOf("manifest_duration")!==-1:a.indexOf("manifest_duration")!=-1)Z.yI=Number(a[a.indexOf("manifest_duration")+1]);if(k.D||k.isManifestless)k.subscribe("clienttemp",Z.U6,Z),N?k.subscribe("refresh",Z.By,Z):k.subscribe("cuepointsadded",Z.ag,Z);k.L()?Z.Vg=!0:jL=
void 0;Z.KX&&(k.U=Z.KX,k.isLive=!0,Z.isLivePlayback=!0);k.isPremiere=Z.isPremiere;k.isLiveHeadPlayable=Z.isLiveHeadPlayable};
le=function(Z){return Z.B("html5_tvos_skip_dash_audio_check")||MediaSource.isTypeSupported('audio/webm; codecs="opus"')};
fL=function(Z){return He()?!le(Z):Xn()?!(!Z.fP||!Z.B("html5_enable_safari_fairplay")&&k2()):!1};
JE=function(Z){return Z.Qz?Z.isLowLatencyLiveStream&&Z.V!=null&&LD(Z.V)>=5:Z.isLowLatencyLiveStream&&Z.V!=void 0&&LD(Z.V)>=5};
Jej=function(Z){Z.loading=!0;Z.FN=!1;if(xDy(Z))g.U_f(Z.videoId).then(a=>{if(Z.playerResponse?.streamingData){var T=[];for(const K of a)a=Object.assign({},K),a.signatureCipher="",T.push(a);T.length<2&&Z.U6("offmlf",{len:T.length});T=GqU(Z,T);ie(Z)&&tsU(T,!1);SI(Z,T);Z.U6("dlr",{})}else Z.U6("offsdm",{cotn:Z.WN?Z.WN.cotn:"0",cpn:Z.clientPlaybackNonce})}).then(()=>{Z.oW()});
else{Ii(Z.Hv)||g.L9(new g.jD("DASH MPD Origin invalid: ",Z.Hv));var k=Z.Hv,N=g.Q5(Z.Jq.experiments,"dash_manifest_version")||4;k=g.mW(k,{mpd_version:N});Z.isLowLatencyLiveStream&&Z.latencyClass!=="NORMAL"||(k=g.mW(k,{pacing:0}));Qr0(k,Z.Jq.experiments,Z.isLivePlayback).then(a=>{Z.jm()||(SI(Z,a,!0),uJ("mrc",void 0,Z.Vz),Z.oW())},a=>{Z.jm()||(Z.loading=!1,Z.publish("dataloaderror",new g.yA("manifest.net.retryexhausted",{backend:"manifest",
rc:a.status},1)))});
uJ("mrs",void 0,Z.Vz)}};
zY=function(Z){if(!Z.isProximaLatencyEligible)return 0;const k=Ks();return Z.Jq.getWebPlayerContextConfig()?.enableProximaLowLatency?2:k===1?1:Z.B("html5_enable_proxima")?2:0};
U1=function(Z,k){return Z.B(k)?!0:(Z.fflags||"").includes(k+"=true")};
zVR=function(Z,k){const N=k||lH0(Z)||Z.isExternallyHostedPodcast;if(!Z.V||N)return Z.U6("skipDash",{dm:!!Z.V,air:k,dd:Z.ef,mss:k2(),"3pp":Z.isExternallyHostedPodcast}),nb();ie(Z)&&tsU(Z.V,Z.isLivePlayback);return Y6().then(()=>lSy(Z.ix,g.$z(Z),Z.Jq.L,Z.V,Z.L,a=>Z.publish("ctmp","fmtflt",a),Z.AA,be(Z)).then(a=>{Z.uQ(a);
Z.ix.U=null;/^av/.test(Z.clientPlaybackNonce)&&Z.s6&&Z.U6("av1",Z.s6.U)}))};
bAy=function(Z,k){if(k&&Z.hlsvp)return nb();if(Z.hlsFormats){if(k=xz(Z.hlsFormats)){const a=[];for(var N of k)N.url&&(N.url=ZA0(N.url)),Z.s6?.V&&a.push(N.itag);Z.s6?.V&&a.length>0&&Z.U6("hlsfmt",{itags:a.join(".")})}Z.tW=$UU(Z.Jq,k);Z.tW&&UDb(Z,Z.tW);N=Z.clientPlaybackNonce;return opN(Z.Jq,Z.isAd(),k,Z.playerResponse?.captions?.playerCaptionsRenderer?.baseUrl??null,Z.aM,N,a=>Z.publish("ctmp","hlsflt",a)).then(a=>{let T=0;
const K=[];for(const y of a)K.push(y.getInfo()?.itag),y.getInfo()?.C()?.numChannels>T&&(T=y.getInfo().audio.numChannels);T>2&&Z.U6("hlschl",{mn:T});Z.s6?.V&&Z.U6("hlsfmtaf",{itags:K.join(".")});if(Z.B("html5_enable_vp9_fairplay")&&Z.L?.V()){Z.U6("drm",{sbdlfbk:1});for(const y of Z.YH)if(MM(y)){Z.L=y;break}}pL(Z,a)})}return nb()};
pMf=function(Z){if(Z.isExternallyHostedPodcast&&Z.VR){const k=xz(Z.VR);if(!k[0])return nb();Z.mj=k[0];return pYy(Z.Jq,k[0]).then(N=>{pL(Z,N)})}return Z.A1&&Z.ST?bvf(Z.Jq,Z.isAd(),Z.A1).then(k=>{pL(Z,k)}):nb()};
MPr=function(Z){if(Z.isExternallyHostedPodcast)return nb();const k=xz(Z.VR,Z.F$);if(Z.hlsvp){const N=Ypr(Z.hlsvp,Z.clientPlaybackNonce,Z.aM);k.push(N)}return dA0(Z.Jq,Z.isAd(),k,RVG(Z)).then(N=>{pL(Z,N)})};
be=function(Z){const k=Z.B("html5_enable_server_format_filter")&&!Z.kT(),N=Z.B("html5_enable_server_format_filter_for_drm")&&Z.kT();return nQ(Z)&&(k||N)};
UDb=function(Z,k){k.sort((N,a)=>N.toString().localeCompare(a.toString(),Z.Jq.hostLanguage))};
pL=function(Z,k){Z.O6=k;Z.uQ(new lq(g.ni(Z.O6,N=>N.getInfo())))};
RVG=function(Z){const k={cpn:Z.clientPlaybackNonce,c:Z.Jq.V.c,cver:Z.Jq.V.cver};Z.cg&&(k.ptk=Z.cg,k.oid=Z.U$,k.ptchn=Z.zg,k.pltype=Z.o6,Z.xt&&(k.m=Z.xt));return k};
g.RD=function(Z){return fL(Z)&&Z.fP?{fairplay:"https://youtube.com/api/drm/fps?ek=uninitialized"}:Z.U&&Z.U.contentProtection||null};
MO=function(Z){return Z.playerResponse&&Z.playerResponse.paidContentOverlay&&Z.playerResponse.paidContentOverlay.paidContentOverlayRenderer||g.J(Z.xW?.playerOverlays?.playerOverlayRenderer?.playerDisclosure,nBy)||null};
IHy=function(Z){const k=MO(Z);return k&&k.text?g.YL(k.text):Z.paidContentOverlayText};
j7f=function(Z){const k=MO(Z);return k&&k.durationMs?Cg(k.durationMs):Z.paidContentOverlayDurationMs};
nL=function(Z){let k="";if(Z.UJ)return Z.UJ;Z.isLivePlayback&&(k=Z.allowLiveDvr?"dvr":Z.isPremiere?"lp":Z.KX?"window":"live");Z.M4&&(k="post");return k};
g.ID=function(Z,k){return typeof Z.keywords[k]!=="string"?null:Z.keywords[k]};
g.PZ=function(Z){return!!(Z.Hv||Z.VR||Z.A1||Z.hlsvp||Z.zB())};
Q7b=function(Z){return(Z=Z.xd)&&Z.showError?Z.showError:!1};
g.jI=function(Z){return GY(Z)&&!Z.allowLiveDvr};
E1=function(Z){return GY(Z)&&Z.allowLiveDvr};
g.WZ=function(Z){return!!Z.V&&ANy(Z.V)};
g.Yz=function(Z){return!!Z.V&&PJU(Z.V)};
g.oD=function(Z){return!!Z.V&&HWi(Z.V)};
g.Zd=function(Z){return!!Z.V&&cNf(Z.V)};
g.EBy=function(Z){if(Z.U4)return null;let k=Z.Fh;k||(k=Z.playerResponse&&Z.playerResponse.endscreen&&Z.playerResponse.endscreen.endscreenUrlRenderer&&Z.playerResponse.endscreen.endscreenUrlRenderer.url);return k||null};
g.Wki=function(Z){return Z.U4?null:Z.playerResponse&&Z.playerResponse.endscreen&&Z.playerResponse.endscreen.endscreenRenderer||null};
g.kn=function(Z){if(!Z.playerResponse||!Z.playerResponse.annotations)return null;for(const k of Z.playerResponse.annotations)if(k.playerAnnotationsExpandedRenderer&&k.playerAnnotationsExpandedRenderer.featuredChannel)return k.playerAnnotationsExpandedRenderer;return null};
NN=function(Z){return Z.adFormat&&(Z.Qz?Z.adFormat!=="1_5":Z.adFormat!="1_5")?"adunit":Z.eventLabel||Z.Jq.zt};
g.aC=function(Z){return NN(Z)==="shortspage"};
Tn=function(Z){return Z.Ix||NN(Z)==="detailpage"||NN(Z)==="shortspage"||Z.mutedAutoplay};
YTN=function(Z){const k=NN(Z)==="adunit"?Z.RV:Tn(Z)?NN(Z)==="detailpage"||NN(Z)==="shortspage"?Z.isAutonav||Z.Kp>0:Z.bq?!1:Z.Jq.mq||Z.Jq.A1||!g.PQ(Z.Jq)?!0:!1:(Z.bq?0:Z.Ap)&&g.PQ(Z.Jq)?!0:!1;Z.B("html5_log_detailpage_autoplay")&&NN(Z)==="detailpage"&&Z.U6("autoplay_info",{autoplay:Z.Ix,autonav:Z.isAutonav,wasDompaused:Z.bq,result:k});return k};
Zfr=function(Z){let k=1;var N=g.Q5(Z.Jq.experiments,"html5_default_ad_gain");N&&Z.isAd()&&(k=N);N=Z.Y?.audio.D!=null?Z.Y?.audio.D:Z.lz;isNaN(N)||(Z.oE=4);return Math.min(1,10**(-N/20))||k};
kdN=function(Z){if(Z.B("html5_stateful_audio_normalization")){{let a=1;var k=g.Q5(Z.Jq.experiments,"html5_default_ad_gain");k&&Z.isAd()&&(a=k);const T=Z.Y?.audio.Y??Z.Ji;if(T==null||isNaN(T))Z=Zfr(Z);else{k=(0,g.z)();Z.oE=1;var N=k-Z.Jq.Oq<=Z.maxStatefulTimeThresholdSec*1E3;Z.applyStatefulNormalization&&N?Z.oE=2:N||(Z.Jq.J$=Infinity,Z.Jq.Oq=NaN);N=(Z.oE===2?g.u0(Z.Jq.J$,Z.minimumLoudnessTargetLkfs,Z.loudnessTargetLkfs):Z.loudnessTargetLkfs)-T;Z.oE!==2&&(N+=Z.playerResponse?.playerConfig?.audioConfig?.loudnessNormalizationConfig?.statelessLoudnessAdjustmentGain||
0);N=Math.min(N,0);Z.preserveStatefulLoudnessTarget&&(Z.Jq.J$=T+N,Z.Jq.Oq=k);Z=Math.min(1,10**(N/20))||a}}}else Z=Zfr(Z);return Z};
g.N0G=function(Z){return Z.Rn()&&nQ(Z)};
Ke=function(Z){return!!Z.playerResponse?.playerConfig?.mediaCommonConfig?.splitScreenEligible};
axf=function(Z){return isNaN(Z)?0:Math.max((Date.now()-Z)/1E3-30,0)};
yn=function(Z){return!(!Z.eL||!Z.Jq.C)&&Z.zB()};
Qn=function(Z){return Z.Uu&&Z.enableServerStitchedDai};
T0N=function(Z){return Z.XD&&!Z.Ry};
AE=function(Z){var k;if(!(k=s1&&Z.Rn()&&Z.kT()&&(Z.drmProduct==="1"?!1:!0)&&Z.B("html5_sabr_live_drm_streaming_xhr"))){k=Z.Rn()&&!Z.kT()&&s1;var N=Z.Rn()&&Z.latencyClass!=="ULTRALOW"&&!Z.isLowLatencyLiveStream&&Z.B("html5_sabr_live_normal_latency_streaming_xhr"),a=Z.isLowLatencyLiveStream&&Z.B("html5_sabr_live_low_latency_streaming_xhr");const T=Z.latencyClass==="ULTRALOW"&&Z.B("html5_sabr_live_ultra_low_latency_streaming_xhr");k=k&&(N||a||T)}N=k;k=Z.enableServerStitchedDai&&N&&Z.B("html5_enable_sabr_ssdai_streaming_xhr");
N=!Z.enableServerStitchedDai&&N;a=Z.Rn()&&!s1&&Z.B("html5_enable_sabr_live_non_streaming_xhr");Z=s1&&(Z.qW()||Ke(Z)&&Z.B("html5_enable_sabr_for_lifa_eligible_streams"));return k||N||a||Z};
qN=function(Z){return Z.Vp?["OK","LIVE_STREAM_OFFLINE"].includes(Z.Vp.status):!0};
g.K8r=function(Z){return Z.captionsLanguagePreference||Z.Jq.captionsLanguagePreference||g.ID(Z,"yt:cc_default_lang")||Z.Jq.ov};
Qtf=function(Z){return Z.Jq.experiments.Yl().V.Aq(y_X)&&Z.rQ()};
g.rv=function(Z){return!!Z.embeddedPlayerConfig?.embeddedPlayerFlags?.enableMusicUx};
Ce=function(Z){return Z.Jq.Y&&Z.isPrivate};
q9j=function(Z){return Z.playerResponse?.playerConfig?.daiConfig?Z.J2?1:Z.mX?2:0:3};
g.sK=function(Z){var k=Z.X();const N=g.mt(k);var a=k.LC;g.s$(k)&&(a&&(N.thirdParty={...N.thirdParty,embedUrl:a}),Nl0(N,Z));(a=Z.O)?N.clickTracking={clickTrackingParams:a}:g.s$(Z.X())&&g.G("EVENT_ID")?N.clickTracking={clickTrackingParams:g.G("EVENT_ID")}:k.B("html5_log_missing_itct")&&(a=new g.jD("Missing ITCT in InnerTubeContext",{isAd:Z.isAd(),llA:k.getWebPlayerContextConfig()?.contextId}),g.b(a));a=N.client||{};var T="EMBED",K=NN(Z);K==="leanback"?T="WATCH":k.B("gvi_channel_client_screen")&&K===
"profilepage"?T="CHANNEL":Z.ES?T="LIVE_MONITOR":K==="detailpage"?T="WATCH_FULL_SCREEN":K==="adunit"?T="ADUNIT":K==="sponsorshipsoffer"&&(T="UNKNOWN");a.clientScreen=T;if(T=Z.kidsAppInfo)a.kidsAppInfo=JSON.parse(T);(K=Z.Wj)&&!T&&(a.kidsAppInfo={contentSettings:{ageUpMode:r_f[K]}});if(T=Z.Yw)a.unpluggedAppInfo={enableFilterMode:!0};(K=Z.unpluggedFilterModeType)&&!T&&(a.unpluggedAppInfo={filterModeType:C1y[K]});if(T=Z.xl)a.unpluggedLocationInfo=T;N.client=a;a=N.request||{};Z.rD&&(a.isPrefetch=!0);if(T=
Z.mdxEnvironment)a.mdxEnvironment=T;if(T=Z.mdxControlMode)a.mdxControlMode=m9f[T];N.request=a;a=N.user||{};if(T=Z.zt)a.credentialTransferTokens=[{token:T,scope:"VIDEO"}];if(T=Z.hq)a.delegatePurchases={oauthToken:T},a.kidsParent={oauthToken:T};if(k=k.getWebPlayerContextConfig()?.userContentRating)a.serializedUserContentRating=k;N.user=a;if(k=Z.contextParams)N.activePlayers=[{playerContextParams:k}];if(Z=Z.clientScreenNonce)N.clientScreenNonce=Z;return N};
var stf=function(Z,k){return x4[c[2]](this,26,1025,Z,k)};
g.mt=function(Z){const k=g.YZ(),N=k.client||{};if(Z.forcedExperiments){var a=Z.forcedExperiments.split(",");const T=[];for(const K of a)T.push(Number(K));N.experimentIds=T}if(a=Z.homeGroupInfo)N.homeGroupInfo=JSON.parse(a);if(a=Z.getPlayerType())N.playerType=a;if(a=Z.V.ctheme)N.theme=a;if(a=Z.livingRoomAppMode)N.tvAppInfo={...N.tvAppInfo,livingRoomAppMode:a};a=Z.deviceYear;Z.B("html5_propagate_device_year")&&a&&(N.tvAppInfo={...N.tvAppInfo,deviceYear:a});if(a=Z.livingRoomPoTokenId)N.tvAppInfo={...N.tvAppInfo,
livingRoomPoTokenId:a};k.client=N;a=k.user||{};Z.enableSafetyMode&&(a={...a,enableSafetyMode:!0});!N.tvAppInfo?.usePageidAsHeader&&Z.pageId&&(a={...a,onBehalfOfUser:Z.pageId});k.user=a;return k};
A_X=function(Z){const k=!Z?.E4()&&Z?.Rn()&&lR();return{supportsVp9Encoding:!(!Z?.MV()||k),supportXhr:s1}};
c_y=async function(Z,k){Z={context:g.mt(Z.X()),engagementType:"ENGAGEMENT_TYPE_PLAYBACK",ids:[{playbackId:{videoId:Z.videoId,cpn:Z.clientPlaybackNonce}}]};const N=g.kP(P1f);return await g.xP(k,Z,N)};
Hff=function(Z,k,N){const a=g.Q5(k.experiments,"bg_vm_reinit_threshold");(!kC||(0,g.z)()-kC>a)&&c_y(Z,N).then(T=>{T&&(T=T.botguardData)&&g.aV(T,k)},T=>{Z.jm()||(T=QA(T),Z.U6("attf",T.details))})};
g.A7=function(Z,k,...N){Z.state.D.publish(k,...N);Z.state.U.publish(k,...N)};
I=function(Z,k,N){Z.state.V[k]=(...a)=>N.apply(Z,a)};
P3=function(Z,k,N){Z.state.V.hasOwnProperty(k)||I(Z,k,N);Z.state.L[k]=(...a)=>N.apply(Z,a);
Z.state.j.add(k)};
c3=function(Z,k,N){Z.state.V.hasOwnProperty(k)||I(Z,k,N);Z.app.X().C&&(Z.state.G[k]=(...a)=>N.apply(Z,a),Z.state.j.add(k))};
g.H3=function(Z,k,N){return Z.state.V[k](...N)};
g.dv=function(Z,k,...N){Z.state.D.publish(k,...N);Z.state.U.publish(k,...N);Z.state.Y.publish(k,...N)};
g.Xd=function(Z,k,...N){Z.state.D.publish(k,...N);Z.state.U.publish(k,...N);Z.state.Y.publish(k,...N);Z.state.C.publish(k,...N)};
d9i=function(Z,k,N){typeof Z==="string"&&(Z={mediaContentUrl:Z,startSeconds:k,suggestedQuality:N});a:{if((k=Z.mediaContentUrl)&&(k=/\/([ve]|embed)\/([^#?]+)/.exec(k))&&k[2]){k=k[2];break a}k=null}Z.videoId=k;return Le(Z)};
Le=function(Z,k,N){if(typeof Z==="string")return{videoId:Z,startSeconds:k,suggestedQuality:N};k={};for(const a of Xz0)Z[a]&&(k[a]=Z[a]);(Z=Z.embedConfig||Z.embed_config)&&(k.embed_config=L8b(Z));return k};
Vxf=function(Z,k,N,a){if(g.lf(Z)&&!Array.isArray(Z)){k="playlist list listType index startSeconds suggestedQuality".split(" ");N={};for(a=0;a<k.length;a++){const T=k[a];Z[T]&&(N[T]=Z[T])}return N}k={index:k,startSeconds:N,suggestedQuality:a};typeof Z==="string"&&Z.length===16?k.list="PL"+Z:k.playlist=Z;return k};
L8b=function(Z){if(typeof Z==="string")return Z;if(g.lf(Z))try{return JSON.stringify(Z)}catch(k){console.error("Invalid embedConfig JSON",k)}};
F8N=function(Z,k=1){const N={};k=Z.app.PA({playerType:k}).getVideoData();if(Ce(k))return{};N.video_id=k.videoId;N.author=k.author;N.title=k.title;N.isPlayable=qN(k);N.errorCode=k.errorCode;if(k.U&&k.U.video){N.video_quality=k.U.video.quality;k=k.U.video;const a=[];k.U()&&a.push("hfr");k.isHdr()&&a.push("hdr");k.primaries==="bt2020"&&a.push("wcg");N.video_quality_features=a}if(Z=Z.getPlaylistId())N.list=Z;return N};
txf=function(Z){P3(Z,"cueVideoById",Z.O);P3(Z,"loadVideoById",Z.bq);P3(Z,"cueVideoByUrl",Z.xW);P3(Z,"loadVideoByUrl",Z.ov);P3(Z,"playVideo",Z.Ke);P3(Z,"pauseVideo",Z.pauseVideo);P3(Z,"stopVideo",Z.l9);P3(Z,"clearVideo",Z.clearVideo);P3(Z,"getVideoBytesLoaded",Z.pF);P3(Z,"getVideoBytesTotal",Z.xl);P3(Z,"getVideoLoadedFraction",Z.Y);P3(Z,"getVideoStartBytes",Z.HA);P3(Z,"cuePlaylist",Z.cuePlaylist);P3(Z,"loadPlaylist",Z.hp);P3(Z,"nextVideo",Z.tW);P3(Z,"previousVideo",Z.LC);P3(Z,"playVideoAt",Z.rD);P3(Z,
"setShuffle",Z.setShuffle);P3(Z,"setLoop",Z.setLoop);P3(Z,"getPlaylist",Z.qX);P3(Z,"getPlaylistIndex",Z.getPlaylistIndex);P3(Z,"getPlaylistId",Z.getPlaylistId);P3(Z,"loadModule",Z.G);P3(Z,"unloadModule",Z.j);P3(Z,"setOption",Z.U);P3(Z,"getOption",Z.s6);P3(Z,"getOptions",Z.V);P3(Z,"mute",Z.FN);P3(Z,"unMute",Z.Jd);P3(Z,"isMuted",Z.isMuted);P3(Z,"setVolume",Z.xd);P3(Z,"getVolume",Z.getVolume);P3(Z,"seekTo",Z.mq);P3(Z,"getPlayerMode",Z.getPlayerMode);P3(Z,"getPlayerState",Z.O6);P3(Z,"getAvailablePlaybackRates",
Z.getAvailablePlaybackRates);P3(Z,"getPlaybackQuality",()=>Z.getPlaybackQuality(1));
P3(Z,"setPlaybackQuality",Z.ix);P3(Z,"getAvailableQualityLevels",Z.vD);P3(Z,"getCurrentTime",Z.Rq);P3(Z,"getDuration",Z.MX);P3(Z,"addEventListener",Z.Vz);P3(Z,"removeEventListener",Z.hI);P3(Z,"getDebugText",Z.tq);P3(Z,"getVideoData",()=>F8N(Z));
P3(Z,"addCueRange",Z.C);P3(Z,"removeCueRange",Z.removeCueRange);P3(Z,"setSize",Z.setSize);P3(Z,"getApiInterface",Z.getApiInterface);P3(Z,"destroy",Z.destroy);P3(Z,"mutedAutoplay",Z.mutedAutoplay);const k=Z.app.X();k.G||(P3(Z,"getVideoEmbedCode",Z.getVideoEmbedCode),P3(Z,"getVideoUrl",Z.jY));P3(Z,"getMediaReferenceTime",Z.Qz);P3(Z,"getSize",Z.getSize);P3(Z,"setFauxFullscreen",Z.GF);k.B("embeds_enable_move_set_center_crop_to_public")&&P3(Z,"setCenterCrop",Z.setCenterCrop);k.G||P3(Z,"logImaAdEvent",
Z.logImaAdEvent);P3(Z,"preloadVideoById",Z.NW);P3(Z,"wakeUpControls",Z.wakeUpControls)};
g.Vn=function(Z){return(Z=h6f(Z.app.GZ()))?Z.jK():null};
t7=function(Z){const k=g.dr(Z.app.X()),N=Z.app.getVideoData()?.fN;Z=Fd(Z.app);return g.xq(k)&&!N||Z?!1:!0};
uwU=function(Z,k,N){return typeof Z==="number"?{playerType:Z,OP:k,cpn:N}:Z||{}};
lxf=function(Z){let k=Z.raw_player_response;if(!k){var N=Z.player_response;N&&(k=JSON.parse(N))}delete Z.player_response;delete Z.raw_player_response;k&&(Z.raw_player_response={streamingData:k.streamingData,playerConfig:k.playerConfig},k.playbackTracking?.qoeUrl&&(Z.raw_player_response={...Z.raw_player_response,playbackTracking:{qoeUrl:k.playbackTracking.qoeUrl}}),k.captions&&(Z.raw_player_response={...Z.raw_player_response,captions:k.captions}),k.videoDetails&&(k.videoDetails.videoId||k.videoDetails.lengthSeconds)&&
(N={},k.videoDetails.videoId&&(N.videoId=k.videoDetails.videoId),k.videoDetails.lengthSeconds&&(N.lengthSeconds=k.videoDetails.lengthSeconds),Z.raw_player_response={...Z.raw_player_response,videoDetails:N}))};
h7=function(Z,k){const N={};if(Z.app.X().O){for(const a of fx0)k.hasOwnProperty(a)&&(N[a]=k[a]);if(Z=N.qoe_cat)k="",typeof Z==="string"&&Z.length>0&&(k=Z.split(",").filter(a=>B0f.includes(a)).join(",")),N.qoe_cat=k;
lxf(N)}else for(const a of D9r)k.hasOwnProperty(a)&&(N[a]=k[a]);return N};
v5R=function(Z){return Z?Ofi[Z]||5:5};
ify=function(Z){I(Z,"getInternalApiInterface",Z.getInternalApiInterface);I(Z,"getTrustedApi",Z.getTrustedApi);I(Z,"addEventListener",Z.N);I(Z,"removeEventListener",Z.PG);I(Z,"cueVideoByPlayerVars",Z.zt);I(Z,"loadVideoByPlayerVars",Z.Ap);I(Z,"preloadVideoByPlayerVars",Z.gD);I(Z,"getAdState",Z.getAdState);I(Z,"sendAbandonmentPing",Z.sendAbandonmentPing);I(Z,"setLoopRange",Z.setLoopRange);I(Z,"getLoopRange",Z.getLoopRange);I(Z,"setAutonavState",Z.setAutonavState);I(Z,"seekTo",Z.j9);I(Z,"seekBy",Z.gV);
I(Z,"seekToLiveHead",Z.seekToLiveHead);I(Z,"requestSeekToWallTimeSeconds",Z.requestSeekToWallTimeSeconds);I(Z,"seekToStreamTime",Z.seekToStreamTime);I(Z,"prefetchKeyPlay",Z.prefetchKeyPlay);I(Z,"startSeekCsiAction",Z.startSeekCsiAction);I(Z,"getStreamTimeOffset",Z.getStreamTimeOffset);I(Z,"isOrchestrationLeader",Z.isOrchestrationLeader);I(Z,"getVideoData",Z.r5);I(Z,"setInlinePreview",Z.setInlinePreview);I(Z,"getAppState",Z.getAppState);I(Z,"updateLastActiveTime",Z.updateLastActiveTime);I(Z,"setBlackout",
Z.setBlackout);I(Z,"setUserEngagement",Z.setUserEngagement);I(Z,"updateSubtitlesUserSettings",Z.updateSubtitlesUserSettings);I(Z,"getPresentingPlayerType",Z.D);I(Z,"canPlayType",Z.canPlayType);I(Z,"updatePlaylist",Z.updatePlaylist);I(Z,"updateVideoData",Z.updateVideoData);I(Z,"updateEnvironmentData",Z.updateEnvironmentData);I(Z,"sendVideoStatsEngageEvent",Z.A1);I(Z,"productsInVideoVisibilityUpdated",Z.productsInVideoVisibilityUpdated);I(Z,"setSafetyMode",Z.setSafetyMode);I(Z,"isAtLiveHead",k=>Z.isAtLiveHead(void 0,
k));
I(Z,"getVideoAspectRatio",Z.getVideoAspectRatio);I(Z,"getPreferredQuality",Z.getPreferredQuality);I(Z,"getPlaybackQualityLabel",Z.getPlaybackQualityLabel);I(Z,"setPlaybackQualityRange",Z.KN);I(Z,"onAdUxClicked",Z.onAdUxClicked);I(Z,"getFeedbackProductData",Z.getFeedbackProductData);I(Z,"getStoryboardFrame",Z.getStoryboardFrame);I(Z,"getStoryboardFrameIndex",Z.getStoryboardFrameIndex);I(Z,"getStoryboardLevel",Z.getStoryboardLevel);I(Z,"getNumberOfStoryboardLevels",Z.getNumberOfStoryboardLevels);I(Z,
"getCaptionWindowContainerId",Z.getCaptionWindowContainerId);I(Z,"getAvailableQualityLabels",Z.getAvailableQualityLabels);I(Z,"addCueRange",Z.addCueRange);I(Z,"addUtcCueRange",Z.addUtcCueRange);I(Z,"showAirplayPicker",Z.showAirplayPicker);I(Z,"dispatchReduxAction",Z.dispatchReduxAction);I(Z,"getPlayerResponse",Z.hq);I(Z,"getWatchNextResponse",Z.iq);I(Z,"getHeartbeatResponse",Z.Kp);I(Z,"getCurrentTime",Z.Sm);I(Z,"getDuration",Z.Mr);I(Z,"getPlayerState",Z.getPlayerState);I(Z,"getPlayerStateObject",
Z.Tt);I(Z,"getVideoLoadedFraction",Z.getVideoLoadedFraction);I(Z,"getProgressState",Z.getProgressState);I(Z,"getVolume",Z.getVolume);I(Z,"setVolume",Z.Xg);I(Z,"isMuted",Z.isMuted);I(Z,"mute",Z.kR);I(Z,"unMute",Z.pR);I(Z,"loadModule",Z.loadModule);I(Z,"unloadModule",Z.unloadModule);I(Z,"getOption",Z.sG);I(Z,"getOptions",Z.getOptions);I(Z,"setOption",Z.setOption);I(Z,"loadVideoById",Z.oQ);I(Z,"loadVideoByUrl",Z.x6);I(Z,"playVideo",Z.vS);I(Z,"loadPlaylist",Z.loadPlaylist);I(Z,"nextVideo",Z.nextVideo);
I(Z,"previousVideo",Z.previousVideo);I(Z,"playVideoAt",Z.playVideoAt);I(Z,"getDebugText",Z.getDebugText);I(Z,"getWebPlayerContextConfig",Z.getWebPlayerContextConfig);I(Z,"notifyShortsAdSwipeEvent",Z.notifyShortsAdSwipeEvent);I(Z,"getVideoContentRect",Z.getVideoContentRect);I(Z,"setSqueezeback",Z.setSqueezeback);I(Z,"toggleSubtitlesOn",Z.toggleSubtitlesOn);I(Z,"isSubtitlesOn",Z.isSubtitlesOn);I(Z,"getAudioTrack",Z.dA);I(Z,"setAudioTrack",Z.fN);I(Z,"getAvailableAudioTracks",Z.FS);I(Z,"reportPlaybackIssue",
Z.reportPlaybackIssue);I(Z,"setAutonav",Z.setAutonav);I(Z,"isNotServable",Z.isNotServable);I(Z,"channelSubscribed",Z.channelSubscribed);I(Z,"channelUnsubscribed",Z.channelUnsubscribed);I(Z,"togglePictureInPicture",Z.togglePictureInPicture);I(Z,"supportsGaplessAudio",Z.supportsGaplessAudio);I(Z,"supportsGaplessShorts",Z.supportsGaplessShorts);I(Z,"isGaplessTransitionReady",Z.isGaplessTransitionReady);I(Z,"enqueueVideoByPlayerVars",k=>void Z.enqueueVideoByPlayerVars(k));
I(Z,"clearQueue",Z.clearQueue);I(Z,"getMaxPlaybackQuality",Z.getMaxPlaybackQuality);I(Z,"getUserPlaybackQualityPreference",Z.getUserPlaybackQualityPreference);I(Z,"getSubtitlesUserSettings",Z.getSubtitlesUserSettings);I(Z,"resetSubtitlesUserSettings",Z.resetSubtitlesUserSettings);I(Z,"setMinimized",Z.setMinimized);I(Z,"setOverlayVisibility",Z.setOverlayVisibility);I(Z,"confirmYpcRental",Z.confirmYpcRental);I(Z,"queueNextVideo",Z.queueNextVideo);I(Z,"handleExternalCall",Z.handleExternalCall);I(Z,"logApiCall",
Z.logApiCall);I(Z,"isExternalMethodAvailable",Z.isExternalMethodAvailable);I(Z,"setScreenLayer",Z.setScreenLayer);I(Z,"getCurrentPlaylistSequence",Z.getCurrentPlaylistSequence);I(Z,"getPlaylistSequenceForTime",Z.getPlaylistSequenceForTime);I(Z,"shouldSendVisibilityState",Z.shouldSendVisibilityState);I(Z,"syncVolume",Z.syncVolume);I(Z,"highlightSettingsMenuItem",Z.highlightSettingsMenuItem);I(Z,"openSettingsMenuItem",Z.openSettingsMenuItem);I(Z,"getEmbeddedPlayerResponse",Z.getEmbeddedPlayerResponse);
I(Z,"getVisibilityState",Z.getVisibilityState);I(Z,"isMutedByMutedAutoplay",Z.isMutedByMutedAutoplay);I(Z,"isMutedByEmbedsMutedAutoplay",Z.isMutedByEmbedsMutedAutoplay);I(Z,"setGlobalCrop",Z.setGlobalCrop);I(Z,"setInternalSize",Z.setInternalSize);I(Z,"setFauxFullscreen",Z.setFauxFullscreen);I(Z,"setAppFullscreen",Z.setAppFullscreen);I(Z,"isKeyboardDisabled",Z.isKeyboardDisabled)};
la=function(Z,k,N){Z=g.ua(Z.sb(),k);return N?(N.addOnDisposeCallback(Z),null):Z};
g.fe=function(Z,k,N){return Z.app.X().qX?k:g.DH("$DESCRIPTION ($SHORTCUT)",{DESCRIPTION:k,SHORTCUT:N})};
g50=function(Z){Z.sb().element.setAttribute("aria-live","polite")};
g.B3=function(Z,k){Z.getPresentingPlayerType()===3?Z.publish("mdxautoplaycancel"):g.A7(Z,"onAutonavCancelled",k)};
g.Dd=function(Z){Z=Z.GZ();const k=Z.Es.get("endscreen");return k&&k.a8()?!0:Z.ZV()};
g.v3=function(Z){const k=OK(Z.GZ());return Z.app.Po&&!Z.isFullscreen()||Z.getPresentingPlayerType()===3&&k&&k.hasNext()&&k.hasPrevious()||!!Z.getPlaylist()};
g.ia=function(Z,k){g.H3(Z,"addEmbedsConversionTrackingParams",[k])};
g.wv=function(Z){return(Z=g.gv(Z.GZ()))?Z.TJ():{}};
g.wzX=function(Z){Z=(Z=Z.getVideoData())&&Z.U;return!!Z&&!(!Z.audio||!Z.video)&&Z.mimeType!=="application/x-mpegURL"};
g.$n=function(Z,k,N){Z=Z.fF().element;let a=tc(Z.children,T=>{T=Number(T.getAttribute("data-layer"));return N-T||1});
a<0&&(a=-(a+1));qi(Z,k,a);k.setAttribute("data-layer",String(N))};
g.xn=function(Z){const k=Z.X();if(!k.FN)return!1;const N=Z.getVideoData();if(!N||Z.getPresentingPlayerType()===3)return!1;var a=(!N.isLiveDefaultBroadcast||k.B("allow_poltergust_autoplay"))&&!N.dA();a=N.isLivePlayback&&(!k.B("allow_live_autoplay")||!a);const T=N.isLivePlayback&&k.B("allow_live_autoplay_on_mweb");Z=Z.getPlaylist();Z=!!Z&&Z.hasNext();var K=N.xW&&N.xW.playerOverlays||null;K=!!(K&&K.playerOverlayRenderer&&K.playerOverlayRenderer.autoplay);K=N.o4&&K;return!N.ypcPreview&&(!a||T)&&!g.KK(N.Wo,
"ypc")&&!Z&&(!g.PQ(k)||K)};
x9f=function(Z,k){Z=$9f(Z.app.QT().G);for(const N of Z){Z=N.getAvailableAudioTracks();let a=null;for(const T of Z)if(T.getLanguageInfo().getId()===k){a=T;break}a&&N.Kd(a,!0)}};
SY=function(){Gn||(Gn=new Gdy);return Gn};
eY=function(Z,k){k?Z.requestHeaders.Authorization=`Bearer ${k}`:delete Z.requestHeaders.Authorization};
oC=function(Z){const k=Z.S.getRootNode();return Z.S.B("web_watch_pip")||Z.S.B("web_shorts_pip")?ee(k):document};
S9f=function(Z){Z.sourceElement&&(document.activeElement&&g.C1(Z.element,document.activeElement)&&Z.sourceElement.focus(),Z.sourceElement.setAttribute("aria-expanded","false"),Z.sourceElement=void 0);Z.L.U();Z.G=void 0};
J7=function(Z,k,N){Z.Ga()?Z.cA():Z.Iv(k,N)};
g.zn=function(Z={},k=[],N=!1,a=!1){k.push("ytp-menuitem");"role"in Z||(Z.role="menuitem");N||"tabindex"in Z||(Z.tabindex="0");Z={J:N?"a":"div",BD:k,W:Z,A:[{J:"div",Z:"ytp-menuitem-icon",Da:"{{icon}}"},{J:"div",Z:"ytp-menuitem-label",Da:"{{label}}"},{J:"div",Z:"ytp-menuitem-content",Da:"{{content}}"}]};a&&Z.A.push({J:"div",Z:"ytp-menuitem-secondary-icon",Da:"{{secondaryIcon}}"});return Z};
g.UK=function(Z,k){Z.updateValue("label",k)};
ba=function(Z){return Z?g.YL(Z):""};
RC=function(Z,k,N,a){k in Z.V||(N=new g.pe(N,a,{id:k,priority:2,namespace:"appad"}),Z.api.f8([N],1),Z.V[k]=N)};
MN=function(Z,k){e6R(Z,k).then(N=>{g.iv(k,void 0,void 0,N)})};
ne=function(Z,k){k.forEach(N=>{MN(Z,N)})};
U9G=function(Z,k,N){if(!(N in k))return!1;k=k[N];Array.isArray(k)||(k=[k]);for(const a of k)k={CPN:Z.api.getVideoData().clientPlaybackNonce},k=g.hm(a,k),g.iv(k,void 0,d8(Xi(k,o5r),k,!1,"Active View 3rd Party Integration URL")||d8(Xi(k,J_b),k,!1,"Google/YouTube Brand Lift URL")||d8(Xi(k,z6r),k,!1,"Nielsen OCR URL"));return!0};
e6R=function(Z,k){return g.Qw(Z.api.X())&&XS(k)&&H8(k)?g.GC(Z.api.X(),Z.api.getVideoData().G()).then(N=>{let a;N&&(a={Authorization:`Bearer ${N}`});return a},void 0):Y6()};
bff=function(Z){const k=!Z.X().oE&&Z.getPresentingPlayerType()!==3;return Z.isFullscreen()||k};
g.IC=function(Z,k,N=!1,a){const T=Z.currentTarget;if(!N&&g.SM(Z))return Z.preventDefault(),!0;k.pauseVideo();Z=T.getAttribute("href");g.pZ(Z,a,!0);return!1};
g.jY=function(Z,k,N){if(t4(k.X())&&k.getPresentingPlayerType()!==2){if(g.SM(N))return k.isFullscreen()&&!k.X().externalFullscreen&&k.toggleFullscreen(),N.preventDefault(),!0}else{const a=g.SM(N);a&&k.pauseVideo();g.pZ(Z,void 0,!0);a&&(g.RJ(Z),N.preventDefault())}return!1};
pz0=function(Z){Z=EK.includes("en")?Z.B("delhi_modern_web_player_icons")?KZ():{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},A:[{J:"path",Rv:!0,W:{d:"M11,11 C9.89,11 9,11.9 9,13 L9,23 C9,24.1 9.89,25 11,25 L25,25 C26.1,25 27,24.1 27,23 L27,13 C27,11.9 26.1,11 25,11 L11,11 Z M17,17 L15.5,17 L15.5,16.5 L13.5,16.5 L13.5,19.5 L15.5,19.5 L15.5,19 L17,19 L17,20 C17,20.55 16.55,21 16,21 L13,21 C12.45,21 12,20.55 12,20 L12,16 C12,15.45 12.45,15 13,15 L16,15 C16.55,15 17,15.45 17,16 L17,17 L17,17 Z M24,17 L22.5,17 L22.5,16.5 L20.5,16.5 L20.5,19.5 L22.5,19.5 L22.5,19 L24,19 L24,20 C24,20.55 23.55,21 23,21 L20,21 C19.45,21 19,20.55 19,20 L19,16 C19,15.45 19.45,15 20,15 L23,15 C23.55,15 24,15.45 24,16 L24,17 L24,17 Z",
fill:"#fff"}}]}:Z.B("delhi_modern_web_player_icons")?ZIy():{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},A:[{J:"path",Rv:!0,W:{d:"M11,11 C9.9,11 9,11.9 9,13 L9,23 C9,24.1 9.9,25 11,25 L25,25 C26.1,25 27,24.1 27,23 L27,13 C27,11.9 26.1,11 25,11 L11,11 Z M11,17 L14,17 L14,19 L11,19 L11,17 L11,17 Z M20,23 L11,23 L11,21 L20,21 L20,23 L20,23 Z M25,23 L22,23 L22,21 L25,21 L25,23 L25,23 Z M25,19 L16,19 L16,17 L25,17 L25,19 L25,19 Z",fill:"#fff"}}]};Z.Z="ytp-subtitles-button-icon";
return Z};
R6f=function(Z){return EK.includes("en")?Z?KZ():{J:"svg",W:{height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{d:"M6,14v-4c0-0.55,.45-1,1-1h3c0.55,0,1,.45,1,1v1H9.5v-0.5h-2v3h2V13H11v1c0,.55-0.45,1-1,1H7C6.45,15,6,14.55,6,14z            M14,15h3c0.55,0,1-0.45,1-1v-1h-1.5v0.5h-2v-3h2V11H18v-1c0-0.55-0.45-1-1-1h-3c-0.55,0-1,.45-1,1v4C13,14.55,13.45,15,14,15z            M20,4H4v16h16V4 M21,3v18H3V3.01C3,3,3,3,3.01,3H21L21,3z",fill:"white"}}]}:Z?{J:"svg",W:{fill:"none",height:"24",viewBox:"0 0 24 24",
width:"24"},A:[{J:"path",W:{d:"M21.20 3.01L21 3H3L2.79 3.01C2.30 3.06 1.84 3.29 1.51 3.65C1.18 4.02 .99 4.50 1 5V19L1.01 19.20C1.05 19.66 1.26 20.08 1.58 20.41C1.91 20.73 2.33 20.94 2.79 20.99L3 21H21L21.20 20.98C21.66 20.94 22.08 20.73 22.41 20.41C22.73 20.08 22.94 19.66 22.99 19.20L23 19V5C23.00 4.50 22.81 4.02 22.48 3.65C22.15 3.29 21.69 3.06 21.20 3.01ZM3 19V5H21V19H3ZM8 11H6C5.73 11 5.48 11.10 5.29 11.29C5.10 11.48 5 11.73 5 12C5 12.26 5.10 12.51 5.29 12.70C5.48 12.89 5.73 13 6 13H8C8.26 13 8.51 12.89 8.70 12.70C8.89 12.51 9 12.26 9 12C9 11.73 8.89 11.48 8.70 11.29C8.51 11.10 8.26 11 8 11ZM18 11H12C11.73 11 11.48 11.10 11.29 11.29C11.10 11.48 11 11.73 11 12C11 12.26 11.10 12.51 11.29 12.70C11.48 12.89 11.73 13 12 13H18C18.26 13 18.51 12.89 18.70 12.70C18.89 12.51 19 12.26 19 12C19 11.73 18.89 11.48 18.70 11.29C18.51 11.10 18.26 11 18 11ZM18 15H16C15.73 15 15.48 15.10 15.29 15.29C15.10 15.48 15 15.73 15 16C15 16.26 15.10 16.51 15.29 16.70C15.48 16.89 15.73 17 16 17H18C18.26 17 18.51 16.89 18.70 16.70C18.89 16.51 19 16.26 19 16C19 15.73 18.89 15.48 18.70 15.29C18.51 15.10 18.26 15 18 15ZM12 15H6C5.73 15 5.48 15.10 5.29 15.29C5.10 15.48 5 15.73 5 16C5 16.26 5.10 16.51 5.29 16.70C5.48 16.89 5.73 17 6 17H12C12.26 17 12.51 16.89 12.70 16.70C12.89 16.51 13 16.26 13 16C13 15.73 12.89 15.48 12.70 15.29C12.51 15.10 12.26 15 12 15Z",
fill:"white"}}]}:{J:"svg",W:{height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{d:"M5,11h2v2H5V11z M15,15H5v2h10V15z M19,15h-2v2h2V15z M19,11H9v2h10V11z M22,6H2v14h20V6z M3,7h18v12H3V7z",fill:"white"}}]}};
W3=function(){return{J:"div",Z:"ytp-spinner-container",A:[{J:"div",Z:"ytp-spinner-rotator",A:[{J:"div",Z:"ytp-spinner-left",A:[{J:"div",Z:"ytp-spinner-circle"}]},{J:"div",Z:"ytp-spinner-right",A:[{J:"div",Z:"ytp-spinner-circle"}]}]}]}};
Ixb=function(Z){const k=Z.getVideoData();var N=Z.TM(),a=N.lq(),T=Z.X();const K=Z.oO();var y=K.T_*8/1024,Q=K.Oc/1024,q=K.n$;const r=K.iL;var C=K.Jf,m=N.getCurrentTime().toFixed(2),A=zd(N.pN(),",",3);var P="";if(k.isDaiEnabled()){k.enableServerStitchedDai&&(P+=k.J2?"DS":"SS");P=k.qW()?P+"LIFA, ":P+"DAI, ";var d=K.QN;d&&(P+=d)}Ke(k)&&!k.qW()&&(P+="LIFAE, ");nQ(k)&&(P+="SABR, ");if(k.fetchType){switch(k.fetchType){case "onesie":d="o";break;case "gp":d="gp";break;default:d="gvi"}P+=`vd:${d}, `}(d=T.s6)&&
(P=d.V?P+"wa, ":P+"w, ");P+=`s:${C} t:${m} b:${A} `;N.isSeeking()&&(P+="S");N.isPaused()&&(P+="P");N.isEnded()&&(P+="E");Z.isOrchestrationLeader()&&(P+=" L");(N=K.KT)&&(P+=` l:${N.toFixed()}`);N=K.currentTime;C=k.hB;N&&N>C.start&&N<C.end&&(P+=" as");N=g.ai(dV)("_start",void 0);C=[];for(h of["pl_i","vir","or_p","orfb","pbs"])(m=g.ai(dV)(h,void 0))&&N&&(m-=N,C.push(`${h}:${Math.round(m)}`));var h=C.join(" ");N=g.lS();C=g.wv(Z).C2;m=k.D&&!k.D.V()?"display:none":"";if((A=k.clientPlaybackNonce)&&A.length==
16){A+="AAAA";d=0;var B="";for(let O=0;O<20;O++)if(d=(d<<6)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".indexOf(A.charAt(O)),O%5==4){let x="";for(let e=0;e<6;e++)x="0123456789ABCDEFGHJKMNPQRSTVWXYZ".charAt(d&31)+x,d>>=5;B+=x}A=`${B.substr(0,4)} ${B.substr(4,4)} ${B.substr(8,4)} ${B.substr(12,4)} ${B.substr(16,4)}`}else A="";y={video_id_and_cpn:String(k.videoId)+" / "+A,codecs:"",dims_and_frames:"",bandwidth_kbps:`${y.toFixed(0)} Kbps`,buffer_health_seconds:`${q.toFixed(2)} s`,
date:`${(new Date).toString()}`,drm_style:r?"":"display:none",drm:r,debug_info:P,extra_debug_info:"",bandwidth_style:m,network_activity_style:m,network_activity_bytes:`${Q.toFixed(0)} KB`,shader_info:C,shader_info_style:C?"":"display:none",playback_categories:""};Q=`${a.clientWidth}x${a.clientHeight}`+(N>1?`*${N.toFixed(2)}`:"");q="-";K.totalVideoFrames&&(q=`${K.droppedVideoFrames||0} dropped of ${K.totalVideoFrames}`);y.dims_and_frames=`${Q} / ${q}`;Z=Z.getVolume();Q=kdN(k);Z=`${Math.round(Z)}% / ${k.Y?.audio.U?
"VB":k.Y?.audio.V?"DRC":`${Math.round(Z*Q)}%`}`;Q=k.lz.toFixed(1);isFinite(Number(Q))&&(Z+=` (content loudness ${Q}dB)`);y.volume=Z;y.resolution=`${a.videoWidth}x${a.videoHeight}`;if(a=k.U){if(Z=a.video)Q=Z.fps,Q>1&&(y.resolution+=`@${Q}`),(Q=K.Vk)&&Q.video&&(y.resolution+=` / ${Q.video.width}x${Q.video.height}`,Q.video.fps>1&&(y.resolution+=`@${Q.video.fps}`)),y.codecs=MxG(a),!k.Y||a.audio&&a.video?a.rC&&(y.codecs+=` / ${a.rC}A`):y.codecs+=` / ${MxG(k.Y)}`,Z.V||Z.primaries?(Q=Z.V||"unknown",Q===
"smpte2084"?Q=`${Q} (PQ)`:Q==="arib-std-b67"&&(Q=`${Q} (HLG)`),y.color=`${Q} / ${Z.primaries||"unknown"}`,y.color_style=""):y.color_style="display:none";if(a.debugInfo){y.fmt_debug_info="";for(var v of a.debugInfo)y.fmt_debug_info+=`${v.label}:${v.text} `}y.fmt_debug_info_style=y.fmt_debug_info&&y.fmt_debug_info.length>0?"":"display:none"}v=k.isLivePlayback;a=k.M4;y.live_mode_style=v||a?"":"display:none";y.live_latency_style=v?"":"display:none";if(a)y.live_mode="Post-Live"+(eI(k)?" Manifestless":
"");else if(v){a=K.q0;y.live_latency_secs=`${a.toFixed(2)}s`;v=eI(k)?"Manifestless, ":"";k.KX&&(v+="Windowed, ");Z="Uncertain";if(a>=0&&a<120)if(k.latencyClass&&k.latencyClass!=="UNKNOWN")switch(k.latencyClass){case "NORMAL":Z="Optimized for Normal Latency";break;case "LOW":Z="Optimized for Low Latency";break;case "ULTRALOW":Z="Optimized for Ultra Low Latency";break;default:Z="Unknown Latency Setting"}else Z=k.isLowLatencyLiveStream?"Optimized for Low Latency":"Optimized for Smooth Streaming";v+=
Z;(a=K.FK)&&(v+=`, seq ${a.sequence}`);y.live_mode=v}T.experiments.Yl().V.Aq(n5f)?K.isGapless&&!K.Q_&&(y.playback_categories=K.r0?y.playback_categories+"Gapless ":y.playback_categories+"Queued "):!K.isGapless||vZ(k)&&K.Q_||(y.playback_categories+="Gapless ");y.playback_categories_style=y.playback_categories?"":"display:none";y.bandwidth_samples=K.FT;y.network_activity_samples=K.uo;y.live_latency_samples=K.zV;y.buffer_health_samples=K.jW;T=k.jY();if(k.cotn||T)y.cotn_and_local_media=`${k.cotn?k.cotn:
"null"} / ${T}`;y.cotn_and_local_media_style=y.cotn_and_local_media?"":"display:none";U1(k,"web_player_release_debug")?(y.release_name=c[55],y.release_style=""):y.release_style="display:none";y.debug_info&&h.length>0&&y.debug_info.length+h.length<=60?y.debug_info+=" "+h:y.extra_debug_info=h;y.extra_debug_info_style=y.extra_debug_info&&y.extra_debug_info.length>0?"":"display:none";return y};
Yn=function(Z){if(document.createRange){const k=document.createRange();k&&(k.selectNodeContents(Z),Z=window.getSelection())&&(Z.removeAllRanges(),Z.addRange(k))}};
jtR=function(Z,k){const N=k.getAudioTrack();return N.id!=="und"?g.Ry(Z,a=>a.ZF?.name===N.getLanguageInfo().name):Z};
E5N=function(Z,k){return k.getUserAudio51Preference()?g.Ry(Z,ZQ):Z};
W8X=function(Z){return Z.map(k=>new $5(k.id,"application/x-mpegURL",{ZF:k.ZF}))};
Y9G=function(Z){return g.kh("yt-player-drc-pref")?g.Ry(Z,kc):Z};
ZNN=function(Z){return Wo0()===2?g.Ry(Z,Ns):Z};
kZf=function(Z){return YnU()===1?g.Ry(Z,aG):Z};
aG=function(Z){return Z.audio?.audioQuality==="AUDIO_QUALITY_HIGH"&&!ZQ(Z)};
kc=function(Z){return Z.audio?.V===!0};
ZQ=function(Z){return Z.G()};
N7G=function(Z){return Z.ZF!==void 0};
Ns=function(Z){return Z.audio?.U===!0};
T0=function(Z,k){if(Z.length<2)return!1;const N=k(Z[0]);return Z.some(a=>k(a)!==N)};
aGj=function(Z,k){Z=new Set(Z.map(k));Z.delete(void 0);return Z.size>=2};
T7f=function(Z){return Z.S.X().B("web_player_autonav_use_server_provided_state")&&Z.Yg().xF()};
Kzy=function(Z){Z.isChecked=Z.isChecked;Z.Lp("ytp-autonav-toggle-button").setAttribute("aria-checked",String(Z.isChecked));const k=Z.isChecked?"Autoplay is on":"Autoplay is off";Z.S.X().B("player_tooltip_data_title_killswitch")?Z.update({title:k,label:k}):Z.update({"data-tooltip-title":k,label:k});Z.S.qj()};
QxU=function(Z){Z.menuItem||(Z.menuItem=new ykX(Z.api),g.u(Z,Z.menuItem),Z.menuItem.aq(Z.V))};
q0f=function(Z){var k=Z.api.B("delhi_modern_web_player_compact_controls"),N=g.Q5(Z.api.X().experiments,"delhi_modern_web_player_responsive_compact_controls_threshold"),a=k||N>0&&Z.api.getPlayerSize().width<=N;k=Z.api.getRootNode();k.classList.toggle("ytp-delhi-modern-compact-controls",a);N=a?"40px":"48px";const T=a?"8px":"12px",K=a?"56px":"72px",y=a?"56px":"64px";let Q=a?"48px":"56px",q=a?"12px":"20px";a=a?"72px":"96px";Z.api.B("delhi_modern_web_player_big_mode_consistent_pill_height")&&(Q="56px",
q="12px",a="80px");k.style.setProperty("--yt-delhi-pill-height",N);k.style.setProperty("--yt-delhi-pill-top-height",T);k.style.setProperty("--yt-delhi-bottom-controls-height",K);k.style.setProperty("--yt-delhi-bottom-controls-height-xsmall-width-mode",y);k.style.setProperty("--yt-delhi-big-mode-pill-height",Q);k.style.setProperty("--yt-delhi-big-mode-pill-top-height",q);k.style.setProperty("--yt-delhi-big-mode-bottom-controls-height",a)};
rkf=function(Z,k){for(const N of k){k=Number(N.playbackPosition?.utcTimeMillis)/1E3;const a=`embargo_${k}`;Z.api.addUtcCueRange(a,k,k+Number(N.duration?.seconds),"embargo",!1);N.onEnter&&(Z.V[a]=N.onEnter.filter(Z.U))}};
mtf=function(Z){var k=Z.api.getRootNode();k=Z.api.getWebPlayerContextConfig().embedsEnableEmc3ds?k.parentElement?.parentElement||k:k;Z.V=new CZ0(k,N=>{N!=null&&(Z.api.X().nm=N,Z.api.X().eL="EMBEDDED_PLAYER_VISIBILITY_FRACTION_SOURCE_INTERSECTION_OBSERVER")});
g.u(Z,Z.V);Z.events.K(Z.api,"videoStatsPingCreated",N=>{var a=Z.V;a=a.V==null?null:Math.round(a.V*100)/100;N.inview=a!=null?a:void 0;a=Z.api.getPlayerSize();if(a.height>0&&a.width>0){a=[Math.round(a.width),Math.round(a.height)];const T=g.lS();T>1&&a.push(T);a=a.join(":")}else a=void 0;N.size=a})};
sxX=function(Z){return(Z?.messageRenderers||[]).find(k=>!!k.timeCounterRenderer)?.timeCounterRenderer||null};
AkU=function(Z){var k=Math,N=k.round;const a=Math.min((0,g.z)()-Z.D,Z.U);k=N.call(k,(Z.U-a)/1E3);Z.updateValue("duration",oh({seconds:k}));k<=0&&Z.V?Z.stopTimer():Z.V&&Z.V.start()};
PZ0=function(Z,k){Z.V||(Z.U=k,Z.D=(0,g.z)(),Z.V=new g.o3(()=>{AkU(Z)},null),AkU(Z))};
HNy=function(Z,k){let N=0;for(N=0;N<k.length;N++){let a=Z.V[N],T=a?.element;T||(T=new g.E({J:"button",Z:"ytp-gated-actions-overlay-button",W:{tabindex:"0"},A:[{J:"div",Z:"ytp-gated-actions-overlay-button-title",Da:"{{buttonText}}"}]}),g.u(Z,T),T.HD(Z.U),a={element:T});const K=g.J(k[N],ckf);T.update({buttonText:K?.title||K?.titleFormatted?.content||""});a.listener&&T.Ce(a.listener);a.listener=T.listen("click",()=>{const y=g.J(K?.onTap,uA);y&&g.A7(Z.api,"innertubeCommand",y)});
Z.V[N]=a}for(;N<Z.V.length;)Z.V.pop().element.dispose()};
Kn=function(Z,k,N,a){function T(y){const Q=!(y.status!==204&&y.status!==200&&!y.response);y={succ:`${+Q}`,rc:y.status,lb:y.response?.byteLength||0,rt:((0,g.z)()-K).toFixed(),shost:g.kX(Z),trigger:k};dtj(y,Z);N&&N(y);a&&!Q&&a(new g.yA("pathprobe.net",y))}
const K=(0,g.z)();g.SD(Z,{format:"RAW",responseType:"arraybuffer",timeout:1E4,onFinish:T,onTimeout:T})};
dtj=function(Z,k){window.performance?.getEntriesByName&&(k=performance.getEntriesByName(k))&&k.length&&(k=k[0],Z.pedns=(k.domainLookupEnd-k.startTime).toFixed(),Z.pecon=(k.connectEnd-k.domainLookupEnd).toFixed(),Z.perqs=(k.requestStart-k.connectEnd).toFixed())};
QK=function(Z){return yK(Z.SY,!Z.policy.J$,Z.policy.fh)};
XtN=function(Z,k){const N=Math.min(2.5,qs(Z.SY));Z=QK(Z);return k-N*Z};
LzR=function(Z,k,N){return Math.ceil(Math.max(Math.max(Z.policy.nm,Z.policy.A6*N),Math.min(Math.min(Z.policy.Rq,31*N),Math.ceil(k*N))))||Z.policy.nm};
rk=function(Z,k,N,a,T=!1){if(Z.policy.It)return Math.ceil(Z.policy.It*k);Z.policy.d9&&(a=Math.abs(a));a/=Z.playbackRate;let K;K=1/yK(Z.SY);N=Math.max(.9*(a-3),qs(Z.SY)+Z.SY.U.V*K)/K*.8/(k+N);N=Math.min(N,a);Z.policy.lk>0&&T&&(N=Math.max(N,Z.policy.lk));return LzR(Z,N,k)};
Cn=function(Z){return QK(Z)/Z.playbackRate};
mu=function(Z,k,N){const a=Z.policy.playbackStartPolicy.resumeMinReadaheadPolicy||[],T=Z.policy.playbackStartPolicy.startMinReadaheadPolicy||[];Z=Infinity;k=k&&a.length>0?a:T;for(const K of k)k=K.minReadaheadMs||0,N<(K.minBandwidthBytesPerSec||0)||Z>k&&(Z=k);return Z<Infinity?Z/1E3:Z};
tyb=function(Z,k,N,a,T){if(!a.info.D)return N.length===0?N.push(a):(Z=N.pop()?.G(a))?N.push(Z):N.push(a),T;(N=N.pop()?.G(a))||(N=a);if(N.info.V)return Z.logger&&Z.logger({incompleteSegment:N.info.E3()}),T;const {formatId:K,Cp:y,startTimeMs:Q,clipId:q,fq:r}=Z.pY(N);a={clipId:q,formatId:K,startTimeMs:Q,durationMs:r,Uq:y,e9:y};T=VyN(k,a.startTimeMs);N=T>=0?k[T]:null;var C;if(C=N){C=a;var m=T,A=N.startTimeMs+N.durationMs,P=C.startTimeMs+C.durationMs;if(C.startTimeMs-A>Z.V)C=!1;else if(FzX(Z,N.formatId,
C.formatId))N.durationMs=Math.max(A,P)-N.startTimeMs,N.e9=Math.max(N.e9,C.e9),C=!0;else if(Math.abs(N.startTimeMs-C.startTimeMs)<=Z.V)if(N.durationMs>C.durationMs+Z.V){m=N.formatId;var d=N.Uq,h=N.e9;N.formatId=C.formatId;N.durationMs=C.durationMs;N.Uq=C.Uq;N.e9=C.e9;C.formatId=m;C.startTimeMs=P;C.durationMs=A-P;C.Uq=d;C.e9=h;C=!1}else N.formatId=C.formatId,C=!0;else A>C.startTimeMs&&(A>P&&(k.splice(m+1,0,{formatId:N.formatId,startTimeMs:P,durationMs:A-P,Uq:C.e9+1,e9:N.e9}),Z.logger&&Z.logger({splitOldStart:N.startTimeMs?.toFixed(3),
splitOldEnd:A?.toFixed(3),splitNewStart:C.startTimeMs?.toFixed(3),splitNewEnd:P?.toFixed(3)})),N.durationMs=C.startTimeMs-N.startTimeMs,N.e9=C.Uq-1),C=!1}C?a=N:(T+=1,k.splice(T,0,a));N=0;for(C=T+1;C<k.length;C++){A=Z;P=k[C];m=a;d=P.startTimeMs+P.durationMs;h=m.startTimeMs+m.durationMs;h>=d+A.V?A=!0:h+A.V<P.startTimeMs?A=!1:FzX(A,P.formatId,m.formatId)?(m.durationMs=d-m.startTimeMs,m.e9=P.e9,A=!0):(P.startTimeMs=h,P.Uq=m.e9+1,A=!1);if(!A)break;N++}N&&k.splice(T+1,N);return T};
VyN=function(Z,k){Z=g.F_(Z,{startTimeMs:k},(N,a)=>N.startTimeMs-a.startTimeMs);
return Z>=0?Z:-Z-2};
h_f=function(Z,k,N){if(Z.logger){var a=[];for(let T=0;T<k.length;T++){const K=k[T];K.SQ?.startTicks&&a.push(`i.${K.formatId?.itag}_st.${K.startTimeMs}_psst.${K.SQ?.startTicks}_psd.${K.SQ?.Sf}`);a.push(`i.${K.formatId?.itag}_st.${K.startTimeMs}_e.${K.startTimeMs+K.durationMs}_d.${K.durationMs}_sn.${K.Uq}_en.${K.e9}`)}Z.logger({p:`${N}`,br:a.join(";")})}};
uPX=function(Z,k){if(Z.w5){var N=Z.w5.Us();if(N.length!==0){if(Z.D&&k){var a=Z.D,T=a.info.Y;!b1(N,T)&&a.info.C>0&&(0,g.z)()-Z.C<5E3&&(Z.logger&&Z.logger({dend:a.info.E3()}),N=WsG(N,T,T+.01))}Z.policy.Hy&&Z.logger&&Z.logger({cbri:`${Z.U}`});a=[];for(var K=T=0;T<N.length&&K<Z.jI.length;){var y=N.start(T);let m=N.end(T);var Q=Z.jI[K].startTimeMs/1E3;const A=(Z.jI[K].startTimeMs+Z.jI[K].durationMs)/1E3;if(Q<=m&&A>=y){const P={...Z.jI[K]};var q=Z.cD.Y.get(Fm(Z.jI[K].formatId)),r=Math.max(Q,y);y=q.index.pn(r+
Z.V/1E3);Q=q.index.getStartTime(y);var C=y+ +(Math.abs(Q-r)>Z.V/1E3);r=C+Z.Y;C=q.index.getStartTime(C)*1E3;K!==Z.U||k?(P.Uq=r,P.startTimeMs=C):(Z.logger&&Z.logger({pEvict:"1",og:P.startTimeMs,adj:Q*1E3}),P.Uq=y+Z.Y,P.startTimeMs=Q*1E3);y=Z.D?.info.duration||11;K===Z.U&&m<A&&A-m<=y*1.01&&(m=A);y=Math.min(A,m);Q=q.index.pn(y-Z.V/1E3);r=q.index.rf(Q);Q-=+(Math.abs(r-y)>Z.V/1E3);y=Q+Z.Y;q=q.index.rf(Q)*1E3;P.e9=y;P.durationMs=q-P.startTimeMs;P.Uq<=P.e9&&a.push(P)}A<m?K+=1:T+=1}Z.jI=a}}};
lGr=function(Z){const k=[],N=[...Z.GX];Z.jI.forEach(K=>{k.push({...K})});
const a=Z.FS.m9();let T=Z.U;for(const K of a)T=tyb(Z,k,N,K,T);k.forEach(K=>{K.startTimeMs&&(K.startTimeMs+=Z.timestampOffset*1E3)});
return{jI:k,GX:N}};
FzX=function(Z,k,N){return k.itag!==N.itag||k.xtags!==N.xtags?!1:Z.cD.Rn||k.lmt===N.lmt};
Dty=function(Z,k,N,a,T){if(!k.l3.V()){if(!(T=N===0||!!k.U.length&&k.U[0]instanceof s2))a:{if(k.U.length&&(T=k.U[0],T instanceof AA&&T.hQ&&T.aU)){T=!0;break a}T=!1}T||Z.policy.V||Pn(k);return N}const K=cn(k,N);if(!isNaN(K))return K;if(Z.loader.XC(N*1E3))return N;T.P8?Z.policy.bL&&(Z=Hn(Z.loader,k),fGG(k.D,N+Z,!0)):(k.NA(),Z.loader.mM(!1,`sta_${+k.l3.info.H9()}`));return a&&(Z=pf(a.Us(),N),!isNaN(Z))?(dk(k,Z+B7f,T),N):dk(k,N,T)};
ONN=function(Z,k,N){if(!Z.policy.G){Z=k.l3.index;var a=k.V.Cp;Z.Of(a)||N&&N.Cp===a?(k.Y=!Z.Of(a),k.O=!Z.Of(a)):(k.Y=!0,k.O=!0)}};
iNf=function(Z){const k=Math.max(Z.videoTrack.D.D||0,Z.audioTrack.D.D||0);v7N(Z.videoTrack);v7N(Z.audioTrack);Z.policy.G||hKX(Z.cD);Z.cD.isManifestless&&!Z.policy.G&&(Z.V=!0,Z.U=0);var N=Z.loader;if(!N.policy.Vz||N.policy.s6)N.currentTime=k;Z.Y=!0;Z.D=new x2;return Z.D};
VK=function(Z){var k=Z.videoTrack.L!==-1,N=Z.audioTrack.L!==-1;if(!k||!N)if(k=!k&&X6(Z.videoTrack),N=!N&&X6(Z.audioTrack),k||N)if(N=k?Z.videoTrack:Z.audioTrack,k=k?Z.audioTrack:Z.videoTrack,N.L=X6(N).info.Cp,Z.policy.G&&(k.L=X6(k)?.info.zt()||k.L),k.L!==-1){let a=Math.max(k.l3.index.getStartTime(k.L),N.l3.index.getStartTime(N.L));X3(Z.cD)&&Math.abs(a-X3(Z.cD))>432E3&&lwy(Z.cD);Z.U&&(a=Z.U,Z.U=0);g.Sq(()=>{Z.policy.G||Ln(Z,a,102)});
Z.loader.U6("initManifestlessSync",{st:a,ost:a+Z.loader.mx(),a:Z.audioTrack.L,v:Z.videoTrack.L});Z.D&&(Z.D.resolve(a+.1),Z.D=null);Z.policy.G&&Ln(Z,a,102)}};
g7f=function(Z,k,N){if(!Z.isSeeking())return-1;N=(N?Z.videoTrack:Z.audioTrack).l3.index;const a=N.pn(Z.targetTime);return(N.Of(Z.cD.Y8)||k.Cp===Z.cD.Y8)&&a<Z.cD.Y8?Z.cD.Vt():-1};
Ln=function(Z,k,N){Z.V&&Z.videoTrack.L!==-1&&Z.audioTrack.L!==-1&&(Z.V=!1,Z.targetTime=k,F6(Z.loader,k+.1,{SC:!0,b0:"chunkSelectorSynchronize",Sh:!0,seekSource:N}))};
wtf=function(Z,k,N,a){if(Z.policy.G)!a||!Z.V&&Z.policy.Tt||g.Sq(()=>{VK(Z)});
else{if(Z.isSeeking()&&Z.targetTime){const K=g7f(Z,k,N);if(K!==-1){Z.videoTrack.Y=!1;Z.audioTrack.Y=!1;Z.V=!0;Z.U=0;g.Sq(()=>{Z.loader.U6("seekreason",{reason:"behindMinSq",tgt:K});Ln(Z,K)});
return}}N?Z.videoTrack.O=!1:Z.audioTrack.O=!1;var T=!Z.V;cn(Z.videoTrack,Z.targetTime)>=0&&cn(Z.audioTrack,Z.targetTime)>=0&&T?((Z.videoTrack.Y||Z.audioTrack.Y)&&Z.loader.U6("iterativeSeeking",{status:"done",count:Z.seekCount}),Z.videoTrack.Y=!1,Z.audioTrack.Y=!1):a&&g.Sq(()=>{if(Z.V||!Z.policy.Tt)VK(Z);else{var K=k.startTime,y=k.duration;if(!Z.policy.G){var Q=Z.videoTrack.L!==-1&&Z.audioTrack.L!==-1,q=!Z.videoTrack.O&&!Z.audioTrack.O;(N?Z.videoTrack.Y:Z.audioTrack.Y)&&Q&&q&&(Z.targetTime>=K&&Z.targetTime<
K+y+.1?((N?Z.videoTrack:Z.audioTrack).Y=!1,Z.videoTrack.Y||Z.audioTrack.Y||(Z.loader.U6("iterativeSeeking",{status:"done",target:K,originalTime:K+Z.loader.mx(),count:Z.seekCount}),Z.seekCount=0)):Z.seekCount<8?(Z.seekCount++,Z.loader.U6("iterativeSeeking",{status:"inprogress",count:Z.seekCount,target:Z.targetTime,actual:K,duration:y,isVideo:N}),Z.seek(Z.targetTime,{})):(Z.loader.U6("iterativeSeeking",{status:"incomplete",count:Z.seekCount,target:Z.targetTime,actual:K}),Z.seekCount=0,Z.videoTrack.Y=
!1,Z.audioTrack.Y=!1,F6(Z.loader,K+.1,{SC:!0,b0:"chunkSelectorSynchronizeMedia",Sh:!0})))}}})}};
tA=function(Z,k,N){$tU(Z.SY,k);Z.tq&&(Z.tq.add(Math.ceil(k)-Math.ceil(Z.j)),Z.tq.add(Math.max(0,Math.ceil(N/1024)-Math.ceil(Z.Y/1024))));const a=k-Z.j,T=N-Z.Y;Z.rD=T;Z.pF=Math.max(Z.pF,T/(a+.01)*1E3);Z.j=k;Z.Y=N;Z.Rq&&N>Z.Rq&&xtU(Z)};
xtU=function(Z){Z.MX=Math.max(Z.MX,Z.Y-Z.gQ);Z.vD=Math.max(Z.vD,Z.j-Z.gD);Z.Rq=0};
GZf=function(Z,k){Z.url=k;window.performance&&!performance.onresourcetimingbufferfull&&(performance.onresourcetimingbufferfull=()=>{performance.clearResourceTimings()})};
S0r=function(Z){Z.Sm=Z.V+Z.snapshot.delay*1E3;Z.bq=!1};
u9=function(Z,k,N){if(!Z.fZ){k=Math.max(k,.01);var a=Z.Zo?Math.max(k,N/Z.Zo):k,T=Z.SY.U.D;T&&(a=k,Z.Zo&&(a=Math.max(k,N/Z.Zo*T)));hA(Z.SY,k,N,a)}};
e_r=function(Z){const k=Z.Kp||Z.Qz;return k?Z.snapshot.delay+Math.min(Z.L3,(Z.O-Z.zt)/1E3)+k:Z.e8};
o70=function(Z){return(Z.C-Z.V)/1E3};
l9=function(Z,k){if(Z.PZ&&Z.Cp!==void 0&&Z.oJ!==void 0){var N=Math,a=N.min,T=Z.G;var K=Z.PZ;var y=Z.V;if(Jky(K,Z.Cp))K=k;else{var Q=0;K.qK&&(Q=.2);K=y+(K.L3+Q)*1E3}Z.G=a.call(N,T,K);N=Math;a=N.min;T=Z.Vz;K=Z.PZ;y=Z.V;Q=z_i(K,Z.Cp,Z.oJ);Q!==2&&(k=Q?k:y+K.L3*1E3,K.qK&&(k+=K.L3*1E3));Z.Vz=a.call(N,T,k);Z.G<=Z.V?S0r(Z):(Z.Sm=Z.G,Z.bq=!0)}};
UtU=function(Z,k){if(k+1<=Z.totalLength){var N=cY(Z,k);N=N<128?1:N<192?2:N<224?3:N<240?4:5}else N=0;if(N<1||!(k+N<=Z.totalLength))return[-1,k];if(N===1)Z=cY(Z,k++);else if(N===2)N=cY(Z,k++),Z=cY(Z,k++),Z=(N&63)+64*Z;else if(N===3){N=cY(Z,k++);var a=cY(Z,k++);Z=cY(Z,k++);Z=(N&31)+32*(a+256*Z)}else if(N===4){N=cY(Z,k++);a=cY(Z,k++);const T=cY(Z,k++);Z=cY(Z,k++);Z=(N&15)+16*(a+256*(T+256*Z))}else N=k+1,Z.focus(N),sB(Z,N,4)?Z=oEy(Z).getUint32(N-Z.D,!0):(a=cY(Z,N+2)+256*cY(Z,N+3),Z=cY(Z,N)+256*(cY(Z,N+
1)+256*a)),k+=5;return[Z,k]};
bNN=function(Z){return g.Wy(Z.info.Vi,k=>k.type===3)};
oof=async function(Z,k){return k?(new qZ(Z.U)).encrypt(k,Z.V):k};
UQ=function(Z,k,N,a){var T=k^Z;if((Z&92)==Z){for(var K=T^8587,y=[];++K-y[c[3]]-(T^8683);){switch(K){case T^8689:K-=T^8645;case T^8592:case T^8599:case T^8598:continue;case T^8624:K=T^8676;case T^8597:case T^8596:case T^8619:continue;case T^8677:K=T^8596}y[c[T^8662]](String[c[T^8667]](K))}var Q=y}if(Z+8>>3==2){try{(N[T^282]<=-4||(((0,N[T^336])(((0,N[T^270])(N[T^283],N[T^285]),N[T^346])(N[T^284],N[T^279]),N[T^267],N[T^313],N[T^284],(0,N[T^305])()),(0,N[T^270])(N[T^260],N[T^291]),N[T^267])(N[T^313],
N[T^283],(0,N[T^314])()),0))&&(((0,N[T^270])(N[T^297],N[T^325]),N[T^343])((0,N[T^270])(N[T^310],N[T^264]),N[T^286],(0,N[T^299])(N[T^261],N[T^280]),N[T^307]),N[T^325])(N[T^281],N[T^290]),N[T^325]===-1?(0,N[T^287])(N[T^316],N[T^271],(0,N[T^309])()):(0,N[T^268])(N[T^262])}catch(q){((0,N[T^285])(N[T^306]),N[T^287])(N[1],N[T^262],(0,N[0])())}finally{N[T^340]>=5&&((0,N[T^286])(N[T^271],N[T^280])%(0,N[T^285])(N[T^271]),(0,N[T^294])(N[T^271],N[T^319]),1)||(0,N[T^297])((0,N[T^284])(N[T^343],N[T^260]),N[new Date(c[T^
263])/(T^760)],(0,N[T^294])(N[T^306],N[2]),N[T^301],N[T^319])}try{N[T^269]===5&&((0,N[1])(N[T^316]),c[T^327])||(0,N[T^314])(N[T^263],N[T^303])}catch(q){(0,N[T^319])(N[T^336],N[T^351])}finally{K=NM(T^257,T^5370,N,Date)}try{(N[T^298]>=(T^280)||((0,N[T^284])(N[T^321],N[T^304]),0))&&(0,N[T^294])(N[T^311],N[T^344])}catch(q){(0,N[T^291])(N[T^262],N[T^316],(0,N[T^269])())}try{K=Eb(2,T^6844,N)}catch(q){N[T^264]!==-3&&(0,N[1])((0,N[T^291])(N[T^337],N[T^308],(0,N[T^305])())<<(((0,N[T^342])(N[T^336],N[T^311]),
N[T^284])(N[T^307],N[T^322]),N[T^323])(N[4],N[T^311]),N[T^342],(0,N[T^323])(N[T^256],N[T^270]),N[T^351],N[T^302]),N[T^267]>-3&&(N[T^290]!=-1||((0,N[T^279])(N[T^315]),0))&&(0,N[3])(N[T^301],N[T^318])}finally{(N[T^261]<=-4||(((0,N[T^292])(N[T^315]),N[6])(N[T^315],N[T^269]),0))&&((0,N[T^279])(N[T^341]),N[6])(N[T^342],N[T^349])}Q=[]}(Z^84)&11||(K=N[c[T^1338]](c[T^1322],T^1299),y=N[c[T^1338]](c[T^1322],K+1),K>0&&y>0?(a[c[T^1302]]=N[c[T^1289]](0,y),N=N[c[T^1289]](y+1)):(a[c[T^1302]]=N,N=c[T^1300]),Q=[N]);
if((Z+7&15)==4){K=T^5688;for(y=[];++K-y[c[3]]-(T^5720);){switch(K){case T^5698:K-=T^5750;case T^5667:case T^5668:case T^5669:continue;case T^5635:K=T^5719;case T^5670:case T^5671:case T^5656:continue;case T^5718:K=T^5671}y[c[T^5733]](String[c[T^5736]](K))}Q=y}Z-6<<2<Z&&(Z+5^28)>=Z&&(Zj(T^1981,T^6117,N),Q=g.vB(N[c[6]],bKy));return Q};
bOy=async function(Z,k){return k?await (new qZ(Z.U)).decrypt(k,Z.V):k};
ptb=function(Z){Z.D.read().then(Z.j,Z.onError).then(void 0,Xf)};
fn=function(Z,k,N,a,T){if(cq(7,5764,Z.W0))return new R_U(Z,N);Z=Z.mH();return a?z90()?new Myf(Z,k,N,T):new n7G(Z,k,N,T):new IGr(Z,N,T)};
Bn=function(Z,k,N){Z.V&&(Cv(Z.V,k),k=Z.V,Z.V=null);let a=0,T=0;for(const q of Z.Vi){if(q.range&&a+q.U<=Z.U){a+=q.U;continue}if(DT(q)&&!N&&Z.U+k.totalLength-T<a+q.U){({ma:Z.V}=k.split(T));break}a:{var K=Z;var y=q,Q=Z.U-a;let r=k.totalLength-T;y.range&&(r=Math.min(y.U-Q,r));y=AYf(y,y.V+Q,r,y.range?y.V+Q+r===y.range.length:!!N);Q=m4(k,T,r);y=new nG(y,Q);if(K.policy.useUmp&&K.K8.length&&(Q=K.K8[K.K8.length-1].G(y))){K.K8[K.K8.length-1]=Q;K=r;break a}K.K8.push(y);K=r}Z.U+=K;T+=K;a+=q.U;if(T===k.totalLength)break}};
DQ=function(Z){return sM(Z.Y,bY(78,6480,Z.uX.W0))};
jxG=function(Z){Z.EH.Vz=(0,g.z)();Z=DQ(Z);Z.D=(0,g.z)();Z.started+=1};
E7y=function(Z,k,N,a){Z.timing.jY((0,g.z)(),k,N);k=Z.EH;k.U=0;k.L=0;k.C=0;A$(DQ(Z));a&&(a=DQ(Z),a.U+=1);Z.Ll?.Vz(Z.uX.W0)};
O2=function(Z){if(Z.lastError==="ump.spsrejectfailure")Z.timing.xW||aRG(Z.EH,!1,Z.uX,Z.policy,Z.Y);else{if(Z.lastError==="net.timeout")Z.timing.O6((0,g.z)());else{var k=Z.timing;tA(k,(0,g.z)(),k.Y)}if(Z.lastError==="net.nocontent")++Z.EH.C;else{if((k=Z.lastError==="net.timeout"||Z.lastError==="net.connect"||Z.lastError==="net.closed")&&!cq(19,5776,Z.uX.W0)){var N=DQ(Z);N.timedOut+=1}else N=DQ(Z),N.V+=1;Z.timing.xW||aRG(Z.EH,k,Z.uX,Z.policy,Z.Y)}}Z.u3.Qn(5)};
vn=function(Z,k,N,a=!1,T=!1){return k>=400?(Z.lastError="net.badstatus",!0):T?(Z.lastError="ump.spsrejectfailure",!0):N||a?!1:(Z.lastError=k===204?"net.nocontent":"net.connect",!0)};
i9=function(Z,k){if(Z.policy.yH)return!1;const N=k.getResponseHeader("content-type"),a=k.Tl();Z=!a||a<=Z.policy.VC;return(!k.N8()||!N||N.indexOf("text/plain")!==-1)&&Z};
Wzf=function(Z,k){let N="";k=k.Kz();k.totalLength<=Z.policy.VC&&(Z=A8(k),Z=dj(Z),N=Ii(Z)?Z:"");return N};
Y0N=function(Z){const k=Z.timing.N();k.shost=bY(38,6456,Z.uX.W0);Z.policy.LC&&Z.policy.o8&&(k.csrc=1);return k};
ZqG=function(Z,k){return Z?.maxWidth>k?.maxWidth||Z?.maxHeight>k?.maxHeight};
kkr=function(Z,k){for(const N of k.keys()){const a=k.get(N);if(a.length===0)continue;g.hc(a,(y,Q)=>Q.maxFramerate-y.maxFramerate);
const T=[a[0]];let K=0;for(let y=1;y<a.length;y++)ZqG(a[y],T[K])&&(T.push(a[y]),K++);Z=Z.concat(T)}return Z};
aNy=function(Z,k){const N=[];for(const a of k)k=NEX[a]||0,Z.V&&k>Z.V||N.push(a);return N};
gk=function(Z,k,N){let a=TEb[Z]||[];N.B("html5_shorts_onesie_mismatched_fix")&&(a=Kvf[Z]||[]);k.push(...a);N.B("html5_early_media_for_drm")&&k.push(...(yfi[Z]||[]))};
spN=function(Z,k){const N=g.$z(Z);var a=Z.X();const T=a.L;a=a.B("html5_shorts_onesie_mismatched_fix");const K=Z.rQ();if(a){if(!T.V){if(K&&wk)return wk;if($c)return $c}}else if($c&&!T.V)return $c;const y=[],Q=[],q={};var r=xc.concat(QpN);a&&(r=xc.concat(qOR));Z.B("html5_early_media_for_drm")&&(r=r.concat(rff),Z.B("allow_vp9_1080p_mq_enc")&&r.push(Cbi));const C=[...m8i];Z.B("html5_iamf_audio_onesie_fmt")&&C.push(["773"]);for(var m of r){r=!1;for(const P of m){var A=eb(P,K&&a);if(!A||!A.video)continue;
if(A.V()&&!N.dA&&A.video.qualityOrdinal>N.Eq)continue;const d=g.Q5(Z.X().experiments,"html5_drm_byterate_soft_cap");if(d>0&&IsX(A)&&A.UH>d)continue;if(r){y.push(P);gk(P,y,Z);continue}A=uq(N,A,T);A===!0?(r=!0,y.push(P),gk(P,y,Z)):q[P]=A}}for(const P of C)for(const d of P){m=DUy(d);if(!m||!m.audio||!Z.B("html5_onesie_51_audio")&&m.G())continue;m=uq(N,m,T);if(m===!0){Q.push(d);gk(d,Q,Z);break}else q[d]=m}if(!Z.B("html5_enable_audio_quality_setting")){Z=["141","774"];for(const P of Z)Q.includes(P)&&(g.qF(Q,
P),q[P]="blkhqa")}N.V&&k("orfmts",q);if(a)return T.V&&(T.V=!1,wk=$c=void 0),K?wk={video:y,audio:Q}:$c={video:y,audio:Q};$c={video:y,audio:Q};T.V=!1;return $c};
g.cfy=function(Z,k,N){const a=N.L,T=[],K=[];var y=N.B("html5_shorts_onesie_mismatched_fix");Z=Z.rQ();var Q=xc.concat(QpN);y&&(Q=xc.concat(qOR));N.B("html5_early_media_for_drm")&&(Q=Q.concat(rff),N.B("allow_vp9_1080p_mq_enc")&&Q.push(Cbi));const q=[...m8i];N.B("html5_iamf_audio_onesie_fmt")&&q.push(["773"]);for(const r of Q)for(const C of r){Q=eb(C,Z&&y);if(!Q||!Q.video)continue;const m=g.Q5(N.experiments,"html5_drm_byterate_soft_cap");if(!(m>0&&IsX(Q)&&Q.UH>m)&&uq(k,Q,a)===!0){T.push({videoCodec:AfG[CD[C]],
maxWidth:Q.video.width,maxHeight:Q.video.height,maxFramerate:Q.video.fps});break}}for(const r of q)for(const C of r)if((y=DUy(C))&&y.audio&&(N.B("html5_onesie_51_audio")||!y.G())&&uq(k,y,a)===!0){K.push({audioCodec:PbN[CD[C]],numChannels:y.audio.numChannels});break}return{videoFormatCapabilities:T,audioFormatCapabilities:K}};
LvU=function(Z){const k={};var N=Z.fp;const a=Z.Jq,T=Z.SY,K=N.getVideoData();var y=T8(0);var Q=N.getVisibilityState();a.B("html5_enable_audio_quality_setting")&&(k.Gy=a.Gy);y&&(k.yc=y,k.lastManualDirection=R9i(),y=WbU()||0,y>0&&(y=(a.B("html5_use_date_now_for_local_storage")?Date.now():(0,g.z)())-y,a.B("html5_use_date_now_for_local_storage")?y>0&&(k.timeSinceLastManualFormatSelectionMs=y):k.timeSinceLastManualFormatSelectionMs=y));if(T.Vz||a.B("html5_sabr_ugc_vod_web_embedded_client_default_bandwidth_on_iphone")&&
VL)y=a.B("html5_disable_bandwidth_cofactors_for_sabr_live")?!!Z.BG?.J$:!1,k.dw=yK(T,!y);var q=g.ff.medium,r=Math.floor(q*16/9);(y=K.rQ())||(K.V&&K.D&&K.D.videoInfos.length!==0?(y=K.D.videoInfos[0],y=!!y.video&&y.video.width<y.video.height):y=!1);var C=y;y=C?q:r;r=C?r:q;C=N.M_();q=C.width;C=C.height;k.b2=Math.max(q,y);k.u2=Math.max(C,r);a.B("html5_enable_client_viewport_size_logging")&&a.Xa()&&(y=N.JX(),N.U6("cvw",{w:q,h:C,cvw:k.b2,cvh:k.u2,cvu:y.V}));k.visibility=Q;k.ej=Qb();k.Um=N.lA()*1E3;Q=Z.fp.R3();
k.q3={defaultPolicy:Q?.yY?.V||0,smooth:Q?.Du?.V||0,visibility:Q?.JC?.V||0,l4:Q?.oo?.V||0,performance:Q?.xB?.V||0,speed:Q?.Ly?.V||0};k.Xn=Q?.vW?.V||0;Z.jC&&K.iq&&K.B("html5_allow_multiview_tile_preload")&&(k.Xn=g.ff.small);if(Z.jC||Z.Fz&&!Z.rg)Q=Number(a.Yl().V.Aq(Hq0))||0,Q>0&&(k.Xn===0||k.Xn>Q)&&(k.Xn=Q,N.U6("lsl",{q:Q}));Q=(a.B("html5_fix_drm_license_constraint_for_tv_and_onesie")?Z.jC:K.fetchType==="onesie")||K.Al?[{trackType:1,isHdr:!1},{trackType:2,isHdr:!1},{trackType:2,isHdr:!0},{trackType:3,
isHdr:!1},{trackType:3,isHdr:!0},{trackType:4,isHdr:!1},{trackType:4,isHdr:!0},{trackType:5,isHdr:!1},{trackType:5,isHdr:!0}]:[{trackType:1,isHdr:!1},{trackType:2,isHdr:!1},{trackType:2,isHdr:!0}];k.VL=Z.authorizedFormats&&Z.authorizedFormats.length>0?{authorizedFormats:Z.authorizedFormats}:{authorizedFormats:Q};Z.sabrLicenseConstraint&&(k.VL.sabrLicenseConstraint=Z.sabrLicenseConstraint);if(a.B("html5_onesie_media_capabilities")||be(K))k.KS=3;a.B("html5_onesie_audio_only_playback")&&ie(K)&&(k.KS=
1);Z.BG?.ov&&Z.aY&&(k.KS=k.KS===void 0?7:k.KS|4);Q=K.s6?K.s6:g.$z(K);a.B("html5_onesie_media_capabilities")&&(k.mediaCapabilities=g.cfy(K,Q,a));if(Z.BG?.tq()){r=Z.Ko;C=Z.iC;var m=Z.BG?.UH;y=[];q=[];const B=new Map;var A=K.ix.V;for(var P of A.values())if(P.H9)q.push({audioCodec:PbN[P.gA],numChannels:P.numChannels,spatialCapabilityBitmask:d8y[P.gA]});else{A=AfG[P.gA];var d=P.maxBitrateBps||0,h=m?m*8:0;d={videoCodec:A,maxWidth:C?854:P.maxWidth||0,maxHeight:C?480:P.maxHeight||0,maxFramerate:P.maxFramerate||
0,is10BitSupported:P.Q6||!1,maxBitrateBps:h&&d?Math.min(h,d):h||d,efficient:!0};A=`${A}_${P.Q6}`;h=B.get(A)||[];h.push(d);B.set(A,h)}y=kkr(y,B);P=r?[...r]:[];K.B("html5_ssff_denylist_opus_low")&&P.push(249,350);g.$z(K);k.mediaCapabilities={videoFormatCapabilities:y,audioFormatCapabilities:q,hdrModeBitmask:3,perPlaybackAttributes:P.length?{itagDenylist:P}:{}}}Z.BG?.V&&(k.Gh=Q.Gh,k.Eq=Z.BG?.Eq);a.hI&&(k.gw=a.hI);k.s0=Z.qM;k.q$=Z.q$;k.gK=Z.gK;k.HV=Z.HV;Z.Mt&&(k.yB=(0,g.z)()-Z.Mt);Z.Km&&(k.Km=Z.Km);s1||
(k.H2=!0);P=qs(T)*1E3;P>0&&(k.il=P);Z.BG?.XW&&Z.Xz&&Z.Xz<Infinity&&(k.Xz=Z.Xz);N=N.getPlaybackRate();N!==1&&(k.playbackRate=N);Z.BG?.iq&&Z.Xs&&(k.jb=Z.jb,k.cN=Z.cN,k.Xs=Z.Xs);Ks()===1&&(k.kD=1);a.B("html5_sabr_force_proxima")&&(k.gX=1);N=g.Q5(a.experiments,"html5_sabr_force_max_network_interruption_duration_ms");k.zH=N>0?N:T.interruptions[0]||0;Z.BG?.pF&&(k.Mw=Z.Mw);a.Kp&&(k.audioTrackId=a.Kp);K.Jd()&&!k.audioTrackId&&(a.B("html5_fill_default_mosaic_audio_track_id")||(Z=Fkf(K),k.audioTrackId=Z),K?.U6("misstrkchg",
{"default":k.audioTrackId}));if(Z=navigator.connection?.type||"")k.detailedNetworkType=XUG[Z]||XUG.other;!a.B("html5_enable_voice_boost")||K.rQ()||K.isAd()||(k.jg=a.J0);return k};
G0=function(Z,k,N,a,T,K,y){const Q={};k&&(Q.Kh=k);if(!Z)return Q;Q.playbackCookie=N?.playbackCookie;T&&(Q.w2=T);Q.fu=[];Q.BN=[];if(y?.size)for(const q of y.values())Q.BN.push(q);if(Z.sabrContextUpdates.size>0)for(const q of Z.sabrContextUpdates.values())VS0(Q,q,a);nQ(Z)&&K&&VS0(Q,K,a);k=Z.X().V;Q.clientInfo={clientName:Fvf[k.c.toUpperCase()]||0};k.cbrand&&(Q.clientInfo.deviceMake=k.cbrand);k.cmodel&&(Q.clientInfo.deviceModel=k.cmodel);k.cver&&(Q.clientInfo.clientVersion=k.cver);k.cos&&(Q.clientInfo.osName=
k.cos);k.cosver&&(Q.clientInfo.osVersion=k.cosver);k=Z.X();k.B("html5_sabr_enable_server_xtag_selection")&&k.ov&&(Q.clientInfo.hl=k.ov);Z.by&&(Q.by=Z.by);return Q};
VS0=function(Z,k,N){const a=k.type||0;N?.has(a)?Z.BN.push(k):Z.fu.push(a)};
tSb=function(Z){if(!(xF(Z.info)&&Z.info.rR()&&Z.policy.gQ&&Z.uY)||Z.info.EH.U>=2||T8()>0||!Edy())return!1;var k=Z.uX.get("aitags");if(!k)return!1;k=y2(k).split(",");const N=[];for(const a of Z.uY)g.KK(k,a)&&N.push(a);if(!N.length)return!1;Z.uX.set("altitags",g.Kg(N.join(",")));return!0};
hPf=function(Z,k,N=!1){g.b(k);Z.BI.lastError="player.exception";Z.errorMessage=`${k.name}_${k.message}`;N?g.Sq(()=>{O2(Z.BI)}):O2(Z.BI)};
uey=function(Z){Z.G3&&(Z.xhr.status=Z.G3,Z.B9=Z.G3)};
lNf=function(Z,k){Z.timing.xW=!0;Z.xhr.N8()&&Z.timing.dA();Z.policy.bq&&Z.dF?.stop();Bn(Z.zF,k,!1)};
fNb=function(Z,k,N){let a=Z.Zo?Math.max(k,N/Z.Zo):k;const T=Z.SY.U.D;T&&(a=k,Z.Zo&&(a=Math.max(k,N/Z.Zo*T)));hA(Z.SY,k,N,a)};
BEf=function(Z,k,N,a,T,K){Z.Vz&&(Z.Vz.add(Math.round(k)),Z.Vz.add(Math.round(N)),Z.Vz.add(Math.round(a)),Z.Vz.add(Math.round(T)),Z.Vz.add(Math.round(K)),Z.Vz.add(Math.round(Z.bq)))};
D8b=function(Z,k,N){switch(k){case 68:Z.xj(N);break;case 35:Z.Zp(N);break;case 44:Z.GL(N);break;case 43:Z.gt(N);break;case 53:Z.qI(N);break;case 56:Z.Se();break;case 57:Z.yJ(N);break;case 42:Z.bG(N);break;case 45:Z.Mm(N);break;case 59:Z.FV(N);break;case 51:Z.Bs(N);break;case 49:Z.t6(N);break;case 50:Z.lm(N);break;case 47:Z.E0(N);break;case 58:Z.Er(N);break;case 61:Z.Yj(N);break;case 66:Z.ot(N);break;case 46:Z.J6(N);break;case 67:Z.onSnackbarMessage(N);break;case 71:k=lt(N,eQf),Z.u3.q9(k)}};
Oqf=function(Z){S9=Z};
v8y=function(Z,k,N){Z.yn.get(k).onProgress=N};
e9=function(Z,k){Z.Vb(k)&&(S9?Z.yn.get(k).bk.clear():Z.yn.get(k).K8=new h8,Z.U(k),Z.Y=!0)};
iqi=function(Z){for(const [k,N]of Z.yn){const a=k;N.DW||e9(Z,a)}};
g8N=function(Z,k){Z=Z.yn.get(k);if(!Z)return 0;k=0;if(Z.Vi.length>0){for(const N of Z.Vi)k+=N.range?.length||0;return k}if(Z.Vu.length>0)for(const N of Z.Vu)k+=N.Bj||0;return k+Z.Hm};
oG=function(Z,k){if(S9){let N=0;Z=Z.yn.get(k);if(!Z?.bk)return 0;for(const a of Z.bk.values())N+=a.data.totalLength;return N}return Z.yn.get(k)?.K8.L()||0};
JA=function(Z,k){Z=Z.yn.get(k);if(S9){if(!Z?.DW)return!1;k=Z.bk.size>0;return Z.nT.length>0||k}return!!Z?.DW&&!!Z?.K8.L()};
wUU=function(Z,k){const N=Z.yn.get(k),a=g8N(Z,k),T=!a&&!!N.bytesReceived;if(S9){if(Z.cD?.Rn){for(var K of N.bk.values())if(!K.v8)return!1;return T}}else if(K=Z.Lx(k),T&&Z.D&&K!==void 0)return K;return(T||N.bytesReceived===a)&&N.ZC+oG(Z,k)===N.bytesReceived};
z0=function(Z,k,N,a){k=$8f(Z,k,N);N=N.gR;a.Vi.push(...k);if(S9)a.rj.has(N)||a.rj.set(N,[]),a.rj.get(N).push(...k);else if(a.zF)for(const T of k)a.zF.Vi.push(T);else a.zF=new x8f(Z.BG,[...a.Vi]),Z.BG?.yI&&g.u(Z,a.zF);return k};
$8f=function(Z,k,N){const a=Z.cD?.Y.get(k);if(!a)return[];if(N.p5)return a.j(0,N.clipId)?.Vi||[];if(a.D()){var T=N.startMs,K=N.durationMs,y=1E3;Z.BG?.V&&N.timeRange&&(T=N.timeRange.startTicks??-1,K=N.timeRange.Sf??-1,y=N.timeRange.timescale??-1);if(N.Qd<0||N.Ne<0||K<0||T<0||N.Bj<0||y<0)return e9(Z,k),[];Z=lI(N.Qd,N.Bj);k=N.oP||0;return[new g5(3,a,Z,"makeSliceInfosMediaBytes",N.Ne-1,T/y,K/y,k,Z.length-k,void 0,N.Tk,N.clipId)]}if(N.Ne<0)return e9(Z,k),[];if(Z.cD?.Rn)return K=a.Wi,y=K*a.info.UH,k=N.oP,
Z.BG?.V&&Z.G.I3()!=="ONESIE"&&N.timeRange&&!k&&(T=N.timeRange.startTicks/N.timeRange.timescale),[new g5(3,a,void 0,"makeSliceInfosMediaBytes",N.Ne,T,K,k,y,!0,N.Tk,N.clipId)];if(Z.BG?.xd&&a instanceof Qj){if(!a.V())return Z.yn.get(k).Zh.set(N.gR,N),[];N=N.Ne-1;Z=a.index.getStartTime(N);T=a.index.getDuration(N);return[new g5(3,a,void 0,"makeSliceInfosMediaBytes",N,Z,T,0,T*a.info.UH)]}return[]};
GkR=function(Z,k,N){Z.cD=k;Z.BG=N;for(const [a,T]of Z.yn){k=a;N=T;for(const K of N.po)z0(Z,k,K,N)}};
SOb=function(Z){return Z.b1()&&!Z.u1};
ePR=function(Z){Z.policy.vx&&Z.Ru&&!Z.UG?Z.UG=!0:Z.O3.dA()};
o8f=function(Z,k){let N=-1,a=-1,T=-1;if(Z.aB?.items)for(const K of Z.aB.items)k<K.EJ||K.EJ<N||(N=K.EJ,a=K.n_,T=K.minReadaheadMs);return{eA:N,n_:a,Hn:T}};
U2=function(Z){Z.O||(Z.O=(0,g.z)(),g.LN("mb_s",Z.O,Z.V))};
Jff=function(Z){Z.xW||(Z.xW=(0,g.z)(),g.LN("ovfs_rp",Z.xW,Z.V))};
zPN=function(Z){Z.zt||(Z.zt=(0,g.z)(),g.LN("oafs_rp",Z.zt,Z.V))};
U8y=function(Z,k,N){const a=k instanceof b9&&!Z.D&&!Z.U,T=!Z.D&&N?.info.video;N=!Z.U&&N?.info.audio;k.state===3?((T||a)&&Z.tick("vrr"),(N||a)&&Z.tick("arr")):k.state===4?T?(Z.D=k.mH(),g.dO(),LU(4)):N&&(Z.U=k.mH()):k instanceof AA&&k.EL()&&T&&(g.dO(),LU(4))};
pn=function(Z,k,N){Z.U!==k&&(Z.U6("sdai",{setsst:k,old:Z.U,r:N}),Z.U=k)};
pUf=function(Z,k,N,a=!0){if(!Z.policy.ix){if(N&&!Z.dA.has(k.Cp)){var T=k.startTime,K=[];for(var y=0;y<N.V.length;y++){var Q=N.V[y],q=T;T=q+N.U[y];K.push({startTime:q,endTime:T,adCpn:Q})}Z.dA.set(k.Cp,K)}Z.policy.hI&&(T=Z.N&&k.Cp===Z.N.Cp+1,Z.N=k,K=Z.V&&k.Cp===Z.V.Cp+1,K=Z.V&&T&&K&&Z.V.lX.event!=="stop"&&Z.V.lX.event!=="predictStart",y=k.lX||null,Q=Z.videoTrack.l3.index.hW(),Q=k.Cp>=Q,q=Z.cD.isManifestless,y?(Z.V?.lX.event==="predictStart"&&Z.V.Cp<k.Cp&&y.event==="stop"&&Z.loader.handleError("ssdai.missingstartcueevent",
{lastpredict:Z.V?.Cp||0,csq:k.Cp},0),Z.V={lX:y,Cp:k.Cp,UL:!!N,xT:a},Q?RG(Z,y,k.Cp):q&&(T?K?RG(Z,y,k.Cp):y.event==="continue"||y.event==="stop"?bqN(Z,k):RG(Z,y,k.Cp):RG(Z,y,k.Cp))):(K&&bqN(Z,k),Z.U===4&&pn(Z,5,"qend")))}};
n8b=function(Z,k,N,a,T){k!==Z.V?.Cp||Z.U===1||a||Z.V.lX.event==="predictStart"||Z.U6("sdai",{undecevt:1,sq:k,mt:N,evt:Z.V.lX.event},!0);k>Z.L&&(Z.L=NaN,Z.G=NaN);if(Z.V&&Z.V.Cp===k){if(a=Z.V,!Z.policy.L||!Z.policy.U)if(T&&a){var K=a.lX,y=T.FP(K);K.event==="predictStart"&&(Z.O=k);Z.U6("sdai",{onqevt:K.event,sq:k,mt:N,gab:y,cst:K.startSecs,cueid:Z.policy.nj&&(y||K.event==="start")?K.identifier:void 0},!0);y?K.event!=="predictStart"?(K.event==="start"&&Z.O===k-1&&Z.U6("sdai",{gabonstart:k}),a.UL?pn(Z,
4,"cue"):(Z.L=k,Z.G=N,Z.U6("sdai",{joinad:Z.U,sg:Z.L,st:Z.G.toFixed(3)}),Z.C=Date.now(),pn(Z,2,Z.U===3?"staftpred":"join"),RPy(T,a.lX))):(y=MSU(Z),k+=Math.max(Math.ceil(-K.V/y),1),K=Math.floor(N-K.V/1E3),Z.policy.U?Z.D=K:Z.Y=k,Z.U6("sdai",{onpred:N,estsq:k,estmt:K.toFixed(3)}),Ms(Z.loader,K,K,k,y),Z.C=Date.now(),pn(Z,3,"predict"),RPy(T,a.lX)):Z.U===1?Z.uq?.Op(N)?(Ms(Z.loader,N,N,k),pn(Z,4,"sk2head")):pn(Z,5,"nogab"):K.event==="predictStart"&&(Z.policy.U&&Z.D>0?(N=Math.floor(N-K.V/1E3),Z.D!==N&&Z.U6("sdai",
{updateSt:N,old:Z.D}),Z.D=N):Z.Y>0&&(N=k+Math.max(Math.ceil(-K.V/MSU(Z)),1),Z.Y!==N&&(Z.U6("sdai",{updateSt:N,old:Z.Y}),Z.Y=N)))}else Z.U6("sdai",{nulldec:1,sq:k,mt:N.toFixed(3),evt:a?.lX?.event||"none"})}else Z.U===1&&pn(Z,5,"noad")};
nn=function(Z,k,N){return(N<0||N===Z.L)&&!isNaN(Z.G)?Z.G:k};
RG=function(Z,k,N){k.startSecs+=isNaN(Z.j)?0:Z.j;uqi(Z.cD,k,N)};
bqN=function(Z,k){if(Z.V){var N=Z.V.lX.Xl-(k.startTime+Z.j-Z.V.lX.startSecs);N<=0||(N=new oV(Z.V.lX.startSecs-(isNaN(Z.j)?0:Z.j),N,Z.V.lX.context,Z.V.lX.identifier,"stop",Z.V.lX.V+k.duration*1E3),Z.U6("cuepointdiscontinuity",{segNum:k.Cp}),RG(Z,N,k.Cp))}};
MSU=function(Z){switch(Z.policy.latencyClass){case "LOW":return 2E3;case "ULTRALOW":return 1E3;default:return 5E3}};
IG=function(Z,k,N,a=!1){a?pn(Z,1,"seek"):k>0&&Math.abs(k-N)>=5&&Z.U===4&&pn(Z,5,"sk2t")};
ING=function(Z){if(!Z)return"unknown";switch(Z){case 5:return"predictStart";case 1:return"start";case 2:return"continue";case 3:return"stop";case 6:return"prefetch";default:return"unknown"}};
j9=function(Z,k){return k?Z.policy.Vp&&k.tileContext?`${k.identifier};${k.tileContext}`:k.identifier:""};
jpy=function(Z,k){let N=-(k.lX?.SX||0);k.timeRange&&(N+=(k.timeRange.startTicks||0)/(k.timeRange.timescale||1));return new oV(N,k.lX?.gO||0,k.lX?.AP||"",k.lX?.identifier||"",ING(k.lX?.event),(k.lX?.SX||0)*1E3,Z.policy.Vp?k.tileContext:void 0)};
E8f=function(Z,k){let N="";const a=[];for(const [T,K]of Z.V.entries()){const y=T,Q=K;Q?.startTimeSecs<=k&&k<=Q?.startTimeSecs+Q?.Xl&&a.push(y);N+=`${y}:${Q?.startTimeSecs.toFixed(3)}:${Q?.Xl.toFixed(3)};`}a.length===0&&Z.U6("clsdai",{no_cid:1,mt:k.toFixed(3),adConfigMap:N.substring(0,1024)});return a};
WvX=function(Z,k,N=!1){N&&(Z.G=!0);++Z.L;N=6E4*2**Z.L;N=(0,g.z)()+N;Z.Y.set(k.info.id,N)};
E2=function(Z){for(const [k,N]of Z.Y.entries()){const a=k;N<(0,g.z)()&&Z.Y.delete(a)}return Z.Y};
Wn=function(Z,k){Z.V!==k&&(Z.V=k,Z.D=!0)};
YOf=function(Z,k){let N=null;if(Z.policy.g4){let a=[];if(k){const T=g.ZD(Z.U.U,K=>K.id===k);
if(T&&T.ZF){const K=T.ZF.id;a=g.Ry(Z.U.U,y=>y.ZF?.id===K)}}a.length===0&&(a=g.Ry(Z.U.U,T=>!!T.ZF?.isDefault),k&&Z.U6("iaf",{id:k,
sid:a[0]?.id}));a.length>0&&(N=g.ZD(a,T=>T.audio.V===Z.policy.Ii)||a[0])}else k&&(N=g.ZD(Z.U.U,a=>a.id===k)),N||(N=g.ZD(Z.U.U,a=>!!a.ZF?.isDefault),k&&Z.U6("iaf",{id:k,
sid:N?.id}));return N};
Yc=function(Z){if(!Z.U||!Z.policy.Y&&!Z.U.info.ZF){var k=Z.G.U;Z.U&&(k=k.filter(a=>a.audio.V===Z.U.info.audio.V),k.length||(k=Z.G.U));
Z.U=Z.cD.V[k[0].id];if(k.length>1&&!Z.policy.u7){if(!Z.policy.Pl){var N=g.ZD(k,a=>a.audio.audioQuality!=="AUDIO_QUALITY_HIGH");
N&&(Z.U=Z.cD.V[N.id])}N=!1;if(N=Z.policy.Ap?!0:Z.V.isLocked()?Z.V.V<240:ZdX(Z,Z.U))Z.U=Z.cD.V[g.bf(k).id]}}};
kR=function(Z,k){Z.V=k;var N=Z.G.videoInfos;if(!Z.V.isLocked()){const K=(0,g.z)();N=g.Ry(N,function(y){if(y.UH>this.policy.UH)return!1;const Q=this.cD.V[y.id];return E2(this.L).get(y.id)>K||Q.EH.U>4||Q.MX>4?!1:this.dA.has(+y.itag)?!1:!0},Z);
Z.L.iC()&&(N=g.Ry(N,y=>y.video.width<=854&&y.video.height<=480))}N.length||(N=Z.G.videoInfos);
let a=N;Z.policy.wh&&(a=kV0(Z,a,k));a=g.Ry(a,k.Y,k);if(Z.V.isLocked()&&Z.L.V){var T=g.ZD(N,K=>K.id===Z.L.V);
T?a=[T]:Wn(Z.L,"")}Z.policy.wh||(a=kV0(Z,a,k));a.length||(a=[N[0]]);a.sort((K,y)=>ZL(Z,K)-ZL(Z,y));
for(k=1;k<a.length;k++)N=a[k-1],T=a[k],N.video.width>T.video.width?(g.QH(a,k),k--):ZL(Z,N)*Z.policy.C>ZL(Z,T)&&(g.QH(a,k-1),k--);k=a[a.length-1];Z.Kp=!!Z.D&&!!Z.D.info&&Z.D.info.gA!==k.gA;Z.Y=a;Z.tq.clear();N=!1;for(T=0;T<a.length;T++)N?Z.tq.add(a[T].itag):a[T].video.qualityOrdinal>=1080&&(N=!0);NcU(Z.policy,k,Z.cD.Rn)};
a4f=function(Z){var k=Z.policy.O;const N=Cn(Z.zt)/k-ZL(Z,Z.U.info);k=g.NF(Z.Y,function(a){return ZL(this,a)<N},Z);
k<0&&(k=0);Z.C=k;Z.nextVideo=Z.cD.V[Z.Y[k].id]};
Tcy=function(Z){Z.Sm?Z.Sm=!1:Z.N=(0,g.z)();Z.Vz=!1;Z.Rq=!1;return new Nl(Z.j,Z.D,Z.V.reason)};
Quf=function(Z,k,N){kR(Z,k);k=YOf(Z.L,N);N||k||(k=K0X(Z));k=k||Z.G.U[0];Z.U=Z.cD.V[k.id];Yc(Z);Z.j=Z.U;a4f(Z);Z.vD.length&&(Z.nextVideo=yC0(Z,Z.nextVideo,Z.G.videoInfos),Z.U=yC0(Z,Z.U,Z.G.U));Z.D=Z.nextVideo;Z.j=Z.U;return Tcy(Z)};
qqy=function(Z,k){return Z.V.equals(k)&&(!Z.L.V||!Z.V.isLocked()||Z.nextVideo?.info.id===Z.L.V)};
aN=function(Z){if(!Z.nextVideo||!Z.policy.Y)if(Z.V.isLocked())Z.nextVideo=Z.V.V<=360?Z.cD.V[Z.Y[0].id]:Z.cD.V[g.bf(Z.Y).id];else{for(var k=Math.min(Z.C,Z.Y.length-1),N=Cn(Z.zt),a=ZL(Z,Z.U.info),T=N/Z.policy.O-a;k>0&&!(ZL(Z,Z.Y[k])<=T);k--);for(N=N/Z.policy.C-a;k<Z.Y.length-1&&!(ZL(Z,Z.Y[k+1])>=N);k++);Z.nextVideo=Z.cD.V[Z.Y[k].id];Z.C=k}};
rCG=function(Z,k){if(qqy(Z,k))return null;if(k.reason==="m"&&k.isLocked())return kR(Z,k),Z.C=Z.Y.length-1,Yc(Z),aN(Z),Z.O=Z.O||Z.D!==Z.nextVideo,Z.D=Z.nextVideo,new Nl(Z.U,Z.D,k.reason);k.reason==="r"&&(Z.N=-1);kR(Z,k);aN(Z);if(k.reason==="r"&&Z.nextVideo===Z.D)return new Nl(Z.U,Z.nextVideo,k.reason);Z.D&&Z.nextVideo&&ZL(Z,Z.D.info)<ZL(Z,Z.nextVideo.info)&&(k=Z.V.reason,Z.Vz=Z.Vz||k==="r"||k==="u"||k==="v");return null};
C2j=function(Z,k){if(k.info.video){if(Z.D!==k)return Z.D=k,Tcy(Z)}else Z.MX=Z.j!==k,Z.j=k;return null};
m0U=function(Z,k){if(k.l3.info.video&&k.D){const N=(k.V+k.U)/k.duration,a=k.l3.info.UH;N&&a&&(Z.Qz.wr(1,N/a),Z.policy.D&&N/a>1.5&&Z.loader.U6("overshoot",{sq:k.Cp,br:N,max:a}))}};
Tw=function(Z,k,N=!1){WvX(Z.L,k,N);Z.N=-1;kR(Z,Z.V)};
suy=function(Z,k){return new Nl(Z.j,Z.D,k||Z.V.reason)};
ZL=function(Z,k){if(!Z.FS[k.id]){var N=Z.cD.V[k.id].index.QS(Z.xW,15);N=k.RR&&Z.D&&Z.D.index.isLoaded()?N||k.RR:N||k.UH;Z.FS[k.id]=N}N=Z.FS[k.id];Z.tq.has(k.itag)&&(N*=1.5);return N*=Math.max(1,Z.Qz.c9()||0)};
ACN=function(Z,k){const N={};for(const a of k){if(!a||!a.video)continue;k=a.video.qualityOrdinal;const T=N[k],K=T&&T.V()&&T.video.qualityOrdinal>Z.policy.Eq,y=k<=Z.policy.Eq?a.V():a.Y();if(!T||K||y)N[k]=a}return N};
kV0=function(Z,k,N){const a=N.reason==="m"||N.reason==="s";Z.policy.PO&&Ka&&g.v9&&(!a||N.V<1080)&&(k=k.filter(T=>T.video&&(!T.L||T.L.powerEfficient)));
if(k.length>0)if(jx()){const T=ACN(Z,k);k=k.filter(K=>!!K&&!!K.video&&K.gA===T[K.video.qualityOrdinal].gA)}else{const T=k[0]?.video?.qualityOrdinal;
if(T){N=k.filter(y=>!!y&&!!y.video&&y.video.qualityOrdinal===T);
const K=ACN(Z,N)[T].gA;k=k.filter(y=>!!y&&!!y.video&&y.gA===K)}}return k};
K0X=function(Z){const k=g.ZD(Z.G.U,a=>a.audio.V),N=g.ZD(Z.G.U,a=>!a.audio.V);
return k?Z.policy.Ii?k:N:null};
ZdX=function(Z,k){let N=0;for(;N+1<Z.Y.length&&Z.Y[N].video.quality==="tiny";)N++;const a=Cn(Z.zt)/Z.policy.C;return ZL(Z,k.info)+ZL(Z,Z.Y[N])>a};
yC0=function(Z,k,N){if(k.info.gA==="f"||Z.vD.includes(t$(k,Z.cD.Rn)))return k;for(let a=0;a<N.length;a++){const T=Z.cD.V[N[a].id];if(!Z.vD.includes(t$(T,Z.cD.Rn)))continue;const K=k.info.gA,y=T.info.gA;if(K===y||jx()){if(k.info.video?k.info.U!==T.info.U:k.info.audio.V!==T.info.audio.V||k.info.ZF?.id!==T.info.ZF?.id)return yJ(Z,{mismatch:"xtag",f:k.info.id,t:T.info.id}),k;yJ(Z,{f:k.info.itag,t:T.info.itag});Z.Sm=!0;return T}yJ(Z,{mismatch:"efficient",fc:K,tc:y})}yJ(Z,{mismatch:"unselectable",fmts:Z.vD.join(".")});
return k};
yJ=function(Z,k){Z.policy.Ys?Z.loader.handleError("onesie.fmt.mismatch",k,0):Z.loader.U6("ombifa",k)};
P2i=function(Z,k){Z=Jc(Z.cD.V,N=>N.info.itag===k);
if(!Z)throw Error("Itag "+k+" from server not known.");return Z};
cCG=function(Z){const k=[];if(Z.V.reason==="m"||Z.V.reason==="s")return k;if(dJN(Z.cD)){for(let N=Math.max(0,Z.C-2);N<Z.C&&N<Z.Y.length;N++)k.push(Z.Y[N].itag);k.reverse()}return k};
Hdf=function(Z,k){Z.dD("ismp_p");Z.U=k};
d0f=function(Z){Z.V&&(Z.V.dispose(),Z.dD("ismp_d"))};
Xdb=function({qK:Z=!1,bN:k=!1,VP:N=!1}={}){return Z?N?3:2:k?-1:1};
QJ=function(Z,k,N){const a=[];var T=Z.track.w5;if(T){T=T.Us();for(var K=0;K<T.length;K++)a.push(Math.round(T.start(K)*1E3)),a.push(Math.round(T.end(K)*1E3))}T=1;K=a.length;if(K===Z.buffered.length){for(var y=0;y<=K&&a[y]===Z.buffered[y];y++);y>K?T=0:a[y]>Z.buffered[y]&&(y===K-1?T=2:y===K-2&&a[y+1]>Z.buffered[y+1]&&(T=3))}Z.V.add(k<<3|(N&&4)|T);k=Math.ceil(Z.track.lA()*1E3);Z.V.add(k-Z.L);Z.L=k;if(T===1)for(Z.V.add(K),k=0,y=0;y<K;y++)Z.V.add(a[y]-k),k=a[y];T===3&&Z.V.add(a[K-2]-Z.buffered[K-2]);T>=
2&&Z.V.add(a[K-1]-Z.buffered[K-1]);N&&Z.V.add(N);Z.buffered=a};
L0y=function(Z){if(Z.policy.gV&&Z.policy.zW)for(const k of Z.policy.gV){const N=g.mm(k),a=+N.clen,T=+N.csz;if(a>0&&T>0&&Z.policy.Y===N.docid&&Z.V.info.id===N.fmtid&&Z.V.info.lastModified===+N.lmt)return{clen:a,csz:T,ck:N.ck,civ:N.civ}}};
ql=function(Z){return{downloadedEndTime:Math.round(Z.h1?Z.h1.L:0),maxKnownEndTime:Math.round(Z.V.index.CA()),averageByteRate:Math.round(Z.V.info.RR)}};
my=function(Z,k=!1){!k||Z.indexRange&&Z.initRange&&Z.h1||rd(Z,new Ca("Woffle: Expect isFinal to always have indexRange and initRange and lastSlice"));k={lmt:Z.V.info.lastModified,docid:Z.policy.Y,fmtid:Z.V.info.id,type:Z.V.info.mimeType.split(";")[0],csz:Z.chunkSize,clen:Z.Y*Z.chunkSize+Z.U};Z.crypto&&(k.ck=Z.j,k.civ=Z.G);k="local://localhost/videoplayback?"+QS(k);k={itag:+Z.V.info.itag,mimeType:Z.V.info.mimeType,bitrate:Z.V.info.UH*8,lastModified:String(Z.V.info.lastModified),initRange:Z.initRange?.V(),
indexRange:Z.indexRange?.V(),url:k};var N=Z.V.info.U;N&&(k.xtags=N);if(N=Z.V.info.video)if(k.quality=N.quality,k.qualityLabel=N.qualityLabel,k.width=N.width,k.height=N.height,N=N.fps)k.fps=N;if(Z=Z.V.info.audio){if(N=Z.sampleRate)k.audioSampleRate=String(N);if(Z=Z.numChannels)k.audioChannels=Z}return k};
sj=function(Z,k,N=!1){k.then(a=>{Z.Vz.delete(k);(N||a===4)&&Z.C.resolve(a)},a=>{Z.C.reject(a)})};
AM=function(Z){return!!Z.h1&&Z.h1.G()};
rd=function(Z,k){g.aD(Z.policy.Y)!==4&&(g.TY(Z.policy.Y,4),g.L9(k),Z.C.reject(new Ca(k.message)))};
VQy=function(Z,k){let N=0;const a=A8(k.U);if(Z.Y<Z.D){N=Z.D*Z.chunkSize-((k.info.range?.start||0)+k.info.V);if(N>=a.length)return;if(N<0)throw Error("Missing data");Z.Y=Z.D;Z.U=0}for(;N<a.length;){var T=Math.min(a.length-N,Z.L.byteLength-Z.U);const K=new Uint8Array(a.buffer,a.byteOffset+N,T);Z.L.set(K,Z.U);Z.U+=T;N+=T;if(Z.U===Z.L.length){if(k.info===Z.h1&&AM(Z)&&N===a.length)break;T=ql(Z);T=Qr(Z.policy.Y,Z.V.info,my(Z),T,Z.policy.Qz,Z.Y,Z.L,Z.crypto);Z.Vz.add(T);sj(Z,T);Z.jm()||(T=ql(Z),Z.xW(my(Z),
T!==void 0?(T.downloadedEndTime||0)*T.averageByteRate:T.maxKnownEndTime*T.averageByteRate,T.maxKnownEndTime*T.averageByteRate));Z.L=new Uint8Array(Z.chunkSize);Z.U=0;Z.Y+=1}}};
tQy=function(Z){if(AM(Z))if(Z.h1&&Z.indexRange)if(Z.U){var k=new Uint8Array(Z.L.buffer,0,Z.U),N=F0U(Z),a=Z.policy.Y;Promise.all(Z.Vz).then(()=>{const T=Qr(a,Z.h1.l3.info,my(Z,!0),N,Z.policy.Qz,Z.Y,k,Z.crypto);sj(Z,T,!0)})}else rd(Z,new Ca("Woffle: Expect always re-mark currentChunkOffset at EOS"));
else rd(Z,new Ca("Woffle: Expect at EOS to always have lastSlice or indexRange"))};
h$G=function(Z,k){if(!AM(Z)&&!Z.jm()){if(!(Z.zt||(Z.zt=!0,Z.D>0))){var N=ql(Z);N=Qr(Z.policy.Y,Z.V.info,my(Z),N,Z.policy.Qz);sj(Z,N)}if(k.info.type===1){if(Z.h1){rd(Z,Error("Woffle: Expect INIT slices to always start us off"));return}Z.initRange=lI(0,k.U.totalLength)}else if(k.info.type===2)Z.h1&&Z.h1.type===1||rd(Z,Error("Woffle: Index before init")),Z.indexRange=lI(Z.initRange.end+1,k.U.totalLength);else if(k.info.type===3){if(!Z.h1){rd(Z,Error("Woffle: Expect MEDIA slices to always have lastSlice"));
return}if(Z.h1.type===3&&!Bq(Z.h1,k.info)&&(Z.N=[],k.info.Cp!==vq(Z.h1)||k.info.V!==0))return;if(k.info.D){for(const a of Z.N)VQy(Z,a);Z.N=[]}else{Z.N.push(k);Z.h1=k.info;return}}else{rd(Z,Error("Woffle: Unexpected slice type"));return}Z.h1=k.info;VQy(Z,k);tQy(Z)}};
F0U=function(Z){return{downloadedEndTime:-1,maxKnownEndTime:Math.round(Z.V.index.CA()),averageByteRate:Math.round(Z.V.info.RR)}};
uby=function(Z){Z=g.jw(Z,1886614376);for(const k of Z);return g.ni(Z,k=>O9f(k))};
l4f=function(Z){var k=jN(Z,(a,T)=>a+T.length,0);
k=new Uint8Array(k);let N=0;for(const a of Z)k.set(a,N),N+=a.length;return k};
Bcj=function(Z){a:{var k=Z.initData;try{var N=0;const T=new DataView(k.buffer);for(;N<T.byteLength-8;){const K=T.getUint32(N);if(K<=1)break;if(T.getUint32(N+4)!==1886614376){N+=K;continue}let y=32;if(T.getUint8(N+8)>0){const q=T.getUint32(N+28);y+=q*16+4}const Q=T.getUint32(N+y-4);try{const q=f4b(k.subarray(N+y,N+y+Q));if(q!==null){var a=q;break a}}catch(q){}N+=K}a=null;break a}catch(T){a=null;break a}a=void 0}if(a!=null){k=hJ(XD(a,7,void 0,T3));k==null||Z.oa||(Z.cryptoPeriodIndex=k);k=hJ(XD(a,10,
void 0,T3));k!=null&&k>0&&!Z.oa&&(Z.V=k);for(const T of fk(a,2,D1,void 0===MQ?2:4))a=Z.D,k=a.push,N=Jx(T),N=g.fl(N,4),k.call(a,N)}};
Pb=function(Z,k){const N=new g.hY(k);(k=N.get("req_id"))&&Z.set("req_id",k);g.BB(Z.V,(a,T)=>{N["set"](T,null)});
return N};
D0X=function(Z){return isNaN(Z.cryptoPeriodIndex)?g.fl(Z.initData):`${Z.cryptoPeriodIndex}`};
cb=function(Z){if(Z.offset>=Z.U.totalLength)throw Error();return cY(Z.U,Z.offset++)};
Odj=function(Z,k=!1){var N=cb(Z);if(N===1){k=-1;for(N=0;N<7;N++){var a=cb(Z);k===-1&&a!==255&&(k=0);k>-1&&(k=k*256+a)}return k}a=128;for(let T=0;T<6&&a>N;T++)N=N*256+cb(Z),a*=128;return k?N:N-a};
vGN=function(Z){try{const k=Odj(Z,!0),N=Odj(Z,!1);return{id:k,size:N}}catch(k){return{id:-1,size:-1}}};
gGX=function(Z){var k=new idi(Z),N=-1,a=0;let T=0;for(;!a||!T;){const {id:K,size:y}=vGN(k);if(K<0)return;if(K===176){if(y!==2)return;a=k.V()}else if(K===186){if(y!==2)return;T=k.V()}K===374648427?N=k.V()+y:K!==408125543&&K!==174&&K!==224&&k.skip(y)}k=PY(Z,0,N);N=new DataView(k.buffer);N.setUint16(a,3840);N.setUint16(T,2160);a=new h8([k]);Cv(a,Z);return a};
Hb=function(Z){Z.G?.dispose();Z.G=null};
wdj=function(Z){return Z.U.length?Z.U[0]:null};
$0f=function(Z,k){return Z.U.some(N=>N.info.Cp===k)};
dd=function(Z,k){k={rst4disc:k,cd:Z.j.toFixed(3),sq:Z.dA?Z.dA.Cp:-1};Z.D=NaN;Z.j=0;Z.tq=-1;Z.dA=null;Z.MX=NaN;Z.Rq=NaN;Z.Sm=null;Z.loader.U6("mdstm",k)};
XL=function(Z){Z.V=null;Z.O=-1;Z.C=0;Z.L=null;Z.xW=NaN;Z.N=0;Z.Vz=null};
La=function(Z,k){if(k.info.D){Z.Kp=k.info;if(Z.L){var N=Z.L,a=x0y(Z,!1);N=GVR(N);Z.loader.Fm(Z.l3,a,N);Z.Vz||Z.policy.hI||SqU(Z);Z.Vz=null}XL(Z)}Z.G&&h$G(Z.G,k);if(a=Z.Ql())if(a=a.G(k,Z.policy.Ak,Z.policy.NW)){Z.U.pop();Z.U.push(a);return}Z.U.push(k)};
U0y=function(Z,k,N,a=0){if(Z.Y){var T=Z.Y.V+Z.Y.U;if(N.info.V>0)if(N.info.Cp===Z.Y.Cp&&N.info.V<T){if(N.info.V+N.info.U<=T)return;N=$4R(N,T-N.info.V)[1]}else if(N.info.Cp>=0&&Z.Y.Cp>=0&&!Bq(Z.Y,N.info))throw new g.jD("improper_continuation",Z.Y.E3(),N.info.E3());Cyy(Z.Y,N.info)||dd(Z,"d")}else if(N.info.V>0)throw new g.jD("continuation_of_null",N.info.E3());Z.Y=N.info;Z.l3=N.info.l3;if(N.info.V===0){if(Z.V)if(!Z.loader.isOffline()||Z.policy.g0)Z.loader.U6("slice_not_fully_processed",{buffered:Z.V.info.E3(),
push:N.info.E3()});else throw new g.jD("slice_not_fully_processed",Z.V.info.E3(),N.info.E3());XL(Z);Z.FS=a}else{if(Z.FS&&a&&Z.FS!==a)throw Z=new g.jD("lmt_mismatch",N.info.Cp,Z.FS,a),Z.level="WARNING",Z;!N.info.l3.D()&&Z.L&&(a=N.info,T=Z.L.segmentNumber,a.j="updateWithEmsg",a.Cp=T)}if(Z.V){a=Z.V.G(N);if(!a)throw new g.jD("failed_to_merge",Z.V.info.E3(),N.info.E3());Z.V=a}else Z.V=N;a:{N=g.Sx(Z.V.info.l3.info);if(Z.V.info.type!==3){if(!Z.V.info.D)break a;Z.V.info.type===6?e$f(Z,k,Z.V):oGr(Z,Z.V);Z.V=
null}for(;Z.V;){a=Z.V.U.totalLength;if(Z.O<=0&&Z.C===0){var K=Z.V.U;let r=T=-1;if(N){for(var y=0;y+8<K.totalLength;){var Q=z8b(K,y),q=z8b(K,y+4);y+=Q||1;if(q===1836019558)T=y;else if(q===1835295092){r=y;break}}r<0&&(T=-1)}else{K=new idi(K);for(Q=y=!1;;){q=K.V();const {id:A,size:P}=vGN(K);if(!(A>0))break;if(A!==408125543)if(A===524531317)y=!0,P>=0&&(r=K.V()+P,Q=!0);else{if(y&&(A===160||A===163)&&(T<0&&(T=q),Q))break;A===163&&(T=Math.max(0,T),r=K.V()+P);if(A===160){T<0&&(r=T=K.V()+P);break}K.skip(P)}}T<
0&&(r=-1)}const {HY:C,Tp:m}={HY:T,Tp:r};if(C<0)break;Z.O=C;Z.C=m-C}if(Z.O>a)break;Z.O?(a=JC0(Z,Z.O),a.L&&z$G(Z,a),e$f(Z,k,a),La(Z,a),Z.O=0):Z.C&&(a=JC0(Z,Z.C<0?Infinity:Z.C),Z.C-=a.U.totalLength,La(Z,a))}}Z.V&&Z.V.info.D&&(La(Z,Z.V),Z.V=null)};
z$G=function(Z,k){var N=g.Rc(k);if(x5(k.info.l3.info)&&k.info.l3.info.video.primaries==="bt2020"){var a=new Wo(N);YC(a,[408125543,374648427,174,224,21936,21937])&&(a=a.start+a.pos,N.getUint8(a)===129&&N.getUint8(a+1)===1&&N.setUint8(a+1,9))}a=k.info.l3.info;a.Y()&&!x5(a)&&(a=g.Rc(k),(new Wo(a)).p5(),ac([408125543,374648427,174,224],21936,a));k.info.l3.info.xT()&&(a=k.info.l3,a.info&&a.info.video&&a.info.video.projectionType==="MESH"&&!a.N&&(g.Sx(a.info)?a.N=eFN(N):a.info.oa()&&(a.N=nLy(N))));k.info.l3.info.oa()&&
k.info.xT()&&(N=g.Rc(k),(new Wo(N)).p5(),ac([408125543,374648427,174,224],30320,N)&&ac([408125543,374648427,174,224],21432,N));if(Z.policy.L4&&k.info.l3.info.oa()){a=g.Rc(k);var T=new Wo(a);if(YC(T,[408125543,374648427,174,29637])){N=Nq(T,!0);T=T.start+T.pos;for(var K=0;K<N-1;K++)a.setUint8(T+K,0);a.setUint8(T+N-1,1)}}if(Z.H9()&&g.Sx(k.info.l3.info)){N=g.Rc(k);a=g.RV(N,0,1701606260);N=g.RV(N,0,1836476516);if(a&&N){a.skip(2);var y=gg(a);K=$C(a);const Q=[];T=[];const q=[],r=[];if(y)for(y=0;y<K;++y)Q.push(xC(a)),
T.push(xC(a)),q.push(gg(a)),r.push(gg(a));else for(y=0;y<K;++y)Q.push(wg(a)),T.push(wg(a)),q.push(gg(a)),r.push(gg(a));a=Q;N=g.Mr(N);N=new bdf(T[0]/N,a[0]/N)}else N=null;if(T=N){if(g.Sx(k.info.l3.info))for(N=g.Rc(k),K=g.RV(N,0,1701082227);K;)a=K,a.type=1936419184,a.data.setUint32(a.offset+4,1936419184),K=g.RV(N,K.offset+K.size,1701082227);Z.Qz=!0;k.info.l3.zt=T}}k.info.l3.D()||k.info.l3.U||k.info.l3.indexRange||Mq(k)};
pdr=function(Z,k){if(Z.isDrm()){if(k.info.l3.info.oa()){var N=new Wo(g.Rc(k));if(YC(N,[408125543,374648427,174,28032,25152,20533,18402])){var a=Nq(N,!0);N=a!==16?null:qq(N,a)}else N=null;a="webm"}else k.info.Vz=uby(g.Rc(k)),N=l4f(k.info.Vz),a="cenc";N&&N.length&&(N=new VJ(N,a),Z.policy.BL&&g.Sx(k.info.l3.info)&&(a=RFU(g.Rc(k)))&&(N.U=a),N.oa=k.info.l3.info.oa(),k.V&&k.V.cryptoPeriodIndex&&(N.cryptoPeriodIndex=k.V.cryptoPeriodIndex),k.V&&k.V.U&&(N.V=k.V.U),Z.loader.Gq(N))}};
oGr=function(Z,k){!k.info.l3.D()&&k.info.V===0&&(g.Sx(k.info.l3.info)||k.info.l3.info.oa())&&JYf(k);if(k.info.type===1)try{z$G(Z,k),pdr(Z,k)}catch(a){g.b(a);var N=iI(k.info);N.hms="1";Z.loader.handleError("fmt.unparseable",N||{},1)}N=k.info.l3;N.Rq(k);Z.G&&h$G(Z.G,k);if(N.V()&&Z.policy.V)a:{Z=Z.loader.cD;k=k.info.clipId;N=g.ot(N.info,Z.Rn);if(k){const a=Fm({itag:N.itag,lmt:Z.Rn?0:N.lmt||0,xtags:N.xtags});if(Z.hq[a])break a;Z.hq[a]=k}Z.s6.push(N)}};
W$=function(Z,k,N,a,T,K,y,Q,q,r){var C=k^Z;if((Z>>1&15)==1){const d=N[c[C^28]](c[C^46]),h={};for(let B=0;B<d[c[3]];B++)var m=Zj(C^0,C^2404,d,B,h);var A=h}if((Z+4&15)>=10&&(Z|8)<17)for(a=(a%N[c[3]]+N[c[3]])%N[c[3]];a--;)N[c[C^7631]](N[c[C^7598]]());if((Z&120)==Z){var P=T[c[3]];a[c[C^5850]](function(d,h,B){this[c[C^5883]](B[h]=T[(T[c[C^5827]](d)-T[c[C^5827]](this[h])+h+P--)%T[c[3]]])},N[c[C^5874]](c[C^5869]))}(Z+7^31)<Z&&Z-2<<1>=Z&&(A=N(Q,q,r));
return A};
fGG=function(Z,k,N){if(Z.U.length!==0&&(N||Z.U.some(a=>a.info.Y<k))){N=0;
for(const a of Z.U){if(a.info.Y<k)break;Z.loader.U6("cmat",{max:k,s:a.info.E3()});N+=1}Z.U.splice(0,N)}};
R$y=function(Z){let k=Z.U.reduce((N,a)=>N+a.U.totalLength,0);
Z.V&&(k+=Z.V.U.totalLength);return k};
JC0=function(Z,k){var N=Z.V;k=Math.min(k,N.U.totalLength);if(k===N.U.totalLength)return Z.V=null,N;N=$4R(N,k);Z.V=N[1];return N[0]};
e$f=function(Z,k,N){if(N.info.l3.D()){if(Z.Qz&&MQr(N)){k=g.Rc(N);var a=g.RV(k,0,1953658222);if(a){a.skip(1);var T=iq(a)<<16|gg(a),K=T&1,y=T&4;if(T&256){k=T&512;var Q=T&1024;T&=2048;var q=$C(a);q<2||(K&&a.skip(4),y&&a.skip(4),K=$C(a),a.skip((q-1)*(4+(k?4:0)+(Q?4:0)+(T?4:0))-4),a.data.setUint32(a.offset+a.V,K))}}}if(k=Z.zt&&!!Z.zt.l3.zt)if(k=N.info.xT())k=eIi(N),Q=Z.zt,FL?(a=1/k,k=tM(Z,k)>=tM(Q)+a):k=Z.getDuration()>=Q.getDuration(),k=!k;k&&MQr(N)&&(k=Z.zt,FL?(a=eIi(N),Q=1/a,a=tM(Z,a),k=tM(k)+Q-a):
k=k.getDuration()-Z.getDuration(),k=1+k/N.info.duration,xPb(g.Rc(N),k))}else{a=!1;Z.L||(JYf(N),N.V&&(Z.L=N.V,a=!0,K=N.info,y=N.V.segmentNumber,K.j="updateWithEmsg",K.Cp=y,K=N.V,K.G&&(y=Z.l3.index,y.L=!K.G,y.G="emsg"),K=N.info.l3.info,y=g.Rc(N),g.Sx(K)?ER(y,1701671783):K.oa()&&ac([408125543],307544935,y)));a:if((K=EM(N,Z.policy.r5))&&oZ0(N))y=nGG(Z,N),Z.j+=y,K-=y,Z.N+=K,Z.D=Z.policy.eL?Z.D+K:NaN;else{if(Z.policy.Mb){if(y=q=Z.loader.Sh(g.Ic(N),1),Z.D>=0&&N.info.type!==6){if(Z.policy.eL&&isNaN(Z.Rq)){g.L9(new g.jD("Missing duration while processing previous chunk",
N.info.E3()));Z.loader.isOffline()&&!Z.policy.g0||I4G(Z,N,y);dd(Z,"m");break a}T=q-Z.D;var r=T-Z.j;const C=N.info.Cp,m=Z.dA?Z.dA.Cp:-1,A=Z.MX,P=Z.Rq,d=Z.policy.Nn&&T>Z.policy.Nn,h=Math.abs(r)>10,B=Math.abs(Z.D-y)<1E-7;if(Math.abs(r)>1E-4){Z.vD+=1;const v=Z.L?.D();r={audio:`${+Z.H9()}`,sq:C.toFixed(),sliceStart:q,lastSq:m.toFixed(),lastSliceStart:A,lastSliceDuration:P,totalDrift:(T*1E3).toFixed(),segDrift:(r*1E3).toFixed(),skipRewrite:`${+(d||h)}`};v?.length&&(r.adCpn=v[0]);Z.loader.handleError("qoe.avsync",
r);Z.tq=C}d||h||B||(y=Z.D);q=nGG(Z,N,q);K-=q;Z.j=T+q}}else y=isNaN(Z.D)?N.info.startTime:Z.D;I4G(Z,N,y)&&(Z.N+=K,Z.D=y+K,Z.policy.AA&&Z.vD>=Z.policy.AA&&(Z.vD=0,Z.loader.HF({resetForRewrites:"count"})))}Z.dA=N.info;Z.Rq=jg(N);N.D>=0&&(Z.MX=N.D);if(a&&Z.L){a=x0y(Z,!0);w5(N.info,a);Z.V&&w5(Z.V.info,a);for(Q of k)Z.policy.G&&Q.Cp!==Z.L?.segmentNumber||w5(Q,a);(N.info.D||Z.V&&Z.V.info.D)&&N.info.type!==6||(Z.Vz=a,Z.policy.U?(k=GVR(Z.L),Z.loader.Fm(Z.l3,a,k)):(k=Z.loader,k.cD.isManifestless&&juG(k,a,null,
!!Z.l3.info.video)),Z.policy.hI||SqU(Z))}}pdr(Z,N);Z.timestampOffset&&GhR(N,Z.timestampOffset)};
x0y=function(Z,k){let N;const a=Z.L;if(N=i9f(a))N.startSecs+=Z.xW;const T=Z.xW;let K=0;Z.l3 instanceof Vj&&(K=Z.l3.Wi);return new UM(a.segmentNumber,T,k?K:Z.N,a.ingestionTime,`sq/${a.segmentNumber}`,void 0,void 0,k,N)};
GVR=function(Z){if(Z.UL()){var k=Z.data["Stitched-Video-Id"]?Z.data["Stitched-Video-Id"].split(",").slice(0,-1):[],N=Z.D();var a=[];if(Z.data["Stitched-Video-Duration-Us"])for(var T of Z.data["Stitched-Video-Duration-Us"].split(",").slice(0,-1))a.push((Number(T)||0)/1E6);T=[];if(Z.data["Stitched-Video-Start-Frame-Index"])for(var K of Z.data["Stitched-Video-Start-Frame-Index"].split(",").slice(0,-1))T.push(Number(K)||0);K=[];if(Z.data["Stitched-Video-Start-Time-Within-Ad-Us"])for(const y of Z.data["Stitched-Video-Start-Time-Within-Ad-Us"].split(",").slice(0,
-1))K.push((Number(y)||0)/1E6);Z=new EGy(k,N,a,K,g.wgU(Z),g.$PX(Z))}else Z=null;return Z};
SqU=function(Z){const k=Z.L,N=i9f(k);N&&(N.startSecs+=Z.xW,Z.loader.AN(Z.l3,N,k.segmentNumber,k.UL()))};
nGG=function(Z,k,N){var a=0;if(k.info.l3.info.oa()&&!oZ0(k))return 0;if(Z.zt&&!Z.H9()){let r=0;N&&g.Sx(k.info.l3.info)?r=N-Z.D:k.info.l3.info.oa()&&(r=Z.j);var T=k.info.Cp;N=EM(k,Z.policy.r5);var K=Z.zt;const {qU:C,kE:m}={qU:K.tq,kE:K.j};K=Math.abs(m-r)>.02;if((T===C||T>C&&T>Z.tq)&&K){a=Math.max(.95,Math.min(1.05,(N-(m-r))/N));if(g.Sx(k.info.l3.info))xPb(g.Rc(k),a);else if(k.info.l3.info.oa()&&(K=r-m,!g.Sx(k.info.l3.info)&&(k.info.l3.info.oa(),a=new Wo(g.Rc(k)),T=k.L?a:new Wo(new DataView(k.info.l3.U.buffer)),
EM(k,!0)))){var y=K*1E3,Q=CG(T);T=a.pos;a.pos=0;if(a.V.getUint8(a.pos)===160||mX(a))if(kF(a,160))if(Nq(a,!0),kF(a,155)){K=a.pos;var q=Nq(a,!0);a.pos=K;y=y*1E9/Q;Q=KG(a);y=Q+Math.max(-Q*.7,Math.min(Q,y));y=Math.sign(y)*Math.floor(Math.abs(y));if(!(Math.ceil(Math.log(y)/Math.log(2)/8)>q)){a.pos=K+1;for(K=q-1;K>=0;K--)a.V.setUint8(a.pos+K,y&255),y>>>=8;a.pos=T}}else a.pos=T;else a.pos=T;else a.pos=T}a=EM(k,Z.policy.r5);a=N-a}a&&k.info.l3.info.oa()&&Z.loader.U6("webmDurationAdjustment",{durationAdjustment:a,
videoDrift:r+a,audioDrift:m})}return a};
I4G=function(Z,k,N){if(!x4f(k,N))return k=iI(k.info),k.smst="1",Z.loader.handleError("fmt.unparseable",k||{},1),!1;isNaN(Z.xW)&&(Z.xW=N);return!0};
MQr=function(Z){return Z.info.l3.D()&&Z.info.Cp===Z.info.l3.index.hW()};
tM=function(Z,k=0){k=k?Math.round(Z.timestampOffset*k)/k:Z.timestampOffset;Z.l3.zt&&k&&(k+=Z.l3.zt.V);return k+Z.getDuration()};
W0j=function(Z,k){k<0||(Z.U.forEach(N=>{GhR(N,k)}),Z.timestampOffset=k)};
l5=function(Z,k=!1){var N=Z.loader.getCurrentTime();if(Z.policy.By){var a=Z.loader.fT();isNaN(a)||(N=a-Z.loader.mx())}var T=Z.D.Ql();let K=T?.info.L||0;if(Z.policy.Ox&&!isFinite(N))return 0;T?.info.l3.xW()&&!T.info.D&&(Z.policy.Oq?K=T.info.Y:Z.policy.Sb&&(a=T.info,K=a.range?a.L:Math.min(a.startTime+Math.min(a.duration*a.V/a.l3.info.UH,a.duration)+(a.range?a.C:Math.min(a.duration,a.duration*a.U/a.l3.info.UH)),a.startTime+a.duration)));if(!Z.w5){if((Z.policy.V||Z.policy.pE)&&k&&!isNaN(N)){if(T)return K-
N;if(Z.policy.pE&&Z.l3.info.gA==="f")return Infinity}return 0}if((a=hM(Z))&&u5(a))return a.L;var y=Z.w5.Us(!0);if(k&&T)return a=0,Z.policy.V&&(a=nf(y,K+.02)),a+K-N;k=nf(y,N);Z.policy.TR&&a&&(T=U9(y,N),y=U9(y,a.Y-.02),T===y&&(N=a.L-N,Z.policy.D&&N>k+.02&&Z.U6("abh",{bh:k,bhtls:N}),k=Math.max(k,N)));return k};
v7N=function(Z){Z.G=!0;Z.Y=!0;Z.L=-1;dk(Z,Infinity)};
Pn=function(Z){for(const k of Z.U)fa(Z,k);Z.U=[];Z.V=null};
cn=function(Z,k,N=!1){if(Z.w5){const a=Z.w5.Us(),T=pf(a,k);let K=NaN;const y=hM(Z);y&&(K=pf(a,y.l3.index.getStartTime(y.Cp)));if(T===K&&Z.V&&Z.V.U&&Yqf(Bb(Z),0))return k}Z=DL(Z,k,N);return Z>=0?Z:NaN};
dk=function(Z,k,N){Z.l3.V();var a=DL(Z,k);if(a>=0)return a;Z.j?.O(k,N);a=Math;var T=a.min,K=Z.D;if(K.G)if(K=K.G,K.h1&&K.h1.type===3)K=K.h1.startTime;else if(K.D>0){var y=K.V.index;y=g.F_(y.offsets.subarray(0,y.count),K.D*K.chunkSize);K=K.V.index.getStartTime(y>=0?y:Math.max(0,-y-2))}else K=0;else K=Infinity;k=T.call(a,k,K);Z.V=Z.policy.zt?null:Z.l3.G(k).Vi[0];Oj(Z)&&(Z.policy.Lu&&N?.seekSource===60||Z.w5&&Z.w5.abort(),Z.policy.NT&&Z.j?.j());Z.FS=0;return Z.V?Z.V.startTime:k};
X6=function(Z){return wdj(Z.D)};
Zwf=function(Z,k){return!!Z.j?.Vz(k)||$0f(Z.D,k)};
vb=function(Z,k,N=!1){k&&FL&&W0j(Z.D,k.nw());N||Z.j?.G();Z.w5=k;Z.j?.zt(Z.w5)};
hM=function(Z){return Z.policy.US?Z.j?.dA()||null:Z.w5&&Z.w5.wS()};
kKf=function(Z){const k={};for(let N=0;N<Z.zt.length;N++)k[`r${N}`]=Z.zt[N];return k};
i5=function(Z,k){isNaN(Z.Vz)||Z.U6("aswr",{sq:k.info.Vi[0].Cp,id:k.info.Vi[0].l3.info.itag,xtag:k.info.Vi[0].l3.info.U,ep:Date.now()-Z.Vz});Z.U.push(k);Z.V=g.bf(k.info.Vi);Z.zt.push(k.E3());Z.zt.length>4&&Z.zt.shift()};
NzX=function(Z,k){if(k.Ef()){const N=k.bA();for(const a of N)Z.policy.D&&k instanceof s2&&Z.U6("omblss",{s:a.info.E3()}),gd(Z,k.info.Vi,a,k.N6())}};
gd=function(Z,k,N,a=0){isNaN(Z.Vz)||(Z.U6("aswm",{sq:k[0].Cp,id:k[0].l3.info.itag,xtag:k[0].l3.info.U,ep:Date.now()-Z.Vz}),Z.Vz=NaN);switch(N.info.type){case 1:case 2:aXy(Z,N);break;case 4:var T=N.info.l3;const K=T.Kp(N);Z.V?.N()&&Pyy(N.info,Z.V)&&(Z.V=T.FS(Z.V).pop());for(const y of K)gd(Z,k,y,a);break;case 3:N.info.l3.info.video?(T=Z.timing,T.dA||(T.dA=(0,g.z)(),g.LN("fvb_r",T.dA,T.V))):(T=Z.timing,T.G||(T.G=(0,g.z)(),g.LN("fab_r",T.G,T.V)));U0y(Z.D,k,N,a);Z.policy.V&&TzX(Z);break;case 6:U0y(Z.D,
k,N,a),Z.V=N.info}};
aXy=function(Z,k){if(k.info.type===1)if(k.info.l3.info.video){var N=Z.timing;N.vD||(N.vD=(0,g.z)(),g.LN("vis_r",N.vD,N.V))}else N=Z.timing,N.C||(N.C=(0,g.z)(),g.LN("ais_r",N.C,N.V));oGr(Z.D,k);Z=Z.loader;Z.videoTrack.l3.V()&&Z.audioTrack.l3.V()&&Z.policy.V&&!Z.cD.Rn&&(k=Z.audioTrack.getDuration(),N=Z.videoTrack.getDuration(),Math.abs(k-N)>1&&Z.U6("trBug",{af:`${g.ot(Z.audioTrack.l3.info,!1)}`,vf:`${g.ot(Z.videoTrack.l3.info,!1)}`,a:`${k}`,v:`${N}`}))};
TzX=function(Z){Z.U.length?Z.V=g.bf(g.bf(Z.U).info.Vi):Z.D.U.length?Z.V=Z.D.Ql().info:Z.V=hM(Z)};
wd=function(Z,k){const N={jI:[],Md:[]};return Z.j?.N(k)??N};
DL=function(Z,k,N=!1){if(!Z.V||!Z.V.U)return NaN;Z=Bb(Z);k=K5N(Z,k+.02,N);return k<0?NaN:Yqf(Z,N?k:0)?Z[k].startTime:NaN};
Oj=function(Z){var k;!(k=Z.l3.info.gA==="f")&&(k=Z.policy.Y)&&(k=Z.D,k=!!k.G&&AM(k.G));if(k)return!0;k=hM(Z);if(!k)return!1;const N=u5(k)&&k.D;return Z.isManifestless&&Z.xW>0?N||k.Cp>=Z.xW:N};
$R=function(Z){let k=0;for(const N of Z.U)k+=HZ0(N.info);return k+=R$y(Z.D)};
u5=function(Z){return Z?Z.G():!1};
yoi=function(Z){const k=hM(Z);return k?k.L-Z.loader.getCurrentTime():0};
xR=function(Z,k,N,a){if(!Z.l3.index.Of(k,!0))return!1;try{Pn(Z);var T=Z.D;let K=null;for(let y=T.U.length-1;y>=0;y--){const Q=T.U[y];Q.info.Cp>=k&&(T.U.pop(),T.D-=EM(Q,T.policy.r5),K=Q.info)}K&&(T.Y=T.U.length>0?T.U[T.U.length-1].info:T.Sm,T.U.length!==0||T.Y||dd(T,"r"));T.loader.U6("mdstm",{rollbk:1,itag:K?K.l3.info.itag:"",popped:K?K.Cp:-1,sq:k,lastslc:T.Y?T.Y.Cp:-1,lastfraget:T.D.toFixed(3)});if(Z.policy.V)return Z.V=null,!0;a>N?dk(Z,a):Z.V=Z.l3.L(k-1,!1).Vi[0]}catch(K){return k=QA(K),k.details.reason=
"rollbkerr",Z.loader.handleError(k.errorCode,k.details,k.severity),!1}return!0};
fa=function(Z,k,N=!1){Qhr(Z,k,N);k.dispose()};
Gw=function(Z){const k=Z.D.Ql();return k?k.info:hM(Z)};
Sp=function(Z,k){let N;for(N=0;N<Z.U.length&&k!==Z.U[N];N++);if(N===Z.U.length)fa(Z,k);else{for(;N<Z.U.length;)fa(Z,Z.U.pop());var a=Gw(Z);a&&a.l3.C()&&Er(k.info.Vi,T=>cYR(T,a))?(Z.V=a,Z.policy.D&&Z.U6("cer",{lsr:"lsp",
lsp:a.E3()})):(OM(k.info.Vi[0])?(Z.V=k.zF&&k.zF.D?sJ0(k.zF.D):m4y(k.info.Vi[0]),Z.policy.D&&Z.U6("cer",{lsr:Z.V.E3(),lsp:a?.E3()})):(Z.V=null,Z.policy.D&&Z.U6("cer",{lsr:"null",lsp:a?.E3()})),Z.loader.isOffline()&&!Z.policy.g0||fa(Z,k,!0))}};
ep=function(Z){return Oj(Z)||u5(Z.D.Ql()?.info)};
Bb=function(Z){let k=[];const N=hM(Z);N&&k.push(N);k=g.CK(k,Z.D.ew());for(const a of Z.U)for(const T of a.info.Vi)a.l1&&(k=g.Ry(k,K=>!Pyy(K,T))),(OM(T)||T.N())&&k.push(T);
Z.V&&!qwi(Z.V,g.bf(k),Z.V.l3.D())&&k.push(Z.V);return k};
Yqf=function(Z,k){if(!Z.length)return!1;for(k+=1;k<Z.length;k++)if(!rYX(Z[k-1],Z[k]))return!1;return!0};
K5N=function(Z,k,N=!1){let a=-1;for(let T=0;T<Z.length;++T){const K=Z[T];if(K.Y<=k)if(N)a=T;else if(K.startTime+K.duration>=k)return T}return a};
oN=function(Z){return!(!Z.V||Z.V.l3===Z.l3)};
qdy=function(Z,k,N){return Z.policy.V?l5(Z,!0)<N:(Z=Gw(Z))&&!u5(Z)?Z.L>k&&Z.L<k+N:!1};
JM=function(Z){Z.j?.G();Z.N=[]};
Qhr=function(Z,k,N=!1){!k.l1||!N&&k.info.Vi[0].l3.C()||(Z=Z.D,Z.Vz&&!Z.policy.oR&&(k=Z.loader,k.cD.isManifestless&&tl(k.cD,Z.Vz.Cp,!!Z.l3.info.video)),Z.Vz=null,Z.L=null,Z.Y=Z.Kp,Z.D=Z.Y?Z.D-Z.N:NaN,XL(Z))};
roX=function(Z){return!!Z.V&&Z.V.Cp!==-1&&Z.V.Cp<Z.l3.index.N7()};
C_j=function(Z){const k=Z.V;k&&k.Cp===-1&&(Z=Z.D.Ql())&&OM(Z.info)&&(Z=Z.info.Cp,k.j="updateLastSliceRequested",k.Cp=Z)};
mBf=function(Z){return Er(Z.U,k=>k.JS)};
shy=function(Z,k){const N=X6(Z);return N&&N.info.type!==6?!k.Vz(Z,N.info.Cp):!1};
Aoi=function(Z,k){for(const N of Z.N)if(N.segmentNumber===k)return N.uB?2:1;return 0};
coy=function({hasSubfragmentedFmp4:Z=!1,p_:k=!1}={}){const N=new P_y;N.qK=Z||k;return N};
zw=function(Z){return Z.V&&Z.Jd&&Z.playbackStartPolicy};
NcU=function(Z,k,N=!1){k.video.qualityOrdinal>1080&&!Z.dH&&(Z.Sm=36700160,Z.hq=5242880,Z.Rq=Math.max(4194304,Z.Rq),Z.dH=!0);k.video.qualityOrdinal>2160&&!Z.Li&&(Z.Sm=104857600,Z.UH=13107200,Z.Li=!0);g.Q5(Z.Jq.experiments,"html5_samsung_kant_limit_max_bitrate")!==0?k.isEncrypted()&&g.ce()&&g.A5("samsung")&&(g.A5("kant")||g.A5("muse"))&&(Z.UH=g.Q5(Z.Jq.experiments,"html5_samsung_kant_limit_max_bitrate")):k.isEncrypted()&&g.ce()&&g.A5("kant")&&(Z.UH=1310720);Z.y9!==0&&k.isEncrypted()&&(Z.UH=Z.y9);Z.gZ!==
0&&k.isEncrypted()&&N&&(Z.UH=Z.gZ);k.UH&&(Z.fh=Math.max(Z.nm,Math.min(Z.Rq,5*k.UH)))};
Uj=function(Z,k,N=0){return g.Q5(Z.Jq.experiments,k)||N};
b5=function(Z,k,N,a){Z.Jd&&(Z.playbackStartPolicy=k,Z.cL=N,Z.ZR=a)};
Jky=function(Z,k){if(k<0)return!0;const N=Z.hW();return k<N||k===N&&!Z.bN||k===N&&(Z=Z.yR())&&k===Z.Cp?!0:!1};
z_i=function(Z,k,N){if(!Jky(Z,k))return 0;if(!Z.qK||!isNaN(N)&&N>0)return 2;if(k<0)return 1;N=Z.hW();return k<N||k===N&&(Z=Z.yR())&&k===Z.Cp&&!Z.pending?2:1};
Hwf=function(Z,k,N){const a=Z.Mo();if(Z.isComplete()||!a||Z.info.EH.yg(k,N))return 0;const T=k.Ta;if(!T||a<T)return 0;Z=sM(N,VO(Z.info.EH,!0,k));return Z.V||Z.timedOut||Z.started?0:2};
dB0=function(Z,k,N){if(!(k.Wy&&Z.isComplete()&&Z.canRetry()&&Z.info.EH.yg(k,N))||Z.info.EH.N)return 0;Z=sM(N,VO(Z.info.EH,!1,k));return Z.D+k.Wy*Pq(Z,!0)>(0,g.z)()?0:1};
RN=function(Z,k,N){if(Z.policy.j9)return!1;var a=Z.V;var T=k.V?.zt()||-1;a.U===3&&T+1>=a.Y?(a.U6("sdai",{haltrq:T+1,est:a.Y}),a=!1):a=a.U!==2;if(!a||!(k.V?k.V.l3.EH:k.l3.EH).j(Z.policy,Z.D,Z.loader.Wl)||Z.loader.isSuspended&&(!pa(Z.schedule)||Z.loader.kt))return!1;if(Z.policy.Y&&yr>=5)return Z.loader.ws.XN(),!1;if(Z.cD.isManifestless){if(k.U.length>0&&k.V&&k.V.Cp===-1||k.U.length>=Z.policy.WN||!Z.policy.RX&&k.U.length>0&&!Z.policy.j.qK)return!1;if(k.G)return!Z.cD.isLive||!isNaN(Z.oJ)}if(mBf(k))return!1;
if(!k.V){if(!k.l3.V())return!1;dk(k,Z.loader.getCurrentTime())}if(X6(k)&&(k.Ql()!==X6(k)||Z.loader.isSuspended))return!1;T=(a=Z.policy.Nb)&&!k.U.length&&l5(k,!0)<Math.min(a,l5(N));a=k.U.length+N.U.length;var K=(k.U.length?k.U[0].EL():!1)||(N.U.length?N.U[0].EL():!1)||Z.cD.isLive;(T||K)&&--a;if(a+1>=Z.policy.gN)return!1;a=k.V;if(!a)return!0;a.N()&&a.l3.V()&&(k.V=g.bf(a.l3.FS(a)),a=k.V);if(!a.G()&&!a.l3.Y(a))return!1;K=Z.cD.M4||Z.cD.U;if(Z.cD.isManifestless&&K){K=k.l3.index.hW();var y=N.l3.index.hW();
K=Math.min(K,y);if(k.l3.index.qQ()>0&&K>0&&a.Cp>=K)return k.xW=K,N.xW=K,!1}if(a.l3.info.audio&&a.N()||a.G())return!1;K=!k.Y&&!N.Y;if(T=!T)T=a.L,T=!!(N.V&&!u5(N.V)&&N.V.L<T);y=k===Z.videoTrack&&Z.policy.FS;return T&&(!Z.cD.isManifestless||N.V&&N.V.L&&a.L)&&K&&!y||Z.policy.Tt&&!k.Y&&N.Y?!1:OM(a)&&a.L>X7G(Z,k)?(X7G(Z,k),!1):(Z=k.w5)&&Z.isLocked()?!1:!0};
Zn=function(Z,k){Z.loader.Nr(k);var N=HZ0(k),a=Z.loader.N_();N={SY:Z.schedule,AT:N,DA:XtN(Z.Y,N),rR:DT(k.Vi[0]),fZ:cq(7,5764,k.EH.V),zJ:Z.policy.D,QQ:(T,K)=>{Z.loader.kQ(T,K)}};
Z.schedule.U.G&&(N.Zo=(Z.videoTrack.l3?.info.UH||0)+(Z.audioTrack.l3?.info.UH||0));Z.PZ&&(N.Cp=k.Vi[0].Cp,N.oJ=k.oJ,N.PZ=Z.PZ);a={PT:d40(k,Z.loader.getCurrentTime()),uY:Z.policy.gQ&&xF(k)&&k.Vi[0].l3.info.video?cCG(Z.U):void 0,hv:Z.policy.FS,poToken:Z.loader.nP(),Ll:Z.loader.pT(),V3:Z.V3,hQ:isNaN(Z.hQ)?null:Z.hQ,aU:Z.aU,g9:Z.g9,Kh:a};return new AA(Z.policy,k,N,Z.D,(T,K)=>{try{a:{const Ki=T.info.Vi[0].l3,yf=Ki.info.video?Z.videoTrack:Z.audioTrack;if(!(T.state>=2)||T.isComplete()||T.Mo()||!(!Z.loader.b3||
Z.loader.isSuspended||l5(yf)>3)){const Jy=Hwf(T,Z.policy,Z.D);Jy===1&&(Z.O=!0);L5G(Z,T,Jy);if(T.isComplete()||T.jm()&&K<3){if(Z.policy.D){const hy=T.timing.N();hy.rst=T.state;hy.strm=T.xhr.N8();hy.cncl=T.xhr&&T.BI.L?1:0;Z.loader.U6("rqs",hy)}T.yk&&Z.loader.U6("sbwe3",{},!0)}if(!Z.jm()&&T.state>=2){U8y(Z.timing,T,Ki);var y=Z.loader;Z.hQ&&T.i$&&y&&(Z.hQ=NaN,Z.loader.Lo(T.i$),Z.loader.d7(),Z.loader.U6("cabrUtcSeek",{mediaTimeSeconds:T.i$}));T.ME&&Z.hQ&&T.ME&&!T.ME.action&&(Z.loader.zq(Z.hQ),Z.hQ=NaN,
Z.loader.U6("cabrUtcSeekFallback",{targetUtcTimeSeconds:Z.hQ}));T.Tx&&Z.loader.Er(T.Tx);Z.policy.bq&&(Z.g9=T.g9);if(T.state===3){Sp(yf,T);xF(T.info)&&Ml(Z,yf,Ki,!0);if(Z.uq){const hy=T.info.cM();hy&&Z.uq.DT(T.info.Vi[0].Cp,Ki.info.id,hy)}Z.loader.F6()}else if(T.isComplete()&&T.info.Vi[0].type===5){if(T.state!==4)T.vZ()&&Z.loader.handleError(T.zQ(),T.Yi());else{var Q=(T.info.Vi[0].l3.info.video?Z.videoTrack:Z.audioTrack).U[0]||null;Q&&Q instanceof AA&&Q.Mo()&&Q.q8()}T.dispose()}else{if(!T.vZ()&&T.JS&&
T.state>=2&&T.state!==3){var q=T.xhr.getResponseHeader("X-Response-Itag");if(q){var r=P2i(Z.U,q),C=T.info.D;if(C){var m=C-r.Sm();r.Vz=!0;T.info.Vi[0].l3.Vz=!1;var A=r.j(m);T.info=A;if(T.zF){var P=T.zF,d=A.Vi;(d.length!==P.Vi.length||d.length<P.K8.length)&&g.pG("dash/request",260511119,`${d.length}`,`${P.Vi.length}`,`${P.K8.length}`);P.Vi=d;const hy=d[0].range,zf=new h8;for(K=0;K<P.K8.length;K++)Cv(zf,P.K8[K].U);for(K=0;K<P.K8.length;K++){P.K8[K].info=d[K];const MR=d[K].range;P.K8[K].U=m4(zf,MR.start-
hy.start,MR.length)}}T.JS=!1;na(Z.loader,Z.videoTrack,r);var h=Z.videoTrack;h.V&&(h.V.l3=r);Z.loader.z6(r.info.video.quality);var B=T.N6();B&&r.info.lastModified&&r.info.lastModified!==+B&&Sp(Z.videoTrack,T)}}else T.JS=!1}T.aO?.itagDenylist&&Z.loader.lY(T.aO.itagDenylist);if(T.state===4)IN(Z,T),Z.V&&Z.V.FS(T.info,Z.uq);else if(Z.policy.VP&&T.Ef()&&!T.isComplete()&&!IN(Z,T)&&!T.vZ())break a;if(T.vZ()){const hy=T.info.Vi[0].l3,zf=T.zQ();if(cq(3,5760,hy.EH.V)){const Ur=g.BF(T.qR(),3);Z.loader.U6("dldbrerr",
{em:Ur||"none"})}const MR=T.info.Vi[0].Cp,OD=nn(Z.V,T.info.Vi[0].Y,MR);zf==="net.badstatus"&&(Z.L+=1);if(T.canRetry()&&jp(Z.loader)){if(!(T.info.EH.U>=Z.policy.ST&&Z.uq&&T.info.isDecorated()&&zf==="net.badstatus"&&Ej(Z.uq,OD,MR))){var v=(hy.info.video&&hy.EH.U>1||T.B9===410||T.B9===500||T.B9===503)&&!(E2(Z.U.L).size>0)&&!cq(27,5784,hy.EH.V),O=T.Yi(),x=hy.info.video?Z.videoTrack:Z.audioTrack;v&&(O.stun="1");Z.loader.handleError(zf,O);Z.jm()||(v&&Tw(Z.U,hy),Sp(x,T),Z.loader.F6())}}else r=1,Z.uq&&T.info.isDecorated()&&
zf==="net.badstatus"&&Ej(Z.uq,OD,MR)&&(r=0),Z.cD.isLive&&T.zQ()==="net.badstatus"&&Z.L<=Z.policy.YH*2?(hKX(Z.cD),Z.cD.M4||Z.cD.isPremiere?F6(Z.loader,0,{b0:"badStatusWorkaround"}):Z.cD.U?F6(Z.loader,Z.cD.aE,{b0:"badStatusWorkaround",Sh:!0}):Wb(Z.loader)):Z.loader.handleError(zf,T.Yi(),r);isNaN(Z.hQ)||(Z.loader.zq(Z.hQ),Z.hQ=NaN)}Z.policy.HA&&!T.isComplete()?YR(Z.loader):Z.loader.F6();var e=dB0(T,Z.policy,Z.D);L5G(Z,T,e)}}}}}catch(Ki){e=Z.Vz?1:0,Z.Vz=!0,T=Kf(e),e=QA(Ki,e),Z.loader.handleError(e.errorCode,
e.details,e.severity),T||Z.loader.NA()}},a)};
F5y=function(Z,k,N){if(RN(Z,k,N)){N=Z.G(k,N);if(Z.uq){var a=N.Vi[0].l3.info.id;var T=Z.V;var K=N.Vi[0].Cp;T=K<0&&!isNaN(T.L)?T.L:K;K=nn(Z.V,N.Vi[0].Y,T);const q=k===Z.audioTrack?1:2,r=N.Vi[0].l3.info.gA,C=a.split(";")[0];a:{var y=Z.V;if(y.V){var Q=y.V.lX.event;if(y.V.Cp===T){y=Q==="predictStart"?void 0:y.V.lX.event;break a}if(y.V.Cp===T-1){y=Q==="start"||Q==="continue"?Q:void 0;break a}}y=void 0}if(Z.policy.vD&&Z.V.U!==0)a=g.V$f(Z.uq,K,T,a,q,r,y),T<0&&q===2&&IG(Z.V,0,0,!0),a&&(Z.loader.U6("sdai",
{ssdaiinfo:"1",ds:a.Ib?.wG||"",skipsq:a.Ib?.NE||-1,itag:C,f:r,sg:T,st:K.toFixed(3)}),N.Y=a);else if(a=Z.uq.cM(K,T,a,q,r,y),T<0&&q===2&&IG(Z.V,0,0,!0),a){K={dec_sq:T,itag:C,st:K.toFixed(3)};if(Z.policy.He&&k.isRequestPending(T-1)){Z.loader.U6("sdai",{wt_daistate_on_sg:T-1});return}Z.loader.U6("sdai",K);a&&(N.V=new g.hY(a));Z.policy.D&&(T=N.EH.AM("id")||"",a=N.V?.get("id")||"",T!==a&&Z.loader.U6("stmidmismatch",{cid:T,aid:a}))}else Z.V.U!==5&&Z.loader.U6("sdai",{nodec_sq:T,itag:C,st:K.toFixed(3)})}Z.policy.TU&&
N.Vi[0].Cp!==-1&&N.Vi[0].Cp<Z.cD.Y8&&(N=k.l3.L(Z.cD.Y8,!1));i5(k,Zn(Z,N));U2(Z.timing);Z.j?.V(N.EH)}};
X7G=function(Z,k){var N=Z.V;N=N.V?N.V.lX:null;if(Z.policy.FS&&N)return N.startSecs+N.Xl+15;k=Hn(Z.loader,k);Z.policy.qX>0&&(N=((0,g.z)()-Z.loader.fJ)/1E3,k=Math.min(k,Z.policy.qX+Z.policy.KN*N));k=Z.loader.getCurrentTime()+k;return Z.policy.ai&&(N=t$f(Z.loader)+Z.policy.ai,N<k)?(Z.loader.U6("mrl",{ori:k,mod:N},!0),Z.policy.UX&&kY(Z.loader),N):k};
L5G=function(Z,k,N){if(N!==0){a:if(k=k.info,N=N===2,k.V)k=null;else{var a=k.Vi[0];if(k.range)var T=lI(k.range.start,Math.min(4096,k.D));else{if(k.U&&k.U.indexOf("/range/")>=0||k.EH.AM("defrag")==="1"||k.EH.AM("otf")==="1"){k=null;break a}T=lI(0,4096)}T=new zH([new g5(5,a.l3,T,"createProbeRequestInfo"+a.j,a.Cp)],k.U);T.yg=N;T.V=k.V;k=T}k&&Zn(Z,k)}};
Ml=function(Z,k,N,a){if(!(N.V()||N.dA()||N.Vz||!N.EH.j(Z.policy,Z.D,Z.loader.Wl)||N.info.gA==="f"||Z.policy.V)){if(a){a=Z.Y;var T=N.info;a=LzR(a,T.video?a.policy.us:a.policy.J0,T.UH)}else a=0;a=N.j(a);Z=Zn(Z,a);$F(a)&&i5(k,Z);N.Vz=!0}};
IN=function(Z,k){if(Z.policy.useUmp&&k.jm())return!1;try{var N=k.info.Vi[0].l3;const y=N.info.video?Z.videoTrack:Z.audioTrack;var a=y;if(Z.cD.isManifestless&&a){Z.L=0;a.G&&(k.jm(),k.isComplete()||k.Ef(),a.G=!1);k.jt()&&Z.loader.LS.wr(1,k.jt());var T=k.qQ(),K=k.cK();hl(Z.cD,T,K)}if(k.info.rR()&&!$F(k.info))for(const q of k.bA())aXy(y,q);a=y;for(Z.loader.getCurrentTime();a.U.length&&a.U[0].state===4;){const q=a.U.shift();NzX(a,q);a.vD=q.CM()}a.U.length&&NzX(a,a.U[0]);const Q=!!X6(y);Q&&k instanceof
s2&&(N.info.H9()?zPN(Z.timing):Jff(Z.timing));return Q}catch(y){k=k.Yi();k.origin="hrhs";a:{Z=Z.loader;N=y;if(N instanceof Error){k.msg||(k.msg=`${N.message}`);k.name||(k.name=`${N.name}`);if(N instanceof g.jD&&N.args)for(const [Q,q]of Object.entries(N.args))k[`arg${Q}`]=`${q}`;g.L9(N);if(N.level==="WARNING"){Z.fp.HF(k);break a}}Z.handleError("fmt.unplayable",k,1)}return!1}};
u$X=function(Z){const k=Z.videoTrack.l3.index;Z.PZ=new hur({bN:Z.policy.bN,qK:Z.policy.j.qK,L3:k.dK(),hW:()=>k.hW(),
yR:()=>k.yR()})};
lXX=function(Z,k,N=0,a){k!==Z.Y&&(Z.Y&&(Z.xW=!0),Z.Y=k,Z.Lz(k,Z.videoTrack,N,a))};
fXb=function(Z){if(Z.U?.isLocked())return Z.videoInfos;const k=E2(Z.V);let N=g.Ry(Z.videoInfos,a=>a.UH>Z.BG.UH?!1:!k.has(a.id));
Z.V.iC()&&(N=g.Ry(N,a=>a.video.width<=854&&a.video.height<=480));
return N};
Bzy=function(Z,k){const N=[];for(const a of k)N.push(g.ot(a,Z.cD.Rn));return N};
DBR=function(Z,k,N=0,a){if(Z.j&&k!==Z.L)return!0;Z.j=!1;k!==Z.L&&(Z.L=k,Z.Lz(k,Z.audioTrack,N,a));return!1};
OwX=function(Z,k){return Z.BG.oY&&k.reason==="l"||Z.BG.Ay?!1:Z.BG.Wx?!0:k.reason==="l"||k.reason==="b"||k.reason==="o"};
viX=function(Z,k){const N=Z.V.V;if(N){Z.videoInfos=Z.G;var a=g.ZD(Z.videoInfos,T=>T.id===N);
a&&a.video.qualityOrdinal===k?Z.videoInfos=[a]:(a=Z.videoInfos.map(T=>T.id),Z.loader.U6("sabrpf",{pfid:`${N}`,
vfids:`${a.join(".")}`}),NX(Z,k,k),Wn(Z.V,""))}else NX(Z,k,k)};
NX=function(Z,k,N){Z.videoInfos=Z.G;Z.videoInfos=g.Ry(Z.videoInfos,a=>a.video.qualityOrdinal>=k&&a.video.qualityOrdinal<=N)};
iwG=function(Z,k){Z.BG.tq()&&(Z.zt=k.reason==="m"||k.reason==="l"?!0:!1);k.reason==="m"?k.isLocked()&&viX(Z,k.V):OwX(Z,k)?NX(Z,k.U,k.V):Z.videoInfos=Z.G;Z.N=!0;Z.U=k};
aR=function(Z,k){return Z.map(N=>Fm(g.ot(N,k)))};
gii=function(Z,k,N){if(Z.C){var a=g.Ry(Z.D,T=>T.id===Z.C);
return aR(a,N).includes(k)}a=g.Ry(Z.D,T=>!!T.ZF?.isDefault);
return a.length>0?aR(a,N).includes(k):aR(Z.D,N).includes(k)};
Tv=function(Z,k,N=!1){WvX(Z.V,k,N)};
$By=function(Z,k,N,a){const T=Z.cD;var K=Z.fp.getVideoData(),y=Z.vJ;const Q=LvU({SY:Z.SY,Jq:K.X(),fp:Z.fp,qM:Z.qM,BG:Z.BG,Mt:Z.Mt,Xz:Z.Xz,jb:Z.jb,cN:Z.cN,Xs:Z.Xs,Km:Z.Km,r6:Z.r6,sabrLicenseConstraint:K.sabrLicenseConstraint,HV:Z.HV,Mw:Z.Mw,q$:Z.q$,gK:Z.gK,aY:!!y,authorizedFormats:K.authorizedFormats,Ko:Z.Ko,iC:Z.iC,Fz:Z.Fz,rg:Z.rg}),q=G0(K,Z.Kh,Z.nextRequestPolicy,Z.B7,Z.w2,Z.m$,Z.XO);N&&k&&(N=q.BN?q.BN.map(m=>m.type):[],k("sabr",{stmctxt:N.join("_"),
unsntctxt:q.fu?q.fu.join("_"):""}));k=Z.GA;N=Z.EU;N===void 0&&k===void 0&&(N=w7X(T.Rn,Z.S5?.video),k=w7X(T.Rn,Z.S5?.audio));let r;K.aU&&(r=K.aU);let C;(K=Z.BG?.OU)&&K>0&&(Z.Fz||Z.Kc)&&(C=new Uint8Array(K));y={ob:Q,Md:Z.Md,GA:k,EU:N,vJ:y,videoPlaybackUstreamerConfig:r,wj:q,dM:C};a&&Z.uv?Z.uv.length>0&&(y.uv=Z.uv):Z.Ib&&(y.Ib=Z.Ib);Z.BG?.tq()&&!jx()&&(Z.cO&&(y.cO=Z.cO),Z.C_&&(y.C_=Z.C_));y.jI=Z.jI;y.EC=T.s6;return y};
w7X=function(Z,k){return k?[g.ot(k.info,Z)]:[]};
GKi=function(Z,k,N){k=LG(Z.EH,xB0(Z,k,N),k);Z.Wv()&&k.set("probe","1");return k};
K8=function(Z){const k={},N=[],a=[];if(!Z.data)return k;for(var T=0;T<Z.data.jI.length;T++){var K=Z.data.jI[T];N.push(`i.${K.formatId?.itag}_st.${K.startTimeMs}_e.${K.startTimeMs+K.durationMs}_d.${K.durationMs}_sn.${K.Uq}_en.${K.e9}`)}for(T=0;T<Z.data.Md.length;T++)K=Z.data.Md[T],a.push(`i.${K.formatId?.itag}_sn.${K.sequenceNumber}_sl.${K.Tk||NaN}_lb.${K.gx}_tr.s_${K.Rw?.startTicks}_d_${K.Rw?.Sf}_t_${K.Rw?.timescale}_ed_${K.dP}`);k.ptime=Z.V?.ob?.s0||0;k.rtype=Z.requestType;k.brl=N.join(";");k.ps=
a.join(";");return k};
xB0=function(Z,k,N){Z.yg===void 0&&(Z.yg=Z.EH.yg(k,N));return Z.yg};
Q1=function(Z,k,N){const a=Z.V.V?.encrypt(k,N);return a?a:(new y1(Z.V.U)).encrypt(k,N)};
eub=async function(Z,k,N){{var a=Z.V;const T=yq();a=T?new SdX(a.U,T):void 0}if(a)try{return await a.encrypt(k,N)}catch(T){}return Q1(Z,k,N)};
oif=async function(Z,k){(0,g.z)();return Z.V.V?eub(Z,k,Z.iv):PtG(Z.V).encrypt(k,Z.iv)};
Joj=function(Z,k){(0,g.z)();return Z.V.V?.U(k,Z.iv)};
UBf=async function(Z,k){(0,g.z)();var N=Z.V;N.L||(N.L=new zuf(N.D));return sej(N.L,k,Z.iv)};
bwy=async function(Z,k,N){(0,g.z)();return Z.V.V?eub(Z,k,N):PtG(Z.V).decrypt(k,N)};
Rui=function(Z,k){var N=k?.primary;qX(Z,0,N);N=N?p7b(N):void 0;qX(Z,2,N);qX(Z,1,k?.secondary)};
rB=function(Z,k,N=!1){return new g.hY(`${N?"http":"https"}://${k}${Z.kW.jY.baseUrl}`)};
qX=function(Z,k,N){N?(N=N instanceof g.hY?N:rB(Z,N),Z.V.get(k)?.V()!==bY(86,6472,N)&&Z.V.set(k,new M$y(N,k))):Z.V.delete(k)};
p7b=function(Z){return Z.replace(/(\d+)---/g,(k,N)=>{k=Number(N);return`${k===1?2:k-1}---`})};
nii=function(Z,k=!1,N){var a=Zf(Z.kW.experiments,"debug_bandaid_hostname");return a?(k=g.Q5(Z.kW.experiments,"debug_bandaid_port"),a=k>0?`${a}:${k}`:a,k=Z.kW.experiments.yz("debug_bandaid_insecure_scheme"),rB(Z,a,k)):k&&N?.url&&!Z.U?(a=bY(46,6448,new g.hY(N.url)),rB(Z,a)):Z.V.get(0)?.location.clone()};
mM=async function(Z,k){var N=rB(Z,"redirector.googlevideo.com");N.set("alr","yes");N.set("id",`${Math.round(Math.random()*1E5)}`);if(k===1||k===2)N.set("cmo=sensitive_content","yes"),N.set("sc","yes");k===2&&N.set("cmo=td","c.youtube.com");var a=await pb(N.mH(),{format:"RAW",timeout:5E3});if(a.xhr.status!==200||!a.xhr.responseText)return Promise.reject(new g.jD("b204258371_no_host",N.mH(),a.xhr.status));var T=new g.hY(a.xhr.responseText);N=bY(22,6408,T);a=T.get("ms");Z=rB(Z,N);T=T.get("mm");Z.set("ms",
a);Z.set("mm",T);return N&&IXj(N)?k!==2||C8(N)?Z:Promise.reject(new g.jD("b204258371_untrusted",N,a)):Promise.reject(new g.jD("b204258371_invalid",N,a))};
jhU=function(Z,k){Z=`https://${k.V()}/initplayback?c=${Yy(Z.kW)}`+"&owc=1";Kn(Z,"pw",N=>{N.ht=k.U})};
sY=function(Z,k,N,a){Kn(`https://${k}${"/videoplayback?probe=1"}`,N,T=>{!a.B("html5_onesie_host_racing")||a.videoData.isLivePlayback||a.B("html5_onesie_probe_ec_hosts")||a.F9||a.dg();Z.D.push(T)},T=>{Z.D.push(T.details)})};
IXj=function(Z){return/.*(\.c\.youtube\.com|.*\.googlevideo\.com)/.test(Z)};
C8=function(Z){const k=/sn-[^.]*-/;return/.*\.c\.youtube\.com/.test(Z)&&!k.test(Z)};
Ad=function(Z){for(;Z.V.length&&!Z.V[0].isEncrypted;){const {videoId:N,gR:a,formatId:T,buffer:K,Xy:y}=Z.V.shift();if(K)Z.Fq.u3.Ob?.get(N)?.V(a,T,K);else if(y)Z.Fq.u3.j7(N,a,T);else{var k=Z.Fq;k.V[T].OG=!0;k=k.u3.Ob?.get(N);k?.Vb(T)&&k?.U(T)}}};
g.ZsX=function(Z){for(;!Z.Y&&!Z.error;){var k=Z;k.Y=!!PD(k,1);switch(PD(k,2)){case 2:var N=void 0,a=[],T=[];T.length=19;T.fill(0);var K=PD(k,5)+257;N=PD(k,5)+1;var y=PD(k,4)+4;for(var Q=0;Q<y;Q++)T[Eiy[Q]]=PD(k,3);T=cD(T);for(y=K+N;a.length<y;){Q=W5j(k,T);let q;switch(Q){case 16:Q=a[a.length-1];q=PD(k,2)+3;break;case 17:Q=0;q=PD(k,3)+3;break;case 18:Q=0;q=PD(k,7)+11;break;default:q=1}for(;q>0;q--)a.push(Q)}a.length!==y?k.error=!0:(N=a.slice(-N),a.length=K,Ydr(k,a,N));break;case 1:Ydr(k,HD,dB);break;
case 0:X2(k,k.V&7);a=PD(k,16);K=PD(k,16);(a^K)!==65535&&(k.error=!0);k.output.set(k.data.subarray(k.U,k.U+a),k.D);k.U+=a;k.D+=a;break;default:k.error=!0}Z.D>Z.output.length&&(Z.output=new Uint8Array(Z.D*2),Z.D=0,Z.U=0,Z.Y=!1,Z.V=0,Z.register=0)}Z.output.length!==Z.D&&(Z.output=Z.output.subarray(0,Z.D));return Z.error?new Uint8Array(0):Z.output};
PD=function(Z,k){for(;Z.V<k;){if(Z.U>=Z.data.length)return Z.error=!0,0;Z.register|=Z.data[Z.U++]<<Z.V;Z.V+=8}const N=Z.register&(1<<k)-1;Z.register>>=k;Z.V-=k;return N};
Ydr=function(Z,k,N){k=cD(k);N=cD(N);const a=Z.data,T=Z.output;let K=Z.D;for(var y=Z.register,Q=Z.V,q=Z.U;;){if(Q<15){if(q>a.length){Z.error=!0;break}y|=(a[q+1]<<8)+a[q]<<Q;q+=2;Q+=16}var r=k[y&127];if(r<0)for(y>>=7;r<0;)r=k[(y&1)-r],y>>=1;else y>>=r&15;Q-=r&15;r>>=4;if(r<256)T[K++]=r;else if(Z.register=y,Z.V=Q,Z.U=q,r>256){y=L8[r];y+=PD(Z,V1[r]);q=W5j(Z,N);Q=F2[q];Q+=PD(Z,td[q]);if(k8R&&y<Q)Q=K-Q,T.copyWithin(K,Q,Q+y);else for(q=K+y,r=K;r<q;r+=4)T[r]=T[r-Q],T[r+1]=T[r-Q+1],T[r+2]=T[r-Q+2],T[r+3]=
T[r-Q+3];K+=y;y=Z.register;Q=Z.V;q=Z.U}else break}Z.D=K};
W5j=function(Z,k){if(Z.V<7){var N=Z.data;const a=Z.U;a>N.length&&(Z.error=!0);Z.register|=(N[a+1]<<8)+N[a]<<Z.V;Z.U+=2;Z.V+=16}N=k[Z.register&127];if(N>=0)return X2(Z,N&15),N>>4;for(X2(Z,7);N<0;)N=k[PD(Z,1)-N];return N>>4};
X2=function(Z,k){Z.V-=k;Z.register>>=k};
cD=function(Z){var k=[];for(var N of Z)k[N]||(k[N]=0),k[N]++;var a=k[0]=0;N=[];var T=0,K=0;for(var y=1;y<k.length;y++)k[y]?K=y:k[y]=0,a=a+k[y-1]<<1,N[y]=a,y>7&&(T+=k[y]);for(a=1;a<T;)a<<=1;k=128;K=new Int16Array(128+(a+K)*2);for(T=0;T<Z.length;T++){y=Z[T];if(!y)continue;var Q=N[y]++;a=0;for(var q=0;q<y;q++)a=a<<1|Q>>q&1;Q=T<<4|y;if(y<=7)for(q=1<<7-y;q--;)K[q<<y|a]=Q;else{q=a&127;y-=7;for(a>>=7;y--;){K[q]||(K[q]=-k,k+=2);const r=a&1;a>>=1;q=r-K[q]}K[q]=Q}}return K};
hd=function(Z,k){Z.U(`${"dcmprs"}_${Z.context}_${Z.V}_${"gz"}_${k}`)};
Ngr=function(Z,k){return xi(Z,function(){const N=this;return function*(){let a;const T=Date.now();try{hd(N,"s");var K=yield*GK(k());if(!K)throw Error("no result");hd(N,"e");return K}catch(y){throw hd(N,"f"),a=y,N.QV(a,"gz"),y;}finally{K=Date.now(),N.BA("gz",K-T,a)}}()})};
QV0=function(Z,k,N,a){return xi(void 0,function(){return function*(){const T=(K,y)=>Ngr(new abG(K,N,a),()=>Od(y(Z)));
if(uP)try{return yield*GK(T("n",Tgy))}catch(K){}if(k)try{return yield*GK(T(k.V?"a":"w",K=>Kab(K,k)))}catch(K){}return yield*GK(T("p",yQj))}()})};
Tgy=async function(Z){if(!uP)throw Error("DecompressionStream is not supported");const k=KQ.uD();var N=new DecompressionStream("gzip");const a=N.writable.getWriter();a.write(Z);a.close();Z=N.readable.getReader();for(N=new h8([]);;){const {value:T,done:K}=await Z.read();if(K)break;N.append(T)}Z=A8(N);KQ.NL("gznb",k,Math.ceil(Z.byteLength/16));return Z};
yQj=function(Z){const k=KQ.uD();Z=g.ZsX(new g.qRX(Z));KQ.NL("gzjb",k,Math.ceil(Z.byteLength/16));return Z};
Kab=function(Z,k){const N=KQ.uD();Z=k.uh(Z);let a;try{const T=Z.byteOffset,K=Z.byteLength,y=k.exports.getInflatedSize(T,K);if(y===0)throw Error("wasm_gz: bad input");const Q=k.malloc(y),q=k.exports.inflateGzip(T,K,Q);if(q)throw k.free(Q),Error(`wasm_gz: fail${q}`);a=new Uint8Array(k.exports.memory.buffer,Q,y)}finally{k.free(Z.byteOffset)}k=k.Oo(a);KQ.NL("gzwb",N,Math.ceil(k.byteLength/16));return k};
lP=function(Z){var k=Z.queue;k.V.length&&k.V[0].isEncrypted&&!k.U&&(k.V.length=0);for(const N of Object.keys(Z.V)){const a=Z.V[N];a.OG||(k=Z.queue,k.V.push({videoId:a.videoId,formatId:N,isEncrypted:!1}),k.U||Ad(k))}};
rQN=function(Z,k){const N=k.totalLength;let a=!1;switch(Z.D){case 0:Z.e4(k,Z.Y).then(T=>{var K=Z.u3;K.dD("oprr");K.playerResponse=T;K.JN||(K.L7=!1);f8(K)},T=>{Z.u3.fail(T)});
break;case 2:Z.dD("ormk");k=A8(k);Z.queue.decrypt(k);break;default:a=!0}Z.u3.FL&&Z.u3.U6("ombup",`id.${11};pt.${Z.D};len.${N}${a?";ignored.1":""}`);Z.D=null};
Cq0=function(Z,k){Z.u3.dD("oprgz2_s");k=QV0(k,Z.u3.X().s6,Z.u3.FL?Z.u3.U6.bind(Z.u3):()=>{},N=>{Z.u3.dD(N)});
gz(k,()=>{Z.u3.dD("oprgz2_e")},()=>{Z.u3.dD("oprgz2_f")});
return k};
mrf=async function(Z,k){Z.u3.dD("oprgz_s");if(uP)try{var N=await Tgy(k);Z.u3.dD("oprgz_n");Z.u3.U6("oprsgz",{i:"n"});return N}catch(a){Z.u3.U6("gzerr",{impl:"native",err:`${a}`})}if(N=Z.u3.X().s6)try{const a=Kab(k,N);Z.u3.dD("oprgz_w");Z.u3.U6("oprsgz",{i:"w"});return a}catch(a){Z.u3.U6("gzerr",{impl:"wasm",err:`${a}`})}k=yQj(k);Z.u3.dD("oprgz_p");Z.u3.U6("oprsgz",{i:"j"});return k};
sVy=function(Z){return new Promise(k=>{setTimeout(k,Z)})};
AQy=function(Z,k){var N=Z.X();N=Z.rD&&N.B("html5_onesie_preload_use_content_owner");if((k=nii(k,N,Z.Pg))&&Z.videoId){Z=rr(Z.videoId);N=[];if(Z)for(const a of Z)N.push(a.toString(16).padStart(2,"0"));k.set("id",N.join(""));return k}};
Pq0=async function(Z,k,N=0){const a=[];a.push(k.load());N>0&&a.push(sVy(N));await Promise.race(a);return AQy(Z,k)};
cQ0=function(Z,k,N,a=!1){Z.set("cpn",k.clientPlaybackNonce);Z.set("opr","1");const T=k.X();Z.set("por","1");yq()||Z.set("onem","1");k.startSeconds>0&&Z.set("osts",`${k.startSeconds}`);a||(T.B("html5_onesie_disable_partial_segments")&&Z.set("oses","1"),k=T.B("html5_gapless_onesie_no_media_bytes")&&vZ(k)&&k.rD,N&&!k?(k=N.audio,Z.set("pvi",N.video.join(",")),T.B("html5_onesie_disable_audio_bytes")||Z.set("pai",k.join(",")),s1||Z.set("osh","1")):(Z.set("oad","0"),Z.set("ovd","0"),Z.set("oaad","0"),Z.set("oavd",
"0")))};
Hs0=function(Z,k,N,a,T=!1){const K=`${"https://youtubei.googleapis.com/youtubei/"}${k.LX.innertubeApiVersion}/player`,y=[{name:"Content-Type",value:"application/json"}];a&&y.push({name:"Authorization",value:`Bearer ${a}`});y.push({name:"User-Agent",value:g.qG()});g.G("EOM_VISITOR_DATA")?y.push({name:"X-Goog-EOM-Visitor-Id",value:g.G("EOM_VISITOR_DATA")}):(N=N.visitorData||g.G("VISITOR_DATA"))&&y.push({name:"X-Goog-Visitor-Id",value:N});(N=g.G("SERIALIZED_LAVA_DEVICE_CONTEXT"))&&y.push({name:"X-YouTube-Lava-Device-Context",
value:N});(k=Zf(k.experiments,"debug_sherlog_username"))&&y.push({name:"X-Youtube-Sherlog-Username",value:k});Z=t8(JSON.stringify(Z));return{url:K,v7:y,postBody:Z,ek:T,Cd:T}};
BD=function(Z,k,N,a,T,K,y,Q,q){const r=Z.D7,C=Z.tX;Z=Z.DK;var m=r!==void 0&&C!==void 0;const A=a.getVideoData();var P=k.V.encryptedClientKey;k=m?k.iv:void 0;m=yK(K,!0);T=T||!!yq()&&m>1572864;return{innertubeRequest:{x$:Z,Lq:r,tX:C,encryptedClientKey:P,iv:k,GS:!0,D6:!0,VS:"DecompressionStream"in window||!T,Sg:N.experiments.yz("html5_use_jsonformatter_to_parse_player_response")},ob:LvU({SY:K,Jq:N,fp:a,qM:A.startSeconds*1E3,jC:!0}),onesieUstreamerConfig:y,by:Q,wj:G0(A),reloadPlaybackParams:A.LX?.reloadPlaybackParams,
B2:q}};
drU=function(Z,k,N,a,T,K,y,Q){const q=g.SV(Z,VA);let r;var C;Z.Cd||((C=Joj(k,q))?(r=C.D8,C=C.signature):(C=r=k.encrypt(q),(0,g.z)(),C=yWU(new COf(k.V.D),C,k.iv)));return BD(r&&C?{D7:r,tX:C}:{DK:q},k,N,a,!!Z.Cd,T,K,y,Q)};
Xof=async function(Z,k,N,a,T,K,y,Q){var q=g.SV(Z,VA);q=await oif(k,q);const r=await UBf(k,q);return BD({D7:q,tX:r},k,N,a,!!Z.Cd,T,K,y,Q)};
Laf=function(Z,k,N,a,T,K,y,Q){var q=g.SV(Z,VA);if(q=Joj(k,q))return BD({D7:q.D8,tX:q.signature},k,N,a,!!Z.Cd,T,K,y,Q)};
FaU=async function(Z,k,N){Z.dD("oprd_s");k=VwU(Z)?await bwy(Z.Ps,k,N):Z.Ps.decrypt(k,N);Z.dD("oprd_c");return k};
Dn=function(Z){if(!Z.O3)return{};const k=Z.O3.N();k.d=Z.O3.tq?.W9();k.shost=Z.Ct;k.ty="o";return k};
VwU=function(Z,k){return Z.B("html5_onesie_sync_request_encryption")||k?.Cd?!1:!!yq()};
twU=function(Z){return Z.B("html5_onesie_host_probing")||Z.FL?s1:!1};
f8=function(Z){if(!Z.playerResponse)return!1;if(Z.RO)return!0;var k=Z.videoData.B("html5_onesie_audio_only_playback")&&ie(Z.videoData);if(Z.Ob&&Z.L7){if(!Z.Ob.has(Z.Rk))return!1;const a=Z.Ob.get(Z.Rk);var N;if(N=a){N=!1;for(const T of a.yn.keys()){const K=a.yn.get(T);if(K)for(const y of K.Vu)y.Bj>0&&(K.H9?N=!0:k=!0)}N=!(k&&N)}if(N)return!1}Z.dD("ofr");Z.e7.resolve(Z.playerResponse);Z.zR||(Z.RP?.start(),Z.je.start());return Z.RO=!0};
uTy=function(Z){if(Z.Ob&&!Z.B("html5_onesie_media_capabilities")){Z.dD("ogsf_s");var k=spN(Z.fp.getVideoData(),(a,T)=>{Z.U6(a,T)}),N=hLy(Z.fp);
k.video=aNy(N,k.video);Z.dD("ogsf_c");if(k.video.length)return k;Z.U6("ombspf",`l.${N.U};u.${N.V};o.${N.D};r.${N.reason}`)}};
gB=function(Z,k){if(k.jm()||Z.jm())Z.policy.sN||(Z.policy.G?OY(Z.loader):Z.loader.F6());else{if(Z.policy.D&&k.isComplete()&&k instanceof b9){var N=Z.loader,a=N.U6;var T=Object.assign(k.O3.N(),{rst:k.state,strm:k.xhr.N8(),d:k.O3.tq?.W9(),cncl:k.xhr&&k.BI.L?1:0,rqb:k.Qk,cwt:k.BI.D,swt:k.Ru?.DP});T=Object.assign(K8(k.info),T);a.call(N,"rqs",T)}if(k.isComplete()&&k.Wv()&&k instanceof b9)Z.policy.jY?k.X7()?(k.dispose(),Z.V.length===0?Z.loader.F6():(Z=Z.V[0],Z instanceof b9&&Z.Mo()&&Z.q8())):k.vZ()&&Z.loader.handleError(k.zQ(),
k.Yi()):(k.dispose(),Z.loader.F6());else{if(k.Ih())Z.Kc=!0,k instanceof b9&&U8y(Z.timing,k),lbG(Z),vD(Z);else if(k.vZ())N=Z.fp.MN(),k instanceof b9&&k.info.V?.ob?.HV&&N&&Z.loader.zq(N),k instanceof b9&&SOb(k)?Z.loader.k5?.D():k instanceof iP?Z.V.pop():(N=1,k.canRetry()&&jp(Z.loader)&&(fbr(Z,k),N=0),Z.loader.handleError(k.zQ(),k.Yi(),N));else{if(Z.loader.isSuspended&&!k.isComplete())return;vD(Z)}k.jm()||k instanceof iP||(k.isComplete()?N=dB0(k,Z.policy,Z.Y):(N=Hwf(k,Z.policy,Z.Y),N===1&&(Z.O6=!0)),
N!==0&&(a=new BgX(1,k.info.EH),a.yg=N===2,Dry(Z,a)));k.isComplete()&&(Z.Fz=!1,k.Ih()||(Z.Kc=!1));Z.policy.HA&&!k.isComplete()?YR(Z.loader):Z.loader.F6()}}};
Osy=function(Z){Z.policy.iq&&(Z.Sm=void 0,Z.Xs=0)};
woX=function(Z){if(!vCG(Z,Z.O))return wB(Z,"ratelimited"),!1;if(ep(Z.audioTrack)&&ep(Z.videoTrack))return wB(Z,"endofstream"),!1;if(Z.policy.U)if(Z.policy.L){if(Z.j?.O())return wB(Z,"ssdaiblocked"),!1}else{var k=!1;if(Z.zt.U===2)k=!0;else if(Z.zt.U===3){$Y(Z);Z.loader.mx();var N=wd(Z.audioTrack,Z.loader.isSeeking()).jI;var a=wd(Z.videoTrack,Z.loader.isSeeking()).jI;var T=Z.loader.getCurrentTime()||0;N=xY(Z,N,T);a=xY(Z,a,T);a=Math.min(N,a);T=Z.zt;a>=T.D?(T.U6("sdai",{haltrq:a,est:T.D}),a=!0):a=!1;
a&&(k=!0)}if(k)return wB(Z,"waitingforads"),!1}Z.policy.PG&&(Z.dA=Gv(Z,Z.audioTrack),Z.FS=Gv(Z,Z.videoTrack));if(!Z.D)return S_(Z,{nopolicy:1}),!0;if(Z.fp.MN())return S_(Z,{utc:1}),!0;if(Z.U.j)return S_(Z,{audio:1}),!0;if(Z.policy.YF&&Z.U.N)return S_(Z,{constraint:1}),!0;if(!Z.D.targetAudioReadaheadMs||!Z.D.targetVideoReadaheadMs)return S_(Z,{noreadahead:1}),!0;if(Z.policy.G&&Z.loader.uU())return S_(Z,{seekToHead:1}),!0;k=Math.min(Hn(Z.loader,Z.audioTrack)*1E3,Z.D.targetAudioReadaheadMs);a=Math.min(Hn(Z.loader,
Z.videoTrack)*1E3,Z.D.targetVideoReadaheadMs);T=Math.min(k,a);var K=Z.fp.getCurrentTime()*1E3;const {Wc:y,h3:Q,tR:q,S3:r}=isy(Z,K);let C;N=y<T;C=Q<T;if(e_(Z)){K=oR(Z.L,K);var m=K<T;Z.fp.Xa()&&m&&!N&&!C&&Z.loader.U6("sabrcrnm",{cra:K,mpra:T,cbrl:Z.L.length})}if(!(N||C||e_(Z)&&m))return Z.policy.PG&&Z.fp.Xa()&&(q<T||r<T)&&Z.loader.U6("sabrncrq",{car:y,vac:Q,abh:q,vbh:r,mar:k,mvr:a}),wB(Z,"readaheadmet"),!1;if(Z.policy.e5&&gCy(Z.loader)&&Z.videoData.rQ())return wB(Z,"shortsbufferedtoend"),!1;if(Z.policy.hx&&
gCy(Z.loader))return wB(Z,"vodbufferedtoend"),!1;m=Z.loader.Vn();m.car=y;m.vac=Q;m.mar=k;m.mvr=a;m.tar=Z.D.targetAudioReadaheadMs;m.tvr=Z.D.targetVideoReadaheadMs;m.pcl=Z.D.playbackCookie?.length||0;m.vbu=zd(Z.fp.TM()?.pN()||null);m.abh=q;m.vbh=r;S_(Z,m);return!0};
$rU=function(Z,k){const N=new BgX(0,Z.cD.Vz,Z);Z.U.N=!1;return Dry(Z,N,k)};
xri=function(Z,k){woX(Z)&&(k=$rU(Z,k),Z.V.push(k),Z.xW?.V(Z.cD.Vz),Z.N>0&&Z.O.Eh++)};
Dry=function(Z,k,N){var a={SY:Z.SY,QQ:(K,y)=>{Z.fp.kQ(K,y)},
rR:Z.policy.ef,zJ:Z.policy.D,Bv:Z.policy.Bv};Z.SY.U.G&&(a.Zo=(Z.videoTrack.l3.info.UH||0)+(Z.audioTrack.l3.info.UH||0));Z.policy.qY&&(a.L3=Z.audioTrack.l3.index.dK(),a.rR=!1);var T=xB0(k,Z.policy,Z.Y)?2:1;T!==Z.Vz&&(Z.Vz=T,lbG(Z));N=Z.Hp(N);if(Z.policy.N&&Z.policy.D&&N.B7){let K=T="";for(const y of N.B7)Z.videoData.sabrContextUpdates.has(y)||Z.policy.N&&N.m$&&N.m$.type===y?T+=`_${y}`:K+=`_${y}`;Z.loader.U6("sabrbldrqs",{ctxts:T,misctxts:K})}!k.setData(N,Z.policy,Z.Y)&&Z.policy.N&&Z.loader.handleError("player.exception",
{reason:"buildsabrrequestdatafailed"},1);a=new b9(Z.policy,k,Z.cD,Z.Y,Z,a,Z.loader.pT());U2(Z.timing);Z.policy.rD&&Z.loader.U6("sabrcrqinfo",{rn:a.MK(),probe:k.Wv()});return Z.Kp=a};
Gv=function(Z,k){$Y(Z);Z.loader.mx();return wd(k,Z.loader.isSeeking())};
e_=function(Z){return Z.policy.ov&&!!Z.G};
xY=function(Z,k,N){Z=Z.loader.mx()||0;return oR(k,(N+Z)*1E3)/1E3+N};
$Y=function(Z){const k=Z.policy.G&&Z.loader?.uU();var N=Z.loader.getCurrentTime()||0;N=G80(Z,N);a:if(Z.policy.IV&&Z.loader.isSeeking()){var a=DL(Z.videoTrack,N);Z.loader.U6("asmtfnctv",{b:N,a});if(!isNaN(a)){N=a;break a}}a=Z.loader.mx()||0;N+=a;a=E1(Z.videoData)||g.jI(Z.videoData);let T=0;k?(a&&(T=Number.MAX_SAFE_INTEGER),Z.videoData.KX&&(T=Math.ceil(Z.videoData.aE*1E3))):T=Math.ceil(N*1E3);return Math.min(Number.MAX_SAFE_INTEGER,T)};
G80=function(Z,k){if(Z.loader.isSeeking())return k;var N=Z.fp.TM();if(!N)return k;N=N.pN();if(N.length===0||b1(N,k))return k;if(!Z.videoTrack.IM(k)&&!Z.audioTrack.IM(k))return Z.loader.U6("sundrn",{b:0,lt:k}),k;let a=k,T=Infinity;for(let K=0;K<N.length;K++){if(N.start(K)>k)continue;const y=k-N.end(K);y<T&&(T=y,a=N.end(K))}return a!==k&&(Z.loader.U6("sundrn",{bre:a,lt:k}),T>=20)?(Z.loader.handleError("player.exception",{reason:"bufferunderrunexceedslimit"}),k):a};
oR=function(Z,k){let N=0,a=-1;for(const T of Z)if(!(T.startTimeMs+T.durationMs<k)){if(a<0&&T.startTimeMs>k||a>=0&&T.Uq>a+1)break;N=Math.max(N,T.startTimeMs+T.durationMs);a=Math.max(a,T.e9)}return Math.max(0,N-k)};
vCG=function(Z,k){a:{if(Z.N>0){var N=Math.floor((0,g.z)()/1E4);if(N===k.kG){if(k.Eh>=Z.N){if(k.Eh===Z.N){N={reason:"toomanyrequests"};N.limit=k.Eh;if(Z.policy.J8&&Z.Kp){const a=K8(Z.Kp.info);N.lr_ptime=a.ptime;N.lr_rtype=a.rtype;N.lr_brl=a.brl;N.lr_ps=a.ps}Z.loader.handleError("player.exception",N);k.Eh+=1}k=!1;break a}}else k.kG=N,k.Eh=0}k=!0}return!k||Z.loader.isSuspended&&Z.loader.kt?!1:Z.C&&(0,g.z)()<Z.C?(Z.loader.ws.XN(),!1):Z.V.length>0&&(!Z.policy.N||Z.V.length!==1||!Z.V[0].Pp())||!Z.cD.Vz?.j(Z.policy,
Z.Y,Z.loader.Wl)||Z.MX?!1:!0};
wB=function(Z,k){Z.Qz=k;Z.policy.rD&&Z.loader.U6("sabrcrb",{reason:k})};
var SRi=function(Z){return NM[c[2]](this,54,4198,Z)};
S_=function(Z,k){Z.Qz=void 0;Z.xl=(0,g.z)();Z.policy.rD&&Z.loader.U6("sabrcrq",k)};
isy=function(Z,k){const {tR:N,S3:a}=eL0(Z);let T;Z.policy.PG?(T=oR(Z.dA.jI,k),Z=oR(Z.FS.jI,k)):(T=N,Z=a);return{Wc:T,h3:Z,tR:N,S3:a}};
lbG=function(Z){Z.videoData.Sm.clear();if(Z.videoData.sabrContextUpdates.size>0)for(var k of Z.videoData.sabrContextUpdates.keys())Z.videoData.sabrContextUpdates.get(k)?.sendByDefault&&Z.videoData.Sm.add(k);if(Z.policy.N&&Z.V.length)for(const N of Z.V)(k=N.W_())&&k.type&&k.sendByDefault&&Z.videoData.Sm.add(k.type)};
vD=function(Z){for(;Z.V.length&&Z.V[0].oI(Z.S9());){const k=Z.V.shift();oCb(Z,k)}Z.V.length&&oCb(Z,Z.V[0])};
oCb=function(Z,k){k instanceof b9&&(Z.Rq=k);var N=new Set(k.jf(Z.S9()));for(const y of N){if(N=k instanceof iP){N=Z.U;var a=N.cD.Rn,T=aR(N.videoInfos,a);a=gii(N,y,a);var K=T.includes(y);!N.BG.MV||a||K||N.loader.U6("sabrcpf",{fid:`${y}`,vfids:`${T.join(".")}`,said:N.C||""});N=!(a||T.includes(y))}if(N)continue;N=k.ew(y,Z.S9());T=Z.policy.ov&&O9(N[0].l3.info.mimeType);if(!k.Ef(y,Z.S9()))continue;a=k.bA(y,Z.S9());for(const Q of a){Z.policy.D&&k instanceof iP&&Z.loader.U6("omblss",{s:Q.info.E3()});if(T){a=
Z.timing;a.Vz||(a.Vz=(0,g.z)(),g.LN("fcb_r",a.Vz,a.V));a=Z;a.videoData.Rn()&&a.G&&Fm(a.G)===Fm(g.ot(Q.info.l3.info,a.cD.Rn))&&a.fp.publish("sabrCaptionsDataLoaded",Q,a.xr.bind(a));continue}a=Q.info.l3.info.H9();K=Q.info.l3;const q=k instanceof iP?1:2;if(a){if(DBR(Z.U,K,q,k.m4(Z.S9())?.token))continue}else lXX(Z.U,K,q,k.m4(Z.S9())?.token);K=a?Z.audioTrack:Z.videoTrack;k instanceof iP&&(K.G=!1,k instanceof iP&&(a?zPN(Z.timing):Jff(Z.timing)));try{gd(K,N,Q)}catch(r){a=QA(r),Z.loader.handleError(a.errorCode,
a.details,a.severity),K.NA(),Z.mM(!1,"pushSlice"),OY(Z.loader)}}}};
fbr=function(Z,k){Z.policy.N?Z.V.splice(Z.V.indexOf(k)).forEach(N=>{N.dispose()}):(Z.V.pop(),k?.dispose())};
JQj=function(Z,k,N){const a=[];for(let T=0;T<Z.V.length;T++)k&&Z.V[T]instanceof iP?a.push(Z.V[T]):(Z.policy.rD&&Z.loader.U6("sabrdis",{d:Z.V[T].MK(),src:N}),Z.V[T].dispose());Z.V=a};
zLy=function(Z,k){if(k.vZ()||k.jm()){var N=Z.loader,a=N.U6,T=k.state;Z=Z.S9();k=k.Ob?.get(Z)?.C()??-1;a.call(N,"sabromb",{s:T,tbytes:k})}else Z.hq=!0,Z.V.push(k),k.AJ.push(Z),U2(Z.timing),Z.policy.fN&&k.f9&&Z.Mm(k.f9,k.MK())};
eL0=function(Z){const k=l5(Z.audioTrack,!0)*1E3;Z=l5(Z.videoTrack,!0)*1E3;return{tR:k,S3:Z}};
Urr=function(Z,{g3:k,G5:N}){if(k===void 0)return!1;k=N?Z.fp.TX(k):k;if(k=!Z.loader.IM(k)&&vCG(Z,Z.Tt)){k=Z.fp.getCurrentTime()*1E3;const {Wc:a,h3:T}=isy(Z,k);k=a>=7E3&&T>=7E3}return k};
bsi=function(Z,k){Z.delay?.dispose();Z.delay=null;const N=Array.from(Z.V.values()).sort((a,T)=>a.mediaTime-T.mediaTime);
N.length!==0&&(k=(N[0].mediaTime-k)*1E3/Z.fp.getPlaybackRate(),Z.delay=new g.Uc(()=>{Jd(Z)},k>500?k-500:k),Z.delay.start())};
Jd=function(Z,k){if(yR(Z.fp.getPlayerState())&&Z.V.size!==0){k=k??Array.from(Z.V.values()).sort((T,K)=>T.mediaTime-K.mediaTime);
var N=Z.getCurrentTime(),a=(k[0].mediaTime-N)*1E3/Z.fp.getPlaybackRate();if(a<500){N=a>0?Z.fp.TM()?.getCurrentTime()??Z.fp.getCurrentTime():N;for(const T of k)if(N>=T.mediaTime)T.resolve([T.mediaTime,T.id]),Z.V.delete(T.id);else break}bsi(Z,N)}};
poR=function(Z,k,N){Z.V.delete(N);return new Promise(a=>{Z.V.set(N,{id:N,mediaTime:k,resolve:a});a=Array.from(Z.V.values()).sort((T,K)=>T.mediaTime-K.mediaTime);
N===a[0].id&&Jd(Z,a)})};
Mw0=function(Z){const k=Z.fp.TM()?.getCurrentTime()??Z.fp.getCurrentTime(),N=Z.Y.pn(k);RLi(Z,N,k);Z.isSeeking=!1;var a=Array.from(Z.V.keys()).filter(T=>T>=N).sort((T,K)=>T-K);
for(const T of a)a=T===N?k-Z.Y.getStartTime(N):0,Z.j(T,Z.V.get(T),a)};
nCr=function(Z,k,N,a=!1){k!==Z.w_&&(Z.w_=k,Z.fp.publish("playbackstarted",k,N+Z.fp.mx(),a))};
RLi=function(Z,k,N){const a=Z.V.get(k),T=Z.Y.getStartTime(k),K=Z.Y.getDuration(k);let y=T;(a?.V??[Z.cpn]).forEach((Q,q)=>{const r=a?.U[q]??K;N>=y&&N<y+r&&(q=Q!==Z.cpn?y-(a?.Y[q]??0):y,Z.U=Q,nCr(Z,Q,q,!0));y+=r})};
Ibi=function(Z,k){(Z.D.get(k)??[]).forEach(N=>{Z.L.V.delete(N)});
Z.D.delete(k)};
jVj=function(Z,k,N,a){Z.U=N;N=`${k}.${N}`;Z.D.has(k)?Z.D.get(k).push(N):Z.D.set(k,[N]);poR(Z.L,a,N).then(([T,K])=>{const [y,Q]=K.split(".");[,K]=[Number(y),Q];nCr(Z,K,T)})};
War=function(Z,k,N,a,T,K){return k.Vg&&k.O6&&N===3?new ECf(Z,k,a,T,K):null};
YRr=function(Z,k){if(Z.policy.OI){var N=k.info.UH,a=yK(Z.schedule);k=k.index.dK();N=Math.max(1,a/N);Z.C=Math.round(Math.max(((N-1)*k+Z.policy.hp)/N,k-Z.policy.zC)*1E3)}};
N5y=function(Z,k){var N=Date.now()/1E3,a=N-Z.startTimeSecs;const T=N-Z.G;var K=T>=Z.policy.vy,y=!1;if(K){let Q=0;!isNaN(k)&&k>Z.L&&(Q=k-Z.L,Z.L=k);Q/T<Z.policy.R0&&(y=!0);Z.G=N}N=a>=Z.policy.zC&&!Z.D;if(!K&&!N&&ZGy(Z,k))return NaN;N&&(Z.D=!0);a:{a=y;N=(0,g.z)()/1E3-(Z.cT.c9()||0)-Z.j.V-Z.policy.hp;K=Z.U.startTime;N=K+N;if(a){if(isNaN(k)){zv(Z,NaN,"n",k);K=NaN;break a}a=k-Z.policy.pH;a<N&&(N=a)}else Z.D&&(a=N+Z.policy.hp-Z.Vz+Z.policy.y$,isNaN(k)||(a=Math.max(a,Math.min(N,k-Z.policy.pH))),N=a);K=N=
Math.max(N,K)}Z.V=K;if(isNaN(Z.V))return Z.clear(),NaN;if(!y&&ZGy(Z,k))return kHX(Z,k),NaN;if(Z.V<=Z.U.startTime)return zv(Z,NaN,"y",k),Z.clear(),NaN;if(!Z.N(Z.V,!1))return!kHX(Z,k)&&y&&(zv(Z,NaN,"t",k),Z.clear()),NaN;y=Z.V;zv(Z,y,"s",k);Z.clear();return y};
ZGy=function(Z,k){return isNaN(k)?!0:isNaN(Z.V)?!1:k<Z.V+(Z.D?Z.policy.pH:Z.policy.v2)};
kHX=function(Z,k){return Z.N(Z.V,!0)?!1:(zv(Z,NaN,"ns",k),Z.clear(),!0)};
zv=function(Z,k,N,a){const T=Z.Y.Yi();T.ssr_sk=(k*1E3).toFixed(0);T.ssr_t=(Z.V*1E3).toFixed(0);T.ssr_r=N;T.ssr_st=(Z.startTimeSecs*1E3).toFixed(0);T.ssr_n=(0,g.z)().toFixed(0);T.ssr_f=(Z.j.V*1E3).toFixed(0);T.ssr_fa=Z.D?"1":"0";T.ssr_o=(Z.cT.c9()*1E3||0).toFixed(0);T.ssr_v=(a*1E3).toFixed(0);k=Z.U.l3.index;k.Of(Z.U.Cp,!0)&&(T.ssr_ist=(k.getStartTime(Z.U.Cp)*1E3).toFixed(0),T.ssr_id=(k.getDuration(Z.U.Cp)*1E3).toFixed(0));Z.loader.U6("ssr",T)};
aTb=function(){const Z={},k=window.performance;if(k){const N=k.memory;N&&(Z.jsTotal=N.totalJSHeapSize,Z.jsUsed=N.usedJSHeapSize,Z.jsLimit=N.jsHeapSizeLimit,Z.msTotal=N.getMediaSourceTotalAllocatedMemory?.()??N.totalMediaSourceSize,Z.msLimit=N.getMediaSourceMaximumMemoryCapacity?.()??N.mediaSourceSizeLimit,Z.msUsed=N.getMediaSourceCurrentMemoryCapacity?.()??N.usedMediaSourceMemorySize);k.measureAvailableCpuMemory&&(Z.cbFree=k.measureAvailableCpuMemory());k.measureUsedCpuMemory&&(Z.cbUsed=k.measureUsedCpuMemory())}window.h5vcc?.cVal&&
(Z.cbFree=window.h5vcc.cVal.getValue("Memory.CPU.Free"),Z.cbUsed=window.h5vcc.cVal.getValue("Memory.CPU.Used"),Z.cbJs=window.h5vcc.cVal.getValue("Memory.JS"));return Z};
T5f=function(Z){return window.PressureObserver&&new window.PressureObserver(Z)};
KXy=async function(Z){try{await Z.L}catch{}Z.D?.disconnect()};
Qcf=function(Z,k){k?y$f.test(Z):(Z=g.mm(Z),Object.keys(Z).includes("cpn"))};
UY=function(Z,k,N,a,T,K){const y={format:"RAW"},Q={};if(c8(Z)&&H8()){const q=g.G("EOM_VISITOR_DATA");q?Q["X-Goog-EOM-Visitor-Id"]=q:a?Q["X-Goog-Visitor-Id"]=a:g.G("VISITOR_DATA")&&(Q["X-Goog-Visitor-Id"]=g.G("VISITOR_DATA"));N&&(Q["X-Goog-PageId"]=N);(a=k.xW)&&!BQ(k)&&(Q["X-Goog-AuthUser"]=a);T&&(Q.Authorization=`Bearer ${T}`);k.B("enable_datasync_id_header_in_web_vss_pings")&&k.lk&&k.datasyncId&&(Q["X-YouTube-DataSync-Id"]=k.datasyncId);if(k.B("enable_rollout_token_header")){const r=g.G("INNERTUBE_CONTEXT")?.client?.rolloutToken;
r&&(Q["X-YouTube-Rollout-Token"]=r)}q||Q["X-Goog-Visitor-Id"]||T||N||a?y.withCredentials=!0:k.B("html5_send_cpn_with_options")&&y$f.test(Z)&&(y.withCredentials=!0)}Object.keys(Q).length>0&&(y.headers=Q);K&&(y.onFinish=K);return Object.keys(y).length>1?y:null};
bP=function(Z,k,N,a,T,K,y,Q){H8()&&N.token&&(Z=AP(Z,{ctt:N.token,cttype:N.m2,mdx_environment:N.mdxEnvironment}));a.B("net_pings_low_priority")&&(k||(k={}),k.priority="low");K||Q&&a.B("nwl_skip_retry")?(k==null?k={}:Qcf(Z,a.B("html5_assert_cpn_with_regex")),y?eW().sendAndWrite(Z,k):eW().sendThenWrite(Z,k,Q)):k?(Qcf(Z,a.B("html5_assert_cpn_with_regex")),AJy(Z,k)):g.iv(Z,T)};
qMU=function(Z){const k=[];for(let N=0;N<Z;N++){const a={},T=Math.floor(Math.random()*9*1E8)+1E8;let K="";for(let y=0;y<9;y++)K+="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(Math.random()*52)];a.videoDecoderName=K;a.elapsedTimeMs=T;k.push(a)}return k};
r$f=function(Z){return window.Profiler&&new window.Profiler(Z)};
CIy=function(Z){/[^a-zA-Z0-9;.!_-]/.test(Z)&&(Z=Z.replace(/[+]/g,"-").replace(/[^a-zA-Z0-9;.!_-]/g,"_"));return Z};
mqb=function(Z){const k=Z.sampleInterval,N=Z.maxBufferSize;if(k>0&&N>0&&!Z.U&&Z.D<1E7)try{Z.Y=Z.L({sampleInterval:k,maxBufferSize:N}),Z.Y?.addEventListener("samplebufferfull",async()=>{await Z.stop();mqb(Z)})}catch(a){Z.U=CIy(a.message)}};
p8=function(Z,k){Z=window.h5vcc?.settings?.set(Z,k);return Vb(Z)?gz(Od(Z),()=>!0,()=>!1):Od(!!Z)};
scf=function(Z){return p8("MediaSource.EnableUsingMediaSourceBufferedRange",Z?1:0)};
A$R=function(Z){return p8("HTTP3",Z?1:0)};
PIy=function(Z){return p8("MediaSource.EnableUsingMediaSourceAttachmentMethods",Z?1:0)};
c$i=function(Z){return p8("QUIC",Z?1:0)};
HGi=function(Z){return p8("Media.AudioWriteDurationLocal",Z)};
dqi=function(Z){return p8("Media.PlayerConfiguration.DecodeToTexturePreferred",Z?1:0)};
Xqb=function(Z){return p8("Media.VideoDecoderPollIntervalMs",Z)};
LXX=function(Z){return p8("Media.VideoInitialMaxFramesInDecoder",Z)};
VgR=function(Z){return p8("Media.AppendFirstSegmentSynchronously",Z?1:0)};
FXb=function(Z){return p8("Media.IncrementalParseLookAhead",Z?1:0)};
tg0=function(Z){return p8("Media.EnableResetAudioDecoder",Z?1:0)};
hXr=function(Z){return p8("Media.EnableFlushDuringSeek",Z?1:0)};
umi=function(Z){return p8("DecoderBuffer.EnableInPlaceReuseAllocatorBase",Z?1:0)};
lTf=function(Z){return p8("Media.ExperimentalMaxPendingBytesPerParse",Z)};
fTi=function(Z){return p8("Media.MaxSamplesPerWrite",Z)};
B5G=function(Z){return p8("Media.MediaCodecResetDelayMs",Z)};
OGf=function(){var Z=window.h5vcc?.settings?.getPersistentSettingAsString?.("cpu_usage_tracker_intervals");if(Z!=null){Z=JSON.parse(Z)??[];var k=Z.filter(N=>N.type==="total").map(N=>N.seconds);
for(const N of Dqy)k.indexOf(N)===-1&&Z.push({type:"total",seconds:N});window.h5vcc?.settings?.set("cpu_usage_tracker_intervals_enabled",1);window.h5vcc?.settings?.set("cpu_usage_tracker_intervals",JSON.stringify(Z))}};
vFU=function(){var Z=window.H5vccPlatformService;let k="";if(Z&&Z.has("dev.cobalt.coat.clientloginfo")&&(Z=Z.open("dev.cobalt.coat.clientloginfo",()=>{}))){const N=Z.send(new ArrayBuffer(0));
N&&(k=String.fromCharCode(...(new Uint8Array(N))));Z.close()}return k};
iGf=function(Z){var k=window.H5vccPlatformService;k?.has("com.google.android.youtube.tv.prodlogger")&&(k=k.open("com.google.android.youtube.tv.prodlogger",()=>{}))&&(k.send(t8(`cpn: ${Z}`).buffer),k.close())};
g.MX=function(Z,k,N,a){RR(Z,N,`${k.toFixed(3)}:${a.join(":")}`)};
n8=function(Z,k){var N=Z.provider.getCurrentTime();g.MX(Z,k,"cmt",[N.toFixed(3)]);var a=N=Z.provider.ym();if((!Z.U||vZ(Z.provider.videoData)?0:a*1E3>Z.U.s9+100)&&Z.U){a=Z.U.isAd;N=N*1E3-Z.U.s9;Z.KT=k*1E3-Z.U.lB-N-Z.U.pB;var T=(0,g.z)()-N;k=Z.KT;N=Z.provider.videoData;var K=N.isAd();if(a||K){K=`${a?"ad":"video"}_to_${K?"ad":"video"}`;var y={};N.Pq&&(y.cttAuthInfo={token:N.Pq,videoId:N.videoId});y.startTime=T-k;OL(K,y);g.lJ({targetVideoId:N.videoId,targetCpn:N.clientPlaybackNonce},K);uJ("pbs",T,K)}else T=
Z.provider.fp.tQ(),T.G!==N.clientPlaybackNonce?(T.L=N.clientPlaybackNonce,T.U=k):N.rQ()||g.L9(new g.jD("CSI timing logged before gllat",{cpn:N.clientPlaybackNonce}));Z.U6("gllat",{l:Z.KT.toFixed(),prev_ad:+a});delete Z.U}};
RR=function(Z,k,N){const a=Z.V.get(k);a?a.push(N):Z.V.set(k,[N])};
IR=function(Z,k,N){if(!isNaN(N.PT)){let a=N.PT;N.U<a&&(a=N.U);g.MX(Z,k,"bh",[a.toFixed(3)])}};
EY=function(Z,k=NaN){k=k>=0?k:g.j_(Z.provider);const N=Z.provider.fp.YA();var a=N.uC-(Z.Sm||0);a>0&&g.MX(Z,k,"bwm",[a,(N.eR-(Z.r5||0)).toFixed(3)]);isNaN(Z.Sm)&&N.uC&&Z.isOffline&&Z.O0(!1);Z.Sm=N.uC;Z.r5=N.eR;isNaN(N.bandwidthEstimate)||g.MX(Z,k,"bwe",[N.bandwidthEstimate.toFixed(0)]);Z.provider.kW.Xa()&&Object.keys(N.V).length!==0&&Z.U6("bwinfo",N.V);if(Z.provider.kW.Xa()||Z.provider.kW.B("html5_log_meminfo"))a=aTb(),Object.values(a).some(T=>T!==void 0)&&Z.U6("meminfo",a);
Z.provider.kW.Xa()&&(a=Z.MX?.Y())&&Object.values(a).some(T=>T!=null)&&Z.U6("cpuinfo",a);
Z.Rq&&Z.U6("jsprof",Z.Rq.flush());Z.C&&g.MX(Z,k,"bat",[Z.C.level,Z.C.charging?"1":"0"]);a=Z.provider.fp.getVisibilityState();Z.iq!==a&&(g.MX(Z,k,"vis",[a]),Z.iq=a);n8(Z,k);(a=gFj(Z.provider))&&a!==Z.xl&&(g.MX(Z,k,"conn",[a]),Z.xl=a);IR(Z,k,N)};
$qN=function(Z,k,N){const a=g.j_(Z.provider);wqf(Z,a,k,0,N);EY(Z,a);WD(Z)};
YY=function(Z,k){RR(Z,"cat",k)};
xqy=function(Z){var k=Z.provider.fp.YA();const N=g.j_(Z.provider);IR(Z,N,k);const a=k.D;k=k.Y;isNaN(a)||(Z.provider.kW.B("html5_unified_live_latency_reporting")&&!isNaN(k)&&k?g.MX(Z,N,"e2el",[a.toFixed(3),k.toFixed(3)]):g.MX(Z,N,"e2el",[a.toFixed(3)]))};
GHi=function(Z,k){k={cpn:Z.provider.videoData.clientPlaybackNonce,sequenceNumber:k,serializedWatchEndpointLoggingContext:Z.provider.videoData.sz};Z.serializedHouseBrandPlayerServiceLoggingContext&&(k.serializedHouseBrandPlayerServiceLoggingContext=vF(Z.serializedHouseBrandPlayerServiceLoggingContext)||void 0);Z.provider.videoData.playerResponseCpn&&(k.playerResponseCpn=Z.provider.videoData.playerResponseCpn);Zy.length&&(k.decoderInfo=Zy);Z.remoteControlMode&&(k.remoteControlMode=Z.remoteControlMode);
Z.remoteConnectedDevices.length&&(k.remoteConnectedDevices=Z.remoteConnectedDevices);if(Z.h6?.length){k.serializedQoeContextData=[];for(var N of Z.h6){const a=rr(N);a&&k.serializedQoeContextData.push(a)}}Z.provider.B("html5_send_serialized_one_time_qoe_context_data")&&!Z.Kp&&Z.provider.videoData.serializedOneTimeQoeContextData&&(k.serializedOneTimeQoeContextData=[],N=rr(Z.provider.videoData.serializedOneTimeQoeContextData))&&(k.serializedOneTimeQoeContextData.push(N),Z.Kp=!0);return k};
SMG=function(Z,k,N){g.GC(Z.provider.kW,Z.provider.videoData.G()).then(a=>{var T=!1;k.includes("&dt=")||k.includes("&cotn=")?T=!0:Z.provider.kW.B("qoe_with_networkless")&&(T=!0);const K=Z.provider.kW.B("qoe_send_and_write");var y=Z.provider.kW;a=UY(k,y,Z.provider.kW.pageId,Z.provider.kW.sendVisitorIdHeader?Z.provider.videoData.visitorData:void 0,a);y.B("html5_simplify_pings")&&(a=a||{});a?(a.method="POST",a.postBody=N,bP(k,a,{token:Z.provider.videoData.Pq,m2:Z.provider.videoData.ZT,mdxEnvironment:Z.provider.videoData.mdxEnvironment},
y,void 0,T,K&&Z.xW)):T?(T=Z.provider.kW.B("networkless_ajax"),y={method:"POST",postBody:N},K&&Z.xW?eW().sendAndWrite(k,y):T?g.SD(k,{method:"POST",postBody:N}):eW().sendThenWrite(k,y)):TKr(k,N)})};
WD=function(Z){if(!Z.provider.kW.B("html5_qoe_no_len_check")){var k=0;for(const [N,a]of Z.V.entries())k+=N.length+Number(jN(a,(T,K)=>T+K.length,0));
k>96E3&&(new g.Uc(Z.reportStats,0,Z)).start()}};
eXy=function(Z){Z.provider.videoData.rD&&YY(Z,"prefetch");Z.provider.videoData.Kp&&Z.U6("reload",{r:Z.provider.videoData.reloadReason,ct:Z.provider.videoData.Kp});Z.provider.videoData.ES&&YY(Z,"monitor");Z.provider.videoData.isLivePlayback&&YY(Z,"live");s1&&YY(Z,"streaming");Z.provider.videoData.fX&&Z.U6("ctrl",{mode:Z.provider.videoData.fX},!0);if(Z.provider.videoData.sx){var k=Z.provider.videoData.sx.replace(/,/g,"_");Z.U6("ytp",{type:k},!0)}Z.provider.videoData.Oe&&(k=Z.provider.videoData.Oe.replace(/,/g,
"."),Z.U6("ytrexp",{ids:k},!0));Z.provider.kW.Xa()&&Z.U6("now",{wt:(0,g.z)()});k=Z.provider.videoData;var N=Z.provider.kW.B("enable_white_noise")||Z.provider.kW.B("enable_webgl_noop");const a=g.oD(k)||g.WZ(k)||g.Yz(k)||g.Zd(k);(N||a)&&(N=(0,g.kT)())&&Z.V.set("gpu",[N]);yn(Z.provider.videoData)&&g.MX(Z,g.j_(Z.provider),"dt",["1"]);k.cotn&&!yn(k)&&Z.O0(!0);Z.provider.kW.Xa()&&(k=(0,g.z)()-Z.provider.kW.PG,Z.U6("playerage",{secs:(1.6**Math.round(Math.log(k/1E3)/Math.log(1.6))).toFixed()}));Z.L=!0;Z.Vz=
g.B8(()=>{Z.reportStats()},1E4)};
wqf=function(Z,k,N,a,T){var K=Z.provider.kW.V.cbrver;Z.provider.kW.V.cbr==="Chrome"&&/^96[.]/.test(K)&&N==="net.badstatus"&&/rc\.500/.test(T)&&No(Z,3);Z.provider.kW.B("html5_use_ump")&&/b248180278/.test(T)&&No(Z,4);K=Z.provider.getCurrentTime();a=a===1?"fatal":"";N=[N,a,K.toFixed(3)];a&&(T+=`;a6s.${NU()}`);T&&N.push(oFy(T));g.MX(Z,k,"error",N);Z.L=!0};
No=function(Z,k){Z.Qz||(RR(Z,"fcnz",`${k}`),Z.Qz=!0)};
J$N=function(Z){Z.Y>=0||(Z.provider.kW.NW||Z.provider.fp.getVisibilityState()!==3?Z.Y=g.j_(Z.provider):Z.tq=!0)};
zX0=function(Z,k){let N;Z.provider.videoData.jY()?(Z=4,N=1):Z=k.source??0;Z=`${"sms"}.${Z}`;N!==void 0&&(Z+=`_${N}`);return Z};
ag=function(Z,k,N,a,T){const K=g.j_(Z.provider);k!==1&&k!==3&&k!==5||g.MX(Z,K,"vps",[Z.wV]);RR(Z,"xvt",`t.${K.toFixed(3)};m.${T.toFixed(3)};g.${2};tt.${k};np.${0};c.${N};d.${a}`)};
oFy=function(Z){/[^a-zA-Z0-9;.!_-]/.test(Z)&&(Z=Z.replace(/[+]/g,"-").replace(/[^a-zA-Z0-9;.!_-]/g,"_"));return Z};
Hn=function(Z,k){if(Z.tq&&!Z.A0)return 3;if(Z.isSuspended)return 1;if(Z.b3?.FS())return 4;let N=(k.l3.info.audio?Z.policy.hq:Z.policy.Sm)/(k.UH*Z.policy.hB);if(Z.policy.U4>0&&Z.b3&&Wz(Z.b3)&&(k=k.l3.info.video?Z.b3.U:Z.b3.V)&&!k.HZ()){k=k.Us();const a=U9(k,Z.getCurrentTime());a>=0&&(k=Z.getCurrentTime()-k.start(a),N+=Math.max(0,Math.min(k-Z.policy.U4,Z.policy.XY)))}Z.policy.dA>0&&(N=Math.min(N,Z.policy.dA));return N};
F6=function(Z,k,N){Uqy(Z,N.b0||"unknown");Z.fp.seekTo(k,N)};
Ms=function(Z,k,N,a,T){Z.fp.getVideoData().qW()?T&&Z.U.vD+T/1E3>N&&(Z.U6("sdai",{seg:a,rbt:N.toFixed(3),end:Z.U.vD.toFixed(3),sd:T.toFixed(3)}),Z.mM(!1,"rollback")):Z.policy.U&&Z.mM(!1,"rollback");if(Z.cD.isManifestless){T=xR(Z.audioTrack,a,N,k);var K=xR(Z.videoTrack,a,N,k);Z.policy.tW||(K&&tl(Z.cD,a,!0),T&&tl(Z.cD,a,!1));K&&(Z.videoTrack.N=[]);T&&(Z.audioTrack.N=[]);Z.U6("sdai",{rollbk2_seg:a,rbt:N.toFixed(3),lt:k.toFixed(3),a:T,v:K});(T||K)&&Z.policy.U&&OY(Z)}};
t$f=function(Z){const k=Z.jO().filter(N=>N.namespace==="ad");
for(const N of k)if(N.start/1E3>Z.getCurrentTime())return N.start/1E3;return Infinity};
kY=function(Z){var k=(0,g.z)();Z.fJ=k};
YR=function(Z){Z.policy.HA&&Z.policy.VP&&Math.min(yoi(Z.videoTrack),yoi(Z.audioTrack))*1E3>Z.policy.HL?Z.r5.XN():Z.Qm()};
na=function(Z,k,N,a=!1){if(a&&!k.Sm||Z.policy.IX)jx()||(a=k.w5)&&!a.RT(N.info)&&Z.fp.ZQ(),k.Sm=!0;k.l3!==N&&(k.l3=N)};
jp=function(Z){return Z.Wl<Z.ov};
Wb=function(Z){Z.NA();Z.Jr.isSeeking();Z.C&&YRr(Z.C,Z.videoTrack.l3);OY(Z);return iNf(Z.Jr)};
T$=function(Z){return Z.fp.getVideoData().Rn()||Z.policy.Xh};
bGy=function(Z,k){return(Hn(Z,k)+Z.policy.PL)*k.UH};
gCy=function(Z){if(Z.fp.getVideoData().isLivePlayback)return!1;var k=Z.fp.TM();if(!k)return!1;k=k.getDuration();if(Z.b3&&Z.b3.V&&Z.b3.U){var N=Z.getCurrentTime(),a=Z.b3.V.Us();Z=Z.b3.U.Us();a=a?pf(a,N):N;N=Z?pf(Z,N):N;N=Math.min(a,N);k=isNaN(N)?!1:N>=k-.01}else k=!1;return k};
OY=function(Z){Z.HA.XN()};
Qm=function(Z,k){k&&KJ(Z.fp,new ym(k.video,k.reason));Z.V.MX&&(k=suy(Z.V,"a"),Z.fp.nx(new ym(k.audio,k.reason)))};
qo=function(Z,k,N,a){const T=hM(k);!T||T.D||Bq(T,a)||(N.abort(),Z.policy.US&&k.j?.j(),k.C?.j());if(!N.Ow()||jx())try{Z.policy.LB?N.dj(a.l3.info.containerType,a.l3.info.gA)&&N.VX(a.l3.info.containerType,a.l3.info.gA,a.l3.info.mimeType):N.fU(a.l3.info.containerType,a.l3.info.mimeType)}catch(K){return g.L9(K),Z.U6("ctexp",{name:K.name,msg:K.message}),!1}else a.l3.info.containerType!==N.Ow()&&Z.U6("ctu",{ct:jx(),prev_c:N.Ow(),curr_c:a.l3.info.containerType});a=a.l3.zt;Z.policy.gF&&a&&(k=0+a.duration,
a=-a.V,0===N.A4()&&k===N.ZL()||N.oK(0,k),a!==N.mx()&&(N.PF(a),FL&&W0j(Z.audioTrack.X$(),N.nw())));return!0};
pqi=function(Z,k,N){if(!(Z.videoTrack.l3.V()&&Z.audioTrack.l3.V()&&Z.b3&&Z.b3.U&&Z.b3.V))return!1;if(N&&Z.cD.isManifestless&&(Z.videoTrack.L===-1||Z.audioTrack.L===-1))return!0;const a=cn(Z.videoTrack,k,N);if(isNaN(a))return!1;Z=cn(Z.audioTrack,Z.policy.O6?k:a,N);return isNaN(Z)?!1:!0};
RXX=function(Z){Z.D?.aO?.itagDenylist&&Z.lY(Z.D?.aO.itagDenylist);Z.D?.playbackStartPolicy&&b5(Z.policy,Z.D?.playbackStartPolicy,3,Z.D?.MK());if(Z.policy.dZ){var k=Z.S9();(k=k?Z.D?.XU.get(k):void 0)&&Z.U.Zp(k,-1)}Z.cD.O||(k=Z.D?.U9,k?.Bz&&k?.YZ&&Z.cD.Rn&&hl(Z.cD,k.Bz,k.YZ));if(Z.D?.v_){k=Z.D.v_.get(Z.S9()||"");if(!k)return;if(Z.cD&&k.formatId){const N=Z.cD.Y.get(Fm(k.formatId));N&&(N.info.debugInfo=k.debugInfo)}}Z.policy.xW&&(Z.D?.hE().forEach(N=>{Z.iA(N)}),Z.D?.XK())};
nFG=function(Z){if(!Z.cD.Rn)return!0;var k=Z.fp.getVideoData();if(Z.fp.Vr())return Z.U6("ombpa",{}),!1;if(!!Z.D?.U9?.IH!==Z.cD.M4)return Z.U6("ombplmm",{}),!1;var N=k.MX||k.liveUtcStartSeconds||k.Q5;if(Z.cD.M4&&N)return Z.U6("ombplst",{}),!1;if(Z.cD.O)return Z.U6("ombab",{}),!1;N=Date.now();return un(Z.cD)&&!isNaN(Z.dA)&&N-Z.dA>Z.policy.vL*1E3?(Z.U6("ombttl",{}),!1):Z.cD.Y8&&Z.cD.U||zY(k)!==0&&!Z.policy.V||k.B("html5_disable_onesie_media_for_mosaic")&&k.Jd()||k.B("html5_disable_onesie_media_for_lifa_eligible")&&
Ke(k)?!1:Z.fp.X().Yl().V.Aq(MgU)&&(k=Z.D?.yf()??0,k>=0&&Z.cD.U&&(k<Z.cD.aE*1E3||k>Z.cD.Y5*1E3))?(Z.U6("ombwnd",{st:k}),!1):Z.cD.Y8&&Z.cD.U?(Z.U6("ombminsq",{}),!1):!0};
ri=function(Z,k){const N=t$(k.l3,Z.cD.Rn);var a=Z.Vz?.ew(N)||[];if(a.length===0)return Z.U6("ombmsi",{}),!1;a=new zH(a);if((!Z.policy.zt||isFinite(Z.getCurrentTime())||Z.fp.MN())&&!Xmi(a,Z.getCurrentTime()))return Z.U6("ostmf",{ct:Z.getCurrentTime(),a:k.l3.info.H9()}),!1;Z.Vz?.nU(N);return!0};
ITi=function(Z,k){const N=k.l3;var a=Z.cD.Rn;if(nFG(Z))if(Z.Vz&&Z.Vz.Vb(t$(N,a))){if(a=t$(N,a),ri(Z,k)){var T=new zH(Z.Vz.ew(a)),K=y=>{try{y.vZ()?(Z.handleError(y.zQ(),y.Yi()),Sp(k,y),xF(y.info)&&Ml(Z.G,k,N,!0),Z.Qm()):IN(Z.G,y)&&(Z.Y?.FS(y.info,Z.uq),Z.Qm())}catch(Q){y=QA(Q),Z.handleError(y.errorCode,y.details,y.severity),Z.NA()}};
N.Vz=!0;$F(T)&&(i5(k,new s2(Z.policy,a,T,Z.Vz,K)),U2(Z.timing))}}else Z.U6("ombfmt",{})};
jcy=function(Z){Z.policy.L&&Z.D&&(Z.D.yq.forEach(k=>{Z.pD(k,-1)}),Z.D.yq=[])};
CJ=function(Z,k){k=k||Z.videoTrack&&Z.videoTrack.V&&Z.videoTrack.V.startTime||Z.getCurrentTime();var N=na,a=Z.videoTrack,T=Z.V;k=T.nextVideo&&T.nextVideo.index.pn(k)||0;T.xW!==k&&(T.FS={},T.xW=k,kR(T,T.V));k=!T.V.isLocked()&&T.N>-1&&(0,g.z)()-T.N<T.policy.sz*1E3;const K=T.nextVideo&&ZL(T,T.nextVideo.info)*3<Cn(T.zt);if(!k||K)Yc(T),aN(T),T.O=T.O||T.nextVideo!==T.D;T.nextVideo&&!T.nextVideo.index.isLoaded()&&(T.xW=-1);N(Z,a,T.nextVideo);na(Z,Z.audioTrack,Z.V.U)};
Uqy=function(Z,k){if(!isNaN(Z.qX)){const N=Date.now()-Z.qX;N<1E4&&Z.U6("bfaswtch",{ep:N,sk:k!==void 0?"1":"0",sr:k||""})}};
EFf=function(Z){Z.policy.FN=!1;try{Z.vU()}catch(k){g.b(k)}};
WX0=function(Z,k=!1){Z.b3&&Z.b3.V&&Z.b3.U&&(Z.b3.V.kF(Z.Kp,Z),Z.b3.U.kF(Z.Kp,Z));vb(Z.audioTrack,null,k);vb(Z.videoTrack,null,k);Z.b3&&(Z.b3.L=!1);Z.b3=null};
YMf=function(Z,k,N=!1,a=!1){vb(Z.videoTrack,k.U||null,a);vb(Z.audioTrack,k.V||null,a);Z.b3=k;Z.b3.L=!0;N||Z.resume();k.V.tZ(Z.Kp,Z);k.U.tZ(Z.Kp,Z)};
ZDU=function(Z,k,N=!1,a=!1){Z.policy.FS&&(Z.policy.vD&&Z.U6("loader",{setsmb:0}),Z.NA(),Z.policy.FS=!1);WX0(Z,a);if(!k.G()){const T=X6(Z.videoTrack),K=X6(Z.audioTrack);TCX(k,(T?T.info.l3:Z.videoTrack.l3).info,(K?K.info.l3:Z.audioTrack.l3).info,Z.policy.oE)}YMf(Z,k,N,a);try{Z.Qm()}catch(T){g.b(T)}};
m2=function(Z){Z.b3&&Z.b3.K3()&&Z.s4()};
N_0=function(Z){Z.s6&&!Z.isSuspended&&pa(Z.schedule)&&(kLy(Z,Z.s6),Z.s6="")};
T_y=function(Z,k){X6(k)?.isLocked&&auN(k)&&(Z.fp.X().Xa()&&Z.U6("eosl",{munlock:X6(k)?.info.E3()}),sF(Z,k===Z.audioTrack))};
KJf=function(Z){if(mBf(Z.videoTrack))return"ssf";if(Z.policy.MX&&X6(Z.videoTrack)?.isLocked&&X6(Z.audioTrack)?.isLocked)return"updateEnd";if(ep(Z.audioTrack)||ep(Z.videoTrack)&&Z.videoTrack.l3.info.gA!=="f")return"";if(Z.Jr.isSeeking()){var k=Z.N;var N=Z.videoTrack;var a=Z.audioTrack;if(k.policy.V){var T=k.policy.FE;zw(k.policy)&&(T=mu(k,!1,Cn(k)));k=T;N=l5(a,!0)>=k&&l5(N,!0)>=k}else N.U.length||a.U.length?(T=N.l3.info.UH+a.l3.info.UH,T=10*(1-Cn(k)/T),k=Math.max(T,k.policy.FE),N=l5(a,!0)>=k&&l5(N,
!0)>=k):N=!0;if(!N)return"abr";N=Z.videoTrack;if(N.U.length>0&&N.D.U.length===1&&wdj(N.D).info.C<N.vD)return"seek"}if(Z.policy.U&&shy(Z.videoTrack,Z.Y)&&shy(Z.audioTrack,Z.Y))return"ssdai";N=!Z.policy.SK||Z.getCurrentTime()<10;Z.policy.V||(N=N||Z.videoTrack.l3.info.video.qualityOrdinal>360);if(!Z.A0||N)return"";N=Z.policy.SK;zw(Z.policy)&&(N=mu(Z.N,Z.A0,Cn(Z.N)));N=qdy(Z.videoTrack,Z.getCurrentTime(),N)||qdy(Z.audioTrack,Z.getCurrentTime(),N);return zw(Z.policy)?N?"mbnm":"":(Z.videoTrack.U.length>
0||Z.audioTrack.U.length>0||RN(Z.G,Z.videoTrack,Z.audioTrack)||RN(Z.G,Z.audioTrack,Z.videoTrack))&&N?"nord":""};
Pk=function(Z,k,N,a){a.info.l3.V();var T=a.info.l3.U;if(!T||!N.Qq()||N.eb()===T)return!1;let K=T;var y=N.X5();if(Z.policy.nh&&y&&N.isView()&&g.Sx(a.info.l3.info)){const q=new DataView(T.buffer,T.byteOffset,T.byteLength);(y=pgy(q,y))?K=new Uint8Array(y.buffer,y.byteOffset,y.byteLength):Z.U6("fenc",{})}Z.policy.Jy&&(y=yly(Z,a,new h8([K])))&&(K=A8(y));let Q;(y=a.info.l3.j(0,a.info.clipId))&&(Q=y.Vi[0]);if(a===Z.iq){if(Z.FS+=1,Z.fp.getVideoData().B("html5_shorts_gapless_restart_on_init_seg_retries")&&
Z.FS>5)return Z.FS=0,Z.fp.HF({initSegStuck:1,as:a.info.E3()}),!0}else Z.FS=0,Z.iq=a;Z.policy.wu&&(N.abort(),k.C?.j());T=QZ0(Z,N,K,Q,T);k.C?.N(T,Q);if(T!==0)return Z.policy.rB&&vZ(Z.fp.getVideoData())?(Z.fp.sO()||Aq(Z,"sepInit",T,a.info),qSr(Z.fp,"sie")):Aq(Z,"sepInit",T,a.info),!0;a.info.xT()?(k=Z.timing,k.FS||(k.FS=(0,g.z)(),g.LN("vis_a",k.FS,k.V))):(k=Z.timing,k.j||(k.j=(0,g.z)(),g.LN("ais_a",k.j,k.V)));(a=a.info.l3.iL)&&Z.fp.Gq(new VJ(a.key,a.type));return N.HZ()};
rlb=function(Z,k,N){if(Z.policy.MX&&X6(k)?.isLocked)return!1;if(N.QM())return!0;if(!N.Qq())return!1;const a=X6(k);if(!a||a.info.type===6)return!1;if(Z.policy.fS||Z.Y?.Vz(k,a.info.Cp))Z.Sm=0;else return Z.Jr.isSeeking()&&OY(Z),Z.Sm=Z.Sm||(0,g.z)(),!1;if(!qo(Z,k,N,a.info))return!1;if(Z.cD.D&&a.info.V===0){var T;if(N.eb()==null){var K=hM(k);if(!(T=!K||K.l3!==a.info.l3)){b:if(T=K.Vz,K=a.info.Vz,T.length!==K.length)T=!1;else{for(var y=0;y<T.length;y++)if(!g.uT(T[y],K[y])){T=!1;break b}T=!0}T=!T}}else T=
N.eb(),a.info.l3.dA()&&Mq(a),K=a.info.l3.U,T=T!==K&&!g.uT(T,K);T&&(K=hM(k),Z.U6("initchg",{it:a.info.l3.info.id,sr:!!K&&K.l3===a.info.l3,ty:a.info.type,seg:a.info.Cp}));K=g.Sx(a.info.l3.info);Z.policy.mq&&K&&!T&&(g.Sx(a.info.l3.info)?(ER(g.Rc(a),1836019574),ER(g.Rc(a),1718909296)):(T=new Wo(g.Rc(a)),EL0(T),kF(T,524531317,!0),a.U=a.U.split(T.start+T.pos).ma),a.L=!1)}K=Z.C&&!!Z.C.Y&&k.l3.info.audio;T=Z.cD.isManifestless||a.L;if(!(Z.cD.D&&a.info.V!==0||T&&!K)&&Pk(Z,k,N,a))return!0;if(K)return!1;K=Hn(Z,
k);K=Z.getCurrentTime()+K;if(a.info.Y>K)return Z.policy.V&&(k===Z.videoTrack?Z.Rq=Z.Rq||(0,g.z)():Z.vD=Z.vD||(0,g.z)()),Z.policy.En&&fGG(k.D,K,!1),!1;k===Z.videoTrack?Z.Rq=0:Z.vD=0;Z.policy.e8&&N===Z.b3?.V&&Z.hq&&(N.Ou()===0?(Z.hq=!1,Z.policy.e8=!1):Z.Tt=N.Ou());a:{K=Z.policy.xl?(0,g.z)():0;y=a.L&&a.info.l3.U||void 0;var Q=a.U;a.L&&(Q=yly(Z,a,Q)||Q);const q=A8(Q);Q=Z.policy.xl?(0,g.z)():0;N=QZ0(Z,N,q,a.info,y);k.C?.C(a.info,N,Q-K,(0,g.z)()-Q);Z.FS=0;if(N===0)Z.tq&&(Z.tq=!1,Z.xl=!1),Z.O6=0,N=!0;else{if(N===
2||N===5)Aq(Z,"checked",N,a.info);else{if(N===1){if(!Z.tq){Z.tq=!0;N=!1;break a}if(!Z.xl){Z.xl=!0;Z.fp.seekTo(Z.getCurrentTime(),{b0:"quotaExceeded",Sh:!0});N=!1;break a}a.info.xT()?(K=Z.policy,K.Sm=Math.floor(K.Sm*.8),K.dA=Math.floor(K.dA*.8)):(K=Z.policy,K.hq=Math.floor(K.hq*.8),K.dA=Math.floor(K.dA*.8));Z.policy.V?Tv(Z.L,a.info.l3):Tw(Z.V,a.info.l3)}Z.fp.HF({reattachOnAppend:N})}N=!1}}if(!N)return!1;Z.policy.MX&&a.info.G()?(Z.fp.X().Xa()&&Z.U6("eosl",{ls:a.info.E3()}),a.isLocked=!0):(k.Z2(a),m0U(Z.V,
a.info));T&&(k=a.info.l3.iL)&&Z.fp.Gq(new VJ(k.key,k.type));return!0};
yly=function(Z,k,N){var a;if(a=Z.policy.Jy&&Z.b3&&!Z.b3.O&&!Z.fp.ow())k=k.info.l3.info,a=k.oa()&&k.Y()&&k.video&&k.video.width<3840&&k.video.width>k.video.height;if(a&&(Z.b3.O=!0,m8('video/webm; codecs="vp09.00.50.08.01.01.01.01.00"; width=3840; height=2160')))return N=gGX(N),Z.policy.D&&Z.U6("sp4k",{s:!!N}),N};
QZ0=function(Z,k,N,a,T){try{const K=k===Z.b3?.V?Z.audioTrack:Z.videoTrack;if(Z.policy.MX&&a?.G()){if(a?.O>1)return 6;K.dA=new g.Uc(()=>{const y=X6(K);Z.jm()||!y?.isLocked?Z.fp.X().Xa()&&Z.U6("eosl",{delayA:y?.info.E3()}):auN(K)?(Z.fp.X().Xa()&&Z.U6("eosl",{dunlock:y?.info.E3()}),sF(Z,K===Z.audioTrack)):(Z.U6("nue",{ls:y.info.E3()}),y.info.O+=1,Z.b3&&Z.vU())},1E4,Z);
Z.fp.X().Xa()&&Z.U6("eosl",{delayS:a.E3()});K.dA.start()}Z.policy.Ri&&a?.l3 instanceof Vj&&a.G()&&Z.U6("poseos",{itag:a.l3.info.itag,seg:a.Cp,lseg:a.l3.index.hW(),es:a.l3.index.G});k.appendBuffer(N,a,T)}catch(K){if(K instanceof DOMException){if(K.code===11)return 2;if(K.code===12)return 5;if(K.code===22||K.message.indexOf("Not enough storage")===0)return k=Object.assign({name:"QuotaExceededError",buffered:zd(k.Us()).replace(/,/g,"_"),vheap:$R(Z.videoTrack),aheap:$R(Z.audioTrack),message:g.BF(K.message,
3),track:Z.b3?k===Z.b3.U?"v":"a":"u"},aTb()),Z.handleError("player.exception",k),1;g.b(K)}return 4}return Z.b3.K3()?3:0};
Aq=function(Z,k,N,a){let T="fmt.unplayable",K=1;N===5||N===3?(T="fmt.unparseable",Z.policy.V?!a.l3.info.video||E2(Z.L.V).size>0||Tv(Z.L,a.l3):!a.l3.info.video||E2(Z.V.L).size>0||Tw(Z.V,a.l3)):N===2&&(Z.O6<15?(Z.O6++,T="html5.invalidstate",K=0):T="fmt.unplayable");a=iI(a);a.mrs=Z.b3?.D();a.origin=k;a.reason=N;a.trg="appenderr";Z.handleError(T,a,K)};
juG=function(Z,k,N,a,T){var K=Z.cD;var y=Z.policy.V,Q=!1;let q=-1;for(const m in K.V){var r=O9(K.V[m].info.mimeType)||K.V[m].info.xT();if(a===r)if(r=K.V[m].index,r.Of(k.Cp)){{Q=r;var C=k;const A=Q.D(C.Cp);A&&A.startTime!==C.startTime?(Q.segments=[],Q.j(C),Q=!0):Q=!1}Q?q=k.Cp:!k.pending&&y&&(C=r.getDuration(k.Cp),C!==k.duration&&(K.publish("clienttemp","mfldurUpdate",{itag:K.V[m].info.itag,seg:k.Cp,od:C,nd:k.duration},!1),r.j(k),Q=!0))}else r.j(k),Q=!0}q>=0&&K.publish("clienttemp","resetMflIndex",
{[a?"v":"a"]:q},!1);K=Q;wtf(Z.Jr,k,a,K);Z.policy.xW||Z.Y.Fm(k,N,a,T);k.Cp===Z.cD.Y8&&K&&X3(Z.cD)&&k.startTime>X3(Z.cD)&&(Z.cD.aE=k.startTime+(isNaN(Z.timestampOffset)?0:Z.timestampOffset),Z.Jr.isSeeking()&&Z.Jr.targetTime<Z.cD.Vt()&&Z.Jr.seek(Z.cD.Vt(),{}))};
sF=function(Z,k){if(Z.policy.MX&&Z.b3){var N=k?Z.b3?.V:Z.b3?.U;const a=k?Z.audioTrack:Z.videoTrack;k=X6(a);k?.isLocked&&(Z.fp.X().Xa()&&Z.U6("eosl",{unlock:k.info.E3()}),a.dA?.stop(),k.isLocked=!1,a.Z2(k),m0U(Z.V,k.info),N=N?.wS(),N?.E3()!==k.info.E3()&&Z.U6("oue",{bls:N?.E3(),tls:k.info.E3()}))}};
kLy=function(Z,k){Kn(k,"cms",N=>{Z.policy.D&&Z.U6("pathprobe",N)},N=>{Z.fp.handleError(N)})};
CnR=function(Z,k){Z.uq=k;Z.Y&&(Z.Y.uq=k);k=Z.uq;var N=Z.videoTrack.l3.info.oa();k.iq=N;k.BA({swebm:N});Z.G.uq=Z.uq;Z.policy.U&&(Z.U.uq=Z.uq,jcy(Z))};
mMy=function(Z,k){if(Z.b3&&Z.b3.U){k-=isNaN(Z.timestampOffset)?0:Z.timestampOffset;Z.getCurrentTime()!==k&&Z.resume();if(Z.Jr.isSeeking()&&Z.b3&&!Z.b3.K3()){const N=Z.getCurrentTime()<=k&&k<Z.getCurrentTime()+10,a=b1(Z.b3.U.Us(),Z.getCurrentTime()+ck);N&&a&&(Z.Jr.Y=!1)}Z.Jr.isSeeking()||Z.policy.Vz&&!Z.policy.s6||(Z.currentTime=k);Z.ws.XN()}};
sZf=function(Z,k,N,a){T$(Z)&&Z.k5&&a&&a===96&&(a=N?Z.fp.TX(k):k,Z.IM(a)||Z.k5.V||Z.U6("prebuffer",{miss:1,t:k.toFixed(3),isUtc:N}))};
Aly=function(Z,k){const N=Bb(Z.videoTrack).find(a=>a.startTime>=k&&pqi(Z,a.startTime,!1));
return N&&N.startTime<k+N.duration*1.5?N.startTime+.1:0};
auN=function(Z){const k=X6(Z)?.info;return!k||Z.IM(Math.min(k.Y+ck,k.L))};
Hk=function(Z,k){Z.timestampOffset!==k&&(Z.timestampOffset=k,Z.policy.tW&&F3(Z.cD),Z.Y.j=Z.timestampOffset,Z.fp.pg(Z.timestampOffset),Z.cD.isManifestless&&(Z.cD.timestampOffset=Z.timestampOffset),Z.videoTrack.PF(Z.timestampOffset),Z.audioTrack.PF(Z.timestampOffset))};
Pnj=function(Z){Z.audioTrack.N=[];Z.videoTrack.N=[]};
clf=function(Z){if(!(Z.length<=28))for(var k=(0,g.di)([60,0,75,0,73,0,68,0,62,0]),N=28;N<Z.length;){a:if(Z.length-N<k.length)var a=!1;else{for(a=0;a<k.length;++a)if(Z[N+a]!==k[a]){a=!1;break a}a=!0}if(a){N+=k.length;if(Z.length<=N+48)break;k=new Uint8Array(24);for(a=0;a<24;++a)k[a]=Z[N+a*2];Z=dj(k);Z=vF(Z);if(!Z)break;N=Z[0];Z[0]=Z[3];Z[3]=N;N=Z[1];Z[1]=Z[2];Z[2]=N;N=Z[4];Z[4]=Z[5];Z[5]=N;N=Z[6];Z[6]=Z[7];Z[7]=N;return Z}N++}};
HD0=function(Z,k){a:{var N=k.cryptoPeriodIndex;if(isNaN(N)&&Z.D.size>0)N=!0;else{for(const a of Z.D.values())if(a.cryptoPeriodIndex===N){N=!0;break a}N=!1}}Z.publish("log_qoe",{wvagt:"reqnews",canskip:N});N||Z.publish("rotated_need_key_info_ready",k)};
dMi=function(Z){switch(Z){case "DRM_TRACK_TYPE_AUDIO":return 1;case "DRM_TRACK_TYPE_SD":return 2;case "DRM_TRACK_TYPE_HD":return 3;case "DRM_TRACK_TYPE_UHD1":return 4;case "DRM_TRACK_TYPE_UHD2":return 5;default:return 0}};
VLU=function(Z,k=!1){var N=Z.status==="LICENSE_STATUS_OK"?0:9999,a=null;if(Z.license)try{a=vF(Z.license)}catch(T){g.b(T)}if(N===0&&!a)return null;a=new XfG(N,a);N!==0&&Z.reason&&(a.errorMessage=Z.reason);if(Z.authorizedFormats){N={};const T=[],K={};for(const y of Z.authorizedFormats){if(!y.trackType||!y.keyId)continue;k&&a.U.push({trackType:dMi(y.trackType),isHdr:!!y.isHdr});let Q=LJU[y.trackType];if(Q){Q==="HD"&&Z.isHd720&&(Q="HD720");y.isHdr&&(Q+="HDR");N[Q]||(T.push(Q),N[Q]=!0);let q=null;try{q=
vF(y.keyId)}catch(r){g.b(r)}q&&(K[g.fl(q,4)]=Q)}}a.D=T;a.V=K}Z.nextFairplayKeyId&&(a.nextFairplayKeyId=Z.nextFairplayKeyId);Z.sabrLicenseConstraint&&(a.sabrLicenseConstraint=vF(Z.sabrLicenseConstraint));return a};
FJr=function(Z,k,N){Z.onSuccess=k;Z.onError=N};
tLf=function(Z,k,N,a){const T={timeout:3E4,onSuccess:K=>{if(!Z.jm())if(uJ("drm_net_r",void 0,Z.timer),K=VLU(K,Z.U))Z.onSuccess(K,Z.requestNumber);else Z.onError(Z,"drm.net","t.p;p.i")},
onError:K=>{if(!Z.jm())if(K&&K.error)K=K.error,Z.onError(Z,"drm.net.badstatus",`t.r;p.i;c.${K.code};s.${K.status}`,K.code);else Z.onError(Z,"drm.net.badstatus","t.r;p.i;c.n")},
onTimeout:()=>{Z.onError(Z,"drm.net",`${"rt"}.req.${Z.requestNumber}`)}};
a&&(T.Y3=`Bearer ${a}`);g.Jh(N,"player/get_drm_license",k,T)};
Xt=function(Z,k,N=!1){Td(k);(N||Z.kW.Xa())&&Z.publish("ctmp","drmlog",k)};
har=function(Z){let k=Z.baseUrl;nMr(k)||Z.error("drm.net",2,"t.x");if(!cj(k,"fexp")){const N=["23898307","23914062","23916106","23883098"].filter(a=>Z.kW.experiments.experiments[a]);
N.length>0&&(Z.L.fexp=N.join())}for(const N of Object.keys(Z.L))k=MiR(k,N,Z.L[N]);return k};
luj=function(Z,k,N,a){u3f(k,(T,K)=>{if(Z.kW.Yl().V.Aq(LJ)&&Z.U.flavor==="widevine")a:{let y=!1;try{y=lt(T,QPG).type===4}catch(Q){}if(y){if(Xt(Z,{cert_cache_hit:!!Z.CC?.certificate},!0),a){Z.D.length===0&&Xt(Z,{md_gap:1},!0);k?.update(a);break a}}else if(N){N.V=k??null;N.licenseRequest=T;break a}Vm(Z,T,K,y)}else Vm(Z,T,K)},(T,K,y)=>{if(!Z.jm()){K=void 0;
var Q=1;g.nD(Z.U)&&g.CQ(Z.kW)&&Z.kW.B("html5_enable_safari_fairplay")&&y===1212433232&&(K="ERROR_HDCP",Q=Z.kW.B("html5_safari_fairplay_ignore_hdcp")?0:Q);Z.error("drm.keyerror",Q,T,K)}},()=>{Z.jm()||(Xt(Z,{onkyadd:1}),Z.O||(Z.publish("sessionready"),Z.O=!0))},T=>{Z.Ph(T)})};
Vm=function(Z,k,N,a=!1){if(!Z.jm())if(k){Xt(Z,{onkmtyp:N});Z.status="km";switch(N){case "license-renewal":case "license-request":case "license-release":break;case "individualization-request":fub(Z,k);return;default:Z.publish("ctmp","message_type",{t:N,l:k.byteLength})}Z.zt||(uJ("drm_gk_f",void 0,Z.videoData.Vz),Z.zt=!0,Z.publish("newsession",Z));if(pD(Z.U)&&(k=B_y(k),!k))return;k=new DMX(k,++Z.requestNumber,Z.videoData.Vz,Z.kW.B("html5_enable_vp9_fairplay"));FJr(k,T=>{ODf(Z,T,a)},(T,K,y)=>{if(!Z.jm()){var Q=
0;
T.V.U>=3&&(Q=1,K="drm.net.retryexhausted");Xt(Z,{onlcsrqerr:K,info:y});Z.error(K,Q,y);Z.shouldRetry(Kf(Q),T)&&vyU(Z,T)}});
g.u(Z,k);iDG(Z,k)}else Z.error("drm.unavailable",1,"km.empty")};
gyj=function(Z,k,N=null,a){let T=null;try{T=k.createSession(Z.C,K=>{Xt(Z,{m:K})}),luj(Z,T,a,N)}catch(K){k="t.g",K instanceof DOMException&&(k+=`;c.${K.code}`),Z.publish("licenseerror","drm.unavailable",1,k,"HTML5_NO_AVAILABLE_FORMATS_FALLBACK")}return T};
fub=function(Z,k){Xt(Z,{sdpvrq:1});Z.G=Date.now();if(Z.U.flavor!=="widevine")Z.error("drm.provision",1,`e.flavor;f.${Z.U.flavor};l.${k.byteLength}`);else{var N={cpn:Z.videoData.clientPlaybackNonce};Object.assign(N,Z.kW.V);N=g.mW("https://www.googleapis.com/certificateprovisioning/v1/devicecertificates/create?key=AIzaSyB-5OLKTx2iU5mko18DfdwK5611JIjbUhE",N);k={format:"RAW",headers:{"content-type":"application/json"},method:"POST",postBody:JSON.stringify({signedRequest:String.fromCharCode.apply(null,
k)}),responseType:"arraybuffer"};g.Ri(N,k,3,500).then(zK(a=>{a=a.xhr;if(!Z.jm()){a=new Uint8Array(a.response);var T=String.fromCharCode.apply(null,a);try{var K=JSON.parse(T)}catch(y){}K&&K.signedResponse?(Z.publish("ctmp","drminfo",{provisioning:1}),K=(Date.now()-Z.G)/1E3,Z.G=NaN,Z.publish("ctmp","provs",{et:K.toFixed(3)}),Z.Y&&Z.Y.update(a)):(K=K&&K.error&&K.error.message,a="e.parse",K&&(a+=`;m.${K}`),Z.error("drm.provision",1,a))}}),zK(a=>{Z.jm()||Z.error("drm.provision",1,`e.${a.errorCode};c.${a.xhr&&
a.xhr.status}`)}))}};
ODf=function(Z,k,N){if(!Z.jm())if(Xt(Z,{onlcsrsp:1}),Z.status="rr",k.statusCode!==0)Z.error("drm.auth",1,`t.f;c.${k.statusCode}`,k.errorMessage||void 0);else{uJ("drm_kr_s",void 0,Z.videoData.Vz);if(k.heartbeatParams&&k.heartbeatParams.url&&Z.videoData.B("outertube_streaming_data_always_use_staging_license_service")){var a=Z.U.D.match(/(.*)youtube.com/g);a&&(k.heartbeatParams.url=a[0]+k.heartbeatParams.url)}k.heartbeatParams&&Z.publish("newlicense",k.heartbeatParams);k.D&&(Z.D=k.D,Z.videoData.pE||
Z.publish("newlicense",new wfb),Z.videoData.pE=!0,Z.j=Er(Z.D,T=>T.includes("HDR")));
k.U&&(Z.N=k.U);k.V&&(Z.kW.B("html5_enable_vp9_fairplay")&&Z.U.V()?(a=g.fl(tx(Z.fairplayKeyId),4),Z.V[a]={type:k.V[a],status:"unknown"}):Z.V=Oh(k.V,T=>({type:T,status:"unknown"})));
MM(Z.U)&&(k.message=Uzf(g.fl(k.message)));Z.Y&&(Xt(Z,{updtks:1}),Z.status="ku",N&&Z.CC&&Z.kW.Yl().V.Aq(LJ)&&(Z.CC.certificate=k.message),Z.Y.update(k.message).then(()=>{uJ("drm_kr_f",void 0,Z.videoData.Vz);Ft(Z)||(Xt(Z,{ksApiUnsup:1}),Z.publish("keystatuseschange",Z));!N&&Z.CC&&Z.kW.Yl().V.Aq($Mf)&&(Z.CC.V=gyj(Z,Z.CC.mediaKeys,Z.CC?.certificate,Z.CC))},T=>{T=`msuf.req.${Z.requestNumber};msg.${g.BF(T.message,3)}`;
Z.error("drm.keyerror",1,T)}));
g.nD(Z.U)&&Z.publish("fairplay_next_need_key_info",Z.baseUrl,k.nextFairplayKeyId);Z.kW.B("html5_enable_vp9_fairplay")&&Z.U.V()&&Z.publish("qualitychange",xMN(Z.D));k.sabrLicenseConstraint&&Z.publish("sabrlicenseconstraint",k.sabrLicenseConstraint)}};
iDG=function(Z,k){Z.status="km";uJ("drm_net_s",void 0,Z.videoData.Vz);const N=new g.aE(Z.kW.LX),a={context:g.Px(N.config_||g.Ah())};a.drmSystem=GLi[Z.U.flavor];a.videoId=Z.videoData.videoId;a.cpn=Z.videoData.clientPlaybackNonce;a.sessionId=Z.sessionId;a.licenseRequest=g.fl(k.message);a.drmParams=Z.videoData.drmParams;isNaN(Z.cryptoPeriodIndex)||(a.isKeyRotated=!0,a.cryptoPeriodIndex=Z.cryptoPeriodIndex);var T=!!Z.videoData.U?.j()?.isHdr();a.drmVideoFeature=T?"DRM_VIDEO_FEATURE_PREFER_HDR":"DRM_VIDEO_FEATURE_SDR";
Z.kW.experiments.Yl().V.Aq(SS0)&&(a.context=g.sK(Z.videoData));if(a.context&&a.context.client){if(T=Z.kW.V)a.context.client.deviceMake=T.cbrand,a.context.client.deviceModel=T.cmodel,a.context.client.browserName=T.cbr,a.context.client.browserVersion=T.cbrver,a.context.client.osName=T.cos,a.context.client.osVersion=T.cosver;Z.kW.experiments.Yl().V.Aq(SS0)||(a.context.user=a.context.user||{},Z.videoData.zt&&(a.context.user.credentialTransferTokens=[{token:Z.videoData.zt,scope:"VIDEO"}]),Z.videoData.hq&&
(a.context.user.kidsParent={oauthToken:Z.videoData.hq}));a.context.request=a.context.request||{};a.context.request.mdxEnvironment=Z.videoData.mdxEnvironment||a.context.request.mdxEnvironment;g.nD(Z.U)&&(a.fairplayKeyId=g.fl(tx(Z.fairplayKeyId)));g.GC(Z.kW,Z.videoData.G()).then(K=>{tLf(k,a,N,K);Z.status="rs"})}else Z.error("drm.net",2,"t.r;ic.0")};
eaN=function(Z,k,N){const a={};a.isHdr=k.includes("HDR");switch(k.replace("HDR","").replace("720","")){case "AUDIO":a.trackType=1;break;case "SD":a.trackType=2;break;case "HD":a.trackType=3;break;case "UHD1":a.trackType=4;break;case "UHD2":a.trackType=5;break;default:a.trackType=0}!a.trackType||N[k]||Ft(Z)&&!tq(Z,k)||(Z.authorizedFormats.push(a),N[k]=!0)};
oy0=function(Z,k){const N=[];for(const a of Object.keys(Z.V))N.push(`${a}_${Z.V[a].type}_${Z.V[a].status}`);return N.join(k)};
Ft=function(Z){var k;if(k=Z.Vz&&Z.Y!=null)Z=Z.Y,k=!(!Z.V||!Z.V.keyStatuses);return k};
vyU=function(Z,k){var N=k.V.getValue();N=new g.Uc(()=>{iDG(Z,k)},N);
g.u(Z,N);N.start();g.Id(k.V);Xt(Z,{rtyrq:1})};
hq=function(Z){const k={};k[Z.status]=Ft(Z)?oy0(Z,"."):Z.D.join(".");return k};
tq=function(Z,k){for(const N in Z.V)if(Z.V[N].status==="usable"&&Z.V[N].type===k)return!0;return!1};
Jly=function(Z,k){for(const N in Z.V)if(Z.V[N].type===k)return Z.V[N].status};
zay=function(Z){let k;k=Z[0];Z[0]=Z[3];Z[3]=k;k=Z[1];Z[1]=Z[2];Z[2]=k;k=Z[4];Z[4]=Z[5];Z[5]=k;k=Z[6];Z[6]=Z[7];Z[7]=k};
xMN=function(Z){return g.KK(Z,"UHD2")||g.KK(Z,"UHD2HDR")?"highres":g.KK(Z,"UHD1")||g.KK(Z,"UHD1HDR")?"hd2160":g.KK(Z,"HD")||g.KK(Z,"HDHDR")?"hd1080":g.KK(Z,"HD720")||g.KK(Z,"HD720HDR")?"hd720":"large"};
B_y=function(Z){var k="";for(let N=0;N<Z.length;N+=2)k+=String.fromCharCode(Z[N]);Z=ak(new DOMParser,UD(k),"text/xml");if(!Z)return null;(k=Z.querySelector("Challenge"))&&k.childNodes&&k.childNodes.length!==0?(Z=Uint8Array,k=Om(k.childNodes[0].nodeValue),k=(0,g.di)(k).buffer,Z=new Z(k)):Z=null;return Z};
u3f=function(Z,k,N,a,T){Z.L=k;Z.D=N;Z.G=a;Z.j=T};
var UMr=function(Z,k,N){return W$[c[2]](this,32,5830,Z,k,N)};
var bDy=function(Z){Z.V?(Z.Y.K(Z.V,"message",Z.xW),Z.Y.K(Z.V,"keystatuseschange",Z.Ph),Z.V.closed&&Z.V.closed.then(zK(()=>{Z.onClosed()}),null)):Z.U&&(We(Z.Y,Z.U,["mskeymessage",
"webkitkeymessage"],Z.O),We(Z.Y,Z.U,["mskeyerror","webkitkeyerror"],Z.Vz),We(Z.Y,Z.U,["mskeyadded","webkitkeyadded"],Z.N))},pfy=function(Z,k,N){g.b(N);
Z.D&&(N instanceof DOMException&&(k+=`;n.${N.name};m.${N.message}`),Z.D(k))},RaG=function(Z){We(Z.Y,Z.element,["keymessage",
"webkitkeymessage"],Z.Vz);We(Z.Y,Z.element,["keyerror","webkitkeyerror"],Z.N);We(Z.Y,Z.element,["keyadded","webkitkeyadded"],Z.C)},MLf=function(Z,k=null){if(Z.V.keySystemAccess)return Z.j=Z.j.then(()=>Z.mediaKeys?Promise.resolve():k?.mediaKeys&&k.u3?.EQ()?(Z.mediaKeys=k?.mediaKeys,Promise.resolve()):Z.V.keySystemAccess.createMediaKeys().then(N=>{Z.jm()||(Z.mediaKeys=N,k?.u3?.EQ()&&(k.mediaKeys=N))})).then(()=>{const N=k?.lq();
return Z.element&&Z.element!==N&&Z.element.mediaKeys?Z.element.setMediaKeys(null):Promise.resolve()}).then(()=>{Z.element=k?.lq();
return Z.element&&Z.element.mediaKeys!==Z.mediaKeys?Z.element.setMediaKeys(Z.mediaKeys):Promise.resolve()}),Z.j;
bn(Z.V)?Z.U=new (zL())(Z.V.keySystem):RZ(Z.V)?(Z.U=new (zL())(Z.V.keySystem),Z.element?.webkitSetMediaKeys(Z.U)):RaG(Z);return null},nyr=function(Z,k){const N=new Uint8Array(270);
for(let a=0;a<135;a++)N[a*2]='<PlayReadyCDMData type="LicenseAcquisition"><LicenseAcquisition version="1.0" Proactive="true"></LicenseAcquisition></PlayReadyCDMData>'.charCodeAt(a);Z=Z.U.createSession("video/mp4",k,N);return new uo(null,null,null,null,Z)},jZf=function(Z,k){k=Iuy(k,Z.V.fP);
k=Z.U.createSession("video/mp4",k);return new uo(null,null,null,null,k,Z.G)},lo=function(Z,k){let N=Z.L[k.sessionId];
!N&&Z.D&&(N=Z.D,Z.D=null,N.sessionId=k.sessionId,Z.L[k.sessionId]=N);return N},Iuy=function(Z,k){var N=Z.subarray(4);
N=new Uint16Array(N.buffer,N.byteOffset,N.byteLength/2);N=String.fromCharCode.apply(null,N).match(/ek=([0-9a-f]+)/)[1];var a="";for(var T=0;T<N.length;T+=2)a+=String.fromCharCode(parseInt(N.substring(T,T+2),16));N=a;a=new ArrayBuffer(N.length*2);T=new Uint16Array(a);for(var K=0;K<N.length;K++)T[K]=N.charCodeAt(K);N=new Uint8Array(a);a=0;K=new ArrayBuffer(Z.byteLength+4+N.byteLength+4+k.byteLength);T=new Uint8Array(K);K=new DataView(K);T.set(Z);a+=Z.byteLength;K.setUint32(a,N.length,!0);a+=4;T.set(N,
a);a+=N.length;K.setUint32(a,k.byteLength,!0);T.set(k,a+4);return T},WJG=function(Z){let k=MLf(Z.mediaKeys,Z.mediaElement);
k?k.then(zK(()=>{Eyb(Z)}),zK(N=>{if(!Z.jm()){g.b(N);
var a="t.a";N instanceof DOMException&&(a+=";n."+N.name+";m."+N.message);Z.publish("licenseerror","drm.unavailable",1,a,"HTML5_NO_AVAILABLE_FORMATS_FALLBACK")}})):(Z.U({mdkrdy:1}),Z.Vz=!0);
Z.O&&(k=MLf(Z.O,Z.mediaElement))},Eyb=function(Z){if(!Z.jm())if(Z.kW.B("html5_drm_set_server_cert")||Z.V.V()){const k=Z.mediaKeys.setServerCertificate();
k?k.then(zK(N=>{Z.kW.Xa()&&Z.publish("ctmp","ssc",{success:N})}),zK(N=>{Z.publish("ctmp","ssce",{n:N.name,
m:N.message})})).then(zK(()=>{fJ(Z)})):fJ(Z)}else fJ(Z)},ZQi=function(Z,k,N){Z.hq=!0;
N=new VJ(k,N);Z.kW.B("html5_eme_loader_sync")&&(Z.G.get(k)||Z.G.set(k,N));YSf(Z,N)},YSf=function(Z,k){if(!Z.jm()){Z.U({onInitData:1});
if(Z.kW.B("html5_eme_loader_sync")&&Z.videoData.D&&Z.videoData.D.V()){var N=Z.C.get(k.initData);k=Z.G.get(k.initData);if(!N||!k)return;k=N;N=k.initData;Z.G.remove(N);Z.C.remove(N)}Z.U({initd:k.initData.length,ct:k.contentType});if(Z.V.flavor==="widevine")if(Z.vD&&!Z.videoData.isLivePlayback)Bk(Z);else{if(!(Z.kW.B("vp9_drm_live")&&Z.videoData.isLivePlayback&&k.oa)){Z.vD=!0;N=k.cryptoPeriodIndex;var a=k.V;Bcj(k);k.oa||(a&&k.V!==a?Z.publish("ctmp","cpsmm",{emsg:a,pssh:k.V}):N&&k.cryptoPeriodIndex!==
N&&Z.publish("ctmp","cpimm",{emsg:N,pssh:k.cryptoPeriodIndex}));Z.publish("widevine_set_need_key_info",k)}}else Z.FS(k)}},Bk=function(Z){if(Z.hq&&Z.Vz&&!Z.xW){for(;Z.Y.length;){const k=Z.Y[0],N=kCf(Z)?D0X(k):g.fl(k.initData);
if(Z.V.V()&&!k.U)Z.Y.shift();else{if(Z.D.get(N))if(Z.V.flavor!=="fairplay"||Z.V.V()){Z.Y.shift();continue}else Z.D.delete(N);Bcj(k);break}}Z.Y.length&&Z.createSession(Z.Y[0])}},fJ=function(Z){Z.jm()||(Z.Vz=!0,Z.U({onmdkrdy:1}),Bk(Z))},kCf=function(Z){return Z.V.flavor==="widevine"&&Z.videoData.B("html5_drm_cpi_license_key")},Nr0=async function(Z){if(g.ce()&&Z.mediaKeys.mediaKeys?.getMetrics){var k=await Z.mediaKeys.getMetrics();
k&&(Zq(k)||(k=g.Lv(k)),/^[A-Za-z0-9_-]+={0,3}$/.test(k)||(k=g.BF(k,void 0,!0)),Z.publish("ctmp","drm",{metrics:k}))}},afi=function(Z,k){if(Z.videoData.C)return!1;
Z.Jq.O6+=1;if(Z.Jq.O6<=10)return!1;k.exiled=`${Z.Jq.O6}`;Z.dV("qoe.start15s",k);Z.fp.publish("playbackstalledatstart");return!0},Trr=function(Z){return Z.U?!0:Z.Jq.Vz==="yt"?nQ(Z.videoData)?Z.fp.loader?.rD():Z.videoData.C?Z.videoData.Kp<25:!Z.videoData.Kp:!1},Kly=function(Z){if(!Z.U){Z.U=!0;
var k=Z.fp.getPlayerState();k=k.isPaused()||k.isSuspended();Z.fp.XL();k&&!yn(Z.videoData)||Z.fp.publish("signatureexpired")}},Dy=function(Z,k,N){const a=Z.videoData.U;
var T=Z.videoData.Y,K=Z.Jq.B("html5_disable_codec_fallback_for_drm")&&Z.videoData.kT();vZ(Z.fp.getVideoData())&&qSr(Z.fp,"pe");Z.Jq.Yl().V.Aq(y4b)&&(N.bkg=Z.fp.CN().isBackground()?"1":"0");if((k==="progressive.net.retryexhausted"||k==="fmt.unplayable"||k==="fmt.decode")&&!Z.fp.OW.L&&a&&a.itag==="22")return Z.fp.OW.L=!0,Z.dV("qoe.restart",{reason:"fmt.unplayable.22"}),Z.fp.r8(),!0;var y=!1;if(Z.videoData.isExternallyHostedPodcast){if(y=Z.videoData.mj)N.mimeType=y.type,Z.U6("3pp",{url:y.url});N.ns=
"3pp";Z.fp.N4(k,1,"VIDEO_UNAVAILABLE",Td((new g.yA(k,N,1)).details));return!0}var Q=Z.Wz+3E4<(0,g.z)()||Z.V.isActive();if(Z.Jq.B("html5_empty_src")&&Z.videoData.isAd()&&k==="fmt.unplayable"&&/Empty src/.test(`${N.msg}`))return N.origin="emptysrc",Z.dV("auth",N),!0;Q||QOf(Z.fp.CN())||(N.nonfg="paused",Q=!0,Z.fp.pauseVideo());k!=="fmt.decode"&&k!=="fmt.unplayable"||!T?.G()||(Zv0(Z.Jq.L,T.gA),N.acfallexp=T.gA,y=Q=!0);!Q&&Z.D>0&&(Z.V.start(),Q=!0,N.delayed="1",--Z.D);T=Z.fp.loader;Q||!a?.V()&&!a?.Y()||
K||(Zv0(Z.Jq.L,a.gA),y=Q=!0,N.cfallexp=a.gA);if(!Q)return afi(Z,N);K=!1;Z.L?Z.Wz=(0,g.z)():K=Z.L=!0;Q=Z.videoData;if(Q.FS){Q=Q.FS.L();var q=Date.now()/1E3+1800;Q=Q<q}else Q=!1;N.e=k;Q&&(N.staleprog="1");Z.dV("qoe.restart",N);if(Q&&Trr(Z))return Kly(Z),!0;if(!(!g.A5("philips")||k==="fmt.unplayable"&&T&&T.dA||Z.Jq.V.cplatform==="GAME_CONSOLE"))try{window.close()}catch{}a&&a.V()&&!Z.Jq.B("html5_allow_av1_retry_in_session")?(y=Z.Jq.L,y.N=!0,y=y.V=!0):T?K||(k=(k=hM(T.videoTrack)||T.videoTrack.V)?k.l3:
T.videoTrack.l3,k.MX+=1,T.policy.V?Tv(T.L,k,!0):Tw(T.V,k,!0)):Z.videoData.FS&&Z.videoData.FS.Y();Z.V.isActive()||Z.fp.ZQ(y);return!0},q$b=function(Z,k){if((Z=Z.fp.TM())&&(k.errorCode==="fmt.unplayable"||k.errorCode==="html5.invalidstate")){const N=Z.zQ();
k.details.merr=N?N.toString():"0";k.details.mmsg=Z.qR()}},r4b=function(Z){return Z.errorCode==="net.badstatus"&&(Z.severity===1||!!Z.details.fmt_unav)},CSf=function(Z,k){return Z.Jq.B("html5_use_network_error_code_enums")&&k.details.rc===403||k.details.rc==="403"?(Z=k.errorCode,Z==="net.badstatus"||Z==="manifest.net.retryexhausted"):!1},OF=function(Z,k,N){try{k={detail:`pr.${k}`},(uS(Z.Jq)||Yy(Z.Jq)==="TVHTML5_FOR_KIDS")&&Z.Jq.B("html5_reload_by_kabuki_app")?Z.fp.N4("qoe.restart",N?1:2,void 0,Td(k),
"7"):(Z.dV("qoe.restart",k),window.location.reload())}catch{}},mZf=function(Z,k){if(!CSf(Z,k)&&!Z.U)return!1;
k.details.sts="20522";if(Trr(Z))return Kf(k.severity)&&(k=Object.assign({e:k.errorCode},k.details),k=new g.yA("qoe.restart",k)),Z.dV(k.errorCode,k.details),Kly(Z),!0;(0,g.z)()-Z.Jq.PG>6048E5&&OF(Z,"signature",!0);return!1},sOU=function(Z){if(Z.videoData.errorDetail==="7"&&g.Qw(Z.Jq)){const k=!Z.videoData.isInlinePlaybackNoAd;
k&&Z.Jq.l9++;OF(Z,"innertube_player_reload_required",k&&Z.Jq.l9>1);return!0}return!1},vk=function(Z,k="fmt.noneavailable"){var N=Z.Jq.L;
N.G=!1;N.V=!0;Z.dV("qoe.restart",{e:k,detail:"hdr"});Z.fp.ZQ(!0)},A4f=function(Z){if(Z.fp.CN().isInline())return io;
Z=Vc[T8()];return g.dg("auto",Z,!1,"s")},PSb=function(Z,k){var N;
a:if((N=k.V)&&N.videoInfos.length){for(var a of N.videoInfos)if(a.L?.smooth){N=a.video.qualityOrdinal;break a}N=N.videoInfos[0].video.qualityOrdinal}else N=0;(g.A5("armv7")||g.A5("aarch64")||g.A5("android"))&&!g.Qw(Z.kW)&&k.V.videoInfos[0].Y()&&(N=Math.min(N,g.ff.large));a=g.Q5(Z.kW.experiments,"html5_chipset_soft_cap");a>0&&(N=Math.min(N,a));a=g.Q5(Z.kW.experiments,"html5_sabr_non_streaming_xhr_soft_cap");!s1&&a>0&&(N=Math.min(N,a));if(a=g.Q5(Z.kW.experiments,"html5_max_vertical_resolution")){let y=
4320;for(var T=0;T<k.V.videoInfos.length;T++){var K=k.V.videoInfos[T];K.video.height>a&&(y=Math.min(y,K.video.qualityOrdinal))}if(y<4320){T=0;for(K=0;K<k.V.videoInfos.length;K++){const Q=k.V.videoInfos[K].video.qualityOrdinal;Q<y&&(T=Math.max(T,Q))}T&&(N=Math.min(T,N))}Z.fp.U6("mvr",{h:a,cp:N})}return new Ho(0,N,!1,"o")},HQr=function(Z,k){let N=4320;
!Z.kW.U||g.s$(Z.kW)||Z.kW.B("hls_for_vod")||Z.kW.B("mweb_remove_360p_cap")||(N=g.ff.medium);var a=g.Q5(Z.kW.experiments,"html5_default_quality_cap");a&&k.V.V()&&(Z.kW.B("html5_always_apply_default_quality_cap")||!k.videoData.fX&&!k.videoData.contentProtection)&&(N=Math.min(N,a));a=g.Q5(Z.kW.experiments,"html5_random_playback_cap");var T=/[a-h]$/;a&&T.test(k.videoData.clientPlaybackNonce)&&(N=Math.min(N,a));if(T=a=g.Q5(Z.kW.experiments,"html5_hfr_quality_cap"))a:{T=k.V;if(T.V())for(var K of T.videoInfos)if(K.video.U()){T=
!0;break a}T=!1}T&&(N=Math.min(N,a));(K=g.Q5(Z.kW.experiments,"html5_live_quality_cap"))&&k.videoData.isLivePlayback&&(N=Math.min(N,K));N=c4N(Z,k,N);Z=g.Q5(Z.kW.experiments,"html5_byterate_soft_cap");return new Ho(0,N===4320?0:N,!1,"d",Z)},gi=function(Z,k){const N=Z.fp.CN();
return N.isInline()&&!k.DC?new Ho(0,480,!1,"v"):nQ(k)?io:N.isBackground()&&Qb()/1E3>60&&!g.Qw(Z.kW)?new Ho(0,360,!1,"v"):io},wi=function(Z,k,N){if(Z.kW.experiments.yz("html5_disable_client_autonav_cap_for_onesie")&&k.jC()||g.Qw(Z.kW)&&(T8(-1)>=1080||k.osid))return io;
let a=g.Q5(Z.kW.experiments,"html5_autonav_quality_cap");const T=g.Q5(Z.kW.experiments,"html5_autonav_cap_idle_secs");return a&&k.isAutonav&&Qb()/1E3>T?(N&&(a=c4N(Z,N,a)),new Ho(0,a,!1,"e")):io},$T=function(Z,k){if(!k.V.V())return Z.L?new Ho(0,360,!1,"b"):io;
var N=!1,a=!1;for(var T of k.V.videoInfos)T.V()?N=!0:a=!0;N=N&&a;a=0;T=g.Q5(Z.kW.experiments,"html5_performance_cap_floor");T=Z.kW.U?240:T;for(const K of k.V.videoInfos){if(N&&K.V())continue;k=$y(K.gA,K.video.fps,Z.D);const y=K.video.qualityOrdinal;if(Math.max(k,T)>=y){a=y;break}}return new Ho(0,a,!1,"b")},G$=function(Z,k){const N=xT(Z,k.V?.videoInfos),a=Z.fp.getPlaybackRate();
return a>1&&N?(Z=nPN(Z.kW.L,k.V.videoInfos,a),new Ho(0,Z,!0,"o")):new Ho(0,0,!1,"o")},dZj=function(Z,k){if(Z.B("html5_disable_ustreamer_constraint_for_sabr")&&nQ(k.videoData))return io;
const N=Z.fp.rS();Z.B("html5_use_video_quality_cap_for_ustreamer_constraint")&&N&&N.ol>0&&Ls(k.videoData.IV)&&(Z=N.ol,k.videoData.IV=new Ho(0,Z,!1,"u"));return k.videoData.IV},So=function(Z,k,N){g.Qw(Z.kW)&&(N=N.compose(Z.JX(k)));
return N},xT=function(Z,k){return k&&g.Qw(Z.kW)?k.some(N=>N.video.U()):!1},c4N=function(Z,k,N){if(Z.B("html5_optimality_defaults_chooses_next_higher")&&N)for(Z=k.V.videoInfos,k=1;k<Z.length;k++)if(Z[k].video.qualityOrdinal<N)return Z[k-1].video.qualityOrdinal;
return N},XQf=async function(Z){if(!Z.V.V()||typeof navigator.mediaCapabilities?.decodingInfo!=="function")return Promise.resolve();
await Promise.resolve();for(const k of Z.V.videoInfos)await ENf(k)},Llb=function(Z,k){var N=k.gA,a=k.video.fps,T=k.video.qualityOrdinal-1,K=Z.D;
k=`${N}${a>49?"p60":a>32?"p48":""}`;N=$y(N,a,K);T>0&&(N=Math.min(N,T));!GL.has(k)&&Qc().includes(k)?(a=yc(),+a[k]>0&&(N=Math.min(+a[k],N)),a[k]!==N&&(a[k]=N,g.Z_("yt-player-performance-cap",a,2592E3))):GL.has(k)||K==null?(a=Qc().slice(),a.includes(k)||(a.push(k),g.Z_("yt-player-performance-cap-active-set",a,2592E3)),w_.set(k,N)):(GL.add(k),K?.set(k,N));Z.fp.Qr()},Vb0=function(){return Oh(yc(),Z=>`${Z}`)},Flf=function(Z,k,N,a){if(!k||!N||!k.videoData.U)return!1;
const T=g.Q5(Z.kW.experiments,"html5_df_downgrade_thresh"),K=Z.B("html5_log_media_perf_info");if(!((0,g.z)()-Z.Y<5E3?0:K||T>0))return!1;const y=((0,g.z)()-Z.Y)/1E3;Z.Y=(0,g.z)();N=N.getVideoPlaybackQuality();if(!N)return!1;const Q=N.droppedVideoFrames-Z.G,q=N.totalVideoFrames-Z.C;Z.G=N.droppedVideoFrames;Z.C=N.totalVideoFrames;const r=N.displayCompositedVideoFrames===0?0:N.displayCompositedVideoFrames||-1;K&&Z.kW.Xa()&&Z.fp.U6("ddf",{dr:N.droppedVideoFrames,de:N.totalVideoFrames,comp:r});if(a)return Z.V=
0,!1;if((q-Q)/y>Z.N||!T||g.Qw(Z.kW))return!1;Z.V=(q>60?Q/q:0)>T?Z.V+1:0;if(Z.V!==3)return!1;Llb(Z,k.videoData.U);Z.fp.U6("dfd",Object.assign({dr:N.droppedVideoFrames,de:N.totalVideoFrames},Vb0()));return!0},tby=function(Z,k){Z.B("html5_log_media_perf_info")&&(Z.fp.U6("perfdb",Vb0()),Z.fp.U6("sessionperfdb",Object.fromEntries(w_.entries())),Z.fp.U6("playbackperfdb",Object.fromEntries(Z.D.entries())),Z.fp.U6("hwc",{nch:navigator.hardwareConcurrency},!0),k&&Z.fp.U6("mcdb",{itags:k.V.videoInfos.filter(N=>
N.L?.smooth===!1).map(N=>N.itag).join("-")}))},hiX=function(Z){switch(Z.kW.playerCanaryStage?.toLowerCase()){case "xsmall":return"HTML5_PLAYER_CANARY_STAGE_XSMALL";
case "small":return"HTML5_PLAYER_CANARY_STAGE_SMALL";case "medium":return"HTML5_PLAYER_CANARY_STAGE_MEDIUM";case "large":return"HTML5_PLAYER_CANARY_STAGE_LARGE";case "xlarge":return"HTML5_PLAYER_CANARY_STAGE_XLARGE";default:return"HTML5_PLAYER_CANARY_STAGE_UNSPECIFIED"}},uJX=function(Z){Z.V>=0||(Z.provider.fp.getVisibilityState()===3?Z.L=!0:(Z.V=g.j_(Z.provider),Z.delay.start()))},lfb=function(Z){if(!(Z.U<0)){var k=g.j_(Z.provider),N=k-Z.Y;
Z.Y=k;Z.playerState.U()?Z.playTimeSecs+=N:Z.playerState.isBuffering()&&!Z.playerState.V(16)&&(Z.rebufferTimeSecs+=N)}},og=function(Z,k=!1){Z.V.Y=k;
Z.V.startTime=Z.D;Z.V.endTime=Z.U;Z.pX?.length&&(Z.V.pX=Z.pX);Z.rE?.length&&(Z.V.rE=Z.rE);k=!1;const N=g.bf(Z.segments);Z.segments.length&&!N?.Y&&N?.isEmpty()?(Z.segments[Z.segments.length-1].previouslyEnded&&(Z.V.previouslyEnded=!0),Z.segments[Z.segments.length-1]=Z.V,k=!0):Z.segments.length&&Z.V.isEmpty()&&!Z.V.Y||(Z.segments.push(Z.V),k=!0);k?Z.V.endTime===0&&(Z.previouslyEnded=!1):Z.V.previouslyEnded&&(Z.previouslyEnded=!0);Z.G+=Z.U-Z.D;Z.V=eo(Z.provider);Z.V.previouslyEnded=Z.previouslyEnded;
Z.provider.kW.Yl().V.Aq(ffN)&&(Z.L+=JSON.stringify(Z.V).length);Z.previouslyEnded=!1;Z.D=Z.U},Br0=function(Z){g.Ob(Z.j);
Z.j=NaN},DZy=function(Z){Br0(Z);
Z.j=g.B8(()=>{Z.update()},100);
Z.Hh=g.j_(Z.provider);Z.V=eo(Z.provider)},OQy=function(Z,k,N){N-=Z.Hh;
return k===Z.U&&N>.5};
var v2y=function(Z,k){return NM[c[2]](this,3,5299,Z,k)};
Jq=function(Z,k){const N=Z.sendVisitorIdHeader?Z.visitorData:void 0;return g.GC(Z.kW,Z.accessToken).then(a=>UY(Z.uri,Z.kW,Z.pageId,N,a,k))};
iQb=function(Z){Z.indexOf("watchtime")!==-1&&g.TO("gelDebuggingEvent",{vss3debuggingEvent:{vss2Ping:Z}})};
g2f=function(Z,k){Z.attestationResponse&&Jq(Z).then(N=>{N=N||{};N.method="POST";N.postParams={atr:Z.attestationResponse};Z.dA?Z.FS?eW().sendAndWrite(k,N):eW().sendThenWrite(k,N):g.SD(k,N)})};
wQX=function(Z){const k={v1:[]};if(Er(Z.segments,N=>!!N.pX||!!N.rE)){for(const N of Z.segments)k.v1.push({pX:N.pX||[],
rE:N.rE||[]});Z=g.SV({HE:k},mKU);return g.fl(Z,4)}};
$ZU=function(Z,k){return()=>{Z.kW.B("html5_simplify_pings")?(Z.V=Z.vD,Z.bq=k(),Z.ov=0,Z.send()):Jq(Z).then(N=>{var a=TC(Z);a.cmt=a.len;a.lact="0";const T=k().toFixed(3);a.rt=Number(T).toString();a=g.mW(Z.uri,a);Z.kW.B("vss_through_gel_double")&&iQb(a);Z.dA?(N==null&&(N={}),Z.FS?eW().sendAndWrite(a,N):eW().sendThenWrite(a,N)):N?g.SD(a,N):g.iv(a)})}};
aO=function(Z,k){return g.ni(k,Z.U).join(",")};
EPy=function(Z,k){if(k&&Z.Y){var N=new Set(["q","feature","mos"]),a=new Set("autoplay cl len fexp delay el ns adformat".split(" ")),T=new Set(["aqi","autonav","list","ssrt","upt"]);Z.Y.ns==="3pp"&&(k.ns="3pp");for(const K of Object.keys(Z.Y))a.has(K)||N.has(K)||T.has(K)&&!Z.Y[K]||(k[K]=Z.Y[K])}};
z$=function(Z,k){var N=xZf(Z.provider);Object.assign(N,{state:Z.N});k=new GCb(Z.provider.videoData,Z.provider.kW,k,N);k.V=Z.provider.fp.ym();N=Z.provider.videoData.clientPlaybackNonce;k.V=Z.provider.fp.M6(N);Z.provider.videoData.isLivePlayback||(k.vD=Z.provider.fp.getDuration(N));Z.provider.videoData.V&&(N=Z.provider.videoData.V.HG(k.V))&&(k.Vz=N-k.V,w9(Z.provider.videoData)&&(k.V+=Z.provider.fp.mx(),k.Vz-=Z.provider.fp.mx()));k.bq=g.j_(Z.provider);k.segments=[eo(Z.provider)];return k};
S$0=function(Z){var k=Z.provider.videoData.d9;const N=Z.provider.videoData.LA,a=[10+k,10,10,40+N-k,40];var T=Z.provider.videoData.getPlayerResponse()?.playbackTracking;const K=T?.videostatsScheduledFlushWalltimeSeconds;T=T?.videostatsDefaultFlushIntervalSeconds;if(!(K&&K.length>0&&T))return a;k=[K[0]+k,...K.slice(1).map((y,Q)=>y-K[Q]),
T+N-k,T];return k.some(y=>y<0)?(g.pG(Z.logger,347111855,`Neg vss scheduled pings ${K} ${T}`),a):k};
UF=function(Z,k=NaN){const N=g.j_(Z.provider);k=isNaN(k)?N:k;k=Math.ceil(k);const a=Z.xW[Z.Vz];Z.Vz+1<Z.xW.length&&Z.Vz++;const T=k+a;Z.L=g.fb(()=>{if(!Z.jm()){Z.L=NaN;var K=Z.O(),y=eii(Z,K);y.N=T;var Q=Z.dA>1E3;!(K.length>1)&&K[0].isEmpty()||Q||(y.j=UF(Z,T));y.send();Z.dA++}},(T-N)*1E3);
return Z.U=T};
bo=function(Z,k){const N=Z.provider.kW;g.GC(Z.provider.kW,Z.provider.videoData.G()).then(a=>{const T=Z.provider.kW.pageId,K=Z.provider.kW.sendVisitorIdHeader?Z.provider.videoData.visitorData:void 0,y=Z.provider.kW.B("vss_pings_using_networkless")||Z.provider.kW.B("kevlar_woffle"),Q=Z.provider.kW.B("allow_skip_networkless");a=UY(k,N,T,K,a);bP(k,a,{token:Z.provider.videoData.Pq,m2:Z.provider.videoData.ZT,mdxEnvironment:Z.provider.videoData.mdxEnvironment},N,void 0,y&&!Q,!1,!0)})};
eii=function(Z,k){const N=z$(Z,"watchtime");o2f(Z)&&(N.delayThresholdMet=!0,Z.Sm=!0);if(Z.D>0){for(const a of k)a.startTime-=Z.D,a.endTime-=Z.D;N.V-=Z.D}else N.V=Z.V.U;N.segments=k;return N};
o2f=function(Z){var k;if(k=Z.provider.videoData.isLoaded()&&Z.provider.videoData.g8&&Z.Y&&!Z.Sm)k=Z.V,k=k.G+k.ym()-k.D>=Z.provider.videoData.g8;return!!k};
pJ=function(Z,k){const N=Z.C(!isNaN(Z.U));k&&(Z.U=NaN);return N};
J4X=function(Z){Z.provider.videoData.youtubeRemarketingUrl&&!Z.Rq&&(bo(Z,Z.provider.videoData.youtubeRemarketingUrl),Z.Rq=!0)};
ziy=function(Z){Z.provider.videoData.googleRemarketingUrl&&!Z.vD&&(bo(Z,Z.provider.videoData.googleRemarketingUrl),Z.vD=!0)};
Rg=function(Z){if(!Z.jm()&&Z.Y){Z.N="paused";var k=pJ(Z);k.isFinal=!0;k.send();Z.dispose()}};
UZy=function(Z,k,N){if(!Z.FS){N||(N=z$(Z,"atr"));N.attestationResponse=k;try{N.send()}catch(a){if(a.message!=="Unknown Error")throw a;}Z.FS=!0}};
g.j_=function(Z){return bQR(Z)()};
gFj=function(Z){const k=navigator.connection?.type||"";if(k)return pQf[k]||pQf.other;if(g.Qw(Z.kW)){Z=navigator.userAgent;if(/[Ww]ireless[)]/.test(Z))return 3;if(/[Ww]ired[)]/.test(Z))return 30}return 0};
eo=function(Z){const k=new RiN;k.D=xZf(Z).cc?.toString()||"-";k.playbackRate=Z.fp.getPlaybackRate();var N=Z.fp.getVisibilityState();N!==0&&(k.visibilityState=N);Z.kW.Qz&&(k.U=1);k.L=Z.videoData.Yh;k.compositeLiveStatusToken=Z.videoData.compositeLiveStatusToken;k.heartbeatLoggingToken=Z.videoData.heartbeatLoggingToken;N=Z.fp.getAudioTrack();N.ZF&&N.ZF.id&&N.ZF.id!=="und"&&(k.audioId=N.ZF.id);k.connectionType=gFj(Z);k.volume=Z.fp.getVolume();k.muted=Z.fp.isMuted();k.clipId=Z.fp.yC()||"-";k.V=Z.videoData.ai||
"-";return k};
xZf=function(Z){const k=Z.fp.QP()||{};k.fs=Z.fp.Gx();k.volume=Z.fp.getVolume();k.muted=Z.fp.isMuted()?1:0;k.mos=k.muted;k.clipid=Z.fp.yC();k.playerheight=Z.fp.getPlayerSize()?.height||0;k.playerwidth=Z.fp.getPlayerSize()?.width||0;Z=Z.videoData;const N={};Z.U&&(N.fmt=Z.U.itag,Z.Y&&(Z.Qz?Z.Y.itag!==Z.U.itag:Z.Y.itag!=Z.U.itag)&&(N.afmt=Z.Y.itag));N.ei=Z.eventId;N.list=Z.playlistId;N.cpn=Z.clientPlaybackNonce;Z.videoId&&(N.v=Z.videoId);Z.BT&&(N.infringe=1);(Z.bq?0:Z.Ap)&&(N.splay=1);const a=nL(Z);a&&
(N.live=a);Z.RV&&(N.sautoplay=1);Z.Ix&&(N.autoplay=1);Z.lQ&&(N.sdetail=Z.lQ);Z.partnerId&&(N.partnerid=Z.partnerId);Z.osid&&(N.osid=Z.osid);Z.dZ&&(N.cc=g.QEr(Z.dZ));return Object.assign(k,N)};
bQR=function(Z){if(!Z.V){const k=g.Or(a=>{let T=(0,g.z)();a&&T<=631152E6&&(Z.fp.U6("ytnerror",{issue:28799967,value:`${T}`}),T=(new Date).getTime()+2);return T},Z.kW.B("html5_validate_yt_now")),N=k();
Z.V=()=>Math.round(k()-N)/1E3;
Z.fp.OJ()}return Z.V};
Mo=function(Z){Z.U&&uJX(Z.U);Z.qoe&&J$N(Z.qoe)};
IfN=function(Z,k,N,a){N.adFormat=N.qX;const T=k.fp;k=new MbN(new n2r(N,k.kW,{getDuration:()=>N.lengthSeconds,
getCurrentTime:()=>T.getCurrentTime(),
ym:()=>T.ym(),
M6:()=>T.M6(),
YA:()=>T.YA(),
getPlayerSize:()=>T.getPlayerSize(),
getAudioTrack:()=>N.getAudioTrack(),
getPlaybackRate:()=>T.getPlaybackRate(),
lU:()=>T.lU(),
getVisibilityState:()=>T.getVisibilityState(),
tQ:()=>T.tQ(),
QP:()=>T.QP(),
getVolume:()=>T.getVolume(),
isMuted:()=>T.isMuted(),
Gx:()=>T.Gx(),
yC:()=>T.yC(),
getProximaLatencyPreference:()=>T.getProximaLatencyPreference(),
OJ(){T.OJ()},U6(K,y){T.U6(K,y)},t5:()=>T.t5(),
mx:()=>T.mx()}));
k.D=a;g.u(Z,k);return k};
jOy=function(Z){Z.U&&Z.U.send();if(Z.qoe){var k=Z.qoe;if(k.L){k.wV==="PL"&&(k.wV="N");var N=g.j_(k.provider);g.MX(k,N,"vps",[k.wV]);k.G||(k.Y>=0&&k.V.set("user_intent",[k.Y.toString()]),k.G=!0);k.provider.kW.Xa()&&k.U6("finalized",{});k.xW=!0;k.reportStats(N)}}if(Z.provider.videoData.enableServerStitchedDai)for(const a of Z.D.values())Rg(a);else Z.V&&Rg(Z.V);Z.dispose()};
E2N=function(Z,k){Z.V&&UZy(Z.V,k)};
Wli=function(Z){if(!Z.V)return null;const k=z$(Z.V,"atr");return N=>{Z.V&&UZy(Z.V,N,k)}};
Y$y=function(Z,k){Z=tc(Z.array,N=>k-N.start||1);
return Z<0?-(Z+1):Z};
ZLX=function(Z,k,N){const a=[];for(k=Y$y(Z,k);k<Z.array.length;++k){const T=Z.array[k];(T.end<=N||T.contains(N))&&a.push(T);if(T.start>N)break}return a};
nJ=function(Z,k){const N=[];for(const a of Z.array)if(a.contains(k)&&N.push(a),a.start>k)break;return N};
kYf=function(Z){return Z.array.slice(Y$y(Z,0x7ffffffffffff),Z.array.length)};
N9y=function(Z,k){let N=NaN;for(const a of Z.array)if(a.contains(k)&&(isNaN(N)||a.end<N)&&(N=a.end),a.start>k&&(isNaN(N)||a.start<N)){N=a.start;break}return N};
akX=function(Z,k){Z.array=Z.array.filter(N=>!k.has(N))};
T9r=function(Z){return Z.fp.getPlayerState().V(2)?0x8000000000000:Z.fp.getCurrentTime()*1E3};
Ig=function(Z,k){const N=[];if(!k.length)return N;for(let a=0;a<k.length;a++){const T=k[a];T.active&&Z.U.indexOf(T)===-1&&(Z.U.push(T),N.push([1,T]))}return N};
jo=function(Z,k){for(const N of k)k=N[1],N[0]===1?Z.j(g.te(k.namespace),k):Z.j(g.he(k.namespace),k)};
EF=function(Z,k){const N=[];if(!k.length)return N;k.sort(g.Fi);for(const a of k)Z.U.splice(Z.U.indexOf(a),1),N.push([2,a]);return N};
Kgf=function(Z){if(Z.started&&!Z.jm()){Z.Y.stop();var k=Z.fp.getPlayerState();k.V(32)&&Z.C.start();var N=T9r(Z),a=Z.isEnded(k,N),T=[],K=[];for(var y of Z.U)y.active&&(a?y.end<0x8000000000000:!y.contains(N))&&K.push(y);T=T.concat(EF(Z,K));y=K=null;a?(k=nJ(Z.V,0x7ffffffffffff),K=k.filter(Q=>Q.end<0x8000000000000),y=kYf(Z.V)):k=Z.D<=N&&yR(k)?ZLX(Z.V,Z.D,N):nJ(Z.V,N);
T=T.concat(Ig(Z,k));K&&(T=T.concat(EF(Z,K)));y&&(T=T.concat(Ig(Z,y)));Z.D=N;jo(Z,T)}};
Wk=function(Z,k){return k>Z.mediaTime+Z.L&&k<Z.mediaTime+5};
var yEb=function(Z,k){return W$[c[2]](this,6,7555,Z,k)};
var AFy=function(Z,k,N,a,T=!1){if(Z.kW.B("html5_seek_refactor_bh_fix")&&!isFinite(k))return!1;if(a=a>1)Z.Y=!0;if(T||isNaN(Z.U))Z.U=k;if(Z.V)k!==Z.mediaTime&&(Z.V=!1);else if(k>0&&Z.mediaTime===k){T=1500;if(Z.kW.B("html5_buffer_underrun_transition_fix")){T=g.Q5(Z.kW.experiments,"html5_min_playback_advance_for_steady_state_secs");const K=g.Q5(Z.kW.experiments,"html5_min_underrun_buffered_pre_steady_state_ms");T=T>0&&K>0&&Math.abs(k-Z.U)<T?K:1500}return N-Z.D>(a||!Z.Y?T:400)}Z.mediaTime=k;Z.D=N;return!1},
q1N=function(Z,k,N){return k.jB(N).then(()=>Y6(new QDG(k,k.D)),a=>{a instanceof Error&&g.L9(a);
var T=r0('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),K=m8('audio/mp4; codecs="mp4a.40.2"'),y=T||K;const Q=k.isLivePlayback&&!g.NZ(Z.L,!0);a="fmt.noneavailable";Q?a="html5.unsupportedlive":y||(a="html5.missingapi");y=Q||!y?2:1;T={buildRej:"1",a:k.zB(),d:!!k.Hv,drm:k.kT(),f18:k.VR.indexOf("itag=18")>=0,c18:T};k.V&&(k.kT()?(T.f142=!!k.V.V["142"],T.f149=!!k.V.V["149"],T.f279=!!k.V.V["279"]):(T.f133=!!k.V.V["133"],T.f140=!!k.V.V["140"],T.f242=!!k.V.V["242"]),T.cAAC=K,T.cAVC=m8('video/mp4; codecs="avc1.42001E"'),
T.cVP9=m8('video/webm; codecs="vp9"'));k.L&&(T.drmsys=k.L.keySystem,K=0,k.L.U&&(K=Object.keys(k.L.U).length),T.drmst=K);return new g.yA(a,T,y)})},kV=function(Z,k){k=Math.max(Math.max(1,Math.ceil(Z.policy.Y/ZY(Z))),k);
return Math.min(Math.min(8,Math.floor(Z.policy.N/ZY(Z))),k)},ZY=function(Z){return Z.videoData.V?LD(Z.videoData.V)||5:5},d5=function(Z,k=!1){Zj(54,4206,Z);
if(Z[c[9]]!==c[25]){var N=Z[c[19]]();N[c[24]](c[48],c[14]);return N}var a=Z[c[79]]();N=new g.e7(a);var T=Z[c[52]](c[45]);const K=bY(89,1915,Z[c[52]](c[33])||c[11])[c[20]](c[0]);if(T&&K&&K[c[3]]>1&&K[1])return a=N.V,Z=a[c[30]](/^[^.]*/,c[11]),g.Jv(N,`${a[c[37]](c[63])===0?c[63]:c[75]}${T}---${K[1]}${Z}`),N=new g.hY(N[c[5]]()),N[c[24]](c[49],c[14]),N;if(k)return N=Z[c[19]](),N[c[24]](c[49],c[14]),N;T=N.V[c[27]](c[26]);N.V[c[27]](c[7])?(g.Jv(N,c[66]),a=N[c[5]]()):N.V[c[27]](c[51])?(g.Jv(N,c[57]),a=N[c[5]]()):
(N=EMU(a),Ii(N)&&(a=N));N=new g.hY(a);N[c[24]](c[17],c[14]);T&&N[c[24]](c[82],c[80]);return N},CeN=function(Z,k){if(k)return k=Z.videoData,k=rEG(Z,isNaN(k.liveChunkReadahead)?3:k.liveChunkReadahead,k),kV(Z,k);
if(Z.U.length){if(Math.min.apply(null,Z.U)>1)return kV(Z,Z.V-1);if(Z.policy.C)return kV(Z,Z.V+1)}return Z.V},mOi=function(Z,k=!1){if(!Z.U.length)return!1;
const N=Z.V;Z.V=CeN(Z,k);if(k=N!==Z.V)Z.U=[],Z.jW=0;return k},Np=function(Z){let k=Z.policy.V;
Z.Y||(k=Math.max(k-1,0));return k*ZY(Z)},aH=function(Z,k){return k>=Z.ZI()-Np(Z)},sDy=function(Z,k,N=!0){const a=aH(Z,k);
N||a?a&&(Z.D=!0):Z.D=!1;Z.j=Z.policy.D===2||Z.policy.D===3&&Z.D;k=aH(Z,k);Z.Y!==k&&Z.publish("livestatusshift",k);Z.Y=k},rEG=function(Z,k,N){N.ES&&k--;
JE(N)&&(k=1);zY(N)!==0&&(Z=g.Q5(Z.experiments,"html5_live_chunk_readahead_proxima_override"))&&(k=Z,N.V?.Kp()&&k++);return k},KB=function(Z,k,N=null){return new TA(g.Q5(Z.kW.experiments,k)||0,N?Z.kW.B(N):!1)},AER=function(Z,k){Z.V=k},yk=function(Z,k,N,a,T,K,y,Q){k?k.test(N)?(Z.dV(T,k,y),k.G||K()):(!k.U||k.Y?N=!1:(N=(0,g.z)(),a?k.V||(k.V=N):k.V=0,K=!a&&N-k.U>3E4,N=k.V&&N-k.V>1E3||K?k.Y=!0:!1),N&&(Q={...Z.Vn(k),
...Q},Q.wn=y,Q.we=T,Q.wsuc=a,Z.fp.U6("workaroundReport",Q),a&&(k.reset(),Z.D[T]=!1))):Z.fp.N4("auth",2,"BROWSER_OR_EXTENSION_ERROR",Td({source:"watchdog",name:y}))},PeU=function(Z,k){if(Z.V){var N=Z.V;
var a=Z.getCurrentTime(),T=N.ZI();var K=N.policy.U;N.Y||(K=Math.max(K-1,0));K*=ZY(N);a>=T-K||!N.ER()?N=a<N.videoData.Vt()?Math.min(N.videoData.Vt()+10,N.ZI()):NaN:(N.policy.L&&(N.policy.Vz?(N.policy.U=Math.min(N.policy.U+N.policy.j,N.policy.G),N.policy.V=Math.min(N.policy.V+1,10)):(N.policy.U=Math.max(N.policy.U+1,N.policy.G),N.policy.V=Math.max(N.policy.V+1,10))),N=Infinity);if(!isNaN(N)){if(Z.loader&&k&&(k=Z.FS.isActive(),a=Z.V.ZI(),(a=Aly(Z.loader,a-Z.mx()))&&!k)){Z.FS.start();Z.fp.U6("inBufferPtl",
{cmt:Z.getCurrentTime(),seekTo:a+Z.mx()});Z.seekTo(a+Z.mx(),{b0:"seektimeline_inBufferSeek",seekSource:34});return}Z.seekTo(N,{b0:"seektimeline_pegToLive",seekSource:34})}}},qp=function(Z,k){if(Z.Y)if(Z.videoData.isLivePlayback&&Z.videoData.D&&!Z.videoData.D.V()&&Z.mediaElement&&Z.mediaElement.D()>0&&Nt(Z.mediaElement)>0&&(Z.U=Qk(Z,Z.U,!1)),k=Z.B("html5_pseudogapless_shorts_seek_to_next_start")&&k?.seekSource===60,!Z.mediaElement||!cEX(Z,k))Z.pF.start(750);
else if(!isNaN(Z.U)&&isFinite(Z.U)&&(k=Z.Rq-(Z.U-Z.timestampOffset),!(k===0||Math.abs(k)<.005)))if(k=Z.mediaElement.getCurrentTime()-Z.U,Math.abs(k)<=Z.tq||Math.abs(k)<.005)HLr(Z);else{if(Z.videoData.gZ)Z.videoData.gZ=!1;else if(!GY(Z.videoData)&&Z.U>=Z.zi()-.1){Z.U=Z.zi();Z.Y.resolve(Z.zi());Z.kW.Xa()&&Z.fp.U6("setEndedInSeek",{tgt:`${Z.U}`,maxst:`${Z.zi()}`});Z.fp.bv();return}try{const N=Z.U-Z.timestampOffset;Z.mediaElement.seekTo(N);Z.Vz.V=N;Z.Rq=N;Z.D=Z.U;Z.O=!1}catch(N){}}},XZf=function(Z,k){Z.dA=
!0;
Z.B("html5_use_centralized_player_time")&&(Z.U=Z.G,Z.D=Z.U,Z.G=NaN);dOf(Z,k)},Lgr=function(Z){let k=0,N=NaN,a="";
if(!Z.N)return{startSeconds:k,d4:N,source:a};Z.videoData.KX?k=Z.videoData.aE:GY(Z.videoData)&&(k=Infinity);if(g.jI(Z.videoData))return{startSeconds:k,d4:N,source:a};Z.videoData.startSeconds?(a="ss",k=Z.videoData.startSeconds):Z.videoData.Q5&&(a="stss",k=Z.videoData.Q5);Z.videoData.liveUtcStartSeconds&&(N=Z.videoData.liveUtcStartSeconds);if(isFinite(k)&&(k>Z.zi()||k<Z.Vt())){const T={};T.minSeekableTime=Z.Vt();T.maxSeekableTime=Z.zi();T.cmt=Z.getCurrentTime();T.ss=k;T.utc=N;T.src=a;Z.fp.U6("startSecondsOutOfBounds",
T);Z.videoData.Rn()&&(k=Qk(Z,k,!1))}return{startSeconds:k,d4:N,source:a}},rq=function(Z){return!!Z.videoData.startSeconds&&isFinite(Z.videoData.startSeconds)&&Z.videoData.startSeconds>1E9},tIi=function(Z,k){Z.playbackData=k;
Z.videoData.isLivePlayback&&(Z.C=new VIf(()=>{a:{if(Z.playbackData&&Z.playbackData.V.V()){if(eI(Z.videoData)&&Z.loader){var N=Z.loader.LS.c9()||0;break a}if(Z.videoData.V){N=Z.videoData.V.FS;break a}}N=0}return N}),Z.V=new Fgf(Z.videoData,Z.kW.experiments,()=>Z.zi(!0)));
CB(Z.fp)?(Z.videoData.LX?.xo||(k=Lgr(Z),k.d4?(nQ(Z.videoData)&&Z.vj(k.d4,k.startSeconds),Z.D=k.startSeconds):k.startSeconds>0&&Z.seekTo(k.startSeconds,{b0:"seektimeline_startPlayback",seekSource:15})),Z.N=!1):rq(Z)||(Z.D=Z.D||Z.videoData.startSeconds||0,Z.videoData.isLivePlayback||(k=Z.fp.videoData.zi(),Z.D>k&&(Z.B("html5_sabr_log_invalid_sabr_current_time")&&Z.fp.U6("invalidSabrCmtStart",{rt:Z.D,mst:k}),Z.B("html5_sabr_vod_invalid_start_time_fallback")&&(Z.D=0))))},mC=function(Z,k){if(Z.V&&Z.loader){var N=
!1;
k?N=!0:Z.videoData.isLowLatencyLiveStream||Z.videoData.latencyClass==="LOW"||Z.videoData.latencyClass==="ULTRALOW"?N=mOi(Z.V):Z.s6&&(Z.s6=!1,N=mOi(Z.V,!0));N&&(k=Z.fp.WA,N=Z.V,N=ZY(N)*N.V,k.qoe&&(k=k.qoe,g.MX(k,g.j_(k.provider),"lra",[N]),k.U6("live-readahead-seconds",{v:N})));k=Z.loader;N=Z.V.V;Z=Z.V;Z=(Z.V-1+Z.policy.V)*ZY(Z);var a=NaN;var T=k.hp;T===2||T===-1?(T=N,JE(k.fp.getVideoData())&&(a=k.policy.qs)):T=N-1;T=Math.max(T,0);N=k.G;N.oJ=T;N.C=a;k.C&&(k.C.Vz=Z)}},Au=function(Z,k){(Z.loader=k)?
mC(Z,!0):sJ(Z)},cEX=function(Z,k=!1){if(!Z.mediaElement||Z.mediaElement.D()===0||Z.mediaElement.hasError())return!1;
const N=Z.mediaElement.getCurrentTime()>0;return Z.videoData.D&&Z.videoData.D.V()||Z.videoData.isLivePlayback||!Z.videoData.kT()?Z.U>=0&&!k&&(k=Z.mediaElement.C(),k.length||!N)?b1(k,Z.U-Z.timestampOffset):N:N},PI=function(Z){return Z.mediaElement?ax(Z.mediaElement):0},hYy=function(Z,k){var N=Z.getCurrentTime();
const a=Z.isAtLiveHead(N);if(Z.C&&a){var T=Z.C;if(T.V&&!(N>=T.U&&N<T.D)){var K=T.V.pn(N);K!==-1&&(T.U=T.V.getStartTime(K),T.D=T.U+T.V.getDuration(K),K=(0,g.z)()/1E3-T.V.HG(K),K-=T.L(),T.Y.add(K))}}Z.V&&(a&&(T=Z.V,K=PI(Z),T.jW++,T.jW<3||Date.now()-T.G<3E3||(T.G=Date.now(),T.U.push(K),T.U.length>50&&T.U.shift())),sDy(Z.V,N,k),k&&PeU(Z,!0));a!==Z.xl&&(k=Z.getCurrentTime()-Z.Tt<=500,N=Z.qX>=1E3,k||N||(k=Z.fp.WA,k.qoe&&(k=k.qoe,N=g.j_(k.provider),g.MX(k,N,"lh",[a?"1":"0"])),Z.xl=a,Z.qX++,Z.Tt=Z.getCurrentTime()))},
cI=function(Z,k){let N=Z.Y;
N||(Z.Y=new x2,N=Z.Y,qp(Z,k));return N},Qk=function(Z,k,N){if(isNaN(k))return NaN;
const a=Z.Vt();N=Z.zi(N);return Z.B("html5_clamp_invalid_seek_to_min_seekable_time")&&!Z.videoData.isLivePlayback&&k>N+1&&k<Infinity?(Z.kW.Xa()&&Z.fp.U6("clampInvalidSeek",{tgt:`${k}`,maxst:`${N}`}),a):g.u0(k,a,N)},uGf=function(Z,k){Z.D=k},lkb=function(Z,k=!1){Z.L||!(Z.D>0)||Z.mediaElement&&Z.mediaElement.getCurrentTime()>0||(k={b0:"seektimeline_resumeTime",
P8:k},Z.videoData.C||(k.seekSource=15),Z.seekTo(Z.D,k))},NM=function(Z,k,N,a){var T=k^Z;
(Z+5&29)>=Z&&(Z-1^3)<Z&&(N=(N%a[c[3]]+a[c[3]])%a[c[3]],a[c[T^5273]](-N)[c[T^5264]]()[c[T^5260]](function(q){a[c[T^5370]](q)}));
if(Z-9>>3>=0&&(Z^52)<17)for(var K=N[c[3]];K;)N[c[T^4173]](N[c[T^4217]](--K,1)[0]);if(Z+1>=17&&(Z<<2&8)<2){N[T^5578]!=new a(c[T^5619])/(T^5651)&&(N[2]===-6||((0,N[T^5566])(N[T^5579],((0,N[T^5590])(N[T^5572],N[3]),N[T^5611])(N[T^5555],N[new a(c[T^5555])/(T^5651)]),(0,N[T^5622])(N[2+new a(c[T^5560])/(T^5651)],N[T^5576])>>>(0,N[T^5567])(N[T^5550],N[T^5614]),((0,N[T^5622])(N[T^5606],N[T^5603]),N[T^5582])(N[3],N[5]),(0,N[T^5581])(N[4],N[T^5552]),N[T^5611],N[3],(0,N[T^5545])()),0))&&(0,N[T^5571])(N[T^5554],
(0,N[T^5554])(N[T^5568],N[T^5547],(0,N[5])()),((0,N[T^5599])((0,N[T^5565])(N[T^5547],N[4]),N[T^5555],N[2],N[T^5574]),N[T^5564])(N[3])<=(0,N[T^5554])(N[T^5568],N[2],(0,N[T^5551])()),((0,N[T^5564])(N[T^5547]),N[T^5554])(N[T^5611],N[T^5547],(0,N[T^5618])()),N[T^5611],N[3],(0,N[T^5551])());N[T^5575]<=6&&((0,N[T^5555])(N[3],N[T^5553]),c[T^5591])||(0,N[T^5612])(N[T^5547],N[T^5610]);N[T^5557]!=-(T^5628)&&(N[T^5617]<(T^5618)&&((0,N[T^5554])(N[T^5611],N[2],(0,N[T^5582])()),c[T^5558])||(0,N[T^5565])(N[T^5573],
N[T^5587]));N[T^5605]!=1&&(N[T^5623]==-(T^5619)&&((0,N[T^5599])((0,N[T^5554])(N[T^5611],N[2],(0,N[T^5551])()),N[T^5586],N[T^5577],N[T^5584]),1)||((0,N[T^5612])(N[3],N[T^5592]),N[T^5612])(N[6],N[T^5567]));N[T^5561]!=6?(0,N[T^5599])((0,N[T^5555])(N[2],N[T^5580]),N[T^5600],N[6]):(0,N[T^5578])((0,N[T^5622])(N[T^5585],N[T^5575]),N[new a(c[T^5609])/(T^5651)],N[T^5612]);N[T^5584]!==-(T^5628)&&(N[T^5614]==-5?(0,N[T^5569])(N[T^5585]):(0,N[T^5623])(N[T^5588],N[5],(0,N[T^5547])()));N[T^5584]!==-(T^5628)&&(N[T^
5557]>=-1||((0,N[T^5571])((0,N[T^5623])(N[T^5601],N[5],(0,N[3])()),N[T^5622],(0,N[T^5622])(N[5],N[T^5582]),N[5],N[T^5589]),0))&&(0,N[T^5578])(((0,N[T^5573])(N[T^5556],N[T^5564]),N[T^5591])(N[4],N[T^5544]),N[T^5568],N[0],N[T^5580]);var y=[]}if((Z+8^10)<Z&&(Z-4^25)>=Z)a:{var Q=g.J(N,fkr)||N[c[T^5971]];K={qr:!1,Y2:c[T^6007],K7:c[T^6007],s:c[T^6007]};if(!Q){y=K;break a}Q=q2(Q);K[c[T^5930]]=!0;K[c[T^5938]]=Q[c[T^5959]];K[c[T^5972]]=Q[c[T^5956]];K[c[T^6006]]=Q[c[T^6006]];y=K}return y},dOf=function(Z,k){B9f(Z,
k).then(void 0,()=>{sJ(Z)});
cI(Z,k).then(N=>{HI(Z,N)},()=>{sJ(Z)});
Z.fp.Hs(k);if(Z.kW.Xa()||DOR(Z))k=Z.Vn(),k["native"]=`${+Z.O}`,k.tgt=`${Z.U}`,k.otgt=`${Z.U+Z.timestampOffset}`,k.maxst=`${Z.zi()}`,Z.V&&Z.B("html5_high_res_seek_logging")&&(k.tht=`${Z.V.L()}`,k.ht=`${Z.V.ZI()}`,k.adft=`${Np(Z.V)}`),Z.B("html5_sabr_parse_live_metadata_playback_boundaries")&&Z.videoData.V&&nQ(Z.videoData)&&(k.minst=`${Z.videoData.V.SG}`,k.cminst=`${Z.videoData.V.Vt()+Z.timestampOffset}`,k.maxst=`${Z.videoData.V.cU}`,k.hts=`${Z.videoData.V.xW}`,k.cmaxst=`${Z.videoData.V.zi()+Z.timestampOffset}`),
Z.fp.U6("startSeek",k)},B9f=function(Z,k){Z.zt||(Z.loader?isFinite(Z.U)?Z.zt=Z.loader.seek(Z.U-Z.timestampOffset,k):(GY(Z.videoData),Z.B("html5_unified_live_latency_reporting")&&(Z.fp.gg=0),Z.zt=Wb(Z.loader),AE(Z.videoData)||(Z.U=Z.loader.getCurrentTime()+Z.timestampOffset)):Z.zt=g.$E(Z.U-Z.timestampOffset));
return Z.zt},HI=function(Z,k){Z.L&&(Z.L.resolve(k),Z.fp.kf(),Z.kW.Xa()||DOR(Z))&&(k=Z.Vn(),k["native"]=`${+Z.O}`,k.otgt=`${Z.U+Z.timestampOffset}`,Z.fp.U6("seekEnd",k));
sJ(Z)},DOR=function(Z){return Z.videoData.rQ()&&Z.B("html5_enable_shorts_seek_details_logging")};
var OLi=function(Z,k){return UP[c[2]](this,40,2840,Z,k)};
HLr=function(Z){Z.Y&&(Z.Y.resolve(Z.mediaElement.getCurrentTime()),Z.Vz.U=null)};
sJ=function(Z){Z.U=NaN;Z.G=NaN;Z.Rq=NaN;Z.Y=null;Z.zt=null;Z.L=null;Z.dA=!1;Z.O=!1;Z.tq=0;Z.FS.stop();Z.MX.stop()};
iLf=function(Z){if(Z.N)if(Z.videoData.LX?.xo)Z.N=!1;else if(g.jI(Z.videoData))Z.N=!1;else{var k="ss",N=0;Z.videoData.V?.isManifestless&&Z.videoData.MX&&!rq(Z)&&(k="mss",N=Z.videoData.MX);(Z.videoData.KX?Z.B("html5_prioritize_windowed_st_start_seconds"):Z.B("html5_prioritize_st_start_seconds"))&&!N&&Z.videoData.Q5&&(k="stss",N=Z.videoData.Q5);!N&&vzf(Z)&&(N=Z.videoData.liveUtcStartSeconds||Z.videoData.MX,k="utc",N=Z.zi()-Z.HG(Z.zi())+N);!N&&Z.videoData.Rn()&&Z.videoData.Q5&&(k="stss",N=Z.videoData.Q5);
var a={};if(N){if(N>Z.zi()||N<Z.Vt())a.minSeekableTime=Z.Vt(),a.maxSeekableTime=Z.zi(),a.cmt=Z.getCurrentTime(),a.it=Z.HG(Z.getCurrentTime()),a.ss=N,a.utc=vzf(Z)?Z.videoData.liveUtcStartSeconds||Z.videoData.MX:0,Z.fp.U6("startSecondsOutOfBounds",a),Z.videoData.Rn()&&(N=Qk(Z,N,!1));Z.seekTo(N,{b0:"seektimeline_startSeconds"});a[k]=N;Z.fp.U6("startSeconds",a);Z.N=!1}else Z.videoData.MX&&(a[k]=Z.videoData.MX+Z.mx(),Z.fp.U6("startSeconds",a))}};
gzU=function(Z,k){const N=Z.mediaElement,a=k.type;switch(a){case "seeking":const T=N.getCurrentTime()+Z.timestampOffset;if(!Z.Y||Z.O&&T!==Z.U)Z.Y=new x2,Z.Y.then(K=>{HI(Z,K)},()=>{sJ(Z)}),Z.videoData.isAd()&&fry({adCpn:Z.videoData.clientPlaybackNonce,
contentCpn:Z.videoData.Xh??""},k.V),Z.Rq=T,AER(Z.Vz,N.getCurrentTime()),Z.seekTo(T,{seekSource:104,b0:"seektimeline_mediaElementEvent"}),Z.O=!0;break;case "seeked":HLr(Z);break;case "loadedmetadata":CB(Z.fp)||iLf(Z);qp(Z);break;case "progress":qp(Z);break;case "pause":Z.j=Z.getCurrentTime()}Z.j&&((a==="play"||a==="playing"||a==="timeupdate"||a==="progress")&&Z.getCurrentTime()-Z.j>10&&(Z.B("html5_sky_skip_pause_jump")?Z.fp.U6("skipPauseJump",{evt:a,cmt:Z.getCurrentTime(),lpt:Z.j}):Z.seekTo(Z.j,{b0:"pauseJump"})),
a!=="pause"&&a!=="play"&&a!=="playing"&&a!=="progress"&&(Z.j=0))};
vzf=function(Z){return(E1(Z.videoData)||!!Z.videoData.liveUtcStartSeconds)&&(!!Z.videoData.liveUtcStartSeconds||rq(Z))&&!!Z.videoData.V};
wZy=function(Z,k){Z.fp.U6("sdai",{adj4t:k.toFixed(3)});Z.vD=k;k+=1;Z.U=k;Z.D=k;cI(Z).then(N=>{HI(Z,N)},()=>{sJ(Z)})};
dq=function(Z,k){return Z.V.get(k)?.buffer.Y()||[]};
Xx=function(Z,k){return Z.V.get(k)?.buffer.D()||0};
JEf=function(Z,k){function N(K){return a.Vz!=="yt"&&(T.partnerId===38&&a.playerStyle==="books"||T.partnerId===30&&a.playerStyle==="docs"||T.partnerId===33&&a.playerStyle==="google-live")?$Oy(Z,T,K):xOy(Z,T).then(()=>{a.B("embeds_enable_shorts")&&Z.X().dZ&&T.isEmbedsShortsMode(new g.i0(0,0),!!T.playlistId)?GYj(Z,T):LB(Z,T)},y=>{LB(Z,T,!0);
throw y;})}
const a=Z.X(),T=Z.getVideoData();T.jm();T.loading=!0;return S1U(Z)?eYR(Z,T,k).then(()=>{LB(Z,T)},K=>{K=QA(K);
if(Kf(K.severity))return LB(Z,T,!0),Promise.reject(K);K.errorCode==="onesie.response.badproxystatus"&&`${K.details.st}`==="3"&&(ozU=!0);Z.handleError(K);return N("onesie")}):N("gvi")};
S1U=function(Z){var k=Z.X();if(k.B("html5_disable_onesie")||!k.B("html5_onesie")||!k.B("html5_onesie_inline")&&Z.getVisibilityState()===5||k.Vz!=="yt")return!1;var N=k.jY;if(!N||!N.V)return Z.handleError(new g.yA("onesie.unavailable.hotconfig",{key:"0"})),!1;N.V.j<(0,g.z)()&&(Z.U6("okexp","1"),(N=Z.pT())&&k.B("html5_prefer_trusted_host_on_key_expiration")&&(N.U=!0,(k=N.V.get(0)?.V())&&!C8(k)&&N.V.delete(0)));if(ozU)return Z.U6("ost3","1"),!1;k={};return Object.keys(k).length>0?(k.onesie="0",Z.handleError(new g.yA("html5.missingapi",
k)),!1):!0};
Vk=function(Z,k){const N=SY();eY(N,k);return g.bJ(N,D$X(),{pZ:Z.pZ(),clientInterface:Yy(Z)})};
zYy=function(Z,k){return`${Z.getPlayerType()}_${k.videoId}_${k.tI}_${+k.isAutonav}${+k.RV}`};
eYR=async function(Z,k,N){k.fetchType="onesie";var a=void 0;if(Qtf(k))if(a=Z.um){var T=zYy(Z,k);a=a.get(T)}else a=void 0;T=Z.u0.Dw;if(a){if(k.loading=!1,g.ue(k,{player_response:a},!0),k.loading||cZ(k))return Promise.resolve()}else{a=UOy(k,Z.getPlayerSize(),Z.getVisibilityState());N=new iP(Z,a,N);a=await N.fetch();const y={player_response:a};k.loading=!1;if(N.Ob){for(const [Q,q]of N.Ob.entries()){var K=Q;const r=q;T.V.set(K,r,180);K===k.videoId&&(K=r.jf(),k.AA=K)}T.Tv=N}for(const [Q,q]of N.Ro.entries())T.U.set(Q,
q,180);g.ue(k,y,!0);if(k.loading||cZ(k))return Qtf(k)&&(k=zYy(Z,k),Z.um?.put(k,a)),Promise.resolve()}T.V.removeAll();T.U.removeAll();k.AA=[];Z={};T="onesie.response";N=0;k.errorCode?(T="auth",Z.ec=k.errorCode,Z.ed=k.errorDetail,Z.es=k.sf||"",N=2):(Z.successButUnplayable="1",Z.disposed=`${+k.jm()}`,Z.afmts=`${+/adaptiveFormats/.test(a)}`,Z.cpn=k.clientPlaybackNonce);return Promise.reject(new g.yA(T,Z,N))};
xOy=async function(Z,k){const N=k.isAd();let a=!N,T=N?1:3;for(let y=0;y<T;y++){if(y>0){await YE(5E3);var K=new g.jD("Retrying OnePlatform request",{attempt:y});g.L9(K)}try{await bLG(Z,k);return}catch(Q){const q=QA(Q);K=q.errorCode;const r=Z.X().B("html5_use_network_error_code_enums")?401:"401";a&&K==="manifest.net.badstatus"&&q.details.rc===r&&(a=!1,y===T-1&&(T+=1));if(y===T-1)return Z=pZr(N,q.details),Z.details.backend="op",Z.details.originec=K,Promise.reject(Z);if(K==="auth"||K==="manifest.net.retryexhausted"||
g.s$(Z.X()))return Promise.reject(q);Z.handleError(q);if(Kf(q.severity))break}}return Promise.reject(pZr(N,{backend:"op"}))};
bLG=async function(Z,k){k.fetchType="gp";var N=Z.X(),a=g.GC(N,k.G());a=a.V?await a.V:a.getValue();var T=Vk(N,a);const K=UOy(k,Z.getPlayerSize(),Z.getVisibilityState()),y=g.kP(RYr),Q=k.G();var q=(0,g.z)(),r=!1;let C="empty";a=0;Z.dD("psns");const m={DJ:function(A){A.readyState===2&&Z.dD("ps_c")}};
N.pZ()&&(m.sU={NB:r$("player",{videoId:String(k.videoId)})});T=await g.xP(T,K,y,void 0,m);Z.dD("psnr");if(!k.jm()){T?"error"in T&&T.error?(r=!0,C=`esf:${T.error.message}`,a=T.error.code):T.errorMetadata&&(r=!0,C="its",a=T.errorMetadata.status):r=!0;if(r)return r=0,T=((0,g.z)()-q).toFixed(),q={},q=N.B("html5_use_network_error_code_enums")?{backend:"op",rc:a,rt:T,reason:C,has_kpt:k.hq?"1":"0",has_mdx_env:k.mdxEnvironment?"1":"0",has_omit_key_flag:g.G("INNERTUBE_OMIT_API_KEY_WHEN_AUTH_HEADER_IS_PRESENT")?
"1":"0",has_page_id:N.pageId?"1":"0",has_token:Q?"1":"0",has_vvt:k.zt?"1":"0",is_mdx:k.isMdxPlayback?"1":"0",mdx_ctrl:k.fX||"",token_eq:Q===k.G()?"1":"0"}:{backend:"op",rc:`${a}`,rt:T,reason:C,has_kpt:k.hq?"1":"0",has_mdx_env:k.mdxEnvironment?"1":"0",has_omit_key_flag:g.G("INNERTUBE_OMIT_API_KEY_WHEN_AUTH_HEADER_IS_PRESENT")?"1":"0",has_page_id:N.pageId?"1":"0",has_token:Q?"1":"0",has_vvt:k.zt?"1":"0",is_mdx:k.isMdxPlayback?"1":"0",mdx_ctrl:k.fX||"",token_eq:Q===k.G()?"1":"0"},k="manifest.net.connect",
a===429?(k="auth",r=2):a>200&&(k="manifest.net.badstatus",a===400&&(r=2)),Promise.reject(new g.yA(k,q,r));k.loading=!1;g.ue(k,{raw_player_response:T},!0);g.s$(k.X())&&T&&T.trackingParams&&Ed(T.trackingParams);if(k.errorCode)return N={ec:k.errorCode,ed:k.errorDetail,es:k.sf||""},a="auth",g.s$(k.X())&&k.errorCode&&(a=k.errorCode),Promise.reject(new g.yA(a,N,2));if(!k.loading&&!cZ(k))return N=k.isAd()?"auth":"manifest.net.retryexhausted",a=k.isAd()?2:1,Promise.reject(new g.yA(N,{successButUnplayable:"1",
hasMedia:g.PZ(k)?"1":"0"},a))}};
$Oy=async function(Z,k,N){function a(){return!0}
function T(r){r=QA(r);if(Kf(r.severity))return Promise.reject(r);Z.handleError(r);return!1}
const K=e9i(Z.X(),k,Z.getPlayerSize(),Z.getVisibilityState(),Z.isFullscreen()),y=k.isAd(),Q=y?1:3;for(let r=0;r<Q;r++){var q=K;r>0&&(await YE(5E3),q={playerretry:r,playerretrysrc:N},y||(q.recover="embedded"),q=P8(K,q));if(await MIf(k,q).then(a,T))return}k=y?"auth":"manifest.net.retryexhausted";N=y?2:1;if(!y&&Math.random()<1E-4)try{g.L9(new g.jD("b/152131571",btoa(K)))}catch{}return Promise.reject(new g.yA(k,{backend:"gvi"},N))};
MIf=async function(Z,k){function N(q){if(!Z.jm()){q=q?q.status:-1;var r=0,C=((0,g.z)()-Q).toFixed();C=a.B("html5_use_network_error_code_enums")?{backend:"gvi",rc:q,rt:C}:{backend:"gvi",rc:`${q}`,rt:C};var m="manifest.net.connect";q===429?(m="auth",r=2):q>200&&(m="manifest.net.badstatus",q===400&&(r=2));return Promise.reject(new g.yA(m,C,r))}}
Z.fetchType="gvi";const a=Z.X();var T;(T=ody(Z))?(T={format:"RAW",method:"POST",withCredentials:!0,timeout:3E4,postParams:T},k=P8(k,{action_display_post:1})):T={format:"RAW",method:"GET",withCredentials:!0,timeout:3E4};const K={};a.sendVisitorIdHeader&&Z.visitorData&&(K["X-Goog-Visitor-Id"]=Z.visitorData);const y=Zf(a.experiments,"debug_sherlog_username");y&&(K["X-Youtube-Sherlog-Username"]=y);Object.keys(K).length>0&&(T.headers=K);const Q=(0,g.z)();T=await YF(pb,k,T).then(void 0,function(q){return N(q.xhr)});
if(!T||!T.responseText)return N(T);Z.loading=!1;T=q2(T.responseText);g.ue(Z,T,!0);if(Z.errorCode)return Promise.reject(new g.yA("auth",{ec:Z.errorCode,ed:Z.errorDetail,es:Z.sf||""},2));if(!Z.loading&&!cZ(Z))return T=Z.isAd()?"auth":"manifest.net.retryexhausted",k=Z.isAd()?2:1,Promise.reject(new g.yA(T,{successButUnplayable:"1"},k))};
pZr=function(Z,k){return new g.yA(Z?"auth":"manifest.net.retryexhausted",k,Z?2:1)};
LB=async function(Z,k,N=!1){const a=Z.X();N&&(!g.O$(a)||NN(k)!=="embedded")||k.Pl||NN(k)!=="adunit"&&(g.Qw(a)||LQ(a)||g.oJ(a)||g.Df(a)||g.CQ(a)||Yy(a)==="WEB_CREATOR")||(N=g.GC(a,k.G()),N=N.V?await N.V:N.getValue(),nzf(Z,k,N))};
nzf=async function(Z,k,N){try{const K=Z.X(),y=Vk(K,N);var a=k.X();const Q=g.QC(),q={context:g.sK(k),videoId:k.videoId,racyCheckOk:k.racyCheckOk,contentCheckOk:k.contentCheckOk,autonavState:"STATE_NONE"};NN(k)==="adunit"&&(q.isAdPlayback=!0);a.embedConfig&&(q.serializedThirdPartyEmbedConfig=a.embedConfig);a.It&&(q.showContentOwnerOnly=!0);k.PM&&(q.showShortsOnly=!0);Q.Aq(141)&&(q.autonavState=Q.Aq(140)?"STATE_OFF":"STATE_ON");if(g.fQ(a)){const A=Q.Aq(65);N=A!=null?!A:!1;const P=!!g.kh("yt-player-sticky-caption");
q.captionsRequested=N&&P}const r=a.getWebPlayerContextConfig()?.encryptedHostFlags;r&&(q.playbackContext={encryptedHostFlags:r});var T=q;const C=g.kP(Ikb);Z.dD("wn_s");a={};K.pZ()&&(a.sU={NB:r$("next",{videoId:String(k.videoId)})});const m=await g.xP(y,T,C,void 0,a);Z.dD("wn_r");!m||"error"in m&&m.error||(g.s$(k.X())&&m.trackingParams&&Ed(m.trackingParams),g.ue(k,{raw_watch_next_response:m},!1))}catch(K){}};
GYj=async function(Z,k){var N=g.GC(Z.X(),k.G());N=N.V?await N.V:N.getValue();jDb(Z,k,N)};
jDb=async function(Z,k,N){Z=Z.X();try{const T=Vk(Z,N);var a={context:g.sK(k),playerRequest:{videoId:k.videoId},disablePlayerResponse:!0};const K=g.kP(Ezy);N={};Z.pZ()&&(N.sU={NB:r$("reel_item_watch",{videoId:String(k.videoId)})});const y=await g.xP(T,a,K,void 0,N);!y||"error"in y&&y.error||g.ue(k,{raw_reel_item_watch_response:y})}catch(T){}};
Wgb=function(Z,k){Z.dD("vir");Z.dD("ps_s");gV("vir",void 0,"video_to_ad");k=JEf(Z,k);k.then(function(){Z.dD("virc");gV("virc",void 0,"video_to_ad");Z.dD("ps_r");gV("ps_r",void 0,"video_to_ad")},function(){Z.dD("virc");
gV("virc",void 0,"video_to_ad")});
return k};
Fx=function(){const Z=zzy();return!(!Z||Z==="visible")};
Zer=function(Z){const k=Y1N();k&&document.addEventListener(k,Z,!1)};
knX=function(Z){const k=Y1N();k&&document.removeEventListener(k,Z,!1)};
Y1N=function(){let Z;if(document.visibilityState)Z="visibilitychange";else{if(!document[er+"VisibilityState"])return"";Z=er+"visibilitychange"}return Z};
adj=function(Z){Nvj=Z};
Tvf=function(Z){tu=Z};
hLy=function(Z){var k=Z.OW;Z=Z.videoData;const N=gi(k,Z);k.B("html5_disable_client_autonav_cap_for_onesie")||N.compose(wi(k,Z));return N};
KJ=function(Z,k){hu(Z,k.reason,k.V.info,k.source,k.token)};
qSr=function(Z,k){Z.u0.Q_()||(Z.U6("sgap",{f:k}),Z.u0.clearQueue(!1,k==="pe"))};
y7y=function(Z){Z.mediaElement&&(Z.b3?(uc(Z),Z.uc(),Ktf(Z,!1)):(Z.videoData.FS&&Z.videoData.FS.Y(),Z.mediaElement.stopVideo()),Z.playVideo())};
CB=function(Z){return Z.B("html5_disable_video_player_initiated_seeks")&&nQ(Z.videoData)};
fB=function(Z,k){Z.RM&&lc(Z);Z.RM=new g.pe(k*1E3,0x7ffffffffffff);Z.RM.namespace="endcr";Z.addCueRange(Z.RM)};
lc=function(Z){Z.removeCueRange(Z.RM);Z.RM=null};
DY=function(Z){if(Z.videoData.D&&Z.videoData.D.V()){var k=BI(Z);if(Z.loader&&(Z=Z.loader,!Z.jm()))if(Z.policy.V){var N=Z.L;if(k.isLocked()&&N.V.D||N.U===void 0||!k.equals(N.U)){N=Z.L.U;iwG(Z.L,k);var a;if(a=k.isLocked()&&k.reason==="m"){a=Z.L;var T=a.Y?.info.j().qualityOrdinal;a=a.xW?!0:a.Y?k.V!==T?!0:!a.V.D||a.BG.LX&&a.V.V===a.Y.info.itag?!1:!0:!1}T=Z.policy.A1&&k.reason==="l";N=N.V>k.V&&k.reason==="b";a||T||N?(Z.fp.HF({reattachOnConstraint:a?"u":T?"drm":"perf",lo:k.U,up:k.V}),Z.policy.LX||(Z.L.V.D=
!1)):(Z.policy.LX&&(Z.L.V.D=!1),OY(Z))}}else!qqy(Z.V,k)&&Z.videoTrack&&(T=Z.V.V,Qm(Z,rCG(Z.V,k)),CJ(Z),N=k.isLocked()&&k.reason==="m"&&Z.V.O,a=Z.policy.A1&&k.reason==="l"&&oN(Z.videoTrack),k=T.V>k.V&&k.reason==="b",T=Z.V.Kp&&!jx(),N||a||k||T?Z.fp.HF({reattachOnConstraint:N?"u":a?"drm":T?"codec":"perf"}):OY(Z))}};
vI=function(Z,k=!0){Z.kW.y9&&!Z.videoData.backgroundable&&Z.mediaElement&&!Z.YX()&&(Z.isBackground()&&Z.mediaElement.vD()?(Z.U6("bgmobile",{suspend:1}),Z.XL(!0,!0)):!Z.isBackground()&&k&&OJ(Z)&&Z.U6("bgmobile",{resume:1}))};
ic=function(Z){if(!GY(Z.videoData))return NaN;let k=0;Z.loader&&Z.videoData.V&&(k=eI(Z.videoData)?Z.loader.LS.c9()||0:Z.videoData.V.FS);return(0,g.z)()/1E3-Z.HG()-k};
QCR=function(Z,k){if(Z.playerType===2||Z.kW.Pl)k.ST=!0;var N=ZOj(k.qX,k.FY,Z.kW.Y,Z.kW.C);N&&(k.adFormat=N);Z.playerType===2&&(k.Ix=!0);if(Z.isFullscreen()||Z.kW.Y)N=g.kh("yt-player-autonavstate"),k.autonavState=N||(Z.kW.Y?2:Z.videoData.autonavState);k.endSeconds&&k.endSeconds>k.startSeconds&&fB(Z,k.endSeconds)};
UOy=function(Z,k,N){var a=Z.videoId,T=g.sK(Z),K=Z.X(),y={html5Preference:"HTML5_PREF_WANTS",lactMilliseconds:String(Qb()),referer:document.location.toString(),signatureTimestamp:20522},Q=g.QC();Z.isAutonav&&(y.autonav=!0);Q.Aq(141)&&(y.autonavState=Q.Aq(140)?"STATE_OFF":"STATE_ON");y.autoCaptionsDefaultOn=Q.Aq(66);YTN(Z)&&(y.autoplay=!0);K.C&&Z.cycToken&&(y.cycToken=Z.cycToken);K.enablePrivacyFilter&&(y.enablePrivacyFilter=!0);Z.isFling&&(y.fling=!0);var q=Z.forceAdsUrl;if(q){Q={};var r=[];q=q.split(",");
for(var C of q){var m=C.split("|");m.length!==3||C.includes("=")||(m[0]=`breaktype=${m[0]}`,m[1]=`offset=${m[1]}`,m[2]=`url=${m[2]}`);q={adtype:"video_ad"};for(var A of m){const [x,...e]=A.split("=");q[x]=e.join("=")}m=q.url;const h=q.presetad,B=q.viralresponseurl,v=Number(q.campaignid),O=q.bibliotecaadid;if(q.adtype==="in_display_ad")m&&(Q.url=m),h&&(Q.presetAd=h),B&&(Q.viralAdResponseUrl=B),v&&(Q.viralCampaignId=String(v)),O&&(Q.bibliotecaAdId=O);else if(q.adtype==="video_ad"){const x={offset:{kind:"OFFSET_MILLISECONDS",
value:String(Number(q.offset)||0)}};if(q=qKr[q.breaktype])x.breakType=q;m&&(x.url=m);h&&(x.presetAd=h);B&&(x.viralAdResponseUrl=B);v&&(x.viralCampaignId=String(v));O&&(x.bibliotecaAdId=O);r.push(x)}}y.forceAdParameters={videoAds:r,inDisplayAd:Q}}Z.isInlinePlaybackNoAd&&(y.isInlinePlaybackNoAd=!0);Z.isLivingRoomDeeplink&&(y.isLivingRoomDeeplink=!0);C=Z.Qw;if(C!=null){C={startWalltime:String(C)};if(A=Z.yI)C.manifestDuration=String(A||14400);y.liveContext=C}Z.mutedAutoplay&&(y.mutedAutoplay=!0,C=K.getWebPlayerContextConfig(),
C?.embedsHostFlags?.allowMutedAutoplayDurationMode&&C?.embedsHostFlags?.allowMutedAutoplayDurationMode.includes(r70[Z.mutedAutoplayDurationMode])&&(y.mutedAutoplayDurationMode=r70[Z.mutedAutoplayDurationMode]));if(Z.bq?0:Z.Ap)y.splay=!0;C=Z.vnd;C===5&&(y.vnd=C);C={};if(A=Z.isMdxPlayback)C.triggeredByMdx=A;if(A=Z.lL)C.skippableAdsSupported=A.split(",").includes("ska");if(r=Z.sx){A=Z.O1;Q=[];for(var P of aSU(r)){r=P.platform;r={applicationState:P.G_?"INACTIVE":"ACTIVE",clientFormFactor:CaN[r]||"UNKNOWN_FORM_FACTOR",
clientName:KfU[P.dU]||"UNKNOWN_INTERFACE",clientVersion:P.deviceVersion||"",platform:mNX[r]||"UNKNOWN_PLATFORM"};q={};if(A){var d=void 0;try{d=JSON.parse(A)}catch(h){g.L9(h)}d&&(q={params:[{key:"ms",value:d.ms}]},d.advertising_id&&(q.advertisingId=d.advertising_id),d.limit_ad_tracking!==void 0&&d.limit_ad_tracking!==null&&(q.limitAdTracking=d.limit_ad_tracking),r.osName=d.os_name,r.userAgent=d.user_agent,r.windowHeightPoints=d.window_height_points,r.windowWidthPoints=d.window_width_points)}Q.push({adSignalsInfo:q,
remoteClient:r})}C.remoteContexts=Q}P=Z.sourceContainerPlaylistId;d=Z.serializedMdxMetadata;if(P||d)A={},P&&(A.mdxPlaybackContainerInfo={sourceContainerPlaylistId:P}),d&&(A.serializedMdxMetadata=d),C.mdxPlaybackSourceContext=A;y.mdxContext=C;P=k.width;P>0&&(y.playerWidthPixels=Math.round(P));if(k=k.height)y.playerHeightPixels=Math.round(k);N!==0&&(y.vis=N);if(N=K.widgetReferrer)y.widgetReferrer=N.substring(0,128);g.PQ(K)&&y&&(y.ancestorOrigins=K.ancestorOrigins);Z.defaultActiveSourceVideoId&&(y.compositeVideoContext=
{defaultActiveSourceVideoId:Z.defaultActiveSourceVideoId});if(K=K.getWebPlayerContextConfig())y.encryptedHostFlags=K.encryptedHostFlags;a={videoId:a,context:T,playbackContext:{contentPlaybackContext:y}};Z.LX&&(a.playbackContext.reloadPlaybackContext={reloadPlaybackParams:Z.LX?.reloadPlaybackParams});Z.contentCheckOk&&(a.contentCheckOk=!0);if(T=Z.clientPlaybackNonce)a.cpn=T;if(T=Z.playerParams)a.params=T;if(T=Z.playlistId)a.playlistId=T;Z.racyCheckOk&&(a.racyCheckOk=!0);T=Z.X();y=T.embedConfig;Z.PG&&
T.B("embeds_enable_per_video_embed_config")?a.serializedThirdPartyEmbedConfig=Z.PG:y&&(a.serializedThirdPartyEmbedConfig=y);a.captionParams={};y=g.QC().Aq(65);Z.deviceCaptionsOn!=null?a.captionParams.deviceCaptionsOn=Z.deviceCaptionsOn:g.fQ(T)&&(a.captionParams.deviceCaptionsOn=y!=null?!y:!1);Z.fh&&(a.captionParams.deviceCaptionsLangPref=Z.fh);Z.dH.length?a.captionParams.viewerSelectedCaptionLangs=Z.dH:g.fQ(T)&&(y=g.qr(),y?.length&&(a.captionParams.viewerSelectedCaptionLangs=y));y=Z.fetchType==="onesie"&&
Z.B("html5_onesie_attach_po_token");K=Z.fetchType!=="onesie"&&Z.B("html5_non_onesie_attach_po_token");if(y||K)y=Z.X(),y.gV&&(a.serviceIntegrityDimensions={},a.serviceIntegrityDimensions.poToken=y.gV);T.B("fetch_att_independently")&&(a.attestationRequest={omitBotguardData:!0});a.playbackContext||(a.playbackContext={});a.playbackContext.devicePlaybackCapabilities=A_X(Z);a.playbackContext.devicePlaybackCapabilities.supportsVp9Encoding===!1&&Z.U6("noVp9",{});return a};
gq=function(Z){Z.loader&&(Z.loader.dispose(),Z.loader=null,Au(Z.HI,null));Z.EQ()?sC0(Z):Z.uc()};
c7X=function(Z){if(!Z.playerState.V(128))if(Z.videoData.isLoaded(),Z.dh=g.mr(Z.videoData.Wo),g.PZ(Z.videoData)){Z.Fa.tick("bpd_s");wq(Z).then(()=>{Z.Fa.tick("bpd_c");if(!Z.jm()){Z.hc&&(Z.Y4(CN(CN(Z.playerState,512),1)),OJ(Z));var N=Z.videoData;N.endSeconds&&N.endSeconds>N.startSeconds&&fB(Z,N.endSeconds);Z.LD.finished=!0;$V(Z,"dataloaded");Z.lC.nI()&&xV(Z);tby(Z.OW,Z.d_)}});
Z.B("html5_log_media_perf_info")&&Z.U6("loudness",{v:Z.videoData.lz.toFixed(3)},!0);var k=Z.mediaElement?.lq();if(k&&"disablePictureInPicture"in k&&Z.kW.o8)try{k.disablePictureInPicture=Z.kW.rD&&!Z.videoData.backgroundable}catch(N){g.L9(N)}A7f(Z);Z.qO=new Paf(Z.videoData)}else $V(Z,"dataloaded")};
HeN=function(Z){const k=Z.videoData;Wgb(Z,Z.SY).then(void 0,N=>{Z.videoData!==k||k.jm()||(N=QA(N),N.errorCode==="auth"&&Z.videoData.errorDetail&&Z.videoData.errorDetail!=="7"?Z.N4(N.errorCode,2,unescape(Z.videoData.errorReason),Td(N.details),Z.videoData.errorDetail,Z.videoData.sf||void 0):Z.handleError(N))})};
GA=function(Z){return g.Qw(Z.kW)&&Z.videoData.isLivePlayback&&(!Z.kW.B("html5_allow_multiview_tile_preload")||!Z.videoData.iq)};
wq=function(Z){gq(Z);Z.d_=null;const k=q1N(Z.kW,Z.videoData,Z.YX());Z.Ch=k;Z.Ch.then(N=>{dN0(Z,N)},N=>{Z.jm()||(N=QA(N),Z.visibility.isBackground()?(SG(Z,"vp_none_avail"),Z.Ch=null,Z.LD.reset()):(Z.LD.finished=!0,Z.N4(N.errorCode,N.severity,"HTML5_NO_AVAILABLE_FORMATS_FALLBACK",Td(N.details))))});
return k};
A7f=function(Z){U1(Z.videoData,"html5_set_debugging_opt_in")&&(Z=g.QC(),Z.Aq(183)||(rO(183,!0),Z.save()))};
$V=function(Z,k="dataupdated"){Z.publish("internalvideodatachange",k,Z.videoData)};
dN0=function(Z,k){if(!Z.jm()&&!k.videoData.jm()){Z.d_=k;tIi(Z.HI,Z.d_);if(Z.videoData.isLivePlayback){var N=X3G(Z.u0.Dw,Z.videoData.videoId)||Z.loader&&!isNaN(Z.loader.dA);N=Z.B("html5_onesie_live")&&N;CB(Z)||Z.videoData.MX>0&&!eI(Z.videoData)||N||Z.seekTo(Z.zi(),{b0:"videoplayer_playbackData",seekSource:18})}if(Z.videoData.D.V()){if(T0N(Z.videoData)){Z.N4("fmt.missing",2,"BROWSER_OR_EXTENSION_ERROR",Td({missabrurl:1}));return}Z.loader?g.L9(Error("Duplicated Loader")):(N=g.Q5(Z.kW.experiments,"html5_onesie_defer_content_loader_ms"))&&
Z.Vr()&&X3G(Z.u0.Dw,Z.videoData.ue)?g.fb(()=>{Z.jm()||Z.loader||eG(Z)},N):eG(Z)}else!Z.videoData.D.V()&&yn(Z.videoData)&&Z.eZ(new oH(Z.videoData.videoId||"",4));
Z.gk();XQf(k).then(()=>{const a={};Z.Qr(a);Z.kW.Xa()&&Z.B("html5_log_media_perf_info")&&Z.U6("av1Info",a);DY(Z)})}};
OJ=function(Z,k=!1){if(!Z.mediaElement||!Z.videoData.D)return!1;var N=Ltr(Z,k),a=Z.mediaElement.vD();let T=!1;a&&a.equals(N)||(VYf(Z,N),T=!0);Z.playerState.V(2)||lkb(Z.HI,k);a:{k=T;if(nQ(Z.videoData)){if(!Z.videoData.kT())break a}else if(!g.RD(Z.videoData))break a;if(Z.mediaElement)if((N=Z.videoData.L)&&Z.mediaElement.G()){a=Z.mediaElement.lq();if(Z.nC)if(a!==Z.nC.element)uc(Z);else if(k&&N.flavor==="fairplay"&&!He())uc(Z);else break a;if(Z.B("html5_report_error_for_unsupported_tvos_widevine")&&He()&&
N.flavor==="widevine")Z.N4("fmt.unplayable",1,"HTML5_NO_AVAILABLE_FORMATS_FALLBACK","trg.unspttvoswidevine");else{Z.nC=new Ft0(a,Z.videoData,Z.kW,Z.mediaElement,Z.CC);Z.nC.subscribe("licenseerror",Z.Js,Z);Z.nC.subscribe("qualitychange",Z.qy,Z);Z.nC.subscribe("heartbeatparams",Z.Xf,Z);Z.nC.subscribe("keystatuseschange",Z.Ph,Z);Z.nC.subscribe("ctmp",Z.U6,Z);for(const K of Z.S0.keys)k=Z.S0.get(K),Z.nC.Gq(k);Z.B("html5_eme_loader_sync")||Z.S0.removeAll()}}else Z.N4("fmt.unplayable",1,"HTML5_NO_AVAILABLE_FORMATS_FALLBACK",
"trg.updatedrm")}return T};
eG=function(Z){var k=Z.videoData.V,N={cpn:Z.videoData.clientPlaybackNonce,c:Z.kW.V.c,cver:Z.kW.V.cver};for(const [Q,q]of Object.entries(N)){N=Q;var a=q;for(var T of Object.values(k.V))T.EH.O(N,a);k.Vz?.O(N,a)}T=Z.kW;N=Z.videoData;a=Z.SY;k=new g.tYy(T);var K=coy({hasSubfragmentedFmp4:N.hasSubfragmentedFmp4,p_:N.p_});k.j=K;k.dA=N.maxReadAheadMediaTimeMs/1E3||k.dA;a.Y.c9()===a.policy.V?k.qX=10:k.qX=N.minReadAheadMediaTimeMs/1E3||k.qX;k.KN=N.readAheadGrowthRateMs/1E3||k.KN;N.hS&&(k.L=!0,k.x9=!0,T.experiments.Yl().V.Aq(hty)&&
q9j(N)===3&&(k.ix=!0));k.qf=!E9();g.Qw(T)||!E9()?(k.Sm=8388608,k.hq=524288,k.J0=5,k.Rq=1048576,k.A6=1.5,k.UH=4587520,d$()&&(k.UH=786432),k.C*=1.1,k.O*=1.1,k.mq=!0):T.U&&(k.C*=1.3,k.O*=1.3);g.Cf&&g.A5("crkey")&&(K=T.V.cmodel==="CHROMECAST/ANCHOVY",k.Sm=20971520,k.hq=1572864,K&&(k.UH=812500,k.gD=1E3,k.us=5,k.Rq=2097152));g.SL&&(k.mq=!0);T.supportsGaplessAudio()||(k.gF=!1);oZ&&(k.Ap=!0);k.gQ=T.B("html5_peak_shave");N.jC()&&T.B("html5_disable_peak_shave_for_onesie")&&(k.gQ=!1);K=N.V?.L();if(eI(N)){k.hI=
!0;k.qY||(k.J$=!0);k.r5=!0;k.eL=!0;k.Mb=!0;if(N.latencyClass==="ULTRALOW"||N.latencyClass==="LOW"&&!T.B("html5_disable_low_pipeline"))k.WN=2,k.gN=4;k.bN=N.defraggedFromSubfragments;g.jI(N)&&(k.Tt=!1);k.TU=g.KA(T)}N.isAd()&&(k.SK=0,k.lk=0);k.Vg=T.B("html5_ultra_low_latency_subsegment_readahead")&&N.latencyClass==="ULTRALOW";k.D=T.Xa();a.U.Y=eI(N)?.5:0;N.isLivePlayback&&(k.FE=g.Q5(T.experiments,"html5_min_startup_buffered_media_duration_for_live_secs")||.25,k.MX=!1);N.kT()&&(k.MX=!1);a=!T.B("html5_sabr_keep_all_quality_constraints")&&
!N.kT();const y=T.B("html5_sabr_remove_all_quality_constraints_for_drm_traffic")&&N.kT();k.Ay=a||y;k.l9=be(N);JE(N)&&(k.Vg=!0,N.latencyClass==="LOW"?k.hp=g.Q5(T.experiments,"html5_jumbo_mobile_subsegment_readahead_target"):N.latencyClass==="ULTRALOW"&&(k.hp=g.Q5(T.experiments,"html5_jumbo_ull_subsegment_readahead_target")),k.oR=!0);N.Rn()&&(k.hB=1.3);k.Ap=k.Ap||N.lf;k.u7=(k.u7||N.u7)&&T.C;k.FN=N.j;T.Xa()&&(k.xl=!0);N.j&&!K&&(k.nh=!0);N.j&&N.isAd()&&(k.C*=1.6,k.O*=1.6);yn(N)&&(k.Y=N.videoId,k.d9=!0,
k.Ed=100,N.Oq&&N.Oq.length>0&&(k.gV=N.Oq));k.A1=N.Al;k.Eq=Jl(T,{},N.D||void 0,g9(N));k.Qz=ie(N)&&(g.oJ(T)||g.Df(T));nQ(N)&&(k.G=!0,k.Ox=T.B("html5_seek_refactor_bh_fix"),k.By=T.B("html5_use_loader_cmt_for_bh"),k.Sb=T.B("html5_estimate_live_partial_slice_duration"),g.Qw(T)&&!g.ce()&&T.B("html5_force_audio_to_cover_video_keyframe")?k.O6=!1:k.O6=!0,k.VP||N.isLivePlayback||!T.B("html5_sabr_non_streaming_xhr_vod_client_request_cancellation")||(k.o8=!0,k.nD=g.Q5(T.experiments,"html5_sabr_non_streaming_xhr_vod_request_cancellation_timeout_ms")),
T.B("html5_sabr_report_partial_segment_estimated_duration")&&(k.ag=!0),k.V=!0,k.Fh=T.B("html5_trigger_loader_when_idle_network"),k.Yw=T.B("html5_sabr_parse_live_metadata_playback_boundaries"),k.dZ=T.B("html5_consume_onesie_next_request_policy_for_sabr"),k.XW=T.B("html5_sabr_report_next_ad_break_time"),k.wN=T.B("html5_log_high_res_buffer_timeline")&&T.Xa(),k.En=T.B("html5_remove_stuck_slices_beyond_max_buffer_limits"),k.US=T.B("html5_gapless_sabr_btl_last_slice")&&vZ(N),k.NT=T.B("html5_reset_last_appended_slice_on_seek")&&
vZ(N),eI(N)?(k.bL=!0,k.ef=T.B("html5_disable_variability_tracker_for_live"),k.Kp=!0,T.B("html5_simplified_backup_timeout_sabr_live")&&(k.LC=!0,k.gD=k.Wj)):k.jY=T.B("html5_probe_request_on_sabr_request_progress"),k.wz=T.B("html5_serve_start_seconds_seek_for_post_live_sabr"),k.tW=T.B("html5_flush_index_on_updated_timestamp_offset"),k.N=nQ(N),k.Oq=T.B("html5_ignore_partial_segment_from_live_readahead"),T.B("html5_include_partial_segment_for_jumbo_ll")&&JE(N)&&(k.Oq=!1),k.Ri=T.B("html5_use_non_active_broadcast_for_post_live"),
k.Vz=T.B("html5_use_centralized_player_time"),k.s6=T.B("html5_log_centralized_player_time"),k.fN=T.B("html5_consume_onesie_sabr_seek"),k.zt=T.B("html5_enable_sabr_seek_loader_refactor"),N.enableServerStitchedDai&&(k.U=!0,k.Hx=T.B("html5_reset_server_stitch_state_for_non_sabr_seek"),k.fS=T.B("html5_remove_ssdai_append_pause")&&!N.qW(),k.Ke=T.B("html5_ssdai_log_ssevt_in_loader_timers")),k.dG=T.Xa(),k.latencyClass=N.latencyClass,k.Xh=!N.Rn()&&T.B("html5_prebuffer_instream_media_vod"));k.ov=g.N0G(N);
k.xd=T.B("html5_enable_sabr_otf_in_client");vo(T.L,ex.BITRATE)&&(k.UH=NaN);if(a=g.Q5(T.experiments,"html5_request_size_max_kb"))k.Rq=a*1024;if(T.L.U)k.oE="; "+ex.EXPERIMENTAL.name+"=allowed";else if(T.B("html5_enable_cobalt_tunnel_mode")&&g.ce()){const {name:Q,valid:q}=ex.TUNNELMODE;k.oE=`; ${Q}=${q}`}T=N.serverPlaybackStartConfig;T?.enable&&T?.playbackStartPolicy&&(k.Jd=!0,b5(k,T.playbackStartPolicy,2));T=udy(Z);Z.S0.removeAll();a:{N=Z.u0.Dw;if(a=Z.videoData.videoId)if(K=N.V.get(a)){N.V.remove(a);
N=K;break a}N=void 0}Z.loader=new ldf(Z,Z.SY,k,Z.videoData.V,Z.videoData.D,BI(Z),T,Z.videoData.enableServerStitchedDai,N,Z.videoData.Vz);k=Z.videoData.B("html5_disable_preload_for_ssdai_with_preroll")&&Z.videoData.isLivePlayback&&Z.Vr()?!0:Z.hc&&GA(Z);Z.loader.initialize(Z.getCurrentTime(),BI(Z),k);Z.videoData.probeUrl&&(Z.loader.s6=Z.videoData.probeUrl);!Z.dh.length&&!Z.hc||Z.videoData.cotn||Z.loader?.xW(!1);Au(Z.HI,Z.loader);Z.uq&&(CnR(Z.loader,Z.uq),Z.U6("sdai",{sdl:1}));Z.videoData.jY()&&(Z=Z.loader,
Z.policy.YH=Z.policy.wi)};
xV=function(Z){Z.jm();if(!Z.lC.finished&&Z.LD.finished&&!Z.playerState.V(128)&&!Z.dh.length){if(!Z.kX.started){var k=Z.kX;k.started=!0;k.sync()}if(!Z.GC()){Z.loader&&(Z.Yl().V.Aq(Ju)?k=Z.loader.MX(!0)>0:(k=Z.loader.timing,k=!!k.U&&!!k.D),Z.Uc=k);Z.lC.finished||(Z.lC.finished=!0);k=Z.B("html5_onesie_live")&&Z.loader&&!isNaN(Z.loader.dA);!Z.videoData.isLivePlayback||Z.videoData.MX>0&&!eI(Z.videoData)||k||CB(Z)||(Z.seekTo(Infinity,{b0:"videoplayer_readying",seekSource:18}),Z.isBackground()&&(Z.V4=!0));
k=Z.WA;if(k.qoe){k=k.qoe;const a=k.provider.videoData,T=k.provider.kW;for(var N of T.JB)YY(k,N);if(k.provider.B("html5_enable_qoe_cat_list"))for(const K of a.Ni)YY(k,K);else a.JB&&YY(k,k.provider.videoData.JB);a.Rn()&&(N=a.V,eI(a)&&YY(k,"manifestless"),N&&LD(N)&&YY(k,`live-segment-${LD(N).toFixed(1)}`));nQ(a)?YY(k,"sabr"):k.dN(zY(a));if(Ke(a)||a.qW())a.qW()&&YY(k,"ssa"),YY(k,"lifa");w9(a)&&YY(k,"cdm");a.gatewayExperimentGroup&&(N=a.gatewayExperimentGroup,N==="EXPERIMENT_GROUP_SPIKY_AD_BREAK_EXPERIMENT"?
N="spkadtrt":N==="EXPERIMENT_GROUP_SPIKY_AD_BREAK_CONTROL"&&(N="spkadctrl"),YY(k,N));T.Vz!=="yt"&&k.V.set("len",[a.lengthSeconds.toFixed(2)]);a.cotn&&!yn(a)&&k.O0(!0);T.Xa()&&(N=vFU())&&k.U6("cblt",{m:N});T.B("html5_log_screen_diagonal")&&k.U6("cbltdiag",{v:window.H5vccScreen?.GetDiagonal?window.H5vccScreen.GetDiagonal():0})}Z.publish("playbackready");vX("pl_c",Z.Fa.timerName)||(Z.Fa.tick("pl_c"),gV("pl_c",void 0,"video_to_ad"));vX("pbr",Z.Fa.timerName)||(Z.Fa.tick("pbr"),gV("pbr",void 0,"video_to_ad"))}}};
SG=function(Z,k){Z.playerState.V(128)||(Z.Y4(s0(Z.playerState,1028,9)),Z.U6("dompaused",{r:k}),Z.publish("onAutoplayBlocked"))};
g.zA=function(Z){const k=BI(Z);return Ls(k)||!Z.d_?null:g.ZD(Z.d_.V.videoInfos,N=>k.Y(N))};
hu=function(Z,k,N,a,T){var K=Z.WA;const y=Z.videoData;y.U=N;var Q=g.zA(Z);N=new fdf(N,k,Q?Q.itag:"",a,T);if(K.qoe){K=K.qoe;a=T=g.j_(K.provider);Q=[N.V.id,N.U,K.jY,N.reason];K.provider.kW.Yl().V.Aq(Ju)&&!K.zt&&Q.push(zX0(K,N));N.token&&Q.push(N.token);g.MX(K,a,"vfs",Q);K.jY=N.V.id;Q=K.provider.fp.getPlayerSize();if(Q.width>0&&Q.height>0){Q=[Math.round(Q.width),Math.round(Q.height)];const q=g.lS();q>1&&Q.push(q);g.MX(K,a,"view",Q)}K.zt||(K.provider.kW.Xa()&&YY(K,"rqs2"),K.provider.videoData.V&&tQ(K.provider.videoData.V)&&
K.V.set("preload",["1"]));K.zt=!0;K.L=!0;N.reason==="m"&&++K.Ke===100&&No(K,2);g.MX(K,T,"vps",[K.wV]);K.O||K.reportStats(T)}N=Z.OW;N.U=0;N.V=0;Z.publish("internalvideoformatchange",y,k==="m")};
BI=function(Z){if(Z.d_){var k=Z.OW;var N=Z.d_;Z=Z.qw();let a=A4f(k);if(Ls(a)){if(a=k.JX(N).compose(PSb(k,N)).compose(HQr(k,N)).compose(gi(k,N.videoData)).compose(wi(k,N.videoData,N)).compose($T(k,N)).compose(G$(k,N)),Ls(Z)||k.B("html5_apply_pbr_cap_for_drm"))a=a.compose(dZj(k,N))}else k.B("html5_perf_cap_override_sticky")&&(a=a.compose($T(k,N))),k.B("html5_ustreamer_cap_override_sticky")&&(a=a.compose(dZj(k,N)));a=a.compose(G$(k,N));k=N.videoData.x9.compose(a).compose(N.videoData.En).compose(Z)}else k=
io;return k};
Bvi=function(Z){const k="loadstart loadedmetadata play playing progress pause ended suspend seeking seeked timeupdate durationchange ratechange error waiting resize".split(" ");for(const N of k)Z.Lj.K(Z.mediaElement,N,Z.O9,Z);Z.kW.IV&&Z.mediaElement.G()&&(Z.Lj.K(Z.mediaElement,"webkitplaybacktargetavailabilitychanged",Z.Cv,Z),Z.Lj.K(Z.mediaElement,"webkitcurrentplaybacktargetiswirelesschanged",Z.My,Z))};
sC0=function(Z){if(Z.b3)if(Z.s4(),Z.b3.j)try{Z.kW.Xa()&&Z.U6("rms",{l:"vprms",sr:Z.EQ(),rs:Z.b3.D()}),Z.b3.clear(),Z.mediaElement?.jY(Z.b3),Z.b3=null}catch(N){var k=new g.jD(`Error while clearing Media Source in VideoPlayer: ${N.name}, ${N.message}`);k=QA(k);Z.handleError(k);Z.uc()}else Z.uc()};
uc=function(Z){Z.nC&&(Z.nC.dispose(),Z.nC=null)};
DNj=function(Z){Z.mediaElement&&Z.mediaElement.YX()&&(Z.Zm=(0,g.z)());Z.kW.XM?g.fb(()=>{UJ(Z)},0):UJ(Z)};
UJ=function(Z){if(!Z.b3?.LP()){if(Z.mediaElement)try{Z.bY=Z.mediaElement.playVideo()}catch(k){SG(Z,`err.${k}`)}if(Z.bY){const k=Z.bY;k.then(void 0,N=>{if(!(Z.playerState.V(4)||Z.playerState.V(256)||Z.bY!==k||N&&N.name==="AbortError"&&N.message&&N.message.includes("load"))){let a="promise";N&&N.name&&(a+=`;m.${N.name}`);SG(Z,a);Z.J3=!0;Z.videoData.bq=!0}})}}};
Ktf=function(Z,k=!1){if(Z.b3)return Z.b3.Y;OeR(Z,k);return Z.zX()?.dA()||null};
Ltr=function(Z,k=!1){let N=null;Z.videoData.D?.V()?(N=Ktf(Z,k),Z.loader?.resume()):(gq(Z),Z.videoData.FS&&(N=Z.videoData.FS.U()));return N};
vnU=function(Z,k){if(k.V.video.quality==="auto"&&k.getInfo().D()&&Z.videoData.O6)for(const N of Z.videoData.O6)if(N.getHeight()===Z.q5&&N.V.video.quality!=="auto")return N.getInfo();return k.getInfo()};
ieR=function(Z){return!!(Z.B("html5_native_audio_track_switching")&&g.v9&&Z.videoData.U?.D())};
gny=function(Z){if(!ieR(Z))return!1;Z=Z.mediaElement?.audioTracks();return!!(Z&&Z.length>1)};
$Nf=function(Z){const k=w3R(Z);if(k){var N=bc[k]||k;return Z.videoData.getAvailableAudioTracks().find(a=>a.ZF.getName()===N)}};
w3R=function(Z){if(Z=Z.mediaElement?.audioTracks())for(let k=0;k<Z.length;++k){const N=Z[k];if(N.enabled)return N.label}};
xNi=function(Z){const k=Z.mediaElement?.audioTracks();if(k){var N=[];for(let T=0;T<k.length;++T){var a=k[T];a=new g.J4(a.label,new g.Al(bc[a.label]||a.label,a.label,!1));N.push(a)}Z.videoData.dG=N}};
udy=function(Z){let k;const N=Z.videoData.getAvailableAudioTracks(),a=Z.kW.Kp;a&&(k=N.find(T=>T.getLanguageInfo().id===a));
if(Z.kW.experiments.yz("enable_audio_description_setting")&&g.QC().Aq(198))for(const T of N)if(T.L){k=T;break}Z.Yl().V.Aq(Gnr)&&Z.videoData.cotn&&(k=N.find(T=>!!T.G));
k||(Z=Z.getAudioTrack(),k=Z.ZF.isDefault?void 0:Z);return k};
OeR=function(Z,k=!1){let N;try{g.ce()&&Z.videoData.tH()&&rFi(Z.mediaElement),N=Z.mediaElement.zX(Z.Dp(),Z.iO())}catch(a){if(Dy(Z.dE,"html5.missingapi",{updateMs:"1"}))return;console.error("window.URL object overwritten by external code",a);Z.N4("html5.missingapi",2,"HTML5_NO_AVAILABLE_FORMATS_FALLBACK","updateMs.1");return}Z.uM(N,!1,!1,k)};
SKy=function(Z,k=!1){if(Z.loader){Z.videoData.enableServerStitchedDai&&Pnj(Z.loader);const N=Z.getCurrentTime()-Z.mx();Z.loader.seek(N,{P8:k}).eK(()=>{})}else eG(Z)};
etb=function(Z,k,N=!1,a=!1){!Z.b3||k&&Z.b3!==k||(k=Z.getDuration(),!k&&eI(Z.videoData)&&(k=25200,Z.B("html5_use_centralized_player_time")&&(k=46800)),Z.b3.isView?k>Z.b3.getDuration()&&Z.b3&&(Z.b3.KH(k),Z.loader?.bq(k)):Z.b3&&(Z.b3.KH(k),Z.loader?.bq(k)),ZDU(Z.loader,Z.b3,N,a),Z.publish("mediasourceattached"))};
onX=function(Z,k){if(Z.kW.Xa()&&Z.mediaElement){const N=Z.mediaElement.Vn();N.omt=(Z.mediaElement.getCurrentTime()+Z.mx()).toFixed(3);N.ps=Z.playerState.state.toString(16);N.rt=(g.j_(Z.WA.provider)*1E3).toFixed();N.e=k;Z.Xm[Z.L9++%5]=N}};
J7R=function(Z){if(g.A5("cobalt")&&g.A5("nintendo switch")){var k=!window.matchMedia("screen and (max-height: 720px) and (min-resolution: 200dpi)").matches;Z.U6("nxdock",{d:k})}};
ztf=function(Z){g.Ob(Z.aP);pB(Z)||(Z.aP=g.B8(()=>pB(Z),100))};
pB=function(Z){var k=Z.mediaElement;k&&Z.V7&&!Z.videoData.C&&!vX("vfp",Z.Fa.timerName)&&k.D()>=2&&!k.isEnded()&&M9(k.pN())&&Z.Fa.tick("vfp");return(k=Z.mediaElement)&&!Z.videoData.C&&k.getDuration()>0&&(k.isPaused()&&k.D()>=2&&M9(k.pN())&&(vX("pbp",Z.Fa.timerName)||Z.Fa.tick("pbp"),!Z.videoData.Tt||Z.YB||k.isSeeking()||(Z.YB=!0,Z.publish("onPlaybackPauseAtStart"))),k=k.getCurrentTime(),Wk(Z.pS,k))?(Z.YC(),!0):!1};
RH=function(Z,k){Z.kW.B("html5_log_rebuffer_reason")&&(k={r:k,lact:Qb()},Z.mediaElement&&(k.bh=ax(Z.mediaElement)),Z.U6("bufreason",k))};
UN0=function(Z){Z.WA.onProgress();if(GY(Z.videoData)&&Date.now()>Z.gg+6283){if(Z.B("html5_unified_live_latency_reporting")){var k=Z.WA;k.qoe&&xqy(k.qoe)}else!Z.isAtLiveHead()||Z.videoData.V&&Hf(Z.videoData.V)||(k=Z.WA,k.qoe&&xqy(k.qoe));k=g.KA(Z.kW);const N=Z.B("html5_always_log_rawlat");(k||N)&&Z.U6("rawlat",{l:Xx(Z.Co,"rawlivelatency").toFixed(3)});Z.gg=Date.now()}Z.videoData.U&&Z.videoData.U.D()&&(k=Z.KI())&&k.videoHeight!==Z.q5&&(Z.q5=k.videoHeight,hu(Z,"a",vnU(Z,Z.videoData.FS)))};
beX=function(Z){if(Z.kW.Xa()){Z.Xm.sort((k,N)=>+k.rt-+N.rt);
for(const k of Z.Xm)Z.U6("vpe",Object.assign({t:k.rt},k));Z.Xm=[];Z.L9=0}};
VYf=function(Z,k){Z.Fa.tick("vta");gV("vta",void 0,"video_to_ad");Z.getCurrentTime()>0&&uGf(Z.HI,Z.getCurrentTime());Z.mediaElement.activate(k);Z.b3&&LU(4);!Z.videoData.C&&Z.playerState.isOrWillBePlaying()&&Z.M9.start();ieR(Z)&&(k=Z.mediaElement?.audioTracks())&&(k.onaddtrack=()=>{xNi(Z)},k.onremovetrack=()=>{xNi(Z)},k.onchange=()=>{Z.publish("internalaudioformatchange",Z.videoData,!0)})};
Mp=function(Z,k,N){const a=Z.api.getCurrentTime()*1E3<k?1:-1;Z.api.renderChapterSeekingAnimation(a,N);Z.api.seekTo(k/1E3,void 0,void 0,void 0,3)};
p3U=function(Z,k){const N=g.tE.getState().entities;Z=WQ(N,Z)?.markersList?.markerType;for(const a of k.vD)if(Z===WQ(N,a)?.markersList?.markerType)return!0;return!1};
Rt0=function(Z){Z=Z.api.getPlayerStateObject();Z=Z.isCued()||Z.isError()?"none":Z.isOrWillBePlaying()?"playing":"paused";navigator.mediaSession.playbackState=Z};
MYU=function(Z){if(navigator.mediaSession.setPositionState)if(Z.api.B("web_player_media_session_infinity")&&Z.api.getVideoData().isLivePlayback)try{navigator.mediaSession.setPositionState({duration:Infinity})}catch(a){}else{var k=Z.api.getProgressState().seekableEnd,N=Math.min(Z.api.getCurrentTime(),k);k&&Number.isFinite(N)&&navigator.mediaSession.setPositionState({duration:k,playbackRate:Z.api.getPlaybackRate(),position:N})}};
nB=function(Z,k){try{navigator.mediaSession.setActionHandler(Z,k)}catch(N){}};
nnj=function(Z){const k=[];if(!Z||!Z.thumbnails)return k;for(const N of Z.thumbnails)N.url&&(!N.width||N.width<=0||!N.height||N.height<=0||g.LA(N.url)&&k.push({src:N.url||"",sizes:`${N.width}x${N.height}`,type:"image/jpeg"}));return k};
Idb=function(Z){nB("play",()=>{Z.api.playVideo();IH(Z)});
nB("pause",()=>{Z.api.pauseVideo();IH(Z)});
nB("seekbackward",()=>{Z.api.seekBy(-5*Z.api.getPlaybackRate());IH(Z)});
nB("seekforward",()=>{Z.api.seekBy(5*Z.api.getPlaybackRate());IH(Z)});
nB("seekto",k=>{k=k.seekTime;k!=null&&Z.api.seekTo(k);IH(Z)})};
IH=function(Z){Z.api.B("web_reset_lact_on_media_actions")&&Z.api.updateLastActiveTime()};
jC0=function(Z,k){for(const N of k){k=Number(N.playbackRelativePosition?.utcTimeMs)/1E3;const a=k+Number(N.duration?.seconds),T=`composite_embargo_${k}`;if(N.onEnter){const K=N.onEnter.filter(Z.Y);K.length&&(Z.U.set(T,K),Z.api.addUtcCueRange(T,k,a,"compositeembargo",!1))}}};
Enb=function(Z,k){Z.V?.id!==k?.id&&(Z.V&&(Z.U.delete(Z.V.id),Z.api.h$([Z.V],1)),Z.V=k)};
WtX=function(Z){Z=Z?.qualityDetails||[];return g.lf(Z)&&!Array.isArray(Z)?Z:Z.reduce((k,{key:N,value:a})=>{N&&a&&(k[N]=a);return k},{})};
YKf=function(Z,k,N){const a=[],T=k?156595:151874;for(const y of Z){var K=y.video;Z={formatId:y.id,qualityLabel:K.qualityLabel,quality:K.quality,isPlayable:k};if(K=N[K.qualityLabel])Z.paygatedQualityDetails={paygatedIndicatorText:K.paygatedIndicatorText,endpoint:K.endpoint,veType:T,trackingParams:K.trackingParams};a.push(Z)}return a};
k0f=function(Z){jG()&&(Z.Fa=Z.api.tQ(),Z.V=new x2,Z.D=2,Z.Fa.TF("pt_pish"),window.requestIdleCallback?window.requestIdleCallback(()=>{ZnR(Z)}):ZnR(Z))};
jG=function(){return window.android&&window.android.webview&&window.android.webview.getExperimentalMediaIntegrityTokenProvider};
ZnR=function(Z){if(jG()){Z.Fa=Z.api.tQ();Z.Fa.TF("pt_pis");try{window.android.webview.getExperimentalMediaIntegrityTokenProvider({cloudProjectNumber:868618676952}).then(k=>{Z.U=k;Z.V?.resolve();Z.Fa.TF("pt_pif")}).catch(k=>{EJ(k,"player_start");
Z.Fa.TF("pt_pie");Z.V?.reject(k)})}catch(k){EJ(k,"player_start_catch"),Z.api.U6("pfes",{}),Z.V?.reject(k)}}};
EJ=function(Z,k){Z.message&&g.L9(Error(`${k}_${Z.message}`))};
NkG=function(Z,k){if(Z.U){var N=k.videoId;Z.D=3;Z.Fa.TF("pt_ms");try{Z.U.requestToken(N).then(a=>{Z.Fa.TF("pt_mf");if(a=rr(a))k.qf={rY:a}}).catch(a=>{Z.Fa.TF("pt_me");
EJ(a,"player_generate");Z.handleError(a,k)})}catch(a){EJ(a,"player_generate_catch"),Z.handleError(a,k)}}};
aQG=function(Z){const k=Z.api.getVideoData();Z.button.In(k.Re)};
Tkr=function(Z,k){uS(Z.api.X())&&(k?Z.L.show():Z.L.hide())};
yAj=function(Z){Z.Y<Z.D.length?Kuf(Z):(Z.api.getPlayerStateObject(1).V(2)&&(Z.G=!0),Z.V=!0,Z.Y=0,Z.D.length=0,Z.api.Sa(),Z.V=!1)};
QGy=function(Z){var {interstitials:k}=Z.api.getVideoData();const N=[];for(const q of k){k=N;var a=k.push,T=Z,K=q.playerVars,y=q.uy,Q=q.time;const r=`yto-${T.C++}`;Q=new g.pe(Q,Q,{id:r,priority:7,namespace:"yto"});T.j[r]={playerVars:K,playerType:y};a.call(k,Q);k=Z.api.getVideoData({playerType:1});k=Object.assign({oauth_token:k.oauthToken},q.playerVars);Z.api.preloadVideoByPlayerVars(k,q.uy)}Z.api.f8(N,1)};
Kuf=function(Z){var k=Z.D[Z.Y];if(k){var {playerVars:N,playerType:a}=Z.j[k];Z.V=!0;Z.Y++;k=Z.api.getVideoData({playerType:1});k=Object.assign({oauth_token:k.oauthToken},N);Z.api.loadVideoByPlayerVars(k,!0,a,!0);Z.V=!1}};
q2y=async function(Z){if(!Z.V){const k=await g.ha();if(!k)throw Error("PES is undefined");Z.V=k}};
rAf=async function(Z){if(Z.V)try{var k=await g.FY(Z.V,"videoPlaybackPositionEntity"),N=await g.FY(Z.V,"mainVideoEntity");const a=new Set(N.map(y=>y.videoId)),T=k.filter(y=>!a.has(y.videoId));
T.sort((y,Q)=>Number(Q.lastUpdatedClientTimestampMs)-Number(y.lastUpdatedClientTimestampMs));
const K=Date.now()-864E5;k=[];for(N=0;N<T.length;N++){const y=T[N];(N>=Z.D||Number(y.lastUpdatedClientTimestampMs)<K)&&y.key&&k.push(y.key)}await B4N(Z.V,k)}catch(a){throw Error("Failed to expire playback position",{cause:a});}};
C9f=async function(Z,k,N,a){await q2y(Z);if(Z.V)try{const T={key:g.MU(k,"videoPlaybackPositionEntity"),videoId:k,lastPlaybackPositionSeconds:N.toString(),lastUpdatedClientTimestampMs:a.toString()};await g.LO(Z.V,T,"videoPlaybackPositionEntity");Z.U!==k&&(await rAf(Z),Z.U=k)}catch(T){throw Error("Failed to add or update playback position",{cause:T});}};
WI=function(Z){g.D(Z.badge.element,"ytp-suggested-action-badge-with-controls",Z.vD||!Z.zt)};
YV=function(Z,k=!0){const N=Z.hq();Z.expanded!==N&&(Z.expanded=N,k?(Z.Ap.stop(),Z.iq.stop(),Z.bq.stop(),Z.Ap.start()):(Z.L.In(Z.expanded),g.D(Z.badge.element,"ytp-suggested-action-badge-expanded",Z.expanded)),Z.MX())};
ZO=function(Z){const k=Z.text||"",N=g.Mc("ytp-suggested-action-badge-title",Z.element);N&&g.m_(N,k);Z.badge.element.setAttribute("aria-label",k);Z.dismissButton.element.setAttribute("aria-label",Z.xl?Z.xl:"")};
kJ=function(Z){return Z.backButton?(Z.backButton.focus(),!0):!1};
msy=function(Z,k=!1){Z.gP&&g.D(Z.Lp("ytp-panel-footer"),"ytp-panel-hide-footer",k)};
sGy=function(Z,k){return k.priority-Z.priority};
g.Ng=function(Z){for(const k of Z.items)k.unsubscribe("size-change",Z.NI,Z);Z.items=[];try{g.Qp(Z.menuItems.element)}catch(k){g.L9(new g.jD("Failed to remove menu items from panel menu.",{error:k.message,originalStack:k.stack,childToBeRemoved:Z.menuItems.element.firstChild?.textContent??"child element not found"}))}Z.menuItems.publish("size-change")};
g.Tx=function(Z){if(!(Z.V.length<=1)){var k=Z.V.pop(),N=Z.V[0];Z.V=[N];a1(Z,k,N,!0)}};
AAG=function(Z){const k=Z.V[Z.V.length-1];if(k){g.n1(Z.element,Z.maxWidth||"100%",Z.maxHeight||"100%");g.ij(k.element,"width","");g.ij(k.element,"height","");g.ij(k.element,"maxWidth","100%");g.ij(k.element,"maxHeight","100%");g.ij(k.content.element,"height","");const T=g.I4(k.element);T.width+=1;T.height+=1;g.ij(k.element,"width",`${T.width}px`);g.ij(k.element,"height",`${T.height}px`);g.ij(k.element,"maxWidth","");g.ij(k.element,"maxHeight","");var N=0;k.f$&&(N=g.I4(k.Lp("ytp-panel-header")).height);
var a=0;k.gP&&(a=k.Lp("ytp-panel-footer"),g.ij(a,"width",`${T.width}px`),a=g.I4(a).height);g.ij(k.content.element,"height",`${T.height-N-a}px`);k.element instanceof HTMLElement&&(N=k.element,a=N.scrollWidth-N.clientWidth,N.offsetWidth-N.clientWidth>0&&a>0&&(T.width+=a,g.ij(k.element,"width",`${T.width}px`)));Z.size=T}};
P9N=function(Z){Z.D&&g.b6(Z.D);Z.Y&&g.b6(Z.Y)};
a1=function(Z,k,N,a){P9N(Z);k&&(k.unsubscribe("size-change",Z.VG,Z),k.unsubscribe("back",Z.gr,Z));N.subscribe("size-change",Z.VG,Z);N.subscribe("back",Z.gr,Z);if(Z.LF){g.jX(N.element,a?"ytp-panel-animate-back":"ytp-panel-animate-forward");N.HD(Z.content);N.focus();Z.element.scrollLeft=0;Z.element.scrollTop=0;var T=Z.size;AAG(Z);g.n1(Z.element,T);Z.D=new g.Uc(()=>{cAN(Z,k,N,a)},20,Z);
Z.D.start()}else N.HD(Z.content),k&&k.detach()};
g.KY=function(Z,k){const N=Z.V[Z.V.length-1];N!==k&&(Z.V.push(k),a1(Z,N,k))};
Zj=function(Z,k,N,a,T,K,y,Q,q){var r=k^Z;if((Z-1|52)<Z&&(Z+8^3)>=Z&&N[c[1]])var C=W8(8,7548,N);if(!(Z<<1&11)){C=N[a];const A=C[c[r^2369]](c[r^2411]);A>0?W8(r^2416,r^10715,T,C[c[r^2418]](0,A),C[c[r^2418]](A+1)):C&&(T[C]=c[r^2415]);var m=[]}Z+4&13||N[c[32]]();Z<<1<13&&Z<<1>=2&&(m=N(y,Q,q));return m};
cAN=function(Z,k,N,a){Z.D.dispose();Z.D=null;g.jX(Z.element,"ytp-popup-animating");a?(g.jX(k.element,"ytp-panel-animate-forward"),g.Wp(N.element,"ytp-panel-animate-back")):(g.jX(k.element,"ytp-panel-animate-back"),g.Wp(N.element,"ytp-panel-animate-forward"));g.n1(Z.element,Z.size);Z.Y=new g.Uc(()=>{g.Wp(Z.element,"ytp-popup-animating");k.detach();g.Y3(k.element,["ytp-panel-animate-back","ytp-panel-animate-forward"]);Z.Y.dispose();Z.Y=null},250,Z);
Z.Y.start()};
dsf=function(Z,k,N){const a=k?.text?.simpleText;a&&(N=HnX(Z,N,a,k?.icon,k?.secondaryIcon),k.navigationEndpoint&&N.listen("click",()=>{g.A7(Z.S,"innertubeCommand",k.navigationEndpoint);Z.hide()},Z))};
Xny=function(Z,k,N){const a=k?.text?.simpleText;a&&HnX(Z,N,a,k?.icon).listen("click",()=>{k?.icon?.iconType==="HIDE"?Z.S.publish("featuredproductdismissed"):k.serviceEndpoint&&g.A7(Z.S,"innertubeCommand",k.serviceEndpoint);Z.hide()},Z)};
HnX=function(Z,k,N,a,T){k=new g.y9(g.zn({},[],!1,!!T),k,N);T&&k.updateValue("secondaryIcon",Luj(T));k.setIcon(Luj(a));g.u(Z,k);Z.Vm.OH(k,!0);return k};
Luj=function(Z){if(!Z)return null;switch(Z.iconType){case "ACCOUNT_CIRCLE":return{J:"svg",W:{height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 1c4.96 0 9 4.04 9 9 0 1.42-.34 2.76-.93 3.96-1.53-1.72-3.98-2.89-7.38-3.03A3.99 3.99 0 0016 9c0-2.21-1.79-4-4-4S8 6.79 8 9c0 1.97 1.43 3.6 3.31 3.93-3.4.14-5.85 1.31-7.38 3.03C3.34 14.76 3 13.42 3 12c0-4.96 4.04-9 9-9zM9 9c0-1.65 1.35-3 3-3s3 1.35 3 3-1.35 3-3 3-3-1.35-3-3zm3 12c-3.16 0-5.94-1.64-7.55-4.12C6.01 14.93 8.61 13.9 12 13.9c3.39 0 5.99 1.03 7.55 2.98C17.94 19.36 15.16 21 12 21z",
fill:"#fff"}}]};case "FLAG":return{J:"svg",W:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{d:"M13.18 4L13.42 5.2L13.58 6H14.4H19V13H13.82L13.58 11.8L13.42 11H12.6H6V4H13.18ZM14 3H5V21H6V12H12.6L13 14H20V5H14.4L14 3Z",fill:"white"}}]};case "HELP":return yQ();case "HIDE":return{J:"svg",W:{"enable-background":"new 0 0 24 24",fill:"#fff",height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"g",A:[{J:"path",W:{d:"M16.24,9.17L13.41,12l2.83,2.83l-1.41,1.41L12,13.41l-2.83,2.83l-1.41-1.41L10.59,12L7.76,9.17l1.41-1.41L12,10.59 l2.83-2.83L16.24,9.17z M4.93,4.93c-3.91,3.91-3.91,10.24,0,14.14c3.91,3.91,10.24,3.91,14.14,0c3.91-3.91,3.91-10.24,0-14.14 C15.17,1.02,8.83,1.02,4.93,4.93z M18.36,5.64c3.51,3.51,3.51,9.22,0,12.73s-9.22,3.51-12.73,0s-3.51-9.22,0-12.73 C9.15,2.13,14.85,2.13,18.36,5.64z"}}]}]};
case "OPEN_IN_NEW":return rm()}};
Q9=function(Z){Z.isInitialized&&(Z.enabled=Z.isVisible,Z.FS=Z.isVisible,YV(Z),Z.U(),Z.thumbnailImage.In(Z.isVisible),Z.shouldHideDismissButton||Z.dismissButton.In(Z.isVisible),Z.shouldShowOverflowButton&&Z.overflowButton.In(Z.isVisible))};
u6G=function(Z,k,N){if(N){var a="";V9y(Z,k)&&(a=k,Z.api.X().Kp=k);a&&FuU(Z,a)&&(x9f(Z.api,a),gz(Sb(Z.api.X(),Z.api.getVideoData()?.G()),T=>{var K=a;t90(T)!==K&&hSj(Z,qg(T),{stringValue:K})}))}};
rT=function(Z){rg()?.size&&gz(Sb(Z.api.X(),Z.api.getVideoData()?.G()),k=>{(k=t90(k))&&FuU(Z,k)&&(Z.api.X().Kp=k)})};
fQ0=function(Z,k){$i(gz(gz(Z.jU(),N=>zRb(N,[qg(k)])),N=>{if(N)for(const {key:a,
value:T}of N)a&&T&&(lQ0([{settingItemId:a,settingOptionValue:T}]),rT(Z))}),()=>{Z.V=!0})};
V9y=function(Z,k){Z=Z.api.getAvailableAudioTracks();for(const N of Z)if(N.getLanguageInfo().getId()===k)return N;return null};
FuU=function(Z,k){return k.split(".")[0]!==""&&Z.api.getVideoData()?.wh()&&!0};
t90=function(Z){{Z=qg(Z);const k=rg();Z=k?k.get(Z):void 0}return Z&&Z.stringValue?Z.stringValue:""};
hSj=function(Z,k,N){lQ0([{settingItemId:k,settingOptionValue:N}]);gz(Z.jU(),a=>{bhj(a,k,N)})};
qg=function(Z){let k=(484).toString();Z&&(k=(483).toString());return k};
lQ0=function(Z){let k=rg();k||(k=new Map);for(const N of Z)k.set(N.settingItemId,N.settingOptionValue);Z=JSON.stringify(Object.fromEntries(k));g.Z_("yt-player-user-settings",Z,2592E3)};
Bkr=function(Z){if(Z.C){const k=Z.options[Z.C];k.element.getAttribute("aria-checked");k.element.setAttribute("aria-checked","false");Z.C=null}};
Oni=function(Z,k){g.Ng(Z.cI);const N={};let a=!1;for(let K=0;K<k.length;K++){var T=k[K];if(T instanceof Dsf)T=new g.y9({J:"div",BD:["ytp-menuitem","ytp-menuitem-section-header"],W:{"aria-disabled":"true"},A:[{J:"div",BD:["ytp-menuitem-label"],Da:"{{label}}"}]},-K,T.label),Z.cI.OH(T,!0);else{let y=Z.options[T];const Q=T===Z.C;Q&&(a=!0);y&&y.priority===-K?(g.UK(Z.options[T],Z.D(T,!0)),delete Z.options[T]):y=Z.N(T,-K,Q);N[T]=y;Z.cI.OH(y,!0)}}a||(Z.C=null);for(const K of Object.keys(Z.options))Z.options[K].dispose();
Z.options=N};
vcG=function(Z,k=!1){msy(Z.cI,k)};
inr=function(Z){var k="Off 10 15 20 30 45 60".split(" ");Z.S.getVideoData()?.isLivePlayback||k.push("End of video");const N=Z.S.getPlaylist();N&&N.listId?.type!=="RD"&&k.push("End of playlist");Z.Y(g.ni(k,Z.L));Z.Sm=g.fK(k,Z.L,Z);k=Z.L("End of video");Z.options[k]&&g.UK(Z.options[k],Z.O)};
mT=function(Z){Z.L=null;Z.j=null;Z.K(CY("over"),Z.Kx);Z.K("touchstart",Z.C);Z.V&&Z.K(CY("down"),Z.Sm)};
s8=function(Z){Z.Y.U(!Z.V)};
CY=function(Z){return window.navigator.msPointerEnabled?`MSPointer${Z.charAt(0).toUpperCase()}${Z.substring(1)}`:`mouse${Z}`};
A1=function(Z){return Z&&gci?ee(Z)||document:document};
wnb=function(Z,k){for(let N=0;N<k.changedTouches.length;N++){const a=k.changedTouches[N];if(a.identifier===Z.j)return a}return null};
$sy=function(Z){gci=Z};
cw=function(Z){var k=Z.api.getVideoData();const N=Z.api.X().experiments;k=!!Z.N&&!k?.isLivePlayback&&!(N.Yl().V.Aq(xs0)&&k?.tH())&&!Z.api.Gc()&&Z.api.getPresentingPlayerType()!==2&&!Z.api.getPlayerStateObject().V(2)&&!g.Vn(Z.api)?.bV()&&!Z.api.isEmbedsShortsMode()&&QOf(Z.api.CN());Z.Y!==k&&(Z.Y=k,Z.Y?Z.V.subscribe("dragstart",Z.O,Z):(Z.V.unsubscribe("dragstart",Z.O,Z),Z.V.unsubscribe("dragmove",Z.G,Z),Z.V.unsubscribe("dragend",Z.L,Z),Pw(Z)))};
G0f=function(Z,k,N,a){N||(a?k.keyCode!==32||k.repeat||Z.D||!Z.Y||Z.delay.XN():Pw(Z))};
Pw=function(Z){Z.delay.stop();Z.V.unsubscribe("dragmove",Z.G,Z);Z.V.unsubscribe("dragend",Z.L,Z);Z.D&&(Z.D=!1,Z.speedmasterUserEdu.L(),Z.api.setPlaybackRate(Z.zt),Z.api.showControls(),Z.dA&&Z.api.pauseVideo(),Z.B("enable_smart_skip_speedmaster_on_web")&&Z.api.publish("speedmasterchanged",!1))};
S2f=function(Z,k,N){for(const a of k){k=Number(a.playbackRelativePosition?.utcTimeMs)/1E3;const T=k+Number(a.duration?.seconds),K=`stations:${N}:${k}`;Z.U.has(K)||(Z.U.add(K),a.onEnter&&(Z.V[K]=a.onEnter),Z.api.addUtcCueRange(K,k,T,N,!1))}};
MxG=function(Z){const k=/codecs="([^"]*)"/.exec(Z.mimeType);return k&&k[1]?k[1]+" ("+Z.itag+")":Z.itag};
Hw=function(Z,k){if(Z.heightPx===-1){var N=null;try{N=g.TU("CANVAS"),Z.U=N.getContext("2d")}catch(y){}if(Z.U){var a=Z.V*Z.sampleCount;Z.D=N;Z.D.width=a;Z.D.style.width=`${a}px`;Z.element.appendChild(Z.D)}else for(Z.sampleCount=Math.floor(Z.sampleCount/4),Z.V*=4,N=0;N<Z.sampleCount;N++)a=g.TU("SPAN"),a.style.width=`${Z.V}px`,a.style.left=`${Z.V*N}px`,Z.element.appendChild(a)}N=Z.element.clientHeight||24;N!==Z.heightPx&&(Z.heightPx=N,Z.U&&(N=(window.devicePixelRatio||1)>1?2:1,Z.D.height=Z.heightPx*
N,Z.D.style.height=`${Z.heightPx}px`,Z.U.scale(1,N)));for(var T of k){k=Z;var K=Z.index;for(N=0;N+2<k.Y.length&&k.Y[N+1]<T;)N++;a=Math.min(1,(T-k.Y[N])/(k.Y[N+1]-k.Y[N]));if(k.U)k.U.fillStyle=k.L[N],k.U.fillRect(K*k.V,0,k.V,k.heightPx),k.U.fillStyle=k.L[N+1],k.U.fillRect(K*k.V,k.heightPx*(1-a),k.V,k.heightPx);else{K=k.element.children[K];const y=window.devicePixelRatio||1;a=Math.min(k.heightPx,Math.round(k.heightPx*a*y)/y)||0;K.style.height=`${a}px`;K.style.backgroundColor=k.L[N+1];K.style.borderTop=
`solid ${k.heightPx-a}px ${k.L[N]}`}Z.index=(Z.index+1)%Z.sampleCount}T=Z.index;Z.U?Z.U.clearRect(T*Z.V,0,Z.V,Z.heightPx):(Z=Z.element.children[T],Z.style.height="0px",Z.style.borderTop="")};
ocN=function(Z,k){const N=!!Z.cI?.oE();Z.cI||(Z.cI=new eSf(Z.api),g.u(Z,Z.cI),g.$n(Z.api,Z.cI.element,4));Z.cI.In(k);const a=OK(Z.api.GZ());a&&a.loaded&&N!==k&&a.sT();k&&Z.api.U6("sfn",{},!0)};
zSb=function(Z){const k=[];Z=Z.match(JAr);for(let N=0;N<Z.length;N++){const a=Z[N]===" "?NaN:Number(Z[N]);k.push(isNaN(a)?Z[N]:a)}return k};
UsG=function(Z,k,N){let a="";for(let T=0;T<Z.length;T++){const K=Z[T];a=typeof K==="number"?a+(K+(k[T]-K)*N):a+K}return a};
bnb=function(Z,k){if(k.J==="path")return k.W.d;if(k.A)for(let a=0;a<k.A.length;a++){var N=k.A[a];if(N&&typeof N!=="string"&&(N=bnb(Z,N)))return N}};
dT=function(Z,k,N){Z.U=k;Z.startTime=(0,g.z)();Z.duration=N;Z.V()};
pnf=function(Z,k,N){N=bnb(Z,N);const a=k.getElementsByTagName("path")[0],T=a.getAttribute("d");if(a.getAttribute("id")){const Q=IE();k=k.getElementsByTagName("use");for(let q=0;q<k.length;q++)k[q].setAttributeNS("http://www.w3.org/1999/xlink","href",`#${Q}`);a.setAttribute("id",Q)}const K=zSb(T),y=zSb(N);dT(Z,Q=>{a.setAttribute("d",UsG(K,y,Q))},200)};
RSy=function(Z,k){return Z.D===void 0?!1:k.seekDirection==="TIMELY_ACTION_TRIGGER_DIRECTION_FORWARD"&&Number(k.seekLengthMilliseconds)===5E3?Z.D===72:k.seekDirection==="TIMELY_ACTION_TRIGGER_DIRECTION_FORWARD"&&Number(k.seekLengthMilliseconds)===1E4?Z.D===74:k.seekDirection==="TIMELY_ACTION_TRIGGER_DIRECTION_BACKWARD"&&Number(k.seekLengthMilliseconds)===5E3?Z.D===71:k.seekDirection==="TIMELY_ACTION_TRIGGER_DIRECTION_BACKWARD"&&Number(k.seekLengthMilliseconds)===1E4?Z.D===73:!1};
M9f=function(Z){Z.timelyActions&&(Z.L=Z.timelyActions.reduce((k,N)=>{if(N.cueRangeId===void 0)return k;k[N.cueRangeId]=0;return k},{}))};
XW=function(Z){Z.zt&&clearTimeout(Z.zt);Z.zt=void 0;Z.Vz=!1};
LY=function(Z,k){if(Z.timelyActions)for(const N of Z.timelyActions)if(N.cueRangeId===k)return N};
ncf=function(Z,k){if((Z=LY(Z,k))&&Z.onCueRangeExit)return f9(Z.onCueRangeExit)};
IQj=function(Z,k){const N=Number(k?.maxVisibleDurationMilliseconds);N&&(XW(Z),Z.zt=setTimeout(()=>{if(Z.V!==void 0&&k?.cueRangeId===Z.V){Z.Vz=!1;var a=ncf(Z,Z.V);a&&g.A7(Z.api,"innertubeCommand",a)}},N))};
Wuy=function(Z){if(Z=Z.getWatchNextResponse())if(Z=g.J(Z.playerOverlays?.playerOverlayRenderer?.timelyActionsOverlayViewModel,jGy),Z?.timelyActions)return Z?.timelyActions.map(k=>g.J(k,EcU)).filter(k=>!!k)};
ZaX=function(Z){Z.menuItem||(Z.menuItem=new Y2G(Z.api,k=>{Z.setVoiceBoostUserPreference(k)},()=>Z.getVoiceBoostUserPreference(),()=>Z.getVoiceBoostState()),g.u(Z,Z.menuItem))};
kwr=function(Z){Z=Z.mH();if(!Z)return!1;Z=g.mm(Z).exp||"";return Z.includes("xpv")||Z.includes("xpe")};
NdG=function(Z){for(const k of g.V9(Z,!0))if(kwr(k))return!0;return!1};
aLG=function(Z,k){for(const a of g.V9(Z,!0))if(kwr(a)){Z=a;var N={potc:"1",pot:k};Z.url&&(Z.url=AP(Z.url,N))}};
Tdf=async function(Z){try{await Z}catch(k){}};
KyX=function(Z){const k=new V$,N={["X-Goog-Api-Key"]:"AIzaSyDyT5W0Jh49F30Pqqtyfdf7pDLFKLJoAnw"};return new Eo(k,Z,()=>N)};
yMG=function(Z){return new Hv(Z)};
QNy=function(Z){Z.U&&(Z.Y=new x2,Z.L.promise.then(()=>{Z.Fa.TF("pot_if");FW(Z)}))};
C5X=function(Z){const k=(Z.B("html5_generate_session_po_token")||Z.B("html5_generate_content_po_token"))&&!Z.useLivingRoomPoToken;try{if(Z.B("html5_use_shared_owl_instance")||Z.api.X().Yl().V.Aq(qj0))rMj(Z);else if(k){Z.Fa.TF("pot_isc");const N=g.Q5(Z.api.X().experiments,"html5_webpo_kaios_defer_timeout_ms");N?(t1(Z),g.fb(()=>{h1(Z)},N)):Z.B("html5_webpo_idle_priority_job")?(t1(Z),g.c9(g.dO(),()=>{h1(Z)})):h1(Z)}}catch(N){N instanceof Error&&g.L9(N)}};
rMj=async function(Z){uu(Z,"swpo_i");t1(Z);FW(Z);var k=await sE(YP());uu(Z,"swpo_co");k=await hgG(k);Z.B("html5_web_po_token_disable_caching")||k.Nv(150);Z.U=k;uu(Z,"swpo_cc");Tdf(k.J5()).then(()=>{Z.V=!0;Z.L.resolve();uu(Z,"swpo_re")});
g.fb(()=>{h1(Z);uu(Z,"swpo_si")},0)};
t1=function(Z){Z.D||(Z.D=lV())};
h1=function(Z){var k=Z.api.X();Z.Fa.TF("pot_ist");Z.U||mlR(Z);Z.B("html5_bandaid_attach_content_po_token")||(Z.B("html5_generate_session_po_token")&&(FW(Z),QNy(Z)),k=g.Q5(k.experiments,"html5_session_po_token_interval_time_ms")||0,k>0&&(Z.C=g.B8(()=>{FW(Z)},k)),Z.j=!0)};
sNy=function(Z){const k=Zf(Z.experiments,"html5_web_po_request_key");return k?k:g.Qw(Z)?"Z1elNkAKLpSR3oPOUMSN":"O43z0dpjhgX20SCx4KAo"};
uu=function(Z,k){Z.B("html5_webpo_bge_ctmp")&&Z.api.U6(k,{hwpo:!!Z.U,hwpor:Z.V})};
FW=async function(Z){if(Z.B("html5_generate_session_po_token")&&!Z.useLivingRoomPoToken){var k=Z.api.X(),N=g.G("EOM_VISITOR_DATA")||g.G("VISITOR_DATA");N=k.lk?k.datasyncId:N;N=Zf(k.experiments,"html5_mock_content_binding_for_session_token")||k.livingRoomPoTokenId||N;k.gV=lu(Z,N)}};
mlR=function(Z){const k=Z.api.X();var N=sNy(k);N=KyX(N);const a=N.lO.bind(N);N.lO=async K=>{K=await a(K);Z.api.U6("itr",{});return K};
let T;try{T=yMG({Tv:N,yA:{maxAttempts:5},eC:{oU:"CLEn",disable:k.experiments.yz("html5_web_po_disable_remote_logging"),ju:bWy(k.experiments),qE:y=>{var Q=AMf.get(y);Q||(Q=new P5f(y),Q=new x_(Q),AMf.set(y,Q));return Q},
ED:Z.B("wpo_dis_lfdms")?0:1E3},AO:g.L9});const K=new cMj({L8:T,Tv:N,onError:g.L9});Tdf(K.J5()).then(()=>{Z.V=!0;Z.L.resolve()});
Z.B("html5_web_po_token_disable_caching")||K.Nv(150);g.u(Z,T);g.u(Z,K);Z.U=K}catch(K){g.L9(K),T?.dispose()}};
lu=function(Z,k){if(!Z.U){if(Z.D)try{return Z.D(k)}catch(N){g.L9(N)}return""}try{Z.Fa.TF(Z.V?"pot_cms":"pot_csms");const N={Cr:!0,MS:!0,yr:k};Z.B("html5_web_po_token_disable_caching")||(N.z3={Bp:k,o9:!0,E7:!0});const a=Z.U.zL(N);Z.Fa.TF(Z.V?"pot_cmf":"pot_csmf");Z.V&&(Z.Y?.resolve(),Z.Y=null,Z.G&&(Z.G=!1,Z.api.app.wA().QJ(!1)));return a}catch(N){return g.L9(N),""}};
Haf=function(Z,k){let N;switch(k){case 2:k="Hide videos";N="Hide recommendations grid";break;default:k="More videos",N="Show recommendations grid"}Z.updateValue("title",k);Z.element.ariaLabel=N;Z.Y.textContent=k};
g.fY=function(Z,k,N){g.D(Z.element,"ytp-suggestion-set",!!k.videoId);var a=k.playlistId;N=k.v9(N?N:"mqdefault.jpg");let T=null,K=null;k instanceof LL&&(k.lengthText?(T=k.lengthText||null,K=k.Cx||null):k.lengthSeconds&&(T=g.Gh(k.lengthSeconds),K=g.Gh(k.lengthSeconds,!0)));const y=!!a;a=y&&E$(a).type==="RD";const Q=k instanceof LL?k.isLivePlayback:null,q=k instanceof LL?k.isUpcoming:null,r=k.author,C=k.shortViewCount,m=k.publishedTimeText,A=[],P=[];r&&A.push(r);C&&(A.push(C),P.push(C));m&&P.push(m);
N={title:k.title,author:r,author_and_views:A.join(" \u2022 "),aria_label:k.ariaLabel||g.DH("Watch $TITLE",{TITLE:k.title}),duration:T,timestamp:K,url:k.Qg(),is_live:Q,is_upcoming:q,is_list:y,is_mix:a,background:N?`background-image: url(${N})`:"",views_and_publish_time:P.join(" \u2022 "),autoplayAlternativeHeader:k.V9};k instanceof Vr&&(N.playlist_length=k.playlistLength);Z.update(N)};
g.dly=function(Z,k){if(Z.suggestion!==k){Z.suggestion=k;var N=Z.api.X(),a="hqdefault.jpg";k.v9("sddefault.jpg")&&(a="sddefault.jpg");g.fY(Z,k,a);g.PQ(N)&&!Z.api.B("web_player_log_click_before_generating_ve_conversion_params")&&(N=k.Qg(),a={},g.H3(Z.api,"addEmbedsConversionTrackingParams",[a]),N=g.mW(N,a),Z.updateValue("url",N));(k=(k=k.sessionData)&&k.itct)&&Z.api.setTrackingParams(Z.element,k)}};
Xb0=function(Z,k){let N="";const a=g.fe(Z.player,"More videos","v");k===2?N="Hide videos":k===1&&(N="More videos");Z.element.setAttribute("title",a);Z.element.setAttribute("data-title-no-tooltip",N);Z.element.setAttribute("aria-label",N);if(k=Z.Lp("ytp-fullscreen-grid-hover-overlay"))k.setAttribute("title",a),k.setAttribute("data-title-no-tooltip",N),k.setAttribute("aria-label",N);!Z.G&&(k=Z.Lp("ytp-fullscreen-grid-expand-button"))&&(k.setAttribute("title",a),k.setAttribute("data-title-no-tooltip",
N),k.setAttribute("aria-label",N));Z.player.qj()};
O8=function(Z){const k=Bw(Z);g.D(Z.api.getRootNode(),"ytp-full-bleed-player",k);Z.zt&&g.jA(Z.zt,k);Z.playerOverlayVideoDetailsRenderer&&g.jA(Z.playerOverlayVideoDetailsRenderer,k);Z.Y&&DO(Z)};
iu=function(Z,k,N){Z.D=k;Z.U?.Qn(k,N);Z.N?.Qn(k);Z.V=0;vw(Z);Lyy(Z,k)};
uLb=function(Z,k,N){k.K(N,"keyboardserviceglobalkeydown",(a,T)=>{Z.Y&&a.keyCode===86&&!a.repeat&&Z.D!==0&&(T&&(T.IK=!0),Z.O("INTERACTION_LOGGING_GESTURE_TYPE_KEY_PRESS"))});
k.K(Z.api.getRootNode(),"wheel",a=>{if(!Z.Vz&&Z.Y&&Z.U?.element&&!Z.api.getPlayerStateObject().V(2)&&Z.D!==0&&Bw(Z))if(g.jX(Z.api.getRootNode(),"ytp-grid-scrolling"),Z.L===0&&(Z.L=window.innerHeight),Z.D===1)Z.L!==0&&(Z.V+=a.deltaY/Z.L,Z.V=g.u0(Z.V,0,.7),vw(Z),Vpy(Z,Z.j/Z.L+Z.V>=.7,2));else if(Z.D===2){const T=a.deltaY<0,K=Z.U?.Y?.scrollTop===0,y=Z.V!==0;T&&K||y&&!T?Z.L!==0&&(Z.V=Math.max(0,Z.V-a.deltaY/Z.L),vw(Z),Vpy(Z,Z.j/Z.L+Math.abs(Z.V)>=.7,1)):Z.V!==0&&(Z.V=0,vw(Z))}},Z,!0);
k.K(N,"standardControlsInitialized",()=>{if(!Z.U){Z.U=new Fy0(Z.api,Z.Rq.bind(Z));Z.FS&&(Z.N=new tpf(Z.api),g.u(Z,Z.N),Z.N.element.setAttribute("data-overlay-order","12"),Z.api.B0(Z.N.element,4),Z.N.listen("click",Z.O,Z));g.u(Z,Z.U);var a=Z.api.getRootNode().querySelector(".ytp-chrome-bottom");a&&a.parentNode&&a.parentNode.insertBefore(Z.U.element,a.nextSibling);h1f(Z)}});
k.K(N,"presentingplayerstatechange",()=>{DO(Z)});
k.K(N,"autonavvisibility",()=>{DO(Z)});
Z.api.CN().subscribe("visibilitystatechange",()=>{DO(Z)});
Lyy(Z,Z.D)};
DO=function(Z){if(Z.Y)if(g.Wp(Z.api.getRootNode(),"ytp-grid-scrolling"),Z.api.getPresentingPlayerType()===2||Z.api.Gc()||Z.api.isMinimized())iu(Z,0);else{var k=Z.api.getPlayerStateObject().V(2);if(k)iu(Z,2,"INTERACTION_LOGGING_GESTURE_TYPE_AUTOMATED");else if(Z.isEnded&&!k){const N=Bw(Z)?1:0;Z.isEnded=k;iu(Z,N)}else Bw(Z)?Z.D!==2&&iu(Z,1):iu(Z,0);Z.isEnded=k}};
Lyy=function(Z,k){const N=Z.api.getRootNode();g.D(N,"ytp-fullscreen-grid-peeking",k===1);g.D(N,"ytp-fullscreen-grid-active",k===2);k===1&&h1f(Z)};
h1f=function(Z){const k=Z.api.getRootNode();var N=Z.api.getPlayerStateObject().V(256)||Z.api.getPlayerStateObject().V(32)||Z.api.getPlayerStateObject().V(16)?Z.j:Z.vD&&Z.api.getPlayerStateObject().isPaused()?(Z.U?.element.clientWidth||0)*.5625/3*Z.Sm||Z.xW:Z.xW;Z.j=N;k.style.setProperty("--ytp-grid-peek-height",`${Z.j}px`);g.D(k,"ytp-disable-bottom-gradient",Z.j<=12&&Z.G===0)};
Bw=function(Z){return Z.api.isFullscreen()||Z.tq&&Z.api.MA()};
vw=function(Z){Z.V===0&&Z.api.getRootNode().style.setProperty("--ytp-grid-scroll-percentage","0");requestAnimationFrame(()=>{const k=Z.V-Z.G;let N=k;Z.V!==0&&(N=g.u0(k,-.01,.01));Z.G+=N;Z.api.getRootNode().style.setProperty("--ytp-grid-scroll-percentage",`${Z.G.toString()}`);Z.G!==Z.V&&vw(Z)})};
Vpy=function(Z,k,N){Z.C&&clearTimeout(Z.C);Z.V===0&&g.Wp(Z.api.getRootNode(),"ytp-grid-scrolling");k?lL0(Z,N):Z.V<.1&&(Z.C=window.setTimeout(()=>{lL0(Z)},1E3))};
lL0=function(Z,k){Z.C&&(clearTimeout(Z.C),Z.C=null);Z.L=0;Z.Y&&Z.D!==0&&(k?iu(Z,k):Math.abs(Z.V)>=.15&&Z.O("INTERACTION_LOGGING_GESTURE_TYPE_SCROLL_BEGAN_DRAGGING"),Z.V=0,vw(Z),g.Wp(Z.api.getRootNode(),"ytp-grid-scrolling"))};
gT=function(Z,k,N){uJ("pbs",k??(0,g.z)(),N??Z.timerName)};
fLU=function(Z,k,N){var a=g.s$(k.Jq)&&!k.Jq.G;if(k.Jq.SK&&(cQ(k.Jq)||k.Jq.zt==="shortspage"||h4(k.Jq)||a)&&!Z.D){Z.D=!0;Z.G=k.clientPlaybackNonce;g.G("TIMING_ACTION")||YA("TIMING_ACTION",Z.kW.csiPageType);Z.kW.csiServiceName&&YA("CSI_SERVICE_NAME",Z.kW.csiServiceName);if(Z.V){a=Z.V.tQ();for(var T of Object.keys(a))uJ(T,a[T],Z.timerName);T=g.ai(h4f)(Z.V.TW);g.lJ(T,Z.timerName);T=Z.V;T.U={};T.TW={}}g.lJ({playerInfo:{visibilityState:g.ai(tfR)()},playerType:"LATENCY_PLAYER_HTML5"},Z.timerName);Z.L!==
k.clientPlaybackNonce||Number.isNaN(Z.U)||(vX("_start",Z.timerName)?N=g.ai(dV)("_start",Z.timerName)+Z.U:g.L9(new g.jD("attempted to log gapless pbs before CSI timeline started",{cpn:k.clientPlaybackNonce})));!N||vX("pbs",Z.timerName)||k.A6||gT(Z,N)}};
wT=function(Z){$Yf();w$f();Z.timerName=""};
Bdi=function(Z){if(Z.V){var k=Z.V;k.U={};k.TW={}}Z.D=!1;Z.L=void 0;Z.U=NaN};
$J=function(Z){return!!(Z.playlist||Z.list||Z.api)};
g.Gx=function(Z,k,N,a){k=k!==void 0?k:Z.index;k=Z.items&&k in Z.items?Z.items[Z.order[k]]:null;let T=null;k&&(N&&(k.autoplay="1"),a&&(k.autonav="1"),T=new g.xJ(Z.Jq,k),g.u(Z,T),T.fN=!0,T.startSeconds=Z.startSeconds||T.clipStart||0,Z.listId&&(T.playlistId=Z.listId.toString()));return T};
DlN=function(Z,k){if(k.video&&k.video.length){Z.title=k.title||"";Z.description=k.description;Z.views=k.views;Z.likes=k.likes;Z.dislikes=k.dislikes;Z.author=k.author||"";var N=k.loop;N&&(Z.loop=N);N=g.Gx(Z);Z.items=[];for(const a of k.video)a&&(a.video_id=a.encrypted_id,Z.items.push(a));Z.length=Z.items.length;(k=k.index)?Z.index=k:Z.findIndex(N);Z.setShuffle(!1);Z.loaded=!0;Z.U++;Z.V&&Z.V()}};
Oai=function(Z){const k=Z.index+1;return k>=Z.length?0:k};
vRr=function(Z){const k=Z.index-1;return k<0?Z.length-1:k};
S0=function(Z,k){Z.index=g.u0(k,0,Z.length-1);Z.startSeconds=0};
wbG=async function(Z,k){const N=g.bJ();var a=Z.X();const T={context:g.sK(Z),playbackContext:{contentPlaybackContext:{ancestorOrigins:a.ancestorOrigins}}};var K=a.getWebPlayerContextConfig();K?.encryptedHostFlags&&(T.playbackContext.contentPlaybackContext.encryptedHostFlags=K.encryptedHostFlags);K?.hideInfo&&(T.playerParams={showinfo:!1});K=a.embedConfig;const y=Z.PG;var Q=k.docid||k.video_id||k.videoId||k.id;if(!Q){Q=k.raw_embedded_player_response;if(!Q){var q=k.embedded_player_response;q&&(Q=JSON.parse(q))}Q=
Q?g.J(Q?.embedPreview?.thumbnailPreviewRenderer?.playButton?.buttonRenderer?.navigationEndpoint,g.d9)?.videoId||null:null}Q=Q?Q:void 0;q=Z.playlistId?Z.playlistId:k.list;const r=k.listType;if(q){var C;r==="user_uploads"?C={username:q}:C={playlistId:q};iaX(K,y,Q,k,C,a.experiments);T.playlistRequest=C}else k.playlist?(C={templistVideoIds:k.playlist.toString().split(",")},iaX(K,y,Q,k,C,a.experiments),T.playlistRequest=C):Q&&(C={videoId:Q},y&&a.B("embeds_enable_per_video_embed_config")?C.serializedThirdPartyEmbedConfig=
y:K&&(C.serializedThirdPartyEmbedConfig=K),T.singleVideoRequest=C);a=g.kP(gRf);try{const m=await g.xP(N,T,a),A=Z.X();k.raw_embedded_player_response=m;A.dA=$q(k,g.PQ(A));A.D=A.dA==="EMBEDDED_PLAYER_MODE_PFL";m&&m.trackingParams&&Ed(m.trackingParams);return new g.xJ(A,k)}catch(m){return m instanceof Error||(m=Error("b259802748")),g.b(m),Z}};
iaX=function(Z,k,N,a,T,K){a.index&&(T.playlistIndex=String(Number(a.index)+1));T.videoId=N?N:"";k&&K.yz("embeds_enable_per_video_embed_config")?T.serializedThirdPartyEmbedConfig=k:Z&&(T.serializedThirdPartyEmbedConfig=Z)};
g.o1=function(Z,k){e0.get(Z);e0.set(Z,k)};
g.V9=function(Z,k){return k?Z.V.concat(Z.U):Z.V};
$lf=function(Z,k){g.ZD(k,N=>Z.equals(N))||k.push(Z)};
g.J1=function(Z,k){switch(k.kind){case "asr":$lf(k,Z.U);break;default:$lf(k,Z.V)}};
g.xlU=function(Z,k){return k.X().B("html5_use_hls_native_captions")&&g.v9&&Z.Rn()&&!!Z.U?.D()};
g.zx=function(Z,k){return Z.X().B("safari_live_drm_captions_fix")&&Z.getVideoData()?.kT()?!1:g.KA(Z.X())&&!k.isManifestless};
g.U8=function(Z,k){return O9(Z.info.mimeType)?k?Z.info.itag===k:!0:!1};
g.GwN=function(Z,k){if(Z.V!=null&&g.zx(k,Z.V)&&Z.V.V.rawcc!=null)return!0;if(!Z.Rn())return!1;k=!!Z.V&&Z.V.isManifestless&&Object.values(Z.V.V).some(N=>g.U8(N,"386"));
Z=!!Z.V&&!Z.V.isManifestless&&g.rNf(Z.V);return k||Z};
h6f=function(Z){if(Z.S.X().MX)return Z.Es.get("ux")};
bu=function(Z){return Z.Es.get("ad")};
g.pY=function(Z){return Z.Es.get("captions")};
g.R1=function(Z){return Z.Es.get("annotations_module")};
OK=function(Z){if(Z.S.X().Vg)return Z.Es.get("remote")};
Mg=function(Z){return Z.Es.get("creatorendscreen")};
nY=function(Z){if(LQ(Z.S.X()))return Z.Es.get("kids")};
g.gv=function(Z){return Z.Es.get("webgl")};
I1=function(Z){if(Z.S.X().KN)return Z.Es.get("offline")};
SjN=function(Z){if(Z.S.X().showMiniplayerUiWhenMinimized)return Z.Es.get("miniplayer")};
e1y=function(Z,k){Z.D=k};
oRi=function(Z){const k=Z.S.getVideoData();return g.xlU(k,Z.S)||!!k.HA||!!k.captionTracks.length||g.GwN(k,Z.S)};
j0=function(Z,k,N=!1,a=!1,T){var K;let y=Z.Es.get(k);if(!y||a)if(T||(T=()=>{j0(Z,k,N,a)}),K||(K=()=>{E8(Z,k)}),y=y||JMb(Z,k,z1i(Z,k),T,K))Z.Es.set(k,y),y.create(),Z.S.publish("modulecreated",k),N&&g.Xd(Z.S,"onApiChange")};
Ww=function(Z){if(Z.S.X().D)return!1;if(Z=Z.S.getVideoData({playerType:1}).getPlayerResponse()){const k=Z.adPlacements;if(k)for(let N=0;N<k.length;N++)if(k[N].adPlacementRenderer)return!0;if(Z.adSlots)return!0}return!1};
YJ=function(Z){return Z.S.X().B("html5_allow_asmjs")||Z.S.X().Yl().V.Aq(Uly)};
baG=function(Z){if(Z.S.isEmbedsShortsMode())return!1;Z=Z.S;const k=Z.X();if(k.D||k.getWebPlayerContextConfig()?.embedsEnableEmc3ds||k.controlsType==="3")return!1;if(k.playerStyle==="creator-endscreen-editor")return!0;Z=Z.getVideoData();return!!Z&&(!!g.EBy(Z)||!!g.Wki(Z))};
g.pbU=function(Z){var k=Z.S.X();if(k.D||h4(k)||k.G||!k.bq&&!k.j9)return!1;var N=Z.S.getPresentingPlayerType();if(N===2||N===3)return!1;Z=Z.S.getVideoData();if(!Z)return!1;N=!Z.isLiveDefaultBroadcast||k.B("allow_poltergust_autoplay");N=Z.isLivePlayback&&(!k.B("allow_live_autoplay")||!N);k=Z.isLivePlayback&&k.B("allow_live_autoplay_on_mweb");return!N||k};
R1y=function(Z){const k=Z.S.getVideoData();Z=Z.S.X();var N=g.uly();const a=Z.B("enable_spherical_kabuki"),T=g.eL(Z);if(g.Zd(k))return N||a||T;if(g.WZ(k))return T||N||a;if(g.Yz(k))return T||N||!1;if(g.oD(k))return T||!1;N=k.U&&k.U.video&&k.U.video.isHdr();return T&&!g.RD(k)&&!N&&Z.B("enable_webgl_noop")};
z1i=function(Z,k){switch(k){case "ad":return Ww(Z);case "annotations_module":return Z.S.isEmbedsShortsMode()?Z=!1:(k=Z.S,Z=k.X(),k=k.getVideoData(),Z=Z.D||k.Jy||Z.controlsType==="3"?!1:Z.vD.isEmpty()&&Z.playerStyle!=="annotation-editor"&&Z.playerStyle!=="live-dashboard"?!!k.fI||!!k.l9()||!!g.kn(k):!0),Z;case "asmjs":return YJ(Z);case "creatorendscreen":return baG(Z);case "embed":return g.PQ(Z.S.X());case "endscreen":return g.pbU(Z);case "heartbeat":return Z.gN();case "kids":return LQ(Z.S.X());case "remote":return Z.S.X().Vg;
case "miniplayer":return Z.S.X().showMiniplayerUiWhenMinimized;case "offline":return Z.S.X().KN;case "captions":return oRi(Z);case "unplugged":return g.CQ(Z.S.X());case "ux":return Z.S.X().MX;case "webgl":return R1y(Z);case "ypc":return Z.ZV();default:return g.b(Error(`Module descriptor ${k} does not match`)),!1}};
E8=function(Z,k){k=Mpy[k];for(const N of k)Z.S.GP(N)};
JMb=function(Z,k,N,a,T){try{if(N){const K=e0.get(k);if(K)return new K(Z.S);nRi(Z,k,a,T)}else E8(Z,k)}catch(K){E8(Z,k),g.b(K)}return null};
nRi=function(Z,k,N,a){if(Z.j){var T=ILR[k];k=Z.j+T;Z.Y&&(k+=`?cb=${Z.Y}`);jNf(Z,k,()=>{Z.G.add(T);N.call(Z)},a)}};
ERG=async function(Z){var k=Z.Es.get("asmjs");if(k)return k;k=e0.get("asmjs")??await new Promise((N,a)=>{nRi(Z,"asmjs",()=>{const T=e0.get("asmjs");T?N(T):a("cannot load module asmjs")},a)});
if(!k)return Promise.reject("cannot load module asmjs");k=new k(Z.S);Z.Es.set("asmjs",k);k.create();return k};
ZW=function(Z){var k=Z.S.getVideoData();if(Z=k.B("web_player_defer_ad")){if(g.KK(k.Wo,"ad")||gBX(k)||k.enableServerStitchedDai)var N=!1;else{Z=k.startSeconds;var a=k.playerResponse?.adPlacements;if(k=a){k=Number.MAX_VALUE;for(N of a)if(a=N.adPlacementRenderer){const T=a.config?.adPlacementConfig;T?.kind==="AD_PLACEMENT_KIND_MILLISECONDS"&&(a=(Number(T?.adTimeOffset?.offsetStartMilliseconds)||0)-Number(a.renderer?.adBreakServiceRenderer?.prefetchMilliseconds||0),a<k&&(k=a))}k=k-5E3<=Z*1E3}N=k?!1:!0}Z=
N}return Z};
Wyf=async function(Z){return await ERG(Z)};
Yjy=function(Z){const k=Z.S.getVideoData();let N=Z.Vz&&!k.isInlinePlaybackNoAd;Z.S.B("html5_defer_modules_on_ads_only")&&!k.isAd()&&(N=!1);return N};
kv=function(Z){ZW(Z)&&Z.L();Yjy(Z)&&(j0(Z,"captions",!0),j0(Z,"endscreen"),Z.V(),j0(Z,"creatorendscreen",!0))};
NI=function(Z,k,N){for(const a of Z8j){const T=Z.Es.get(a);T&&(N||T.CD(k))&&(g.nM(T),Z.Es.delete(a))}Z.S.publish("modulesDestroyed",k)};
kvU=function(Z){return i_(()=>Z.Es.get("asmjs")??Wyf(Z))};
jNf=function(Z,k,N,a){var T=g.Uf("SCRIPT");let K=!1,y;for(let P=0;P<T.length;P++){const d=T[P];if(d.src===k||d.getAttribute("data-original-src")===k)y=d}y||(y=g.TU("SCRIPT"),y.setAttribute("data-original-src",k),K=!0);const Q=()=>{Z.jm()||N.call(Z)},q=()=>{Z.jm()||a.call(Z)},r=y.onload;
y.onload=P=>{lh(Q);r&&r.apply(window,[P])};
const C=y.onerror;y.onerror=P=>{if(Math.random()<.01){const d=new g.jD("Unable to load player module",k,document.location&&document.location.origin);g.b(d)}lh(q);C&&C(P)};
const m=y,A=m.onreadystatechange;m.onreadystatechange=P=>{switch(m.readyState){case "loaded":case "complete":lh(Q)}A&&A(P)};
K&&((T=Z.S.X().cspNonce)&&y.setAttribute("nonce",T),g.ED(y,g.IW(k)),T=g.Uf("HEAD")[0]||document.body,T.insertBefore(y,T.firstChild),Z.addOnDisposeCallback(()=>{y.parentNode&&y.parentNode.removeChild(y)}))};
T1=function(Z,k,N){Z.jm();const a=aQ(Z);N?(Z.U|=k,k&1&&Z.N.start(),k&2&&Z.Vz.start(),k&2048&&Z.O.start()):(Z.U&=~k,k&1&&Z.N.stop(),k&2&&Z.Vz.stop(),k&2048&&Z.O.stop(),k&512&&Z.zt.stop());Z.U&512&&!(Z.U&128)&&Z.zt.XN(Z.vD);k=aQ(Z);a!==k&&Z.publish("autohideupdate",k)};
NB0=function(Z){T1(Z,4,!1);Z.j&&(Z.V.Ce(Z.j),Z.j=null,Z.D=Z.V.K(Z.target,"mouseover",Z.Kx));Z.D&&(Z.V.Ce(Z.D),Z.D=Z.V.K(Z.target,"mouseover",Z.Kx))};
aQ=function(Z){let k=Z.U;Z.api.B("allow_autohide_on_paused_videos")&&(k&=-129);Z.api.B("web_player_default_autohide")&&(k&=-513);return!k};
anR=function(Z,...k){var N=Z.api.X();for(const K of k){if(!K||K instanceof g.xJ&&!K.videoId)continue;var a=Z.api.fF().getPlayerSize();var T=g.lS();k=a.width*T;T*=a.height;if(k>1280||T>720)if(a=K.v9("maxresdefault.jpg"))break;if(k>640||T>480)if(a=K.v9("maxresdefault.jpg"))break;if(k>320||T>180)if(a=K.v9("sddefault.jpg")||K.v9("hqdefault.jpg")||K.v9("mqdefault.jpg"))break;if(a=K.v9("default.jpg"))break}g.O$(N)&&(N=new Image,N.addEventListener("load",()=>{z4r()}),N.src=a?a:"",Z.api.tQ().tick("ftr"));
Z.L.style.backgroundImage=a?`url(${a})`:""};
TBf=function(Z){for(let k=0;k<Z.keys.length;k++)Z.Ce(Z.keys[k]);Z.keys=[]};
y_=function(Z,k,N,a=!1,T=!1,K,y=!0){T||(T=Z.api.X().Y);const Q=Z.api.getVideoData();k=g.DH(g.Kz[k]||"",a?{CPN:Q.clientPlaybackNonce}:{}).split(/\$(BEGIN|END)_LINK/);a=[];K&&a.push({J:"h2",Da:K});a.push(k[0]);y&&a.push({J:"br"});a.push({J:"a",W:{href:N,target:T?"_blank":null},Z:"ytp-error-link",Da:k[2]});Z.D=!0;a.push(k[4]);return{J:"span",A:a}};
g.Q_=function(Z){Z=Z.split(KMr);const k=[];for(let N=0;N<Z.length;N+=3){const a=Z[N++].split("\n");k.push(a[0]);for(let T=1;T<a.length;T++)k.push({J:"br"}),k.push(a[T]);N<Z.length&&k.push({J:"a",W:{href:Z[N],target:Z[N+1]},Da:Z[N+2]})}return{J:"span",A:k}};
ydf=function(Z,k){const N=Z.element.getElementsByTagName("a");for(let a=0;a<N.length;a++){const T=Z.K(N[a],"click",k);Z.keys.push(T)}};
qI=function(Z,k,N,a){const T=Number(k.getAttribute("data-overlay-order"))||0;let K=0,y=null;for(const Q of N.children){if(a&&Q.classList.contains("ytp-overlay-inline-container")){y=Q;break}if(T<(Number(Q.getAttribute("data-overlay-order"))||0))break;K++}y?qI(Z,k,y,!1):a?(Z=document.createElement("div"),Z.classList.add("ytp-overlay-inline-container"),Z.setAttribute("data-overlay-order",`${T}`),y=Z,y.appendChild(k),qi(N,y,K)):qi(N,k,K)};
qYG=function(Z,k){const N=IHy(k),a=j7f(k);k.Jl&&Z.S.GC()||(Z.V||Z.S.B("enable_paid_content_overlay_bugfix")?k.videoId&&k.videoId!==Z.videoId&&(Z.V?.fH(),!Z.S.B("enable_paid_content_overlay_bugfix")||N&&a?(Z.videoId=k.videoId,Z.Y=!!a,Z.Y&&N&&QRU(Z,a,N,k)):Z.Y=!1):N&&a&&!Z.S.B("enable_paid_content_overlay_bugfix")&&QRU(Z,a,N,k))};
rdX=function(Z,k){Z.V&&(k.V(8)&&Z.Y?(Z.Y=!1,Z.U?Z.U.start():Z.Iv()):(k.V(2)||k.V(64))&&Z.videoId&&(Z.videoId=null,Z.U&&Z.U.stop()))};
QRU=function(Z,k,N,a){Z.V&&Z.V.dispose();Z.V=new g.Uc(Z.cA,k,Z);g.u(Z,Z.V);a=MO(a);k=a?.navigationEndpoint;a=a?.icon?.iconType;let T=g.J(k,g.Fh)?.url;Z.S.setTrackingParams(Z.element,k?.clickTrackingParams||null);k&&!T?(Z.innertubeCommand=k,T="#!"):Z.innertubeCommand=null;Z.D.update({href:T??"#",text:N,icon:a==="MONEY_HAND"?{J:"svg",W:{fill:"none",height:"100%",viewBox:"0 0 24 24",width:"100%"},A:[{J:"path",W:{d:"M6 9H5V5V4H6H19V5H6V9ZM21.72 16.04C21.56 16.8 21.15 17.5 20.55 18.05C20.47 18.13 18.42 20.01 14.03 20.01C13.85 20.01 13.67 20.01 13.48 20C11.3 19.92 8.51 19.23 5.4 18H2V10H5H6H7V6H21V13H16.72C16.37 13.59 15.74 14 15 14H12.7C13.01 14.46 13.56 15 14.5 15H15.02C16.07 15 17.1 14.64 17.92 13.98C18.82 13.26 20.03 13.22 20.91 13.84C21.58 14.32 21.9 15.19 21.72 16.04ZM15 10C15 9.45 14.55 9 14 9C13.45 9 13 9.45 13 10H15ZM20 11C19.45 11 19 11.45 19 12H20V11ZM19 7C19 7.55 19.45 8 20 8V7H19ZM8 8C8.55 8 9 7.55 9 7H8V8ZM8 10H12C12 8.9 12.9 8 14 8C15.1 8 16 8.9 16 10V10.28C16.59 10.63 17 11.26 17 12H18C18 10.9 18.9 10 20 10V9C18.9 9 18 8.1 18 7H10C10 8.1 9.1 9 8 9V10ZM5 13.5V11H3V17H5V13.5ZM20.33 14.66C19.81 14.29 19.1 14.31 18.6 14.71C17.55 15.56 16.29 16 15.02 16H14.5C12.62 16 11.67 14.46 11.43 13.64L11.24 13H15C15.55 13 16 12.55 16 12C16 11.45 15.55 11 15 11H6V13.5V17.16C8.9 18.29 11.5 18.93 13.52 19C17.85 19.15 19.85 17.34 19.87 17.32C20.33 16.9 20.62 16.4 20.74 15.84C20.84 15.37 20.68 14.91 20.33 14.66Z",
fill:"white"}}]}:null,chevron:T||Z.innertubeCommand?g.aJ():null})};
CPr=function(Z){Z.V||(Z.V=!0,Z.api.logVisibility(Z.element,!0))};
mXf=function(Z){const k=Pe()&&CE()>=67&&!Z.api.X().j;Z=Z.api.X().disableOrganicUi;return!g.A5("tizen")&&!oZ&&!k&&!Z};
sRN=function(Z,k){if(!k)return!1;var N=Z.api.TM();if(N.G()&&(N=N.lq())&&g.C1(N,k))return N.controls;for(N=0;N<Z.DE.length;N++)if(g.C1(Z.DE[N],k))return!1;for(const a of Z.Mh)if(g.I3(k,a))return!1;return k===Z.api.getRootNode()?!1:!0};
AdN=function(Z){const k=Z.api.getPresentingPlayerType()===2&&(Z.api.fF().oe||Z.api.X().disableOrganicUi)&&Z.api.X().U&&rN&&IO>=11;Z=Z.api.X().j&&rN;return!(!k&&!Z)};
mN=function(Z,k){Z.XI.qm();if(Z.kN&&Z.Au)Z.Au=!1;else if(!Z.api.X().Sm&&!Z.t0()){const N=Z.api.getPlayerStateObject();N.V(2)&&g.Dd(Z.api)||Z.iD(N);k&&Cz(Z,k)?PPj(Z):!Z.api.X().hq||N.isCued()||N.V(1024)?Z.KD():Z.qB.isActive()?(Z.FC(),Z.qB.stop()):Z.qB.start()}};
sU=function(Z,k){return!Z.api.isInline()&&!sRN(Z,jr(k))&&g.SM(k)};
AV=function(Z,k){return Z.api.getVideoData()?.mutedAutoplay&&k.target?.className?.includes("ytp-info-panel")?!1:g.SM(k)&&Z.api.isMutedByMutedAutoplay()?(Z.api.unMute(),Z.api.getPresentingPlayerType()===2&&Z.api.playVideo(),k=Z.api.getPlayerStateObject(),!k.V(4)||k.V(8)||k.V(2)||Z.KD(),!0):!1};
Cz=function(Z,k){if(!Z.api.X().B("web_player_invisible_fullscreen_button"))return!1;var N=Z.api.getRootNode().getBoundingClientRect();let a,T;k.targetTouches&&k.targetTouches.length?(a=k.targetTouches[0].clientX,T=k.targetTouches[0].clientY):k.clientX!==void 0&&(a=k.clientX,T=k.clientY);return a!==void 0&&T!==void 0&&(k=a-N.left,N=T-N.top,Z=Z.api.getPlayerSize(),N>=Z.height-40&&k>=Z.width-40)?!0:!1};
PPj=function(Z){if(Z.api.X().hq&&Z.api.getPresentingPlayerType()!==3)try{Z.api.toggleFullscreen().catch(k=>{Z.GG(k)}),Z.api.B("web_player_fullscreen_double_click_ve")&&Z.api.logClick(Z.api.fF().element)}catch(k){Z.GG(k)}};
cdf=function(Z,k,N){Z.api.isFullscreen()?N<1-k&&Z.api.toggleFullscreen():N>1+k&&Z.api.toggleFullscreen()};
PT=function(Z,k,N="",a=""){Z.updateValue("label",N);Z.updateValue("icon",k);Z.V.fH();Z.U.start();Z.updateValue("title",a);g.D(Z.element,"ytp-bezel-text-hide",!a)};
cT=function(Z,k,N){let a;k<=0?(N=dm(),k="muted",a=0):(N=N?{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},A:[{J:"path",Rv:!0,W:{d:"M8,21 L12,21 L17,26 L17,10 L12,15 L8,15 L8,21 Z M19,14 L19,22 C20.48,21.32 21.5,19.77 21.5,18 C21.5,16.26 20.48,14.74 19,14 Z",fill:"#fff"}}]}:{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},A:[{J:"path",Rv:!0,W:{d:"M8,21 L12,21 L17,26 L17,10 L12,15 L8,15 L8,21 Z M19,14 L19,22 C20.48,21.32 21.5,19.77 21.5,18 C21.5,16.26 20.48,14.74 19,14 Z M19,11.29 C21.89,12.15 24,14.83 24,18 C24,21.17 21.89,23.85 19,24.71 L19,26.77 C23.01,25.86 26,22.28 26,18 C26,13.72 23.01,10.14 19,9.23 L19,11.29 Z",
fill:"#fff"}}]},a=Math.floor(k),k=a+"volume");PT(Z,N,k,`${a}%`)};
H8X=function(Z,k){k=k?{J:"svg",W:{fill:"currentColor",height:"100%",viewBox:"0 0 36 36",width:"100%"},A:[{J:"path",W:{d:"M 26.00 13.37 c .00 -1.12 -1.15 -1.77 -1.98 -1.11 L 17.66 17.33 V 13.37 c .00 -1.12 -1.15 -1.77 -1.98 -1.11 L 8.50 18.00 l 7.18 5.73 c .82 .65 1.98 .01 1.98 -1.11 v -3.96 l 6.34 5.06 c .82 .66 1.98 .01 1.98 -1.10 V 13.37 Z"}}]}:$Cy();const N=Z.S.getPlaybackRate(),a=g.DH("Speed is $RATE",{RATE:String(N)});PT(Z,k,a,N+"x")};
dXU=function(Z,k){k=k?"Subtitles/closed captions on":"Subtitles/closed captions off";PT(Z,pz0(Z.S),k)};
XDR=function(Z,k){Z.V=k;Z.element.classList.toggle(HT.NOTIFICATIONS_ENABLED,Z.V);const N=Z.api.getVideoData();N?(k=k?N.xw:N.oR)?(Z=Z.api.jU())?$P(Z,k):g.b(Error("No innertube service available when updating notification preferences.")):g.b(Error("No update preferences command available.")):g.b(Error("No video data when updating notification preferences."))};
dN=function(Z,k,N){const a=document.location.protocol;Z=pBf(`${a}//${Z}/signin?context=popup`,"feature",k,"next",`${a}//${location.hostname}/post_login`);LMr(Z,N)};
LMr=function(Z,k){if(Z=g.p5(window,Z,"loginPopup","width=800,height=600,resizable=yes,scrollbars=yes"))ciN(()=>{k()}),Z.moveTo((screen.width-800)/2,(screen.height-600)/2)};
h7b=function(Z){const k=Z.api.X();V_b(Z);Z.updateValue("flyoutUnfocusable","true");Z.updateValue("channelTitleFocusable","-1");Z.updateValue("shouldHideExpandedTitleForA11y","true");Z.updateValue("shouldHideExpandedSubtitleForA11y","true");k.U||k.Rq||(Z.K(Z.channel,"mouseenter",Z.G),Z.K(Z.channel,"mouseleave",Z.L),Z.K(Z.channel,"focusin",Z.G),Z.K(Z.channel,"focusout",N=>{Z.channel.contains(N.relatedTarget)||Z.L()}));
Z.D=new g.Uc(()=>{Z.isExpanded()&&(Z.api.logVisibility(Z.channelName,!1),Z.subscribeButton&&(Z.subscribeButton.hide(),Z.api.logVisibility(Z.subscribeButton.element,!1)),Z.V&&(Z.V.hide(),Z.api.logVisibility(Z.V.element,!1)),Z.channel.classList.remove("ytp-title-expanded"),Z.channel.classList.add("ytp-title-show-collapsed"))},500);
g.u(Z,Z.D);Z.K(Z.channel,FMr,()=>{t_0(Z)});
Z.K(Z.api,"onHideControls",Z.j);Z.K(Z.api,"appresize",Z.j);Z.K(Z.api,"fullscreentoggled",Z.j)};
Xy=function(Z){var k=Z.api.X();const N=Z.api.getVideoData();let a=g.$2(k)+N.Rq;g.rv(N)&&(a="https://music.youtube.com"+N.Rq);if(!g.PQ(k))return a;k={};g.H3(Z.api,"addEmbedsConversionTrackingParams",[k]);return g.mW(a,k)};
u2y=function(Z){const k=Z.api.getPlayerSize();return g.PQ(Z.api.X())&&k.width>=524};
V_b=function(Z){if(!Z.api.X().xl){var k=Z.api.getVideoData(),N=new g.Lz("Subscribe",null,"Subscribed",null,!0,!1,k.WZ,k.subscribed,"channel_avatar",null,Z.api,!0);Z.api.createServerVe(N.element,Z);Z.api.setTrackingParams(N.element,k.subscribeButtonRenderer?.trackingParams||null);Z.K(N.element,"click",()=>{Z.api.logClick(N.element)});
Z.subscribeButton=N;g.u(Z,Z.subscribeButton);Z.subscribeButton.HD(Z.C);Z.subscribeButton.hide();var a=new lni(Z.api);Z.V=a;g.u(Z,a);a.HD(Z.C);a.hide();Z.K(Z.api,"SUBSCRIBE",()=>{k.mq&&(a.show(),Z.api.logVisibility(a.element,!0))});
Z.K(Z.api,"UNSUBSCRIBE",()=>{k.mq&&(a.hide(),Z.api.logVisibility(a.element,!1),XDR(a,!1))})}};
t_0=function(Z){Z.channel.classList.remove("ytp-title-show-collapsed");Z.channel.classList.remove("ytp-title-show-expanded")};
fnf=function(Z,k="",N=""){Z.Y?(Z.N!==k&&(Z.U.style.backgroundImage=`url(${k})`,Z.N=k),Z.updateValue("channelLink",Xy(Z)),Z.updateValue("channelLogoLabel",g.DH("Photo image of $CHANNEL_NAME",{CHANNEL_NAME:N})),g.jX(Z.api.getRootNode(),"ytp-title-enable-channel-logo")):g.Wp(Z.api.getRootNode(),"ytp-title-enable-channel-logo");Z.api.logVisibility(Z.U,Z.Y&&Z.Vz)};
V_=function(Z,k){Z.element.setAttribute("aria-haspopup",String(k))};
BBi=function(){let Z=document.queryCommandSupported&&document.queryCommandSupported("copy");h3("Chromium")>=43&&(Z=!0);h3("Firefox")<=40&&(Z=!1);return Z};
Fy=function(Z){Z.Oj?.In(!Z.S.isFullscreen()&&!Z.S.isMinimized()&&Z.S.getPresentingPlayerType()!==2&&Z.S.X().showMiniplayerButton)};
DXb=function(Z){const k=!!Z.Ij;g.UK(Z.Vn,k?"Copy debug info":"Get debug info");V_(Z.Vn,!k);g.UK(Z.AZ,k?"Copy embed code":"Get embed code");V_(Z.AZ,!k);g.UK(Z.getVideoUrl,k?"Copy video URL":"Get video URL");V_(Z.getVideoUrl,!k);g.UK(Z.ya,k?"Copy video URL at current time":"Get video URL at current time");V_(Z.ya,!k);Z.AZ.setIcon(k?gOy():null);Z.getVideoUrl.setIcon(k?QQ():null);Z.ya.setIcon(k?QQ():null)};
O8U=function(Z,k){var N=Z.S.X();const a=Z.S.getPresentingPlayerType()===2;var T=!a||k.isListed;T=!N.O&&!!k.videoId&&T;N.playerStyle!=="play"?N="https://support.google.com/youtube/?p=report_playback":(N={contact_type:"playbackissue",html5:1,ei:k.eventId,v:k.videoId,p:"movies_playback"},k.U&&(N.fmt=k.U.itag),k.clientPlaybackNonce&&(N.cpn=k.clientPlaybackNonce),k.partnerId&&(N.partnerid=k.partnerId),N=g.mW("//support.google.com/googleplay/",N));Z.AZ.In(T&&k.allowEmbed);Z.getVideoUrl.In(T);Z.ya.In(T&&
!k.isLivePlayback);Z.xQ.setContent(N,"href");Z.tD?.In(!k.isLivePlayback&&!a);Fy(Z);Z.XX?.In(!a)};
tV=function(Z,k){let N=!1;if(Z.Ij){const a=Z.Ij.element;a.value=k;a.select();try{N=document.execCommand("copy")}catch(T){}}N?Z.on.cA():(Z.aR.setContent(k,"text"),g.KY(Z.on,Z.mW),Yn(Z.aR.element),Z.Ij&&(Z.Ij=null,DXb(Z)));return N};
vYf=function(Z){return g.PQ(Z.S.X())?Z.XX:Z.tD};
i8N=function(Z){Z.U.U();var k=Z.S.X();k.playerStyle==="gvn"||k.U||k.Rq||(k=Z.S.fF(),Z.U.K(k,"contextmenu",Z.vD),Z.U.K(k,"touchstart",Z.onTouchStart,null,!0),Z.U.K(k,"touchmove",Z.O,null,!0),Z.U.K(k,"touchend",Z.O,null,!0))};
gYy=function(Z){Z.S.isFullscreen()?g.$n(Z.S,Z.element,10):Z.HD(oC(Z).body)};
wDR=async function(Z,k){try{return await navigator.clipboard.writeText(k),!0}catch{let N=!1;const a=g.TU("TEXTAREA");a.value=k;a.setAttribute("readonly","");Z=Z.api.getRootNode();Z.appendChild(a);if(Yh){const T=window.getSelection();T.removeAllRanges();const K=document.createRange();K.selectNodeContents(a);T.addRange(K);a.setSelectionRange(0,k.length)}else a.select();try{N=document.execCommand("copy")}catch(T){}Z.removeChild(a);return N}};
$Xj=function(Z){Z.updateValue("icon",kZ());if(Z.api.X().U)Z.tooltip.cJ(Z.element,"Link copied to clipboard");else{Z.updateValue("title-attr","Link copied to clipboard");Z.updateValue("tooltip-title","Link copied to clipboard");Z.tooltip.qj();Z.tooltip.cJ(Z.element);const k=Z.listen("mouseleave",()=>{Z.Ce(k);Z.aq();Z.tooltip.qd()})}};
xXy=function(Z){var k=Z.api.X();const N=Z.api.getVideoData(),a=Z.api.fF().getPlayerSize().width;k=k.D;return!!N.videoId&&a>=240&&N.J$&&!N.o4&&!Z.api.isEmbedsShortsMode()&&!k};
GvN=function(Z,k){k=g.DH("$TOTAL_SEEK_TIME seconds",{TOTAL_SEEK_TIME:k.toString()});Z.updateValue("seekTime",k)};
SYr=function(Z,k){Z.S.B("web_enable_shopping_timely_shelf_client")&&!Z.S.B("web_force_featured_product_banner_with_timely_shelf")&&k&&!k.isPremiere&&k.getPlayerResponse()?.videoDetails?.isLiveContent===!1?Z.badge.element.classList.add("ytp-timely-shelf-present"):Z.badge.element.classList.remove("ytp-timely-shelf-present")};
hV=function(Z){Z.tq=[];Z.Rq();Z.S.jl("featured_product")};
ls=function(Z){Z.rD?.stop();Z.O.hide();Z.N.hide();us(Z)};
us=function(Z){if(Z.trendingOfferEntityKey){var k=g.tE.getState().entities;(k=jV(k,"trendingOfferEntity",Z.trendingOfferEntityKey))?k.encodedSkuId!==Z.V?.bannerData?.itemData?.encodedOfferSkuId?fz(Z):(Z.Y.update({trendingOffer:`${k.shortLabel} \u2022 ${k.countLabel}`}),Z.Y.show(),Z.banner.update({vendor:BT(Z)})):fz(Z)}else fz(Z)};
e7f=function(Z){const k=Z.V?.bannerData?.itemData;return k?.priceReplacementText||Z.S.B("web_player_enable_featured_product_banner_promotion_text_on_desktop")||!k?.dealsData?.sales?.originalPrice?null:k?.dealsData?.sales?.originalPrice};
oYU=function(Z){const k=Z.V?.bannerData?.itemData;return k?.priceReplacementText||Z.S.B("web_player_enable_featured_product_banner_promotion_text_on_desktop")||k?.dealsData?.sales?.originalPrice||!k?.dealsData?.priceDrop?.referencePrice?null:k?.dealsData?.priceDrop?.referencePrice};
Jdf=function(Z){const k=Z.V?.bannerData?.itemData;return Z.S.B("web_player_enable_featured_product_banner_promotion_text_on_desktop")&&!k?.priceReplacementText&&k?.promotionText?k?.promotionText.content:null};
z7N=function(Z){const k=Z.V?.bannerData?.itemData;return k?.priceReplacementText?k?.priceReplacementText:k?.promotionText&&Z.S.B("web_player_enable_featured_product_banner_promotion_text_on_desktop")?`${k?.price} ${k?.promotionText?.content}`:k?.dealsData?.sales?.originalPrice?k?.dealsData?.sales?.salesPriceAccessibilityLabel:k?.dealsData?.priceDrop?.referencePrice?`${k?.price} ${k?.dealsData?.priceDrop?.referencePrice}`:k?.price};
BT=function(Z){return Z.S.B("web_player_enable_featured_product_banner_promotion_text_on_desktop")?Z.Y.LF?null:Z.V?.bannerData?.itemData?.vendorName:Z.Y.LF||Z.N.LF||Z.V?.bannerData?.itemData?.affiliateDisclaimer?null:Z.V?.bannerData?.itemData?.vendorName};
UXy=function(Z){const k=(Number(Z.V?.bannerData?.itemData?.hiddenProductOptions?.dropTimestampMs)-Date.now())/1E3;Z.countdownTimer.setContent(oh({seconds:k}));k>0&&Z.pF?.start()};
b8f=function(Z){Z=Z.V?.bannerData?.itemData;return!Z?.affiliateDisclaimer&&Z?.exclusivesData?.exclusiveOfferLabelText&&Z?.exclusivesData?.expirationTimestampMs&&Z?.exclusivesData?.exclusiveOfferCountdownText?!0:!1};
pDf=function(Z){var k=(Number(Z.V?.bannerData?.itemData?.exclusivesData?.expirationTimestampMs)-Date.now())/1E3;if(k>0){if(k<604800){var N=Z.V?.bannerData?.itemData?.exclusivesData?.exclusiveOfferCountdownText;if(N!==void 0){var a=Date.now();for(const T of N){if(T===void 0||T.text===void 0)continue;N=Number(T.textDisplayStartTimestampMs);if(!isNaN(N)&&a>=N){T.insertCountdown?(k=T.text.replace(/\$0/,String(oh({seconds:k}))),Z.O.setContent(k)):Z.O.setContent(T.text);Z.O.show();break}}}}Z.N.update({exclusive:Z.V?.bannerData?.itemData?.exclusivesData?.exclusiveOfferLabelText});
Z.N.show();fz(Z);Z.rD?.start()}else ls(Z)};
fz=function(Z){Z.Y.hide();Z.banner.update({vendor:BT(Z)})};
R7N=function(Z){if(Z!==void 0&&Z.trim()!==""&&(Z=Math.trunc(Number(Z.trim())),!(isNaN(Z)||Z<0)))return Z};
M_r=function(Z,k){hV(Z);if(k){var N=g.tE.getState().entities;N=jV(N,"featuredProductsEntity",k);if(N?.productsData){k=[];for(const a of N.productsData)if(a?.identifier&&a.featuredSegments){Z.tq.push(a);for(const T of a?.featuredSegments){N=R7N(T.startTimeSec);if(N===void 0)continue;const K=R7N(T.endTimeSec);k.push(new g.pe(N*1E3,K===void 0?0x7ffffffffffff:K*1E3,{id:a.identifier,namespace:"featured_product"}))}}Z.S.f8(k)}}};
nYy=function(Z){switch(Z){case "OPEN_IN_NEW":return rm();case "NOT_INTERESTED":return{J:"svg",W:{fill:"#fff",height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{d:"M18.71,6C20.13,7.59,21,9.69,21,12c0,4.97-4.03,9-9,9c-2.31,0-4.41-0.87-6-2.29L18.71,6z M3,12 c0-4.97,4.03-9,9-9c2.31,0,4.41,.87,6,2.29L5.29,18C3.87,16.41,3,14.31,3,12z M12,2c5.52,0,10,4.48,10,10c0,5.52-4.48,10-10,10 C6.48,22,2,17.52,2,12C2,6.48,6.48,2,12,2z","fill-rule":"evenodd"}}]};case "HELP_OUTLINE":return yQ();default:return rm()}};
DW=function(Z,k){if(!k.Jl||!Z.S.GC()){var N=k.Sb||1E4,a=!!k.tq?.title?.content||!!k.tq?.bodyText?.content;Z.V?k.videoId&&k.videoId!==Z.videoId&&(Z.V.fH(),Z.videoId=k.videoId,a?(Iny(Z,N,k),Z.Iv()):(Z.cA(),Z.V.dispose(),Z.V=null)):a&&(k.videoId&&(Z.videoId=k.videoId),Iny(Z,N,k),Z.Iv())}};
jRy=function(Z,k){Z.V&&(k.V(8)?(Z.U=!0,Z.Iv(),Z.V.start()):(k.V(2)||k.V(64))&&Z.videoId&&(Z.videoId=null))};
Iny=function(Z,k,N){Z.V&&Z.V.dispose();Z.V=new g.Uc(Z.C,k,Z);g.u(Z,Z.V);Z.S.setTrackingParams(Z.element,N.tq?.trackingParams||null);N?.tq?.title?.content?(k=N.tq?.title?.content,N.tq?.bodyText?.content&&(k+=" \u2022 ")):k="";Z.update({text:k+(N.tq?.bodyText?.content||""),chevron:g.aJ()})};
OU=function(Z){let k=null;try{k=Z.toLocaleString("en",{style:"percent"})}catch(N){k=Z.toLocaleString(void 0,{style:"percent"})}return k};
vT=function(Z,k){let N=0;for(const a of Z){if(a.startTime>k)break;N++}return N===0?N:N-1};
EYj=function(Z,k){let N=0;for(const a of Z){if(k<a.timeRangeStartMillis)return null;if(k>=a.timeRangeStartMillis&&k<a.timeRangeStartMillis+a.V)break;N++}N+1<Z.length&&Z[N+1].timeRangeStartMillis<=k&&N++;return N<Z.length?N:null};
WMy=function(Z,k){k=vT(Z,k)+1;return k<Z.length?k:-1};
YYX=function(Z,k){return vT(Z,k)-1};
ZJR=function(Z,k){return new g.pe(Z,k,{namespace:"timedMarkerCueRange",priority:9,id:`tm_${Z}`})};
k$f=function(Z,k){g.pY(Z.api.GZ())&&Z.api.setOption("captions","sampleSubtitles",k)};
is=function(Z,k){Z.Y.nL=k;g.D(Z.api.getRootNode(),"ytp-probably-keyboard-focus",k);g.D(Z.contextMenu.element,"ytp-probably-keyboard-focus",k)};
gN=function(Z,k,N){const a=Z.api.getCurrentTime(),T=NiG(Z,a);Z=NiG(Z,a+k);return{startMediaTimeMs:T,endMediaTimeMs:Z,seekSource:N}};
ayy=function(Z){const k=Z.api.getVideoData()?.qW();return Z.api.getPresentingPlayerType(k)!==2};
$v=function(Z,k,N,a){var T=g.pY(Z.api.GZ());if(T&&T.loaded){var K=Z.api.getSubtitlesUserSettings();T=void 0;for(var y=0;y<g.wN.length;y++){var Q=g.wN[y];if(Q.option===k){T=Q.options;break}}y=void 0;for(Q=0;Q<T.length;Q++)T[Q].option===K[k]&&(y=Q);if(a)if(N){if(y===0)return}else if(y===T.length-1)return;a={};a[k]=T[(y+(N?T.length-1:1))%T.length].option;Z.api.updateSubtitlesUserSettings(a);k$f(Z,!0);Z.L.start()}};
NiG=function(Z,k){if(k<0)return"0";Z=Math.floor(Math.min(k,Z.api.getDuration())*1E3);return Z>2**31-1?"0":String(Z)};
xv=function(Z,k){Z.actionButtons.includes(k)||(Z.actionButtons.push(k),Z.updateValue("buttons",Z.actionButtons))};
var Tib=function(Z,k,N,a,T,K,y,Q){return rP[c[2]](this,50,794,Z,k,N,a,T,K,y,Q)};
K2N=function(Z){var k=document.querySelectorAll(`[data-tooltip-target-id="${Z.tooltipRenderer.targetId}"]`);k=k.length>0?k[0]:null;const N=g.Mc("ytp-ad-module");Z.D=!!g.Mc("ytp-chrome-bottom")?.contains(k);Z.j=!!N?.contains(k);Z.C=!!k?.hasAttribute("data-tooltip-target-fixed");return k};
G1=function(Z){var k;if(!(k=!Z.V)){k=Z.V;var N=window.getComputedStyle(k);k=N.display==="none"||N.visibility==="hidden"||k.getAttribute("aria-hidden")==="true"}if(k||Z.S.isMinimized())Z.In(!1);else if(k=g.I4(Z.V),k.width&&k.height){Z.S.U1(Z.element,Z.V);var a=Z.S.fF().getPlayerSize().height;N=g.I4(Z.Lp("ytp-promotooltip-container")).height;Z.D?Z.element.style.top=`${a-N-k.height-12}px`:Z.C||(a=Z.S.Sd().height-N-k.height-12,Z.element.style.top=`${a}px`);a=Z.Lp("ytp-promotooltip-pointer");const T=g.Mi(Z.V,
Z.S.getRootNode()),K=Number(Z.element.style.left.replace(/[^\d\.]/g,""));Z=Z.S.isFullscreen()?18:12;a.style.left=`${T.x-K+k.width/2-Z}px`;a.style.top=`${N}px`}else Z.In(!1)};
ST=function(Z){Z.In(!1);Z.U&&Z.S.logVisibility(Z.element,Z.LF)};
yqj=function(Z){const k=g.J(Z.dismissButton,Eq)?.text?.runs?.length&&!!g.J(Z.dismissButton,Eq).text.runs[0].text;return g.J(Z.acceptButton,Eq)?.text?.runs?.length&&!!g.J(Z.acceptButton,Eq).text.runs[0].text||k};
qFR=function(Z,k=1,N=!0){Z.D=Z.Y.animate([{offset:0,opacity:k},{offset:1,opacity:0}],{duration:200,fill:"forwards",easing:"cubic-bezier(0.20, 0.00, 0.60, 1.00)"});N&&(Z.D.addEventListener("finish",()=>{Z.D=void 0;QgR(Z);Z.hide()}),Z.V="fading-out")};
rqy=function(Z,k){Z.D=Z.Y.animate([{offset:0,easing:"cubic-bezier(0.20, 0.00, 0.60, 1.00)",opacity:k},{offset:1,opacity:1}],{duration:200,fill:"forwards"});Z.D.addEventListener("finish",()=>{Z.D=void 0;Z.G.start();Z.V="lingering"})};
Coy=function(Z,k,N=!1,a=!1){var T=[];T.push({offset:0,transform:`translateX(${Z.U===-1?20:-20}px)`,opacity:N?"0":"1"});N&&T.push({offset:.5,opacity:"1"});T.push({offset:1,transform:"translateX(0)",opacity:"1"});N=k.animate(T,{duration:400,easing:"cubic-bezier(0.05, 0.00, 0.00, 1.00)"});k=k.querySelector("path");T=[];const K={offset:0,d:Z.U===-1?'path("M 18 4 L 18 16 L 18 28")':'path("M 4 4 L 4 16 L 4 28")'};a&&(K.filter="drop-shadow(0 0 0.5px rgba(0, 0, 0, 0.8))");T.push(K);a&&T.push({offset:.8,filter:"drop-shadow(0 0 0.5px rgba(0, 0, 0, 0.8))"});
Z={offset:1,d:Z.U===-1?'path("M 18 4 L 6 16 L 18 28")':'path("M 4 4 L 16 16 L 4 28")'};a&&(Z.filter="drop-shadow(0 0 0.5px rgba(0, 0, 0, 0))");T.push(Z);k.animate(T,{duration:333,easing:"cubic-bezier(0.05, 0.00, 0.00, 1.00)",fill:"forwards"});return N};
moy=function(Z){const k=Z.Y.querySelector(".ytp-seek-overlay-arrow-persistent").cloneNode(!0);k.classList.add("ytp-seek-overlay-arrow-additional");k.classList.remove("ytp-seek-overlay-arrow-persistent");Z.Y.appendChild(k);Coy(Z,k,!0,!0).addEventListener("finish",()=>{k.remove()})};
QgR=function(Z){Z.L=0;Z.V="hidden";Z.U=void 0;Z.Y=void 0;Z.G.stop();Z.D=void 0};
sgr=function(Z){const k=Number(getComputedStyle(Z.Y).opacity);Z.D?.cancel();Z.D=void 0;return k};
Aqj=function(Z,k,N){Z.updateValue("text",k);if(N){a:{switch(N){case "PREMIUM_STANDALONE":k=M4G();break a;case "PREMIUM_STANDALONE_CAIRO":k=nOU();break a}k=void 0}Z.updateValue("icon",k)}for(const a of Z.N.getAnimations())a.cancel();Z.N.animate([{offset:0,opacity:0},{offset:.3,opacity:1},{offset:.7,opacity:1},{offset:1,opacity:0}],{duration:1400}).addEventListener("finish",()=>{Z.updateValue("text","");Z.updateValue("icon","")})};
Po0=function(Z,k){k.name!=="InvalidStateError"&&k.name!=="AbortError"&&(k.name==="NotAllowedError"?(Z.V.t0(),J7(Z.U,Z.element,!1)):g.b(k))};
eT=function(Z){var k=Z.api.X();const N=Z.api.getVideoData(),a=g.PQ(k)&&g.v3(Z.api)&&Z.api.getPlayerStateObject().V(128);k=k.D||k.disableSharing&&Z.api.getPresentingPlayerType()!==2||!N.showShareButton||N.J$||a||N.o4||!1;Z=Z.api.fF().getPlayerSize().width;return!!N.videoId&&Z>=240&&!k};
Xkf=function(Z,k){cqf(Z);const N=k.links||k.shareTargets;let a=0;for(let Q=0;Q<N.length&&a<2;Q++){const q=N[Q];a:switch(q.img||q.iconId){case "facebook":var T={J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 38 38",width:"100%"},A:[{J:"rect",W:{fill:"#fff",height:"34",width:"34",x:"2",y:"2"}},{J:"path",W:{d:"M 34.2,0 3.8,0 C 1.70,0 .01,1.70 .01,3.8 L 0,34.2 C 0,36.29 1.70,38 3.8,38 l 30.4,0 C 36.29,38 38,36.29 38,34.2 L 38,3.8 C 38,1.70 36.29,0 34.2,0 l 0,0 z m -1.9,3.8 0,5.7 -3.8,0 c -1.04,0 -1.9,.84 -1.9,1.9 l 0,3.8 5.7,0 0,5.7 -5.7,0 0,13.3 -5.7,0 0,-13.3 -3.8,0 0,-5.7 3.8,0 0,-4.75 c 0,-3.67 2.97,-6.65 6.65,-6.65 l 4.75,0 z",
fill:"#39579b"}}]};break a;case "twitter":T={J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 38 38",width:"100%"},A:[{J:"rect",W:{fill:"#fff",height:"34",width:"34",x:"2",y:"2"}},{J:"path",W:{d:"M 34.2,0 3.8,0 C 1.70,0 .01,1.70 .01,3.8 L 0,34.2 C 0,36.29 1.70,38 3.8,38 l 30.4,0 C 36.29,38 38,36.29 38,34.2 L 38,3.8 C 38,1.70 36.29,0 34.2,0 l 0,0 z M 29.84,13.92 C 29.72,22.70 24.12,28.71 15.74,29.08 12.28,29.24 9.78,28.12 7.6,26.75 c 2.55,.40 5.71,-0.60 7.41,-2.06 -2.50,-0.24 -3.98,-1.52 -4.68,-3.56 .72,.12 1.48,.09 2.17,-0.05 -2.26,-0.76 -3.86,-2.15 -3.95,-5.07 .63,.28 1.29,.56 2.17,.60 C 9.03,15.64 7.79,12.13 9.21,9.80 c 2.50,2.75 5.52,4.99 10.47,5.30 -1.24,-5.31 5.81,-8.19 8.74,-4.62 1.24,-0.23 2.26,-0.71 3.23,-1.22 -0.39,1.23 -1.17,2.09 -2.11,2.79 1.03,-0.14 1.95,-0.38 2.73,-0.77 -0.47,.99 -1.53,1.9 -2.45,2.66 l 0,0 z",
fill:"#01abf0"}}]};break a;default:T=null}if(!T)continue;const r=q.sname||q.serviceName,C=new g.E({J:"a",BD:["ytp-share-panel-service-button","ytp-button"],W:{href:q.url,target:"_blank",title:r},A:[T]});C.listen("click",m=>{var A=q.url;if(g.SM(m)){var P={};P.target=P.target||"YouTube";P.width=P.width||"600";P.height=P.height||"600";{var d=P;d||(d={});P=window;var h=A instanceof iE?A:g.GI(typeof A.href!="undefined"?A.href:String(A));var B=self.crossOriginIsolated!==void 0,v="strict-origin-when-cross-origin";
window.Request&&(v=(new Request("/")).referrerPolicy);var O=d.noreferrer;if(B&&O&&v==="unsafe-url")throw Error("Cannot use the noreferrer option on a page that sets a referrer-policy of `unsafe-url` in modern browsers!");v=O&&!B;A=d.target||A.target;O=[];let e=[],Ki=!1;for(var x in d){const yf=d[x];switch(x){case "width":case "height":case "top":case "left":O.push(x+"="+yf);break;case "target":break;case "noopener":case "noreferrer":yf?e.push(x):(Ki=!0,e.push(x+"=false"));break;case "attributionsrc":O.push(x+
(yf?"="+yf:""));break;default:O.push(x+"="+(yf?1:0))}}x=A!==void 0&&!["_blank","_self","_top","_parent",""].includes(A);x=L5()&&x;HJy&&B&&O.length===0&&e.length>0&&!x&&!Ki?(e.length===2&&(e=["noreferrer"]),g.p5(P,h,A,e[0]),P=oP()):(B=O.join(","),Hs()&&P.navigator&&P.navigator.standalone&&A&&A!="_self"?(B=g.TU("A"),g.o2(B,h),B.target=A,v&&(B.rel="noreferrer"),((d=d.attributionsrc)||d==="")&&B.setAttribute("attributionsrc",d),d=document.createEvent("MouseEvent"),d.initMouseEvent("click",!0,!0,P,1),
B.dispatchEvent(d),P=oP()):v?(P=g.p5(P,"",A,B),d=g.gI(h),P&&(P.opener=null,d===""&&(d="javascript:''"),d='<meta name="referrer" content="no-referrer"><meta http-equiv="refresh" content="0; url='+Q2(d)+'">',d=UD(d),(h=P.document)&&h.write&&(h.write(bE(d)),h.close()))):((P=g.p5(P,h,A,B))&&d.noopener&&(P.opener=null),P&&d.noreferrer&&(P.opener=null)))}P&&(P.opener||(P.opener=window),P.focus());m.preventDefault()}});
C.addOnDisposeCallback(g.ua(Z.tooltip,C.element));r==="Facebook"?Z.api.createClientVe(C.element,C,164504):r==="Twitter"&&Z.api.createClientVe(C.element,C,164505);Z.K(C.element,"click",()=>{Z.api.logClick(C.element)});
Z.api.logVisibility(C.element,!0);Z.U.push(C);a++}const K=k.more||k.moreLink,y=new g.E({J:"a",BD:["ytp-share-panel-service-button","ytp-button"],A:[{J:"span",Z:"ytp-share-panel-service-button-more",A:[{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 38 38",width:"100%"},A:[{J:"rect",W:{fill:"#fff",height:"34",width:"34",x:"2",y:"2"}},{J:"path",W:{d:"M 34.2,0 3.8,0 C 1.70,0 .01,1.70 .01,3.8 L 0,34.2 C 0,36.29 1.70,38 3.8,38 l 30.4,0 C 36.29,38 38,36.29 38,34.2 L 38,3.8 C 38,1.70 36.29,0 34.2,0 Z m -5.7,21.85 c 1.57,0 2.85,-1.27 2.85,-2.85 0,-1.57 -1.27,-2.85 -2.85,-2.85 -1.57,0 -2.85,1.27 -2.85,2.85 0,1.57 1.27,2.85 2.85,2.85 z m -9.5,0 c 1.57,0 2.85,-1.27 2.85,-2.85 0,-1.57 -1.27,-2.85 -2.85,-2.85 -1.57,0 -2.85,1.27 -2.85,2.85 0,1.57 1.27,2.85 2.85,2.85 z m -9.5,0 c 1.57,0 2.85,-1.27 2.85,-2.85 0,-1.57 -1.27,-2.85 -2.85,-2.85 -1.57,0 -2.85,1.27 -2.85,2.85 0,1.57 1.27,2.85 2.85,2.85 z",
fill:"#4e4e4f","fill-rule":"evenodd"}}]}]}],W:{href:K,target:"_blank",title:"More"}});y.listen("click",Q=>{var q=K;Z.api.logClick(Z.moreButton.element);q=dof(Z,q);g.jY(q,Z.api,Q)&&g.A7(Z.api,"SHARE_CLICKED")});
y.addOnDisposeCallback(g.ua(Z.tooltip,y.element));Z.api.createClientVe(y.element,y,164506);Z.K(y.element,"click",()=>{Z.api.logClick(y.element)});
Z.api.logVisibility(y.element,!0);Z.U.push(y);Z.moreButton=y;Z.updateValue("buttons",Z.U)};
cqf=function(Z){for(const k of Z.U)k.detach(),g.nM(k);Z.U=[]};
dof=function(Z,k){const N={};g.PQ(Z.api.X())&&(g.H3(Z.api,"addEmbedsConversionTrackingParams",[N]),k=g.mW(k,N));return k};
oQ=function(Z){return Z===void 0||Z.startSec===void 0||Z.endSec===void 0?!1:!0};
JV=function(Z,k){Z.startSec+=k;Z.endSec+=k};
z1=function(Z){Z.S.jl("shopping_overlay_visible");Z.S.jl("shopping_overlay_preview_collapsed");Z.S.jl("shopping_overlay_preview_expanded");Z.S.jl("shopping_overlay_expanded")};
L2U=function(Z,k){Z.isContentForward=k;g.D(Z.badge.element,"ytp-suggested-action-badge-content-forward",k)};
UU=function(Z){const k=Z.isContentForward&&!Z.hq();g.D(Z.badge.element,"ytp-suggested-action-badge-preview-collapsed",k&&Z.V);g.D(Z.badge.element,"ytp-suggested-action-badge-preview-expanded",k&&Z.Y)};
VoG=function(Z){Z.N&&Z.s6.element.removeChild(Z.N.element);Z.N=void 0};
toy=function(Z,k){return k.map(N=>{if((N=g.J(N,F2y)?.thumbnail?.thumbnails)&&N.length!==0)return N[0].url}).filter(N=>N!==void 0).map(N=>{N=new g.E({J:"img",
Z:"ytp-suggested-action-product-thumbnail",W:{alt:"",src:N}});g.u(Z,N);return N})};
bs=function(Z,k,N){return new g.pe(Z*1E3,k*1E3,{priority:9,namespace:N})};
hmG=function(Z){Z.K(Z.S,g.te("shopping_overlay_visible"),()=>{Z.Hq(!0)});
Z.K(Z.S,g.he("shopping_overlay_visible"),()=>{Z.Hq(!1)});
Z.K(Z.S,g.te("shopping_overlay_expanded"),()=>{Z.FS=!0;YV(Z)});
Z.K(Z.S,g.he("shopping_overlay_expanded"),()=>{Z.FS=!1;YV(Z)});
Z.K(Z.S,g.te("shopping_overlay_preview_collapsed"),()=>{Z.V=!0;UU(Z)});
Z.K(Z.S,g.he("shopping_overlay_preview_collapsed"),()=>{Z.V=!1;UU(Z)});
Z.K(Z.S,g.te("shopping_overlay_preview_expanded"),()=>{Z.Y=!0;UU(Z)});
Z.K(Z.S,g.he("shopping_overlay_preview_expanded"),()=>{Z.Y=!1;UU(Z)})};
utb=function(Z){var k=Z.api.X(),N=Z.api.getVideoData();N=g.$2(k)+N.Rq;if(!g.PQ(k))return N;k={};g.H3(Z.api,"addEmbedsConversionTrackingParams",[k]);return g.mW(N,k)};
lyb=function(Z){if(!Z.api.X().xl){var k=Z.api.getVideoData(),N=new g.Lz("Subscribe",null,"Subscribed",null,!0,!1,k.WZ,k.subscribed,"channel_avatar",null,Z.api,!0);Z.api.createServerVe(N.element,Z);Z.api.setTrackingParams(N.element,k.subscribeButtonRenderer?.trackingParams||null);Z.K(N.element,"click",()=>{Z.api.logClick(N.element)});
Z.subscribeButton=N;g.u(Z,Z.subscribeButton);Z.subscribeButton.HD(Z.element)}};
fyN=function(Z,k,N="",a=""){k?(Z.U!==N&&(Z.V.style.backgroundImage=`url(${N})`,Z.U=N),Z.updateValue("channelLogoLabel",g.DH("Photo image of $CHANNEL_NAME",{CHANNEL_NAME:a})),g.jX(Z.api.getRootNode(),"ytp-title-enable-channel-logo")):g.Wp(Z.api.getRootNode(),"ytp-title-enable-channel-logo");Z.api.logVisibility(Z.V,k&&Z.Vz);Z.api.logVisibility(Z.channelName,k&&Z.Vz)};
BiX=function(Z,k){if(Z.V){k=Math.floor(k*.4);k=Math.max(k,47);var N=k+2;if(Z.D!==N){Z.D=N;Z.U.height=N;Z.V.clearRect(0,0,1,N);var a=Z.V.createLinearGradient(0,2,0,2+k),T=k-42;a.addColorStop(0,"rgba(0, 0, 0, 0)");a.addColorStop(T/k,"rgba(0, 0, 0, 0.3)");a.addColorStop(1,"rgba(0, 0, 0, 0.68)");Z.V.fillStyle=a;Z.V.fillRect(0,2,1,k);Z.element.style.height=`${N}px`;try{Z.element.style.backgroundImage=`url(${Z.U.toDataURL()})`}catch(K){}}}};
Dob=function(Z,k){k!==Z.G&&(Z.update({chapterTitle:k,ariaLabel:k}),Z.G=k);k?Z.show():Z.hide()};
OJb=function(Z){Z.V.disabled=Z.U==null;g.D(Z.V,"ytp-chapter-container-disabled",Z.V.disabled);Z.MW()};
vTy=function(Z,k,N,a,T){const K=k.ra/k.rows;let y=Math.min(N/(k.U0/k.columns),a/K),Q=k.U0*y,q=k.ra*y;Q=Math.floor(Q/k.columns)*k.columns;q=Math.floor(q/k.rows)*k.rows;let r=Q/k.columns,C=q/k.rows;const m=-k.column*r,A=-k.row*C;T&&K<=45&&(C-=1/y);r-=2/y;Z=Z.style;Z.width=`${r}px`;Z.height=`${C}px`;T||(a=(a-C)/2,N=(N-r)/2,Z.marginTop=Math.floor(a)+"px",Z.marginBottom=Math.ceil(a)+"px",Z.marginLeft=Math.floor(N)+"px",Z.marginRight=Math.ceil(N)+"px");Z.background=`url(${k.url}) ${m}px ${A}px/${Q}px ${q}px`};
pz=function(Z,k){const N=!!Z.V;Z.V=k;Z.V?(N||(Z.events.K(Z.api,"videodatachange",()=>{pz(Z,Z.api.Cn())}),Z.events.K(Z.api,"progresssync",Z.onProgress),Z.events.K(Z.api,"appresize",Z.Y)),Z.frameIndex=NaN,RQ(Z),Z.fade.show(200)):(N&&Z.events.U(),Z.fade.hide(),Z.fade.stop())};
RQ=function(Z){var k=Z.V;const N=Z.api.getCurrentTime(),a=Z.api.fF().getPlayerSize();var T=qO(k,a.width);T=Wnr(k,T,N);Z.update({timestamp:g.Gh(N)});T!==Z.frameIndex&&(Z.frameIndex=T,EoR(k,T,a.width),k=noX(k,T,a.width),vTy(Z.U,k,a.width,a.height))};
iJy=function(Z,k){return Z.S.B("delhi_modern_web_player_icons")?k?{J:"svg",W:{height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{d:"M3.29 3.29C3.11 3.46 3.01 3.70 3.00 3.94C2.98 4.19 3.06 4.43 3.22 4.63L3.29 4.70L7.58 8.99H5C4.73 8.99 4.48 9.10 4.29 9.29C4.10 9.47 4 9.73 4 9.99C4 10.26 4.10 10.51 4.29 10.70C4.48 10.89 4.73 10.99 5 10.99H11V4.99C11 4.73 10.89 4.47 10.70 4.29C10.51 4.10 10.26 3.99 10 3.99C9.73 3.99 9.48 4.10 9.29 4.29C9.10 4.47 9 4.73 9 4.99V7.58L4.70 3.29L4.63 3.22C4.43 3.06 4.19 2.98 3.94 3.00C3.70 3.01 3.46 3.11 3.29 3.29ZM19 13H13V19C13 19.26 13.10 19.51 13.29 19.70C13.48 19.89 13.73 20 14 20C14.26 20 14.51 19.89 14.70 19.70C14.89 19.51 15 19.26 15 19V16.41L19.29 20.70L19.36 20.77C19.56 20.92 19.80 21.00 20.04 20.99C20.29 20.98 20.52 20.87 20.70 20.70C20.87 20.52 20.98 20.29 20.99 20.04C21.00 19.80 20.92 19.56 20.77 19.36L20.70 19.29L16.41 15H19C19.26 15 19.51 14.89 19.70 14.70C19.89 14.51 20 14.26 20 14C20 13.73 19.89 13.48 19.70 13.29C19.51 13.10 19.26 13 19 13Z",
fill:"white"}}]}:{J:"svg",W:{height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{d:"M10 3H3V10C3 10.26 3.10 10.51 3.29 10.70C3.48 10.89 3.73 11 4 11C4.26 11 4.51 10.89 4.70 10.70C4.89 10.51 5 10.26 5 10V6.41L9.29 10.70L9.36 10.77C9.56 10.92 9.80 11.00 10.04 10.99C10.29 10.98 10.52 10.87 10.70 10.70C10.87 10.52 10.98 10.29 10.99 10.04C11.00 9.80 10.92 9.56 10.77 9.36L10.70 9.29L6.41 5H10C10.26 5 10.51 4.89 10.70 4.70C10.89 4.51 11 4.26 11 4C11 3.73 10.89 3.48 10.70 3.29C10.51 3.10 10.26 3 10 3ZM20 13C19.73 13 19.48 13.10 19.29 13.29C19.10 13.48 19 13.73 19 14V17.58L14.70 13.29L14.63 13.22C14.43 13.07 14.19 12.99 13.95 13.00C13.70 13.01 13.47 13.12 13.29 13.29C13.12 13.47 13.01 13.70 13.00 13.95C12.99 14.19 13.07 14.43 13.22 14.63L13.29 14.70L17.58 19H14C13.73 19 13.48 19.10 13.29 19.29C13.10 19.48 13 19.73 13 20C13 20.26 13.10 20.51 13.29 20.70C13.48 20.89 13.73 21 14 21H21V14C21 13.73 20.89 13.48 20.70 13.29C20.51 13.10 20.26 13 20 13Z",
fill:"white"}}]}:k?{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},A:[{J:"g",Z:"ytp-fullscreen-button-corner-2",A:[{J:"path",Rv:!0,Z:"ytp-svg-fill",W:{d:"m 14,14 -4,0 0,2 6,0 0,-6 -2,0 0,4 0,0 z"}}]},{J:"g",Z:"ytp-fullscreen-button-corner-3",A:[{J:"path",Rv:!0,Z:"ytp-svg-fill",W:{d:"m 22,14 0,-4 -2,0 0,6 6,0 0,-2 -4,0 0,0 z"}}]},{J:"g",Z:"ytp-fullscreen-button-corner-0",A:[{J:"path",Rv:!0,Z:"ytp-svg-fill",W:{d:"m 20,26 2,0 0,-4 4,0 0,-2 -6,0 0,6 0,0 z"}}]},{J:"g",Z:"ytp-fullscreen-button-corner-1",
A:[{J:"path",Rv:!0,Z:"ytp-svg-fill",W:{d:"m 10,22 4,0 0,4 2,0 0,-6 -6,0 0,2 0,0 z"}}]}]}:{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},A:[{J:"g",Z:"ytp-fullscreen-button-corner-0",A:[{J:"path",Rv:!0,Z:"ytp-svg-fill",W:{d:"m 10,16 2,0 0,-4 4,0 0,-2 L 10,10 l 0,6 0,0 z"}}]},{J:"g",Z:"ytp-fullscreen-button-corner-1",A:[{J:"path",Rv:!0,Z:"ytp-svg-fill",W:{d:"m 20,10 0,2 4,0 0,4 2,0 L 26,10 l -6,0 0,0 z"}}]},{J:"g",Z:"ytp-fullscreen-button-corner-2",A:[{J:"path",Rv:!0,Z:"ytp-svg-fill",
W:{d:"m 24,24 -4,0 0,2 L 26,26 l 0,-6 -2,0 0,4 0,0 z"}}]},{J:"g",Z:"ytp-fullscreen-button-corner-3",A:[{J:"path",Rv:!0,Z:"ytp-svg-fill",W:{d:"M 12,20 10,20 10,26 l 6,0 0,-2 -4,0 0,-4 0,0 z"}}]}]}};
gTy=function(Z,k){k?Z.element.classList.add("ytp-jump-button-enabled"):Z.element.classList.remove("ytp-jump-button-enabled");Z.S.logVisibility(Z.element,k);Z.S.qj()};
wki=function(Z){var k=Z.S.getVideoData()?.vD;if(k){Z=Z.Y.Kp;for(const N of k)if((k=Z[N])&&k.onTap?.innertubeCommand?.changeEngagementPanelVisibilityAction?.targetId!=="engagement-panel-macro-markers-problem-walkthroughs")return k}};
$oi=function(Z){return Z.S.B("delhi_modern_web_player_icons")?oOf():CZ()};
xoG=function(Z,k){Z.U.style.setProperty("--yt-slider-shape-gradient-percent",`${(k-Z.D)/(Z.G-Z.D)*100}%`)};
MI=function(Z,k,N=!1){Z.Y&&(cancelAnimationFrame(Z.Y),Z.Y=0);N?G$f(Z,Z.V,k):SFj(Z,k)};
G$f=function(Z,k,N){const a=performance.now(),T=N-k;if(T!==0){var K=y=>{y=(y-a)/400;y>1&&(y=1);SFj(Z,k+T*HG(emG,dQ(emG,y)));Z.Y=y<1?requestAnimationFrame(K):0};
Z.Y=requestAnimationFrame(K)}};
SFj=function(Z,k){Z.V=k;Z.update({slidervalue:Z.V,ariaValueNow:Z.V,ariaValueText:`${Z.V.toFixed(2)}`});Z.U.valueAsNumber=Z.V;xoG(Z,k)};
oTf=function(Z,k){Z.element.classList.toggle("ytp-volume-popover-hovering",k);Z.isVisible=k;(Z=Z.element.closest(".ytp-chrome-bottom"))&&Z.classList.toggle("ytp-volume-popover-showing",k)};
Jqy=function(Z){var k=null;const N="Your browser doesn't support changing the volume. $BEGIN_LINKLearn More$END_LINK".split(/\$(BEGIN|END)_LINK/);k=new nz(Z.S,{J:"span",BD:["ytp-popup","ytp-generic-popup"],W:{tabindex:"0"},A:[N[0],{J:"a",W:{href:"https://support.google.com/youtube/?p=noaudio",target:Z.S.X().N},Da:N[2]},N[4]]},100,!0);g.u(Z,k);k.hide();k.subscribe("show",a=>{Z.S.r7(k,a)});
g.$n(Z.S,k.element,4)};
bJf=function(Z,k){Z.C=k;let N=Z.Rq;Z.S.B("delhi_modern_web_player_icons")?Z.U.Lp("ytp-svg-volume-animation-big-ripple").setAttribute("transform",`translate(${IQ}, ${jT}) scale(${k}) translate(-${IQ},-${jT})`):k&&(N+=UsG(zmX,UoR,k));Z.O.setAttribute("d",N)};
MoU=function(Z,k){let N;k===1?N=Z.S.B("delhi_modern_web_player_icons")?{J:"svg",W:{height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{d:"M11.60 2.08L11.48 2.14L3.91 6.68C3.02 7.21 2.28 7.97 1.77 8.87C1.26 9.77 1.00 10.79 1 11.83V12.16L1.01 12.56C1.07 13.52 1.37 14.46 1.87 15.29C2.38 16.12 3.08 16.81 3.91 17.31L11.48 21.85C11.63 21.94 11.80 21.99 11.98 21.99C12.16 22.00 12.33 21.95 12.49 21.87C12.64 21.78 12.77 21.65 12.86 21.50C12.95 21.35 13 21.17 13 21V3C12.99 2.83 12.95 2.67 12.87 2.52C12.80 2.37 12.68 2.25 12.54 2.16C12.41 2.07 12.25 2.01 12.08 2.00C11.92 1.98 11.75 2.01 11.60 2.08ZM4.94 8.4V8.40L11 4.76V19.23L4.94 15.6C4.38 15.26 3.92 14.80 3.58 14.25C3.24 13.70 3.05 13.07 3.00 12.43L3 12.17V11.83C2.99 11.14 3.17 10.46 3.51 9.86C3.85 9.25 4.34 8.75 4.94 8.4ZM21.29 8.29L19 10.58L16.70 8.29L16.63 8.22C16.43 8.07 16.19 7.99 15.95 8.00C15.70 8.01 15.47 8.12 15.29 8.29C15.12 8.47 15.01 8.70 15.00 8.95C14.99 9.19 15.07 9.43 15.22 9.63L15.29 9.70L17.58 12L15.29 14.29C15.19 14.38 15.12 14.49 15.06 14.61C15.01 14.73 14.98 14.87 14.98 15.00C14.98 15.13 15.01 15.26 15.06 15.39C15.11 15.51 15.18 15.62 15.28 15.71C15.37 15.81 15.48 15.88 15.60 15.93C15.73 15.98 15.86 16.01 15.99 16.01C16.12 16.01 16.26 15.98 16.38 15.93C16.50 15.87 16.61 15.80 16.70 15.70L19 13.41L21.29 15.70L21.36 15.77C21.56 15.93 21.80 16.01 22.05 15.99C22.29 15.98 22.53 15.88 22.70 15.70C22.88 15.53 22.98 15.29 22.99 15.05C23.00 14.80 22.93 14.56 22.77 14.36L22.70 14.29L20.41 12L22.70 9.70C22.80 9.61 22.87 9.50 22.93 9.38C22.98 9.26 23.01 9.12 23.01 8.99C23.01 8.86 22.98 8.73 22.93 8.60C22.88 8.48 22.81 8.37 22.71 8.28C22.62 8.18 22.51 8.11 22.39 8.06C22.26 8.01 22.13 7.98 22.00 7.98C21.87 7.98 21.73 8.01 21.61 8.06C21.49 8.12 21.38 8.19 21.29 8.29Z",
fill:"white"}}]}:dm():N=Z.U;Z.vD=k;if(Z.S.B("delhi_modern_web_player_icons"))Z.U.Lp("ytp-svg-volume-animation-small-ripple").setAttribute("transform",`translate(${pk0}, ${Rmf}) scale(${1-k}) translate(-${pk0},-${Rmf})`),Z.U.Lp("ytp-svg-volume-animation-big-ripple").setAttribute("transform",`translate(${IQ}, ${jT}) scale(${Z.C-k}) translate(-${IQ}, -${jT})`);else{var a=20*k;for(var T=0;T<Z.L.length;T++)Z.L[T].setAttribute("transform",`translate(${a}, ${a})`);for(a=0;a<Z.Y.length;a++)T=Z.Y[a],T?.style&&
(T.style.display=k===0?"none":"")}N!==Z.zt&&(Z.updateValue("icon",N),Z.zt=N)};
nTr=function(Z,k){if(Z.S.X().FS){var N=g.fe(Z.S,"Mute","m");const a=g.fe(Z.S,"Unmute","m");N=k?a:N;Z.S.X().B("player_tooltip_data_title_killswitch")?Z.updateValue("title",N):Z.update({"tooltip-title":N,"aria-label":N});Z.update({"data-title-no-tooltip":k?"Unmute":"Mute"});Z.tooltip.qj()}};
EU=function(Z,k){Z=Z.S.B("delhi_modern_web_player_icons");switch(k){case 1:return Z?AY():m9();case 2:return Z?plR():bHy();case 3:return Z?{J:"svg",W:{fill:"none",height:"36",viewBox:"0 0 36 36",width:"36"},A:[{J:"path",W:{d:"M11.29 2.92C14.85 1.33 18.87 1.06 22.61 2.15L22.96 2.26C26.56 3.40 29.67 5.74 31.75 8.89L31.95 9.19C33.90 12.28 34.77 15.93 34.42 19.56L34.38 19.93C34.04 22.79 32.96 25.51 31.25 27.83C29.53 30.14 27.23 31.97 24.59 33.12C21.95 34.27 19.05 34.71 16.18 34.40C13.32 34.08 10.59 33.02 8.26 31.32L7.97 31.10C4.87 28.73 2.71 25.33 1.88 21.52L3.34 21.20L4.81 20.88C5.49 24.00 7.25 26.77 9.79 28.72L10.27 29.07C12.19 30.40 14.41 31.22 16.74 31.44C19.06 31.65 21.40 31.27 23.53 30.31C25.66 29.35 27.50 27.86 28.88 25.98C30.26 24.10 31.13 21.89 31.40 19.58L31.46 18.98C31.68 16.00 30.90 13.03 29.25 10.54C27.60 8.05 25.17 6.18 22.34 5.22L21.77 5.04C19.02 4.23 16.08 4.33 13.38 5.31C10.68 6.29 8.37 8.11 6.77 10.5H10.5L10.65 10.50C11.03 10.54 11.38 10.73 11.63 11.02C11.88 11.31 12.01 11.69 11.99 12.07C11.97 12.46 11.81 12.82 11.53 13.08C11.25 13.35 10.88 13.49 10.5 13.5H1.5V4.5L1.50 4.34C1.54 3.97 1.71 3.63 1.99 3.38C2.27 3.13 2.62 3.00 3 3.00C3.37 3.00 3.72 3.13 4.00 3.38C4.28 3.63 4.45 3.97 4.49 4.34L4.5 4.5V8.51C6.21 6.07 8.56 4.13 11.29 2.92ZM24 18L15 12.75V23.25L24 18ZM3.02 19.73C2.63 19.82 2.29 20.05 2.08 20.39C1.86 20.72 1.79 21.13 1.88 21.52L4.81 20.88C4.77 20.69 4.69 20.50 4.57 20.34C4.46 20.18 4.32 20.04 4.15 19.94C3.99 19.83 3.80 19.76 3.61 19.72C3.41 19.69 3.21 19.69 3.02 19.73Z",
fill:"white"}}]}:g.Pm();case 4:return Z?Y_X():W$f();default:return null}};
WT=function(Z){const k={duration:null,preview:null,text:null,title:null,"tooltip-title":null,url:null,"data-title-no-tooltip":null,"aria-keyshortcuts":null};var N=Z.playlist!=null&&Z.playlist.hasNext();N=g.v3(Z.S)&&(!Z.V||N);const a=Z.V&&g.xn(Z.S),T=Iyr(Z),K=Z.V&&Z.S.getPresentingPlayerType()===5,y=g.fe(Z.S,"Next","SHIFT+n");var Q=g.fe(Z.S,"Previous","SHIFT+p");if(K)k.title="Start video",k["tooltip-title"]="Start video";else if(Z.D)k.title="Replay",k["tooltip-title"]="Replay";else if(N){let q=null;
Z.playlist&&(q=g.Gx(Z.playlist,Z.V?Oai(Z.playlist):vRr(Z.playlist)));if(q){if(q.videoId){const r=Z.playlist.listId;k.url=Z.S.X().getVideoUrl(q.videoId,r?r.toString():void 0)}k.text=q.title;k.duration=q.lengthText?q.lengthText:q.lengthSeconds?g.Gh(q.lengthSeconds):null;k.preview=q.v9("mqdefault.jpg")}Z.V?(k.title=y,k["tooltip-title"]=y,k["data-title-no-tooltip"]="Next",k["aria-keyshortcuts"]="SHIFT+n"):(k.title=Q,k["tooltip-title"]=Q,k["data-title-no-tooltip"]="Previous",k["aria-keyshortcuts"]="SHIFT+p")}else if(a){if(Q=
Z.videoData?.N())k.url=Q.Qg(),k.text=Q.title,k.duration=Q.lengthText?Q.lengthText:Q.lengthSeconds?g.Gh(Q.lengthSeconds):null,k.preview=Q.v9("mqdefault.jpg");k.title=y;k["tooltip-title"]=y;k["data-title-no-tooltip"]="Next";k["aria-keyshortcuts"]="SHIFT+n"}k.disabled=!a&&!N&&!T&&!K;Z.update(k);Z.j=!!k.url;a||N||Z.D||T||K?Z.U||(Z.U=g.ua(Z.tooltip,Z.element),Z.L=Z.listen("click",Z.onClick,Z)):Z.U&&(Z.U(),Z.U=null,Z.Ce(Z.L),Z.L=null);Z.tooltip.qj();g.D(Z.element,"ytp-playlist-ui",Z.V&&(N||Z.S.B("web_hide_next_button")))};
jg0=function(Z){Z.playlist&&Z.playlist.unsubscribe("shuffle",Z.onVideoDataChange,Z)};
ETf=function(Z){return!!Z.playlist&&!Z.V&&!!Z.videoData&&!Z.videoData.isLivePlayback&&Z.S.getCurrentTime()>=3&&Z.S.getPresentingPlayerType()!==2};
Iyr=function(Z){const k=OK(Z.S.GZ());return k?Z.V?k.hasNext():k.hasPrevious():!1};
W2r=function(Z,k){return Z?k?JBi():q4():k?{J:"svg",W:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{d:"M4 4C3.73 4 3.48 4.10 3.29 4.29C3.10 4.48 3 4.73 3 5V19C3 19.26 3.10 19.51 3.29 19.70C3.48 19.89 3.73 20 4 20C4.26 20 4.51 19.89 4.70 19.70C4.89 19.51 5 19.26 5 19V5C5 4.73 4.89 4.48 4.70 4.29C4.51 4.10 4.26 4 4 4ZM18.95 4.23L6 12.00L18.95 19.77C19.15 19.89 19.39 19.96 19.63 19.96C19.87 19.97 20.10 19.91 20.31 19.79C20.52 19.67 20.69 19.50 20.81 19.29C20.93 19.09 21.00 18.85 21 18.61V5.38C20.99 5.14 20.93 4.91 20.81 4.70C20.69 4.50 20.52 4.33 20.31 4.21C20.10 4.09 19.87 4.03 19.63 4.03C19.39 4.04 19.15 4.10 18.95 4.23Z",
fill:"white"}}]}:j8b()};
Yv=function(Z,k){const N=g.Gh(k),a=g.DH("Seek to $PROGRESS",{PROGRESS:g.Gh(k,!0)});Z.update({ariamin:0,ariamax:Math.floor(Z.api.getDuration()),arianow:Math.floor(k),arianowtext:a,seekTime:N})};
ZC=function(Z){Z.N=NaN;Z.C=0;Z.j=Z.D};
kk=function(Z,k){Z.O&&(Z.O.JH=!0);Z.update({seekTime:g.Gh(k)});const N=Z.G*Z.scale;k=k<Z.interval/2?-k*N/Z.interval*2+Z.V/2:-k*N/Z.interval-N/2+Z.V/2;k=g.u0(k,YFN(Z),Z.V/2);Z.j=k;Z.D=Z.j;g.ij(Z.zt,"transform",`translateX(${Z.j-Z.V/2}px)`);g.ij(Z.zt,"padding",`0px ${Z.V/2}px`);g.ij(Z.L,"position","relative")};
ZBf=function(Z,k){const N=Z.G*Z.scale;k-=Z.V/2;return k>-N?-k/N*Z.interval*.5:-(k+N/2)/N*Z.interval};
YFN=function(Z){return-((Z.L.offsetWidth||(Z.frameCount-1)*Z.G*Z.scale)-Z.V/2)};
aYf=function(Z){var k=Z.api.Cn();if(k){var N=90*Z.scale,a=qO(k,160*Z.scale);if(k=k.levels[a]){Z.G=k.width;if(!Z.Y.length){a=[];var T=r9(k,k.U()),K=k.columns*k.rows,y=k.frameCount;for(var Q=0;Q<=T;Q++){var q=y<K?Math.ceil(y/k.columns):k.rows;for(let r=0;r<k.rows;r++){const C=y<k.columns?y:k.columns,m={url:k.mH(Q),column:0,columns:C,row:r,rows:q,U0:k.width*C,ra:k.height*q};a.push(m);y-=C;if(y<=1)break}}Z.Y=a;Z.frameCount=k.L();Z.interval=k.V/1E3||Z.api.getDuration()/Z.frameCount}for(;Z.thumbnails.length>
Z.Y.length;)Z.thumbnails.pop()?.dispose();for(;Z.thumbnails.length<Z.Y.length;)a=new kAX,Z.thumbnails.push(a),a.HD(Z.L),g.u(Z,a);for(y=0;y<Z.Y.length;y++)a=Z.thumbnails[y].element,T=Z.Y[y],K=Z.G*Z.scale,Q=T.ra/T.rows,q=N/Q,a.style.background=`url(${T.url}) 0 ${-T.row*T.ra/T.rows*q}px/${K*k.columns}px ${Q*T.rows*q}px`,a.style.width=`${K*T.columns}px`,a.style.height=`${N}px`;kk(Z,Z.api.getCurrentTime());for(N=Z.api.getVideoData().ov;Z.U.length>N.length;)Z.U.pop()?.dispose();for(;Z.U.length<N.length;)a=
new Nqy,Z.U.push(new Nqy),g.u(Z,a);for(a=0;a<N.length;a++)T=N[a],Z.U[a].update({chapterTitle:T.title}),T=Math.round(T.startTime/k.V),K=Math.floor(T/k.rows),g.ij(Z.U[a].element,"transform",`translateX(${T%k.rows*Z.G*Z.scale}px)`),K<Z.thumbnails.length&&Z.thumbnails[K]&&Z.U[a].HD(Z.thumbnails[K].element);Z.dA=!0}}};
Tqy=function(Z,k){k>0&&(Z.U=k,Z.j.style.height=`${Z.U}px`)};
KCj=function(Z,k,N,a,T=!1){Tqy(Z,a);N=$Wj(k,N,Z.U,a,T);k=k.length===0?"":g_0(N);Z.api.B("delhi_modern_web_player")?Z.D.setAttribute("d",k):Z.L.setAttribute("d",k);Z.cG=k!=="";g.D(Z.api.getRootNode(),"ytp-heat-map",Z.cG);g.D(Z.api.getRootNode(),"ytp-heat-map-played_bar",Z.api.B("web_player_heat_map_played_bar")&&k!=="");Z.api.B("delhi_modern_web_player")?(Z.Y.style.display="none",Z.V.style.display="none"):Z.D.style.display="none"};
yuy=function(Z,k,N,a,T=!1){Tqy(Z,a);N=xWR(k,N,Z.U,a,T);k=k.length===0?"":g_0(N);Z.api.B("delhi_modern_web_player")?Z.D.setAttribute("d",k):Z.L.setAttribute("d",k);Z.cG=k!=="";g.D(Z.api.getRootNode(),"ytp-heat-map",Z.cG);Z.api.B("delhi_modern_web_player")?(Z.Y.style.display="none",Z.V.style.display="none"):Z.D.style.display="none"};
Nh=function(Z,k){g.ij(Z.V,"width",k)};
a9=function(Z,k){g.ij(Z.V,"margin-right",`${k}px`)};
qJb=function(Z){if(Z.V.length===0){const k=new QH0;Z.V.push(k);g.u(Z,k);k.HD(Z.s6,0)}for(;Z.V.length>1;)Z.V.pop().dispose();Nh(Z.V[0],"100%");Z.V[0].startTime=0;Z.V[0].title=""};
TQ=function(Z){const k=g.fQ(Z.api.X())&&(Z.api.B("web_shorts_pip")||Z.api.B("web_watch_pip"));return!Z.api.getVideoData()?.isLivePlayback&&!Z.api.isMinimized()&&!Z.api.isInline()&&(!Z.api.i9()||!k)};
Cc0=function(Z){const k=new ruR(Z.api);Z.Y.push(k);g.u(Z,k);k.HD(Z.zt)};
Ku=function(Z){for(;Z.C.length;)Z.C.pop().dispose()};
sH0=function(Z){return g.J(g.J(Z.getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.decoratedPlayerBarRenderer,Y2)?.playerBar,mpf)?.chapters};
PcX=function(Z,k){let N=0,a=!1;for(const y of k){if(g.J(y,AuG)){k=g.J(y,AuG);var T={startTime:NaN,title:null,onActiveCommand:void 0},K=k.title;T.title=K?g.YL(K):"";K=k.timeRangeStartMillis;K!=null&&(T.startTime=K);T.onActiveCommand=k.onActiveCommand;k=T;N===0&&k.startTime!==0&&(Z.V[N].startTime=0,Z.V[N].title="",Z.V[N].onActiveCommand=k.onActiveCommand,N++,a=!0);Z.V.length<=N&&(T=new QH0,Z.V.push(T),g.u(Z,T),T.HD(Z.s6,Z.s6.children.length));Z.V[N].startTime=k.startTime;Z.V[N].title=k.title?k.title:
"";Z.V[N].onActiveCommand=k.onActiveCommand;Z.V[N].index=a?N-1:N}N++}for(;N<Z.V.length;)Z.V.pop().dispose();g.yE(Z);QE(Z)};
cuf=function(Z){var k=Z.V;const N=[];for(let T=0;T<k.length;T++)if(!isNaN(k[T].startTime)){var a=k[T].startTime;a=new g.pe(a,T===k.length-1?Infinity:k[T+1].startTime,{namespace:"chapterCueRange",priority:9,id:`c_${a}`});N.push(a)}Z.api.jl("chapterCueRange");Z.api.f8(N)};
rf=function(Z,k){var N=Z.pF[k]?.chapters;N&&(PcX(Z,N),Z.api.getVideoData().ov=Z.V,cuf(Z));if((N=Z.pF[k]?.markers)&&k!=="HEATSEEKER"){Ku(Z);for(var a of N){N=new HBr;var T=g.J(a,g.dpf);T&&(N.title=T.title?.simpleText||"",N.timeRangeStartMillis=T.timeRangeStartMillis??NaN,N.onActiveCommand=T?.onActiveCommand??void 0,XIy(Z,N))}qh(Z,Z.C);a=Z.C;N=Z.GF;T=[];for(var K=0;K<a.length;K++)if(!isNaN(a[K].timeRangeStartMillis)&&a[K].onActiveCommand){var y=ZJR(a[K].timeRangeStartMillis,K===a.length-1?Infinity:
a[K+1].timeRangeStartMillis);T.push(y);N[y.id]=a[K].onActiveCommand}Z.api.f8(T)}if(k=g.J(Z.pF[k]?.heatmap,LCr)){a=k.heatMarkers||[];N=k.minHeightDp??0;T=k.maxHeightDp??60;K=Z.V.length;y=null;for(let q=0;q<K;q++){const r=Z.V[q].startTime,C=q===K-1?Infinity:Z.V[q+1].startTime;q===Z.Y.length&&Cc0(Z);const m=[];y&&m.push(y);for(var Q of a){const A=g.J(Q,w5G)?.timeRangeStartMillis??-1;A>=r&&A<=C&&m.push(Q)}T>0&&(Z.zt.style.height=`${T}px`);KCj(Z.Y[q],m,N,T,q===0);m.length>0&&(y=m[m.length-1])}g.yE(Z);
k=k.heatMarkersDecorations||[];Q=[];for(const q of k)if(k=g.J(q,VG0))a=k.label,Q.push({visibleTimeRangeStartMillis:k.visibleTimeRangeStartMillis??-1,visibleTimeRangeEndMillis:k.visibleTimeRangeEndMillis??-1,decorationTimeMillis:k.decorationTimeMillis??NaN,label:a?g.YL(a):""});Z.heatMarkersDecorations=Q}};
g.yE=function(Z){Z.Sm=Z.V.length-1;Z.qX=0;FCR(Z,!0)&&FCR(Z,!1);var k=0;for(var N=0;N<Z.V.length;N++)if(Z.V[N].width===0){if(N===Z.V.length-1)for(var a=Z.V.length-1;a>=0;a--)if(Z.V[a].width>0){a9(Z.V[a],0);const T=Math.floor(Z.V[a].width);Z.V[a].width=T;Nh(Z.V[a],`${T}px`);break}Z.V[N].width=0;Nh(Z.V[N],"0")}else N===Z.V.length-1?(a=Math.floor(Z.V[N].width+k),Z.V[N].width=a,Nh(Z.V[N],`${a}px`)):(k=Z.V[N].width+k,a=Math.round(k),k-=a,Z.V[N].width=a,Nh(Z.V[N],`${a}px`));N=0;if(Z.Y.length===Z.V.length)for(k=
0;k<Z.Y.length;k++)a=Z.V[k].width,Z.Y[k].element.style.width=`${a}px`,Z.Y[k].element.style.left=`${N}px`,N+=a+Cu(Z);Z.api.B("delhi_modern_web_player")&&(Z.V.length===1?Z.V[0].U.classList.add("ytp-progress-bar-start","ytp-progress-bar-end"):(Z.V[0].U.classList.remove("ytp-progress-bar-end"),Z.V[0].U.classList.add("ytp-progress-bar-start"),Z.V[Z.V.length-1].U.classList.add("ytp-progress-bar-end")))};
QE=function(Z){if(Z.j){var k=Z.api.getProgressState(),N=Z.api.getVideoData();if(!(N&&N.enableServerStitchedDai&&N.Uu)||isFinite(k.current)){N=Z.api.getVideoData()?.dA()&&k.airingStart&&k.airingEnd?mL(Z,k.airingStart,k.airingEnd):Z.api.getPresentingPlayerType()===2?(N=Z.api.getVideoData()?.getPlayerResponse()?.playerConfig?.webPlayerConfig?.skippableAdProgressBarDuration)?mL(Z,k.seekableStart,N/1E3):mL(Z,k.seekableStart,k.seekableEnd):mL(Z,k.seekableStart,k.seekableEnd);var a=eM(N,k.loaded,0);k=eM(N,
k.current,0);var T=Z.D.U!==N.U||Z.D.V!==N.V;Z.D=N;s7(Z,k,a);T&&tGi(Z);h5f(Z);k=48;N=Z.api.X();a=g.Q5(Z.api.X().experiments,"delhi_modern_web_player_responsive_compact_controls_threshold");a=Z.api.B("delhi_modern_web_player_compact_controls")||a>0&&Z.api.getPlayerSize().width<=a;Z.api.B("delhi_modern_web_player")?k=Z.api.getPlayerSize().width<=528?a?56:64:Z.G?a?72:96:a?56:72:Z.G?k=54:g.PQ(N)&&!N.U&&(k=40);Z.xW=k}}};
qh=function(Z,k){for(const N of k){k=AU(Z,N.timeRangeStartMillis/(Z.D.V*1E3),PE(Z));const a=Z.api.B("delhi_modern_web_player")?.667:.6;g.ij(N.element,"transform",`translateX(${k}px) scaleX(${a})`)}};
lY0=function(Z,k){k=g.J(k.getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.decoratedPlayerBarRenderer,Y2);if(k?.progressColor)for(let N=0;N<Z.V.length;N++)Z.V[N].lq("PLAY_PROGRESS").style.background=wcy(k.progressColor);k=g.J(k?.playhead,uxy);Z.FS=k?.playheadImage?.thumbnails&&k?.playheadImage?.thumbnails[0].url;Z.hp=k?.playheadFastForwardImage?.thumbnails&&k?.playheadFastForwardImage?.thumbnails[0].url;Z.bq=k?.playheadRewindImage?.thumbnails&&k?.playheadRewindImage?.thumbnails[0].url;
g.D(Z.FE,"ytp-decorated-scrubber-container",!!Z.FS&&!Z.api.fF().BF);k?.loggingDirectives?.trackingParams&&(Z.api.setTrackingParams(Z.dA,k?.loggingDirectives?.trackingParams),Z.api.createServerVe(Z.dA,Z));Z.FS&&!Z.api.fF().BF&&(Z.dA.src=Z.FS);Z.hp&&fetch(Z.hp,{cache:"force-cache"});Z.bq&&fetch(Z.bq,{cache:"force-cache"})};
XIy=function(Z,k){Z.C.push(k);g.u(Z,k);k.HD(Z.LX,Z.LX.children.length)};
AU=function(Z,k,N){var a=-1;for(var T of Z.V)k*Z.D.V*1E3>T.startTime&&T.width>0&&a++;a=a<0?0:a;T=N.V-Cu(Z)*Z.Sm;return k*T+Cu(Z)*a+N.Y};
PE=function(Z){let k=Z.Tt.x;k=g.u0(k,0,Z.j);Z.Vg.update(k,Z.j);return Z.Vg};
FCR=function(Z,k){let N=0,a=!1;const T=Z.V.length;let K=Z.D.V*1E3;K===0&&(K=Z.api.getProgressState().seekableEnd*1E3);if(K>0&&Z.j>0){const q=Z.j-Cu(Z)*Z.Sm,r=Z.qX===0?3:q*Z.qX;for(var y of Z.V)y.width=0;for(;N<T;){let C=K-Z.V[N].startTime;N<T-1&&(C=Z.V[N+1].startTime-Z.V[N].startTime,a9(Z.V[N],Cu(Z)));g.D(Z.V[N].V,"ytp-exp-chapter-hover-container",Z.V.length>1);const m=(K===0?0:C/K*q)+Z.V[N].width;if(m>r)Z.V[N].width=m;else{Z.V[N].width=0;y=Z;var Q=N;const A=y.V[Q-1];A!==void 0&&A.width>0?A.width+=
m:Q<y.V.length-1&&(y.V[Q+1].width+=m);a9(y.V[Q],0);k&&(Z.Sm--,C/K>Z.qX&&(Z.qX=C/K),a=!0)}N++}}return a};
Cu=function(Z){return Z.api.B("delhi_modern_web_player")?4:Z.G?3:2};
mL=function(Z,k,N){return cE(Z)?new HE(Math.max(k,Z.vA.startTimeMs/1E3),Math.min(N,Z.vA.endTimeMs/1E3)):new HE(k,N)};
s7=function(Z,k,N){Z.O=k;Z.O6=N;const a=PE(Z);var T=Z.D.V,K=iIi(Z.D,Z.O),y=g.DH("$PLAY_PROGRESS of $DURATION",{PLAY_PROGRESS:g.Gh(K,!0),DURATION:g.Gh(T,!0)}),Q=vT(Z.V,K*1E3);Q=Z.V[Q].title;Z.update({ariamin:Math.floor(Z.D.U),ariamax:Math.floor(T),arianow:Math.floor(K),arianowtext:Q?Q+" "+y:y});T=Z.clipStart;K=Z.clipEnd;Z.vA&&Z.api.getPresentingPlayerType()!==2&&(T=Z.vA.startTimeMs/1E3,K=Z.vA.endTimeMs/1E3);T=eM(Z.D,T,0);Q=eM(Z.D,K,1);y=Z.api.getVideoData();K=g.u0(k,T,Q);N=y?.jY()?1:g.u0(N,T,Q);k=
AU(Z,k,a);g.ij(Z.FE,"transform",`translateX(${k}px)`);Z.api.B("delhi_modern_web_player")&&Z.api.B("delhi_modern_web_player_cutout")&&df(Z,k);XV(Z,a,T,K,"PLAY_PROGRESS");y?.dA()?(k=Z.api.getProgressState().seekableEnd)&&XV(Z,a,K,eM(Z.D,k),"LIVE_BUFFER"):XV(Z,a,T,N,"LOAD_PROGRESS");Z.api.B("web_player_heat_map_played_bar")&&Z.Y[0]?.N(K)};
tGi=function(Z){Z.A1.style.removeProperty("height");for(const k of Object.keys(Z.MX))fY0(Z,k);Lu(Z);s7(Z,Z.O,Z.O6)};
h5f=function(Z){if(!Z.api.getVideoData()?.dA()){var k=PE(Z);XV(Z,k,Z.O,Math.max(k.U,Z.O),"HOVER_PROGRESS");var N=VE(Z,k.V*Z.O,!0),a=VE(Z,k.D,!0);for(let T=N;T<=a;T++)g.D(Z.V[T].D,"ytp-hover-progress-light",k.U>Z.O);g.D(Z.A1,"ytp-scrubber-button-hover",N===a&&Z.V.length>1);Z.api.B("web_player_heat_map_played_bar")&&Z.Y[0]?.C(k.U)}};
cE=function(Z){return!!Z.vA?.postId&&Z.api.getPresentingPlayerType()!==2};
FV=function(Z,k,N,a,T){k=BqX(Z,k);N=BqX(Z,N);Z=Z.progressBar.visualElement;a={seekData:{startMediaTimeMs:k,endMediaTimeMs:N,seekSource:a}};(k=g.C9())&&RE(k,Z,T,a)};
hU=function(Z,k){k?Z.N||(Z.element.removeAttribute("aria-disabled"),Z.N=new g.tU(Z.progressBar,!0),Z.api.B("enable_smart_skip_player_controls_shown_on_web_increased_triggering_sensitivity")&&Z.N.subscribe("hoverstart",Z.eL,Z),Z.N.subscribe("hovermove",Z.qY,Z),Z.N.subscribe("hoverend",Z.yI,Z),Z.N.subscribe("dragstart",Z.nm,Z),Z.N.subscribe("dragmove",Z.Vp,Z),Z.N.subscribe("dragend",Z.Ox,Z),Z.api&&Z.api.B("delhi_modern_web_player")&&Z.api.B("delhi_modern_web_player_cutout")&&(Z.PG=new g.tU(Z.progressBar,
!0),Z.PG.subscribe("hoverstart",()=>{Z.gV=!0;df(Z)},Z),Z.PG.subscribe("hoverend",()=>{Z.gV=!1;
df(Z)},Z)),Z.YH=Z.listen("keydown",Z.Kn)):Z.N&&(Z.element.setAttribute("aria-disabled","true"),Z.Ce(Z.YH),Z.N.cancel(),Z.N.dispose(),Z.N=null)};
u4=function(Z){Z.U&&(Z.U.disable(),Z.Qz=0,Z.zt.style.removeProperty("transform"),Z.progressBar.style.removeProperty("transform"),Z.hq.style.removeProperty("height"),Z.element.parentElement&&Z.element.parentElement.style.removeProperty("height"))};
Dpf=function(Z,k){if(Z.vA?.type==="repeatChapter"||k?.type==="repeatChapter")k&&(k=Z.V[vT(Z.V,k.startTimeMs)],g.D(k.V,"ytp-repeating-chapter",!1)),Z.vA&&(k=Z.V[vT(Z.V,Z.vA.startTimeMs)],g.D(k.V,"ytp-repeating-chapter",!0)),Z.V.forEach(N=>{g.D(N.V,"ytp-exp-chapter-hover-container",!Z.vA)})};
Lu=function(Z){var k=!!Z.vA&&Z.api.getPresentingPlayerType()!==2;let N=Z.clipStart;var a=Z.clipEnd;let T=!0,K=!0;k&&Z.vA?(N=Z.vA.startTimeMs/1E3,a=Z.vA.endTimeMs/1E3):(T=N>Z.D.U,K=Z.D.V>0&&a<Z.D.V);if(Z.vA?.postId||Z.vA?.type==="repeatChapter")K=T=!1;g.D(Z.element,"ytp-loop-range-enabled",k);g.D(Z.element,"ytp-clip-start-enabled",T);g.D(Z.element,"ytp-clip-end-enabled",K);k=T?eM(Z.D,N,0):0;a=K?eM(Z.D,a,1):1;Z.jY.style.left=`${Math.round(k*1E3)/10}%`;Z.HA.style.left=`${Math.round(a*1E3)/10}%`;Z.rD.style.width=
`${Math.round(k*1E3)/10}%`;Z.FN.style.left=`${Math.round(a*1E3)/10}%`;Z.FN.style.width=`${Math.round((1-a)*1E3)/10}%`};
l4=function(Z,k){var N=iIi(Z.D,k.U);if(Z.V.length>1){N=VE(Z,k.D,!0);let a=0;for(let T=0;T<N;T++)Z.V[T].width>0&&(a+=Z.V[T].width,a+=Cu(Z));N=(Z.V[N].startTime+(k.D-a)/Z.V[N].width*((N===Z.V.length-1?Z.D.V*1E3:Z.V[N+1].startTime)-Z.V[N].startTime))/1E3||0}return N};
VE=function(Z,k,N=!1){let a=0;N&&(k-=OBU(Z,k)*Cu(Z));for(const T of Z.V){if(k>T.width)k-=T.width;else break;a++}return a===Z.V.length?a-1:a};
vVb=function(Z,k){const N=k/((Z.G?135:90)-Z.xW)*Z.xW;g.ij(Z.progressBar,"transform",`translateY(${-k}px)`);g.ij(Z.zt,"transform",`translateY(${-k}px)`);g.ij(Z.hq,"transform",`translateY(${N}px)`);Z.hq.style.height=`${k+N}px`;Z.element.parentElement&&(Z.element.parentElement.style.height=`${Z.xW-N}px`)};
BqX=function(Z,k){if(k<0)return"0";Z=Math.floor(Math.min(k,Z.api.getDuration())*1E3);return Z>2**31-1?"0":String(Z)};
iBG=function(Z,k,N){if(N>=Z.V.length)return!1;const a=Z.j-Cu(Z)*Z.Sm;return Math.abs(k-Z.V[N].startTime/1E3)/Z.D.V*a<4};
fY0=function(Z,k){var N=Z.MX[k];k=Z.iq[k];const a=PE(Z);let T=eM(Z.D,N.start/1E3,0),K;const y=YsU(N,Z.G)/a.width;K=eM(Z.D,N.end/1E3,1);y!==Number.POSITIVE_INFINITY&&(T=g.u0(T,0,K-y));K=Math.min(K,T+y);N.color&&(k.style.background=N.color);N=T;k.style.left=`${Math.max(N*a.V+a.Y,0)}px`;fu(Z,k,g.u0((K-N)*a.V+a.Y,0,a.width),a.width,!0)};
df=function(Z,k){Z.api.getPresentingPlayerType()!==1?Z.s6.style.removeProperty("clip-path"):(k||(k=AU(Z,Z.O,PE(Z))),Z.s6.style.clipPath='path("'+(Z.gV?gV0(Z,8,k,Z.G?50:36,0,6):gV0(Z,4,k,Z.G?34:24,2,3))+'")')};
XV=function(Z,k,N,a,T){var K=Z.V.length,y=k.V-Z.Sm*Cu(Z),Q=N*y;N=VE(Z,Q);var q=a*y;y=VE(Z,q);T==="HOVER_PROGRESS"&&(y=VE(Z,k.V*a,!0),q=k.V*a-OBU(Z,k.V*a)*Cu(Z));a=Math.max(Q-wIj(Z,N),0);for(Q=N;Q<K;Q++)Z.V[Q].lq(T).style.left=N===Q?`${a}px`:"0";k=AU(Z,Z.O,k);for(K=N;K<y;K++){Q=Z.V[K].lq(T);const r=Z.V[K].width,C=K===N?r-a:r;fu(Z,Q,C,r);$pf(Z,Q,C,r,K,k,T)}K=Z.V[y].width;q=g.u0(q-wIj(Z,y),0,K);N===y&&(q-=a);a=Z.V[y].lq(T);fu(Z,a,q,K);$pf(Z,a,q,K,y,k,T);q=y;y=Z.V.length;for(q+=1;q<y;q++)xpr(Z,q,T);for(y=
0;y<N;y++)xpr(Z,y,T)};
gV0=function(Z,k,N,a,T,K){const y=N-a/2;N+=a/2;k+=T;return`M 0 ${T} L 0 ${k} L ${y} ${k} C ${y+K} ${k} ${y+K} ${T} ${y} ${T} L 0 ${T} M ${N} ${T} L ${Z.j} ${T} L ${Z.j} ${k} L ${N} ${k} C ${N-K} ${k} ${N-K} ${T} ${N} ${T}`};
OBU=function(Z,k){const N=Z.V.length;let a=0;for(const T of Z.V)if(T.width!==0)if(k>T.width)k-=T.width,k-=Cu(Z),a++;else break;return a===N?N-1:a};
wIj=function(Z,k){if(k>=Z.V.length)return Z.j;let N=0,a=0;for(;a<k;)N+=Z.V[a].width,a++;return N};
fu=function(Z,k,N,a,T){T||Z.api.X().U?k.style.width=`${N}px`:g.ij(k,"transform",`scalex(${a?N/a:0})`)};
$pf=function(Z,k,N,a,T,K,y){y==="PLAY_PROGRESS"&&(N=!a||Z.api.X().U?1:N/a,Z.rD.clientWidth>0||Z.FN.clientWidth>0?(K=k.clientWidth/N,Z=-1*Z.rD.clientWidth/N):(K/=N,Z=-1*Z.V[T].element.offsetLeft/N),g.ij(k,"background-size",`${K}px`),g.ij(k,"background-position-x",`${Z}px`))};
xpr=function(Z,k,N){N=Z.V[k].lq(N);fu(Z,N,0,Z.V[k].width)};
g.GAG=function(Z,k,N,a){const T=Z.j!==N,K=Z.G!==a;Z.Oq=k;Z.j=N;Z.G=a;TQ(Z)&&Z.U?.hq(a);tGi(Z);Z.V.length===1&&(Z.V[0].width=N||0);T&&g.yE(Z);Z.U&&K&&TQ(Z)&&(Z.U.isEnabled&&(k=Z.G?135:90,N=k-Z.xW,Z.hq.style.height=`${k}px`,g.ij(Z.zt,"transform",`translateY(${-N}px)`),g.ij(Z.progressBar,"transform",`translateY(${-N}px)`)),aYf(Z.U))};
SJy=function(Z,k){const N=k.getId();Z.MX[N]===k&&(g.rM(Z.iq[N]),delete Z.MX[N],delete Z.iq[N])};
BE=function(Z,k){Z.U=!!k;Z.V(Z.S.fF().getPlayerSize())};
e5y=function(Z,k,N,a){k={J:"span",BD:a,A:[k]};let T;a="ytp-swatch-color";if(Z.O||Z.L)a="ytp-swatch-color-white";N==="highres"?T="8K":N==="hd2880"?T="5K":N==="hd2160"?T="4K":N.indexOf("hd")===0&&N!=="hd720"&&(T="HD");T&&(k.A.push(" "),k.A.push({J:"sup",Z:a,Da:T}));return k};
oVb=function(Z,k,N){const a=Z.tq[k],T=g.ff[k];return e5y(Z,a?a.qualityLabel:T?`${T}p`:"Auto",k,N)};
DC=function(Z,k,N,a,T){const K=(k=Z.L?Z.G[k]:Z.xW[k])&&k.quality;var y=k&&k.qualityLabel;y=y?y:"Auto";a&&(y=`(${y}`);Z=e5y(Z,y,K||"",T);a&&Z.A.push(")");(a=(a=k&&k.paygatedQualityDetails)&&a.paygatedIndicatorText)&&N&&Z.A.push({J:"div",Z:"ytp-premium-label",Da:a});return Z};
O7=function(Z,k){Z=Number(g.u0(k,Z.D,Z.Y).toFixed(2));k=Math.floor((Z+.001)*100%5+2E-15);let N=Z;k!==0&&(N=Z-k*.01);return Number(N.toFixed(2))};
Juf=function(Z,k){const N=vE(k);Z.L&&(Z.zt||k===Z.xW)?(Z.U(Z.L),Z.setContent(k.toString())):Z.U(N)};
Upy=function(Z){var k=Z.O.map(vE);Z.G&&k.push(Z.G);Z.Y(k);Z.L=null;Z.xW=null;k=Z.S.getPlaybackRate();i4(Z.S)&&z5b(Z,k);!Z.O.includes(k)||Z.zt?Z.U(Z.L):Z.U(vE(k))};
z5b=function(Z,k){Z.xW=k;Z.L=g.DH("Custom ($CURRENT_CUSTOM_SPEED)",{CURRENT_CUSTOM_SPEED:k.toString()});k=Z.O.map(vE);k.unshift(Z.L);Z.G&&k.push(Z.G);Z.Y(k)};
bBf=function(Z,k,N,a){N=new g.y9({J:"div",BD:["ytp-menuitem"],W:{tabindex:"0",role:"menuitemradio","aria-checked":a?"true":"false"},A:[{J:"div",BD:["ytp-menuitem-label"],A:[{J:"div",BD:["ytp-menuitem-container-with-badge"],A:[{J:"div",Da:"{{label}}"},Z.dA]}]}]},N,Z.D(k));N.listen("click",()=>{Z.vD(k)});
return N};
vE=function(Z){return Z.toString()};
i4=function(Z){return Z.B("web_settings_menu_surface_custom_playback")};
pIb=function(Z,k){return!!k&&Z.getAvailablePlaybackRates()[Z.getAvailablePlaybackRates().length-1]<=2};
gf=function(Z){return Z.B("web_settings_menu_surface_custom_playback")&&Z.B("web_settings_use_input_slider")};
R5f=function(Z,k){Z.publish("settingChange",Z.setting+"Override",!k);Z.on.gr()};
MGG=function(Z,k){Z.languages=g.fK(k,Z.L,Z);Z.Y(g.ni(k,Z.L))};
nVX=function(Z,k){Z.S.setOption("captions","sampleSubtitles",k)};
wf=function(Z){return Object.values(Z.tracks).find(k=>k.languageCode==="en"&&k.kind==="asr")};
$k=function(Z,k){Z.S.setOption("captions","track",k)};
IYy=function(Z,k){Z.settingsButton=k;Z.element.id=k.element.getAttribute("aria-controls")};
jHy=function(Z){if(Z.S.B("delhi_modern_web_player_icons"))return Z=EK.includes("en")?xk(Z)&&Z.isEnabled()?{J:"svg",W:{height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{d:"M21 3H3C2.46 3 1.96 3.21 1.58 3.58C1.21 3.96 1 4.46 1 5V19C1 19.53 1.21 20.03 1.58 20.41C1.96 20.78 2.46 21 3 21H21C21.53 21 22.03 20.78 22.41 20.41C22.78 20.03 23 19.53 23 19V5C23 4.46 22.78 3.96 22.41 3.58C22.03 3.21 21.53 3 21 3ZM9.03 8.08L9.29 8.16C9.79 8.35 10.24 8.65 10.60 9.05L10.77 9.26L10.83 9.34C10.96 9.55 11.01 9.80 10.96 10.05C10.92 10.29 10.79 10.51 10.59 10.66C10.40 10.81 10.15 10.89 9.91 10.87C9.66 10.85 9.43 10.74 9.26 10.57L9.19 10.49L9.11 10.39C8.98 10.24 8.81 10.12 8.62 10.05L8.54 10.02C8.32 9.97 8.10 10.00 7.91 10.11C7.67 10.24 7.48 10.43 7.35 10.67L7.28 10.79C7.09 11.16 6.99 11.58 7 12L7.00 12.16C7.02 12.52 7.11 12.88 7.28 13.20L7.35 13.32C7.48 13.56 7.67 13.75 7.91 13.88L7.99 13.92C8.16 14.00 8.35 14.02 8.54 13.97L8.62 13.94C8.85 13.85 9.05 13.70 9.19 13.50L9.26 13.43C9.44 13.24 9.68 13.13 9.93 13.12C10.19 13.11 10.44 13.20 10.63 13.37C10.82 13.53 10.94 13.77 10.97 14.02C11.00 14.27 10.93 14.53 10.77 14.73C10.39 15.23 9.88 15.61 9.29 15.83L9.03 15.91C8.43 16.06 7.79 16.01 7.21 15.77L6.97 15.65C6.42 15.35 5.95 14.90 5.64 14.36L5.50 14.12C5.21 13.55 5.04 12.92 5.00 12.27L5 12C4.99 11.26 5.17 10.53 5.50 9.87L5.64 9.63C5.96 9.09 6.42 8.64 6.97 8.34C7.60 8.00 8.34 7.91 9.03 8.08ZM17.03 8.08L17.29 8.16C17.79 8.35 18.24 8.65 18.60 9.05L18.77 9.26L18.83 9.34C18.96 9.55 19.01 9.80 18.96 10.05C18.92 10.29 18.79 10.51 18.59 10.66C18.40 10.81 18.15 10.89 17.91 10.87C17.66 10.85 17.43 10.74 17.26 10.57L17.19 10.49L17.11 10.39C16.98 10.24 16.81 10.12 16.62 10.05L16.54 10.02C16.32 9.97 16.10 10.00 15.91 10.11C15.67 10.24 15.48 10.43 15.35 10.67L15.28 10.79C15.09 11.16 14.99 11.58 15 12L15.00 12.16C15.02 12.52 15.11 12.88 15.28 13.20L15.35 13.32C15.48 13.56 15.67 13.75 15.91 13.88L15.99 13.92C16.16 14.00 16.35 14.02 16.54 13.97L16.62 13.94C16.85 13.85 17.05 13.70 17.19 13.50L17.26 13.43C17.44 13.24 17.68 13.13 17.93 13.12C18.19 13.11 18.44 13.20 18.63 13.37C18.82 13.53 18.94 13.77 18.97 14.02C19.00 14.27 18.93 14.53 18.77 14.73C18.39 15.23 17.88 15.61 17.29 15.83L17.03 15.91C16.43 16.06 15.79 16.01 15.21 15.77L14.97 15.65C14.42 15.35 13.95 14.90 13.64 14.36L13.50 14.12C13.21 13.55 13.04 12.92 13.00 12.27L13 12C12.99 11.26 13.17 10.53 13.50 9.87L13.64 9.63C13.96 9.09 14.42 8.64 14.97 8.34C15.60 8.00 16.34 7.91 17.03 8.08Z",
fill:"white"}}]}:KZ():xk(Z)&&Z.isEnabled()?{J:"svg",W:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{d:"M21 3H3C2.46 3 1.96 3.21 1.58 3.58C1.21 3.96 1 4.46 1 5V19C1 19.53 1.21 20.03 1.58 20.41C1.96 20.78 2.46 21 3 21H21C21.53 21 22.03 20.78 22.41 20.41C22.78 20.03 23 19.53 23 19V5C23 4.46 22.78 3.96 22.41 3.58C22.03 3.21 21.53 3 21 3ZM6 11H8C8.26 11 8.51 11.10 8.70 11.29C8.89 11.48 9 11.73 9 12C9 12.26 8.89 12.51 8.70 12.70C8.51 12.89 8.26 13 8 13H6C5.73 13 5.48 12.89 5.29 12.70C5.10 12.51 5 12.26 5 12C5 11.73 5.10 11.48 5.29 11.29C5.48 11.10 5.73 11 6 11ZM12 11H18C18.26 11 18.51 11.10 18.70 11.29C18.89 11.48 19 11.73 19 12C19 12.26 18.89 12.51 18.70 12.70C18.51 12.89 18.26 13 18 13H12C11.73 13 11.48 12.89 11.29 12.70C11.10 12.51 11 12.26 11 12C11 11.73 11.10 11.48 11.29 11.29C11.48 11.10 11.73 11 12 11ZM16 15H18C18.26 15 18.51 15.10 18.70 15.29C18.89 15.48 19 15.73 19 16C19 16.26 18.89 16.51 18.70 16.70C18.51 16.89 18.26 17 18 17H16C15.73 17 15.48 16.89 15.29 16.70C15.10 16.51 15 16.26 15 16C15 15.73 15.10 15.48 15.29 15.29C15.48 15.10 15.73 15 16 15ZM6 15H12C12.26 15 12.51 15.10 12.70 15.29C12.89 15.48 13 15.73 13 16C13 16.26 12.89 16.51 12.70 16.70C12.51 16.89 12.26 17 12 17H6C5.73 17 5.48 16.89 5.29 16.70C5.10 16.51 5 16.26 5 16C5 15.73 5.10 15.48 5.29 15.29C5.48 15.10 5.73 15 6 15Z",
fill:"white"}}]}:ZIy()};
xk=function(Z){return g.pY(Z.S.GZ())!=null?g.pY(Z.S.GZ()).FG()?!!Z.S.getOption("captions","tracklist",{includeAsr:!0}).length:!0:!1};
EVf=function(Z,k){const N=Z.liveBadge.element,a=Z.api.isLifaAdPlaying();N.disabled=a||k;!GQ(Z)||Z.C===k&&Z.j===Z.liveIndicatorText&&Z.G===Z.isPremiere||(Z.C=k,Z.j=Z.liveIndicatorText,Z.G=Z.isPremiere,Z.MW(),k?N.classList.add("ytp-live-badge-is-livehead"):N.classList.remove("ytp-live-badge-is-livehead"),Z.liveIndicatorText?Z.liveBadge.setContent(Z.liveIndicatorText):Z.liveBadge.setContent(Z.isPremiere?"Premiere":"Live"),k?Z.V&&(Z.V(),Z.V=null,N.removeAttribute("data-tooltip-title")):(N.setAttribute("data-tooltip-title",
"Skip ahead to live broadcast."),Z.V=g.ua(Z.tooltip,Z.liveBadge.element)))};
WCj=function(Z,k){const N=Z.vA!==k;Z.vA=k;N&&Sd(Z)};
ed=function(Z){return!!Z.vA&&!!Z.vA.postId&&Z.api.getPresentingPlayerType()!==2&&(!Z.vA.type||Z.vA.type==="clips")};
GQ=function(Z){const k=Z.api.X().B("enable_linear_program_progress"),N=Z.api.getPresentingPlayerType()===2;return Z.rK&&!ed(Z)&&(!k||!Z.U)&&!N};
Sd=function(Z){Z.updateValue("clipicon",{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 24 24",width:"100%"},A:[{J:"path",W:{d:"M22,3h-4l-5,5l3,3l6-6V3L22,3z M10.79,7.79C10.91,7.38,11,6.95,11,6.5C11,4.01,8.99,2,6.5,2S2,4.01,2,6.5S4.01,11,6.5,11 c0.45,0,.88-0.09,1.29-0.21L9,12l-1.21,1.21C7.38,13.09,6.95,13,6.5,13C4.01,13,2,15.01,2,17.5S4.01,22,6.5,22s4.5-2.01,4.5-4.5 c0-0.45-0.09-0.88-0.21-1.29L12,15l6,6h4v-2L10.79,7.79z M6.5,8C5.67,8,5,7.33,5,6.5S5.67,5,6.5,5S8,5.67,8,6.5S7.33,8,6.5,8z M6.5,19C5.67,19,5,18.33,5,17.5S5.67,16,6.5,16S8,16.67,8,17.5S7.33,19,6.5,19z"}}]});
Z.rK&&!Z.U?Z.updateValue("watchfullvideo","Watch live stream"):Z.updateValue("watchfullvideo","Watch full video");g.D(Z.element,"ytp-clip",ed(Z));g.D(Z.element,"ytp-live",GQ(Z))};
YJf=function(Z,k){Z.In(k.width>=350)};
o9=function(Z,k,N){var a=Math.floor(k),T=`${a}% ${"volume"}`+(N?" muted":"");N=N?0:k/100;Z.updateValue("valuenow",a);Z.updateValue("valuetext",T);a=Z.D?78:52;T=!Z.api.B("delhi_modern_web_player")&&Z.D?18:12;Z.vD.style.left=`${(a-T)*N}px`;Z.volume=k};
ZYy=function(Z){const k=Z.api.dQ();Z.D!==k&&(Z.D=k,o9(Z,Z.api.getVolume(),Z.api.isMuted()))};
JU=function(Z,k,N,a,T){const K=Z.V||Z.isDragging||Z.U||Z.Ex;Z.V=k;Z.isDragging=N;Z.U=a;Z.Ex=T;k=Z.V||Z.isDragging||Z.U||Z.Ex;K!==k&&(k?Z.L=Z.K(Z.element,"wheel",Z.xW):(Z.Ce(Z.L),Z.L=null),g.D(Z.G,"ytp-volume-slider-active",k))};
zQ=function(Z,k,N,a,T){k.HD(N,T);Z.S.B("frosted_glass_controls_opacity_animation")&&(Z=k.element,a&&(Z=k.Lp(a)),Z.classList.add("ytp-autohide-fade-transition"))};
b4=function(Z,k,N){Z.S.B("delhi_modern_web_player")?k.HD(Z.Y.Lp(U7[N])):k.HD(Z.Y.element)};
kx0=function(Z){Z.V.element.classList.toggle("ytp-xsmall-width-right-controls-expanded",Z.C.isExpanded())};
NTi=function(Z,k){Z.S.getPlayerStateObject().isCued()||k?k&&(Z.dA.hide(),Z.FS.hide(),Z.muteButton&&Z.muteButton.Df(!1),Z.G&&Z.G.Df(!1),Z.L&&Z.L.Df(!1),Z.S.qd(Z.lq())):k||(Z.dA.show(),Z.FS.show(),Z.muteButton&&Z.muteButton.Df(!0),Z.G&&Z.G.Df(!0),Z.L&&Z.L.Df(!0),Z.zD())};
pu=function(Z){if(Z.S.B("web_player_rtr_ctrls")&&Z.S.fF().BF)return 0;const k=Z.S.dQ(),N=Z.S.getVideoData().o4;let a=0;Z.S.dQ()&&Z.S.isEmbedsShortsMode()&&(a=(Z.S.fF().getPlayerSize().width-Z.S.getVideoContentRect().width)/2);return 12*(N?0:k?2:1)+a};
aOj=function(Z){const k=Z.S.fF().getPlayerSize().width;return Math.max(k-pu(Z)*2,100)};
R9=function(Z){var k=Z.S.dQ()?72:50;const N=Z.S.X();g.fQ(N)&&(N.B("delhi_modern_web_player")?(k=g.Q5(N.experiments,"delhi_modern_web_player_responsive_compact_controls_threshold"),k=Z.S.B("delhi_modern_web_player_compact_controls")||k>0&&Z.S.getPlayerSize().width<=k,k=Z.S.dQ()?N.B("delhi_modern_web_player_big_mode_consistent_pill_height")?100:112:k?70:78,Z.S.getRootNode().classList.contains("ytp-fullscreen-grid-peeking")&&(Z=getComputedStyle(Z.S.getRootNode()).getPropertyValue("--ytp-grid-peek-height")||
"36px",k+=Number(Z.replace("px","")))):k=62,g.s$(N)&&(k=54));return k};
TTX=function(Z){Z.suggestedActions={};Z.S.jl("suggested_action_button_visible");Z.V=null;Z.S.setTrackingParams(Z.badge.element,null);Z.D=!1;Z.Y=!1};
KTR=function(Z){Z.updateValue("channelLink","");Z.updateValue("channelName","");g.s$(Z.api.X())||Z.api.B("enable_channel_title_always_focusable")?Z.updateValue("channelTitleFocusable","0"):Z.updateValue("channelTitleFocusable","-1")};
g.ua=function(Z,k){if(Z.dA)return()=>{};
k.addEventListener("mouseover",Z.G);k.addEventListener("focus",Z.G);const N=Z.env.B("player_tooltip_data_title_killswitch")?k.getAttribute("title"):k.getAttribute("data-tooltip-title");N&&!k.hasAttribute("aria-label")&&k.setAttribute("aria-label",N);return()=>{Z.V===k&&Z.L();k.removeEventListener("mouseover",Z.G);k.removeEventListener("focus",Z.G)}};
Mh=function(Z){let k;if(Z.V){k=Z.V.getAttribute("data-tooltip-text");if(Z.D&&Z.V.getAttribute("aria-label")!==Z.D)var N=Z.D;var a=Z.V.getAttribute("aria-keyshortcuts"),T=Z.V.getAttribute("data-title-no-tooltip");a&&T&&(N=g.DH("$BUTTON_TITLE keyboard shortcut $SHORTCUT_KEY",{BUTTON_TITLE:T,SHORTCUT_KEY:a}));N&&Z.V.setAttribute("aria-label",N);if(k&&!Z.C){y10(Z,!0);var K=Z.V;Z.updateValue("text",k);N=K.getAttribute("data-duration");Z.update({title:Z.D,duration:N});K=K.getAttribute("data-preview");Z.env.B("delhi_modern_web_player")?
(Z.updateValue("title",T),Z.updateValue("keyBoardShortcutTitle",a.toUpperCase())):y10(Z,!1);a=243*Z.scale;T=141*Z.scale;Z.bg.style.width=`${a}px`;Z.bg.style.height=`${T}px`;Z.bg.style.backgroundImage=K?`url(${K})`:"";Z.bg.style.backgroundSize=`${a}px ${T}px`;Z.wrapper.style.width=`${a}px`;g.Ec(Z.element,["ytp-text-detail","ytp-preview"]);g.D(Z.element,"ytp-has-duration",!!N)}else T&&a&&Z.env.B("delhi_modern_web_player")?(Z.updateValue("text",T),Z.updateValue("keyBoardShortcut",a.toUpperCase())):Z.updateValue("text",
Z.D),g.Y3(Z.element,["ytp-text-detail","ytp-preview","ytp-has-duration"]);N=Z.V;N.hasAttribute("data-tooltip-offset-y")?(N=Number(N.getAttribute("data-tooltip-offset-y")),N=isNaN(N)?0:N):N=0;Q1r(Z,!!k,void 0,N)}};
y10=function(Z,k){Z.env.B("delhi_modern_web_player")&&Z.scale!==.6&&(Z.scale=k?.8:1)};
q8y=function(Z,k){g.D(Z.element,"ytp-preview",k>=0);if(!(k<0||k===Z.Y)){Z.Y=k;k=243*Z.scale;var N=141*Z.scale,a=noX(Z.U,Z.Y,k);vTy(Z.bg,a,k,N,!0);Z.zt.start()}};
Q1r=function(Z,k,N,a){const T=Math.min(Z.Ss,300*Z.scale);Z.element.style.maxWidth=k?"":`${T}px`;Z.Rq.U1(Z.element,Z.V,N,Z.type===1,a);Z.element.style.top?g.jX(Z.element,"ytp-bottom"):Z.element.style.bottom&&g.jX(Z.element,"ytp-top");Z.type===3&&Z.xW.start()};
r1X=function(Z,k,N,a){if(k&&!k.hasAttribute)Z=new g.jD("showElementTooltip called with non-element.",k.toString()),g.b(Z);else{isNaN(Z.Y)||(Z.Y=NaN,Z.bg.style.background="");g.Wp(Z.element,"ytp-tooltip-progress-bar-style");Z.V=k;Z.C=!!a;a?Z.D=a:(Z.env.B("player_tooltip_data_title_killswitch")?Z.D=k.getAttribute("title"):Z.D=k.getAttribute("data-tooltip-title"),Z.env.B("player_tooltip_data_title_killswitch")?k.removeAttribute("title"):k.removeAttribute("data-tooltip-title"));g.nj(Z.element,"ytp-tooltip");
Z.api.B("frosted_glass_controls_opacity_animation")&&g.jX(Z.element,"ytp-frosted-glass-fade-transition");var T=k.getAttribute("data-tooltip-image");T&&(Z.image.style.backgroundImage=`url(${T})`);a?Z.update({ariaHidden:"false"}):Z.update({ariaHidden:"true"});g.D(Z.element,"ytp-tooltip-image-enabled",!!T);k=k.getAttribute("data-tooltip-opaque");g.D(Z.element,"ytp-tooltip-opaque",!!k);Z.type=N;Z.api.addEventListener("appresize",Z.O);Z.j&&(Mh(Z),Z.fade.show(0))}};
Cur=function(Z){const k=Z.V;Z.type===3&&Z.xW.stop();Z.api.removeEventListener("appresize",Z.O);Z.C||(Z.env.B("player_tooltip_data_title_killswitch")?k.setAttribute("title",Z.D):k.setAttribute("data-tooltip-title",Z.D));Z.D="";Z.V=null;Z.update({keyBoardShortcut:"",keyBoardShortcutTitle:""});Z.wrapper.style.width=""};
mg0=function(Z){if(!Z.isRequestPending){Z.isRequestPending=!0;Z.aq(3);var k=Z.S.getVideoData();k=Z.V?k.removeFromWatchLaterCommand:k.addToWatchLaterCommand;const N=Z.S.jU(),a=Z.V?()=>{Z.V=!1;Z.isRequestPending=!1;Z.aq(2);Z.S.X().C&&g.A7(Z.S,"WATCH_LATER_VIDEO_REMOVED")}:()=>{Z.V=!0;
Z.isRequestPending=!1;Z.aq(1);Z.S.X().U&&Z.S.cJ(Z.element);Z.S.X().C&&g.A7(Z.S,"WATCH_LATER_VIDEO_ADDED")};
$P(N,k).then(a,()=>{Z.isRequestPending=!1;Z.aq(4,"An error occurred. Please try again later.");Z.S.X().C&&g.A7(Z.S,"WATCH_LATER_ERROR","An error occurred. Please try again later.")})}};
s1X=function(Z){const k=Z.S.getPlayerSize(),N=Z.S.X(),a=Z.S.getVideoData(),T=g.PQ(N)&&g.v3(Z.S)&&Z.S.getPlayerStateObject().V(128),K=N.D;return N.hp&&k.width>=240&&!a.isAd()&&a.hp&&!T&&!a.o4&&!Z.S.isEmbedsShortsMode()&&!K};
A1j=function(Z,k){if(k!==Z.icon){let N;switch(k){case 3:N=W3();break;case 1:N=kZ();break;case 2:N={J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},A:[{J:"path",Rv:!0,Z:"ytp-svg-fill",W:{d:"M18,8 C12.47,8 8,12.47 8,18 C8,23.52 12.47,28 18,28 C23.52,28 28,23.52 28,18 C28,12.47 23.52,8 18,8 L18,8 Z M16,19.02 L16,12.00 L18,12.00 L18,17.86 L23.10,20.81 L22.10,22.54 L16,19.02 Z"}}]};break;case 4:N={J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},A:[{J:"path",
Rv:!0,W:{d:"M7,27.5h22L18,8.5L7,27.5z M19,24.5h-2v-2h2V24.5z M19,20.5h-2V16.5h2V20.5z",fill:"#fff"}}]}}Z.updateValue("icon",N);Z.icon=k}};
Puy=function(Z,k){dN(g.V7(Z.S.X()),"wl_button",()=>{jvU({videoId:k});window.location.reload()})};
c1y=function(Z){const k=Z.api.X(),N=Z.api.getPlayerStateObject().V(128);return k.Y&&N&&!Z.api.isFullscreen()};
nu=function(Z){if(Z.bV()&&!Z.api.isEmbedsShortsMode()&&Z.Ln){var k=Z.api.B("web_player_hide_overflow_button_if_empty_menu");!Z.aV||k&&!s1X(Z.aV)||xv(Z.Ln,Z.aV);!Z.shareButton||k&&!eT(Z.shareButton)||xv(Z.Ln,Z.shareButton);!Z.copyLinkButton||k&&!xXy(Z.copyLinkButton)||xv(Z.Ln,Z.copyLinkButton)}else{const N=Z.api.X().getWebPlayerContextConfig();if(Z.Ln){k=Z.Ln;for(const a of k.actionButtons)a.detach();k.actionButtons=[]}Z.searchButton&&!g.C1(Z.lV.element,Z.searchButton.element)&&Z.searchButton.HD(Z.lV.element);
!Z.aV||N?.hideTopWatchNextButton||g.C1(Z.lV.element,Z.aV.element)||Z.aV.HD(Z.lV.element);!Z.shareButton||N?.hideTopShareButton||g.C1(Z.lV.element,Z.shareButton.element)||Z.shareButton.HD(Z.lV.element);Z.copyLinkButton&&!g.C1(Z.lV.element,Z.copyLinkButton.element)&&Z.copyLinkButton.HD(Z.lV.element)}};
I9=function(Z,k,N){k=N?k.lastElementChild:k.firstElementChild;let a=null;for(;k;){if(GU(k,"display")!=="none"&&k.getAttribute("aria-hidden")!=="true"){let T;k.tabIndex>=0?T=k:T=I9(Z,k,N);T&&(a?N?T.tabIndex>a.tabIndex&&(a=T):T.tabIndex<a.tabIndex&&(a=T):a=T)}k=N?k.previousElementSibling:k.nextElementSibling}return a};
dgr=function(Z,k,N){if(Z.api.B("web_player_nitrate_promo_tooltip")&&Z.api.getPresentingPlayerType(!0)!==2){var a=Z.api.getVideoData({playerType:1});a?.tooltipRenderer&&(a=a.tooltipRenderer,Z.Is||k&&(a.tooltipDisplayStrategy?.type==="TOOLTIP_DISPLAY_TYPE_DO_NOT_SHOW_IMMEDIATELY"||a.promoConfig?.promoId==="dtip-edu-player-iseecaptions"||a.promoConfig?.promoId==="dtip-edu-player-tc-m2")||(Z.Is=new HYf(a,Z.api),g.u(Z,Z.Is),g.$n(Z.api,Z.Is.element,9)),Z.Is?.L(a,N))}};
LTf=function(){XwN||(window.addEventListener(jd?"touchstart":"click",()=>{for(let Z=E7.length;Z<4;Z++){const k=g.TU("VIDEO");k.load();E7.push(new g.WE(k))}},{capture:!0,
passive:!0}),XwN=!0)};
Yk=function(Z,k,N,a){var T=N.getVideoData();const K=k.getVideoData();if(N.getPlayerState().isError())return{msg:"player-error"};var y=K.D;if(k.ym()>a/1E3+1)return{msg:"in-the-past"};if(K.isLivePlayback&&!isFinite(a))return{msg:"live-infinite"};a=k.TM();var Q=null;a&&(Q=a.isView()?a.mediaElement.L():a.L());if(Q&&Q.length>12&&g.RD(T))return{msg:"played-ranges"};if(!T.D)return null;if(!y)return{msg:"no-pvd-formats"};if(!T.D.V()||!y.V())return{msg:"non-dash"};a=y.videoInfos[0];Q=T.D.videoInfos[0];Z.Vz&&
vZ(K)&&(a=k.Dp(),Q=N.Dp());if(!a||!Q)return{msg:"no-video-info"};if(Z.G&&(a.V()||Q.V()))return{msg:"av1"};k=Z.Y&&K.rQ()&&jx();if(Q.containerType!==a.containerType)if(k)K.U6("sgap",{ierr:"container"});else return{msg:"container"};if(Z.L&&!k&&(Q.gA!==a.gA||Q.gA===""||a.gA===""))return{msg:"codec"};if(Z.j&&Q.video&&a.video&&Math.abs(Q.video.width/Q.video.height-a.video.width/a.video.height)>.01)return{msg:"ratio"};if(g.RD(K)&&g.RD(T))return{msg:"content-protection"};y=y.U[0];T=T.D.U[0];N=y.audio;const q=
T.audio;if(N.sampleRate!==q.sampleRate&&!g.Cf)if(k)K.U6("sgap",{ierr:"srate"});else return{msg:"sample-rate",ci:y.itag,cr:N.sampleRate,ni:T.itag,nr:q.sampleRate};return(N.numChannels||2)!==(q.numChannels||2)?{msg:"channel-count"}:Z.C&&K.rQ()&&a.video.fps!==Q.video.fps?{msg:"fps"}:null};
V0N=function(Z,k,N){const a=Z.getVideoData(),T=k.getVideoData();if(!a.X().supportsGaplessShorts())return{nq:"env"};if((!N.N||a.Ix&&!a.isAd()||T.Ix&&!T.isAd())&&(!N.U||a.Ix&&!a.isAd()||T.Ix)&&(!N.D||T.Ix&&!T.isAd()||a.Ix)&&(a.Ix||T.Ix))return{nq:"autoplay"};if(a.endSeconds>0)return{nq:"endcr"};if(!a.j)return{nq:"client"};if(!Z.Q_())return{nq:"no-empty"};Z=Yk(N,Z,k,Infinity);return Z!=null?{nq:Z.msg}:null};
t0G=function(Z){const k=new FTi;k.Y=Z.B("h5_gapless_support_types_diff");k.C=!1;k.Vz=Z.B("html5_gapless_use_format_info_fix");k.G=Z.B("html5_gapless_disable_on_av1")&&!Z.B("html5_gapless_enable_on_av1");k.L=Z.B("html5_gapless_check_codec_diff_strictly");k.N=Z.B("html5_gapless_on_ad_autoplay");k.j=Z.B("html5_gapless_disable_diff_aspect_radio");k.U=Z.B("html5_gapless_ad_autoplay_on_ad_to_video_only")&&!Z.B("html5_disable_loop_range_for_shorts_ads");k.V=Z.B("html5_pseudogapless_shorts_seek_to_next_start");
k.D=Z.B("html5_gapless_ad_autoplay_on_video_to_ad_only");return k};
ZE=function(Z,k){k<=Z.status.status||(Z.status={status:k,error:null},k===5&&Z.e7.resolve())};
hdj=function(Z,k,N,a){Z=Z.isView()?Z.mediaElement:Z;return new g.k$(Z,k,N,a)};
uWX=async function(Z){if(Z.jm())return Promise.reject(Error(Z.status.error||"disposed"));Z.timeout.start();await Z.e7;var k=Z.V.TM();if(k.isEnded())return Z.Ar("ended_in_finishTransition"),Promise.reject(Error(Z.status.error||""));if(!Z.L||!Wz(Z.L))return Z.Ar("next_mse_closed"),Promise.reject(Error(Z.status.error||""));if(Z.U.zX()!==Z.L)return Z.Ar("next_mse_mismatch"),Promise.reject(Error(Z.status.error||""));const {fz:N,A3:a,aQ:T}=Z.C();Z.V.SU(!1,!0);const K=hdj(k,N,T,!Z.U.getVideoData().isAd());
Z.U.setMediaElement(K);const y=Z.V.Q9();y&&Z.U.mf(y.HU,y.BU);Z.dA&&(Z.policy.V||Z.U.seekTo(Z.U.getCurrentTime()+.001,{SC:!0,aG:3,b0:"gapless_pseudo"}),K.play());k=k.Vn();k.cpn=Z.V.getVideoData().clientPlaybackNonce;k.st=`${N}`;k.et=`${T}`;Z.U.U6("gapless",k);Z.V.U6("gaplessTo",{cpn:Z.U.getVideoData().clientPlaybackNonce});k=Z.V.getPlayerType()===Z.U.getPlayerType();Z.V.yu(a,!0,!1,k,Z.U.getVideoData().clientPlaybackNonce);Z.U.yu(Z.U.getCurrentTime(),!0,!0,k,Z.V.getVideoData().clientPlaybackNonce);
Z.U.Hg();g.Sq(()=>{!Z.U.getVideoData().C&&Z.U.getPlayerState().isOrWillBePlaying()&&Z.U.YC()});
ZE(Z,6);Z.dispose();return Promise.resolve()};
fOb=function(Z){if(Z.U.getVideoData().D){var k=Z.u0.X().B("html5_gapless_suspend_next_loader")&&Z.G===1;Z.U.uM(Z.L,k,Z.G===1&&nQ(Z.V.getVideoData()));ZE(Z,3);lOU(Z);var {l6:N,kp:a}=Nu(Z);N.subscribe("updateend",Z.j,Z);a.subscribe("updateend",Z.j,Z);Z.j(N);Z.j(a)}};
lOU=function(Z){Z.V.unsubscribe("internalvideodatachange",Z.D,Z);Z.U.unsubscribe("internalvideodatachange",Z.D,Z);Z.u0.X().B("html5_gapless_use_format_info_fix")&&(Z.V.unsubscribe("internalvideoformatchange",Z.D,Z),Z.U.unsubscribe("internalvideoformatchange",Z.D,Z));Z.V.unsubscribe("mediasourceattached",Z.D,Z);Z.U.unsubscribe("statechange",Z.O,Z)};
Nu=function(Z){return{l6:Z.Y.V.Dl,kp:Z.Y.U.Dl}};
Dgy=async function(Z){if(!Z.jm()&&Z.Y&&Z.V){Z.Vz&&Z.app.wA().bv(!0,!1);var k=null;if(Z.D)try{await uWX(Z.D)}catch(a){k=a}if(Z.V&&(BTi.rq("vqsp",()=>{Z.app.jP(Z.V)}),Z.V)){var N=Z.V.TM();
Z.app.X().B("html5_gapless_seek_on_negative_time")&&N&&N.getCurrentTime()<-.01&&Z.V.seekTo(0);BTi.rq("vqpv",()=>{Z.app.playVideo()});
k&&(Z.V?(k=k?k.message:"forced",Z.U?.U6("gapfulfbk",{r:k}),Z.V.kK(k)):Z.U?.U6("gapsp",{}));k=Z.Y;aK(Z);k&&k.resolve();Promise.resolve()}}};
T5=function(Z){Z.N&&Z.G&&Z.N.removeEventListener("timeupdate",Z.G);Z.G=null;Z.N=null};
aK=function(Z,k=!1){if(Z.U){if(Z.j){var N=Z.U;Z.app.rA.removeEventListener(g.te("vqueued"),Z.C);N.removeCueRange(Z.j)}Z.U=null;Z.j=null}Z.D&&(Z.D.status.status!==6&&(N=Z.D,N.status.status!==Infinity&&N.G!==1&&N.Ar("Canceled")),Z.D=null);Z.Y=null;Z.V&&!k&&Z.V!==Z.app.DF()&&Z.V!==Z.app.wA()&&Z.V.dispose();Z.V&&k&&Z.V.uc();Z.V=null;Z.Vz=!1};
OYf=function(Z,k,N=!0){const a=Z.app.wA(),T=a.getVideoData().isLivePlayback?Infinity:a.Ja(!0)*1E3;k>T&&(k=T-200,Z.Vz=!0);N&&a.getCurrentTime()>=k/1E3?Z.C():(Z.U=a,N&&(N=k,k=Z.U,Z.app.rA.addEventListener(g.te("vqueued"),Z.C),N=isFinite(N)||N/1E3>k.getDuration()?N:0x8000000000000,Z.j=new g.pe(N,0x8000000000000,{namespace:"vqueued"}),k.addCueRange(Z.j)))};
iYy=function(Z,k,N,a=0,T=0){Z.Q_()||(T5(Z),aK(Z));Z.Y=new x2;Z.V=k;OYf(Z,N,T===0);var K=a/=1E3,y=k.getVideoData().V;if(a&&y&&Z.U){let Q=a,q=0;k.getVideoData().isLivePlayback&&(K=Math.min(N/1E3,Z.U.Ja(!0)),q=Math.max(0,K-Z.U.getCurrentTime()),Q=Math.min(a,k.Ja()+q));K=F60(y,Q)||a;K!==a&&Z.V.U6("qvaln",{st:a,at:K,rm:q,ct:Q})}k=K;a=Z.V;a.getVideoData().rD=!0;a.getVideoData().j=!0;a.cj(!0);y={};Z.U&&(y=Z.U.lA(),K=Z.U.getVideoData().clientPlaybackNonce,y={crt:(y*1E3).toFixed(),cpn:K});a.U6("queued",y);
k!==0&&a.seekTo(k+.01,{SC:!0,aG:3,b0:"videoqueuer_queued"});Z.D=new vJy(Z.L,Z.app.wA(),Z.V,N,Z.app,T);N=Z.D;N.status.status!==Infinity&&(ZE(N,1),N.V.subscribe("internalvideodatachange",N.D,N),N.U.subscribe("internalvideodatachange",N.D,N),N.u0.X().B("html5_gapless_use_format_info_fix")&&(N.V.subscribe("internalvideoformatchange",N.D,N),N.U.subscribe("internalvideoformatchange",N.D,N)),N.V.subscribe("mediasourceattached",N.D,N),N.U.subscribe("statechange",N.O,N),N.V.subscribe("newelementrequired",
N.xW,N),N.D());return Z.Y};
$gy=function(Z,k){if(Z.app.X().Yl().V.Aq(gJj)){var N=Z.app.X().Yl().V.Aq(wwG);if(!(N<=0)){T5(Z);var a=Z.app.wA()?.TM();a&&Z.V&&(Z.V.getVideoData().A6=!0,Z.G=()=>{var T=a.getCurrentTime();T>=k+N/1E3&&(T=Date.now()-(T-k)*1E3,Z.app.tQ().tick("pbs",T),T5(Z))},Z.N=a,a.addEventListener("timeupdate",Z.G))}}};
xgy=function(Z,k,N){if(Z.Q_())return"qie";if(Z.V==null||Z.V.jm()||Z.V.getVideoData()==null)return"qpd";if(k.videoId!==Z.V.S9())return"vinm";if((Z.D?.Vz()||-1)<=0)return"ivd";if(N!==1)return"upt";Z=Z.D?.FS();return Z!=null?Z:null};
QOf=function(Z){return!(Z.isMinimized()||Z.isInline()||Z.isBackground()||Z.i9()||Z.Pf()||Z.Qy()||Z.MA())};
y4=function(Z){const k=(0,g.z)();Z.data.forEach(N=>{N.expire<k&&Kx(Z,N,!0)});
Z.data=g.Ry(Z.data,N=>!(N.expire<k))};
Q4=function(Z){Z.V.stop();var k=Infinity;for(const N of Z.data)N.expire<k&&(k=N.expire);k&&isFinite(k)&&(k=Math.max(k-Date.now(),100),Z.V.start(k))};
$9f=function(Z){y4(Z);return Z.data.map(k=>k.value)};
Kx=function(Z,k,N){N&&Z.U&&Z.U(k.value)};
Gxi=function(Z){const k=Z.V?[Z.V]:[];for(const N of Object.values(Z.Y))N.dispose(),delete Z.L[N.q4()];Z.Y={};Z.V=null;Z.j=null;Z.C.clear();qu(Z,[],k)};
qu=function(Z,k,N){const a=[Z.U];Z.V&&a.push(Z.V);Z.api.publish("playbackChange",{active:a.filter(T=>T.getPlayerType()!==0).map(T=>({cpn:T.q4()})),
started:k.filter(T=>T.getPlayerType()!==0).map(T=>({cpn:T.q4()})),
ended:N.filter(T=>T.getPlayerType()!==0).map(T=>({cpn:T.q4()}))})};
rW=function(Z,k,N){const a=[k],T=Z.V?[Z.V]:[];Z.Y[k.q4()]=k;Z.L[k.q4()]=k;Z.V=k;N&&(Z.j=k);Z.C.set("",k);qu(Z,a,T)};
oJN=function(Z){const k=Z.experiments,N=k.yz.bind(k);Cx=N("html5_use_async_stopVideo");S8R=N("html5_pause_for_async_stopVideo");mP=N("html5_not_reset_media_source")||N("html5_not_reset_media_source_non_drm_vod");N("html5_listen_for_audio_output_changed")&&(sWf=!0);Y5=N("html5_not_reset_media_source")||N("html5_not_reset_media_source_non_drm_vod");edG=N("html5_not_reset_media_source")||N("html5_not_reset_media_source_non_drm_vod");sN=N("html5_retain_source_buffer_appends_for_debugging");$sy(N("web_watch_pip")||
N("web_shorts_pip"));adj(N("log_foreground_not_focused_as_background"));Tvf(N("web_player_pip_logging_fix"));N("html5_mediastream_applies_timestamp_offset")&&(FL=!0);Z.Xa()&&OGf();Error.stackTraceLimit=50;const a=g.Q5(k,"html5_idle_rate_limit_ms");a&&Object.defineProperty(window,"requestIdleCallback",{value:T=>window.setTimeout(T,a)});
YLf(Z.L);Oqf(N("html5_use_ump_request_slicer"));N("html5_disable_streaming_xhr")&&(s1=!1);N("html5_byterate_constraints")&&(XT=!0);N("html5_use_non_active_broadcast_for_post_live")&&(Az=!0);N("html5_enable_encrypted_av1")&&(Gd=!0);bm0(g.Q5(Z.experiments,"html5_sticky_duration_mos"))};
aWX=function(Z){const k={};var N=Z.experiments.Un();const a=[];Z=(K,y,Q)=>{a.push(gz(y(Q),q=>{k[K]=q}))};
var T=N.V.Aq(J1y);T&&Z("MediaSource.EnableUsingMediaSourceBufferedRange",scf,T===1);(T=N.V.Aq(zdN))&&Z("HTTP3",A$R,T===1);(T=N.V.Aq(Ugb))&&Z("MediaSource.EnableUsingMediaSourceAttachmentMethods",PIy,T===1);(T=N.V.Aq(bYX))&&Z("QUIC",c$i,T===1);(T=N.V.Aq(pwy))&&Z("Media.PlayerConfiguration.DecodeToTexturePreferred",dqi,T===1);(T=N.V.Aq(Rdf))&&Z("Media.AudioWriteDurationLocal",HGi,Number(T));(T=N.V.Aq(M0j))&&Z("Media.AppendFirstSegmentSynchronously",VgR,Number(T)===1);(T=N.V.Aq(nJy))&&Z("Media.ExperimentalMaxPendingBytesPerParse",
lTf,Number(T));(T=N.V.Aq(IOr))&&Z("Media.EnableFlushDuringSeek",hXr,Number(T)===1);(T=N.V.Aq(j1y))&&Z("DecoderBuffer.EnableInPlaceReuseAllocatorBase",umi,Number(T)===1);(T=N.V.Aq(EJU))&&Z("Media.EnableResetAudioDecoder",tg0,Number(T)===1);(T=N.V.Aq(WT0))&&Z("Media.IncrementalParseLookAhead",FXb,Number(T)===1);(T=N.V.Aq(Y8b))&&Z("Media.MaxSamplesPerWrite",fTi,Number(T));(T=N.V.Aq(ZzR))&&Z("Media.VideoDecoderPollIntervalMs",Xqb,T);(T=N.V.Aq(k1y))&&Z("Media.VideoInitialMaxFramesInDecoder",LXX,T);(N=
N.V.Aq(NNr))&&Z("Media.MediaCodecResetDelayMs",B5G,N);return gz(Pdy(a),()=>k)};
yK=function(Z,k=!1,N=1048576){let a=PS(Z);a=1/((Z.j.c9()||0)*Z.policy.N+1/a);let T=Z.FS.c9();T=T>0?T:1;var K=Math.max(a,T);Z.policy.Y>0&&T<a&&(K=Math.min(Z.policy.Y,1),K=(1-K)*a+K*T);if(!k)return K;k=1E-9+qs(Z);N=K*Math.min(1,N/(K*k));Z.policy.U||(Z=((Z.N.percentile(.98)||0)-1)/2,Z=Math.max(0,Math.min(1,Z)),N*=1-.5*Z);return N};
qs=function(Z){Z=Z.C.c9()+Z.dA.c9()||0;Z=isNaN(Z)?.5:Z;return Z=Math.min(Z,5)};
cS=function(Z){const k={delay:qs(Z),stall:Z.j.c9()||0,byterate:PS(Z),init:Z.vD},N=Z.D[0];N.stamp=Math.round(Z.G/36E5)*36E5;N.net=Math.ceil(Z.xW);N.max=Z.interruptions[0]||0;k.interruptions=Z.D;return k};
TNy=function(Z){Z.L||(Z.L=(0,g.z)());Z.policy.C&&(Z.G=(0,g.z)())};
$tU=function(Z,k){if(Z.L){const N=k-Z.L;if(N<6E4){if(N>1E3){const a=Z.interruptions;a.push(Math.ceil(N));a.sort((T,K)=>K-T);
a.length>16&&a.pop()}Z.xW+=N}}Z.L=k};
HS=function(Z,k,N){isNaN(N)||(Z.zt+=N);isNaN(k)||(Z.tq+=k)};
hA=function(Z,k,N,a=k){Z.Y.wr(a,N/k);Z.G=(0,g.z)()};
dW=function(Z,k,N){k=Math.max(k,Z.U.V);Z.j.wr(1,N/k)};
Xs=function(Z,k,N,a,T,K=!1){Z.FS.wr(k,N/k);Z.G=(0,g.z)();T||Z.N.wr(1,k-a);K||(Z.L=0);Z.O>-1&&(0,g.z)()-Z.O>3E4&&(puf(cS(Z)),Z.O=(0,g.z)(),Z.Vz=!0)};
pa=function(Z){return(0,g.z)()-Z.G>=4E3};
PS=function(Z){Z=Z.Y.c9();return Z>0?Z:1};
KNi=function(Z,k,N=!1){k.uC=Z.zt;k.eR=Z.tq;k.bandwidthEstimate=yK(Z);if(N){N=(Z.C.c9()*1E3).toFixed();var a=(Z.dA.c9()*1E3).toFixed(),T=qs(Z).toFixed(2),K=((Z.j.c9()||0)*1E9).toFixed(2),y=Z.Y.c9().toFixed(0),Q=Z.FS.c9().toFixed(0),q=Z.N.percentile(.5).toFixed(2),r=Z.N.percentile(.92).toFixed(2),C=Z.N.percentile(.96).toFixed(2),m=Z.N.percentile(.98).toFixed(2);Z.V?Z.V.reset():Z.V=new Lx;Z.V.add(Z.xW);Z.V.add(Z.interruptions.length);let d=0;for(var A=Z.interruptions.length-1;A>=0;A--){var P=Z.interruptions[A];
Z.V.add(P-d);d=P}d=0;for(A=Z.D.length-1;A>=0;A--){P=Z.D[A];const h=P.stamp/36E5;Z.V.add(h-d);d=h;Z.V.add(P.net/1E3);Z.V.add(P.max)}Z=Z.V.W9();k.V={ttr:N,ttm:a,d:T,st:K,bw:y,abw:Q,v50:q,v92:r,v96:C,v98:m,"int":Z}}};
QQy=function(Z,k,N){const a=new yVi(N);Z&&(a.D=!0,a.L=.1);N.yz("html5_media_time_weight")&&(a.D=!1);k&&(a.V=k/8);a.U=T8()>=480;return a};
qUf=function(Z,k,N=!0){Z.V=0;Z.startTimeSecs=k;Z.D=N;Z.U=!0};
rVr=function(Z,k,N){Z=Z.U;var a=g.F_(Z,{SI:k},(T,K)=>T.SI-K.SI);
a=a<0?(a+2)*-1:a;if(a>=0)for(let T=a;T<=a+1&&T<Z.length;T++){const K=Z[T];if(k>=K.SI-N&&k<=K.R4+N)return K}};
Csy=function(Z,k,N){const a=Z.V.get(k);a?(a.push(N),g.hc(a,(T,K)=>T.SI-K.SI)):Z.V.set(k,[N])};
mIf=function(Z,k){g.lT(Z.U,k,(N,a)=>N.SI===a.SI?N.durationMs-a.durationMs:N.SI-a.SI);
Z.D.set(k.cpn,k);k.kJ&&Csy(Z,k.kJ,k)};
sQU=function(Z,k){const N=[];for(const a of Z.U)k(a)||N.push(a);if(Z.kW.B("html5_sstm_fixes"))for(const a of Z.U)k(a)&&Z.D.delete(a.cpn);Z.U=N};
AVf=function(Z,k){k=g.F_(Z.U,{R4:k},(N,a)=>N.R4-a.R4);
return k>=0?Z.U[k]:null};
PsU=function(Z,k){const N=Z.U.indexOf(k);N>=0&&Z.U.splice(N,1);Z.D.delete(k.cpn)};
RPy=function(Z,k){if(Z.a5||k.identifier&&Z.rD.has(k.identifier))Z.BA({startnoad:k.identifier}),V4(Z);else if(Er(Z.C,N=>N.identifier===k.identifier))Z.BA({timedoutcp:1}),Z.G.start(0);
else if(Er(Z.Sm,N=>N.identifier===k.identifier))Z.BA({fetchedcp:1}),V4(Z);
else if(Z.G.isActive())Z.BA({racingcp:`${Z.L?.identifier}_${k.identifier}`});else{Z.hp=(new Date).getTime()/1E3;Z.BA({adf:1});let N=5E3;N&&k.event==="predictStart"&&(N-=k.V);Z.Qz=Math.max(N,15E3);Z.j=!1;Z.G.start(Z.Qz);Z.L=k;Z.Vz.clearAll();Z.MX=[]}};
g.V$f=function(Z,k,N,a,T,K,y){var Q=T===3,q=cVX(Z,k,N,T,a,y);if(!q)return Fs(Z,N,Q),q=g.tz(Z,N)?"undec":"ncp",Z.BA({gvprp:q,mt:k,seg:N,tt:T,itag:a,ce:y}),null;Q||Z.uN.set(N,q);y=q.kJ;T=Z.UC(N-1,T,K)?.wG||"";T===""&&Z.BA({eds:1});K=Hzy(Z,q.ssdaiAdsConfig);Q=Z.playback.getVideoData();Q=Q.eP[Q.U?.containerType||0];q=q.ZM&&N>=q.ZM?q.ZM:void 0;q={w8:y?hz(Z,y):[],adsConfig:K,wG:T,NE:q,dW:Cg(Q.split(";")[0]),Lk:Q.split(";")[1]||""};T={Ib:q};Z.Kp&&Z.BA({gvprpro:"v",sq:N,mt:k.toFixed(3),itag:a,acpns:q.w8?.join("_")||
"none",abid:y});return T};
Ej=function(Z,k,N,a,T){a=a||{reason:"disablessdai"};if(k&&N){if(!ux(Z,k,N))return!1;a.sq=N}if(Z.a5)return!1;Z.a5=!0;Z.Xv>0&&(Z.Xv=0,Z.VV="",Z.aj(Z.playback.q4(),0),Z.api.publish("serverstitchedvideochange"));Z.playback.fK(a,T);return!0};
dIf=function(Z,k,N){const a=Z.Tt||Z.app.wA().getPlayerState();lx(Z,!0);Z.playback.seekTo(k,N);Z=Z.app.wA();k=Z.getPlayerState();a.isOrWillBePlaying()&&!k.isOrWillBePlaying()?Z.playVideo():a.isPaused()&&!k.isPaused()&&Z.pauseVideo()};
fx=function(Z){Z.Kp&&Z.BA({adf:`0_${(new Date).getTime()/1E3-Z.hp}_isTimeout_${Z.j}`})};
XTb=function(Z,k,N){if(Z.C.length)for(const a of Z.C){const T=a.startSecs*1E3,K=a.Xl*1E3+T;if(k>T&&k<K||N>T&&N<K)return Er(Z.ov,y=>y.identifier===a.identifier)||(Z.BA({adskip:k}),Z.ov.push(a)),a}};
BS=function(Z,k,N){Z.playback.Yy(k,N)};
V4=function(Z){Z.j=!1;Z.G.isActive()&&fx(Z);Z.G.stop();Z.uu(!1)};
VTy=function(Z,k){return k?Z.kW.Yl().V.Aq(LNy)&&k?.tileContext?`${k?.gE};${k?.tileContext}`:k?.gE:""};
tTr=function(Z,k,N){(Z.app.QT().Y[k.clientPlaybackNonce]||null)?.dispose();k=new FNf(k,Z.playback,N/1E3);Z.zt.set(k.q4(),k);Z=Z.app.QT();Z.Y[k.q4()]=k;Z.L[k.q4()]=k};
DE=function(Z,k,N){return{ssvc:k,cpn:N?.cpn||"",vid:N?.videoData.videoId||"",ct:(Z.playback.getCurrentTime()||0).toFixed(3),cmt:(Z.playback.ym()||0).toFixed(3)}};
hey=function(Z,k,N){return new g.pe(Z,k,{id:N,namespace:"serverstitchedcuerange",priority:9})};
ON=function(Z,k,N,a){Z.kW.B("html5_ssdai_log_ssevt_in_loader_timers")&&(a=Z.N?0:Math.round((a-N)*1E3),Z.playback.U6("ssevt",{tag:"sstme",ad:k!==Z.playback.q4(),cpn:k,st:(N-Z.playback.lc()).toFixed(3),late:a}))};
ix=function(Z,k){Z.D||Z.N||vS(Z,Z.VV);const N=k.F5,a=k.LK;if(a.cpn===Z.VV)Z.BA({igtranssame:1,enter:a.cpn,exit:N.cpn});else{var T=Z.N,K=!!Z.D;Z.D="";var y=k.lr,Q=N.playerType===2?N.SI/1E3+N.videoData.r5:Z.WV().videoData.r5;Z.api.B("html5_ssdai_enable_media_end_cue_range")&&(K||T||N.playerType!==2?(T||K)&&Z.BA({mecr:0,seek:T,skip:K}):Z.api.yQ(N.cpn));if(N.playerType===2&&a.playerType===2)K?Z.BA({igtransskip:1,enter:a.cpn,exit:N.cpn,seek:T,skip:Z.D}):uyR(Z,N,a,Q,y,T,K);else{Z.VV=a.cpn;Z.aj(a.cpn,a.startTimeSecs||
y);k=k.iB;if(N.playerType===1&&a.playerType===2){Z.xW=0;lWi(Z,a);var q=DE(Z,"c2a",a);Z.BA(q);Z.Xv++}else if(N.playerType===2&&a.playerType===1){Z.api.publish("serverstitchedvideochange");q=DE(Z,"a2c");Z.BA(q);Z.Xv=0;Z.xW=Q;q=N.cpn;var r=Z.xW;if(q!==Z.playback.q4()){const C=Z.zt.get(q);C?C.V=r:Z.BA({nop_e:q})}Z.H3(N.kJ)}q=fWU(Z);Z.playback.f7(N,a,Q,y,T,K,k,q)}BNf(Z)}};
lWi=function(Z,k){var N=Z.app;Qn(N.Yg())&&N.xg.D[2]&&g.pG(Z.logger,360717806,"SSTM lingering playback");Z.api.sB();Z.api.publish("serverstitchedvideochange",k.cpn,k.TC)};
gW=function(Z,k,N=0){return{n5:rVr(Z.V,k*1E3,N*1E3),Vd:k}};
vS=function(Z,k){var N=k||Z.VV;const a=Z.V.PA(N);a?(k=a.videoData,N=a.TC||(Z.U.get(N)?.start??0)/1E3,Z=Z.playback.getCurrentTime()-N,k.r5=Z>0?Z:0):Z.WV().videoData.r5=Z.playback.getCurrentTime()};
DIj=function(Z,k,N){Z.playback.ZQ();Z.playback.seekTo(k,N);Z.playback.playVideo()};
lx=function(Z,k){Z.xl=NaN;Z.pF=null;Z.O6.stop();Z.FS&&k&&Z.FS.hT();Z.Tt=null;Z.FS=null};
$$=function(Z){Ozy(Z);for(var k of Z.U.values())k.start>=-1&&k.end<=Infinity&&(Z.playback.removeCueRange(k),Z.U.delete(k.getId()),Z.BA({rmAdCR:1}));const {n5:N,Vd:a}=gW(Z,-.001);N&&(k=a*1E3-N.SI,wW(Z,N,k,N.SI+k),k=Z.U.get(N.cpn))&&(k.start=N.SI,k.end=N.SI+N.durationMs);({n5:k}=gW(Z,Infinity));k&&Z.QV(`Invalid_clearEndTimeMs_${Infinity}_that_falls_during_${`playback_cpn_${k.cpn}_video_id_${k.videoData?.videoId}_durationMs_${k.durationMs}_enterTimeMs_${k.SI}_parentReturnTimeMs_${k.R4}`}._`+"Child_playbacks_can_only_have_duration_updated_not_their_start.")};
vvy=function(Z){Z.Vz.clearAll();Z.U.clear();Z.V.clear();Z.uN.clear();Z.MX=[];Z.L=null;Z.rD.clear();Z.Rq.clear();Z.C=[];Z.Sm=[];Z.ov=[];Z.bq=[];Z.Ap.clear();Z.tW.clear();Z.FN.clear();Z.hq.clear();Z.j=!1;Z.xW=0;Z.N=!1;Z.tq=!1;Z.Xv=0;Z.hp=0;Z.iq=!1;Z.a5=!1;Z.D="";Gxi(Z.app.QT());rW(Z.app.QT(),Z.playback,!1);Z.zt.clear();Z.G.isActive()&&V4(Z)};
Ozy=function(Z){sQU(Z.V,k=>k.SI>=-1&&k.R4<=Infinity)};
wW=function(Z,k,N,a){k.durationMs=N;k.R4=a;(a=Z.zt.get(k.cpn))?a.KH(N/1E3):Z.BA({nop_d:k.cpn})};
g.tz=function(Z,k){for(const N of Z.MX)if(k>=N.start&&k<=N.end)return!0;return!1};
ux=function(Z,k,N,a,T){let K=Z.uN.get(N);if(!K){if(K=x$(Z,k))return K;k=Z.UC(N-1,a??2);if(T)return Z.BA({misscue:T,sq:N,type:a,prevsstate:k?.Tr,prevrecord:Z.uN.has(N-1)}),Z.uN.get(N-1);if(k?.Tr===2)return Z.BA({adnf:1,sq:N,type:a,prevrecord:Z.uN.has(N-1)}),Z.uN.get(N-1)}return K};
cVX=function(Z,k,N,a,T,K){if(!Z.a5)if(g.tz(Z,N))Z.BA({gdu:"undec",seg:N,itag:T});else if(k=ux(Z,k,N,a,K),!Z.playback.getVideoData().qW()||!k?.aI)return k};
x$=function(Z,k){k+=Z.lc();if(Z.playback.getVideoData().qW()){a:{var N=Z.V;Z=k*1E3;for(a of N.U)if(N=a.TC?a.TC*1E3:a.SI,Z>=a.SI-1E3&&Z<=N+a.durationMs+1E3)break a;var a=void 0}a={n5:a,Vd:k}}else a=gW(Z,k),a?.n5||(a=gW(Z,k,1));return a?.n5};
Fs=function(Z,k,N=!1){if(!N){for(const a of Z.MX){if(k>=a.start&&k<=a.end)return;if(k===a.end+1){a.end+=1;return}}Z.MX.push(new izG(k))}};
Hzy=function(Z,k=""){const N=rr(k)||void 0;k&&N||Z.BA({adcfg:k?.length,dcfg:N?.length});return N};
hz=function(Z,k){const N=[];Z=Z.V.V.get(k);if(!Z)return[];for(const a of Z)a.cpn&&N.push(a.cpn);return N};
gvr=function(Z,k,N){let a=!1;if(N=Z.V.V.get(N))for(const T of N)T.durationMs!==0&&T.R4!==T.SI&&(N=T.cpn,k===N&&(a=!0),a&&!Z.tW.has(N)&&(Z.BA({decoratedAd:N}),Z.tW.add(N)))};
wTf=function(Z,k,N){let a=0;Z=Z.V.V.get(N);if(!Z)return-1;for(const T of Z){if(T.cpn===k)return a;a++}return-1};
$IU=function(Z,k){let N=0;Z=Z.V.V.get(k);if(!Z)return 0;for(const a of Z)a.durationMs!==0&&a.R4!==a.SI&&N++;return N};
xIy=function(Z){for(const k of Z.U.values())Z.playback.removeCueRange(k);Z.U.clear();Z.Vz.clearAll()};
fWU=function(Z){if(Z.s6||Z.jY){var k=Array.from(Z.app.QT().C.values()),N=[],a=[],T=[],K=[],y=[],Q=[];for(var q of k)if(k=Z.V.PA(q.q4()))k.pX&&N.push(k.pX),k.eX&&a.push(k.eX),k.n9&&a.push(k.n9),K.push(k.cpn),y.push(k.videoData.videoId||""),Q.push(k.videoData.adFormat||k.videoData.qX),k.serializedQoeContextData!=null&&T.push(k.serializedQoeContextData);k=q=void 0;Z.s6&&(k={pX:N,rE:a});Z.jY&&(q={w8:K,OY:y,adFormats:Q,serializedQoeContextData:T});return{Sz:k,Pb:q}}};
uyR=function(Z,k,N,a,T,K,y){if(k&&N){Z.VV=N.cpn;Z.aj(N.cpn,N.startTimeSecs||T);lWi(Z,N);var Q=DE(Z,"a2a",N);Z.BA(Q);Z.Xv++;Q=fWU(Z);Z.playback.f7(k,N,a||0,T||0,!!K,!!y,void 0,Q)}else Z.BA({misspbkonadtrans:1,enter:N?.cpn||"",exit:k?.cpn||"",seek:K,skip:y})};
BNf=function(Z){Z.hq.add(Z.D);Z.D="";Z.N=!1};
G1G=function(Z,k,N){var a;if(a=Z.playback.getVideoData().qW())a=(a=Z.V.PA(k))&&a.kJ?(Z=Z.V.V.get(a?.kJ))&&Z.slice(-1)[0].cpn===k:!1;return a&&N===2?1E3:0};
SUy=function(Z,k,N,a){k={F5:k,LK:N,lr:Z.playback.getCurrentTime(),iB:a};ix(Z,k)};
ovi=function(Z,k,N={}){const a=Z.G||Z.app.wA().getPlayerState();G5(Z,!0);k=isFinite(k)?k:Z.V.ZI();const {n5:T,Vd:K}=Sn(Z,k);k=T&&!en(Z,T)||!T&&Z.V!==Z.app.wA();var y=K*1E3;y=Z.D&&Z.D.start<=y&&y<=Z.D.end;!k&&y||oK(Z);T?eey(Z,T,K,N,a):Jz(Z,K,N,a,"_execute")};
z5=function(Z,k,N,a){Z.V.U6("timelineerror",{e:k,cpn:N?N:void 0,videoId:a?a:void 0})};
UN=function(Z,k){return new g.pe(Math.max(0,Z-5E3),k?0x8000000000000:Z-1,{namespace:"childplayback",priority:9})};
JVr=function(Z,k,N){const a=k.vB;k.vB=N;en(Z,k)&&(N=Z.app.wA(),a.hd===Z.D&&oK(Z),N.removeCueRange(a.hd),N.addCueRange(k.vB.hd))};
eey=function(Z,k,N,a,T){const K=en(Z,k);if(!K){k.playerVars.prefer_gapless=!0;var y=new g.xJ(Z.kW,k.playerVars);y.tI=k.tI;Z.api.kL(y,k.playerType)}y=Z.app.wA();K||y.addCueRange(k.vB.hd);y.seekTo(N,{b0:"application_timelinemanager",...a});zef(Z,T)};
bzi=function(Z,k,N,a,T,K){var y=k.cpn,Q=k.docid||k.video_id||k.videoId||k.id,q=Z.V;K=K===void 0?T+a:K;if(T>K)return z5(Z,`enterAfterReturn enterTimeMs=${T} is greater than parentReturnTimeMs=${K.toFixed(3)}`,y,Q),"";var r=q.Vt()*1E3;if(T<r)return z5(Z,`enterBeforeMinSeekable enterTimeMs=${T} is less than parentMinSeekableTimeMs=${r}`,y,Q),"";r=q.getDuration()*1E3;if(K>r)return q=`returnAfterDuration parentReturnTimeMs=${K.toFixed(3)} is greater than parentDurationMs=${r}. And timestampOffset in seconds is ${q.mx()}`,
z5(Z,q,y,Q),"";r=null;for(const m of Z.U){if(T>=m.SI&&T<m.R4)return z5(Z,"overlappingEnter",y,Q),"";if(K<=m.R4&&K>m.SI)return z5(Z,"overlappingReturn",y,Q),"";if(K===m.SI)return z5(Z,"outOfOrder",y,Q),"";T===m.R4&&(r=m)}y=`cs_childplayback_${UIy++}`;Q={hd:UN(a,!0),PV:Infinity,target:null};const C={tI:y,playerVars:k,playerType:N,durationMs:a,SI:T,R4:K,vB:Q};Z.U=Z.U.concat(C).sort((m,A)=>m.SI-A.SI);
r?JVr(Z,r,{hd:UN(r.durationMs,!0),PV:r.vB.PV,target:C}):(k={hd:UN(T,!1),PV:T,target:C},Z.L.set(k.hd,k),q.addCueRange(k.hd));k=!0;if(Z.V===Z.app.wA()&&(q=q.getCurrentTime()*1E3,q>=C.SI&&q<C.R4)){const m=Z.app.wA().getPlayerState(),A=q-C.SI;lh(()=>{eey(Z,C,A/1E3,{},m)});
k=!1}k&&(Z.O.unshift(C),Z.zt.XN(0));return y};
pT0=function(Z,k,N,a){Z.D=a;a=k.tI;const T=k.playerVars,K=k.playerType;Z.j=k;T&&Z.api.enqueueVideoByPlayerVars(T,K,N,a)};
Re0=function(Z,k,N,a){Z.D=a;Z.api.Yt(Z.V,N,k)};
oK=function(Z){Z.j=null;Z.D=null;Z.api.Q_()||Z.api.clearQueue()};
en=function(Z,k){Z=Z.app.wA();return!!Z&&Z.getVideoData().tI===k.tI};
MTf=function(Z,k){en(Z,k)||z5(Z,"childPlaybackIsNotPresenting");return k.R4===k.SI+k.durationMs?k.SI+Z.app.wA().getCurrentTime()*1E3:k.R4};
Sn=function(Z,k){let N=0;for(const a of Z.U){Z=a.SI/1E3+N;const T=Z+a.durationMs/1E3;if(Z>k)break;if(T>k)return{n5:a,Vd:k-Z};N=T-a.R4/1E3}return{n5:null,Vd:k-N}};
G5=function(Z,k){Z.Vz=NaN;Z.N=null;Z.C.stop();Z.Y&&k&&Z.Y.hT();Z.G=null;Z.Y=null};
Jz=function(Z,k,N,a,T){const K=Z.V;K!==Z.app.wA()&&Z.app.Sa();Z.kW.B("html5_sabr_csdai_seek_log")||(T="");K.seekTo(k,{b0:"application_timelinemanager"+(T??""),...N});zef(Z,a)};
zef=function(Z,k){Z=Z.app.wA();const N=Z.getPlayerState();k.isOrWillBePlaying()&&!N.isOrWillBePlaying()?Z.playVideo():k.isPaused()&&!N.isPaused()&&Z.pauseVideo()};
nvb=function(Z){var k=Z.U.find(N=>en(Z,N));
if(k){const N=Z.app.wA();oK(Z);const a=new g.QR(8);k=MTf(Z,k)/1E3;Jz(Z,k,{},a,"_force");N.U6("forceParentTransition",{childPlayback:1});Z.V.U6("forceParentTransition",{parentPlayback:1})}};
bx=function(Z,k=-1,N=Infinity){for(const [Q,q]of Z.L){var a=Q,T=q;T.PV>=k&&T.target&&T.target.R4<=N&&(Z.V.removeCueRange(a),Z.L.delete(a))}a=[];for(const Q of Z.U)Q.SI>=k&&Q.R4<=N?(T=Z,T.j===Q&&oK(T),en(T,Q)&&T.app.Sa()):a.push(Q);Z.U=a;const {n5:K,Vd:y}=Sn(Z,k/1E3);K&&(k=y*1E3,IWj(Z,K,k,K.R4===K.SI+K.durationMs?K.SI+k:K.R4));({n5:k}=Sn(Z,N/1E3));k&&z5(Z,`Invalid clearEndTimeMs=${N} that falls during ${`playback={timelinePlaybackId=${k.tI} video_id=${k.playerVars.video_id} durationMs=${k.durationMs} enterTimeMs=${k.SI} parentReturnTimeMs=${k.R4}}`}.`+
"Child playbacks can only have duration updated not their start.")};
IWj=function(Z,k,N,a){k.durationMs=N;k.R4=a;a={hd:UN(N,!0),PV:N,target:null};JVr(Z,k,a);en(Z,k)&&Z.app.wA().getCurrentTime()*1E3>N&&(k=MTf(Z,k)/1E3,N=Z.app.wA().getPlayerState(),Jz(Z,k,{},N,"_update"))};
Evy=function(Z){Z&&Z!=="web"&&jQf.includes(Z)};
X3G=function(Z,k){return k?!!Z.V.get(k):!1};
WNN=function(Z,k){Z.dataset.version=k};
YUf=function(Z){Z.BF=!Z.BF;Z.AV=!0;Z.element.classList.toggle("ytp-retro-player",Z.BF);Z.resize();Z.AV=!1;g.A7(Z.app.rA,"onRetroModeChanged",Z.BF)};
Zui=function(Z){const k=Z.app.rA,N=()=>{Z.Ns=new g.DJ(0,0,0,0);Z.Ey=new g.DJ(0,0,0,0)},a=y=>{y.getVideoData()&&Z.updateVideoData(y.getVideoData())},T=(y,Q)=>{Z.FX(y,Q)},K=y=>{Z.U3&&px(Z);
RK(Z)!==Z.N5&&Z.resize();Z.app.X().B("web_enable_smart_zoom")&&Z.qv&&(y.state.isPaused()?Z.qv.pause():y.Ub(8)&&Z.qv.playState==="paused"&&Z.qv.play())};
k.addEventListener("initializingmode",N);k.addEventListener("videoplayerreset",a);k.addEventListener("videodatachange",T);k.addEventListener("presentingplayerstatechange",K);Z.addOnDisposeCallback(()=>{k.removeEventListener("initializingmode",N);k.removeEventListener("videoplayerreset",a);k.removeEventListener("videodatachange",T);k.removeEventListener("presentingplayerstatechange",K)})};
aCf=function(Z){var k=Z.SL();let N=1;var a=!1;const T=kQr(Z,k,Z.getVideoAspectRatio()),K=Z.app.X(),y=K.B("enable_desktop_player_underlay"),Q=lqi();var q=g.Q5(K.experiments,"player_underlay_min_player_width");q=y&&Z.RB&&Z.getPlayerSize().width>q;if(RK(Z)){var r=Nfy(Z);var C=isNaN(r)||g.Z3||Ka&&g.v9||q;Yh&&!g.hg(601)?r=T.aspectRatio:C=C||K.controlsType==="3";C?q?(C=K.B("place_shrunken_video_on_left_of_player")?16:Z.getPlayerSize().width-k.width-16,r=Math.max((Z.getPlayerSize().height-k.height)/2,0),
C=new g.DJ(C,r,k.width,k.height),Z.U3.style.setProperty("border-radius","12px")):C=new g.DJ(0,0,k.width,k.height):(N=T.aspectRatio/r,C=new g.DJ((k.width-T.width/N)/2,(k.height-T.height)/2,T.width/N,T.height),N===1&&g.v9&&(r=C.width-k.height*r,r>0&&(C.width+=r,C.height+=r)));g.D(Z.element,"ytp-fit-cover-video",Math.max(C.width-T.width,C.height-T.height)<1);if(Q||Z.VN)Z.U3.style.display="";Z.N5=!0}else{C=-k.height;Yh?C*=window.devicePixelRatio:g.iS&&(C-=window.screen.height);C=new g.DJ(0,C,k.width,
k.height);if(Q||Z.VN)Z.U3.style.display="none";Z.N5=!1}OQ(Z.Ns,C)||(Z.Ns=C,g.CQ(K)?(Z.U3.style.setProperty("width",C.width+"px","important"),Z.U3.style.setProperty("height",C.height+"px","important")):g.n1(Z.U3,C.getSize()),a=new g.Of(C.left,C.top),g.o4(Z.U3,Math.round(a.x),Math.round(a.y)),a=!0);k=new g.DJ((k.width-T.width)/2,(k.height-T.height)/2,T.width,T.height);OQ(Z.Ey,k)||(Z.Ey=k,a=!0);g.ij(Z.U3,"transform",N===1?"":`scaleX(${N})`);y&&q!==Z.IP&&(q&&(Z.U3.addEventListener(Mu,Z.Bg),Z.U3.addEventListener("transitioncancel",
Z.Bg),Z.U3.classList.add(g.Cs.VIDEO_CONTAINER_TRANSITIONING)),Z.IP=q,Z.app.rA.publish("playerUnderlayVisibilityChange",Z.IP?"transitioning":"hidden"));return a};
px=function(Z){var k=Z.app.X().controlsType==="3"&&!Z.oe&&RK(Z)&&!Z.app.OC||!1;Z.U3.controls=k;Z.U3.tabIndex=k?0:-1;Z.app.X().Y&&(Z.U3.ariaHidden="true");k?Z.U3.removeEventListener("focus",Z.uG):Z.U3.addEventListener("focus",Z.uG)};
Nfy=function(Z){var k=Z.app.wA();if(k=k?k.getVideoData():null){if(g.WZ(k)||g.Yz(k)||g.Zd(k))return 16/9;if(O1(k)&&k.D.V())return Z=k.D.videoInfos[0].video,nx(Z.width,Z.height)}return(Z=Z.U3)?nx(Z.videoWidth,Z.videoHeight):16/9};
nx=function(Z,k){return Math.abs(IK*k-Z)<1||Math.abs(IK/Z-k)<1?IK:Z/k};
kQr=function(Z,k,N,a){let T=N;const K=nx(k.width,k.height);Z.MG?T=N<K?Infinity:0:isNaN(Z.fL)?isNaN(Z.vn)||(T=Z.vn):T=Z.fL;isFinite(T)||(T=Math.max(N,K));Z=T>K?{width:k.width,height:k.width/T,aspectRatio:T}:T<K?{width:k.height*T,height:k.height,aspectRatio:T}:{width:k.width,height:k.height,aspectRatio:K};a||isNaN(N)||(N>T?Z.width=Z.height*N:N<T&&(Z.height=Z.width/N),Z.aspectRatio=N);return Z};
RK=function(Z){if(Z.app.getAppState()===1)return!1;if(Z.app.getAppState()===6)return!0;var k=Z.app.wA();if(!k||k.GC())return!1;Z=Z.app.rA.getPlayerStateObject();k=!Z.V(2)||k&&k.getVideoData().j;const N=Z.V(1024);return Z&&k&&!N&&!Z.isCued()};
Tfy=function(Z){if(Z.csn!==g.C9())if(Z.csn==="UNDEFINED_CSN")Z.csn=g.C9();else{var k=g.C9(),N=g.rl();if(k&&N){Z.csn=k;for(const a of Z.elements){const T=a.visualElement;T&&T.isClientVe()&&k&&N&&(g.ii("combine_ve_grafts")?nw(Rh(),T,N):g.ai(g.wl)(void 0,k,N,T))}}if(k)for(const a of Z.V)(Z=a.visualElement)&&Z.isClientVe()&&g.zO(k,Z)}};
KLy=async function(Z){if(!Z.C3){Z.C3=Z.zt(Z.O);try{const N=Promise.withResolvers();var k=setTimeout(()=>{N.reject("timeout")},1E4);
Z.C3.onerror=()=>{N.reject("error")};
Z.C3.onmessage=()=>{N.resolve();clearTimeout(k)};
await N.promise;Z.C3.onmessage=null;Z.C3.onerror=null;Z.C3.addEventListener("message",a=>void Z.receive(a));
Z.U6("workerCtor",{})}catch(N){clearTimeout(k),Z.C3?.terminate(),Z.C3.onmessage=null,Z.C3.onerror=null,Z.C3=void 0,Z.U6("workerErr",{e:`${N}`})}}};
yUf=function(Z,k){if(Z.V&&Z.V.byteLength===k)return Z.V;const N=new Uint8Array(k);let a=0;for(;k>0;){const T=new Uint8Array(Math.min(k,65536));crypto.getRandomValues(T);N.set(T,a);k-=T.length;a+=T.length}return Z.V=N};
Q9f=function(Z,k){Z.C3&&(k=yUf(Z,k),k.length>0&&k[0]++,k={[0]:0,[1]:performance.now(),[2]:k},Z.request(k))};
q7f=async function(Z){Z.U!==void 0||Z.D||(Z.D=!0,await KLy(Z),Z.D=!1,Z.C3&&(Q9f(Z,Z.N),Z.U=setInterval(()=>{Z.sendRequest()},Z.intervalMs)))};
rUf=function(Z,k){const N=Z.xg.bx;return N?Pt(N.getPlayerState()):Z.getVideoData().enableServerStitchedDai&&k===2?(Z.kW.Yl().V.Aq(jn)?Z.xg.V?.isAd()??!1:Z.AI?.qX(Z.getCurrentTime()))?Z.vM:-1:k!==2||Z.g_()?Z.vM:Z.df};
Fd=function(Z){return Z.OC&&Z.getVideoData().mutedAutoplay};
EN=function(Z,k,N){k&&(k=Z.PA({playerType:N}),k===Z.DF()&&(k.getVideoData().Ap=!0))};
WS=function(Z,k,N=!0,a,T,K){const y=Z.PA({playerType:T});var Q=y.getVideoData();y.getPlayerType()===2&&!Z.g_(y)&&!Q.isSeekable||g.jI(Q)||((Q=Z.xg.bx)?Q.seekTo(k,{gj:!N,yN:a,b0:"application",seekSource:K}):(y&&y===Z.DF()&&Z.vA&&!C4r(Z,k)&&Z.setLoopRange(null),Z.seekTo(k,N,a,T,K,"_request")))};
kQ=function(Z,k){k=Z.PA({playerType:k});k=Y$(Z,k);return ZV(Z,k.Ja(),k)};
TB=function(Z,k,N){Z.kW.FS&&(Z.XQ=k,k.muted||Nx(Z,!1),N&&Z.kW.storeUserVolume&&!Z.kW.iq&&(N={volume:Math.floor(k.volume),muted:k.muted},N.unstorable||(g.Z_("yt-player-volume",N),g.Z_("yt-player-volume",N,2592E3))),a_(Z),N=g.Cf&&Z.mediaElement&&!Z.mediaElement.zP(),Z.kW.iq&&!N||g.Xd(Z.rA,"onVolumeChange",{muted:k.muted,volume:k.volume,unstorable:!Z.kW.storeUserVolume}))};
KX=function(Z,k,N,a,T,K,y){k={id:k,namespace:y??"appapi"};K==="chapter"?(k.style=uX.CHAPTER_MARKER,k.visible=!0):isNaN(T)||(K==="ad"?k.style=uX.AD_MARKER:(k.style=uX.TIME_MARKER,k.color=T),k.visible=!0);Z.kc([new g.pe(N*1E3,a*1E3,k)],1);return!0};
mhr=function(Z,k,N=!0,a,T){const K=Z.PA({playerType:1});let y=0;K.getStreamTimeOffset()&&!K.mx()&&(y=K.getStreamTimeOffset());WS(Z,k-y,N,a,1,T)};
s9y=function(Z){if(Z.kW.storeUserVolume){Z=g.kh("yt-player-volume")||{};const k=Z.volume;Z={volume:isNaN(k)?100:g.u0(Math.floor(k),0,100),muted:!!Z.muted}}else Z={volume:100,muted:Z.kW.mute};return Z};
AUb=function(Z,k,N,a,T,K=!0){const y=Z.HG();if(!y)return K&&Z.getVideoData().isLivePlayback&&Z.iM.push({id:k,vE:N,GY:a}),!1;K=y-Z.getCurrentTime();return KX(Z,k,N-K,a-K,void 0,void 0,T)};
rP=function(Z,k,N,a,T,K,y,Q,q,r){var C=k^Z;if((Z&121)==Z){Zj(C^3250,C^7402,N);var m=N[c[C^3218]]+(N[c[C^3218]]?c[C^3278]:c[C^3258])+N[c[C^3211]]+N[c[C^3214]];if(UQ(1,C^2828,N)){const d=[];g.BB(N[c[6]],(h,B)=>{h!==null&&d[c[C^3226]](`${B}=${h}`)});
m+=`?${d[c[C^3235]](c[C^3233])}`}var A=m}if(!(Z+9&13))a:{m=N[c[C^374]](c[C^361]);var P=[/(](\(),})/,/,,(\/)[,//[,,]'/,-(C^2085359686),C^1473963716,C^1445432543,PF0,Sff,C^2131808136,null,Ogb,-(C^1916538047),m,m,-(C^278454928),P4U,-(C^2071297426),Lrj,-(C^1541386549),Ebb,C^1449826290,m,C^2123702829,-(C^300086011),-(C^2033823737),C^723994193,-(C^300999799),C^170243731,UMr,OLi,SRi,B2f,C^308341377,-(C^581651782),LZf,C^2075526991,-(C^1941276438),-(C^1810717554),-(C^474878821),null,C^1441614285,C^468501280,
c[C^307],Ipy,C^308341377,Zif,-(C^320791095),stf,-(C^854782319),-(C^1384714538),C^1309287856,C^1888535780,C^1509099999,C^589152423,-(C^2137273466),C^723994193,C^665974508,c[C^336],null,C^386943407,v2y,-(C^418558719),C^1118914634,c[C^348],Tib,SLf,-(C^821090891),C^739542215,-(C^1972056284),C^737452025,-(C^35818179),-(C^1212551859),guy,-(C^1894712785),-(C^625902546),yEb,C^946280597,-(C^1072433955),THj,C^1936976304,-(C^625902546),c0f,-(C^219349481),-(C^835253865),-(C^1042902930),c[C^294],C^1684538732];
P[C^362]=P;P[C^324]=P;P[C^347]=P;if(typeof cUf===c[C^305]){A=N;break a}try{P=UQ(C^363,C^123,P)}catch(d){A=c[C^310]+N;break a}A=m[c[C^326]](c[C^361])}(Z|48)==Z&&(A=a(T,K,y,Q,q,r));(Z-5|6)>=Z&&Z+6>>2<Z&&(Zj(C^8178,C^4010,N),(m=N[c[6]][c[C^8174]]||null)&&(m=x4(C^8138,C^5906,m,N)),A=[]);(Z>>1&15)==1&&N[c[3]]!=0&&(m=uy(16,6124,a,N),a=m[0]);return A};
Huf=function(Z,k){Z.Yg().autonavState=k;g.Z_("yt-player-autonavstate",k);Z.rA.publish("autonavchange",k)};
yM=function(Z,k){Z.playlist&&(g.nM(Z.playlist),Z.playlist=null);k&&(Z.Po&&(k.fetch=0),Z.playlist=new dhy(Z.kW,k))};
qx=function(Z,k,N){k=Z.PA({playerType:N}).jl(k);N&&Z.getPresentingPlayerType()!==N||QM(Z,"cuerangesremoved",k)};
mV=function(Z,k,N,a=Infinity,T=0){var K=Z.wA();N=N||K.getPlayerType();(K=rF(Z,N,k,!0))||(K=CX(Z,N,k,!0));k=Z.DF();N===2&&k&&(N=K.getVideoData(),k.GU(N.clientPlaybackNonce,N.qX||"",N.breakType||0,N.lz,N.videoId||""));Z.Yt(K,a,0,T)};
XEf=function(Z){const k=Z.webPlayerContextConfig.trustedJsUrl;return k?RW(k).toString():Z.webPlayerContextConfig.jsUrl};
Vdi=function(Z){var k="";let N="";var a=XEf(Z),T=cj(a,"cb");T&&/^[\w-]+$/.test(T)&&(N=T);a.indexOf("//")===0&&(a=Z.kW.protocol+":"+a);T=a.lastIndexOf("/base.js");T!==-1&&(k=a.substring(0,T+1));if(a=Error().stack)if(a=a.match(/\((.*?\/(debug-)?player-.*?):\d+:\d+\)/))a=a[1],a.includes(k)||g.L9(Error("Player module URL mismatch: "+`${a} vs ${k}.`));k=new LLb(Z.rA,k,N);e1y(k,{destroyed:()=>{Z.onApiChange()}});
return k};
FLN=function(Z){xi(Z,function(){const k=this;return function*(){k.Fa.tick("wasm_s");const N=YJ(k.WG)?a=>gz(kvU(k.WG),T=>T.cY(a)):void 0;
try{const a=Ctf(k.webPlayerContextConfig.wasmModuleUrl,N,k.uT.bind(k)),T=yield*GK(a);k.Fa.tick(T.V?"wasm_fa":"wasm_fw");uZf(k.kW,T)}catch(a){k.Fa.tick("wasm_ferr")}}()})};
tdf=function(Z){const k=new g.xJ(Z.kW,Z.dB);Z.rA.publish("initialvideodatacreated",k);return CX(Z,1,k,!1)};
uVX=function(Z){const k=Z.DF();k.setPlaybackRate(Z.kW.Y?1:hly(Z,Number(g.kh("yt-player-playback-rate"))||1));k.tZ(Z.lJ,Z);k.IW()};
fCr=function(Z){Z.pw();var k=Z.dB;AX(Z);Z.events.K(window,"resize",Z.zb);const N=Z.Yg();g.Xd(Z.rA,"onVolumeChange",Z.XQ);if(k&&$J(k)){const a=t4(Z.kW);a&&!Z.Po&&(k.fetch=0);const T=g.PQ(Z.kW);T&&!Z.Po&&(k.fetch=0);yM(Z,k);g.PQ(Z.kW)&&Z.Fa.tick("ep_pr_s");if(!a||Z.Po)if(T&&!Z.Po)PP(Z);else if(!N.cG())Z.playlist.onReady(()=>{cP(Z)})}Z.jP(Z.DF(),!1,!0);
Z.DF().getPlayerState().V(128)||(k=g3N(!Z.kW.deviceIsAudioOnly),k==="fmt.noneavailable"?Z.Ar("html5.missingapi",2,"HTML5_NO_AVAILABLE_FORMATS_FALLBACK","nocodecs.1"):k==="html5.missingapi"?Z.Ar(k,2,"UNSUPPORTED_DEVICE","nocanplaymedia.1"):N&&N.cG()&&HP(Z)&&(Z.kW.mq||Z.kW.A1)?dF(Z):N.VC?Z.rA.mutedAutoplay({durationMode:N.mutedAutoplayDurationMode}):g.kh("yt-player-playback-on-reload")?(g.TO("embedsItpPlayedOnReload",{playedOnReload:!0,isLoggedIn:!!Z.kW.xW}),g.Z_("yt-player-playback-on-reload",!1),
dF(Z)):h4(Z.kW)||lCN(Z),g.fQ(Z.kW)||Yy(Z.kW)==="MWEB"?(g.c9(g.dO(),()=>{XH(Z)}),g.c9(g.dO(),()=>{uQ0()})):(XH(Z),uQ0()))};
Bfb=function(Z){const k=N=>{N.stack&&N.stack.indexOf("player")!==-1&&Z.wA().YR(N)};
tn.subscribe("handleError",k);k6.push(k);return()=>{tn.unsubscribe("handleError",k);const N=k6.indexOf(k);N!==-1&&k6.splice(N,1)}};
CX=function(Z,k,N,a,T){Z=g.Dhf(Z,k,N,T);Z=new g.LX(Z);a&&Z.IW();return Z};
hly=function(Z,k){var N=Z.rA.getAvailablePlaybackRates();k=Number(k.toFixed(2));Z=N[0];N=N[N.length-1];k<=Z?k=Z:k>=N?k=N:(Z=Math.floor(k*100+.001)%5,Z!==0&&(k-=Z*.01,k=Math.floor(k*100+.001)/100));return k};
FH=function(Z){VM(Z);Z.setLoopVideo(!1);Z.setLoopRange(null);Z.rA.publish("legacyadtrackingpingreset");Z.T$={};Z.iM=[];Bdi(Z.Fa);if(Z.AI){var k=Z.AI,N=Z.DF();N.getPlayerType();lx(k,!1);$$(k);vvy(k);k.playback=N}k=Z.uq;Z=Z.DF();Z.getPlayerType()!==1&&z5(k,"invalidParentVideoPlayerType");G5(k,!1);bx(k);k.V=Z};
OuX=function(Z){const k=Z.mediaElement;s9()?Z.xL.K(k,"webkitpresentationmodechanged",Z.Sk):window.document.pictureInPictureEnabled&&(Z.xL.K(k,"enterpictureinpicture",()=>{Z.XP(!0)}),Z.xL.K(k,"leavepictureinpicture",()=>{Z.XP(!1)}));
VL&&(Z.xL.K(k,"webkitbeginfullscreen",()=>{Z.uA(3)}),Z.xL.K(k,"webkitendfullscreen",()=>{Z.uA(0)}))};
AX=function(Z){Z.mediaElement=Z.kW.deviceIsAudioOnly?new g.WE(g.TU("AUDIO")):E7.pop()||new g.WE(g.TU("VIDEO"));g.u(Z,Z.mediaElement);Z.wA().setMediaElement(Z.mediaElement);try{Z.kW.iq?(Z.oi&&Z.events.Ce(Z.oi),Z.oi=Z.events.K(Z.mediaElement,"volumechange",Z.VE)):(Z.mediaElement.N(Z.XQ.muted),Z.mediaElement.setVolume(Z.XQ.volume/100))}catch(T){Z.Ar("html5.missingapi",2,"UNSUPPORTED_DEVICE",`setvolume.1;emsg.${T&&typeof T==="object"&&"message"in T&&typeof T.message==="string"&&T.message.replace(/[;:,]/g,
"_")}`);return}Z.xL.U();OuX(Z);var k=Z.template,N=Z.mediaElement.lq();k.U3=N;k.oe=!1;k.U3.parentNode||qi(k.KE,k.U3,0);k.Ns=new g.DJ(0,0,0,0);aCf(k);px(k);N=k.U3;g.jX(N,"video-stream");g.jX(N,g.Cs.MAIN_VIDEO);const a=k.app.X();a.oE&&N.setAttribute("data-no-fullscreen","true");a.B("html5_local_playsinline")?"playsInline"in q9()&&(N.playsInline=!0):a.x9&&(N.setAttribute("webkit-playsinline",""),N.setAttribute("playsinline",""));a.Sb&&k.U3&&k.K(N,"click",N.play,N);try{Z.mediaElement.activate()}catch(T){Z.Ar("html5.missingapi",
2,"UNSUPPORTED_DEVICE",`activate.1;emsg.${T&&typeof T==="object"&&"message"in T&&typeof T.message==="string"&&T.message.replace(/[;:,]/g,"_")}`)}};
QM=function(Z,k,N){Z.rA.publish(k,N);const a=g.Qw(Z.kW)||g.CQ(Z.kW)||g.oJ(Z.kW);if(N&&a){let T;switch(k){case "cuerangemarkersupdated":T="onCueRangeMarkersUpdated";break;case "cuerangesadded":T="onCueRangesAdded";break;case "cuerangesremoved":T="onCueRangesRemoved"}T&&g.A7(Z.rA,T,N.map(K=>({getId(){return this.id},end:K.end,id:K.getId(),namespace:K.namespace==="ad"?"ad":"",start:K.start,style:K.style,visible:K.visible,markerPositionMs:K.markerPositionMs})))}};
vkr=function(Z,k=!0){var N;if(N=Z.bX){N=Z.bX;var a=Z.mediaElement;N=!!a&&a===N.mediaElement}N&&(Z.SU(),AX(Z));N=Z.wA();N.SU(!k);N.kF(Z.Bb,Z);N.getPlayerType()!==1&&N.dispose();Z=Z.xg;k=[Z.U];Z.U=Z.N;qu(Z,[],k)};
hX=function(Z,k,N,a){N&&(Z.SU(),AX(Z));N=Z.wA();N.Lt(k);const T=Z.getVideoData(),K={};K.video_id=T.videoId;K.adformat=T.adFormat;T.isLivePlayback||(K.start=N.getCurrentTime(),K.resume="1");T.isLivePlayback&&eI(T)&&g.KA(Z.kW)&&(K.live_utc_start=N.HG(),K.resume="1");T.zt&&(K.vvt=T.zt);T.Pq&&(K.vss_credentials_token=T.Pq,K.vss_credentials_token_type=T.ZT);T.oauthToken&&(K.oauth_token=T.oauthToken);K.autoplay=1;K.reload_count=T.Kp+1;K.reload_reason=k;T.J0&&(K.unplugged_partner_opt_out=T.J0);T.gD&&(K.ypc_is_premiere_trailer=
T.gD);T.playerParams&&(K.player_params=T.playerParams);T.O&&(K.itct=T.O);Z.loadVideoByPlayerVars(K,void 0,!0,void 0,void 0,a);k==="signature"&&Z.AI&&tX(Z)};
gkU=function(Z){if(!iuf(Z)){var k=Z.DF().TM();k&&(k=k.O(),k instanceof Promise&&k.catch(()=>{}));
uL(Z,Pt(Z.getPlayerStateObject()))}};
iuf=function(Z){if(Z.playlist&&(g.s$(Z.kW)||Z.kW.zt==="background_audio_playback")&&Z.h4()){const k=Z.kW.B("html5_player_autonav_logging");Z.nextVideo(!1,k);return!0}return!1};
uL=function(Z,k){const N=Z.wA(),a=N.getPlayerType();if(a!==2||Z.g_()){if(a===2&&Z.g_()||a===5||a===6||a===7)if(k===-1||k===0||k===5)return;if(k===0){if(Z.vA)return;if(N.hZ()&&g.Qw(Z.kW)){Z.playVideo();return}}Z.vM!==k&&(Z.vM=k,g.Xd(Z.rA,"onStateChange",k))}else Z.df!==k&&(Z.df=k,g.Xd(Z.rA,"onAdStateChange",k))};
lL=function(Z,k){return Z.xg.PA(k)};
g.Dhf=function(Z,k,N,a){let T=Z.Fa;k===2&&(T=new wEU(Z.kW));k=new g.fX(Z.kW,k,T,Z.template,(K,y,Q)=>{Z.rA.publish(K,y,Q)},()=>Z.rA.getVisibilityState(),Z.visibility,Z,Z.SY,N,a,Z.CC,Z.um);
Z.kW.Yl().V.Aq($h0)&&Z.Db(N.clientPlaybackNonce);return k};
Y$=function(Z,k){return Z.g_(k)?Z.DF():k};
BP=function(Z,k){const N=Z.wA();return k===Z.DF()&&Z.g_(k)&&Z.g_(N)?N:k};
DV=function(Z){Z=OK(Z.WG);return!!Z&&Z.loaded};
xhf=function(Z){const k=Z.getVideoData();var N=Z.WG;ZW(N)||N.L();!y7&&YJ(N)&&Wyf(N);j0(N,"embed");j0(N,"kids");j0(N,"remote");j0(N,"miniplayer");j0(N,"offline");j0(N,"unplugged");j0(N,"ypc",!1,!0);j0(N,"webgl",!1,!0);Yjy(N)||(j0(N,"captions",!0),j0(N,"endscreen"),N.V(),j0(N,"creatorendscreen",!0));N.N();N.S.publish("modulesCreated");Z.rA.publish("videoready",k)};
tX=function(Z){if(!DV(Z)){const k=bu(Z.WG);k&&!k.created&&Ww(Z.WG)&&k.create()}};
a_=function(Z){var k=Z.getVideoData();if(!k.BT){k=Z.kW.iq?1:kdN(k);const N=Z.mediaElement;N.N(Z.XQ.muted);try{N.setVolume(Z.XQ.volume*k/100)}catch{g.L9(new g.jD("b183742307",`multiplier: ${k}, volume: ${Z.XQ.volume}`))}}};
HP=function(Z){Z=Z.Yg();Z.cG();return Tn(Z)};
PP=function(Z,k){const N=(k?k:Z.Yg()).nh;Z.Fa.tick("ep_pr_r");if(N!=null&&(DlN(Z.playlist,N),Z.SH))Z.playlist.onReady(()=>{cP(Z,k)})};
cP=function(Z,k){const N=g.PQ(Z.kW)&&!Z.kW.O;var a=N&&k?k:g.Gx(Z.playlist);k=N&&k?k:Z.getVideoData();a&&(k.Ix&&(Z.kW.mq||Z.kW.A1)||!Z.H8?(k=k.Ap,a=Z.kL(a,1),k&&EN(Z,a)):Ot(Z,a,1));g.PQ(Z.kW)&&Z.Fa.tick("ep_p_l");Z.SH=!1;g.dv(Z.rA,"onPlaylistUpdate")};
dF=function(Z){var k=Z.DF();if(k.getPlayerState().V(128))return!1;k=k.getVideoData();HP(Z)&&Z.kW.A1&&(E7.length&&Z.OC?(TB(Z,{muted:!1,volume:Z.XQ.volume},!1),Nx(Z,!1)):E7.length||Z.XQ.muted||(TB(Z,{muted:!0,volume:Z.XQ.volume},!1),Nx(Z,!0)));HP(Z)&&g.PQ(Z.kW)&&k.mutedAutoplay&&(TB(Z,{muted:!0,volume:Z.XQ.volume},!1),Nx(Z,!0));k.Di&&TB(Z,{muted:!0,volume:Z.XQ.volume},!1);rF(Z,1,k,!1);const N=Z.DF();Z.rA.publish("initializingmode");Z.jP(N);Z.Ir(3);var a;if(!(a=!Z.kW.d9)){if(a=Z.bX){a=Z.bX;var T=Z.mediaElement;
a=!!T&&T===a.mediaElement}a=a&&Z.RI}a&&(Z.SU(),AX(Z),N.setMediaElement(Z.mediaElement));N.TD();if(N.getPlayerState().V(128))return!1;k.Tt||uL(Z,3);return Z.RI=!0};
lCN=function(Z){Z.rA.publish("initializingmode");Z.Ir(2);j0(Z.WG,"remote");j0(Z.WG,"miniplayer")};
cq=function(Z,k,N){var a=k^Z;if(!(Z>>1&7)){Zj(a^1249,a^5305,N);const K=bY(a^1158,a^932,N[c[a^1256]](c[a^1277])||c[a^1239])[c[a^1224]](c[0]);var T=N[c[a^1237]]===c[a^1221]&&K[c[3]]>1&&!!K[1]}(Z+2&3)==1&&(T=N[c[1]]?N[c[1]][c[28]](c[42]):N[c[21]]===c[42]);return T};
XH=function(Z){if(!Z.B("use_rta_for_player"))if(Z.B("fetch_att_independently"))Z.x3.XN();else{var k=Z.getVideoData().botguardData;k&&g.aV(k,Z.kW,Z.getVideoData().F_||"")}};
Nx=function(Z,k){k!==Z.OC&&(Z.OC=k,g.dv(Z.rA,"onMutedAutoplayChange",k))};
rF=function(Z,k,N,a){const T=vP(k,N),K=Z.xg.G.get(T)||null;if(!K)return null;Z.xg.G.remove(T);if(K.jm())return null;if(K.getPlayerState().V(128))return K.dispose(),null;if(K===lL(Z,{playerType:k}))return Z.Fa.infoGel({isCacheHit:!0}),K;if((K.getVideoData().oauthToken||N.oauthToken)&&K.getVideoData().oauthToken!==N.oauthToken)return null;k===1&&(k=Z.wA().getVideoData(),vZ(k)&&k.isAd()&&a||VM(Z));a||Z.jP(K,!0);Z.Fa.infoGel({isCacheHit:!0});return K};
GQf=function(Z){const k=(0,g.z)();var N=Z.getCurrentTime();Z=Z.getVideoData();N=1E3*(N-Z.startSeconds);Z.isLivePlayback&&(N=0);return k-Math.max(N,0)};
C4r=function(Z,k){if(!Z.vA)return!1;const N=Z.vA.startTimeMs*.001-1;let a=Z.vA.endTimeMs*.001;Z.vA.type==="repeatChapter"&&a--;return Math.abs(k-N)<=1E-6||Math.abs(k-a)<=1E-6||k>=N&&k<=a};
S7f=function(Z){var k=Z.wA();if(Z.B("html5_disable_loop_range_for_shorts_ads")&&k.getVideoData().isAd()?0:vZ(k.getVideoData())&&!k.SZ())k=kQ(Z)*1E3-Z.getVideoData().UB,Z.B("html5_gapless_new_slr")?(Z=Z.Je,qx(Z.app,"gaplessshortslooprange"),k=new g.pe(0,k,{id:"gaplesslooprange",namespace:"gaplessshortslooprange"}),(Z=Z.app.wA())&&Z.addCueRange(k)):Z.setLoopRange({startTimeMs:0,endTimeMs:k,type:"shortsLoop"})};
elf=function(Z){const k=Z.DF();if(!(k.getPlayerState().V(64)&&Z.Yg().isLivePlayback&&Z.vA.startTimeMs<5E3)){if(Z.vA.type==="repeatChapter"){var N=h6f(Z.GZ())?.jK(),a=Z.getVideoData()?.ov;N instanceof g.iL&&a&&(a=a[vT(a,Z.vA.startTimeMs)],N.renderChapterSeekingAnimation(0,a.title));isNaN(Number(Z.vA.loopCount))?Z.vA.loopCount=0:Z.vA.loopCount++;Z.vA.loopCount===1&&g.A7(Z.rA,"innertubeCommand",Z.getVideoData().aA)}N={b0:"application_loopRangeStart"};if(Z.vA.type==="clips"||Z.vA.type==="shortsLoop")N.seekSource=
58;k.seekTo(Z.vA.startTimeMs*.001,N)}};
ZV=function(Z,k,N){if(Z.g_(N)&&(N=N.getVideoData(),!gF(Z))){Z=Z.uq;for(var a of Z.U)if(N.tI===a.tI){k+=a.SI/1E3;break}a=k;for(const T of Z.U){if(N.tI===T.tI)break;Z=T.SI/1E3;if(Z<k)a+=T.durationMs/1E3+Z-T.R4/1E3;else break}return a}return k};
gF=function(Z){return Z.getVideoData().enableServerStitchedDai&&!!Z.AI};
VM=function(Z){(Z=bu(Z.GZ()))&&Z.created&&Z.destroy()};
okb=function(Z){const k=Z.getVideoData().BT,N=Z.kW.Qz,a=Z.isInline()&&!Z.getVideoData().pM,T=Z.mediaElement;k||N||a?T.hq():(T.Tt(),TB(Z,Z.XQ))};
vP=function(Z,k){return`${Z}_${k.videoId}_${k.tI}_${+k.isAutonav}${+k.RV}`};
JUU=function(Z,k){return k&&Z.kW.rD&&!Z.getVideoData()?.backgroundable?(Z.H_?Z.H_.start():Z.R9(),!0):!1};
Ot=function(Z,k,N=1){if(k.cG()){var a=CX(Z,N,k,!1);Z.cancelPlayback(4,N);Z.jP(a);a.IW();N===1&&(Z.Ir(1),g.PQ(Z.kW)&&!qN(k)?(k.dispose(),Z.DF().dispose()):lCN(Z))}else k.dispose(),(k=lL(Z,{playerType:N}))&&k.dispose(),Qn(Z.Yg())&&N===2&&Z.sB()};
zlX=function(Z,k,N,a,T){k=Vxf(k,N,a,T);(N=g.PQ(Z.kW)&&!Z.kW.O)&&!Z.Po&&(k.fetch=0);yM(Z,k);g.PQ(Z.kW)&&Z.Fa.tick("ep_a_pr_s");if(N&&!Z.Po)N=Z.Yg(),wbG(N,k).then(K=>{Z.SH=!0;PP(Z,K)});
else Z.playlist.onReady(()=>{cP(Z)});
g.PQ(Z.kW)&&Z.Fa.tick("ep_a_pr_r")};
wF=function(Z){const k=Uv(!0);return k&&(k===Z.template.element||Z.mediaElement&&k===Z.mediaElement.lq())?k:null};
buf=function(Z,k){var N=window.screen?.orientation;if(Z.kW.j&&N&&N.lock&&(!g.Cf||!Uhf))if(k){k=N.type.indexOf("portrait")===0;const a=Z.template.getVideoAspectRatio();let T=k;a<1?T=!0:a>1&&(T=!1);Z.ZE&&T===k||(N=N.lock(T?"portrait":"landscape"),N!=null&&N.catch(()=>{}),Z.ZE=!0)}else Z.ZE&&(Z.ZE=!1,N.unlock())};
pEy=function(Z,k){k.bounds=Z.getBoundingClientRect();const N=["display","opacity","visibility","zIndex"];for(const a of N)k[a]=GU(Z,a);k.hidden=!!Z.hidden};
Rly=function(Z,k){const N=lL(Z,{playerType:1});if(N){if(N.getVideoData().clientPlaybackNonce===k)return N;if((Z=Z.y_.V)&&Z.getVideoData().clientPlaybackNonce===k)return Z}return null};
Mdf=function(Z){return Z.name==="TypeError"&&Z.stack.includes("/s/player/")&&CE()<=105};
nkX=function(Z){return Z.isTimeout?"NO_BID":"ERR_BID"};
IC0=function(){let Z=null;GXN().then(k=>Z=k,k=>Z=nkX(k));
return Z};
j9y=function(){const Z=YE(1E3,"NO_BID");return g.zG(Yfy([GXN(),Z]).eK(nkX),()=>{Z.cancel()})};
I_r=function(Z){return Z.FN?g.QC().Aq(140)?"STATE_OFF":"STATE_ON":"STATE_NONE"};
$Q=function(Z,k,{eq:N,hd:a,cueProcessedMs:T}={},K=""){const y=Z.player.getVideoData({playerType:1}),Q=Z.player.X().nD;var q=0;if(T&&a&&!N){const A=a.end-a.start;A>0&&(q=Math.floor(A/1E3))}q=N?N.Xl:q;const r={AD_BLOCK:Z.V++,AD_BREAK_LENGTH:q,AUTONAV_STATE:I_r(Z.player.X()),CA_TYPE:"image",CPN:y.clientPlaybackNonce,DRIFT_FROM_HEAD_MS:Z.player.dk()*1E3,LACT:Qb(),LIVE_INDEX:N?Z.U++:1,LIVE_TARGETING_CONTEXT:N&&N.context?N.context:"",MIDROLL_POS:a?Math.round(a.start/1E3):0,MIDROLL_POS_MS:a?Math.round(a.start):
0,VIS:Z.player.getVisibilityState(),P_H:Z.player.fF().SL().height,P_W:Z.player.fF().SL().width,YT_REMOTE:Q?Q.join(","):""},C=VS(FS);Object.keys(C).forEach(A=>{C[A]!=null&&(r[A.toUpperCase()]=C[A].toString())});
K!==""&&(r.BISCOTTI_ID=K);a={};XS(k)&&(a.sts="20522",(K=Z.player.X().forcedExperiments)&&(a.forced_experiments=K));const m=P8(g.hm(k,r),a);return m.split("?").length!==2?xE(Error("Invalid AdBreakInfo URL")):g.GC(Z.player.X(),y?.oauthToken).then(A=>{if(A&&H8()){var P=SY();eY(P,A)}A=Z.player.jU(P);P=N&&Z.player.X().B("html5_send_cuepoint_id_in_ad_break_request")?N.identifier:void 0;P=ZRf(Z,m,r,y.isMdxPlayback,T,P);return g.xP(A,P,"/youtubei/v1/player/ad_break").then(d=>d)})};
Eki=function(Z,k){Z=Z.player.X();if(uS(Z)||BQ(Z))Z=g.G("INNERTUBE_CONTEXT"),Z?.adSignalsInfo?.advertisingId&&typeof Z?.adSignalsInfo?.limitAdTracking!=="undefined"&&(k.advertisingId=Z.adSignalsInfo.advertisingId,k.advertisingIdSignalType="DEVICE_ID_TYPE_CONNECTED_TV_IFA",k.limitAdTracking=Z.adSignalsInfo.limitAdTracking)};
nhN=function(Z,k,N,a,T,K){k.client||(k.client={});Z.player.X().B("h5_remove_url_for_get_ad_break")||(k.client.originalUrl=N);const y=c8(N);let Q=g.kX(N)?!1:!0;(y||Q)&&typeof Intl!=="undefined"&&(k.client.timeZone=(new Intl.DateTimeFormat).resolvedOptions().timeZone);Q=g.kX(N)?!1:!0;if(y||Q||a!==""){const q={};N=QS(tP(a)).split("&");const r=new Map;N.forEach(C=>{C=C.split("=");C.length>1&&r.set(C[0].toString(),decodeURIComponent(C[1].toString()))});
r.has("bid")&&(q.bid=r.get("bid"));q.params=[];WLX.forEach(C=>{r.has(C)&&(C={key:C,value:r.get(C)},q.params.push(C))});
Eki(Z,q);k.adSignalsInfo=q}k.client.unpluggedAppInfo||(k.client.unpluggedAppInfo={});k.client.unpluggedAppInfo.enableFilterMode=!1;N=T.V.cosver;N!=null&&N!=="cosver"&&(k.client.osVersion=N);N=T.V.cplatform;N!=null&&N!=="cplatform"&&N!==""&&(k.client.platform=N);N=T.V.cmodel;N!=null&&N!=="cmodel"&&(k.client.deviceModel=N);N=T.V.cplayer;N!=null&&N!=="cplayer"&&(k.client.playerType=N);N=T.V.cbrand;N!=null&&N!=="cbrand"&&(k.client.deviceMake=N);k.user||(k.user={});k.user.lockedSafetyMode=!1;g.s$(T)&&
Nl0(k,K,Z.player.getPlayerState(1));if(Z=T.livingRoomPoTokenId)k.client.tvAppInfo={...k.client.tvAppInfo,livingRoomPoTokenId:Z}};
jYj=function(Z,k){let N=!1;if(k==="")return N;k.split(",").forEach(a=>{const T={},K={clientName:"UNKNOWN_INTERFACE",platform:"UNKNOWN_PLATFORM",clientVersion:""};let y="ACTIVE";a[0]==="!"&&(a=a.substring(1),y="INACTIVE");a=a.split("-");a.length<3||(a[0]in Y7R&&(K.clientName=Y7R[a[0]]),a[1]in Zxf&&(K.platform=Zxf[a[1]]),K.applicationState=y,K.clientVersion=a.length>2?a[2]:"",T.remoteClient=K,Z.remoteContexts?Z.remoteContexts.push(T):Z.remoteContexts=[T],N=!0)});
return N};
CxU=function(Z){const k=new k5y(Z.V.fC);g.u(Z,k);Z=[new NW0(Z.V.Za),new aEr(Z.V.S),new TWb(Z.V.Za),new KPr(Z.V.BZ,Z.V.L5),new yzf,new QKf(Z.V.cZ,Z.V.t$,Z.V.Za),new qNy,new rzr(Z.V.t$)];for(const N of Z)kyN(k,N);for(const N of["adInfoDialogEndpoint","adFeedbackEndpoint"])fO(k,N,()=>{});
return k};
xQ=function(Z){const k=Z.XS,N=Z.Gt;Z=Z.k8;const a={FH6:new muy(k.get(),N),Gt:N};return{sH:new sKy(N,Z,k),context:a}};
DG=function(Z){Z.U=!1;const k={};Z.V&&Z.videoId&&(k.cttAuthInfo={token:Z.V,videoId:Z.videoId});OL("ad_to_video",k);AzG(Z)};
PxG=function(Z){if(Z.S.getVideoData({playerType:1})?.C){Z.U=!1;var k={};Z.V&&Z.videoId&&(k.cttAuthInfo={token:Z.V,videoId:Z.videoId});OL("video_to_ad",k)}};
czf=function(Z,k){for(const N of k)if((Z=N.renderer)&&(Z.instreamVideoAdRenderer||Z.linearAdSequenceRenderer||Z.sandwichedLinearAdRenderer||Z.instreamSurveyAdRenderer)){uJ("ad_i");g.lJ({isMonetized:!0});break}};
AzG=function(Z){if(Z.D)if(Z.Y==="AD_PLACEMENT_KIND_START"&&Z.actionType==="video_to_ad")Fq("video_to_ad");else{var k={adBreakType:XP(Z.Y),playerType:"LATENCY_PLAYER_HTML5",playerInfo:{preloadType:"LATENCY_PLAYER_PRELOAD_TYPE_PREBUFFER"},videoStreamType:Z.videoStreamType};Z.actionType==="ad_to_video"?(Z.contentCpn&&(k.targetCpn=Z.contentCpn),Z.videoId&&(k.targetVideoId=Z.videoId)):(Z.adCpn&&(k.targetCpn=Z.adCpn),Z.adVideoId&&(k.targetVideoId=Z.adVideoId));Z.adFormat&&(k.adType=Z.adFormat);Z.contentCpn&&
(k.clientPlaybackNonce=Z.contentCpn);Z.videoId&&(k.videoId=Z.videoId);Z.adCpn&&(k.adClientPlaybackNonce=Z.adCpn);Z.adVideoId&&(k.adVideoId=Z.adVideoId);g.lJ(k,Z.actionType);Z.S.X().experiments.yz("html5_ads_csi_qoes")&&(k=Z.S.lA(Z.actionType==="ad_to_video"?1:2),k=(0,g.z)()-1E3*k,iJ("qoes",k,Z.actionType))}};
HxX=function(Z){Z.contentCpn=null;Z.adCpn=null;Z.videoId=null;Z.adVideoId=null;Z.adFormat=null;Z.Y="AD_PLACEMENT_KIND_UNKNOWN";Z.actionType="unknown_type";Z.D=!1;Z.U=!1};
GB=function(Z,k){Z.S.cueVideoByPlayerVars(k,2)};
D6=function(Z,k,...N){k==="onAdStart"||k==="onAdEnd"?g.Xd(Z.S,k,...N):g.A7(Z.S,k,...N)};
x4=function(Z,k,N,a){var T=k^Z;if((Z|64)==Z){for(var K=T^5105,y=[];++K-y[c[3]]-(T^5009);)switch(K){case T^5023:K=T^5102;default:y[c[T^5036]](String[c[T^5025]](K));case T^5103:case T^5102:case T^5073:break;case T^5066:K-=T^5117;case T^5101:case T^5100:continue;case T^5003:K=T^5021;case T^5098:}var Q=y}Z-7>>3==2&&a[c[41]](a[c[3]],0,N);Z+2>>1<Z&&(Z-6^12)>=Z&&(K=rP(T^2271,T^2493,N),a[c[T^2240]](c[T^2299],K),Q=[]);if((Z&14)==Z){K=T^1067;for(y=[];++K-y[c[3]]-(T^1099);){switch(K){case T^1072:K=T^1095;continue;
case T^1040:K=T^1066;break;case T^1066:K-=T^1145;continue;case T^1105:K=T^1035;continue;case T^1093:K=T^1076}y[c[T^1142]](String[c[T^1147]](K))}Q=y}return Q};
cM=function(Z,k){return Z.S.X().B(k)};
var P4U=function(Z){return Zj[c[2]](this,12,3513,Z)};
duf=function(Z){return Z.S.X().experiments.yz("enable_desktop_discovery_video_abandon_pings")||uS(Z.S.X())};
XS0=function(Z){return Z.S.X().experiments.yz("enable_progres_commands_lr_feeds")};
LPy=function(Z){return Z.S.X().experiments.yz("enable_progress_commands_lr_shorts")};
xG=function(Z,k){return Z.S.X().B("html5_cue_video_for_preroll")&&k?.kind==="AD_PLACEMENT_KIND_START"?!1:Z.S.X().experiments.yz("html5_load_ads_instead_of_cue")};
GV=function(Z){return Z.S.X().experiments.yz("html5_preload_ads")};
VnR=function(Z){return Z.S.X().experiments.yz("html5_load_empty_player_in_media_break_sub_lra")};
S6=function(Z){return Z.S.X().experiments.yz("html5_ssdai_enable_media_end_cue_range")};
e6=function(Z){return Z.S.X().B("substitute_ad_cpn_macro_in_ssdai")};
y5=function(Z){return Z.S.getVideoData({playerType:1}).getPlayerResponse()?.playerConfig?.daiConfig?.enableServerStitchedDai||!1};
nd=function(Z){return Z.S.X().experiments.yz("enable_progress_commands_el_dai")};
w8y=function(Z){Z=Z.S.getVideoData({playerType:1});return!!Z&&Z.B("html5_preload_first_vod_video_ad")&&!Z.isDaiEnabled()&&!Z.isLivePlayback};
hC=function(Z){return Z.S.X().experiments.yz("enable_desktop_player_underlay")};
Cvf=function(Z){return Z.S.X().B("html5_enable_vod_slar_with_notify_pacf")};
X$=function(Z){return Z.S.X().experiments.yz("enable_ads_control_flow_deterministic_id_generation")};
qB=function(Z){return Z.S.X().experiments.yz("html5_cuepoint_identifier_logging")};
FPy=function(Z){return Z.S.X().B("html5_recognize_predict_start_cue_point")};
tnX=function(Z){return Z.S.X().experiments.yz("should_ignore_cuepoints_during_lifa_preroll")};
h2G=function(Z){switch(Z){case "audio_audible":return"adaudioaudible";case "audio_measurable":return"adaudiomeasurable";case "fully_viewable_audible_half_duration_impression":return"adfullyviewableaudiblehalfdurationimpression";case "measurable_impression":return"adactiveviewmeasurable";case "overlay_unmeasurable_impression":return"adoverlaymeasurableimpression";case "overlay_unviewable_impression":return"adoverlayunviewableimpression";case "overlay_viewable_end_of_session_impression":return"adoverlayviewableendofsessionimpression";
case "overlay_viewable_immediate_impression":return"adoverlayviewableimmediateimpression";case "viewable_impression":return"adviewableimpression";default:return null}};
JX=function(){if(o_===null){o_=new usG;Xr(Sc).U="b";var Z=Xr(Sc);let k=OH(Z)=="h"||OH(Z)=="b",N=!(bm(),!1);k&&N&&(Z.vD=!0,Z.Rq=new lEf)}return o_};
fEG=function(Z,k,N){Z.V[k]=N};
BWf=function(Z){switch(Z){case "abandon":case "unmuted_abandon":return"abandon";case "active_view_fully_viewable_audible_half_duration":return"fully_viewable_audible_half_duration_impression";case "active_view_measurable":return"measurable_impression";case "active_view_viewable":return"viewable_impression";case "audio_audible":return"audio_audible";case "audio_measurable":return"audio_measurable";case "complete":case "unmuted_complete":return"complete";case "end_fullscreen":case "unmuted_end_fullscreen":return"exitfullscreen";
case "first_quartile":case "unmuted_first_quartile":return"firstquartile";case "fullscreen":case "unmuted_fullscreen":return"fullscreen";case "impression":case "unmuted_impression":return"impression";case "midpoint":case "unmuted_midpoint":return"midpoint";case "mute":case "unmuted_mute":return"mute";case "pause":case "unmuted_pause":return"pause";case "progress":case "unmuted_progress":return"progress";case "resume":case "unmuted_resume":return"resume";case "swipe":case "skip":case "unmuted_skip":return"skip";
case "start":case "unmuted_start":return"start";case "third_quartile":case "unmuted_third_quartile":return"thirdquartile";case "unmute":case "unmuted_unmute":return"unmute";default:return null}};
Ut=function(Z,k,N){const a=N.Ol,T=N.Jk,K=N.listener;N=N.nW;if(Z.V.has(k))wm("Unexpected registration of layout in LidarApi");else{if(N){if(Z.U.has(N))return;Z.U.add(N)}Z.V.set(k,K);Eh(bm().vI,"fmd",1);qY(Xr(Sc),a);fEG(JX(),k,{Kw:()=>{if(!T)return{};const y=Z.S.getPresentingPlayerType(!0);return Z.S.getVideoData({playerType:y})?.isAd()?{currentTime:Z.E6.get().getCurrentTimeSec(y,!1,void 0),duration:T,isPlaying:zB(Z.E6.get(),y).isPlaying(),isVpaid:!1,isYouTube:!0,volume:Z.E6.get().isMuted()?0:Z.E6.get().getVolume()/
100}:{}}})}};
bL=function(Z,k){Z.V.has(k)?(Z.V.delete(k),delete JX().V[k]):wm("Unexpected unregistration of layout in LidarApi")};
Du0=function(Z,k){if(Z.S.isLifaAdPlaying()){var N=Z.S.Sd(!0,!0);Z.j(k,N.width*.5*1.1,N.height*.25*1.1,N.width*.5*.9,N.height*.5*.9)}};
ixX=function(Z,k){const N={};Oxf(Z,N,k);v$0(N);N.LACT=pX(()=>Qb().toString());
N.VIS=pX(()=>Z.getVisibilityState().toString());
N.SDKV="h.3.0";N.VOL=pX(()=>Z.isMuted()?"0":Math.round(Z.getVolume()).toString());
N.VED="";return N};
g$G=function(Z,k){const N={};if(k||!Z||!Z.kind)return N;if(Z.kind==="AD_PLACEMENT_KIND_MILLISECONDS"||Z.kind==="AD_PLACEMENT_KIND_CUE_POINT_TRIGGERED"){if(!Z.adTimeOffset||!Z.adTimeOffset.offsetStartMilliseconds)return g.b(Error("malformed AdPlacementConfig")),N;N.MIDROLL_POS=pX(L1(Math.round(Cg(Z.adTimeOffset.offsetStartMilliseconds)/1E3).toString()))}else N.MIDROLL_POS=pX(L1("0"));return N};
pX=function(Z){return{toString(){return Z()}}};
wSN=function(Z,k,N){if(!N||g.ze(N))return Z;const a=Object.assign({},Z),T=k?encodeURIComponent:K=>K;
Z=(K,y)=>{(y=N[y])&&(a[K]=T(y))};
Z("DV_VIEWABILITY","doubleVerifyViewability");Z("IAS_VIEWABILITY","integralAdsViewability");Z("MOAT_INIT","moatInit");Z("MOAT_VIEWABILITY","moatViewability");Z=(K,y)=>{(y=N[y])&&(a[K]=y)};
Z("GOOGLE_VIEWABILITY","googleViewability");Z("VIEWABILITY","viewability");return a};
Oxf=function(Z,k,N){k.CPN=pX(()=>{var a;(a=Z.getVideoData({playerType:1}))?a=a.clientPlaybackNonce:(g.L9(Error("Video data is null.")),a=null);return a});
k.AD_MT=pX(()=>{if(N!=null)var a=N;else Z.X().B("enable_h5_shorts_ad_fill_ad_mt_macro")||Z.X().B("enable_desktop_discovery_pings_ad_mt_macro")||uS(Z.X())?(a=Z.getPresentingPlayerType(!0),a=Z.getVideoData({playerType:a})?.isAd()?Z.getCurrentTime({playerType:a,OP:!1}):0):a=Z.getCurrentTime({playerType:2,OP:!1});return $u0(a)});
k.MT=pX(()=>$u0(Z.getCurrentTime({playerType:1,OP:!1})));
k.P_H=pX(()=>Z.fF().SL().height.toString());
k.P_W=pX(()=>Z.fF().SL().width.toString());
k.PV_H=pX(()=>Z.fF().getVideoContentRect().height.toString());
k.PV_W=pX(()=>Z.fF().getVideoContentRect().width.toString())};
$u0=function(Z){return Math.round(Math.max(0,Z*1E3)).toString()};
v$0=function(Z){Z.CONN=pX(L1("0"));Z.WT=pX(()=>Date.now().toString())};
xuR=async function(Z,k,N,a,T){const K=!!k.scrubReferrer;N=g.hm(k.baseUrl,wSN(N,K,a));a={};if(k.headers){var y=Z.Y();y=y.V?await y.V:y.getValue();for(const Q of k.headers)switch(Q.headerType){case "VISITOR_ID":g.G("VISITOR_DATA")&&(a["X-Goog-Visitor-Id"]=g.G("VISITOR_DATA"));break;case "EOM_VISITOR_ID":g.G("EOM_VISITOR_DATA")&&(a["X-Goog-EOM-Visitor-Id"]=g.G("EOM_VISITOR_DATA"));break;case "USER_AUTH":y&&(a.Authorization=`Bearer ${y}`);break;case "PLUS_PAGE_ID":(k=Z.L())&&(a["X-Goog-PageId"]=k);break;
case "AUTH_USER":k=Z.V();!y&&k&&(a["X-Goog-AuthUser"]=k);break;case "DATASYNC_ID":Z.D()?.yz("enable_datasync_id_header_in_web_vss_pings")&&(k=Z.U(),c8(N)&&g.G("LOGGED_IN")&&k&&(a["X-YouTube-DataSync-Id"]=k))}"X-Goog-EOM-Visitor-Id"in a&&"X-Goog-Visitor-Id"in a&&delete a["X-Goog-Visitor-Id"]}g.iv(N,void 0,K,Object.keys(a).length!==0?a:void 0,"",!0,T)};
g7=function(Z,k,N){typeof N==="string"?Z.S.getVideoData({playerType:1}).Kg(k,N):Z.S.getVideoData({playerType:1}).U6(k,N)};
g8=function(Z,k){Z.S.sendVideoStatsEngageEvent(k,void 0,2)};
ymR=function(Z,k,N,a=[],T,K){const y=sd(Z.U.get(),k);if(y){var Q=Z.Qi.get().nN(k,N),q=eP(Z,R_(y),y,T,K);a.forEach((r,C)=>{r.baseUrl&&(Z.D.send(r.baseUrl,q,Q,r.attributionSrcMode),r.serializedAdPingMetadata&&Z.sH.V("ADS_CLIENT_EVENT_TYPE_PING_DISPATCHED",void 0,void 0,void 0,void 0,y,new G50(r,C),void 0,void 0,y.adLayoutLoggingData))})}else wm("Trying to track from an unknown layout.",void 0,void 0,{layoutId:k,
trackingType:N})};
Mx=function(Z,k){Z.V.has(k.kA())?wm("Trying to register an existing AdErrorInfoSupplier."):Z.V.set(k.kA(),k)};
nX=function(Z,k){Z.V.delete(k.kA())||wm("Trying to unregister a AdErrorInfoSupplier that has not been registered yet.")};
vt=function(Z,k){g.TO("adsClientStateChange",k)};
SNf=function(Z,k,N,a,T){const K=sd(Z.U.get(),N);K?(N=eP(Z,R_(K),K,void 0,void 0,a),k.hasOwnProperty("baseUrl")?Z.Y.send(k,N):Z.D.send(k,N,{},T)):wm("Trying to ping from an unknown layout",void 0,void 0,{layoutId:N})};
eP=function(Z,k,N,a,T,K){const y=N?e2f(Z):{},Q=N?o$N(Z,N.layoutId):{},q=Jzy(Z),r=T??N9(Z.XS.get(),2)?.clientPlaybackNonce;Z={...ixX(Z.S,a),...g$G(k.adPlacementConfig,N?.renderingContent!==void 0),...Q,...y,...q,FINAL:pX(()=>"1"),
AD_CPN:pX(()=>r||"")};
N?.renderingContent!==void 0||(Z.SLOT_POS=pX(()=>(k.B$||0).toString()));
N={};K=Object.assign({},Z,K);for(const C of Object.values(z2U))Z=K[C],Z!=null&&Z.toString()!=null&&(N[C]=Z.toString());return N};
Eb=function(Z,k,N){var a=k^Z;if(!((Z|9)>>4)){N[a^7162]<=6?(((0,N[a^7066])(N[a^7050],N[a^7092]),N[a^7077])(N[a^7053]),N[a^7066])(N[a^7042],N[a^7137]):(0,N[2])((0,N[a^7064])(N[a^7049],N[a^7081])<(0,N[a^7066])(N[a^7050],N[a^7139]),N[a^7066],N[a^7056],N[a^7059]);(0,N[a^7069])(N[a^7151],N[a^7053],N[a^7100]);(0,N[a^7066])(N[a^7050],N[5]);var T=[]}(Z>>2&2)==2&&(T=encodeURIComponent(N));if((Z+9&3)==2){const K=N[c[a^6708]](c[a^6677]);let y=0;K[0]||y++;const Q={};for(;y<K[c[3]];y+=2)K[y]&&W8(a^6709,a^15006,
Q,K[y],K[y+1]);T=Q}return T};
R_=function(Z){const k=Z.clientMetadata.PD("metadata_type_ad_placement_config");Z=Z.clientMetadata.PD("metadata_type_media_sub_layout_index");return{adPlacementConfig:k,B$:Z}};
e2f=function(Z){const k={},N=Z.Tu?.Ww();N!=null&&(k.SURVEY_ELAPSED_MS=pX(()=>Math.round(N*1E3).toString()));
k.SURVEY_LOCAL_TIME_EPOCH_S=pX(()=>Math.round(Date.now()/1E3).toString());
return k};
o$N=function(Z,k){Z=Z.V.get(k);return Z?(Z=Z.B_())?{YT_ERROR_CODE:Z.j3.toString(),ERRORCODE:Z.du.toString(),ERROR_MSG:Z.errorMessage}:{}:{}};
Jzy=function(Z){const k={},N=Z.S.getVideoData({playerType:1});k.ASR=pX(()=>N?.SB??null);
k.EI=pX(()=>N?.eventId??null);
return k};
N9=function(Z,k){const N=Z.S.getVideoData({playerType:k});return N?Z.jB(N,k||Z.S.getPresentingPlayerType(!0)):null};
I_=function(Z,k,N){const a=Z.jB(k,N);Z.mK=a;Z.listeners.forEach(T=>{T.ye(a)})};
Uu0=function(Z,k){Z.Fc=Z.Fc.filter(N=>N!==k)};
j6=function(Z,k){g.jX(Z.S.getRootNode(),k)};
Et=function(Z,k){g.Wp(Z.S.getRootNode(),k)};
zB=function(Z,k){return Z.S.getPlayerStateObject(k)};
WP=function(Z){Z.S.cueVideoByPlayerVars({videoId:"empty_video"},2)};
bxG=function(Z,k){const N=Z.S.X();g.ml(N)||N.controlsType!=="3"||Z.S.fF().Q3(k)};
YQ=function(Z,k,N){return Z.getCurrentTimeSec(k,N)};
Zh=function(Z,k){k=Z.XS.get().Fj.get(k)??null;if(k===null)return wm("Expected ad video start time on playback timeline"),0;Z=Z.S.getCurrentTime({playerType:2,OP:!0});return Z<k?0:Z-k};
pSG=function(Z){const k=Z.S.fF().SL();Z=Z.S.Sd(!0,!0);return k.height-(Z.height+Z.top)};
R2r=function(Z,k){if(!Z)return{HX:[],adSlots:[],Oy:!0,ssdaiAdsConfig:void 0};Z.trackingParams&&Ed(Z.trackingParams);if(Z.adThrottled)return{HX:[],adSlots:[],Oy:!0,ssdaiAdsConfig:void 0};const N=Z.adSlots??[];var a=Z.playerAds??[];if(!(a&&a.length||N.length))return{HX:[],adSlots:N,Oy:!1,ssdaiAdsConfig:void 0};a=a.map(T=>T.adPlacementRenderer).filter(T=>!(!T||!T.renderer));
if(!a.length&&!N.length)return{HX:[],adSlots:N,Oy:!1,ssdaiAdsConfig:void 0};if(k.end>0){const T=k.end.toString();a.forEach(K=>{(K=K.config&&K.config.adPlacementConfig)&&K.kind==="AD_PLACEMENT_KIND_MILLISECONDS"&&K.adTimeOffset&&K.adTimeOffset.offsetEndMilliseconds==="-1"&&K.adTimeOffset.offsetEndMilliseconds!==T&&(K.adTimeOffset.offsetEndMilliseconds=T)});
N.map(K=>g.J(K,PU)).forEach(K=>{(K=K?.slotEntryTrigger?.mediaTimeRangeTrigger)&&K.offsetEndMilliseconds==="-1"&&(K.offsetEndMilliseconds=T)})}return{HX:a,
adSlots:N,Oy:!1,ssdaiAdsConfig:Z.ssdaiAdsConfig}};
n$U=function(Z,k,N){k=g.ni(k,a=>new Mn0(a,N,a.id));
g.A7(Z.S,"onAdUxUpdate",k)};
kj=function(Z,k){for(const N of Z.listeners)k(N)};
IEU=function(Z,k){var N=Z.startSecs+Z.Xl;N=N<=0?null:N;if(N===null)return null;switch(Z.event){case "start":case "continue":case "stop":break;case "predictStart":if(k)break;return null;default:return null}k=Math.max(Z.startSecs,0);return{IF:new XC(k,N),rX:new oV(k,N-k,Z.context,Z.identifier,Z.event,Z.V)}};
eoj=function(Z,k,N){const a=g.F_(Z.V,k);if(a>=0)return k;k=-a-1;return k>=Z.V.length||Z.V[k]>N?null:Z.V[k]};
jKj=function(Z,k){Z.kO.push(k);let N=!1;for(const a of Z.listeners)N=a.nJ(k)||N;Z.Y=N;qB(Z.Gt.get())&&g7(Z.Za.get(),"onci",`cpi.${k.identifier};cpe.${k.event};cps.${k.startSecs};cbi.${N}`)};
WPy=function(Z,k){vt(Z.Za.get(),{cuepointTrigger:{event:E$U(k.event),cuepointId:k.identifier,totalCueDurationMs:k.Xl*1E3,playheadTimeMs:k.V,cueStartTimeMs:k.startSecs*1E3,cuepointReceivedTimeMs:Date.now(),contentCpn:Z.S.getVideoData({playerType:1}).clientPlaybackNonce}})};
E$U=function(Z){switch(Z){case "unknown":return"CUEPOINT_EVENT_UNKNOWN";case "start":return"CUEPOINT_EVENT_START";case "continue":return"CUEPOINT_EVENT_CONTINUE";case "stop":return"CUEPOINT_EVENT_STOP";case "predictStart":return"CUEPOINT_EVENT_PREDICT_START";case "prefetch":return"CUEPOINT_EVENT_PREFETCH";default:return J3(Z,"Unexpected cuepoint event")}};
YNy=function(Z){switch(Z){case 1:return 1;case 2:return 2;case 3:return 3;case 4:return 4;case 5:return 5;case 6:return 6;case 7:return 7;default:J3(Z,"unknown transitionReason")}};
yXU=function(Z,k,N,a,T){try{{const y=k.X();if(g.fQ(y))var K=new ZX0(Z,k,N,a,T);else if(g.O$(y))K=new kB0(Z,k,N,a,T);else if(LQ(y))K=new NFN(Z,k,N,a,T);else if(g.oJ(y))K=new aVU(Z,k,N,a,T);else if(g.CQ(y))K=new TFX(Z,k,N,a,T);else throw new TypeError("Unknown web interface");}return K}catch{return a=k.X(),wm("Unexpected interface not supported in Ads Control Flow",void 0,void 0,{platform:a.V.cplatform,interface:a.V.c,djA:a.V.cver,YPR:a.V.ctheme,DjW:a.V.cplayer,hKA:a.playerStyle}),new KVf(Z,k,N,T)}};
Nj=function(Z){return Z.V.XR};
Q_j=function(Z){Z=Z.X();return yw(Z)&&!g.KA(Z)&&Z.playerStyle==="desktop-polymer"};
qtf=function(Z){const k=g.Mc("html5-video-player");k&&g.D(k,"ytp-ad-display-override",Z)};
rXy=function(Z){const k=new g.af({J:"div",Z:"ytp-ad-text-overlay",A:[{J:"div",Z:"ytp-ad-overlay-ad-info-button-container"},{J:"div",Z:"ytp-ad-overlay-close-container",A:[{J:"button",Z:"ytp-ad-overlay-close-button",A:[Xh(Ta)]}]},{J:"div",Z:"ytp-ad-overlay-title",Da:"{{title}}"},{J:"div",Z:"ytp-ad-overlay-desc",Da:"{{description}}"},{J:"div",BD:["ytp-ad-overlay-link-inline-block","ytp-ad-overlay-link"],Da:"{{displayUrl}}"}]});Z.K(k.Lp("ytp-ad-overlay-title"),"click",N=>{Kp(Z,k.element,N)});
Z.K(k.Lp("ytp-ad-overlay-link"),"click",N=>{Kp(Z,k.element,N)});
Z.K(k.Lp("ytp-ad-overlay-close-container"),"click",Z.Sm);k.hide();return k};
CLR=function(Z){const k=new g.af({J:"div",BD:["ytp-ad-text-overlay","ytp-ad-enhanced-overlay"],A:[{J:"div",Z:"ytp-ad-overlay-ad-info-button-container"},{J:"div",Z:"ytp-ad-overlay-close-container",A:[{J:"button",Z:"ytp-ad-overlay-close-button",A:[Xh(Ta)]}]},{J:"div",Z:"ytp-ad-overlay-text-image",A:[{J:"img",W:{src:"{{imageUrl}}"}}]},{J:"div",Z:"ytp-ad-overlay-title",Da:"{{title}}"},{J:"div",Z:"ytp-ad-overlay-desc",Da:"{{description}}"},{J:"div",BD:["ytp-ad-overlay-link-inline-block","ytp-ad-overlay-link"],
Da:"{{displayUrl}}"}]});Z.K(k.Lp("ytp-ad-overlay-title"),"click",N=>{Kp(Z,k.element,N)});
Z.K(k.Lp("ytp-ad-overlay-link"),"click",N=>{Kp(Z,k.element,N)});
Z.K(k.Lp("ytp-ad-overlay-close-container"),"click",Z.Sm);Z.K(k.Lp("ytp-ad-overlay-text-image"),"click",Z.jY);k.hide();return k};
mxf=function(Z){const k=new g.af({J:"div",Z:"ytp-ad-image-overlay",A:[{J:"div",Z:"ytp-ad-overlay-ad-info-button-container"},{J:"div",Z:"ytp-ad-overlay-close-container",A:[{J:"button",Z:"ytp-ad-overlay-close-button",A:[Xh(Ta)]}]},{J:"div",Z:"ytp-ad-overlay-image",A:[{J:"img",W:{src:"{{imageUrl}}",width:"{{width}}",height:"{{height}}"}}]}]});Z.K(k.Lp("ytp-ad-overlay-image"),"click",N=>{Kp(Z,k.element,N)});
Z.K(k.Lp("ytp-ad-overlay-close-container"),"click",Z.Sm);k.hide();return k};
Kp=function(Z,k,N){const a=g.Rn(Z.macros),T=g.I4(k);a.AW={toString:()=>T.width.toString()};
a.AH={toString:()=>T.height.toString()};
const K=g.Mi(N,k).floor();a.I_X={toString:()=>K.x.toString()};
a.NX={toString:()=>K.x.toString()};
a.I_Y={toString:()=>K.y.toString()};
a.NY={toString:()=>K.y.toString()};
a.NM={toString:()=>Z.j.toString()};
for(const y of Z.G)Z.layoutId?PM(Z.Iq,y,Z.layoutId,a):g.b(Error("Missing layoutId for invideo_overlay_ad."));Z.api.pauseVideo()};
s_b=function(Z,k){Z=Z.api.getRootNode();g.D(Z,"ytp-ad-overlay-open",k);g.D(Z,"ytp-ad-overlay-closed",!k)};
QG=function(Z,k){if(k){var N=g.J(k,Xe)||null;N==null?g.b(Error("AdInfoRenderer did not contain an AdHoverTextButtonRenderer.")):(k=g.Mc("video-ads ytp-ad-module")||null,k==null?g.b(Error("Could not locate the root ads container element to attach the ad info dialog.")):(Z.O=new g.af({J:"div",Z:"ytp-ad-overlay-ad-info-dialog-container"}),g.u(Z,Z.O),Z.O.HD(k),k=new yG(Z.api,Z.layoutId,Z.interactionLoggingClientData,Z.Iq,Z.O.element,!1),g.u(Z,k),k.init(MP("ad-info-hover-text-button"),N,Z.macros),Z.L?
(k.HD(Z.L,0),k.subscribe("f",Z.qX,Z),k.subscribe("e",Z.hN,Z),Z.K(Z.L,"click",Z.HA),Z.K(g.Mc("ytp-ad-button",k.element),"click",()=>{if(g.J(g.J(N.button,Eq)?.serviceEndpoint,XcU))Z.MX=Z.api.getPlayerState(1)===2,Z.api.pauseVideo();else Z.api.onAdUxClicked("ad-info-hover-text-button",Z.layoutId)}),Z.s6=k):g.b(Error("Ad info button container within overlay ad was not present."))))}else g.L9(Error("AdInfoRenderer was not present within InvideoOverlayAdRenderer."))};
AXf=function(Z,k){if(qj(Z,rR)||Z.api.isMinimized())return!1;const N=Wg(k.title),a=Wg(k.description);if(g.a2(N)||g.a2(a))return!1;Z.createServerVe(Z.D.element,k.trackingParams||null);Z.D.updateValue("title",Wg(k.title));Z.D.updateValue("description",Wg(k.description));Z.D.updateValue("displayUrl",Wg(k.displayUrl));k.navigationEndpoint&&g.Ac(Z.G,k.navigationEndpoint);Z.D.show();Z.xW.start();Z.logVisibility(Z.D.element,!0);Z.K(Z.D.element,"mouseover",()=>{Z.j++});
return!0};
PLX=function(Z,k){if(qj(Z,rR)||Z.api.isMinimized())return!1;const N=Wg(k.title),a=Wg(k.description);if(g.a2(N)||g.a2(a))return!1;Z.createServerVe(Z.U.element,k.trackingParams||null);Z.U.updateValue("title",Wg(k.title));Z.U.updateValue("description",Wg(k.description));Z.U.updateValue("displayUrl",Wg(k.displayUrl));Z.U.updateValue("imageUrl",lpb(k.image));k.navigationEndpoint&&g.Ac(Z.G,k.navigationEndpoint);Z.Qz=k.imageNavigationEndpoint||null;Z.U.show();Z.xW.start();Z.logVisibility(Z.U.element,!0);
Z.K(Z.U.element,"mouseover",()=>{Z.j++});
return!0};
cXy=function(Z,k){if(Z.api.isMinimized())return!1;const N=fpy(k.image);let a=N;N.width<rR.width&&(a=rR);if(N.width===0||N.height===0||qj(Z,a))return!1;Z.createServerVe(Z.V.element,k.trackingParams||null);Z.V.updateValue("imageUrl",lpb(k.image));Z.V.updateValue("width",N.width);Z.V.updateValue("height",N.height);k.navigationEndpoint&&g.Ac(Z.G,k.navigationEndpoint);g.ij(Z.V.Lp("ytp-ad-image-overlay"),"max-width",N.width+"px");Z.V.show();Z.logVisibility(Z.V.element,!0);Z.K(Z.V.element,"mouseover",()=>
{Z.j++;Z.api.Zb("invideo-overlay",Z.layoutId)});
Z.K(Z.V.element,"mouseout",()=>{Z.api.j4("invideo-overlay",Z.layoutId)});
return!0};
HXb=function(Z){return Z.Y&&Z.Y.closeButton&&Z.Y.closeButton.buttonRenderer&&(Z=Z.Y.closeButton.buttonRenderer,Z.serviceEndpoint)?[Z.serviceEndpoint]:[]};
qj=function(Z,k){var N=Z.api.fF().SL();const a=Z.api.Sd(!0,!1);return(k=Jk(N,N.height-(a.height+a.top),k))?(Z.tq&&k&&(N=g.Rn(Z.macros),N.ERRORCODE=k.du.toString(),N.ERROR_MSG=k.errorMessage,Z.layoutId?PM(Z.Iq,Z.tq,Z.layoutId,N):g.b(Error("Missing layoutId for invideo_overlay_ad."))),!0):!1};
dxR=function(Z,k){Z=Z.api.getRootNode();g.D(Z,"ytp-ad-overlay-open",k);g.D(Z,"ytp-ad-overlay-closed",!k)};
XPy=function(Z){const k=g.Mc("html5-video-player");k&&g.D(k,"ytp-ad-display-override",Z)};
mh=function(Z,k,N=!1){Z.V&&(k?Z.V.hide():Z.V.show(),N&&Z.V instanceof Cp&&!Z.V.G&&vgr(Z.V,!1));Z.U&&(k?Z.U.show():Z.U.hide())};
LV0=function(Z){function k(N){return{toString:()=>N()}}
Z.macros.SURVEY_LOCAL_TIME_EPOCH_S=k(()=>{const N=new Date;return(Math.round(N.valueOf()/1E3)+-1*N.getTimezoneOffset()*60).toString()});
Z.macros.SURVEY_ELAPSED_MS=k(()=>(Date.now()-Z.Y).toString())};
V6X=function(Z,k){k=g.YL(k);g.m_(Z.questionText,k);Z.G&&Z.questionText.setAttribute("id",MP("survey-question-text"))};
t6y=function(Z,k,N,a){a=new FVN(Z.api,Z.layoutId,Z.interactionLoggingClientData,Z.Iq,a,Z.xW);a.HD(Z.answers);a.init(MP("survey-answer"),k,N);Z.G&&(k=Z.questionText.getAttribute("id"),k!=null&&(a.V!==null?a.V.U.setAttribute("aria-describedby",k):a.answer.getElementsByTagName("button")[0].setAttribute("aria-describedby",k)));Z.U.push(a)};
lVr=function(Z,k){if(k){var N=k.background;N&&g.J(N,hEG)&&(N=(N=g.J(N,hEG).image)&&tY(N)||"",g.a2(N)?g.L9(Error("Found ThumbnailDetails without valid image URL")):g.ij(Z.tq,"backgroundImage",`url(${N})`));if(k.durationMilliseconds==null||k.durationMilliseconds===void 0||k.durationMilliseconds===0)Z=Error("durationMilliseconds unset or 0 for SurveyAdQuestionCommon: "+`${JSON.stringify(k)}`),g.b(Z);else{Z.Y=g.vy();Z.V=new sg(Z.api,k.durationMilliseconds);g.u(Z,Z.V);if(Z.V&&k.instreamAdPlayerOverlay&&
g.J(k.instreamAdPlayerOverlay,dE))try{var a=new uHU(Z.api,Z.layoutId,Z.interactionLoggingClientData,Z.Iq,Z.V);a.HD(Z.playerOverlay);a.init(MP("survey-player-overlay"),g.J(k.instreamAdPlayerOverlay,dE),Z.macros);Z.D=a;g.u(Z,a);Z.j()}catch(T){a=Error("ISAPOR had an error when initializing. Error: "+`${T} SurveyAdQuestionCommon: ${JSON.stringify(k)}`),g.b(a)}else a=Error("ISAPOR was not present in renderer. SurveyAdQuestionCommon: "+`${JSON.stringify(k)}`),g.b(a);Z.V&&k.durationMilliseconds&&k.durationMilliseconds>
0?(k=new AG(Z.api,Z.V),k.HD(Z.playerOverlay),g.u(Z,k)):(Z=Error("Survey progress bar was not added. SurveyAdQuestionCommon: "+`${JSON.stringify(k)}`),g.b(Z))}}else g.b(Error("addCommonComponents() needs to be called before starting countdown."))};
BFi=function(Z,k,N){Z.noneOfTheAbove=new fVU(Z.api,Z.layoutId,Z.interactionLoggingClientData,Z.Iq);Z.noneOfTheAbove.HD(Z.answers);Z.noneOfTheAbove.init(MP("survey-none-of-the-above"),k,N)};
DxG=function(Z){Z.U.forEach(k=>{k.V.toggleButton(!1)});
mh(Z.D,PJ(Z),!0)};
PJ=function(Z){return Z.U.some(k=>k.V.isToggled())||Z.noneOfTheAbove.button.isToggled()};
iXG=function(Z,k){const N=Z.U[k];Z.D?.dispose();g.J(N,HU)?OXb(Z,g.J(N,HU),Z.macros):g.J(N,cU)&&vQy(Z,g.J(N,cU),Z.macros);Z.V=k};
OXb=function(Z,k,N){const a=new gQr(Z.api,Z.layoutId,Z.interactionLoggingClientData,Z.Iq,Z.Y.bind(Z));a.HD(Z.L);a.init(MP("survey-question-single-select"),k,N);Z.api.X().B("supports_multi_step_on_desktop")?Z.D=a:Z.questions.push(a);g.u(Z,a)};
vQy=function(Z,k,N){const a=new wPj(Z.api,Z.layoutId,Z.interactionLoggingClientData,Z.Iq,Z.Y.bind(Z));a.HD(Z.L);a.init(MP("survey-question-multi-select"),k,N);Z.api.X().B("supports_multi_step_on_desktop")?Z.D=a:Z.questions.push(a);g.u(Z,a)};
$x0=function(Z,k){k=k&&tY(k)||"";if(g.a2(k))g.L9(Error("Found ThumbnailDetails without valid image URL"));else{var N=Z.style;Z=Z.style.cssText;const a=document.implementation.createHTMLDocument("").createElement("DIV");a.style.cssText=Z;Z=Jxf(a.style);N.cssText=[Z,`background-image:url("${k}");`].join("")}};
xxf=function(Z){const k=g.Mc("html5-video-player");k&&g.D(k,"ytp-ad-display-override",Z)};
GBf=function(Z){switch(Z.size){case "AD_AVATAR_SIZE_XXS":return 16;case "AD_AVATAR_SIZE_XS":return 24;case "AD_AVATAR_SIZE_S":return 32;case "AD_AVATAR_SIZE_M":return 36;case "AD_AVATAR_SIZE_L":return 56;case "AD_AVATAR_SIZE_XL":return 72;default:return 36}};
StU=function(Z){const k=g.Mc("html5-video-player");k&&g.D(k,"ytp-ad-display-override",Z)};
eER=function(Z){const k=g.Mc("html5-video-player");k&&g.D(k,"ytp-ad-display-override",Z)};
bY=function(Z,k,N,a,T,K,y,Q){var q=k^Z;if(Z-9<32&&((Z^49)&14)>=12){for(var r=q^7824,C=[];++r-C[c[3]]-(q^7920);){switch(r){case q^7819:r=q^7932;continue;case q^7851:r=q^7825;break;case q^7825:r-=q^7874;continue;case q^7914:r=q^7856;continue;case q^7934:r=q^7823}C[c[q^7885]](String[c[q^7872]](r))}var m=C}((Z^53)&7)==3&&(Zj(q^6440,q^2416,N),m=N[c[q^6418]]);(Z|88)==Z&&(m=decodeURIComponent(N));(Z&75)==Z&&(m=a(T,K,y));(Z<<1&8)<3&&(Z>>2&15)>=12&&(m=a(K,y,Q));return m};
oQb=function(Z){if(!Z.adAvatar||!g.J(Z.adAvatar,cJ))return g.b(Error("VideoInterstitialButtonedCenteredLayoutRenderer has no avatar.")),!1;if(!Z.headline)return g.b(Error("VideoInterstitialButtonedCenteredLayoutRenderer has no headline.")),!1;if(!Z.adBadge||!g.J(Z.adBadge,HJ))return g.b(Error("VideoInterstitialButtonedCenteredLayoutRenderer has no ad badge.")),!1;if(!Z.adButton||!g.J(Z.adButton,dR))return g.b(Error("VideoInterstitialButtonedCenteredLayoutRenderer has no action button.")),!1;if(!Z.adInfoRenderer||
!g.J(Z.adInfoRenderer,Xe))return g.b(Error("VideoInterstitialButtonedCenteredLayoutRenderer has no ad info button.")),!1;Z=Z.durationMilliseconds||0;return typeof Z!=="number"||Z<=0?(g.b(Error("durationMilliseconds was specified incorrectly in "+`VideoInterstitialButtonedCenteredLayoutRenderer with a value of: ${Z}`)),!1):!0};
EQU=function(Z,k,N,a,T={},K=!1,y=!1){switch(Z){case "invideo-overlay":Z=new JXG(k,a,T,N);break;case "player-overlay":Z=new zEf(k,a,T,N,new Xc(k),y);break;case "player-overlay-layout":Z=new Uxf(k,a,T,N,new Xc(k));break;case "survey":Z=new bXi(k,a,T,N);break;case "ad-action-interstitial":Z=new pPf(k,a,T,N,K,y);break;case "video-interstitial-buttoned-centered":Z=new REy(k,a,T,N);break;case "survey-interstitial":Z=new M6N(k,a,T,N);break;case "ad-message":Z=new nQr(k,a,T,N,new Xc(k,1));break;case "player-underlay":Z=
new IVr(k,a,T,N);break;case "display-underlay-text-grid-cards":Z=new j_N(k,a,T,N,new Xc(k));break;default:return null}return Z};
WVX=function(Z,k){Z=g.bT(Z.components,k.id,null);Z==null&&g.L9(Error("Component not found for element id: "+k.id));return Z||null};
Lp=function(Z,k){k===Z.y5&&(Z.y5=void 0)};
Obj=function(Z,k,N=[],a="",T="",K,y){const Q=Nj(Z.V).t$,q=Z.player.getVideoData({playerType:1});q&&q.getPlayerResponse();q&&q.Rn();N=YtX(k,N,Q,Nj(Z.V).oT);$2y(Nj(Z.V).Gi,a,N.Ms,N.VY,k,T,K,y)};
Zpi=function(Z){var k=Nj(Z.V).Fl,N=k.Y().A5("SLOT_TYPE_PLAYER_BYTES",1);k=N9(k.XS.get(),1).clientPlaybackNonce;let a=!1;for(const T of N)N=T.slotType==="SLOT_TYPE_PLAYER_BYTES"&&T.slotEntryTrigger instanceof lb?T.slotEntryTrigger.Or:void 0,N&&N===k&&(a&&wm("More than 1 preroll playerBytes slot detected",T),a=!0);a||Nj(Z.V).GD.Z8()};
kay=function(Z){Z=Nj(Z.V).BZ;let k="";for(const N of Z.zk.keys()){if(N.slotType==="SLOT_TYPE_PLAYER_BYTES"&&N.mp==="core")return!0;k+=N.slotType+" "}Math.random()<.01&&wm("Ads Playback Not Managed By Controlflow",void 0,null,{slotTypes:k});return!1};
VG=function(Z){Z=Nj(Z.V).BZ;for(const k of Z.zk.values())if(k.layoutType==="LAYOUT_TYPE_MEDIA_BREAK")return!0;return!1};
NRj=function(Z){Z.created!==Z.loaded&&wm("Created and loaded are out of sync")};
YtX=function(Z,k,N,a){k={Ms:[],VY:k};for(const K of Z){if(!K)continue;if(K.renderer==null)continue;Z=K.renderer;if(!N.S.X().B("html5_enable_vod_lasr_with_notify_pacf")){var T=a;g.J(Z.sandwichedLinearAdRenderer?.adVideoStart,ah)?(T=GN0(g.J(Z.sandwichedLinearAdRenderer?.adVideoStart,ah),T),g.Bg(Z.sandwichedLinearAdRenderer.adVideoStart,ah,T)):g.J(Z.linearAdSequenceRenderer?.adStart,ah)&&(T=GN0(g.J(Z.linearAdSequenceRenderer?.adStart,ah),T),g.Bg(Z.linearAdSequenceRenderer.adStart,ah,T))}k.Ms.push(K)}return k};
g.Fc=function(Z){if(typeof DOMParser!="undefined")return ak(new DOMParser,n0(Z),"application/xml");throw Error("Your browser does not support loading xml documents");};
g.ahb=function(Z){const k=Z.X();return k.bq&&!k.D&&g.PQ(k)?Z.isEmbedsShortsMode()?(Z=Z.Sd(),Math.min(Z.width,Z.height)>=315):!Z.bV():!1};
TRi=function(Z){for(let k=0;k<16;++k){const N=new g.E({J:"a",Z:"ytp-suggestion-link",W:{href:"{{link}}",target:Z.api.X().N,"aria-label":"{{aria_label}}"},A:[{J:"div",Z:"ytp-suggestion-image"},{J:"div",Z:"ytp-suggestion-overlay",W:{style:"{{blink_rendering_hack}}","aria-hidden":"{{aria_hidden}}"},A:[{J:"div",Z:"ytp-suggestion-title",Da:"{{title}}"},{J:"div",Z:"ytp-suggestion-author",Da:"{{author_and_views}}"},{J:"div",W:{"data-is-live":"{{is_live}}"},Z:"ytp-suggestion-duration",Da:"{{duration}}"}]}]});
g.u(Z,N);const a=N.Lp("ytp-suggestion-link");g.ij(a,"transitionDelay",`${k/20}s`);Z.D.K(a,"click",T=>{var K=k;if(Z.U){var y=Z.suggestionData[K],Q=y.sessionData;Z.L&&Z.api.B("web_player_log_click_before_generating_ve_conversion_params")?(Z.api.logClick(Z.V[K].element),K=y.Qg(),y={},g.ia(Z.api,y),K=g.mW(K,y),g.jY(K,Z.api,T)):g.IC(T,Z.api,Z.L,Q||void 0)&&Z.api.CP(y.videoId,Q,y.playlistId)}else T.preventDefault(),document.activeElement.blur()});
N.HD(Z.suggestions.element);Z.V.push(N);Z.api.createServerVe(N.element,N)}};
Khb=function(Z){if(Z.api.X().B("web_player_log_click_before_generating_ve_conversion_params")){var k=Math.floor(-Z.scrollPosition/(Z.Y+8));const N=Math.min(k+Z.columns,Z.suggestionData.length)-1;for(;k<=N;k++)Z.api.logVisibility(Z.V[k].element,!0)}};
g.tG=function(Z){var k=Z.api.dQ()?32:16;k=Z.j/2+k;Z.next.element.style.bottom=`${k}px`;Z.previous.element.style.bottom=`${k}px`;k=Z.scrollPosition;const N=Z.containerWidth-Z.suggestionData.length*(Z.Y+8);g.D(Z.element,"ytp-scroll-min",k>=0);g.D(Z.element,"ytp-scroll-max",k<=N)};
Qfj=function(Z){var k=Z.suggestionData.length;for(let K=0;K<k;++K){var N=void 0,a=void 0;let y=void 0;N=Z;var T=N.api.X();const Q=N.suggestionData[K],q=N.V[K];y=N.api.isEmbedsShortsMode()?Q.shortViewCount||"":Q.shortViewCount?`${Q.author} \u2022 ${Q.shortViewCount}`:Q.author;q.element.style.display="";g.ij(q.Lp("ytp-suggestion-link"),"display","inline-block");yGy.test(Q.title)&&(q.Lp("ytp-suggestion-title").dir="rtl");yGy.test(y)&&(q.Lp("ytp-suggestion-author").dir="rtl");a=Q.isLivePlayback?"Live":
Q.lengthSeconds?g.Gh(Q.lengthSeconds):"";let r=Q.Qg(N.api.isEmbedsShortsMode());if(g.PQ(T)&&!T.B("web_player_log_click_before_generating_ve_conversion_params")){const C={};g.H3(N.api,"addEmbedsConversionTrackingParams",[C]);r=g.mW(r,C)}T.B("web_player_log_click_before_generating_ve_conversion_params")&&(T=(T=Q.sessionData)&&T.itct)&&N.api.setTrackingParams(q.element,T);q.update({author_and_views:y,duration:a,link:r,title:Q.title,aria_label:Q.ariaLabel||Q.title,is_live:Q.isLivePlayback,aria_hidden:!!Q.ariaLabel,
blink_rendering_hack:g.Cf||g.vQ?"will-change: opacity":void 0});a=q.Lp("ytp-suggestion-image");N=N.api.isEmbedsShortsMode()?Q.v9("hq2.jpg"):Q.v9();a.style.backgroundImage=N?`url(${N})`:""}if(k<16)for(;k<16;++k)g.ij(Z.V[k].Lp("ytp-suggestion-link"),"display","none");g.tG(Z)};
kb=[];NX0=typeof Object.create=="function"?Object.create:function(Z){function k(){}
k.prototype=Z;return new k};
kfr=typeof Object.defineProperties=="function"?Object.defineProperty:function(Z,k,N){if(Z==Array.prototype||Z==Object.prototype)return Z;Z[k]=N.value;return Z};
mG=globalThis;Tf="Int8 Uint8 Uint8Clamped Int16 Uint16 Int32 Uint32 Float32 Float64".split(" ");mG.BigInt64Array&&(Tf.push("BigInt64"),Tf.push("BigUint64"));var ajU=Object.setPrototypeOf;rX("Symbol.dispose",function(Z){return Z?Z:Symbol("Symbol.dispose")});
rX("SuppressedError",function(Z){function k(N,a,T){if(!(this instanceof k))return new k(N,a,T);T=Error(T);"stack"in T&&(this.stack=T.stack);this.message=T.message;this.error=N;this.suppressed=a}
if(Z)return Z;TXU(k,Error);k.prototype.name="SuppressedError";return k});
rX("String.prototype.replaceAll",function(Z){return Z?Z:function(k,N){if(k instanceof RegExp&&!k.global)throw new TypeError("String.prototype.replaceAll called with a non-global RegExp argument.");return k instanceof RegExp?this.replace(k,N):this.replace(new RegExp(String(k).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08"),"g"),N)}});
rX("Array.prototype.at",function(Z){return Z?Z:cy});
qR("at",function(Z){return Z?Z:cy});
rX("String.prototype.at",function(Z){return Z?Z:cy});
rX("Promise.withResolvers",function(Z){return Z?Z:function(){var k,N;return{promise:new Promise(function(a,T){k=a;N=T}),
resolve:k,reject:N}}});
rX("Array.prototype.findLastIndex",function(Z){return Z?Z:function(k,N){return Hy(this,k,N).EO}});
qR("findLastIndex",function(Z){return Z?Z:function(k,N){return Hy(this,k,N).EO}});var uO,fi,KGi;uO=uO||{};g.dX=this||self;fi="closure_uid_"+(Math.random()*1E9>>>0);KGi=0;g.$b(oy,Error);oy.prototype.name="CustomError";var ok;var qgr={NONE:0,hL:1},rGb={s8:0,mXt:1,sqm:2,IaW:3},hG={tC:"a",mw:"d",VIDEO:"v"};var CQy=class{constructor(){this.iX=0;this.V=!1;this.U=-1;this.GB=!1;this.mO=0}isVisible(){return this.GB?this.iX>=.3:this.iX>=.5}};var uQ={Ht:0,dT:1},mji={NONE:0,d$:1,vR:2};var nK="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");var lQ=class{constructor(){this.U=null;this.V=!1}getValue(){return this.U}},Hir=class extends lQ{constructor(Z){super();this.Y=Z}D(Z){this.U===null&&g.ei(this.Y,Z)&&(this.U=Z)}},sfb=class extends lQ{D(Z){this.U===null&&typeof Z==="number"&&(this.U=Z)}},dRf=class extends lQ{D(Z){this.U===null&&typeof Z==="string"&&(this.U=Z)}};var AG0=class{constructor(){this.V={};this.U=!0;this.D={}}disable(){this.U=!1}enable(){this.U=!0}isEnabled(){return this.U}reset(){this.V={};this.U=!0;this.D={}}};var PQX=Z=>{ji(Z,"od",qgr);ji(Z,"opac",uQ).V=!0;ji(Z,"sbeos",uQ).V=!0;ji(Z,"prf",uQ).V=!0;ji(Z,"mwt",uQ).V=!0;ji(Z,"iogeo",uQ)};var G2=document,HK=window;var cGU=F0(1,!0),rI=F0(610401301,!1);F0(899588437,!1);F0(772657768,!0);F0(513659523,!1);F0(568333945,!0);var HJy=F0(1331761403,!1);F0(651175828,!1);F0(722764542,!1);F0(748402145,!1);F0(748402146,!1);var rp=F0(748402147,!0),fp=F0(824648567,!0),uW=F0(824656860,!0);F0(333098724,!1);F0(861377723,!1);F0(861377724,!1);F0(869336903,!1);F0(2147483644,!1);F0(2147483645,!1);F0(2147483646,cGU);F0(2147483647,!0);var C5=!!g.Vf("yt.config_.EXPERIMENTS_FLAGS.html5_enable_client_hints_override");var vby=/&/g,iif=/</g,gbN=/>/g,wy0=/"/g,$Ry=/'/g,xRG=/\x00/g,Oif=/[\x00&<>"']/;var sD,Hpy=g.dX.navigator;sD=Hpy?Hpy.userAgentData||null:null;var uE=globalThis.trustedTypes,lE;var BC=class{constructor(Z){this.V=Z}toString(){return this.V+""}};var iE=class{constructor(Z){this.V=Z}toString(){return this.V}},u0i=new iE("about:invalid#zClosurez");var wI=class{constructor(Z){this.cG=Z}},djX=$u("tel"),XJy=$u("sms"),xu=[$u("data"),$u("http"),$u("https"),$u("mailto"),$u("ftp"),new wI(Z=>/^[^:]*([/?#]|$)/.test(Z))],lj0=/^\s*(?!javascript:)(?:[\w+.-]+:|[^:/?#]*(?:[/?#]|$))/i;var zI=class{constructor(Z){this.V=Z}toString(){return this.V+""}};var MG=class{constructor(Z){this.V=Z}toString(){return this.V+""}};var WC=class{constructor(Z){this.V=Z}toString(){return this.V}};var kK={};Lg[" "]=function(){};var $1,Ka,Uhf,Lhi,V2f,FhR,jd,oZ,BJ;g.vQ=HC();g.yd=dI();g.Z3=PC("Edge");g.iS=g.Z3||g.yd;$1=PC("Gecko")&&!(K5(g.qG(),"WebKit")&&!PC("Edge"))&&!(PC("Trident")||PC("MSIE"))&&!PC("Edge");g.YK=K5(g.qG(),"WebKit")&&!PC("Edge");Ka=dJ();Uhf=Xz();g.h5=Ps();Lhi=cs();V2f=PC("iPad");FhR=PC("iPod");jd=Hs();oZ=K5(g.qG(),"KaiOS");
a:{let Z="";const k=function(){const N=g.qG();if($1)return/rv:([^\);]+)(\)|;)/.exec(N);if(g.Z3)return/Edge\/([\d\.]+)/.exec(N);if(g.yd)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(N);if(g.YK)return/WebKit\/(\S+)/.exec(N);if(g.vQ)return/(?:Version)[ \/]?(\S+)/.exec(N)}();
k&&(Z=k?k[1]:"");if(g.yd){var Dh;const N=g.dX.document;Dh=N?N.documentMode:void 0;if(Dh!=null&&Dh>parseFloat(Z)){BJ=String(Dh);break a}}BJ=Z}var Fz=BJ,eUN={};var VL,Fn;g.SL=L5();VL=cs()||PC("iPod");Fn=PC("iPad");g.Og=t3();g.Cf=Ve();g.v9=F7()&&!Hs();var CEU=!g.yd&&!F7();g.t=g.Of.prototype;g.t.clone=function(){return new g.Of(this.x,this.y)};
g.t.equals=function(Z){return Z instanceof g.Of&&vs(this,Z)};
g.t.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};
g.t.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};
g.t.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};
g.t.scale=function(Z,k){this.x*=Z;this.y*=typeof k==="number"?k:Z;return this};g.t=g.i0.prototype;g.t.clone=function(){return new g.i0(this.width,this.height)};
g.t.aspectRatio=function(){return this.width/this.height};
g.t.isEmpty=function(){return!wJ(this)};
g.t.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};
g.t.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};
g.t.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};
g.t.scale=function(Z,k){this.width*=Z;this.height*=typeof k==="number"?k:Z;return this};var Vz=class{constructor(Z,k){this.V=Z===Ff&&k||""}toString(){return this.V}},Ff={};new Vz(Ff,"");var xK=/^[a-z][a-z\d-]*$/i,URy="APPLET BASE EMBED IFRAME LINK MATH META OBJECT SCRIPT STYLE SVG TEMPLATE".split(" "),pyi="AREA BR COL COMMAND HR IMG INPUT KEYGEN PARAM SOURCE TRACK WBR".split(" "),MNR=["action","formaction","href"];var ng={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};g.t=Se.prototype;g.t.lq=function(Z){return zm(this.V,Z)};
g.t.getElementsByTagName=function(Z,k){return(k||this.V).getElementsByTagName(String(Z))};
g.t.Lp=function(Z){return g.Mc(Z,this.V)};
g.t.setProperties=Ik;g.t.createElement=function(Z){return k1(this.V,Z)};
g.t.appendChild=g.yp;g.t.append=function(Z,k){Ni(ee(Z),Z,arguments,1)};
g.t.canHaveChildren=function(Z){if(Z.nodeType!=1)return!1;switch(Z.tagName){case "APPLET":case "AREA":case "BASE":case "BR":case "COL":case "COMMAND":case "EMBED":case "FRAME":case "HR":case "IMG":case "INPUT":case "IFRAME":case "ISINDEX":case "KEYGEN":case "LINK":case "NOFRAMES":case "NOSCRIPT":case "META":case "OBJECT":case "PARAM":case "SCRIPT":case "SOURCE":case "STYLE":case "TRACK":case "WBR":return!1}return!0};
g.t.removeNode=g.rM;g.t.getChildren=function(Z){return Z.children};
g.t.contains=g.C1;g.t.isFocusable=AI;var t20=class{constructor(){this.V=this.VQ=null}};var hfy=class{now(){return 0}U(){return 0}D(){return 0}V(){return 0}};var ucy=class extends hfy{constructor(){super();if(!dM())throw Error();}now(){return dM()&&HK.performance.now?HK.performance.now():super.now()}U(){return dM()&&HK.performance.memory?HK.performance.memory.totalJSHeapSize||0:super.U()}D(){return dM()&&HK.performance.memory?HK.performance.memory.usedJSHeapSize||0:super.D()}V(){return dM()&&HK.performance.memory?HK.performance.memory.jsHeapSizeLimit||0:super.V()}};var FMr=XM("AnimationEnd"),Mu=XM("TransitionEnd");g.t=uj.prototype;g.t.getHeight=function(){return this.bottom-this.top};
g.t.clone=function(){return new uj(this.top,this.right,this.bottom,this.left)};
g.t.contains=function(Z){return this&&Z?Z instanceof uj?Z.left>=this.left&&Z.right<=this.right&&Z.top>=this.top&&Z.bottom<=this.bottom:Z.x>=this.left&&Z.x<=this.right&&Z.y>=this.top&&Z.y<=this.bottom:!1};
g.t.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this};
g.t.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this};
g.t.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this};
g.t.scale=function(Z,k){k=typeof k==="number"?k:Z;this.left*=Z;this.right*=Z;this.top*=k;this.bottom*=k;return this};g.t=g.DJ.prototype;g.t.clone=function(){return new g.DJ(this.left,this.top,this.width,this.height)};
g.t.contains=function(Z){return Z instanceof g.Of?Z.x>=this.left&&Z.x<=this.left+this.width&&Z.y>=this.top&&Z.y<=this.top+this.height:this.left<=Z.left&&this.left+this.width>=Z.left+Z.width&&this.top<=Z.top&&this.top+this.height>=Z.top+Z.height};
g.t.getSize=function(){return new g.i0(this.width,this.height)};
g.t.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};
g.t.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};
g.t.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this};
g.t.scale=function(Z,k){k=typeof k==="number"?k:Z;this.left*=Z;this.width*=Z;this.top*=k;this.height*=k;return this};var Ijy=/^--.+/,wM={};var YrX=FM(()=>{let Z=!1;try{const k=Object.defineProperty({},"passive",{get(){Z=!0}});g.dX.addEventListener("test",null,k)}catch(k){}return Z});var lhX=class{isVisible(){return Y1(G2)===1}};var ZKy=RegExp("^https?://(\\w|-)+\\.cdn\\.ampproject\\.(net|org)(\\?|/|$)"),kef=class{constructor(Z,k,N){this.V=Z;this.U=k;this.D=N}},TW=class{constructor(Z,k){this.url=Z;this.V=!!k;this.depth=null}};var p3=class{constructor(){this.D="&";this.U={};this.Y=0;this.V=[]}mH(Z,k,N){Z=Z+"//"+k+N;var a=Krf(this)-N.length;if(a<0)return"";this.V.sort((T,K)=>T-K);
N=null;k="";for(let T=0;T<this.V.length;T++){const K=this.V[T],y=this.U[K];for(let Q=0;Q<y.length;Q++){if(!a){N=N==null?K:N;break}let q=sm(y[Q],this.D,",$");if(q){q=k+q;if(a>=q.length){a-=q.length;Z+=q;k=this.D;break}N=N==null?K:N}}}a="";N!=null&&(a=`${k}${"trn"}=${N}`);return Z+a}};var vJ=class{constructor(Z,k){this.V=Z;this.depth=k}},Qn0=()=>{var Z=Kl();const k=Math.max(Z.length-1,0);var N=ya(Z);Z=N.V;var a=N.U;const T=N.D,K=[];N=(Q,q)=>Q==null?q:Q;
T&&K.push(new vJ([T.url,T.V?2:0],N(T.depth,1)));a&&a!=T&&K.push(new vJ([a.url,2],0));Z.url&&Z!=T&&K.push(new vJ([Z.url,0],N(Z.depth,k)));const y=g.ni(K,(Q,q)=>K.slice(0,K.length-q));
!Z.url||(T||a)&&Z!=T||(a=/https?:\/\/[^\/]+/.exec(Z.url)?.[0]??"")&&y.push([new vJ([a,1],N(Z.depth,k))]);y.push([]);return g.ni(y,Q=>ycb(k,Q))};var k4=Ax(Z=>typeof Z==="number"),Zq=Ax(Z=>typeof Z==="string"),Vb=Ax(Z=>Z!=null&&typeof Z==="object"&&typeof Z.then==="function"),c6y=Ax(Z=>typeof Z==="function"),fhy=Ax(Z=>!!Z&&(typeof Z==="object"||typeof Z==="function"));var NHy={eg:"allow-forms",y8:"allow-modals",qh:"allow-orientation-lock",Oi:"allow-pointer-lock",gM:"allow-popups",kM:"allow-popups-to-escape-sandbox",fG:"allow-presentation",Vh:"allow-same-origin",pG:"allow-scripts",z9:"allow-top-navigation",UE:"allow-top-navigation-by-user-activation"},rcb=FM(()=>aDN());var Xr=Z=>{const k="xX";if(Z.xX&&Z.hasOwnProperty(k))return Z.xX;const N=new Z;Z.xX=N;Z.hasOwnProperty(k);return N};var Acy=class{constructor(){this.U=new lhX;this.V=dM()?new ucy:new hfy}setInterval(Z,k){return HK.setInterval(Z,k)}clearInterval(Z){HK.clearInterval(Z)}setTimeout(Z,k){return HK.setTimeout(Z,k)}clearTimeout(Z){HK.clearTimeout(Z)}};var sny=class{};var gs=!0,iz,Ll;var lK={},iK=null;var gP=/[-_.]/g,ccy={"-":"+",_:"/",".":"="},GW={};var x9=class{isEmpty(){return this.V==null}sizeBytes(){const Z=oI(this);return Z?Z.length:0}constructor(Z,k){ev(k);this.V=Z;if(Z!=null&&Z.length===0)throw Error("ByteString should be constructed with non-empty values");}},$9;var Um=void 0;var M3=pl("jas",!0),zJ=pl(),Iq=pl(),BRR=pl(),u_i=pl(),oai=pl(),vab=pl(),pC=pl("m_m",!0),fDr=pl(),Djb=pl();[...Object.values({r$:1,Qv:2,cQ:4,rI:8,T5z:16,t_:32,G0:64,rT:128,SF:256,HFD:512,Gs:1024,KQ:2048,P6:4096,bR:8192})];var tR,OpR=[];OpR[M3]=7;tR=Object.freeze(OpR);var Rq={},RI={},MQ=Object.freeze({}),l6={},WF={};var GX=Ax(Z=>Z>=vjr&&Z<=ipX),vjr=BigInt(Number.MIN_SAFE_INTEGER),ipX=BigInt(Number.MAX_SAFE_INTEGER);var aq=0,TX=0,D5;var fC=typeof BigInt==="function"?BigInt.asIntN:void 0,FrU=typeof BigInt==="function"?BigInt.asUintN:void 0,$4=Number.isSafeInteger,dU=Number.isFinite,wU=Math.trunc,dFf=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;var BH0={};var Y4=class{},gjj={dO:!0};var Z1;var Kk,yX;var gab=Nm(0),T3={};var C_=class{constructor(Z,k,N){this.buffer=Z;if(N&&!k)throw Error();this.V=k}};var wJf=class{constructor(Z,k,N,a){this.U=null;this.G=!1;this.L=null;this.V=this.D=this.Y=0;this.init(Z,k,N,a)}init(Z,k,N,{L1:a=!1,eH:T=!1}={}){this.L1=a;this.eH=T;Z&&(Z=mc(Z,this.eH),this.U=Z.buffer,this.G=Z.V,this.L=null,this.Y=k||0,this.D=N!==void 0?this.Y+N:this.U.length,this.V=this.Y)}free(){this.clear();iQ.length<100&&iQ.push(this)}clear(){this.U=null;this.G=!1;this.L=null;this.V=this.D=this.Y=0;this.L1=!1}reset(){this.V=this.Y}},iQ=[];var wBf=class{constructor(Z,k,N,a){if(iQ.length){const T=iQ.pop();T.init(Z,k,N,a);Z=T}else Z=new wJf(Z,k,N,a);this.V=Z;this.Y=this.V.V;this.U=this.D=-1;hZ(this,a)}free(){this.V.clear();this.U=this.D=-1;tZ.length<100&&tZ.push(this)}reset(){this.V.reset();this.Y=this.V.V;this.U=this.D=-1}},tZ=[];var $jy=class{constructor(){if(l6!==l6)throw Error();}};var SC=class{constructor(Z,k){this.U=Z>>>0;this.V=k>>>0}},G3,JZ=class{constructor(Z,k){this.U=Z>>>0;this.V=k>>>0}},oz;var xjf=class{constructor(){this.V=[]}length(){return this.V.length}end(){const Z=this.V;this.V=[];return Z}};var Jcf=class{constructor(){this.D=[];this.U=0;this.V=new xjf}};var as=Z5(),GaN=Z5(),gR=Z5(),wR=Z5(),Sgb=Z5(),efy=Z5(),xj=Z5(),ojr=Z5(),Ga=Z5(),JGf=Z5(),zfy=Z5();var mD=class{constructor(Z,k,N){this.Sl=QX(Z,k,N,2048)}toJSON(){return TJ(this)}W9(Z){return JSON.stringify(TJ(this,Z))}clone(){const Z=this.Sl,k=Z[M3]|0;return mQ(this,Z,k)?s3(this,Z,!0):new this.constructor(Ck(Z,k,!1))}};mD.prototype[pC]=Rq;mD.prototype.toString=function(){return this.Sl.toString()};var Ne=class{constructor(Z,k,N){this.Zr=Z;this.CR=k;Z=wX(as);this.V=!!Z&&N===Z||!1}},$Fb=TF(function(Z,k,N,a,T){if(Z.U!==2)return!1;v4(Z,U3(k,a,N),T);return!0},yY),xFf=TF(function(Z,k,N,a,T){if(Z.U!==2)return!1;
v4(Z,U3(k,a,N),T);return!0},yY),L3=Symbol(),Ai=Symbol(),Hi=Symbol(),ti=Symbol(),dK=Symbol(),QY,qe;var Ujr=Nm(0),bpU=lm(function(Z,k,N){if(Z.U!==1)return!1;Bi(k,N,L_(Z.V));return!0},OG,Ga),pJf=lm(function(Z,k,N,a){if(Z.U!==1)return!1;
St(k,N,a,L_(Z.V));return!0},OG,Ga),S2=lm(function(Z,k,N){if(fp)return Z.U!==0?Z=!1:(Bi(k,N,AZ(Z.V,CC)),Z=!0),Z;
if(Z.U!==0)return!1;Bi(k,N,AZ(Z.V,rU));return!0},vi,xj),Rfy=lm(function(Z,k,N,a){if(fp)return Z.U!==0?Z=!1:(St(k,N,a,AZ(Z.V,CC)),Z=!0),Z;
if(Z.U!==0)return!1;St(k,N,a,AZ(Z.V,rU));return!0},vi,xj),e2=lm(function(Z,k,N){if(Z.U!==0)return!1;
Bi(k,N,c4(Z.V));return!0},gK,wR),M2G=lm(function(Z,k,N,a){if(Z.U!==0)return!1;
St(k,N,a,c4(Z.V));return!0},gK,wR),njj=lm(function(Z,k,N){if(fp)return Z.U!==1?Z=!1:(Bi(k,N,X9(Z.V)),Z=!0),Z;
if(Z.U!==1)return!1;Bi(k,N,ds(Z.V));return!0},function(Z,k,N){W4(Z,N,oq(k))},ojr),IhG=f3(function(Z,k,N){if(fp)return Z.U!==1&&Z.U!==2?Z=!1:(k=gp(k,k[M3]|0,N),Z.U==2?xH(Z,X9,k):k.push(X9(Z.V)),Z=!0),Z;
if(Z.U!==1&&Z.U!==2)return!1;k=gp(k,k[M3]|0,N);Z.U==2?xH(Z,ds,k):k.push(ds(Z.V));return!0},function(Z,k,N){k=um(oq,k,!1);
if(k!=null)for(let a=0;a<k.length;a++)W4(Z,N,k[a])},ojr),jfr=lm(function(Z,k,N){if(Z.U!==5)return!1;
Bi(k,N,H4(Z.V));return!0},function(Z,k,N){k=hJ(k);
k!=null&&(Iz(Z,N,5),p_(Z.V,k))},efy),Ejy=lm(function(Z,k,N){if(Z.U!==0)return!1;
Bi(k,N,P4(Z.V));return!0},wK,GaN),Why=lm(function(Z,k,N,a){if(Z.U!==0)return!1;
St(k,N,a,P4(Z.V));return!0},wK,GaN),of=lm(function(Z,k,N){if(Z.U!==2)return!1;
Bi(k,N,ws(Z));return!0},$S,gR),Ygf=f3(function(Z,k,N){if(Z.U!==2)return!1;
Z=ws(Z);gp(k,k[M3]|0,N).push(Z);return!0},function(Z,k,N){k=um(Ue,k,!0);
if(k!=null)for(let y=0;y<k.length;y++){var a=Z,T=N,K=k[y];K!=null&&YH(a,T,Va(K))}},gR),Z4f=lm(function(Z,k,N,a){if(Z.U!==2)return!1;
St(k,N,a,ws(Z));return!0},$S,gR),JG=function(Z,k,N=as){return new Ne(Z,k,N)}(function(Z,k,N,a,T){if(Z.U!==2)return!1;
a=qQ(void 0,a);gp(k,k[M3]|0,N).push(a);v4(Z,a,T);return!0},function(Z,k,N,a,T){if(Array.isArray(k)){for(let K=0;K<k.length;K++)eu(Z,k[K],N,a,T);
Z=k[M3]|0;Z&1||(k[M3]=Z|1)}}),za=TF(function(Z,k,N,a,T,K){if(Z.U!==2)return!1;
let y=k[M3]|0;xl(k,y,K,N,Y9(y));k=U3(k,a,N);v4(Z,k,T);return!0},eu),Ug=lm(function(Z,k,N){if(Z.U!==2)return!1;
Bi(k,N,$H(Z));return!0},function(Z,k,N){k=JJ(k);
k!=null&&YH(Z,N,mc(k,!0).buffer)},JGf),kRG=f3(function(Z,k,N){if(Z.U!==2)return!1;
Z=$H(Z);gp(k,k[M3]|0,N).push(Z);return!0},function(Z,k,N){k=um(JJ,k,!1);
if(k!=null)for(let y=0;y<k.length;y++){var a=Z,T=N,K=k[y];K!=null&&YH(a,T,mc(K,!0).buffer)}},JGf),bQ=lm(function(Z,k,N){if(Z.U!==0)return!1;
Bi(k,N,c4(Z.V)>>>0);return!0},function(Z,k,N){k=hJ(k);
k!=null&&k!=null&&(Iz(Z,N,0),Rz(Z.V,k))},Sgb),pp=lm(function(Z,k,N){if(Z.U!==0)return!1;
Bi(k,N,c4(Z.V));return!0},function(Z,k,N){k=Fl(k);
k!=null&&(k=parseInt(k,10),Iz(Z,N,0),M7(Z.V,k))},zfy);var Nyj=new Map,a8b=class extends $jy{constructor(Z,k){super();this.typeName=Z;this.V=k;if(l6!==l6)throw Error();Nyj.set(Z,this)}};var KUy=class{constructor(Z){var k=Tyr;this.V=Z;this.isRepeated=0;this.U=pk;this.defaultValue=void 0;this.D=k.messageId!=null?WF:void 0}register(){Lg(this)}};var Tz=class extends mD{constructor(Z){super(Z)}};Tz.prototype.U=Ji([0,lm(function(Z,k,N){if(Z.U!==1)return!1;Z=L_(Z.V);Bi(k,N,Z===0?void 0:Z);return!0},OG,Ga),
lm(function(Z,k,N){if(fp)return Z.U!==0?k=!1:(Z=AZ(Z.V,CC),Bi(k,N,Z===Ujr?void 0:Z),k=!0),k;if(Z.U!==0)return!1;Z=AZ(Z.V,rU);Bi(k,N,Z===0?void 0:Z);return!0},vi,xj),
-2,lm(function(Z,k,N){if(Z.U!==0)return!1;Z=c4(Z.V);Bi(k,N,Z===0?void 0:Z);return!0},gK,wR)]);var yOy=class{constructor(Z){this.D=Z;this.V=-1;this.U=this.Y=0}};var QBX=class{constructor(Z,k){this.U=Z;this.D=k;this.V=new yOy(Z)}};var qWN=class{constructor(){this.V={}}Aq(Z){const k=this.V[Z.key];if(Z.valueType==="proto"){try{const N=JSON.parse(k);if(Array.isArray(N))return N}catch(N){}return Z.defaultValue}return typeof k===typeof Z.defaultValue?k:Z.defaultValue}};var rO0={faq:1,mF:2,FF:3,1:"POSITION",2:"VISIBILITY",3:"MONITOR_VISIBILITY"};var zJf=class{constructor(){this.D=void 0;this.U=this.G=0;this.L=-1;this.vI=new AG0;ji(this.vI,"mv",mji).V=!0;ji(this.vI,"omid",uQ);ji(this.vI,"epoh",uQ).V=!0;ji(this.vI,"epph",uQ).V=!0;ji(this.vI,"umt",uQ).V=!0;ji(this.vI,"phel",uQ).V=!0;ji(this.vI,"phell",uQ).V=!0;ji(this.vI,"oseid",rO0).V=!0;var Z=this.vI;Z.V.sloi||(Z.V.sloi=new sfb);Z.V.sloi.V=!0;ji(this.vI,"mm",hG);ji(this.vI,"ovms",rGb).V=!0;ji(this.vI,"xdi",uQ).V=!0;ji(this.vI,"amp",uQ).V=!0;ji(this.vI,"prf",uQ).V=!0;ji(this.vI,"gtx",uQ).V=
!0;ji(this.vI,"mvp_lv",uQ).V=!0;ji(this.vI,"ssmol",uQ).V=!0;ji(this.vI,"fmd",uQ).V=!0;ji(this.vI,"gen204simple",uQ);this.V=new QBX(HF(),this.vI);this.Y=!1;this.flags=new qWN}tV(Z){if(typeof Z==="string"&&Z.length!=0){var k=this.vI;if(k.U){Z=Z.split("&");for(let T=Z.length-1;T>=0;T--){var N=Z[T].split("="),a=decodeURIComponent(N[0]);N.length>1?(N=decodeURIComponent(N[1]),N=/^[0-9]+$/g.exec(N)?parseInt(N,10):N):N=1;(a=k.V[a])&&a.D(N)}}}}};var C$r=class{constructor(){let Z="https:";HK&&HK.location&&HK.location.protocol==="http:"&&(Z="http:");this.U=Z;this.V=.01}};var mLb=class{constructor(Z,k){this.error=Z;this.meta={};this.context=k.context;this.msg=k.message||"";this.id=k.id||"jserror"}};var Rf=null;var sBf=class{constructor(Z,k,N){this.label=Z;this.type=k;this.value=N;this.duration=0;this.taskId=this.slotId=void 0;this.uniqueId=Math.random()}};var Is=g.dX.performance,AOU=!!(Is&&Is.mark&&Is.measure&&Is.clearMarks),ju=FM(()=>{var Z;if(Z=AOU){var k;Z=window;if(Rf===null){Rf="";try{let N="";try{N=Z.top.location.hash}catch(a){N=Z.location.hash}N&&(Rf=(k=N.match(/\bdeid=([\d,]+)/))?k[1]:"")}catch(N){}}k=Rf;Z=!!k.indexOf&&k.indexOf("1337")>=0}return Z});var UF0=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$"),Pj=/#|$/,RJy=/[?&]($|#)/;var P$y=class{constructor(Z=null){this.V=aA;this.Y0="jserror";this.Hu=!0;this.dl=null;this.U=this.nA;this.WI=Z}nA(Z,k,N,a,T){T=T||this.Y0;let K;try{const A=new p3;var y=A;y.V.push(1);y.U[1]=Cl("context",Z);k.error&&k.meta&&k.id||(k=new Xu(d1(k)));y=k;if(y.msg){k=A;var Q=y.msg.substring(0,512);k.V.push(2);k.U[2]=Cl("msg",Q)}var q=y.meta||{};Q=q;if(this.dl)try{this.dl(Q)}catch(P){}if(a)try{a(Q)}catch(P){}a=A;q=[q];a.V.push(3);a.U[3]=q;K=ya();if(K.U){q=A;var r=K.U.url||"";q.V.push(4);q.U[4]=Cl("top",
r)}var C={url:K.V.url||""};if(K.V.url){const P=g.YS(K.V.url);var m=Wi(P[1],null,P[3],P[4])}else m="";r=A;C=[C,{url:m}];r.V.push(5);r.U[5]=C;Rs(this.V,T,A,N)}catch(A){try{Rs(this.V,T,{context:"ecmserr",rctx:Z,msg:d1(A),url:K&&K.V.url},N)}catch(P){}}return this.Hu}},Xu=class extends mLb{constructor(Z){super(Error(Z),{message:Z})}};var aA,VU,Mj=new class{constructor(Z,k){this.events=[];this.U=k||g.dX;let N=null;k&&(k.google_js_reporting_queue=k.google_js_reporting_queue||[],this.events=k.google_js_reporting_queue,N=k.google_measure_js_timing);this.V=ju()||(N!=null?N:Math.random()<Z)}disable(){this.V=!1;this.events!==this.U.google_js_reporting_queue&&(ju()&&g.pi(this.events,EG),this.events.length=0)}start(Z,k){if(!this.V)return null;const N=n3()||Me();Z=new sBf(Z,k,N);k=`goog_${Z.label}_${Z.uniqueId}_start`;Is&&ju()&&Is.mark(k);
return Z}end(Z){if(this.V&&k4(Z.value)){var k=n3()||Me();Z.duration=k-Z.value;k=`goog_${Z.label}_${Z.uniqueId}_end`;Is&&ju()&&Is.mark(k);!this.V||this.events.length>2048||this.events.push(Z)}}}(1,window),cOr=()=>{HK&&typeof HK.google_measure_js_timing!="undefined"&&(HK.google_measure_js_timing||Mj.disable())};
aA=new C$r;VU=new P$y(Mj);HK&&HK.document&&(HK.document.readyState=="complete"?cOr():Mj.V&&WK(HK,"load",()=>{cOr()}));
var UGy=Z=>{VU.dl=k=>{g.pi(Z,N=>{N(k)})}},CH=(Z,k)=>LM(VU,Z,k),Hc=(Z,k)=>Fu(Z,k),Eui=(Z,k)=>{VU.nA(538,Z,.01,k)};var h2=Date.now(),lU=-1,t2=-1,go,fM=-1,uU=!1;var sH=class{constructor(Z,k,N){var a=new uj(0,0,0,0);this.time=Z;this.volume=null;this.D=k;this.V=a;this.U=N}equals(Z,k=!1){return!!Z&&(!k||this.volume==Z.volume)&&this.D==Z.D&&f1(this.V,Z.V)&&!0}};var H4i=class{constructor(Z,k,N,a,T,K,y,Q){this.Y=Z;this.j=k;this.D=N;this.G=a;this.V=T;this.L=K;this.U=y;this.C=Q}lq(){return this.j}equals(Z,k=!1){return this.Y.equals(Z.Y,k)&&this.j==Z.j&&f1(this.D,Z.D)&&f1(this.G,Z.G)&&this.V==Z.V&&this.L==Z.L&&this.U==Z.U&&this.C==Z.C}};var dLy={currentTime:1,duration:2,isVpaid:4,volume:8,isYouTube:16,isPlaying:32},$O={MD:"start",WH:"firstquartile",JF:"midpoint",Q1:"thirdquartile",COMPLETE:"complete",ERROR:"error",l5:"metric",PAUSE:"pause",jy:"resume",i5:"skip",Xd:"viewable_impression",Fd:"mute",u5:"unmute",AC:"fullscreen",wW:"exitfullscreen",rW:"bufferstart",QZ:"bufferfinish",NC:"fully_viewable_audible_half_duration_impression",LW:"measurable_impression",BH:"abandon",I1:"engagedview",hC:"impression",bH:"creativeview",LOADED:"loaded",
UXD:"progress",CLOSE:"close",JL:"collapse",IS:"overlay_resize",wI:"overlay_unmeasurable_impression",W6:"overlay_unviewable_impression",N2:"overlay_viewable_immediate_impression",A_:"overlay_viewable_end_of_session_impression",XB:"custom_metric_viewable",PH:"audio_audible",ZO:"audio_measurable",jz:"audio_impression"},Agy="start firstquartile midpoint thirdquartile resume loaded".split(" "),Qg=["start","firstquartile","midpoint","thirdquartile"],Fif=["abandon"],$g={UNKNOWN:-1,MD:0,WH:1,JF:2,Q1:3,COMPLETE:4,
l5:5,PAUSE:6,jy:7,i5:8,Xd:9,Fd:10,u5:11,AC:12,wW:13,NC:14,LW:15,BH:16,I1:17,hC:18,bH:19,LOADED:20,XB:21,rW:22,QZ:23,jz:27,ZO:28,PH:29};var ID0={aL:"addEventListener",HR:"getMaxSize",BR:"getScreenSize",R2:"getState",jF:"getVersion",Kpq:"removeEventListener",Kf:"isViewable"};var Q2y=()=>{const Z=window.document;return Z&&typeof Z.elementFromPoint==="function"};var tB=(Z,k)=>{k=Math.pow(10,k);return Math.floor(Z*k)/k};var Wr0=class{constructor(){this.D=!Zt(HK.top);this.isMobileDevice=N3()||aI();const Z=Kl();this.domain=Z.length>0&&Z[Z.length-1]!=null&&Z[Z.length-1].url!=null?g.kX(Z[Z.length-1].url)||"":"";this.V=new uj(0,0,0,0);this.Y=new g.i0(0,0);this.L=new g.i0(0,0);this.j=new uj(0,0,0,0);this.frameOffset=new g.Of(0,0);this.G=0;this.C=!1;this.U=!(!HK||!Bj(HK).d8);this.update(HK)}update(Z){Z&&Z.document&&(this.j=OI(!1,Z,this.isMobileDevice),this.V=OI(!0,Z,this.isMobileDevice),xX(this,Z),$X(this,Z))}};var XWf=class{constructor(Z){this.D=Z;this.U=0;this.V=null}cancel(){HF().clearTimeout(this.V);this.V=null}schedule(){const Z=HF(),k=bm().V.V;this.V=Z.setTimeout(UG(k,Hc(143,()=>{this.U++;this.D.sample()})),naf())}};var np=class{constructor(Z,k,N="na"){this.D=Z;this.O6=N;this.L=[];this.isInitialized=!1;this.Y=new sH(-1,!0,this);this.V=this;this.O=k;this.FS=this.zt=!1;this.Kp="uk";this.Rq=!1;this.j=!0}xW(){return!1}initialize(){return this.isInitialized=!0}N(){return this.V.Kp}dA(){return this.V.FS}fail(Z,k=!1){if(!this.FS||k)this.FS=!0,this.Kp=Z,this.O=0,this.V!=this||ol(this)}getName(){return this.V.O6}ZB(){return this.V.Qz()}Qz(){return{}}r9(){return this.V.O}tq(){var Z=w1();Z.V=OI(!0,this.D,Z.isMobileDevice)}MX(){$X(w1(),
this.D)}s6(){return this.Y.V}sample(){}isActive(){return this.V.j}Vz(Z){const k=this.V;this.V=Z.r9()>=this.O?Z:this;k!==this.V?(this.j=this.V.j,ol(this)):this.j!==this.V.j&&(this.j=this.V.j,ol(this))}G(Z){if(Z.U===this.V){const k=!this.Y.equals(Z,this.zt);this.Y=Z;k&&eR(this)}}sR(){return this.zt}dispose(){this.Rq=!0}jm(){return this.Rq}};var LUX=class{constructor(Z,k,N,a){this.element=Z;this.V=new uj(0,0,0,0);this.D=null;this.O=new uj(0,0,0,0);this.U=k;this.vI=N;this.s6=a;this.tq=!1;this.timestamp=-1;this.vD=new H4i(k.Y,this.element,this.V,new uj(0,0,0,0),0,0,Date.now()-h2,0);this.C=void 0}observe(){return!0}unobserve(){}j(Z){this.C=Z}dispose(){if(!this.jm()){var Z=this.U;g.qF(Z.L,this);Z.zt&&this.sR()&&z2(Z);this.unobserve();this.tq=!0}}jm(){return this.tq}ZB(){return this.U.ZB()}r9(){return this.U.r9()}N(){return this.U.N()}dA(){return this.U.dA()}Vz(){}G(){this.L()}sR(){return this.s6}};var If=class{constructor(Z){this.C=!1;this.V=Z;this.j=()=>{}}r9(){return this.V.r9()}N(){return this.V.N()}dA(){return this.V.dA()}create(Z,k,N){let a=null;
this.V&&(a=this.Y(Z,k,N),J2(this.V,a));return a}O(){return this.D()}D(){return!1}init(Z){return this.V.initialize()?(J2(this.V,this),this.j=Z,!0):!1}Vz(Z){Z.r9()==0&&this.j(Z.N(),this)}G(){}sR(){return!1}dispose(){this.C=!0}jm(){return this.C}ZB(){return{}}};var VUG=class{constructor(Z,k,N=0){this.D=N;this.U=Z;this.V=k==null?"":k}};var EI=class{constructor(){this.D=0;this.V=[];this.U=!1}add(Z,k,N){++this.D;Z=new VUG(Z,k,N);this.V.push(new VUG(Z.U,Z.V,Z.D+this.D/4096));this.U=!0;return this}};var kIi=Z=>{const k=Z.U;Z=Z.V;return Z===""?k:typeof Z==="boolean"?Z?k:"":Array.isArray(Z)?Z.length===0?k:`${k}=${Z.join()}`:`${k}=${g.KK(["mtos","tos","p"],k)?Z:encodeURIComponent(Z)}`};var aaf=class{constructor(Z){this.V=new EI;Z!==void 0&&Z5y(this.V,Z);this.V.add("v","unreleased",-16)}toString(){let Z="//pagead2.googlesyndication.com//pagead/gen_204";const k=M1(this.V);k.length>0&&(Z+="?"+k);return Z}};var skr=Z=>{const k=[],N=[];g.BB(Z,(a,T)=>{if(!(T in Object.prototype)&&typeof a!="undefined")switch(Array.isArray(a)&&(a=a.join(",")),a=[T,"=",a].join(""),T){case "adk":case "r":case "tt":case "error":case "mtos":case "tos":case "p":case "bs":k.unshift(a);break;case "req":case "url":case "referrer":case "iframe_loc":N.push(a);break;default:k.push(a)}});
return k.concat(N)},Wj=Z=>{Z=Z.toString();
HF();cF(Z)};var NIf=class{constructor(){this.V=0}};g.jR.prototype.gQ=!1;g.jR.prototype.jm=function(){return this.gQ};
g.jR.prototype.dispose=function(){this.gQ||(this.gQ=!0,this.YW())};
g.jR.prototype[Symbol.dispose]=function(){this.dispose()};
g.jR.prototype.addOnDisposeCallback=function(Z,k){this.gQ?k!==void 0?Z.call(k):Z():(this.e8||(this.e8=[]),k&&(Z=Z.bind(k)),this.e8.push(Z))};
g.jR.prototype.YW=function(){if(this.e8)for(;this.e8.length;)this.e8.shift()()};var FUf=[0,S2,jfr,-1];var j2=class{constructor(){this.U=this.D=this.Y=this.V=0}update(Z,k,N=!Z){Z&&(this.V+=k,this.U+=k,this.Y+=k,this.D=Math.max(this.D,this.Y));N&&(this.Y=0)}};var tU0=[1,.75,.5,.3,0],Eg=class{constructor(Z=tU0){this.U=Z;this.V=g.ni(this.U,()=>new j2)}update(Z,k,N,a,T,K=!0){k=T?Math.min(Z,k):k;
for(T=0;T<this.U.length;T++){var y=this.U[T];const Q=k>0&&k>=y;y=!(Z>0&&Z>=y)||N;this.V[T].update(K&&Q,a,!K||y)}}};var hWf=class{constructor(){this.U=new Eg;this.Sm=this.vD=0;this.tq=new j2;this.O=this.j=-1;this.Qz=1E3;this.s6=new Eg([1,.9,.8,.7,.6,.5,.4,.3,.2,.1,0]);this.dA=this.zt=-1}update(Z,k,N,a){this.j=this.j!=-1?Math.min(this.j,k.iX):k.iX;this.O=Math.max(this.O,k.iX);this.zt=this.zt!=-1?Math.min(this.zt,k.mO):k.mO;this.dA=Math.max(this.dA,k.mO);this.s6.update(k.mO,N.mO,k.V,Z,a);this.vD+=Z;k.iX===0&&(this.Sm+=Z);this.U.update(k.iX,N.iX,k.V,Z,a);N=a||N.GB!=k.GB?N.isVisible()&&k.isVisible():N.isVisible();
k=!k.isVisible()||k.V;this.tq.update(N,Z,k)}Ty(){return this.tq.D>=this.Qz}};if(G2&&G2.URL){var uEr=G2.URL,WJ;a:{if(uEr){var l8i=RegExp(".*[&#?]google_debug(=[^&]*)?(&.*)?$");try{const Z=l8i.exec(decodeURIComponent(uEr));if(Z){WJ=Z[1]&&Z[1].length>1?Z[1].substring(1):"true";break a}}catch{}}WJ=""}VU.Hu=!(WJ.length>0)}var Gg=(Z,k,N,a)=>{N=Fu(a,N);WK(Z,k,N,{capture:!1})};var f8y=new uj(0,0,0,0);var Byy=new uj(0,0,0,0),DLf=class extends g.jR{constructor(Z,k){super();this.position=Byy.clone();this.WO=this.WM();this.oz=-2;this.timeCreated=Date.now();this.uj=-1;this.Hh=k;this.iK=null;this.MQ=!1;this.xR=null;this.opacity=-1;this.requestSource=7;this.k$=!1;this.LJ=()=>{};
this.VZ=()=>{};
this.Dc=new t20;this.Dc.VQ=Z;this.Dc.V=Z;this.Ac=!1;this.aC={Rz:null,Bn:null};this.py=!0;this.Ip=null;this.FR=this.AG=!1;bm().G++;this.UW=this.sK();this.ij=-1;this.Qt=null;this.hasCompleted=this.mE=!1;this.vI=new AG0;PQX(this.vI);mGy(this);this.requestSource==1?Eh(this.vI,"od",1):Eh(this.vI,"od",0)}YW(){if(this.Dc.V){if(this.aC.Rz){var Z=this.Dc.V;typeof Z.removeEventListener==="function"&&Z.removeEventListener("mouseover",this.aC.Rz,EQ());this.aC.Rz=null}this.aC.Bn&&(Z=this.Dc.V,typeof Z.removeEventListener===
"function"&&Z.removeEventListener("mouseout",this.aC.Bn,EQ()),this.aC.Bn=null)}this.Ip&&this.Ip.dispose();this.Qt&&this.Qt.dispose();delete this.WO;delete this.LJ;delete this.VZ;delete this.Dc.VQ;delete this.Dc.V;delete this.aC;delete this.Ip;delete this.Qt;delete this.vI;super.YW()}cB(){return this.Qt?this.Qt.V:this.position}tV(Z){bm().tV(Z)}sR(){return!1}WM(){return new hWf}CX(){return this.WO}KM(Z){return AB(this,Z,1E4)}aq(Z,k,N,a,T,K,y){this.Ac||(this.MQ&&(Z=this.EA(Z,N,T,y),a=a&&this.UW.iX>=
(this.GB()?.3:.5),this.pU(K,Z,a),this.Hh=k,Z.iX>0&&-1===this.ij&&(this.ij=k),this.uj==-1&&this.Ty()&&(this.uj=k),this.oz==-2&&(this.oz=qC(this.cB())?Z.iX:-1),this.UW=Z),this.LJ(this))}pU(Z,k,N){this.CX().update(Z,k,this.UW,N)}sK(){return new CQy}EA(Z,k,N,a){N=this.sK();N.V=k;k=HF().U;k=Y1(G2)===0?-1:k.isVisible()?0:1;N.U=k;N.iX=this.sA(Z);N.GB=this.GB();N.mO=a;return N}sA(Z){return this.opacity===0&&WB(this.vI,"opac")===1?0:Z}GB(){return!1}Iu(){return this.mE||this.AG}Kx(){Date.now()}qZ(){Date.now()}I3(){return this.requestSource}Jb(){return 0}Ty(){return this.WO.Ty()}WK(){var Z=
this.MQ;Z=(this.hasCompleted||this.jm())&&!Z;const k=bm().U!==2||this.k$;return this.Ac||k&&Z?2:this.Ty()?4:3}CK(){return 0}};g.Pl.prototype.next=function(){return g.Yj};
g.Yj={done:!0,value:void 0};g.Pl.prototype.hD=function(){return this};var O4y=class{constructor(){this.Y=this.V=this.D=this.U=this.L=0}};var vfi=class extends CQy{constructor(){super();this.fullscreen=!1;this.volume=void 0;this.paused=!1;this.mediaTime=-1}};var Z8=(Z,k,N=!0,a=()=>!0)=>T=>{const K=T[Z];
if(Array.isArray(K)&&a(T))return i4N(K,k,N)},kf=(Z,k)=>N=>k(N)?N[Z]:void 0,gfy=Z=>k=>{for(let N=0;N<Z.length;N++)if(Z[N]===k.e||Z[N]===void 0&&!k.hasOwnProperty("e"))return!0;
return!1},i4N=(Z,k,N=!0)=>N?g.Ry(Z,(a,T)=>g.KK(k,T)):g.ni(k,(a,T,K)=>Z.slice(T>0?K[T-1]+1:0,a+1).reduce((y,Q)=>y+Q,0));var NL=gfy([void 0,1,2,3,4,8,16]),aB=gfy([void 0,4,8,16]),wWf={sv:"sv",v:"v",cb:"cb",e:"e",nas:"nas",msg:"msg","if":"if",sdk:"sdk",p:"p",p0:kf("p0",aB),p1:kf("p1",aB),p2:kf("p2",aB),p3:kf("p3",aB),cp:"cp",tos:"tos",mtos:"mtos",amtos:"amtos",mtos1:Z8("mtos1",[0,2,4],!1,aB),mtos2:Z8("mtos2",[0,2,4],!1,aB),mtos3:Z8("mtos3",[0,2,4],!1,aB),mcvt:"mcvt",ps:"ps",scs:"scs",bs:"bs",vht:"vht",mut:"mut",a:"a",a0:kf("a0",aB),a1:kf("a1",aB),a2:kf("a2",aB),a3:kf("a3",aB),ft:"ft",dft:"dft",at:"at",dat:"dat",as:"as",
vpt:"vpt",gmm:"gmm",std:"std",efpf:"efpf",swf:"swf",nio:"nio",px:"px",nnut:"nnut",vmer:"vmer",vmmk:"vmmk",vmiec:"vmiec",nmt:"nmt",tcm:"tcm",bt:"bt",pst:"pst",vpaid:"vpaid",dur:"dur",vmtime:"vmtime",dtos:"dtos",dtoss:"dtoss",dvs:"dvs",dfvs:"dfvs",dvpt:"dvpt",fmf:"fmf",vds:"vds",is:"is",i0:"i0",i1:"i1",i2:"i2",i3:"i3",ic:"ic",cs:"cs",c:"c",c0:kf("c0",aB),c1:kf("c1",aB),c2:kf("c2",aB),c3:kf("c3",aB),mc:"mc",nc:"nc",mv:"mv",nv:"nv",qmt:kf("qmtos",NL),qnc:kf("qnc",NL),qmv:kf("qmv",NL),qnv:kf("qnv",NL),
raf:"raf",rafc:"rafc",lte:"lte",ces:"ces",tth:"tth",femt:"femt",femvt:"femvt",emc:"emc",emuc:"emuc",emb:"emb",avms:"avms",nvat:"nvat",qi:"qi",psm:"psm",psv:"psv",psfv:"psfv",psa:"psa",pnk:"pnk",pnc:"pnc",pnmm:"pnmm",pns:"pns",ptlt:"ptlt",pngs:"pings",veid:"veid",ssb:"ssb",ss0:kf("ss0",aB),ss1:kf("ss1",aB),ss2:kf("ss2",aB),ss3:kf("ss3",aB),dc_rfl:"urlsigs",obd:"obd",omidp:"omidp",omidr:"omidr",omidv:"omidv",omida:"omida",omids:"omids",omidpv:"omidpv",omidam:"omidam",omidct:"omidct",omidia:"omidia",
omiddc:"omiddc",omidlat:"omidlat",omiddit:"omiddit",nopd:"nopd",co:"co",tm:"tm",tu:"tu"},$Ly=Object.assign({},wWf,{avid:L1("audio"),avas:"avas",vs:"vs"}),xLi={atos:"atos",avt:Z8("atos",[2]),davs:"davs",dafvs:"dafvs",dav:"dav",ss:((Z,k)=>N=>N[Z]===void 0&&k!==void 0?k:N[Z])("ss",0),
t:"t"};var GRy=class{constructor(){this.U=this.V=""}};var SW0=class{};var eWr=class{constructor(){this.U={vs:[1,0],vw:[0,1],am:[2,2],a:[4,4],f:[8,8],bm:[16,16],b:[32,32],avw:[0,64],avs:[64,0],pv:[256,256],gdr:[0,512],p:[0,1024],r:[0,2048],m:[0,4096],um:[0,8192],ef:[0,16384],s:[0,32768],pmx:[0,16777216],mut:[33554432,33554432],umutb:[67108864,67108864],tvoff:[134217728,134217728]};this.V={};for(const Z in this.U)this.U[Z][1]>0&&(this.V[Z]=0);this.D=0}};var TR=class{constructor(){this.V=this.U=0}getValue(){return this.U}update(Z,k){Z>=32||(this.V&1<<Z&&!k?this.U&=~(1<<Z):this.V&1<<Z||!k||(this.U|=1<<Z),this.V|=1<<Z)}};var ofG=class extends hWf{constructor(){super();this.D=new j2;this.Rq=this.N=this.xW=0;this.C=-1;this.hq=new j2;this.L=new j2;this.V=new Eg;this.G=this.Y=-1;this.Vz=new j2;this.Qz=2E3;this.FS=new TR;this.Kp=new TR;this.MX=new TR}update(Z,k,N,a){if(!k.paused){super.update(Z,k,N,a);var T=Hl(k)&&Hl(N),K=(a?Math.min(k.iX,N.iX):N.iX)>=.5;g1(k.volume)&&(this.Y=this.Y!=-1?Math.min(this.Y,k.volume):k.volume,this.G=Math.max(this.G,k.volume));K&&(this.xW+=Z,this.N+=T?Z:0);this.V.update(k.iX,N.iX,k.V,Z,a,T);
this.D.update(!0,Z);this.L.update(T,Z);this.Vz.update(N.fullscreen,Z);this.hq.update(T&&!K,Z);Z=Math.floor(k.mediaTime/1E3);this.FS.update(Z,k.isVisible());this.Kp.update(Z,k.iX>=1);this.MX.update(Z,Hl(k))}}};var JOr=class{constructor(){this.L=!1}U(Z){this.L||(this.V(Z)?(Z=vc(this.N,this.D,Z),this.Y|=Z,Z=Z==0):Z=!1,this.L=Z)}};var K4=class extends JOr{constructor(Z,k){super();this.D=Z;this.N=k;this.Y=0}V(){return!0}G(){return!1}getId(){const Z=on($O,k=>k==this.D);
return $g[Z].toString()}toString(){let Z="";this.G()&&(Z+="c");this.L&&(Z+="s");this.Y>0&&(Z+=`:${this.Y}`);return this.getId()+Z}};var zWj=class extends K4{constructor(Z,k){super(Z,k);this.j=[]}U(Z,k=null){k!=null&&this.j.push(k);super.U(Z)}};var ULb=class{};var yu=class extends ULb{U(){return null}D(){return[]}};var Qu=class extends LUX{FS(){if(this.element){var Z=this.element,k=this.U.V.D;try{try{var N=vj(Z.getBoundingClientRect())}catch(r){N=new uj(0,0,0,0)}const T=N.right-N.left,K=N.bottom-N.top,y=p1(Z,k),Q=y.x,q=y.y;var a=new uj(Math.round(q),Math.round(Q+T),Math.round(q+K),Math.round(Q))}catch(T){a=f8y.clone()}this.D=a;this.V=bU(this,this.D)}}MX(){this.O=this.U.Y.V}Qz(Z){const k=WB(this.vI,"od")==1;return r3y(Z,this.O,this.element,k)}Kp(){this.timestamp=Date.now()-h2}L(){this.Kp();this.FS();if(this.element&&
typeof this.element.videoWidth==="number"&&typeof this.element.videoHeight==="number"){var Z=this.element;var k=new g.i0(Z.videoWidth,Z.videoHeight);Z=this.V;var N=lj(Z),a=Z.getHeight(),T=k.width;k=k.height;T<=0||k<=0||N<=0||a<=0||(T/=k,k=N/a,Z=Z.clone(),T>k?(N/=T,a=(a-N)/2,a>0&&(a=Z.top+a,Z.top=Math.round(a),Z.bottom=Math.round(a+N))):(a*=T,N=Math.round((N-a)/2),N>0&&(N=Z.left+N,Z.left=Math.round(N),Z.right=Math.round(N+a))));this.V=Z}this.MX();Z=this.V;N=this.O;Z=Z.left<=N.right&&N.left<=Z.right&&
Z.top<=N.bottom&&N.top<=Z.bottom?new uj(Math.max(Z.top,N.top),Math.min(Z.right,N.right),Math.min(Z.bottom,N.bottom),Math.max(Z.left,N.left)):new uj(0,0,0,0);N=Z.top>=Z.bottom||Z.left>=Z.right?new uj(0,0,0,0):Z;Z=this.U.Y;k=T=a=0;(this.V.bottom-this.V.top)*(this.V.right-this.V.left)>0&&(this.Qz(N)?N=new uj(0,0,0,0):(a=w1().Y,k=new uj(0,a.height,a.width,0),a=ro(N,this.C??this.V),T=ro(N,w1().V),k=ro(N,k)));N=N.top>=N.bottom||N.left>=N.right?new uj(0,0,0,0):BK(N,-this.V.left,-this.V.top);SR()||(T=a=0);
this.vD=new H4i(Z,this.element,this.V,N,a,T,this.timestamp,k)}getName(){return this.U.getName()}};var b4i=new uj(0,0,0,0),pWU=class extends Qu{constructor(Z,k,N){super(null,Z,k,N);this.xW=Z.isActive();this.zt=0}observe(){this.Y();return!0}G(){super.L()}Kp(){}FS(){}L(){this.Y();super.L()}Vz(Z){Z=Z.isActive();Z!==this.xW&&(Z?this.Y():(w1().V=new uj(0,0,0,0),this.V=new uj(0,0,0,0),this.O=new uj(0,0,0,0),this.timestamp=-1));this.xW=Z}};var u7i={firstquartile:0,midpoint:1,thirdquartile:2,complete:3},RWX=class extends DLf{constructor(Z,k,N,a=new yu){super(Z,k);this.G6=N;this.zj=0;this.FQ={};this.iV=new eWr;this.lH={};this.kH="";this.Kp=null;this.qX=!1;this.V=[];this.eh=a.U();this.G=a.D();this.Y=null;this.D=-1;this.Rq=this.Vz=void 0;this.zt=this.O=0;this.FS=-1;this.s6=this.Qz=!1;this.dA=this.N=this.U=this.zr=this.O6=0;new Eg;this.vD=this.tq=0;this.MX=-1;this.jd=0;this.C=g.Vp;this.xW=[this.WM()];this.xl=2;this.s1={};this.s1.pause="p";
this.s1.resume="r";this.s1.skip="s";this.s1.mute="m";this.s1.unmute="um";this.s1.exitfullscreen="ef";this.L=null;this.hq=this.Tt=!1;this.pF=Math.floor(Date.now()/1E3-1704067200);this.Sm=0}sR(){return!0}Uh(){return this.jd==2}KM(Z){return AB(this,Z,Math.max(1E4,this.D/3))}aq(Z,k,N,a,T,K,y){const Q=this.C(this)||{};g.In(Q,T);this.D=Q.duration||this.D;this.Vz=Q.isVpaid||this.Vz;this.Rq=Q.isYouTube||this.Rq;HF();this.hq=!1;T=XCG(this,k);Bl(this)===1&&(K=T);super.aq(Z,k,N,a,Q,K,y);this.eh&&this.eh.L&&
g.pi(this.G,q=>{q.U(this)})}pU(Z,k,N){super.pU(Z,k,N);
Dp(this).update(Z,k,this.UW,N);this.s6=Hl(this.UW)&&Hl(k);this.FS==-1&&this.Qz&&(this.FS=this.CX().D.V);this.iV.D=0;Z=this.Ty();k.isVisible()&&LH(this.iV,"vs");Z&&LH(this.iV,"vw");g1(k.volume)&&LH(this.iV,"am");Hl(k)?LH(this.iV,"a"):LH(this.iV,"mut");this.FR&&LH(this.iV,"f");k.U!=-1&&(LH(this.iV,"bm"),k.U==1&&(LH(this.iV,"b"),Hl(k)&&LH(this.iV,"umutb")));Hl(k)&&k.isVisible()&&LH(this.iV,"avs");this.s6&&Z&&LH(this.iV,"avw");k.iX>0&&LH(this.iV,"pv");O_(this,this.CX().D.V,!0)&&LH(this.iV,"gdr");Tg(this.CX().U,
1)>=2E3&&LH(this.iV,"pmx");this.hq&&LH(this.iV,"tvoff")}WM(){return new ofG}CX(){return this.WO}sK(){return new vfi}EA(Z,k,N,a=-1){Z=super.EA(Z,k,N,a);Z.fullscreen=this.FR;Z.paused=this.Uh();Z.volume=N.volume;g1(Z.volume)||(this.O6++,k=this.UW,g1(k.volume)&&(Z.volume=k.volume));N=N.currentTime;Z.mediaTime=N!==void 0&&N>=0?N:-1;return Z}sA(Z){return w1(),this.FR?1:super.sA(Z)}Jb(){return 1}getDuration(){return this.D}WK(){return this.Ac?2:vl(this)?5:this.Ty()?4:3}CK(){return this.Tt?this.CX().L.D>=
2E3?4:3:2}j(Z){this.Qt&&this.Qt.j(Z)}};var MUR=g.vy(),lEf=class{constructor(){this.V={};const Z=ZJ();S4(this,Z,document);const k=vuU();try{if("1"==k){for(let N=Z.parent;N!=Z.top;N=N.parent)S4(this,N,N.document);S4(this,Z.top,Z.top.document)}}catch(N){}}};var nff=class{constructor(){this.V=[];this.U=[]}reset(){this.V=[];this.U=[]}},JB=Xr(nff);var Zr=class{constructor(){this.V=this.U=null}};var Qkf=class extends If{constructor(Z){Z=GIy(Z);super(Z.length?Z[Z.length-1]:new np(HK,0));this.L=Z;this.U=null}getName(){return(this.U?this.U:this.V).getName()}ZB(){return(this.U?this.U:this.V).ZB()}r9(){return(this.U?this.U:this.V).r9()}init(Z){let k=!1;g.pi(this.L,N=>{N.initialize()&&(k=!0)});
k&&(this.j=Z,J2(this.V,this));return k}dispose(){g.pi(this.L,Z=>{Z.dispose()});
super.dispose()}O(){return Er(this.L,Z=>Z.xW())}D(){return Er(this.L,Z=>Z.xW())}Y(Z,k,N){return new Qu(Z,this.V,k,N)}G(Z){this.U=Z.U}};var SDG={threshold:[0,.3,.5,.75,1]},I8f=class extends Qu{constructor(Z,k,N,a){super(Z,k,N,a);this.Rq=this.Sm=this.zt=this.xW=this.Y=null}observe(){this.Rq||(this.Rq=Date.now()-h2);if(CH(298,()=>esf(this)))return!0;
this.U.fail("msf");return!1}unobserve(){if(this.Y&&this.element)try{this.Y.unobserve(this.element),this.xW?(this.xW.unobserve(this.element),this.xW=null):this.zt&&(this.zt.disconnect(),this.zt=null)}catch(Z){}}L(){const Z=MC(this);Z.length>0&&R8(this,Z);super.L()}FS(){}Qz(){return!1}MX(){}ZB(){return Object.assign(this.U.ZB(),{niot_obs:this.Rq,niot_cbk:this.Sm})}getName(){return"nio"}};var uH=class extends If{constructor(Z=HK){super(new np(Z,2))}getName(){return"nio"}D(){return!w1().U&&this.V.V.D.IntersectionObserver!=null}Y(Z,k,N){return new I8f(Z,this.V,k,N)}};var TJf=class extends np{constructor(){const Z=nH();super(HK.top,Z,"geo")}s6(){return w1().V}xW(){const Z=nH();this.O!==Z&&(this.V!=this&&Z>this.V.O&&(this.V=this,ol(this)),this.O=Z);return Z==2}};var kg=class{};var jBy=class{constructor(){this.done=!1;this.V={qD:0,yX:0,Det:0,g6:0,tK:-1,bl:0,ul:0,aF:0,bB:0};this.Y=null;this.L=!1;this.D=null;this.G=0;this.U=new XWf(this)}sample(){j4(this,zg(),!1)}},Wl=Xr(jBy);var KI=null,Dr="",Bc=!1;var Efr=()=>"av.default_js".includes("ima_html5_sdk")?{e$:"ima",Oh:null}:"av.default_js".includes("ima_native_sdk")?{e$:"nima",Oh:null}:"av.default_js".includes("admob-native-video-javascript")?{e$:"an",Oh:null}:"youtube.player.web_20260310_06_RC00".includes("cast_js_sdk")?{e$:"cast",Oh:yv()}:"youtube.player.web_20260310_06_RC00".includes("youtube.player.web")?{e$:"yw",Oh:yv()}:"youtube.player.web_20260310_06_RC00".includes("outstream_web_client")?{e$:"out",Oh:yv()}:"youtube.player.web_20260310_06_RC00".includes("drx_rewarded_web")?
{e$:"r",Oh:yv()}:"youtube.player.web_20260310_06_RC00".includes("gam_native_web_video")?{e$:"n",Oh:yv()}:"youtube.player.web_20260310_06_RC00".includes("admob_interstitial_video")?{e$:"int",Oh:yv()}:{e$:"j",Oh:null},wt=Efr().e$,LI=Efr().Oh;var KV=(Z,k)=>{const N={sv:"968"};LI!==null&&(N.v=LI);N.cb=wt;N.nas=JB.V.length;N.msg=Z;k!==void 0&&(Z=yg(k))&&(N.e=$g[Z]);return N},yg=Z=>{const k=Za(Z,"custom_metric_viewable")?"custom_metric_viewable":Z.toLowerCase();
return on($O,N=>N==k)};var Rsf={LQ:"visible",Qh:"audible",tYq:"time",PqS:"timetype"},Qv={visible:Z=>/^(100|[0-9]{1,2})$/.test(Z),
audible:Z=>Z=="0"||Z=="1",
timetype:Z=>Z=="mtos"||Z=="tos",
time:Z=>/^(100|[0-9]{1,2})%$/.test(Z)||/^([0-9])+ms$/.test(Z)},kmf=class{constructor(){this.V=void 0;
this.U=!1;this.D=0;this.Y=-1;this.L="tos"}setTime(Z,k,N="tos"){k=="ms"?(this.D=Z,this.Y=-1):(this.D=-1,this.Y=Z);this.L=N;return this}};var NJy=class extends K4{constructor(Z,k,N,a){super(k,a);this.j=Z;this.C=N}getId(){return this.j}G(){return!0}V(Z){const k=Z.CX(),N=Z.getDuration();return Er(this.C,a=>{if(a.V!=void 0)var T=nuj(a,k);else b:{switch(a.L){case "mtos":T=a.U?k.L.D:k.D.V;break b;case "tos":T=a.U?k.L.V:k.D.V;break b}T=0}T==0?a=!1:(a=a.D!=-1?a.D:N!==void 0&&N>0?a.Y*N:-1,a=a!=-1&&T>=a);return a})}};var WUy=class extends SW0{V(Z){const k=new GRy;k.V=XN(Z,wWf);k.U=XN(Z,xLi);return k}};var YWy=class extends K4{constructor(Z){super("fully_viewable_audible_half_duration_impression",Z)}V(Z){return vl(Z)}};var ZyG=class extends ULb{constructor(Z){super();this.V=Z}};var kuf=class extends K4{constructor(Z){super("viewable_impression",Z)}V(Z){return Z.CX().Ty()}};var Naf=class extends zWj{constructor(Z){super("measurable_impression",Z)}V(Z){const k=g.KK(this.j,WB(bm().vI,"ovms"));return!Z.Ac&&(Z.jd!=0||k)}};var aBG=class extends ZyG{U(){return new Naf(this.V)}D(){return[new kuf(this.V),new YWy(this.V)]}};var Taf=class extends pWU{Y(){const Z=g.Vf("ima.admob.getViewability"),k=WB(this.vI,"queryid");typeof Z==="function"&&k&&Z(k)}getName(){return"gsv"}};var KE0=class extends If{constructor(){super(new np(HK,2))}getName(){return"gsv"}D(){const Z=w1();bm();return Z.U&&!1}Y(Z,k,N){return new Taf(this.V,k,N)}};var K7R=class extends pWU{Y(){const Z=g.Vf("ima.bridge.getNativeViewability"),k=WB(this.vI,"queryid");typeof Z==="function"&&k&&Z(k,N=>{g.ze(N)&&this.zt++;const a=N.opt_nativeViewVisibleBounds||{},T=N.opt_nativeViewHidden;this.V=iU(N.opt_nativeViewBounds||{});const K=this.U.Y;K.V=T?b4i.clone():iU(a);this.timestamp=N.opt_nativeTime||-1;w1().V=K.V;N=N.opt_nativeVolume;N!==void 0&&(K.volume=N)})}getName(){return"nis"}};var ygr=class extends If{constructor(){super(new np(HK,2))}getName(){return"nis"}D(){const Z=w1();bm();return Z.U&&!1}Y(Z,k,N){return new K7R(this.V,k,N)}};var qy=class extends np{constructor(){super(HK,2,"mraid");this.hq=0;this.vD=this.Sm=!1;this.C=null;this.U=Bj(this.D);this.Y.V=new uj(0,0,0,0);this.Tt=!1}xW(){return this.U.d8!=null}Qz(){const Z={};this.hq&&(Z.mraid=this.hq);this.Sm&&(Z.mlc=1);Z.mtop=this.U.CB;this.C&&(Z.mse=this.C);this.Tt&&(Z.msc=1);Z.mcp=this.U.compatibility;return Z}initialize(){if(this.isInitialized)return!this.dA();this.isInitialized=!0;if(this.U.compatibility===2)return this.C="ng",this.fail("w"),!1;if(this.U.compatibility===
1)return this.C="mm",this.fail("w"),!1;w1().C=!0;this.D.document.readyState&&this.D.document.readyState=="complete"?cc(this):Gg(this.D,"load",()=>{HF().setTimeout(Hc(292,()=>cc(this)),100)},292);
return!0}tq(){const Z=w1(),k=XK(this,"getMaxSize");Z.V=new uj(0,k.width,k.height,0)}MX(){w1().Y=XK(this,"getScreenSize")}dispose(){dt(this);super.dispose()}};var yt0=new class{constructor(Z,k=!1){this.key=Z;this.defaultValue=k;this.valueType="boolean"}}("45378663");var QmU=class{constructor(){this.isInitialized=!1;this.V=this.U=null;this.s6={start:this.hp,firstquartile:this.xl,midpoint:this.HA,thirdquartile:this.bq,complete:this.O6,error:this.qX,pause:this.Sm,resume:this.Tt,skip:this.iq,viewable_impression:this.D,mute:this.Y,unmute:this.Y,fullscreen:this.r5,exitfullscreen:this.pF,fully_viewable_audible_half_duration_impression:this.D,measurable_impression:this.D,abandon:this.Sm,engagedview:this.D,impression:this.D,creativeview:this.D,progress:this.Y,custom_metric_viewable:this.D,
bufferstart:this.Sm,bufferfinish:this.Tt,audio_measurable:this.D,audio_audible:this.D};this.Ap={overlay_resize:this.jY,abandon:this.FS,close:this.FS,collapse:this.FS,overlay_unmeasurable_impression:Z=>xO(Z,"overlay_unmeasurable_impression",SR()),
overlay_viewable_immediate_impression:Z=>xO(Z,"overlay_viewable_immediate_impression",SR()),
overlay_unviewable_impression:Z=>xO(Z,"overlay_unviewable_impression",SR()),
overlay_viewable_end_of_session_impression:Z=>xO(Z,"overlay_viewable_end_of_session_impression",SR())};
bm().U=3;YDy(this);this.L=null}C(Z){m$(Z,!1);wCy(Z)}N(){}O(Z,k,N,a){Z=new RWX(Z,N?k:-1,this.xW(),this.Kp());Z.kH=a;XyN(Z.vI);Eh(Z.vI,"queryid",Z.kH);Z.tV("");PEi(Z,(...T)=>this.Qz(...T),(...T)=>ZgU(this,...T));
(a=Xr(Zr).V)&&s_(Z,a);this.L&&(Z.j(this.L),this.L=null);Z.Dc.VQ&&Xr(kg);return Z}Vz(Z){switch(Z.r9()){case 0:if(Z=Xr(Zr).V)Z=Z.V,g.qF(Z.L,this),Z.zt&&this.sR()&&z2(Z);fI();break;case 2:YO()}}G(){}sR(){return!1}hp(Z){var k=Z.C(Z);k&&(k=k.volume,Z.Tt=g1(k)&&k>0);iY(Z,0);return xO(Z,"start",SR())}Y(Z,k,N){j4(Wl,[Z],!SR());return this.D(Z,k,N)}D(Z,k,N){return xO(Z,N,SR())}xl(Z){return gt(Z,"firstquartile",1)}HA(Z){Z.Qz=!0;return gt(Z,"midpoint",2)}bq(Z){return gt(Z,"thirdquartile",3)}O6(Z){const k=gt(Z,
"complete",4);fH(Z);return k}qX(Z){Z.jd=3;return xO(Z,"error",SR())}Tt(Z,k,N){k=SR();if(Z.Uh()&&!k){var a=Z.CX(),T=Date.now()-h2;a.C=T}j4(Wl,[Z],!k);Z.Uh()&&(Z.jd=1);return xO(Z,N,k)}iq(Z,k){k=this.Y(Z,k||{},"skip");fH(Z);return k}r5(Z,k){m$(Z,!0);return this.Y(Z,k||{},"fullscreen")}pF(Z,k){m$(Z,!1);return this.Y(Z,k||{},"exitfullscreen")}Sm(Z,k,N){k=Z.CX();var a=Date.now()-h2;k.Rq=VZ(k,a,Z.jd!=1);j4(Wl,[Z],!SR());Z.jd==1&&(Z.jd=2);return xO(Z,N,SR())}jY(Z){j4(Wl,[Z],!SR());return Z.U()}FS(Z){j4(Wl,
[Z],!SR());this.hq(Z);fH(Z);return Z.U()}Qz(){}tq(){}hq(){}MX(){}dA(){}Kp(){this.V||(this.V=this.dA());return this.V==null?new yu:new aBG(this.V)}xW(){return new WUy}};var qkX=class extends K4{constructor(Z){super("audio_audible",Z)}V(Z){return Z.CK()==4}};var rtN=class extends zWj{constructor(Z){super("audio_measurable",Z)}V(Z){Z=Z.CK();return Z==3||Z==4}};var C7U=class extends ZyG{U(){return new rtN(this.V)}D(){return[new qkX(this.V)]}};var mfG=class extends SW0{V(Z){Z&&(Z.e===28&&(Z=Object.assign({},Z,{avas:3})),Z.vs===4||Z.vs===5)&&(Z=Object.assign({},Z,{vs:3}));const k=new GRy;k.V=XN(Z,$Ly);k.U=XN(Z,xLi);return k}};var smf=class{constructor(Z){this.V=Z}U(){return g.Vf(this.V)}};var Sc=class extends QmU{constructor(){super();this.Rq=null;this.vD=!1;this.zt="ACTIVE_VIEW_TRAFFIC_TYPE_UNSPECIFIED"}N(Z,k){let N;const a=Xr(Zr);if(a.V!=null)switch(a.V.getName()){case "nis":N=P0i(this,Z,k);break;case "gsv":N=cg0(this,Z,k);break;case "exc":N=Hgy(this,Z)}N||(k.opt_overlayAdElement?N=void 0:k.opt_adElement&&(N=C0f(this,Z,k.opt_adElement,k.opt_osdId)));N&&N.Jb()==1&&(N.C==g.Vp&&(N.C=T=>this.MX(T)),dci(this,N,k));
return N}MX(Z){Z.U=0;Z.dA=0;let k;if(Z.Y=="h"||Z.Y=="n"){bm();Z.Kp&&(bm(),OH(this)!="h"&&OH(this));var N=g.Vf("ima.common.getVideoMetadata");if(typeof N==="function")try{k=N(Z.kH)}catch(a){Z.U|=4}else Z.U|=2}else if(Z.Y=="b")if(N=g.Vf("ytads.bulleit.getVideoMetadata"),typeof N==="function")try{k=N(Z.kH)}catch(a){Z.U|=4}else Z.U|=2;else if(Z.Y=="ml")if(N=g.Vf("ima.common.getVideoMetadata"),typeof N==="function")try{k=N(Z.kH)}catch(a){Z.U|=4}else Z.U|=2;else Z.U|=1;Z.U||(k===void 0?Z.U|=8:k===null?
Z.U|=16:g.ze(k)?Z.U|=32:k.errorCode!=null&&(Z.dA=k.errorCode,Z.U|=64));k==null&&(k={});N=k;Z.N=0;for(const a in dLy)N[a]==null&&(Z.N|=dLy[a]);FK(N,"currentTime");FK(N,"duration");g1(k.volume)&&g1()&&(k.volume*=NaN);return k}dA(){bm();OH(this)!="h"&&OH(this);const Z=XsR(this);return Z!=null?new smf(Z):null}tq(Z){!Z.V&&Z.Ac&&iH(this,Z,"overlay_unmeasurable_impression")&&(Z.V=!0)}hq(Z){Z.py&&(Z.Ty()?iH(this,Z,"overlay_viewable_end_of_session_impression"):iH(this,Z,"overlay_unviewable_impression"),Z.py=
!1)}Qz(){}O(Z,k,N,a){if(bm().flags.Aq(yt0)){var T=WB(bm().vI,"mm");(T={[hG.tC]:"ACTIVE_VIEW_TRAFFIC_TYPE_AUDIO",[hG.VIDEO]:"ACTIVE_VIEW_TRAFFIC_TYPE_VIDEO"}[T])&&qY(this,T);this.zt==="ACTIVE_VIEW_TRAFFIC_TYPE_UNSPECIFIED"&&VU.nA(1044,Error(),void 0,void 0)}Z=super.O(Z,k,N,a);this.vD&&(k=this.Rq,Z.L==null&&(Z.L=new O4y),k.V[Z.kH]=Z.L,Z.L.L=MUR);return Z}C(Z){Z&&Z.Jb()==1&&this.vD&&delete this.Rq.V[Z.kH];return super.C(Z)}Kp(){this.V||(this.V=this.dA());return this.V==null?new yu:this.zt==="ACTIVE_VIEW_TRAFFIC_TYPE_AUDIO"?
new C7U(this.V):new aBG(this.V)}xW(){return this.zt==="ACTIVE_VIEW_TRAFFIC_TYPE_AUDIO"?new mfG:new WUy}j(Z,k,N,a,T){k=new uj(N,k+a,N+T,k);(Z=e4(JB,Z))?Z.j(k):this.L=k}},AtU=Fu(193,oA,void 0,Vv);g.X0("Goog_AdSense_Lidar_sendVastEvent",AtU);var P7r;P7r=Fu(194,function(Z,k={}){Z=Gz(Xr(Sc),Z,k);return xg(Z)});
g.X0("Goog_AdSense_Lidar_getViewability",P7r);var cty=Fu(195,function(){return dP()});
g.X0("Goog_AdSense_Lidar_getUrlSignalsArray",cty);var HyN;HyN=Fu(196,function(){return JSON.stringify(dP())});
g.X0("Goog_AdSense_Lidar_getUrlSignalsList",HyN);var NKf=class{constructor({url:Z,wda:k}){this.U=Z;this.Y=k;this.D=(new Date).getTime()-17040672E5;this.V={};const N=/[?&]([^&=]+)=([^&]*)/g;for(;k=N.exec(Z);)this.V[k[1]]=k[2]}};var P$=class extends Error{constructor(Z,k,N=Error()){super();this.code=Z;k+=":";N instanceof Error?(this.message=k+N.message,this.stack=N.stack||""):(this.message=k+String(N),this.stack="");Object.setPrototypeOf(this,new.target.prototype)}};var tey=class extends g.jR{constructor(Z){super();this.wpc=Z}J5(){return this.wpc.f()}Nv(Z){this.wpc.c(Z)}D(Z){return this.wpc.m(As(Z))}zL(Z){return this.wpc.mws(As(Z))}},mx=class extends g.jR{constructor(Z){super();this.L8=Z;this.D="keydown keypress keyup input focusin focusout select copy cut paste change click dblclick auxclick pointerover pointerdown pointerup pointermove pointerout dragenter dragleave drag dragend mouseover mousedown mouseup mousemove mouseout touchstart touchend touchmove wheel".split(" ");
this.U=void 0;this.jG=this.L8.p;this.Y=this.Q7.bind(this);this.addOnDisposeCallback(()=>void FEy(this))}snapshot(Z){return this.L8.s({...(Z.yr&&{c:Z.yr}),
...(Z.ET&&{s:Z.ET}),...(Z.Bu!==void 0&&{p:Z.Bu})})}Q7(Z){this.L8.e(Z)}sF(){return this.L8.l()}};var dfb=class extends g.jR{constructor(){super(...arguments);this.zt=1}share(){if(this.jm())throw Error("E:AD");this.zt++;return this}dispose(){--this.zt||super.dispose()}};var XhG=class{constructor(Z){this.V=Z;k_(Z,"/client_streamz/bg/frs",g.Vg("mk"))}Wd(Z,k){this.V.Wd("/client_streamz/bg/frs",Z,k)}},L7y=class{constructor(Z){this.V=Z;k_(Z,"/client_streamz/bg/wrl",g.Vg("mn"),LV("ac"),LV("sc"),g.Vg("rk"),g.Vg("mk"))}Wd(Z,k,N,a,T,K){this.V.Wd("/client_streamz/bg/wrl",Z,k,N,a,T,K)}},VEb=class{constructor(Z){this.U=Z;g.ae(Z,"/client_streamz/bg/ec",g.Vg("en"),g.Vg("mk"))}V(Z,k){g.Kh(this.U,"/client_streamz/bg/ec",Z,k)}},F7R=class{constructor(Z){this.V=Z;k_(Z,"/client_streamz/bg/el",
g.Vg("en"),g.Vg("mk"))}Wd(Z,k,N){this.V.Wd("/client_streamz/bg/el",Z,k,N)}},tEf=class{constructor(Z){this.U=Z;g.ae(Z,"/client_streamz/bg/cec",LV("ec"),g.Vg("mk"))}V(Z,k){g.Kh(this.U,"/client_streamz/bg/cec",Z,k)}},h3f=class{constructor(Z){this.U=Z;g.ae(Z,"/client_streamz/bg/po/csc",LV("cs"),g.Vg("mk"))}V(Z,k){g.Kh(this.U,"/client_streamz/bg/po/csc",Z,k)}},uFb=class{constructor(Z){this.U=Z;g.ae(Z,"/client_streamz/bg/po/ctav",g.Vg("av"),g.Vg("mk"))}V(Z,k){g.Kh(this.U,"/client_streamz/bg/po/ctav",Z,
k)}},lBX=class{constructor(Z){this.U=Z;g.ae(Z,"/client_streamz/bg/po/cwsc",g.Vg("su"),g.Vg("mk"))}V(Z,k){g.Kh(this.U,"/client_streamz/bg/po/cwsc",Z,k)}},fBN=class{constructor(Z){this.V=Z;k_(Z,"/client_streamz/bg/od/p",g.Vg("mk"))}Wd(Z,k){this.V.Wd("/client_streamz/bg/od/p",Z,k)}},BaR=class{constructor(Z){this.V=Z;k_(Z,"/client_streamz/bg/od/n",g.Vg("et"),g.Vg("mk"))}Wd(Z,k,N){this.V.Wd("/client_streamz/bg/od/n",Z,k,N)}};var qQf=class extends mD{constructor(Z){super(Z)}};var fV=class extends mD{constructor(Z){super(Z)}},B$=[1,2,3];var hs=class extends mD{constructor(Z){super(Z)}},ul=[1,2,3];var ll=class extends mD{constructor(Z){super(Z)}};var DfG=class extends mD{constructor(Z){super(Z)}};var Oyy=class extends mD{constructor(Z){super(Z)}},vty=[1,2,3];var FR=class extends mD{constructor(Z){super(Z)}Z4(){var Z=fk(this,3,Ue,3,!0);jv(Z);return Z[void 0]}};FR.prototype.U=Ji([0,of,[0,vty,za,[0,of,-1,Ejy],za,[0,of,-1,e2,Ejy],za,[0,of]],Ygf,JG,[0,JG,[0,B$,Z4f,M2G,Why],[0,ul,Rfy,pJf,za,[0,JG,[0,bpU,S2]]]],njj,IhG]);var iyR=class extends mD{constructor(Z){super(Z)}};g.t=gA.prototype;g.t.isEnabled=function(){if(!g.dX.navigator.cookieEnabled)return!1;if(!this.isEmpty())return!0;this.set("TESTCOOKIESENABLED","1",{X9:60});if(this.get("TESTCOOKIESENABLED")!=="1")return!1;this.remove("TESTCOOKIESENABLED");return!0};
g.t.set=function(Z,k,N){let a;var T=!1;let K;if(typeof N==="object"){K=N.sameSite;T=N.secure||!1;a=N.domain||void 0;var y=N.path||void 0;var Q=N.X9}if(/[;=\s]/.test(Z))throw Error('Invalid cookie name "'+Z+'"');if(/[;\r\n]/.test(k))throw Error('Invalid cookie value "'+k+'"');Q===void 0&&(Q=-1);N=a?";domain="+a:"";y=y?";path="+y:"";T=T?";secure":"";Q=Q<0?"":Q==0?";expires="+(new Date(1970,1,1)).toUTCString():";expires="+(new Date(Date.now()+Q*1E3)).toUTCString();this.V.cookie=Z+"="+k+N+y+Q+T+(K!=null?
";samesite="+K:"")};
g.t.get=function(Z,k){const N=Z+"=",a=(this.V.cookie||"").split(";");for(let T=0,K;T<a.length;T++){K=a[T].trim();if(K.lastIndexOf(N,0)==0)return K.slice(N.length);if(K==Z)return""}return k};
g.t.remove=function(Z,k,N){const a=this.get(Z)!==void 0;this.set(Z,"",{X9:0,path:k,domain:N});return a};
g.t.pP=function(){return wA(this).keys};
g.t.o5=function(){return wA(this).values};
g.t.isEmpty=function(){return!this.V.cookie};
g.t.clear=function(){const Z=wA(this).keys;for(let k=Z.length-1;k>=0;k--)this.remove(Z[k])};
var kq=new gA(typeof document=="undefined"?null:document);var gtf=class{async compress(Z){var k=new CompressionStream("gzip");const N=(new Response(k.readable)).arrayBuffer();k=k.writable.getWriter();await k.write((new TextEncoder).encode(Z));await k.close();return new Uint8Array(await N)}isSupported(Z){return Z<1024?!1:typeof CompressionStream!=="undefined"}};var qL=class extends mD{constructor(Z){super(Z)}};var whN=class{constructor(Z,k){this.intervalMs=Z;this.callback=k;this.enabled=!1;this.V=()=>g.vy();
this.U=this.V()}setInterval(Z){this.intervalMs=Z;this.timer&&this.enabled?(this.stop(),this.start()):this.timer&&this.stop()}start(){this.enabled=!0;this.timer||(this.timer=setTimeout(()=>{this.tick()},this.intervalMs),this.U=this.V())}stop(){this.enabled=!1;
this.timer&&(clearTimeout(this.timer),this.timer=void 0)}tick(){if(this.enabled){const Z=Math.max(this.V()-this.U,0);Z<this.intervalMs*.8?this.timer=setTimeout(()=>{this.tick()},this.intervalMs-Z):(this.timer&&(clearTimeout(this.timer),this.timer=void 0),this.callback(),this.enabled&&(this.stop(),this.start()))}else this.timer=void 0}};var $fy=class extends mD{constructor(Z){super(Z)}};var xfG=class extends mD{constructor(Z){super(Z)}};g.ry=class extends mD{constructor(Z){super(Z)}yx(){return az(this,1)}};g.ry.prototype.zo=NR(1);var ef=class extends mD{constructor(Z){super(Z)}};var pV=class extends mD{constructor(Z){super(Z)}},$cf=zF(pV);var MY=class extends mD{constructor(Z){super(Z)}};var od=["platform","platformVersion","architecture","model","uaFullVersion"],Sf=new pV,Js=null;var UE=class extends mD{constructor(Z){super(Z)}};var Guy=class extends mD{constructor(Z){super(Z)}};var Ski=class extends mD{constructor(Z){super(Z,4)}};var C4=class extends mD{constructor(Z){super(Z,37)}B(){const Z=this.Sl;return bk(Z,Z[M3]|0,Guy,7)!==void 0}gH(){return pk(this,qL,16)}};var e3X=class extends mD{constructor(Z){super(Z,19)}BJ(Z){return rs(this,2,Z)}};var oti=class{constructor(Z,k=!1){this.No=k;this.uach=this.locale=null;this.U=0;this.isFinal=!1;this.V=new e3X;Number.isInteger(Z)&&this.V.BJ(Z);k||(this.locale=document.documentElement.getAttribute("lang"));Rd(this,new UE)}BJ(Z){this.V.BJ(Z);return this}build(Z,k=0,N=0,a=null,T=0,K=0){if(!this.No){var y=bl(this);var Q=new g.ry;Q=rs(Q,1,this.U);Q=VX(Q,2,HR(this.isFinal));N=VX(Q,3,VV(N>0?N:void 0));T=VX(N,4,VV(T>0?T:void 0));K=VX(T,5,VV(K>0?K:void 0));T=K.Sl;N=T[M3]|0;K=nl(K,N)?K:mQ(K,T,N)?s3(K,T):
new K.constructor(Ck(T,N,!0));jt(y,g.ry,10,K)}y=this.V.clone();K=Date.now().toString();y=VX(y,4,gU(K));Z=W1(y,C4,3,Z.slice());a&&(y=new $fy,a=VX(y,13,VV(a)),y=new xfG,a=jt(y,$fy,2,a),y=new Ski,a=jt(y,xfG,1,a),a=rs(a,2,9),jt(Z,Ski,18,a));k&&y3(Z,14,k);return Z}};g.nV.prototype.U=0;g.nV.prototype.reset=function(){this.V=this.D=this.Y;this.U=0};
g.nV.prototype.getValue=function(){return this.D};var Tyr=class extends mD{constructor(Z){super(Z,8)}},Jtf=zF(Tyr);var mU;mU=new KUy(class extends mD{constructor(Z){super(Z)}});var z3i=class extends g.jR{constructor(Z){super();this.componentId="";this.V=[];this.vD="";this.pageId=null;this.Sm=this.zt=-1;this.j=this.experimentIds=null;this.Vz=this.O=this.G=this.Y=0;this.Rq=1;this.timeoutMillis=0;this.xW=!1;this.logSource=Z.logSource;this.eW=Z.eW||(()=>{});
this.D=new oti(Z.logSource,Z.No);this.network=Z.network||null;this.oy=Z.oy||null;this.C=Z.L6||null;this.sessionIndex=Z.sessionIndex||null;this.Pr=Z.Pr||!1;this.logger=null;this.withCredentials=!Z.o3;this.No=Z.No||!1;this.N=!this.No&&!!ZJ()&&!!ZJ().navigator&&ZJ().navigator.sendBeacon!==void 0;this.FS=typeof URLSearchParams!=="undefined"&&!!(new URL(jf())).searchParams&&!!(new URL(jf())).searchParams.set;const k=zr(new UE);Rd(this.D,k);this.L=new g.nV(1E4,3E5,.1);Z=Gmf(this,Z.SM);this.U=new whN(this.L.getValue(),
Z);this.dA=new whN(6E5,Z);this.Pr||this.dA.start();this.No||(document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&EE(this)}),document.addEventListener("pagehide",()=>{EE(this)}))}YW(){EE(this);
this.U.stop();this.dA.stop();super.YW()}dispatch(Z){if(Z instanceof C4)this.log(Z);else try{var k=new C4,N=Z.W9();var a=Q3(k,8,N);this.log(a)}catch{}}log(Z){if(this.FS){Z=Z.clone();var k=this.Rq++;Z=y3(Z,21,k);this.componentId&&Q3(Z,26,this.componentId);k=Z;{var N=XD(k,1);const a=typeof N;N=N==null?N:a==="bigint"?String(fC(64,N)):Xl(N)?a==="string"?lW(N):vR(N):void 0}N==null&&(N=Date.now(),N=Number.isFinite(N)?N.toString():"0",VX(k,1,gU(N)));(uW?Sa(XD(k,15,void 0,void 0,ea)):Sa(XD(k,15)))!=null||
y3(k,15,(new Date).getTimezoneOffset()*60);this.experimentIds&&(N=this.experimentIds.clone(),jt(k,qL,16,N));k=this.V.length-1E3+1;k>0&&(this.V.splice(0,k),this.Y+=k);this.V.push(Z);this.Pr||this.U.enabled||this.U.start()}}flush(Z,k){if(this.V.length===0)Z&&Z();else if(this.xW&&this.N)this.D.U=3,oKR(this);else{var N=Date.now();if(this.Sm>N&&this.zt<N)k&&k("throttled");else{this.network&&(typeof this.network.yx==="function"?wsy(this.D,this.network.yx()):this.D.U=0);var a=this.D.build(this.V,this.Y,
this.G,this.oy,this.O,this.Vz),T=this.eW();if(T&&this.vD===T)k&&k("stale-auth-token");else{this.V=[];this.U.enabled&&this.U.stop();this.Y=0;N=a.W9();let K;this.j&&this.j.isSupported(N.length)&&(K=this.j.compress(N));const y=Jgr(this,N,T),Q=C=>{this.L.reset();this.U.setInterval(this.L.getValue());if(C){var m=null;try{var A=JSON.stringify(JSON.parse(C.replace(")]}'\n","")));m=Jtf(A)}catch(P){}if(m){C=Number(kH(m,1,Nm("-1")));C>0&&(this.zt=Date.now(),this.Sm=this.zt+C);(C=wX(Iq))&&m.Sl[C]?.[175237375]!=
null&&bK(BRR,3);if(wX(Djb)&&wX(Iq)&&void 0===Djb&&(C=m.Sl,A=C[Iq])&&(A=A.T6))try{A(C,175237375,gjj)}catch(P){Fr(P)}m=mU.V?mU.U(m,mU.V,175237375,mU.D):mU.U(m,175237375,null,mU.D);if(m=m===null?void 0:m)m=g.ZZ(m,1,-1),m!==-1&&(this.L=new g.nV(m<1?1:m,3E5,.1),this.U.setInterval(this.L.getValue()))}}Z&&Z();this.G=0},q=(C,m)=>{var A=nk(a,C4,3);
var P=Number(kH(a,14));g.Id(this.L);this.U.setInterval(this.L.getValue());C===401&&T&&(this.vD=T);P&&(this.Y+=P);m===void 0&&(m=this.isRetryable(C));m&&(this.V=A.concat(this.V),this.Pr||this.U.enabled||this.U.start());k&&k("net-send-failed",C);++this.G},r=()=>{this.network&&this.network.send(y,Q,q)};
K?K.then(C=>{y.requestHeaders["Content-Encoding"]="gzip";y.requestHeaders["Content-Type"]="application/binary";y.body=C;y.JP=2;r()},()=>{r()}):r()}}}}isRetryable(Z){return 500<=Z&&Z<600||Z===401||Z===0}};var Ufy=class{constructor(){this.hF=typeof AbortController!=="undefined"}async send(Z,k,N){const a=this.hF?new AbortController:void 0,T=a?setTimeout(()=>{a.abort()},Z.timeoutMillis):void 0;
try{const K=await fetch(Z.url,{method:Z.requestType,headers:{...Z.requestHeaders},...(Z.body&&{body:Z.body}),...(Z.withCredentials&&{credentials:"include"}),signal:Z.timeoutMillis&&a?a.signal:null});K.status===200?k?.(await K.text()):N?.(K.status)}catch(K){switch(K?.name){case "AbortError":N?.(408);break;default:N?.(400)}}finally{clearTimeout(T)}}yx(){return 4}};var $_=class extends g.jR{constructor(){super();this.logSource=1828;this.sessionIndex="0";this.WX="https://play.google.com/log?format=json&hasfast=true";this.network=this.buildLabel=null;this.componentId="";this.V=this.oy=null;this.U=!1;this.logger=this.pageId=null}o3(){this.D=!0;return this}build(){this.network||(this.network=new Ufy);const Z=new z3i({logSource:this.logSource,eW:this.eW?this.eW:Gr,sessionIndex:this.sessionIndex,L6:this.WX,No:!1,Pr:!1,o3:this.D,SM:this.SM,network:this.network});g.u(this,
Z);if(this.buildLabel){var k=this.buildLabel,N=bl(Z.D);Q3(N,7,k)}Z.j=new gtf;this.componentId&&(Z.componentId=this.componentId);this.oy&&(Z.oy=this.oy);this.pageId&&(Z.pageId=this.pageId);this.V&&((N=this.V)?(Z.experimentIds||(Z.experimentIds=new qL),k=Z.experimentIds,N=N.W9(),Q3(k,4,N)):Z.experimentIds&&VX(Z.experimentIds,4));this.U&&(Z.xW=Z.N);xcf(Z.D);this.network.BJ&&this.network.BJ(this.logSource);this.network.EV&&this.network.EV(Z);return Z}};var rIj=class extends g.jR{constructor(Z){super();this.logSource=1828;this.componentId="";Z||(Z=new $_,Z.componentId="",g.u(this,Z),Z=Z.build());this.V=Z}flush(Z){Z=Z||[];if(Z.length){const k=new iyR,N=[];for(let a=0;a<Z.length;a++){const T=Z[a],K=D7(T);N.push(K);T.clear()}W1(k,FR,1,N);this.V.dispatch(k);this.V.flush()}}};var Ch=class{constructor(Z){this.V=Z}};var byy=class{constructor(Z,k,N){this.U=Z;this.D=k;this.fields=N||[];this.V=new Map}clear(){this.V.clear()}};var NW=class extends byy{constructor(Z,k){super(Z,3,k)}};var Zo=class extends byy{constructor(Z,k){super(Z,2,k)}Wd(Z,...k){k=[k];const N=ts(this,k);N?N.push(new Ch(Z)):this.V.set(Z$([k]),[new Ch(Z)])}};g.kE.prototype.stopPropagation=function(){this.U=!0};
g.kE.prototype.preventDefault=function(){this.defaultPrevented=!0};g.$b(Nz,g.kE);
Nz.prototype.init=function(Z,k){const N=this.type=Z.type,a=Z.changedTouches&&Z.changedTouches.length?Z.changedTouches[0]:null;this.target=Z.target||Z.srcElement;this.currentTarget=k;k=Z.relatedTarget;k||(N=="mouseover"?k=Z.fromElement:N=="mouseout"&&(k=Z.toElement));this.relatedTarget=k;a?(this.clientX=a.clientX!==void 0?a.clientX:a.pageX,this.clientY=a.clientY!==void 0?a.clientY:a.pageY,this.screenX=a.screenX||0,this.screenY=a.screenY||0):(this.clientX=Z.clientX!==void 0?Z.clientX:Z.pageX,this.clientY=
Z.clientY!==void 0?Z.clientY:Z.pageY,this.screenX=Z.screenX||0,this.screenY=Z.screenY||0);this.button=Z.button;this.keyCode=Z.keyCode||0;this.key=Z.key||"";this.charCode=Z.charCode||(N=="keypress"?Z.keyCode:0);this.ctrlKey=Z.ctrlKey;this.altKey=Z.altKey;this.shiftKey=Z.shiftKey;this.metaKey=Z.metaKey;this.pointerId=Z.pointerId||0;this.pointerType=Z.pointerType;this.state=Z.state;this.V=Z;Z.defaultPrevented&&Nz.n8.preventDefault.call(this)};
Nz.prototype.stopPropagation=function(){Nz.n8.stopPropagation.call(this);this.V.stopPropagation?this.V.stopPropagation():this.V.cancelBubble=!0};
Nz.prototype.preventDefault=function(){Nz.n8.preventDefault.call(this);const Z=this.V;Z.preventDefault?Z.preventDefault():Z.returnValue=!1};var a0="closure_listenable_"+(Math.random()*1E6|0);var MeN=0;g.t=yD.prototype;g.t.add=function(Z,k,N,a,T){const K=Z.toString();Z=this.listeners[K];Z||(Z=this.listeners[K]=[],this.V++);const y=qz(Z,k,a,T);y>-1?(k=Z[y],N||(k.MM=!1)):(k=new nKR(k,this.src,K,!!a,T),k.MM=N,Z.push(k));return k};
g.t.remove=function(Z,k,N,a){Z=Z.toString();if(!(Z in this.listeners))return!1;const T=this.listeners[Z];k=qz(T,k,N,a);return k>-1?(K6(T[k]),g.QH(T,k),T.length==0&&(delete this.listeners[Z],this.V--),!0):!1};
g.t.removeAll=function(Z){Z=Z&&Z.toString();let k=0;for(const N in this.listeners)if(!Z||N==Z){const a=this.listeners[N];for(let T=0;T<a.length;T++)++k,K6(a[T]);delete this.listeners[N];this.V--}return k};
g.t.fY=function(Z,k,N,a){Z=this.listeners[Z.toString()];let T=-1;Z&&(T=qz(Z,k,N,a));return T>-1?Z[T]:null};
g.t.hasListener=function(Z,k){const N=Z!==void 0,a=N?Z.toString():"",T=k!==void 0;return g.vB(this.listeners,function(K){for(let y=0;y<K.length;++y)if(!(N&&K[y].type!=a||T&&K[y].capture!=k))return!0;return!1})};var P2="closure_lm_"+(Math.random()*1E6|0),L6={},H2=0,VD="__closure_events_fn_"+(Math.random()*1E9>>>0);g.$b(g.FQ,g.jR);g.FQ.prototype[a0]=!0;g.t=g.FQ.prototype;g.t.addEventListener=function(Z,k,N,a){g.C6(this,Z,k,N,a)};
g.t.removeEventListener=function(Z,k,N,a){de(this,Z,k,N,a)};
g.t.dispatchEvent=function(Z){var k=this.JV;if(k){var N=[];for(var a=1;k;k=k.JV)N.push(k),++a}k=this.ey;a=Z.type||Z;if(typeof Z==="string")Z=new g.kE(Z,k);else if(Z instanceof g.kE)Z.target=Z.target||k;else{var T=Z;Z=new g.kE(a,k);g.In(Z,T)}T=!0;let K,y;if(N)for(y=N.length-1;!Z.U&&y>=0;y--)K=Z.currentTarget=N[y],T=tD(K,a,!0,Z)&&T;Z.U||(K=Z.currentTarget=k,T=tD(K,a,!0,Z)&&T,Z.U||(T=tD(K,a,!1,Z)&&T));if(N)for(y=0;!Z.U&&y<N.length;y++)K=Z.currentTarget=N[y],T=tD(K,a,!1,Z)&&T;return T};
g.t.YW=function(){g.FQ.n8.YW.call(this);this.kV&&this.kV.removeAll(void 0);this.JV=null};
g.t.listen=function(Z,k,N,a){return this.kV.add(String(Z),k,!1,N,a)};
g.t.TG=function(Z,k,N,a){return this.kV.add(String(Z),k,!0,N,a)};
g.t.Ce=function(Z,k,N,a){this.kV.remove(String(Z),k,N,a)};
g.t.fY=function(Z,k,N,a){return this.kV.fY(String(Z),k,N,a)};
g.t.hasListener=function(Z,k){return this.kV.hasListener(Z!==void 0?String(Z):void 0,k)};var hD=typeof AsyncContext!=="undefined"&&typeof AsyncContext.Snapshot==="function"?Z=>Z&&AsyncContext.Snapshot.wrap(Z):Z=>Z;var phi=class{constructor(Z,k){this.D=Z;this.Y=k;this.U=0;this.V=null}get(){let Z;this.U>0?(this.U--,Z=this.V,this.V=Z.next,Z.next=null):Z=this.D();return Z}put(Z){this.Y(Z);this.U<100&&(this.U++,Z.next=this.V,this.V=Z)}};var uh;var R3f=class{constructor(){this.U=this.V=null}add(Z,k){const N=B2.get();N.set(Z,k);this.U?this.U.next=N:this.V=N;this.U=N}remove(){let Z=null;this.V&&(Z=this.V,this.V=this.V.next,this.V||(this.U=null),Z.next=null);return Z}},B2=new phi(()=>new MEr,Z=>Z.reset()),MEr=class{constructor(){this.next=this.scope=this.V=null}set(Z,k){this.V=Z;
this.scope=k;this.next=null}reset(){this.next=this.scope=this.V=null}};var sW,D$,f6,ntb;D$=!1;f6=new R3f;g.Sq=(Z,k)=>{sW||ntb();D$||(sW(),D$=!0);f6.add(Z,k)};
ntb=()=>{const Z=Promise.resolve(void 0);sW=()=>{Z.then(WER)}};ih.prototype.reset=function(){this.context=this.U=this.D=this.V=null;this.Y=!1};
var ge=new phi(function(){return new ih},function(Z){Z.reset()});
g.v2.prototype.then=function(Z,k,N){return n6(this,hD(typeof Z==="function"?Z:null),hD(typeof k==="function"?k:null),N)};
g.v2.prototype.$goog_Thenable=!0;g.t=g.v2.prototype;g.t.finally=function(Z){Z=hD(Z);return new g.v2((k,N)=>{JD(this,a=>{Z();k(a)},a=>{Z();
N(a)})})};
g.t.eK=function(Z,k){return n6(this,null,hD(Z),k)};
g.t.catch=g.v2.prototype.eK;g.t.cancel=function(Z){if(this.V==0){const k=new Mz(Z);g.Sq(function(){UC(this,k)},this)}};
g.t.Ui=function(Z){this.V=0;OC(this,2,Z)};
g.t.oL=function(Z){this.V=0;OC(this,3,Z)};
g.t.Pw=function(){let Z;for(;Z=bh(this);)p6(this,Z,this.V,this.j);this.G=!1};
var jq=Fr;g.$b(Mz,oy);Mz.prototype.name="cancel";g.$b(g.EC,g.FQ);g.t=g.EC.prototype;g.t.enabled=!1;g.t.WI=null;g.t.setInterval=function(Z){this.TP=Z;this.WI&&this.enabled?(this.stop(),this.start()):this.WI&&this.stop()};
g.t.nB=function(){if(this.enabled){const Z=g.vy()-this.hj;Z>0&&Z<this.TP*.8?this.WI=this.eG.setTimeout(this.E_,this.TP-Z):(this.WI&&(this.eG.clearTimeout(this.WI),this.WI=null),this.dispatchEvent("tick"),this.enabled&&(this.stop(),this.start()))}};
g.t.start=function(){this.enabled=!0;this.WI||(this.WI=this.eG.setTimeout(this.E_,this.TP),this.hj=g.vy())};
g.t.stop=function(){this.enabled=!1;this.WI&&(this.eG.clearTimeout(this.WI),this.WI=null)};
g.t.YW=function(){g.EC.n8.YW.call(this);this.stop();delete this.eG};var x_=class extends g.jR{constructor(Z){super();this.C=Z;this.L=0;this.D=100;this.G=!1;this.U=new Map;this.j=new Set;this.flushInterval=3E4;this.V=new g.EC(this.flushInterval);this.V.listen("tick",this.Y,!1,this);g.u(this,this.V)}sendIsolatedPayload(Z){this.G=Z;this.D=1}Y(){const Z=[...this.U.values()].filter(k=>k.V.size);
Z.length&&this.C.flush(Z,this.G);NMN(Z);this.L=0;this.V.enabled&&this.V.stop()}Wd(Z,k,...N){(Z=Qo(this,Z))&&Z instanceof Zo&&(Z.Wd(k,N),yo(this))}};var XX=class extends Error{constructor(Z,k,N={}){super(k);this.code=Z;this.metadata=N;this.name="RpcError";Object.setPrototypeOf(this,new.target.prototype)}toString(){let Z=`RpcError(${aJr(this.code)||String(this.code)})`;this.message&&(Z+=": "+this.message);return Z}};so.prototype.W9=function(Z){const k=[];P5(this,Z,k);return k.join("")};
var H5={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\u000b"},TMy=/\uffff/.test("\uffff")?/[\\"\x00-\x1f\x7f-\uffff]/g:/[\\"\x00-\x1f\x7f-\xff]/g;var IBR;g.$b(Xj,d4);Xj.prototype.V=function(){return new XMLHttpRequest};
IBR=new Xj;g.$b(g.Lh,g.FQ);var Q4X=/^https?$/i,jm0=["POST","PUT"],Vo=[];g.t=g.Lh.prototype;g.t.Pe=function(){this.dispose();g.qF(Vo,this)};
g.t.send=function(Z,k,N,a){if(this.V)throw Error("[goog.net.XhrIo] Object is active with another request="+this.C+"; newUri="+Z);k=k?k.toUpperCase():"GET";this.C=Z;this.Y="";this.U=0;this.O=!1;this.D=!0;this.V=this.dA?this.dA.V():IBR.V();this.V.onreadystatechange=hD((0,g.Dj)(this.eE,this));try{this.getStatus(),this.zt=!0,this.V.open(k,String(Z),!0),this.zt=!1}catch(K){this.getStatus();hW(this,K);return}Z=N||"";N=new Map(this.headers);if(a)if(Object.getPrototypeOf(a)===Object.prototype)for(var T in a)N.set(T,
a[T]);else if(typeof a.keys==="function"&&typeof a.get==="function")for(const K of a.keys())N.set(K,a.get(K));else throw Error("Unknown input type for opt_headers: "+String(a));a=Array.from(N.keys()).find(K=>"content-type"==K.toLowerCase());
T=g.dX.FormData&&Z instanceof g.dX.FormData;!g.KK(jm0,k)||a||T||N.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const [K,y]of N)this.V.setRequestHeader(K,y);this.xW&&(this.V.responseType=this.xW);"withCredentials"in this.V&&this.V.withCredentials!==this.j&&(this.V.withCredentials=this.j);try{this.G&&(clearTimeout(this.G),this.G=null),this.Vz>0&&(this.getStatus(),this.G=setTimeout(this.oX.bind(this),this.Vz)),this.getStatus(),this.N=!0,this.V.send(Z),this.N=!1}catch(K){this.getStatus(),
hW(this,K)}};
g.t.oX=function(){typeof uO!="undefined"&&this.V&&(this.Y="Timed out after "+this.Vz+"ms, aborting",this.U=8,this.getStatus(),this.dispatchEvent("timeout"),this.abort(8))};
g.t.abort=function(Z){this.V&&this.D&&(this.getStatus(),this.D=!1,this.L=!0,this.V.abort(),this.L=!1,this.U=Z||7,this.dispatchEvent("complete"),this.dispatchEvent("abort"),tW(this))};
g.t.YW=function(){this.V&&(this.D&&(this.D=!1,this.L=!0,this.V.abort(),this.L=!1),tW(this,!0));g.Lh.n8.YW.call(this)};
g.t.eE=function(){this.jm()||(this.zt||this.N||this.L?B5(this):this.n0())};
g.t.n0=function(){B5(this)};
g.t.isActive=function(){return!!this.V};
g.t.isComplete=function(){return g.lO(this)==4};
g.t.getStatus=function(){try{return g.lO(this)>2?this.V.status:-1}catch(Z){return-1}};
g.t.getResponseHeader=function(Z){if(this.V&&this.isComplete())return Z=this.V.getResponseHeader(Z),Z===null?void 0:Z};
g.t.getLastError=function(){return typeof this.Y==="string"?this.Y:String(this.Y)};var Ucy=class{send(Z,k=()=>{},N=()=>{}){yIX(Z.url,a=>{a=a.target;
fh(a)?k(g.Do(a)):N(a.getStatus())},Z.requestType,Z.body,Z.requestHeaders,Z.timeoutMillis,Z.withCredentials)}yx(){return 1}};var AO=class{constructor(Z,k){this.logger=Z;this.event=k;this.startTime=g4()}done(){this.logger.D(this.event,g4()-this.startTime)}},PW=class extends dfb{constructor(){super(...arguments);this.nF={gH:()=>[]}}},Gs=class extends PW{Y(){}V(){}D(){}QV(){}C(){}j(){}U(){}L(Z,k,N,a){return a}Vz(){}G(){}N(){}},Etf=class extends PW{constructor(Z){super();
this.logger=Z;this.nF={ze3:()=>this.logger,
gH:()=>this.logger.nF.gH()};
this.addOnDisposeCallback(()=>void this.logger.dispose())}update(Z){this.logger.dispose();
this.logger=Z}V(Z){this.logger.V(Z)}D(Z,k){this.logger.D(Z,k)}QV(Z){this.logger.QV(Z)}C(Z){this.logger.C(Z)}j(Z,k){this.logger.j(Z,k)}U(){this.logger.U()}L(Z,k,N,a){return this.logger.L(Z,k,N,a)}Vz(Z){this.logger.Vz(Z)}G(Z){this.logger.G(Z)}N(Z){this.logger.N(Z)}Y(Z){this.logger.Y(Z)}},W7N=class extends g.jR{constructor(Z,k){super();this.callback=Z;this.U=k;this.V=-k;this.addOnDisposeCallback(()=>void clearTimeout(this.timer))}},YkG=class extends PW{constructor(Z,k){super();
this.metrics=Z;this.oU=k}Y(Z){this.metrics.QB.Wd(Z,this.oU)}V(Z){this.metrics.eventCount.V(Z,this.oU)}D(Z,k){this.metrics.tE.Wd(k,Z,this.oU)}QV(Z){this.metrics.errorCount.V(Z,this.oU)}L(Z,k,N,a){const T=g4(),K=y=>{if(!this.jm()){var Q=g4()-T;this.metrics.ZK.Wd(Q,Z,N,y,k,this.oU)}};
a.then(()=>void K(0),y=>void K(y instanceof XX?y.code:-1));
return a}Vz(Z){this.metrics.iP.V(Z,this.oU)}G(Z){this.metrics.FO.V(Z,this.oU)}N(Z){this.metrics.C6.V(Z,this.oU)}C(Z){this.metrics.payloadSize.Wd(Z,this.oU)}j(Z,k){this.metrics.ji.Wd(k,Z,this.oU)}},s4i=class extends YkG{constructor(Z,k=[]){const N={oU:Z.oU||"_",GJ:Z.GJ||[],xq:Z.xq|0,WX:Z.WX,dL:Z.dL||(()=>{}),
qE:Z.qE||((T,K)=>Cjb(T,K,N.dL,N.WX))},a=N.qE("53",N.GJ.concat(k));
super({QB:new XhG(a),errorCount:new tEf(a),eventCount:new VEb(a),tE:new F7R(a),ZK:new L7y(a),iP:new h3f(a),FO:new uFb(a),C6:new lBX(a),payloadSize:new fBN(a),ji:new BaR(a)},N.oU);this.nF={gH:()=>this.options.GJ.concat(this.dA).sort((T,K)=>T-K)};
this.options=N;this.service=a;this.xW=!Z.qE;this.O=new W7N(()=>void this.service.Y(),N.xq);
this.addOnDisposeCallback(()=>{this.O.dispose();this.xW&&this.service.dispose()});
g.hc(this.dA=k.slice())}U(){mij(this.O)}};var zs=class extends mD{constructor(Z){super(Z)}};var Uo=class extends mD{constructor(Z){super(Z)}};var Re=class extends mD{constructor(Z){super(Z,0,Re.messageId)}},F_N=zF(Re),Zty=function(Z){return Ax(k=>k instanceof Z&&!nl(k))}(Re);
Re.messageId="bfkj";var c$=class extends mD{constructor(Z){super(Z)}};var kPX=class extends mD{constructor(Z){super(Z)}},NYb=zF(kPX);g.aL=class{constructor(){this.promise=new Promise((Z,k)=>{this.resolve=Z;this.reject=k})}};var kM=class extends g.jR{constructor(Z){super();this.U=Math.floor(Math.random()*200);this.V=new kPX;let k;if("challenge"in Z&&Zty(Z.challenge)){k=N7(Z.challenge,4,void 0,WF);var N=N7(Z.challenge,5,void 0,WF);N7(Z.challenge,7,void 0,WF)&&(this.V=NYb(N7(Z.challenge,7,void 0,WF)))}else({program:k,globalName:N}=Z);this.addOnDisposeCallback(async()=>{const {Zz:C}=await this.D;C?.()});
this.logger=Sh(Z.eC||{},this.V);g.u(this,this.logger);const a=new g.aL;this.D=a.promise;this.logger.V("t");const T=this.logger.share(),K=new AO(T,"t"),y=(C,m,A,P)=>{if(!this.logger.jm()){var d="k";m?d="h":A&&(d="u");d!=="k"?P!==0&&(this.logger.V(d),this.logger.D(d,C)):this.U<=0?(this.logger.V(d),this.logger.D(d,C),this.U=Math.floor(Math.random()*200)):this.U--}},Q=(C,m,A,P)=>{Promise.resolve().then(()=>{K.done();
T.U();T.dispose();a.resolve({Up:C,Zz:m,c5:A,ki6:P})})},q=[(C,m)=>{this.logger.D(C,m)},
C=>{this.logger.QV(C)},
C=>{this.logger.C(C)},
(C,m)=>{this.logger.j(C,m)}];
if(!g.dX[N])throw this.logger.QV(25),Error("EGOU");if(!g.dX[N].a)throw this.logger.QV(26),Error("ELIU");try{const C=g.dX[N].a;N=[];const m=[];var r=H$(this.V);for(let d=0;d<r.length;d++)N.push(r[d]),m.push(1);const A=uzf(this.V);for(r=0;r<A.length;r++)N.push(A[r]),m.push(2);const [P]=C(k,Q,!0,Z.DO,y,[N,m],N7(this.V,5),!1,q);this.Y=P;this.jG=a.promise.then(()=>{})}catch(C){throw this.logger.QV(28),C;
}}snapshot(Z){if(this.jm())throw Error("Already disposed");this.logger.V("n");const k=this.logger.share();return this.D.then(({Up:N})=>new Promise(a=>{const T=new AO(k,"n");N(K=>{T.done();k.Y(K.length);k.U();k.dispose();a(K)},[Z.yr,
Z.ET,Z.FB,Z.Bu])}))}Yp(Z){if(this.jm())throw Error("Already disposed");
this.logger.V("n");const k=w4(this.logger,()=>this.Y([Z.yr,Z.ET,Z.FB,Z.Bu]),"n");
this.logger.Y(k.length);this.logger.U();return k}Q7(Z){this.D.then(({c5:k})=>{k?.(Z)})}sF(){return this.logger.share()}};var eh=class{constructor(){this.U={};this.V=null}};var ph=class extends mD{constructor(Z){super(Z)}};var nh=class extends mD{constructor(Z){super(Z)}};var Eo=class{constructor(Z,k,N){this.client=Z;this.requestKey=k;this.V=N}lO(Z){return jh(this,Z,new Gs,0)}};var Hv=class extends g.jR{constructor(Z){super();this.options=Z;this.G=new g.aL;this.jG=this.G.promise;this.L=new g.aL;this.C=1;this.U=new g.aL;this.Y=[];this.isPaused=!1;this.vg=Z.vg||(()=>{});
this.logger=new Etf(Sh(Z.eC||{}));fJN(this,Z.Tv,Z.oTz,Z.xeA,Z.jJD,{...ae0,...(Z.yA||{})});this.addOnDisposeCallback(()=>void BMy(this))}async snapshot(Z){if(this.jm())throw Error("Already disposed");
this.D||this.j||await this.L.promise;if(this.D)return await this.D.snapshot(Z);throw this.j;}pause(){this.jm()||this.isPaused||(this.isPaused=!0,this.V&&this.V.pause())}resume(){!this.jm()&&this.isPaused&&(this.isPaused=!1,this.V&&this.V.resume())}async checkForRefresh(){if(this.jm())throw Error("Already disposed");if(this.V){var Z=this.V;Z.isExpired()?(Ty(Z),Z.E1(0),Z=!0):Z=!1;Z&&await this.U.promise}else await this.U.promise}Q7(Z){this.D?.Q7?.(Z)}handleError(Z){this.jm()||(this.j=Z,this.L.resolve(),
this.options.AO?.(Z))}sF(){return this.logger.share()}},ae0={ke:432E5,y3:3E5,Ky:10,K4:1E4,cw:3E4,fv:3E4,Bk:6E4,Em:1E3,Gd:6E4,Hw:6E5,Bw:.25,Fy:2,maxAttempts:10},Z0=class{constructor(Z,k,N){this.endTimeMs=0;this.V=null;this.isPaused=!1;this.tick=()=>{if(!this.isPaused){var a=this.endTimeMs-Date.now();a<=this.D?(this.V=null,this.E1(0)):this.V=setTimeout(this.tick,Math.min(a,this.y3))}};
this.y3=k;this.D=N;this.promise=new Promise(a=>{this.E1=a});
v1G(this,Z)}pause(){this.isPaused||(this.isPaused=!0,Ty(this))}resume(){this.isPaused&&(this.isPaused=!1,this.tick())}U(){Ty(this);this.endTimeMs=0;this.isPaused=!1;this.E1(1)}isExpired(){return Date.now()>this.endTimeMs}};var i1y=Math.imul??((Z,k)=>Z*k|0),Q6=[196,
200,224,18],C7=class{constructor(Z,k=0,N=[]){this.maxItems=Z;this.V=k;this.U=N}W9(){return String(this.V)+","+this.U.join()}Me(Z,k){let N=void 0;if(this.U[this.V]!==Z){const a=this.U.indexOf(Z);a!==-1?(this.U.splice(a,1),a<this.V&&this.V--,this.U.splice(this.V,0,Z)):(N=this.U[this.V],this.U[this.V]=Z)}this.V=(this.V+1)%this.maxItems;Z=K7("iU5q-!O9@$",this.W9());N&&Z&&k(N);return Z}},TYy=class{constructor(Z,k){this.logger=k;try{var N=globalThis.sessionStorage&&!!globalThis.sessionStorage.getItem&&
!!globalThis.sessionStorage.setItem&&!!globalThis.sessionStorage.removeItem}catch(a){N=!1}N&&(this.index=$if(Z))}V(Z,k,N,a){const T=this.index?w4(this.logger,()=>g1j(this.index,qA(Z),k,N,a),"W"):"u";
this.logger.N(T)}U(Z,k){const [N,a]=this.index?w4(this.logger,()=>wKf(qA(Z),k),"R"):["u"];
this.logger.G(N);return a}};var GUj={toString:function(Z){let k=[],N=0;Z-=-2147483648;k[N++]="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(Z%52);for(Z=Math.floor(Z/52);Z>0;)k[N++]="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".charAt(Z%62),Z=Math.floor(Z/62);return k.join("")}};var cW=class extends g.jR{constructor(Z){super();this.logger=Z;this.Y=new g.aL}zL(Z,k){const N=this.D(Z);k?.(N);return w4(this.logger,()=>g.fl(N,2),this.U)}yb(Z,k,N){return w4(this.logger,()=>k?this.zL(Z,N):this.D(Z,N),this.V)}},V6=class extends cW{constructor(Z,k,N,a){super(Z);
this.L=k;this.j=N;this.V="m";this.U="x";this.G=0;Av(this,a)}D(Z,k){this.logger.V(this.V);++this.G>=this.j&&this.Y.resolve();const N=Z();Z=w4(this.logger,()=>this.L(N),"C");
if(Z===void 0)throw new P$(17,"YNJ:Undefined");if(!(Z instanceof Uint8Array))throw new P$(18,"ODM:Invalid");k?.(Z);return Z}},Uir=class extends cW{constructor(Z,k,N){super(Z);this.L=k;this.V="f";this.U="z";Av(this,N)}D(){return this.L}},zMb=class extends cW{constructor(Z,k,N){super(Z);this.L=k;this.V="w";this.U="z";Av(this,N)}D(){return w4(this.logger,()=>vF(this.L),"d")}zL(){return this.L}},n1y=class extends cW{constructor(Z,k){super(Z);
this.error=k;this.V="e";this.U="y"}D(){if(this.L)return this.L;this.L=cv(this,Z=>"_"+SQU(Z));
return cv(this,Z=>Z)}},uV=class extends cW{constructor(Z,k,N){super(Z);
this.L=k;this.clientState=N;this.V="S";this.U="q"}D(){var Z=Math.floor(Date.now()/1E3),k=[Math.random()*255,Math.random()*255],N=k.concat([this.L&255,this.clientState],[Z>>24&255,Z>>16&255,Z>>8&255,Z&255]);Z=new Uint8Array(2+N.length);Z[0]=34;Z[1]=N.length;Z.set(N,2);N=Z.subarray(2);k=k.length;for(let a=k;a<N.length;++a)N[a]^=N[a%k];this.logger.Vz(this.clientState);return Z}};var Kwr={Qf:3E4,rO:2E4},cMj=class extends g.jR{constructor(Z){super();this.Y=new g.aL;this.L=0;this.U=void 0;this.state=2;this.L8=Z.L8;this.Tv=Z.Tv;this.yA={...Kwr,...(Z.yA||{})};this.logger=Z.L8.sF();this.onError=Z.onError??(()=>{});
this.HH=Z.HH||!1;if(yKy(Z)){const a=this.L8;this.G=()=>Dif(a).catch(T=>{this.U=T=this.reportError(new P$(this.V?20:32,"TRG:Disposed",T));this.V?.dispose();this.V=void 0;this.Y.reject(T)});
O1y(a,()=>void L7(this));
a.C===2&&L7(this)}else this.G=Z.X9m,L7(this);const k=this.logger.share();k.V("o");const N=new AO(k,"o");this.Y.promise.then(()=>{N.done();k.U();k.dispose()},()=>void k.dispose());
this.addOnDisposeCallback(()=>{this.V?(this.V.dispose(),this.V=void 0):this.U?this.logger.U():(this.U=this.reportError(new P$(32,"TNP:Disposed")),this.logger.U(),this.Y.reject(this.U))});
g.u(this,this.logger)}J5(){return this.Y.promise}D(Z){return tv(this,{...Z},!1)}zL(Z){return tv(this,{...Z},!0)}Nv(Z){if(!(Z>150))try{this.cache=new TYy(Z,this.logger)}catch(k){this.reportError(new P$(22,"GBJ:init",k))}}reportError(Z){this.logger.QV(Z.code);this.onError(Z);return Z}},yKy=function(Z){return Ax(k=>{if(!fhy(k))return!1;for(const [N,a]of Object.entries(Z)){const T=N,K=a;if(!(T in k)){if(K.Jr6===!0)continue;return!1}if(!K(k[T]))return!1}return!0})}({L8:function(Z){return Ax(k=>k instanceof
Z)}(Hv)},"");var QSf=class{constructor(){var Z=g.zh();this.U=Z;g.ae(Z,"/client_streamz/youtube/aba/gac",LV("type"),LV("sequence"))}V(Z,k){g.Kh(this.U,"/client_streamz/youtube/aba/gac",Z,k)}};var qeR=(new Date).getTime();var qyf=class extends mD{constructor(Z){super(Z)}};var rKX=class{constructor(Z,k,N){this.uW=Z;this.P$=k;this.metadata=N}getMetadata(){return this.metadata}};var IJN=class{constructor(Z,k={}){this.Dz=Z;this.metadata=k;this.status=null}getMetadata(){return this.metadata}getStatus(){return this.status}};var CwN=class{constructor(Z,k,N,a,T){this.name=Z;this.methodType="unary";this.requestType=k;this.responseType=N;this.V=a;this.U=T}G(Z,k={}){return new rKX(Z,this,k)}getName(){return this.name}};var mEr=new CwN("/google.internal.waa.v1.Waa/Create",ph,qyf,Z=>Z.W9(),zF(qyf));var sSr=class extends mD{constructor(Z){super(Z)}};var tAy=new CwN("/google.internal.waa.v1.Waa/GenerateIT",nh,sSr,Z=>Z.W9(),zF(sSr));var PKb=new Set(["SAPISIDHASH","APISIDHASH"]);var YQf=class extends mD{constructor(Z){super(Z)}getValue(){const Z=XD(this,2);if(Array.isArray(Z)||Z instanceof mD)throw Error("Cannot access the Any.value field on Any protos encoded using the jspb format, call unpackJspb instead");return O3(this,2)}};var W_y=zF(class extends mD{constructor(Z){super(Z)}getMessage(){return N7(this,2)}});var d3f=class{constructor(Z,k){this.U=[];this.Y=[];this.L=[];this.D=[];this.V=[];this.G=Z.P2;this.j=k;this.xhr=Z.xhr;this.G&&E1f(this)}SR(Z,k){Z==="data"?this.U.push(k):Z==="metadata"?this.Y.push(k):Z==="status"?this.L.push(k):Z==="end"?this.D.push(k):Z==="error"&&this.V.push(k)}removeListener(Z,k){Z==="data"?gn(this.U,k):Z==="metadata"?gn(this.Y,k):Z==="status"?gn(this.L,k):Z==="end"?gn(this.D,k):Z==="error"&&gn(this.V,k);return this}cancel(){this.xhr.abort()}},Zly=class extends Error{constructor(){super();
this.name="AsyncStack";Object.setPrototypeOf(this,new.target.prototype)}};g.$b(g.wn,d4);g.wn.prototype.V=function(){const Z=new $M(this.Y,this.D);this.U&&Z.setCredentialsMode(this.U);return Z};
g.wn.prototype.setCredentialsMode=function(Z){this.U=Z};
g.$b($M,g.FQ);g.t=$M.prototype;g.t.open=function(Z,k){if(this.readyState!=0)throw this.abort(),Error("Error reopening a connection");this.O=Z;this.Vz=k;this.readyState=1;Gy(this)};
g.t.send=function(Z){if(this.readyState!=1)throw this.abort(),Error("need to call open() first. ");if(this.C.signal.aborted)throw this.abort(),Error("Request was aborted.");this.V=!0;const k={headers:this.N,method:this.O,credentials:this.L,cache:void 0,signal:this.C.signal};Z&&(k.body=Z);(this.zt||g.dX).fetch(new Request(this.Vz,k)).then(this.GI.bind(this),this.f_.bind(this))};
g.t.abort=function(){this.response=this.responseText="";this.N=new Headers;this.status=0;this.C.abort("Request was aborted.");this.D&&this.D.cancel("Request was aborted.").catch(()=>{});
this.readyState>=1&&this.V&&this.readyState!=4&&(this.V=!1,S7(this));this.readyState=0};
g.t.GI=function(Z){if(this.V&&(this.Y=Z,this.U||(this.status=this.Y.status,this.statusText=this.Y.statusText,this.U=Z.headers,this.readyState=2,Gy(this)),this.V&&(this.readyState=3,Gy(this),this.V)))if(this.responseType==="arraybuffer")Z.arrayBuffer().then(this.SA.bind(this),this.f_.bind(this));else if(typeof g.dX.ReadableStream!=="undefined"&&"body"in Z){this.D=Z.body.getReader();if(this.G){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response=
[]}else this.response=this.responseText="",this.j=new TextDecoder;xM(this)}else Z.text().then(this.Fb.bind(this),this.f_.bind(this))};
g.t.dX=function(Z){if(this.V){if(this.G&&Z.value)this.response.push(Z.value);else if(!this.G){var k=Z.value?Z.value:new Uint8Array(0);if(k=this.j.decode(k,{stream:!Z.done}))this.response=this.responseText+=k}Z.done?S7(this):Gy(this);this.readyState==3&&xM(this)}};
g.t.Fb=function(Z){this.V&&(this.response=this.responseText=Z,S7(this))};
g.t.SA=function(Z){this.V&&(this.response=Z,S7(this))};
g.t.f_=function(){this.V&&S7(this)};
g.t.setRequestHeader=function(Z,k){this.N.append(Z,k)};
g.t.getResponseHeader=function(Z){return this.U?this.U.get(Z.toLowerCase())||"":""};
g.t.getAllResponseHeaders=function(){if(!this.U)return"";const Z=[],k=this.U.entries();for(var N=k.next();!N.done;)N=N.value,Z.push(N[0]+": "+N[1]),N=k.next();return Z.join("\r\n")};
g.t.setCredentialsMode=function(Z){this.L=Z};
Object.defineProperty($M.prototype,"withCredentials",{get:function(){return this.L==="include"},
set:function(Z){this.setCredentialsMode(Z?"include":"same-origin")}});g.e7.prototype.toString=function(){const Z=[];var k=this.L;k&&Z.push(RL(k,AKX,!0),":");var N=this.V;if(N||k=="file")Z.push("//"),(k=this.C)&&Z.push(RL(k,AKX,!0),"@"),Z.push(g.Kg(N).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),N=this.D,N!=null&&Z.push(":",String(N));if(N=this.U)this.V&&N.charAt(0)!="/"&&Z.push("/"),Z.push(RL(N,N.charAt(0)=="/"?Pwf:cKU,!0));(N=this.Y.toString())&&Z.push("?",N);(N=this.G)&&Z.push("#",RL(N,HtN));return Z.join("")};
g.e7.prototype.resolve=function(Z){const k=this.clone();let N=!!Z.L;N?g.oL(k,Z.L):N=!!Z.C;N?k.C=Z.C:N=!!Z.V;N?g.Jv(k,Z.V):N=Z.D!=null;var a=Z.U;if(N)g.zy(k,Z.D);else if(N=!!Z.U){if(a.charAt(0)!="/")if(this.V&&!this.U)a="/"+a;else{var T=k.U.lastIndexOf("/");T!=-1&&(a=k.U.slice(0,T+1)+a)}T=a;if(T==".."||T==".")a="";else if(g.TI(T,"./")||g.TI(T,"/.")){a=Za(T,"/");T=T.split("/");const K=[];for(let y=0;y<T.length;){const Q=T[y++];Q=="."?a&&y==T.length&&K.push(""):Q==".."?((K.length>1||K.length==1&&K[0]!=
"")&&K.pop(),a&&y==T.length&&K.push("")):(K.push(Q),a=!0)}a=K.join("/")}else a=T}N?k.U=a:N=Z.Y.toString()!=="";N?Us(k,Z.Y.clone()):N=!!Z.G;N&&(k.G=Z.G);return k};
g.e7.prototype.clone=function(){return new g.e7(this)};
var AKX=/[#\/\?@]/g,cKU=/[#\?:]/g,Pwf=/[#\?]/g,yx0=/[#\?@]/g,HtN=/#/g;g.t=p7.prototype;g.t.add=function(Z,k){j7(this);this.D=null;Z=Es(this,Z);let N=this.V.get(Z);N||this.V.set(Z,N=[]);N.push(k);this.U=this.U+1;return this};
g.t.remove=function(Z){j7(this);Z=Es(this,Z);return this.V.has(Z)?(this.D=null,this.U=this.U-this.V.get(Z).length,this.V.delete(Z)):!1};
g.t.clear=function(){this.V=this.D=null;this.U=0};
g.t.isEmpty=function(){j7(this);return this.U==0};
g.t.forEach=function(Z,k){j7(this);this.V.forEach(function(N,a){N.forEach(function(T){Z.call(k,T,a,this)},this)},this)};
g.t.pP=function(){j7(this);const Z=Array.from(this.V.values()),k=Array.from(this.V.keys()),N=[];for(let a=0;a<k.length;a++){const T=Z[a];for(let K=0;K<T.length;K++)N.push(k[a])}return N};
g.t.o5=function(Z){j7(this);let k=[];if(typeof Z==="string")Wv(this,Z)&&(k=k.concat(this.V.get(Es(this,Z))));else{Z=Array.from(this.V.values());for(let N=0;N<Z.length;N++)k=k.concat(Z[N])}return k};
g.t.set=function(Z,k){j7(this);this.D=null;Z=Es(this,Z);Wv(this,Z)&&(this.U=this.U-this.V.get(Z).length);this.V.set(Z,[k]);this.U=this.U+1;return this};
g.t.get=function(Z,k){if(!Z)return k;Z=this.o5(Z);return Z.length>0?String(Z[0]):k};
g.t.toString=function(){if(this.D)return this.D;if(!this.V)return"";const Z=[],k=Array.from(this.V.keys());for(let a=0;a<k.length;a++){var N=k[a];const T=g.Kg(N);N=this.o5(N);for(let K=0;K<N.length;K++){let y=T;N[K]!==""&&(y+="="+g.Kg(N[K]));Z.push(y)}}return this.D=Z.join("&")};
g.t.clone=function(){const Z=new p7;Z.D=this.D;this.V&&(Z.V=new Map(this.V),Z.U=this.U);return Z};
g.t.extend=function(Z){for(let k=0;k<arguments.length;k++)TPN(arguments[k],function(N,a){this.add(a,N)},this)};g.$b(g.Nv,g.jR);var dEb=[];g.t=g.Nv.prototype;g.t.listen=function(Z,k,N,a){Array.isArray(k)||(k&&(dEb[0]=k.toString()),k=dEb);for(let T=0;T<k.length;T++){const K=g.C6(Z,k[T],N||this.handleEvent,a||!1,this.U||this);if(!K)break;this.V[K.key]=K}return this};
g.t.TG=function(Z,k,N,a){return a3(this,Z,k,N,a)};
g.t.Ce=function(Z,k,N,a,T){if(Array.isArray(k))for(let K=0;K<k.length;K++)this.Ce(Z,k[K],N,a,T);else N=N||this.handleEvent,a=g.lf(a)?!!a.capture:!!a,T=T||this.U||this,N=mj(N),a=!!a,k=TG(Z)?Z.fY(k,N,a,T):Z?(Z=AD(Z))?Z.fY(k,N,a,T):null:null,k&&(XQ(k),delete this.V[k.key])};
g.t.removeAll=function(){g.BB(this.V,function(Z,k){this.V.hasOwnProperty(k)&&XQ(Z)},this);
this.V={}};
g.t.YW=function(){g.Nv.n8.YW.call(this);this.removeAll()};
g.t.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented");};var qmf=class{constructor(){this.D=!0;this.U=0;this.V=""}isInputValid(){return this.D}};Kj.prototype.isInputValid=function(){return this.V!=3};
Kj.prototype.qR=function(){return this.G};
Kj.prototype.o7=function(){return!0};
Kj.prototype.parse=function(Z){function k(q){q&128&&y$(K,y,Q,"invalid tag");(q&7)!=2&&y$(K,y,Q,"invalid wire type");K.D=q>>>3;K.D!=1&&K.D!=2&&K.D!=15&&y$(K,y,Q,"unexpected tag");K.V=1;K.U=0;K.Y=0}
function N(q){K.Y++;K.Y==5&&q&240&&y$(K,y,Q,"message length too long");K.U|=(q&127)<<(K.Y-1)*7;q&128||(K.V=2,K.C=0,typeof Uint8Array!=="undefined"?K.L=new Uint8Array(K.U):K.L=Array(K.U),K.U==0&&T())}
function a(q){K.L[K.C++]=q;K.C==K.U&&T()}
function T(){if(K.D<15){const q={};q[K.D]=K.L;K.j.push(q)}K.V=0}
const K=this,y=Z instanceof Array?Z:new Uint8Array(Z);let Q=0;for(;Q<y.length;){switch(K.V){case 3:y$(K,y,Q,"stream already broken");break;case 0:k(y[Q]);break;case 1:N(y[Q]);break;case 2:a(y[Q]);break;default:throw Error("unexpected parser state: "+K.V);}K.N++;Q++}Z=K.j;K.j=[];return Z.length>0?Z:null};Q$.prototype.isInputValid=function(){return this.V===null};
Q$.prototype.qR=function(){return this.V};
Q$.prototype.o7=function(){return!1};
Q$.prototype.parse=function(Z){this.V!==null&&qv(this,Z,"stream already broken");let k=null;try{{var N=this.D;N.D||To(N,Z,"stream already broken");N.V+=Z;const K=Math.floor(N.V.length/4);if(K==0)var a=null;else{try{var T=Om(N.V.slice(0,K*4))}catch(y){To(N,N.V,y.message)}N.U+=K*4;N.V=N.V.slice(K*4);a=T}}k=a===null?null:this.Y.parse(a)}catch(K){qv(this,Z,K.message)}this.U+=Z.length;return k};g.t=Cj.prototype;g.t.isInputValid=function(){return this.L!=3};
g.t.qR=function(){return this.N};
g.t.done=function(){return this.L===2};
g.t.o7=function(){return!1};
g.t.parse=function(Z){function k(){for(;m<Z.length;)if(r3(Z[m]))m++,K.D++;else break;return m<q}
function N(){for(var P;;){P=Z[m++];if(!P)break;K.D++;switch(K.V){case 0:P==="{"?K.V=2:P==="["?K.V=4:r3(P)||mK(K,Z,m);continue;case 7:case 2:if(r3(P))continue;if(K.V===7)y.push(8);else if(P==="}"){T("{}");K.V=a();continue}else y.push(3);P==='"'?K.V=6:mK(K,Z,m);continue;case 8:case 3:if(r3(P))continue;P===":"?(K.V===3&&(y.push(3),K.U++),K.V=1):P==="}"?(K.U--,T(),K.V=a()):P===","?(K.V===3&&y.push(3),K.V=7):mK(K,Z,m);continue;case 4:case 1:if(r3(P))continue;if(K.V===4)if(K.U++,K.V=1,P==="]"){K.U--;if(K.U===
0){K.V=5;return}T("[]");K.V=a();continue}else y.push(5);P==='"'?K.V=6:P==="{"?K.V=2:P==="["?K.V=4:P==="t"?K.V=9:P==="f"?K.V=12:P==="n"?K.V=16:P!=="-"&&("0123456789".indexOf(P)!==-1?K.V=20:mK(K,Z,m));continue;case 5:if(P===",")y.push(5),K.V=1,K.U===1&&(C=m);else if(P==="]"){K.U--;if(K.U===0)return;T();K.V=a()}else if(r3(P))continue;else mK(K,Z,m);continue;case 6:const d=m;a:for(;;){for(;K.C>0;)if(P=Z[m++],K.C===4?K.C=0:K.C++,!P)break a;if(P==='"'&&!K.j){K.V=a();break}if(P==="\\"&&!K.j&&(K.j=!0,P=Z[m++],
!P))break;if(K.j)if(K.j=!1,P==="u"&&(K.C=1),P=Z[m++])continue;else break;Q.lastIndex=m;P=Q.exec(Z);if(!P){m=Z.length+1;break}m=P.index+1;P=Z[P.index];if(!P)break}K.D+=m-d;continue;case 9:if(!P)continue;P==="r"?K.V=10:mK(K,Z,m);continue;case 10:if(!P)continue;P==="u"?K.V=11:mK(K,Z,m);continue;case 11:if(!P)continue;P==="e"?K.V=a():mK(K,Z,m);continue;case 12:if(!P)continue;P==="a"?K.V=13:mK(K,Z,m);continue;case 13:if(!P)continue;P==="l"?K.V=14:mK(K,Z,m);continue;case 14:if(!P)continue;P==="s"?K.V=15:
mK(K,Z,m);continue;case 15:if(!P)continue;P==="e"?K.V=a():mK(K,Z,m);continue;case 16:if(!P)continue;P==="u"?K.V=17:mK(K,Z,m);continue;case 17:if(!P)continue;P==="l"?K.V=18:mK(K,Z,m);continue;case 18:if(!P)continue;P==="l"?K.V=a():mK(K,Z,m);continue;case 19:P==="."?K.V=20:mK(K,Z,m);continue;case 20:if("0123456789.eE+-".indexOf(P)!==-1)continue;else m--,K.D--,K.V=a();continue;default:mK(K,Z,m)}}}
function a(){const P=y.pop();return P!=null?P:1}
function T(P){K.U>1||(P||(P=C===-1?K.Y+Z.substring(r,m):Z.substring(C,m)),K.Vz?K.G.push(P):K.G.push(JSON.parse(P)),C=m)}
const K=this,y=K.O,Q=K.zt,q=Z.length;let r=0,C=-1,m=0;for(;m<q;)switch(K.L){case 3:return mK(K,Z,m),null;case 2:return k()&&mK(K,Z,m),null;case 0:if(k()){var A=Z[m++];K.D++;if(A==="["){K.L=1;r=m;K.V=4;continue}else mK(K,Z,m)}return null;case 1:return N(),K.U===0&&K.V==5?(K.L=2,K.Y=Z.substring(m)):K.Y=C===-1?K.Y+Z.substring(r):Z.substring(C),K.G.length>0?(A=K.G,K.G=[],A):null}return null};sc.prototype.isInputValid=function(){return this.L===null};
sc.prototype.qR=function(){return this.L};
sc.prototype.o7=function(){return!1};
sc.prototype.parse=function(Z){function k(q){K.U=6;K.L="The stream is broken @"+K.V+"/"+y+". Error: "+q+". With input:\n";throw Error(K.L);}
function N(){K.D=new Cj({eYX:!0,n4:!0})}
function a(q){if(q)for(let r=0;r<q.length;r++){const C={};C[1]=q[r];K.Y.push(C)}}
function T(q){if(q){(K.G||q.length>1)&&k("extra status: "+q);K.G=!0;const r={};r[2]=q[0];K.Y.push(r)}}
const K=this;let y=0;for(;y<Z.length;){var Q;if(Q=K.U!==2){a:{for(;y<Z.length;){if(!r3(Z[y])){Q=!0;break a}y++;K.V++}Q=!1}Q=!Q}if(Q)return null;switch(K.U){case 6:k("stream already broken");break;case 0:Z[y]==="["?(K.U=1,y++,K.V++):k("unexpected input token");break;case 1:Z[y]==="["?(K.U=2,N()):Z[y]===","||Z.slice(y,y+5)=="null,"?K.U=3:Z[y]==="]"?(K.U=5,y++,K.V++):k("unexpected input token");break;case 2:Q=K.D.parse(Z.substring(y));a(Q);K.D.done()?(K.U=3,Q=K.D.Y,K.V+=Z.length-y-Q.length,Z=Q,y=0):
(K.V+=Z.length-y,y=Z.length);break;case 3:Z[y]===","||Z.slice(y,y+5)=="null,"?(K.U=4,N(),K.D.parse("["),y+=Z[y]===","?1:5,K.V++):Z[y]==="]"&&(K.U=5,y++,K.V++);break;case 4:Q=K.D.parse(Z.substring(y));T(Q);K.D.done()?(K.U=5,Q=K.D.Y,K.V+=Z.length-y-Q.length,Z=Q,y=0):(K.V+=Z.length-y,y=Z.length);break;case 5:k("extra input after stream end")}}return K.Y.length>0?(Z=K.Y,K.Y=[],Z):null};var cxU=class{constructor(Z){this.V=Z;this.U=null;this.L=this.D=0;this.N=!1;this.Y=this.j=this.G=null;this.C=new g.Nv(this);this.C.listen(this.V,"readystatechange",this.Vz)}kU(){return this.V}getStatus(){return this.L}Vz(Z){Z=Z.target;try{if(Z==this.V)a:{const K=g.lO(this.V);var k=this.V.U,N=this.V.getStatus();const y=g.Do(this.V);Z=[];if(g.Oo(this.V)instanceof Array){const Q=g.Oo(this.V);Q.length>0&&Q[0]instanceof Uint8Array&&(this.N=!0,Z=Q)}if(!(K<3||K==3&&!y&&Z.length==0))if(N=N==200||N==206,K==
4&&(k==8?Am(this,7):k==7?Am(this,8):N||Am(this,3)),this.U||(this.U=rxb(this.V),this.U==null&&Am(this,5)),this.L>2)Pp(this);else{if(Z.length>this.D){const Q=Z.length;k=[];try{if(this.U.o7())for(var a=0;a<Q;a++){var T=this.U.parse(Array.from(Z[a]));T&&(k=k.concat(T))}else{T="";if(!this.G){if(typeof TextDecoder==="undefined")throw Error("TextDecoder is not supported by this browser.");this.G=new TextDecoder}for(a=0;a<Q;a++)T+=this.G.decode(Z[a],{stream:K==4&&a==Q-1});k=this.U.parse(T)}Z.splice(0,Q);
k&&this.Y(k)}catch(q){Am(this,5);Pp(this);break a}}else if(y.length>this.D){a=y.slice(this.D);this.D=y.length;try{const Q=this.U.parse(a);Q!=null&&this.Y&&this.Y(Q)}catch(Q){Am(this,5);Pp(this);break a}}K==4?(y.length!=0||this.N?Am(this,2):Am(this,4),Pp(this)):Am(this,1)}}}catch(K){Am(this,6),Pp(this)}}};var Hly=class{constructor(Z){Z=this.D=Z;var k=(0,g.Dj)(this.Y,this);Z.Y=k;Z=this.D;k=(0,g.Dj)(this.L,this);Z.j=k;this.U={};this.V={}}SR(Z,k){let N=this.U[Z];N||(N=[],this.U[Z]=N);N.push(k)}addListener(Z,k){this.SR(Z,k);return this}removeListener(Z,k){const N=this.U[Z];N&&g.qF(N,k);(Z=this.V[Z])&&g.qF(Z,k);return this}once(Z,k){let N=this.V[Z];N||(N=[],this.V[Z]=N);N.push(k);return this}Y(Z){var k=this.U.data;k&&cp(Z,k);(k=this.V.data)&&cp(Z,k);this.V.data=[]}L(){switch(this.D.getStatus()){case 1:Hp(this,
"readable");break;case 5:case 6:case 4:case 7:case 3:Hp(this,"error");break;case 8:Hp(this,"close");break;case 2:Hp(this,"end")}}};var XFi=class{constructor(){var Z={format:"jspb"};this.PW=Z.PW||g.Vf("suppressCorsPreflight",Z)||!1;this.withCredentials=Z.withCredentials||g.Vf("withCredentials",Z)||!1;this.BW=Z.BW||[];this.O7=Z.O7||[];this.Yv=Z.Yv;this.V=Z.Wmp||!1}serverStreaming(Z,k,N,a){const T=Z.substring(0,Z.length-a.name.length);return CKN(K=>{const y=K.P$;var Q=K.getMetadata();const q=d3(this,!1);Q=X1(this,Q,q,T+y.getName());const r=Lj(q,y.U,!0);K=y.V(K.uW);q.send(Q,"POST",K);return r},this.BW).call(this,a.G(k,N))}};V$.prototype.create=function(Z,k,N){return Ie(this.V,this.U+"/$rpc/google.internal.waa.v1.Waa/Create",Z,k||{},mEr,N)};var HW=class{constructor(Z,k){this.mU=3;this.EN=Z;this.defaultValue=k;this.St="bool"}},dy=class{constructor(Z,k){this.mU=3;this.EN=Z;this.defaultValue=k;this.St="int"}},XE=class{constructor(Z,k){this.mU=3;this.EN=Z;this.defaultValue=k;this.St="double"}};var y4b,XHr,LJ,$Mf,VzG,hty,FwN,ffN,tzi,hvX,uOb,leG,fef,BYR,OtR,vmy,itf,gmb,Gnr,Ju,gJj,wwG,wHy,$Ei,xEr,SS0,GPU,L1f,$h0,SyX,evi,omU,B8R,JKf,zvb,UEr,btG,pHX,Rvy,Mzy,nm0,y_X,Ier,jSy,MgU,jn,LNy,n5f,Emf,Wwj,YyR,Hq0,qj0,Uly,k6r,xs0;y4b=new HW(45759580,!1);XHr=new HW(45766273,!1);g.Lwy=new HW(45757878,!1);LJ=new HW(45749396,!1);$Mf=new HW(45751227,!1);VzG=new HW(45751228,!1);hty=new HW(45745123,!1);FwN=new HW(45742118,!1);ffN=new HW(45742119,!1);tzi=new HW(45754339,!1);hvX=new HW(45757087,!1);
uOb=new HW(45756446,!1);leG=new HW(45739196,!1);fef=new HW(45739198,!1);BYR=new HW(45739197,!1);g.DEf=new dy(45750947,Nm("0"));OtR=new XE(45746966,0);vmy=new XE(45746967,0);itf=new XE(45737488,0);gmb=new XE(45737489,0);Gnr=new HW(45732791,!0);Ju=new HW(45728572,!1);gJj=new HW(45737482,!1);wwG=new XE(45741773,0);wHy=new HW(45763496,!1);$Ei=new HW(45769999,!1);xEr=new HW(45731083,!1);SS0=new HW(45728553,!1);GPU=new HW(45734191,!1);L1f=new HW(45745610,!1);$h0=new HW(45756619,!1);
SyX=new HW(45758290,!1);evi=new HW(45762920,!1);omU=new HW(45767289,!1);B8R=new HW(45735523,!1);JKf=new XE(45735428,4E3);zvb=new HW(45748009,!1);UEr=new HW(45752604,!1);btG=new HW(45755066,!1);pHX=new HW(45735462,!1);Rvy=new HW(45751943,!1);Mzy=new HW(45751944,!1);nm0=new HW(45751945,!1);y_X=new HW(45764592,!1);Ier=new XE(45764593,0);jSy=new HW(45756939,!1);MgU=new HW(45766511,!1);jn=new HW(45728181,!1);LNy=new HW(45746180,!1);n5f=new HW(45756543,!1);Emf=new HW(45756620,!1);Wwj=new dy(45761760,Nm("200"));
YyR=new HW(45740357,!1);Hq0=new dy(45762838,Nm("0"));g.ZTN=new HW(45755760,!1);qj0=new HW(45760017,!1);Uly=new HW(45732775,!1);k6r=new HW(45765818,!1);g.NDG=new HW(45734776,!1);xs0=new HW(45755924,!1);var M0j=new XE(45756872,0),Rdf=new XE(45725542,0),pwy=new XE(45725543,0),IOr=new XE(45757426,0),zdN=new XE(45725539,0),j1y=new XE(45764252,0),bYX=new XE(45725541,0),EJU=new XE(45757427,0),Ugb=new XE(45725540,0),J1y=new XE(45725538,0),nJy=new XE(45764523,0),WT0=new XE(45764217,0),Y8b=new XE(45764524,0),NNr=new XE(45765602,0),ZzR=new XE(45757957,0),k1y=new XE(45758467,0);var agb=class{constructor(Z){this.V=Z}};var TDj=class{constructor(Z){this.V=Z}};var tm="://secure-...imrworldwide.com/ ://cdn.imrworldwide.com/ ://aksecure.imrworldwide.com/ ://[^.]*.moatads.com ://youtube[0-9]+.moatpixel.com ://pm.adsafeprotected.com/youtube ://pm.test-adsafeprotected.com/youtube ://e[0-9]+.yt.srs.doubleverify.com www.google.com/pagead/xsul www.youtube.com/pagead/slav".split(" "),Vvi=/\bocr\b/;var tvy=/(?:\[|%5B)([a-zA-Z0-9_]+)(?:\]|%5D)/g;var KAR=class extends mD{constructor(Z){super(Z,500)}};var yr0=class extends mD{constructor(Z){super(Z,500)}};var hNi=class extends mD{constructor(Z){super(Z)}getName(){return N7(this,1)}getOptions(){return pk(this,yr0,3)}clearOptions(){return VX(this,3)}};var ltf=function(Z){return k=>{k=JSON.parse(k);if(!Array.isArray(k))throw Error("Expected jspb data to be an array, got "+ty(k)+": "+k);k[M3]|=34;return new Z(k)}}(class extends mD{constructor(Z){super(Z)}getName(){return N7(this,1)}getOptions(){return pk(this,KAR,3)}clearOptions(){return VX(this,3)}CN(){return az(this,6)}In(Z){rs(this,6,Z)}});var u6=Symbol();var fj=Symbol();var Bp=!1,v9b=1,Oc=Symbol("SIGNAL");var D3j={version:0,GFq:0,mA:!1,producers:void 0,fQS:void 0,XT:void 0,d4S:void 0,VOA:!1,x4z:!1,D4q:!1,kind:"unknown",gTq:()=>!1,
kQ6:()=>{},
Mp:()=>{},
YbW:()=>{},
D_:function(Z,k){return Object.is(Z,k)},
value:void 0,kind:"signal"};var w3=class extends g.FQ{constructor(Z){super();this.L=this.U=0;this.oV=Z??{IU:(k,N)=>setTimeout(k,N),
Ux:k=>{clearTimeout(k)}};
this.V=window.navigator?.onLine??!0;this.D=async()=>{await $3(this)};
window.addEventListener("offline",this.D);window.addEventListener("online",this.D);this.L||this.Qm()}dispose(){window.removeEventListener("offline",this.D);window.removeEventListener("online",this.D);this.oV.Ux(this.L);delete w3.instance}LN(){return this.V}Qm(){this.L=this.oV.IU(async()=>{this.V?window.navigator?.onLine||await $3(this):await $3(this);this.Qm()},3E4)}};var Fny=os(class extends mD{constructor(Z){super(Z)}U(){return az(this,5)}},[0,pp,FUf,e2,pp,-2,e2,S2]);var rJf=class{constructor(){this.data=[];this.V=-1}set(Z,k=!0){0<=Z&&Z<52&&Number.isInteger(Z)&&this.data[Z]!==k&&(this.data[Z]=k,this.V=-1)}get(Z){return!!this.data[Z]}};var Go;g.$b(g.o3,g.jR);g.t=g.o3.prototype;g.t.start=function(){this.stop();this.Y=!1;const Z=Jm(this),k=zo(this);Z&&!k&&this.U.mozRequestAnimationFrame?(this.V=g.C6(this.U,"MozBeforePaint",this.D),this.U.mozRequestAnimationFrame(null),this.Y=!0):this.V=Z&&k?Z.call(this.U,this.D):this.U.setTimeout(nbf(this.D),20)};
g.t.stop=function(){if(this.isActive()){const Z=Jm(this),k=zo(this);Z&&!k&&this.U.mozRequestAnimationFrame?XQ(this.V):Z&&k?k.call(this.U,this.V):this.U.clearTimeout(this.V)}this.V=null};
g.t.isActive=function(){return this.V!=null};
g.t.xs=function(){this.Y&&this.V&&XQ(this.V);this.V=null;this.G.call(this.L,g.vy())};
g.t.YW=function(){this.stop();g.o3.n8.YW.call(this)};g.$b(g.Uc,g.jR);g.t=g.Uc.prototype;g.t.Ku=0;g.t.YW=function(){g.Uc.n8.YW.call(this);this.stop();delete this.V;delete this.U};
g.t.start=function(Z){this.stop();this.Ku=g.W2(this.D,Z!==void 0?Z:this.TP)};
g.t.XN=function(Z){this.isActive()||this.start(Z)};
g.t.stop=function(){this.isActive()&&g.dX.clearTimeout(this.Ku);this.Ku=0};
g.t.fH=function(){this.isActive()&&g.b6(this)};
g.t.isActive=function(){return this.Ku!=0};
g.t.Il=function(){this.Ku=0;this.V&&this.V.call(this.U)};g.L4=class extends g.jR{constructor(Z,k,N){super();this.L=N!=null?Z.bind(N):Z;this.TP=k;this.D=null;this.V=!1;this.U=0;this.WI=null}Y(Z){this.D=arguments;this.WI||this.U?this.V=!0:pj(this)}stop(){this.WI&&(g.dX.clearTimeout(this.WI),this.WI=null,this.V=!1,this.D=null)}pause(){this.U++}resume(){this.U--;this.U||!this.V||this.WI||(this.V=!1,pj(this))}YW(){super.YW();this.stop()}};g.QwR=class{constructor(Z,k){this.V=Z[g.dX.Symbol.iterator]();this.U=k}[Symbol.iterator](){return this}next(){const Z=this.V.next();return{value:Z.done?void 0:this.U.call(void 0,Z.value),done:Z.done}}};g.$b(g.kN,g.FQ);g.t=g.kN.prototype;g.t.isPlaying=function(){return this.V==1};
g.t.isPaused=function(){return this.V==-1};
g.t.D3=function(){this.Xq("begin")};
g.t.zU=function(){this.Xq("end")};
g.t.onFinish=function(){this.Xq("finish")};
g.t.onStop=function(){this.Xq("stop")};
g.t.Xq=function(Z){this.dispatchEvent(Z)};var q4X=FM(function(){const Z=g.TU("DIV");var k=g.YK?"-webkit":$1?"-moz":null;let N="transition:opacity 1s linear;";k&&(N+=k+"-transition:opacity 1s linear;");k=RUy({style:N});if(Z.nodeType===1&&/^(script|style)$/i.test(Z.tagName))throw Error("");Z.innerHTML=bE(k);return g.x1(Z.firstChild,"transition")!=""});g.$b(NK,g.kN);g.t=NK.prototype;g.t.play=function(){if(this.isPlaying())return!1;this.D3();this.Xq("play");this.startTime=g.vy();this.V=1;if(q4X())return g.ij(this.U,this.G),this.D=g.W2(this.Ka,void 0,this),!0;this.Q4(!1);return!1};
g.t.Ka=function(){g.I4(this.U);wFy(this.U,this.j);g.ij(this.U,this.Y);this.D=g.W2((0,g.Dj)(this.Q4,this,!1),this.L*1E3)};
g.t.stop=function(){this.isPlaying()&&this.Q4(!0)};
g.t.Q4=function(Z){g.ij(this.U,"transition","");g.dX.clearTimeout(this.D);g.ij(this.U,this.Y);this.endTime=g.vy();this.V=0;if(Z)this.onStop();else this.onFinish();this.zU()};
g.t.YW=function(){this.stop();NK.n8.YW.call(this)};
g.t.pause=function(){};var $3f={rgb:!0,rgba:!0,alpha:!0,rect:!0,image:!0,"linear-gradient":!0,"radial-gradient":!0,"repeating-linear-gradient":!0,"repeating-radial-gradient":!0,"cubic-bezier":!0,matrix:!0,perspective:!0,rotate:!0,rotate3d:!0,rotatex:!0,rotatey:!0,steps:!0,rotatez:!0,scale:!0,scale3d:!0,scalex:!0,scaley:!0,scalez:!0,skew:!0,skewx:!0,skewy:!0,translate:!0,translate3d:!0,translatex:!0,translatey:!0,translatez:!0,"var":!0};TS("Element","attributes")||TS("Node","attributes");TS("Element","innerHTML")||TS("HTMLElement","innerHTML");TS("Node","nodeName");TS("Node","nodeType");TS("Node","parentNode");TS("Node","childNodes");TS("HTMLElement","style")||TS("Element","style");TS("HTMLStyleElement","sheet");var eNi=KP("getPropertyValue"),o9f=KP("setProperty");TS("Element","namespaceURI")||TS("Node","namespaceURI");var SmU={"-webkit-border-horizontal-spacing":!0,"-webkit-border-vertical-spacing":!0};var bly,yGy,U3i,zNf,pFy;bly=RegExp("[A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0900-\u1fff\u200e\u2c00-\ud801\ud804-\ud839\ud83c-\udbff\uf900-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]");yGy=RegExp("^[\u0591-\u06ef\u06fa-\u08ff\u200f\ud802-\ud803\ud83a-\ud83b\ufb1d-\ufdff\ufe70-\ufefc]");g.rry=RegExp("^[^\u0591-\u06ef\u06fa-\u08ff\u200f\ud802-\ud803\ud83a-\ud83b\ufb1d-\ufdff\ufe70-\ufefc]*[A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0900-\u1fff\u200e\u2c00-\ud801\ud804-\ud839\ud83c-\udbff\uf900-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]");
g.qK=RegExp("^[^A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0900-\u1fff\u200e\u2c00-\ud801\ud804-\ud839\ud83c-\udbff\uf900-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]*[\u0591-\u06ef\u06fa-\u08ff\u200f\ud802-\ud803\ud83a-\ud83b\ufb1d-\ufdff\ufe70-\ufefc]");U3i=/^http:\/\/.*/;g.Cgi=RegExp("^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)","i");zNf=/\s+/;pFy=/[\d\u06f0-\u06f9]/;Intl.NumberFormat.supportedLocalesOf(["en".replace("_","-")]);var CP=class{constructor(Z){this.U=Z}hD(){return new ms(this.U())}[Symbol.iterator](){return new sZ(this.U())}V(){return new sZ(this.U())}},ms=class extends g.Pl{constructor(Z){super();this.U=Z}next(){return this.U.next()}[Symbol.iterator](){return new sZ(this.U)}V(){return new sZ(this.U)}},sZ=class extends CP{constructor(Z){super(()=>Z);
this.D=Z}next(){return this.D.next()}};PG.prototype.clone=function(){return new PG(this.V,this.j,this.D,this.L,this.Y,this.G,this.U,this.C)};
PG.prototype.equals=function(Z){return this.V==Z.V&&this.j==Z.j&&this.D==Z.D&&this.L==Z.L&&this.Y==Z.Y&&this.G==Z.G&&this.U==Z.U&&this.C==Z.C};XC.prototype.clone=function(){return new XC(this.start,this.end)};(function(){if(Uhf){var Z=/Windows NT ([0-9.]+)/;return(Z=Z.exec(g.qG()))?Z[1]:"0"}return Ka?(Z=/1[0|1][_.][0-9_.]+/,(Z=Z.exec(g.qG()))?Z[0].replace(/_/g,"."):"10"):g.h5?(Z=/Android\s+([^\);]+)(\)|;)/,(Z=Z.exec(g.qG()))?Z[1]:""):Lhi||V2f||FhR?(Z=/(?:iPhone|CPU)\s+OS\s+(\S+)/,(Z=Z.exec(g.qG()))?Z[1].replace(/_/g,"."):""):""})();var RNf=function(){if(g.SL)return LP(/Firefox\/([0-9.]+)/);if(g.yd||g.Z3||g.vQ)return Fz;if(g.Cf){if(Hs()||dJ()){var Z=LP(/CriOS\/([0-9.]+)/);if(Z)return Z}return LP(/Chrome\/([0-9.]+)/)}if(g.v9&&!Hs())return LP(/Version\/([0-9.]+)/);if(VL||Fn){if(Z=/Version\/(\S+).*Mobile\/(\S+)/.exec(g.qG()))return Z[1]+"."+Z[2]}else if(g.Og)return(Z=LP(/Android\s+([0-9.]+)/))?Z:LP(/Version\/([0-9.]+)/);return""}();g.$b(g.FC,g.jR);g.t=g.FC.prototype;g.t.subscribe=function(Z,k,N){let a=this.U[Z];a||(a=this.U[Z]=[]);const T=this.G;this.V[T]=Z;this.V[T+1]=k;this.V[T+2]=N;this.G=T+3;a.push(T);return T};
g.t.unsubscribe=function(Z,k,N){if(Z=this.U[Z]){const a=this.V;if(Z=Z.find(function(T){return a[T+1]==k&&a[T+2]==N}))return this.eO(Z)}return!1};
g.t.eO=function(Z){const k=this.V[Z];if(k){const N=this.U[k];this.Y!=0?(this.D.push(Z),this.V[Z+1]=()=>{}):(N&&g.qF(N,Z),delete this.V[Z],delete this.V[Z+1],delete this.V[Z+2])}return!!k};
g.t.publish=function(Z,k){var N=this.U[Z];if(N){const T=Array(arguments.length-1);var a=arguments.length;let K;for(K=1;K<a;K++)T[K-1]=arguments[K];if(this.j)for(K=0;K<N.length;K++)a=N[K],MvG(this.V[a+1],this.V[a+2],T);else{this.Y++;try{for(K=0,a=N.length;K<a&&!this.jm();K++){const y=N[K];this.V[y+1].apply(this.V[y+2],T)}}finally{if(this.Y--,this.D.length>0&&this.Y==0)for(;N=this.D.pop();)this.eO(N)}}return K!=0}return!1};
g.t.clear=function(Z){if(Z){const k=this.U[Z];k&&(k.forEach(this.eO,this),delete this.U[Z])}else this.V.length=0,this.U={}};
g.t.YW=function(){g.FC.n8.YW.call(this);this.clear();this.D.length=0};g.tw.prototype.set=function(Z,k){k===void 0?this.Ur.remove(Z):this.Ur.set(Z,g.AW(k))};
g.tw.prototype.get=function(Z){let k;try{k=this.Ur.get(Z)}catch(N){return}if(k!==null)try{return JSON.parse(k)}catch(N){throw"Storage: Invalid value was encountered";}};
g.tw.prototype.remove=function(Z){this.Ur.remove(Z)};g.$b(hw,g.tw);hw.prototype.set=function(Z,k){hw.n8.set.call(this,Z,l8(k))};
hw.prototype.xZ=function(Z){Z=hw.n8.get.call(this,Z);if(Z===void 0||Z instanceof Object)return Z;throw"Storage: Invalid value was encountered";};
hw.prototype.get=function(Z){if(Z=this.xZ(Z)){if(Z=Z.data,Z===void 0)throw"Storage: Invalid value was encountered";}else Z=void 0;return Z};g.$b(fP,hw);fP.prototype.set=function(Z,k,N){if(k=l8(k)){if(N){if(N<g.vy()){fP.prototype.remove.call(this,Z);return}k.expiration=N}k.creation=g.vy()}fP.n8.set.call(this,Z,k)};
fP.prototype.xZ=function(Z,k){const N=fP.n8.xZ.call(this,Z);if(N)if(!k&&g.BG(N))fP.prototype.remove.call(this,Z);else return N};g.$b(g.Ds,fP);g.$b(OZ,n9r);OZ.prototype[Symbol.iterator]=function(){return g.Aw(this.hD(!0)).V()};
OZ.prototype.clear=function(){const Z=Array.from(this);for(const k of Z)this.remove(k)};g.$b(vG,OZ);g.t=vG.prototype;g.t.isAvailable=function(){if(this.U===null){var Z=this.V;if(Z)try{Z.setItem("__sak","1");Z.removeItem("__sak");var k=!0}catch(N){k=N instanceof DOMException&&(N.name==="QuotaExceededError"||N.code===22||N.code===1014||N.name==="NS_ERROR_DOM_QUOTA_REACHED")&&Z&&Z.length!==0}else k=!1;this.U=k}return this.U};
g.t.set=function(Z,k){i8(this);try{this.V.setItem(Z,k)}catch(N){if(this.V.length==0)throw"Storage mechanism: Storage disabled";throw"Storage mechanism: Quota exceeded";}};
g.t.get=function(Z){i8(this);Z=this.V.getItem(Z);if(typeof Z!=="string"&&Z!==null)throw"Storage mechanism: Invalid value was encountered";return Z};
g.t.remove=function(Z){i8(this);this.V.removeItem(Z)};
g.t.hD=function(Z){i8(this);var k=0,N=this.V,a=new g.Pl;a.next=function(){if(k>=N.length)return g.Yj;var T=N.key(k++);if(Z)return g.cl(T);T=N.getItem(T);if(typeof T!=="string")throw"Storage mechanism: Invalid value was encountered";return g.cl(T)};
return a};
g.t.clear=function(){i8(this);this.V.clear()};
g.t.key=function(Z){i8(this);return this.V.key(Z)};g.$b(gQ,vG);g.$b(wQ,vG);g.$b($N,OZ);$N.prototype.set=function(Z,k){this.U.set(this.V+Z,k)};
$N.prototype.get=function(Z){return this.U.get(this.V+Z)};
$N.prototype.remove=function(Z){this.U.remove(this.V+Z)};
$N.prototype.hD=function(Z){const k=this.U[Symbol.iterator](),N=this,a=new g.Pl;a.next=function(){var T=k.next();if(T.done)return T;for(T=T.value;T.slice(0,N.V.length)!=N.V;){T=k.next();if(T.done)return T;T=T.value}return g.cl(Z?T.slice(N.V.length):N.U.get(T))};
return a};GS.prototype.getValue=function(){return this.U};
GS.prototype.clone=function(){return new GS(this.V,this.U)};var Vu=class{constructor(Z){this.V=[];if(Z)a:{let N;if(Z instanceof Vu){if(N=Z.pP(),Z=Z.o5(),this.V.length<=0){var k=this.V;for(let a=0;a<N.length;a++)k.push(new GS(N[a],Z[a]));break a}}else N=g.xa(Z),Z=$a(Z);for(k=0;k<N.length;k++)this.Me(N[k],Z[k])}}Me(Z,k){var N=this.V;N.push(new GS(Z,k));Z=N.length-1;k=this.V;for(N=k[Z];Z>0;){const a=Z-1>>1;if(k[a].V>N.V)k[Z]=k[a],Z=a;else break}k[Z]=N}remove(){var Z=this.V,k=Z.length;const N=Z[0];if(!(k<=0)){if(k==1)Z.length=0;else{Z[0]=Z.pop();Z=0;k=this.V;
const T=k.length,K=k[Z];for(;Z<T>>1;){var a=Z*2+1;const y=Z*2+2;a=y<T&&k[y].V<k[a].V?y:a;if(k[a].V>K.V)break;k[Z]=k[a];Z=a}k[Z]=K}return N.getValue()}}o5(){const Z=this.V,k=[],N=Z.length;for(let a=0;a<N;a++)k.push(Z[a].getValue());return k}pP(){const Z=this.V,k=[],N=Z.length;for(let a=0;a<N;a++)k.push(Z[a].V);return k}clone(){return new Vu(this)}isEmpty(){return this.V.length===0}clear(){this.V.length=0}};var mbU=class extends Vu{enqueue(Z,k){this.Me(Z,k)}};SK.xX=void 0;SK.getInstance=function(){return SK.xX?SK.xX:SK.xX=new SK};
SK.prototype.V=0;var Jw={},swR=typeof Uint8Array!=="undefined"&&typeof Uint16Array!=="undefined"&&typeof Int32Array!=="undefined";Jw.assign=function(Z){for(var k=Array.prototype.slice.call(arguments,1);k.length;){var N=k.shift();if(N){if(typeof N!=="object")throw new TypeError(N+"must be non-object");for(var a in N)Object.prototype.hasOwnProperty.call(N,a)&&(Z[a]=N[a])}}return Z};
Jw.vu=function(Z,k){if(Z.length===k)return Z;if(Z.subarray)return Z.subarray(0,k);Z.length=k;return Z};
var Arf={HT:function(Z,k,N,a,T){if(k.subarray&&Z.subarray)Z.set(k.subarray(N,N+a),T);else for(var K=0;K<a;K++)Z[T+K]=k[N+K]},
GO:function(Z){var k,N;var a=N=0;for(k=Z.length;a<k;a++)N+=Z[a].length;var T=new Uint8Array(N);a=N=0;for(k=Z.length;a<k;a++){var K=Z[a];T.set(K,N);N+=K.length}return T}},Pgf={HT:function(Z,k,N,a,T){for(var K=0;K<a;K++)Z[T+K]=k[N+K]},
GO:function(Z){return[].concat.apply([],Z)}};
Jw.Hk=function(){swR?(Jw.Iy=Uint8Array,Jw.zy=Uint16Array,Jw.Kk=Int32Array,Jw.assign(Jw,Arf)):(Jw.Iy=Array,Jw.zy=Array,Jw.Kk=Array,Jw.assign(Jw,Pgf))};
Jw.Hk();var cr0=!0;try{new Uint8Array(1)}catch(Z){cr0=!1};var uB={};uB=function(Z,k,N,a){var T=Z&65535|0;Z=Z>>>16&65535|0;for(var K;N!==0;){K=N>2E3?2E3:N;N-=K;do T=T+k[a++]|0,Z=Z+T|0;while(--K);T%=65521;Z%=65521}return T|Z<<16|0};for(var lB={},FE,HTy=[],tO=0;tO<256;tO++){FE=tO;for(var dbG=0;dbG<8;dbG++)FE=FE&1?3988292384^FE>>>1:FE>>>1;HTy[tO]=FE}lB=function(Z,k,N,a){N=a+N;for(Z^=-1;a<N;a++)Z=Z>>>8^HTy[(Z^k[a])&255];return Z^-1};var AF={};AF={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};var aW=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],yx=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],ZCr=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],dC=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],XU=Array(576);UZ(XU);var L0=Array(60);UZ(L0);var K0=Array(512);UZ(K0);var Nd=Array(256);UZ(Nd);var Tp=Array(29);UZ(Tp);var Qx=Array(30);UZ(Qx);var $A,xA,Gp,wC=!1;var vr;vr=[new Oa(0,0,0,0,function(Z,k){var N=65535;for(N>Z.vV-5&&(N=Z.vV-5);;){if(Z.eY<=1){f0(Z);if(Z.eY===0&&k===0)return 1;if(Z.eY===0)break}Z.Jp+=Z.eY;Z.eY=0;var a=Z.Y9+N;if(Z.Jp===0||Z.Jp>=a)if(Z.eY=Z.Jp-a,Z.Jp=a,Vx(Z,!1),Z.KC.Ti===0)return 1;if(Z.Jp-Z.Y9>=Z.d0-262&&(Vx(Z,!1),Z.KC.Ti===0))return 1}Z.Me=0;if(k===4)return Vx(Z,!0),Z.KC.Ti===0?3:4;Z.Jp>Z.Y9&&Vx(Z,!1);return 1}),
new Oa(4,4,8,4,Br),new Oa(4,5,16,8,Br),new Oa(4,6,32,32,Br),new Oa(4,4,16,16,D2),new Oa(8,16,32,32,D2),new Oa(8,16,128,128,D2),new Oa(8,32,128,256,D2),new Oa(32,128,258,1024,D2),new Oa(32,258,258,4096,D2)];var gC={};gC=function(){this.input=null;this.rN=this.Ho=this.sL=0;this.output=null;this.Wu=this.Ti=this.gs=0;this.msg="";this.state=null;this.Vo=2;this.vG=0};var SO=Object.prototype.toString;
iB.prototype.push=function(Z,k){var N=this.KC,a=this.options.chunkSize;if(this.ended)return!1;var T=k===~~k?k:k===!0?4:0;typeof Z==="string"?N.input=zS(Z):SO.call(Z)==="[object ArrayBuffer]"?N.input=new Uint8Array(Z):N.input=Z;N.sL=0;N.Ho=N.input.length;do{N.Ti===0&&(N.output=new Jw.Iy(a),N.gs=0,N.Ti=a);Z=Ymy(N,T);if(Z!==1&&Z!==0)return this.zU(Z),this.ended=!0,!1;if(N.Ti===0||N.Ho===0&&(T===4||T===2))if(this.options.to==="string"){var K=Jw.vu(N.output,N.gs);k=K;K=K.length;if(K<65537&&(k.subarray&&
cr0||!k.subarray))k=String.fromCharCode.apply(null,Jw.vu(k,K));else{for(var y="",Q=0;Q<K;Q++)y+=String.fromCharCode(k[Q]);k=y}this.chunks.push(k)}else k=Jw.vu(N.output,N.gs),this.chunks.push(k)}while((N.Ho>0||N.Ti===0)&&Z!==1);if(T===4)return(N=this.KC)&&N.state?(a=N.state.status,a!==42&&a!==69&&a!==73&&a!==91&&a!==103&&a!==113&&a!==666?Z=Pr(N,-2):(N.state=null,Z=a===113?Pr(N,-3):0)):Z=-2,this.zU(Z),this.ended=!0,Z===0;T===2&&(this.zU(0),N.Ti=0);return!0};
iB.prototype.zU=function(Z){Z===0&&(this.result=this.options.to==="string"?this.chunks.join(""):Jw.GO(this.chunks));this.chunks=[];this.err=Z;this.msg=this.KC.msg};var zp=()=>Math.random().toString(36).substring(7).split("").join("."),JF=`@@redux/INIT${zp()}`,aqb=`@@redux/REPLACE${zp()}`;var bB=typeof Symbol==="function"&&Symbol.observable||"@@observable";var f4b=os(class extends mD{constructor(Z){super(Z)}},[0,pp,kRG,of,Ug,of,-1,bQ,Ug,bQ,-1,pp,bQ,kRG,JG,[0,Ug,-3,bQ],of,-1,bQ]);var cUf=-882941471;var XNy=function(Z,k){return(()=>{const N=new a8b(Z,k);return()=>N})()}("youtube.api.innertube.AttestationError",'[null,[["ATTESTATION_ERROR_UNKNOWN",0],["ATTESTATION_ERROR_VM_NOT_INITIALIZED",1],["ATTESTATION_ERROR_VM_NO_RESPONSE",2],["ATTESTATION_ERROR_VM_TIMEOUT",3],["ATTESTATION_ERROR_VM_INTERNAL_ERROR",4],["ATTESTATION_ERROR_PREFETCH_CHALLENGE_INVALID",5],["ATTESTATION_ERROR_PREFETCH_CHALLENGE_NETWORK_ERROR",6],["ATTESTATION_ERROR_PREFETCH_CHALLENGE_OFFLINE",7],["ATTESTATION_ERROR_PREFETCH_CHALLENGE_INTERNAL_ERROR",8],["ATTESTATION_ERROR_API_NOT_READY",9],["ATTESTATION_ERROR_DEVICE_OFFLINE",10],["ATTESTATION_ERROR_KEY_PAIR_INIT_FAILED",12],["ATTESTATION_ERROR_SIGNING_DATA_MISSING",13],["ATTESTATION_ERROR_SIGNING_FAILED",14],["ATTESTATION_ERROR_CERT_CHAIN_RETRIEVAL_FAILED",15]],null,[[11,11]]]');g.Y=class{constructor(Z){this.name=Z}};var XcU=new g.Y("adInfoDialogEndpoint");var Yoy=new g.Y("adPingingEndpoint");var Xry=new g.Y("crossDeviceProgressCommand");var pN=new g.Y("actionCompanionAdRenderer");var ET=new g.Y("adActionInterstitialRenderer");var LAy=new g.Y("adDurationRemainingRenderer");var Xe=new g.Y("adHoverTextButtonRenderer");var tcy=new g.Y("adInfoDialogRenderer");var ah=new g.Y("adMessageRenderer");var Lq=new g.Y("adPreviewRenderer");var Mt=new g.Y("adsEngagementPanelRenderer");var Pij=new g.Y("dismissablePanelTextPortraitImageRenderer");var rE=new g.Y("adsEngagementPanelSectionListViewModel");var V8G=new g.Y("flyoutCtaRenderer");var Rx=new g.Y("imageCompanionAdRenderer");var I7=new g.Y("instreamAdPlayerOverlayRenderer");var hEG=new g.Y("instreamSurveyAdBackgroundImageRenderer");var dE=new g.Y("instreamSurveyAdPlayerOverlayRenderer");var ap=new g.Y("instreamSurveyAdRenderer"),HU=new g.Y("instreamSurveyAdSingleSelectQuestionRenderer"),cU=new g.Y("instreamSurveyAdMultiSelectQuestionRenderer"),hO=new g.Y("instreamSurveyAdAnswerRenderer"),FAr=new g.Y("instreamSurveyAdAnswerNoneOfTheAboveRenderer");var FP=new g.Y("instreamVideoAdRenderer");var t80=new g.Y("textOverlayAdContentRenderer"),hCf=new g.Y("enhancedTextOverlayAdContentRenderer"),u8f=new g.Y("imageOverlayAdContentRenderer");var jP=new g.Y("playerOverlayLayoutRenderer");var WM=new g.Y("videoInterstitialButtonedCenteredLayoutRenderer");var LmU=new g.Y("aboveFeedAdLayoutRenderer");var VDU=new g.Y("belowPlayerAdLayoutRenderer");var X8b=new g.Y("inPlayerAdLayoutRenderer");var FmG=new g.Y("inPlayerOrganicOverlayAdLayoutRenderer");var yy=new g.Y("playerBytesAdLayoutRenderer");var Af=new g.Y("playerBytesSequenceItemAdLayoutRenderer");var sO=new g.Y("playerUnderlayAdLayoutRenderer");var N8=new g.Y("adIntroRenderer");var ZN=new g.Y("playerBytesSequentialLayoutRenderer");var y5i=new g.Y("slidingTextPlayerOverlayRenderer");var Tk=new g.Y("surveyTextInterstitialRenderer");var Qy=new g.Y("videoAdTrackingRenderer");var Cif=new g.Y("videoInterstitialCenteredLayoutViewModel");var lgf=new g.Y("simpleAdBadgeRenderer");var GZ=new g.Y("skipAdRenderer"),fgy=new g.Y("skipButtonRenderer");var PU=new g.Y("adSlotRenderer");var Cq=new g.Y("squeezebackPlayerSidePanelRenderer");var BDf=new g.Y("timedPieCountdownRenderer");var cJ=new g.Y("adAvatarViewModel");var HJ=new g.Y("adBadgeViewModel");var dR=new g.Y("adButtonViewModel");var Dbf=new g.Y("adDetailsLineViewModel");var OTf=new g.Y("adDisclosureBannerViewModel");var vDj=new g.Y("adPodIndexViewModel");var iTf=new g.Y("imageBackgroundViewModel");var gDf=new g.Y("adGridCardCollectionViewModel");var wNb=new g.Y("adGridCardTextViewModel");var $by=new g.Y("adPreviewViewModel");var xbf=new g.Y("playerAdAvatarLockupCardButtonedViewModel");var G6b=new g.Y("skipAdButtonViewModel");var S4y=new g.Y("skipAdViewModel");var eCN=new g.Y("timedPieCountdownViewModel");var oDf=new g.Y("visitAdvertiserLinkViewModel");var nN=new g.Y("bannerImageLayoutViewModel");var Ix=new g.Y("topBannerImageTextIconButtonedLayoutViewModel");var jy=new g.Y("adsEngagementPanelLayoutViewModel");var mv=new g.Y("displayUnderlayTextGridCardsLayoutViewModel");g.HZ=new g.Y("browseEndpoint");var Jrr=new g.Y("confirmDialogEndpoint");var u$=class{constructor(Z){this.V=Z}},l$=class extends u${get entityMetadata(){return this.V.entityMetadata}set entityMetadata(Z){this.V.entityMetadata=Z}};var zCr=class extends l${U(){return[]}};var UbG=new g.Y("commandContext");var bTr=class extends l${U(){return[]}};var pNi=class extends l${U(){return[]}};var lMN=new g.Y("rawColdConfigGroup");var uuf=new g.Y("rawHotConfigGroup");g.xZ=new g.Y("commandExecutorCommand");var RCN=class extends mD{constructor(Z){super(Z)}};var M8r={nla:0,o4p:1,v43:32,P0p:61,Qvq:67,C03:103,Ze6:86,GMp:42,E4t:60,DWt:62,tIp:73,BDz:76,ieX:88,MI3:90,rWp:99,S3a:98,cWz:100,RY6:102,Keq:41,uNt:69,beA:70,afp:71,G2:2,j6:27,ANDROID:3,D5:54,YM:14,BP:91,dJ:55,LG:24,Jm:20,Sr:18,G9:21,vP:104,PP:30,CG:29,MP:28,ffm:101,cP:34,RD:36,Fo:38,IOS:5,lR:15,t9:92,J9:40,F1:25,G1:17,vQ:19,EM:64,HQ:66,BQ:26,jx:22,Zg:33,Cf:68,iR:35,RZ:53,PQ:37,Sx:39,Kxm:7,uam:57,bFz:43,XAR:59,aFt:93,Z5:74,snq:75,mxz:85,IF6:65,WxS:80,Apz:8,QnS:10,hnm:58,N5q:63,wAX:72,jr:23,mWz:11,
Ifm:13,d1:12,rpp:16,Fe3:56,jvR:31,B6:77,Zt:84,Hem:87,iI:89,CQ:94,oS:95};var d2=class extends mD{constructor(Z){super(Z)}If(){return N7(this,3)}NH(){return N7(this,5)}tB(Z){return Q3(this,5,Z)}};var cx=class extends mD{constructor(Z){super(Z)}};var nDf=class extends mD{constructor(Z){super(Z)}};var d1b=class extends mD{constructor(Z){super(Z)}getDeviceId(){return N7(this,6)}gH(Z){var k=fk(this,9,Fl,3,!0);jv(k,Z);return k[Z]}getPlayerType(){return az(this,36)}setHomeGroupInfo(Z){return jt(this,nDf,81,Z)}clearLocationPlayabilityToken(){return VX(this,89)}};var LWb=class extends mD{constructor(Z){super(Z)}getValue(){return N7(this,JR(this,VRf,2))}},VRf=[2,3,4,5,6];var Igj=class extends mD{constructor(Z){super(Z)}setTrackingParams(Z){return VX(this,1,II(Z,!1))}};var Xjf=class extends mD{constructor(Z){super(Z)}};var Hx=class extends mD{constructor(Z){super(Z)}gH(Z){var k=fk(this,5,hJ,3,!0);jv(k,Z);return k[Z]}};var FWy=class extends mD{constructor(Z){super(Z)}getToken(){return K_(this,2)}setToken(Z){return Q3(this,2,Z)}};var j1=class extends mD{constructor(Z){super(Z)}setSafetyMode(Z){return rs(this,5,Z)}};var Iv=class extends mD{constructor(Z){super(Z)}D(Z){return jt(this,d1b,1,Z)}};var Wd=new g.Y("thumbnailLandscapePortraitRenderer");g.jwf=new g.Y("changeEngagementPanelVisibilityAction");var jAG=new g.Y("continuationCommand");var EDf=new g.Y("openPopupAction");g.MZ=new g.Y("signalAction");g.f4=new g.Y("webCommandMetadata");var Aei=new g.Y("metadataBadgeRenderer");var Irf=new g.Y("signalServiceEndpoint");var uA=new g.Y("innertubeCommand");var WAf=new g.Y("loggingDirectives");var Dmy={O5:"EMBEDDED_PLAYER_MODE_UNKNOWN",nV:"EMBEDDED_PLAYER_MODE_DEFAULT",qF:"EMBEDDED_PLAYER_MODE_PFP",yj:"EMBEDDED_PLAYER_MODE_PFL"};var OAf=new g.Y("channelThumbnailEndpoint");var qTG=new g.Y("embeddedPlayerErrorMessageRenderer");var kqU=new g.Y("embeddedPlayerOverlayVideoDetailsRenderer"),vBb=new g.Y("embeddedPlayerOverlayVideoDetailsCollapsedRenderer"),iAr=new g.Y("embeddedPlayerOverlayVideoDetailsExpandedRenderer");var yey=new g.Y("embedsInfoPanelRenderer");var Y4y=class extends l${U(){return[]}};var Z2r=class extends l${U(){return[]}};var kEy=class extends l${U(){const Z=[];this.V.alternateChannel&&Z.push(this.V.alternateChannel);this.V.alternateChannelList&&Z.push(...this.V.alternateChannelList);this.V.oneofChannelEntity&&Z.push(this.V.oneofChannelEntity);return[...(new Set(Z))]}};var NGr=class extends l${U(){const Z=[];this.V.entryCollection&&Z.push(this.V.entryCollection);return[...(new Set(Z))]}},TG0=class extends l${U(){const Z=[];this.V.parentPlaylist&&Z.push(this.V.parentPlaylist);if(this.V.entries)for(const k of this.V.entries)Z.push(...(new aPy(k)).U());return[...(new Set(Z))]}},aPy=class extends u${U(){const Z=[];this.V.video&&Z.push(this.V.video);return[...(new Set(Z))]}};var KIj=class extends l${U(){const Z=[];this.V.descriptionEntity&&Z.push(this.V.descriptionEntity);this.V.creators&&Z.push(...this.V.creators);this.V.theBiggestFan&&Z.push(this.V.theBiggestFan);return[...(new Set(Z))]}},ypf=class extends l${U(){return[]}};var BW=new g.Y("feedbackEndpoint");var QMN=class extends l${U(){return[]}};var quf=class extends l${U(){return[]}};var rpi=class extends l${U(){return[]}};var CCU=new g.Y("youtubeIconSource");var m5f=new g.Y("callToActionButtonViewModel");var sMb=class extends l${U(){return[]}};var Apf=class extends l${U(){return[]}};var PCb=new g.Y("interactionLoggingCommandMetadata");var Fcf={JWX:"WEB_DISPLAY_MODE_UNKNOWN",Y3q:"WEB_DISPLAY_MODE_BROWSER",Lem:"WEB_DISPLAY_MODE_MINIMAL_UI",lfW:"WEB_DISPLAY_MODE_STANDALONE",dWR:"WEB_DISPLAY_MODE_FULLSCREEN"};var cpi=class extends mD{constructor(Z){super(Z)}getPlayerType(){return az(this,7)}S9(){return N7(this,19)}setVideoId(Z){return Q3(this,19,Z)}};var sdy=class extends mD{constructor(Z){super(Z)}};var mYr=class extends mD{constructor(Z){super(Z)}};var Yd=class extends mD{constructor(Z){super(Z,500)}},H2X=[2,3,5,6,7,11,13,20,21,22,23,24,28,32,37,45,59,72,73,74,76,78,79,80,85,91,97,100,102,105,111,117,119,126,127,136,146,148,151,156,157,158,159,163,164,168,176,177,178,179,184,188,189,190,191,193,194,195,196,197,198,199,200,201,202,203,204,205,206,208,209,215,219,222,225,226,227,229,232,233,234,240,241,244,247,248,249,251,254,255,256,257,258,259,260,261,266,270,272,278,288,291,293,300,304,308,309,310,311,313,314,319,320,321,323,324,327,328,330,
331,332,334,337,338,340,344,348,350,351,352,353,354,355,356,357,358,361,363,364,368,369,370,373,374,375,378,380,381,383,388,389,399,402,403,410,411,412,413,414,415,416,417,418,423,424,425,426,427,429,430,431,439,441,444,448,458,469,471,473,474,480,481,482,484,485,486,491,495,496,506,507,509,511,512,513,514,515,516,517,518,519,520,522,523,524,525,526,527,528,529,530,531,536,537,538,539,541,545];var d5r=new g.Y("loggingContext");var hrb=class extends mD{constructor(Z){super(Z)}};var KWN=class extends mD{constructor(Z){super(Z)}S9(){return K_(this,JR(this,zi,1))}setVideoId(Z){return GJ(this,1,zi,zX(Z))}getPlaylistId(){return K_(this,JR(this,zi,2))}},zi=[1,2];g.nm=class extends mD{constructor(Z){super(Z)}};g.nm.prototype.zo=NR(0);var XAU=new g.Y("dismissPlayerOverlayCommand");var LIy=class extends l${U(){return[]}};var V3f=class extends l${U(){return[]}};var FIj=class extends l${U(){return[]}};var t3y=class extends l${U(){const Z=[];this.V.downloadsList&&Z.push(this.V.downloadsList);this.V.smartDownloadsList&&Z.push(this.V.smartDownloadsList);this.V.recommendedDownloadsList&&Z.push(this.V.recommendedDownloadsList);this.V.refresh&&Z.push(this.V.refresh);return[...(new Set(Z))]}};var ugU=class extends l${U(){const Z=[];this.V.refresh&&Z.push(this.V.refresh);if(this.V.downloads)for(const k of this.V.downloads)Z.push(...(new hbf(k)).U());return[...(new Set(Z))]}},hbf=class extends u${U(){const Z=[];this.V.video&&Z.push(this.V.video);this.V.playlist&&Z.push(this.V.playlist);this.V.videoItem&&Z.push(this.V.videoItem);this.V.playlistItem&&Z.push(this.V.playlistItem);return[...(new Set(Z))]}};var lPy=class extends l${U(){const Z=[];this.V.localImageEntities&&Z.push(...this.V.localImageEntities);return[...(new Set(Z))]}};var fPU=class extends l${U(){const Z=[];this.V.playbackData&&Z.push(this.V.playbackData);this.V.localImageEntities&&Z.push(...this.V.localImageEntities);this.V.videoDownloadContextEntity&&Z.push(this.V.videoDownloadContextEntity);return[...(new Set(Z))]}};var BGU=class extends l${U(){return[]}};var D5N=class extends l${U(){const Z=[];this.V.fakeChildren&&Z.push(...this.V.fakeChildren);return[...(new Set(Z))]}};var O2i=class extends l${U(){const Z=[];this.V.video&&Z.push(this.V.video);this.V.playbackData&&Z.push(this.V.playbackData);this.V.offlineVideoPolicy&&Z.push(this.V.offlineVideoPolicy);return[...(new Set(Z))]}};var v0j=class extends l${U(){return[]}};var i20=class extends l${U(){const Z=[];this.V.channelOwner&&Z.push(this.V.channelOwner);this.V.videos&&Z.push(...this.V.videos);this.V.collaboratorChannels&&Z.push(...this.V.collaboratorChannels);this.V.downloadState&&Z.push(this.V.downloadState);this.V.refresh&&Z.push(this.V.refresh);return[...(new Set(Z))]}};var g00=class extends l${U(){const Z=[];this.V.video&&Z.push(this.V.video);this.V.channelContributor&&Z.push(this.V.channelContributor);return[...(new Set(Z))]}};var $5X=class extends u${U(){const Z=[];this.V.recommendedVideoMetadata&&Z.push(...(new wAR(this.V.recommendedVideoMetadata)).U());return[...(new Set(Z))]}},wAR=class extends u${U(){const Z=[];this.V.localImageEntities&&Z.push(...this.V.localImageEntities);this.V.videoDownloadContextEntity&&Z.push(this.V.videoDownloadContextEntity);return[...(new Set(Z))]}};var x5X=class extends u${U(){const Z=[];this.V.playbackPosition&&Z.push(this.V.playbackPosition);return[...(new Set(Z))]}};var GEb=class extends l${U(){const Z=[];this.V.owner&&Z.push(this.V.owner);this.V.downloadState&&Z.push(this.V.downloadState);this.V.userState&&Z.push(...(new x5X(this.V.userState)).U());this.V.additionalMetadata&&Z.push(...(new $5X(this.V.additionalMetadata)).U());return[...(new Set(Z))]}};var Suf=class extends l${U(){const Z=[];this.V.userChannelDetails&&Z.push(this.V.userChannelDetails);return[...(new Set(Z))]}};var ebX=class extends l${U(){const Z=[];this.V.channelOwner&&Z.push(this.V.channelOwner);this.V.playbackPosition&&Z.push(this.V.playbackPosition);this.V.localImageEntities&&Z.push(...this.V.localImageEntities);this.V.downloadStatus&&Z.push(this.V.downloadStatus);return[...(new Set(Z))]}};var o0y=class extends l${U(){return[]}};var JpN=class extends l${U(){return[]}};var zbX=class extends l${U(){return[]}};var U5y=class extends l${U(){return[]}};var b2y=class extends l${U(){return[]}};var pAi=class extends l${U(){return[]}};var Rbf=class extends l${U(){return[]}};var M3f=class extends l${U(){return[]}};var n0f=class extends l${U(){return[]}};var FG=new g.Y("changeKeyedMarkersVisibilityCommand");var IPb=new g.Y("changeMarkersVisibilityCommand");var PXr=new g.Y("loadMarkersCommand");var jM0=new g.Y("suggestedActionDataViewModel");var EcU=new g.Y("timelyActionViewModel");var jGy=new g.Y("timelyActionsOverlayViewModel");var E00=class extends l${U(){return[]}};var WIU=class extends l${U(){return[]}};var Yu0=class extends l${U(){return[]}};var F2y=new g.Y("productListItemRenderer");var ZSf=new g.Y("shoppingOverlayRenderer");var kMU=class extends l${U(){return[]}};var Nwf=class extends l${U(){const Z=[];this.V.compositeSourceKeys&&Z.push(...this.V.compositeSourceKeys);return[...(new Set(Z))]}};var aIy=class extends l${U(){const Z=[];this.V.trackDownloadMetadatas&&Z.push(...this.V.trackDownloadMetadatas);return[...(new Set(Z))]}};var TwR=class extends l${U(){const Z=[];this.V.downloadedTracks&&Z.push(...this.V.downloadedTracks);this.V.smartDownloadedTracks&&Z.push(...this.V.smartDownloadedTracks);this.V.downloadedEpisodes&&Z.push(...this.V.downloadedEpisodes);this.V.downloadedAlbumReleases&&Z.push(...this.V.downloadedAlbumReleases);this.V.smartDownloadedAlbumReleases&&Z.push(...this.V.smartDownloadedAlbumReleases);this.V.downloadedPlaylists&&Z.push(...this.V.downloadedPlaylists);this.V.smartDownloadedPlaylists&&Z.push(...this.V.smartDownloadedPlaylists);
this.V.metadataOnlyTracks&&Z.push(...this.V.metadataOnlyTracks);return[...(new Set(Z))]}};var KqX=class extends l${U(){const Z=[];this.V.trackDownloadMetadatas&&Z.push(...this.V.trackDownloadMetadatas);return[...(new Set(Z))]}};var yS0=class extends l${U(){const Z=[];this.V.playbackData&&Z.push(this.V.playbackData);this.V.localImageEntities&&Z.push(...this.V.localImageEntities);this.V.videoDownloadContextEntity&&Z.push(this.V.videoDownloadContextEntity);return[...(new Set(Z))]}};var Q$b=class extends l${U(){const Z=[];this.V.musicLibraryStatusEntity&&Z.push(this.V.musicLibraryStatusEntity);this.V.primaryArtists&&Z.push(...this.V.primaryArtists);this.V.details&&Z.push(this.V.details);this.V.userDetails&&Z.push(this.V.userDetails);this.V.tracks&&Z.push(...this.V.tracks);this.V.share&&Z.push(this.V.share);this.V.downloadMetadata&&Z.push(this.V.downloadMetadata);this.V.refresh&&Z.push(this.V.refresh);return[...(new Set(Z))]}},qz0=class extends l${U(){const Z=[];this.V.albumRelease&&
Z.push(this.V.albumRelease);this.V.tracks&&Z.push(...this.V.tracks);return[...(new Set(Z))]}},rS0=class extends l${U(){const Z=[];this.V.albumRelease&&Z.push(this.V.albumRelease);return[...(new Set(Z))]}};var CMf=class extends l${U(){const Z=[];this.V.details&&Z.push(this.V.details);this.V.userDetails&&Z.push(this.V.userDetails);return[...(new Set(Z))]}},mn0=class extends l${U(){const Z=[];this.V.parentArtist&&Z.push(this.V.parentArtist);return[...(new Set(Z))]}},s$b=class extends l${U(){const Z=[];this.V.parentArtist&&Z.push(this.V.parentArtist);return[...(new Set(Z))]}};var ASf=class extends l${U(){return[]}};var PMf=class extends l${U(){return[]}};var HSy=class extends l${U(){const Z=[];this.V.tracks&&Z.push(...this.V.tracks);this.V.refresh&&Z.push(this.V.refresh);this.V.musicLibraryStatusEntity&&Z.push(this.V.musicLibraryStatusEntity);this.V.details&&Z.push(this.V.details);this.V.downloadMetadata&&Z.push(this.V.downloadMetadata);this.V.sideloadMetadata&&Z.push(this.V.sideloadMetadata);this.V.userDetails&&Z.push(this.V.userDetails);this.V.entryCollection&&Z.push(this.V.entryCollection);this.V.share&&Z.push(this.V.share);this.V.podcastShowAdditionalMetadata&&
Z.push(...(new cSb(this.V.podcastShowAdditionalMetadata)).U());return[...(new Set(Z))]}},cSb=class extends u${U(){const Z=[];this.V.creatorEntity&&Z.push(this.V.creatorEntity);return[...(new Set(Z))]}};var dnG=class extends l${U(){return[]}};var XLG=class extends l${U(){const Z=[];this.V.musicLibraryStatusEntity&&Z.push(this.V.musicLibraryStatusEntity);this.V.artists&&Z.push(...this.V.artists);this.V.audioModeVersion&&Z.push(this.V.audioModeVersion);this.V.videoModeVersion&&Z.push(this.V.videoModeVersion);this.V.userDetails&&Z.push(this.V.userDetails);this.V.details&&Z.push(this.V.details);this.V.albumRelease&&Z.push(this.V.albumRelease);this.V.share&&Z.push(this.V.share);this.V.libraryEdit&&Z.push(this.V.libraryEdit);this.V.downloadMetadata&&
Z.push(this.V.downloadMetadata);this.V.playbackPosition&&Z.push(this.V.playbackPosition);this.V.lyrics&&Z.push(this.V.lyrics);return[...(new Set(Z))]}},Lqy=class extends l${U(){const Z=[];this.V.parentTrack&&Z.push(this.V.parentTrack);return[...(new Set(Z))]}},Vji=class extends l${U(){const Z=[];this.V.parentTrack&&Z.push(this.V.parentTrack);return[...(new Set(Z))]}};var aHN=new g.Y("musicEmbeddedPlayerOverlayVideoDetailsRenderer");var FqU=new g.Y("adFeedbackEndpoint");var tjN=new g.Y("menuEndpoint");var hhf=new g.Y("phoneDialerEndpoint");var uAi=new g.Y("sendSmsEndpoint");var DDy=new g.Y("copyTextEndpoint");var lIf=new g.Y("shareEndpoint"),fIi=new g.Y("shareEntityEndpoint"),Bwy=new g.Y("shareEntityServiceEndpoint"),DnU=new g.Y("webPlayerShareEntityServiceEndpoint");g.Fh=new g.Y("urlEndpoint");g.d9=new g.Y("watchEndpoint");var OSr=new g.Y("watchPlaylistEndpoint");var vIf=class extends l${U(){return[]}};var iSy=class extends l${U(){return[]}};var gIb=class extends l${U(){return[]}};var wLN=class extends l${U(){return[]}};var $nf=class extends l${U(){const Z=[];this.V.transfer&&Z.push(this.V.transfer);this.V.adsPlaybackData&&Z.push(...this.V.adsPlaybackData);this.V.drmLicense&&Z.push(this.V.drmLicense);this.V.offlineVideoPolicy&&Z.push(this.V.offlineVideoPolicy);this.V.videoDownloadContextEntity&&Z.push(this.V.videoDownloadContextEntity);return[...(new Set(Z))]}};var xnf=class extends l${U(){return[]}};var GMi=class extends l${U(){const Z=[];this.V.offlineVideoStreams&&Z.push(...this.V.offlineVideoStreams);this.V.captionTrack&&Z.push(...this.V.captionTrack);return[...(new Set(Z))]}};var SzU=class extends l${U(){return[]}};var ehR=class extends l${U(){return[]}};var oIf=class extends l${U(){return[]}};var zhy=new g.Y("compositeVideoOverlayRenderer");var Un0=new g.Y("miniplayerRenderer");var nBy=new g.Y("paidContentOverlayRenderer");var d_U=new g.Y("playerMutedAutoplayOverlayRenderer"),X0i=new g.Y("playerMutedAutoplayEndScreenRenderer");var m_y=new g.Y("unserializedPlayerResponse"),D_r=new g.Y("unserializedPlayerResponse");var bSG=new g.Y("playlistEditEndpoint");var pLf=class extends l${U(){return[]}};var Eq=new g.Y("buttonRenderer"),D8=new g.Y("toggleButtonRenderer");var siX=new g.Y("counterfactualRenderer");var RhU=new g.Y("resolveUrlCommandMetadata");var Mjy=class extends l${U(){return[]}};var nIN=new g.Y("modifyChannelNotificationPreferenceEndpoint");var WZU=new g.Y("pingingEndpoint");var IIf=new g.Y("unsubscribeEndpoint");var j$f=class extends l${U(){return[]}};g.Dk=new g.Y("subscribeButtonRenderer");var EIr=new g.Y("subscribeEndpoint");var Wqf=class extends l${U(){return[]}};var YzR=class extends l${U(){return[]}};var ZcX=class extends l${U(){return[]}};var ckf=new g.Y("buttonViewModel");var kjU=class extends l${U(){return[]}};var NSU=class extends l${U(){return[]}};var a9X=class extends l${U(){return[]}};var TSr=class extends l${U(){return[]}};var KHG=class extends l${U(){return[]}};var yjf=class extends l${U(){return[]}};var APb=new g.Y("qrCodeRenderer");var QFr={yv:"LIVING_ROOM_APP_MODE_UNSPECIFIED",h9:"LIVING_ROOM_APP_MODE_MAIN",Nl:"LIVING_ROOM_APP_MODE_KIDS",T1:"LIVING_ROOM_APP_MODE_MUSIC",nf:"LIVING_ROOM_APP_MODE_UNPLUGGED",A9:"LIVING_ROOM_APP_MODE_GAMING"};var ql0=class extends l${U(){return[]}};var rjf=class extends l${U(){return[]}};var CX0=new g.Y("autoplaySwitchButtonRenderer");var Y2,mpf,$_U,AuG;Y2=new g.Y("decoratedPlayerBarRenderer");mpf=new g.Y("chapteredPlayerBarRenderer");$_U=new g.Y("multiMarkersPlayerBarRenderer");AuG=new g.Y("chapterRenderer");g.dpf=new g.Y("markerRenderer");var uxy=new g.Y("decoratedPlayheadRenderer");var s7X=new g.Y("desktopOverlayConfigRenderer");var cPf=new g.Y("engagementPanelSectionListRenderer");var mD0=new g.Y("gatedActionsOverlayViewModel");var w5G=new g.Y("heatMarkerRenderer");var LCr=new g.Y("heatmapRenderer");var Kky=new g.Y("playlistPanelRenderer");var CGf=new g.Y("productUpsellSuggestedActionViewModel");var OW=new g.Y("suggestedActionTimeRangeTrigger"),mVG=new g.Y("suggestedActionsRenderer"),sFU=new g.Y("suggestedActionRenderer");var VG0=new g.Y("timedMarkerDecorationRenderer");var AjU=class extends l${U(){return[]}};var PGf=class extends l${U(){return[]}};var cjf=class extends l${U(){return[]}};var Hci=class extends l${U(){return[]}};var dVG=class extends l${U(){return[]}};var X6U=class extends l${U(){return[]}};var LHX=class extends l${U(){return[]}};var fkr=new g.Y("cipher");var sUG=new g.Y("playerVars");var OOi=new g.Y("playerVars");var Vmi=g.dX.window,Wr=Vmi?.yt?.config_||Vmi?.ytcfg?.data_||{};g.X0("yt.config_",Wr);var k6=[];var QqU=/^[\w.]*$/,yJG={q:!0,search_query:!0},Kbr=String(yS);var FS=new class{constructor(Z,k){this.V=Z;this.U=k}}(window,window.document);g.X0("yt.ads_.signals_.getAdSignalsString",function(Z){return QS(tP(Z))});g.vy();var hP="XMLHttpRequest"in g.dX?()=>new XMLHttpRequest:null;var FHr="absolute_experiments client_dev_domain client_dev_expflag client_dev_regex_map client_dev_root_url client_rollout_override expflag forcedCapability jsfeat jsmode mods theme".split(" ");[...FHr];var G_={Authorization:"AUTHORIZATION","X-Goog-EOM-Visitor-Id":"EOM_VISITOR_DATA","X-Goog-Visitor-Id":"SANDBOXED_VISITOR_ID","X-Youtube-Domain-Admin-State":"DOMAIN_ADMIN_STATE","X-Youtube-Chrome-Connected":"CHROME_CONNECTED_HEADER","X-YouTube-Client-Name":"INNERTUBE_CONTEXT_CLIENT_NAME","X-YouTube-Client-Version":"INNERTUBE_CONTEXT_CLIENT_VERSION","X-YouTube-Delegation-Context":"INNERTUBE_CONTEXT_SERIALIZED_DELEGATION_CONTEXT","X-YouTube-Device":"DEVICE","X-Youtube-Identity-Token":"ID_TOKEN","X-YouTube-Page-CL":"PAGE_CL",
"X-YouTube-Page-Label":"PAGE_BUILD_LABEL","X-Goog-AuthUser":"SESSION_INDEX","X-Goog-PageId":"DELEGATED_SESSION_ID"},Lbr=["app","debugcss","debugjs","expflag","force_ad_params","force_ad_encrypted","force_viral_ad_response_params","forced_experiments","innertube_snapshots","innertube_goldens","internalcountrycode","internalipoverride","absolute_experiments","conditional_experiments","sbb","sr_bns_address",...FHr],z_=!1,PWj=x6;var bi=class extends oy{constructor(Z,k,N){super(`${Z}, errorCode=${k}`);this.errorCode=k;this.xhr=N;this.name="PromiseAjaxError"}},Vaf=class{constructor(Z){this.xhr=Z}};var M2=class{constructor(Z=null){this.V=Z;this.D=0;this.U=null}then(Z,k,N){return this.V?this.V.then(Z,k,N):this.D===1&&Z?(Z=Z.call(N,this.U))&&typeof Z.then==="function"?Z:Y6(Z):this.D===2&&k?(Z=k.call(N,this.U))&&typeof Z.then==="function"?Z:nb(Z):this}getValue(){return this.U}};M2.prototype.$goog_Thenable=!0;var Zm=!1;var Yh=VL||Fn;var fqr=/^([0-9\.]+):([0-9\.]+)$/;var xmb=class extends oy{constructor(Z){super(Z.message||Z.description||Z.name);this.isMissing=Z instanceof Sr;this.isTimeout=Z instanceof bi&&Z.errorCode=="net.timeout";this.isCanceled=Z instanceof Mz}};xmb.prototype.name="BiscottiError";var Sr=class extends oy{constructor(){super("Biscotti ID is missing from server")}};Sr.prototype.name="BiscottiMissingError";var v4f={format:"RAW",method:"GET",timeout:5E3,withCredentials:!0},G4=null;var JJj={};var tmU=0,er=g.YK?"webkit":$1?"moz":g.yd?"ms":g.vQ?"o":"",hnN=g.Vf("ytDomDomGetNextId")||(()=>++tmU);
g.X0("ytDomDomGetNextId",hnN);var uoy={stopImmediatePropagation:1,stopPropagation:1,preventMouseEvent:1,preventManipulation:1,preventDefault:1,layerX:1,layerY:1,screenX:1,screenY:1,scale:1,rotation:1,webkitMovementX:1,webkitMovementY:1},n4i=class{constructor(Z){this.type="";this.state=this.source=this.data=this.currentTarget=this.relatedTarget=this.target=null;this.charCode=this.keyCode=0;this.metaKey=this.shiftKey=this.ctrlKey=this.altKey=!1;this.rotation=this.clientY=this.clientX=0;this.scale=1;this.changedTouches=this.touches=
null;try{if(Z=Z||window.event){this.event=Z;for(let a in Z)a in uoy||(this[a]=Z[a]);this.scale=Z.scale;this.rotation=Z.rotation;var k=Z.target||Z.srcElement;k&&k.nodeType==3&&(k=k.parentNode);this.target=k;var N=Z.relatedTarget;if(N)try{N=N.nodeName?N:null}catch(a){N=null}else this.type=="mouseover"?N=Z.fromElement:this.type=="mouseout"&&(N=Z.toElement);this.relatedTarget=N;this.clientX=Z.clientX!=void 0?Z.clientX:Z.pageX;this.clientY=Z.clientY!=void 0?Z.clientY:Z.pageY;this.keyCode=Z.keyCode?Z.keyCode:
Z.which;this.charCode=Z.charCode||(this.type=="keypress"?this.keyCode:0);this.altKey=Z.altKey;this.ctrlKey=Z.ctrlKey;this.shiftKey=Z.shiftKey;this.metaKey=Z.metaKey;this.V=Z.pageX;this.U=Z.pageY}}catch(a){}}preventDefault(){this.event&&(this.event.returnValue=!1,this.event.preventDefault&&this.event.preventDefault())}stopPropagation(){this.event&&(this.event.cancelBubble=!0,this.event.stopPropagation&&this.event.stopPropagation())}stopImmediatePropagation(){this.event&&(this.event.cancelBubble=!0,
this.event.stopImmediatePropagation&&this.event.stopImmediatePropagation())}};var pE=g.dX.ytEventsEventsListeners||{};g.X0("ytEventsEventsListeners",pE);var Mar=g.dX.ytEventsEventsCounter||{count:0};g.X0("ytEventsEventsCounter",Mar);var l9R=FM(function(){let Z=!1;try{const k=Object.defineProperty({},"passive",{get:function(){Z=!0}});
window.addEventListener("test",null,k)}catch(k){}return Z}),Iqf=FM(function(){let Z=!1;
try{const k=Object.defineProperty({},"capture",{get:function(){Z=!0}});
window.addEventListener("test",null,k)}catch(k){}return Z});var vW;vW=window;g.z=vW.ytcsi&&vW.ytcsi.now?vW.ytcsi.now:vW.performance&&vW.performance.timing&&vW.performance.now&&vW.performance.timing.navigationStart?()=>vW.performance.timing.navigationStart+vW.performance.now():()=>(new Date).getTime();g.$b(Ev,g.jR);Ev.prototype.N=function(Z){Z.V===void 0&&pRi(Z);var k=Z.V;Z.U===void 0&&pRi(Z);this.V=new g.Of(k,Z.U)};
Ev.prototype.cB=function(){return this.V||new g.Of};
Ev.prototype.Vz=function(){if(this.V){var Z=(0,g.z)();if(this.Y!=0){var k=this.G,N=this.V,a=k.x-N.x;k=k.y-N.y;a=Math.sqrt(a*a+k*k)/(Z-this.Y);this.U[this.D]=Math.abs((a-this.L)/this.L)>.5?1:0;k=0;for(N=0;N<4;N++)k+=this.U[N]||0;k>=3&&this.j();this.L=a}this.Y=Z;this.G=this.V;this.D=(this.D+1)%4}};
Ev.prototype.YW=function(){g.Ob(this.C);g.nE(this.O)};var i$=class extends g.jR{constructor(Z){super();this.j=[];this.xl=Z||this}K(Z,k,N,a,T){N=g.ai((0,g.Dj)(N,a||this.xl));N={target:Z,name:k,callback:N};let K;T&&l9R()&&(K={passive:!0});Z.addEventListener(k,N.callback,K);this.j.push(N);return N}Ce(Z){for(let k=0;k<this.j.length;k++)if(this.j[k]==Z){this.j.splice(k,1);Z.target.removeEventListener(Z.name,Z.callback);break}}U(Z){for(;this.j.length;){const k=this.j.pop();let N;Z&&l9R()&&(N={passive:!0});k.target.removeEventListener(k.name,k.callback,N)}}YW(){this.U();
super.YW()}};var P1f=["att/get"],gRf=["embedded_player"],o_0=["account/get_setting_values"],f9y=["share/get_share_panel"],BSj=["share/get_web_player_share_panel"],DVR=["feedback"],Ocf=["notification/modify_channel_preference"],RYr=["player"],vUj=["browse/edit_playlist"],Ezy=["reel/reel_item_watch"],UW0=["account/set_setting"],icX=["subscription/subscribe"],gUX=["subscription/unsubscribe"],Ikb=["next","unplugged/watch_next"];g.Yq={V6:FM(function(){let Z;try{const k=new gQ;Z=k.isAvailable()?k:null}catch(k){return null}return Z?new g.Ds(Z):null}),
h5:FM(function(){const Z=new wQ;return Z.isAvailable()?new g.Ds(Z):null})};g.gy=window.yt&&window.yt.msgs_||window.ytcfg&&window.ytcfg.msgs||{};g.X0("yt.msgs_",g.gy);var ng0=class{constructor(Z){this.U=void 0;this.V=!1;Z.addEventListener("beforeinstallprompt",k=>{k.preventDefault();this.U=k});
Z.addEventListener("appinstalled",()=>{this.V=!0},{once:!0})}};var KU=class{constructor(){this.jp=!0}NQ(Z,k){Z={};var N=[];"USER_SESSION_ID"in Wr&&N.push({key:"u",value:g.G("USER_SESSION_ID")});if(N=Gr(N))Z.Authorization=N,N=k=k?.sessionIndex,N===void 0&&(N=Number(g.G("SESSION_INDEX",0)),N=isNaN(N)?0:N),g.ii("voice_search_auth_header_removal")||(Z["X-Goog-AuthUser"]=N.toString()),"INNERTUBE_HOST_OVERRIDE"in Wr||(Z["X-Origin"]=window.location.origin),k===void 0&&"DELEGATED_SESSION_ID"in Wr&&(Z["X-Goog-PageId"]=g.G("DELEGATED_SESSION_ID"));return Z}};var Xk={identityType:"UNAUTHENTICATED_IDENTITY_TYPE_UNKNOWN"};var qa=g.Vf("ytglobal.prefsUserPrefsPrefs_")||{};g.X0("ytglobal.prefsUserPrefsPrefs_",qa);
var kJR=class{constructor(){this.V=g.G("ALT_PREF_COOKIE_NAME","PREF");this.U=g.G("ALT_PREF_COOKIE_DOMAIN","youtube.com");const Z=g.a6(this.V);Z&&this.parse(Z)}get(Z,k){mB(Z);CU(Z);Z=qa[Z]!==void 0?qa[Z].toString():null;return Z!=null?Z:k?k:""}set(Z,k){mB(Z);CU(Z);if(k==null)throw Error("ExpectedNotNull");qa[Z]=k.toString()}Aq(Z){return!!((Npf(`f${Math.floor(Z/31)+1}`)||0)&1<<Z%31)}remove(Z){mB(Z);CU(Z);delete qa[Z]}save(){let Z=!0;g.ii("web_secure_pref_cookie_killswitch")&&(Z=!1);g.NS(this.V,this.dump(),
63072E3,this.U,Z)}clear(){g.Uh(qa)}dump(){const Z=[];for(const k in qa)qa.hasOwnProperty(k)&&Z.push(`${k}=`+encodeURIComponent(String(qa[k])));return Z.join("&")}parse(Z){Z=decodeURIComponent(Z).split("&");for(let N=0;N<Z.length;N++){var k=Z[N].split("=");const a=k[0];(k=k[1])&&(qa[a]=k.toString())}}},yC;var Tpf={bluetooth:"CONN_DISCO",cellular:"CONN_CELLULAR_UNKNOWN",ethernet:"CONN_WIFI",none:"CONN_NONE",wifi:"CONN_WIFI",wimax:"CONN_CELLULAR_4G",other:"CONN_UNKNOWN",unknown:"CONN_UNKNOWN","slow-2g":"CONN_CELLULAR_2G","2g":"CONN_CELLULAR_2G","3g":"CONN_CELLULAR_3G","4g":"CONN_CELLULAR_4G"},tC0={CONN_DEFAULT:0,CONN_UNKNOWN:1,CONN_NONE:2,CONN_WIFI:3,CONN_CELLULAR_2G:4,CONN_CELLULAR_3G:5,CONN_CELLULAR_4G:6,CONN_CELLULAR_UNKNOWN:7,CONN_DISCO:8,CONN_CELLULAR_5G:9,CONN_WIFI_METERED:10,CONN_CELLULAR_5G_SA:11,
CONN_CELLULAR_5G_NSA:12,CONN_WIRED:30,CONN_INVALID:31},hyy={EFFECTIVE_CONNECTION_TYPE_UNKNOWN:0,EFFECTIVE_CONNECTION_TYPE_OFFLINE:1,EFFECTIVE_CONNECTION_TYPE_SLOW_2G:2,EFFECTIVE_CONNECTION_TYPE_2G:3,EFFECTIVE_CONNECTION_TYPE_3G:4,EFFECTIVE_CONNECTION_TYPE_4G:5},yRj={"slow-2g":"EFFECTIVE_CONNECTION_TYPE_SLOW_2G","2g":"EFFECTIVE_CONNECTION_TYPE_2G","3g":"EFFECTIVE_CONNECTION_TYPE_3G","4g":"EFFECTIVE_CONNECTION_TYPE_4G"};g.jD=class extends Error{constructor(Z,...k){super(Z);this.args=[...k];Object.setPrototypeOf(this,new.target.prototype)}};var w6i=class{constructor(){this.V=new WeakMap}IU(Z,k){return P9(Z,1,k)}Ep(Z){(Z=this.V.get(Z))&&Z()}};g.Vf("yt.scheduler.instance.timerIdMap_");var H9;H9=class extends w6i{Ux(Z){if(Z===void 0||!Number.isNaN(Number(Z))){var k=g.Vf("yt.scheduler.instance.cancelJob");k?k(Z):g.DA(Z)}}start(){const Z=g.Vf("yt.scheduler.instance.start");Z&&Z()}pause(){const Z=g.Vf("yt.scheduler.instance.pause");Z&&Z()}};g.g3=g.dO();var $s=class{constructor(Z){this.V=(Z=g.xN(Z))?new fP(Z):null;this.D=document.domain||window.location.hostname}U(){return!!this.V}set(Z,k,N,a){N=N||31104E3;this.remove(Z);if(this.U())try{this.V.set(Z,k,Date.now()+N*1E3);return}catch(K){}var T="";if(a)try{T=escape(g.AW(k))}catch(K){return}else T=escape(k);g.NS(Z,T,N,this.D)}get(Z,k){var N=void 0,a=!this.U();if(!a)try{N=this.V.get(Z)}catch(T){a=!0}if(a&&(N=g.a6(Z))&&(N=unescape(N),k))try{N=JSON.parse(N)}catch(T){this.remove(Z),N=void 0}return N}remove(Z){this.U()&&
this.V.remove(Z);g.T4(Z,"/",this.D)}getCreationTime(Z){return this.U()&&(Z=(this.V.xZ(Z)||{}).creation,typeof Z==="number")?Z:null}};var VC=(()=>{let Z;return()=>{Z||(Z=new $s("ytidb"));return Z}})();var uF=[],h0,t0=!1;var $VU,xVy,Gjj,SlU,iF,rRy;
$VU={AUTH_INVALID:"No user identifier specified.",EXPLICIT_ABORT:"Transaction was explicitly aborted.",IDB_NOT_SUPPORTED:"IndexedDB is not supported.",MISSING_INDEX:"Index not created.",MISSING_OBJECT_STORES:"Object stores not created.",DB_DELETED_BY_MISSING_OBJECT_STORES:"Database is deleted because expected object stores were not created.",DB_REOPENED_BY_MISSING_OBJECT_STORES:"Database is reopened because expected object stores were not created.",UNKNOWN_ABORT:"Transaction was aborted for unknown reasons.",QUOTA_EXCEEDED:"The current transaction exceeded its quota limitations.",
QUOTA_MAYBE_EXCEEDED:"The current transaction may have failed because of exceeding quota limitations.",EXECUTE_TRANSACTION_ON_CLOSED_DB:"Can't start a transaction on a closed database",INCOMPATIBLE_DB_VERSION:"The binary is incompatible with the database version"};
xVy={AUTH_INVALID:"ERROR",EXECUTE_TRANSACTION_ON_CLOSED_DB:"WARNING",EXPLICIT_ABORT:"IGNORED",IDB_NOT_SUPPORTED:"ERROR",MISSING_INDEX:"WARNING",MISSING_OBJECT_STORES:"ERROR",DB_DELETED_BY_MISSING_OBJECT_STORES:"WARNING",DB_REOPENED_BY_MISSING_OBJECT_STORES:"WARNING",QUOTA_EXCEEDED:"WARNING",QUOTA_MAYBE_EXCEEDED:"WARNING",UNKNOWN_ABORT:"WARNING",INCOMPATIBLE_DB_VERSION:"WARNING"};
Gjj={AUTH_INVALID:!1,EXECUTE_TRANSACTION_ON_CLOSED_DB:!1,EXPLICIT_ABORT:!1,IDB_NOT_SUPPORTED:!1,MISSING_INDEX:!1,MISSING_OBJECT_STORES:!1,DB_DELETED_BY_MISSING_OBJECT_STORES:!1,DB_REOPENED_BY_MISSING_OBJECT_STORES:!1,QUOTA_EXCEEDED:!1,QUOTA_MAYBE_EXCEEDED:!0,UNKNOWN_ABORT:!0,INCOMPATIBLE_DB_VERSION:!1};
g.Oi=class extends g.jD{constructor(Z,k={},N=$VU[Z],a=xVy[Z],T=Gjj[Z]){super(N,{name:"YtIdbKnownError",isSw:self.document===void 0,isIframe:self!==self.top,type:Z,...k});this.type=Z;this.message=N;this.level=a;this.V=T;Object.setPrototypeOf(this,g.Oi.prototype)}};SlU=class extends g.Oi{constructor(Z,k){super("MISSING_OBJECT_STORES",{expectedObjectStores:k,foundObjectStores:Z},$VU.MISSING_OBJECT_STORES);Object.setPrototypeOf(this,SlU.prototype)}};
iF=class extends Error{constructor(Z,k){super();this.index=Z;this.objectStore=k;Object.setPrototypeOf(this,iF.prototype)}};rRy=["The database connection is closing","Can't start a transaction on a closed database","A mutation operation was attempted on a database that did not allow mutations"];var Gb;Gb=class{constructor(Z){this.V=Z}};g.$h=class{constructor(Z){this.state={status:"PENDING"};this.V=[];this.U=[];Z=Z.V;const k=a=>{if(this.state.status==="PENDING"){this.state={status:"FULFILLED",value:a};for(const T of this.V)T()}},N=a=>{if(this.state.status==="PENDING"){this.state={status:"REJECTED",
reason:a};for(const T of this.U)T()}};
try{Z(k,N)}catch(a){N(a)}}static all(Z){return new g.$h(new Gb((k,N)=>{const a=[];let T=Z.length;T===0&&k(a);for(let K=0;K<Z.length;++K)g.$h.resolve(Z[K]).then(y=>{a[K]=y;T--;T===0&&k(a)}).catch(y=>{N(y)})}))}static resolve(Z){return new g.$h(new Gb((k,N)=>{Z instanceof g.$h?Z.then(k,N):k(Z)}))}static reject(Z){return new g.$h(new Gb((k,N)=>{N(Z)}))}then(Z,k){const N=Z??mQG,a=k??Ckf;
return new g.$h(new Gb((T,K)=>{this.state.status==="PENDING"?(this.V.push(()=>{say(this,this,N,T,K)}),this.U.push(()=>{ARU(this,this,a,T,K)})):this.state.status==="FULFILLED"?say(this,this,N,T,K):this.state.status==="REJECTED"&&ARU(this,this,a,T,K)}))}catch(Z){return this.then(void 0,Z)}};var Hky=class{constructor(Z,k){this.request=Z;this.cursor=k}};var iky=class{constructor(Z,k){this.V=Z;this.options=k;this.transactionCount=0;this.D=Math.round((0,g.z)());this.U=!1}add(Z,k,N){return g.J0(this,[Z],{mode:"readwrite",Mx:!0,commit:oY()},a=>a.objectStore(Z).add(k,N))}clear(Z){return g.J0(this,[Z],{mode:"readwrite",
Mx:!0},k=>k.objectStore(Z).clear())}close(){this.V.close();
this.options?.closed&&this.options.closed()}count(Z,k){return g.J0(this,[Z],{mode:"readonly",Mx:!0,commit:oY()},N=>N.objectStore(Z).count(k))}delete(Z,k){return g.J0(this,[Z],{mode:"readwrite",
Mx:!0,commit:oY()&&!(k instanceof IDBKeyRange)},N=>N.objectStore(Z).delete(k))}get(Z,k){return g.J0(this,[Z],{mode:"readonly",
Mx:!0,commit:oY()},N=>N.objectStore(Z).get(k))}getAll(Z,k,N){return g.J0(this,[Z],{mode:"readonly",
Mx:!0},a=>a.objectStore(Z).getAll(k,N))}put(Z,k,N){return g.J0(this,[Z],{mode:"readwrite",
Mx:!0,commit:oY()},a=>a.objectStore(Z).put(k,N))}objectStoreNames(){return Array.from(this.V.objectStoreNames)}getName(){return this.V.name}},ttr=class{constructor(Z){this.V=Z}add(Z,k){return S5(this.V.add(Z,k))}autoIncrement(){return this.V.autoIncrement}clear(){return S5(this.V.clear()).then(()=>{})}count(Z){return S5(this.V.count(Z))}delete(Z){return Z instanceof IDBKeyRange?uDf(this,Z):S5(this.V.delete(Z))}get(Z){return S5(this.V.get(Z))}getAll(Z,k){return"getAll"in IDBObjectStore.prototype?S5(this.V.getAll(Z,
k)):l1b(this,Z,k)}index(Z){try{return new eny(this.V.index(Z))}catch(k){if(k instanceof Error&&k.name==="NotFoundError")throw new iF(Z,this.V.name);
throw k;}}getName(){return this.V.name}keyPath(){return this.V.keyPath}put(Z,k){return S5(this.V.put(Z,k))}},LQb=class{constructor(Z){this.V=Z;this.U=new Map;this.aborted=!1;this.done=new Promise((k,N)=>{this.V.addEventListener("complete",()=>{k()});
this.V.addEventListener("error",a=>{a.currentTarget===a.target&&N(this.V.error)});
this.V.addEventListener("abort",()=>{var a=this.V.error;if(a)N(a);else if(!this.aborted){a=g.Oi;var T=this.V.objectStoreNames;const K=[];for(let y=0;y<T.length;y++){const Q=T.item(y);if(Q===null)throw Error("Invariant: item in DOMStringList is null");K.push(Q)}a=new a("UNKNOWN_ABORT",{objectStoreNames:K.join(),dbName:this.V.db.name,mode:this.V.mode});N(a)}})})}abort(){this.V.abort();
this.aborted=!0;throw new g.Oi("EXPLICIT_ABORT");}commit(){this.aborted||this.V.commit?.()}objectStore(Z){Z=this.V.objectStore(Z);let k=this.U.get(Z);k||(k=new ttr(Z),this.U.set(Z,k));return k}},eny=class{constructor(Z){this.V=Z}count(Z){return S5(this.V.count(Z))}delete(Z){return g.nU(this,{query:Z},k=>k.delete().then(()=>g.Ma(k)))}get(Z){return S5(this.V.get(Z))}getAll(Z,k){return"getAll"in IDBIndex.prototype?S5(this.V.getAll(Z,k)):OkN(this,Z,k)}keyPath(){return this.V.keyPath}unique(){return this.V.unique}},
vlX=class{constructor(Z,k){this.request=Z;
this.cursor=k}delete(){return S5(this.cursor.delete()).then(()=>{})}getValue(){return this.cursor.value}update(Z){return S5(this.cursor.update(Z))}};var oUf=class{constructor(Z,k){this.name=Z;this.options=k;this.D=!0;this.L=this.Y=0}U(Z,k,N={}){return w1G(Z,k,N)}delete(Z={}){return IY(this.name,Z)}open(){if(!this.D)throw $Qf(this);if(this.V)return this.V;let Z;const k=()=>{this.V===Z&&(this.V=void 0)},N={blocking:T=>{T.close()},
closed:k,Wk:k,upgrade:this.options.upgrade},a=async()=>{var T=Error().stack??"";try{const Q=await this.U(this.name,this.options.version,N);var K=Q,y=this.options;const q=[];for(const r of Object.keys(y.V5)){const {cV:C,zMW:m=Number.MAX_VALUE}=y.V5[r];!(K.V.version>=C)||K.V.version>=m||K.V.objectStoreNames.contains(r)||q.push(r)}if(q.length!==0){const r=Object.keys(this.options.V5),C=Q.objectStoreNames();if(this.L<gu("ytidb_reopen_db_retries",0))return this.L++,Q.close(),lF(new g.Oi("DB_REOPENED_BY_MISSING_OBJECT_STORES",
{dbName:this.name,expectedObjectStores:r,foundObjectStores:C})),a();if(this.Y<gu("ytidb_remake_db_retries",1))return this.Y++,await this.delete(),lF(new g.Oi("DB_DELETED_BY_MISSING_OBJECT_STORES",{dbName:this.name,expectedObjectStores:r,foundObjectStores:C})),a();throw new SlU(C,r);}return Q}catch(Q){if(Q instanceof DOMException?Q.name==="VersionError":"DOMError"in self&&Q instanceof DOMError?Q.name==="VersionError":Q instanceof Object&&"message"in Q&&Q.message==="An attempt was made to open a database using a lower version than the existing version."){T=
await this.U(this.name,void 0,{...N,upgrade:void 0});K=T.V.version;if(this.options.version!==void 0&&K>this.options.version+1)throw T.close(),this.D=!1,$Qf(this,K);return T}k();Q instanceof Error&&!g.ii("ytidb_async_stack_killswitch")&&(Q.stack=`${Q.stack}\n${T.substring(T.indexOf("\n")+1)}`);throw gO(Q,this.name,"",this.options.version??-1);}};
return this.V=Z=a()}};var Ei=new oUf("YtIdbMeta",{V5:{databases:{cV:1}},upgrade(Z,k){k(1)&&zb(Z,"databases",{keyPath:"actualName"})}});var N6,ks=new class{constructor(){}}(new class{constructor(){}});new g.aL;var I1y=class extends oUf{constructor(Z,k){super(Z,k);this.options=k;B9(Z)}U(Z,k,N={}){return(this.options.shared?bky:UQR)(Z,k,{...N})}delete(Z={}){return(this.options.shared?nlj:p1R)(this.name,Z)}};var Ely=KR("ytGcfConfig",{V5:{coldConfigStore:{cV:1},hotConfigStore:{cV:1}},shared:!1,upgrade(Z,k){k(1)&&(bF(zb(Z,"hotConfigStore",{keyPath:"key",autoIncrement:!0}),"hotTimestampIndex","timestamp"),bF(zb(Z,"coldConfigStore",{keyPath:"key",autoIncrement:!0}),"coldTimestampIndex","timestamp"))},version:1});var Jjb=class extends g.jR{constructor(){super();this.U=[];this.V=[];const Z=g.Vf("yt.gcf.config.hotUpdateCallbacks");Z?(this.U=[...Z],this.V=Z):(this.V=[],g.X0("yt.gcf.config.hotUpdateCallbacks",this.V))}YW(){for(const k of this.U){var Z=this.V;const N=Z.indexOf(k);N>=0&&Z.splice(N,1)}this.U.length=0;super.YW()}};var QW=class{constructor(){this.L=!1;this.D=this.Y=0;this.G=new Jjb;this.nF={xjz:()=>{this.L=!0},
gga:()=>this.V,
HND:Z=>{q6(this,Z)},
tB:Z=>{this.tB(Z)},
JQa:Z=>{r2(this,Z)},
If:()=>this.coldHashData,
NH:()=>this.hotHashData,
v8D:()=>this.U,
YsR:()=>CR(),
Lqq:()=>mY(),
dRz:()=>g.Vf("yt.gcf.config.coldHashData"),
lep:()=>g.Vf("yt.gcf.config.hotHashData"),
mem:()=>{yZ0(this)},
Uez:()=>{this.tB(void 0);sX(this);delete QW.instance},
GQt:Z=>{this.D=Z},
o83:()=>this.D}}kC(){return mY()??g.G("RAW_HOT_CONFIG_GROUP")}tB(Z){this.hotHashData=Z;
g.X0("yt.gcf.config.hotHashData",this.hotHashData||null)}};var zni=typeof TextEncoder!=="undefined"?new TextEncoder:null,$7R=zni?Z=>zni.encode(Z):Z=>{Z=g.hx(Z);
const k=new Uint8Array(Z.length);for(let N=0;N<k.length;N++)k[N]=Z[N];return k};var SEr={next:"wn_s",browse:"br_s",search:"sr_s",reel:"r_wrs",player:"ps_s"},owf={next:"wn_r",browse:"br_r",search:"sr_r",reel:"r_wrr",player:"ps_r"};LR.prototype.W9=function(){return{version:this.version,args:this.args}};VW.prototype.toString=function(){return this.topic};var UVy=g.Vf("ytPubsub2Pubsub2Instance")||new g.FC;g.FC.prototype.subscribe=g.FC.prototype.subscribe;g.FC.prototype.unsubscribeByKey=g.FC.prototype.eO;g.FC.prototype.publish=g.FC.prototype.publish;g.FC.prototype.clear=g.FC.prototype.clear;g.X0("ytPubsub2Pubsub2Instance",UVy);var hh=g.Vf("ytPubsub2Pubsub2SubscribedKeys")||{};g.X0("ytPubsub2Pubsub2SubscribedKeys",hh);var uv=g.Vf("ytPubsub2Pubsub2TopicToKeys")||{};g.X0("ytPubsub2Pubsub2TopicToKeys",uv);var fZf=g.Vf("ytPubsub2Pubsub2IsAsync")||{};
g.X0("ytPubsub2Pubsub2IsAsync",fZf);g.X0("ytPubsub2Pubsub2SkipSubKey",null);var gHi=gu("max_body_size_to_compress",5E5),w4X=gu("min_body_size_to_compress",500),x7i=0;var bcG=class{constructor(Z){this.ZW=this.V=!1;this.potentialEsfErrorCounter=this.U=0;this.handleError=()=>{};
this.Dn=()=>{};
this.now=Date.now;this.jn=!1;this.nF={Fmp:k=>{this.Wq=k},
IQa:()=>{this.D()},
Ep:()=>{this.Y()},
jV:async k=>{await this.jV(k)},
vC:(k,N)=>this.vC(k,N),
BC:()=>{this.BC()}};
this.Cy=Z.Cy??100;this.wm=Z.wm??1;this.Mq=Z.Mq??2592E6;this.Z$=Z.Z$??12E4;this.I6=Z.I6??5E3;this.Wq=Z.Wq??void 0;this.pK=!!Z.pK;this.Xj=Z.Xj??.1;this.wL=Z.wL??10;Z.handleError&&(this.handleError=Z.handleError);Z.Dn&&(this.Dn=Z.Dn);Z.jn&&(this.jn=Z.jn);Z.ZW&&(this.ZW=Z.ZW);this.yz=Z.yz;this.oV=Z.oV;this.ux=Z.ux;this.lx=Z.lx;this.Rt=Z.Rt;this.oB=Z.oB;this.Pn=Z.Pn;Bx(this)&&(!this.yz||this.yz("networkless_logging"))&&SPU(this)}writeThenSend(Z,k={}){if(Bx(this)&&this.V){const N={url:Z,options:k,timestamp:this.now(),
status:"NEW",sendCount:0};this.ux.set(N,this.Wq).then(a=>{N.id=a;this.lx.LN()&&this.jV(N)}).catch(a=>{this.jV(N);
D3(this,a)})}else this.Rt(Z,k)}sendThenWrite(Z,k={},N){if(Bx(this)&&this.V){const a={url:Z,
options:k,timestamp:this.now(),status:"NEW",sendCount:0};this.yz&&this.yz("nwl_skip_retry")&&(a.skipRetry=N);if(this.lx.LN()||this.yz&&this.yz("nwl_aggressive_send_then_write")&&!a.skipRetry){if(!a.skipRetry){const T=k.onError?k.onError:()=>{};
k.onError=async(K,y)=>{await this.ux.set(a,this.Wq).catch(Q=>{D3(this,Q)});
T(K,y)}}this.Rt(Z,k,a.skipRetry)}else this.ux.set(a,this.Wq).catch(T=>{this.Rt(Z,k,a.skipRetry);
D3(this,T)})}else N=this.yz&&this.yz("nwl_skip_retry")&&N,this.Rt(Z,k,N)}sendAndWrite(Z,k={}){if(Bx(this)&&this.V){const N={url:Z,
options:k,timestamp:this.now(),status:"NEW",sendCount:0};let a=!1;const T=k.onSuccess?k.onSuccess:()=>{};
N.options.onSuccess=(K,y)=>{N.id!==void 0?this.ux.Xu(N.id,this.Wq):a=!0;this.lx.aT&&this.yz&&this.yz("vss_network_hint")&&this.lx.aT(!0);T(K,y)};
this.Rt(N.url,N.options,void 0,!0);this.ux.set(N,this.Wq).then(K=>{N.id=K;a&&this.ux.Xu(N.id,this.Wq)}).catch(K=>{D3(this,K)})}else this.Rt(Z,k,void 0,!0)}D(){if(!Bx(this))throw Error("IndexedDB is not supported: throttleSend");
this.U||(this.U=this.oV.IU(async()=>{const Z=await this.ux.ao("NEW",this.Wq);Z?(await this.jV(Z),this.U&&(this.U=0,this.D())):this.Y()},this.Cy))}Y(){this.oV.Ux(this.U);
this.U=0}async jV(Z){if(!Bx(this))throw Error("IndexedDB is not supported: immediateSend");Z.id!==void 0&&(await this.ux.pv(Z.id,this.Wq)||this.Dn(Error("The request cannot be found in the database.")));this.vC(Z,this.Mq)?(Z.skipRetry||(Z=JZX(this,Z)),Z&&(Z.skipRetry&&Z.id!==void 0&&await this.ux.Xu(Z.id,this.Wq),this.Rt(Z.url,Z.options,!!Z.skipRetry))):(this.Dn(Error("Networkless Logging: Stored logs request expired age limit")),Z.id!==void 0&&await this.ux.Xu(Z.id,this.Wq))}vC(Z,k){Z=Z.timestamp;
return this.now()-Z>=k?!1:!0}BC(){if(!Bx(this))throw Error("IndexedDB is not supported: retryQueuedRequests");this.ux.ao("QUEUED",this.Wq).then(Z=>{Z&&!this.vC(Z,this.Z$)?this.oV.IU(async()=>{Z.id!==void 0&&await this.ux.wq(Z.id,this.Wq);this.BC()}):this.lx.LN()&&this.D()})}};var OX;var OMf={accountStateChangeSignedIn:23,accountStateChangeSignedOut:24,delayedEventMetricCaptured:11,latencyActionBaselined:6,latencyActionInfo:7,latencyActionTicked:5,offlineTransferStatusChanged:2,offlineImageDownload:335,playbackStartStateChanged:9,systemHealthCaptured:3,mangoOnboardingCompleted:10,mangoPushNotificationReceived:230,mangoUnforkDbMigrationError:121,mangoUnforkDbMigrationSummary:122,mangoUnforkDbMigrationPreunforkDbVersionNumber:133,mangoUnforkDbMigrationPhoneMetadata:134,mangoUnforkDbMigrationPhoneStorage:135,
mangoUnforkDbMigrationStep:142,mangoAsyncApiMigrationEvent:223,mangoDownloadVideoResult:224,mangoHomepageVideoCount:279,mangoHomeV3State:295,mangoImageClientCacheHitEvent:273,sdCardStatusChanged:98,framesDropped:12,thumbnailHovered:13,deviceRetentionInfoCaptured:14,thumbnailLoaded:15,backToAppEvent:318,streamingStatsCaptured:17,offlineVideoShared:19,appCrashed:20,youThere:21,offlineStateSnapshot:22,mdxSessionStarted:25,mdxSessionConnected:26,mdxSessionDisconnected:27,bedrockResourceConsumptionSnapshot:28,
nextGenWatchWatchSwiped:29,kidsAccountsSnapshot:30,zeroStepChannelCreated:31,tvhtml5SearchCompleted:32,offlineSharePairing:34,offlineShareUnlock:35,mdxRouteDistributionSnapshot:36,bedrockRepetitiveActionTimed:37,unpluggedDegradationInfo:229,uploadMp4HeaderMoved:38,uploadVideoTranscoded:39,uploadProcessorStarted:46,uploadProcessorEnded:47,uploadProcessorReady:94,uploadProcessorRequirementPending:95,uploadProcessorInterrupted:96,uploadFrontendEvent:241,assetPackDownloadStarted:41,assetPackDownloaded:42,
assetPackApplied:43,assetPackDeleted:44,appInstallAttributionEvent:459,playbackSessionStopped:45,adBlockerMessagingShown:48,distributionChannelCaptured:49,dataPlanCpidRequested:51,detailedNetworkTypeCaptured:52,sendStateUpdated:53,receiveStateUpdated:54,sendDebugStateUpdated:55,receiveDebugStateUpdated:56,kidsErrored:57,mdxMsnSessionStatsFinished:58,appSettingsCaptured:59,mdxWebSocketServerHttpError:60,mdxWebSocketServer:61,startupCrashesDetected:62,coldStartInfo:435,offlinePlaybackStarted:63,liveChatMessageSent:225,
liveChatUserPresent:434,liveChatBeingModerated:457,liveCreationCameraUpdated:64,liveCreationEncodingCaptured:65,liveCreationError:66,liveCreationHealthUpdated:67,liveCreationVideoEffectsCaptured:68,liveCreationStageOccured:75,offlineSystemFailure:546,liveCreationBroadcastScheduled:123,liveCreationArchiveReplacement:149,liveCreationCostreamingConnection:421,liveCreationPlayablesMetrics:533,liveCreationStreamWebrtcStats:288,liveCreationWebrtcError:526,mdxSessionRecoveryStarted:69,mdxSessionRecoveryCompleted:70,
mdxSessionRecoveryStopped:71,visualElementShown:72,visualElementHidden:73,visualElementGestured:78,visualElementStateChanged:208,screenCreated:156,playbackAssociated:202,visualElementAttached:215,playbackContextEvent:214,cloudCastingPlaybackStarted:74,webPlayerApiCalled:76,tvhtml5AccountDialogOpened:79,foregroundHeartbeat:80,foregroundHeartbeatScreenAssociated:111,kidsOfflineSnapshot:81,mdxEncryptionSessionStatsFinished:82,playerRequestCompleted:83,liteSchedulerStatistics:84,mdxSignIn:85,spacecastMetadataLookupRequested:86,
spacecastBatchLookupRequested:87,spacecastSummaryRequested:88,spacecastPlayback:89,spacecastDiscovery:90,tvhtml5LaunchUrlComponentChanged:91,mdxBackgroundPlaybackRequestCompleted:92,mdxBrokenAdditionalDataDeviceDetected:93,tvhtml5LocalStorage:97,tvhtml5DeviceStorageStatus:147,autoCaptionsAvailable:99,playbackScrubbingEvent:339,flexyState:100,interfaceOrientationCaptured:101,mainAppBrowseFragmentCache:102,offlineCacheVerificationFailure:103,offlinePlaybackExceptionDigest:217,vrCopresenceStats:104,
vrCopresenceSyncStats:130,vrCopresenceCommsStats:137,vrCopresencePartyStats:153,vrCopresenceEmojiStats:213,vrCopresenceEvent:141,vrCopresenceFlowTransitEvent:160,vrCowatchPartyEvent:492,vrCowatchUserStartOrJoinEvent:504,vrPlaybackEvent:345,kidsAgeGateTracking:105,offlineDelayAllowedTracking:106,mainAppAutoOfflineState:107,videoAsThumbnailDownload:108,videoAsThumbnailPlayback:109,liteShowMore:110,renderingError:118,kidsProfilePinGateTracking:119,abrTrajectory:124,scrollEvent:125,streamzIncremented:126,
kidsProfileSwitcherTracking:127,kidsProfileCreationTracking:129,buyFlowStarted:136,mbsConnectionInitiated:138,mbsPlaybackInitiated:139,mbsLoadChildren:140,liteProfileFetcher:144,mdxRemoteTransaction:146,reelPlaybackError:148,reachabilityDetectionEvent:150,mobilePlaybackEvent:151,courtsidePlayerStateChanged:152,musicPersistentCacheChecked:154,musicPersistentCacheCleared:155,playbackInterrupted:157,playbackInterruptionResolved:158,fixFopFlow:159,anrDetection:161,backstagePostCreationFlowEnded:162,clientError:163,
gamingAccountLinkStatusChanged:164,liteHousewarming:165,buyFlowEvent:167,kidsParentalGateTracking:168,kidsSignedOutSettingsStatus:437,kidsSignedOutPauseHistoryFixStatus:438,tvhtml5WatchdogViolation:444,ypcUpgradeFlow:169,yongleStudy:170,ypcUpdateFlowStarted:171,ypcUpdateFlowCancelled:172,ypcUpdateFlowSucceeded:173,ypcUpdateFlowFailed:174,liteGrowthkitPromo:175,paymentFlowStarted:341,transactionFlowShowPaymentDialog:405,transactionFlowStarted:176,transactionFlowSecondaryDeviceStarted:222,transactionFlowSecondaryDeviceSignedOutStarted:383,
transactionFlowCancelled:177,transactionFlowPaymentCallBackReceived:387,transactionFlowPaymentSubmitted:460,transactionFlowPaymentSucceeded:329,transactionFlowSucceeded:178,transactionFlowFailed:179,transactionFlowPlayBillingConnectionStartEvent:428,transactionFlowSecondaryDeviceSuccess:458,transactionFlowErrorEvent:411,liteVideoQualityChanged:180,watchBreakEnablementSettingEvent:181,watchBreakFrequencySettingEvent:182,videoEffectsCameraPerformanceMetrics:183,adNotify:184,startupTelemetry:185,playbackOfflineFallbackUsed:186,
outOfMemory:187,ypcPauseFlowStarted:188,ypcPauseFlowCancelled:189,ypcPauseFlowSucceeded:190,ypcPauseFlowFailed:191,uploadFileSelected:192,ypcResumeFlowStarted:193,ypcResumeFlowCancelled:194,ypcResumeFlowSucceeded:195,ypcResumeFlowFailed:196,adsClientStateChange:197,ypcCancelFlowStarted:198,ypcCancelFlowCancelled:199,ypcCancelFlowSucceeded:200,ypcCancelFlowFailed:201,ypcCancelFlowGoToPaymentProcessor:402,ypcDeactivateFlowStarted:320,ypcRedeemFlowStarted:203,ypcRedeemFlowCancelled:204,ypcRedeemFlowSucceeded:205,
ypcRedeemFlowFailed:206,ypcFamilyCreateFlowStarted:258,ypcFamilyCreateFlowCancelled:259,ypcFamilyCreateFlowSucceeded:260,ypcFamilyCreateFlowFailed:261,ypcFamilyManageFlowStarted:262,ypcFamilyManageFlowCancelled:263,ypcFamilyManageFlowSucceeded:264,ypcFamilyManageFlowFailed:265,restoreContextEvent:207,embedsAdEvent:327,autoplayTriggered:209,clientDataErrorEvent:210,experimentalVssValidation:211,tvhtml5TriggeredEvent:212,tvhtml5FrameworksFieldTrialResult:216,tvhtml5FrameworksFieldTrialStart:220,musicOfflinePreferences:218,
watchTimeSegment:219,appWidthLayoutError:221,accountRegistryChange:226,userMentionAutoCompleteBoxEvent:227,downloadRecommendationEnablementSettingEvent:228,musicPlaybackContentModeChangeEvent:231,offlineDbOpenCompleted:232,kidsFlowEvent:233,kidsFlowCorpusSelectedEvent:234,videoEffectsEvent:235,unpluggedOpsEogAnalyticsEvent:236,playbackAudioRouteEvent:237,interactionLoggingDebugModeError:238,offlineYtbRefreshed:239,kidsFlowError:240,musicAutoplayOnLaunchAttempted:242,deviceContextActivityEvent:243,
deviceContextEvent:244,templateResolutionException:245,musicSideloadedPlaylistServiceCalled:246,embedsStorageAccessNotChecked:247,embedsHasStorageAccessResult:248,embedsItpPlayedOnReload:249,embedsRequestStorageAccessResult:250,embedsShouldRequestStorageAccessResult:251,embedsRequestStorageAccessState:256,embedsRequestStorageAccessFailedState:257,embedsItpWatchLaterResult:266,searchSuggestDecodingPayloadFailure:252,siriShortcutActivated:253,tvhtml5KeyboardPerformance:254,latencyActionSpan:255,elementsLog:267,
ytbFileOpened:268,tfliteModelError:269,apiTest:270,yongleUsbSetup:271,touStrikeInterstitialEvent:272,liteStreamToSave:274,appBundleClientEvent:275,ytbFileCreationFailed:276,adNotifyFailure:278,ytbTransferFailed:280,blockingRequestFailed:281,liteAccountSelector:282,liteAccountUiCallbacks:283,dummyPayload:284,browseResponseValidationEvent:285,entitiesError:286,musicIosBackgroundFetch:287,mdxNotificationEvent:289,layersValidationError:290,musicPwaInstalled:291,liteAccountCleanup:292,html5PlayerHealthEvent:293,
watchRestoreAttempt:294,liteAccountSignIn:296,notaireEvent:298,kidsVoiceSearchEvent:299,adNotifyFilled:300,delayedEventDropped:301,analyticsSearchEvent:302,systemDarkThemeOptOutEvent:303,flowEvent:304,networkConnectivityBaselineEvent:305,ytbFileImported:306,downloadStreamUrlExpired:307,directSignInEvent:308,lyricImpressionEvent:309,accessibilityStateEvent:310,tokenRefreshEvent:311,genericAttestationExecution:312,tvhtml5VideoSeek:313,unpluggedAutoPause:314,scrubbingEvent:315,bedtimeReminderEvent:317,
tvhtml5UnexpectedRestart:319,tvhtml5DeviceStorageStats:535,tvhtml5StabilityTraceEvent:478,tvhtml5OperationHealth:467,tvhtml5WatchKeyEvent:321,voiceLanguageChanged:322,tvhtml5LiveChatStatus:323,parentToolsCorpusSelectedEvent:324,offerAdsEnrollmentInitiated:325,networkQualityIntervalEvent:326,deviceStartupMetrics:328,heartbeatActionPlayerTransitioned:330,tvhtml5Lifecycle:331,heartbeatActionPlayerHalted:332,adaptiveInlineMutedSettingEvent:333,mainAppLibraryLoadingState:334,thirdPartyLogMonitoringEvent:336,
appShellAssetLoadReport:337,tvhtml5AndroidAttestation:338,tvhtml5StartupSoundEvent:340,iosBackgroundRefreshTask:342,iosBackgroundProcessingTask:343,sliEventBatch:344,postImpressionEvent:346,musicSideloadedPlaylistExport:347,idbUnexpectedlyClosed:348,voiceSearchEvent:349,mdxSessionCastEvent:350,idbQuotaExceeded:351,idbTransactionEnded:352,idbTransactionAborted:353,tvhtml5KeyboardLogging:354,idbIsSupportedCompleted:355,creatorStudioMobileEvent:356,idbDataCorrupted:357,parentToolsAppChosenEvent:358,
webViewBottomSheetResized:359,activeStateControllerScrollPerformanceSummary:360,navigatorValidation:361,mdxSessionHeartbeat:362,clientHintsPolyfillDiagnostics:363,clientHintsPolyfillEvent:364,proofOfOriginTokenError:365,kidsAddedAccountSummary:366,musicWearableDevice:367,ypcRefundFlowEvent:368,tvhtml5PlaybackMeasurementEvent:369,tvhtml5WatermarkMeasurementEvent:370,clientExpGcfPropagationEvent:371,mainAppReferrerIntent:372,leaderLockEnded:373,leaderLockAcquired:374,googleHatsEvent:375,persistentLensLaunchEvent:376,
parentToolsChildWelcomeChosenEvent:378,browseThumbnailPreloadEvent:379,finalPayload:380,mdxDialAdditionalDataUpdateEvent:381,webOrchestrationTaskLifecycleRecord:382,startupSignalEvent:384,accountError:385,gmsDeviceCheckEvent:386,accountSelectorEvent:388,accountUiCallbacks:389,mdxDialAdditionalDataProbeEvent:390,downloadsSearchIcingApiStats:391,downloadsSearchIndexUpdatedEvent:397,downloadsSearchIndexSnapshot:398,dataPushClientEvent:392,kidsCategorySelectedEvent:393,mdxDeviceManagementSnapshotEvent:394,
prefetchRequested:395,prefetchableCommandExecuted:396,gelDebuggingEvent:399,webLinkTtsPlayEnd:400,clipViewInvalid:401,persistentStorageStateChecked:403,cacheWipeoutEvent:404,playerEvent:410,sfvEffectPipelineStartedEvent:412,sfvEffectPipelinePausedEvent:429,sfvEffectPipelineEndedEvent:413,sfvEffectChosenEvent:414,sfvEffectLoadedEvent:415,sfvEffectUserInteractionEvent:465,sfvEffectFirstFrameProcessedLatencyEvent:416,sfvEffectAggregatedFramesProcessedLatencyEvent:417,sfvEffectAggregatedFramesDroppedEvent:418,
sfvEffectPipelineErrorEvent:430,sfvEffectGraphFrozenEvent:419,sfvEffectGlThreadBlockedEvent:420,mdeQosEvent:510,mdeVideoChangedEvent:442,mdePlayerPerformanceMetrics:472,mdeExporterEvent:497,genericClientExperimentEvent:423,homePreloadTaskScheduled:424,homePreloadTaskExecuted:425,homePreloadCacheHit:426,polymerPropertyChangedInObserver:427,applicationStarted:431,networkCronetRttBatch:432,networkCronetRttSummary:433,repeatChapterLoopEvent:436,seekCancellationEvent:462,lockModeTimeoutEvent:483,externalVideoShareToYoutubeAttempt:501,
parentCodeEvent:502,offlineTransferStarted:4,musicOfflineMixtapePreferencesChanged:16,mangoDailyNewVideosNotificationAttempt:40,mangoDailyNewVideosNotificationError:77,dtwsPlaybackStarted:112,dtwsTileFetchStarted:113,dtwsTileFetchCompleted:114,dtwsTileFetchStatusChanged:145,dtwsKeyframeDecoderBufferSent:115,dtwsTileUnderflowedOnNonkeyframe:116,dtwsBackfillFetchStatusChanged:143,dtwsBackfillUnderflowed:117,dtwsAdaptiveLevelChanged:128,blockingVisitorIdTimeout:277,liteSocial:18,mobileJsInvocation:297,
biscottiBasedDetection:439,coWatchStateChange:440,embedsVideoDataDidChange:441,shortsFirst:443,cruiseControlEvent:445,qoeClientLoggingContext:446,atvRecommendationJobExecuted:447,tvhtml5UserFeedback:448,producerProjectCreated:449,producerProjectOpened:450,producerProjectDeleted:451,producerProjectElementAdded:453,producerProjectElementRemoved:454,producerAppStateChange:509,producerProjectDiskInsufficientExportFailure:516,producerMediaServicesResetDetails:522,tvhtml5ShowClockEvent:455,deviceCapabilityCheckMetrics:456,
youtubeClearcutEvent:461,offlineBrowseFallbackEvent:463,getCtvTokenEvent:464,startupDroppedFramesSummary:466,screenshotEvent:468,miniAppPlayEvent:469,elementsDebugCounters:470,fontLoadEvent:471,webKillswitchReceived:473,webKillswitchExecuted:474,cameraOpenEvent:475,manualSmoothnessMeasurement:476,tvhtml5AppQualityEvent:477,polymerPropertyAccessEvent:479,miniAppSdkUsage:480,cobaltTelemetryEvent:481,crossDevicePlayback:482,channelCreatedWithObakeImage:484,channelEditedWithObakeImage:485,offlineDeleteEvent:486,
crossDeviceNotificationTransfer:487,androidIntentEvent:488,unpluggedAmbientInterludesCounterfactualEvent:489,keyPlaysPlayback:490,shortsCreationFallbackEvent:493,vssData:491,castMatch:494,miniAppPerformanceMetrics:495,userFeedbackEvent:496,kidsGuestSessionMismatch:498,musicSideloadedPlaylistMigrationEvent:499,sleepTimerSessionFinishEvent:500,watchEpPromoConflict:503,innertubeResponseCacheMetrics:505,miniAppAdEvent:506,dataPlanUpsellEvent:507,producerProjectRenamed:508,producerMediaSelectionEvent:511,
embedsAutoplayStatusChanged:512,remoteConnectEvent:513,connectedSessionMisattributionEvent:514,producerProjectElementModified:515,adsSeenClientLogging:517,producerEvent:518,tvhtml5CleanStart:519,deviceAccountMetricsEvent:520,derpLogEvent:521,playablesPortalEvent:523,ipValidationStarted:524,ipValidationReceived:525,reelsSequenceMutationEvent:527,watchZoomStateChange:528,metadataEditorEvent:529,kidsPrismaDeeplinksEvent:530,creationOrchestrationEvent:531,coordinatedSamplingTriggered:532,dnaRecapScreenshotEvent:534,
mdxLocalNetworkPermissionRequestEvent:536,mdxLocalNetworkPermissionResponseEvent:537,sessionReplayEvent:538,sessionReplayStatusEvent:539,loggingReliabilityProbe:540,keyValueStoreStatsEvent:541,deviceLocationPermissionEvent:542,remoteControlStarted:543,remoteControlCompleted:544,reelsAdsEvents:545,ytlrLoaderTestHarnessEvent:547};var EH0=KR("ServiceWorkerLogsDatabase",{V5:{SWHealthLog:{cV:1}},shared:!0,upgrade:(Z,k)=>{k(1)&&bF(zb(Z,"SWHealthLog",{keyPath:"id",autoIncrement:!0}),"swHealthNewRequest",["interface","timestamp"])},
version:1});var g2={},KDj=0;var w2;var GN=class{constructor(){this.V=new Map;this.U=!1}requestComplete(Z,k){k&&(this.U=!0);Z=this.removeParams(Z);this.V.get(Z)||this.V.set(Z,k)}isEndpointCFR(Z){Z=this.removeParams(Z);return(Z=this.V.get(Z))?!1:Z===!1&&this.U?!0:null}removeParams(Z){return Z.split("?")[0]}};GN.prototype.removeParams=GN.prototype.removeParams;GN.prototype.isEndpointCFR=GN.prototype.isEndpointCFR;GN.prototype.requestComplete=GN.prototype.requestComplete;GN.getInstance=qGN;var SW=class extends g.FQ{constructor(){super();this.U=!1;this.V=ily();this.V.listen("networkstatus-online",()=>{if(this.U&&g.ii("offline_error_handling")){var Z=xs().get("errors",!0);if(Z){for(const k in Z)if(Z[k]){const N=new g.jD(k,"sent via offline_errors");N.name=Z[k].name;N.stack=Z[k].stack;N.level=Z[k].level;g.N2(N)}xs().set("errors",{},2592E3,!0)}}})}LN(){return this.V.LN()}aT(Z){this.V.V=Z}UI(){const Z=window.navigator.onLine;
return Z===void 0?!0:Z}YE(){this.U=!0}listen(Z,k){return this.V.listen(Z,k)}MB(Z){return $3(this.V,Z)}};SW.prototype.sendNetworkCheckRequest=SW.prototype.MB;SW.prototype.listen=SW.prototype.listen;SW.prototype.enableErrorFlushing=SW.prototype.YE;SW.prototype.getWindowStatus=SW.prototype.UI;SW.prototype.networkStatusHint=SW.prototype.aT;SW.prototype.isNetworkAvailable=SW.prototype.LN;SW.getInstance=rif;g.wy=class extends g.FQ{constructor(Z={}){super();this.V=this.Y=0;this.U=rif();const k=g.Vf("yt.networkStatusManager.instance.listen").bind(this.U);k&&(Z.rateLimit?(this.rateLimit=Z.rateLimit,k("networkstatus-online",()=>{CmR(this,"publicytnetworkstatus-online")}),k("networkstatus-offline",()=>{CmR(this,"publicytnetworkstatus-offline")})):(k("networkstatus-online",()=>{this.dispatchEvent("publicytnetworkstatus-online")}),k("networkstatus-offline",()=>{this.dispatchEvent("publicytnetworkstatus-offline")})))}LN(){const Z=
g.Vf("yt.networkStatusManager.instance.isNetworkAvailable");
return Z?Z.bind(this.U)():!0}aT(Z){const k=g.Vf("yt.networkStatusManager.instance.networkStatusHint").bind(this.U);k&&k(Z)}async MB(Z){const k=g.Vf("yt.networkStatusManager.instance.sendNetworkCheckRequest").bind(this.U);return g.ii("skip_network_check_if_cfr")&&qGN().isEndpointCFR("generate_204")?new Promise(N=>{this.aT(window.navigator?.onLine||!0);N(this.LN())}):k?k(Z):!0}};var $f,meN=class extends bcG{constructor(){$f||($f=new g.wy({ETz:!0,vg6:!0}));super({ux:{tP:IZf,Xu:nHf,ao:p4y,pv:Ryy,wq:MCf,set:b_y},lx:$f,handleError:(Z,k,N)=>{const a=N?.error?.code;a===400||a===415?(Z=new g.jD(Z.message,k,N?.error?.code),T_(Z,void 0,void 0,void 0,!0)):g.N2(Z)},
Dn:T_,Rt:AiX,now:g.z,E8:QsG,oV:g.dO(),oB:"publicytnetworkstatus-online",Pn:"publicytnetworkstatus-offline",pK:!0,Xj:.1,wL:gu("potential_esf_error_limit",10),yz:g.ii,jn:!(A0()&&g.kX(document.location.toString())!=="www.youtube-nocookie.com")});this.L=new g.aL;g.ii("networkless_immediately_drop_all_requests")&&jzy();nlj("LogsDatabaseV2")}writeThenSend(Z,k){k||(k={});k=oj(Z,k);A0()||(this.V=!1);super.writeThenSend(Z,k)}sendThenWrite(Z,k,N){k||(k={});k=oj(Z,k);A0()||(this.V=!1);super.sendThenWrite(Z,
k,N)}sendAndWrite(Z,k){k||(k={});k=oj(Z,k);A0()||(this.V=!1);super.sendAndWrite(Z,k)}awaitInitialization(){return this.L.promise}};var PmN=g.dX.ytNetworklessLoggingInitializationOptions||{isNwlInitialized:!1};g.X0("ytNetworklessLoggingInitializationOptions",PmN);g.aE=class{constructor(Z){this.config_=null;Z?this.config_=Z:PzG()&&(this.config_=g.Ah())}isReady(){!this.config_&&PzG()&&(this.config_=g.Ah());return!!this.config_}};var p6U,UX,pR;p6U=g.dX.ytPubsubPubsubInstance||new g.FC;UX=g.dX.ytPubsubPubsubSubscribedKeys||{};pR=g.dX.ytPubsubPubsubTopicToKeys||{};g.bv=g.dX.ytPubsubPubsubIsSynchronous||{};g.FC.prototype.subscribe=g.FC.prototype.subscribe;g.FC.prototype.unsubscribeByKey=g.FC.prototype.eO;g.FC.prototype.publish=g.FC.prototype.publish;g.FC.prototype.clear=g.FC.prototype.clear;g.X0("ytPubsubPubsubInstance",p6U);g.X0("ytPubsubPubsubTopicToKeys",pR);g.X0("ytPubsubPubsubIsSynchronous",g.bv);
g.X0("ytPubsubPubsubSubscribedKeys",UX);var Vuf={};var Rny=class extends g.jR{append(Z){Z=Z.lq();this.lq().appendChild(Z)}},xf=class extends Rny{constructor(Z){super();this.V=Z}lq(){return this.V}};var Mmy=class extends g.jR{constructor(Z,k){super();this.D=[];this.j=!1;this.U=0;this.L=this.G=this.Y=!1;this.Vz=null;const N=(0,g.Dj)(Z,k);this.V=new g.Uc(()=>N(this.Vz),300);
g.u(this,this.V);this.N=this.C=Infinity}onTouchStart(Z){this.j=!0;this.U=Z.touches.length;this.V.isActive()&&(this.V.stop(),this.L=!0);Z=Z.touches;this.G=hwr(this,Z)||Z.length!=1;var k=Z.item(0);this.G||!k?this.N=this.C=Infinity:(this.C=k.clientX,this.N=k.clientY);this.D.length=0;for(k=0;k<Z.length;k++){const N=Z.item(k);this.D.push(N.identifier)}}onTouchMove(Z){Z=Z.changedTouches.item(0);var k;if(k=Hs()){k=g.qG();var N="";if(Xz())N=/Windows (?:NT|Phone) ([0-9.]+)/,N=(k=N.exec(k))?k[1]:"0.0";else if(Hs())N=
/(?:iPhone|iPod|iPad|CPU)\s+OS\s+(\S+)/,N=(k=N.exec(k))&&k[1].replace(/_/g,".");else if(dJ())N=/Mac OS X ([0-9_.]+)/,N=(k=N.exec(k))?k[1].replace(/_/g,"."):"10";else if(K5(g.qG(),"KaiOS"))N=/(?:KaiOS)\/(\S+)/i,N=(k=N.exec(k))&&k[1];else if(Ps())N=/Android\s+([^\);]+)(\)|;)/,N=(k=N.exec(k))&&k[1];else if(Ag()?sD.platform==="Chrome OS":PC("CrOS"))N=/(?:CrOS\s+(?:i686|x86_64)\s+([0-9.]+))/,N=(k=N.exec(k))&&k[1];k=!(g.Qe(N||"",8)>=0)}if(k||Z&&(Z.clientX-this.C)**2+(Z.clientY-this.N)**2>25)this.Y=!0}onTouchEnd(Z){var k=
Z.changedTouches;k&&this.j&&this.U==1&&!this.Y&&!this.L&&!this.G&&hwr(this,k)&&(this.Vz=Z,this.V.start());this.U=Z.touches.length;this.U===0&&(this.Y=this.j=!1,this.D.length=0);this.L=!1}};var kd=Date.now().toString();var yb={};var mo=Symbol("injectionDeps"),GR=class{constructor(Z){this.name=Z}toString(){return`InjectionToken(${this.name})`}},q$=class{constructor(Z){this.key=Z}},Def=class{constructor(){this.U=new Map;this.D=new Map;this.V=new Map;this.nF={H8A:()=>new Map(this.U),
IdW:Z=>{const k=this.U.get(Z.u9),N=this.V.get(Z.u9);this.V.delete(Z.u9);Cm(this,Z);return()=>{this.U.delete(Z.u9);this.V.delete(Z.u9);k&&Cm(this,k);N&&this.V.set(Z.u9,N)}}}}resolve(Z){return Z instanceof q$?sn(this,Z.key,[],!0):sn(this,Z,[])}};var A6;var cu=window;var t6=g.ii("web_enable_lifecycle_monitoring")&&Hu()!==0,wib=g.ii("web_enable_lifecycle_monitoring");var oS0=class{constructor(Z){this.scheduler=g.dO();this.U=new g.aL;this.V=Z;for(let k=0;k<this.V.length;k++){const N=this.V[k];Z=()=>{N.Tn();this.V[k].hs=!0;this.V.every(T=>T.hs===!0)&&this.U.resolve()};
const a=P9(Z,N.priority??0);this.V[k]={...N,Tn:Z,jobId:a}}}cancel(){for(const Z of this.V)Z.jobId===void 0||Z.hs||this.scheduler.Ux(Z.jobId),Z.hs=!0;this.U.resolve()}};var nUr=class{constructor(){this.state="none";this.plugins=[];this.U=void 0;this.Y={};t6&&d6(this.state)}get currentState(){return this.state}install(Z){this.plugins.push(Z);return this}uninstall(...Z){Z.forEach(k=>{k=this.plugins.indexOf(k);k>-1&&this.plugins.splice(k,1)})}transition(Z,k){t6&&i3y(this.state);
var N=this.transitions.find(a=>Array.isArray(a.from)?a.from.find(T=>T===this.state&&a.to===Z):a.from===this.state&&a.to===Z);
if(N){this.D&&(gSr(this.D),this.D=void 0);$eN(this,Z,k);this.state=Z;t6&&d6(this.state);N=N.action.bind(this);const a=this.plugins.filter(T=>T[Z]).map(T=>T[Z]);
N(ewi(this,a),k)}else throw Error(`no transition specified from ${this.state} to ${Z}`);}};var Jiy=class extends nUr{constructor(){super();this.V=null;this.U=10;this.transitions=[{from:"none",to:"application_navigating",action:this.L},{from:"application_navigating",to:"none",action:this.G},{from:"application_navigating",to:"application_navigating",action:()=>{}},
{from:"none",to:"none",action:()=>{}}]}L(Z,k){this.V=g.c9(0,()=>{this.currentState==="application_navigating"&&this.transition("none")},5E3);
Z(k?.event)}G(Z,k){this.V&&(g.g3.Ux(this.V),this.V=null);Z(k?.event)}},h6;var ZS=[];g.X0("yt.logging.transport.getScrapedGelPayloads",function(){return ZS});var ld=void 0,ud=void 0;var On=class{constructor(){this.store={};this.V=0;this.U={};this.nF={xRp:()=>this.V}}storePayload(Z,k){Z=fm(Z);
this.store[Z]?this.store[Z].push(k):(this.U={},this.store[Z]=[k]);this.V++;g.ii("more_accurate_gel_parser")&&(k=new CustomEvent("TRANSPORTING_NEW_EVENT"),window.dispatchEvent(k));return Z}smartExtractMatchingEntries(Z){if(!Z.keys.length)return[];const k=DF(this,Z.keys.splice(0,1)[0]),N=[];for(let a=0;a<k.length;a++)this.store[k[a]]&&Z.sizeLimit&&(this.store[k[a]].length<=Z.sizeLimit?(N.push(...this.store[k[a]]),delete this.store[k[a]]):N.push(...this.store[k[a]].splice(0,Z.sizeLimit)));this.V-=N.length;
Z?.sizeLimit&&N.length<Z?.sizeLimit&&(Z.sizeLimit-=N.length,N.push(...this.smartExtractMatchingEntries(Z)));return N}extractMatchingEntries(Z){Z=DF(this,Z);const k=[];for(let N=0;N<Z.length;N++)this.store[Z[N]]&&(k.push(...this.store[Z[N]]),delete this.store[Z[N]]);this.V-=k.length;return k}getSequenceCount(Z){Z=DF(this,Z);let k=0;for(let N=0;N<Z.length;N++)k+=this.store[Z[N]]?.length||0;return k}};On.prototype.getSequenceCount=On.prototype.getSequenceCount;On.prototype.extractMatchingEntries=On.prototype.extractMatchingEntries;
On.prototype.smartExtractMatchingEntries=On.prototype.smartExtractMatchingEntries;On.prototype.storePayload=On.prototype.storePayload;var fMj=new GR("FinchConfigManagerService");var CUb=gu("initial_gel_batch_timeout",2E3),r2f=gu("gel_queue_timeout_max_ms",6E4),m1N=gu("gel_min_batch_size",5),Gi=void 0,SU=class{constructor(){this.Y=this.V=this.U=0;this.D=!1}},D1i=new SU,B1b=new SU,qIr=new SU,Qlr=new SU,ov,pm=!0,Wu=1,id=new Map,bd=g.dX.ytLoggingTransportTokensToCttTargetIds_||{};g.X0("ytLoggingTransportTokensToCttTargetIds_",bd);var Un=g.dX.ytLoggingTransportTokensToJspbCttTargetIds_||{};g.X0("ytLoggingTransportTokensToJspbCttTargetIds_",Un);var $d={},piy=!1;var kL=g.dX.ytLoggingGelSequenceIdObj_||{};g.X0("ytLoggingGelSequenceIdObj_",kL);var CYy=[];var zr0,eU=g.dX.ytLoggingDocDocumentNonce_;eU||(eU=g.av(16),g.X0("ytLoggingDocDocumentNonce_",eU));zr0=eU;var erj={s8:0,Vj:1,Bt:2,Sy:3,Qj:4,zYq:5,RS:6,SHARE:7,dXR:8,Wp3:9,Tw:10,UZ:11,0:"DEFAULT",1:"CHAT",2:"CONVERSATIONS",3:"MINIPLAYER",4:"DIALOG",5:"VOZ",6:"MUSIC_WATCH_TABS",7:"SHARE",8:"PUSH_NOTIFICATIONS",9:"RICH_GRID_WATCH",10:"PICTURE_IN_PICTURE",11:"MEDIA_CLIENT"};var gXN=1,K9=class{constructor(Z){this.V=Z}getAsJson(){const Z={};this.V.trackingParams!==void 0?Z.trackingParams=this.V.trackingParams:(Z.veType=this.V.veType,this.V.veCounter!==void 0&&(Z.veCounter=this.V.veCounter),this.V.elementIndex!==void 0&&(Z.elementIndex=this.V.elementIndex));this.V.dataElement!==void 0&&(Z.dataElement=this.V.dataElement.getAsJson());this.V.youtubeData!==void 0&&(Z.youtubeData=this.V.youtubeData);this.V.isCounterfactual&&(Z.isCounterfactual=!0);return Z}getAsJspb(){const Z=
new Igj;this.V.trackingParams!==void 0?Z.setTrackingParams(this.V.trackingParams):(this.V.veType!==void 0&&VX(Z,2,VV(this.V.veType)),this.V.veCounter!==void 0&&VX(Z,6,VV(this.V.veCounter)),this.V.elementIndex!==void 0&&VX(Z,3,VV(this.V.elementIndex)),this.V.isCounterfactual&&VX(Z,5,HR(!0)));if(this.V.dataElement!==void 0){var k=this.V.dataElement.getAsJspb();jt(Z,Igj,7,k)}this.V.youtubeData!==void 0&&jt(Z,RCN,8,this.V.jspbYoutubeData);return Z}toString(){return JSON.stringify(this.getAsJson())}isClientVe(){return!this.V.trackingParams&&
!!this.V.veType}getLoggingDirectives(){return this.V.loggingDirectives}};g.X0("yt_logging_screen.getRootVeType",x1N);g.X0("yt_logging_screen.getCurrentCsn",g.C9);g.X0("yt_logging_screen.getCttAuthInfo",mf);g.X0("yt_logging_screen.setCurrentScreen",U1R);var Rry="absolute_experiments app conditional_experiments debugcss debugjs expflag forced_experiments pbj pbjreload sbb spf spfreload sr_bns_address sttick".split(" ");var Toy=[{Ff:Z=>`Cannot read property '${Z.key}'`,
rL:{Error:[{NK:/(Permission denied) to access property "([^']+)"/,groups:["reason","key"]}],TypeError:[{NK:/Cannot read property '([^']+)' of (null|undefined)/,groups:["key","value"]},{NK:/\u65e0\u6cd5\u83b7\u53d6\u672a\u5b9a\u4e49\u6216 (null|undefined) \u5f15\u7528\u7684\u5c5e\u6027\u201c([^\u201d]+)\u201d/,groups:["value","key"]},{NK:/\uc815\uc758\ub418\uc9c0 \uc54a\uc74c \ub610\ub294 (null|undefined) \ucc38\uc870\uc778 '([^']+)' \uc18d\uc131\uc744 \uac00\uc838\uc62c \uc218 \uc5c6\uc2b5\ub2c8\ub2e4./,
groups:["value","key"]},{NK:/No se puede obtener la propiedad '([^']+)' de referencia nula o sin definir/,groups:["key"]},{NK:/Unable to get property '([^']+)' of (undefined or null) reference/,groups:["key","value"]},{NK:/(null) is not an object \(evaluating '(?:([^.]+)\.)?([^']+)'\)/,groups:["value","base","key"]}]}},{Ff:Z=>`Cannot call '${Z.key}'`,
rL:{TypeError:[{NK:/(?:([^ ]+)?\.)?([^ ]+) is not a function/,groups:["base","key"]},{NK:/([^ ]+) called on (null or undefined)/,groups:["key","value"]},{NK:/Object (.*) has no method '([^ ]+)'/,groups:["base","key"]},{NK:/Object doesn't support property or method '([^ ]+)'/,groups:["key"]},{NK:/\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306f '([^']+)' \u30d7\u30ed\u30d1\u30c6\u30a3\u307e\u305f\u306f\u30e1\u30bd\u30c3\u30c9\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u305b\u3093/,groups:["key"]},
{NK:/\uac1c\uccb4\uac00 '([^']+)' \uc18d\uc131\uc774\ub098 \uba54\uc11c\ub4dc\ub97c \uc9c0\uc6d0\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4./,groups:["key"]}]}},{Ff:Z=>`${Z.key} is not defined`,
rL:{ReferenceError:[{NK:/(.*) is not defined/,groups:["key"]},{NK:/Can't find variable: (.*)/,groups:["key"]}]}}];var EX0={yP:[],Ej:[{callback:MRi,weight:500},{callback:nXy,weight:500}]};var IMb=class{constructor(){this.Ej=[];this.yP=[]}},An;var tn=new g.FC;var K$f=new Set,kgf=0,q_b=0,Q8f=0,apf=[],Noy=[],rBX=["PhantomJS","Googlebot","TO STOP THIS SECURITY SCAN go/scan"];var mCR=new g.Y("parallelCommand");var PYN=new g.Y("performOnceCommand");var ABf=new g.Y("serialCommand");var lA=void 0;i6({},"sgPmTd");i6(null,"jypsq");i6(null,"mWiOof");Date.now();var dCy=class extends LR{constructor(Z){super(arguments);this.csn=Z}},lZy=new VW("screen-created",dCy),oE=[],HHf=t4U,Jn=0,O5=new Map,vg=new Map,iA=new Map;var oB=class{constructor(Z,k=null,N={},a,T,K){this.componentType=Z;this.renderer=k;this.macros=N;this.layoutId=a;this.interactionLoggingClientData=T;this.V=K;this.id=MP(Z)}};g.$b(g.n9,g.jR);g.t=g.n9.prototype;g.t.subscribe=function(Z,k,N){return this.jm()?0:this.Ke.subscribe(Z,k,N)};
g.t.unsubscribe=function(Z,k,N){return this.jm()?!1:this.Ke.unsubscribe(Z,k,N)};
g.t.eO=function(Z){return this.jm()?!1:this.Ke.eO(Z)};
g.t.publish=function(Z,k){return this.jm()?!1:this.Ke.publish.apply(this.Ke,arguments)};
g.t.tZ=function(Z,k){for(let N in Z)this.subscribe(N,Z[N],k)};
g.t.kF=function(Z,k){for(let N in Z)this.unsubscribe(N,Z[N],k)};var IK=16/9,I9b=[.25,.5,.75,1,1.25,1.5,1.75,2],jFU=I9b.concat([3,4,5,6,7,8,9,10,15]),EUG=I9b.concat([2.5,3,3.5,4]);var hOi=1;g.JO=class extends g.jR{constructor(Z){super();this.r5={};this.fN={};this.element=this.createElement(Z)}createElement(Z,k){k=k||Z.J==="svg";let N;var a=Z.Z,T=Z.BD;k?(N=document.createElementNS("http://www.w3.org/2000/svg",Z.J),g.iS&&(Z.W||(Z.W={}),Z.W.focusable="false")):N=g.TU(Z.J);if(a){if(a=jH(this,N,"class",a))E5(this,N,"class",a),this.r5[a]=N}else if(T){for(var K of T)this.r5[K]=N;E5(this,N,"class",T.join(" "))}a=Z.Da;T=Z.A;if(a)k=jH(this,N,"child",a),k!==void 0&&N.appendChild(g.K1(k));else if(T){a=
0;for(var y of T)y&&(typeof y==="string"?(T=jH(this,N,"child",y),T!=null&&N.appendChild(g.K1(T))):y.element?N.appendChild(y.element):(K=y,T=this.createElement(K,k),N.appendChild(T),K.Rv&&(K=IE(),T.id=K,T=document.createElementNS("http://www.w3.org/2000/svg","use"),T.setAttribute("class","ytp-svg-shadow"),T.setAttributeNS("http://www.w3.org/1999/xlink","href",`#${K}`),qi(N,T,a++))))}if(Z=Z.W){k=N;for(const Q of Object.keys(Z))y=Z[Q],E5(this,k,Q,typeof y==="string"?jH(this,k,Q,y):y)}return N}Lp(Z){return this.r5[Z]}HD(Z,
k){typeof k==="number"?qi(Z,this.element,k):Z.appendChild(this.element)}detach(){g.rM(this.element)}update(Z){for(const k of Object.keys(Z))this.updateValue(k,Z[k])}updateValue(Z,k){(Z=this.fN[`{{${Z}}}`])&&E5(this,Z[0],Z[1],k)}YW(){this.r5={};this.fN={};this.detach();super.YW()}};g.E=class extends g.JO{constructor(Z){super(Z);this.LF=!0;this.Vz=!1;this.listeners=[]}setContent(Z,k){this.updateValue(k||"content",Z)}show(){this.LF||(g.ij(this.element,"display",""),this.LF=!0)}hide(){this.LF&&(g.ij(this.element,"display","none"),this.LF=!1)}In(Z){Z?this.show():this.hide()}Df(Z){this.Vz=Z}oE(){return this.LF}listen(Z,k,N){return this.K(this.element,Z,k,N)}K(Z,k,N,a){N=(0,g.Dj)(N,a||this);a={target:Z,type:k,listener:N};this.listeners.push(a);Z.addEventListener(k,N);return a}Ce(Z){this.listeners.forEach((k,
N)=>{k===Z&&(k=this.listeners.splice(N,1)[0],k.target.removeEventListener(k.type,k.listener))})}focus(){this.element.focus()}YW(){for(;this.listeners.length;){const Z=this.listeners.pop();
Z&&Z.target.removeEventListener(Z.type,Z.listener)}super.YW()}};g.af=class extends g.E{constructor(Z){super(Z);this.xl=new g.n9;g.u(this,this.xl)}subscribe(Z,k,N){return this.xl.subscribe(Z,k,N)}unsubscribe(Z,k,N){return this.xl.unsubscribe(Z,k,N)}eO(Z){return this.xl.eO(Z)}publish(Z,...k){return this.xl.publish(Z,...k)}};var WHG=new WeakSet,zR=class extends g.af{constructor(Z,k,N,a,T,K,y=null){super(k);this.api=Z;this.macros={};this.componentType=N;this.C=this.N=null;this.Tt=y;this.layoutId=a;this.interactionLoggingClientData=T;this.Iq=K;this.Kp=null;this.eQ=new xf(this.element);g.u(this,this.eQ);this.hq=this.K(this.element,"click",this.onClick);this.vD=[];this.FS=new Mmy(this.onClick,this);g.u(this,this.FS);this.pF=!1;this.Rq=this.zt=null}bind(Z){this.Kp||Z.renderer&&this.init(Z.id,Z.renderer,{},Z);return Promise.resolve()}init(Z,
k,N){this.Kp=Z;this.element.setAttribute("id",this.Kp);this.Tt&&g.jX(this.element,this.Tt);this.zt=k&&k.adRendererCommands;this.Rq=k.interaction;this.Rq?.onTap&&g.jX(this.element,"ytp-ad-component--clickable");this.macros=N;this.N=k.trackingParams||null;this.C=g.J(k.rendererContext,d5r)?.loggingDirectives??k.loggingDirectives;this.N!=null?this.createServerVe(this.element,this.N):this.C&&(Z=this.element,k=this.C,this.api.createServerVe(Z,this,!0),this.api.setTrackingParams(Z,k.trackingParams||null))}clear(){}hide(){super.hide();
(this.N!=null||this.C)&&this.logVisibility(this.element,!1)}show(){super.show();if(!this.pF){this.pF=!0;var Z=this.zt&&this.zt.impressionCommand;const k=this.Rq?.onFirstVisible;Z?this.dA(Z):k&&(Z=f9(k))&&this.dA(Z)}(this.N!=null||this.C)&&this.logVisibility(this.element,!0)}onClick(Z){if((this.N||this.C)&&!WHG.has(Z)){var k=this.element;this.api.hasVe(k)&&this.LF&&this.api.logClick(k,this.interactionLoggingClientData);WHG.add(Z)}var N=this.zt&&this.zt.clickCommand;k=this.Rq?.onTap;if(N){var a=this.O6(N);
this.dA(a)}else{if(N=k)a:{N=this.element;Z=Z.composedPath();for(a of Z){if(a===N)break;if(a.className.indexOf("ytp-ad-component--clickable")>=0){N=!1;break a}}N=!0}N&&(a=f9(k))&&this.dA(a)}}O6(Z){return Z}onTouchStart(Z){this.FS.onTouchStart(Z)}onTouchMove(Z){this.FS.onTouchMove(Z)}onTouchEnd(Z){if(this.FS)this.FS.onTouchEnd(Z)}dA(Z){this.layoutId?this.Iq.executeCommand(Z,this.layoutId):(Z=new g.jD("There is undefined layoutId when calling the runCommand method.",{componentType:this.componentType}),
g.b(Z))}createServerVe(Z,k){this.api.createServerVe(Z,this);this.api.setTrackingParams(Z,k)}logVisibility(Z,k){this.api.hasVe(Z)&&this.api.logVisibility(Z,k,this.interactionLoggingClientData)}YW(){this.clear(null);this.Ce(this.hq);for(const Z of this.vD)this.Ce(Z);super.YW()}};var Bm=class extends zR{constructor(Z,k,N,a,T=[],K="button",y=!1,Q,q=!1){T={J:"button",BD:["ytp-ad-button"].concat(T)};Q!=null&&(T.W={tabindex:Q});super(Z,T,K,k,N,a);this.V=this.U=this.D=null;this.L=y;this.Y=q;this.hide()}init(Z,k,N){super.init(Z,k,N);this.V=k;if(k.text==null&&k.icon==null)g.L9(Error("ButtonRenderer did not have text or an icon set."));else{switch(k.style||null){case "STYLE_UNKNOWN":Z="ytp-ad-button-link";break;default:Z=null}Z!=null&&g.jX(this.element,Z);k.text!=null&&(Z=g.YL(k.text),
g.a2(Z)||(this.element.setAttribute("aria-label",Z),this.D=new g.af({J:"span",Z:"ytp-ad-button-text",Da:Z}),g.u(this,this.D),this.D.HD(this.element)));k.accessibilityData&&k.accessibilityData.accessibilityData&&k.accessibilityData.accessibilityData.label&&!g.a2(k.accessibilityData.accessibilityData.label)&&this.element.setAttribute("aria-label",k.accessibilityData.accessibilityData.label);k.icon!=null&&(k=Xh(k.icon,this.Y),k!=null&&(this.U=new g.af({J:"span",Z:"ytp-ad-button-icon",A:[k]}),g.u(this,
this.U)),this.L?qi(this.element,this.U.element,0):this.U.HD(this.element))}}clear(){this.hide()}onClick(Z){super.onClick(Z);for(const k of kzy(this))this.layoutId?this.Iq.executeCommand(k,this.layoutId):g.b(Error("Missing layoutId for button."));this.api.onAdUxClicked(this.componentType,this.layoutId)}};var NtU=class extends g.jR{constructor(){super();this.V=new Map;this.U=E4f(Z=>{if(Z.target&&(Z=this.V.get(Z.target))&&Z)for(let k=0;k<Z.length;k++)g.iv(Z[k])})}YW(){this.U&&g.nE(this.U);
this.V.clear();LZ=null;super.YW()}register(Z,k){k&&this.V.set(Z,k)}},LZ=null;var Ylr=class extends zR{constructor(Z,k,N,a,T,K=!1){super(Z,{J:"span",BD:["ytp-ad-hover-text-button"].concat(["ytp-ad-info-hover-text-button"])},"ad-info-hover-text-button",k,N,a);this.button=this.U=null;this.L=T;this.D=K;this.hide()}init(Z,k,N){super.init(Z,k,N);Z=k.hoverText||null;k=k.button&&g.J(k.button,Eq)||null;k==null?g.b(Error("AdHoverTextButtonRenderer.button was not set in response.")):(this.button=new Bm(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,void 0,void 0,void 0,
void 0,this.D),g.u(this,this.button),this.button.init(MP("button"),k,this.macros),Z&&this.button.element.setAttribute("aria-label",g.YL(Z)),this.button.HD(this.element),!g.I3(this.button.element,"ytp-ad-clickable")&&g.jX(this.button.element,"ytp-ad-clickable"),this.D&&g.jX(this.button.element,"ytp-ad-hover-text-button--clean-player"),Z&&(this.U=new g.af({J:"div",Z:"ytp-ad-hover-text-container"}),this.L&&(k=new g.af({J:"div",Z:"ytp-ad-hover-text-callout"}),k.HD(this.U.element),g.u(this,k)),g.u(this,
this.U),this.U.HD(this.element),k=VQ(Z),qi(this.U.element,k,0)),this.show())}hide(){this.button&&this.button.hide();this.U&&this.U.hide();super.hide()}show(){this.button&&this.button.show();super.show()}};var UW=class extends zR{constructor(Z,k,N,a,T=null,K=!1){super(Z,{J:"img",Z:"ytp-ad-image"},"ad-image",k,N,a,T);this.V=K;this.hide()}init(Z,k,N){super.init(Z,k,N);N=(Z=k.thumbnail)&&tY(Z)||"";g.a2(N)?Math.random()<.01&&g.L9(Error("Found AdImage without valid image URL")):(this.V?g.ij(this.element,"backgroundImage",`url(${N})`):Ik(this.element,{src:N}),Ik(this.element,{alt:Z&&Z.accessibility&&Z.accessibility.label||""}),k&&k.adRendererCommands&&k.adRendererCommands.clickCommand?this.element.classList.add("ytp-ad-clickable-element"):
this.element.classList.remove("ytp-ad-clickable-element"),this.show())}clear(){this.hide()}};var ZrG=class extends zR{constructor(Z,k,N,a){super(Z,{J:"div",BD:["ytp-ad-confirm-dialog-background"],A:[{J:"div",Z:"ytp-ad-confirm-dialog-container",A:[{J:"div",BD:["ytp-ad-confirm-dialog"].concat([]),W:{role:"dialog",tabindex:"-1"},A:[{J:"div",Z:"ytp-ad-confirm-dialog-title",Da:"{{title}}"},{J:"div",Z:"ytp-ad-confirm-dialog-messages"},{J:"div",Z:"ytp-ad-confirm-dialog-confirm-container",A:[{J:"button",Z:"ytp-ad-confirm-dialog-cancel-button",Da:"{{cancelLabel}}"},{J:"button",Z:"ytp-ad-confirm-dialog-confirm-button",
Da:"{{confirmLabel}}"}]}]}]},{J:"button",BD:["ytp-ad-confirm-dialog-close-overlay-button","ytp-ad-button","ytp-ad-button-link"],A:[{J:"span",Z:"ytp-ad-button-icon",A:[g.Th()]}]}]},"ad-mute-confirm-dialog",k,N,a);this.xW=this.Lp("ytp-ad-confirm-dialog-close-overlay-button");this.j=this.Lp("ytp-ad-confirm-dialog-cancel-button");this.O=this.Lp("ytp-ad-confirm-dialog-confirm-button");this.Sm=this.Lp("ytp-ad-confirm-dialog-messages");this.D=null;this.V=new i$;g.u(this,this.V);this.U=null;this.hide()}hide(){super.hide();
this.D&&this.D.focus()}show(){this.D=document.activeElement;super.show();this.j.focus()}init(Z,k,N){super.init(Z,k,N);this.U=k;k.dialogMessages||k.title!=null?k.confirmLabel==null?g.b(Error("ConfirmDialogRenderer.confirmLabel was not set.")):k.cancelLabel==null?g.b(Error("ConfirmDialogRenderer.cancelLabel was not set.")):yLj(this,k):g.b(Error("Neither ConfirmDialogRenderer.title nor ConfirmDialogRenderer.dialogMessages were set."))}clear(){this.V.U();this.hide()}L(){this.hide()}Y(){const Z=this.U.cancelEndpoint;
Z&&(this.layoutId?this.Iq.executeCommand(Z,this.layoutId):g.b(Error("Missing layoutId for confirm dialog.")));this.hide()}G(){const Z=this.U.confirmNavigationEndpoint||this.U.confirmEndpoint;Z&&(this.layoutId?this.Iq.executeCommand(Z,this.layoutId):g.b(Error("Missing layoutId for confirm dialog.")));this.hide()}};var b$=class extends zR{constructor(Z,k,N,a,T=[]){const K=MP("ytp-ad-toggle-button-input");let y={role:"button","aria-label":"{{tooltipText}}"};Z.X().experiments.yz("fix_h5_toggle_button_a11y")&&(y.tabindex="0");y.role="checkbox";super(Z,{J:"div",BD:["ytp-ad-toggle-button"].concat(T),A:[{J:"label",Z:"ytp-ad-toggle-button-label",W:{"for":K},A:[{J:"span",Z:"ytp-ad-toggle-button-icon",W:y,A:[{J:"span",Z:"ytp-ad-toggle-button-untoggled-icon",Da:"{{untoggledIconTemplateSpec}}"},{J:"span",Z:"ytp-ad-toggle-button-toggled-icon",
Da:"{{toggledIconTemplateSpec}}"}]},{J:"input",Z:"ytp-ad-toggle-button-input",W:{id:K,type:"checkbox"}},{J:"span",Z:"ytp-ad-toggle-button-text",Da:"{{buttonText}}"},{J:"span",Z:"ytp-ad-toggle-button-tooltip",Da:"{{tooltipText}}"}]}]},"toggle-button",k,N,a);this.Y=this.Lp("ytp-ad-toggle-button");this.V=this.Lp("ytp-ad-toggle-button-input");this.U=this.Lp("ytp-ad-toggle-button-icon");this.G=this.Lp("ytp-ad-toggle-button-untoggled-icon");this.L=this.Lp("ytp-ad-toggle-button-toggled-icon");this.xW=this.Lp("ytp-ad-toggle-button-text");
this.D=null;this.O=!1;this.hide()}init(Z,k,N){super.init(Z,k,N);this.D=k;if(k.defaultText==null&&k.defaultIcon==null)g.b(Error("ToggleButtonRenderer must have either text or icon set."));else if(k.defaultIcon==null&&k.toggledIcon!=null)g.b(Error("ToggleButtonRenderer cannot have toggled icon set without a default icon."));else{if(k.style){switch(k.style.styleType){case "STYLE_UNKNOWN":case "STYLE_DEFAULT":Z="ytp-ad-toggle-button-default-style";break;default:Z=null}Z!=null&&g.jX(this.Y,Z)}Z={};k.defaultText?
(N=g.YL(k.defaultText),g.a2(N)||(Z.buttonText=N,this.api.X().experiments.yz("a11y_h5_associate_survey_question")||this.V.setAttribute("aria-label",N),this.api.X().experiments.yz("fix_h5_toggle_button_a11y")&&this.U.setAttribute("aria-label",N))):g.jA(this.xW,!1);k.defaultTooltip&&(Z.tooltipText=k.defaultTooltip,this.V.hasAttribute("aria-label")||this.U.setAttribute("aria-label",k.defaultTooltip));k.defaultIcon?(N=Xh(k.defaultIcon),this.updateValue("untoggledIconTemplateSpec",N),k.toggledIcon?(this.O=
!0,N=Xh(k.toggledIcon),this.updateValue("toggledIconTemplateSpec",N)):(g.jA(this.G,!0),g.jA(this.L,!1)),g.jA(this.V,!1)):g.jA(this.U,!1);g.ze(Z)||this.update(Z);k.isToggled&&(g.jX(this.Y,"ytp-ad-toggle-button-toggled"),this.toggleButton(k.isToggled));fZ(this);this.K(this.element,"change",this.j);this.show()}}onClick(Z){this.vD.length>0&&(this.toggleButton(!this.isToggled()),this.j());super.onClick(Z)}j(){g.D(this.Y,"ytp-ad-toggle-button-toggled",this.isToggled());for(const Z of QAN(this,this.isToggled()))this.layoutId?
this.Iq.executeCommand(Z,this.layoutId):g.b(Error("Missing layoutId for toggle button."));if(this.isToggled())this.api.onAdUxClicked("toggle-button",this.layoutId);fZ(this)}clear(){this.hide()}toggleButton(Z){g.D(this.Y,"ytp-ad-toggle-button-toggled",Z);this.V.checked=Z;fZ(this)}isToggled(){return this.V.checked}};var Mn0=class{constructor(Z,k,N){this.actionType=k;this.id=N;this.content=Z}};var kDR=class extends i${constructor(Z){super();this.V=Z;this.K(this.V,"onAdUxUpdate",this.G)}G(Z){if(Array.isArray(Z))for(const k of Z)k instanceof Mn0&&this.Y(k)}};var PHf=class extends zR{constructor(Z,k,N,a){super(Z,{J:"div",Z:"ytp-ad-feedback-dialog-background",A:[{J:"div",Z:"ytp-ad-feedback-dialog-container",A:[{J:"div",Z:"ytp-ad-feedback-dialog-form",W:{role:"dialog",tabindex:"-1"},A:[{J:"div",Z:"ytp-ad-feedback-dialog-title",A:[{J:"span",Da:"{{title}}"}]},{J:"span",Z:"ytp-ad-info-dialog-feedback-options-title",Da:"{{reasonsTitle}}"},{J:"div",Z:"ytp-ad-info-dialog-feedback-options"},{J:"div",Z:"ytp-ad-feedback-dialog-confirm-container",A:[{J:"button",Z:"ytp-ad-feedback-dialog-cancel-button",
Da:"{{cancelLabel}}"},{J:"button",Z:"ytp-ad-feedback-dialog-confirm-button",Da:"{{confirmLabel}}"}]}]}]}]},"ad-info-dialog",k,N,a);this.Y=[];this.V=null;this.L=this.Lp("ytp-ad-feedback-dialog-cancel-button");this.G=this.Lp("ytp-ad-feedback-dialog-confirm-button");this.O=this.Lp("ytp-ad-info-dialog-feedback-options");this.xW=this.Lp("ytp-ad-feedback-dialog-title");this.D=this.U=null;this.hide()}init(Z,k,N){super.init(Z,k,N);k.reasons?k.confirmLabel==null?g.b(Error("AdFeedbackRenderer.confirmLabel was not set.")):
(k.cancelLabel==null&&g.L9(Error("AdFeedbackRenderer.cancelLabel was not set.")),k.title==null&&g.L9(Error("AdFeedbackRenderer.title was not set.")),myU(this,k)):g.b(Error("AdFeedbackRenderer.reasons were not set."))}clear(){I6(this.L);I6(this.G);this.Y.length=0;this.hide()}hide(){this.V&&this.V.hide();this.U&&this.U.hide();super.hide();this.D&&this.D.focus()}show(){this.V&&this.V.show();this.U&&this.U.show();this.D=document.activeElement;super.show();this.L.focus()}j(){this.api.onAdUxClicked("ad-feedback-dialog-close-button",
this.layoutId);this.publish("a");this.hide()}Sm(){this.hide()}},sAj=class{constructor(Z,k){this.U=k;this.V=new g.af({J:"label",Z:"ytp-ad-feedback-dialog-reason-label",A:[{J:"input",Z:"ytp-ad-feedback-dialog-reason-input",W:{type:"radio",name:"feedback-reason-group"}},{J:"span",Z:"ytp-ad-feedback-dialog-reason-text",Da:g.YL(Z)}]});this.D=this.V.Lp("ytp-ad-feedback-dialog-reason-input")}lq(){return this.V.element}getCommand(){return this.U}isChecked(){return this.D.checked}};var HIG=class extends ZrG{L(Z){super.L(Z);this.api.onAdUxClicked("ad-mute-confirm-dialog-close-button")}Y(Z){super.Y(Z);this.api.onAdUxClicked("ad-mute-confirm-dialog-close-button")}G(Z){super.G(Z);this.api.onAdUxClicked("ad-mute-confirm-dialog-confirm-button");this.publish("b")}};var hTG=class extends zR{constructor(Z,k,N,a,T){super(Z,{J:"div",Z:"ytp-ad-info-dialog-background",A:[{J:"div",Z:"ytp-ad-info-dialog-container",A:[{J:"div",Z:"ytp-ad-info-dialog-form",W:{role:"dialog",tabindex:"-1"},A:[{J:"div",Z:"ytp-ad-info-dialog-title",Da:"{{title}}"},{J:"ul",Z:"ytp-ad-info-dialog-ad-reasons"},{J:"div",Z:"ytp-ad-info-dialog-message"},{J:"div",Z:"ytp-ad-info-dialog-mute-container"},{J:"div",Z:"ytp-ad-info-dialog-confirm-container",A:[{J:"button",Z:"ytp-ad-info-dialog-confirm-button",
Da:"{{confirmLabel}}"}]}]}]}]},"ad-info-dialog",k,N,a);this.V=this.U=null;this.G=this.Lp("ytp-ad-info-dialog-confirm-button");this.Qz=this.Lp("ytp-ad-info-dialog-mute-container");this.MX=this.Lp("ytp-ad-info-dialog-message");this.Sm=this.Lp("ytp-ad-info-dialog-ad-reasons");this.Y=this.D=null;this.O=T;this.L=null;this.tq=!1;this.j=null;this.hide()}init(Z,k,N){super.init(Z,k,N);this.L=k;if(k.dialogMessage==null&&k.title==null)g.b(Error("Neither AdInfoDialogRenderer.dialogMessage nor AdInfoDialogRenderer.title was set."));
else{k.confirmLabel==null&&g.L9(Error("AdInfoDialogRenderer.confirmLabel was not set."));if(Z=k.closeOverlayRenderer&&g.J(k.closeOverlayRenderer,Eq)||null)this.V=new Bm(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,["ytp-ad-info-dialog-close-button"],"ad-info-dialog-close-button"),g.u(this,this.V),this.V.init(MP("button"),Z,this.macros),this.V.HD(this.element);k.title&&(Z=g.YL(k.title),this.updateValue("title",Z));if(k.adReasons)for(Z=k.adReasons,N=0;N<Z.length;N++){const a=VQ(Z[N]);
if(!g.a2(a.textContent)){const T=a4("LI");T.appendChild(a);this.Sm.appendChild(T)}}else g.jA(this.Sm,!1);k.dialogMessage&&(Z=VQ(k.dialogMessage,!0),this.MX.appendChild(Z));k.confirmLabel&&(Z=g.YL(k.confirmLabel),this.updateValue("confirmLabel",Z));k.muteAdRenderer&&(k=g.J(k.muteAdRenderer,Eq)||null)&&(Z=k.navigationEndpoint&&g.J(k.navigationEndpoint,FqU)||null,N=k.navigationEndpoint&&g.J(k.navigationEndpoint,Jrr)||null,Z==null&&N==null?g.L9(Error("AdInfoDialogRenderer.muteAdRenderer was specified but contains neither an AdFeedbackEndpoint, nor a ConfirmDialogEndpoint.")):
(Z?cLR(this,Z):N&&dyR(this,N),this.D=new Bm(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,["ytp-ad-info-dialog-mute-button"],"button",!0),g.u(this,this.D),this.D.init(MP("button"),k,this.macros),this.D.listen("click",this.s6,this),this.D.HD(this.Qz)));ALy(this)}}clear(){I6(this.G);this.hide()}hide(){this.U?this.U.hide():this.Y&&this.Y.hide();this.V&&this.V.hide();this.D&&this.D.hide();super.hide();this.j&&this.j.focus()}show(){this.V&&this.V.show();this.D&&this.D.show();if(!this.tq){const Z=
this.L&&this.L.impressionEndpoints||[];for(const k of Z)this.layoutId?this.Iq.executeCommand(k,this.layoutId):g.b(Error("Missing layoutId for ad info dialog."));this.tq=!0}this.j=document.activeElement;super.show();this.G.focus()}xW(){if(this.L&&this.L.confirmServiceEndpoint){const Z=this.L.confirmServiceEndpoint;this.layoutId?this.Iq.executeCommand(Z,this.layoutId):g.b(Error("Missing layoutId for ad info dialog."))}this.api.onAdUxClicked("ad-info-dialog-close-button",this.layoutId);this.publish("d");
this.hide()}s6(){const Z=this.U?this.U:this.Y;Z&&!Z.LF&&(this.hide(),Z.show())}};var yG=class extends Ylr{constructor(Z,k,N,a,T,K=!0,y=!1){super(Z,k,N,a,K,y);this.V=null;this.Y=T;this.hide()}init(Z,k,N){super.init(Z,k,N);Z=k.button&&g.J(k.button,Eq)||null;Z!=null&&(FFR(this,Z,N),this.show())}hide(){this.button&&this.button.hide();this.V&&this.V.hide();super.hide()}show(){this.button&&this.button.show();super.show()}clear(){this.hide()}};var p4=class extends zR{constructor(Z,k,N,a,T=null,K="ad-text"){super(Z,{J:"div",Z:"ytp-ad-text"},K,k,N,a,T);this.V=null;this.hide()}init(Z,k,N){super.init(Z,k,N);this.V=k;this.isTemplated()||g.m_(this.element,Wg(this.V));if(k.backgroundImage&&(Z=(Z=k.backgroundImage.thumbnail)?tY(Z):"",N=(N=this.api.getVideoData({playerType:1}))&&N.WU,Z&&N&&(this.element.style.backgroundImage=`url(${Z})`,this.element.style.backgroundSize="100%"),k.style&&k.style.adTextStyle))switch(k.style.adTextStyle.fontSize){case "AD_FONT_SIZE_MEDIUM":this.element.style.fontSize=
"26px"}(Z=g.qc(k.targetId))&&this.element.setAttribute("data-tooltip-target-id",Z);k&&k.adRendererCommands&&k.adRendererCommands.clickCommand?this.element.classList.add("ytp-ad-clickable-element"):this.element.classList.remove("ytp-ad-clickable-element");this.show()}isTemplated(){return this.V.isTemplated||!1}clear(){this.hide()}};var Nhj={seekableStart:0,seekableEnd:1,current:0};var RB=class extends zR{constructor(Z,k,N,a,T,K,y){super(Z,k,N,a,T,K);this.V=y;g.u(this,this.V);this.MX=this.O=-1}clear(){this.dispose()}};g.ML=class extends g.jR{constructor(Z,k,N,a,T,K){super();this.element=Z;this.state=null;N||Z.hide();this.D=k;this.Y=a===void 0?k:a;this.U=K;this.onHidden=T;this.delay=new g.Uc(this.V,0,this);g.u(this,this.delay)}show(Z){this.state!==1&&this.state!==2&&(this.state===4&&this.V(),this.state===5?(this.element.show(),this.state=null,this.delay.stop(),this.U&&this.U()):this.element.LF||(iy(this,!0),this.state=1,Z?this.delay.start(Z):this.V()))}hide(){this.state!==4&&(this.state===1||this.state===2?(this.element.hide(),
this.state=null,this.delay.stop()):this.element.LF&&(iy(this,!0),this.state=4,this.delay.start(this.Y)))}V(){switch(this.state){case 1:this.element.show();this.state=2;this.delay.start(10);break;case 2:iy(this,!1);this.state=3;this.delay.start(this.D);break;case 3:this.state=null;this.U&&this.U();break;case 4:this.element.hide();iy(this,!1);this.state=5;this.delay.start(0);break;case 5:if(this.state=null,this.onHidden)this.onHidden()}}stop(){for(;this.state!==null&&this.state!==5;)this.delay.stop(),
this.V()}YW(){this.element.jm()||this.element.element.removeAttribute("aria-hidden");super.YW()}};var n4=class extends RB{constructor(Z,k,N,a,T,K){super(Z,{J:"div",Z:"ytp-ad-preview-slot"},"ad-preview",k,N,a,T);this.s6=-1;this.G=this.api.X().experiments.yz("enable_modern_skip_button_on_web");this.U=new g.af({J:"span",Z:"ytp-ad-preview-container"});this.G&&this.U.element.classList.add("ytp-ad-preview-container-detached");g.u(this,this.U);this.Y=this.G?new p4(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,"ytp-ad-preview-text-modern"):new p4(this.api,this.layoutId,this.interactionLoggingClientData,
this.Iq,"ytp-ad-preview-text");g.u(this,this.Y);this.Y.HD(this.U.element);this.Sm=this.G?new g.af({J:"span",Z:"ytp-ad-preview-image-modern"}):new g.af({J:"span",Z:"ytp-ad-preview-image"});g.u(this,this.Sm);this.j=new UW(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq);g.u(this,this.j);this.j.HD(this.Sm.element);this.Sm.HD(this.U.element);this.U.HD(this.element);this.xW=new g.ML(this.U,400,!1,100,()=>this.hide());
g.u(this,this.xW);this.tq=0;this.Qz=!1;this.qX=K;this.hide()}init(Z,k,N){super.init(Z,k,N);Z=k.durationMilliseconds;typeof Z==="number"&&Z<0&&g.b(Error("durationMilliseconds was specified incorrectly in AdPreviewRenderer with a value of: "+Z));this.qX&&(this.G?g.jX(this.U.element,"modern-countdown-next-to-thumbnail"):g.jX(this.U.element,"countdown-next-to-thumbnail"));Z=k.durationMilliseconds;this.tq=Z==null||Z===0?this.V.Qx():Z;if(k.templatedCountdown)var a=k.templatedCountdown.templatedAdText;else k.staticPreview&&
(a=k.staticPreview);this.Y.init(MP("ad-text"),a,N);(a=this.api.getVideoData({playerType:1}))&&a.WU&&k.thumbnail?this.j.init(MP("ad-image"),k.thumbnail,N):(this.Sm.hide(),this.G&&this.qX&&g.jX(this.Y.element,"ytp-ad-preview-text-modern-postroll"))}clear(){this.hide()}hide(){this.U.hide();this.Y.hide();this.j.hide();vm(this);super.hide()}show(){Ow(this);this.U.show();this.Y.show();this.j.show();super.show()}L(){this.hide()}D(){if(this.V!=null){var Z=this.V.getProgressState();Z!=null&&Z.current!=null&&
(Z=1E3*Z.current,!this.Qz&&Z>=this.tq?(this.xW.hide(),this.Qz=!0,this.publish("i")):this.Y&&this.Y.isTemplated()&&(Z=Math.max(0,Math.ceil((this.tq-Z)/1E3)),Z!=this.s6&&(DR(this.Y,{TIME_REMAINING:String(Z)}),this.s6=Z)))}}};var avy=class extends RB{constructor(Z,k,N,a,T,K){super(Z,{J:"div",BD:["ytp-flyout-cta","ytp-flyout-cta-inactive"],A:[{J:"div",Z:"ytp-flyout-cta-icon-container"},{J:"div",Z:"ytp-flyout-cta-body",A:[{J:"div",Z:"ytp-flyout-cta-text-container",A:[{J:"div",Z:"ytp-flyout-cta-headline-container"},{J:"div",Z:"ytp-flyout-cta-description-container"}]},{J:"div",Z:"ytp-flyout-cta-action-button-container"}]}]},"flyout-cta",k,N,a,T);this.Y=new UW(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,
"ytp-flyout-cta-icon");g.u(this,this.Y);this.Y.HD(this.Lp("ytp-flyout-cta-icon-container"));this.Y.element.classList.add("ytp-flyout-cta-icon-rounded");this.j=new p4(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,"ytp-flyout-cta-headline");g.u(this,this.j);this.j.HD(this.Lp("ytp-flyout-cta-headline-container"));this.G=new p4(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,"ytp-flyout-cta-description");g.u(this,this.G);this.G.HD(this.Lp("ytp-flyout-cta-description-container"));
this.U=new Bm(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,["ytp-flyout-cta-action-button","ytp-flyout-cta-action-button-rounded"]);g.u(this,this.U);this.U.HD(this.Lp("ytp-flyout-cta-action-button-container"));this.U.element.setAttribute("tabIndex","-1");x3(this.U.element);this.xW=null;this.tq=0;this.Qz=K;this.hide()}init(Z,k,N){super.init(Z,k,N);if(k.image&&k.image.thumbnail)if(k.headline)if(k.description)if((Z=k.actionButton&&g.J(k.actionButton,Eq))&&Z.navigationEndpoint){const T=
this.api.getVideoData({playerType:2});if(T!=null)if(k.image&&k.image.thumbnail){var a=k.image.thumbnail.thumbnails;a!=null&&a.length>0&&g.a2(g.qc(a[0].url))&&(a[0].url=T.profilePicture)}else g.L9(Error("FlyoutCtaRenderer does not have image.thumbnail."));this.Y.init(MP("ad-image"),k.image,N);this.j.init(MP("ad-text"),k.headline,N);this.G.init(MP("ad-text"),k.description,N);this.U.init(MP("button"),Z,N);N=eX(this.U.element);SX(this.U.element,N+" This link opens in new tab");this.xW=Z.navigationEndpoint;
this.api.MZ()||this.show();this.api.addEventListener("playerUnderlayVisibilityChange",this.Sm.bind(this));this.tq=k.startMs||0;Ow(this)}else g.b(Error("FlyoutCtaRenderer has no valid action button."));else g.b(Error("FlyoutCtaRenderer has no description AdText."));else g.b(Error("FlyoutCtaRenderer has no headline AdText."));else g.L9(Error("FlyoutCtaRenderer has no image."))}onClick(Z){super.onClick(Z);this.api.pauseVideo();!g.C1(this.U.element,Z.target)&&this.xW&&(this.layoutId?this.Iq.executeCommand(this.xW,
this.layoutId):g.b(Error("Missing layoutId for flyout cta.")))}D(){if(this.V){var Z=this.V.getProgressState();(Z&&Z.current||this.Qz)&&1E3*Z.current>=this.tq&&(vm(this),g.Wp(this.element,"ytp-flyout-cta-inactive"),this.U.element.removeAttribute("tabIndex"))}}L(){this.clear()}clear(){this.hide();this.api.removeEventListener("playerUnderlayVisibilityChange",this.Sm.bind(this))}show(){this.U&&this.U.show();super.show()}hide(){this.U&&this.U.hide();super.hide()}Sm(Z){Z=="hidden"?this.show():this.hide()}};var Thy=class extends zR{constructor(Z,k,N,a){super(Z,{J:"div",Z:"ytp-ad-instream-user-sentiment-container"},"instream-user-sentiment",k,N,a,null);this.V=null;this.D=new b$(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,["ytp-ad-instream-user-sentiment-like-button"]);g.u(this,this.D);this.D.HD(this.element);this.U=new b$(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,["ytp-ad-instream-user-sentiment-dislike-button"]);g.u(this,this.U);this.U.HD(this.element);this.Y=
new g.ML(this,400,!1,500,()=>this.hide());
g.u(this,this.Y);this.hide()}init(Z,k,N){super.init(Z,k,N);this.V=k;if(this.V.rectangle){Z=this.V.likeButton&&g.J(this.V.likeButton,D8);k=this.V.dislikeButton&&g.J(this.V.dislikeButton,D8);this.D.init(MP("toggle-button"),Z,N);this.U.init(MP("toggle-button"),k,N);this.K(this.element,"change",this.L);this.Y.show(100);this.show();for(const a of this.V&&this.V.impressionCommands||[])this.layoutId?this.Iq.executeCommand(a,this.layoutId):g.b(Error("Missing layoutId for instream user sentiment."))}}clear(){this.hide()}hide(){this.D.hide();
this.U.hide();super.hide()}show(){this.D.show();this.U.show();super.show()}L(){Zs(this.element,"ytp-ad-instream-user-sentiment-selected");this.V.postMessageAction&&g.A7(this.api,"onYtShowToast",this.V.postMessageAction);this.Y.hide()}onClick(Z){this.vD.length>0&&this.L();super.onClick(Z)}};var IB=class extends g.jR{constructor(Z,k,N,a,T=0,K=!1){super();this.U=Z;this.D=!1;this.zt=a;this.xW=K;this.G=!1;this.V=null;k>0&&(this.V=new g.Uc(this.Vz,k,this),g.u(this,this.V));this.L=new g.Uc(this.Vz,N,this);g.u(this,this.L);this.O=aP(this.U,T,1,a);g.u(this,this.O);this.j=aP(this.U,0,a,1);g.u(this,this.j);this.Y=new i$;g.u(this,this.Y)}YW(){this.reset();super.YW()}reset(){this.Y.U();this.G=!1;this.V&&this.V.stop();this.L.stop();this.D&&(this.D=!1,this.j.play())}start(){this.reset();this.Y.K(this.U,
"mouseover",this.N,this);this.Y.K(this.U,"mouseout",this.C,this);this.xW&&(this.Y.K(this.U,"focusin",this.N,this),this.Y.K(this.U,"focusout",this.C,this));this.V?this.V.start():(this.G=this.D=!0,g.ij(this.U,{opacity:this.zt}))}N(){this.D&&(this.D=!1,this.j.play());this.L.stop();this.V&&this.V.stop()}C(){this.G?this.L.start():this.V&&this.V.start()}Vz(){this.D||(this.D=!0,this.O.play(),this.G=!0)}};var jU=class{constructor(Z,k){this.U=Z;this.V=k}},BtR=[new jU("b.f_",0),new jU("j.s_",2),new jU("r.s_",4),new jU("e.h_",6),new jU("i.s_",8),new jU("s.t_",10),new jU("p.h_",12),new jU("s.i_",14),new jU("f.i_",16),new jU("a.b_",18),new jU("a.o_"),new jU("g.o_",22),new jU("p.i_",24),new jU("p.m_"),new jU("n.k_",20),new jU("i.f_"),new jU("a.s_"),new jU("m.c_"),new jU("n.h_",26),new jU("o.p_"),new jU("m.p_",28),new jU("o.a_"),new jU("d.p_"),new jU("e.i_")].reduce((Z,k)=>{Z[k.U]=k;return Z},{});g.d7=class{constructor(Z,k){this.state=Z;this.oldState=k}Ub(Z){return $Z(this,Z)>0}};var Key=class extends RB{constructor(Z,k,N,a,T,K){super(Z,{J:"div",Z:"ytp-ad-skip-button-slot"},"skip-button",k,N,a,T);this.xW=null;this.Sm=!1;this.Qz=K;this.j=this.api.X().experiments.yz("enable_modern_skip_button_on_web");this.s6=!1;this.G=new g.af({J:"span",BD:["ytp-ad-skip-button-container"]});this.j&&this.G.element.classList.add("ytp-ad-skip-button-container-detached");g.u(this,this.G);this.G.HD(this.element);this.U=this.Y=null;this.qX=new g.ML(this.G,500,!1,100,()=>this.hide());
g.u(this,this.qX);this.tq=new IB(this.G.element,15E3,5E3,.5,.5,this.j);g.u(this,this.tq);this.hide()}init(Z,k,N){super.init(Z,k,N);this.xW=k;(this.Sm=OIf(this))&&g.L9(Error("hasAdControlInClickCommands_ is true."));if(!k||g.ze(k))g.b(Error("SkipButtonRenderer was not specified or empty."));else if(!k.message||g.ze(k.message))g.b(Error("SkipButtonRenderer.message was not specified or empty."));else{Z=this.j?{iconType:"SKIP_NEXT_NEW"}:{iconType:"SKIP_NEXT"};k=this.api.X().B("delhi_modern_web_player_icons");
const a=Xh(Z,!1,!1,k);a==null?g.b(Error("Icon for SkipButton was unable to be retrieved. Icon.IconType: "+Z.iconType+".")):(this.api.X().B("disable_touch_events_on_skip_button")&&(a.W={...a.W,"aria-hidden":"true",focusable:"false"}),this.Y=new g.af({J:"button",BD:[this.j?"ytp-ad-skip-button-modern":"ytp-ad-skip-button","ytp-button",k?"ytp-ad-skip-button-icon-delhi":""],A:[{J:"span",Z:this.j?"ytp-ad-skip-button-icon-modern":"ytp-ad-skip-button-icon",A:[a]}]}),g.u(this,this.Y),this.Y.HD(this.G.element),
this.U=new p4(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,"ytp-ad-skip-button-text"),this.j&&this.U.element.classList.add("ytp-ad-skip-button-text-centered"),this.U.init(MP("ad-text"),this.xW.message,N),g.u(this,this.U),qi(this.Y.element,this.U.element,0));this.api.X().B("disable_touch_events_on_skip_button")||(N=this.api.X(),!(this.vD.length>0)&&N.U&&(oZ?0:"ontouchstart"in document.documentElement&&(aI()||N3()))&&(this.Ce(this.hq),this.vD=[this.K(this.element,"touchstart",this.onTouchStart,
this),this.K(this.element,"touchmove",this.onTouchMove,this),this.K(this.element,"touchend",this.onTouchEnd,this)]))}}clear(){this.tq.reset();this.hide()}hide(){this.G.hide();this.U&&this.U.hide();vm(this);super.hide()}onClick(Z){if(this.Y!=null){if(Z){var k=Z||window.event;k.returnValue=!1;k.preventDefault&&k.preventDefault()}if(lrb(Z,{contentCpn:this.api.getVideoData({playerType:1})?.clientPlaybackNonce||""})===0)g.A7(this.api,"onAbnormalityDetected");else if(super.onClick(Z),this.publish("j"),
g.A7(this.api,"onAdSkip"),this.Qz||!this.Sm)this.api.onAdUxClicked(this.componentType,this.layoutId)}}O6(Z){if(!this.Qz)return this.Sm&&wm("SkipButton click commands not pruned while ALC exist"),Z;const k=g.J(Z,g.xZ)?.commands;if(!k)return Z;Z=[];for(let N=0;N<k.length;N++){const a=k[N];a.adLifecycleCommand&&Dyy(a.adLifecycleCommand)||a.pingingEndpoint||a.adPingingEndpoint||Z.push(a)}return{commandExecutorCommand:{commands:Z}}}show(){this.tq.start();this.G.show();this.U&&this.U.show();Ow(this);super.show();
this.s6&&this.api.X().B("enable_skip_to_next_messaging")&&this.api.publish("showpromotooltip",this.element)}L(){this.publish("k")}D(){}};var Cp=class extends RB{constructor(Z,k,N,a,T,K){super(Z,{J:"div",Z:"ytp-ad-skip-ad-slot"},"skip-ad",k,N,a,T);this.xW=K;this.G=!1;this.j=0;this.Y=this.U=null;this.hide()}init(Z,k,N){super.init(Z,k,N);Z=k&&k.preskipRenderer&&g.J(k.preskipRenderer,Lq)||{};if(Z=g.ze(Z)?null:Z){this.j=Z.durationMilliseconds!=null&&Z.durationMilliseconds!==void 0?Z.durationMilliseconds:5E3;const a=Zf(this.api.X().experiments,"preskip_button_style_ads_backend")=="countdown_next_to_thumbnail"&&yw(this.api.X());this.U=new n4(this.api,
this.layoutId,this.interactionLoggingClientData,this.Iq,this.V,a);this.U.init(MP("preskip-component"),Z,N);Z=this.U;Z.xW.show(100);Z.show();g.u(this,this.U);this.U.HD(this.element)}else k.skipOffsetMilliseconds&&(this.j=k.skipOffsetMilliseconds);Z=k&&k.skippableRenderer&&g.J(k.skippableRenderer,fgy)||{};Z=g.ze(Z)?null:Z;Z==null?g.b(Error("SkipButtonRenderer was not set in player response.")):(this.Y=new Key(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,this.V,this.xW),this.Y.init(MP("skip-button"),
Z,N),g.u(this,this.Y),this.Y.HD(this.element),this.api.X().experiments.yz("enable_skip_to_next_messaging")&&(N=g.qc(k.targetId))&&(k=this.Y,k.Y!=null&&(k.s6=!0,k.Y.element.setAttribute("data-tooltip-target-id",N),k.Y.element.setAttribute("data-tooltip-target-fixed",""))),this.show())}show(){this.G&&this.Y?this.Y.show():this.U&&this.U.show();Ow(this);super.show()}L(){}clear(){this.U&&this.U.clear();this.Y&&this.Y.clear();vm(this);super.hide()}hide(){this.U&&this.U.hide();this.Y&&this.Y.hide();vm(this);
super.hide()}D(){1E3*this.V.getProgressState().current>=this.j&&vgr(this,!0)}};var yTb=class extends Bm{constructor(Z,k,N,a){super(Z,k,N,a,["ytp-ad-visit-advertiser-button"],"visit-advertiser")}init(Z,k,N){super.init(Z,k,N);Z=!1;k.text!=null&&(Z=g.YL(k.text),Z=!g.a2(Z));Z?k.navigationEndpoint==null?g.L9(Error("No visit advertiser clickthrough provided in renderer,")):k.style!=="STYLE_UNKNOWN"?g.L9(Error("Button style was not a link-style type in renderer,")):this.show():g.L9(Error("No visit advertiser text was present in the renderer."))}};var EW=class extends zR{constructor(Z,k,N,a,T=!1,K=!1){super(Z,{J:"span",Z:"ytp-ad-simple-ad-badge"},"simple-ad-badge",k,N,a);this.V=this.Lp("ytp-ad-simple-ad-badge");(this.U=T)&&this.V.classList.add("ytp-ad-simple-ad-badge--clean-player");K&&this.V.classList.add("ytp-ad-simple-ad-badge--survey");this.hide()}init(Z,k,N){super.init(Z,k,N);Z=k.text;g.a2(Wg(Z))?g.L9(Error("SimpleAdBadgeRenderer has invalid or empty text")):(Z&&Z.text&&(k=Z.text,this.U||(k=this.api.X(),k=Z.text+" "+(k&&k.U?"\u2022":"\u00b7")),
k={text:k,isTemplated:Z.isTemplated},Z.style&&(k.style=Z.style),Z.targetId&&(k.targetId=Z.targetId),Z=new p4(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq),Z.init(MP("simple-ad-badge"),k,N),Z.HD(this.element),g.u(this,Z)),this.show())}clear(){this.hide()}};var WW=class extends oB{constructor(Z,k,N,a,T=!1){super("player-overlay",Z,{},k,a);this.videoAdDurationSeconds=N;this.interactionLoggingClientData=a;this.mR=T}};var sg=class extends g.n9{constructor(Z,k){super();this.api=Z;this.durationMs=k;this.V=null;this.handler=new i$(this);g.u(this,this.handler);this.U=Nhj;this.handler.K(this.api,"presentingplayerstatechange",this.D);this.V=this.handler.K(this.api,"onAdPlaybackProgress",this.MW)}Qx(){return this.durationMs}stop(){this.V&&this.handler.Ce(this.V)}MW(Z){this.U={seekableStart:0,seekableEnd:this.durationMs/1E3,current:Z.current};this.publish("h")}getProgressState(){return this.U}D(Z){Z.Ub(2)&&this.publish("g")}};var Yf=class extends g.n9{constructor(Z){super();this.V=!1;this.xH=0;this.handler=new i$(this);g.u(this,this.handler);this.durationMs=Z;this.timer=new g.EC(100);g.u(this,this.timer);this.handler.K(this.timer,"tick",this.MW);this.U={seekableStart:0,seekableEnd:Z/1E3,current:0};this.start()}Qx(){return this.durationMs}start(){this.V||(this.V=!0,this.timer.start())}stop(){this.V&&(this.V=!1,this.timer.stop())}MW(){this.xH+=100;let Z=!1;this.xH>this.durationMs&&(this.xH=this.durationMs,this.timer.stop(),
Z=!0);this.U={seekableStart:0,seekableEnd:this.durationMs/1E3,current:this.xH/1E3};this.publish("h");Z&&this.publish("g")}getProgressState(){return this.U}};var ZB=class extends RB{constructor(Z,k,N,a,T,K,y){super(Z,{J:"span",Z:y?"ytp-ad-duration-remaining--clean-player":"ytp-ad-duration-remaining"},"ad-duration-remaining",k,N,a,T);this.videoAdDurationSeconds=K;this.U=null;y&&this.api.X().U&&(this.element.classList.add("ytp-ad-duration-remaining--mweb"),Yh&&this.element.classList.add("ytp-ad-duration-remaining--mweb-ios"));this.hide()}init(Z,k,N){super.init(Z,k,N);if(k?.templatedCountdown?.templatedAdText){Z=k.templatedCountdown.templatedAdText;if(!Z.isTemplated){g.L9(Error("AdDurationRemainingRenderer has no templated ad text."));
return}this.U=new p4(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq);this.U.init(MP("ad-text"),Z,{});this.U.HD(this.element);g.u(this,this.U)}this.show()}clear(){this.hide()}hide(){vm(this);super.hide()}L(){this.hide()}D(){if(this.V!=null){var Z=this.V.getProgressState();if(Z!=null&&Z.current!=null&&this.U){var k=this.V instanceof sg?this.videoAdDurationSeconds!==void 0?this.videoAdDurationSeconds:Z.seekableEnd:this.videoAdDurationSeconds!==void 0?this.videoAdDurationSeconds:this.V instanceof
Yf?Z.seekableEnd:this.api.getDuration({playerType:2,OP:!1});Z=Z.current;k=this.api.getVideoData()?.qW?.()?Math.max(k-Z,0):k-Z;DR(this.U,{FORMATTED_AD_DURATION_REMAINING:String(g.Gh(k)),TIME_REMAINING:String(Math.ceil(k))})}}}show(){Ow(this);super.show()}};var QXG=class extends p4{constructor(Z,k,N,a){super(Z,k,N,a,"ytp-video-ad-top-bar-title","ad-title")}onClick(Z){super.onClick(Z);this.api.onAdUxClicked(this.componentType)}};var kt=class{constructor(Z){this.content=Z.content;if(Z.commandRuns)for(const k of Z.commandRuns)this.loggingDirectives=g.J(k,WAf),k.onTap&&(this.interaction={onTap:k.onTap})}},Nf=class extends zR{constructor(Z,k,N,a){super(Z,{J:"div",Z:"ad-simple-attributed-string"},"ad-simple-attributed-string",k,N,a);this.hide()}init(Z,k){super.init(Z,k,{});(Z=k.content)?(g.m_(this.element,Z),this.element.setAttribute("aria-label",k.interaction?.accessibility?.label||Z)):g.b(Error("AdSimpleAttributedString does not have text content"))}clear(){this.hide()}onClick(Z){super.onClick(Z)}};var am=class extends zR{constructor(Z,k,N,a,T){super(Z,{J:"span",Z:T?"ytp-ad-badge--clean-player":"ytp-ad-badge"},"ad-badge",k,N,a);this.U=T;this.adBadgeText=new Nf(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq);this.adBadgeText.HD(this.element);g.u(this,this.adBadgeText);T?(this.adBadgeText.element.classList.add("ytp-ad-badge__text--clean-player"),Yh&&this.adBadgeText.element.classList.add("ytp-ad-badge--stark-clean-player-ios")):this.adBadgeText.element.classList.add("ytp-ad-badge__text");
this.hide()}init(Z,k){super.init(Z,k,{});(Z=k.label)&&Z.content&&!g.a2(Z.content)?(this.adBadgeText.init(MP("ad-simple-attributed-string"),new kt(Z)),(k=k.adPodIndex)&&k.content&&!g.a2(k.content)&&(this.V=new Nf(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq),this.V.HD(this.element),g.u(this,this.V),this.V.element.classList.add("ytp-ad-badge__pod-index"),this.V.init(MP("ad-simple-attributed-string"),new kt(k))),this.element.classList.add(this.U?"ytp-ad-badge--stark-clean-player":
"ytp-ad-badge--stark"),this.show()):g.b(Error("No label is returned in AdBadgeViewModel."))}show(){this.adBadgeText.show();this.V?.show();super.show()}hide(){this.adBadgeText.hide();this.V?.hide();super.hide()}};var qVy=class extends zR{constructor(Z,k,N,a){super(Z,{J:"span",Z:"ytp-ad-pod-index"},"ad-pod-index",k,N,a);this.api.X().U&&(this.element.classList.add("ytp-ad-pod-index--mweb"),Yh&&this.element.classList.add("ytp-ad-pod-index--mweb-ios"));this.hide()}init(Z,k){super.init(Z,k,{});(Z=k.adPodIndex)&&Z.content&&!g.a2(Z.content)&&(this.V=new Nf(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq),this.V.HD(this.element),g.u(this,this.V),this.V.init(MP("ad-simple-attributed-string"),new kt(Z)),
k.visibilityCondition==="AD_POD_INDEX_VISIBILITY_CONDITION_AUTOHIDE"&&this.element.classList.add("ytp-ad-pod-index--autohide"));this.element.classList.add("ytp-ad-pod-index--stark");this.show()}show(){this.V?.show();super.show()}hide(){this.V?.hide();super.hide()}};var rTf=class extends zR{constructor(Z,k,N,a){super(Z,{J:"div",Z:"ytp-ad-disclosure-banner"},"ad-disclosure-banner",k,N,a);this.hide()}init(Z,k){super.init(Z,k,{});k?.text?k.text?.content&&!g.a2(k.text.content)&&(this.V=new g.af({J:"div",Z:"ytp-ad-disclosure-banner__text",Da:k.text.content}),g.u(this,this.V),this.V.HD(this.element),this.api.X().B("enable_ad_disclosure_banner_a11y_fix")?((Z=k.interaction?.accessibility?.label)||(Z=`${k.text.content} ${"This link opens in new tab"}`),SX(this.element,
Z)):this.element.setAttribute("aria-label",k.interaction?.accessibility?.label||k.text.content),k.interaction?.onTap&&(this.api.X().B("remove_chevron_from_ad_disclosure_banner_h5")||(this.U=new g.af({J:"div",Z:"ytp-ad-disclosure-banner__chevron",A:[g.aJ()]}),g.u(this,this.U),this.U.HD(this.element)),this.api.X().B("enable_ad_disclosure_banner_a11y_fix")&&(x3(this.element),this.element.setAttribute("tabindex","0"),this.listen("keydown",this.Kn))),this.show()):g.b(Error("No banner text found in AdDisclosureBanner."))}Kn(Z){if(Z.key===
"Enter"||Z.key===" ")Z.preventDefault(),this.element.click()}clear(){this.hide()}};var HE=class{constructor(Z,k){this.U=Z;this.V=k}};var AG=class extends g.af{constructor(Z,k,N,a=!1){super({J:"div",Z:"ytp-ad-persistent-progress-bar-container",A:[{J:"div",Z:"ytp-ad-persistent-progress-bar"}]});this.api=Z;this.U=k;this.D=N;a&&this.element.classList.add("ytp-ad-persistent-progress-bar-container--clean-player");g.u(this,this.U);this.progressBar=this.Lp("ytp-ad-persistent-progress-bar");this.V=-1;this.K(Z,"presentingplayerstatechange",this.onStateChange);this.hide();this.onStateChange()}MW(){const Z=this.U.getProgressState();let k=
Z.seekableEnd;this.api.getPresentingPlayerType()===2&&(k=this.D?this.D/1E3:Z.seekableEnd);this.progressBar.style.width=eM(new HE(Z.seekableStart,k),Z.current,0)*100+"%"}onStateChange(){g.CQ(this.api.X())||(this.api.getPresentingPlayerType()===2?this.V===-1&&(this.show(),this.V=this.U.subscribe("h",this.MW,this),this.MW()):this.V!==-1&&(this.hide(),this.U.eO(this.V),this.V=-1))}};var zEf=class extends zR{constructor(Z,k,N,a,T,K){super(Z,{J:"div",Z:"ytp-ad-player-overlay",A:[{J:"div",Z:"ytp-ad-player-overlay-flyout-cta"},{J:"div",Z:"ytp-ad-player-overlay-instream-info"},{J:"div",Z:"ytp-ad-player-overlay-skip-or-preview"},{J:"div",Z:"ytp-ad-player-overlay-progress-bar"},{J:"div",Z:"ytp-ad-player-overlay-instream-user-sentiment"},{J:"div",Z:"ytp-ad-player-overlay-ad-disclosure-banner"}]},"player-overlay",k,N,a);this.G=K;this.L=this.Lp("ytp-ad-player-overlay-flyout-cta");this.L.classList.add("ytp-ad-player-overlay-flyout-cta-rounded");
this.V=this.Lp("ytp-ad-player-overlay-instream-info");this.Y=null;ggj(this)&&(Z=a4("div"),g.jX(Z,"ytp-ad-player-overlay-top-bar-gradients"),k=Z,N=this.V,N.parentNode&&N.parentNode.insertBefore(k,N),(k=this.api.getVideoData({playerType:2}))&&k.isListed&&k.title&&(N=new QXG(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq),N.HD(Z),N.init(MP("ad-title"),{text:k.title},this.macros),g.u(this,N)),this.Y=Z);this.D=null;this.Sm=this.Lp("ytp-ad-player-overlay-skip-or-preview");this.xW=this.Lp("ytp-ad-player-overlay-progress-bar");
this.O=this.Lp("ytp-ad-player-overlay-instream-user-sentiment");this.j=this.Lp("ytp-ad-player-overlay-ad-disclosure-banner");this.U=T;g.u(this,this.U);this.hide()}init(Z,k,N,a){super.init(Z,k,N);if(k.skipOrPreviewRenderer){if(Z=g.J(k.skipOrPreviewRenderer,GZ))N=new Cp(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,this.U,this.G),N.HD(this.Sm),N.init(MP("skip-button"),Z,this.macros),g.u(this,N);if(Z=g.J(k.skipOrPreviewRenderer,GZ))var T=Z.skipOffsetMilliseconds}k.brandInteractionRenderer&&
(Z=k.brandInteractionRenderer.brandInteractionRenderer,N=new Thy(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq),N.HD(this.O),N.init(MP("instream-user-sentiment"),Z,this.macros),g.u(this,N));if(Z=g.J(k,V8G))if(N=g.J(Z,V8G))Z=new avy(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,this.U,!!k.showWithoutLinkedMediaLayout),g.u(this,Z),Z.HD(this.L),Z.init(MP("flyout-cta"),N,this.macros);a=a&&a.videoAdDurationSeconds;k.adBadgeRenderer&&(N=k.adBadgeRenderer,Z=g.J(N,HJ),
Z!=null?(N=new am(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,!1),g.u(this,N),N.HD(this.V),N.init(MP("ad-badge"),Z,this.macros),this.D=N.element):(Z=N.simpleAdBadgeRenderer,Z==null&&(Z={text:{text:"Ad",isTemplated:!1}}),N=new EW(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq),g.u(this,N),N.HD(this.V),N.init(MP("simple-ad-badge"),Z,this.macros)));k.adPodIndex&&(Z=g.J(k.adPodIndex,vDj),Z!=null&&(N=new qVy(this.api,this.layoutId,this.interactionLoggingClientData,
this.Iq),g.u(this,N),N.HD(this.V),N.init(MP("ad-pod-index"),Z)));k.adDurationRemaining&&!k.showWithoutLinkedMediaLayout&&(Z=k.adDurationRemaining.adDurationRemainingRenderer,Z==null&&(Z={templatedCountdown:{templatedAdText:{text:"{FORMATTED_AD_DURATION_REMAINING}",isTemplated:!0}}}),a=new ZB(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,this.U,a,!1),g.u(this,a),a.HD(this.V),a.init(MP("ad-duration-remaining"),Z,this.macros));k.adInfoRenderer&&(a=g.J(k.adInfoRenderer,Xe))&&(Z=new yG(this.api,
this.layoutId,this.interactionLoggingClientData,this.Iq,this.element,void 0,!1),g.u(this,Z),this.D!==null?this.V.insertBefore(Z.element,this.D.nextSibling):Z.HD(this.V),Z.init(MP("ad-info-hover-text-button"),a,this.macros));k.visitAdvertiserRenderer&&(Z=g.J(k.visitAdvertiserRenderer,Eq))&&(N=ggj(this)&&this.Y?this.Y:this.V)&&(a=new yTb(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq),g.u(this,a),a.HD(N),a.init(MP("visit-advertiser"),Z,this.macros),x3(a.element),Z=eX(a.element),SX(a.element,
Z+" This link opens in new tab"));!(a=this.api.X())||g.ml(a)||g.PQ(a)||a.controlsType!="3"&&!a.disableOrganicUi||(T=new AG(this.api,this.U,T,!1),T.HD(this.xW),g.u(this,T));k.adDisclosureBannerRenderer&&(T=g.J(k.adDisclosureBannerRenderer,OTf))&&(k=new rTf(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq),k.HD(this.j),k.init(MP("ad-disclosure-banner"),T),g.u(this,k));this.api.X().B("enable_updated_html5_player_focus_style")&&g.jX(this.element,"ytp-ad-player-overlay-updated-focus-style");
this.show()}clear(){this.hide()}};var CpU=class{flush(Z=[],k=!1){if(g.ii("enable_client_streamz_web"))for(const N of Z)Z=D7(N),this.V&&jt(Z,Oyy,2,this.V),Z={serializedIncrementBatch:g.fl(Z.U())},g.TO("streamzIncremented",Z,{sendIsolatedPayload:k})}},$yG=class extends CpU{constructor(){super()}},P5f=class extends CpU{constructor(Z){super();var k=new Oyy;var N=new DfG;N=Q3(N,1,"botguard");Z=Q3(N,2,Z);this.V=E3(k,DfG,1,vty,Z)}};var JY,AMf=new Map;var x_y=class{constructor(Z){this.V=new fP(Z)}set(Z,k,N){N=N!==void 0?Date.now()+N:void 0;this.V.set(Z,k,N)}get(Z){return this.V.get(Z)}remove(Z){this.V.remove(Z)}};var Gz0=null;var M4=null,nZ=null,IJ=null,zTf=null;g.X0("yt.www.ads.eventcache.getLastCompanionData",function(){return M4});
g.X0("yt.www.ads.eventcache.getLastPlaShelfData",function(){return null});
g.X0("yt.www.ads.eventcache.getLastUpdateEngagementPanelAction",function(){return nZ});
g.X0("yt.www.ads.eventcache.getLastChangeEngagementPanelVisibilityAction",function(){return IJ});
g.X0("yt.www.ads.eventcache.getLastScrollToEngagementPanelCommand",function(){return zTf});var pcX=new Map([["dark","USER_INTERFACE_THEME_DARK"],["light","USER_INTERFACE_THEME_LIGHT"]]);var Ew=class{constructor(){this.V={};if(this.U=KE()){const Z=g.a6("CONSISTENCY");Z&&Mcy(this,{encryptedTokenJarContents:Z})}}handleResponse(Z,k){if(!k)throw Error("request needs to be passed into ConsistencyService");k=k.Hf.context?.request?.consistencyTokenJars||[];(Z=Z.responseContext?.consistencyTokenJar)&&this.replace(k,Z)}replace(Z,k){for(const N of Z)delete this.V[N.encryptedTokenJarContents];Mcy(this,k)}};var mwX=window.location.hostname.split(".").slice(-2).join("."),Wm=class{constructor(){this.U=-1;let Z=g.G("LOCATION_PLAYABILITY_TOKEN");g.G("INNERTUBE_CLIENT_NAME")==="TVHTML5"&&(this.localStorage=jM(this))&&(Z=this.localStorage.get("yt-location-playability-token"));Z&&(this.locationPlayabilityToken=Z,this.V=void 0)}static getInstance(){Tu=g.Vf("yt.clientLocationService.instance");Tu||(Tu=new Wm,g.X0("yt.clientLocationService.instance",Tu));return Tu}setLocationOnInnerTubeContext(Z){Z.client||(Z.client=
{});if(this.V)Z.client.locationInfo||(Z.client.locationInfo={}),Z.client.locationInfo.latitudeE7=Math.floor(this.V.coords.latitude*1E7),Z.client.locationInfo.longitudeE7=Math.floor(this.V.coords.longitude*1E7),Z.client.locationInfo.horizontalAccuracyMeters=Math.round(this.V.coords.accuracy),Z.client.locationInfo.forceLocationPlayabilityTokenRefresh=!0;else if(this.D||this.locationPlayabilityToken)Z.client.locationPlayabilityToken=this.D||this.locationPlayabilityToken}handleResponse(Z){Z=Z.responseContext?.locationPlayabilityToken;
Z!==void 0&&(this.locationPlayabilityToken=Z,this.V=void 0,g.G("INNERTUBE_CLIENT_NAME")==="TVHTML5"?(this.localStorage=jM(this))&&this.localStorage.set("yt-location-playability-token",Z,15552E3):g.NS("YT_CL",JSON.stringify({loctok:Z}),15552E3,mwX,!0))}clearLocationPlayabilityToken(Z){Z==="TVHTML5"?(this.localStorage=jM(this))&&this.localStorage.remove("yt-location-playability-token"):g.T4("YT_CL");this.D=void 0;this.U!==-1&&(clearTimeout(this.U),this.U=-1)}getCurrentPositionFromGeolocation(){if(!(navigator&&
navigator.geolocation&&navigator.geolocation.getCurrentPosition))return Promise.reject(Error("Geolocation unsupported"));let Z=!1,k=1E4;g.G("INNERTUBE_CLIENT_NAME")==="MWEB"&&(Z=!0,k=15E3);return new Promise((N,a)=>{navigator.geolocation.getCurrentPosition(T=>{this.V=T;N(T)},T=>{a(T)},{enableHighAccuracy:Z,
maximumAge:0,timeout:k})})}createUnpluggedLocationInfo(Z){const k={};
Z=Z.coords;Z?.latitude&&(k.latitudeE7=Math.floor(Z.latitude*1E7));Z?.longitude&&(k.longitudeE7=Math.floor(Z.longitude*1E7));Z?.accuracy&&(k.locationRadiusMeters=Math.round(Z.accuracy));return k}createLocationInfo(Z){const k={};Z=Z.coords;Z?.latitude&&(k.latitudeE7=Math.floor(Z.latitude*1E7));Z?.longitude&&(k.longitudeE7=Math.floor(Z.longitude*1E7));return k}},Tu;var sXr=class{constructor(){this.V={}}contains(Z){return Object.prototype.hasOwnProperty.call(this.V,Z)}get(Z){if(this.contains(Z))return this.V[Z]}set(Z,k){this.V[Z]=k}pP(){return Object.keys(this.V)}remove(Z){delete this.V[Z]}};new class{constructor(){this.mappings=new sXr}get(Z){a:{var k=this.mappings.get(Z.toString());switch(k.type){case "mapping":Z=k.value;break a;case "factory":k=k.value();this.mappings.set(Z.toString(),{type:"mapping",value:k});Z=k;break a;default:Z=J3(k,void 0)}}return Z}registerService(Z,k){this.mappings.set(Z.toString(),{type:"mapping",value:k});return Z}};var YHR={WEB_UNPLUGGED:"^unplugged/",WEB_UNPLUGGED_ONBOARDING:"^unplugged/",WEB_UNPLUGGED_OPS:"^unplugged/",WEB_UNPLUGGED_PUBLIC:"^unplugged/",WEB_CREATOR:"^creator/",WEB_KIDS:"^kids/",WEB_EXPERIMENTS:"^experiments/",WEB_MUSIC:"^music/",WEB_REMIX:"^music/",WEB_MUSIC_EMBEDDED_PLAYER:"^music/",WEB_MUSIC_EMBEDDED_PLAYER:"^main_app/|^sfv/"};var ATy=class{L(Z,k={},N=Xk){var a={context:g.YZ(Z.clickTrackingParams,!1,this.Y)};var T=this.U(Z);if(T){this.V(a,T,k);T=g.kP(this.D());const K=g.J(Z.commandMetadata,g.f4)?.apiUrl;K&&(T=K);T=QL(yL(T));Z={command:Z,...(void 0)};a={input:T,El:qS(T),Hf:a,config:Z};a.config.RC?a.config.RC.identity=N:a.config.RC={identity:N};k.abortSignal&&(a.El.signal=k.abortSignal);return a}k=new g.jD("Error: Failed to create Request from Command.",Z);g.b(k)}get Y(){return!1}},Ky=class extends ATy{};var Ppj={GET_DATASYNC_IDS:Zw(class extends Ky{L(){return{input:"/getDatasyncIdsEndpoint",El:qS("/getDatasyncIdsEndpoint","GET"),Hf:{}}}D(){return[]}U(){}V(){}})};var ysf=gu("ytcsi_debug_max_size",100);var Clj={auto_search:"LATENCY_ACTION_AUTO_SEARCH",ad_to_ad:"LATENCY_ACTION_AD_TO_AD",ad_to_video:"LATENCY_ACTION_AD_TO_VIDEO",app_startup:"LATENCY_ACTION_APP_STARTUP",browse:"LATENCY_ACTION_BROWSE",cast_splash:"LATENCY_ACTION_CAST_SPLASH",call_to_cast:"LATENCY_ACTION_CALL_TO_CAST",channel_activity:"LATENCY_ACTION_FAMILY_CENTER_CHANNEL_ACTIVITY",channels:"LATENCY_ACTION_CHANNELS",chips:"LATENCY_ACTION_CHIPS",commerce_transaction:"LATENCY_ACTION_COMMERCE_TRANSACTION",direct_playback:"LATENCY_ACTION_DIRECT_PLAYBACK",
editor:"LATENCY_ACTION_EDITOR",embed:"LATENCY_ACTION_EMBED",embed_no_video:"LATENCY_ACTION_EMBED_NO_VIDEO",entity_key_serialization_perf:"LATENCY_ACTION_ENTITY_KEY_SERIALIZATION_PERF",entity_key_deserialization_perf:"LATENCY_ACTION_ENTITY_KEY_DESERIALIZATION_PERF",explore:"LATENCY_ACTION_EXPLORE",favorites:"LATENCY_ACTION_FAVORITES",home:"LATENCY_ACTION_HOME",inboarding:"LATENCY_ACTION_INBOARDING",landing:"LATENCY_ACTION_LANDING",learning:"LATENCY_ACTION_LEARNING",learning_journey_browse:"LATENCY_ACTION_LEARNING_JOURNEY_BROWSE",
learning_journey_watch:"LATENCY_ACTION_LEARNING_JOURNEY_WATCH",library:"LATENCY_ACTION_LIBRARY",live:"LATENCY_ACTION_LIVE",live_pagination:"LATENCY_ACTION_LIVE_PAGINATION",management:"LATENCY_ACTION_MANAGEMENT",mini_app:"LATENCY_ACTION_MINI_APP_PLAY",notification_settings:"LATENCY_ACTION_FAMILY_CENTER_NOTIFICATION_SETTINGS",onboarding:"LATENCY_ACTION_ONBOARDING",parent_profile_settings:"LATENCY_ACTION_KIDS_PARENT_PROFILE_SETTINGS",parent_tools_collection:"LATENCY_ACTION_PARENT_TOOLS_COLLECTION",parent_tools_dashboard:"LATENCY_ACTION_PARENT_TOOLS_DASHBOARD",
player_att:"LATENCY_ACTION_PLAYER_ATTESTATION",prebuffer:"LATENCY_ACTION_PREBUFFER",prefetch:"LATENCY_ACTION_PREFETCH",profile_settings:"LATENCY_ACTION_KIDS_PROFILE_SETTINGS",profile_switcher:"LATENCY_ACTION_LOGIN",projects:"LATENCY_ACTION_PROJECTS",reel_watch:"LATENCY_ACTION_REEL_WATCH",results:"LATENCY_ACTION_RESULTS",red:"LATENCY_ACTION_PREMIUM_PAGE_GET_BROWSE",premium:"LATENCY_ACTION_PREMIUM_PAGE_GET_BROWSE",premium_lite_upsell:"LATENCY_ACTION_PREMIUM_LITE_UPSELL",privacy_policy:"LATENCY_ACTION_FAMILY_CENTER_PRIVACY_POLICY",
review:"LATENCY_ACTION_REVIEW",search_overview_answer:"LATENCY_ACTION_SEARCH_OVERVIEW_ANSWER",search_ui:"LATENCY_ACTION_SEARCH_UI",search_suggest:"LATENCY_ACTION_SUGGEST",search_zero_state:"LATENCY_ACTION_SEARCH_ZERO_STATE",secret_code:"LATENCY_ACTION_KIDS_SECRET_CODE",switchplan:"LATENCY_ACTION_UNPLUGGED_SWITCH_PLAN",seek:"LATENCY_ACTION_PLAYER_SEEK",settings:"LATENCY_ACTION_SETTINGS",store:"LATENCY_ACTION_STORE",supervision_dashboard:"LATENCY_ACTION_FAMILY_CENTER_SUPERVISION_DASHBOARD",bedtime_reminder_settings:"LATENCY_ACTION_FAMILY_CENTER_BEDTIME_REMINDER_SETTINGS",
break_reminder_settings:"LATENCY_ACTION_FAMILY_CENTER_BREAK_REMINDER_SETTINGS",supervision_settings_dashboard:"LATENCY_ACTION_FAMILY_CENTER_SUPERVISION_SETTINGS_DASHBOARD",time_management:"LATENCY_ACTION_FAMILY_CENTER_TIME_MANAGEMENT",update_profile:"LATENCY_ACTION_FAMILY_CENTER_UPDATE_PROFILE",viewing_permissions:"LATENCY_ACTION_FAMILY_CENTER_VIEWING_PERMISSIONS",shorts_settings:"LATENCY_ACTION_FAMILY_CENTER_SHORTS_SETTINGS",privacy_settings:"LATENCY_ACTION_FAMILY_CENTER_PRIVACY_SETTINGS",tenx:"LATENCY_ACTION_TENX",
video_preview:"LATENCY_ACTION_VIDEO_PREVIEW",video_to_ad:"LATENCY_ACTION_VIDEO_TO_AD",watch:"LATENCY_ACTION_WATCH",watch_it_again:"LATENCY_ACTION_KIDS_WATCH_IT_AGAIN","watch,watch7":"LATENCY_ACTION_WATCH","watch,watch7_html5":"LATENCY_ACTION_WATCH","watch,watch7ad":"LATENCY_ACTION_WATCH","watch,watch7ad_html5":"LATENCY_ACTION_WATCH",wn_comments:"LATENCY_ACTION_LOAD_COMMENTS",ww_rqs:"LATENCY_ACTION_WHO_IS_WATCHING",voice_assistant:"LATENCY_ACTION_VOICE_ASSISTANT",cast_load_by_entity_to_watch:"LATENCY_ACTION_CAST_LOAD_BY_ENTITY_TO_WATCH",
networkless_performance:"LATENCY_ACTION_NETWORKLESS_PERFORMANCE",gel_compression:"LATENCY_ACTION_GEL_COMPRESSION",gel_jspb_serialize:"LATENCY_ACTION_GEL_JSPB_SERIALIZE",attestation_challenge_fetch:"LATENCY_ACTION_ATTESTATION_CHALLENGE_FETCH"};
Object.assign(Clj,{"analytics.explore":"LATENCY_ACTION_CREATOR_ANALYTICS_EXPLORE","artist.analytics":"LATENCY_ACTION_CREATOR_ARTIST_ANALYTICS","artist.events":"LATENCY_ACTION_CREATOR_ARTIST_CONCERTS","artist.presskit":"LATENCY_ACTION_CREATOR_ARTIST_PROFILE","asset.claimed_videos":"LATENCY_ACTION_CREATOR_CMS_ASSET_CLAIMED_VIDEOS","asset.composition":"LATENCY_ACTION_CREATOR_CMS_ASSET_COMPOSITION","asset.composition_ownership":"LATENCY_ACTION_CREATOR_CMS_ASSET_COMPOSITION_OWNERSHIP","asset.composition_policy":"LATENCY_ACTION_CREATOR_CMS_ASSET_COMPOSITION_POLICY",
"asset.embeds":"LATENCY_ACTION_CREATOR_CMS_ASSET_EMBEDS","asset.history":"LATENCY_ACTION_CREATOR_CMS_ASSET_HISTORY","asset.issues":"LATENCY_ACTION_CREATOR_CMS_ASSET_ISSUES","asset.licenses":"LATENCY_ACTION_CREATOR_CMS_ASSET_LICENSES","asset.metadata":"LATENCY_ACTION_CREATOR_CMS_ASSET_METADATA","asset.ownership":"LATENCY_ACTION_CREATOR_CMS_ASSET_OWNERSHIP","asset.potential_embeds":"LATENCY_ACTION_CREATOR_CMS_ASSET_POTENTIAL_EMBEDS","asset.policy":"LATENCY_ACTION_CREATOR_CMS_ASSET_POLICY","asset.references":"LATENCY_ACTION_CREATOR_CMS_ASSET_REFERENCES",
"asset.shares":"LATENCY_ACTION_CREATOR_CMS_ASSET_SHARES","asset.sound_recordings":"LATENCY_ACTION_CREATOR_CMS_ASSET_SOUND_RECORDINGS","asset_group.assets":"LATENCY_ACTION_CREATOR_CMS_ASSET_GROUP_ASSETS","asset_group.campaigns":"LATENCY_ACTION_CREATOR_CMS_ASSET_GROUP_CAMPAIGNS","asset_group.claimed_videos":"LATENCY_ACTION_CREATOR_CMS_ASSET_GROUP_CLAIMED_VIDEOS","asset_group.metadata":"LATENCY_ACTION_CREATOR_CMS_ASSET_GROUP_METADATA","song.analytics":"LATENCY_ACTION_CREATOR_SONG_ANALYTICS",creator_channel_dashboard:"LATENCY_ACTION_CREATOR_CHANNEL_DASHBOARD",
"channel.analytics":"LATENCY_ACTION_CREATOR_CHANNEL_ANALYTICS","channel.comments":"LATENCY_ACTION_CREATOR_CHANNEL_COMMENTS","channel.content":"LATENCY_ACTION_CREATOR_CONTENT","channel.content.posts":"LATENCY_ACTION_CREATOR_POST_LIST","channel.content.promotions":"LATENCY_ACTION_CREATOR_PROMOTION_LIST","channel.copyright":"LATENCY_ACTION_CREATOR_CHANNEL_COPYRIGHT","channel.editing":"LATENCY_ACTION_CREATOR_CHANNEL_EDITING","channel.monetization":"LATENCY_ACTION_CREATOR_CHANNEL_MONETIZATION","channel.music":"LATENCY_ACTION_CREATOR_CHANNEL_MUSIC",
"channel.music_storefront":"LATENCY_ACTION_CREATOR_CHANNEL_MUSIC_STOREFRONT","channel.playlists":"LATENCY_ACTION_CREATOR_CHANNEL_PLAYLISTS","channel.translations":"LATENCY_ACTION_CREATOR_CHANNEL_TRANSLATIONS","channel.videos":"LATENCY_ACTION_CREATOR_CHANNEL_VIDEOS","channel.live_streaming":"LATENCY_ACTION_CREATOR_LIVE_STREAMING","dialog.copyright_strikes":"LATENCY_ACTION_CREATOR_DIALOG_COPYRIGHT_STRIKES","dialog.video_copyright":"LATENCY_ACTION_CREATOR_DIALOG_VIDEO_COPYRIGHT","dialog.uploads":"LATENCY_ACTION_CREATOR_DIALOG_UPLOADS",
owner:"LATENCY_ACTION_CREATOR_CMS_DASHBOARD","owner.allowlist":"LATENCY_ACTION_CREATOR_CMS_ALLOWLIST","owner.analytics":"LATENCY_ACTION_CREATOR_CMS_ANALYTICS","owner.art_tracks":"LATENCY_ACTION_CREATOR_CMS_ART_TRACKS","owner.assets":"LATENCY_ACTION_CREATOR_CMS_ASSETS","owner.asset_groups":"LATENCY_ACTION_CREATOR_CMS_ASSET_GROUPS","owner.bulk":"LATENCY_ACTION_CREATOR_CMS_BULK_HISTORY","owner.campaigns":"LATENCY_ACTION_CREATOR_CMS_CAMPAIGNS","owner.channel_invites":"LATENCY_ACTION_CREATOR_CMS_CHANNEL_INVITES",
"owner.channels":"LATENCY_ACTION_CREATOR_CMS_CHANNELS","owner.claimed_videos":"LATENCY_ACTION_CREATOR_CMS_CLAIMED_VIDEOS","owner.claims":"LATENCY_ACTION_CREATOR_CMS_MANUAL_CLAIMING","owner.claims.manual":"LATENCY_ACTION_CREATOR_CMS_MANUAL_CLAIMING","owner.delivery":"LATENCY_ACTION_CREATOR_CMS_CONTENT_DELIVERY","owner.delivery_templates":"LATENCY_ACTION_CREATOR_CMS_DELIVERY_TEMPLATES","owner.issues":"LATENCY_ACTION_CREATOR_CMS_ISSUES","owner.licenses":"LATENCY_ACTION_CREATOR_CMS_LICENSES","owner.pitch_music":"LATENCY_ACTION_CREATOR_CMS_PITCH_MUSIC",
"owner.policies":"LATENCY_ACTION_CREATOR_CMS_POLICIES","owner.releases":"LATENCY_ACTION_CREATOR_CMS_RELEASES","owner.reports":"LATENCY_ACTION_CREATOR_CMS_REPORTS","owner.videos":"LATENCY_ACTION_CREATOR_CMS_VIDEOS","playlist.videos":"LATENCY_ACTION_CREATOR_PLAYLIST_VIDEO_LIST","post.comments":"LATENCY_ACTION_CREATOR_POST_COMMENTS","post.edit":"LATENCY_ACTION_CREATOR_POST_EDIT","promotion.edit":"LATENCY_ACTION_CREATOR_PROMOTION_EDIT","video.analytics":"LATENCY_ACTION_CREATOR_VIDEO_ANALYTICS","video.claims":"LATENCY_ACTION_CREATOR_VIDEO_CLAIMS",
"video.comments":"LATENCY_ACTION_CREATOR_VIDEO_COMMENTS","video.copyright":"LATENCY_ACTION_CREATOR_VIDEO_COPYRIGHT","video.edit":"LATENCY_ACTION_CREATOR_VIDEO_EDIT","video.editor":"LATENCY_ACTION_CREATOR_VIDEO_EDITOR","video.editor_async":"LATENCY_ACTION_CREATOR_VIDEO_EDITOR_ASYNC","video.live_settings":"LATENCY_ACTION_CREATOR_VIDEO_LIVE_SETTINGS","video.live_streaming":"LATENCY_ACTION_CREATOR_VIDEO_LIVE_STREAMING","video.monetization":"LATENCY_ACTION_CREATOR_VIDEO_MONETIZATION","video.policy":"LATENCY_ACTION_CREATOR_VIDEO_POLICY",
"video.rights_management":"LATENCY_ACTION_CREATOR_VIDEO_RIGHTS_MANAGEMENT","video.translations":"LATENCY_ACTION_CREATOR_VIDEO_TRANSLATIONS"});var vwU=class extends LR{constructor(Z,k){super(arguments);this.timer=k}},OVf=new VW("aft-recorded",vwU);var AsN=g.dX.ytLoggingGelSequenceIdObj_||{};g.X0("ytLoggingGelSequenceIdObj_",AsN);var m6=g.dX.ytLoggingLatencyUsageStats_||{};g.X0("ytLoggingLatencyUsageStats_",m6);
var rV=class{constructor(){this.V=0}tick(Z,k,N,a){sL(this,`tick_${Z}_${k}`)||g.TO("latencyActionTicked",{tickName:Z,clientActionNonce:k},{timestamp:N,cttAuthInfo:a})}info(Z,k,N){const a=Object.keys(Z).join("");sL(this,`info_${a}_${k}`)||(Z=Object.assign({},Z),Z.clientActionNonce=k,g.TO("latencyActionInfo",Z,{cttAuthInfo:N}))}jspbInfo(Z,k,N){let a="";for(let T=0;T<TJ(Z).length;T++)TJ(Z)[T]!==void 0&&(a=T===0?a.concat(`${T}`):a.concat(`_${T}`));sL(this,`info_${a}_${k}`)||(Q3(Z,2,k),k={cttAuthInfo:N},
N=g.ii("jspb_sparse_encoded_pivot")?new Yd([{}]):new Yd,E3(N,cpi,7,H2X,Z),csX(N,k))}span(Z,k,N){const a=Object.keys(Z).join("");sL(this,`span_${a}_${k}`)||(Z.clientActionNonce=k,g.TO("latencyActionSpan",Z,{cttAuthInfo:N}))}};var y0=window,cTb=class{constructor(){this.timing={};this.clearResourceTimings=()=>{};
this.webkitClearResourceTimings=()=>{};
this.mozClearResourceTimings=()=>{};
this.msClearResourceTimings=()=>{};
this.oClearResourceTimings=()=>{}}},AN=y0.performance||y0.mozPerformance||y0.msPerformance||y0.webkitPerformance||new cTb;var DYX=!1,LxR=!1,tN={'script[name="scheduler/scheduler"]':"sj",'script[name="player/base"]':"pj",'link[rel="preload"][name="player/embed"]':"pej",'link[rel="stylesheet"][name="www-player"]':"pc",'link[rel="stylesheet"][name="player/www-player"]':"pc",'script[name="desktop_polymer/desktop_polymer"]':"dpj",'link[rel="import"][name="desktop_polymer"]':"dph",'script[name="mobile-c3"]':"mcj",'link[rel="stylesheet"][name="mobile-c3"]':"mcc",'script[name="player-plasma-ias-phone/base"]':"mcppj",'script[name="player-plasma-ias-tablet/base"]':"mcptj",
'link[rel="stylesheet"][name="mobile-polymer-player-ias"]':"mcpc",'link[rel="stylesheet"][name="mobile-polymer-player-svg-ias"]':"mcpsc",'script[name="mobile_blazer_core_mod"]':"mbcj",'link[rel="stylesheet"][name="mobile_blazer_css"]':"mbc",'script[name="mobile_blazer_logged_in_users_mod"]':"mbliuj",'script[name="mobile_blazer_logged_out_users_mod"]':"mblouj",'script[name="mobile_blazer_noncore_mod"]':"mbnj","#player_css":"mbpc",'script[name="mobile_blazer_desktopplayer_mod"]':"mbpj",'link[rel="stylesheet"][name="mobile_blazer_tablet_css"]':"mbtc",
'script[name="mobile_blazer_watch_mod"]':"mbwj",'script[name="embed_client"]':"ecj",'link[rel="stylesheet"][name="embed-ui"]':"ecc"},gwN=(0,g.Dj)(AN.clearResourceTimings||AN.webkitClearResourceTimings||AN.mozClearResourceTimings||AN.msClearResourceTimings||AN.oClearResourceTimings||g.Vp,AN);var Q0=window;Q0.ytcsi&&(Q0.ytcsi.infoGel=g.lJ,Q0.ytcsi.tick=uJ);var YEf="tokens consistency service_params mss client_location entities adblock_detection response_received_commands store manifest player_preload shorts_prefetch".split(" "),Ewf=["type.googleapis.com/youtube.api.pfiinnertube.YoutubeApiInnertube.BrowseResponse","type.googleapis.com/youtube.api.pfiinnertube.YoutubeApiInnertube.PlayerResponse","type.googleapis.com/youtube.api.pfiinnertube.YoutubeApiInnertube.PanelResponse"],wV=class{constructor(Z,k,N,a,T){this.Y=Z;this.lx=k;this.V=N;this.L=a;this.D=
T;this.U=new Map;Z.ZZ||(Z.ZZ={});Z.ZZ={...Ppj,...Z.ZZ}}xn(Z){return Egf(Z,this.Y)}};var X2X=new GR("INNERTUBE_TRANSPORT_TOKEN");var cDr=class extends Ky{D(){return icX}get Y(){return!0}U(Z){return g.J(Z,EIr)||void 0}V(Z,k,N={}){k.channelIds&&(Z.channelIds=k.channelIds);k.siloName&&(Z.siloName=k.siloName);k.params&&(Z.params=k.params);N.botguardResponse&&(Z.botguardResponse=N.botguardResponse);N.feature&&(Z.clientFeature=N.feature)}};var H6i=class extends Ky{D(){return gUX}get Y(){return!0}U(Z){return g.J(Z,IIf)||void 0}V(Z,k){k.channelIds&&(Z.channelIds=k.channelIds);k.siloName&&(Z.siloName=k.siloName);k.params&&(Z.params=k.params)}};var Phf=class extends Ky{constructor(Z){super();this.G=Z}D(){return f9y}U(Z){return g.J(Z,fIi)||g.J(Z,Bwy)||g.J(Z,lIf)}V(Z,k){k.serializedShareEntity&&(Z.serializedSharedEntity=k.serializedShareEntity);k.clientParamIdentifier&&this.G?.V(k.clientParamIdentifier)&&(Z.clientParams=this.G.U(k.clientParamIdentifier))}};Phf[mo]=[new GR("SHARE_CLIENT_PARAMS_PROVIDER_TOKEN")];var mzf=class extends Ky{D(){return DVR}get Y(){return!0}U(Z){return g.J(Z,BW)||void 0}V(Z,k,N){Z.feedbackTokens=[];k.feedbackToken&&Z.feedbackTokens.push(k.feedbackToken);if(k=k.cpn||N.cpn)Z.feedbackContext={cpn:k};Z.isFeedbackTokenUnencrypted=!!N.is_feedback_token_unencrypted;Z.shouldMerge=!1;N.extra_feedback_tokens&&(Z.shouldMerge=!0,Z.feedbackTokens=Z.feedbackTokens.concat(N.extra_feedback_tokens))}};var s0X=class extends Ky{D(){return Ocf}U(Z){return g.J(Z,nIN)||void 0}V(Z,k){k.params&&(Z.params=k.params);k.secondaryParams&&(Z.secondaryParams=k.secondaryParams)}};var ADy=class extends Ky{D(){return vUj}U(Z){return g.J(Z,bSG)||void 0}V(Z,k){k.actions&&(Z.actions=k.actions);k.params&&(Z.params=k.params);k.playlistId&&(Z.playlistId=k.playlistId)}};var dzy=class extends Ky{D(){return BSj}U(Z){return g.J(Z,DnU)}V(Z,k,N={}){k.serializedShareEntity&&(Z.serializedSharedEntity=k.serializedShareEntity);N.includeListId&&(Z.includeListId=!0)}};var or=new GR("CLIENT_NAME_TOKEN");var JN=new GR("DEFAULT_STORE_EXPIRATION_TOKEN");var Hrf=class{constructor(Z,k){this.clientName=Z;this.U=k}async put(Z,k){k={...k.data};k.key=Z;k.clientName=this.clientName;k.expireTimestampMs===void 0&&(k.expireTimestampMs=(Math.round((0,g.z)())+this.U).toString());return Z6f(this,Z,k)}};Hrf[mo]=[or,JN];var kG0=class{constructor(Z){this.data={...Z};delete this.data.innertubeResponse?.frameworkUpdates}isExpired(){return Number(this.data.expireTimestampMs||0)<(0,g.z)()}isProcessed(){return!!this.data.isProcessed}};var rDy=class extends Hrf{constructor(){super(...arguments);this.V=new Map}async get(Z){return Neb(this,Z)}async remove(Z){a$R(this,Z)}async removeAll(){this.V.forEach(Z=>{clearTimeout(Z.timer)});
this.V.clear()}has(Z){return!!this.V.get(Z)}pP(){return this.V.keys()}};var zl=new GR("EPHEMERAL_STORE_TOKEN");var Tef=class{constructor(Z){this.V=Z.responseContext?.stateTags}};var Chj=class{constructor(Z){this.V=Z}handleResponse(Z,k){if(!k)throw Error("request needs to be passed into StoreResponseProcessorService");Gl(this,Z,k.config?.sU?.NB)}};Chj[mo]=[zl];var UL=new GR("STORE_RESPONSE_PROCESSOR_TOKEN");g.Ss=class extends g.jD{constructor(Z,...k){super(Z,k);this.errorType=1;Object.setPrototypeOf(this,new.target.prototype)}};var qCX=class{constructor(Z){this.V=Z}async fetch(Z,k,N,a){Z=KjR(this,Z,k);try{const T=await fetch(Z);if(g.ii("web_unified_fetch")&&a&&T.ok&&T.body&&typeof T.body.getReader==="function"){const K=T.clone().body.getReader(),{value:y}=await K.read();K.cancel().catch(()=>{});
if(y&&y[0]===91){const Q=T.body.pipeThrough(new TextDecoderStream).getReader();return yDi(this,Q,new Cj,[],a)}}return await this.handleResponse(T,N)}catch(T){if(g.L9(T),N?.Pv&&T instanceof g.Ss&&T.errorType===1)throw T;}}handleResponse(Z,k){let N;N=Z.text().then(a=>{if(k?.TI&&Z.ok)return kS(k.TI,a);a=a.replace(")]}'","");let T;if(k?.Pv&&a)try{T=JSON.parse(a)}catch(K){throw new g.Ss("JSON parsing failed after fetch");}return T??JSON.parse(a)});
Z.redirected||Z.ok?this.V&&this.V.success():(this.V&&this.V.Q4A(),N=N.then(a=>{g.L9(new g.jD("Error: API fetch failed",Z.status,Z.url,a));return{...a,errorMetadata:{status:Z.status}}}));
return N}};qCX[mo]=[r6(new GR("NETWORK_SLI_TOKEN"))];var Q0G=new GR("NETWORK_MANAGER_TOKEN");var es;var VqU=class{constructor(Z){this.V=Z}bindInnertubeChallengeFetcher(Z){this.V.bicf(Z)}registerChallengeFetchedCallback(Z){this.V.bcr(Z)}getLatestChallengeResponse(){return this.V.blc()}};var h8U=[],tqi=(0,g.Gm)`https://static.doubleclick.net/instream/ad_status.js`,kp=!1;var QI=class{constructor(Z,k,N){this.network=Z;this.options=k;this.Y=N;this.D=0;this.V=null;this.U=new QSf;k.lP?ab(this,l$N(this)):k.preload&&ab(this,new Promise(a=>{g.c9(0,()=>{a(yI(this))},0)}))}async G(){return!!await Promise.race([this.V,
null])}async L(Z,k,N){this.V===null&&ab(this,yI(this));let a=!1;const T={};return Promise.race([(async()=>{this.options.Rb3&&this.options.lP&&await (await LjN())?.checkForRefresh();var K=await this.V;T.challenge=K.challenge;if(K.L8){var y={c:K.challenge,e:Z,...k};try{a=!0;let Q;(Q=await K.L8.snapshot({yr:y}))?T.webResponse=Q:T.error="ATTESTATION_ERROR_VM_NO_RESPONSE"}catch{T.error="ATTESTATION_ERROR_VM_INTERNAL_ERROR"}}else"c1a"in K.Qa&&(T.error="ATTESTATION_ERROR_VM_NOT_INITIALIZED");Z==="ENGAGEMENT_TYPE_PLAYBACK"&&
(K=K.Qa,y={},K.c6a&&(y.reportingStatus=String(Number(K.c)^NU())),K.c6b&&(y.broadSpectrumDetectionResult=String(Number(K.c)^Number(g.G("CATSTAT",0)))),T.adblockReporting=y);return T})(),
i60(N,()=>{const K=Object.assign({},T);a&&(K.error="ATTESTATION_ERROR_VM_TIMEOUT");return K})])}};var GGf=["APP_STATE","PI"];var LoG=[3611,27686,221058,85013,23462,241187,157557,42016,26926,51236,79148,50160,77504,310281,153587,87907,18630,177018,177023,54445,80935,152172,184553,105675,150723,37521,147285,47786,231255,231254,231258,231259,98349,237299,168271,168954,168277,168273,168270,123695,272018,226987,226990,226988,6827,29434,255010,171388,244189,236208,7282,124448,299903,299897,299904,299901,299899,299902,299900,299898,196088,250897,198104,32276,195115,195114,76278,200635,230594,147868,147869,276243,93911,274188,
276651,106531,257234,252598,252597,252600,252599,252596,225031,177843,27259,27262,27263,21759,283670,160866,204249,222900,204250,180626,177959,177957,180628,205716,197878,273766,171243,160789,171244,171241,171245,171242,225560,180627,177960,231589,177958,180629,205717,197879,177565,212573,210709,230684,229801,230685,197337,209010,197336,197338,198618,300884,175492,198052,198051,197852,197976,175493,175494,175495,189254,175496,175497,38408,175498,175503,175504,175505,175506,175507,175508,80637,68727,
206933,207944,206934,303123,206929,221575,68728,221576,80353,80356,308033,249107,180635,74610,45707,83962,83970,46713,166591,89711,74612,213809,179607,245006,155792,93265,74611,131380,128979,139311,128978,131391,105350,139312,134800,131392,113533,229298,93252,99357,94521,114252,113532,94522,94583,202371,88E3,139580,93253,93254,94387,94388,93255,97424,72502,219868,212991,110111,76019,117092,117093,89431,191831,110466,231346,77240,60508,186091,148123,148124,137401,137402,137046,73393,246776,113534,
276200,92098,131381,84517,83759,309580,230676,249183,230679,230678,230677,230681,230680,162711,235234,162712,80357,243315,86113,72598,168413,72733,107349,124275,118203,200410,133275,160157,152569,156651,133274,160159,160158,133272,133273,133276,144507,143247,175994,156652,143248,143249,143250,143251,189892,189894,189893,156653,214236,144401,117431,133797,225137,273905,222612,222613,153964,201133,201134,201135,201136,201137,128572,200411,200412,190337,133405,117429,117430,177950,174734,177951,201138,
201139,201140,201141,201142,117432,173996,173995,174953,173994,173997,120080,117259,178546,297752,197891,156655,156654,121692,211414,211411,211412,211413,211403,184846,185993,145656,156656,145655,145653,145654,145657,132972,133051,133658,132971,97615,181262,190762,250344,254027,143359,143356,143361,143358,143360,143357,142303,143353,282159,172859,143354,144479,143355,31402,181590,133624,146477,133623,133622,133621,192418,84774,304776,197993,241460,160801,197995,95117,172721,150497,98930,98931,98932,
153320,153321,43347,305268,249295,210016,210017,262686,211851,211852,307219,211853,129889,197888,197889,149123,221959,221627,221958,45474,100352,98443,117985,74613,155911,74614,64502,136032,74615,74616,122224,74617,77820,74618,262988,262989,226981,93278,93274,93275,93276,200688,200686,200687,199841,22110,29433,133798,132295,281332,120541,222112,82047,113550,75836,75837,303882,192409,203221,42352,84512,76065,75989,205911,205912,252649,205913,252650,252651,51879,16623,32594,27240,293324,32633,74858,
304150,297045,275198,271884,222932,279119,271886,213915,275199,225216,251244,258251,218674,251266,258250,251265,301662,251245,271885,156999,3945,16989,45520,25488,25492,25494,232113,55760,14057,18451,57204,57203,17897,18198,17898,17909,43980,221053,195529,189660,308088,306448,306447,308087,308086,46220,11721,147994,49954,96369,3854,217640,151633,56251,205192,216797,159108,181568,234789,25624,152036,16906,99999,68172,47973,72773,26970,26971,96805,17752,282181,278926,73233,205923,109512,22256,14115,
22696,234409,234408,89278,89277,195745,109513,43278,43459,43464,89279,43717,55764,22255,147912,89281,40963,43277,43442,91824,283898,120137,186350,186351,256690,264349,264351,264350,264352,211026,250896,96367,36850,72694,37414,36851,124863,121343,73491,54473,166861,43375,46674,302631,242528,143815,139095,144402,149968,149969,32473,72901,72906,50612,50613,50942,84938,84943,84939,84941,84944,84940,84942,35585,51926,79983,18921,57893,41182,135732,33424,22207,36229,22206,22205,44763,33427,67793,22182,
37091,34650,50617,22287,25144,97917,220122,62397,150871,150874,125598,137935,36961,108035,27426,27857,27846,27854,69692,61411,39299,38696,62520,36382,108701,192682,279531,50663,36387,14908,37533,105443,61635,62274,161670,133818,182119,65702,65703,65701,76256,298157,263843,196075,194768,252201,194769,191885,281480,233634,265810,194770,296933,195350,301607,195349,194771,293041,293042,293043,301116,166382,37671,49953,220669,249229,213774,204572,191389,253830,253831,253832,272252,253833,253834,204574,
191390,179556,238596,212661,191392,197826,191393,204573,36216,28237,241212,272049,173718,39553,192547,29222,304845,26107,241211,38050,26108,275810,120745,26109,26110,66881,28236,14586,297672,160598,57929,226736,74723,44098,173689,44099,23528,61699,134104,134103,198313,59149,181013,278306,282472,277848,173191,173192,173193,101951,171502,196043,198305,97346,118051,95102,64882,119505,63595,294119,257268,63349,281127,240553,95101,75240,27039,68823,21537,83464,75707,252904,170215,223033,83113,101952,101953,
79610,125755,24402,24400,32925,193406,57173,183351,156421,122502,145268,138480,64423,64424,33986,100828,129089,299541,21409,282218,299506,299540,299507,299509,299539,299508,299510,185612,222825,245366,135155,135156,135157,135158,158225,135159,135160,167651,135161,135162,135163,158226,158227,135164,135165,135166,11070,11074,17880,270560,30709,30707,30711,30710,30708,185213,185273,146143,63648,63649,221056,264490,211189,111059,211188,5754,264491,20445,233471,151308,151152,228067,130975,130976,247244,
271622,271813,261210,210815,295069,246127,245256,244950,191925,167637,234545,197196,302735,214295,110386,221054,273960,282111,113746,268886,66557,183215,17310,28631,201935,21589,242036,238351,164817,168011,154946,68012,162617,60480,184431,138664,294089,249827,194E3,141121,164502,31571,195002,206793,141978,233985,250895,254052,254053,254054,254051,254050,254055,150105,304169,150106,150107,150108,76980,41577,45469,38669,13768,13777,141842,62985,213190,4724,223052,59369,43927,43928,12924,197853,100355,
56219,27669,209928,10337,203648,203649,47896,122629,186204,222824,275869,271673,274637,139723,139722,121258,253789,253787,253786,253788,253790,107598,127991,96639,107536,130169,216522,296316,96661,145188,213904,269342,96658,116646,159428,168611,168612,121122,219862,96660,282208,127738,127083,155281,162959,220886,227356,248007,163566,307646,186641,147842,273646,273647,217932,104443,96659,147595,106442,247162,231493,213427,296813,246575,182423,162776,228908,134840,63667,63668,63669,130686,248381,147036,
239094,262743,189810,239095,78314,147799,305919,305924,237146,174049,148649,55761,127098,134841,96368,67374,48992,146176,176105,233035,49956,267645,275782,190190,225739,31961,26388,23811,5E4,126250,96370,210549,47355,47356,37935,45521,21760,83769,49977,49974,93497,93498,34325,140759,115803,123707,100081,35309,237706,68314,25602,100339,170873,143516,299247,178921,268574,254884,258232,59018,18248,50625,9729,37168,37169,21667,16749,18635,39305,18046,221057,301897,301900,269990,53969,8213,93926,221055,
210542,212552,102852,110099,22678,69076,137575,139224,100856,235770,154430,235861,209757,17736,3832,147111,55759,64031,234746,93044,93045,281302,170701,170702,194796,34388,167841,170419,17657,17655,39579,39578,170412,77448,8196,11357,69877,8197,168501,156512,161613,156509,208274,161612,161614,267692,267851,267577,279755,267693,267694,267578,262801,271218,266131,266132,267977,267579,262800,262799,262802,267580,262798,267695,267581,273232,82039];var XVj=class{constructor(){var Z=dwi;const k=oW(kXy());this.store=Ua(Z,void 0,k)}getState(){return this.store.getState()}dispatch(Z){return this.store.dispatch(Z)}subscribe(Z){return this.store.subscribe(Z)}replaceReducer(Z){return this.store.replaceReducer(Z)}[Symbol.observable](){return this.store[Symbol.observable]()}};var h8=class{constructor(Z=[]){this.V=[];this.D=this.U=0;this.Y=void 0;this.totalLength=0;Z.forEach(k=>{this.append(k)})}L(){return this.totalLength}append(Z){if(e8r(this,Z)){const k=this.V[this.V.length-1];
this.V[this.V.length-1]=new Uint8Array(k.buffer,k.byteOffset,k.length+Z.length);rj(this)}else this.V.push(Z);this.totalLength+=Z.length}split(Z){const k=new h8,N=new h8;for(const a of this.V)Z>=a.length?(k.append(a),Z-=a.length):Z?(k.append(new Uint8Array(a.buffer,a.byteOffset,Z)),N.append(new Uint8Array(a.buffer,a.byteOffset+Z,a.length-Z)),Z=0):N.append(a);return{Rg:k,ma:N}}isFocused(Z){return Z>=this.D&&Z<this.D+this.V[this.U].length}focus(Z){if(!this.isFocused(Z)){for(Z<this.D&&rj(this);this.D+
this.V[this.U].length<=Z&&this.U<this.V.length;)this.D+=this.V[this.U].length,this.U+=1;this.Y=void 0}}};var XZ,HY,VI;g.di=(()=>{const Z=a=>new Uint8Array(a),k=a=>{const T=new Uint8Array(a.length);
for(let K=0;K<a.length;K++)T[K]=a[K];return T},N=new Uint8Array([1]);
return N.length===1&&N[0]===1?Z:k})();
XZ=Array(1024);HY=window.TextDecoder?new TextDecoder:void 0;VI=window.TextEncoder?new TextEncoder:void 0;var ut=class{constructor(Z){this.V=Z;this.pos=0;this.U=-1}};var p2f=class{constructor(Z=4096){this.pos=0;this.U=[];this.V=b6y(Z);this.view=new DataView(this.V.buffer,this.V.byteOffset,this.V.byteLength)}};var I$r={animationEntity:302,accountLinkStatusEntity:122,booleanEntity:307,buttonEntity:358,captionTrack:225,channelHandle:275,chipEntity:498,commerceAcquisitionClientPayloadEntity:276,commerceCartListEntity:236,compositeSourceEntity:594,contextNoteFeedEntityPayload:483,contextNoteUserRatingEntityPayload:576,continuationTokenEntity:406,downloadQualityPickerEntity:202,downloadsPageRefreshTokenEntity:299,downloadsPageViewConfigurationEntity:264,downloadStatusEntity:141,dismissState:540,sfvAudioItemCurrentlyPlayingEntity:186,
emojiFountainDataEntity:393,emojiCustomizationSetEntity:496,fakeChannel:2,fakePlaylist:279,fakePlaylistEntryCollection:280,fakeVideo:182,fakeVideoDescription:278,featuredProductsEntity:392,flowStateEntity:252,iconBadgeEntity:229,interstitialInteractionStateEntity:443,likeButtonAnimationEntity:567,liveChatPollStateEntity:217,liveViewerLeaderboardChatEntryPointStateEntity:563,liveViewerLeaderboardPointsEntity:564,liveReactionsDataEntity:503,logoEntity:245,macroMarkerEntity:329,mainDownloadsLibraryEntity:158,
mainDownloadsListEntity:164,mainPlaylistDownloadStateEntity:373,mainPlaylistEntity:306,mainPlaylistVideoEntity:368,mainVideoDownloadStateEntity:262,mainVideoEntity:261,markersEngagementPanelSyncEntity:196,markersVisibilityOverrideEntity:312,musicAlbumReleaseDetail:18,musicAlbumReleaseDownloadMetadataEntity:259,musicAlbumRelease:17,musicAlbumReleaseUserDetail:19,musicArtistDetail:21,musicArtist:20,musicArtistUserDetail:22,musicDownloadsLibraryEntity:257,musicLibraryEdit:121,musicLibraryStatusEntity:318,
musicPlaylist:24,musicPlaylistDownloadMetadataEntity:248,musicShare:100,musicTrackDetail:29,musicTrackDownloadMetadataEntity:234,musicTrack:28,musicTrackUserDetail:30,offlineOrchestrationActionWrapperEntity:169,offlineVideoPolicy:130,offlineVideoStreams:198,offlineabilityEntity:246,orchestrationWebSamplingEntity:242,pageHeaderEntity:495,pdpStateEntity:524,pinnedProductEntity:273,playbackData:119,quantityIncrementerEntity:356,playerStateEntity:323,refresh:148,saveToPlaylistListEntity:231,selectedChipIndexEntityPayload:479,
settingEntity:297,stringEntity:382,suggestedFeedbackChipStateEntity:485,transfer:120,trendingOfferEntity:469,videoDownloadContextEntity:461,videoOverviewAsyncDataEntity:545,videoPlaybackPositionEntity:76,votingEntity:561,ytMainChannelEntity:152,youchatPendingResponseEntity:553,ytMainDownloadedVideoEntity:155,ytMainVideoEntity:151},nEr={};for(const [Z,k]of Object.entries(I$r)){const N=Z,a=k;a&&(nEr[a]=N)};var EB;var LeN=!1,aU,Yp,Z6,ko,N_,VlN=class extends g.jR{constructor(Z){super();this.counter=[0,0,0,0];this.U=new Uint8Array(16);this.V=16;if(!LeN){var k,N=new Uint8Array(256),a=new Uint8Array(256);var T=1;for(k=0;k<256;k++)N[T]=k,a[k]=T,T^=T<<1^(T>>7&&283);aU=new Uint8Array(256);Yp=WY(256);Z6=WY(256);ko=WY(256);N_=WY(256);for(let y=0;y<256;y++){T=y?a[255^N[y]]:0;T^=T<<1^T<<2^T<<3^T<<4;T=T&255^T>>>8^99;aU[y]=T;k=T<<1^(T>>7&&283);var K=k^T;Yp[y]=k<<24|T<<16|T<<8|K;Z6[y]=K<<24|Yp[y]>>>8;ko[y]=T<<24|Z6[y]>>>
8;N_[y]=T<<24|ko[y]>>>8}LeN=!0}T=WY(44);for(N=0;N<4;N++)T[N]=Z[4*N]<<24|Z[4*N+1]<<16|Z[4*N+2]<<8|Z[4*N+3];for(a=1;N<44;N++)Z=T[N-1],N%4||(Z=(aU[Z>>16&255]^a)<<24|aU[Z>>8&255]<<16|aU[Z&255]<<8|aU[Z>>>24],a=a<<1^(a>>7&&283)),T[N]=T[N-4]^Z;this.key=T}encrypt(Z){const k=Z.length;Z=new Uint8Array(Z.buffer.slice(Z.byteOffset,Z.byteOffset+k));const N=this.U;let a=0;for(;a<k&&this.V<16;)Z[a++]^=N[this.V++];const T=k-(k-a)%16;for(;a<T;)Zhi(this),Z[a++]^=N[0],Z[a++]^=N[1],Z[a++]^=N[2],Z[a++]^=N[3],Z[a++]^=
N[4],Z[a++]^=N[5],Z[a++]^=N[6],Z[a++]^=N[7],Z[a++]^=N[8],Z[a++]^=N[9],Z[a++]^=N[10],Z[a++]^=N[11],Z[a++]^=N[12],Z[a++]^=N[13],Z[a++]^=N[14],Z[a++]^=N[15];if(a<k)for(Zhi(this),this.V=0;a<k;)Z[a++]^=N[this.V++];return Z}};var TT=!1;(()=>{const Z=a=>new Uint8Array(a),k=a=>{const T=new Uint8Array(a.length);
for(let K=0;K<a.length;K++)T[K]=a[K];return T},N=new Uint8Array([1]);
return N.length===1&&N[0]===1?Z:k})();
var KO;var qZ=class{constructor(Z){const k=yq();k&&(this.V=new SdX(Z,k));this.U=new y1(Z)}async encrypt(Z,k){if(this.V)try{return await this.V.encrypt(Z,k)}catch(N){g.L9(N),TT=!0,this.V=void 0}return this.U.encrypt(Z,k)}decrypt(Z,k){return this.encrypt(Z,k)}},SdX=class{constructor(Z,k){this.U=Z;this.subtleCrypto=k}async encrypt(Z,k){try{return await ksR(this,Z,k)}catch(N){throw g.L9(N),TT=!0,N;}}},y1=class{constructor(Z){this.U=Z}encrypt(Z,k){this.V||(this.V=new VlN(this.U));var N=this.V;for(let a=0;a<4;a++)N.counter[a]=
k[a*4]<<24|k[a*4+1]<<16|k[a*4+2]<<8|k[a*4+3];N.V=16;return this.V.encrypt(Z)}decrypt(Z,k){return this.encrypt(Z,k)}};var KZr=class{constructor(Z){this.L=new Uint8Array(64);this.D=new Uint8Array(64);this.Y=0;this.G=new Uint8Array(64);this.U=0;this.L.set(Z);this.D.set(Z);for(Z=0;Z<64;Z++)this.L[Z]^=92,this.D[Z]^=54;this.reset()}reset(){N40(this);this.update(this.D)}update(Z){let k=0;const N=Z.length;this.Y+=N;this.U&&this.U+N>=64&&(this.G.set(Z.subarray(0,64-this.U),this.U),k=64-this.U,this.U=0,aoN(this,this.G,0));for(;k+64<=N;k+=64)aoN(this,Z,k);k<N&&(Z=Z.subarray(k),this.G.set(Z,this.U),this.U+=Z.length)}},Qq=[1116352408,
1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,
430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];var COf=class{constructor(Z){this.V=Z}},qob=class{constructor(Z,k){this.U=Z;this.subtleCrypto=k}},zuf=class{constructor(Z){this.V=Z}};g.Fef=KR("yt-idb-pref-storage",{V5:{prefs:{cV:1}},shared:!1,upgrade(Z,k){k(1)&&bF(zb(Z,"prefs",{keyPath:"key"}),"byExpiration","expirationTimestampMs")},version:1});var tlj={INVALID_ENCODER_VERSION:"Invalid encoder version",KEY_CREATION_FAILED:"Failed to create encoder key",UNKNOWN_DECODE_ERROR:"Failed to decode PES data",UNKNOWN_ENCODE_ERROR:"Failed to encode PES data",WRONG_DATA_TYPE:"Encoder cannot process the data type"},q_=class extends g.jD{constructor(Z,k={}){super(tlj[Z],{name:"PESEncoderError",type:Z,...k});this.type=Z;this.level="WARNING";Object.setPrototypeOf(this,q_.prototype)}};var hxr=class{};var uaN=class extends hxr{constructor(Z){super();this.V=Z}D(Z,k){k=rb(k);Z=(new TextEncoder).encode(JSON.stringify(Z));return this.V.encrypt(Z,k)}U(Z,k){if(!(Z instanceof Uint8Array))throw new q_("WRONG_DATA_TYPE",{zO:1});const N=new TextDecoder;k=rb(k);Z=this.V.decrypt(Z,k);return JSON.parse(N.decode(Z))}};var dWU={animationEntity:Wqf,accountLinkStatusEntity:quf,booleanEntity:Y4y,buttonEntity:ql0,captionTrack:vIf,channelHandle:zCr,chatLoadingStateEntity:AjU,chipEntity:YzR,commerceAcquisitionClientPayloadEntity:PGf,commerceCartListEntity:cjf,compositeSourceEntity:kMU,multiviewStagingEntity:Nwf,contextNoteFeedEntityPayload:bTr,contextNoteUserRatingEntityPayload:pNi,continuationTokenEntity:v0j,downloadQualityPickerEntity:LIy,downloadsPageRefreshTokenEntity:FIj,downloadsPageViewConfigurationEntity:o0y,
downloadStatusEntity:V3f,dismissState:ZcX,sfvAudioItemCurrentlyPlayingEntity:pLf,emojiFountainDataEntity:KHG,emojiCustomizationSetEntity:TSr,fakeChannel:kEy,fakePlaylist:NGr,fakePlaylistEntryCollection:TG0,fakeVideo:KIj,fakeVideoDescription:ypf,featuredProductsEntity:E00,flowStateEntity:QMN,iconBadgeEntity:Hci,interstitialInteractionStateEntity:sMb,likeButtonAnimationEntity:JpN,liveChatPollStateEntity:Apf,dataFreshnessEntity:a9X,liveViewerLeaderboardChatEntryPointStateEntity:ehR,liveViewerLeaderboardPointsEntity:oIf,
liveReactionsDataEntity:yjf,logoEntity:rpi,macroMarkerEntity:zbX,mainDownloadsLibraryEntity:t3y,mainDownloadsListEntity:ugU,mainPlaylistDownloadStateEntity:lPy,mainPlaylistEntity:i20,mainPlaylistVideoEntity:g00,mainVideoDownloadStateEntity:fPU,mainVideoEntity:GEb,markersEngagementPanelSyncEntity:U5y,markersVisibilityOverrideEntity:b2y,musicAlbumReleaseDetail:qz0,musicAlbumReleaseDownloadMetadataEntity:aIy,musicAlbumRelease:Q$b,musicAlbumReleaseUserDetail:rS0,musicArtistDetail:mn0,musicArtist:CMf,
musicArtistUserDetail:s$b,musicDownloadsLibraryEntity:TwR,musicLibraryEdit:ASf,musicLibraryStatusEntity:PMf,musicPlaylist:HSy,musicPlaylistDownloadMetadataEntity:KqX,musicShare:dnG,musicTrackDetail:Lqy,musicTrackDownloadMetadataEntity:yS0,musicTrack:XLG,musicTrackUserDetail:Vji,offlineOrchestrationActionWrapperEntity:iSy,offlineVideoPolicy:gIb,offlineVideoStreams:wLN,offlineabilityEntity:BGU,orchestrationWebSamplingEntity:D5N,pageHeaderEntity:kjU,pdpStateEntity:dVG,pinnedProductEntity:WIU,playbackData:$nf,
playerStateEntity:pAi,quantityIncrementerEntity:X6U,refresh:xnf,saveToPlaylistListEntity:Mjy,selectedChipIndexEntityPayload:Rbf,settingEntity:j$f,stringEntity:Z2r,suggestedFeedbackChipStateEntity:M3f,transfer:GMi,trendingOfferEntity:Yu0,videoDownloadContextEntity:SzU,videoOverviewAsyncDataEntity:LHX,videoPlaybackPositionEntity:rjf,votingEntity:NSU,ytMainChannelEntity:Suf,youchatPendingResponseEntity:n0f,ytMainDownloadedVideoEntity:O2i,ytMainVideoEntity:ebX};var foy=class{constructor(Z,k){this.V=Z;this.U=k;this.D={}}};var lvr=class extends hxr{D(Z){return Z}U(Z){if(Z instanceof Uint8Array)throw new q_("WRONG_DATA_TYPE",{zO:0});return Z}};var OhX=class{constructor(){this.V={};this.V[0]=new lvr;if(!g.ii("aes_pes_encoder_killswitch")){var Z=this.V;try{const a=g.si();var k=rb(a);var N=new uaN(new y1(k),new qZ(k))}catch(a){throw Z=a instanceof Error?new q_("KEY_CREATION_FAILED",{originalMessage:a.message}):new q_("KEY_CREATION_FAILED"),g.b(Z),Z;}Z[1]=N}}};var v_j=class extends g.jR{constructor(Z,k){super();this.token=Z;this.V=k;this.observers=[];Z=new g.dX.BroadcastChannel(`${"PERSISTENT_ENTITY_STORE_SYNC"}:${g.si()}`);Z.onmessage=this.U.bind(this);this.channel=Z}observe(Z){this.observers.push(Z);return()=>{const k=this.observers.indexOf(Z);k>=0&&this.observers.splice(k,1)}}U(Z){lof(this,Z.data)}YW(){this.channel.close()}},ta;g.MU("","downloadsPageViewConfigurationEntity");g.MU("DOWNLOADS_LIST_ENTITY_ID_MANUAL_DOWNLOADS","mainDownloadsListEntity");g.qf=g.MU("DOWNLOADS_LIST_ENTITY_ID_SMART_DOWNLOADS","mainDownloadsListEntity");g.MU("DOWNLOADS_LIST_ENTITY_ID_SMART_DOWNLOADS","refresh");g.MU("SMART_DOWNLOADS_ENABLED","settingEntity");var GsN=class{constructor(Z,k){this.U=this.V=0;this.V=k.x-Z.x;this.U=k.y-Z.y}};var fvy=class{constructor(){this.V=new Map}};var RRX=new GR("POSTMESSAGE_TUNNEL_TOKEN");var jef=["www.youtube-nocookie.com","www.youtubeeducation.com","youtube.googleapis.com"],Bh0=class{constructor(){this.state=1;this.L8=null;this.Bo=void 0}initialize(Z,k,N,a){this.Bo=a;if(Z.program){var T;a=Z.interpreterUrl??null;Z.interpreterSafeScript?T=p0(Z.interpreterSafeScript):T=Z.interpreterScript??null;Z.interpreterSafeUrl&&(a=RW(Z.interpreterSafeUrl).toString());Iof(this,T,a,Z.program,k,N)}else g.L9(Error("BL:CIP"))}isInitialized(){return this.U()}getState(){return this.state}isLoading(){return this.state===
2}invoke(Z={}){return this.U()?this.D({yr:Z}):null}dispose(){this.V(null);this.Qn(8)}U(){return!!this.L8}D(Z){return this.L8.Yp(Z)}V(Z){g.nM(this.L8);this.L8=Z}Qn(Z){this.state=Z}};var DwN=class extends Bh0{V(Z){lD()?.bgvma();if(Z){const k={bgvma:Z.dispose.bind(Z),bgvmb:Z.snapshot.bind(Z),bgvmc:Z.Yp.bind(Z)};g.X0("yt.abuse.playerAttLoader",k);gX(N=>Z.snapshot(N))}else g.X0("yt.abuse.playerAttLoader",null),g.X0("yt.abuse.playerAttLoaderRun",null)}U(){return!!lD()}D(Z){return lD().bgvmc(Z)}};var rzr=class{constructor(Z){this.t$=Z}Z4(){return"crossDeviceProgressCommand"}bu(Z){if(Z.crossDevicePings){const k=[];for(const N of Z.crossDevicePings)k.push({baseUrl:N.baseUrl});Z={crossDevicePings:k,enableBatchedCrossDevicePings:!0};this.t$.S.X().experiments.yz("relax_bg_notification_throttling")&&(Z.relaxBgNotificationThrottling=!0);this.t$.S.X().experiments.yz("relax_bg_notification_throttling_counterfactual")&&(Z.relaxBgNotificationThrottlingCounterfactual=!0);g.TO("crossDeviceNotificationTransfer",
Z)}}};var KPr=class{constructor(Z,k){this.BZ=Z;this.L5=k}Z4(){return"muteAdEndpoint"}bu(Z,k){switch(Z.type){case "SKIP":E_N(this.BZ,this.L5,k)}}};var qNy=class{Z4(){return"openPopupAction"}bu(){}};var yzf=class{Z4(){return"pingingEndpoint"}bu(){}};var a0r={clickTrackingParams:!0,commandMetadata:!0,loggingUrls:!0},k5y=class extends g.jR{constructor(Z){super();this.fC=Z;this.V=new Map;fO(this,"commandExecutorCommand",(k,N,a)=>{Z7N(this,k.commands,N,a)});
fO(this,"clickTrackingParams",()=>{})}};var z2U={cE:"FINAL",IL:"AD_BREAK_LENGTH",wM:"AD_CPN",WE:"AH",Aw:"AD_MT",hw:"ASR",n6:"AW",xP:"NM",DY:"NX",YP:"NY",Sc:"CONN",Rm:"CPN",AL:"DV_VIEWABILITY",VF:"ERRORCODE",o2:"ERROR_MSG",Dt:"EI",M1:"GOOGLE_VIEWABILITY",Vv:"IAS_VIEWABILITY",X1:"LACT",WQ:"LIVE_TARGETING_CONTEXT",fO:"I_X",V0:"I_Y",xz:"MT",dI:"MIDROLL_POS",LO:"MIDROLL_POS_MS",l_:"MOAT_INIT",J_:"MOAT_VIEWABILITY",e6:"P_H",y0:"PV_H",q2:"PV_W",OZ:"P_W",ktm:"TRIGGER_TYPE",TAa:"SDKV",dxX:"SLOT_POS",Rnq:"SURVEY_LOCAL_TIME_EPOCH_S",B5p:"SURVEY_ELAPSED_MS",
mF:"VIS",kMR:"VIEWABILITY",VIz:"VED",pIW:"VOL",UWS:"WT",wIa:"YT_ERROR_CODE"};var QKf=class{constructor(Z,k,N){this.cZ=Z;this.V=k;this.Za=N;Cm(Pu(),{u9:RRX,pu:fvy})}Z4(){return"urlEndpoint"}bu(Z,k,N){{var a=this.Za.get();const T=sd(a.U.get(),k);T?k=eP(a,R_(T),T,void 0,void 0,N):(wm("Trying to ping from an unknown layout",void 0,void 0,{layoutId:k}),k={})}k={...k};cM(this.V,"h5_inplayer_enable_adcpn_macro_substitution_for_click_pings")&&(N=N9(this.cZ,2))&&(k.AD_CPN=N.clientPlaybackNonce);k=g.hm(Z.url,k);Z=g.RJ(k,void 0,void 0,void 0,Z.attributionSrcMode==="ATTRIBUTION_SRC_MODE_LABEL_CHROME");
Mhy(Z,k)}};var ra=class{constructor(Z){this.value=Z}get(){return this.value}},bby=class extends ra{V(){return"metadata_type_action_companion_ad_renderer"}},RZ0=class extends ra{V(){return"metadata_type_top_banner_image_text_icon_buttoned_layout_view_model"}},sjG=class extends ra{V(){return"metadata_type_ads_engagement_panel_renderer"}},Ahf=class extends ra{V(){return"metadata_type_ads_engagement_panel_layout_view_model"}},ou=class extends ra{V(){return"metadata_type_ad_next_params"}},JC=class extends ra{V(){return"metadata_type_ad_video_clickthrough_endpoint"}},
MWr=class extends ra{V(){return"metadata_type_invideo_overlay_ad_renderer"}},PvU=class extends ra{V(){return"metadata_type_image_companion_ad_renderer"}},chy=class extends ra{V(){return"metadata_type_banner_image_layout_view_model"}},HRX=class extends ra{V(){return"metadata_type_shopping_companion_carousel_renderer"}},bRr=class extends ra{V(){return"metadata_type_ad_info_ad_metadata"}},pxR=class extends ra{V(){return"metadata_ad_video_is_listed"}},nq=class extends ra{V(){return"metadata_type_ad_placement_config"}},
AC=class extends ra{V(){return"metadata_type_ad_pod_info"}},eQ=class extends ra{V(){return"metadata_type_ad_pod_skip_index"}},zV=class extends ra{V(){return"metadata_type_ad_pod_skip_target"}},$G=class extends ra{V(){return"metadata_type_ad_pod_skip_target_callback_ref"}},sq=class extends ra{V(){return"metadata_type_ad_video_id"}},Kd=class extends ra{V(){return"metadata_type_content_cpn"}},Cd=class extends ra{V(){return"metadata_type_instream_ad_player_overlay_renderer"}},m0=class extends ra{V(){return"metadata_type_player_overlay_layout_renderer"}},
U6y=class extends ra{V(){return"metadata_type_player_underlay_renderer"}},y00=class extends ra{V(){return"metadata_type_player_underlay_ad_slot_renderer"}},r0b=class extends ra{V(){return"metadata_type_media_associated_in_player_slot"}},nsf=class extends ra{V(){return"metadata_type_shrunken_player_bytes_config"}},A0f=class extends ra{V(){return"metadata_type_ad_action_interstitial_renderer"}},w9f=class extends ra{V(){return"metadata_type_valid_survey_text_interstitial_renderer"}},r5f=class extends ra{V(){return"METADATA_TYPE_VALID_INSTREAM_SURVEY_AD_RENDERER_FOR_DAI"}},
ZEj=class extends ra{V(){return"METADATA_TYPE_VALID_INSTREAM_SURVEY_AD_RENDERER_FOR_VOD"}},T$f=class extends ra{V(){return"metadata_type_sliding_text_player_overlay_renderer"}},Oq=class extends ra{V(){return"metadata_type_linked_player_bytes_layout_id"}},sYN=class extends ra{V(){return"metadata_type_linked_second_player_bytes_layout_id"}},SQ=class extends ra{V(){return"metadata_type_linked_in_player_layout_id"}},pd=class extends ra{V(){return"metadata_type_linked_in_player_layout_type"}},TOr=class extends ra{V(){return"metadata_type_linked_in_player_slot_id"}},
ecf=class extends ra{V(){return"metadata_type_player_bytes_callback"}},Hd=class extends ra{V(){return"metadata_type_player_bytes_callback_ref"}},NB=class extends ra{constructor(){super({current:null})}V(){return"metadata_type_player_bytes_layout_controls_callback_ref"}},a3r=class extends ra{V(){return"metadata_type_sub_layouts"}},Xxi=class extends ra{V(){return"metadata_type_cue_point"}},l2=class extends ra{V(){return"metadata_type_triggering_cue_point"}},yi=class extends ra{V(){return"metadata_type_video_length_seconds"}},
Qi=class extends ra{V(){return"metadata_type_player_vars"}},QYU=class extends ra{V(){return"metadata_type_preload_player_vars"}},cd=class extends ra{V(){return"metadata_type_sodar_extension_data"}},q0=class extends ra{V(){return"metadata_type_layout_enter_ms"}},rc=class extends ra{V(){return"metadata_type_layout_exit_ms"}},Ld=class extends ra{V(){return"metadata_type_media_sub_layout_index"}},dc=class extends ra{constructor(){super({})}V(){return"metadata_type_dai"}},kbi=class extends ra{constructor(){super({})}V(){return"metadata_type_ad_intro"}},
FBN=class extends ra{V(){return"metadata_type_client_forecasting_ad_renderer"}},Pd=class extends ra{V(){return"metadata_type_drift_recovery_ms"}},M0=class extends ra{V(){return"metadata_type_fulfilled_layout"}},Sbj=class extends ra{V(){return"metadata_type_ad_break_request_data"}},Ssy=class extends ra{V(){return"metadata_type_ad_break_response_data"}},Uq=class extends ra{V(){return"metadata_type_remote_slots_data"}},kG=class extends ra{V(){return"METADATA_TYPE_MEDIA_LAYOUT_DURATION_seconds"}},b2=
class extends ra{V(){return"METADATA_TYPE_MEDIA_BREAK_LAYOUT_DURATION_MILLISECONDS"}},qif=class extends ra{V(){return"metadata_type_legacy_info_card_vast_extension"}},Zm0=class extends ra{V(){return"metadata_type_valid_ad_message_renderer"}},N0=class extends ra{V(){return"METADATA_TYPE_INTERACTIONS_AND_PROGRESS_LAYOUT_COMMANDS"}},oqj=class extends ra{V(){return"metadata_type_served_from_live_infra"}},VrG=class extends ra{V(){return"metadata_type_survey_overlay"}},Xb=class extends ra{V(){return"metadata_type_active_view_traffic_type"}},
X9N=class extends ra{V(){return"metadata_type_active_view_identifier"}},j6f=class extends ra{V(){return"metadata_type_ssdai_ads_config"}},eZi=class extends ra{constructor(){super(!0)}V(){return"metadata_type_allow_pause_ad_break_request_slot_reschedule"}},fd=class extends ra{V(){return"metadata_type_player_bytes_slot_metadata"}},Eq0=class extends ra{constructor(){super({})}V(){return"metadata_type_prefetch_metadata"}};var t7G=new Map([["TRIGGER_CATEGORY_LAYOUT_EXIT_NORMAL","normal"],["TRIGGER_CATEGORY_LAYOUT_EXIT_USER_SKIPPED","skipped"],["TRIGGER_CATEGORY_LAYOUT_EXIT_USER_MUTED","muted"],["TRIGGER_CATEGORY_LAYOUT_EXIT_USER_INPUT_SUBMITTED","user_input_submitted"],["TRIGGER_CATEGORY_LAYOUT_EXIT_USER_CANCELLED","user_cancelled"]]);var fq=()=>"",DAj=new Map([["TRIGGER_CATEGORY_LAYOUT_EXIT_NORMAL",
"trigger_category_layout_exit_normal"],["TRIGGER_CATEGORY_LAYOUT_EXIT_USER_SKIPPED","trigger_category_layout_exit_user_skipped"],["TRIGGER_CATEGORY_LAYOUT_EXIT_USER_MUTED","trigger_category_layout_exit_user_muted"],["TRIGGER_CATEGORY_SLOT_EXPIRATION","trigger_category_slot_expiration"],["TRIGGER_CATEGORY_SLOT_FULFILLMENT","trigger_category_slot_fulfillment"],["TRIGGER_CATEGORY_SLOT_ENTRY","trigger_category_slot_entry"],["TRIGGER_CATEGORY_LAYOUT_EXIT_USER_INPUT_SUBMITTED","trigger_category_layout_exit_user_input_submitted"],
["TRIGGER_CATEGORY_LAYOUT_EXIT_USER_CANCELLED","trigger_category_layout_exit_user_cancelled"]]);var ND=class extends oy{constructor(Z,k,N,a=!1){super(Z);this.Do=N;this.BX=a;this.args=[];k&&this.args.push(k)}};var p=class extends oy{constructor(Z,k,N,a=!1){super(Z);this.Do=N;this.BX=a;this.args=[];k&&this.args.push(k)}};var SB=class{constructor(Z){const k=new Map;Z.forEach(N=>{k.set(N.V(),N)});
this.V=k}PD(Z){Z=this.V.get(Z);if(Z!==void 0)return Z.get()}};new Promise(()=>{});var QLy=new Map([["unspecified","CONTROL_FLOW_MANAGER_LAYER_UNSPECIFIED"],["core","CONTROL_FLOW_MANAGER_LAYER_CORE"],["adapter","CONTROL_FLOW_MANAGER_LAYER_ADAPTER"],["surface","CONTROL_FLOW_MANAGER_LAYER_SURFACE"],["external","CONTROL_FLOW_MANAGER_LAYER_EXTERNAL"]]),K3N=new Map([["normal",{vN:"ADS_CLIENT_EVENT_TYPE_NORMAL_EXIT_LAYOUT_REQUESTED",Mn:"ADS_CLIENT_EVENT_TYPE_LAYOUT_EXITED_NORMALLY"}],["skipped",{vN:"ADS_CLIENT_EVENT_TYPE_SKIP_EXIT_LAYOUT_REQUESTED",Mn:"ADS_CLIENT_EVENT_TYPE_LAYOUT_EXITED_SKIP"}],
["muted",{vN:"ADS_CLIENT_EVENT_TYPE_MUTE_EXIT_LAYOUT_REQUESTED",Mn:"ADS_CLIENT_EVENT_TYPE_LAYOUT_EXITED_MUTE"}],["abandoned",{vN:"ADS_CLIENT_EVENT_TYPE_ABANDON_EXIT_LAYOUT_REQUESTED",Mn:"ADS_CLIENT_EVENT_TYPE_LAYOUT_EXITED_ABANDON"}],["user_input_submitted",{vN:"ADS_CLIENT_EVENT_TYPE_USER_INPUT_SUBMITTED_EXIT_LAYOUT_REQUESTED",Mn:"ADS_CLIENT_EVENT_TYPE_LAYOUT_EXITED_USER_INPUT_SUBMITTED"}],["user_cancelled",{vN:"ADS_CLIENT_EVENT_TYPE_USER_CANCELLED_EXIT_LAYOUT_REQUESTED",Mn:"ADS_CLIENT_EVENT_TYPE_LAYOUT_EXITED_USER_CANCELLED"}],
["error",{vN:"ADS_CLIENT_EVENT_TYPE_ABORTED_EXIT_LAYOUT_REQUESTED",Mn:"ADS_CLIENT_EVENT_TYPE_LAYOUT_EXITED_ABORTED"}]]),Cy=class{constructor(Z){this.Gt=Z;Z=Math.random();var k=this.Gt.get();k=g.Q5(k.S.X().experiments,"html5_debug_data_log_probability");k=Number.isFinite(k)&&k>=0&&k<=1?k:0;this.V=Z<k}};var gMf=class extends g.jR{constructor(Z,k,N,a){super();this.U=k;this.sH=N;this.Gt=a;this.V=Z(this,this,this,this,this);g.u(this,this.V);for(const T of k)g.u(this,T)}A5(Z,k){return this.V.A5(Z,k)}Xi(Z,k){this.sH.V("ADS_CLIENT_EVENT_TYPE_OPPORTUNITY_RECEIVED",Z,k);for(const N of this.U)N.Xi(Z,k)}MR(Z){if(Ja(this.V,Z)){bD(this.sH,"ADS_CLIENT_EVENT_TYPE_SLOT_ENTERED",Z);this.V.MR(Z);for(const k of this.U)k.MR(Z);sLf(this,Z)}}cq(Z){if(Ja(this.V,Z)){bD(this.sH,"ADS_CLIENT_EVENT_TYPE_SLOT_EXITED",Z);this.V.cq(Z);
for(const k of this.U)k.cq(Z);Ja(this.V,Z)&&zT(this.V,Z).L&&nO(this,Z,!1)}}EX(Z){bD(this.sH,"ADS_CLIENT_EVENT_TYPE_SLOT_FULFILLMENT_CANCELLED",Z);Ja(this.V,Z)&&(this.V.EX(Z),nO(this,Z,!1))}l0(Z,k){if(Ja(this.V,Z)){W0(this.sH,"ADS_CLIENT_EVENT_TYPE_LAYOUT_ENTERED",Z,k);for(const N of this.U)N.l0(Z,k)}}eI(Z,k,N){if(Ja(this.V,Z)){W0(this.sH,yvG(N),Z,k);this.V.eI(Z,k);for(const a of this.U)a.eI(Z,k,N);(N=pO(this.V,Z))&&k.layoutId===N.layoutId&&mAG(this,Z,!1)}}aJ(Z,k,N,a){N.Do&&a?(wm(N,Z,k,void 0,N.BX),
ZH(this.sH,a,N.Do,Z,k)):wm("adsClientErrorMessage is missing.",Z,k);nO(this,Z,!0)}YW(){const Z=Bnb(this.V);for(const k of Z)nO(this,k,!1);super.YW()}VT(Z,k){W0(this.sH,"ADS_CLIENT_EVENT_TYPE_UNSCHEDULE_LAYOUT_REQUESTED",Z,k);W0(this.sH,"ADS_CLIENT_EVENT_TYPE_LAYOUT_UNSCHEDULED",Z,k);for(const N of this.U)k&&N.VT(Z,k)}};var hcf=class{constructor(Z){this.slot=Z;this.zt=new Map;this.Vz=new Map;this.N=new Map;this.O=new Map;this.D=this.layout=this.U=this.j=void 0;this.G=this.L=!1;this.C=[];this.V="not_scheduled";this.Y="not_filled"}isActive(){switch(this.V){case "entered":case "rendering":case "rendering_stop_requested":case "exit_requested":return!0;default:return!1}}};var wv0=class extends g.jR{constructor(Z,k,N,a,T,K){super();this.GQ=Z;this.D=k;this.L=N;this.Y=a;this.U=T;this.Gt=K;this.V=new Map}A5(Z,k){Z=M_(this,`${Z}_${k}`);k=[];for(const N of Z.values())k.push(N.slot);return k}sP(Z){Z=zT(this,Z);Z.V!=="not_scheduled"&&Yo(Z.slot,Z.V,"onSlotScheduled");Z.V="scheduled"}aN(Z){Z=zT(this,Z);Z.Y="fill_requested";Z.j.aN()}MR(Z){Z=zT(this,Z);Z.V!=="enter_requested"&&Yo(Z.slot,Z.V,"onSlotEntered");Z.V="entered"}EX(Z){zT(this,Z).Y="fill_canceled"}cq(Z){Z=zT(this,Z);Z.V!==
"exit_requested"&&Yo(Z.slot,Z.V,"onSlotExited");Z.V="scheduled"}eI(Z,k){Z=zT(this,Z);Z.layout!=null&&Z.layout.layoutId===k.layoutId&&(Z.V!=="rendering_stop_requested"&&Yo(Z.slot,Z.V,"onLayoutExited"),Z.V="entered")}};var i7y=class extends g.jR{constructor(Z){super();this.V=Z;this.instance=null;this.addOnDisposeCallback(()=>{g.nM(this.instance);this.instance=null})}get(){Math.random()<.001&&this.jm()&&wm("Tried to retrieve object during dispose",void 0,void 0,{type:typeof this.instance});
this.instance||(this.instance=this.V());return this.instance}};var Orf=class extends g.jR{constructor(Z){super();this.V=Z;this.U=$Ai(this)}D(){return this.U}};var m7=class{constructor(Z){this.V=Z}executeCommand(Z,k){B0(this.V(),Z,k)}};var vxf=class{constructor(){this.listeners=new Set}addListener(Z){this.listeners.add(Z)}removeListener(Z){this.listeners.delete(Z)}};var sk=class{constructor(Z){this.Gt=Z}};var irN=class{constructor(Z,k,N,a,T){this.callback=Z;this.slot=k;this.U=N;this.k8=a;this.Gt=T;this.V=null}};var uX={AD_MARKER:"ytp-ad-progress",CHAPTER_MARKER:"ytp-chapter-marker",TIME_MARKER:"ytp-time-marker"};var o5r=RegExp("^https?://([^.]*\\.moatads\\.com/|e[0-9]+\\.yt\\.srs\\.doubleverify\\.com|pagead2\\.googlesyndication\\.com/pagead/gen_204\\?id=yt3p&sr=1&|pm\\.adsafeprotected\\.com/youtube|pm\\.test-adsafeprotected\\.com/youtube|youtube[0-9]+\\.moatpixel\\.com/)"),Jvy=RegExp("^https://([a-z]+\\.)?[0-9a-f]{1,63}\\.sslproxy\\.corp\\.google\\.com/|^https://([a-z]+\\.)?[a-z0-9\\-]{1,63}\\.demos\\.corp\\.google\\.com/|^https://[0-9a-f]{1,63}\\.proxy\\.googleprod\\.com/|^https?://(([-\\w]*www[-\\w]*\\.|[-\\w]*web[-\\w]*\\.|[-\\w]*canary[-\\w]*\\.|[-\\w]*dev[-\\w]*\\.|[-\\w]{1,3}\\.)+(corp\\.)?youtube(-nocookie|kids|education)?\\.com/|([A-Za-z0-9-]{1,63}\\.)*(youtube\\.googleapis\\.com)[.]?(:[0-9]+)?/|([a-z]+\\.)?[a-z0-9\\-]{1,63}\\.([a-z]{3}|i)\\.corp\\.google\\.com(:[0-9]+)?/|([a-z]+\\.)?[a-z0-9\\-]{1,63}\\.c\\.googlers\\.com(:[0-9]+)?/|(docs|drive)\\.google\\.com/(a/[^/\\\\%]+/|)|(music|music-green-qa|music-release-qa|yt-music-green\\.corp)\\.youtube\\.com/|(tv|tv-green-qa|tv-green-qa\\.corp|tv-release-qa|tv-release-qa\\.corp|tv-integration-qa|tv-integration-qa\\.corp|yt-tv-autopush\\.corp|yt-tv-integration\\.corp|yt-tv-staging\\.corp)\\.youtube\\.com/|[A-Za-z0-9-]+\\.prod\\.google\\.com(:[0-9]+)?/)"),
J_b=RegExp("^https?://(www\\.google\\.com/pagead/xsul|www\\.youtube\\.com/pagead/slav)"),I0N=RegExp("^https://([A-Za-z0-9-]{1,63}\\.)+demos\\.corp\\.google\\.com(/(?!url\\b)|$)|^https://([A-Za-z0-9-]{1,63}\\.)+sslproxy\\.corp\\.google\\.com(/|$)|^https?://(([A-Za-z0-9-]{1,63}\\.)*(corp\\.google\\.com|proxy\\.googleprod\\.com|c\\.googlers\\.com|proxy\\.googlers\\.com|docs\\.google\\.com|drive\\.google\\.com|prod\\.google\\.com|currents\\.google\\.com|mail\\.google\\.com|youtube\\.com|youtubeeducation\\.com|youtube\\-nocookie\\.com|youtubekids\\.com)[.]?(:[0-9]+)?/|([A-Za-z0-9-]{1,63}\\.)*(sandbox\\.google\\.com)(:[0-9]+)?(/(?!url\\b)|$))"),
M7i=RegExp("^https://([A-Za-z0-9-]{1,63}\\.)+demos\\.corp\\.google\\.com(/(?!url\\b)|$)|^https://([A-Za-z0-9-]{1,63}\\.)+sslproxy\\.corp\\.google\\.com(/|$)|^https?://(([A-Za-z0-9-]{1,63}\\.)*(corp\\.google\\.com|proxy\\.googleprod\\.com|c\\.googlers\\.com|proxy\\.googlers\\.com|borg\\.google\\.com|prod\\.google\\.com|youtube\\.com|youtubekids\\.com)[.]?(:[0-9]+)?/|([A-Za-z0-9-]{1,63}\\.)*(sandbox\\.google\\.com)(:[0-9]+)?(/(?!url\\b)|$))"),b7R=RegExp("^((http(s)?):)?\\/\\/((((lh[3-6](-tt|-d[a-g,z])?\\.((ggpht)|(googleusercontent)|(google)|(sandbox\\.google)))|(lh7\\-(eu|us|qw|rt)\\.((googleusercontent)|(google)))|((photos|testonly|work)\\.fife\\.usercontent\\.google)|([\\w\\-]+\\.fife\\.usercontent\\.google)|(([1-4]\\.bp\\.blogspot)|(bp[0-3]\\.blogger))|(ccp-lh\\.googleusercontent)|((((cp|ci|gp)[3-6])|(ap[1-2]))\\.(ggpht|googleusercontent))|(gm[1-4]\\.ggpht)|(play-(ti-)?lh\\.googleusercontent)|(gz0\\.googleusercontent)|(((yt[3-4])|(sp[1-3]))\\.(ggpht|googleusercontent)))\\.com)|(drive\\.google\\.com\\/drive\\-(usercontent|viewer))|(dp[3-6]\\.googleusercontent\\.cn)|(dp4\\.googleusercontent\\.com)|((photos|drive|contribution)\\-image\\-(dev|qa)(-us|-eu)?(-auth|-cookie)?\\.corp\\.google\\.com)|(photos\\-image\\-dev\\-dl\\-(auth|eu|us)\\.corp\\.google\\.com)|((dev|dev2|dev3|qa|qa2|qa3|qa-red|qa-blue|canary)[-.]lighthouse\\.sandbox\\.google\\.com\\/image)|(image\\-(dev|qa)\\-lighthouse(-auth)?\\.sandbox\\.google\\.com(\\/image)?)|(drive\\-qa\\.corp\\.google\\.com\\/drive\\-(usercontent|viewer))|(docs(\\-(dev|qa)\\.corp)?\\.google\\.com\\/(u\\/[0-9]+\\/)?(docs|sheets|slides|drawings|forms|videos|pictures)\\-images\\-(rt|qw))|(docs\\.sandbox\\.google\\.com\\/(u\\/[0-9]+\\/)?(docs|sheets|slides|drawings|forms|videos|pictures)\\-images))\\/|^https://([A-Za-z0-9-]{1,63}\\.)+demos\\.corp\\.google\\.com(/(?!url\\b)|$)|^https://([A-Za-z0-9-]{1,63}\\.)+sslproxy\\.corp\\.google\\.com(/|$)|^https?://(([A-Za-z0-9-]{1,63}\\.)*(corp\\.google\\.com|proxy\\.googleprod\\.com|c\\.googlers\\.com|proxy\\.googlers\\.com|borg\\.google\\.com|docs\\.google\\.com|drive\\.google\\.com|googleplex\\.com|play\\.google\\.com|prod\\.google\\.com|currents\\.google\\.com|video\\.google\\.com|youtube\\.com|ytimg\\.com|ytimg\\.sandbox\\.google\\.com|chat\\.google\\.com)[.]?(:[0-9]+)?/|([A-Za-z0-9-]{1,63}\\.)*(sandbox\\.google\\.com)(:[0-9]+)?(/(?!url\\b)|$)|s2\\.googleusercontent\\.com/s2/favicons\\?|yt[3-4]\\.ggpht\\.com/)"),
z6r=RegExp("^https?.*#ocr$|^https?://(aksecure\\.imrworldwide\\.com/|cdn\\.imrworldwide\\.com/|secure\\-..\\.imrworldwide\\.com/)"),pvR=RegExp("^https?://(googleads\\.g\\.doubleclick\\.net/(aclk|pagead/conversion)|www\\.google\\.com/(aclk|pagead/conversion)|www\\.googleadservices\\.com/(aclk|pagead/(aclk|conversion))|www\\.youtube\\.com/pagead/conversion)"),UA0=RegExp("^((http(s)?):)?\\/\\/((((lh[3-6](-tt|-d[a-g,z])?\\.((ggpht)|(googleusercontent)|(google)|(sandbox\\.google)))|(lh7\\-(eu|us|qw|rt)\\.((googleusercontent)|(google)))|((photos|testonly|work)\\.fife\\.usercontent\\.google)|([\\w\\-]+\\.fife\\.usercontent\\.google)|(([1-4]\\.bp\\.blogspot)|(bp[0-3]\\.blogger))|(ccp-lh\\.googleusercontent)|((((cp|ci|gp)[3-6])|(ap[1-2]))\\.(ggpht|googleusercontent))|(gm[1-4]\\.ggpht)|(play-(ti-)?lh\\.googleusercontent)|(gz0\\.googleusercontent)|(((yt[3-4])|(sp[1-3]))\\.(ggpht|googleusercontent)))\\.com)|(drive\\.google\\.com\\/drive\\-(usercontent|viewer))|(dp[3-6]\\.googleusercontent\\.cn)|(dp4\\.googleusercontent\\.com)|((photos|drive|contribution)\\-image\\-(dev|qa)(-us|-eu)?(-auth|-cookie)?\\.corp\\.google\\.com)|(photos\\-image\\-dev\\-dl\\-(auth|eu|us)\\.corp\\.google\\.com)|((dev|dev2|dev3|qa|qa2|qa3|qa-red|qa-blue|canary)[-.]lighthouse\\.sandbox\\.google\\.com\\/image)|(image\\-(dev|qa)\\-lighthouse(-auth)?\\.sandbox\\.google\\.com(\\/image)?)|(drive\\-qa\\.corp\\.google\\.com\\/drive\\-(usercontent|viewer))|(docs(\\-(dev|qa)\\.corp)?\\.google\\.com\\/(u\\/[0-9]+\\/)?(docs|sheets|slides|drawings|forms|videos|pictures)\\-images\\-(rt|qw))|(docs\\.sandbox\\.google\\.com\\/(u\\/[0-9]+\\/)?(docs|sheets|slides|drawings|forms|videos|pictures)\\-images))\\/|^https://([A-Za-z0-9-]{1,63}\\.)+demos\\.corp\\.google\\.com(/(?!url\\b)|$)|^https://([A-Za-z0-9-]{1,63}\\.)+sslproxy\\.corp\\.google\\.com(/|$)|^https?://(([A-Za-z0-9-]{1,63}\\.)*(corp\\.google\\.com|proxy\\.googleprod\\.com|c\\.googlers\\.com|proxy\\.googlers\\.com|borg\\.google\\.com|docs\\.google\\.com|drive\\.google\\.com|googleplex\\.com|googlevideo\\.com|prod\\.google\\.com|lh3\\.photos\\.google\\.com|currents\\.google\\.com|mail\\.google\\.com|youtube\\.com|yt\\.akamaized\\.net|chat\\.google\\.com)[.]?(:[0-9]+)?/|([A-Za-z0-9-]{1,63}\\.)*(sandbox\\.google\\.com)(:[0-9]+)?(/(?!url\\b)|$)|([A-Za-z0-9-]{1,63}\\.)*c\\.lh3(-d[a-gyz]|-testonly)?\\.(googleusercontent|photos\\.google)\\.com/.*$)"),
gxi=RegExp("^https?://(([A-Za-z0-9-]{1,63}\\.)*(imasdk\\.googleapis\\.com|2mdn\\.net|googlesyndication\\.com|corp\\.google\\.com|proxy\\.googleprod\\.com|c\\.googlers\\.com|proxy\\.googlers\\.com|borg\\.google\\.com|googleads\\.g\\.doubleclick\\.net|prod\\.google\\.com|static\\.doubleclick\\.net|static\\.googleadsserving\\.cn|studioapi\\.doubleclick\\.net|youtube\\.com|youtube\\.googleapis\\.com|youtube\\-nocookie\\.com|youtubekids\\.com|ytimg\\.com|ytimg\\.sandbox\\.google\\.com)[.]?(:[0-9]+)?/|lightbox-(demos|builder)\\.appspot\\.com/|s[01](qa)?\\.2mdn\\.net/ads/richmedia/studio/mu/templates/tetris|www\\.gstatic\\.com/doubleclick/studio/innovation/h5/layouts/tetris|www\\.gstatic\\.com/doubleclick/studio/innovation/ytplayer)"),
wVy=RegExp("^https://([A-Za-z0-9-]{1,63}\\.)*(crowdsource|datacompute)\\.google\\.com/|^https://([A-Za-z0-9-]{1,63}\\.)+demos\\.corp\\.google\\.com(/(?!url\\b)|$)|^https://([A-Za-z0-9-]{1,63}\\.)+sslproxy\\.corp\\.google\\.com(/|$)|^https://(ads|adwords\\.corp)\\.google\\.com/(aw/(assetgroup/(edit|new)|campaigns/(new/(performancemax|demandgen)|edit/demandgen))|$)|^https://(adwords-)?canary\\.qa\\.adz\\.google\\.com/(aw/(assetgroup/(edit|new)|campaigns/(new/(performancemax|demandgen)|edit/demandgen))|$)|^https://(books|play-books-(autopush|internal|preprod|staging)(-sandbox|\\.corp))\\.googleusercontent\\.com(/|$)|^https://ads(-external)?-prod\\.qa\\.adz\\.google\\.com/(aw/(assetgroup/(edit|new)|campaigns/(new/(performancemax|demandgen)|edit/demandgen))|$)|^https://canvastester-3fd0b\\.appspot\\.com(/|$)|^https://localhost\\.googleusercontent\\.com(:\\d+)?(/|$)|^https://narrative-news-cast-receiver-d\\.appspot\\.com(/|$)|^https://narrative-news-cast-receiver-f\\.appspot\\.com(/|$)|^https://one\\.google\\.com(/|$)|^https://www\\.google\\.com/culturalinstitute/manage/.*$|^https://www\\.gstatic\\.com/aog_howto|^https://www\\.gstatic\\.com/narrative_cast_receiver/news|^https?://(([A-Za-z0-9-]{1,63}\\.)*(imasdk\\.googleapis\\.com|corp\\.google\\.com|proxy\\.googleprod\\.com|c\\.googlers\\.com|proxy\\.googlers\\.com|borg\\.google\\.com|docs\\.google\\.com|drive\\.google\\.com|googleads\\.g\\.doubleclick\\.net|googleplex\\.com|play\\.google\\.com|prod\\.google\\.com|photos\\.google\\.com|get\\.google\\.com|currents\\.google\\.com|blogger\\.com|mail\\.google\\.com|survey\\.g\\.doubleclick\\.net|youtube\\.com|youtube\\.googleapis\\.com|youtubeeducation\\.com|youtube\\-nocookie\\.com|yt\\-web\\-embedded\\-player\\.appspot\\.com|youtubekids\\.com|vevo\\.com|chat\\.google\\.com|meet\\.google\\.com|artsandculture\\.google\\.com)[.]?(:[0-9]+)?(/|$)|([A-Za-z0-9-]{1,63}\\.)*(sandbox\\.google\\.com)(:[0-9]+)?(/(?!url\\b)|$)|(www\\.|encrypted\\.)?google\\.(cat|com(\\.(a[fgiru]|b[dhnorz]|c[ouy]|do|e[cgt]|fj|g[hit]|hk|jm|kh|kw|l[bcy]|m[mtxy]|n[afgip]|om|p[aeghkry]|qa|s[abglv]|t[jnrw]|ua|uy|vc|vn))?|a[cdelmstz]|c[acdfghilmnvz]|b[aefgijsty]|ee|es|d[ejkmz]|g[aefglmpry]|f[imr]|i[emoqrst]|h[nrtu]|k[giz]|je|jo|m[degklnsuvw]|l[aiktuv]|n[eloru]|p[lnst]|s[cehikmnort]|r[osuw]|us|t[dgklmnot]|ws|vg|vu|co\\.(ao|bw|ck|cr|i[dln]|jp|ke|kr|ls|ma|mz|nz|th|tz|u[gkz]|ve|vi|z[amw]))/(search|webhp)\\?|(www\\.|encrypted\\.)google\\.(cat|com(\\.(a[fgiru]|b[dhnorz]|c[ouy]|do|e[cgt]|fj|g[hit]|hk|jm|kh|kw|l[bcy]|m[mtxy]|n[afgip]|om|p[aeghkry]|qa|s[abglv]|t[jnrw]|ua|uy|vc|vn))?|a[cdelmstz]|c[acdfghilmnvz]|b[aefgijsty]|ee|es|d[ejkmz]|g[aefglmpry]|f[imr]|i[emoqrst]|h[nrtu]|k[giz]|je|jo|m[degklnsuvw]|l[aiktuv]|n[eloru]|p[lnst]|s[cehikmnort]|r[osuw]|us|t[dgklmnot]|ws|vg|vu|co\\.(ao|bw|ck|cr|i[dln]|jp|ke|kr|ls|ma|mz|nz|th|tz|u[gkz]|ve|vi|z[amw]))/?$|lightbox-(demos|builder)\\.appspot\\.com/|s0\\.2mdn\\.net/instream/html5/native/|s[01](qa)?\\.2mdn\\.net/ads/richmedia/studio/mu/templates/tetris|www\\.gstatic\\.com/doubleclick/studio/innovation/h5/layouts/tetris)"),
$wf=RegExp("^(https://play\\.google\\.com|https://photos\\.google\\.com|https://get\\.google\\.com|https://currents\\.google\\.com|https://mail\\.google\\.com|https://yt\\-web\\-embedded\\-player\\.appspot\\.com|http://yt\\-web\\-embedded\\-player\\.appspot\\.com|https://chat\\.google\\.com|https://one\\.google\\.com|https://artsandculture\\.google\\.com|https://adstransparency\\.google\\.com|https://ads\\.google\\.com|https://adwords\\.corp\\.google\\.com|https://ads\\-external\\-prod\\.qa\\.adz\\.google\\.com|https://ads\\-prod\\.qa\\.adz\\.google\\.com|https://adwords\\-canary\\.qa\\.adz\\.google\\.com|https://canary\\.qa\\.adz\\.google\\.com)$|^http://[0-9]+\\.[a-z0-9\\-_]+\\.[a-z0-9\\-_]+\\.[a-z0-9\\-_]+\\.([a-z]{2}|i)\\.borg\\.google\\.com(:[0-9]+)?$|^https://((autopush|beta-lookup|daily-[0-6]|manual-qual|preprod|stream)\\.)?meet\\.google\\.com$|^https://([A-Za-z0-9-]{1,63}\\.)*(crowdsource|datacompute)\\.google\\.com$|^https://([A-Za-z0-9-]{1,63}\\.)*(youtube|youtubekids|youtubeeducation)\\.com$|^https://([A-Za-z0-9-]{1,63}\\.)+demos\\.corp\\.google\\.com$|^https://([A-Za-z0-9-]{1,63}\\.)+sandbox\\.google\\.com$|^https://([A-Za-z0-9-]{1,63}\\.)+sslproxy\\.corp\\.google\\.com$|^https://(books|play-books-(autopush|internal|preprod|staging)(-sandbox|\\.corp))\\.googleusercontent\\.com$|^https://(draft|www|(www\\.)?dev\\.sandbox|(www\\.)?autopush\\.sandbox|(www\\.)?staging\\.sandbox|(www\\.)?restore\\.sandbox)\\.blogger\\.com$|^https://[0-9a-f]{1,63}\\.proxy\\.googleprod\\.com$|^https://localhost\\.googleusercontent\\.com(:\\d+)?$|^https?://(((docs|m|sing|ss|sss|www)\\.)?drive\\.google\\.com$|([A-Za-z0-9-]{1,63}\\.)*c\\.googlers\\.com(:[0-9]+)?$|([A-Za-z0-9-]{1,63}\\.)*corp\\.google\\.com(:[0-9]+)?$|([A-Za-z0-9-]{1,63}\\.)*googleplex\\.com(:[0-9]+)?$|([A-Za-z0-9-]{1,63}\\.)*proxy\\.googlers\\.com(:[0-9]+)?$|(www\\.|encrypted\\.)google\\.(cat|com(\\.(a[fgiru]|b[dhnorz]|c[ouy]|do|e[cgt]|fj|g[hit]|hk|jm|kh|kw|l[bcy]|m[mtxy]|n[afgip]|om|p[aeghkry]|qa|s[abglv]|t[jnrw]|ua|uy|vc|vn))?|a[cdelmstz]|c[acdfghilmnvz]|b[aefgijsty]|ee|es|d[ejkmz]|g[aefglmpry]|f[imr]|i[emoqrst]|h[nrtu]|k[giz]|je|jo|m[degklnsuvw]|l[aiktuv]|n[eloru]|p[lnst]|s[cehikmnort]|r[osuw]|us|t[dgklmnot]|ws|vg|vu|co\\.(ao|bw|ck|cr|i[dln]|jp|ke|kr|ls|ma|mz|nz|th|tz|u[gkz]|ve|vi|z[amw]))/?$|[A-Za-z0-9-]+\\.prod\\.google\\.com(:[0-9]+)?$|docs\\.google\\.com$)");var xwb;g.pe=class{constructor(Z,k,N={}){this.start=Z;this.end=k;this.active=!0;this.color="";this.U=xwb++;this.id=N.id||"";this.priority=N.priority||9;this.visible=N.visible||!1;this.style=N.style||uX.AD_MARKER;this.namespace=N.namespace||"";if(Z=N.color)Z=Z.toString(16),this.color=`#${Array(7-Z.length).join("0")}${Z}`;this.tooltip=N.tooltip;this.icons=N.icons?N.icons.filter(a=>g.Wy(a.thumbnails,T=>g.LA(T.url))):null;
this.associatedClipId=N.associatedClipId;this.markerPositionMs=N.markerPositionMs;this.visible=this.visible;this.style=this.style;this.start=this.start}getId(){return this.id}toString(){return"CueRange{"+this.namespace+":"+this.id+"}["+W3y(this.start)+", "+W3y(this.end)+"]"}contains(Z,k){return Z>=this.start&&(Z<this.end||Z===this.end&&this.start===this.end)&&(k==null||Z<k&&k<=this.end)}};xwb=1;g.pe.prototype.getId=g.pe.prototype.getId;var GDf=class{constructor(Z,k,N,a,T,K,y,Q,q){this.slot=k;this.U=N;this.Za=y;this.E6=Q;this.wD=q;this.V=new irN(Z,k,a,T,K)}aN(){let Z=0;eAy(this.V,()=>{const k=this.slot.clientMetadata.PD("metadata_type_ad_break_request_data");Z=Date.now();g7(this.Za.get(),"abrs",`ct.${Z};cmt.${this.E6.get().getCurrentTimeSec(1,!1)};sid.${this.slot.slotId};`);return this.U.get().fetch({UY:k.getAdBreakUrl,yW:new g.pe(k.FM,k.SP),eq:this.slot.clientMetadata.PD("metadata_type_cue_point"),cueProcessedMs:k.cueProcessedMs})},
()=>{Zj0(this)},k=>{var N=Date.now()-Z;
g7(this.Za.get(),"abrr",`ct.${(new Date).getTime()};cmt.${this.E6.get().getCurrentTimeSec(1,!1)};l.${N.toString()};sid.${this.slot.slotId};`);N=k.HX;N.length>=2&&k.ssdaiAdsConfig&&wm("Unexpected ad placement renderers length",this.slot,null,{length:N.length});k.adSlots?.some(a=>g.J(a,PU)?.adSlotMetadata?.slotType==="SLOT_TYPE_PLAYER_BYTES")||N.some(a=>!!a.renderer?.linearAdSequenceRenderer?.linearAds?.length||!!a.renderer?.instreamVideoAdRenderer)||Zj0(this)})}jq(){oM0(this.V)}};var SVj=class{constructor(Z,k,N,a,T,K){this.slot=k;this.V=N;this.U=new irN(Z,k,a,T,K)}aN(){eAy(this.U,()=>{const Z=this.slot.clientMetadata.PD("metadata_type_ad_break_request_data");return Z.cueProcessedMs?this.V.get().fetch({UY:Z.getAdBreakUrl,yW:new g.pe(Z.FM,Z.SP),cueProcessedMs:Z.cueProcessedMs}):this.V.get().fetch({UY:Z.getAdBreakUrl,yW:new g.pe(Z.FM,Z.SP)})})}jq(){oM0(this.U)}};var exf=class{constructor(Z,k){this.callback=Z;this.slot=k}aN(){var Z=this.slot.clientMetadata;Z=this.slot.fulfilledLayout??Z.PD("metadata_type_fulfilled_layout");Avf(this.callback,this.slot,Z)}jq(){kB(this.callback,this.slot,new p(`Got CancelSlotFulfilling request for ${this.slot.slotType} in `+"DirectFulfillmentAdapter.",void 0,"ADS_CLIENT_ERROR_MESSAGE_INVALID_FULFILLMENT_CANCELLATION_REQUEST"),"ADS_CLIENT_ERROR_TYPE_FULFILL_SLOT_FAILED")}};var ox0=class{build(Z,k){return k.fulfilledLayout||lX(k,{Eb:["metadata_type_fulfilled_layout"]})?new exf(Z,k):this.D(Z,k)}};var At=class extends ox0{constructor(Z,k,N,a,T,K,y){super();this.V=Z;this.U=k;this.k8=N;this.Gt=a;this.Za=T;this.E6=K;this.wD=y}D(Z,k){if(lX(k,{Eb:["metadata_type_ad_break_request_data","metadata_type_cue_point"],slotType:"SLOT_TYPE_AD_BREAK_REQUEST"}))return new GDf(Z,k,this.V,this.U,this.k8,this.Gt,this.Za,this.E6,this.wD);if(lX(k,{Eb:["metadata_type_ad_break_request_data"],slotType:"SLOT_TYPE_AD_BREAK_REQUEST"}))return new SVj(Z,k,this.V,this.U,this.k8,this.Gt);throw new p(`Unsupported slot with type: ${k.slotType} and client metadata: ${iD(k.clientMetadata)} in `+
"AdBreakRequestSlotFulfillmentAdapterFactory.");}};var Ph=class extends ox0{D(Z,k){throw new p(`Unsupported slot with type: ${k.slotType} and client metadata: ${iD(k.clientMetadata)} in `+"DefaultFulfillmentAdapterFactory.");}};var JTf=class{constructor(Z,k,N,a,T,K){this.callback=Z;this.slot=k;this.layout=N;this.D=a;this.V=T;this.U=K}zM(){return this.slot}zZ(){return this.layout}init(){}release(){}startRendering(Z){if(Z.layoutId!==this.layout.layoutId)this.callback.aJ(this.slot,Z,new ND("Tried to start rendering an unknown layout, this adapter "+`requires LayoutId: ${this.layout.layoutId}`+`and LayoutType: ${this.layout.layoutType}`,void 0,"ADS_CLIENT_ERROR_MESSAGE_UNKNOWN_LAYOUT"),"ADS_CLIENT_ERROR_TYPE_ENTER_LAYOUT_FAILED");
else{var k=Z.clientMetadata.PD("metadata_type_ad_break_response_data");this.slot.slotType==="SLOT_TYPE_AD_BREAK_REQUEST"?(this.callback.l0(this.slot,Z),ibN(this.D,this.slot,k)):wm("Unexpected slot type in AdBreakResponseLayoutRenderingAdapter - this should never happen",this.slot,Z)}}C8(Z,k){Z.layoutId!==this.layout.layoutId?this.callback.aJ(this.slot,Z,new ND("Tried to stop rendering an unknown layout, this adapter "+`requires LayoutId: ${this.layout.layoutId}`+`and LayoutType: ${this.layout.layoutType}`,
void 0,"ADS_CLIENT_ERROR_MESSAGE_UNKNOWN_LAYOUT"),"ADS_CLIENT_ERROR_TYPE_EXIT_LAYOUT_FAILED"):(this.callback.eI(this.slot,Z,k),N3y(this),aUU(this))}};var zxG=class{constructor(Z,k,N){this.V=Z;this.slot=k;this.layout=N}};var ch=class extends g.n9{constructor(Z,k,N,a){super();this.callback=Z;this.D=a;this.V=[];this.U=new zxG(Z,k,N)}zM(){return this.U.slot}zZ(){return this.U.layout}get slot(){return this.U.slot}get layout(){return this.U.layout}init(){this.D.get().addListener(this)}release(){this.D.get().removeListener(this);this.dispose()}oh(){}zn(){}pL(){}gS(){}startRendering(Z){OT(this.U,Z,()=>void this.wy())}wy(){this.D.get().wy(this.V)}C8(Z,k){OT(this.U,Z,()=>{var N=this.D.get();
n$U(N,this.V,3);this.V=[];this.callback.eI(this.slot,Z,k)})}YW(){this.D.jm()||this.D.get().removeListener(this);
super.YW()}};var zZ=class{constructor(Z,k,N,a,T=null){this.D=Z;this.Za=k;this.layoutId=a;this.Y=0;this.G=null;this.L=void 0;this.V=new Set;this.U=Array.from(this.D.get("progress")||[]);this.U.sort((K,y)=>(K.offsetMilliseconds||0)-(y.offsetMilliseconds||0));
this.j={adPlacementConfig:N,B$:T}}nN(Z,k=!1){const N=(this.D.get(Z)||[]).concat();if(k=k&&KKi(Z)){const a=this.D.get(k);a&&N.push(...a)}Je(this,Z,N);this.V.add(Z);k&&this.V.add(k)}Nx(Z,k=!1){if(!this.V.has(Z)){var N=k&&KKi(Z);N&&(k=!this.V.has(N));this.nN(Z,k)}}};var Uwf=class extends oB{constructor(Z,k,N,a,T){super("ads-engagement-panel-layout",Z,k,N,a,T)}};var brU=class extends ch{constructor(Z,k,N,a,T,K,y){super(Z,k,N,a);this.Za=T;this.GM=K;this.G=y;this.DQ=!0;this.Y=null;this.L=N.clientMetadata.PD("metadata_type_linked_player_bytes_layout_id");eB(this.GM(),this);Z=N.clientMetadata.PD("metadata_type_ad_placement_config");this.WD=new zZ(N.d5,this.Za,Z,N.layoutId)}Os(Z,k){w8("ads-engagement-panel-layout",Z,this.G.get().zk,this.Za.get(),this.Y,this.L,this.zM(),this.zZ(),k)}startRendering(Z){iX(this.WD,this.zM(),this.zZ(),g.J(this.zZ().renderingContent,
jy),this.callback,"metadata_type_ads_engagement_panel_layout_view_model",(k,N,a,T,K)=>new Uwf(k,N,a,T,K),this.V);
super.startRendering(Z)}l0(Z,k){this.L===k.layoutId&&(this.Y===null?this.Y=this.Za.get().UQ():wm("OnLayoutEntered should set engagePingCallback, but it was not null",this.slot,this.layout))}eI(){}sP(){}wQ(){}X8(){}MR(){}cq(){}sQ(){}IJ(){}JQ(){}VT(){}Xi(){}YW(){oU(this.GM(),this);super.YW()}};var pVU=class extends oB{constructor(Z,k,N,a,T){super("banner-image",Z,k,N,a,T)}};var Rxf=class extends ch{constructor(Z,k,N,a,T,K,y){super(Z,k,N,a);this.Za=T;this.GM=K;this.G=y;this.DQ=!0;this.Y=null;this.L=N.clientMetadata.PD("metadata_type_linked_player_bytes_layout_id");eB(this.GM(),this);this.adPlacementConfig=N.clientMetadata.PD("metadata_type_ad_placement_config");this.WD=new zZ(N.d5,this.Za,this.adPlacementConfig,N.layoutId)}Os(Z,k){w8("banner-image",Z,this.G.get().zk,this.Za.get(),this.Y,this.L,this.zM(),this.zZ(),k)}startRendering(Z){iX(this.WD,this.zM(),this.zZ(),g.J(this.zZ().renderingContent,
nN),this.callback,"metadata_type_banner_image_layout_view_model",(k,N,a,T,K)=>new pVU(k,N,a,T,K),this.V);
super.startRendering(Z)}l0(Z,k){this.L===k.layoutId&&(this.Y===null?this.Y=this.Za.get().UQ():wm("OnLayoutEntered should set engagePingCallback, but it was not null",this.slot,this.layout))}eI(){}sP(){}wQ(){}X8(){}MR(){}cq(){}sQ(){}IJ(){}JQ(){}VT(){}Xi(){}YW(){oU(this.GM(),this);super.YW()}};var Ml0=class extends oB{constructor(Z,k,N,a,T){super("action-companion",Z,k,N,a,T)}};var nxR=class extends ch{constructor(Z,k,N,a,T,K,y){super(Z,k,N,a);this.Za=T;this.GM=K;this.G=y;this.DQ=!0;this.Y=null;this.L=N.clientMetadata.PD("metadata_type_linked_player_bytes_layout_id");eB(this.GM(),this);Z=N.clientMetadata.PD("metadata_type_ad_placement_config");this.WD=new zZ(N.d5,this.Za,Z,N.layoutId)}Os(Z,k){w8("action-companion",Z,this.G.get().zk,this.Za.get(),this.Y,this.L,this.zM(),this.zZ(),k)}startRendering(Z){iX(this.WD,this.zM(),this.zZ(),g.J(this.zZ().renderingContent,pN),this.callback,
"metadata_type_action_companion_ad_renderer",(k,N,a,T,K)=>new Ml0(k,N,a,T,K),this.V);
super.startRendering(Z)}l0(Z,k){k.layoutId===this.layout.layoutId?this.WD.Nx("impression"):this.L===k.layoutId&&(this.Y===null?this.Y=this.Za.get().UQ():wm("OnLayoutEntered should set engagePingCallback, but it was not null",this.slot,this.layout))}eI(){}sP(){}wQ(){}X8(){}MR(){}cq(){}sQ(){}IJ(){}JQ(){}VT(){}Xi(){}YW(){oU(this.GM(),this);super.YW()}};var Iv0=class extends oB{constructor(Z,k,N,a,T){super("image-companion",Z,k,N,a,T)}};var jXy=class extends ch{constructor(Z,k,N,a,T,K,y){super(Z,k,N,a);this.Za=T;this.GM=K;this.G=y;this.DQ=!0;this.Y=null;this.L=N.clientMetadata.PD("metadata_type_linked_player_bytes_layout_id");eB(this.GM(),this);Z=N.clientMetadata.PD("metadata_type_ad_placement_config");this.WD=new zZ(N.d5,this.Za,Z,N.layoutId)}Os(Z,k){w8("image-companion",Z,this.G.get().zk,this.Za.get(),this.Y,this.L,this.zM(),this.zZ(),k)}startRendering(Z){iX(this.WD,this.zM(),this.zZ(),g.J(this.zZ().renderingContent,Rx),this.callback,
"metadata_type_image_companion_ad_renderer",(k,N,a,T,K)=>new Iv0(k,N,a,T,K),this.V);
super.startRendering(Z)}l0(Z,k){k.layoutId===this.layout.layoutId?this.WD.Nx("impression"):this.L===k.layoutId&&(this.Y===null?this.Y=this.Za.get().UQ():wm("OnLayoutEntered should set engagePingCallback, but it was not null",this.slot,this.layout))}eI(){}sP(){}wQ(){}X8(){}MR(){}cq(){}sQ(){}IJ(){}JQ(){}VT(){}Xi(){}YW(){oU(this.GM(),this);super.YW()}};var Exy=class extends oB{constructor(Z,k,N,a,T){super("shopping-companion",Z,k,N,a,T)}};var Wej=class extends ch{constructor(Z,k,N,a,T,K,y){super(Z,k,N,a);this.Za=T;this.GM=K;this.G=y;this.DQ=!0;this.Y=null;this.L=N.clientMetadata.PD("metadata_type_linked_player_bytes_layout_id");eB(this.GM(),this);Z=N.clientMetadata.PD("metadata_type_ad_placement_config");this.WD=new zZ(N.d5,this.Za,Z,N.layoutId)}Os(Z,k){w8("shopping-companion",Z,this.G.get().zk,this.Za.get(),this.Y,this.L,this.zM(),this.zZ(),k)}startRendering(Z){iX(this.WD,this.zM(),this.zZ(),void 0,this.callback,"metadata_type_shopping_companion_carousel_renderer",
(k,N,a,T,K)=>new Exy(k,N,a,T,K),this.V);
super.startRendering(Z)}l0(Z,k){k.layoutId===this.layout.layoutId?this.WD.Nx("impression"):this.L===k.layoutId&&(this.Y===null?this.Y=this.Za.get().UQ():wm("OnLayoutEntered should set engagePingCallback, but it was not null",this.slot,this.layout))}eI(){}sP(){}wQ(){}X8(){}MR(){}cq(){}sQ(){}IJ(){}JQ(){}VT(){}Xi(){}YW(){oU(this.GM(),this);super.YW()}};var Hh=class{constructor(Z,k,N,a){this.tp=Z;this.layoutId=N;this.L=a;this.U=[];this.V=[];this.D=this.Y=0;for(const T of k)switch(T.adVideoOffset?.kind){case "AD_VIDEO_PROGRESS_KIND_PERCENT":(T.adVideoOffset?.kind!=="AD_VIDEO_PROGRESS_KIND_PERCENT"?0:T.adVideoOffset?.percent!=null)?this.U.push(T):wm("Invalid AdVideoProgressPercentCommand");break;case "AD_VIDEO_PROGRESS_KIND_MILLISECONDS":(T.adVideoOffset?.kind!=="AD_VIDEO_PROGRESS_KIND_MILLISECONDS"?0:T.adVideoOffset?.milliseconds!=null&&!isNaN(Number(T.adVideoOffset.milliseconds)))?
this.V.push(T):wm("Invalid AdVideoProgressMillisecondsCommand");break;default:wm("Unknown or invalid AdVideoProgressOffSet kind")}this.U.sort((T,K)=>T.adVideoOffset.percent-K.adVideoOffset.percent);
this.V.sort((T,K)=>Number(T.adVideoOffset.milliseconds)-Number(K.adVideoOffset.milliseconds))}};var YVG=class extends ch{constructor(Z,k,N,a,T,K){super(Z,k,N,a);this.Za=T;this.GM=K;this.DQ=!0;eB(this.GM(),this);Z=N.clientMetadata.PD("metadata_type_ad_placement_config");this.WD=new zZ(N.d5,this.Za,Z,N.layoutId)}startRendering(Z){iX(this.WD,this.zM(),this.zZ(),void 0,this.callback,"metadata_type_action_companion_ad_renderer",(k,N,a,T,K)=>new Ml0(k,N,a,T,K),this.V);
super.startRendering(Z)}l0(){}eI(){}sP(){}wQ(){}X8(){}MR(){}cq(){}sQ(){}IJ(){}JQ(){}VT(){}Xi(){}YW(){oU(this.GM(),this);super.YW()}Os(){}};var ZFi=class{constructor(Z,k,N,a,T,K,y,Q){this.callback=Z;this.slot=k;this.layout=N;this.E6=a;this.Za=T;this.Gt=y;this.Qi=Q;this.V=!1;Z=N.clientMetadata.PD("metadata_type_ad_placement_config");this.WD=new zZ(N.d5,this.Za,Z,N.layoutId);Z=this.layout.clientMetadata.PD("METADATA_TYPE_INTERACTIONS_AND_PROGRESS_LAYOUT_COMMANDS")?.progressCommands||[];const q=N.clientMetadata.PD("METADATA_TYPE_MEDIA_LAYOUT_DURATION_seconds");this.U=new Hh(K,Z,N.layoutId,()=>q*1E3)}zM(){return this.slot}zZ(){return this.layout}init(){this.E6.get().addListener(this);
this.E6.get().Fc.push(this);const Z=this.layout.clientMetadata.PD("metadata_type_video_length_seconds"),k=this.layout.clientMetadata.PD("metadata_type_active_view_traffic_type");$B(this.layout.d5)&&Ut(this.Qi.get(),this.layout.layoutId,{Ol:k,Jk:Z,listener:this})}release(){this.E6.get().removeListener(this);Uu0(this.E6.get(),this);$B(this.layout.d5)&&bL(this.Qi.get(),this.layout.layoutId)}startRendering(Z){this.callback.l0(this.slot,Z)}C8(Z,k){duf(this.Gt.get())&&!this.V&&(this.WD.Nx("abandon"),this.V=
!0);this.callback.eI(this.slot,Z,k)}Rb(Z){switch(Z.id){case "part2viewed":this.WD.Nx("start");this.WD.Nx("impression");break;case "videoplaytime25":this.WD.Nx("first_quartile");break;case "videoplaytime50":this.WD.Nx("midpoint");break;case "videoplaytime75":this.WD.Nx("third_quartile");break;case "videoplaytime100":duf(this.Gt.get())?this.V||(this.WD.Nx("complete"),this.V=!0):this.WD.Nx("complete");pA(this.WD)&&UT(this.WD,Infinity,!0);XS0(this.Gt.get())&&R7(this.U,Infinity,!0);break;case "engagedview":pA(this.WD)||
this.WD.Nx("progress");break;case "conversionview":case "videoplaybackstart":case "videoplayback2s":case "videoplayback10s":break;default:wm("Cue Range ID unknown in DiscoveryLayoutRenderingAdapter",this.slot,this.layout)}}onVolumeChange(){}Bi(){}D1(){}Pi(){}onFullscreenToggled(){}yV(){}XE(){}MI(Z){XS0(this.Gt.get())&&R7(this.U,Z*1E3,!1);pA(this.WD)&&UT(this.WD,Z*1E3,!1)}Zc(){}A7(){this.WD.Nx("active_view_measurable")}N9(){this.WD.Nx("active_view_viewable")}W8(){this.WD.Nx("active_view_fully_viewable_audible_half_duration")}IT(){this.WD.Nx("audio_measurable")}m8(){this.WD.Nx("audio_audible")}};var Dvy=class extends ch{constructor(Z,k,N,a,T,K){super(Z,k,N,a);this.E6=T;this.L=K;this.Y=!1}init(){super.init();const Z=this.layout.clientMetadata.PD("metadata_type_instream_ad_player_overlay_renderer"),k={adsClientData:this.layout.KF};this.V.push(new WW(Z,this.layout.layoutId,this.layout.clientMetadata.PD("METADATA_TYPE_MEDIA_LAYOUT_DURATION_seconds"),k,!0))}tb(){this.Y||this.E6.get().resumeVideo(1)}startRendering(Z){super.startRendering(Z);j6(this.E6.get(),"ad-showing");this.callback.l0(this.slot,
Z);this.L.y5=this}C8(Z,k){super.C8(Z,k);Et(this.E6.get(),"ad-showing");Lp(this.L,this)}Os(Z){switch(Z){case "ad-info-icon-button":(this.Y=this.E6.get().Uh(1))||this.E6.get().pauseVideo();break;case "visit-advertiser":this.E6.get().pauseVideo()}}YW(){super.YW()}};var k9y=class extends oB{constructor(Z,k,N,a,T){super("top-banner-image-text-icon-buttoned",Z,k,N,a,T)}};var NLi=class extends ch{constructor(Z,k,N,a,T,K){super(Z,k,N,a);this.Za=T;this.GM=K;this.DQ=!0;eB(this.GM(),this);Z=N.clientMetadata.PD("metadata_type_ad_placement_config");this.WD=new zZ(N.d5,this.Za,Z,N.layoutId)}startRendering(Z){iX(this.WD,this.zM(),this.zZ(),void 0,this.callback,"metadata_type_top_banner_image_text_icon_buttoned_layout_view_model",(k,N,a,T,K)=>new k9y(k,N,a,T,K),this.V);
super.startRendering(Z)}l0(){}eI(){}sP(){}wQ(){}X8(){}MR(){}cq(){}sQ(){}IJ(){}JQ(){}VT(){}Xi(){}YW(){oU(this.GM(),this);super.YW()}Os(){}};var aKN=class extends oB{constructor(Z,k,N){super("display-underlay-text-grid-cards",Z,{},k,N);this.interactionLoggingClientData=N}};var TLr=class extends ch{constructor(Z,k,N,a,T,K){super(Z,k,N,a);this.Za=T;this.Y=K;this.L=this.layout.clientMetadata.PD("metadata_type_linked_player_bytes_layout_id")}init(){super.init();this.V.push(new aKN(g.J(this.layout.renderingContent,mv),this.layout.layoutId,{adsClientData:this.layout.KF}))}Os(){m5(this.Y.get(),this.L)&&g8(this.Za.get(),3)}startRendering(Z){super.startRendering(Z);this.callback.l0(this.slot,Z)}YW(){super.YW()}};var da=class extends oB{constructor(Z,k,N,a){super("ad-action-interstitial",Z,k,N,a);this.interactionLoggingClientData=a;this.mR=this.Gz=!0}};var fUf=class extends ch{constructor(Z,k,N,a,T){super(Z,k,N,a);Z=N.clientMetadata.PD("metadata_type_ad_placement_config");this.WD=new zZ(N.d5,T,Z,N.layoutId)}init(){super.init();const Z=g.J(this.layout.renderingContent,ET)||this.layout.clientMetadata.PD("metadata_type_ad_action_interstitial_renderer"),k=vM(this.WD);this.V.push(new da(Z,k,this.layout.layoutId,{adsClientData:this.layout.KF}))}startRendering(Z){super.startRendering(Z);this.callback.l0(this.slot,Z)}Os(Z,k){if(k===this.layout.layoutId)switch(Z){case "skip-button":(Z=
this.layout.clientMetadata.PD("metadata_type_ad_pod_skip_target_callback_ref")?.current)&&lZ(Z,this.zM(),this.layout)}}YW(){super.YW()}};var XF=class{constructor(Z,k,N){this.U=Z;this.D=k;this.V=N}build(Z,k,N,a){if(MD(a,{Eb:["metadata_type_ad_break_response_data"],x8:["LAYOUT_TYPE_AD_BREAK_RESPONSE","LAYOUT_TYPE_THROTTLED_AD_BREAK_RESPONSE"]}))return new JTf(Z,N,a,this.U,this.D,this.V);throw new ND(`Unsupported layout with type: ${a.layoutType} and client metadata: ${iD(a.clientMetadata)} in `+"AdBreakRequestLayoutRenderingAdapterFactory.");}};var KOy=class extends oB{constructor(Z,k,N,a,T){super("ads-engagement-panel",Z,k,N,a,T)}};var y9i=class extends ch{constructor(Z,k,N,a,T,K,y){super(Z,k,N,a);this.Za=T;this.GM=K;this.G=y;this.DQ=!0;this.Y=null;this.L=N.clientMetadata.PD("metadata_type_linked_player_bytes_layout_id");eB(this.GM(),this);Z=N.clientMetadata.PD("metadata_type_ad_placement_config");this.WD=new zZ(N.d5,this.Za,Z,N.layoutId)}Os(Z,k){w8("ads-engagement-panel",Z,this.G.get().zk,this.Za.get(),this.Y,this.L,this.zM(),this.zZ(),k)}startRendering(Z){iX(this.WD,this.zM(),this.zZ(),g.J(this.zZ().renderingContent,Mt),this.callback,
"metadata_type_ads_engagement_panel_renderer",(k,N,a,T,K)=>new KOy(k,N,a,T,K),this.V);
super.startRendering(Z)}l0(Z,k){k.layoutId===this.layout.layoutId?this.WD.Nx("impression"):this.L===k.layoutId&&(this.Y===null?this.Y=this.Za.get().UQ():wm("OnLayoutEntered should set engagePingCallback, but it was not null",this.slot,this.layout))}eI(){}sP(){}wQ(){}X8(){}MR(){}cq(){}sQ(){}IJ(){}JQ(){}VT(){}Xi(){}YW(){oU(this.GM(),this);super.YW()}};var QoU=class extends ch{constructor(Z,k,N,a,T,K,y){super(Z,k,N,a);this.Za=T;this.GM=K;this.G=y;this.DQ=!0;this.Y=null;this.L=N.clientMetadata.PD("metadata_type_linked_player_bytes_layout_id");eB(this.GM(),this);this.adPlacementConfig=N.clientMetadata.PD("metadata_type_ad_placement_config");this.WD=new zZ(N.d5,this.Za,this.adPlacementConfig,N.layoutId)}Os(Z,k){w8("top-banner-image-text-icon-buttoned",Z,this.G.get().zk,this.Za.get(),this.Y,this.L,this.zM(),this.zZ(),k)}startRendering(Z){iX(this.WD,
this.zM(),this.zZ(),g.J(this.zZ().renderingContent,Ix),this.callback,"metadata_type_top_banner_image_text_icon_buttoned_layout_view_model",(k,N,a,T,K)=>new k9y(k,N,a,T,K),this.V);
super.startRendering(Z)}l0(Z,k){this.L===k.layoutId&&(this.Y===null?this.Y=this.Za.get().UQ():wm("OnLayoutEntered should set engagePingCallback, but it was not null",this.slot,this.layout))}eI(){}sP(){}wQ(){}X8(){}MR(){}cq(){}sQ(){}IJ(){}JQ(){}VT(){}Xi(){}YW(){oU(this.GM(),this);super.YW()}};var qx0=class{constructor(Z,k,N,a,T){this.Le=Z;this.Za=k;this.GM=N;this.V=a;this.Qi=T}build(Z,k,N,a){if(MD(a,Hjy())||g.J(a.renderingContent,Mt)!==void 0)return new y9i(Z,N,a,this.Le,this.Za,this.GM,this.V);if(MD(a,C6N())||g.J(a.renderingContent,pN)!==void 0)return new nxR(Z,N,a,this.Le,this.Za,this.GM,this.V);if(MD(a,mvf())||g.J(a.renderingContent,Rx)!==void 0)return new jXy(Z,N,a,this.Le,this.Za,this.GM,this.V);if(MD(a,s3i()))return new Wej(Z,N,a,this.Le,this.Za,this.GM,this.V);if(MD(a,Ami()))return new YVG(Z,
N,a,this.Le,this.Za,this.GM);if(MD(a,rmU())||g.J(a.renderingContent,nN)!==void 0)return new Rxf(Z,N,a,this.Le,this.Za,this.GM,this.V);if(MD(a,dvR())||g.J(a.renderingContent,Ix)!==void 0)return new QoU(Z,N,a,this.Le,this.Za,this.GM,this.V);if(MD(a,P6G()))return new NLi(Z,N,a,this.Le,this.Za,this.GM);if(MD(a,qcN())||g.J(a.renderingContent,jy)!==void 0)return new brU(Z,N,a,this.Le,this.Za,this.GM,this.V);throw new ND(`Unsupported layout with type: ${a.layoutType} and client metadata: ${iD(a.clientMetadata)} in `+
"DesktopAboveFeedLayoutRenderingAdapterFactory.");}};var r9G=class{constructor(Z,k,N){this.Le=Z;this.Za=k;this.V=N}build(Z,k,N,a){if(MD(a,{Eb:["metadata_type_linked_player_bytes_layout_id"],x8:["LAYOUT_TYPE_DISPLAY_UNDERLAY_TEXT_GRID_CARDS"]}))return new TLr(Z,N,a,this.Le,this.Za,this.V);throw new ND(`Unsupported layout with type: ${a.layoutType} and client metadata: ${iD(a.clientMetadata)} in `+"DesktopPlayerUnderlayLayoutRenderingAdapterFactory.");}};var C3X=class{constructor(Z,k,N,a,T){this.callback=Z;this.slot=k;this.layout=N;this.Za=a;this.Jh=T;Z=this.layout.clientMetadata.PD("metadata_type_ad_placement_config");this.WD=new zZ(N.d5,this.Za,Z,N.layoutId)}zM(){return this.slot}zZ(){return this.layout}init(){}release(){}startRendering(Z){Z.layoutId!==this.layout.layoutId?this.callback.aJ(this.slot,Z,new ND("Tried to start rendering an unknown layout, this adapter "+`requires LayoutId: ${this.layout.layoutId}`+`and LayoutType: ${this.layout.layoutType}`,
void 0,"ADS_CLIENT_ERROR_MESSAGE_UNKNOWN_LAYOUT"),"ADS_CLIENT_ERROR_TYPE_ENTER_LAYOUT_FAILED"):(this.callback.l0(this.slot,Z),this.WD.Nx("impression"),O0(this.Jh,Z))}C8(Z,k){Z.layoutId!==this.layout.layoutId?this.callback.aJ(this.slot,Z,new ND("Tried to stop rendering an unknown layout, this adapter "+`requires LayoutId: ${this.layout.layoutId}`+`and LayoutType: ${this.layout.layoutType}`,void 0,"ADS_CLIENT_ERROR_MESSAGE_UNKNOWN_LAYOUT"),"ADS_CLIENT_ERROR_TYPE_EXIT_LAYOUT_FAILED"):this.callback.eI(this.slot,
Z,k)}};var Ly=class{constructor(Z,k,N,a){this.Gt=Z;this.Za=k;this.Jh=N;this.Qi=a}build(Z,k,N,a){this.Gt.get();if(MD(a,Xp0()))return new C3X(Z,N,a,this.Za,this.Jh);throw new ND(`Unsupported layout with type: ${a.layoutType} and client metadata: ${iD(a.clientMetadata)} in `+"ForecastingLayoutRenderingAdapterFactory.");}};var mHj=class extends oB{constructor(Z,k,N,a){super("player-overlay-layout",Z,{},N,a);this.videoAdDurationSeconds=k;this.interactionLoggingClientData=a}};var lUX=class extends ch{constructor(Z,k,N,a,T,K,y,Q,q){super(Z,k,N,a);this.E6=T;this.Za=K;this.G=y;this.L=Q;this.Gt=q;this.Y=!1;this.j=this.layout.clientMetadata.PD("metadata_type_linked_player_bytes_layout_id")}init(){super.init();const Z=g.J(this.layout.renderingContent,jP)||this.layout.clientMetadata.PD("metadata_type_player_overlay_layout_renderer"),k={adsClientData:this.layout.KF};this.V.push(new mHj(Z,this.layout.clientMetadata.PD("METADATA_TYPE_MEDIA_LAYOUT_DURATION_seconds"),this.layout.layoutId,
k))}tb(){this.Y||this.E6.get().resumeVideo(2)}startRendering(Z){super.startRendering(Z);this.callback.l0(this.slot,Z);this.L.y5=this}C8(Z,k){super.C8(Z,k);Lp(this.L,this)}Os(Z,k){if(!cM(this.Gt.get(),"stop_handling_click_for_non_rendering_overlay_layout")||k===this.layout.layoutId){if(m5(this.G.get(),this.j))switch(Z){case "visit-advertiser-link":g8(this.Za.get(),3)}switch(Z){case "ad-mute-confirm-dialog-close-button":case "ad-feedback-undo-mute-button":case "ad-info-dialog-close-button":this.Y||
this.E6.get().resumeVideo(2);break;case "ad-info-icon-button":case "ad-player-overflow-button":(this.Y=this.E6.get().Uh(2))||this.E6.get().pauseVideo();break;case "visit-advertiser-link":this.E6.get().pauseVideo();FKy(this).Fg();break;case "skip-button":Z=FKy(this),this.layout.renderingContent&&!Op(this.layout.clientMetadata,"metadata_type_dai")||!Z||!Z.vO?(Z=this.layout.clientMetadata.PD("metadata_type_ad_pod_skip_target_callback_ref")?.current)&&lZ(Z,this.zM(),this.layout):(wm("Requesting to skip by LegacyPlayerBytes when components enabled"),
Z.Rs(this.zM(),this.layout))}}}YW(){super.YW()}};var u1X=class extends ch{constructor(Z,k,N,a,T,K,y,Q,q){super(Z,k,N,a);this.E6=T;this.Za=K;this.G=y;this.L=Q;this.Gt=q;this.Y=!1;this.j=this.layout.clientMetadata.PD("metadata_type_linked_player_bytes_layout_id")}init(){super.init();const Z=g.J(this.layout.renderingContent,I7)||this.layout.clientMetadata.PD("metadata_type_instream_ad_player_overlay_renderer"),k={adsClientData:this.layout.KF};var N;(N=!!this.layout.renderingContent)||(N=nA(this),N=!(N&&N.vO));this.V.push(new WW(Z,this.layout.layoutId,
this.layout.clientMetadata.PD("METADATA_TYPE_MEDIA_LAYOUT_DURATION_seconds"),k,N))}tb(){this.Y||this.E6.get().resumeVideo(2)}startRendering(Z){super.startRendering(Z);this.callback.l0(this.slot,Z);this.L.y5=this}C8(Z,k){super.C8(Z,k);Lp(this.L,this)}Os(Z,k){if(!this.Gt||!cM(this.Gt.get(),"stop_handling_click_for_non_rendering_overlay_layout")||k===this.layout.layoutId){if(m5(this.G.get(),this.j))switch(Z){case "visit-advertiser":g8(this.Za.get(),3)}switch(Z){case "ad-mute-confirm-dialog-close-button":case "ad-feedback-undo-mute-button":case "ad-info-dialog-close-button":this.Y||
this.E6.get().resumeVideo(2);break;case "ad-info-icon-button":case "ad-player-overflow-button":(this.Y=this.E6.get().Uh(2))||this.E6.get().pauseVideo();break;case "visit-advertiser":this.E6.get().pauseVideo();nA(this).Fg();break;case "skip-button":Z=nA(this),this.layout.renderingContent&&!Op(this.layout.clientMetadata,"metadata_type_dai")||!Z||!Z.vO?(Z=this.layout.clientMetadata.PD("metadata_type_ad_pod_skip_target_callback_ref")?.current)&&lZ(Z,this.zM(),this.layout):(wm("Requesting to skip by LegacyPlayerBytes"),
Z.Rs(this.zM(),this.layout))}}}YW(){super.YW()}};var sof=class extends oB{constructor(Z,k,N){super("ad-message",Z,void 0,k,N)}};var B3f=class extends ch{constructor(Z,k,N,a,T,K){super(N,Z,k,a);this.E6=T;this.Gt=K}startRendering(Z){OT(this.U,Z,()=>{this.V.push(new sof(this.layout.clientMetadata.PD("metadata_type_valid_ad_message_renderer"),Z.layoutId,Z.KF));this.wy();this.callback.l0(this.slot,Z);zB(this.E6.get(),1).V(512)&&this.callback.aJ(this.zM(),this.zZ(),new ND("player is stuck during adNotify",void 0,"ADS_CLIENT_ERROR_MESSAGE_PLAYER_STUCK_DURING_ADNOTIFY"),"ADS_CLIENT_ERROR_TYPE_ENTER_LAYOUT_FAILED")})}XE(){}yV(Z){Z.state.isError()&&
this.callback.aJ(this.zM(),this.zZ(),new ND("A player error happened during adNotify",{playerErrorCode:Z.state.RJ?.errorCode},"ADS_CLIENT_ERROR_MESSAGE_PLAYER_ERROR_DURING_ADNOTIFY"),"ADS_CLIENT_ERROR_TYPE_ENTER_LAYOUT_FAILED")}onFullscreenToggled(){}D1(){}Pi(){}Bi(){}onVolumeChange(){}Rb(){}Zc(){}Os(){}};var A9G=class extends oB{constructor(Z,k,N,a){super("video-interstitial-buttoned-centered",Z,k,N,a);this.interactionLoggingClientData=a}};var Ojy=class extends ch{constructor(Z,k,N,a,T){super(Z,k,N,a);Z=N.clientMetadata.PD("metadata_type_ad_placement_config");this.WD=new zZ(N.d5,T,Z,N.layoutId)}init(){super.init();const Z=g.J(this.layout.renderingContent,WM),k=vM(this.WD);this.V.push(new A9G(Z,k,this.layout.layoutId,{adsClientData:this.layout.KF}))}startRendering(Z){super.startRendering(Z);this.callback.l0(this.slot,Z)}Os(Z,k){if(k===this.layout.layoutId)switch(Z){case "skip-button":(Z=this.layout.clientMetadata.PD("metadata_type_ad_pod_skip_target_callback_ref")?.current)&&
lZ(Z,this.zM(),this.layout)}}YW(){super.YW()}};var P3j=class{constructor(Z,k,N,a,T,K){this.Le=Z;this.E6=k;this.Za=N;this.U=a;this.V=T;this.Gt=K}build(Z,k,N,a){if(Z=YB(Z,N,a,this.Le,this.E6,this.Za,this.U,this.V,this.Gt))return Z;throw new ND(`Unsupported layout with type: ${a.layoutType} and client metadata: ${iD(a.clientMetadata)} in `+"OtherWebInPlayerLayoutRenderingAdapterFactory.");}};var c9U=class{constructor(Z,k,N,a,T,K,y,Q,q){this.callback=Z;this.slot=k;this.layout=N;this.E6=a;this.Za=T;this.Gt=y;this.Qi=Q;this.XS=q;this.V=!1;Z=N.clientMetadata.PD("metadata_type_ad_placement_config");this.WD=new zZ(N.d5,this.Za,Z,N.layoutId);Z=this.layout.clientMetadata.PD("METADATA_TYPE_INTERACTIONS_AND_PROGRESS_LAYOUT_COMMANDS")?.progressCommands||[];this.U=new Hh(K,Z,N.layoutId,()=>v3y(this)*1E3)}zM(){return this.slot}zZ(){return this.layout}init(){this.E6.get().addListener(this);
this.E6.get().Fc.push(this);const Z=v3y(this);var k=g.J(this.layout.renderingContent,Qy);const N=k?xB(k.pings):this.layout.clientMetadata.PD("metadata_type_active_view_traffic_type");k=k?k.pings?.activeViewTracking?.identifier:this.layout.clientMetadata.PD("metadata_type_active_view_identifier");$B(this.layout.d5)&&Ut(this.Qi.get(),this.layout.layoutId,{Ol:N,Jk:Z,listener:this,nW:k})}release(){this.E6.get().removeListener(this);Uu0(this.E6.get(),this);$B(this.layout.d5)&&bL(this.Qi.get(),this.layout.layoutId)}startRendering(Z){this.callback.l0(this.slot,
Z)}C8(Z,k){at(this,"abandon");this.callback.eI(this.slot,Z,k)}Rb(Z){switch(Z.id){case "part2viewed":this.WD.Nx("start");this.WD.Nx("impression");break;case "videoplaytime25":this.WD.Nx("first_quartile");break;case "videoplaytime50":this.WD.Nx("midpoint");break;case "videoplaytime75":this.WD.Nx("third_quartile");break;case "videoplaytime100":at(this,"complete");pA(this.WD)&&UT(this.WD,Infinity,!0);LPy(this.Gt.get())&&R7(this.U,Infinity,!0);break;case "engagedview":pA(this.WD)||this.WD.Nx("progress");
break;case "conversionview":case "videoplaybackstart":case "videoplayback2s":case "videoplayback10s":break;default:wm("Cue Range ID unknown in ShortsPlaybackTrackingLayoutRenderingAdapter",this.slot,this.layout)}}onVolumeChange(){}Bi(){}D1(){}Pi(){}onFullscreenToggled(){}yV(Z){this.V||(Z.Ub(4)&&!Z.Ub(2)?zq(this.WD,"pause"):$Z(Z,4)<0&&!($Z(Z,2)<0)&&zq(this.WD,"resume"))}XE(){}MI(Z){LPy(this.Gt.get())&&R7(this.U,Z*1E3,!1);pA(this.WD)&&UT(this.WD,Z*1E3,!1)}Zc(){at(this,"swipe")}A7(){this.WD.Nx("active_view_measurable")}N9(){this.WD.Nx("active_view_viewable")}W8(){this.WD.Nx("active_view_fully_viewable_audible_half_duration")}IT(){this.WD.Nx("audio_measurable")}m8(){this.WD.Nx("audio_audible")}};var HFy=class{constructor(Z,k,N,a,T,K){this.E6=Z;this.Za=k;this.tp=N;this.Gt=a;this.Qi=T;this.XS=K}build(Z,k,N,a){if(N.slotType==="SLOT_TYPE_PLAYER_BYTES_SEQUENCE_ITEM"&&g.J(a.renderingContent,Qy)!==void 0)return new c9U(Z,N,a,this.E6,this.Za,this.tp,this.Gt,this.Qi,this.XS);k=["metadata_type_ad_placement_config"];for(const T of SP())k.push(T);if(MD(a,{Eb:k,x8:["LAYOUT_TYPE_DISCOVERY_PLAYBACK_TRACKER"]}))return N.slotType==="SLOT_TYPE_PLAYER_BYTES_SEQUENCE_ITEM"?new c9U(Z,N,a,this.E6,this.Za,this.tp,
this.Gt,this.Qi,this.XS):new ZFi(Z,N,a,this.E6,this.Za,this.tp,this.Gt,this.Qi);throw new ND(`Unsupported layout with type: ${a.layoutType} and client metadata: ${iD(a.clientMetadata)} in `+"PlaybackTrackingLayoutRenderingAdapterFactory.");}};g.yA=class{constructor(Z,k={},N=0){this.errorCode=Z;this.details=k;this.severity=N}};var dHf;
dHf={oD:"ALREADY_PINNED_ON_A_DEVICE",AUTHENTICATION_EXPIRED:"AUTHENTICATION_EXPIRED",KG:"AUTHENTICATION_MALFORMED",ut:"AUTHENTICATION_MISSING",m_:"BAD_REQUEST",er:"CAST_SESSION_DEVICE_MISMATCHED",yh:"CAST_SESSION_VIDEO_MISMATCHED",qP:"CAST_TOKEN_EXPIRED",OE:"CAST_TOKEN_FAILED",gJ:"CAST_TOKEN_MALFORMED",kP:"CGI_PARAMS_MALFORMED",fV:"CGI_PARAMS_MISSING",MF:"DEVICE_FALLBACK",pQ:"GENERIC_WITH_LINK_AND_CPN",zs:"ERROR_HDCP",U2:"LICENSE",xS:"VIDEO_UNAVAILABLE",Jt:"FORMAT_UNAVAILABLE",E2:"GEO_FAILURE",nQ:"HTML5_AUDIO_RENDERER_ERROR",
eF:"GENERIC_WITHOUT_LINK",yF:"HTML5_NO_AVAILABLE_FORMATS_FALLBACK",q1:"HTML5_NO_AVAILABLE_FORMATS_FALLBACK_WITH_LINK",O2:"HTML5_NO_AVAILABLE_FORMATS_FALLBACK_WITH_LINK_SHORT",gT:"HTML5_SPS_UMP_STATUS_REJECTED",Lf:"INVALID_DRM_MESSAGE",DXW:"PURCHASE_NOT_FOUND",Y6W:"PURCHASE_REFUNDED",uSp:"RENTAL_EXPIRED",wDX:"RETRYABLE_ERROR",yqa:"SERVER_ERROR",ol6:"SIGNATURE_EXPIRED",SHX:"STOPPED_BY_ANOTHER_PLAYBACK",Fxa:"STREAMING_DEVICES_QUOTA_PER_24H_EXCEEDED",GZ3:"STREAMING_NOT_ALLOWED",vlA:"STREAM_LICENSE_NOT_FOUND",
CqS:"TOO_MANY_REQUESTS",iFm:"TOO_MANY_REQUESTS_WITH_LINK",MYR:"TOO_MANY_STREAMS_PER_ENTITLEMENT",cpp:"TOO_MANY_STREAMS_PER_USER",UNSUPPORTED_DEVICE:"UNSUPPORTED_DEVICE",OFq:"VIDEO_FORBIDDEN",glS:"VIDEO_NOT_FOUND",hm:"BROWSER_OR_EXTENSION_ERROR"};
g.Kz={ALREADY_PINNED_ON_A_DEVICE:"This video has already been downloaded on the maximum number of devices allowed by the copyright holder. Before you can play the video here, it needs to be unpinned on another device.",DEVICE_FALLBACK:"Sorry, this video is not available on this device.",GENERIC_WITH_LINK_AND_CPN:"An error occurred. Please try again later. (Playback ID: $CPN) $BEGIN_LINKLearn More$END_LINK",LICENSE:"Sorry, there was an error licensing this video.",VIDEO_UNAVAILABLE:"Video unavailable",
FORMAT_UNAVAILABLE:"This video isn't available at the selected quality. Please try again later.",GEO_FAILURE:"This video isn't available in your country.",HTML5_AUDIO_RENDERER_ERROR:"Audio renderer error. Please restart your computer.",GENERIC_WITHOUT_LINK:"An error occurred. Please try again later.",HTML5_NO_AVAILABLE_FORMATS_FALLBACK:"This video format is not supported.",HTML5_NO_AVAILABLE_FORMATS_FALLBACK_WITH_LINK:"Your browser does not currently recognize any of the video formats available. $BEGIN_LINKClick here to visit our frequently asked questions about HTML5 video.$END_LINK",
HTML5_NO_AVAILABLE_FORMATS_FALLBACK_WITH_LINK_SHORT:"Your browser can't play this video. $BEGIN_LINKLearn more$END_LINK",HTML5_SPS_UMP_STATUS_REJECTED:"Something went wrong. Refresh or try again later. $BEGIN_LINKLearn more$END_LINK",INVALID_DRM_MESSAGE:"The DRM system specific message is invalid.",PURCHASE_NOT_FOUND:"This video requires payment.",PURCHASE_REFUNDED:"This video's purchase has been refunded.",RENTAL_EXPIRED:"This video's rental has expired.",CAST_SESSION_DEVICE_MISMATCHED:"The device in the cast session doesn't match the requested one.",
CAST_SESSION_VIDEO_MISMATCHED:"The video in the cast session doesn't match the requested one.",CAST_TOKEN_FAILED:"Cast session not available. Please refresh or try again later.",CAST_TOKEN_EXPIRED:"Cast session was expired. Please refresh.",CAST_TOKEN_MALFORMED:"Invalid cast session. Please refresh or try again later.",SERVER_ERROR:"There was an internal server error. Please try again later.",STOPPED_BY_ANOTHER_PLAYBACK:"Your account is playing this video in another location. Please reload this page to resume watching.",
STREAM_LICENSE_NOT_FOUND:"Video playback interrupted. Please try again.",STREAMING_DEVICES_QUOTA_PER_24H_EXCEEDED:"Too many devices/IP addresses have been used over the 24 hour period.",STREAMING_NOT_ALLOWED:"Playback not allowed because this video is pinned on another device.",RETRYABLE_ERROR:"There was a temporary server error. Please try again later.",TOO_MANY_REQUESTS:"Please log in to watch this video.",TOO_MANY_REQUESTS_WITH_LINK:"Please $BEGIN_LINKclick here$END_LINK to watch this video on YouTube.",
TOO_MANY_STREAMS_PER_USER:"Playback stopped because too many videos belonging to the same account are playing.",TOO_MANY_STREAMS_PER_ENTITLEMENT:"Playback stopped because this video has been played on too many devices.",UNSUPPORTED_DEVICE:"Playback isn't supported on this device.",VIDEO_FORBIDDEN:"Access to this video is forbidden.",VIDEO_NOT_FOUND:"This video can not be found.",BROWSER_OR_EXTENSION_ERROR:"Something went wrong. Refresh or try again later. $BEGIN_LINKLearn more$END_LINK"};var V0;{var X_G=g.qG();const Z=X_G.match(/\((iPad|iPhone|iPod)( Simulator)?;/);if(!Z||Z.length<2)V0=void 0;else{var FF=X_G.match(/\((iPad|iPhone|iPod)( Simulator)?; (U; )?CPU (iPhone )?OS (\d+_\d)[_ ]/);V0=FF&&FF.length===6?Number(FF[5].replace("_",".")):0}}var IO=V0,rN=IO>=0;g.tt=class extends i${K(Z,k,N,a,T){return super.K(Z,k,N,a,T)}};var Pf={FAIRPLAY:"fairplay",PLAYREADY:"playready",WIDEVINE:"widevine",CLEARKEY:null,FLASHACCESS:null,UNKNOWN:null,WIDEVINE_CLASSIC:null};var g0=class{constructor(Z=0,k=0,N="SPATIAL_AUDIO_TYPE_NONE",a=!1,T,K,y="AUDIO_QUALITY_UNKNOWN",Q=!1){this.sampleRate=Z;this.numChannels=k;this.spatialAudioType=N;this.V=a;this.D=T;this.Y=K;this.audioQuality=y;this.U=Q}isMultiChannelAudio(){return this.numChannels>2}};var ex={WIDTH:{name:"width",video:!0,valid:640,dR:99999},HEIGHT:{name:"height",video:!0,valid:360,dR:99999},FRAMERATE:{name:"framerate",video:!0,valid:30,dR:9999},BITRATE:{name:"bitrate",video:!0,valid:3E5,dR:2E9},EOTF:{name:"eotf",video:!0,valid:"bt709",dR:"catavision"},CHANNELS:{name:"channels",video:!1,valid:2,dR:99},CRYPTOBLOCKFORMAT:{name:"cryptoblockformat",video:!0,valid:"subsample",dR:"invalidformat"},DECODETOTEXTURE:{name:"decode-to-texture",video:!0,valid:"false",dR:"nope"},AV1_CODECS:{name:"codecs",
video:!0,valid:"av01.0.05M.08",dR:"av99.0.05M.08"},EXPERIMENTAL:{name:"experimental",video:!0,valid:"allowed",dR:"invalid"},TUNNELMODE:{name:"tunnelmode",video:!0,valid:"true",dR:"false"}};var ZWG=class{constructor(Z,k,N,a="",T="",K=""){this.displayName=Z;this.vssId=k;this.languageCode=N;this.kind=a;this.xtags=T;this.id=K}};var LON=["h","H"],Vkr=["9","("],FOi=["9h","(h"],tkj=["8","*"],hq0=["a","A"],upb=["o","O"],lKX=["m","M"],fKR=["mac3","MAC3"],BLy=["meac3","MEAC3"],iWG={h:LON,H:LON,["9"]:Vkr,["("]:Vkr,["9h"]:FOi,["(h"]:FOi,["8"]:tkj,["*"]:tkj,a:hq0,A:hq0,o:upb,O:upb,m:lKX,M:lKX,mac3:fKR,MAC3:fKR,meac3:BLy,MEAC3:BLy},DHi=new Set("o O a ah A m M mac3 MAC3 meac3 MEAC3 so sa".split(" ")),Xg0=new Set("m M mac3 MAC3 meac3 MEAC3".split(" "));var CD={["0"]:"f",["160"]:"h",["133"]:"h",["134"]:"h",["135"]:"h",["136"]:"h",["137"]:"h",["264"]:"h",["266"]:"h",["138"]:"h",["298"]:"h",["299"]:"h",["304"]:"h",["305"]:"h",["214"]:"h",["216"]:"h",["374"]:"h",["375"]:"h",["140"]:"a",["141"]:"a",["327"]:"sa",["258"]:"m",["380"]:"mac3",["328"]:"meac3",["161"]:"H",["142"]:"H",["143"]:"H",["144"]:"H",["222"]:"H",["223"]:"H",["145"]:"H",["224"]:"H",["225"]:"H",["146"]:"H",["226"]:"H",["227"]:"H",["147"]:"H",["384"]:"H",["376"]:"H",["385"]:"H",["377"]:"H",
["149"]:"A",["261"]:"M",["381"]:"MAC3",["329"]:"MEAC3",["598"]:"9",["278"]:"9",["242"]:"9",["243"]:"9",["244"]:"9",["775"]:"9",["776"]:"9",["777"]:"9",["778"]:"9",["779"]:"9",["780"]:"9",["781"]:"9",["782"]:"9",["783"]:"9",["247"]:"9",["248"]:"9",["353"]:"9",["355"]:"9",["356"]:"9",["271"]:"9",["577"]:"9",["313"]:"9",["579"]:"9",["272"]:"9",["302"]:"9",["303"]:"9",["407"]:"9",["408"]:"9",["308"]:"9",["315"]:"9",["330"]:"9h",["331"]:"9h",["332"]:"9h",["333"]:"9h",["334"]:"9h",["335"]:"9h",["336"]:"9h",
["337"]:"9h",["338"]:"so",["600"]:"o",["250"]:"o",["251"]:"o",["774"]:"o",["194"]:"*",["195"]:"*",["220"]:"*",["221"]:"*",["196"]:"*",["197"]:"*",["279"]:"(",["280"]:"(",["317"]:"(",["318"]:"(",["273"]:"(",["274"]:"(",["357"]:"(",["358"]:"(",["275"]:"(",["359"]:"(",["360"]:"(",["276"]:"(",["583"]:"(",["584"]:"(",["314"]:"(",["585"]:"(",["561"]:"(",["277"]:"(",["361"]:"(h",["362"]:"(h",["363"]:"(h",["364"]:"(h",["365"]:"(h",["366"]:"(h",["591"]:"(h",["592"]:"(h",["367"]:"(h",["586"]:"(h",["587"]:"(h",
["368"]:"(h",["588"]:"(h",["562"]:"(h",["409"]:"(",["410"]:"(",["411"]:"(",["412"]:"(",["557"]:"(",["558"]:"(",["394"]:"1",["395"]:"1",["396"]:"1",["397"]:"1",["398"]:"1",["399"]:"1",["720"]:"1",["721"]:"1",["400"]:"1",["401"]:"1",["571"]:"1",["402"]:"1",["694"]:"1h",["695"]:"1h",["696"]:"1h",["697"]:"1h",["698"]:"1h",["699"]:"1h",["700"]:"1h",["701"]:"1h",["702"]:"1h",["703"]:"1h",["386"]:"3",["387"]:"w",["406"]:"6",["787"]:"1",["788"]:"1",["548"]:"1e",["549"]:"1e",["550"]:"1e",["551"]:"1e",["809"]:"1e",
["810"]:"1e",["552"]:"1e",["811"]:"1e",["812"]:"1e",["553"]:"1e",["813"]:"1e",["814"]:"1e",["554"]:"1e",["815"]:"1e",["816"]:"1e",["555"]:"1e",["817"]:"1e",["818"]:"1e",["572"]:"1e",["556"]:"1e",["645"]:"(",["646"]:"(",["647"]:"(",["648"]:"(",["649"]:"(",["650"]:"(",["651"]:"(",["652"]:"(",["653"]:"(",["654"]:"(",["655"]:"(",["656"]:"(",["657"]:"(",["658"]:"(",["659"]:"(",["660"]:"(",["661"]:"(",["662"]:"(",["663"]:"(",["664"]:"(",["665"]:"(",["666"]:"(",["667"]:"(",["668"]:"(",["669"]:"(",["670"]:"(",
["671"]:"(",["672"]:"(",["673"]:"(",["674"]:"(h",["675"]:"(h",["676"]:"(h",["677"]:"(h",["678"]:"(h",["679"]:"(h",["680"]:"(h",["681"]:"(h",["682"]:"(h",["683"]:"(h",["684"]:"(h",["685"]:"(h",["686"]:"(h",["687"]:"(h",["688"]:"A",["689"]:"A",["690"]:"A",["691"]:"MEAC3",["773"]:"i",["806"]:"I",["805"]:"I",["829"]:"9",["830"]:"9",["831"]:"9",["832"]:"9",["833"]:"9",["834"]:"9",["835"]:"9",["836"]:"9",["892"]:"9",["893"]:"9",["837"]:"9",["838"]:"9",["839"]:"9",["840"]:"9",["841"]:"(",["842"]:"(",["843"]:"(",
["844"]:"(",["845"]:"(",["846"]:"(",["847"]:"(",["848"]:"(",["894"]:"(",["895"]:"(",["849"]:"(",["850"]:"(",["851"]:"(",["852"]:"(",["865"]:"9",["866"]:"9",["867"]:"9",["868"]:"9",["869"]:"9",["870"]:"9",["871"]:"9",["872"]:"9",["896"]:"9",["897"]:"9",["873"]:"9",["874"]:"9",["875"]:"9",["876"]:"9",["877"]:"(",["878"]:"(",["879"]:"(",["880"]:"(",["881"]:"(",["882"]:"(",["883"]:"(",["884"]:"(",["898"]:"(",["899"]:"(",["885"]:"(",["886"]:"(",["887"]:"(",["888"]:"(",["900"]:"2",["901"]:"2",["902"]:"2",
["903"]:"2",["904"]:"2",["905"]:"2",["906"]:"2",["907"]:"2",["908"]:"2"};g.Al=class{constructor(Z,k,N,a=!1){this.name=Z;this.id=k;this.isDefault=N;this.isAutoDubbed=a}getName(){return this.name}getId(){return this.id}getIsDefault(){return this.isDefault}getIsAutoDubbed(){return this.isAutoDubbed}toString(){return this.name}};g.Al.prototype.getName=g.Al.prototype.getName;g.Al.prototype.getId=g.Al.prototype.getId;g.Al.prototype.getIsDefault=g.Al.prototype.getIsDefault;g.Al.prototype.getIsAutoDubbed=g.Al.prototype.getIsAutoDubbed;var EZf={STEREO_LAYOUT_UNKNOWN:0,STEREO_LAYOUT_LEFT_RIGHT:1,STEREO_LAYOUT_TOP_BOTTOM:2};var pGj={ipA:0,FpS:124,S6m:144,EWD:220,vWa:240,BAm:340,Hpq:360,RRA:480,P3a:588,tmR:608,jqD:720,Zpp:740,Lpz:1080,lap:1100,JqD:1440,GtX:2160,C3A:9999,0:"QUALITY_ORDINAL_UNKNOWN",124:"QUALITY_ORDINAL_144P_SAVER",144:"QUALITY_ORDINAL_144P",220:"QUALITY_ORDINAL_240P_SAVER",240:"QUALITY_ORDINAL_240P",340:"QUALITY_ORDINAL_360P_SAVER",360:"QUALITY_ORDINAL_360P",480:"QUALITY_ORDINAL_480P",588:"QUALITY_ORDINAL_608P_SAVER",608:"QUALITY_ORDINAL_608P",720:"QUALITY_ORDINAL_720P",740:"QUALITY_ORDINAL_720P_ENHANCED",
1080:"QUALITY_ORDINAL_1080P",1100:"QUALITY_ORDINAL_1080P_ENHANCED",1440:"QUALITY_ORDINAL_1440P",2160:"QUALITY_ORDINAL_2160P",9999:"QUALITY_ORDINAL_HIGHRES"};g.OFy={iH:"auto",jnA:"tiny",IZ:"light",LxX:"small",DH:"medium",sM:"large",I2:"hd720",uI:"hd1080",bI:"hd1440",X2:"hd2160",s2:"hd2880",Ts:"highres",UNKNOWN:"unknown"};var Vc,YwR;g.ff={auto:0,tiny:144,light:144,small:240,medium:360,large:480,hd720:720,hd1080:1080,hd1440:1440,hd2160:2160,hd2880:2880,highres:4320};Vc={0:"auto",144:"tiny",240:"small",360:"medium",480:"large",720:"hd720",1080:"hd1080",1440:"hd1440",2160:"hd2160",2880:"hd2880",4320:"highres"};
YwR={QUALITY_ORDINAL_UNKNOWN:0,QUALITY_ORDINAL_144P_SAVER:124,QUALITY_ORDINAL_144P:144,QUALITY_ORDINAL_240P_SAVER:220,QUALITY_ORDINAL_240P:240,QUALITY_ORDINAL_360P_SAVER:340,QUALITY_ORDINAL_360P:360,QUALITY_ORDINAL_480P:480,QUALITY_ORDINAL_608P_SAVER:588,QUALITY_ORDINAL_608P:608,QUALITY_ORDINAL_720P:720,QUALITY_ORDINAL_720P_ENHANCED:740,QUALITY_ORDINAL_1080P:1080,QUALITY_ORDINAL_1080P_ENHANCED:1100,QUALITY_ORDINAL_1440P:1440,QUALITY_ORDINAL_2160P:2160,QUALITY_ORDINAL_HIGHRES:9999};var l1="highres hd2880 hd2160 hd1440 hd1080 hd720 large medium small tiny".split(" ");var w0=class{constructor(Z,k,N,a,T,K,y,Q,q,r){this.width=Z;this.height=k;this.D=Q;this.quality=K||Bz(Z,k);this.qualityOrdinal=g.ff[this.quality];this.fps=N||0;this.stereoLayout=!T||a!=null&&a!=="UNKNOWN"&&a!=="RECTANGULAR"?0:T;this.projectionType=a?a==="EQUIRECTANGULAR"&&T===2?"EQUIRECTANGULAR_THREED_TOP_BOTTOM":a:"UNKNOWN";(Z=y)||(N=g.ff[this.quality],N===0?Z="Auto":(Z=this.projectionType,k=this.fps,Z=N.toString()+(Z==="EQUIRECTANGULAR"||Z==="EQUIRECTANGULAR_THREED_TOP_BOTTOM"||Z==="MESH"?"s":"p")+
(k>55?"60":k>49?"50":k>39?"48":"")));this.qualityLabel=Z;this.V=q||"";this.primaries=r||""}U(){return this.fps>32}isHdr(){return this.V==="smpte2084"||this.V==="arib-std-b67"}};var $5=class{constructor(Z,k,N={}){this.id=Z;this.mimeType=k;N.UH>0||(N.UH=16E3);Object.assign(this,N);[this.itag,this.U]=this.id.split(";");this.containerType=Dx(k);this.gA=CD[this.itag]||""}j(){return this.video}C(){return this.audio}oa(){return this.containerType===2}Y(){return this.gA==="9"||this.gA==="("||this.gA==="9h"||this.gA==="(h"}V(){return this.gA==="1"||this.gA==="1h"||Gd&&this.gA==="1e"}G(){return this.gA==="mac3"||this.gA==="meac3"||this.gA==="m"||this.gA==="i"||nNb(this)}isEncrypted(){return!!this.contentProtection}H9(){return!!this.audio}xT(){return!!this.video}D(){return this.mimeType===
"application/x-mpegURL"}},Gd=!1;var KSj=class extends g.n9{constructor(Z,k,N,a){super();this.Dl=Z;this.start=k;this.end=N;this.isActive=a;this.appendWindowStart=0;this.appendWindowEnd=Infinity;this.timestampOffset=0;this.e2={error:()=>{!this.jm()&&this.isActive&&this.publish("error",this)},
updateend:()=>{!this.jm()&&this.isActive&&this.publish("updateend",this)}};
this.Dl.tZ(this.e2);this.GR=this.isActive}appendBuffer(Z,k,N){if(this.Dl.A4()!==this.appendWindowStart+this.start||this.Dl.ZL()!==this.appendWindowEnd+this.start||this.Dl.mx()!==this.timestampOffset+this.start)this.Dl.supports(1),this.Dl.oK(this.appendWindowStart+this.start,this.appendWindowEnd+this.start),this.Dl.PF(this.timestampOffset+this.start);this.Dl.appendBuffer(Z,k,N)}abort(){this.Dl.abort()}remove(Z,k){this.Dl.remove(Z+this.start,k+this.start)}removeAll(){this.remove(this.appendWindowStart,
this.appendWindowEnd)}clear(){this.Dl.clear()}oK(Z,k){this.appendWindowStart=Z;this.appendWindowEnd=k}nw(){return this.timestampOffset+this.start}A4(){return this.appendWindowStart}ZL(){return this.appendWindowEnd}PF(Z){this.timestampOffset=Z}mx(){return this.timestampOffset}Us(Z=!1){Z=this.Dl.Us(Z);return It(Z,this.start,this.end)}HZ(){return this.Dl.HZ()}Ou(){return this.Dl.Ou()}LP(){return this.Dl.LP()}QM(){return this.Dl.QM()}ih(){this.Dl.ih()}RT(Z){return this.Dl.RT(Z)}eb(){return this.Dl.eb()}X5(){return this.Dl.X5()}fU(Z,
k,N){this.Dl.fU(Z,k,N)}VX(Z,k,N){this.Dl.VX(Z,k,N)}dj(Z,k){return this.Dl.dj(Z,k)}supports(Z){return this.Dl.supports(Z)}wS(){return this.Dl.wS()}isView(){return!0}Qq(){return this.Dl.Qq()?this.isActive:!1}isLocked(){return this.GR&&!this.isActive}Vn(Z){Z=this.Dl.Vn(Z);Z.vw=`${this.start}-${this.end}`;return Z}Iw(){return this.Dl.Iw()}Ow(){return this.Dl.Ow()}wf(){return this.Dl.wf()}YW(){this.Dl.kF(this.e2);super.YW()}};var FL=!1;var a2b=class extends g.n9{constructor(Z,k,N,a,T,K){super();this.w5=Z;this.SO=k;this.id=N;this.containerType=a;this.gA=T;this.xT=K;this.OO=this.Ig=this.h1=null;this.mV=!1;this.appendWindowStart=this.timestampOffset=0;this.R_=J_([],[]);this.Uw=!1;this.mQ=[];this.Cl=sN?[]:void 0;this.handler=y=>this.publish(y.type,this);
this.w5?.addEventListener&&(this.w5.addEventListener("updateend",this.handler),this.w5.addEventListener("error",this.handler))}appendBuffer(Z,k,N){this.Uw=!1;N&&(this.Ig=N);Z.length&&(this.w5?.appendBuffer?this.w5.appendBuffer(Z):this.w5?this.w5.append(Z):this.SO&&this.SO.webkitSourceAppend(this.id,Z));k&&(k.isEncrypted()&&(this.OO=this.Ig),k.type===3&&(this.h1=k),this.mQ.push(k.E3()),this.mQ.length>4&&this.mQ.shift());this.Cl&&(this.Cl.length>=2||Z.length>1048576?delete this.Cl:this.Cl.push(Z))}abort(){try{this.w5?
this.w5.abort():this.SO&&this.SO.webkitSourceAbort(this.id)}catch(Z){edG&&g.L9(new g.jD(`Error while abort the source buffer: ${Z.name}, ${Z.message}`))}this.Ig=this.h1=null}remove(Z,k,N){this.Uw=!1;this.w5?.remove&&(N&&N({b:zd(this.Us()),s:Z,e:k}),this.w5.remove(Z,k))}removeAll(){this.remove(this.A4(),this.ZL())}clear(){this.LP()||(this.abort(),this.removeAll(),this.OO=this.Ig=this.h1=null,this.appendWindowStart=this.timestampOffset=0,this.R_=J_([],[]),this.Uw=!1,this.Cl=sN?[]:void 0,this.mV=!0)}A4(){return FL&&
this.xT?this.appendWindowStart:this.w5?.appendWindowStart||0}ZL(){return this.w5?.appendWindowEnd||0}oK(Z,k){this.w5&&(FL&&this.xT?(this.appendWindowStart=Z,this.w5.appendWindowEnd=k):Z>this.A4()?(this.w5.appendWindowEnd=k,this.w5.appendWindowStart=Z):(this.w5.appendWindowStart=Z,this.w5.appendWindowEnd=k))}nw(){return this.timestampOffset}PF(Z){FL?this.timestampOffset=Z:this.supports(1)&&(this.w5.timestampOffset=Z)}mx(){return FL?this.timestampOffset:this.supports(1)?this.w5.timestampOffset:0}Us(Z=
!1){if(Z)return this.Uw||this.HZ()||(this.R_=this.Us(!1),this.Uw=!0),this.R_;try{return this.w5?this.w5.buffered:this.SO?this.SO.webkitSourceBuffered(this.id):J_([0],[Infinity])}catch(k){return J_([],[])}}HZ(){return this.w5?.updating||!1}LP(){return this.mV}QM(){return!this.mV&&this.HZ()}ih(){this.mV=!1}RT(Z){const k=Z?.gA;Z=Z?.containerType;return!k&&!Z||k===this.gA&&Z===this.containerType}eb(){return this.Ig}X5(){return this.OO}dj(Z,k){return this.containerType!==Z||this.gA!==k}fU(Z,k,N){if(this.containerType!==
Z||N&&this.dj(Z,N))this.supports(4),jx()&&this.w5.changeType(k),N&&(this.gA=N);this.containerType=Z}VX(Z,k,N){this.containerType&&this.dj(Z,k)&&jx()&&this.w5.changeType(N);this.containerType=Z;this.gA=k}wS(){return this.h1}isView(){return!1}supports(Z){switch(Z){case 1:return this.w5?.timestampOffset!==void 0;case 0:return!!this.w5?.appendBuffer;case 2:return!!this.w5?.remove;case 3:return!(!this.w5?.addEventListener||!this.w5?.removeEventListener);case 4:return!(!this.w5||!this.w5.changeType);default:return!1}}Qq(){return!this.HZ()}isLocked(){return!1}Vn(Z){Z.to=
this.mx();Z.up=this.HZ();Z.aw=`${(this.w5?.appendWindowStart||0).toFixed(3)}-${(this.w5?.appendWindowEnd||Infinity).toFixed(3)}`;return Z}Ou(){return this.w5?.writeHead||0}Iw(){const Z={};for(let k=0;k<this.mQ.length;k++)Z[`s${k}`]=this.mQ[k];return Z}YW(){this.supports(3)&&(this.w5.removeEventListener("updateend",this.handler),this.w5.removeEventListener("error",this.handler));super.YW()}Ow(){return this.containerType}wf(){return this.Cl}},sN=!1,edG=!1;var ht=class{constructor(Z,k=!1){this.EH=Z;this.V=k;this.U=!1}dispose(){if(!this.jm()){if(this.V)try{URL.revokeObjectURL(this.EH)}catch(Z){}this.U=!0}}jm(){return this.U}D(){return this.V}equals(Z){return Z!==null&&Z.EH===this.EH}toString(){return`MediaResource {${this.EH}}`}};var k7=class extends g.jR{constructor(Z,k,N=!1){super();this.mediaElement=Z;this.b3=k;this.isView=N;this.C=0;this.L=!1;this.j=!0;this.zt=0;this.callback=null;this.O=!1;this.b3||(this.SO=this.mediaElement.lq());this.events=new g.tt(this);g.u(this,this.events);this.Y=new ht(this.b3?window.URL.createObjectURL(this.b3):this.SO.webkitMediaSourceURL,!0);Z=this.b3||this.SO;We(this.events,Z,["sourceopen","webkitsourceopen"],this.Sm);We(this.events,Z,["sourceclose","webkitsourceclose"],this.vD);this.N={updateend:this.xW}}dA(){return this.Y}getDuration(){return this.b3?.duration||
this.zt}KH(Z){try{this.b3?this.b3.duration=Z:(this.zt=Z,this.SO.webkitSourceSetDuration(Z))}catch(k){}}G(){return!!this.V||!!this.U}K3(){try{return this.D()==="closed"}catch(Z){return!0}}D(){if(this.b3)return this.b3.readyState;switch(this.SO.webkitSourceState){case this.SO.SOURCE_OPEN:return"open";case this.SO.SOURCE_ENDED:return"ended";default:return"closed"}}HZ(){return!!(this.V&&this.V.HZ()||this.U&&this.U.HZ())}Sm(){!this.jm()&&Wz(this)&&this.callback&&(this.callback(this),this.callback=null)}vD(){this.dispose()}xW(Z){Y5&&
!this.L&&Z.LP()&&Z.Us().length===0&&(ZG(this.mediaElement,{l:"mswoue",sr:this.mediaElement.u3?.EQ()},!1),Z.ih(),this.LP()||(this.mediaElement.xK=!0,this.mediaElement.setCurrentTime(0)))}clear(){kpR(this,()=>{});
this.V?.clear();this.U?.clear()}Vz(){this.V?.ih();this.U?.ih();this.j=!1}LP(){return this.U?.LP()||this.V?.LP()}RT(Z,k){return!!this.V&&!!this.U&&this.V.RT(k)&&this.U.RT(Z)}FS(){return!!this.b3&&this.b3.streaming===!1}},Y5=!1;var x2=class{constructor(){this.bT=this.E1=QyN;this.promise=new g.v2((Z,k)=>{this.E1=Z;this.bT=k})}then(Z,k){return this.promise.then(Z,k)}resolve(Z){this.E1(Z)}reject(Z){this.bT(Z)}};var vrG=class extends g.jR{constructor(){super();this.xK=!1;this.EH=null;this.pF=this.s6=!1;this.FS=new g.FQ;this.mediaKeys=this.u3=null;g.u(this,this.FS)}vD(){return this.EH}activate(Z){let k="";Z&&(QWU(this,Z),k=Z.EH);if(!this.zP()||k)k&&this.zP()!==k&&(this.Qz(k),delete this.U,this.Y&&(this.Y.reject(),delete this.Y),!window.MediaSource&&window.ManagedMediaSource&&this.r5(!!Z?.D())),Z&&Z.V||this.load(),this.pF||(this.addEventListener("volumechange",this.HA),this.pF=!0)}zX(Z,k){if(this.U)if(mP&&
this.U.G()&&!this.U.RT(Z,k))ZG(this,{l:"megms",sr:this.u3?.EQ()}),rFi(this),this.stopVideo();else return this.b3=this.U,this.U=void 0,this.b3;Z=window.MediaSource?new k7(this,new window.MediaSource,!1):window.ManagedMediaSource?new k7(this,new window.ManagedMediaSource,!1):window.WebKitMediaSource?new k7(this,new window.WebKitMediaSource,!1):new k7(this,void 0,!1);this.activate(Z.Y);this.b3=Z;this.xK=!1;return Z}jY(Z){this.U=Z}playVideo(){this.isEnded()&&this.seekTo(0);!this.zP()&&this.EH&&(g.b(Error("playVideo without src")),
this.Qz(this.EH.EH),this.EH.V||this.load());const Z=this.play();this.u3?.Pk()||rN&&(IO||0)>=7&&(!Z||this.u3?.B("mweb_ios_allow_playback_workaround_when_ready"))&&ijy(this,()=>{g.fb(()=>{CBG(this,this.getCurrentTime(),0)},500)});
return Z}seekTo(Z){this.D()>0&&(rN&&IO<4&&(Z=Math.max(.1,Z)),this.setCurrentTime(Z))}XL(){if(!this.U&&this.b3)if(this.b3.j)try{ZG(this,{l:"mer",sr:this.u3?.EQ(),rs:this.b3.D()}),this.b3.clear(),this.jY(this.b3),this.b3=void 0}catch(Z){const k=new g.jD(`Error while clearing Media Source in MediaElement: ${Z.name}, ${Z.message}`);g.b(k);this.stopVideo()}else this.stopVideo()}stopVideo(){if(!this.U)if(this.b3?.Vz(),Cx){if(!this.Y){var Z=new x2;Z.then(void 0,()=>{});
this.Y=Z;S8R&&this.pause();g.fb(()=>{this.Y===Z&&(TZ(this),Z.resolve())},200)}}else TZ(this)}LH(){const Z=this.pN();
return M9(Z)&&this.getDuration()?pf(Z,this.getCurrentTime()):0}Ok(){const Z=this.getDuration();return Z===Infinity?1:Z?this.LH()/Z:0}Vn(){try{const Z=this.getSize();return{vct:this.getCurrentTime().toFixed(3),vd:this.getDuration().toFixed(3),vpl:zd(this.L(),",",3),vbu:zd(this.pN()),vbs:zd(this.C()),vpa:`${+this.isPaused()}`,vsk:`${+this.isSeeking()}`,ven:`${+this.isEnded()}`,vpr:`${this.getPlaybackRate()}`,vrs:`${this.D()}`,vns:`${this.tq()}`,vec:`${this.zQ()}`,vemsg:this.qR(),vvol:`${this.getVolume()}`,
vdom:`${+this.qX()}`,vsrc:`${+!!this.zP()}`,vw:`${Z.width}`,vh:`${Z.height}`}}catch{return{}}}hasError(){return this.zQ()>0}addEventListener(Z,k){this.FS.listen(Z,k,!1,this);this.O6(Z)}removeEventListener(Z,k){this.FS.Ce(Z,k,!1,this)}dispatchEvent(Z){if(this.Y&&Z.type==="pause")return!1;if(mP){var k=Z.V?.timeStamp||Infinity;k=k>performance.now()?k-Date.now()+performance.now():k;const N=this.U||this.b3;if(N?.LP()||k<=(N?.C||0))return ZG(this,{l:"mede",sr:this.u3?.EQ(),et:Z.type}),!1;if(this.xK)return ZG(this,
{l:"medes",et:Z.type}),N&&Z.type==="seeking"&&(N.C=performance.now(),this.xK=!1),!1}return this.FS.dispatchEvent(Z)}Tt(){this.s6=!1}hq(){this.s6=!0;this.N(!0)}HA(){this.s6&&!this.Rq()&&this.N(!0)}equals(Z){return!!Z&&Z.lq()===this.lq()}YW(){this.pF&&this.removeEventListener("volumechange",this.HA);Cx&&TZ(this);super.YW()}},Cx=!1,S8R=!1,mP=!1,sWf=!1;var u7;g.QR=class{constructor(Z,k=null,N=null){this.RJ=k;this.seekSource=N;this.state=Z||64}V(Z){return!!(this.state&Z)}isPaused(){return this.V(4)}isPlaying(){return this.V(8)&&!this.V(512)&&!this.V(64)&&!this.V(2)}isOrWillBePlaying(){return this.V(8)&&!this.V(2)&&!this.V(1024)}U(){return this.state===8}isCued(){return this.V(64)&&!this.V(8)&&!this.V(4)}isBuffering(){return this.V(1)&&!this.V(2)}isError(){return this.V(128)}isSuspended(){return this.V(512)}NN(){return this.V(64)&&this.V(4)}toString(){return`PSt.${this.state.toString(16)}`}};
u7={BUFFERING:"buffering-mode",CUED:"cued-mode",ENDED:"ended-mode",PAUSED:"paused-mode",PLAYING:"playing-mode",SEEKING:"seeking-mode",UNSTARTED:"unstarted-mode"};var iFN=class extends g.jR{constructor(Z,k,N,a,T,K,y,Q,q,r,C,m,A,P,d){super();this.yl=Z;this.slot=k;this.layout=N;this.Za=a;this.Qi=T;this.XS=K;this.E6=y;this.Zf=Q;this.tp=q;this.KZ=r;this.position=C;this.Y=m;this.Gt=A;this.BO=P;this.context=d;this.DQ=!0;this.D=!1;this.x4="not_rendering";this.V=!1;Z=this.layout.clientMetadata.PD("metadata_type_ad_placement_config");this.WD=new zZ(N.d5,this.Za,Z,N.layoutId);Z=ct(this)?.progressCommands||[];this.U=new Hh(q,Z,N.layoutId,()=>this.kZ())}zM(){return this.slot}zZ(){return this.layout}init(){const Z=
this.layout.clientMetadata.PD("metadata_type_video_length_seconds"),k=this.layout.clientMetadata.PD("metadata_type_active_view_traffic_type");
$B(this.layout.d5)&&Ut(this.Qi.get(),this.layout.layoutId,{Ol:k,Jk:Z,listener:this});Mx(this.Za.get(),this);this.Dm()}Go(){}release(){$B(this.layout.d5)&&bL(this.Qi.get(),this.layout.layoutId);nX(this.Za.get(),this);this.JA()}k7(){}HN(){}startRendering(Z){if(Z.layoutId!==this.layout.layoutId){this.yl.aJ(this.slot,Z,new ND("Tried to start rendering an unknown layout, this adapter "+`requires LayoutId: ${this.layout.layoutId}`+`and LayoutType: ${this.layout.layoutType}`,void 0,"ADS_CLIENT_ERROR_MESSAGE_UNKNOWN_LAYOUT"),
"ADS_CLIENT_ERROR_TYPE_ENTER_LAYOUT_FAILED");var k=!1}else k=!0;k&&(this.x4="rendering_start_requested",this.KZ(-1),this.bD(Z),this.P3(!1))}l0(Z,k){k.layoutId===this.layout.layoutId&&(this.x4="rendering",this.V=this.E6.get().isMuted()||this.E6.get().getVolume()===0,this.Nx("impression"),this.Nx("start"),this.E6.get().isMuted()&&(Ht(this,"mute"),Z=ct(this)?.muteCommands||[],Ae(this.tp.get(),Z,this.layout.layoutId)),this.E6.get().isFullscreen()&&(this.nN("fullscreen"),Z=ct(this)?.fullscreenCommands||
[],Ae(this.tp.get(),Z,this.layout.layoutId)),Z=this.Zf.get(),Z.D&&!Z.U&&(Z.L=!1,Z.U=!0,Z.actionType!=="ad_to_video"&&(gV("pbs",void 0,Z.actionType),g.ii("finalize_all_timelines")&&xYf(Z.actionType))),this.KZ(1),this.AU(k),k=ct(this)?.impressionCommands||[],Ae(this.tp.get(),k,this.layout.layoutId))}z$(Z,k,N){this.L={j3:3,du:Z==="load_timeout"?402:400,errorMessage:k.message};this.Nx("error");Z=ct(this)?.errorCommands||[];Ae(this.tp.get(),Z,this.layout.layoutId);this.yl.aJ(this.slot,this.layout,k,N)}cF(Z,
k=!1){if(this.x4==="rendering"){UT(this.WD,Z*1E3,k);ddG(this,Z*1E3,k);var N=this.kZ();N&&(N/=1E3,(Z>=N*.25||k)&&this.Nx("first_quartile"),(Z>=N*.5||k)&&this.Nx("midpoint"),(Z>=N*.75||k)&&this.Nx("third_quartile"),this.Gt.get().S.X().experiments.yz("enable_progress_command_flush_on_kabuki")?R7(this.U,Z*1E3,k):R7(this.U,Z*1E3,LSj(this)?k:!1))}}Z7(){return N9(this.XS.get(),1)?.clientPlaybackNonce||""}LR(Z,k){Z.layoutId!==this.layout.layoutId?this.yl.aJ(this.slot,Z,new ND("Tried to stop rendering an unknown layout, this adapter "+
`requires LayoutId: ${this.layout.layoutId}`+`and LayoutType: ${this.layout.layoutType}`,void 0,"ADS_CLIENT_ERROR_MESSAGE_UNKNOWN_LAYOUT"),"ADS_CLIENT_ERROR_TYPE_EXIT_LAYOUT_FAILED"):k()}eI(Z,k,N){if(k.layoutId===this.layout.layoutId)switch(this.x4="not_rendering",this.layoutExitReason=void 0,(Z=N!=="normal"||this.position+1===this.Y)&&this.P3(Z),this.WW(N),this.KZ(0),N){case "abandoned":bX(this.WD,"impression")&&(N=ct(this)?.abandonCommands||[],Ae(this.tp.get(),N,this.layout.layoutId));break;case "normal":N=
ct(this)?.completeCommands||[];Ae(this.tp.get(),N,this.layout.layoutId);break;case "skipped":N=ct(this)?.skipCommands||[],Ae(this.tp.get(),N,this.layout.layoutId)}}kA(){return this.layout.layoutId}B_(){return this.L}A7(){if(this.x4==="rendering"){this.WD.Nx("active_view_measurable");var Z=ct(this)?.activeViewMeasurableCommands||[];Ae(this.tp.get(),Z,this.layout.layoutId)}}W8(){if(this.x4==="rendering"){this.WD.Nx("active_view_fully_viewable_audible_half_duration");var Z=ct(this)?.activeViewFullyViewableAudibleHalfDurationCommands||
[];Ae(this.tp.get(),Z,this.layout.layoutId)}}N9(){if(this.x4==="rendering"){this.WD.Nx("active_view_viewable");var Z=ct(this)?.activeViewViewableCommands||[];Ae(this.tp.get(),Z,this.layout.layoutId)}}m8(){if(this.x4==="rendering"){this.WD.Nx("audio_audible");var Z=ct(this)?.activeViewAudioAudibleCommands||[];Ae(this.tp.get(),Z,this.layout.layoutId)}}IT(){if(this.x4==="rendering"){this.WD.Nx("audio_measurable");var Z=ct(this)?.activeViewAudioMeasurableCommands||[];Ae(this.tp.get(),Z,this.layout.layoutId)}}P3(Z){this.Zf.get().P3(this.layout.clientMetadata.PD("metadata_type_ad_placement_config").kind,
Z,this.position,this.Y,!1)}onFullscreenToggled(Z){this.x4==="rendering"&&(Z?(this.nN("fullscreen"),Z=ct(this)?.fullscreenCommands||[],Ae(this.tp.get(),Z,this.layout.layoutId)):(this.nN("end_fullscreen"),Z=ct(this)?.endFullscreenCommands||[],Ae(this.tp.get(),Z,this.layout.layoutId)))}onVolumeChange(){if(this.x4==="rendering")if(this.E6.get().isMuted()){Ht(this,"mute");var Z=ct(this)?.muteCommands||[];Ae(this.tp.get(),Z,this.layout.layoutId)}else Ht(this,"unmute"),Z=ct(this)?.unmuteCommands||[],Ae(this.tp.get(),
Z,this.layout.layoutId)}D1(){}Pi(){}Bi(){}Rb(){}Zc(){}nN(Z){this.WD.nN(Z,!this.V)}Nx(Z){this.WD.Nx(Z,!this.V)}};var l2f=class extends iFN{constructor(Z){super(Z.yl,Z.slot,Z.Nj,Z.Za,Z.Qi,Z.XS,Z.E6,Z.Zf,Z.tp,Z.KZ,Z.nZ,Z.wc,Z.Gt,Z.BO,Z.context);this.vO=!0;this.pJ=this.xH=0;this.hR=tI(()=>{this.yl.l0(this.slot,this.layout)});
this.fC=Z.fC;this.DU=Z.DU;this.J4=tI(()=>{this.x4!=="rendering_stop_requested"&&this.DU(this);this.AR()});
this.timer=new g.EC(200);this.timer.listen("tick",()=>{this.MW()});
g.u(this,this.timer)}AR(){this.layoutExitReason?this.yl.eI(this.slot,this.layout,this.layoutExitReason):PBG(this)}Dm(){}JA(){var Z=this.Za.get();Z.Tu===this&&(Z.Tu=null);this.timer.stop()}k7(){this.timer.stop();cFy(this)}HN(){uUR(this);H0y(this)}kZ(){return this.zZ().clientMetadata.PD("METADATA_TYPE_MEDIA_BREAK_LAYOUT_DURATION_MILLISECONDS")}Ww(){return this.xH/1E3}C8(Z,k){this.LR(Z,()=>{this.x4!=="rendering_stop_requested"&&(this.x4="rendering_stop_requested",this.layoutExitReason=k,VOX(this,k),
this.timer.stop())})}MW(){const Z=Date.now(),k=Z-this.pJ;
this.pJ=Z;this.xH+=k;this.xH>=this.kZ()?(this.xH=this.kZ(),this.cF(this.xH/1E3,!0),VR(this,this.xH),this.J4()):(this.cF(this.xH/1E3),VR(this,this.xH))}yV(Z){if(this.x4!=="not_rendering"){Z=FSb(this,Z);var k=this.E6.get().getPresentingPlayerType()===2;this.x4==="rendering_start_requested"?k&&Zx(Z)&&this.hR():k?Z.Ub(2)?wm("Receive player ended event during MediaBreak",this.zM(),this.zZ()):tOy(this,Z):this.FW()}}bD(){hof(this);WP(this.E6.get());this.Za.get().Tu=this;vX("pbp")||vX("pbs")||gV("pbp");vX("pbp",
"watch")||vX("pbs","watch")||gV("pbp",void 0,"watch");this.hR()}AU(Z){this.Zf.get();var k=Z.clientMetadata.PD("metadata_type_ad_placement_config").kind,N=this.position===0;Z=Z.clientMetadata.PD("metadata_type_linked_in_player_layout_type");Z={adBreakType:XP(k),adType:x6r(Z)};let a=void 0;N?k!=="AD_PLACEMENT_KIND_START"&&(a="video_to_ad"):a="ad_to_ad";uJ("ad_mbs",void 0,a);g.lJ(Z,a);uUR(this)}FW(){this.J4()}WW(){}XE(){}};var BCj=class extends iFN{AR(){this.x4!=="rendering_stop_requested"&&this.DU(this);this.layoutExitReason?this.yl.eI(this.slot,this.layout,this.layoutExitReason):PBG(this)}constructor(Z){super(Z.callback,Z.slot,Z.Nj,Z.Za,Z.Qi,Z.XS,Z.E6,Z.Zf,Z.tp,Z.KZ,Z.nZ,Z.wc,Z.Gt,Z.BO,Z.context);this.adCpn="";this.wx=this.fb=0;this.hR=tI(()=>{this.yl.l0(this.slot,this.layout)});
this.J4=tI(()=>{this.AR()});
this.H$=Z.XS;this.ub=Z.ub;this.s3=Z.s3;this.JW=Z.JW;this.fC=Z.fC;this.Rx=Z.Rx;this.DU=Z.DU;cM(this.Gt.get(),"html5_disable_media_load_timeout")||(this.Nt=new g.Uc(()=>{this.z$("load_timeout",new ND("Media layout load timeout.",{},"ADS_CLIENT_ERROR_MESSAGE_MEDIA_LAYOUT_LOAD_TIMEOUT",!0),"ADS_CLIENT_ERROR_TYPE_ENTER_LAYOUT_FAILED")},1E4));
Z=xG(this.Gt.get());const k=GV(this.Gt.get());Z&&k&&(this.To=new g.Uc(()=>{const N=this.layout.clientMetadata.PD("metadata_type_preload_player_vars");N&&this.s3.get().S.preloadVideoByPlayerVars(N,2,300)}))}FW(){this.J4()}yV(Z){this.xU(Z)}Dm(){this.zZ().clientMetadata.PD("metadata_type_player_bytes_callback_ref").current=this;
this.shrunkenPlayerBytesConfig=this.zZ().clientMetadata.PD("metadata_type_shrunken_player_bytes_config")}JA(){this.zZ().clientMetadata.PD("metadata_type_player_bytes_callback_ref").current=null;this.fn&&this.JW.get().removeCueRange(this.fn);this.fn=void 0;this.Nt?.dispose();this.To&&this.To.dispose()}bD(Z){var k=Z.clientMetadata.PD("metadata_type_ad_placement_config");k=xG(this.Gt.get(),k);var N=GV(this.Gt.get());if(k&&N){N=Z.clientMetadata.PD("metadata_type_preload_player_vars");var a=this.Gt.get();
a=g.Q5(a.S.X().experiments,"html5_preload_wait_time_secs");N&&this.To&&this.To.start(a*1E3)}N=Z.clientMetadata.PD("metadata_type_ad_video_id");a=Z.clientMetadata.PD("metadata_type_legacy_info_card_vast_extension");N&&a&&this.Rx.get().S.X().vD.add(N,{a7:a});(N=Z.clientMetadata.PD("metadata_type_sodar_extension_data"))&&xAy(this.ub.get(),N);bxG(this.E6.get(),!1);hof(this);k?(N=this.s3.get(),Z=Z.clientMetadata.PD("metadata_type_player_vars"),N.S.loadVideoByPlayerVars(Z,!1,2)):GB(this.s3.get(),Z.clientMetadata.PD("metadata_type_player_vars"));
this.Nt?.start();k||this.s3.get().S.playVideo(2)}AU(){this.Nt?.stop();this.z7();(this.adCpn=N9(this.XS.get(),2)?.clientPlaybackNonce||"")||wm("Media layout confirmed started, but ad CPN not set.");D6(this.fC.get(),"onAdStart",this.adCpn);this.fb=Date.now()}kZ(){return N9(this.XS.get(),2)?.D$}Fg(){this.WD.nN("clickthrough")}C8(Z,k){this.LR(Z,()=>{this.x4!=="rendering_stop_requested"&&(this.x4="rendering_stop_requested",this.layoutExitReason=k,VOX(this,k),this.Nt?.stop(),this.To&&this.To.stop(),bxG(this.E6.get(),
!0),this.shrunkenPlayerBytesConfig?.shouldRequestShrunkenPlayerBytes&&this.E6.get().wk(!1))})}onCueRangeEnter(Z){Z!==this.fn?wm("Received CueRangeEnter signal for unknown layout.",this.zM(),this.zZ(),{cueRangeId:Z}):(this.JW.get().removeCueRange(this.fn),this.fn=void 0,Z=this.zZ().clientMetadata.PD("metadata_type_video_length_seconds"),(!tk(this)||(this.H$.get().getAccumulatedWatchTime()?.accumulatedWatchTimeMillis||-1)>=Z*1E3-500)&&this.cF(Z,!0),this.Nx("complete"))}WW(Z){Z!=="abandoned"&&D6(this.fC.get(),
"onAdComplete");
D6(this.fC.get(),"onAdEnd",this.adCpn)}z7(){this.fn=`${"adcompletioncuerange"}:${this.zZ().layoutId}`;this.JW.get().addCueRange(this.fn,0x7ffffffffffff,0x8000000000000,!1,this,2,2)}onCueRangeExit(){}XE(Z){this.x4==="rendering"&&(this.shrunkenPlayerBytesConfig&&this.shrunkenPlayerBytesConfig.shouldRequestShrunkenPlayerBytes&&Z>=(this.shrunkenPlayerBytesConfig.playerProgressOffsetSeconds||0)&&this.E6.get().wk(!0),tk(this)?(Z=this.H$.get().getAccumulatedWatchTime()?.accumulatedWatchTimeMillis||-1,Z>
0&&this.cF(Z/1E3)):this.cF(Z))}cF(Z,k=!1){super.cF(Z,k);k=Date.now()-this.fb;const N=Z*1E3,a={contentCpn:this.Z7(),adCpn:N9(this.XS.get(),2)?.clientPlaybackNonce||""};if(Z-this.wx>=5){const T=k<N*.4?0:1;gm(T,"n.k_",{metadata:a,gp:k,k_:Math.floor(N/1E3)});YA("NKDSTAT",T);if(k=T===0)k=this.zM().clientMetadata.PD("metadata_type_player_bytes_slot_metadata"),k===void 0&&wm("PlayerBytesSlotMetadata is not filled",this.zM(),this.zZ()),k=k?.T3===!0;k&&D6(this.fC.get(),"onAbnormalityDetected");this.wx=Z}}xU(Z){if(this.x4!==
"not_rendering"){Z=FSb(this,Z);var k=this.E6.get().getPresentingPlayerType()===2;this.x4==="rendering_start_requested"?k&&Zx(Z)&&(tk(this)?this.yl.l0(this.slot,this.layout):this.hR()):!k||Z.Ub(2)?tk(this)?this.AR():this.J4():tOy(this,Z)}}};var $db=class extends g.jR{constructor(Z,k,N,a,T,K,y,Q,q,r,C,m,A,P){super();this.callback=Z;this.XS=k;this.wD=N;this.s3=a;this.E6=T;this.dn=K;this.Zf=y;this.iz=Q;this.slot=q;this.layout=r;this.Ra=C;this.Jh=m;this.GM=A;this.Gt=P;this.DQ=!0;this.xm=!1;this.sS=[];this.sW=-1;this.c7=!1}zM(){return this.slot}zZ(){return this.layout}ye(){}k7(Z,k){const N=hk(this);k.layoutId!==uZ(N,Z,k)?wm("pauseLayout for a PlayerBytes layout that is not currently active",Z,k):N.k7()}HN(Z,k){const N=hk(this);k.layoutId!==
uZ(N,Z,k)?wm("resumeLayout for a PlayerBytes layout that is not currently active",Z,k):N.HN()}Rs(Z,k){const N=hk(this);this.sW===this.sS.length-1&&wm("Unexpected skip requested during the last sublayout",hk(this)?.zM(),hk(this)?.zZ(),{requestingSlot:Z,requestingLayout:k});k.layoutId!==uZ(N,Z,k)?(wm("onSkipRequested for a PlayerBytes layout that is not currently active",N.zM(),N.zZ()),Z=!1):Z=!0;Z&&Bt(this,N.zM(),N.zZ(),"skipped")}Ev(Z,k){XvU(this.iz,Z,k)}l0(Z,k){hk(this)?.l0(Z,k)}eI(Z,k,N){k.layoutId===
this.zZ().layoutId&&(this.xm=!1,oU(this.GM(),this));hk(this)?.eI(Z,k,N)}XE(Z){hk(this)?.XE(Z)}UO(Z,k,N){this.sW===-1&&(this.callback.l0(this.slot,this.layout),this.sW++);const a=hk(this);a?a.z$(Z,k,N):wm("No active adapter found onLayoutError in PlayerBytesVodCompositeLayoutRenderingAdapter",void 0,void 0,{activeSubLayoutIndex:String(this.sW),layoutId:this.zZ().layoutId})}onFullscreenToggled(Z){hk(this)?.onFullscreenToggled(Z)}D1(Z){hk(this)?.D1(Z)}Bi(Z){hk(this)?.Bi(Z)}onVolumeChange(){hk(this)?.onVolumeChange()}init(){var Z=
this.zZ().clientMetadata.PD("metadata_type_player_bytes_layout_controls_callback_ref");Z&&(Z.current=this);if(this.sS.length<1)throw new p("Invalid sub layout rendering adapter length when scheduling composite layout.",{length:String(this.sS.length)});if(Z=this.zZ().clientMetadata.PD("metadata_type_ad_pod_skip_target_callback_ref"))Z.current=this;for(const k of this.sS)k.init(),PVr(this.iz,this.slot,k.zZ()),cv0(this.iz,this.slot,k.zZ())}release(){var Z=this.zZ().clientMetadata.PD("metadata_type_player_bytes_layout_controls_callback_ref");
Z&&(Z.current=null);if(Z=this.zZ().clientMetadata.PD("metadata_type_ad_pod_skip_target_callback_ref"))Z.current=null;for(const a of this.sS){Z=this.iz;var k=this.slot,N=a.zZ();for(const T of Z.U)T.VT(k,N);a.release()}}LR(Z){return Z.layoutId!==this.zZ().layoutId?(this.callback.aJ(this.zM(),Z,new ND("Tried to start rendering an unknown layout, this adapter "+`requires LayoutId: ${this.zZ().layoutId}`+`and LayoutType: ${this.zZ().layoutType}`,void 0,"ADS_CLIENT_ERROR_MESSAGE_UNKNOWN_LAYOUT"),"ADS_CLIENT_ERROR_TYPE_ENTER_LAYOUT_FAILED"),
!1):!0}YI(){this.E6.get().addListener(this);eB(this.GM(),this)}startRendering(Z){this.LR(Z)&&(this.YI(),PxG(this.Zf.get()),VnR(this.Gt.get())||WP(this.E6.get()),this.sW===-1&&fN(this,this.sW+1))}C8(Z,k){this.xm=!0;this.sW===this.sS.length?this.callback.eI(this.slot,this.layout,k):(Z=hk(this),Z.C8(Z.zZ(),k),this.F7=()=>{this.callback.eI(this.slot,this.layout,k)});
this.E6.get().S.Sa();GB(this.s3.get(),{});Z=zB(this.E6.get(),1);Z.isPaused()&&!Z.V(2)&&this.E6.get().playVideo();this.E6.get().removeListener(this);this.xm&&wrG(this)}yV(Z){if(Z.state.isError())this.UO(Z.state.RJ?.errorCode,new ND("There was a player error during this media layout.",{playerErrorCode:Z.state.RJ?.errorCode},"ADS_CLIENT_ERROR_MESSAGE_PLAYER_ERROR"),"ADS_CLIENT_ERROR_TYPE_ENTER_LAYOUT_FAILED");else{var k=hk(this);k&&k.yV(Z)}}Pi(){}sP(){}wQ(){}X8(){}MR(){}cq(){}sQ(){}IJ(){}JQ(){}VT(){}Xi(){}Rb(){}Zc(){}B5(Z,
k,N){Bt(this,Z,k,N)}H5(Z,k){Bt(this,Z,k,"error")}};var Gpf=class extends g.jR{constructor(Z,k,N,a,T,K,y){super();this.callback=Z;this.s3=k;this.E6=N;this.Zf=a;this.EW=T;this.GM=K;this.Gt=y;this.DQ=!0;this.xm=!1}zM(){return this.EW.zM()}zZ(){return this.EW.zZ()}init(){const Z=this.zZ().clientMetadata.PD("metadata_type_player_bytes_layout_controls_callback_ref");Z&&(Z.current=this);this.Dm()}Dm(){this.EW.init()}release(){const Z=this.zZ().clientMetadata.PD("metadata_type_player_bytes_layout_controls_callback_ref");Z&&(Z.current=null);this.JA()}JA(){this.EW.release()}k7(){this.EW.k7()}HN(){this.EW.HN()}Rs(Z,
k){wm("Unexpected onSkipRequested from PlayerBytesVodSingleLayoutRenderingAdapter.  Skip should be handled by Triggers",this.zM(),this.zZ(),{requestingSlot:Z,requestingLayout:k})}startRendering(Z){Z.layoutId!==this.zZ().layoutId?this.callback.aJ(this.zM(),Z,new ND("Tried to start rendering an unknown layout, this adapter "+`requires LayoutId: ${this.zZ().layoutId}`+`and LayoutType: ${this.zZ().layoutType}`,void 0,"ADS_CLIENT_ERROR_MESSAGE_UNKNOWN_LAYOUT"),"ADS_CLIENT_ERROR_TYPE_ENTER_LAYOUT_FAILED"):
(this.E6.get().addListener(this),eB(this.GM(),this),PxG(this.Zf.get()),VnR(this.Gt.get())||WP(this.E6.get()),this.EW.startRendering(Z))}C8(Z,k){this.xm=!0;this.EW.C8(Z,k);this.E6.get().S.Sa();GB(this.s3.get(),{});Z=zB(this.E6.get(),1);Z.isPaused()&&!Z.V(2)&&this.E6.get().playVideo();this.E6.get().removeListener(this);this.xm&&this.EW.FW()}l0(Z,k){this.EW.l0(Z,k)}eI(Z,k,N){k.layoutId===this.zZ().layoutId&&(this.xm=!1,oU(this.GM(),this));this.EW.eI(Z,k,N);k.layoutId===this.zZ().layoutId&&DG(this.Zf.get())}XE(Z){this.EW.XE(Z)}yV(Z){Z.state.isError()?
this.UO(Z.state.RJ?.errorCode,new ND("There was a player error during this media layout.",{playerErrorCode:Z.state.RJ?.errorCode},"ADS_CLIENT_ERROR_MESSAGE_PLAYER_ERROR"),"ADS_CLIENT_ERROR_TYPE_ENTER_LAYOUT_FAILED"):this.EW.yV(Z)}UO(Z,k,N){this.EW.z$(Z,k,N)}onFullscreenToggled(Z){this.EW.onFullscreenToggled(Z)}D1(Z){this.EW.D1(Z)}Bi(Z){this.EW.Bi(Z)}onVolumeChange(){this.EW.onVolumeChange()}Pi(){}sP(){}wQ(){}X8(){}MR(){}cq(){}sQ(){}IJ(){}JQ(){}VT(){}Xi(){}Rb(){}Zc(){}};var gry=class{constructor(Z,k,N,a,T,K,y,Q,q,r){this.callback=Z;this.slot=k;this.layout=N;this.XS=a;this.wD=T;this.a4=K;this.E6=y;this.WD=Q;this.Za=q;this.j=r;this.driftRecoveryMs=this.layout.clientMetadata.PD("metadata_type_drift_recovery_ms")||null;this.Y=this.layout.clientMetadata.PD("metadata_type_prefetch_metadata")!==void 0}zM(){return this.slot}zZ(){return this.layout}init(){this.a4.get().addListener(this);this.E6.get().addListener(this);var Z=this.layout.clientMetadata.PD("metadata_type_layout_enter_ms");
var k=this.layout.clientMetadata.PD("metadata_type_layout_exit_ms");if(this.Y){var N=this.a4.get().kO.slice(-1)[0];N!==void 0&&(Z=N.startSecs*1E3,k=(N.startSecs+N.Xl)*1E3)}this.Go(Z,k);N=this.XS.get().mK?.clientPlaybackNonce;const a=this.layout.KF.adClientDataEntry;vt(this.Za.get(),{daiStateTrigger:{filledAdsDurationMs:k-Z,contentCpn:N,adClientData:a}});var T=this.a4.get();T=eoj(T.D,Z,k);T!==null&&(vt(this.Za.get(),{daiStateTrigger:{filledAdsDurationMs:T-Z,contentCpn:N,cueDurationChange:"DAI_CUE_DURATION_CHANGE_SHORTER",
adClientData:a}}),this.wD.get().Ci(T,k))}release(){this.JA();this.a4.get().removeListener(this);this.E6.get().removeListener(this)}startRendering(){this.bD();this.callback.l0(this.slot,this.layout)}C8(Z,k){this.G(k);this.driftRecoveryMs!==null&&(iZ(this,{driftRecoveryMs:this.driftRecoveryMs.toString(),breakDurationMs:Math.round(oAi(this)-this.layout.clientMetadata.PD("metadata_type_layout_enter_ms")).toString(),driftFromHeadMs:Math.round(this.E6.get().S.dk()*1E3).toString()}),this.driftRecoveryMs=
null);this.callback.eI(this.slot,this.layout,k)}nJ(){return!1}cn(Z){const k=this.layout.clientMetadata.PD("metadata_type_layout_enter_ms"),N=this.layout.clientMetadata.PD("metadata_type_layout_exit_ms");Z*=1E3;k<=Z&&Z<N&&(vt(this.Za.get(),{daiStateTrigger:{filledAdsDurationMs:Z-k,contentCpn:this.XS.get().mK?.clientPlaybackNonce,cueDurationChange:"DAI_CUE_DURATION_CHANGE_SHORTER",adClientData:this.layout.KF.adClientDataEntry}}),this.wD.get().Ci(Z,N))}XE(Z){this.L(Z);Z=YQ(this.E6.get(),2,!0);if(m5(this.j.get(),
this.layout.layoutId)){var k=this.layout.clientMetadata.PD("metadata_type_layout_enter_ms"),N=this.driftRecoveryMs;if(!(N===null||Z*1E3<k+N)){this.driftRecoveryMs=null;var a=oAi(this),T=this.E6.get().S.dk(),K=Math.min(Z+T,a/1E3);K<=Z?iZ(this,{driftRecoveryMs:N.toString(),breakDurationMs:Math.round(a-k).toString(),driftFromHeadMs:Math.round(T*1E3).toString()}):(iZ(this,{driftRecoveryMs:N.toString(),breakDurationMs:Math.round(a-k).toString(),driftFromHeadMs:Math.round(T*1E3).toString(),appliedDriftRecoveryMs:Math.round(Z*
1E3-k).toString(),destinationMs:Math.round(K*1E3-k).toString()}),this.E6.get().S.seekTo(K,void 0,void 0,1))}}}D1(){}Pi(){}Bi(){}onVolumeChange(){}Rb(){}Zc(){}};var w_U=class extends gry{constructor(Z,k,N,a,T,K,y,Q,q,r,C){super(Z,k,N,a,T,K,y,Q,q,r);this.D=C;this.U=this.V=null;for(const m of this.D)Op(m.zZ().clientMetadata,"metadata_type_survey_overlay")&&(this.U=m.zZ().layoutId)}Go(Z,k){this.XS.get().addListener(this);if(this.Y){var N=Z,a=0,T=[];Z=this.D.slice();Z.sort((K,y)=>K.zZ().clientMetadata.PD("metadata_type_media_sub_layout_index")-y.zZ().clientMetadata.PD("metadata_type_media_sub_layout_index"));
Z.forEach(K=>{const y=N,Q=K.zZ().clientMetadata.PD("metadata_type_video_length_seconds"),q=Math.min(y+Q*1E3,k);N=q;a++;T.push(Q);K.Go(y,q)})}else this.D.forEach(K=>{K.init()});
this.U!=null&&g7(this.Za.get(),"ads_ssmplra_init",`lid.${this.layout.layoutId};smlid.${this.U}`)}JA(){this.XS.get().removeListener(this);this.V=null;this.D.forEach(Z=>{Z.release()})}bD(){if(this.V)wm("Failed to restart rendering",this.slot,this.layout,{hasSurveyMediaSubLayout:String(!!this.U)});
else{var Z=this.XS.get().mK?.layoutId;zoN(this,Z)}}G(Z){this.V?.M7?.C8(this.V?.M7?.zZ(),Z);this.V=null}ye({videoId:Z,layoutId:k}){Z==="nPpU29QrbiU"&&g7(this.Za.get(),"ads_ssmplra_opdcs",`vid.${Z};lid.${this.layout.layoutId};smlid.${this.U};slrs.${!!this.V};slrslid.${this.V?.M7?.zZ().layoutId}`);this.V&&(this.V.M7?.zZ().layoutId===k?wm("Unexpected transition into the same layout ID",this.slot,this.layout,{layoutId:k}):(this.V.M7?.C8(this.V.M7?.zZ(),"normal"),zoN(this,k)))}L(){}yV(){}onFullscreenToggled(){}};var $Hi=class{constructor(Z,k,N,a,T,K,y,Q,q,r,C,m,A,P){this.callback=Z;this.slot=k;this.layout=N;this.wD=a;this.WD=T;this.E6=K;this.iy=y;this.Qi=Q;this.ub=q;this.Gt=r;this.Za=C;this.XS=m;this.JW=A;this.tp=P;this.vO=!0;this.tI=this.x4=null;this.adCpn=void 0;this.V=!1;Z=this.layout.clientMetadata.PD("METADATA_TYPE_INTERACTIONS_AND_PROGRESS_LAYOUT_COMMANDS")?.progressCommands||[];this.U=new Hh(P,Z,N.layoutId,()=>this.layout.clientMetadata.PD("metadata_type_video_length_seconds")*1E3)}zM(){return this.slot}zZ(){return this.layout}Go(Z,
k){this.layout.clientMetadata.PD("metadata_type_player_bytes_callback_ref").current=this;
this.tI=Udy(this.slot,this.layout,this.layout.clientMetadata.PD("metadata_type_player_vars"),Z,k,this.layout.clientMetadata.PD("metadata_type_video_length_seconds")*1E3,this.wD.get(),this.iy.get(),()=>{var N={...Sy(this.layout)};var a=this.slot.clientMetadata.PD("metadata_type_fulfilled_layout")||this.slot.fulfilledLayout;const T=a.clientMetadata.PD("metadata_type_sub_layouts")||a.C5;a={...Sy(a),adPlacementConfig:a.clientMetadata.PD("metadata_type_ad_placement_config"),subLayouts:(T||[]).map(Sy)};
return{layoutType:"LAYOUT_TYPE_COMPOSITE_PLAYER_BYTES",...N,compositeLayout:a,hasSurveyOverlay:Op(this.layout.clientMetadata,"metadata_type_survey_overlay"),surveyOverlay:this.layout.clientMetadata.PD("metadata_type_survey_overlay")}},this.Za.get());
this.E6.get().addListener(this);Z=this.layout.clientMetadata.PD("metadata_type_video_length_seconds");k=this.layout.clientMetadata.PD("metadata_type_active_view_traffic_type");$B(this.layout.d5)&&Ut(this.Qi.get(),this.layout.layoutId,{Ol:k,Jk:Z,listener:this});PVr(this.callback,this.slot,this.layout);cv0(this.callback,this.slot,this.layout)}init(){const Z=this.layout.clientMetadata.PD("metadata_type_layout_enter_ms"),k=this.layout.clientMetadata.PD("metadata_type_layout_exit_ms");this.Go(Z,k)}release(){this.E6.get().removeListener(this);
$B(this.layout.d5)&&bL(this.Qi.get(),this.layout.layoutId);this.Gt.get();var Z=this.callback,k=this.slot,N=this.layout;for(const a of Z.U)a.VT(k,N);S6(this.Gt.get())&&(this.fn&&(g7(this.Za.get(),"ads_ccru",`acpn.${N9(this.XS.get(),2)?.clientPlaybackNonce};cr.${this.fn}`),this.JW.get().removeCueRange(this.fn)),this.fn=void 0)}startRendering(){Op(this.layout.clientMetadata,"metadata_type_survey_overlay")&&g7(this.Za.get(),"ads_ssmlra_srs",`lid.${this.layout.layoutId}`);if(this.x4)wm("Expected the layout not to be entered before start rendering",
this.slot,this.layout,{hasSurveyOverlay:Op(this.layout.clientMetadata,"metadata_type_survey_overlay"),surveyOverlay:this.layout.clientMetadata.PD("metadata_type_survey_overlay")});else{this.x4={x5:null,Fn:!1};this.V=!1;e6(this.Gt.get())&&(this.adCpn=N9(this.XS.get(),2)?.clientPlaybackNonce);this.Gt.get().S.X().experiments.yz("html5_disable_sodar_for_tvhtml5")||b0f(this.slot,this.layout,this.ub.get());$B(this.layout.d5)&&Du0(this.Qi.get(),this.layout.layoutId);this.WD.Nx("start");if(y5(this.Gt.get())){const Z=
zB(this.E6.get()),k=this.layout.clientMetadata.PD("metadata_type_video_length_seconds"),N=YQ(this.E6.get(),2,!1);prN(this.WD,this.x4.x5,Z,k,N,()=>void YaN(this,"teois"),N9(this.XS.get(),1).qW)}XvU(this.callback,this.slot,this.layout);
S6(this.Gt.get())&&(this.adCpn||wm("Media layout confirmed started, but ad CPN not set."),this.z7());Op(this.layout.clientMetadata,"metadata_type_survey_overlay")&&g7(this.Za.get(),"ads_ssmlra_sre",`lid.${this.layout.layoutId}`)}}C8(Z,k){if(this.x4){if(y5(this.Gt.get()))if(this.tI===null)wm("Unexpected media sub layout exited without a timeline playback ID");else{Z=this.layout.clientMetadata.PD("metadata_type_video_length_seconds");const N=Zh(this.E6.get(),this.tI);e6(this.Gt.get())&&this.adCpn===
void 0&&wm("Expected ad CPN in SSDAI macro data",this.slot,this.layout,{contentCpn:this.layout.clientMetadata.PD("metadata_type_content_cpn")});Q3j(this.WD,N,this.adCpn);$7(this.WD,null,this.x4.x5,Z,N,N9(this.XS.get(),1).qW,a=>void Zb0(this,a,"fue"),e6(this.Gt.get()),S6(this.Gt.get()));
nd(this.Gt.get())&&this.cF(N,!0)}this.x4=null;V7G(this.callback,this.slot,this.layout,this.V&&this.Gt.get().S.X().B("dai_layout_log_skip_exit_reason")?"skipped":k)}else wm("Expected the layout to be entered before stop rendering",this.slot,this.layout)}onCueRangeEnter(Z){if(Z!==this.fn)wm("Received CueRangeEnter signal for unknown layout.",this.zM(),this.zZ(),{cueRangeId:Z});else if(this.adCpn===void 0&&wm("Expected ad CPN in SSDAI macro data",this.slot,this.layout,{contentCpn:this.layout.clientMetadata.PD("metadata_type_content_cpn")}),
bX(this.WD,"impression")&&y5(this.Gt.get()))if(this.tI===null)wm("Unexpected cue range enter without a timeline playback ID");else{const k=Zh(this.E6.get(),this.tI);g7(this.Za.get(),"ads_ccre",`cpn.${this.layout.clientMetadata.PD("metadata_type_content_cpn")};acpn.${N9(this.XS.get(),2)?.clientPlaybackNonce};cr.${Z};cts.${k}`);this.JW.get().removeCueRange(this.fn);this.fn=void 0;nd(this.Gt.get())&&this.cF(k,!0);this.WD.Nx("complete")}}onCueRangeExit(){}z$(){}FW(){}XE(Z){if(this.x4){if(bX(this.WD,"impression")){const k=
zB(this.E6.get()),N=this.layout.clientMetadata.PD("metadata_type_video_length_seconds");x7(this.WD,k,Z,this.x4.x5,N,a=>void Zb0(this,a,"tpaqe"));
nd(this.Gt.get())&&this.cF(Z)}this.x4.x5=Z}}cF(Z,k=!1){this.x4&&R7(this.U,Z*1E3,k)}yV(Z){if(this.x4){y5(this.Gt.get())||this.x4.Fn||(this.x4.Fn=!0,Z=new g.d7(Z.state,new g.QR));var k=this.layout.clientMetadata.PD("metadata_type_video_length_seconds"),N=YQ(this.E6.get(),2,!1);w7(this.WD,this.x4.x5,Z,k,N,N9(this.XS.get(),1).qW,!y5(this.Gt.get()),()=>void YaN(this,"teosc"))}}onFullscreenToggled(Z){RoG(this.WD,Z)}D1(){}Pi(){}Bi(){}Rs(Z,k){Z=this.Za.get();
var N=bX(this.WD,"impression"),a=bX(this.WD,"skip");var T=!!this.WD.D.get("skip")?.length;g7(Z,"ads_dsr",`ti.${N};ts.${a};hp.${T};cpn.${this.layout.clientMetadata.PD("metadata_type_content_cpn")};acpn.${N9(this.XS.get(),2)?.clientPlaybackNonce};sl.${k.clientMetadata.PD("metadata_type_linked_player_bytes_layout_id")===this.layout.layoutId}`);bX(this.WD,"impression")&&this.WD.Nx("skip");k=N9(this.XS.get(),1).qW;this.V=!0;this.wD.get().BV(k)||(this.V=!1,wm("Unexpected failure to skip a server stitched ad",
this.slot,this.layout))}onVolumeChange(){}l0(){}eI(){}k7(){}HN(){}Fg(){MOR(this.WD)}A7(){nAf(this.WD)}W8(){I2y(this.WD)}N9(){jWG(this.WD)}m8(){EAy(this.WD)}IT(){WSy(this.WD)}Rb(){}Zc(){}z7(){this.fn||(this.fn=`${"adcompletioncuerange"}:${this.zZ().layoutId}`,this.JW.get().addCueRange(this.fn,0x7ffffffffffff,0x8000000000000,!1,this,2,2,this.adCpn),g7(this.Za.get(),"ads_ccr",`acpn.${N9(this.XS.get(),2)?.clientPlaybackNonce};cr.${this.fn}`))}};var xHU=class extends gry{constructor(Z,k,N,a,T,K,y,Q,q,r,C,m,A,P){super(Z,k,N,a,T,y,Q,q,r,m);this.iy=K;this.ub=C;this.Qi=A;this.Gt=P;this.tI=this.x4=null}Go(){this.layout.clientMetadata.PD("metadata_type_player_bytes_callback_ref").current=this;const Z=this.layout.clientMetadata.PD("metadata_type_layout_enter_ms"),k=this.layout.clientMetadata.PD("metadata_type_layout_exit_ms");this.tI=Udy(this.slot,this.layout,this.layout.clientMetadata.PD("metadata_type_player_vars"),Z,k,this.layout.clientMetadata.PD("metadata_type_video_length_seconds")*
1E3,this.wD.get(),this.iy.get(),()=>({layoutType:"LAYOUT_TYPE_MEDIA",enterMs:Z,exitMs:k,adPlacementConfig:this.layout.clientMetadata.PD("metadata_type_ad_placement_config")}),this.Za.get());
const N=this.layout.clientMetadata.PD("metadata_type_video_length_seconds"),a=this.layout.clientMetadata.PD("metadata_type_active_view_traffic_type");$B(this.layout.d5)&&Ut(this.Qi.get(),this.layout.layoutId,{Ol:a,Jk:N,listener:this})}JA(){$B(this.layout.d5)&&bL(this.Qi.get(),this.layout.layoutId)}bD(){if(this.x4)wm("Expected the layout not to be entered before start rendering",this.slot,this.layout);else if(this.x4={x5:null,Fn:!1},b0f(this.slot,this.layout,this.ub.get()),this.WD.Nx("start"),y5(this.Gt.get())){const Z=
zB(this.E6.get()),k=this.layout.clientMetadata.PD("metadata_type_video_length_seconds"),N=YQ(this.E6.get(),2,!1);prN(this.WD,this.x4.x5,Z,k,N,()=>void k_y(this,"teois"),!1)}}G(){if(this.x4){if(y5(this.Gt.get()))if(this.tI===null)wm("Unexpected single media layout exited without a timeline playback ID");
else{const Z=this.layout.clientMetadata.PD("metadata_type_video_length_seconds"),k=Zh(this.E6.get(),this.tI);Q3j(this.WD,k);$7(this.WD,null,this.x4.x5,Z,k,!1,N=>void Nuy(this,N,"fue"))}this.x4=null}else wm("Expected the layout to be entered before stop rendering",this.slot,this.layout)}L(Z){if(this.x4){if(bX(this.WD,"impression")){const k=zB(this.E6.get()),N=this.layout.clientMetadata.PD("metadata_type_video_length_seconds");
x7(this.WD,k,Z,this.x4.x5,N,a=>void Nuy(this,a,"tpaqe"))}this.x4.x5=Z}}yV(Z){if(this.x4){y5(this.Gt.get())||this.x4.Fn||(this.x4.Fn=!0,Z=new g.d7(Z.state,new g.QR));
var k=this.layout.clientMetadata.PD("metadata_type_video_length_seconds"),N=YQ(this.E6.get(),2,!1);w7(this.WD,this.x4.x5,Z,k,N,!1,!y5(this.Gt.get()),()=>void k_y(this,"teosc"))}}onFullscreenToggled(Z){RoG(this.WD,Z)}Fg(){MOR(this.WD)}A7(){nAf(this.WD)}W8(){I2y(this.WD)}N9(){jWG(this.WD)}m8(){EAy(this.WD)}IT(){WSy(this.WD)}};var G9r=class{constructor(Z,k,N,a,T,K,y,Q,q,r,C,m,A,P,d,h,B,v,O,x,e){this.GM=Z;this.Ra=k;this.Jh=N;this.XS=a;this.wD=T;this.E6=K;this.dn=y;this.Za=Q;this.iy=q;this.a4=r;this.Qi=C;this.ub=m;this.s3=A;this.JW=P;this.Zf=d;this.fC=h;this.tp=B;this.Rx=v;this.Gt=O;this.V=x;this.context=e}build(Z,k,N,a){if(Op(N.clientMetadata,"metadata_type_dai")){var T=a.clientMetadata.PD("metadata_type_ad_placement_config");MD(a,{Eb:"metadata_type_video_length_seconds metadata_type_player_vars metadata_type_layout_enter_ms metadata_type_layout_exit_ms metadata_type_player_bytes_callback_ref metadata_type_content_cpn".split(" "),
x8:["LAYOUT_TYPE_MEDIA"]})&&T!==void 0?(T=new zZ(a.d5,this.Za,T,a.layoutId,null),T=new xHU(Z,N,a,this.XS,this.wD,this.iy,this.a4,this.E6,T,this.Za,this.ub,this.V,this.Qi,this.Gt)):T=null;if(T)return T;a:{var K=a.C5??a.clientMetadata.PD("metadata_type_sub_layouts");const y=a.clientMetadata.PD("metadata_type_ad_placement_config");if(MD(a,{Eb:["metadata_type_layout_enter_ms","metadata_type_drift_recovery_ms","metadata_type_layout_exit_ms"],x8:["LAYOUT_TYPE_COMPOSITE_PLAYER_BYTES"]})&&K!==void 0&&y!==
void 0){T=[];for(const Q of K){K=Q.clientMetadata.PD("metadata_type_media_sub_layout_index");if(!MD(Q,{Eb:"metadata_type_video_length_seconds metadata_type_player_vars metadata_type_layout_enter_ms metadata_type_layout_exit_ms metadata_type_player_bytes_callback_ref metadata_type_content_cpn".split(" "),x8:["LAYOUT_TYPE_MEDIA"]})||K===void 0){Z=null;break a}K=new zZ(Q.d5,this.Za,y,Q.layoutId,K);T.push(new $Hi(k,N,Q,this.wD,K,this.E6,this.iy,this.Qi,this.ub,this.Gt,this.Za,this.XS,this.JW,this.tp))}k=
new zZ(a.d5,this.Za,y,a.layoutId);Z=new w_U(Z,N,a,this.XS,this.wD,this.a4,this.E6,k,this.Za,this.V,T)}else Z=null}if(Z)return Z}else if(Z=SaU(Z,k,N,a,this.GM,this.Ra,this.Jh,this.Za,this.Qi,this.ub,this.s3,this.XS,this.E6,this.dn,this.JW,this.Zf,this.fC,this.tp,this.Rx,this.Gt,this.wD,this.context))return Z;throw new ND(`Unsupported layout with type: ${a.layoutType} and client metadata: ${iD(a.clientMetadata)} in `+"PlayerBytesLayoutRenderingAdapterFactory.");}};var l7=class{constructor(Z,k,N,a,T,K,y,Q,q,r,C,m,A,P,d,h,B,v){this.GM=Z;this.Ra=k;this.Jh=N;this.Za=a;this.Qi=T;this.ub=K;this.s3=y;this.XS=Q;this.E6=q;this.dn=r;this.JW=C;this.Zf=m;this.fC=A;this.tp=P;this.Rx=d;this.Gt=h;this.wD=B;this.context=v}build(Z,k,N,a){if(Z=SaU(Z,k,N,a,this.GM,this.Ra,this.Jh,this.Za,this.Qi,this.ub,this.s3,this.XS,this.E6,this.dn,this.JW,this.Zf,this.fC,this.tp,this.Rx,this.Gt,this.wD,this.context))return Z;throw new ND(`Unsupported layout with type: ${a.layoutType} and client metadata: ${iD(a.clientMetadata)} in `+
"PlayerBytesVodOnlyLayoutRenderingAdapterFactory.");}};var SxR=class extends oB{constructor(Z,k,N,a){super("survey-interstitial",Z,k,N,a)}};var eqj=class extends ch{constructor(Z,k,N,a,T){super(N,Z,k,a);this.Za=T;Z=k.clientMetadata.PD("metadata_type_ad_placement_config");this.WD=new zZ(k.d5,T,Z,k.layoutId)}startRendering(Z){const k=vM(this.WD),N={adsClientData:this.layout.KF};this.V.push(new SxR(this.layout.clientMetadata.PD("metadata_type_valid_survey_text_interstitial_renderer"),k,this.zZ().layoutId,N));super.startRendering(Z);this.callback.l0(this.slot,Z)}Os(Z,k){k!==this.layout.layoutId||Z!=="survey-interstitial"&&Z!=="button"||((Z=
this.layout.clientMetadata.PD("metadata_type_player_bytes_layout_controls_callback_ref").current)?Z.Rs(this.slot,this.layout):wm("Tried to skip SurveyInterstitial but PlayerBytes callback is null"))}YW(){super.YW()}};var ox=new g.i0(320,63);var orX=class extends oB{constructor(Z,k,N,a){super("invideo-overlay",Z,k,N,a);this.interactionLoggingClientData=a}};var J9f=class extends ch{constructor(Z,k,N,a,T,K,y,Q,q,r,C){super(T,Z,k,a);this.Za=N;this.Y=K;this.E6=y;this.tp=Q;this.Gt=q;this.G=r;this.L=C;this.WD=aAr(k,N)}XE(){}yV(){}onFullscreenToggled(){}D1(Z){Z&&P7(this.Y,this.layout)}Pi(){}Bi(Z){const k=U0(this.layout);if(this.j=Jk(Z,pSG(this.E6.get())))k.onErrorCommand&&this.tp.get().executeCommand(k.onErrorCommand,this.layout.layoutId),P7(this.Y,this.layout)}onVolumeChange(){}kA(){return this.zZ().layoutId}B_(){return this.j}Os(Z){this.L.Os(Z);Z==="in_video_overlay_close_button"&&
P7(this.Y,this.layout)}gS(Z){Z==="invideo-overlay"&&P7(this.Y,this.layout)}tb(){this.L.tb()}startRendering(Z){super.startRendering(Z);this.callback.l0(this.slot,Z);this.G.y5=this}C8(Z,k){super.C8(Z,k);Lp(this.G,this)}init(){super.init();Mx(this.Za.get(),this);this.E6.get().addListener(this);this.V.push(new orX(U0(this.layout),vM(this.WD),this.layout.layoutId,{adsClientData:this.layout.KF}))}release(){super.release();this.E6.get().removeListener(this);nX(this.Za.get(),this)}Rb(){}Zc(){}};var zqr=class extends ch{constructor(Z,k,N,a,T,K,y,Q,q,r,C,m){super(T,Z,k,a);this.Za=N;this.Y=K;this.C=y;this.E6=Q;this.tp=q;this.Gt=r;this.G=C;this.L=m;this.WD=aAr(k,N)}init(){super.init();Mx(this.Za.get(),this);this.E6.get().addListener(this);this.V.push(new orX(U0(this.layout),vM(this.WD),this.layout.layoutId,{adsClientData:this.layout.KF}))}tb(){this.L.tb()}startRendering(Z){super.startRendering(Z);this.callback.l0(this.slot,Z);this.G.y5=this}C8(Z,k){super.C8(Z,k);Lp(this.G,this)}Os(Z){this.L.Os(Z);
Z==="in_video_overlay_close_button"&&P7(this.Y,this.layout)}zn(Z){if(Z==="invideo-overlay"){Z=$60(this.C,this.layout);for(const k of Z)k.stop()}}gS(Z){Z==="invideo-overlay"&&P7(this.Y,this.layout)}pL(Z){if(Z==="invideo-overlay"){Z=$60(this.C,this.layout);for(const k of Z)k.start()}}XE(){}yV(){}onFullscreenToggled(){}D1(Z){Z&&P7(this.Y,this.layout)}Pi(){}Bi(Z){const k=U0(this.layout),N=k.contentSupportedRenderer.imageOverlayAdContentRenderer;if(this.j=Jk(Z,pSG(this.E6.get()),yPf(N.image)))k.onErrorCommand&&
this.tp.get().executeCommand(k.onErrorCommand,this.layout.layoutId),P7(this.Y,this.layout)}onVolumeChange(){}kA(){return this.zZ().layoutId}B_(){return this.j}release(){super.release();this.E6.get().removeListener(this);nX(this.Za.get(),this)}Rb(){}Zc(){}};var fy=class{constructor(Z){this.E6=Z;this.V=!1}Os(Z){Z==="ad-info-hover-text-button"&&((this.V=this.E6.get().Uh(1))||this.E6.get().pauseVideo())}tb(){this.V||this.E6.get().resumeVideo(1)}};var UHU=class extends oB{constructor(Z,k,N){super("survey",Z,{},k,N)}};var bFf=class extends ch{constructor(Z,k,N,a,T,K,y){super(N,Z,k,a);this.Y=T;this.E6=K;this.Gt=y}init(){super.init();this.E6.get().addListener(this)}startRendering(Z){const k=this.layout.clientMetadata.PD("METADATA_TYPE_VALID_INSTREAM_SURVEY_AD_RENDERER_FOR_VOD");this.V.push(new UHU(k,this.layout.layoutId,{adsClientData:this.layout.KF}));super.startRendering(Z);this.callback.l0(this.slot,Z)}l0(){}Os(Z,k){k!==this.layout.layoutId||Z!=="ad-info-icon-button"&&Z!=="ad-info-dialog-close-button"||((k=this.layout.clientMetadata.PD("metadata_type_player_bytes_layout_controls_callback_ref").current)?
Z==="ad-info-icon-button"?k.k7(this.slot,this.layout):Z==="ad-info-dialog-close-button"&&k.HN(this.slot,this.layout):wm("Tried to use LayoutControlsCallback on Survey but it is null",this.slot,this.layout,{ComponentType:Z}))}Bi(Z){Z.width<450&&P7(this.Y,this.layout)}onVolumeChange(){}XE(){}onFullscreenToggled(){}D1(){}Pi(){}yV(){}Rb(){}Zc(){}YW(){super.YW()}release(){super.release();this.E6.get().removeListener(this)}};var p_X=class{constructor(Z,k,N,a,T,K,y,Q,q,r){this.Le=Z;this.E6=k;this.Za=N;this.Y=a;this.Qi=T;this.U=K;this.D=y;this.tp=Q;this.Gt=q;this.V=r}build(Z,k,N,a){if(k=YB(Z,N,a,this.Le,this.E6,this.Za,this.Y,this.V,this.Gt))return k;if(MD(a,Kmj()))return new zqr(N,a,this.Za,this.Le,Z,this.U,this.D,this.E6,this.tp,this.Gt,this.V,new fy(this.E6));if(MD(a,Tuj()))return new J9f(N,a,this.Za,this.Le,Z,this.U,this.E6,this.tp,this.Gt,this.V,new fy(this.E6));if(MD(a,{Eb:["METADATA_TYPE_VALID_INSTREAM_SURVEY_AD_RENDERER_FOR_VOD"],
x8:["LAYOUT_TYPE_SURVEY"]}))return new bFf(N,a,Z,this.Le,this.U,this.E6,this.Gt);if(MD(a,{Eb:["metadata_type_player_bytes_layout_controls_callback_ref","metadata_type_valid_survey_text_interstitial_renderer","metadata_type_ad_placement_config"],x8:["LAYOUT_TYPE_VIDEO_INTERSTITIAL_BUTTONED_LEFT"]}))return new eqj(N,a,Z,this.Le,this.Za);if(MD(a,hpG()))return new B3f(N,a,Z,this.Le,this.E6,this.Gt);throw new ND(`Unsupported layout with type: ${a.layoutType} and client metadata: ${iD(a.clientMetadata)} in `+
"WebDesktopMainInPlayerLayoutRenderingAdapterFactory.");}};var Rqb=class{constructor(Z,k,N,a,T,K,y,Q,q,r){this.Le=Z;this.E6=k;this.Za=N;this.Y=a;this.Qi=T;this.U=K;this.D=y;this.tp=Q;this.Gt=q;this.V=r}build(Z,k,N,a){if(k=YB(Z,N,a,this.Le,this.E6,this.Za,this.Y,this.V,this.Gt))return k;if(MD(a,Kmj()))return new zqr(N,a,this.Za,this.Le,Z,this.U,this.D,this.E6,this.tp,this.Gt,this.V,new fy(this.E6));if(MD(a,Tuj()))return new J9f(N,a,this.Za,this.Le,Z,this.U,this.E6,this.tp,this.Gt,this.V,new fy(this.E6));throw new ND(`Unsupported layout with type: ${a.layoutType} and client metadata: ${iD(a.clientMetadata)} in `+
"WebEmbeddedInPlayerLayoutRenderingAdapterFactory.");}};var MkU=class extends u1X{constructor(Z,k,N,a,T,K,y,Q,q,r){super(Z,k,N,a,T,K,y,q);this.iN=Q;this.XS=r}startRendering(Z){super.startRendering(Z);if(Z.renderingContent?VXb(Z,N9(this.XS.get(),2)||void 0):this.layout.clientMetadata.PD("metadata_ad_video_is_listed")){const k=Z.renderingContent?LKN(Z,N9(this.XS.get(),2)||void 0):this.layout.clientMetadata.PD("metadata_type_ad_info_ad_metadata");Z=this.iN.get();g.A7(Z.S,"onAdMetadataAvailable",k)}}};var nry=class{constructor(Z,k,N,a,T,K,y){this.Le=Z;this.E6=k;this.Za=N;this.U=a;this.iN=T;this.V=K;this.XS=y}build(Z,k,N,a){if(MD(a,Qib())||a.layoutType==="LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY"&&g.J(a.renderingContent,I7)!==void 0)return new MkU(Z,N,a,this.Le,this.E6,this.Za,this.U,this.iN,this.V,this.XS);throw new ND(`Unsupported layout with type: ${a.layoutType} and client metadata: ${iD(a.clientMetadata)} in `+"WebRemixInPlayerLayoutRenderingAdapterFactory.");}};var IKb=class{constructor(Z,k,N,a,T,K,y,Q){this.Le=Z;this.E6=k;this.Za=N;this.U=a;this.iN=T;this.V=K;this.Gt=y;this.XS=Q}build(Z,k,N,a){if(MD(a,Qib()))return new MkU(Z,N,a,this.Le,this.E6,this.Za,this.U,this.iN,this.V,this.XS);if(Z=YB(Z,N,a,this.Le,this.E6,this.Za,this.U,this.V,this.Gt))return Z;throw new ND(`Unsupported layout with type: ${a.layoutType} and client metadata: ${iD(a.clientMetadata)} in `+"WebUnpluggedInPlayerLayoutRenderingAdapterFactory.");}};var TV=class{constructor(Z,k){this.adPodIndex=Z;this.V=k.length;this.adBreakLengthSeconds=k.reduce((a,T)=>a+T,0);
let N=0;for(Z+=1;Z<k.length;Z++)N+=k[Z];this.adBreakRemainingLengthSeconds=N}};var lb=class{constructor(Z,k,N){this.Or=k;this.triggerType="TRIGGER_TYPE_BEFORE_CONTENT_VIDEO_ID_STARTED";this.triggerId=N||Z(this.triggerType)}};var wE=class{constructor(Z,k,N){this.V=k;this.triggerType="TRIGGER_TYPE_CLOSE_REQUESTED";this.triggerId=N||Z(this.triggerType)}};var x8=class{constructor(Z,k,N,a){this.Or=k;this.visible=N;this.triggerType="TRIGGER_TYPE_CONTENT_VIDEO_ID_ENDED";this.triggerId=a||Z(this.triggerType)}};var N6r=class{constructor(Z){this.triggerType="TRIGGER_TYPE_CUE_BREAK_IDENTIFIED";this.triggerId=Z(this.triggerType)}};var o6r=class{constructor(Z){this.triggerType="TRIGGER_TYPE_DURATION_AFTER_MEDIA_PAUSED";this.triggerId=Z(this.triggerType)}};var F$=class{constructor(Z,k,N){this.triggeringLayoutId=k;this.slotId=N;this.triggerType="TRIGGER_TYPE_LAYOUT_ID_ACTIVE_AND_SLOT_ID_HAS_EXITED";this.triggerId=Z(this.triggerType)}};var Gk=class{constructor(Z,k,N){this.triggeringLayoutId=k;this.triggerType="TRIGGER_TYPE_LAYOUT_ID_ENTERED";this.triggerId=N||Z(this.triggerType)}};var DN=class{constructor(Z,k,N,a){this.triggeringLayoutId=k;this.V=N;this.triggerType="TRIGGER_TYPE_LAYOUT_EXITED_FOR_REASON";this.triggerId=a||Z(this.triggerType)}};var BU=class{constructor(Z,k,N){this.triggeringLayoutId=k;this.triggerType="TRIGGER_TYPE_LAYOUT_ID_EXITED";this.triggerId=N||Z(this.triggerType)}};var Jf=class{constructor(Z,k){this.triggerType="TRIGGER_TYPE_LIVE_STREAM_BREAK_ENDED";this.triggerId=k||Z(this.triggerType)}};var zk=class{constructor(Z,k){this.breakDurationMs=Z;this.triggerType="TRIGGER_TYPE_LIVE_STREAM_BREAK_SCHEDULED_DURATION_MATCHED";this.triggerId=k||""}};var UO=class{constructor(Z,k){this.breakDurationMs=Z;this.triggerType="TRIGGER_TYPE_LIVE_STREAM_BREAK_SCHEDULED_DURATION_NOT_MATCHED";this.triggerId=k||""}};var op=class{constructor(Z,k){this.triggerType="TRIGGER_TYPE_LIVE_STREAM_BREAK_STARTED";this.triggerId=k||Z(this.triggerType)}};var zZf=class{constructor(Z){this.triggerId=Z;this.triggerType="TRIGGER_TYPE_MEDIA_RESUMED"}};var KoN=class{constructor(Z,k,N,a,T){this.Or=k;this.V=N;this.visible=a;this.layoutId=T;this.triggerType="TRIGGER_TYPE_MEDIA_TIME_RANGE_ALLOW_REACTIVATION_ON_USER_CANCELLED";this.triggerId=Z(this.triggerType)}};var $8=class{constructor(Z,k,N,a,T){this.Or=k;this.V=N;this.visible=a;this.triggerType="TRIGGER_TYPE_MEDIA_TIME_RANGE";this.triggerId=T||Z(this.triggerType)}};var bb=class{constructor(Z,k){this.breakDurationMs=Z;this.triggerType="TRIGGER_TYPE_NEW_SLOT_SCHEDULED_WITH_BREAK_DURATION";this.triggerId=k||""}};var kir=class{constructor(Z,k,N){this.Or=k;this.V=N;this.triggerType="TRIGGER_TYPE_NOT_IN_MEDIA_TIME_RANGE";this.triggerId=Z(this.triggerType)}};var eS=class{constructor(Z,k,N,a,T){this.V=k;this.slotType=N;this.layoutType=a;this.triggerType="TRIGGER_TYPE_ON_DIFFERENT_LAYOUT_ID_ENTERED";this.triggerId=T||Z(this.triggerType)}};var Lw=class{constructor(Z,k){this.V=k;this.slotType="SLOT_TYPE_IN_PLAYER";this.triggerType="TRIGGER_TYPE_ON_DIFFERENT_SLOT_ID_ENTER_REQUESTED";this.triggerId=Z(this.triggerType)}};var OO=class{constructor(Z,k,N){this.layoutId=k;this.triggerType="TRIGGER_TYPE_ON_LAYOUT_SELF_EXIT_REQUESTED";this.triggerId=N||Z(this.triggerType)}};var hf=class{constructor(Z,k,N){this.V=k;this.triggerType="TRIGGER_TYPE_ON_NEW_PLAYBACK_AFTER_CONTENT_VIDEO_ID";this.triggerId=N||Z(this.triggerType)}};var Gyi=class{constructor(Z,k){this.opportunityType="OPPORTUNITY_TYPE_AD_BREAK_SERVICE_RESPONSE_RECEIVED";this.associatedSlotId=k;this.triggerType="TRIGGER_TYPE_ON_OPPORTUNITY_TYPE_RECEIVED";this.triggerId=Z(this.triggerType)}};var G50=class{constructor(Z,k){this.V=Z;this.index=k}};var qvy=class{constructor(Z){this.triggerType="TRIGGER_TYPE_PLAYBACK_MINIMIZED";this.triggerId=Z(this.triggerType)}};var pq=class{constructor(Z,k){this.triggerType="TRIGGER_TYPE_PREFETCH_CACHE_EXPIRED";this.triggerId=k||Z(this.triggerType)}};var Esy=class{constructor(Z,k,N){this.layoutId=k;this.offsetMs=N;this.triggerType="TRIGGER_TYPE_PROGRESS_PAST_MEDIA_TIME_WITH_OFFSET_RELATIVE_TO_LAYOUT_ENTER";this.triggerId=Z(this.triggerType)}};var YXU=class{constructor(Z,k){this.layoutId=k;this.triggerType="TRIGGER_TYPE_SEEK_BACKWARD_BEFORE_LAYOUT_ENTER_TIME";this.triggerId=Z(this.triggerType)}};var WY0=class{constructor(Z,k,N){this.layoutId=k;this.offsetMs=N;this.triggerType="TRIGGER_TYPE_SEEK_FORWARD_PAST_MEDIA_TIME_WITH_OFFSET_RELATIVE_TO_LAYOUT_ENTER";this.triggerId=Z(this.triggerType)}};var vU=class{constructor(Z,k,N){this.triggeringLayoutId=k;this.triggerType="TRIGGER_TYPE_SKIP_REQUESTED";this.triggerId=N||Z(this.triggerType)}};var ib=class{constructor(Z,k,N){this.triggeringSlotId=k;this.triggerType="TRIGGER_TYPE_SLOT_ID_ENTERED";this.triggerId=N||Z(this.triggerType)}clone(Z){return new ib(()=>this.triggerId,Z)}};var ub=class{constructor(Z,k,N){this.triggeringSlotId=k;this.triggerType="TRIGGER_TYPE_SLOT_ID_EXITED";this.triggerId=N||Z(this.triggerType)}clone(Z){return new ub(()=>this.triggerId,Z)}};var l_=class{constructor(Z,k){this.triggeringSlotId=k;this.triggerType="TRIGGER_TYPE_SLOT_ID_FULFILLED_EMPTY";this.triggerId=Z(this.triggerType)}clone(Z){return new l_(()=>this.triggerId,Z)}};var u_=class{constructor(Z,k){this.triggeringSlotId=k;this.triggerType="TRIGGER_TYPE_SLOT_ID_FULFILLED_NON_EMPTY";this.triggerId=Z(this.triggerType)}clone(Z){return new u_(()=>this.triggerId,Z)}};var tf=class{constructor(Z,k,N){this.triggeringSlotId=k;this.triggerType="TRIGGER_TYPE_SLOT_ID_SCHEDULED";this.triggerId=N||Z(this.triggerType)}clone(Z){return new tf(()=>this.triggerId,Z)}};var to=class{constructor(Z,k){this.triggeringSlotId=k;this.triggerType="TRIGGER_TYPE_SLOT_ID_UNSCHEDULED";this.triggerId=Z(this.triggerType)}clone(Z){return new to(()=>this.triggerId,Z)}};var gE=class{constructor(Z,k,N){this.triggeringLayoutId=k;this.triggerType="TRIGGER_TYPE_SURVEY_SUBMITTED";this.triggerId=N||Z(this.triggerType)}};var SS=class{constructor(Z,k,N,a){this.durationMs=k;this.triggeringLayoutId=N;this.triggerType="TRIGGER_TYPE_TIME_RELATIVE_TO_LAYOUT_ENTER";this.triggerId=a||Z(this.triggerType)}};var c7=class{constructor(Z,k,N,a){this.category=Z;this.trigger=k;this.slot=N;this.layout=a}};var Bh=class extends g.jR{constructor(Z,k,N,a,T,K,y){super();this.Gt=Z;this.V=k;this.U=N;this.XS=a;this.Y=T;this.D=K;this.s3=y}};var i2={layoutExitMuteTriggers:[],layoutExitNormalTriggers:[],layoutExitSkipTriggers:[],layoutExitUserCancelledTriggers:[],layoutExitUserInputSubmittedTriggers:[]};var DB={ql:1,OM:2,g$:3,1:"LOAD_POLICY_ALWAYS",2:"LOAD_POLICY_BY_PREFERENCE",3:"LOAD_POLICY_BY_REQUEST"};var Ok=class{constructor(Z,k,N,a,T,K,y,Q,q,r=1){this.Y=Z;this.U=k;this.V=N;this.Gt=a;this.k8=T;this.D=K;this.E6=y;this.Bd=Q;this.r_=q;this.loadPolicy=r}};var vh=class extends g.jR{constructor(Z,k,N,a,T,K,y,Q){super();this.U=Z;this.D=k;this.a4=a;this.E6=T;this.Gt=K;this.Za=y;this.wD=Q;this.V=null;N.get().addListener(this);this.addOnDisposeCallback(()=>{N.jm()||N.get().removeListener(this)});
a.get().addListener(this);this.addOnDisposeCallback(()=>{a.jm()||a.get().removeListener(this)})}Qe(Z){if(this.V)wm("Unexpected multiple fetch instructions for the current content");
else{this.V=Z;for(const k of this.a4.get().kO)rz(this,this.V,k)}}nJ(Z){if(!this.V)return this.Gt.get().S.X().B("high_ccv_client_side_caching_h5")||this.wD?.get().vl(Z.identifier),g7(this.Za.get(),"ads_nfi",`a.cpoa;cid.${Z.identifier}`),!1;rz(this,this.V,Z);return!0}cn(){}mL(Z){this.V&&this.V.contentCpn!==Z&&(wm("Fetch instructions carried over from previous content video",void 0,void 0,{contentCpn:Z,fetchInstructionsCpn:this.V.contentCpn}),this.V=null)}Sw(Z){this.V&&this.V.contentCpn!==Z&&wm("Expected content video of the current fetch instructions to end",
void 0,void 0,{contentCpn:Z,fetchInstructionsCpn:this.V.contentCpn},!0);this.V=null}YW(){super.YW();this.V=null}};var joy=["metadata_type_content_cpn","metadata_type_player_bytes_callback_ref","metadata_type_instream_ad_player_overlay_renderer","metadata_type_ad_placement_config"],Ery=["metadata_type_content_cpn","metadata_type_player_bytes_callback_ref","metadata_type_player_overlay_layout_renderer","metadata_type_ad_placement_config"];var i7=class extends g.jR{constructor(Z,k,N,a,T,K,y,Q){super();this.Y=Z;this.G=joy;this.L=k;this.D=N;this.V=a;this.U=T;this.k8=K;this.Gt=y;this.XS=Q;this.DQ=!0}l0(Z,k){if(k.layoutType==="LAYOUT_TYPE_MEDIA"&&(v0(k,this.G)||v0(k,Ery))){var N=N9(this.XS.get(),2),a=this.Y(k,N||void 0);a?fA(this.D.get(),"OPPORTUNITY_TYPE_PLAYER_BYTES_MEDIA_LAYOUT_ENTERED",()=>{const T=[iEy(this.V.get(),a.contentCpn,a.OR,K=>this.L(K.slotId,"core",a,GT(this.k8.get(),K)),a.inPlayerSlotId)];
a.instreamAdPlayerUnderlayRenderer&&hC(this.Gt.get())&&T.push(tWr(this,a,a.instreamAdPlayerUnderlayRenderer));return T}):wm("Expected MediaLayout to carry valid opportunity on entered",Z,k)}}sP(){}wQ(){}MR(){}X8(){}cq(){}sQ(){}IJ(){}JQ(){}VT(){}Xi(){}eI(){}};var wa=class extends g.jR{constructor(Z,k,N,a,T,K,y){super();this.U=Z;this.V=k;this.D=N;this.Y=a;this.XS=T;this.E6=K;this.Zf=y}mL(Z,k,N,a,T,K,y){const Q=N9(this.XS.get(),1);Q.Z9?this.E6.get().Z8():(czf(this.Zf.get(),a),fA(this.U.get(),"OPPORTUNITY_TYPE_PLAYER_RESPONSE_RECEIVED",()=>Vy(this.V.get(),a,T,K,Z,k,y,Q,"")),Zpi(this.D))}Sw(){}};var xt=class extends g.jR{constructor(Z){super();this.V=Z}};var Gu=class extends g.jR{constructor(Z,k,N,a,T){super();this.U=Z;this.D=k;this.JW=N;this.context=T;this.V=new Map;a.get().addListener(this);this.addOnDisposeCallback(()=>{a.jm()||a.get().removeListener(this)})}onCueRangeEnter(){}onCueRangeExit(Z){const k=this.V.get(Z);
k&&(this.V.delete(Z),this.JW.get().removeCueRange(Z),fA(this.U.get(),"OPPORTUNITY_TYPE_THROTTLED_AD_BREAK_REQUEST_SLOT_REENTRY",()=>{var N=this.D.get();N=BM(N.U.get(),"SLOT_TYPE_AD_BREAK_REQUEST");if(k.slotEntryTrigger){var a=k.slotId;var T=k.slotEntryTrigger;a=T.triggeringSlotId!=null&&T.triggeringSlotId===a?T.clone(N):T}else a=void 0;return[{...k,slotId:N,slotEntryTrigger:a,slotFulfillmentTriggers:aFf(k.slotId,N,k.slotFulfillmentTriggers),slotExpirationTriggers:aFf(k.slotId,N,k.slotExpirationTriggers)}]},
k.slotId))}mL(){for(const Z of this.V.keys())this.JW.get().removeCueRange(Z);
this.V.clear()}Sw(){}};var SE=class extends g.jR{constructor(){super(...arguments);this.DQ=!0;this.zk=new Map;this.V=new Map}sP(){}wQ(Z){g.c9(g.dO(),()=>{const k=this.V.get(Z);k&&wm("Expected layouts to be properly unscheduled",Z,void 0,{slotType:Z.slotType,layoutTypes:[...k].map(N=>N.layoutType)})},0)}MR(){}X8(){}cq(){}sQ(){}IJ(){}JQ(Z,k){this.V.has(Z)||this.V.set(Z,new Set);
this.V.get(Z).add(k)}VT(Z,k){this.zk.has(Z)&&this.zk.get(Z)===k&&wm("Unscheduled a Layout that is currently entered.",Z,k);if(this.V.has(Z)){var N=this.V.get(Z);N.has(k)?(N.delete(k),N.size===0&&this.V.delete(Z)):wm("Trying to unscheduled a Layout that was not scheduled.",Z,k)}else wm("Trying to unscheduled a Layout that was not scheduled.",Z,k)}l0(Z,k){this.zk.set(Z,k)}eI(Z){this.zk.delete(Z)}Xi(){}};var WOU=class{constructor(Z,k){this.callback=Z;this.slot=k}init(){}zM(){return this.slot}dS(){this.callback.MR(this.slot)}SJ(){this.callback.cq(this.slot)}release(){}};var eE=class{build(Z,k){return new WOU(Z,k)}};var YxX=class{constructor(Z,k,N){this.callback=Z;this.slot=k;this.E6=N}init(){}zM(){return this.slot}dS(){j6(this.E6.get(),"ad-showing");this.callback.MR(this.slot)}SJ(){this.callback.cq(this.slot);Et(this.E6.get(),"ad-showing")}release(){}};var Zo0=class{constructor(Z,k,N){this.callback=Z;this.slot=k;this.E6=N;this.U=!1;this.V=0}init(){}zM(){return this.slot}dS(){j6(this.E6.get(),"ad-showing");j6(this.E6.get(),"ad-interrupting");this.U=this.E6.get().isAtLiveHead();this.V=Math.ceil(Date.now()/1E3);this.callback.MR(this.slot)}SJ(){Et(this.E6.get(),"ad-showing");Et(this.E6.get(),"ad-interrupting");const Z=this.U?Infinity:YQ(this.E6.get(),1,!0)+Math.floor(Date.now()/1E3)-this.V;this.E6.get().S.seekTo(Z,void 0,void 0,1);this.callback.cq(this.slot)}release(){}};var ktN=class{constructor(Z,k,N){this.callback=Z;this.slot=k;this.E6=N}init(){}zM(){return this.slot}dS(){j6(this.E6.get(),"ad-showing");j6(this.E6.get(),"ad-interrupting");this.callback.MR(this.slot)}SJ(){this.E6.get().Z8();Et(this.E6.get(),"ad-showing");Et(this.E6.get(),"ad-interrupting");this.callback.cq(this.slot)}release(){this.E6.get().Z8()}};var om=class{constructor(Z){this.E6=Z}build(Z,k){if(gb(k,["metadata_type_dai"],"SLOT_TYPE_PLAYER_BYTES"))return new YxX(Z,k,this.E6);if(k.slotEntryTrigger instanceof $8&&gb(k,["metadata_type_served_from_live_infra"],"SLOT_TYPE_PLAYER_BYTES"))return new Zo0(Z,k,this.E6);if(gb(k,[],"SLOT_TYPE_PLAYER_BYTES"))return new ktN(Z,k,this.E6);throw new p(`Unsupported slot with type ${k.slotType} and client metadata: ${iD(k.clientMetadata)} in ${"PlayerBytesSlotAdapterFactory"}.`);}};var NZy=class extends g.jR{constructor(Z){super();this.Oz=Z;this.CF=new Map}};var Jt=class extends NZy{constructor(Z,k,N){super(Z);this.Gt=N;k.get().addListener(this);this.addOnDisposeCallback(()=>{k.jm()||k.get().removeListener(this)})}Os(Z,k){if(k)if(Z==="skip-button"){Z=[];
for(const N of this.CF.values()){const a=N.trigger;a instanceof vU&&N.category==="TRIGGER_CATEGORY_LAYOUT_EXIT_USER_SKIPPED"&&a.triggeringLayoutId===k&&Z.push(N)}Z.length&&IU(this.Oz(),Z)}else cM(this.Gt.get(),"supports_multi_step_on_desktop")?Z==="ad-action-submit-survey"&&Ao(this,k):Z==="survey-submit"?Ao(this,k):Z==="survey-single-select-answer-button"&&Ao(this,k)}oh(Z){const k=[];for(const N of this.CF.values()){const a=N.trigger;a instanceof vU&&N.category==="TRIGGER_CATEGORY_LAYOUT_EXIT_USER_MUTED"&&
a.triggeringLayoutId===Z&&k.push(N)}k.length?IU(this.Oz(),k):wm("Mute requested but no registered triggers can be activated.")}b7(Z,k,N,a){if(this.CF.has(k.triggerId))throw new p("Tried to register duplicate trigger for slot.");if(!(k instanceof gE||k instanceof vU))throw new p("Incorrect TriggerType: Tried to register trigger of type "+k.triggerType+" in AdUxUpdateTriggerAdapter.");this.CF.set(k.triggerId,new c7(Z,k,N,a))}Aa(Z){this.CF.delete(Z.triggerId)}zn(){}pL(){}gS(){}};var zu=class extends g.jR{constructor(Z){super();this.V=Z;this.DQ=!0;this.CF=new Map;this.L=new Set;this.D=new Set;this.Y=new Set;this.G=new Set;this.U=new Set}b7(Z,k,N,a){if(this.CF.has(k.triggerId))throw new p("Tried to register duplicate trigger for slot.");if(!(k instanceof ib||k instanceof ub||k instanceof l_||k instanceof u_||k instanceof tf||k instanceof to||k instanceof Lw||k instanceof Gk||k instanceof BU||k instanceof DN||k instanceof eS||k instanceof F$))throw new p("Incorrect TriggerType: Tried to register trigger of type "+
k.triggerType+" in AdsControlFlowEventTriggerAdapter");Z=new c7(Z,k,N,a);this.CF.set(k.triggerId,Z);k instanceof tf&&this.L.has(k.triggeringSlotId)&&IU(this.V(),[Z]);k instanceof ib&&this.D.has(k.triggeringSlotId)&&IU(this.V(),[Z]);k instanceof Gk&&this.U.has(k.triggeringLayoutId)&&IU(this.V(),[Z])}Aa(Z){this.CF.delete(Z.triggerId)}sP(Z){this.L.add(Z.slotId);const k=[];for(const N of this.CF.values())N.trigger instanceof tf&&Z.slotId===N.trigger.triggeringSlotId&&k.push(N);k.length>0&&IU(this.V(),
k)}wQ(Z){this.L.delete(Z.slotId);const k=[];for(const N of this.CF.values()){const a=N.trigger;a instanceof to&&a.triggeringSlotId===Z.slotId&&k.push(N)}k.length>0&&IU(this.V(),k)}X8(Z){const k=[];for(const N of this.CF.values()){const a=N.trigger;a instanceof Lw&&a.slotType===Z.slotType&&a.V!==Z.slotId&&k.push(N)}k.length>0&&IU(this.V(),k)}MR(Z){this.D.add(Z.slotId);const k=[];for(const N of this.CF.values())N.trigger instanceof ib&&Z.slotId===N.trigger.triggeringSlotId&&k.push(N);k.length>0&&IU(this.V(),
k)}cq(Z){this.D.delete(Z.slotId);this.Y.add(Z.slotId);const k=[];for(const N of this.CF.values())if(N.trigger instanceof ub)Z.slotId===N.trigger.triggeringSlotId&&k.push(N);else if(N.trigger instanceof F$){const a=N.trigger;Z.slotId===a.slotId&&this.U.has(a.triggeringLayoutId)&&k.push(N)}k.length>0&&IU(this.V(),k)}sQ(Z){const k=[];for(const N of this.CF.values())N.trigger instanceof l_&&Z.slotId===N.trigger.triggeringSlotId&&k.push(N);k.length>0&&IU(this.V(),k)}IJ(Z){const k=[];for(const N of this.CF.values())N.trigger instanceof
u_&&Z.slotId===N.trigger.triggeringSlotId&&k.push(N);k.length>0&&IU(this.V(),k)}JQ(Z,k){this.G.add(k.layoutId)}VT(Z,k){this.G.delete(k.layoutId)}l0(Z,k){this.U.add(k.layoutId);const N=[];for(const T of this.CF.values())if(T.trigger instanceof Gk)k.layoutId===T.trigger.triggeringLayoutId&&N.push(T);else if(T.trigger instanceof eS){var a=T.trigger;Z.slotType===a.slotType&&k.layoutType===a.layoutType&&k.layoutId!==a.V&&N.push(T)}else T.trigger instanceof F$&&(a=T.trigger,k.layoutId===a.triggeringLayoutId&&
this.Y.has(a.slotId)&&N.push(T));N.length>0&&IU(this.V(),N)}eI(Z,k,N){this.U.delete(k.layoutId);Z=[];for(const a of this.CF.values())if(a.trigger instanceof BU&&k.layoutId===a.trigger.triggeringLayoutId&&Z.push(a),a.trigger instanceof DN){const T=a.trigger;k.layoutId===T.triggeringLayoutId&&T.V.includes(N)&&Z.push(a)}Z.length>0&&IU(this.V(),Z)}Xi(){}mL(){this.Y.clear()}Sw(){}};var azy=class extends g.jR{constructor(Z){super();this.V=Z;this.CF=new Map}b7(Z,k,N,a){if(this.CF.has(k.triggerId))throw new p("Tried to register duplicate trigger for slot.");if(!(k instanceof wE))throw new p("Incorrect TriggerType: Tried to register trigger of type "+k.triggerType+" in CloseRequestedTriggerAdapter");this.CF.set(k.triggerId,new c7(Z,k,N,a))}Aa(Z){this.CF.delete(Z.triggerId)}};var Uk=class extends g.jR{constructor(Z,k,N){super();this.V=Z;this.context=N;this.CF=new Map;k.get().addListener(this);this.addOnDisposeCallback(()=>{k.jm()||k.get().removeListener(this)})}b7(Z,k,N,a){if(this.CF.has(k.triggerId))throw new p("Tried to register duplicate trigger for slot.");
if(!(k instanceof lb||k instanceof hf))throw new p("Incorrect TriggerType: Tried to register trigger of type "+k.triggerType+" in ContentPlaybackLifecycleTriggerAdapter");this.CF.set(k.triggerId,new c7(Z,k,N,a))}Aa(Z){this.CF.delete(Z.triggerId)}mL(Z){const k=[];var N=k.push,a=this.CF,T=[];for(const K of a.values())K.trigger instanceof lb&&K.trigger.Or===Z&&T.push(K);N.call(k,...T);N=k.push;a=this.CF;T=[];for(const K of a.values())K.trigger instanceof hf&&K.trigger.V!==Z&&T.push(K);N.call(k,...T);
k.length&&IU(this.V(),k)}Sw(Z){const k=[];var N=k.push,a=this.CF;const T=[];for(const K of a.values())a=K.trigger,a instanceof hf&&a.V===Z&&T.push(K);N.call(k,...T);k.length&&IU(this.V(),k)}};var b7=class extends g.jR{constructor(Z,k,N,a){super();this.U=Z;this.JW=k;this.E6=N;this.XS=a;this.DQ=!0;this.CF=new Map;this.V=new Set;N.get().addListener(this);this.addOnDisposeCallback(()=>{N.jm()||N.get().removeListener(this)})}b7(Z,k,N,a){if(this.CF.has(k.triggerId))throw new p("Tried to register duplicate trigger for slot.");
const T=`${"adtriggercuerange"}:${k.triggerId}`;if(k instanceof $8)uk0(this,Z,k,N,a,T,k.V.start,k.V.end,k.Or,k.visible);else if(k instanceof x8)uk0(this,Z,k,N,a,T,0x7ffffffffffff,0x8000000000000,k.Or,k.visible);else throw new p("Incorrect TriggerType: Tried to register trigger of type "+k.triggerType+" in CueRangeTriggerAdapter");}Aa(Z){const k=this.CF.get(Z.triggerId);k&&this.JW.get().removeCueRange(k.cueRangeId);this.CF.delete(Z.triggerId)}onCueRangeEnter(Z){if(Z=l3b(this,Z))if(Z=this.CF.get(Z))if(zB(this.E6.get()).V(32))this.V.add(Z.cueRangeId);
else{var k=Z?.Hc.trigger;(k instanceof $8||k instanceof x8)&&IU(this.U(),[Z.Hc])}}onCueRangeExit(Z){(Z=l3b(this,Z))&&(Z=this.CF.get(Z))&&this.V.delete(Z.cueRangeId)}yV(Z){if($Z(Z,16)<0){for(const k of this.V)this.onCueRangeEnter(k,!0);this.V.clear()}}sP(){}wQ(){}X8(){}MR(){}cq(){}sQ(){}IJ(){}JQ(){}VT(){}l0(){}eI(){}Xi(){}XE(){}onFullscreenToggled(){}D1(){}Pi(){}Bi(){}onVolumeChange(){}Rb(){}Zc(){}};var TZf=class extends g.jR{constructor(Z,k){super();this.Y=Z;this.U=new Map;this.D=new Map;this.V=null;k.get().addListener(this);this.addOnDisposeCallback(()=>{k.jm()||k.get().removeListener(this)});
this.V=k.get().mK?.slotId||null}b7(Z,k,N,a){if(this.U.has(k.triggerId)||this.D.has(k.triggerId))throw new p("Tried to re-register the trigger.");Z=new c7(Z,k,N,a);if(Z.trigger instanceof op)this.U.set(Z.trigger.triggerId,Z);else if(Z.trigger instanceof Jf)this.D.set(Z.trigger.triggerId,Z);else throw new p("Incorrect TriggerType: Tried to register trigger of type "+Z.trigger.triggerType+" in LiveStreamBreakTransitionTriggerAdapter");this.U.has(Z.trigger.triggerId)&&Z.slot.slotId===this.V&&IU(this.Y(),
[Z])}Aa(Z){this.U.delete(Z.triggerId);this.D.delete(Z.triggerId)}ye({slotId:Z}){if(this.V!==Z){var k=[];this.V!=null&&k.push(...f3r(this.D,this.V));Z!=null&&k.push(...f3r(this.U,Z));this.V=Z;k.length&&IU(this.Y(),k)}}};var py=class extends g.jR{constructor(Z){super();this.V=Z;this.DQ=!0;this.CF=new Map}b7(Z,k,N,a){if(this.CF.has(k.triggerId))throw new p("Tried to register duplicate trigger for slot.");if(!(k instanceof OO))throw new p("Incorrect TriggerType: Tried to register trigger of type "+k.triggerType+" in OnLayoutSelfRequestedTriggerAdapter");this.CF.set(k.triggerId,new c7(Z,k,N,a))}Aa(Z){this.CF.delete(Z.triggerId)}l0(){}eI(){}sP(){}wQ(){}X8(){}MR(){}cq(){}sQ(){}IJ(){}JQ(){}VT(){}Xi(){}};var Rm=class extends g.jR{constructor(Z){super();this.V=Z;this.DQ=!0;this.CF=new Map}Xi(Z,k){const N=[];for(const a of this.CF.values()){const T=a.trigger;T.opportunityType===Z&&(T.associatedSlotId&&T.associatedSlotId!==k||N.push(a))}N.length&&IU(this.V(),N)}b7(Z,k,N,a){if(this.CF.has(k.triggerId))throw new p("Tried to register duplicate trigger for slot.");if(!(k instanceof Gyi))throw new p("Incorrect TriggerType: Tried to register trigger of type "+k.triggerType+" in OpportunityEventTriggerAdapter");
this.CF.set(k.triggerId,new c7(Z,k,N,a))}Aa(Z){this.CF.delete(Z.triggerId)}sP(){}wQ(){}X8(){}MR(){}cq(){}sQ(){}IJ(){}JQ(){}VT(){}l0(){}eI(){}};var Mf=class extends g.jR{constructor(Z,k,N,a,T,K){super();this.G=Z;this.a4=k;this.E6=N;this.Za=a;this.Bd=K;this.V=null;this.Y=!1;this.DQ=!0;this.CF=new Map;k.get().addListener(this);this.addOnDisposeCallback(()=>{k.jm()||k.get().removeListener(this)});
T.get().addListener(this);this.addOnDisposeCallback(()=>{T.jm()||T.get().removeListener(this)})}b7(Z,k,N,a){Z=new c7(Z,k,N,a);
if(k instanceof zk||k instanceof bb||k instanceof UO||k instanceof pq||k instanceof N6r){if(this.CF.has(k.triggerId))throw new p("Tried to register duplicate trigger for slot.");this.CF.set(k.triggerId,Z)}else throw new p("Incorrect TriggerType: Tried to register trigger of type "+k.triggerType+" in PrefetchTriggerAdapter");}Aa(Z){this.CF.delete(Z.triggerId)}sP(Z){const k=Z.slotFulfillmentTriggers.find(N=>N instanceof zk);
k&&(H7(this,"TRIGGER_TYPE_NEW_SLOT_SCHEDULED_WITH_BREAK_DURATION",k.breakDurationMs,new Set([Z.slotId]),!0),g7(this.Za.get(),"ads_css",`sid.${Z.slotId};bd.${k.breakDurationMs}`))}wQ(){}X8(){}MR(){}cq(){}sQ(){}IJ(){}JQ(){}VT(){}l0(){}eI(){}Xi(){}nJ(Z){if(!this.V)return g7(this.Za.get(),"ads_nfi",`a.pta;cid.${Z.identifier}`),!1;this.U&&this.U.stop();this.L&&this.L.XN();const k=D6f(this,Z);if(!k){var N=ORN(this);const a=this.j!==void 0&&Date.now()<=this.j+1E4;g7(this.Za.get(),"ads_ncfs",`cid.${Z.identifier};cd.${Z.Xl.toFixed(3)};ccs.${a};cfa.${this.Y};bdc.${N.length};${N.slice(0,
6).map(T=>`;bd.${T}`).join("")}`);
return a?(rz(this.Bd,this.V,Z),!0):!1}(N=k.slot.clientMetadata.PD("metadata_type_triggering_cue_point"))?N.current=Z:wm("Expected triggering cue point ref to be available",k.slot);(new g.Uc(()=>{const a=k.trigger,T=k.slot;H7(this,"TRIGGER_TYPE_LIVE_STREAM_BREAK_SCHEDULED_DURATION_MATCHED",a.breakDurationMs,new Set,!0);H7(this,"TRIGGER_TYPE_LIVE_STREAM_BREAK_SCHEDULED_DURATION_NOT_MATCHED",a.breakDurationMs,new Set,!1);let K=0;for(const y of this.CF.values()){const Q=y.trigger;y.slot.slotId===T.slotId&&
(this.CF.delete(Q.triggerId),K++)}g7(this.Za.get(),"ads_csf",`sid.${T.slotId};bd.${a.breakDurationMs};dt.${K}`)},10)).start();
return!0}cn(){}mL(Z){this.Y=!1;this.j=Date.now();this.V&&this.V.contentCpn!==Z?(wm("Fetch instructions carried over from previous content video",void 0,void 0,{contentCpn:Z,fetchInstructionsCpn:this.V.contentCpn}),dz(this)):(this.D=new g.Uc(()=>{if(this.Y)delete this.D;else{var k=this.E6.get().getGetAdBreakContext();Number(k?.livePlaybackPosition?.utcTimeMillis)>0?(delete this.D,iRy(this)):this.D?.start()}},200),this.D?.start())}Sw(Z){this.V&&this.V.contentCpn!==Z&&wm("Expected content video of the current fetch instructions to end",
void 0,void 0,{contentCpn:Z,
fetchInstructionsCpn:this.V.contentCpn},!0);dz(this)}Qe(Z){if(this.V)wm("Unexpected multiple fetch instructions for the current content");else{this.V=Z;Z=gsG(Z);this.U=new g.Uc(()=>{iRy(this)},Z?Z:6E5);
this.U.start();this.L=new g.Uc(()=>{this.V&&(this.U&&(this.U.stop(),this.U.start()),vsf(this,"TRIGGER_TYPE_CUE_BREAK_IDENTIFIED"))},wxy(this.V));
Z=this.E6.get().getCurrentTimeSec(1,!1);for(const k of this.a4.get().kO)g7(this.Za.get(),"nocache",`ct.${Date.now()};cmt.${Z};d.${k.Xl.toFixed(3)};tw.${k.startSecs-Z};cid.${k.identifier};`)}}YW(){super.YW();dz(this)}};var KRy=class extends g.jR{constructor(Z){super();this.D=Z;this.DQ=!0;this.CF=new Map;this.V=new Map;this.U=new Map}b7(Z,k,N,a){if(this.CF.has(k.triggerId))throw new p("Tried to register duplicate trigger for slot.");if(!(k instanceof SS))throw new p("Incorrect TriggerType: Tried to register trigger "+`of type ${k.triggerType}`+" in TimeRelativeToLayoutEnterTriggerAdapter");this.CF.set(k.triggerId,new c7(Z,k,N,a));Z=this.V.has(k.triggeringLayoutId)?this.V.get(k.triggeringLayoutId):new Set;Z.add(k);
this.V.set(k.triggeringLayoutId,Z)}Aa(Z){this.CF.delete(Z.triggerId);if(!(Z instanceof SS))throw new p("Incorrect TriggerType: Tried to unregister trigger "+`of type ${Z.triggerType}`+" in TimeRelativeToLayoutEnterTriggerAdapter");var k=this.U.get(Z.triggerId);k&&(k.dispose(),this.U.delete(Z.triggerId));if(k=this.V.get(Z.triggeringLayoutId))k.delete(Z),k.size===0&&this.V.delete(Z.triggeringLayoutId)}sP(){}wQ(){}X8(){}MR(){}cq(){}sQ(){}IJ(){}JQ(){}VT(){}Xi(){}l0(Z,k){if(this.V.has(k.layoutId)){Z=this.V.get(k.layoutId);
for(const N of Z)Z=new g.Uc(()=>{const a=this.CF.get(N.triggerId);IU(this.D(),[a])},N.durationMs),Z.start(),this.U.set(N.triggerId,Z)}}eI(){}};var ny=class extends g.jR{constructor(){super();this.CF=new Map}b7(Z,k){if(this.CF.has(k.triggerId))throw new p("Tried to register duplicate trigger for slot.");throw new p("Incorrect TriggerType: Tried to register trigger of type "+k.triggerType+" in VideoTransitionTriggerAdapter.");}Aa(Z){this.CF.delete(Z.triggerId)}};var Im=class{constructor(Z){this.Gt=Z;this.U=new Map;this.V=new Map;this.D=new Map}};var jE=class{constructor(Z){this.U=Z;this.V=k=>Ru(this.U.get(),k)}};var Ek=class{constructor(Z,k,N){this.U=Z;this.D=k;this.Gt=N;this.V=a=>Ru(this.U.get(),a)}T3(Z){return Z.kind==="AD_PLACEMENT_KIND_START"}};var O3U=class{V(Z){Z&&g.TO("adsSeenClientLogging",{serializedAdServingDataEntry:Z.serializedAdServingDataEntry})}};var ybr=class extends g.jR{constructor(Z,k){super();this.Gt=Z;this.U=k;this.eventCount=0;this.D=vSi()()}logEvent(Z){this.V(Z)}V(Z,k,N,a,T,K,y,Q,q,r,C,m=0){cM(this.Gt.get(),"h5_enable_pacf_debug_logs")&&console.log(`[PACF]: ${Z}`,"slot:",T,"layout:",K,"ping:",y,"Opportunity:",{opportunityType:k,associatedSlotId:N,rQm:a,sJS:Q,adSlotLoggingData:q,adLayoutLoggingData:r});try{const A=()=>{if(!this.Gt.get().S.X().B("html5_disable_client_tmp_logs")&&Z!=="ADS_CLIENT_EVENT_TYPE_UNSPECIFIED"){Z||wm("Empty PACF event type",
T,K);var P=xo(this.U.get());const d={eventType:Z,eventOrder:++this.eventCount},h={};T&&(h.slotData=$o(P,T));K&&(h.layoutData=qsN(P,K));y&&(h.pingData={pingDispatchStatus:"ADS_CLIENT_PING_DISPATCH_STATUS_SUCCESS",serializedAdPingMetadata:y.V.serializedAdPingMetadata,pingIndex:y.index});Q&&(h.triggerData=wb(Q.trigger,Q.category));k&&(h.opportunityData=rv0(P,k,N,a));P={organicPlaybackContext:{contentCpn:N9(this.XS.get(),1).clientPlaybackNonce}};P.organicPlaybackContext.isLivePlayback=N9(this.XS.get(),
1).Rn;P.organicPlaybackContext.isMdxPlayback=N9(this.XS.get(),1)?.isMdxPlayback;N9(this.XS.get(),1)?.daiEnabled&&(P.organicPlaybackContext.isDaiContent=!0);const B=N9(this.XS.get(),2)?.clientPlaybackNonce;B&&(P.adVideoPlaybackContext={adVideoCpn:B});P&&(h.externalContext=P);d.adClientData=h;q&&(d.serializedSlotAdServingData=q.serializedSlotAdServingDataEntry);r&&(d.serializedAdServingData=r.serializedAdServingDataEntry);C&&(d.errorInfo=C);g.TO("adsClientStateChange",{adsClientEvent:d})}};
m&&m>0?g.c9(g.dO(),()=>A(),m):A()}catch(A){cM(this.Gt.get(),"html5_log_pacf_logging_errors")&&g.c9(g.dO(),()=>{wm(A instanceof Error?A:String(A),T,K,{pacf_message:"exception during pacf logging"})})}}};var sKy=class extends ybr{constructor(Z,k,N){super(Z,k);this.Gt=Z;this.XS=N}V(Z,k,N,a,T,K,y,Q,q,r,C){var m=this.Gt.get();g.Qw(m.S.X())?(m=this.Gt.get(),m=g.Q5(m.S.X().experiments,"H5_async_logging_delay_ms")):m=void 0;super.V(Z,k,N,a,T,K,y,Q,q,r,C,m)}};var Wh=class{constructor(){this.V=new Map}clear(){this.V.clear()}};var B7=class{constructor(Z){this.V="pending";this.U=[];this.D=[];try{Z(this.Y.bind(this),this.reject.bind(this))}catch(k){this.reject(k)}}state(){return this.V==="fulfilled"?{state:"fulfilled",value:this.result}:this.V==="rejected"?{state:"rejected",reason:this.error}:{state:"pending"}}Y(Z){Vb(Z)||DX(Z)?gz(Od(Z),this.Y.bind(this),this.reject.bind(this)):(this.V="fulfilled",this.result=Z,wz(this))}reject(Z){this.V="rejected";this.error=Z;wz(this)}},DX=Ax(Z=>fhy(Z)?Z instanceof B7:!1);var e$=window.Wea||"en";var Ud=class{constructor(){this.Y=new Set;this.U=new Set;this.L=new Map;this.client=void 0;this.csn=null}D(Z){this.client=Z}V(){this.clear();this.csn=g.C9()}clear(){this.Y.clear();this.U.clear();this.L.clear();this.csn=null}};var j$=class{D(Z){g.ai(b_().D).bind(b_())(Z)}clear(){g.ai(b_().clear).bind(b_())()}};var pw=class{constructor(){this.C=[];this.N=[];this.V=[];this.G=[];this.Vz=[];this.Y=new Map;this.j=new Map;this.U=new Set;this.xW=new Map}D(Z){this.client=Z}zt(Z,k={}){g.ai(()=>{const N=g.J(Z?.commandMetadata,g.f4)?.rootVe||g.J(Z?.commandMetadata,PCb)?.screenVisualElement?.uiType;if(N){var a=g.J(Z?.commandMetadata,RhU);if(a?.parentTrackingParams){var T=g.yz(a.parentTrackingParams);if(a.parentCsn)var K=a.parentCsn}else k.clickedVisualElement?T=k.clickedVisualElement:Z.clickTrackingParams&&(T=g.yz(Z.clickTrackingParams));
a:{a=g.J(Z,g.d9);var y=g.J(Z,OSr);if(a){if(y=Xuf(a,"VIDEO")){a={token:y,videoId:a.videoId};break a}}else if(y&&(a=Xuf(y,"PLAYLIST"))){a={token:a,playlistId:y.playlistId};break a}a=void 0}k={cttAuthInfo:a,parentCsn:K,...k};g.ii("expectation_logging")&&(k.loggingExpectations=g.J(Z?.commandMetadata,PCb)?.loggingExpectations||void 0);MB(this,N,T,k)}else g.L9(new g.jD("Error: Trying to create a new screen without a rootVeType",Z))})()}clickCommand(Z,k,N=0){return B60(this,Z.clickTrackingParams,k,N)}stateChanged(Z,
k,N=0){this.visualElementStateChanged(g.yz(Z),k,N)}visualElementStateChanged(Z,k,N=0){N===0&&this.U.has(N)?this.N.push([Z,
k]):t1N(this,Z,k,N)}Db(Z){const k=Z.cpn;if(this.V.length&&this.V[this.V.length-2]?.cpn!==k){var N=g.C9();if(k&&N&&N!=="UNDEFINED_CSN"){let a;Z.itct&&(a=g.yz(Z.itct||""));const T={};g.ii("web_playback_associated_log_ctt")&&Z.Pq&&(T.cttAuthInfo={token:Z.Pq,videoId:Z.videoId});Z={cpn:k,csn:N};g.ii("web_playback_associated_ve")&&a&&(g.zO(N,a),Z.playbackVe=a.getAsJson());g.TO("playbackAssociated",Z,T);this.V[this.V.length-1].cpn=k}}}};var W7=class{fetch(Z,k,N){const a=Omb(Z,k,N);return new Promise((T,K)=>{const y=()=>{if(N?.Pv)try{const Q=this.handleResponse(Z,a.status,a.response,N);T(Q)}catch(Q){K(Q)}else T(this.handleResponse(Z,a.status,a.response,N))};
a.onerror=y;a.onload=y;a.send(k.body??null)})}handleResponse(Z,k,N,a){N=N.replace(")]}'","");
let T;try{T=JSON.parse(N)}catch(K){g.L9(new g.jD("JSON parsing failed after XHR fetch",Z,k,N));if(a?.Pv&&N)throw new g.Ss("JSON parsing failed after XHR fetch");T={}}k!==200&&(g.L9(new g.jD("XHR API fetch failed",Z,k,N)),T={...T,errorMetadata:{status:k}});return T}};var Yi=class{static getInstance(){let Z=g.Vf("ytglobal.storage_");Z||(Z=new Yi,g.X0("ytglobal.storage_",Z));return Z}async estimate(){const Z=navigator;if(Z.storage?.estimate)return Z.storage.estimate();if(Z.webkitTemporaryStorage?.queryUsageAndQuota)return vdf()}};g.X0("ytglobal.storageClass_",Yi);var QT0=class{constructor(Z,k){this.handleError=Z;this.V=k;this.U=!1;self.document===void 0||self.addEventListener("beforeunload",()=>{this.U=!0});
this.D=Math.random()<=.2}QV(Z){this.handleError(Z)}logEvent(Z,k){switch(Z){case "IDB_DATA_CORRUPTED":g.ii("idb_data_corrupted_killswitch")||this.V("idbDataCorrupted",k);break;case "IDB_UNEXPECTEDLY_CLOSED":this.V("idbUnexpectedlyClosed",k);break;case "IS_SUPPORTED_COMPLETED":g.ii("idb_is_supported_completed_killswitch")||this.V("idbIsSupportedCompleted",k);break;case "QUOTA_EXCEEDED":gdi(this,k);break;case "TRANSACTION_ENDED":this.D&&Math.random()<=.1&&this.V("idbTransactionEnded",k);break;case "TRANSACTION_UNEXPECTEDLY_ABORTED":this.V("idbTransactionAborted",
{...k,hasWindowUnloaded:this.U})}}};var eDf=KR("yt-player-local-media",{V5:{index:{cV:2},media:{cV:2},captions:{cV:5}},shared:!1,upgrade(Z,k){k(2)&&(zb(Z,"index"),zb(Z,"media"));k(5)&&zb(Z,"captions");k(6)&&(Ui(Z,"metadata"),Ui(Z,"playerdata"))},version:5});var q6f={cupcake:1.5,donut:1.6,eclair:2,froyo:2.2,gingerbread:2.3,honeycomb:3,"ice cream sandwich":4,jellybean:4.1,kitkat:4.4,lollipop:5.1,marshmallow:6,nougat:7.1},Yt;a:{var km=g.qG();km=km.toLowerCase();if(g.TI(km,"android")){var rbR=km.match(/android\s*(\d+(\.\d+)?)[^;|)]*[;)]/);if(rbR){const Z=parseFloat(rbR[1]);if(Z<100){Yt=Z;break a}}var Crf=km.match("("+Object.keys(q6f).join("|")+")");Yt=Crf?q6f[Crf[0]]:0}else Yt=void 0}var NE=Yt,gr=NE>=0;var wuf=FM(()=>window.matchMedia?.("(prefers-reduced-motion: reduce)").matches);var kC;g.Zb=new DwN;kC=0;g.mTy=class{constructor(Z){this.videoData=Z;this.V={c1a:()=>{const k=[];if(g.Zb.isInitialized()){var N="";this.videoData&&this.videoData.F_&&(N=this.videoData.F_+`&${"r1b"}=${this.videoData.clientPlaybackNonce}`);N={atr_challenge:N};gV("bg_v",void 0,"player_att");(N=Snf(N))?(gV("bg_s",void 0,"player_att"),k.push(`${"r1a"}=${N}`)):(gV("bg_e",void 0,"player_att"),k.push("r1c=2"))}else gV("bg_e",void 0,"player_att"),window.trayride||window.botguard?k.push("r1c=1"):k.push("r1c=4");k.push(`${"r1d"}=${g.Zb.getState()}`);
return k.join("&")},
c6a:k=>"r6a="+(Number(k.c)^NU()),
c6b:k=>`${"r6b"}=${Number(k.c)^Number(g.G("CATSTAT",0))}`};
this.videoData&&this.videoData.F_?this.Qa=q2(this.videoData.F_):this.Qa={}}};var s1=z90()?!0:typeof window.fetch==="function"&&window.ReadableStream&&window.AbortController&&!g.Z3?!0:!1;var o7={Am:function(Z){Z[c[32]]()},
Pd:function(Z,k){Z[c[41]](0,k)},
bE:function(Z,k){var N=Z[0];Z[0]=Z[k%Z[c[3]]];Z[k%Z[c[3]]]=N}};var sTf={TY:"adunit",iF:"detailpage",NF:"editpage",T0:"embedded",mT:"leanback",Vmp:"previewpage",zRW:"profilepage",b5:"unplugged",gI:"playlistoverview",Jpm:"sponsorshipsoffer",VY3:"shortspage",cR:"handlesclaiming",pf:"immersivelivepage",Pt:"creatormusic",z1:"immersivelivepreviewpage",XA:"admintoolyurt",fFX:"shortsaudiopivot",vt:"consumption",Xo:"background_audio_playback"};var U$N=2592E3;var U7;g.Cs={STOP_EVENT_PROPAGATION:"html5-stop-propagation",IV_DRAWER_ENABLED:"ytp-iv-drawer-enabled",IV_DRAWER_OPEN:"ytp-iv-drawer-open",MAIN_VIDEO:"html5-main-video",VIDEO_CONTAINER:"html5-video-container",VIDEO_CONTAINER_TRANSITIONING:"html5-video-container-transitioning",HOUSE_BRAND:"house-brand"};U7={RIGHT_CONTROLS_LEFT:"ytp-right-controls-left",RIGHT_CONTROLS_RIGHT:"ytp-right-controls-right"};var Z9G={allowed:"AUTOPLAY_BROWSER_POLICY_ALLOWED","allowed-muted":"AUTOPLAY_BROWSER_POLICY_ALLOWED_MUTED",disallowed:"AUTOPLAY_BROWSER_POLICY_DISALLOWED"};var Tly={ANDROID:3,ANDROID_KIDS:18,ANDROID_MUSIC:21,ANDROID_UNPLUGGED:29,WEB:1,WEB_REMIX:67,WEB_UNPLUGGED:41,IOS:5,IOS_KIDS:19,IOS_MUSIC:26,IOS_UNPLUGGED:33},KfU={android:"ANDROID","android.k":"ANDROID_KIDS","android.m":"ANDROID_MUSIC","android.up":"ANDROID_UNPLUGGED",youtube:"WEB","youtube.m":"WEB_REMIX","youtube.up":"WEB_UNPLUGGED",ytios:"IOS","ytios.k":"IOS_KIDS","ytios.m":"IOS_MUSIC","ytios.up":"IOS_UNPLUGGED"},AbG={"mdx-pair":1,"mdx-dial":2,"mdx-cast":3,"mdx-voice":4,"mdx-inappdial":5};var HAi={DISABLED:1,ENABLED:2,PAUSED:3,1:"DISABLED",2:"ENABLED",3:"PAUSED"};g.hY=class{constructor(Z,k=!1){this[c[1]]=Z;this[c[31]]=k;this[c[12]]=this[c[9]]=this[c[21]]=c[11];this[c[6]]={};this[c[59]]=c[11]}set(Z,k){this[c[6]][Z]!==k&&(this[c[6]][Z]=k,this[c[59]]=c[11])}get(Z){Zj(53,4205,this);return this[c[6]][Z]||null}mH(){this[c[59]]||(this[c[59]]=rP(1,3206,this));return this[c[59]]}clone(){const Z=new g.hY(this[c[1]],this[c[31]]);Z[c[21]]=this[c[21]];Z[c[9]]=this[c[9]];Z[c[12]]=this[c[12]];Z[c[6]]=g.Rn(this[c[6]]);Z[c[59]]=this[c[59]];return Z}};g.RO=class{constructor(Z={}){this.languageCode=Z.languageCode||"";this.languageName=Z.languageName||null;this.kind=Z.kind||"";this.name=Z.name===void 0?null:Z.name;this.displayName=Z.displayName||null;this.id=Z.id||null;this.V=Z.is_servable||!1;this.isTranslateable=Z.is_translateable||!1;this.url=Z.url||null;this.vssId=Z.vss_id||"";this.isDefault=Z.is_default||!1;this.translationLanguage=Z.translationLanguage||null;this.xtags=Z.xtags||"";this.captionId=Z.captionId||""}getId(){return this.id}getName(){return this.name}isServable(){return this.V}mH(){return this.url}getXtags(){return this.xtags}toString(){return this.languageCode+
": "+g.AQ(this)+" - "+this.vssId+" - "+(this.captionId||"")}equals(Z){return Z?this.toString()===Z.toString():!1}cG(){return!(!this.languageCode||this.translationLanguage&&!this.translationLanguage.languageCode)}};g.J4=class{constructor(Z,k){this.id=Z;this.ZF=k;this.captionTracks=[];this.D=this.Y=null;this.xtags="";this.G=this.L=!1;this.V=null;this.U="UNKNOWN";this.captionsInitialState="CAPTIONS_INITIAL_STATE_UNKNOWN";Z=this.ZF.id.split(".");Z.length>1&&(this.L=Z[1]==="2",this.G=Z[1]==="4")}getLanguageInfo(){return this.ZF}getXtags(){if(!this.xtags){const Z=this.id.split(";");Z.length>1&&(this.xtags=Z[1])}return this.xtags}toString(){return this.ZF.name}isAutoDubbed(){return this.ZF.getIsAutoDubbed()}};
g.J4.prototype.getLanguageInfo=g.J4.prototype.getLanguageInfo;g.J4.prototype.isAutoDubbed=g.J4.prototype.isAutoDubbed;var Ho=class{constructor(Z,k,N,a,T=0){this.U=Z;this.V=k;this.D=N;this.reason=a;this.UH=T}equals(Z){return this.U===Z.U&&this.V===Z.V&&this.D===Z.D&&this.reason===Z.reason&&(!XT||this.UH===Z.UH)}isLocked(){return this.D&&!!this.U&&this.U===this.V}compose(Z){if(Z.D&&Ls(Z))return io;if(Z.D||Ls(this))return Z;if(this.D||Ls(Z))return this;let k=this.U&&Z.U?Math.max(this.U,Z.U):this.U||Z.U;const N=this.V&&Z.V?Math.min(this.V,Z.V):this.V||Z.V;k=Math.min(k,N);let a=0;XT&&(a=this.UH!==0&&Z.UH!==0?Math.min(this.UH,
Z.UH):this.UH===0?Z.UH:this.UH);return XT&&k===this.U&&N===this.V&&a===this.UH||!XT&&k===this.U&&N===this.V?this:XT?new Ho(k,N,!1,N===this.V&&a===this.UH?this.reason:Z.reason,a):new Ho(k,N,!1,N===this.V?this.reason:Z.reason)}Y(Z){return!Z.video||XT&&this.UH!==0&&this.UH<Z.UH?!1:q5j(this,Z.video.quality)}},Pry=g.dg("auto","hd1080",!1,"l"),aS=g.dg("auto","large",!1,"l"),io=g.dg("auto","auto",!1,"p"),XT=!1;var lq=class{constructor(Z,k,N,a){this.videoInfos=Z;this.U=k;this.audioTracks=[];this.D=a||[];if(this.U){Z=new Set;N?.({ainfolen:this.U.length});for(const T of this.U){if(!T.ZF||Z.has(T.ZF.id)){N?.({atkerr:!!T.ZF,itag:T.itag,xtag:T.U,lang:T.ZF?.name||"",langid:T.ZF?.id||""});continue}k=new g.J4(T.id,T.ZF);Z.add(T.ZF.id);this.audioTracks.push(k)}N?.({atklen:this.audioTracks.length})}}wR(Z){Z=Z||io;const k=g.Ry(this.videoInfos,T=>Z.Y(T)),N=[],a={};
for(let T=0;T<k.length;T++){const K=k[T].video;a[K.quality]||(N.push(K),a[K.quality]=!0)}return N}jh(Z){Z=Z||io;return g.Ry(this.videoInfos,k=>Z.Y(k))}getAvailableAudioTracks(){return this.audioTracks}V(){return!!this.U}};var fSj=new Set(["356"]),cby=class extends g.jR{constructor(){super(...arguments);this.U=null;this.V=new Map}YW(){super.YW()}};var UM=class{constructor(Z,k,N,a,T,K,y,Q,q){this.Cp=Z;this.startTime=k;this.duration=N;this.ingestionTime=a;this.sourceURL=T;this.lX=q;this.endTime=k+N;this.V=y||0;this.range=K||null;this.pending=Q||!1;this.lX=q||null}};g.TP=class{constructor(){this.segments=[];this.U=null;this.L=!0;this.G=""}j(Z){this.segments.push(Z)}Of(Z){return!!this.D(Z)}getDuration(Z){return(Z=this.D(Z))?Z.duration:0}N(Z){return this.getDuration(Z)}dK(){return 0}N7(){return this.segments.length?this.segments[0].Cp:-1}HG(Z){return(Z=this.D(Z))?Z.ingestionTime:NaN}hW(){return this.segments.length?this.segments[this.segments.length-1].Cp:-1}bU(Z){return this.hW()===Z&&!this.L&&Z>=0}CA(){const Z=this.segments[this.segments.length-1];return Z?Z.endTime:
NaN}Vt(){return this.segments[0].startTime}Vy(){return this.segments.length}V(){return 0}pn(Z){return(Z=this.Y(Z))?Z.Cp:-1}C(Z){return(Z=this.D(Z))?Z.sourceURL:""}getStartTime(Z){return(Z=this.D(Z))?Z.startTime:0}rf(Z){return this.getStartTime(Z)+this.getDuration(Z)}isLoaded(){return this.segments.length>0}D(Z){if(this.U&&this.U.Cp===Z)return this.U;Z=g.F_(this.segments,new UM(Z,0,0,0,""),(k,N)=>k.Cp-N.Cp);
return this.U=Z>=0?this.segments[Z]:null}Y(Z){if(this.U&&this.U.startTime<=Z&&Z<this.U.startTime+this.U.duration)return this.U;Z=g.F_(this.segments,{startTime:Z},(k,N)=>k.startTime-N.startTime);
return this.U=Z>=0?this.segments[Z]:this.segments[Math.max(0,-Z-2)]}append(Z){if(Z.length)if(Z=g.mr(Z),this.segments.length){var k=this.segments.length?g.bf(this.segments).endTime:0,N=Z[0].Cp-this.hW();N>1&&yH(this.segments);N=N>0?0:-N+1;for(let a=N;a<Z.length;a++)N=Z[a],N.startTime=k,N.endTime=N.startTime+N.duration,k+=Z[a].duration,this.segments.push(Z[a])}else this.segments=Z}QS(){return 0}};g.TP.prototype.eJ=NR(3);var GOf=class{constructor(Z,k,N,a,T=!1){this.data=Z;this.offset=k;this.size=N;this.type=a;this.V=(this.U=T)?0:8;this.dataOffset=this.offset+this.V}skip(Z){this.V+=Z}};var b9b=class{constructor(Z){this.offset=0;this.data=new DataView(new ArrayBuffer(Z))}};var oV=class{constructor(Z,k,N,a,T,K,y){this.startSecs=Z;this.Xl=k;this.context=N;this.identifier=a;this.event=T;this.V=K;this.tileContext=y}},HoG=class{};var dTf={predictStart:"predictStart",start:"start",["continue"]:"continue",stop:"stop",prefetch:"prefetch"},vLG={EVENT_PREDICT_START:"predictStart",EVENT_START:"start",EVENT_CONTINUE:"continue",EVENT_STOP:"stop",EVENT_PREFETCH:"prefetch"};var zFy=class{constructor(Z,k){this.data=Z;this.uri=k||"http://youtube.com/streaming/metadata/segment/102015";this.segmentNumber=ew(this,"Sequence-Number");this.L=ew(this,"Segment-Count");this.j=this.data["Segment-Durations-Ms"]||"";this.ingestionTime=ew(this,"Ingestion-Walltime-Us")/1E6;this.V=(ew(this,"First-Frame-Time-Us")+ew(this,"First-Frame-Uncertainty-Us"))/1E6;this.Wi=ew(this,"Target-Duration-Us")/1E6;this.G=this.data["Stream-Finished"]==="T";this.Y=this.data.Streamable==="T";this.cryptoPeriodIndex=
ew(this,"Crypto-Period-Index");this.U=ew(this,"Crypto-Period-Seconds")}D(){return this.data["Stitched-Video-Cpn"]?this.data["Stitched-Video-Cpn"].split(",").slice(0,-1):[]}UL(){return!!(this.data["Stitched-Video-Id"]||this.data["Stitched-Video-Cpn"]||this.data["Stitched-Video-Duration-Us"]||this.data["Stitched-Video-Start-Frame-Index"]||this.data["Serialized-State"]||this.data["Is-Ad-Break-Finished"])}toString(){let Z="";for(const k of Object.keys(this.data))Z+=k+":"+this.data[k]+";";return Z}};var bdf=class{constructor(Z,k){this.V=Z;this.duration=k}};var S5b=class{constructor(Z,k,N,a,T){this.U=T;this.V=Z||0;this.pitch=k||0;this.yaw=N||0;this.roll=a||0;this.crc=T.getUint32(4)}};var Wo=class{constructor(Z,k){this.V=Z;this.pos=0;this.start=k||0}p5(){const Z=this.pos;this.pos=0;let k=!1;try{kF(this,440786851)&&(this.pos=0,kF(this,408125543)&&(k=!0))}catch(N){if(N instanceof RangeError)this.pos=0,k=!1,g.L9(N);else throw N;}this.pos=Z;return k}};var Xm=class{constructor(Z){this.W0=Z;this.V={};this.url=""}set(Z,k){this.W0.get(Z);this.V[Z]=k;this.url=""}get(Z){return this.V[Z]||this.W0.get(Z)}mH(){this.url||(this.url=ZZX(this));return this.url}};var khG=class{constructor(){this.U=this.V=this.timedOut=this.started=this.Y=this.D=0}};var oBX=class{constructor(Z){this.Vz=this.C=this.L=this.U=0;this.N=this.G=!1;this.V=Z;this.Y=Z.clone()}yg(Z,k){return Z.pF?this.N?this.G=!0:this.G=Nmi(this,Z,k):Nmi(this,Z,k)}j(Z,k,N=0){N>1?Z=Z.BY:(k=sM(k,VO(this,this.yg(Z,k),Z)),Z=Math.max(this.L,k.timedOut)+Z.AF*(this.U-this.L)+.25*this.C,Z=Z>3?1E3*1.6**(Z-3):0);return Z===0?!0:this.Vz+Z<(0,g.z)()}O(Z,k){this.V.set(Z,k);this.Y.set(Z,k);this.D&&this.D.set(Z,k)}AM(Z){return this.Y.get(Z)}q4(){return this.Y.get("cpn")||""}DT(Z,k){Z.W0===this.V&&(this.V=
Pb(Z,k));Z.W0===this.D&&(this.D=Pb(Z,k))}zt(){this.N=!0}Mw(){return this.V!==this.D&&!this.G}};var Kt=class{constructor(Z,k,N,a){this.initRange=N;this.indexRange=a;this.U=null;this.Vz=!1;this.MX=0;this.zt=this.iL=this.N=null;this.info=k;this.EH=new oBX(Z)}V(){return!!this.U&&this.index.isLoaded()}dA(){return!1}Kp(Z){return[Z]}FS(Z){return[Z]}};var h$=class{constructor(Z,k){this.start=Z;this.end=k;this.length=k-Z+1}toString(){return this.start+"-"+(this.end==null?"":this.end)}V(){return this.end==null?{start:String(this.start)}:{start:String(this.start),end:String(this.end)}}};var g5=class{constructor(Z,k,N,a="",T,K,y,Q,q,r,C,m=""){this.type=Z;this.l3=k;this.range=N;this.source=a;this.Tk=C;this.clipId=m;this.Vz=[];this.j="";this.Cp=-1;this.O=0;this.j=a;this.Cp=T>=0?T:-1;this.startTime=K||0;this.duration=y||0;this.V=Q||0;this.U=q>=0?q:this.range?this.range.length:NaN;this.D=this.range?this.V+this.U===this.range.length:r===void 0?!!this.U:r;this.range?(this.Y=this.startTime+this.duration*this.V/this.range.length,this.C=this.duration*this.U/this.range.length,this.L=this.Y+
this.C):QJr(this)}G(){return this.D&&this.l3.index.bU(this.Cp)}isEncrypted(){return this.l3.info.isEncrypted()}equals(Z){return!(!Z||Z.l3!==this.l3||Z.type!==this.type||(this.range&&Z.range?Z.range.start!==this.range.start||Z.range.end!==this.range.end:Z.range!==this.range)||Z.Cp!==this.Cp||Z.V!==this.V||Z.U!==this.U)}N(){return this.type===4}xT(){return!!this.l3.info.video}zt(){return this.Cp}E3(){const Z=iI(this);let k="";g.BB(Z,(N,a)=>{k+=`${a}_${N}_`});
return k.slice(0,-1)}};var zH=class{constructor(Z,k){this.Vi=Z;this.Y=this.V=null;this.L=this.oJ=NaN;this.yg=this.requestId=null;this.nF={b8t:()=>this.range};
this.EH=Z[0].l3.EH;this.U=k||"";this.Vi[0].range&&this.Vi[0].U>0&&(K9X(Z)?(this.range=TmX(Z),this.D=this.range.length):(this.range=this.Vi[this.Vi.length-1].range,this.D=yYj(Z)))}cM(){return this.V?this.V.mH():""}isDecorated(){return!!(this.V||this.Y&&this.Y.Ib)}rR(){return DT(this.Vi[0])}DT(Z,k){this.EH.DT(Z,k);if(this.V){this.V=Pb(Z,k);for(const N of["acpns","cpn","daistate","skipsq"])this.V["set"](N,null)}this.requestId=Z.get("req_id")}};var Vj=class extends Kt{constructor(Z,k,N,a,T,K=0){super(Z,k,a);this.Qz=N;this.Wi=K;this.index=T||new g.TP}D(){return!1}C(){return!0}xW(){return!1}dA(){return!this.Qz}j(){return new zH([new g5(1,this,this.initRange,"getMetadataRequestInfo")],this.Qz)}O(){return null}vD(Z){this.Y(Z);return this.C()&&Z.U&&!Z.D?new zH([new g5(Z.type,Z.l3,Z.range,"liveGetNextRequestInfoBySegment",Z.Cp,Z.startTime,Z.duration,Z.V+Z.U,NaN,!0)],this.index.C(Z.Cp)):this.L(vq(Z),!1)}G(Z,k=!1){Z=this.index.pn(Z);k&&(Z=Math.min(this.index.hW(),
Z+1));return this.L(Z,!0)}Rq(Z){Mq(Z)}Y(Z){return Z.U===0?!0:this.index.hW()>Z.Cp&&this.index.N7()<=Z.Cp+1}update(Z,k,N){this.index.append(Z);DPj(this.index,N);Z=this.index;Z.L=k;Z.G="update"}V(){return this.dA()?!0:super.V()}L(Z,k){const N=this.index.C(Z),a=this.index.getStartTime(Z);let T=this.index.getDuration(Z),K;k?T=K=0:K=this.info.UH>0?this.info.UH*T:1E3;return new zH([new g5(3,this,void 0,"liveCreateRequestInfoForSegment",Z,a,T,0,K,!k)],N)}Sm(){return this.dA()?0:this.initRange.length}tq(){return!1}};var XaG=class{constructor(Z,k,N,a,T){this.Cp=Z;this.startSecs=k;this.Xl=N;this.V=a||NaN;this.U=T||NaN}};var oc=class{constructor(){this.V=[];this.U=null;this.G=0;this.D=[];this.L=!1;this.j="";this.Y=-1}update(Z){var k=void 0;this.U&&(k=this.U);{const d=new oc;var N=Array.from(Z.getElementsByTagName("S"));if(N.length){var a=+Sg(Z,"timescale")||1,T=(+N[0].getAttribute("t")||0)/a,K=+Sg(Z,"startNumber")||0;d.Y=T;var y=k?k.startSecs+k.Xl:0,Q=Date.parse(VMf(Sg(Z,"yt:segmentIngestTime")))/1E3;d.L=Z.parentElement.tagName==="SegmentTemplate";d.L&&(d.j=Sg(Z,"media"));Z=k?K-k.Cp:1;d.G=Z>0?0:-Z+1;for(P of N){Z=
+P.getAttribute("d")/a;N=(+P.getAttribute("yt:sid")||0)/a;const h=+P.getAttribute("r")||0;for(let B=0;B<=h;B++){if(k&&K<=k.Cp){K++;continue}var q=new XaG(K,y,Z,Q+N,T);d.V.push(q);b:{var r=P;var C=a,m=q.startSecs;q=r.getAttribute("yt:cuepointTimeOffset");var A=r.getAttribute("yt:cuepointDuration");if(!q||!A){r=null;break b}q=Number(q);m=-q/C+m;C=Number(A)/C;A=r.getAttribute("yt:cuepointContext")||null;const v=r.getAttribute("yt:cuepointIdentifier")||"";r=r.getAttribute("yt:cuepointEvent")||"";r=new oV(m,
C,A,v,dTf[r]||"unknown",q)}r&&d.D.push(r);K++;y+=Z;T+=Z;Q+=Z+N}}d.V.length&&(d.U=g.bf(d.V))}var P=d}this.G=P.G;this.U=P.U||this.U;g.Ac(this.V,P.V);g.Ac(this.D,P.D);this.L=P.L;this.j=P.j;this.Y===-1&&(this.Y=P.getStreamTimeOffset())}getStreamTimeOffset(){return this.Y===-1?0:this.Y}};var LRb=class{constructor(){this.Y=[];this.V=null;this.U={};this.D={}}};var VJR=class extends g.TP{constructor({Wi:Z=0,Nu:k=!1,FJ:N=0,Y8:a=0,rr:T=Infinity,On:K=0,M4:y=!1,YN:Q=!1}={}){super();this.YV=this.Fs=-1;this.L3=Z;this.FJ=N;this.Nu=k;this.Y8=a;this.rr=T;this.On=K;((this.M4=y)||isFinite(T)&&this.rr>0)&&k&&Az&&(this.L=!1,this.G="postLive");this.YN=Q}dK(){return this.L3}Of(Z,k){Z=J$(this,Z);return Z>=0&&(k||!this.segments[Z].pending)}N7(){return this.Nu?this.segments.length?this.Y(this.Vt()).Cp:-1:super.N7()}Vt(){if(this.M4)return 0;if(!this.Nu)return super.Vt();if(!this.segments.length)return 0;
const Z=Math.max(g.bf(this.segments).endTime-this.FJ,0);return this.Y8>0&&this.Y(Z).Cp<this.Y8?this.D(this.Y8).startTime:Z}CA(){if(this.YN&&this.YV&&this.YV>0)return this.YV/1E3;if(!this.segments.length)return super.CA();var Z=this.hW();if(!this.Nu||Z<=this.segments[this.segments.length-1].Cp)Z=this.segments[this.segments.length-1];else{var k=this.segments[this.segments.length-1];Z=new UM(Z,Math.max(0,k.startTime-(k.Cp-Z)*this.L3),this.L3,0,`sq/${Z}`,void 0,void 0,!0)}return this.M4?Math.min(this.FJ,
Z.endTime):Z.endTime}Vy(){return this.Nu?this.segments.length?this.hW()-this.N7()+1:0:super.Vy()}hW(){let Z=Math.min(this.rr,Math.max(super.hW(),this.Fs));var k=this.FJ*1E3;k=this.YV>0&&this.YV<k;this.M4&&this.FJ>0&&this.Fs>0&&!k&&(k=this.Y(this.FJ))&&(Z=Math.min(k.Cp-1,Z));return Z}yR(){return this.segments.length?this.segments[this.segments.length-1]:null}j(Z){var k=J$(this,Z.Cp);if(k>=0)this.segments[k]=Z;else if(this.segments.splice(-(k+1),0,Z),this.On&&Z.Cp%(300/this.L3)===0){var N=this.segments[0].Cp,
a=Math.floor(this.On/this.L3);Z=Z.Cp-a;k=-(k+1)-a;k>0&&Z>N&&(this.segments=this.segments.slice(k))}}Vz(Z){Z=J$(this,Z);Z>=0&&this.segments.splice(Z,1)}qQ(){return this.Fs}bU(Z){return Az?!this.L&&Z>=0&&this.hW()<=Z:super.bU(Z)}Y(Z){if(!this.Nu)return super.Y(Z);if(!this.segments.length)return null;var k=this.segments[this.segments.length-1];if(Z<this.segments[0].startTime)k=Math.max(0,this.segments[0].Cp-Math.ceil((this.segments[0].startTime-Z)/this.L3));else if(Z>=k.endTime)k=k.Cp+Math.floor((Z-
k.endTime)/this.L3+1);else{k=tc(this.segments,a=>Z<a.startTime?-1:Z>=a.endTime?1:0);
if(k>=0)return this.segments[k];var N=-(k+1);k=this.segments[N-1];N=this.segments[N];k=Math.floor((Z-k.endTime)/((N.startTime-k.endTime)/(N.Cp-k.Cp-1))+1)+k.Cp}return this.D(k)}D(Z){if(!this.Nu)return super.D(Z);if(!this.segments.length)return null;var k=J$(this,Z);if(k>=0)return this.segments[k];const N=-(k+1);k=this.L3;if(N===0)var a=Math.max(0,this.segments[0].startTime-(this.segments[0].Cp-Z)*k);else N===this.segments.length?(a=this.segments[this.segments.length-1],a=a.endTime+(Z-a.Cp-1)*k):(a=
this.segments[N-1],k=this.segments[N],k=(k.startTime-a.endTime)/(k.Cp-a.Cp-1),a=a.endTime+(Z-a.Cp-1)*k);return new UM(Z,a,k,0,`sq/${Z}`,void 0,void 0,!0)}},Az=!1;var STX=class extends Vj{constructor(Z,k,N={}){super(Z,k,"",void 0,void 0,N.Wi||0);this.index=new VJR(N)}xW(){return!0}V(){return!0}Y(Z){return this.C()&&Z.U&&!Z.D||!Z.l3.index.bU(Z.Cp)}j(){}G(Z,k=!1){return typeof Z!=="number"||isFinite(Z)?super.G(Z,k):new zH([new g5(3,this,void 0,"mlLiveGetReqInfoStubForTime",-1,void 0,this.Wi,void 0,this.Wi*this.info.UH)],"")}L(Z,k){if(this.index.Of(Z))return super.L(Z,k);const N=this.index.getStartTime(Z);let a=Math.round(this.Wi*this.info.UH),T=this.Wi;k&&(T=
a=0);return new zH([new g5(3,this,void 0,"mlLiveCreateReqInfoForSeg",Z,N,T,void 0,a,!k)],Z>=0?`sq/${Z}`:"")}};var Qj=class extends Kt{constructor(Z,k){super(Z,k);Z=this.index=new g.TP;Z.L=!1;Z.G="d"}D(){return!1}C(){return!1}xW(){return!1}j(){return new zH([new g5(1,this,void 0,"otfInit")],"sq/0")}O(){return null}vD(Z){this.Y(Z);return Bmf(this,vq(Z),!1)}G(Z,k=!1){Z=this.index.pn(Z);k&&(Z=Math.min(this.index.hW(),Z+1));return Bmf(this,Z,!0)}Rq(Z){Z.info.type===1&&(this.U||(this.U=PY(Z.U)),Z.V&&Z.V.uri==="http://youtube.com/streaming/otf/durations/112015"&&D4y(this,Z.V))}Y(Z){return Z.U===0?!0:this.index.hW()>
Z.Cp&&this.index.N7()<=Z.Cp+1}Sm(){return 0}tq(){return!1}};var vZU,FRR,gZX,wmX,iZf;g.bI=class{constructor(Z){this.tag=Z}};vZU=new Map;FRR=class{constructor(){this.V=new Map;this.nF={hbz:()=>this.V}}};
gZX=class{constructor(){this.V=10;this.U=Date.now()}};wmX=new Map;iZf=new FRR;var nG=class{constructor(Z,k){this.info=Z;this.U=k;this.V=null;this.Y=this.D=-1;this.timestampOffset=0;this.isLocked=this.j=!1;this.L=this.info.l3.dA()&&!this.info.V}G(Z,k=!1,N=0){if(this.isLocked||Z.isLocked||!Bq(this.info,Z.info)||this.info.D)return null;if(N){if(this.U.totalLength+Z.U.totalLength>N)return null}else if(k&&(k=this.U,N=Z.U,k=!(N.V.length?e8r(k,N.V[0]):1)),k)return null;k=new g5(this.info.type,this.info.l3,this.info.range,this.info.j,this.info.Cp,this.info.startTime,this.info.duration,
this.info.V,this.info.U,this.info.D,this.info.Tk,this.info.clipId);N=Z.info;k.U+=N.U;k.range&&(k.C+=N.C);k.L=N.L;k.D=N.D;N=new h8;Cv(N,this.U);Cv(N,Z.U);k=new nG(k,N);k.V!=null&&Z.V!=null&&g.pG("dash",414627957,`merged slice emsg overridden; prev: ${k.V.UL()} next: ${Z.V.UL()}`);k.V=Z.V||this.V;k.D=this.D!==-1?this.D:Z.D;k.Y=this.Y!==-1?this.Y:Z.Y;return k}};g.yl=class{constructor(){this.count=0;this.U=1;this.D=!1;this.offsets=new Float64Array(128);this.startTicks=new Float64Array(128)}Of(Z){return Z<=this.hW()}V(Z){return this.offsets[Z]}getStartTime(Z){return this.startTicks[Z]/this.U}rf(Z){return this.getStartTime(Z)+this.getDuration(Z)}HG(){return NaN}getDuration(Z){Z=this.N(Z);return Z>=0?Z/this.U:-1}N(Z){return Z+1<this.count||this.D?this.startTicks[Z+1]-this.startTicks[Z]:-1}dK(){return 0}N7(){return 0}hW(){return this.count-1}bU(Z){return this.hW()===
Z&&Z>=0}CA(){return this.D?this.startTicks[this.count]/this.U:NaN}Vt(){return 0}Vy(){return this.count}C(){return""}pn(Z){Z=g.F_(this.startTicks.subarray(0,this.count),Z*this.U);return Z>=0?Z:Math.max(0,-Z-2)}isLoaded(){return this.hW()>=0}QS(Z,k){if(Z>=this.hW())return 0;let N=0;for(k=this.getStartTime(Z)+k;Z<this.hW()&&k>this.getStartTime(Z);Z++)N=Math.max(N,zIR(this,Z)/this.getDuration(Z));return N}resize(Z){Z+=2;const k=this.offsets;this.offsets=new Float64Array(Z+1);const N=this.startTicks;this.startTicks=
new Float64Array(Z+1);for(Z=0;Z<this.count+1;Z++)this.offsets[Z]=k[Z],this.startTicks[Z]=N[Z]}cap(Z,k){Wq(this);this.D=!0;this.startTicks[this.count]=k;this.offsets[this.count]=Z}};g.yl.prototype.eJ=NR(2);var qM=class extends Kt{constructor(Z,k,N,a){super(Z,k,N,a);this.L=null;this.nF={DG:(T,K,y)=>this.DG(T,K,y)};
this.index=new g.yl}j(Z,k){var N=new g5(2,this,this.indexRange,"indexInfo",void 0,void 0,void 0,void 0,void 0,void 0,void 0,k);const a=[new g5(1,this,this.initRange,"initInfo",void 0,void 0,void 0,void 0,void 0,void 0,void 0,k),N];this.info.contentLength>0&&Z&&(N=N.range.end+1,Z=Math.min(Z,this.info.contentLength-N),Z>0&&a.push(new g5(4,this,lI(N,Z),"tbdRange",void 0,void 0,void 0,void 0,void 0,void 0,void 0,k)));return new zH(a)}Rq(Z){if(Z.info.type===1){if(this.U)return;this.U=PY(Z.U)}else if(Z.info.type===
2){if(this.L||this.index.hW()>=0)return;if(g.Sx(this.info)){var k=this.index,N=g.Rc(Z);Z=Z.info.range.start;var a=g.RV(N,0,1936286840);N=oLy(a);k.U=N.timescale;var T=N.Vf;k.offsets[0]=N.Kq+Z+a.size;k.startTicks[0]=T;k.D=!0;var K=N.u6.length;for(var y=0;y<K;y++)Z=k,T=N.Ov[y],a=N.u6[y],Z.count++,Wq(Z),Z.offsets[Z.count]=Z.offsets[Z.count-1]+T,Z.startTicks[Z.count]=Z.startTicks[Z.count-1]+a}else this.L=g.Rc(Z)}if(this.info.oa()&&this.U&&this.L){Z=new DataView(this.U.buffer);k=this.index;T=this.L;N=this.indexRange.end;
a=new Wo(Z);Z=a;a=Z.pos;K={Mz:1E6,cW:1E9,duration:0,Nq:0,zz:0};if(kF(Z,408125543))if(K.Nq=Nq(Z,!0),K.zz=Z.start+Z.pos,kF(Z,357149030)){for(y=ZT(Z);!TH(y);){var Q=Nq(y,!1);Q===2807729?K.Mz=KG(y):Q===2807730?K.cW=KG(y):Q===17545?K.duration=QO(y):yO(y)}Z.pos=a;Z=K}else Z.pos=a,Z=null;else Z.pos=a,Z=null;if(Z!==null){k.U=Z.cW/Z.Mz;a=new Wo(T);T=a;y=Z.zz;a=T.pos;K=[];if(kF(T,475249515)){for(Q=ZT(T);kF(Q,187);){let q=ZT(Q);if(!kF(q,179))continue;const r=KG(q);if(!kF(q,183))continue;q=ZT(q);let C=y;for(;kF(q,
241);)C=KG(q)+y;K.push({I7:C,ww:r})}if(K.length>0&&N===K[0].I7)for(N=0;N<K.length;N++)K[N].I7+=1;T.pos=a;N=K}else T.pos=a,N=null;if(N!==null){for(const q of N)N=k,T=q.I7,a=q.ww,Wq(N),N.offsets[N.count]=T,N.startTicks[N.count]=a,N.count++;k.cap(Z.Nq+Z.zz,Z.duration)}}this.L=null}}DG(Z,k,N){const a=[];for(let T=Z;T<=this.index.hW();T++){const K=lI(this.index.V(T),zIR(this.index,T)),y=this.index.getStartTime(T),Q=this.index.getDuration(T),q=Math.max(0,k-K.start),r=Math.min(K.end+1,k+N)-(K.start+q);a.push(new g5(3,
this,K,"getRequestInfoForRange",T,y,Q,q,r));if(K.start+q+r>=k+N)break}a.length||(Z=new g.jD("b189619593",`${Z}`,`${k}`,`${N}`),g.b(Z));return new zH(a)}Kp(Z){const k=this.FS(Z.info),N=Z.info.range.start+Z.info.V,a=[];for(let T=0;T<k.length;T++){const K=m4(Z.U,k[T].range.start+k[T].V-N,k[T].U);a.push(new nG(k[T],K))}return a}FS(Z){const k=Z.range.start+Z.V;let N=0;for(;N<this.index.hW()&&k>=this.index.V(N+1);)N++;return this.DG(N,k,Z.U).Vi}Y(Z){Z.G();return this.V()?!0:Z.range.end+1<this.info.contentLength}O(Z,
k){this.Y(Z);if(!this.V())return k=lI(Z.range.end+1,k),k.end+1>this.info.contentLength&&(k=new h$(k.start,this.info.contentLength-1)),new zH([new g5(4,Z.l3,k,"getNextRequestInfoByLength",void 0,void 0,void 0,void 0,void 0,void 0,void 0,Z.clipId)]);Z.type===4&&(Z=this.FS(Z),Z=Z[Z.length-1]);let N=0;const a=Z.range.start+Z.V+Z.U;Z.type===3&&(Z.G(),N=Z.Cp,a===Z.range.end+1&&(N+=1));return this.DG(N,a,k)}vD(){return null}G(Z,k=!1){Z=this.index.pn(Z);k&&(Z=Math.min(this.index.hW(),Z+1));return this.DG(Z,
this.index.V(Z),0)}D(){return!0}C(){return!0}xW(){return!1}Sm(){return this.indexRange.length+this.initRange.length}tq(){return this.indexRange&&this.initRange&&this.initRange.end+1===this.indexRange.start?!0:!1}};var W9y={COLOR_PRIMARIES_BT709:"bt709",COLOR_PRIMARIES_BT2020:"bt2020",COLOR_PRIMARIES_UNKNOWN:null,COLOR_PRIMARIES_UNSPECIFIED:null},U4f={COLOR_TRANSFER_CHARACTERISTICS_BT709:"bt709",COLOR_TRANSFER_CHARACTERISTICS_BT2020_10:"bt2020",COLOR_TRANSFER_CHARACTERISTICS_SMPTEST2084:"smpte2084",COLOR_TRANSFER_CHARACTERISTICS_ARIB_STD_B67:"arib-std-b67",COLOR_TRANSFER_CHARACTERISTICS_UNKNOWN:null,COLOR_TRANSFER_CHARACTERISTICS_UNSPECIFIED:null};var MMX=/action_display_post/;g.Zu=class extends g.n9{constructor(Z="",k=null,N=!1){super();this.sourceUrl=Z;this.isLivePlayback=N;this.tq=this.duration=0;this.isPremiere=this.M4=this.U=this.isLiveHeadPlayable=this.isLive=this.D=!1;this.rr=this.Y8=0;this.isOtf=this.Rn=!1;this.Sm=(0,g.z)();this.zt=Infinity;this.V={};this.Y=new Map;this.state=this.B9=0;this.C=null;this.isManifestless=!1;this.dA=[];this.G=null;this.FS=0;this.j="";this.vD=NaN;this.aE=this.Y5=this.timestampOffset=this.N=0;this.cU=this.SG=NaN;this.Nm=0;this.Rq=this.O=
!1;this.s6=[];this.hq={};this.Tt=this.xW=NaN;this.nF={hYD:a=>{aZ(this,a)}};
this.O6=k?.yz("html5_use_network_error_code_enums");fwf=!!k&&k.yz("html5_modern_vp9_mime_type");mJ=!!k?.yz("html5_enable_flush_during_seek")&&g.ce();sS=!!k?.yz("html5_enable_reset_audio_decoder")&&g.ce()}isLoading(){return this.state===1}vZ(){return this.state===3}Kp(){return g.vB(this.V,Z=>!!Z.info.video&&Z.info.video.qualityOrdinal>=2160)}L(){return g.vB(this.V,Z=>!!Z.info.contentProtection)}qX(Z){var k=Z.getElementsByTagName("Representation");
if(Z.getElementsByTagName("SegmentList").length>0||Z.getElementsByTagName("SegmentTemplate").length>0){this.Rn=this.D=!0;this.C||(this.C=new LRb);lRy(this.C,Z);this.publish("refresh");for(Z=0;Z<k.length;Z++){var N=L6U(this,k[Z]);if(!this.V[N.id]){var a=ly(eg(k[Z],"BaseURL").textContent),T=eg(k[Z],"Initialization"),K=Sg(T,"sourceURL");T=uI(Sg(T,"range"));this.V[N.id]=new Vj(a,N,K,T)}N=this.V[N.id];K=Sg(k[Z],"id","AdaptationSet");K=K!==""?K:Sg(k[Z],"mimetype","AdaptationSet");a=this.C;K=a.D[N.info.id]||
a.U[K]||a.V||null;a=K.V;!this.N&&K.getStreamTimeOffset()&&(this.N=K.getStreamTimeOffset());if(K.L){T=[];for(var y of a){a=N.info.id;var Q=N.info.UH*8,q=y.Cp,r=y.startSecs,C=K.j.split("$$");for(var m=0;m<C.length;m++)C[m]=C[m].replace("$RepresentationID$",a),C[m]=C[m].replace("$Number$",q.toString()),C[m]=C[m].replace("$Bandwidth$",Q.toString()),C[m]=C[m].replace("$Time$",r.toString());T.push(new UM(y.Cp,y.startSecs,y.Xl,y.V,C.join("$"),null,y.U))}a=T}else{K=HB(eg(k[Z],"SegmentList").getElementsByTagName("SegmentURL"),
K.G);r=[];for(C=0;C<K.length;C++){T=r;Q=T.push;m=void 0;var A=K[C];q=a[C];let P=A.getAttribute("media");if(A=A.getAttribute("mediaRange")){const d=A.split("-");d[1]&&Number(d[1])>=0?m=uI(A):P=`${P}?range=${A}`}Q.call(T,new UM(q.Cp,q.startSecs,q.Xl,q.V,P,m,q.U))}a=r}N.update(a,this.isLive,this.tq)}fRb(this.C);return!0}this.duration=L9f(Sg(Z,"mediaPresentationDuration"));a:{for(y=0;y<k.length;y++){a=k[y];Z=L6U(this,a);N=ly(eg(a,"BaseURL").textContent);K=eg(a,"SegmentBase");a=uI(K.attributes.getNamedItem("indexRange").value);
K=uI(K.getElementsByTagName("Initialization")[0].attributes.getNamedItem("range").value);Z=new qM(N,Z,K,a);if(!Z){k=!1;break a}aZ(this,Z)}k=!0}return k}MX(Z){return this.C?HB(this.C.Y,Z):this.dA.length?HB(this.dA,Z):[]}refresh(){if(!this.isLoading()&&!this.jm()){var Z=g.mW(this.sourceUrl,{start_seq:Vsy(this).toString()});yNN(this,Z).eK(()=>{})}}resume(){qLr(this)}zi(){if(this.isManifestless&&this.U&&d_(this))return d_(this);
const Z=this.V;let k=!1,N=NaN,a=NaN;for(const K in Z){const y=Z[K];var T=y.index;if(!T.isLoaded()||O9(y.info.mimeType))continue;y.zt&&(k=!0);T=T.CA();y.info.H9()&&(isNaN(N)||T<N)?N=T:y.info.xT()&&(isNaN(a)||T<a)&&(a=T)}return k||isNaN(a)?N:Math.min(N,a)}Vt(){if(this.isManifestless){if(X3(this))return X3(this);if(this.Nm){var Z=this.HG(this.zi());if(Z&&(Z-=this.Nm,Z>0))return this.zi()-Z}}Z=this.V;for(const k in Z){const N=Z[k].index;if(N.isLoaded()&&!O9(Z[k].info.mimeType))return N.Vt()}return 0}getStreamTimeOffset(){return this.N}HG(Z){for(const k in this.V){const N=
this.V[k].index;if(N.isLoaded()){const a=N.pn(Z),T=N.HG(a);if(T)return T+Z-N.getStartTime(a)}}return NaN}pF(){for(const Z in this.V)this.V.hasOwnProperty(Z)&&(this.V[Z].U=null,this.V[Z].Vz=!1)}};g.Zu.prototype.Qz=NR(4);var fwf,mJ,sS,ln=null,g_=!!navigator.mediaCapabilities?.decodingInfo,XX0={commentary:1,alternate:2,dub:3,main:4};var GL=new Set,w_=new Map;var DJr=class{constructor(Z){this.Jq=Z;this.jY=this.Gh=this.FS=this.L=this.Y=this.u7=this.tq=this.Vz=!1;this.j=this.G=0;this.Qz=!1;this.O=!0;this.Kp=!1;this.Eq=0;this.Rq=this.Sm=this.E4=this.dA=!1;this.U={};this.Tt=this.O6=this.HA=this.disableAv1=this.zt=this.bq=this.s6=this.hq=this.V=this.C=!1;this.xW=0;this.Ap=this.Jq.B("html5_disable_aac_preference");this.r5=Infinity;this.xY=0;this.xl=this.Jq.Xa();this.qX=this.Jq.experiments.yz("html5_enable_vp9_fairplay");this.FN=this.Jq.B("html5_force_av1_for_testing");
this.tW=this.Jq.Yl().V.Aq(xEr);this.MX=g.Q5(this.Jq.experiments,"html5_av1_ordinal_cap");this.ov=this.Jq.B("html5_disable_hfr_when_vp9_encrypted_2k4k_unsupported");this.hp=this.Jq.B("html5_account_onesie_format_selection_during_format_filter");this.UH=g.Q5(this.Jq.experiments,"html5_max_byterate");this.pF=this.Jq.B("html5_enable_iamf_audio");this.vD=this.Jq.experiments.yz("html5_allow_capability_merge");this.iq=this.Jq.B("html5_enable_encrypted_av1")}};var Wf=class{constructor(Z,k,N,a){this.flavor=Z;this.keySystem=k;this.D=N;this.experiments=a;this.U={};this.fP=this.keySystemAccess=null;this.Eu=this.HM=-1;this.xO=null;this.Y=!!a&&a.yz("edge_nonprefixed_eme");a&&a.yz("html5_enable_vp9_fairplay")}clone(Z){return new Wf(this.flavor,Z,this.D,this.experiments)}V(){return this.keySystem==="com.youtube.fairplay.sbdl"}Vn(){return{flavor:this.flavor,keySystem:this.keySystem}}getInfo(){switch(this.keySystem){case "com.youtube.playready":return"PRY";case "com.microsoft.playready":return"PRM";
case "com.widevine.alpha":return"WVA";case "com.youtube.widevine.l3":return"WVY";case "com.youtube.fairplay":return"FPY";case "com.youtube.fairplay.sbdl":return"FPC";case "com.apple.fps.1_0":return"FPA";default:return this.keySystem}}},IZ={playready:["com.youtube.playready","com.microsoft.playready"],widevine:["com.youtube.widevine.l3","com.widevine.alpha"]},GLi={widevine:"DRM_SYSTEM_WIDEVINE",fairplay:"DRM_SYSTEM_FAIRPLAY",playready:"DRM_SYSTEM_PLAYREADY"},tJG={widevine:1,fairplay:2,playready:3};var wMG=class extends g.jR{constructor(Z,k,N,a=!1,T){super();this.Jq=k;this.useCobaltWidevine=a;this.U6=T;this.U=[];this.D={};this.V={};this.callback=null;this.L=!1;this.Y=[];this.initialize(Z,!N)}initialize(Z,k){for(const a of Object.keys(Z)){var N=a;for(const T of Z[N])if(T.contentProtection)for(const K of Object.keys(T.contentProtection)){N=K;let y=IZ[K];!y&&this.B("html5_enable_vp9_fairplay")&&N==="fairplay"&&(y=["com.youtube.fairplay.sbdl"]);if(y)for(const Q of y)this.D[Q]=this.D[Q]||new Wf(N,
Q,T.contentProtection[N],this.Jq.experiments),this.V[N]=this.V[N]||{},this.V[N][T.mimeType]=!0}}He()&&(this.D["com.youtube.fairplay"]=new Wf("fairplay","com.youtube.fairplay","",this.Jq.experiments),this.B("html5_enable_vp9_fairplay")||(this.V.fairplay=this.V.fairplay||{},this.V.fairplay['video/mp4; codecs="avc1.4d400b"']=!0,this.V.fairplay['audio/mp4; codecs="mp4a.40.5"']=!0));this.U=gPf(k,this.useCobaltWidevine,this.B("html5_enable_safari_fairplay")&&!0,this.B("html5_enable_vp9_fairplay")).filter(a=>
!!this.D[a])}B(Z){return this.Jq.experiments.yz(Z)}},jL;var hBG={"":"LIVE_STREAM_MODE_UNKNOWN",dvr:"LIVE_STREAM_MODE_DVR",lp:"LIVE_STREAM_MODE_LP",post:"LIVE_STREAM_MODE_POST",window:"LIVE_STREAM_MODE_WINDOW",live:"LIVE_STREAM_MODE_LIVE"};var u5i={OFF:"0",ON:"1",iH:"2",G2:"3"};var lzf={RED:"red",XID:"white"};var fzy=class{constructor(Z){Z=yS(Z.serializedClientExperimentFlags??"","&");this.flags=new Map(Object.entries(Z).map(([k,N])=>typeof N==="string"?[k,N]:[k,N[0]]))}Aq(Z){if(Z.mU!==3)throw Error("WpccFlagRetriever only supports WPCC flags");
return UJR(this,Z)}yz(Z){return this.flags.get(`${Z}`)==="true"}};var BZ0=class{constructor(Z,k,N){this.V=void 0;this.experimentIds=Z?Z.split(","):[];this.flags=yS(k||"","&");Z={};for(const a of this.experimentIds)Z[a]=!0;this.experiments=Z;N=new fzy(N);this.D=new TDj(N);this.U=new agb(N)}Yl(){return this.D}Un(){return this.U}yz(Z){Z=this.Aq(Z);JSON.stringify(Z);return Z==="true"}Aq(Z){return this.flags[Z]}};var DTb=Promise.resolve(),Ooy=Z=>DTb.then(Z),W6i=window.queueMicrotask?window.queueMicrotask.bind(window):Ooy;var waG=class{constructor(Z,k,N=!1){this.experiments=Z;this.zt=k;this.xW=N;this.C=!!g.Vf("cast.receiver.platform.canDisplayType");this.j={};this.N=!1;this.D=new Map;this.G=!0;this.V=this.U=!1;this.Vz=0;this.O=this.experiments.yz("html5_disable_vp9_encrypted");this.Y=this.experiments.yz("html5_enable_encrypted_av1");Z=g.Vf("cast.receiver.platform.getValue");this.L=!this.C&&Z&&Z("max-video-resolution-vpx")||null;Msy(this);this.U=!!(He()&&mp()>=21)}canPlayType(Z,k){Z=Z.canPlayType?Z.canPlayType(k):!1;
Yh?Z=Z||veR[k]:NE===2.2?Z=Z||ioU[k]:Pe()&&(Z=Z||ge0[k]);return!!Z}isTypeSupported(Z){return this.C?window.cast.receiver.platform.canDisplayType(Z):m8(Z)}},ioU={'video/mp4; codecs="avc1.42001E, mp4a.40.2"':"maybe"},ge0={"application/x-mpegURL":"maybe"},veR={"application/x-mpegURL":"maybe"};var $Tf=class extends g.n9{constructor(){super();this.items={}}add(Z,k){if(!this.items[Z]&&(k.a7||k.g4z||k.IG)){var N=this.items;let a=k;Object.isFrozen&&!Object.isFrozen(k)&&(a=Object.create(k),Object.freeze(a));N[Z]=a;this.publish("vast_info_card_add",Z)}}remove(Z){const k=this.get(Z);delete this.items[Z];return k}get(Z){return this.items[Z]||null}isEmpty(){return g.ze(this.items)}};var xTX=class{constructor(Z,k){this.V=Z;this.cipher=this.V.exports.AES128CTRCipher_create(k.byteOffset)}encrypt(Z){this.V.exports.AES128CTRCipher_encrypt(this.cipher,Z.byteOffset,Z.byteLength);return Z}jm(){return this.cipher===0}dispose(){this.V.exports.AES128CTRCipher_release(this.cipher);this.cipher=0}};var acy=class{constructor(){this.U=this.CE=0;this.V=Array.from({length:Ql.length}).fill(0)}Wd(Z,k=1){this.CE+=k;this.U+=Z;Z/=k;for(let N=0;N<Ql.length&&!(Z<Ql[N]);++N)this.V[N]+=k}toString(){return""}},Ql=[20,100,500,2E3];var GtR=class{},S6N=class{constructor(){this.startTimeMs=(0,g.z)();this.V=!1}},eBi=class{constructor(){this.V=new GtR}isActive(){return!0}C$(Z,k){if(k){var N=this;for(const a in k){if(!k.hasOwnProperty(a))continue;const T=Z.prototype[a],K=k[a];Z.prototype[a]=function(...y){const Q=this,q=(0,g.z)(),r=T.apply(Q,y);return Nji(N,r,null,q,C=>K.apply(Q,[C].concat(y)))}}}}uD(){return new S6N}NL(Z,k,N=1){k instanceof S6N&&(Tjy(this,Z,(0,g.z)()-k.startTimeMs,N),k.V=!0)}rq(Z,k){const N=(0,g.z)();
k=k();Nji(this,k,Z,N)}vK(){const Z={};for(const N in this.V){if(!this.V.hasOwnProperty(N))continue;a:{var k=this.V[N];if(k.CE===0){k=null;break a}let a=Math.ceil(k.CE).toFixed(0)+"."+k.U.toFixed(0);for(let T=0;T<Ql.length;++T)if(k.V[T]>0)a+="."+Ql[T].toFixed(0)+"_"+k.V[T].toFixed(0);else break;k=a}k&&(Z[N]=k)}this.V=new GtR;return Z}toString(){return""}};var qE=new class{isActive(){return!1}C$(){}uD(){}NL(){}rq(Z,k){k()}vK(){return{}}toString(){return""}},oei=!!+ZA("html5_enable_profiler"),Jbf=!!+ZA("html5_onesie_enable_profiler"),rY=oei||Jbf?new eBi:qE,BTi=oei?rY:qE,KQ=Jbf?rY:qE;var zBi=class{emscripten_notify_memory_growth(){}},UTr=class{constructor(){this.proc_exit=()=>{};
this.fd_write=(Z,k,N)=>{if(!this.exports)return 1;Z=new Uint32Array(this.exports.memory.buffer,k,N*2);k=[];for(let T=0;T<N;++T){var a=new Uint8Array(this.exports.memory.buffer,Z[T*2],Z[T*2+1]);a=g.Lv(a);k.push(a)}return k.reduce((T,K)=>T+K.length,0)}}},qBy=class{constructor(){this.env=new zBi;
this.wasi_snapshot_preview1=new UTr}};var Q7=class{constructor(Z,k,N){this.instance=Z;this.V=N;this.exports=this.instance.exports;k.wasi_snapshot_preview1.exports=this.exports;Z=Math.floor(Math.random()*256);k=Math.floor(Math.random()*256);N=0;try{N=this.exports.malloc(16);(new Uint8Array(this.exports.memory.buffer,N,16)).fill(Z);if(this.exports.sentinel(N,16,k)!==k*16%256)throw"wasm.wm.vi";const a=new Uint8Array(this.exports.memory.buffer,N,16);for(let T=0;T<16;T++)if(a[T]!==(Z+k)%256)throw`wasm.wm.vi${T}`;}finally{N!==0&&this.exports.free(N)}}malloc(Z){return this.exports.malloc(Z)}free(Z){this.exports.free(Z)}realloc(Z,
k){return this.exports.realloc(Z,k)}uh(Z){var k=this.malloc(Z.byteLength);k=new Uint8Array(this.exports.memory.buffer,k,Z.byteLength);k.set(Z);return k}Oo(Z){const k=Z.slice();Z.buffer===this.exports.memory.buffer&&this.free(Z.byteOffset);return k}},mUr=new class{constructor(){this.V="WebAssembly"in window}},y7="WebAssembly"in window&&("instantiateStreaming"in window.WebAssembly||"instantiate"in window.WebAssembly);KQ.C$(Q7,{uh:Z=>({profile:"copyj2w",CE:Z===void 0?0:Math.ceil(Z.byteLength/16)}),
Oo:Z=>({profile:"copyw2j",CE:Z===void 0?0:Math.ceil(Z.byteLength/16)})});var bo0=class{constructor(Z,k,N){this.V=Z;this.Y=!1;k=this.V.uh(k);this.U=new xTX(Z,k);this.V.free(k.byteOffset);N&&(this.D=this.V.uh(N))}encrypt(Z,k){return A8N(this,Z,k,!1).D8}jm(){return this.Y}dispose(){this.jm()||(g.nM(this.U),this.D&&this.V.free(this.D.byteOffset),this.Y=!0)}};var paU=class{constructor(Z,k,N){this.V=new bo0(Z,k,N)}encrypt(Z,k){try{return this.V.encrypt(Z,k)}catch(N){hn(N,"wasm ocwce"),g.L9(N)}}U(Z,k){try{const N=A8N(this.V,Z,k,!0);return{D8:N.D8,signature:N.signature}}catch(N){hn(N,"wasm ocwceas"),g.L9(N)}}jm(){return this.V.jm()}dispose(){this.V.dispose()}};var RBf=class extends g.jR{constructor(Z,k,N){super();this.encryptedClientKey=k;this.j=N;this.U=new Uint8Array(Z.buffer,0,16);this.D=new Uint8Array(Z.buffer,16)}G(Z){this.V=new paU(Z,this.U,this.D);g.u(this,this.V)}};var MJR=class extends g.jR{constructor(Z,k){super();if(!k&&Z)try{k=JSON.parse(Z)}catch{}if(k){Z=k.clientKey?rr(k.clientKey):null;var N=k.encryptedClientKey?rr(k.encryptedClientKey):null,a=k.keyExpiresInSeconds?Number(k.keyExpiresInSeconds)*1E3+(0,g.z)():null;Z&&N&&a&&(this.V=new RBf(Z,N,a),g.u(this,this.V));k.onesieUstreamerConfig&&(this.onesieUstreamerConfig=rr(k.onesieUstreamerConfig)||void 0);this.baseUrl=k.baseUrl}}};var neG=class extends g.jR{constructor(){super();this.values={};this.SV={};this.U={};this.D=this.V=0;this.Y=new g.Uc(()=>{c8G(this)},1E4);
g.u(this,this.Y)}};var Izf="blogger discover-ads ads-preview ads-fe gac books docs duo flix google-live google-one play play-ads shopping chat hangouts-meet photos-edu picasaweb gmail jamboard".split(" "),XY0={EE:"caoe",HP:"capsv",WP:"cbrand",NP:"cbr",T9:"cbrver",pV:"cchip",LV:"ccappver",lF:"ccrv",lI:"cfrmver",oZ:"c",Yk:"cver",Dg:"ctheme",xk:"cplayer",S6:"cmodel",Eg:"cnetwork",mN:"cos",OS_VERSION:"cosver",nO:"cplatform",XDX:"crqyear"},jTG=class extends g.jR{constructor(Z,k,N,a){super();this.webPlayerContextConfig=k;
this.Ox=a;this.csiServiceName=this.csiPageType="";this.userAge=NaN;this.xd=this.Tt=this.tW=this.ix=this.userDisplayName=this.userDisplayImage=this.GF="";this.Jd=null;this.V={};this.pF={};this.controlsType="0";this.aM=NaN;this.Qz=!1;this.PG=(0,g.z)();this.l9=this.O6=0;this.Vp=this.hB=!1;this.FE=!0;this.preferGapless=this.yI=this.gD=this.D=this.NW=!1;this.JB=[];this.hI=!1;this.J0=0;Z=Z?g.Rn(Z):{};k&&k.csiPageType&&(this.csiPageType=k.csiPageType);k&&k.csiServiceName&&(this.csiServiceName=k.csiServiceName);
k&&k.preferGapless&&(this.preferGapless=k.preferGapless);this.experiments=new BZ0(k?k.serializedExperimentIds:Z.fexp,k?k.serializedExperimentFlags:Z.fflags,k??{});this.forcedExperiments=k?k.serializedForcedExperimentIds:iR("",Z.forced_experiments)||void 0;this.cspNonce=k?.cspNonce?k.cspNonce:iR("",Z.csp_nonce);this.B("web_player_deprecated_uvr_killswitch");try{var T=document.location.toString()}catch(A){T=""}this.Ke=T;this.ancestorOrigins=(a=window.location.ancestorOrigins)?Array.from(a):[];this.Y=
Be(!1,k?k.isEmbed:Z.is_embed);if(k&&k.device){if(a=k.device,a.androidOsExperience&&(this.V.caoe=`${a.androidOsExperience}`),a.androidPlayServicesVersion&&(this.V.capsv=`${a.androidPlayServicesVersion}`),a.brand&&(this.V.cbrand=a.brand),a.browser&&(this.V.cbr=a.browser),a.browserVersion&&(this.V.cbrver=a.browserVersion),a.cobaltReleaseVehicle&&(this.V.ccrv=`${a.cobaltReleaseVehicle}`),this.V.c=a.interfaceName||"WEB",this.V.cver=a.interfaceVersion||"html5",a.interfaceTheme&&(this.V.ctheme=a.interfaceTheme),
this.V.cplayer=a.interfacePlayerType||"UNIPLAYER",a.model&&(this.V.cmodel=a.model),a.network&&(this.V.cnetwork=a.network),a.os&&(this.V.cos=a.os),a.osVersion&&(this.V.cosver=a.osVersion),a.platform&&(this.V.cplatform=a.platform),T=Zf(this.experiments,"html5_log_vss_extra_lr_cparams_freq"),T==="all"||T==="once")a.chipset&&(this.pF.cchip=a.chipset),a.cobaltAppVersion&&(this.pF.ccappver=a.cobaltAppVersion),a.firmwareVersion&&(this.pF.cfrmver=a.firmwareVersion),a.deviceYear&&(this.pF.crqyear=a.deviceYear)}else this.V.c=
Z.c||"web",this.V.cver=Z.cver||"html5",this.V.cplayer="UNIPLAYER";this.loaderUrl=k?this.Y||Hvj(this)&&k.loaderUrl?k.loaderUrl||"":this.Ke:this.Y||Hvj(this)&&Z.loaderUrl?iR("",Z.loaderUrl):this.Ke;this.Y&&g.X0("yt.embedded_player.embed_url",this.loaderUrl);this.Rq=t5()||uR();this.C=Xi(this.loaderUrl,wVy)||!1;a=this.loaderUrl;this.Pl=d8(Xi(a,gxi),a,!1,"Trusted Ad Domain URL");this.HA=Be(!1,Z.privembed);this.protocol=this.Ke.indexOf("http:")===0?"http":"https";this.Bo=zAb((k?k.customBaseYoutubeUrl:Z.BASE_YT_URL)||
"")||zAb(this.Ke)||`${this.protocol}://www.youtube.com/`;a=k?k.eventLabel:Z.el;T="detailpage";a==="adunit"?T=this.Y?"embedded":"detailpage":a==="embedded"||this.C?T=Dm(T,a,sTf):a&&(T="embedded");this.zt=T;f5f();a=null;T=k?k.playerStyle:Z.ps;const K=g.KK(Izf,T);!T||K&&!this.C||(a=T);this.playerStyle=a;this.G=g.KK(Izf,this.playerStyle);this.houseBrandUserStatus=k?.houseBrandUserStatus;this.O=this.G&&this.playerStyle!=="play"&&this.playerStyle!=="jamboard";this.gZ=!this.O;this.Sm=Be(!1,Z.disableplaybackui);
this.disablePaidContentOverlay=Be(!1,k?.disablePaidContentOverlay);this.disableSeek=Be(!1,k?.disableSeek);this.enableSpeedOptions=k?.enableSpeedOptions||(q9().defaultPlaybackRate?jd||g.h5||oZ?g.SL&&Vd("20")||g.Cf&&Vd("4")||g.vQ&&Vd("11")||LE():!(g.vQ&&!g.A5("chrome")||jd||g.A5("android")||g.A5("silk")):!1);this.eP=Be(!1,Z.enable_faster_speeds);this.supportsVarispeedExtendedFeatures=k?.supportsVarispeedExtendedFeatures??!1;this.U=Be(this.playerStyle==="blazer",Z.is_html5_mobile_device||k&&k.isMobileDevice);
this.y9=this.B("mweb_allow_background_playback")?!1:this.U&&!this.G;this.FS=A_();this.XM=g.Og;this.pH=!!k?.embedsHostFlags?.optOutApiDeprecation;var y;k?k.hideInfo!==void 0&&(y=!k.hideInfo):y=Z.showinfo;this.D4=g.PQ(this)&&!this.pH||Be(!A4(this)&&!cQ(this)&&!this.G,y);this.x9=k?!!k.mobileIphoneSupportsInlinePlayback:Be(!1,Z.playsinline);y=this.U&&gr&&NE!=null&&NE>0&&NE<=2.3;a=k?k.useNativeControls:Z.use_native_controls;this.j=g.PQ(this)&&this.U;T=this.U&&!this.j;a=g.ml(this)||!y&&Be(T,a)?"3":"1";
this.disableOrganicUi=!!k?.disableOrganicUi;T=k?k.controlsType:Z.controls;this.controlsType=this.disableOrganicUi||T==="0"||T===0?"0":a;this.fN=this.U;this.controlsType==="1"&&(this.fN||Dm("2",k?k.autohide:Z.autohide,u5i));this.color=Dm("red",k?k.progressBarColor:Z.color,lzf);this.pE=this.controlsType==="3";this.r5=!this.Y;this.Yh=(a=!this.r5&&!cQ(this)&&!this.O&&!this.G&&!A4(this))&&!this.pE&&this.controlsType==="1";this.Ap=g.s$(this)&&a&&this.controlsType==="0"&&!this.Yh&&!k?.embedsEnableEmc3ds;
this.Wj=this.Sb=y;this.iq=(this.controlsType==="3"||this.U||Be(!1,Z.use_media_volume))&&!this.j;this.d9=VL&&!g.hg(601)?!1:!0;this.ef=this.Y||!1;this.LC=cQ(this)?"":(this.loaderUrl||Z.post_message_origin||"").substring(0,128);this.widgetReferrer=iR("",k?k.widgetReferrer:Z.widget_referrer);var Q;k?k.disableCastApi&&(Q=!1):Q=Z.enablecastapi;Q=!this.C||Be(!0,Q);y=!0;k&&k.disableMdxCast&&(y=!1);this.Vg=this.B("enable_cast_for_web_unplugged")&&g.CQ(this)&&y||g.oJ(this)&&y||Q&&y&&this.controlsType==="1"&&
!this.U&&(cQ(this)||g.s$(this)||g.HQ(this));this.wh=!!window.document.pictureInPictureEnabled||s9();Q=k?!!k.supportsAutoplayOverride:Be(!1,Z.autoplayoverride);this.mq=!(this.U&&!g.PQ(this))&&!g.A5("nintendo wiiu")||Q;this.A1=(k?!!k.enableMutedAutoplay:Be(!1,Z.mutedautoplay))&&!1;Q=(cQ(this)||A4(this))&&this.playerStyle==="blazer";this.oE=k?!!k.disableFullscreen:!Be(!0,Z.fs);y=g.xq(g.dr(this))&&g.PQ(this);this.hq=!this.oE&&(Q||g.z4())&&!y;this.YF=this.B("html5_picture_in_picture_logging_onresize");
this.dG=g.Q5(this.experiments,"html5_picture_in_picture_logging_onresize_ratio")??.33;this.zC=this.B("html5_picture_in_picture_blocking_onresize");this.US=this.B("html5_picture_in_picture_blocking_ontimeupdate");this.xF=this.B("html5_picture_in_picture_blocking_document_fullscreen");this.o8=this.B("html5_picture_in_picture_blocking_standard_api");Q=Pe()&&Vd(58)&&!uR();y=Yh||typeof MediaSource==="undefined";this.rD=this.B("uniplayer_block_pip")&&(Q||y)||this.zC||this.US||this.o8;Q=g.PQ(this)&&!this.pH;
var q;k?k.disableRelatedVideos!==void 0&&(q=!k.disableRelatedVideos):q=Z.rel;this.bq=Q||Be(!this.G,q);this.It=Be(!1,k?k.enableContentOwnerRelatedVideos:Z.co_rel);this.N=uR()&&NE>0&&NE<=4.4?"_top":"_blank";this.j9=g.HQ(this);this.SK=Be(this.playerStyle==="blazer",k?k.enableCsiLogging:Z.enablecsi);switch(this.playerStyle){case "blogger":q="bl";break;case "discover-ads":q="dd";break;case "gmail":q="gm";break;case "gac":q="ga";break;case "ads-preview":q="ap";break;case "ads-fe":q="adfe";break;case "books":q=
"gb";break;case "docs":case "flix":q="gd";break;case "duo":q="gu";break;case "google-live":q="gl";break;case "google-one":q="go";break;case "play":case "play-ads":q="gp";break;case "chat":q="hc";break;case "hangouts-meet":q="hm";break;case "photos-edu":case "picasaweb":q="pw";break;default:q="yt"}this.Vz=q;this.xW=iR("",k?k.authorizedUserIndex:Z.authuser);this.xl=g.PQ(this)&&(this.HA||!KE()||this.Rq);var r;k?k.disableWatchLater!==void 0&&(r=!k.disableWatchLater):r=Z.showwatchlater;this.hp=((q=!this.xl)||
!!this.xW&&q)&&Be(!this.O,this.C?r:void 0);this.qX=k?k.isMobileDevice||!!k.disableKeyboardControls:Be(!1,Z.disablekb);this.loop=Be(!1,Z.loop);this.pageId=iR("",k?k.initialDelegatedSessionId:Z.pageid);this.mX=Be(!0,Z.canplaylive);this.Gy=this.experiments.yz("html5_lr_overwrite_default_audio_quality_setting")?1:2;this.ES=Be(!1,Z.livemonitor);this.disableSharing=Be(this.G,k?k.disableSharing:Z.ss);(r=k&&this.B("fill_video_container_size_override_from_wpcc")?k.videoContainerOverride:Z.video_container_override)?
(q=r.split("x"),q.length!==2?r=null:(r=Number(q[0]),q=Number(q[1]),r=isNaN(r)||isNaN(q)||r*q<=0?null:new g.i0(r,q))):r=null;this.LA=r;this.mute=k?!!k.startMuted:Be(!1,Z.mute);this.storeUserVolume=!this.mute&&Be(this.controlsType!=="0",k?k.storeUserVolume:Z.store_user_volume);r=k?k.annotationsLoadPolicy:Z.iv_load_policy;this.annotationsLoadPolicy=this.controlsType==="3"?3:Dm(void 0,r,DB);this.captionsLanguagePreference=k?k.captionsLanguagePreference||"":iR("",Z.cc_lang_pref);r=Dm(2,k?k.captionsLanguageLoadPolicy:
Z.cc_load_policy,DB);this.controlsType==="3"&&r===2&&(r=3);this.g0=r;this.ov=k?k.hl||"en_US":iR("en_US",Z.hl);this.region=k?k.contentRegion||"US":iR("US",Z.cr);this.hostLanguage=k?k.hostLanguage||"en":iR("en",Z.host_language);this.TU=!this.HA&&Math.random()<g.Q5(this.experiments,"web_player_api_logging_fraction");this.tq=!this.HA;this.enabledEngageTypes=new Set;this.deviceIsAudioOnly=!!k?.deviceIsAudioOnly;this.aM=Ov(this.aM,Z.ismb);this.gZ?(r=Z.vss_host||"s.youtube.com",r==="s.youtube.com"&&(r=ki(this.Bo)||
"www.youtube.com")):r="video.google.com";this.lf=r;XJ(this,Z,!0);this.vD=new $Tf;g.u(this,this.vD);q=k?k.innertubeApiKey:iR("",Z.innertube_api_key);Q=k?k.innertubeApiVersion:iR("",Z.innertube_api_version);r=k?k.innertubeContextClientVersion:iR("",Z.innertube_context_client_version);q=g.G("INNERTUBE_API_KEY")||q;Q=g.G("INNERTUBE_API_VERSION")||Q;y=g.G("INNERTUBE_CONTEXT_CLIENT_CONFIG_INFO");a=Yy(this);T=typeof this.V.c==="number"?Number(this.V.c):Object.keys(M8r).indexOf(this.V.c);this.LX={innertubeApiKey:q,
innertubeApiVersion:Q,L_:y,P7:a,tj:T,innertubeContextClientVersion:g.G("INNERTUBE_CONTEXT_CLIENT_VERSION")||r,CL:this.hostLanguage,Zq:this.region,j1:g.G("INNERTUBE_HOST_OVERRIDE")||"",ZD:!!g.G("INNERTUBE_USE_THIRD_PARTY_AUTH",!1),MU:!!g.G("INNERTUBE_OMIT_API_KEY_WHEN_AUTH_HEADER_IS_PRESENT",!1)};this.IV=window.WebKitPlaybackTargetAvailabilityEvent!=null;this.L=new waG(this.experiments,this.B("html5_force_hfr_support")?!0:yw(this)||d$()||hzf()||L4y(this),g.Cf&&g.hg(56)||g.SL&&g.hg(54)||this.B("html5_force_vp9_subsample_encryption_support")||
L4y(this));this.enableSafetyMode=k?.initialEnableSafetyMode??Be(!1,Z.enable_safety_mode);r=this.Sm?!1:cQ(this)&&this.playerStyle!=="blazer";var C;k?k.disableAutonav!=null&&(C=!k.disableAutonav):C=Z.allow_autonav;this.FN=Be(r,!this.O&&C);this.sendVisitorIdHeader=k?!!k.sendVisitorIdHeader:Be(!1,Z.send_visitor_id_header);let m;this.playerStyle==="docs"&&(k?m=k.disableNativeContextMenu:m=Z.disable_native_context_menu);this.disableNativeContextMenu=Be(!1,m);this.sN=yw(this)&&this.B("enable_skip_intro_button");
this.embedConfig=iR("",k?k.serializedEmbedConfig:Z.embed_config);this.dA=$q(Z,g.PQ(this));this.D=this.dA==="EMBEDDED_PLAYER_MODE_PFL";this.embedsErrorLinks=!!k?.embedsErrorLinks;this.YH=Be(!1,Z.full_window);this.MX=!this.webPlayerContextConfig?.chromeless;this.livingRoomAppMode=Dm("LIVING_ROOM_APP_MODE_UNSPECIFIED",Z.living_room_app_mode||k?.device?.livingRoomAppMode,QFr);C=Ov(NaN,k?.device?.deviceYear);isNaN(C)||(this.deviceYear=C);this.transparentBackground=k?!!k.transparentBackground:Be(!1,Z.transparent_background);
this.showMiniplayerButton=k?!!k.showMiniplayerButton:Be(!1,Z.show_miniplayer_button);this.externalFullscreen=g.PQ(this)&&!k?.embedsHostFlags?.allowSetFauxFullscreen?!1:k?!!k.externalFullscreen:Be(!1,Z.external_fullscreen);this.showMiniplayerUiWhenMinimized=k?!!k.showMiniplayerUiWhenMinimized:Be(!1,Z.use_miniplayer_ui);this.FE=k&&k.hideLoopVideoToggle!==void 0?!k.hideLoopVideoToggle:Z.show_loop_video_toggle??!0;this.gF=Math.random()<1E-4;if(Z.onesie_hot_config||k?.onesieHotConfig)this.jY=new MJR(Z.onesie_hot_config,
k?.onesieHotConfig),g.u(this,this.jY);this.isTectonic=k?!!k.isTectonic:!!Z.isTectonic;this.playerCanaryState=N;this.playerCanaryStage=k?.canaryStage;this.qY=new neG;g.u(this,this.qY);this.datasyncId=k?.datasyncId||g.G("DATASYNC_ID");this.lk=g.G("LOGGED_IN",!1);this.KN=k?.allowWoffleManagement||!1;this.J$=Infinity;this.Oq=NaN;this.livingRoomPoTokenId=k?.livingRoomPoTokenId;this.B("html5_high_res_logging_always")?this.gD=!0:this.gD=Math.random()*100<g.Q5(this.experiments,"html5_high_res_logging_percent");
this.yI=!!k?.embedsHostFlags?.allowRcat;this.qf=!g.CQ(this)&&!LQ(this);Z=Z.embedded_player_response?JSON.parse(Z.embedded_player_response).trackingParams:void 0;Z&&(this.Ta=Z);this.dZ=!!this.webPlayerContextConfig?.embedsEnableEmc3ds}B(Z){return this.experiments.yz(Z)}Yl(){return this.experiments.Yl()}Un(){return this.experiments.Un()}getWebPlayerContextConfig(){return this.webPlayerContextConfig}getVideoUrl(Z,k,N,a,T,K,y){k={list:k};N&&(T?k.time_continue=N:k.t=N);N=y?"music.youtube.com":g.V7(this);
T=N==="www.youtube.com";!K&&a&&T?K=`https://youtu.be/${Z}`:g.CQ(this)?(K=`https://${N}/fire`,k.v=Z):(K&&T?(K=`${this.protocol}://${N}/shorts/${Z}`,a&&(k.feature="share")):(K=this.protocol+"://"+N+"/watch",k.v=Z),Yh&&(Z=jO())&&(k.ebc=Z));return g.mW(K,k)}getVideoEmbedCode(Z,k,N,a){k=`https://${g.V7(this)}/embed/${k}`;a&&(k=g.mW(k,{list:a}));a=N.width;N=N.height;k=Q2(k);Z=Q2(Z??"YouTube video player");return`<iframe width="${a}" height="${N}" src="${k}" title="${Z}"`+' frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>'}supportsGaplessAudio(){return g.Cf&&
!Yh&&CE()>=74||g.SL&&g.hg(68)?!0:!1}supportsGaplessShorts(){return!this.B("html5_enable_short_gapless")||this.Rq||g.v9?!1:!0}getPlayerType(){return this.V.cplayer}Xa(){return this.gD}pZ(){return this.Y&&this.B("embeds_enable_innertube_store")}},hGr=["www.youtube-nocookie.com","youtube.googleapis.com","www.youtubeeducation.com","youtubeeducation.com"],dUX=["EMBEDDED_PLAYER_LITE_MODE_UNKNOWN","EMBEDDED_PLAYER_LITE_MODE_NONE","EMBEDDED_PLAYER_LITE_MODE_FIXED_PLAYBACK_LIMIT","EMBEDDED_PLAYER_LITE_MODE_DYNAMIC_PLAYBACK_LIMIT"],
F4f=[19];var BjN={["140"]:{numChannels:2},["141"]:{numChannels:2},["251"]:{audioSampleRate:48E3,numChannels:2},["774"]:{audioSampleRate:48E3,numChannels:2},["380"]:{numChannels:6},["328"]:{numChannels:6},["773"]:{}},lcX={["1"]:'video/mp4; codecs="av01.0.08M.08"',["1h"]:'video/mp4; codecs="av01.0.12M.10.0.110.09.16.09.0"',["1e"]:'video/mp4; codecs="av01.0.08M.08"',["9"]:'video/webm; codecs="vp9"',["("]:'video/webm; codecs="vp9"',["9h"]:'video/webm; codecs="vp09.02.51.10.01.09.16.09.00"',h:'video/mp4; codecs="avc1.64001e"',
H:'video/mp4; codecs="avc1.64001e"',o:'audio/webm; codecs="opus"',a:'audio/mp4; codecs="mp4a.40.2"',ah:'audio/mp4; codecs="mp4a.40.2"',mac3:'audio/mp4; codecs="ac-3"; channels=6',meac3:'audio/mp4; codecs="ec-3"; channels=6',i:'audio/mp4; codecs="iamf.001.001.Opus"'},fci={["337"]:{width:3840,height:2160,bitrate:3E7,fps:30},["336"]:{width:2560,height:1440,bitrate:15E6,fps:30},["335"]:{width:1920,height:1080,bitrate:75E5,fps:30},["702"]:{width:7680,height:4320,bitrate:4E7,fps:60},["701"]:{width:3840,
height:2160,bitrate:2E7,fps:60},["700"]:{width:2560,height:1440,bitrate:1E7,fps:60},["412"]:{width:1920,height:1080,bitrate:85E5,fps:60,cryptoblockformat:"subsample"},["359"]:{width:1920,height:1080,bitrate:8E6,fps:30,cryptoblockformat:"subsample"},["411"]:{width:1920,height:1080,bitrate:3316E3,fps:60,cryptoblockformat:"subsample"},["410"]:{width:1280,height:720,bitrate:4746E3,fps:60,cryptoblockformat:"subsample"},["409"]:{width:1280,height:720,bitrate:1996E3,fps:60,cryptoblockformat:"subsample"},
["360"]:{width:1920,height:1080,bitrate:5331E3,fps:30,cryptoblockformat:"subsample"},["358"]:{width:1280,height:720,bitrate:3508E3,fps:30,cryptoblockformat:"subsample"},["357"]:{width:1280,height:720,bitrate:3206E3,fps:30,cryptoblockformat:"subsample"},["274"]:{width:1280,height:720,bitrate:1446E3,fps:30,cryptoblockformat:"subsample"},["315"]:{width:3840,height:2160,bitrate:2E7,fps:60},["308"]:{width:2560,height:1440,bitrate:1E7,fps:60},["303"]:{width:1920,height:1080,bitrate:5E6,fps:60},["302"]:{width:1280,
height:720,bitrate:25E5,fps:60},["299"]:{width:1920,height:1080,bitrate:75E5,fps:60},["298"]:{width:1280,height:720,bitrate:35E5,fps:60},["571"]:{width:7680,height:4320,bitrate:3E7,fps:60},["401"]:{width:3840,height:2160,bitrate:15E6,fps:60},["400"]:{width:2560,height:1440,bitrate:75E5,fps:60},["399"]:{width:1920,height:1080,bitrate:2E6,fps:60},["398"]:{width:1280,height:720,bitrate:1E6,fps:60},["397"]:{width:854,height:480,bitrate:4E5,fps:30},["396"]:{width:640,height:360,bitrate:25E4,fps:30},["787"]:{width:1080,
height:608,bitrate:2E5,fps:30},["788"]:{width:1080,height:608,bitrate:4E5,fps:30},["572"]:{width:7680,height:4320,bitrate:3E7,fps:60},["555"]:{width:3840,height:2160,bitrate:15E6,fps:60},["554"]:{width:2560,height:1440,bitrate:75E5,fps:60},["553"]:{width:1920,height:1080,bitrate:2E6,fps:60},["552"]:{width:1280,height:720,bitrate:1E6,fps:60},["551"]:{width:854,height:480,bitrate:4E5,fps:30},["550"]:{width:640,height:360,bitrate:25E4,fps:30},["313"]:{width:3840,height:2160,bitrate:8E6,fps:30},["271"]:{width:2560,
height:1440,bitrate:4E6,fps:30},["248"]:{width:1920,height:1080,bitrate:2E6,fps:30},["247"]:{width:1280,height:720,bitrate:15E5,fps:30},["244"]:{width:854,height:480,bitrate:52E4,fps:30},["243"]:{width:640,height:360,bitrate:28E4,fps:30},["137"]:{width:1920,height:1080,bitrate:4E6,fps:30},["136"]:{width:1280,height:720,bitrate:3E6,fps:30},["135"]:{width:854,height:480,bitrate:1E6,fps:30},["385"]:{width:1920,height:1080,bitrate:6503313,fps:60},["376"]:{width:1280,height:720,bitrate:5706960,fps:60},
["384"]:{width:1280,height:720,bitrate:3660979,fps:60},["225"]:{width:1280,height:720,bitrate:5805E3,fps:30},["224"]:{width:1280,height:720,bitrate:453E4,fps:30},["145"]:{width:1280,height:720,bitrate:2682052,fps:30}};var Ct=class{constructor(Z){this.V=Z}getInfo(){return this.V}U(){return null}L(){var Z=this.U();return Z?(Z=g.mm(Z.EH),Number(Z.expire)):NaN}Y(){}getHeight(){return this.V.video.height}};var Ovf=class{constructor(Z){this.itag=Z.itag;this.url=Z.url;this.codecs=Z.codecs;this.width=Z.width;this.height=Z.height;this.fps=Z.fps;this.bitrate=Z.bitrate;this.U=Z.audioItag?.split(",")||[];this.Ud=Z.Ud;this.contentProtection=Z.contentProtection||"";this.ZF=Z.ZF;this.audioChannels=Z.audioChannels;this.V=""}};var J8f=class{constructor(Z,k,N,a,T){this.D=Z;this.U=k;this.L=N;this.cpn=a;this.G=T;this.Y=0;this.V=""}build(){gpr(this);const Z=["#EXTM3U","#EXT-X-INDEPENDENT-SEGMENTS"],k={};a:if(this.V)var N=this.V;else{N="";for(var a of this.D)if(a.ZF){if(a.ZF.getIsDefault()){N=a.ZF.getId();break a}N||(N=a.ZF.getId())}}for(var T of this.D)if(this.G||!T.ZF||T.ZF.getId()===N)k[T.itag]||(k[T.itag]=[]),k[T.itag].push(T);for(var K of this.U)if(T=k[K.V])for(var y of T){T=Z;N=T.push;a="#EXT-X-MEDIA:TYPE=AUDIO,";let C=
"YES";var Q="audio";if(y.ZF){Q=y.ZF;var q=Q.getId().split(".")[0];q&&(a+=`LANGUAGE="${q}",`);(this.V?this.V===Q.getId():Q.getIsDefault())||(C="NO");Q=Q.getName()}q="";K!==null&&(q=K.itag.toString());q=oO(this,y.url,q);a=a+`NAME="${Q}",DEFAULT=${C},AUTOSELECT=YES,`+`GROUP-ID="${wYy(y,K)}",URI="${q}"`;N.call(T,a)}for(var r of this.L)K=Eey,K=(y=r.ZF)?'#EXT-X-MEDIA:URI="'+oO(this,r.url)+'",TYPE=SUBTITLES,GROUP-ID="'+K+'",LANGUAGE="'+y.getId()+'",NAME="'+y.getName()+'",DEFAULT=NO,AUTOSELECT=YES':void 0,
K&&Z.push(K);r=this.L.length>0?Eey:void 0;for(const C of this.U)y=k[C.V],y?.length>0&&(K=C,y=y[0],y=`#EXT-X-STREAM-INF:BANDWIDTH=${K.bitrate+y.bitrate},CODECS="${K.codecs},${y.codecs}",RESOLUTION=${K.width}x${K.height},AUDIO="${wYy(y,K)}",`+(r?'SUBTITLES="'+r+'",':"")+"CLOSED-CAPTIONS=NONE",K.fps>1&&(y+=`,FRAME-RATE=${K.fps}`),K.Ud&&(y+=`,VIDEO-RANGE=${K.Ud}`),Z.push(y),Z.push(oO(this,C.url,"")));return Z.join("\n")}},Eey="text";var zGy=class extends Ct{constructor(Z,k,N){super(Z);this.D=k;this.expiration=N;this.EH=null}L(){return this.expiration}U(){if(!this.EH||this.EH.jm()){var Z=this.D.build();Z="data:application/x-mpegurl;charset=utf-8,"+encodeURIComponent(Z);this.EH=new ht(Z)}return this.EH}};var H7f=class extends Ct{constructor(Z,k){super(Z);this.D=k}U(){return new ht(this.D.mH())}Y(){this.D=d5(this.D)}};var UUf=class extends Ct{constructor(Z,k){super(Z);this.D=k}U(){return new ht(this.D)}};var RGN={PLAYABILITY_ERROR_CODE_VIDEO_BLOCK_BY_MRM:"mrm.blocked",PLAYABILITY_ERROR_CODE_PERMISSION_DENIED:"auth",PLAYABILITY_ERROR_CODE_EMBEDDER_IDENTITY_DENIED:"embedder.identity.denied",PLAYABILITY_ERROR_CODE_EMBEDDER_IDENTITY_MISSING_REFERRER:"embedder.identity.missing.referrer"};var Icy=class{constructor(Z){if(Z=Z.commonConfig)this.url=Z.url,this.urlQueryOverride=Z.urlQueryOverride,Z.ustreamerConfig&&(this.by=rr(Z.ustreamerConfig)||void 0)}};var EpU={"ad-trueview-indisplay-pv":6,"ad-trueview-insearch":7},W4N={"ad-trueview-indisplay-pv":2,"ad-trueview-insearch":2},YBR=/^(\d*)_((\d*)_?(\d*))$/;var kTf={iurl:"default.jpg",iurlmq:"mqdefault.jpg",iurlhq:"hqdefault.jpg",iurlsd:"sddefault.jpg",iurlpop1:"pop1.jpg",iurlpop2:"pop2.jpg",iurlhq720:"hq720.jpg",iurlmaxres:"maxresdefault.jpg"},Nbf={120:"default.jpg",320:"mqdefault.jpg",480:"hqdefault.jpg",560:"pop1.jpg",640:"sddefault.jpg",854:"pop2.jpg",1280:"hq720.jpg"};var TbR={ALWAYS:1,BY_REQUEST:3,UNKNOWN:void 0},iOj={MDE_STREAM_OPTIMIZATIONS_RENDERER_LATENCY_UNKNOWN:"UNKNOWN",MDE_STREAM_OPTIMIZATIONS_RENDERER_LATENCY_NORMAL:"NORMAL",MDE_STREAM_OPTIMIZATIONS_RENDERER_LATENCY_LOW:"LOW",MDE_STREAM_OPTIMIZATIONS_RENDERER_LATENCY_ULTRA_LOW:"ULTRALOW"};var dwi;
dwi=function(Z){const k=Object.keys(Z),N={};for(let K=0;K<k.length;K++){const y=k[K];typeof Z[y]==="function"&&(N[y]=Z[y])}const a=Object.keys(N);let T;try{NUN(N)}catch(K){T=K}return function(K={},y){if(T)throw T;let Q=!1;const q={};for(let r=0;r<a.length;r++){const C=a[r],m=K[C],A=(0,N[C])(m,y);if(typeof A==="undefined")throw K=y&&y.type,Error(`When called with an action of type ${K?`"${String(K)}"`:"(unknown type)"}, the slice reducer for key "${C}" returned undefined. `+"To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.");q[C]=
A;Q=Q||A!==m}return(Q=Q||a.length!==Object.keys(K).length)?q:K}}({entities:function(Z={},k){return EEy(Z,k)}});
g.tE=new XVj;var jb=class{constructor(Z,k){this.type=Z||"";this.id=k||""}toString(){return this.type+this.id}};var Vr=class{constructor(Z,k){this.Jq=Z;this.author="";this.uL=null;this.playlistLength=0;this.V=this.sessionData=null;this.TQ={};this.title="";if(k){this.author=k.author||k.playlist_author||"";this.title=k.playlist_title||"";if(Z=k.session_data)this.sessionData=yS(Z,"&");this.V=k.thumbnail_ids?.split(",")[0]||null;this.TQ=zC(k,"playlist_");this.videoId=k.video_id||void 0;if(Z=k.list)switch(k.listType){case "user_uploads":this.playlistId=(new jb("UU",`PLAYER_${Z}`)).toString();break;default:const N=
k.playlist_length;N&&(this.playlistLength=Number(N)||0);this.playlistId=E$(Z).toString();if(k=k.video)this.videoId=(k[0]||null).video_id||void 0}else k.playlist&&(this.playlistLength=k.playlist.toString().split(",").length)}}v9(Z){Z=Z||"hqdefault.jpg";const k=this.TQ[Z];if(k)return k;if(Z==="sddefault.jpg"||Z==="hq720.jpg"||Z==="maxresdefault.jpg")return k;if(this.V)return FJ(this.Jq,this.V,Z)}Qg(){return this.Jq.getVideoUrl(this.videoId,this.playlistId)}};var LL=class{constructor(Z,k){this.Jq=Z;this.V9=this.author="";this.uL=null;this.isUpcoming=this.isLivePlayback=!1;this.lengthSeconds=0;this.Cx=this.lengthText="";this.sessionData=null;this.TQ={};this.title="";if(k){this.ariaLabel=k.aria_label||void 0;this.author=k.author||"";this.V9=k.V9||"";if(Z=k.endscreen_autoplay_session_data)this.uL=yS(Z,"&");this.wH=k.wH;this.isLivePlayback=k.live_playback==="1";this.isUpcoming=!!k.isUpcoming;if(Z=k.length_seconds)this.lengthSeconds=typeof Z==="string"?Number(Z):
Z;this.lengthText=k.lengthText||"";this.Cx=k.Cx||"";this.publishedTimeText=k.publishedTimeText||void 0;if(Z=k.session_data)this.sessionData=yS(Z,"&");this.shortViewCount=k.short_view_count_text||void 0;this.TQ=zC(k);this.title=k.title||"";this.videoId=k.docid||k.video_id||k.videoId||k.id||void 0;this.watchUrl=k.watchUrl||void 0}}v9(Z){Z||(Z="hqdefault.jpg");const k=this.TQ[Z];return k?k:Z==="pop1.jpg"||Z==="pop2.jpg"||Z==="sddefault.jpg"||Z==="hq720.jpg"||Z==="maxresdefault.jpg"?k:FJ(this.Jq,this.videoId,
Z)}Qg(Z){return this.watchUrl||this.Jq.getVideoUrl(this.videoId,void 0,void 0,void 0,void 0,Z)}};var Lky=class{constructor(Z){this.V=Z.playback_progress_0s_url;this.D=Z.playback_progress_2s_url;this.U=Z.playback_progress_10s_url}};var kz=void 0;SCN("LMS",async function(){return g.NO()});var yr;yr=0;g.RDf=/^([\w\-_]+)\|(\d+)(;[\w\-_]+)?\|(\d+)\|(\d+)$/;SCN("LMDB",async function(){const Z=await g.TN();if(!Z)throw g.wO("edd");return g.J0(await g.KL(Z),["index","media","captions"],{mode:"readonly",Mx:!0},k=>{const N={};k=[g.RY(k.objectStore("index"),{},a=>{N[a.cursor.key]=a.getValue();return g.Ma(a)}),
DQU(k.objectStore("media")),DQU(k.objectStore("captions"))];return g.$h.all(k).then(([,a,T])=>({index:N,media:MBr(a||[]),captions:T}))})});var WRf=class extends g.n9{constructor(){super();this.V=null;this.D=new mbU;this.V=null;this.G=new Set;this.crossOrigin=""}YW(){this.V&&(this.V=this.V.onload=null);super.YW()}};g.mw=class{constructor(Z,k,N,a){this.level=Z;this.Vz=k;this.loaded=new Set;this.level=Z;this.Vz=k;Z=N.split("#");this.width=Math.floor(Number(Z[0]));this.height=Math.floor(Number(Z[1]));this.frameCount=Math.floor(Number(Z[2]));this.columns=Math.floor(Number(Z[3]));this.rows=Math.floor(Number(Z[4]));this.V=Math.floor(Number(Z[5]));this.C=Z[6];this.signature=Z[7];this.videoLength=a}getHeight(){return this.height}L(){return this.frameCount}isDefault(){return this.C.indexOf("default")!==-1}isLoaded(Z){return this.loaded.has(Z)}mH(Z){let k=
this.Vz;k=k.replace("$N",this.C);k=k.replace("$L",this.level.toString());k=k.replace("$M",Z.toString());this.signature&&(k=g.mW(k,{sigh:this.signature}));return Vw(k)}Y(Z){const k=this.L()-1;return g.u0(this.V===0?Math.round(Z*this.frameCount/this.videoLength):Math.round(Z*1E3/this.V),0,k)}U(){return this.frameCount-1}G(){return this.frameCount?0:-1}j(){}};g.mw.prototype.N=NR(5);var sy=class extends WRf{constructor(Z,k,N=!1,a=!1){super();this.isLive=N;this.j=!!a;this.levels=this.U(Z,k);this.Y=new Map;this.levels.length>1&&this.levels[0].isDefault()&&this.levels.splice(0,1)}U(Z,k){const N=[];Z=Z.split("|");const a=Z[0];for(let T=1;T<Z.length;T++){const K=this.L(T-1,a,Z[T],k);(this.j||K.getHeight()<180)&&N.push(K)}return N}L(Z,k,N,a){return new g.mw(Z,k,N,a)}};var Y6b=class extends g.mw{constructor(Z,k,N,a){N=N.split("#");N=[N[1],N[2],0,N[3],N[4],-1,N[0],""].join("#");super(Z,k,N,0);this.D=null;this.O=a?2:0}L(){return this.D.Vy()}Y(Z){const k=this.rows*this.columns*this.O,N=this.D,a=N.hW();Z=N.pn(Z);return Z>a-k?-1:Z}U(){return this.D.hW()}G(){return this.D.N7()}j(Z){this.D=Z}};var Z$y=class extends sy{constructor(Z,k,N,a=!1){super(Z,0,k,!!a);for(Z=0;Z<this.levels.length;Z++)this.levels[Z].j(N)}U(Z,k){return super.U(`$N|${Z}`,k)}L(Z,k,N){return new Y6b(Z,k,N,this.isLive)}};var k7X;
g.xJ=class extends g.n9{constructor(Z,k){super();this.Jq=Z;this.adaptiveFormats="";this.SB=this.adQueryId=this.g0=null;this.hB={start:NaN,end:NaN};this.cueRanges=this.contentProtection=null;this.zC=new Map;this.drmProduct=this.drmParams="";this.eventLabel=null;this.allowEmbed=!0;this.allowLiveDvr=this.offlineable=this.backgroundable=!1;this.fI="";this.EB=!1;this.Fh=null;this.Jl=this.m1=this.hK=!1;this.Y=null;this.Di=this.BT=!1;this.lz=NaN;this.applyStatefulNormalization=this.preserveStatefulLoudnessTarget=!1;
this.maxStatefulTimeThresholdSec=0;this.Ji=NaN;this.loudnessTargetLkfs=Infinity;this.minimumLoudnessTargetLkfs=-Infinity;this.oE=0;this.ZJ=!1;this.cycToken=null;this.author="";this.fS=!1;this.r5=0;this.GF=!1;this.D4=null;this.dH=[];this.Z9=this.ef=!1;this.clientScreenNonce=this.playerResponseCpn=this.clientPlaybackNonce=this.videoCountText=this.Rq=this.HA="";this.contentCheckOk=!1;this.limitedPlaybackDurationInSeconds=this.endSeconds=this.g8=0;this.xO=this.fP=this.U=null;this.F$="";this.loading=!1;
this.aM=this.d9=0;this.Wy=this.pipable=this.RV=this.isAutonav=!1;this.paidContentOverlayDurationMs=0;this.mutedAutoplay=this.Ix=!1;this.mutedAutoplayDurationMode=0;this.isLiveHeadPlayable=this.isLivePlayback=this.ES=this.isPrivate=this.isListed=this.bq=!1;this.UJ="";this.isLowLatencyLiveStream=this.isLivingRoomDeeplink=this.isTvfilmVideo=this.isLiveDefaultBroadcast=this.It=this.KX=this.M4=!1;this.latencyClass="UNKNOWN";this.OU=this.mX=this.J2=this.Ay=this.A6=this.gZ=this.Uu=this.Q2=this.KB=this.hS=
this.enableServerStitchedDai=this.g_=this.isMdxPlayback=this.isUpcoming=this.isPremiere=!1;this.mdxControlMode=null;this.isPharma=this.showSeekingControls=!1;this.Kp=0;this.reloadReason="";this.ST=this.Ap=!1;this.keywords={};this.hq="";this.Wj=0;this.Yw=!1;this.unpluggedFilterModeType=0;this.liveChunkReadahead=NaN;this.yI=null;this.LA=this.lengthSeconds=0;this.playerParams=this.musicVideoType=null;this.Ee=this.paygated=!1;this.JZ=[];this.fN=!1;this.Wo=[];this.aU=null;this.PM=this.racyCheckOk=!1;this.Ri=
{};this.isProximaLatencyEligible=!1;this.JJ=0;this.D=null;this.autonavState=1;this.l2=null;this.shortDescription="";this.C=this.Re=!1;this.Q5=this.MX=this.startSeconds=0;this.x9=this.En=this.IV=io;this.Ta=this.suggestions=null;this.SK=this.FE=void 0;this.isExternallyHostedPodcast=!1;this.A1=null;this.zN=this.expandedSubtitle=this.expandedTitle=this.subtitle=this.title="";this.vD=[];this.ov=[];this.hlsFormats=this.VR="";this.qY=this.o8=this.LC=this.O6=this.FS=this.lk=this.dG=this.tW=null;this.ZT="vvt";
this.gD=!1;this.lZ=null;this.qs="";this.Z0=NaN;this.Cj=this.B1=this.Px=this.H1=this.Ez=this.DN=this.Rc=this.P1=this.j_=this.RA="";this.YO=null;this.zW=!1;this.clipStart=0;this.clipEnd=Infinity;this.V2=!1;this.heartbeatToken="";this.Yn=this.Uo=NaN;this.rD=this.Vg=this.FN=this.Pm=this.L$=!1;this.WU=!0;this.TQ={};this.captionTracks=[];this.Zs=[];this.Pc=0;this.C1=[];this.b$=[];this.u$=!1;this.eP={};this.KN=new g.J4("und",new g.Al("Default","und",!0));this.wN=0;this.L=null;this.YH=[];this.pE=!1;this.FY=
this.qX="";this.slotPosition=-1;this.breakType=0;this.embeddedPlayerConfig=this.reelItemWatchResponse=this.xW=this.WN=this.YF=this.playerResponse=this.nh=this.Vp=this.xd=this.P0=null;this.Pl=!1;this.xl=null;this.isInlinePlaybackNoAd=this.Al=this.y9=this.useCobaltWidevine=this.z8=this.Zn=!1;this.pM=!0;this.WB=this.Ym=NaN;this.defraggedFromSubfragments=this.p_=this.hasSubfragmentedFmp4=!1;this.liveExperimentalContentId=NaN;this.Sm=new Set;this.sabrContextUpdates=new Map;this.gatewayExperimentGroup=
"";this.lf=this.u7=this.oC=!1;this.interstitials=[];this.o4=this.Mb=!1;this.Vl="";this.allowImaMonetization=!1;this.QL="";this.VC=!1;this.JB="";this.Ni=[];this.AA=[];this.tI="";this.DC=this.j=this.Hx=!1;this.Bx="";this.FZ=this.xf=this.Bf=this.readAheadGrowthRateMs=this.minReadAheadMediaTimeMs=this.maxReadAheadMediaTimeMs=NaN;this.showShareButton=!0;this.J$=!1;this.mq=this.hp=!0;this.errorDetail=this.userGenderAge="";this.oR=this.xw=this.getSharePanelCommand=this.removeFromWatchLaterCommand=this.addToWatchLaterCommand=
this.unsubscribeCommand=this.subscribeCommand=this.contextParams=this.sf=this.errorReason=this.errorCode=null;this.eL=!1;this.Oq=[];this.Nm=this.aE=this.Y5=this.rr=this.Y8=0;this.fetchType=null;this.us=!0;this.transitionEndpointAtEndOfStream=void 0;this.nD=this.bL=-1;this.gV=this.pF=!1;this.s6=null;this.Vz="";this.watchUrl=null;this.Ox=[];this.visibleOnLoadKeys=[];this.wz=[];this.inlineMetricEnabled=this.Tt=!1;this.PG=this.embedsRctn=this.embedsRct="";this.Sb=NaN;this.authorizedFormats=[];this.KR=
(0,g.z)();this.Gf=this.NW=0;this.by=null;this.NU=this.Ii=this.XD=this.Lu=!1;this.Qu={};this.Hy=.25;this.Ed=2;this.UX=this.iq=!1;this.isSeekable=null;this.Qz=this.Jq.experiments.yz("html5_use_triple_equals");this.UB=g.Q5(this.Jq.experiments,"html5_gapless_loop_seek_offset_in_milli");this.nF={setData:N=>{this.setData(N)},
oW:()=>{this.oW()},
uQ:N=>{this.uQ(N)}};
this.pF=this.B("web_new_autonav_countdown");this.gV=this.B("web_new_big_thumbnail_endscreen");this.Jq.Ta&&(this.O=this.Jq.Ta);this.setData(k);this.ix=new cby;g.u(this,this.ix)}setData(Z){Z=Z||{};var k=Z.errordetail;k!=null&&(this.errorDetail=k);k=Z.errorcode;k!=null?this.errorCode=k:Z.status==="fail"&&(this.errorCode="auth");k=Z.reason;k!=null&&(this.errorReason=k);k=Z.subreason;k!=null&&(this.sf=k);this.clientPlaybackNonce||(this.clientPlaybackNonce=Z.cpn??(this.Jq.Xa()?"r"+g.av(15):g.av(16)),this.US?.clear());
this.ES=Be(this.Jq.ES,Z.livemonitor);reG(this,Z);if(k=Z.raw_player_response)this.WN=k;else{var N=Z.player_response;N&&(k=JSON.parse(N))}k&&(this.playerResponse=k);if(this.playerResponse){(k=this.playerResponse.annotations)&&Kni(this,k);(k=this.playerResponse.attestation)&&yaf(this,k);if(k=this.playerResponse.cotn)this.cotn=k;(k=this.playerResponse.heartbeatParams)&&CDX(this,k);(k=this.playerResponse.messages)&&PDR(this,k);(k=this.playerResponse.overlay)&&LnR(this,k);if(k=this.playerResponse.playabilityStatus)VBf(this,
k),(N=k.errorScreen)&&vof(this,N);(N=this.playerResponse.playbackTracking)&&tBX(this,N,Z);var a=this.playerResponse.playerCueRanges;a&&a.length>0&&(this.cueRanges=a);(a=this.playerResponse.playerCueRangeSet)&&g.XG(this,a);a=VPN(this.playerResponse.adPlacements);N&&N.promotedPlaybackTracking&&a&&g.L9(new g.jD("Player Response with both promotedPlaybackTracking and videoAdTrackingRenderer"));if(a||hZX(this.playerResponse.adSlots))this.Ee=!0;(N=this.playerResponse.playerAds)&&hDj(this,N,Z);(N=this.playerResponse.playerConfig)&&
uYf(this,N);(a=this.playerResponse.streamingData)&&l6y(this,a,N||null);if(a=this.playerResponse.trackingParams)this.O=a;if(a=this.playerResponse.videoDetails)Bb0(this,a,Z),go0(this,a,N||null,Z),N=a.isPrivate,N!==void 0&&(this.isPrivate=Be(this.isPrivate,N));k&&raN(this,k,a||null);(k=this.playerResponse.interstitialPods)&&Aab(this,k);this.fI&&this.eventId&&(this.fI=P8(this.fI,{ei:this.eventId}));(k=this.playerResponse.captions)&&k.playerCaptionsTracklistRenderer&&qpy(this,k.playerCaptionsTracklistRenderer);
(this.clipConfig=this.playerResponse.clipConfig)&&this.clipConfig.startTimeMs!=null&&(this.FZ=Number(this.clipConfig.startTimeMs)*.001);this.playerResponse&&this.playerResponse.playerConfig&&this.playerResponse.playerConfig.webPlayerConfig&&this.playerResponse.playerConfig.webPlayerConfig.webPlayerActionsPorting&&cai(this,this.playerResponse.playerConfig.webPlayerConfig.webPlayerActionsPorting);this.compositeLiveIngestionOffsetToken=this.playerResponse.playbackTracking?.compositeLiveIngestionOffsetToken;
this.compositeLiveStatusToken=this.playerResponse.playbackTracking?.compositeLiveStatusToken;this.B("html5_fill_default_mosaic_audio_track_id")&&this.Jd()&&(this.Jq.Kp=Fkf(this));k=this.playerResponse.playerConfig?.granularVariableSpeedConfig?.minimumPlaybackRate;N=this.playerResponse.playerConfig?.granularVariableSpeedConfig?.maximumPlaybackRate;k&&N&&(this.Hy=k/100,this.Ed=N/100);this.B("html5_web_po_on_demand_init")&&this.playerResponse.onResponseReceivedActions&&this.playerResponse.onResponseReceivedActions.forEach(T=>
{g.J(T,g.MZ)?.signal==="INIT_ATT_SERVICE"&&(this.UX=!0)})}hE(this,Z);
cef(this,Z);Z.queue_info&&(this.queueInfo=Z.queue_info);k=Z.hlsdvr;k!=null&&(this.allowLiveDvr=Number(k)===1?k2()?!0:Fn&&IO<5?!1:!0:!1);this.adQueryId=Z.ad_query_id||null;this.SB||(this.SB=Z.encoded_ad_safety_reason||null);this.BT=Be(this.BT,Z.infringe||Z.muted);this.J8=Z.authkey;this.qg=Z.authuser;this.mutedAutoplay=Be(this.mutedAutoplay,Z&&Z.playmuted);this.mutedAutoplayDurationMode=Ov(this.mutedAutoplayDurationMode,Z&&Z.muted_autoplay_duration_mode);this.VC=Be(this.VC,Z&&Z.mutedautoplay);if(k=
Z.length_seconds)this.lengthSeconds=typeof k==="string"?Cg(k):k;this.isAd()||this.fN||!g.xq(g.dr(this.Jq))?this.endSeconds=Ov(this.endSeconds,this.xf||Z.end||Z.endSeconds):tPN(this,g.dr(this.Jq),this.lengthSeconds);this.O=iR(this.O,Z.itct);this.It=Be(this.It,Z.is_live_destination);this.isLivePlayback=Be(this.isLivePlayback,Z.live_playback);this.enableServerStitchedDai=this.enableServerStitchedDai&&this.Rn();Z.isUpcoming&&(this.isUpcoming=Be(this.isUpcoming,Z.isUpcoming));this.M4=Be(this.M4,Z.post_live_playback);
this.KX&&(this.M4=!1);this.isMdxPlayback=Be(this.isMdxPlayback,Z.mdx);if(k=Z.mdx_control_mode)this.mdxControlMode=typeof k==="number"?k:Cg(k);this.isInlinePlaybackNoAd=Be(this.isInlinePlaybackNoAd,Z.is_inline_playback_no_ad);this.Kp=Ov(this.Kp,Z.reload_count);this.reloadReason=iR(this.reloadReason,Z.reload_reason);this.WU=Be(this.WU,Z.show_content_thumbnail);this.cycToken=Z.cyc||null;k=zC(Z);Object.keys(k).length>0&&(this.TQ=k);this.zt=iR(this.zt,Z.vvt);this.mdxEnvironment=iR(this.mdxEnvironment,
Z.mdx_environment);Z.source_container_playlist_id&&(this.sourceContainerPlaylistId=Z.source_container_playlist_id);Z.serialized_mdx_metadata&&(this.serializedMdxMetadata=Z.serialized_mdx_metadata);this.r4=Z.osig;this.eventId||(this.eventId=Z.eventid);this.osid||(this.osid=Z.osid);this.playlistId=iR(this.playlistId,Z.list);Z.index&&(this.playlistIndex=this.playlistIndex===void 0?Ov(0,Z.index):Ov(this.playlistIndex,Z.index));this.Nb=Z.pyv_view_beacon_url;this.nj=Z.pyv_quartile25_beacon_url;this.e_=
Z.pyv_quartile50_beacon_url;this.yH=Z.pyv_quartile75_beacon_url;this.TR=Z.pyv_quartile100_beacon_url;k=Z.session_data;!this.qb&&k&&(this.qb=yS(k,"&").feature);this.isFling=Ov(this.isFling?1:0,Z.is_fling)===1;this.vnd=Ov(this.vnd,Z.vnd);this.forceAdsUrl=iR(this.forceAdsUrl,Z.force_ads_url);this.fX=iR(this.fX,Z.ctrl);this.sx=iR(this.sx,Z.ytr);this.lL=Z.ytrcc;this.Oe=Z.ytrexp;this.O1=Z.ytrext;this.qX=iR(this.qX,Z.adformat);this.FY=iR(this.FY,Z.attrib);this.slotPosition=Ov(this.slotPosition,Z.slot_pos);
this.breakType=Z.break_type;this.C7=Be(this.C7,Z.ssrt);this.videoId=w$(Z)||this.videoId;this.Pq=iR(this.Pq,Z.vss_credentials_token);this.ZT=iR(this.ZT,Z.vss_credentials_token_type);this.oC=Be(this.oC,Z.audio_only);this.u7=Be(this.u7,Z.aac_high);this.lf=Be(this.lf,Z.prefer_low_quality_audio);this.DC=Be(this.DC,Z.uncap_inline_quality);this.B("html5_enable_qoe_cat_list")?Z.qoe_cat&&(this.Ni=this.Ni.concat(Z.qoe_cat.split(","))):this.JB=iR(this.JB,Z.qoe_cat);this.eL=Be(this.eL,Z.download_media);this.j=
hVy(this,Z.prefer_gapless);SXr(this.playerResponse)&&this.Wo.push("ad");if(k=Z.adaptive_fmts)this.adaptiveFormats=k,this.U6("adpfmts",{},!0);if(k=Z.allow_embed)this.allowEmbed=Number(k)===1;if(k=Z.backgroundable)this.backgroundable=Number(k)===1;if(k=Z.autonav)this.isAutonav=Number(k)===1;if(k=Z.autoplay)this.Ix=this.RV=Number(k)===1;if(k=Z.iv_load_policy)this.annotationsLoadPolicy=Dm(this.annotationsLoadPolicy,k,DB);if(k=Z.cc_lang_pref)this.captionsLanguagePreference=iR(k,this.captionsLanguagePreference);
if(k=Z.cc_load_policy)this.D4=Dm(this.D4,k,DB);this.deviceCaptionsOn=Z.device_captions_on??void 0;this.fh=Z.device_captions_lang_pref??"";this.dH=Z.viewer_selected_caption_langs??[];if(k=Z.cached_load)this.Z9=Be(this.Z9,k);if(Z.dash==="0"||Z.dash===0||Z.dash===!1)this.ef=!0;if(k=Z.dashmpd)this.Hv=g.mW(k,{cpn:this.clientPlaybackNonce});if(k=Z.delay)this.g8=Cg(k);k=this.xf||Z.end;if(this.Qz?k!=null:k!=void 0)this.clipEnd=Ov(this.clipEnd,k);if(k=Z.fmt_list)this.F$=k;Z.heartbeat_preroll&&this.Wo.push("heartbeat");
k7X&&(this.d9=-Math.floor(Math.random()*10),this.LA=-Math.floor(Math.random()*40));if(k=Z.is_listed)this.isListed=Be(this.isListed,k);if(k=Z.is_private)this.isPrivate=Be(this.isPrivate,k);if(k=Z.is_dni)this.o4=Be(this.o4,k);if(k=Z.dni_color)this.Vl=iR(this.Vl,k);if(k=Z.pipable)this.pipable=Be(this.pipable,k);this.Re=(this.Wy=this.pipable&&this.Jq.wh)&&!this.Jq.showMiniplayerButton;if(k=Z.paid_content_overlay_duration_ms)this.paidContentOverlayDurationMs=Cg(k);if(k=Z.paid_content_overlay_text)this.paidContentOverlayText=
k;if(k=Z.url_encoded_fmt_stream_map)this.VR=k;if(k=Z.hls_formats)this.hlsFormats=k;if(k=Z.hlsvp)this.hlsvp=k;if(k=Z.live_start_walltime)this.Qw=typeof k==="number"?k:Cg(k);if(k=Z.live_manifest_duration)this.yI=typeof k==="number"?k:Cg(k);if(k=Z.player_params)this.playerParams=k;if(k=Z.partnerid)this.partnerId=Ov(this.partnerId,k);if(k=Z.probe_url)this.probeUrl=Vw(g.mW(k,{cpn:this.clientPlaybackNonce}));(k=Z.pyv_billable_url)&&RAG(k)&&(this.y7=k);(k=Z.pyv_conv_url)&&RAG(k)&&(this.hk=k);dDf(this,Z);
this.startSeconds>0?this.B("html5_log_start_seconds_inconsistency")&&this.startSeconds!==(this.FZ||this.Bf||Z.start||Z.startSeconds)&&this.U6("lss",{css:this.startSeconds,pcss:this.FZ,iss:this.Bf,ps:Z.start||void 0,pss:Z.startSeconds||void 0}):(this.startSeconds=Ov(this.startSeconds,this.FZ||this.Bf||Z.start||Z.startSeconds),this.B("html5_log_start_seconds_inconsistency")&&this.startSeconds>0&&this.U6("lsss",{css:this.startSeconds,pcss:this.FZ,iss:this.Bf,ps:Z.start||void 0,pss:Z.startSeconds||void 0}),
this.MX=this.startSeconds);this.liveUtcStartSeconds&&this.liveUtcStartSeconds>0||(k=Z.live_utc_start,k!=null?this.liveUtcStartSeconds=Number(k):uif(this.startSeconds)&&(this.liveUtcStartSeconds=this.startSeconds));this.liveUtcStartSeconds&&this.liveUtcStartSeconds>0||!(k=Z.utc_start_millis)||(this.liveUtcStartSeconds=Number(k)*.001);if(k=Z.stream_time_start_millis)this.Q5=Number(k)*.001;k=this.Bf||Z.start;(this.Qz?k==null||Number(Z.resume)===1:k==void 0||Z.resume=="1")||this.isLivePlayback||(this.clipStart=
Ov(this.clipStart,k));if(k=Z.url_encoded_third_party_media)this.A1=ru(k);if(k=Z.ypc_offer_button_formatted_text)N=JSON.parse(k),this.lZ=N!=null?N:null,this.qs=k;if(k=Z.ypc_offer_button_text)this.RA=k;if(k=Z.ypc_offer_description)this.j_=k;if(k=Z.ypc_offer_headline)this.P1=k;if(k=Z.ypc_full_video_message)this.Rc=k;if(k=Z.ypc_offer_id)this.DN=k;if(k=Z.ypc_buy_url)this.Ez=k;if(k=Z.ypc_item_thumbnail)this.H1=k;if(k=Z.ypc_item_title)this.Px=k;if(k=Z.ypc_item_url)this.B1=k;if(k=Z.ypc_vid)this.Cj=k;Z.ypc_overlay_timeout&&
(this.Z0=Number(Z.ypc_overlay_timeout));if(k=Z.ypc_trailer_player_vars)this.YO=q2(k);if(k=Z.ypc_original_itct)this.g4=k;this.WZ=iR(this.WZ,Z.ucid);this.o8=Z.storyboard_spec||null;this.qY=Z.live_storyboard_spec||null;this.Fh=Z.iv_endscreen_url||null;this.hK=Be(this.hK,Z.iv3_module);this.m1=Be(this.m1,Z.ypc_module);this.Jl=Be(this.Jl,Z.ypc_clickwrap_module);this.m1&&this.Wo.push("ypc");this.Jl&&this.Wo.push("ypcRentalActivation");this.Ri={video_id:Z.video_id,eventid:Z.eventid,cbrand:Z.cbrand,cbr:Z.cbr,
cbrver:Z.cbrver,c:Z.c,cver:Z.cver,ctheme:Z.ctheme,cplayer:Z.cplayer,cmodel:Z.cmodel,cnetwork:Z.cnetwork,cos:Z.cos,cosver:Z.cosver,cplatform:Z.cplatform,user_age:Z.user_age,user_display_image:Z.user_display_image,user_display_name:Z.user_display_name,user_gender:Z.user_gender,csi_page_type:Z.csi_page_type,csi_service_name:Z.csi_service_name,enablecsi:Z.enablecsi,enabled_engage_types:Z.enabled_engage_types};XMy(this,Z);if(k=Z.cotn)this.cotn=k;lH0(this)?fL(this)&&(this.isLivePlayback&&this.Hv&&(this.FN=
!0),this.fP&&(this.Vg=!0)):xDy(this)?this.FN=!0:eVN(this)?this.enableServerStitchedDai=this.enableServerStitchedDai&&eI(this):this.Hv&&(this.Jq.Vz==="yt"&&this.Rn()&&this.B("drm_manifestless_unplugged")&&this.B("html5_deprecate_manifestful_fallback")?this.U6("deprecateMflFallback",{}):this.FN=!0);if(k=Z.adpings)this.g0=k?q2(k):null;if(k=Z.feature)this.VA=k;if(k=Z.referrer)this.referrer=k;this.clientScreenNonce=iR(this.clientScreenNonce,Z.csn);this.JJ=Ov(this.JJ,Z.root_ve_type);this.Wj=Ov(this.Wj,
Z.kids_age_up_mode);this.Qz||Z.kids_app_info==void 0||(this.kidsAppInfo=Z.kids_app_info);this.Qz&&Z.kids_app_info!=null&&(this.kidsAppInfo=Z.kids_app_info);this.Yw=Be(this.Yw,Z.upg_content_filter_mode);this.unpluggedFilterModeType=Ov(this.unpluggedFilterModeType,Z.unplugged_filter_mode_type);if(k=Z.unplugged_location_info)this.xl=k;if(k=Z.unplugged_partner_opt_out)this.J0=iR("",k);this.Pl=Be(this.Pl,Z.disable_watch_next);this.XM=iR(this.XM,Z.internal_ip_override);this.Mb=!!Z.is_yto_interstitial;this.interstitials.length&&
this.Wo.push("playableSequences");if(k=Z.JZ)this.JZ=k;this.Vz=iR(this.Vz,Z.csi_timer);Z.watchUrl&&(this.watchUrl=Z.watchUrl);k=Z.watch_endpoint;this.B("html5_attach_watch_endpoint_ustreamer_config")&&k&&jbb(this,k);k?.ustreamerConfig&&(this.by=rr(k.ustreamerConfig));if(k=k?.loggingContext?.qoeLoggingContext?.serializedContextData)this.sz=k;g.PQ(this.Jq)&&this.Jq.yI&&(this.embedsRct=iR(this.embedsRct,Z.rct),this.embedsRctn=iR(this.embedsRctn,Z.rctn));Z.embed_config&&(this.PG=Z.embed_config);this.Tt=
this.Tt||!!Z.pause_at_start;Z.default_active_source_video_id&&(this.defaultActiveSourceVideoId=Z.default_active_source_video_id);this.iq=this.iq||!!Z.live_preload}xF(){return this.autoplaySwitchButtonRenderer?.enabled!==void 0}X(){return this.Jq}B(Z){return this.Jq.B(Z)}uV(){return!this.isLivePlayback||this.allowLiveDvr}hasSupportedAudio51Tracks(){return!!this.s6?.s6}getUserAudio51Preference(){let Z=1;BQ(this.Jq)&&this.B("html5_ytv_surround_toggle_default_off")?Z=0:uS(this.Jq)&&this.isLivePlayback&&
this.kT()&&(Z=0);return g.kh("yt-player-audio51")??Z}vx(){return this.playerResponse?.playerConfig?.compositeVideoConfig?.sourceConfigs??[]}By(){this.jm()||(this.V.D||this.V.unsubscribe("refresh",this.By,this),this.ag(-1))}ag(Z){if(!this.isLivePlayback||!this.L||this.L.flavor!=="fairplay"){var k=this.V.MX(this.wN);if(k.length>0){for(const N of k)N.startSecs=Math.max(N.startSecs,this.Vt()),this.B("html5_cuepoint_identifier_logging")&&N.event==="start"&&this.U6("cuepoint",{pubCue:N.identifier,segNum:Z});
this.publish("cuepointupdated",k,Z);this.wN+=k.length;if(eI(this)&&this.Jq.Xa())for(const N of k)this.U6("cuepoint",{segNum:Z,event:N.event,startSecs:N.startSecs,id:N.identifier.slice(-16)}),N.event==="start"&&(k=N.startSecs,this.hB.start=this.r5,this.hB.end=k+3)}}}oW(){this.jm()||(this.loading=!1,this.publish("dataloaded"))}kT(){return this.nm!==void 0?this.nm:this.nm=!!this.contentProtection||!!this.V&&this.V.L()}jB(Z){if(this.jm())return nb();this.O6=this.FS=this.D=null;U1(this,"html5_high_res_logging_always")&&
(this.Jq.gD=!0);return zVR(this,Z).then(void 0,()=>bAy(this,Z)).then(void 0,()=>pMf(this)).then(void 0,()=>MPr(this))}uQ(Z){this.D=Z;
UDb(this,this.D.getAvailableAudioTracks());if(this.D)for(var k of this.D.videoInfos)Z=k.containerType,Z!==0&&(this.eP[Z]=k.id);k=this.getAvailableAudioTracks();k=k.concat(this.KN);for(Z=0;Z<this.Zs.length;Z++){const a=this.Zs[Z];for(let T=0;T<k.length;T++){const K=k[T];var N=K.ZF.id===a.audioTrackId;if(K.ZF.isDefault&&Z===this.Pc||N){if(a.captionTrackIndices)for(N=0;N<a.captionTrackIndices.length;N++)K.captionTracks[N]=this.captionTracks[a.captionTrackIndices[N]];a.defaultCaptionTrackIndex!==void 0&&
(K.D=this.captionTracks[a.defaultCaptionTrackIndex]);a.forcedCaptionTrackIndex!==void 0&&(K.V=this.captionTracks[a.forcedCaptionTrackIndex]);K.U=a.visibility||"UNKNOWN";K.captionsInitialState=a.captionsInitialState||"CAPTIONS_INITIAL_STATE_UNKNOWN"}}}if(this.L&&this.D&&this.D.videoInfos&&!(this.D.videoInfos.length<=0)&&(k=this.D.videoInfos[0].D(),this.L.flavor==="fairplay"!==k))for(const a of this.YH)if(k===(a.flavor==="fairplay")){this.L=a;break}}Cn(){if(this.cotn)return null;const Z=g.KA(this.Jq)||
this.B("web_l3_storyboard");if(!this.LC)if(this.playerResponse&&this.playerResponse.storyboards){var k=this.playerResponse.storyboards,N=k.playerStoryboardSpecRenderer;N&&N.spec?this.LC=new sy(N.spec,this.lengthSeconds,!1,Z):(k=k.playerLiveStoryboardSpecRenderer)&&k.spec&&this.V&&(N=wH(this.V.V).index)&&(this.LC=new Z$y(k.spec,this.V.isLive,N,Z))}else this.o8?this.LC=new sy(this.o8,this.lengthSeconds,!1,Z):this.qY&&this.V&&(k=wH(this.V.V).index)&&(this.LC=new Z$y(this.qY,this.V.isLive,k,Z));return this.LC}getStoryboardFormat(){if(this.cotn)return null;
if(this.playerResponse&&this.playerResponse.storyboards){var Z=this.playerResponse.storyboards;return(Z=Z.playerStoryboardSpecRenderer||Z.playerLiveStoryboardSpecRenderer)&&Z.spec||null}return this.o8||this.qY}zi(){return this.V&&!isNaN(this.V.zi())?this.V.zi():eI(this)?0:this.lengthSeconds}Vt(){return this.V&&!isNaN(this.V.Vt())?this.V.Vt():0}getPlaylistSequenceForTime(Z){if(this.V&&this.U){var k=this.V.V[this.U.id];if(!k)return null;const N=k.index.pn(Z);k=k.index.getStartTime(N);return{sequence:N,
elapsed:Math.floor((Z-k)*1E3)}}return null}cG(){return!this.jm()&&!(!this.videoId&&!this.A1)}zB(){return!!this.adaptiveFormats||!!this.playerResponse?.streamingData?.adaptiveFormats?.length}isLoaded(){return cZ(this)&&!this.FN&&!this.Vg}v9(Z){Z||(Z="hqdefault.jpg");const k=this.TQ[Z];return k||this.Jq.O||Z==="pop1.jpg"||Z==="pop2.jpg"||Z==="sddefault.jpg"||Z==="hq720.jpg"||Z==="maxresdefault.jpg"?k:FJ(this.Jq,this.videoId,Z)}Rn(){return this.isLivePlayback||this.M4||this.KX||!(!this.liveUtcStartSeconds||
!this.yI)}isOtf(){return!!this.V&&(this.V.isOtf||!this.M4&&!this.isLivePlayback&&this.V.D)}getAvailableAudioTracks(){if(this.D){if(this.D.getAvailableAudioTracks().length>0)return this.D.getAvailableAudioTracks();if(this.tW)return this.tW;if(this.dG)return this.dG}return[]}getAudioTrack(){if(this.Y&&!this.Y.D()){var Z=g.ZD(this.getAvailableAudioTracks(),k=>k.id===this.Y.id);
if(!Z&&this.Y.ZF?.id){const k=this.Y.ZF.id;Z=g.ZD(this.getAvailableAudioTracks(),N=>N.ZF.id===k)}return Z||this.KN}if(this.tW){if(!this.lk)for(Z of this.tW)if(Z.ZF.getIsDefault()){this.lk=Z;
break}return this.lk||this.KN}return this.KN}getPlayerResponse(){return this.playerResponse}getWatchNextResponse(){return this.xW}getReelItemWatchResponse(){return this.reelItemWatchResponse}getHeartbeatResponse(){return this.YF}Qg(){return this.watchUrl?this.watchUrl:this.Jq.getVideoUrl(this.videoId)}tH(){return!!this.V&&(ANy(this.V)||PJU(this.V)||cNf(this.V))}MV(){const Z=g.$z(this),k=this.X().L,N=eb("243");return N?uq(Z,N,k,!0)===!0:!1}j9(){return this.B("enable_wn_infocards")}l9(){return(this.j9()?
this.xW?.cards?.cardCollectionRenderer:this.playerResponse?.cards?.cardCollectionRenderer)||null}getEmbeddedPlayerResponse(){return this.P0}rQ(){return(this.eventLabel||this.Jq.zt)==="shortspage"}isAd(){return this.Lu||!!this.adFormat}G(){return this.oauthToken||this.Jq.xd}isDaiEnabled(){return!!(this.playerResponse&&this.playerResponse.playerConfig&&this.playerResponse.playerConfig.daiConfig&&this.playerResponse.playerConfig.daiConfig.enableDai)}qW(){return this.isDaiEnabled()&&this.enableServerStitchedDai&&
!!this.playerResponse?.playerConfig?.daiConfig?.ssaEnabledPlayback}Jd(){return!!this.playerResponse?.compositePlayabilityStatus}wh(){return!this.Jd()}gN(){return this.V2}ZV(){return this.m1||this.gD}jY(){if(!this.V||!this.U||!this.Y)return!1;var Z=this.V.V;const k=!!Z[this.U.id]&&cq(39,5796,Z[this.U.id].EH.V);Z=!!Z[this.Y.id]&&cq(23,5780,Z[this.Y.id].EH.V);return(this.U.itag==="0"||k)&&Z}jC(){return this.fetchType==="onesie"}E4(){return U1(this,"html5_samsung_vp9_live")}U6(Z,k,N){this.publish("ctmp",
Z,k,N)}Kg(Z,k,N){this.publish("ctmpstr",Z,k,N)}hasProgressBarBoundaries(){return!(!this.progressBarStartPosition||!this.progressBarEndPosition)}dA(){return!(!this.isLivePlayback||!this.hasProgressBarBoundaries())}N(){return this.Ta||this.suggestions?.[0]||null}getGetAdBreakContext(Z=NaN,k=NaN){const N={isSabr:nQ(this)};var a=this.getHeartbeatResponse()?.adBreakHeartbeatParams;a&&(N.adBreakHeartbeatParams=a);if(this.B("enable_ltc_param_fetch_from_innertube")&&this.isLivePlayback&&this.V&&!isNaN(Z)&&
!isNaN(k)){k=Z-k;for(var T in this.V.V){a=this.V.V[T];if(!a.info.xT()&&!a.info.H9())continue;a=a.index;if(!a.isLoaded())continue;T=a.pn(k);a=a.HG(T)+k-a.getStartTime(T);this.U6("gabc",{t:Z.toFixed(3),mt:k.toFixed(3),sg:T,igt:a.toFixed(3)});N.livePlaybackPosition={utcTimeMillis:""+(a*1E3).toFixed(0)};break}}return N}isEmbedsShortsMode(Z,k){return!g.PQ(this.Jq)||(this.Jq.dA||"EMBEDDED_PLAYER_MODE_DEFAULT")!=="EMBEDDED_PLAYER_MODE_DEFAULT"||k?!1:this.B("embeds_enable_shorts")?!!this.embeddedPlayerConfig?.embeddedPlayerFlags?.isShortsExperienceEligible:
!!(this.embeddedPlayerConfig?.embeddedPlayerFlags?.isShortsExperienceEligible&&Z.width<=Z.height)}Vq(){return this.j||this.B("web_player_media_session_infinity")&&this.isLivePlayback}YW(){super.YW();this.g0=null;delete this.LU;delete this.accountLinkingConfig;delete this.V;this.D=this.YF=this.playerResponse=this.xW=null;this.VR=this.adaptiveFormats="";delete this.botguardData;this.vD=this.suggestions=this.Ta=null;this.sabrContextUpdates.clear()}};k7X=!0;var CaN={phone:"SMALL_FORM_FACTOR",tablet:"LARGE_FORM_FACTOR"},mNX={desktop:"DESKTOP",phone:"MOBILE",tablet:"TABLET"},qKr={preroll:"BREAK_PREROLL",midroll:"BREAK_MIDROLL",postroll:"BREAK_POSTROLL"},r_f={0:"YT_KIDS_AGE_UP_MODE_UNKNOWN",1:"YT_KIDS_AGE_UP_MODE_OFF",2:"YT_KIDS_AGE_UP_MODE_TWEEN",3:"YT_KIDS_AGE_UP_MODE_PRESCHOOL"},m9f={0:"MDX_CONTROL_MODE_UNKNOWN",1:"MDX_CONTROL_MODE_REMOTE",2:"MDX_CONTROL_MODE_VOICE"},C1y={0:"UNPLUGGED_FILTER_MODE_TYPE_UNKNOWN",1:"UNPLUGGED_FILTER_MODE_TYPE_NONE",2:"UNPLUGGED_FILTER_MODE_TYPE_PG",
3:"UNPLUGGED_FILTER_MODE_TYPE_PG_THIRTEEN"},r70={0:"EMBEDDED_PLAYER_MUTED_AUTOPLAY_DURATION_MODE_UNSPECIFIED",1:"EMBEDDED_PLAYER_MUTED_AUTOPLAY_DURATION_MODE_30_SECONDS",2:"EMBEDDED_PLAYER_MUTED_AUTOPLAY_DURATION_MODE_FULL"};var Nxf=class extends g.jR{constructor(Z,k){super();this.app=Z;this.state=k}handleExternalCall(Z,k,N){const a=this.state.L[Z],T=this.state.G[Z];let K=a;if(T)if(N&&Xi(N,$wf))K=T;else if(!a)throw Error(`API call from an untrusted origin: "${N}"`);this.logApiCall(Z,N);if(K){a:{for(const y of k)if(String(y).includes("javascript:")){N=!0;break a}N=!1}N&&g.L9(Error(`Dangerous call to "${Z}" with [${k}].`));return K.apply(this,k)}throw Error(`Unknown API method: "${Z}".`);}logApiCall(Z,k,N){const a=this.app.X();
a.TU&&!this.state.N.has(Z)&&(this.state.N.add(Z),g.TO("webPlayerApiCalled",{callerUrl:a.loaderUrl,methodName:Z,origin:k||void 0,playerStyle:a.playerStyle||void 0,embeddedPlayerMode:a.dA,errorCode:N}))}publish(Z,...k){this.state.D.publish(Z,...k);if(Z==="videodatachange"||Z==="resize"||Z==="cardstatechange")this.state.U.publish(Z,...k),this.state.Y.publish(Z,...k)}B(Z){return this.app.X().B(Z)}YW(){if(this.state.element){var Z=this.state.element,k;for(k in this.state.V)this.state.V.hasOwnProperty(k)&&
(Z[k]=null);this.state.element=null}super.YW()}};var AK=class extends g.FC{constructor(){super();this.L=new Map}publish(Z,...k){if(this.L.has(Z))return this.L.get(Z).push(k),!0;let N=!1;try{for(k=[k],this.L.set(Z,k);k.length;)N=super.publish(Z,...k.shift())}finally{this.L.delete(Z)}return N}};var aiU=class extends g.jR{constructor(){super(...arguments);this.element=null;this.j=new Set;this.L={};this.G={};this.V={};this.N=new Set;this.D=new AK;this.U=new AK;this.Y=new AK;this.C=new AK}YW(){this.C.dispose();this.Y.dispose();this.U.dispose();this.D.dispose();this.N=this.V=this.G=this.L=this.j=void 0}};var Xz0=new Set("endSeconds startSeconds mediaContentUrl suggestedQuality videoId rct rctn playmuted muted_autoplay_duration_mode".split(" "));var Txi=class extends Nxf{getApiInterface(){return Array.from(this.state.j)}Vz(Z,k){this.state.C.subscribe(Z,k)}hI(Z,k){this.state.C.unsubscribe(Z,k)}getPlayerState(Z){return rUf(this.app,Z)}O6(){return rUf(this.app)}mq(Z,k,N){t7(this)&&(EN(this.app,!0,1),WS(this.app,Z,k,N,1))}getCurrentTime(Z,k,N){Z=uwU(Z,k,N);k=Z.playerType;N=this.getPlayerState(k);return this.app.getAppState()===2&&N===5?this.app.getVideoData()?.startSeconds||0:this.B("web_player_max_seekable_on_ended")&&N===0?kQ(this.app,k):this.app.getCurrentTime(Z)}Rq(){return this.app.getCurrentTime({playerType:1})}Qz(){const Z=
this.app.HG(1);return isNaN(Z)?this.getCurrentTime({playerType:1}):Z}MX(){return this.app.getDuration({playerType:1})}Xg(Z,k){Z=g.u0(Math.floor(Z),0,100);isFinite(Z)&&TB(this.app,{volume:Z,muted:this.isMuted()},k)}xd(Z){this.Xg(Z,!1)}kR(Z){TB(this.app,{muted:!0,volume:this.getVolume()},Z)}FN(){this.kR(!1)}pR(Z){TB(this.app,{muted:!1,volume:Math.max(5,this.getVolume())},Z)}Jd(){Fd(this.app)||this.pR(!1)}getPlayerMode(){const Z={};this.app.getVideoData().o4&&(Z.pfp={enableIma:this.app.Yg().allowImaMonetization,
autoplay:Tn(this.app.Yg()),mutedAutoplay:this.app.Yg().mutedAutoplay});return Z}vS(){const Z=this.app.getPresentingPlayerType();if(Z===2&&!this.app.g_()){var k=bu(this.app.GZ());if(!(kay(k)||g.PQ(this.app.X())&&this.app.wA().getPlayerState().V(1024))||VG(k))return}(k=this.app.QT().bx)?k.playVideo():this.app.playVideo(Z)}Ke(){EN(this.app,!0,1);this.vS()}pauseVideo(Z){const k=this.app.getPresentingPlayerType();if(k!==2||this.app.g_()||kay(bu(this.app.GZ()))){var N=this.app.QT().bx;N?N.pauseVideo():
this.app.pauseVideo(k,Z)}}l9(){var Z=this.app;let k=!1;Z.kW.r5&&(Z.rA.publish("pageTransition"),k=!0);Z.stopVideo(k)}clearVideo(){}getAvailablePlaybackRates(){var Z=this.app.X();if(Z.enableSpeedOptions){if(["https://admin.youtube.com","https://viacon.corp.google.com","https://yurt.corp.google.com"].includes(Z.Y?Z.ancestorOrigins[0]:window.location.origin)||Z.eP)return jFU;Z=this.app.getVideoData();const k=Z.Hy,N=Z.Ed;return EUG.filter(a=>a>=k&&a<=N)}return[1]}getPlaybackQuality(Z){return this.app.PA({playerType:Z}).getPlaybackQuality()}ix(){}getAvailableQualityLevels(Z){Z=
this.app.PA({playerType:Z});
Z=g.ni(Z.wR(),k=>k.quality);
Z.length&&(Z[0]==="auto"&&Z.shift(),Z=Z.concat(["auto"]));return Z}vD(){return this.getAvailableQualityLevels(1)}pF(){return this.Y()}xl(){return 1}getVideoLoadedFraction(Z){return this.app.getVideoLoadedFraction(Z)}Y(){return this.getVideoLoadedFraction()}HA(){return 0}getSize(){const Z=this.app.fF().getPlayerSize();return{width:Z.width,height:Z.height}}setSize(){this.app.fF().resize()}loadVideoById(Z,k,N,a){if(!Z)return!1;Z=Le(Z,k,N);return this.app.loadVideoByPlayerVars(Z,a)}bq(Z,k,N){Z=this.loadVideoById(Z,
k,N,1);EN(this.app,Z,1)}cueVideoById(Z,k,N,a){Z=Le(Z,k,N);this.app.cueVideoByPlayerVars(Z,a)}O(Z,k,N){this.cueVideoById(Z,k,N,1)}loadVideoByUrl(Z,k,N,a){Z=d9i(Z,k,N);return this.app.loadVideoByPlayerVars(Z,a)}ov(Z,k,N){Z=this.loadVideoByUrl(Z,k,N,1);EN(this.app,Z,1)}cueVideoByUrl(Z,k,N,a){Z=d9i(Z,k,N);this.app.cueVideoByPlayerVars(Z,a)}xW(Z,k,N){this.cueVideoByUrl(Z,k,N,1)}jY(){const Z=this.app.X();if(Z.O)return"";const k=this.app.Yg();let N=void 0;k.isLivePlayback||(N=Math.floor(this.app.getCurrentTime({playerType:1})));
return Z.getVideoUrl(k.videoId,this.getPlaylistId()||void 0,N)}tq(){return this.app.getDebugText()}getVideoEmbedCode(){const Z=this.app.X();if(Z.O)return"";const k=this.app.Yg();return Z.getVideoEmbedCode(k.isPrivate?"":k.title,this.app.Yg().videoId,this.app.fF().getPlayerSize(),this.getPlaylistId()||void 0)}C(Z,k,N){return KX(this.app,Z,k,N)}removeCueRange(Z){return this.app.iW(Z)}loadPlaylist(Z,k,N,a){this.app.loadPlaylist(Z,k,N,a)}hp(Z,k,N,a){this.loadPlaylist(Z,k,N,a);EN(this.app,!0,1)}cuePlaylist(Z,
k,N,a){this.app.cuePlaylist(Z,k,N,a)}nextVideo(Z,k){this.app.nextVideo(Z,k)}tW(){this.nextVideo();EN(this.app,!0,1)}previousVideo(Z){this.app.previousVideo(Z)}LC(){this.previousVideo();EN(this.app,!0,1)}playVideoAt(Z){this.app.playVideoAt(Z)}rD(Z){this.playVideoAt(Z);EN(this.app,!0,1)}setShuffle(Z){const k=this.app.getPlaylist();k&&k.setShuffle(Z)}setLoop(Z){const k=this.app.getPlaylist();k&&(k.loop=Z)}qX(){const Z=this.app.getPlaylist();if(!Z)return null;const k=[];for(let N=0;N<Z.length;N++){const a=
g.Gx(Z,N);a&&k.push(a.videoId)}return k}getPlaylistIndex(){const Z=this.app.getPlaylist();return Z?Z.index:-1}getPlaylistId(){const Z=this.app.getPlaylist();return Z&&Z.listId?Z.listId.toString():null}G(Z){Z==="captions"&&(Z=g.pY(this.app.GZ()))&&!Z.loaded&&Z.load()}j(Z){Z==="captions"&&(Z=g.pY(this.app.GZ()))&&Z.loaded&&Z.Y$()}U(Z,k,N){if(!k)return null;const a=this.app.GZ();return Z==="captions"?(Z=g.pY(a))&&Z.kd(k,N):null}s6(Z,k,N){return Ce(this.app.DF().getVideoData())?{}:this.U(Z,k,N)}V(Z){const k=
this.app.GZ();return Z==="captions"?g.pY(k)?.getOptions()||null:Z?null:(Z=[],g.pY(k)&&Z.push("captions"),Z)}getVolume(){return this.app.XQ.volume}isMuted(){return this.app.XQ.muted}destroy(){this.app.dispose()}logImaAdEvent(Z,k){const N=this.app.X();this.app.Yg().allowImaMonetization&&(Z={adSource:"EMBEDS_AD_SOURCE_IMA",breakType:k,embedUrl:g.al(this.app.X().loaderUrl),eventType:Z,youtubeHost:g.kX(this.app.X().Bo)||""},Z.embeddedPlayerMode=N.dA,g.TO("embedsAdEvent",Z))}mutedAutoplay(Z){const k=this.app.X();
k.getWebPlayerContextConfig()?.embedsHostFlags?.allowMutedAutoplayDurationMode?.length&&!k.D&&this.app.mutedAutoplay(Z)}preloadVideoById(Z,k,N,a){this.app.X().getWebPlayerContextConfig()?.embedsHostFlags?.allowPreloadVideoById&&Z&&(Z=Le(Z,k,N),this.app.preloadVideoByPlayerVars(Z,a))}NW(Z,k,N){this.preloadVideoById(Z,k,N,1)}setFauxFullscreen(Z){g.z4();this.app.uA(Z?2:0)}GF(Z){this.app.X().getWebPlayerContextConfig()?.embedsHostFlags?.allowSetFauxFullscreen&&this.setFauxFullscreen(Z)}setCenterCrop(Z){this.app.X().getWebPlayerContextConfig()?.embedsHostFlags?.allowSetCenterCrop&&
this.app.fF().setCenterCrop(Z)}wakeUpControls(){const Z=g.Vn(this);Z&&Z.qm()}};var B0f="driveweb flix flix_from_driveweb hovercard projector texmex wshbp".split(" ");var Kdb=class extends Txi{VD(Z,k){this.state.Y.subscribe(Z,k)}zS(Z,k){this.state.Y.unsubscribe(Z,k)}cueVideoByPlayerVars(Z,k){this.app.cueVideoByPlayerVars(Z,k)}We(Z,k=1){this.cueVideoByPlayerVars(h7(this,Z),k)}loadVideoByPlayerVars(Z,k,N,a,T){this.app.loadVideoByPlayerVars(Z,N,k,a,T)}Vs(Z,k,N=1,a){this.loadVideoByPlayerVars(h7(this,Z),k,N,a)}preloadVideoByPlayerVars(Z,k,N=NaN,a="",T=""){this.app.preloadVideoByPlayerVars(Z,k,N,a,T)}W5(Z,k=1,N,a){this.preloadVideoByPlayerVars(h7(this,Z),k,N,a)}oQ(Z,
k,N){this.loadVideoById(Z,k,N,1)}x6(Z,k,N){this.loadVideoByUrl(Z,k,N,1)}Td(Z){return this.getPlayerState(Z)}wP(Z=1){const k=F8N(this,Z);Z=this.app.PA({playerType:Z}).getVideoData();k.backgroundable=Z.backgroundable;k.eventId=Z.eventId;k.cpn=Z.clientPlaybackNonce;k.isLive=Z.isLivePlayback;k.isWindowedLive=Z.KX;k.isManifestless=eI(Z);k.allowLiveDvr=Z.allowLiveDvr;k.isListed=Z.isListed;Z.liveUtcStartSeconds!=null&&(k.liveUtcStartSeconds=Z.liveUtcStartSeconds);Z.kT()&&(k.isEncrypted=!0);if(Z.D)for(const N of Z.D.videoInfos)if(N.video?.isHdr()){k.isHdr=
!0;break}k.isMultiChannelAudio=!!Z.Y?.audio?.isMultiChannelAudio();return k}seekBy(Z,k,N,a,T){t7(this)&&WS(this.app,this.app.getCurrentTime()+Z,k,N,T,a)}Sj(Z,k,N){this.seekBy(Z,k,N,void 0,1)}seekTo(Z,k,N,a,T){t7(this)&&WS(this.app,Z,k,N,a,T)}Fk(Z,k,N,a=1){this.seekTo(Z,k,N,a)}getStoryboardFormat(){return Ce(this.app.getVideoData())?null:this.app.getStoryboardFormat()}wd(Z=1,k){return this.getCurrentTime({playerType:Z,OP:k})}D(){let Z=this.app.getPresentingPlayerType(!0);Z===2&&this.app.g_()&&(Z=1);
return Z}getDuration(Z,k){return this.app.getDuration(uwU(Z,k))}Mr(Z=1,k){return this.getDuration({playerType:Z,OP:k})}Vc(Z){return this.getVideoLoadedFraction(Z)}loadModule(Z){if(Z==="annotations_module"){const k=g.R1(this.app.GZ());k&&!k.loaded&&k.load()}this.G(Z)}unloadModule(Z){if(Z==="annotations_module"){const k=g.R1(this.app.GZ());k&&k.loaded&&k.unload()}this.j(Z)}getOption(Z,k,N,a){return Ce(this.app.PA({playerType:a}).getVideoData())?{}:this.setOption(Z,k,N)}sG(Z,k,N){return this.getOption(Z,
k,N,1)}getOptions(Z){const k=this.app.GZ();switch(Z){case "ad":return bu(k)?.getOptions?.()||null;case "remote":return OK(k)?.getOptions?.()||null;case "annotations_module":return g.R1(k)?.getOptions?.()||null;case "creatorendscreen":return Mg(k)?.getOptions?.()||null;case "unplugged":return k.q_()?.getOptions?.()||null;case "kids":return nY(k)?.getOptions?.()||null}if(!Z){Z=this.V();if(!Z)return Z;bu(k)&&Z.push("ad");OK(k)&&Z.push("remote");g.R1(k)&&Z.push("annotations_module");Mg(k)&&Z.push("creatorendscreen");
k.q_()&&Z.push("unplugged");nY(k)&&Z.push("kids");return Z}return this.V(Z)}setOption(Z,k,N){if(!k)return null;const a=this.app.GZ();switch(Z){case "ad":return(Z=bu(a))&&Z.kd&&Z.kd(k,N);case "kids":return(Z=nY(a))&&Z.kd(k,N);case "remote":return(Z=OK(a))&&Z.kd(k,N);case "unplugged":return(Z=a.q_())&&Z.kd(k,N);case "annotations_module":return(Z=g.R1(a))&&Z.kd(k,N);case "creatorendscreen":return(Z=Mg(a))&&Z.kd(k,N)}return this.U(Z,k,N)}addCueRange(Z,k,N,a,T){return KX(this.app,Z,k,N,a,T)}getDebugText(Z){return this.app.getDebugText(Z)}getCurrentBroadcastId(){return null}handleGlobalKeyDown(Z,
k=!1,N=!1,a=!1,T=!1,K,y,Q){const q=g.Vn(this);q&&q.handleGlobalKeyDown(Z,k,N,a,T,K,y,Q)}handleGlobalKeyUp(Z,k=!1,N=!1,a=!1,T=!1,K,y){const Q=g.Vn(this);Q&&Q.handleGlobalKeyUp(Z,k,N,a,T,K,y)}setSizeStyle(Z,k){this.app.setSizeStyle(Z,k)}showControls(){const Z=g.Vn(this);Z&&Z.showControls(!0)}hideControls(){const Z=g.Vn(this);Z&&Z.showControls(!1)}getVideoContentRect(Z){Z=this.app.fF().getVideoContentRect(Z);return{left:Z.left,top:Z.top,width:Z.width,height:Z.height}}toggleFullscreen(){const Z=N=>{g.L9(N)};
var k=this.app.X();if(k.externalFullscreen){if(!g.O$(k))return this.isFullscreen()?bR(window.document.documentElement):J5(window.document.documentElement).catch(Z)}else if(g.z4()||k.j)return this.isFullscreen()?bR(Uv()):k.controlsType!=="3"&&g.z4()?J5(this.app.fF().element).catch(Z):(k=this.app.TM().lq())?J5(k).catch(Z):Promise.reject(Error("Media element missing"));g.Xd(this,"onFullscreenToggled",this.isFullscreen());return Promise.resolve(void 0)}isFullscreen(){return this.app.isFullscreen()}Gx(){return this.app.Gx()}cancelPlayback(){var Z=
bu(this.app.GZ());Z&&Z.created&&Z.destroy();this.app.wA().stopVideo();(Z=this.app.GZ().Es.get("endscreen"))&&Z.un()&&g.B3(this.app.rA,!0)}getProgressState(Z){if(this.D()===3)return OK(this.app.GZ()).getProgressState();const k=this.app.getVideoData();var N=this.app.PA({playerType:Z}),a=N.getPlayerType();a:{var T=this.app.getVideoData();if(T.progressBarStartPosition?.utcTimeMillis&&(T=Number(T.progressBarStartPosition.utcTimeMillis)/1E3,!isNaN(T))){T=this.TX(T,Z);break a}T=0}a:{var K=this.app.getVideoData();
if(K.progressBarEndPosition?.utcTimeMillis&&(K=Number(K.progressBarEndPosition.utcTimeMillis)/1E3,!isNaN(K))){K=this.TX(K,Z);break a}K=0}const y=this.getCurrentTime({playerType:Z});Z=this.getDuration({playerType:Z});const Q=this.app.HG(a),q=this.app.isAtLiveHead(a),r=this.app.LH();var C=this.app;var m=C.PA({playerType:a});m=Y$(C,m);C=ZV(C,m.CI(),m);m=kQ(this.app,a);N=N.mx();const A=this.app.getVideoData().Gf;a=!A||isNaN(A)?0:this.TX(A,a);return{airingStart:T,airingEnd:K,allowSeeking:this.app.uV(),
clipEnd:k.clipEnd,clipStart:k.clipStart,current:y,displayedStart:-1,duration:Z,ingestionTime:Q,isAtLiveHead:q,loaded:r,seekableStart:C,seekableEnd:m,offset:N,viewerLivestreamJoinMediaTime:a}}TX(Z,k){const N=this.app.HG(k);if(!N)return 0;k=N-this.app.getCurrentTime({playerType:k});return Z-k}isInline(){return this.app.isInline()}setInline(Z){this.app.setInline(Z)}zI(){return this.app.DF().Vn(!0)}toggleSubtitles(Z){const k=g.pY(this.app.GZ());k&&k.OV(Z)}getPlayerSize(){const Z=this.app.fF().getPlayerSize();
return{width:Z.width,height:Z.height}}setCenterCrop(Z){this.app.fF().setCenterCrop(Z)}getLoopVideo(){return this.app.getLoopVideo()}setLoopVideo(Z){this.app.setLoopVideo(Z)}},fx0="BASE_URL BASE_YT_URL adformat adaptive_fmts allow_embed audio_only authuser autoplay cc_load_policy cpn dash dashmpd disable_native_context_menu disablekb docid el enable_faster_speeds enablecastapi end eventid external_fullscreen fmt_list hl hlsdvr hlsvp iurl iurlhq iurlmq length_seconds live_playback osig override_hl partnerid pause_at_start pipable player_response playsinline plid post_live_playback postid ps public qoe_cat raw_player_response rel show_loop_video_toggle start startSeconds status suggestedQuality timestamp title token ttsurl use_native_controls url_encoded_fmt_stream_map video_id videoId".split(" "),
D9r="adformat allow_embed authuser autohide autonav autoplay c cbr cbrver cc_load_policy controls cos cosver cr csi_page_type cver cyc dash dashmpd disablekb el enablecastapi enablecsi end external_fullscreen external_list fs hl host_language innertube_api_key innertube_api_version innertube_context_client_version iurl iurlhq iurlmq iv_load_policy jsapicallback length_seconds live_playback live_storyboard_spec loaderUrl osig override_hl pageid partnerid pipable player_params player_wide playsinline plid postid profile_picture ps rel show_miniplayer_button showinfo showwatchlater start startSeconds status storyboard_spec suggestedQuality timestamp title tkn token transparent_background ucid url_encoded_fmt_stream_map use_miniplayer_ui use_native_controls videoId video_id vss_host watermark".split(" ");var Ofi={["api.invalidparam"]:2,auth:150,["drm.auth"]:150,["heartbeat.net"]:150,["heartbeat.servererror"]:150,["heartbeat.stop"]:150,["html5.unsupportedads"]:5,["fmt.noneavailable"]:5,["fmt.decode"]:5,["fmt.unplayable"]:5,["html5.missingapi"]:5,["html5.unsupportedlive"]:5,["drm.unavailable"]:5,["mrm.blocked"]:151,["embedder.identity.denied"]:152,["embedder.identity.missing.referrer"]:153};g.PH=class extends Kdb{isExternalMethodAvailable(Z,k){return this.state.L[Z]?!0:!!(this.state.G[Z]&&k&&Xi(k,$wf))}getBandwidthEstimate(){return yK(this.app.SY)}reportPlaybackIssue(Z=""){const k=this.app.wA();Z={gpu:(0,g.kT)(),d:Z};k.handleError(new g.yA("feedback",Z))}getInternalApi(){return{...this.state.V}}getTrustedApi(){return{...this.state.L,...this.state.G}}getInternalApiInterface(){return g.xa(this.state.V)}queueNextVideo(Z,k,N=NaN,a="",T=""){this.app.queueNextVideo(Z,k,N,a,T)}Tt(Z){Z=this.app.getPlayerStateObject(Z);
return{isBuffering:Z.V(1),isCued:Z.isCued(),isDomPaused:Z.V(1024),isEnded:Z.V(2),isError:Z.V(128),isOrWillBePlaying:Z.isOrWillBePlaying(),isPaused:Z.isPaused(),isPlaying:Z.isPlaying(),isSeeking:Z.V(16),isUiSeeking:Z.V(32),isUnstarted:Z.V(64)}}createSubtitlesModuleIfNeeded(){return this.app.createSubtitlesModuleIfNeeded()}startSeekCsiAction(){this.app.tQ().Y.V=(0,g.z)()}Sm(Z=1,k,N){return this.getCurrentTime({playerType:Z,OP:k,cpn:N})}seekToStreamTime(Z,k,N,a){mhr(this.app,Z,k,N,a)}getStreamTimeOffset(){return this.app.DF().getStreamTimeOffset()}seekToLiveHead(Z,
k){const N=this.app.DF().getVideoData();N&&N.isLivePlayback&&WS(this.app,Infinity,Z,k,1)}requestSeekToWallTimeSeconds(Z,k,N){this.app.DF().vj(Z,k,N)}j9(Z,k,N,a=1,T){this.seekTo(Z,k,N,a,T)}gV(Z,k,N,a){this.seekBy(Z,k,N,a,1)}prefetchKeyPlay(Z,k){this.app.DF().prefetchKeyPlay(Z,k)}setVolume(Z,k=!0){this.Xg(Z,k)}mute(Z=!0){this.kR(Z)}unMute(Z=!0){this.pR(Z)}syncVolume(){const Z=s9y(this.app);TB(this.app,{volume:Z.volume,muted:Z.muted},!1)}getAvailableQualityLabels(){return g.ni(this.app.DF().wR(),Z=>
Z.qualityLabel)}channelSubscribed(){g.A7(this,"SUBSCRIBE",this.app.Yg().WZ)}channelUnsubscribed(){g.A7(this,"UNSUBSCRIBE",this.app.Yg().WZ)}setScreenLayer(Z){this.app.setScreenLayer(Z)}getCurrentPlaylistSequence(){return this.app.wA().getPlaylistSequenceForTime(this.app.getCurrentTime())}getPlaylistSequenceForTime(Z){return this.app.wA().getPlaylistSequenceForTime(Z)}shouldSendVisibilityState(){return!0}confirmYpcRental(){this.app.DF().GP("ypcRentalActivation")}setHomeGroupInfo(Z){this.app.X().homeGroupInfo=
Z}setConnectedRemoteApps(Z){this.app.X().nD=Z}setLivingRoomAppMode(Z){this.app.X().livingRoomAppMode=Dm("LIVING_ROOM_APP_MODE_UNSPECIFIED",Z,QFr)}setEnablePrivacyFilter(Z=!1){this.app.X().enablePrivacyFilter=Z}togglePictureInPicture(){this.app.togglePictureInPicture()}addUtcCueRange(Z,k,N,a,T){return AUb(this.app,Z,k,N,a,T)}r5(Z=1){const k=this.wP(Z);
Z=this.app.PA({playerType:Z}).getVideoData();k.hasProgressBarBoundaries=Z.hasProgressBarBoundaries();k.isPremiere=Z.isPremiere;k.itct=Z.O;k.playerResponseCpn=Z.playerResponseCpn;k.progressBarStartPositionUtcTimeMillis=Z.hasProgressBarBoundaries()&&Z.progressBarStartPosition?.utcTimeMillis?Cg(Z.progressBarStartPosition.utcTimeMillis):null;k.progressBarEndPositionUtcTimeMillis=Z.hasProgressBarBoundaries()&&Z.progressBarEndPosition?.utcTimeMillis?Cg(Z.progressBarEndPosition.utcTimeMillis):null;k.ypcOriginalItct=
Z.g4;k.ypcPreview=Z.ypcPreview;k.paidContentOverlayText=IHy(Z);k.paidContentOverlayDurationMs=j7f(Z);Z.V&&tQ(Z.V)&&(k.usingLocalMedia="true");k.transitionEndpointAtEndOfStream=Z.transitionEndpointAtEndOfStream;k.isSeekable=Z.isSeekable;return k}getAdState(){return this.app.getAdState()}isNotServable(Z){if(Z!==this.app.dB.video_id)return!1;const k=(Z=this.app.DF().getPlayerState())?Z.RJ:null;return!!(Z&&k&&Z.V(128)&&v5R(k.errorCode)===5)}supportsGaplessAudio(){return this.app.X().supportsGaplessAudio()}supportsGaplessShorts(){return this.app.X().supportsGaplessShorts()}isGaplessTransitionReady(Z){return this.app.r0(Z)}enqueueVideoByPlayerVars(Z,
k,N=Infinity,a=""){this.app.enqueueVideoByPlayerVars(Z,k,N,a)}clearQueue(){this.app.clearQueue()}jK(){return g.Vn(this)}sendAbandonmentPing(){this.app.wA().sendAbandonmentPing()}setAutonavState(Z,k=!1){if(this.B("web_player_autonav_use_server_provided_state")&&!k&&(k=this.app.Yg(),k?.xF()))if(Z===3)k.autonavState!==3&&(k.TU=k.autonavState);else if(k.TU!==void 0)Z=k.TU,k.TU=void 0;else return;Huf(this.app,Z)}setAutonav(Z,k=!1){this.setAutonavState(Z?2:1,k)}setLoopRange(Z){this.app.setLoopRange(Z)}getLoopRange(){return this.app.getLoopRange()}hasSupportedAudio51Tracks(){return this.app.DF().hasSupportedAudio51Tracks()}setUserAudio51Preference(Z,
k=!1){this.app.DF().setUserAudio51Preference(Z,k)}getUserAudio51Preference(){return this.app.DF().getUserAudio51Preference()}setProximaLatencyPreference(Z){this.app.DF().setProximaLatencyPreference(Z)}getProximaLatencyPreference(){return this.app.DF().getProximaLatencyPreference()}isProximaLatencyEligible(){return this.app.DF().isProximaLatencyEligible()}getAppState(){return this.app.getAppState()}updateLastActiveTime(){Ti()}setBlackout(Z){this.app.setBlackout(Z)}setUserEngagement(Z){this.app.X().Vp!==
Z&&(this.app.X().Vp=Z,this.app.DF().gk())}updateSubtitlesUserSettings(Z,k=!0){g.pY(this.app.GZ()).U8(Z,k)}getCaptionWindowContainerId(){const Z=g.pY(this.app.GZ());return Z?Z.getCaptionWindowContainerId():""}toggleSubtitlesOn(){const Z=g.pY(this.app.GZ());Z&&Z.bj()}isSubtitlesOn(){const Z=g.pY(this.app.GZ());return Z?Z.isSubtitlesOn():!1}getPlayerResponse(Z){return this.app.PA({playerType:Z}).getVideoData().getPlayerResponse()}hq(){return this.getPlayerResponse(1)}getEmbeddedPlayerResponse(){return this.app.DF().getVideoData().getEmbeddedPlayerResponse()}getWatchNextResponse(Z){return this.app.PA({playerType:Z}).getVideoData().getWatchNextResponse()}iq(){return this.getWatchNextResponse(1)}getHeartbeatResponse(Z){return this.app.PA({playerType:Z}).getVideoData().getHeartbeatResponse()}Kp(){return this.getHeartbeatResponse(1)}getStoryboardFrame(Z,
k){const N=this.app.Cn();if(!N)return null;k=N.levels[k];return k?(Z=g.CL(k,Z))?{column:Z.column,columns:Z.columns,height:Z.ra,row:Z.row,rows:Z.rows,url:Z.url,width:Z.U0}:null:null}getStoryboardFrameIndex(Z,k){const N=this.app.Cn();if(!N)return-1;k=N.levels[k];if(!k)return-1;Z-=this.mx();return k.Y(Z)}getStoryboardLevel(Z){var k=this.app.Cn();return k?(k=k.levels[Z])?{index:Z,intervalMs:k.V,maxFrameIndex:k.U(),minFrameIndex:k.G()}:null:null}getNumberOfStoryboardLevels(){const Z=this.app.Cn();return Z?
Z.levels.length:0}I5(Z){return this.app.wA().I5(Z)}V_(){this.app.wA().V_();this.publish("onFilterAudioFeatures")}dA(){return this.getAudioTrack(1)}getAudioTrack(Z){return this.app.PA({playerType:Z}).getAudioTrack()}TN(){return this.app.PA({playerType:void 0}).TN()}setAudioTrack(Z,k,N){const a=this.app.QT().bx;a&&a.Kd(Z);(Z=this.app.PA({playerType:N}).Kd(Z,k))&&this.V_();return Z}fN(Z,k){return this.setAudioTrack(Z,k,1)}FS(){return this.getAvailableAudioTracks(1)}getAvailableAudioTracks(Z){return this.app.PA({playerType:Z}).getAvailableAudioTracks()}getMaxPlaybackQuality(){const Z=
this.app.DF();return Z.getVideoData().U?FT(Z.nK()):"unknown"}getUserPlaybackQualityPreference(){return this.app.DF().getUserPlaybackQualityPreference()}getSubtitlesUserSettings(){const Z=g.pY(this.app.GZ());return Z?Z.f2():null}resetSubtitlesUserSettings(){g.pY(this.app.GZ()).xe()}setMinimized(Z){this.app.setMinimized(Z)}setOverlayVisibility(Z){this.publish("overlayvisibilitychange",Z)}setInlinePreview(Z){this.app.setInlinePreview(Z)}setSqueezeback(Z){this.app.setSqueezeback(Z)}setGlobalCrop(Z){this.app.fF().setGlobalCrop(Z)}setAppFullscreen(Z){this.app.uA(Z?
4:0)}CN(){return this.app.CN()}getVisibilityState(){return this.CN().getVisibilityState(this.YX(),this.Gx()||g.ml(this.app.X()),this.isMinimized(),this.isInline(),this.app.i9(),this.app.Pf(),this.app.Qy(),this.app.MA())}isMutedByMutedAutoplay(){return this.app.OC}isMutedByEmbedsMutedAutoplay(){return Fd(this.app)}setInternalSize(Z,k){this.app.fF().setInternalSize(new g.i0(Z,k))}mx(Z){return this.app.PA({playerType:Z}).mx()}isMinimized(){return this.app.isMinimized()}i9(){return this.app.i9()}YX(){return this.app.wA().YX()}isOrchestrationLeader(){return this.app.isOrchestrationLeader()}setSafetyMode(Z){this.app.X().enableSafetyMode=
Z}canPlayType(Z){return this.app.canPlayType(Z)}updatePlaylist(Z){if(Z){var k=this.getPlaylistId(),N=!1;k&&k!==Z.list&&(N=!0);Z.external_list!==void 0&&(this.app.Po=Be(!1,Z.external_list));const a=Z.video;(k=this.app.getPlaylist())&&!N?this.isFullscreen()&&((N=a[k.index])&&N.encrypted_id!==g.Gx(k).videoId||(Z.index=k.index)):yM(this.app,{list:Z.list,index:Z.index,playlist_length:a.length});DlN(this.app.getPlaylist(),Z);g.dv(this,"onPlaylistUpdate")}else this.app.updatePlaylist()}updateVideoData(Z,
k){g.ue(this.app.DF().getVideoData(),Z,k)}updateEnvironmentData(Z){XJ(this.app.X(),Z,!1)}A1(Z){this.app.sendVideoStatsEngageEvent(Z,1)}productsInVideoVisibilityUpdated(Z){this.publish("changeProductsInVideoVisibility",Z)}isAtLiveHead(Z,k=!0){return this.app.isAtLiveHead(Z,k)}getVideoAspectRatio(){return this.app.fF().getVideoAspectRatio()}getPreferredQuality(){return this.app.wA().getPreferredQuality()}getPlaybackQualityLabel(Z){return this.app.PA({playerType:Z}).getVideoData().U?.j()?.qualityLabel||
""}setPlaybackQualityRange(Z,k,N,a){this.app.PA({playerType:a}).PJ(g.dg(Z,k||Z,!0,"m"),!0,N)}KN(Z,k,N){this.setPlaybackQualityRange(Z,k,N,1)}onAdUxClicked(Z,k){this.publish("aduxclicked",Z,k)}showAirplayPicker(){this.app.showAirplayPicker()}dispatchReduxAction(Z){g.tE.dispatch(Z)}highlightSettingsMenuItem(Z){this.publish("highlightSettingsMenu",Z)}openSettingsMenuItem(Z){this.publish("openSettingsMenuItem",Z)}N(Z,k){this.state.U.subscribe(Z,k)}PG(Z,k){this.state.U.unsubscribe(Z,k)}zt(Z,k=1){this.cueVideoByPlayerVars(Z,
k)}Ap(Z,k,N=1,a){this.loadVideoByPlayerVars(Z,k,N,a)}gD(Z,k=1,N,a){this.preloadVideoByPlayerVars(Z,k,N,a)}getFeedbackProductData(){return this.app.getFeedbackProductData()}dQ(){return g.Vn(this).dQ()}bV(){return g.Vn(this).bV()}Ex(){return g.Vn(this).Ex()}sb(){return this.jK().sb()}qd(...Z){this.sb().qd(...Z)}qj(){this.sb().qj()}Gn(){this.sb().Gn()}L(){this.sb().hide()}WC(Z,k,N,a,T,K,y,Q){this.sb().WC(Z,k,N,a,T,K,y,Q)}cJ(Z,k){this.sb().cJ(Z,k)}U1(Z,k,N,a,T){this.jK().U1(Z,k,N,a,T)}tJ(Z){this.sb().setEnabled(Z)}vT(Z,
k){this.jK().vT(Z,k)}r7(Z,k){this.jK().r7(Z,k)}IR(Z,k){this.jK().IR(Z,k)}t0(){this.jK().t0()}Yr(Z,k){this.jK().Yr(Z,k)}renderChapterSeekingAnimation(Z,k,N){this.jK().renderChapterSeekingAnimation(Z,k,N)}nE(){this.jK().nE()}getWebPlayerContextConfig(){return this.app.X().getWebPlayerContextConfig()}notifyShortsAdSwipeEvent(){this.publish("shortsadswipe")}nP(){return this.app.wA().nP()}B0(Z,k,N=!1){this.jK()?.B0(Z,k,N)}isKeyboardDisabled(){return this.app.X().qX}};g.PH.prototype.bM=NR(7);g.cH=class extends g.PH{constructor(Z,k){super(Z,k);ify(this);c3(this,"addEventListener",this.VD);c3(this,"removeEventListener",this.zS);c3(this,"cueVideoByPlayerVars",this.We);c3(this,"loadVideoByPlayerVars",this.Vs);c3(this,"preloadVideoByPlayerVars",this.W5);c3(this,"loadVideoById",this.oQ);c3(this,"loadVideoByUrl",this.x6);c3(this,"playVideo",this.vS);c3(this,"loadPlaylist",this.loadPlaylist);c3(this,"nextVideo",this.nextVideo);c3(this,"previousVideo",this.previousVideo);c3(this,"playVideoAt",
this.playVideoAt);c3(this,"getVideoData",this.wP);c3(this,"seekBy",this.Sj);c3(this,"seekTo",this.Fk);c3(this,"showControls",this.showControls);c3(this,"hideControls",this.hideControls);c3(this,"cancelPlayback",this.cancelPlayback);c3(this,"getProgressState",this.getProgressState);c3(this,"isInline",this.isInline);c3(this,"setInline",this.setInline);c3(this,"setLoopVideo",this.setLoopVideo);c3(this,"getLoopVideo",this.getLoopVideo);c3(this,"getVideoContentRect",this.getVideoContentRect);c3(this,"getVideoStats",
this.zI);c3(this,"getCurrentTime",this.wd);c3(this,"getDuration",this.Mr);c3(this,"getPlayerState",this.Td);c3(this,"getVideoLoadedFraction",this.Vc);c3(this,"mute",this.kR);c3(this,"unMute",this.pR);c3(this,"setVolume",this.Xg);c3(this,"loadModule",this.loadModule);c3(this,"unloadModule",this.unloadModule);c3(this,"getOption",this.sG);c3(this,"getOptions",this.getOptions);c3(this,"setOption",this.setOption);c3(this,"addCueRange",this.addCueRange);c3(this,"getDebugText",this.getDebugText);c3(this,
"getStoryboardFormat",this.getStoryboardFormat);c3(this,"toggleFullscreen",this.toggleFullscreen);c3(this,"isFullscreen",this.isFullscreen);c3(this,"getPlayerSize",this.getPlayerSize);c3(this,"toggleSubtitles",this.toggleSubtitles);c3(this,"setCenterCrop",this.setCenterCrop);c3(this,"setFauxFullscreen",this.setFauxFullscreen);c3(this,"setSizeStyle",this.setSizeStyle);c3(this,"handleGlobalKeyDown",this.handleGlobalKeyDown);c3(this,"handleGlobalKeyUp",this.handleGlobalKeyUp);txf(this)}CP(Z,k,N,a,T,
K,y){return this.app.CP(Z,k,N,a,T,K,y)}h4(){return this.app.h4()}GZ(){return this.app.GZ()}Gc(){const Z=this.GZ().Es.get("endscreen");return!!Z&&Z.Gc()}getRootNode(){return this.fF().element}X(){return this.app.X()}gG(){return this.app.hM()}jU(Z){return this.app.jU(Z)}Z1(){return g.Vn(this)?.Z1()||null}getSourceConfigForActiveAudioTrack(){const Z=this.getVideoData()?.vx();if(Z){const k=this.getAudioTrack().getLanguageInfo().getId();for(const N of Z)for(const a of N.audioTracks??[])if(a.id===k)return N}}oO(){return this.app.wA().oO()}getStartTime(Z){return this.app.PA(Z).getStartTime()}getPlayerStateObject(Z){return this.app.getPlayerStateObject(Z)}fF(){return this.app.fF()}getPlaylist(){return this.app.getPlaylist()}getVideoData(Z=
{}){const k=this.app.PA(Z).getVideoData();Z.OP===!1?Z=k:k.enableServerStitchedDai&&Z.playerType===2?(Z=this.app,Z=Z.AI?Z.xg.V?.getVideoData()||Z.getVideoData():Z.getVideoData()):Z=k;return Z}KI(){return this.app.wA().KI()}Cn(Z){return this.app.Cn(Z)}MA(){return this.app.MA()}isHdr(){return this.app.wA().isHdr()}wg(){return this.app.wg()}isEmbedsShortsMode(){var Z=g.Vn(this);const k=this.getVideoData();Z=Z?Z.YK:this.getPlayerSize();const N=!!this.getPlaylist();return!(!k||!k.isEmbedsShortsMode(new g.i0(Z.width,
Z.height),N))}aW(Z,k){this.app.aW(Z,1,k)}N4(Z,k,N,a,T){this.app.Ar(Z,k,N,a,T)}playVideo(Z,k){try{const N=this.app.QT().bx;if(N){N.playVideo();return}if(!Z&&this.getPresentingPlayerType()===2){const a=bu(this.app.GZ());if(a&&VG(a))return}}catch(N){g.b(N)}this.app.playVideo(Z,k)}stopVideo(Z){this.app.PA({playerType:Z}).stopVideo()}XL(Z){this.app.PA({playerType:Z}).XL()}addEventListener(Z,k){this.state.D.subscribe(Z,k)}removeEventListener(Z,k){this.state.D.unsubscribe(Z,k)}Ws(Z){this.app.Ws(Z)}setPlaybackQuality(Z,
k){this.setPlaybackQualityRange(Z,Z,k)}wR(){const Z={},k=this.app.wA().wR();for(const N of k)Z[N.quality]=N;return Z}jh(){return this.app.wA().jh()}Gu(Z){this.app.Gu(Z);Z&&Huf(this.app,Z)}getVideoUrl(Z,k,N,a){let T=this.getPresentingPlayerType(),K=T===2;if(a&&K||T===3)K=!1,T=1;a=this.getVideoData({playerType:T});if(!a)return"";let y;Z||a.isLivePlayback||(y=Math.floor(this.getCurrentTime({playerType:T})));Z=K?void 0:this.getPlaylistId()||void 0;k&&Z==="WL"&&(Z=void 0);return this.app.getVideoUrl(a.videoId,
Z,y,k,N)}A$(Z){this.app.wA().A$(Z)}sC(Z,k){this.GZ().sC(Z,k)}pm(){const Z=g.R1(this.GZ());return!!Z&&Z.pm()}hh(){const Z=g.R1(this.GZ());return!!Z&&Z.hh()}Kl(Z,k,N){const a=g.R1(this.GZ());a&&a.Kl(Z,k,N)}bC(){this.app.wA().IC()}Q3(Z){g.dv(this,"onVideoAreaChange");g.dv(this,Z?"onShowControls":"onHideControls")}Sd(Z,k){const N=g.Vn(this);if(N)return N.Sd(Z,k);Z=this.app.fF().SL();return new g.DJ(0,0,Z.width,Z.height)}KY(){const Z=this.GZ().Es.get("heartbeat");return!!Z&&Z.KY()}uV(){var Z=this.X();
if(Z.Sm||Z.disableSeek)return!1;const k=this.app.wA(),N=k.getVideoData();if(!N.cG()||g.jI(N)||this.getPresentingPlayerType()===2&&!this.app.g_()&&!N.isSeekable||N.qW()&&this.getPresentingPlayerType(!0)===2||k.GC()&&this.getPresentingPlayerType()!==3)return!1;Z=g.dr(Z);return g.xq(Z)&&!N.fN||Fd(this.app)?!1:!0}lK(){return this.app.wA().KK()}isLifaAdPlaying(){const Z=this.getVideoData()?.qW();return Z?this.getPresentingPlayerType(Z)===2:!1}j$(){this.app.wA().j$()}sendVideoStatsEngageEvent(Z,k,N){this.app.sendVideoStatsEngageEvent(Z,
N,k)}f8(Z,k,N){this.app.kc(Z,k,N)}h$(Z,k){this.app.FD(Z,k)}jl(Z,k){qx(this.app,Z,k)}yQ(Z){return this.app.yQ(Z)}GP(Z,k){this.app.PA({playerType:k}).GP(Z)}GC(){return this.app.PA({playerType:void 0}).GC()}zB(){const Z=this.getVideoData();return!!Z&&(Z.zB()||!!Z.hlsFormats||!!Z.Hv)}getPlaybackRate(){return this.app.DF().getPlaybackRate()}setPlaybackRate(Z,k){this.app.setPlaybackRate(Z,k)}TM(){return this.app.TM()}tQ(){return this.app.tQ()}UQ(Z){return this.app.UQ(Z)}createClientVe(Z,k,N,a=!1){this.X().tq&&
this.app.X_.createClientVe(Z,k,N,a)}createServerVe(Z,k,N=!1){this.X().tq&&this.app.X_.createServerVe(Z,k,N)}setTrackingParams(Z,k){this.X().tq&&this.app.X_.setTrackingParams(Z,k)}logClick(Z,k){this.X().tq&&(this.app.X_.click(Z,k),this.publish("veClickLogged",Z))}logVisibility(Z,k,N){this.X().tq&&this.app.X_.In(Z,k,N)}hasVe(Z){return this.X().tq?this.app.X_.hasVe(Z):!1}destroyVe(Z){this.X().tq&&this.app.X_.destroyVe(Z)}getPresentingPlayerType(Z){return this.app.getPresentingPlayerType(Z)}getPlayerType(Z){return this.app.PA({cpn:Z}).getPlayerType()}Sa(){this.app.Sa()}Ir(Z){this.app.Ir(Z)}Wf(){this.app.Wf()}addPlayerResponseForAssociation(){}finishSegmentByCpn(Z,
k,N){return this.app.finishSegmentByCpn(Z,k,N)}eT(Z,k,N,a,T,K,y,Q){return this.app.eT(Z,k,N,a,T,K,y,Q)}CY(Z,k,N,a,T,K,y,Q){this.app.CY(Z,k,N,a,T,K,y,Q)}Eo(){return this.app.Eo()}vl(Z){this.app.vl(Z)}Ci(Z=-1,k=Infinity){this.app.Ci(Z,k)}Uz(Z){g.pY(this.GZ())?.Uz(Z)}pj(Z,k,N){this.app.pj(Z,k,N)}dk(){return this.app.dk()}Yt(Z,k,N=0){this.app.Yt(Z,k,N)}Q_(){return this.app.Q_()}g_(){return this.app.g_()}kL(Z,k,N){return this.app.kL(Z,k,N)}U6(Z,k,N=!1,a){this.app.PA({playerType:a}).U6(Z,k,N)}Zb(Z,k){this.publish("aduxmouseover",
Z,k)}j4(Z,k){this.publish("aduxmouseout",Z,k)}hN(Z,k){this.publish("muteadaccepted",Z,k)}MZ(){return this.app.fF().MZ()}wk(Z){this.app.fF().wk(Z)}BV(Z){return Z?this.app.RK():this.app.wA().BV()}dc(Z){this.app.dc(Z)}r8(){this.app.wA().r8()}sB(){this.app.sB()}getGetAdBreakContext(){const Z=this.app.DF();return Z.getVideoData().getGetAdBreakContext(Z.getCurrentTime(),Z.mx())}Zw(Z,k){this.app.wA().Zw(Z,k)}iE(){return this.app.wA().iE()}lA(Z){return this.app.PA({playerType:Z}).lA()||0}};g.t=g.cH.prototype;
g.t.p7=NR(46);g.t.Rp=NR(44);g.t.Gl=NR(42);g.t.S7=NR(40);g.t.r3=NR(36);g.t.AQ=NR(35);g.t.F8=NR(29);g.t.eU=NR(23);g.t.zG=NR(17);g.t.LZ=NR(15);g.t.Wh=NR(11);g.t.PB=NR(9);var Gdy=class extends KU{constructor(){super(...arguments);this.requestHeaders={}}NQ(Z,k){return{...super.NQ(Z,k),...this.requestHeaders}}},Gn;var yHX=class{constructor(Z){this.experiments=Z;this.V=2048;this.Y=0;this.Vz=(this.j=this.B("html5_streaming_resilience"))?.5:.25;this.D=g.Q5(this.experiments,"html5_media_time_weight_prop")||0;this.N=(this.L=this.experiments.yz("html5_consider_end_stall"))&&s1;this.U=this.experiments.yz("html5_measure_max_progress_handling");this.C=this.B("html5_treat_requests_pre_elbow_as_metadata");this.G=this.B("html5_media_time_weight")||!!this.D;this.B("html5_sabr_live_audio_early_return_fix")&&s1&&(this.V=
65536)}B(Z){return this.experiments.yz(Z)}};g.LX=class extends g.jR{constructor(Z){super();this.fp=Z;this.nF={gf:()=>this.fp}}YW(){this.Y();
super.YW()}Y(){this.fp.dispose()}addCueRange(Z){this.fp.addCueRange(Z)}kc(Z,k){this.fp.kc(Z,k)}oN(){this.fp.oN()}QR(){return this.fp.QR()}s_(Z){return this.fp===Z}IC(){this.fp.bC()}fK(Z,k){this.fp.fK(Z,k)}zx(Z,k){return this.fp.zx(Z,k)}hT(Z){this.fp.hT(Z)}V_(){this.fp.V_()}I5(Z){return this.fp.I5(Z)}getAudioTrack(){return this.fp.getAudioTrack()}TN(){return this.fp.TN()}getAvailableAudioTracks(){return this.fp.getAvailableAudioTracks()}wR(){return this.fp.wR()}jh(){return this.fp.jh()}q4(){return this.getVideoData().clientPlaybackNonce}jO(){return this.fp.jO()}qL(){return this.fp.qL()}ym(){return this.fp.ym()}getCurrentTime(){return this.fp.getCurrentTime()}O4(){return this.fp.O4()}Dp(){return this.fp.Dp()}Vn(Z){return this.fp.Vn(Z)}getDuration(Z){return this.fp.getDuration(Z)}ZI(){return this.fp.ZI()}HG(){return this.fp.HG()}KK(){return this.fp.KK()}dk(){return this.fp.dk()}LH(){return this.fp.LH()}gG(){return this.fp.gG()}lA(){return this.fp.lA()}hZ(){return this.fp.hZ()}Ja(Z){return this.fp.Ja(Z)}TM(){return this.fp.TM()}zX(){return this.fp.zX()}Vt(){return this.fp.Vt()}CI(){return this.fp.CI()}ZQ(Z,
k,N){return this.fp.ZQ(Z,k,N)}getPlaybackQuality(){return this.fp.getPlaybackQuality()}getPlaybackRate(){return this.fp.getPlaybackRate()}getPlayerState(){return this.fp.getPlayerState()}getPlayerType(){return this.fp.getPlayerType()}getPlaylistSequenceForTime(Z){return this.fp.getPlaylistSequenceForTime(Z)}UQ(Z){return this.fp.UQ(Z)}nP(){return this.fp.nP()}getPreferredQuality(){return this.fp.getPreferredQuality()}Q9(){return this.fp.Q9()}getProximaLatencyPreference(){return this.fp.getProximaLatencyPreference()}nK(){return this.fp.nK()}getStartTime(){return 0}Cn(){return this.getVideoData().Cn()}getStoryboardFormat(){return this.getVideoData().getStoryboardFormat()}getStreamTimeOffset(){return this.fp.getStreamTimeOffset()}lc(){return this.fp.lc()}mx(){return this.fp.mx()}oO(){return this.fp.oO()}getUserAudio51Preference(){return this.fp.getUserAudio51Preference()}getUserPlaybackQualityPreference(){return this.fp.getUserPlaybackQualityPreference()}getVideoData(){return this.fp.getVideoData()}KI(){return this.fp.KI()}S9(){return this.fp.S9()}getVideoLoadedFraction(){if(this.getVideoData().jY())return 1;
const Z=this.fp.TM();return Z?Z.Ok():0}gf(){return this.fp}uu(Z){this.fp.uu(Z)}handleError(Z){this.fp.handleError(Z)}VJ(Z){this.fp.VJ(Z)}kK(Z){this.fp.kK(Z)}GC(){return this.fp.GC()}hasSupportedAudio51Tracks(){return this.fp.hasSupportedAudio51Tracks()}isAd(){return this.getVideoData().isAd()}Vr(){return this.fp.Vr()}YX(){return this.fp.YX()}isAtLiveHead(Z,k){return this.fp.isAtLiveHead(Z,k)}SZ(){return this.fp.SZ()}isGapless(){return this.fp.isGapless()}r0(){return this.fp.r0()}isHdr(){return this.fp.isHdr()}NN(){return this.fp.NN()}CT(){return this.fp.CT()}iE(){return this.fp.iE()}isProximaLatencyEligible(){return this.fp.isProximaLatencyEligible()}Q_(){return this.fp.Q_()}cf(Z){return!!this.fp.loader?.cf(Z)}t7(){return this.fp.t7()}bK(){this.fp.bK()}QJ(Z){this.fp.QJ(Z)}pz(){this.fp.pz()}Jn(){this.fp.Jn()}YC(){this.fp.YC()}Lh(){this.fp.Lh()}YR(Z){this.fp.YR(Z)}Hg(){this.fp.Hg()}pauseVideo(Z){this.fp.pauseVideo(Z)}prefetchKeyPlay(Z,
k){this.fp.prefetchKeyPlay(Z,k)}sy(Z){this.fp.sy(Z)}XZ(Z){this.fp.XZ(Z)}playVideo(Z,k){return this.fp.playVideo(Z,k)}GU(Z,k,N,a,T){this.fp.GU(Z,k,N,a,T)}yu(Z,k,N,a,T){this.fp.yu(Z,k,N,a,T)}U6(Z,k,N){this.fp.U6(Z,k,N)}A$(Z){this.fp.A$(Z)}Zw(Z,k){this.fp.WA.Zw(Z,k)}Cc(Z,k,N){this.fp.Cc(Z,k,N)}dV(Z){this.fp.dV(Z)}Dh(Z){this.fp.Dh(Z)}Yy(Z,k){this.fp.Yy(Z,k)}f7(Z,k,N,a,T,K,y,Q){this.fp.f7(Z,k,N,a,T,K,y,Q)}C9(){Mo(this.fp.WA)}Lt(Z){this.fp.Lt(Z)}XL(Z,k){this.fp.XL(Z,k)}removeCueRange(Z){this.fp.removeCueRange(Z)}FD(Z){this.fp.FD(Z)}jl(Z){return this.fp.kX.jl(Z)}uc(Z){this.fp.uc(Z)}SU(Z,
k,N){this.fp.SU(Z,k,N)}PU(){this.fp.PU()}a6(){this.fp.kX.reset()}HC(){this.fp.HC()}vj(Z,k,N){this.fp.vj(Z,k,N)}seekTo(Z,k){this.fp.seekTo(Z,k)}sendAbandonmentPing(){this.fp.sendAbandonmentPing()}sendVideoStatsEngageEvent(Z,k){this.fp.sendVideoStatsEngageEvent(Z,k)}bv(Z,k,N){this.fp.bv(Z,k,N)}setLoop(Z){this.fp.setLoop(Z)}Kt(){this.fp.Kt()}setMediaElement(Z){this.fp.setMediaElement(Z)}uM(Z,k,N,a){this.fp.uM(Z,k,N,a)}setPlaybackRate(Z){this.fp.setPlaybackRate(Z)}N4(Z,k,N,a,T,K){this.fp.N4(Z,k,N,a,T,
K)}mf(Z,k){this.fp.mf(Z,k)}GP(Z){this.fp.GP(Z)}setProximaLatencyPreference(Z){this.fp.setProximaLatencyPreference(Z)}Ab(Z,k,N){this.fp.Ab(Z,k,N)}rF(Z){this.fp.rF(Z)}IW(){this.fp.IW()}au(Z){this.fp.au(Z)}setUserAudio51Preference(Z,k){this.fp.setUserAudio51Preference(Z,k)}PJ(Z,k,N){this.fp.PJ(Z,k,N)}EQ(){return this.fp.EQ()}j$(){this.fp.j$()}BV(){return this.fp.BV()}cj(Z){this.fp.cj(Z)}TD(){this.fp.TD()}e0(Z){this.fp.e0(Z)}stopVideo(){this.fp.stopVideo()}subscribe(Z,k,N){return this.fp.subscribe(Z,
k,N)}tZ(Z,k){this.fp.tZ(Z,k)}togglePictureInPicture(){this.fp.togglePictureInPicture()}yQ(Z){return this.fp.kX.yQ(Z)}zA(Z){this.fp.kX.zA(Z)}unsubscribe(Z,k,N){return this.fp.unsubscribe(Z,k,N)}kF(Z,k){this.fp.kF(Z,k)}Kd(Z,k){return this.fp.Kd(Z,k)}gk(){this.fp.gk()}xN(Z){this.fp.xN(Z)}r8(){this.fp.r8()}};g.t=g.LX.prototype;g.t.CH=NR(51);g.t.S7=NR(39);g.t.AQ=NR(34);g.t.F8=NR(28);g.t.eU=NR(22);g.t.LZ=NR(14);var Q5X=class{constructor(){this.licenseRequest=this.mediaKeys=this.V=this.certificate=null;this.U=!1}dispose(){this.certificate=null;this.V?.dispose();this.licenseRequest=this.V=null;this.mediaKeys?.dispose();this.mediaKeys=null;this.U=!0}jm(){return this.U}};var nz=class extends g.af{constructor(Z,k,N,a=!1){super(k);this.S=Z;this.FS=a;this.L=new g.tt(this);this.fade=new g.ML(this,N,!0,void 0,void 0,()=>{this.N()});
g.u(this,this.L);g.u(this,this.fade)}show(){const Z=this.Ga();super.show();this.FS&&(this.L.K(window,"blur",this.cA),this.L.K(oC(this),"click",this.dA));Z||this.publish("show",!0)}hide(){const Z=this.Ga();super.hide();S9f(this);Z&&this.publish("show",!1)}Iv(Z,k){this.sourceElement=Z;this.fade.show();k?(this.G||(this.G=this.L.K(this.S,"appresize",this.C)),this.C()):this.G&&(this.L.Ce(this.G),this.G=void 0)}N(){this.sourceElement&&this.element&&(this.sourceElement.getAttribute("aria-haspopup"),this.sourceElement.setAttribute("aria-expanded",
"true"),this.focus())}C(){const Z=g.Vn(this.S);this.sourceElement&&Z.U1(this.element,this.sourceElement)}cA(){const Z=this.Ga();S9f(this);this.fade.hide();Z&&this.publish("show",!1)}dA(Z){const k=jr(Z);k&&(g.C1(this.element,k)||this.sourceElement&&g.C1(this.sourceElement,k)||!g.SM(Z))||this.cA()}Ga(){return this.LF&&this.fade.state!==4}};var qAi=class extends nz{constructor(Z,k,N,a){a=new g.E({J:"div",BD:["ytp-linked-account-popup-button"],Da:a,W:{role:"button",tabindex:"0"}});k=new g.E({J:"div",Z:"ytp-linked-account-popup",W:{role:"dialog","aria-modal":"true",tabindex:"-1"},A:[{J:"div",Z:"ytp-linked-account-popup-title",Da:k},{J:"div",Z:"ytp-linked-account-popup-description",Da:N},{J:"div",Z:"ytp-linked-account-popup-buttons",A:[a]}]});super(Z,{J:"div",Z:"ytp-linked-account-popup-container",A:[k]},100);this.dialog=k;g.u(this,this.dialog);
a.listen("click",()=>{this.cA()});
g.u(this,a);g.$n(this.S,this.element,4);this.hide()}Iv(){super.Iv();this.dialog.focus()}};g.y9=class extends g.af{constructor(Z,k,N,a){super(Z);this.priority=k;N&&g.UK(this,N);a&&this.setContent(a)}setIcon(Z){this.updateValue("icon",Z)}updateValue(Z,k){super.updateValue(Z,k);this.publish("size-change")}};g.HH={DR:18,kI:17,A8:16,rqD:15,Dxp:14,Sy:13,rp:12,MC:11,uH:10,R1:9,AUDIO:8,SUBTITLES:7,SLEEP_TIMER:6,Wa:5,Ck:4,tF:3,w$:2,REMOTE:1,E5:0,18:"LOOP",17:"STABLE_VOLUME",16:"VOICE_BOOST",15:"REMOTE_SELECT",14:"SIZE",13:"MINIPLAYER",12:"THREED",11:"AUTONAV",10:"CINEMATIC",9:"ANNOTATIONS",8:"AUDIO",7:"SUBTITLES",6:"SLEEP_TIMER",5:"SPEED",4:"AUDIO_SETTINGS",3:"QUALITY",2:"LINKEDACCOUNT",1:"REMOTE",0:"CONTEXTMENU"};var rHy=class extends g.y9{constructor(Z){super(g.zn({"aria-haspopup":"true"},["ytp-linked-account-menuitem"]),2);this.S=Z;this.U=this.V=!1;this.on=Z.Z1();Z.createServerVe(this.element,this,!0);this.K(this.S,"settingsMenuVisibilityChanged",k=>{this.Df(k)});
this.K(this.S,"videodatachange",this.Y);this.listen("click",this.onClick);this.Y()}Df(Z){this.U&&this.S.logVisibility(this.element,this.V&&Z)}Y(){var Z=this.S.getVideoData()?.accountLinkingConfig?.linked;Z&&!this.V?(Z=this.S.getVideoData()?.accountLinkingConfig,this.setIcon(QQ()),g.UK(this,ba(Z?.menuData?.connectedMenuLabel)),this.D=new qAi(this.S,ba(Z?.menuData?.connectedDialogTitle),ba(Z?.menuData?.connectedDialogMessage),ba(Z?.menuData?.confirmButtonText)),g.u(this,this.D),Z=Z?.menuData?.trackingParams||
null,(this.U=!!Z)&&this.S.setTrackingParams(this.element,Z),this.on.OH(this),this.V=!0):!Z&&this.V&&(this.on.Bq(this),this.V=!1)}onClick(){this.U&&this.S.logClick(this.element);this.on.cA();this.D&&this.D.Iv()}};var dY=class extends g.jR{constructor(Z){super();this.api=Z}B(Z){return this.api.B(Z)}};var CNf=class extends dY{constructor(Z){super(Z);I(Z,"setAccountLinkState",k=>{this.setAccountLinkState(k)});
I(Z,"updateAccountLinkingConfig",k=>{this.updateAccountLinkingConfig(k)});
Z.addEventListener("videodatachange",(k,N)=>{this.onVideoDataChange(N)});
Z.addEventListener("settingsMenuInitialized",()=>{this.menuItem=new rHy(this.api);g.u(this,this.menuItem)})}onVideoDataChange(Z){if(!Z.accountLinkingConfig){var k=Z.getPlayerResponse()?.accountLinkingConfig;
Z.accountLinkingConfig=k}if(k=Z.accountLinkingConfig?.alsParam)Z.ai=k}setAccountLinkState(Z){this.api.getVideoData().ai=Z;this.api.bC()}updateAccountLinkingConfig(Z){const k=this.api.getVideoData(),N=k.accountLinkingConfig;N&&(N.linked=Z);this.api.publish("videodatachange","dataupdated",k,this.api.getPresentingPlayerType())}};var mk0=class extends dY{constructor(Z){super(Z);this.V=null;this.events=new g.tt(Z);g.u(this,this.events);this.events.K(Z,"applicationvideodatachange",()=>{this.CJ()})}CJ(){const Z=this.api.getPlaybackRate();
var k=this.api.getVideoData();if(k){var N=k.adFormat==="17_8";var a=k.qa?.U()===8;N=k.isAd()&&(N||a)}else N=!1;N||((k=this.api.getVideoData())?(N=k.adFormat==="15_6",a=k.qa?.U()===7,N=k.isAd()&&(N||a)):N=!1);N?(Z!==1&&(this.V=Z),this.api.setPlaybackRate(1)):this.V!==null&&(this.api.setPlaybackRate(this.V),this.V=null)}};var s5N=class{constructor(Z){this.api=Z;this.V={}}};var AHG=class extends dY{constructor(Z){super(Z);this.events=new g.tt(this);g.u(this,this.events);this.V=new s5N(this.api);this.events.K(this.api,"legacyadtrackingpingreset",()=>{this.V.V={}});
this.events.K(this.api,"legacyadtrackingpingchange",k=>{var N=this.V;RC(N,"part2viewed",1,0x8000000000000);RC(N,"engagedview",Math.max(1,k.g8*1E3),0x8000000000000);if(!k.isLivePlayback){var a=k.lengthSeconds*1E3;vZ(k)&&N.api.B("html5_shorts_gapless_ads_duration_fix")&&(a=N.api.getProgressState().seekableEnd*1E3-k.UB);RC(N,"videoplaytime25",a*.25,a);RC(N,"videoplaytime50",a*.5,a);RC(N,"videoplaytime75",a*.75,a);RC(N,"videoplaytime100",a,0x8000000000000);RC(N,"conversionview",a,0x8000000000000);RC(N,
"videoplaybackstart",1,a);RC(N,"videoplayback2s",2E3,a);RC(N,"videoplayback10s",1E4,a)}});
this.events.K(this.api,g.te("appad"),this.U);this.events.K(this.api,g.he("appad"),this.U)}U(Z){var k=Z.getId();const N=this.api.getVideoData({playerType:1}),a=!this.api.isInline();if(!N.inlineMetricEnabled||a){if(k==="part2viewed"){if(N.Nb&&g.iv(N.Nb),N.Nn&&MN(this,N.Nn),N.eN){var T={CPN:this.api.getVideoData().clientPlaybackNonce};for(var K of N.eN)MN(this,g.hm(K,T))}}else k==="engagedview"&&N.y7&&(T={CPN:this.api.getVideoData().clientPlaybackNonce},g.iv(g.hm(N.y7,T)));N.hk&&(T=N.hk,K=Z.getId(),
T=AP(T,{label:K}),g.iv(T));switch(k){case "videoplaytime25":N.wu&&MN(this,N.wu);N.iT&&ne(this,N.iT);N.nj&&g.iv(N.nj);break;case "videoplaytime50":N.Wx&&MN(this,N.Wx);N.Mk&&ne(this,N.Mk);N.e_&&g.iv(N.e_);break;case "videoplaytime75":N.Ak&&MN(this,N.Ak);N.cS&&ne(this,N.cS);N.yH&&g.iv(N.yH);break;case "videoplaytime100":N.Ic&&MN(this,N.Ic),N.Cg&&ne(this,N.Cg),N.TR&&g.iv(N.TR)}(T=this.api.getVideoData().g0)&&U9G(this,T,Z.getId())&&U9G(this,T,`${Z.getId()}gaia`)}if(N.inlineMetricEnabled&&!a)switch(k){case "videoplaybackstart":(k=
N.pH?.V)&&MN(this,k);break;case "videoplayback2s":(k=N.pH?.D)&&MN(this,k);break;case "videoplayback10s":(k=N.pH?.U)&&MN(this,k)}this.api.h$([Z],1)}};var PNN=class extends dY{constructor(Z){super(Z);this.events=new g.tt(Z);g.u(this,this.events);this.events.K(Z,"videoready",k=>{Z.getPresentingPlayerType()===1&&(k={playerDebugData:{pmlSignal:!!k.getPlayerResponse()?.adPlacements?.some(N=>N?.adPlacementRenderer?.renderer),
contentCpn:k.clientPlaybackNonce}},g.TO("adsClientStateChange",k))})}};var cHf=class extends dY{constructor(Z){super(Z);this.accumulatedWatchTimeMillis=0;this.w_=this.V=null;this.events=new g.tt(Z);g.u(this,this.events);I(this.api,"getAccumulatedWatchTime",()=>this.getAccumulatedWatchTime());
this.events.K(Z,"progresssync",()=>{var k=this.api.getVideoData();if(k&&(k=k.clientPlaybackNonce)){this.w_!==k&&(this.accumulatedWatchTimeMillis=0,this.V=null,this.w_=k);var N=this.api.getPlayerStateObject();k=Math.round((this.api.getCurrentTime()||0)*1E3);N.V(8)&&this.V!==null&&(N=k-this.V,N>0&&N<1E3&&(this.accumulatedWatchTimeMillis+=N));this.V=k}})}getAccumulatedWatchTime(){return this.w_?{cpn:this.w_,
accumulatedWatchTimeMillis:this.accumulatedWatchTimeMillis}:null}};var XO=class extends g.y9{constructor(Z,k){super(g.zn({role:"menuitemcheckbox","aria-checked":"false"}),k,Z,{J:"div",Z:"ytp-menuitem-toggle-checkbox"});this.checked=!1;this.enabled=!0;this.listen("click",this.onClick)}onClick(){this.enabled&&(this.V(!this.checked),this.publish("select",this.checked))}getValue(){return this.checked}V(Z){this.checked=Z;this.element.setAttribute("aria-checked",String(this.checked))}setEnabled(Z){(this.enabled=Z)?this.element.removeAttribute("aria-disabled"):this.element.setAttribute("aria-disabled",
"true")}};var H$0={rJ:2,A8:1,kI:0,2:"AUDIO_TRACK",1:"VOICE_BOOST",0:"STABLE_VOLUME"};var EK=["en-CA","en","es-MX","fr-CA"];var dki=class extends XO{constructor(Z,k){super(Z.B("web_fix_annotations")?"Annotated Overlays":"Annotations",g.HH.R1);this.S=Z;this.on=k;this.U=!1;Z.B("web_settings_menu_icons")&&(k=Z.B("delhi_modern_web_player_icons")?{J:"svg",W:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{d:"M9.65 6.00L9.5 6H2.5L2.34 6.00C1.97 6.04 1.63 6.21 1.38 6.49C1.13 6.77 1.00 7.12 1 7.5V13.5L1.00 13.65C1.04 14.02 1.21 14.36 1.49 14.61C1.77 14.86 2.12 15 2.5 15H4.5L3.81 17.75C3.77 17.89 3.77 18.03 3.79 18.17C3.82 18.31 3.87 18.45 3.95 18.56C4.03 18.68 4.14 18.78 4.26 18.85C4.38 18.92 4.51 18.97 4.66 18.99L4.78 19H8.55L8.72 18.98C8.88 18.95 9.04 18.89 9.17 18.79C9.30 18.68 9.40 18.55 9.47 18.40L9.52 18.24L10.62 13.96C10.84 13.11 10.96 12.24 10.99 11.36L11 10.98V7.5C11 7.12 10.86 6.77 10.61 6.49C10.36 6.21 10.02 6.04 9.65 6.00ZM21.65 6.00L21.5 6H14.5L14.34 6.00C13.97 6.04 13.63 6.21 13.38 6.49C13.13 6.77 13 7.12 13 7.5V13.5L13.00 13.65C13.04 14.02 13.21 14.36 13.49 14.61C13.77 14.86 14.12 15 14.5 15H16.5L15.81 17.75C15.77 17.89 15.77 18.03 15.79 18.17C15.82 18.31 15.87 18.44 15.95 18.56C16.03 18.68 16.14 18.78 16.26 18.85C16.38 18.92 16.51 18.97 16.66 18.99L16.78 19H20.55L20.72 18.98C20.88 18.95 21.04 18.89 21.17 18.79C21.30 18.68 21.40 18.55 21.47 18.40L21.52 18.24L22.62 13.96C22.84 13.11 22.96 12.24 22.99 11.36L23 10.98V7.5C23 7.12 22.86 6.77 22.61 6.49C22.36 6.21 22.02 6.04 21.65 6.00ZM3 13V8H9V10.98C9.00 11.71 8.91 12.44 8.76 13.16L8.68 13.47L7.78 17H6.06L6.44 15.48L7.06 13H3ZM15 13V8H21V10.98C21 11.71 20.91 12.44 20.76 13.16L20.68 13.47L19.78 17H18.06L18.44 15.48L19.06 13H15Z",
fill:"white"}}]}:{J:"svg",W:{height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{d:"M17.5,7c1.93,0,3.5,1.57,3.5,3.5c0,1-0.53,4.5-0.85,6.5h-2.02l0.24-1.89l0.14-1.09l-1.1-0.03C15.5,13.94,14,12.4,14,10.5 C14,8.57,15.57,7,17.5,7             M6.5,7C8.43,7,10,8.57,10,10.5c0,1-0.53,4.5-0.85,6.5H7.13l0.24-1.89l0.14-1.09l-1.1-0.03 C4.5,13.94,3,12.4,3,10.5C3,8.57,4.57,7,6.5,7             M17.5,6C15.01,6,13,8.01,13,10.5c0,2.44,1.95,4.42,4.38,4.49L17,18h4c0,0,1-6,1-7.5 C22,8.01,19.99,6,17.5,6L17.5,6z             M6.5,6C4.01,6,2,8.01,2,10.5c0,2.44,1.95,4.42,4.38,4.49L6,18h4c0,0,1-6,1-7.5 C11,8.01,8.99,6,6.5,6L6.5,6z",
fill:"white"}}]},this.setIcon(k));this.K(Z,"videodatachange",this.aq);this.K(Z,"onApiChange",this.aq);this.subscribe("select",this.onSelect,this);this.aq()}isLoaded(){const Z=g.R1(this.S.GZ());return Z!==void 0&&Z.loaded}aq(){!this.S.B("web_fix_annotations")&&g.R1(this.S.GZ())===void 0||this.S.getPresentingPlayerType()===3?this.U&&(this.on.Bq(this),this.U=!1):this.U||(this.on.OH(this),this.U=!0);this.S.B("web_fix_annotations")?this.V(this.S.B("web_fix_annotations")&&!!this.S.getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.isAnnotationsEnabled):
this.V(this.isLoaded())}onSelect(Z){this.S.B("web_fix_annotations")||this.isLoaded();Z?this.S.loadModule("annotations_module"):this.S.unloadModule("annotations_module");this.S.publish("annotationvisibility",Z)}YW(){this.U&&this.on.Bq(this);super.YW()}};var XOf=class extends dY{constructor(Z){super(Z);this.events=new g.tt(Z);g.u(this,this.events);Z.addEventListener("settingsMenuInitialized",()=>{const k=new dki(this.api,this.api.Z1());g.u(this,k)})}};var Ldf={[0]:Z=>aGj(Z,k=>k.ZF?.id),
[2]:Z=>T0(Z,ZQ),
[3]:Z=>T0(Z,kc),
[4]:Z=>T0(Z,aG),
[1]:Z=>T0(Z,Ns)},Paf=class{constructor(Z){this.V={};
this.D={};this.nF={NVa:()=>this.V};
this.videoData=Z;const k=Z.D?.D;k&&k.length>0?this.U=k:(Z=Z.getAvailableAudioTracks(),this.U=Z.length>0?W8X(Z):[]);for(const N of Lt)this.V[N]=Ldf[N](this.U);this.V_()}I5(Z){return this.D[Z]}V_(){let Z=this.U;const k={};for(const N of Lt)if(this.V[N]){Z=Vl[N].Xc(Z,this.videoData);for(const a of Lt)k[a]!==void 0||Er(Z,Vl[a].YY)||(k[a]=Vl[N].ZG);k[N]===void 0&&(k[N]=0)}else k[N]=1;this.D=k}},Lt=[0,1,2,3,4],Vl={[0]:{ZG:2,YY:N7G,Xc:jtR},[2]:{ZG:4,YY:ZQ,Xc:E5N},[3]:{ZG:5,YY:kc,Xc:Y9G},[1]:{ZG:3,YY:Ns,
Xc:ZNN},[4]:{ZG:6,YY:aG,Xc:kZf}};var VFG=class extends dY{constructor(Z){super(Z);this.events=new g.tt(Z);g.u(this,this.events);const k=this.api.B("html5_enable_audio_quality_setting_feature");I(this.api,"getUserAudioQualitySetting",()=>k?this.getUserAudioQualitySetting():2);
I(this.api,"setUserAudioQualitySetting",N=>{k&&this.setUserAudioQualitySetting(N)});
I(this.api,"hasHqaAudioTrack",()=>k?this.hasHqaAudioTrack():!1);
I(this.api,"getAudioQualitySettingState",()=>k?this.api.I5(4):1);
this.Gy=YnU();this.updateEnvironmentData()}getUserAudioQualitySetting(){return this.Gy}setUserAudioQualitySetting(Z){this.api.U6("aqs_set",{setting:Z});g.Z_("yt-player-audio-quality-setting",Z,3122064E3);Z!==this.Gy&&(this.Gy=Z,this.updateEnvironmentData(),this.hasHqaAudioTrack()&&this.api.r8(),this.api.V_())}hasHqaAudioTrack(){const Z=this.api.getVideoData()?.D?.U;return Z?Er(Z,k=>aG(k)):!1}updateEnvironmentData(){this.api.X().Gy=this.Gy}};var Fdy=class extends dY{constructor(Z){super(Z);I(this.api,"getAudioTrackState",()=>this.api.I5(0))}};var tFf=class extends g.E{constructor(Z){super({J:"button",BD:["ytp-button","ytp-autonav-toggle"],W:{title:Z.B("player_tooltip_data_title_killswitch")?"{{title}}":"","data-tooltip-title":"{{data-tooltip-title}}","aria-label":"{{label}}","data-priority":"3","data-tooltip-target-id":"ytp-autonav-toggle-button"},A:[{J:"div",Z:"ytp-autonav-toggle-button-container",A:[{J:"div",Z:"ytp-autonav-toggle-button",W:{"aria-checked":"true"}}]}]});this.S=Z;this.D=[];this.V=!1;this.isChecked=!0;Z.createClientVe(this.element,
this,113681);this.K(Z,"presentingplayerstatechange",this.U);this.listen("click",this.onClick);this.D.push(this.K(this.S,"videodatachange",this.U));this.D.push(this.K(this.S,"videoplayerreset",this.U));this.D.push(this.K(this.S,"onPlaylistUpdate",this.U));this.D.push(this.K(this.S,"autonavchange",this.Y));Z.B("delhi_fast_follow_autonav_toggle")&&this.element.classList.add("delhi-fast-follow-autonav-toggle");la(Z,this.element,this);this.U()}U(){var Z;if(Z=this.S.getPresentingPlayerType()!==3&&g.xn(this.S)&&
this.S.fF().getPlayerSize().width>=400)Z=this.Yg(),Z=this.S.X().B("client_respect_autoplay_switch_button_renderer")?!!Z.autoplaySwitchButtonRenderer:!!Z.getWatchNextResponse()?.contents?.twoColumnWatchNextResults?.autoplay?.autoplay!==!1;Z?this.V||(this.V=!0,this.In(this.V),Z=this.Yg(),this.Y(Z.autonavState),this.S.logVisibility(this.element,this.V)):(this.V=!1,this.In(this.V))}Y(Z){T7f(this)?this.isChecked=Z!==1:((Z=Z!==1)||(Z=g.QC(),Z=g.ii("web_autonav_allow_off_by_default")&&!Z.Aq(141)&&g.G("AUTONAV_OFF_BY_DEFAULT")?
!1:!Z.Aq(140)),this.isChecked=Z);Kzy(this)}onClick(){this.isChecked=!this.isChecked;this.S.Gu(this.isChecked?2:1);Kzy(this);if(T7f(this)){const Z=this.Yg().autoplaySwitchButtonRenderer;this.isChecked&&Z?.onEnabledCommand?g.A7(this.S,"innertubeCommand",Z.onEnabledCommand):!this.isChecked&&Z?.onDisabledCommand&&g.A7(this.S,"innertubeCommand",Z.onDisabledCommand)}this.S.logClick(this.element)}getValue(){return this.isChecked}Yg(){return this.S.getVideoData({playerType:1})}};var h0y=class extends dY{constructor(Z){super(Z);this.events=new g.tt(Z);g.u(this,this.events);this.events.K(Z,"standardControlsInitialized",()=>{const k=new tFf(Z);g.u(this,k);Z.vT(k,"RIGHT_CONTROLS_LEFT")})}};var ykX=class extends XO{constructor(Z){super(Z.B("web_player_use_cinematic_label_2")?"Ambient mode":"Cinematic lighting",g.HH.uH);this.S=Z;this.U=!1;this.D=new g.Uc(()=>{g.Wp(this.element,"ytp-menuitem-highlighted")},0);
this.on=Z.Z1();Z=Z.B("delhi_modern_web_player_icons")?{J:"svg",W:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{d:"M12 .5C11.73 .5 11.48 .60 11.29 .79C11.10 .98 11 1.23 11 1.5V3.5C11 3.76 11.10 4.01 11.29 4.20C11.48 4.39 11.73 4.5 12 4.5C12.26 4.5 12.51 4.39 12.70 4.20C12.89 4.01 13 3.76 13 3.5V1.5C13 1.23 12.89 .98 12.70 .79C12.51 .60 12.26 .5 12 .5ZM3.79 1.29C3.61 1.46 3.51 1.70 3.50 1.94C3.48 2.19 3.56 2.43 3.72 2.63L3.79 2.70L5.29 4.20L5.37 4.27C5.56 4.42 5.80 4.50 6.04 4.49C6.29 4.47 6.52 4.37 6.70 4.20C6.87 4.02 6.97 3.79 6.99 3.54C7.00 3.30 6.92 3.06 6.77 2.86L6.70 2.79L5.20 1.29L5.13 1.22C4.93 1.06 4.69 .98 4.44 1.00C4.20 1.01 3.96 1.11 3.79 1.29ZM18.86 1.22L18.79 1.29L17.29 2.79L17.22 2.86C17.07 3.06 16.99 3.30 17.00 3.54C17.01 3.79 17.12 4.02 17.29 4.20C17.47 4.37 17.70 4.48 17.95 4.49C18.19 4.50 18.43 4.42 18.63 4.27L18.70 4.20L20.20 2.70L20.27 2.63C20.42 2.43 20.50 2.19 20.49 1.95C20.48 1.70 20.37 1.47 20.20 1.29C20.02 1.12 19.79 1.01 19.54 1.00C19.30 .99 19.06 1.07 18.86 1.22ZM19.20 6.01L19 6H5L4.79 6.01C4.30 6.06 3.84 6.29 3.51 6.65C3.18 7.02 2.99 7.50 3 8V16L3.01 16.20C3.05 16.66 3.26 17.08 3.58 17.41C3.91 17.73 4.33 17.94 4.79 17.99L5 18H19L19.20 17.98C19.66 17.94 20.08 17.73 20.41 17.41C20.73 17.08 20.94 16.66 20.99 16.20L21 16V8C20.99 7.50 20.81 7.02 20.48 6.66C20.15 6.29 19.69 6.06 19.20 6.01ZM5 16V8H19V16H5ZM17.29 19.79C17.11 19.96 17.01 20.20 17.00 20.44C16.98 20.69 17.06 20.93 17.22 21.13L17.29 21.20L18.79 22.70L18.86 22.77C19.06 22.92 19.30 23.00 19.54 22.99C19.79 22.98 20.02 22.87 20.20 22.70C20.37 22.52 20.48 22.29 20.49 22.04C20.50 21.80 20.42 21.56 20.27 21.36L20.20 21.29L18.70 19.79L18.63 19.72C18.43 19.56 18.19 19.48 17.94 19.50C17.70 19.51 17.46 19.61 17.29 19.79ZM5.37 19.72L5.29 19.79L3.79 21.29L3.72 21.36C3.57 21.56 3.49 21.80 3.50 22.04C3.51 22.29 3.62 22.52 3.79 22.70C3.97 22.87 4.20 22.98 4.45 22.99C4.69 23.00 4.93 22.92 5.13 22.77L5.20 22.70L6.70 21.20L6.77 21.13C6.92 20.93 7.00 20.69 6.99 20.45C6.97 20.20 6.87 19.97 6.70 19.79C6.52 19.62 6.29 19.52 6.04 19.50C5.80 19.49 5.56 19.57 5.37 19.72ZM12 19.5C11.73 19.5 11.48 19.60 11.29 19.79C11.10 19.98 11 20.23 11 20.5V22.5C11 22.76 11.10 23.01 11.29 23.20C11.48 23.39 11.73 23.5 12 23.5C12.26 23.5 12.51 23.39 12.70 23.20C12.89 23.01 13 22.76 13 22.5V20.5C13 20.23 12.89 19.98 12.70 19.79C12.51 19.60 12.26 19.5 12 19.5Z",
fill:"white"}}]}:{J:"svg",W:{height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{d:"M21 7v10H3V7h18m1-1H2v12h20V6zM11.5 2v3h1V2h-1zm1 17h-1v3h1v-3zM3.79 3 6 5.21l.71-.71L4.5 2.29 3.79 3zm2.92 16.5L6 18.79 3.79 21l.71.71 2.21-2.21zM19.5 2.29 17.29 4.5l.71.71L20.21 3l-.71-.71zm0 19.42.71-.71L18 18.79l-.71.71 2.21 2.21z",fill:"white"}}]};this.setIcon(Z);this.subscribe("select",this.Y,this);this.listen(Mu,this.L);g.u(this,this.D)}aq(Z){Z?this.U||(this.on.OH(this),this.U=!0):this.U&&(this.on.Bq(this),
this.U=!1);this.U&&this.V($$b())}L(){g.Wp(this.element,"ytp-menuitem-highlight-transition-enabled")}Y(Z){var k=$$b();Z!==k&&(k=g.QC(),rO(190,Z),rO(192,!0),k.save(),g.A7(this.S,"cinematicSettingsToggleChange",Z))}YW(){this.U&&this.on.Bq(this);super.YW()}};var uvU=class extends dY{constructor(Z){super(Z);this.V=!1;Z.addEventListener("settingsMenuInitialized",()=>{QxU(this)});
Z.addEventListener("highlightSettingsMenu",k=>{QxU(this);var N=this.menuItem;k==="menu_item_cinematic_lighting"&&(g.jX(N.element,"ytp-menuitem-highlighted"),g.jX(N.element,"ytp-menuitem-highlight-transition-enabled"),N.D.start())});
I(Z,"updateCinematicSettings",k=>{this.updateCinematicSettings(k)})}updateCinematicSettings(Z){this.V=Z;
this.menuItem?.aq(Z);this.api.publish("onCinematicSettingsVisibilityChange",Z)}};var liy=class extends dY{constructor(Z){super(Z);this.events=new g.tt(Z);g.u(this,this.events);this.events.K(Z,"applicationvideodatachange",(k,N)=>{N=N.clipConfig;k==="dataloaded"&&N&&N.startTimeMs!=null&&N.endTimeMs!=null&&this.api.setLoopRange({startTimeMs:Math.floor(Number(N.startTimeMs)),endTimeMs:Math.floor(Number(N.endTimeMs)),postId:N.postId,type:"clips"})})}};var fif=class extends dY{constructor(Z){super(Z);this.events=new g.tt(Z);g.u(this,this.events);I(Z,"setCreatorEndscreenVisibility",this.setCreatorEndscreenVisibility.bind(this));I(Z,"setCreatorEndscreenHideButton",this.V.bind(this));this.B("web_fix_annotations")&&this.events.K(Z,"annotationvisibility",k=>{this.setCreatorEndscreenVisibility(!k);this.hideButton&&g.jA(this.hideButton,k)})}setCreatorEndscreenVisibility(Z){Mg(this.api.GZ())?.In(Z)}V(Z){this.hideButton=Z;
Z=k=>{k==="creatorendscreen"&&(k=Mg(this.api.GZ()))&&k.vk(this.hideButton)};
this.events.K(this.api,"modulecreated",Z);Z("creatorendscreen")}};var BxN=class extends dY{constructor(Z){super(Z);this.events=new g.tt(Z);g.u(this,this.events);this.events.K(Z,"videodatachange",()=>{var k=this.api.getRootNode(),N=this.api.X();g.jX(k,"ytp-delhi-modern");N.B("delhi_modern_web_player_icons")&&g.jX(k,"ytp-delhi-modern-icons");N.B("delhi_modern_web_player_horizontal_volume_controls")&&g.jX(k,"ytp-delhi-horizontal-volume-controls");N.B("delhi_modern_web_player_compact_controls")&&g.jX(k,"ytp-delhi-modern-compact-controls");N.B("delhi_modern_web_player_big_mode_consistent_pill_height")&&
g.jX(k,"ytp-big-mode-consistent-pill-height");switch(Zf(N.experiments,"delhi_modern_web_player_blending_mode")){case "luminosity":g.jX(k,"ytp-delhi-modern-with-luminosity");break;case "difference":g.jX(k,"ytp-delhi-modern-with-difference");break;case "exclusion":g.jX(k,"ytp-delhi-modern-with-exclusion")}k=this.api.isHdr()||this.api.B("delhi_modern_web_player_disable_frosted_glass");N=g.Q5(this.api.X().experiments,"web_player_frosted_glass_blur_radius_float",16);k=k?"none":`blur(${N}px)`;this.api.getRootNode().style.setProperty("--yt-frosted-glass-backdrop-filter-override",
k);q0f(this)});
this.events.K(Z,"resize",()=>{q0f(this)})}};var Dky=class extends XO{constructor(Z,k,N,a,T){const K=Z.B("html5_enable_new_audio_settings_menu");super("Stable Volume",K?H$0.kI:g.HH.kI);this.S=Z;this.L=k;this.D=N;this.hasDrcAudioTrack=a;this.getDrcState=T;this.Y=this.enableNewAudioSettingsMenu=this.U=!1;g.jX(this.element,"ytp-drc-menu-item");this.on=(this.enableNewAudioSettingsMenu=K)?Z.Z1().R7:Z.Z1();Z.B("html5_enable_voice_boost")?(this.Y=!0,this.K(Z,"onFilterAudioFeatures",this.bb)):Z.addEventListener("videodatachange",this.bb.bind(this));
Z.B("mta_drc_mutual_exclusion_removal")&&this.K(Z,"onPlaybackAudioChange",this.bb);Z.createClientVe(this.element,this,273317);this.listen("click",this.j);k=this.D()===1&&this.hasDrcAudioTrack();this.enableNewAudioSettingsMenu||(Z=Z.B("delhi_modern_web_player_icons")?{J:"svg",W:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{d:"M12 .99C5.92 .99 1 5.92 1 11.99C1 18.07 5.92 22.99 12 22.99C18.07 22.99 23 18.07 23 11.99C23 5.92 18.07 .99 12 .99ZM12 2.99C14.38 2.99 16.67 3.94 18.36 5.63C20.05 7.32 21 9.61 21 11.99C21 14.38 20.05 16.67 18.36 18.36C16.67 20.05 14.38 20.99 12 20.99C9.61 20.99 7.32 20.05 5.63 18.36C3.94 16.67 3 14.38 3 11.99C3 9.61 3.94 7.32 5.63 5.63C7.32 3.94 9.61 2.99 12 2.99ZM14 6.00C13.73 6.00 13.48 6.10 13.29 6.29C13.10 6.48 13 6.73 13 7.00V17.00C13 17.26 13.10 17.52 13.29 17.70C13.48 17.89 13.73 18.00 14 18.00C14.26 18.00 14.51 17.89 14.70 17.70C14.89 17.52 15 17.26 15 17.00V7.00C15 6.73 14.89 6.48 14.70 6.29C14.51 6.10 14.26 6.00 14 6.00ZM10 8.00C9.73 8.00 9.48 8.10 9.29 8.29C9.10 8.48 9 8.73 9 9.00V15.00C9 15.26 9.10 15.52 9.29 15.70C9.48 15.89 9.73 16.00 10 16.00C10.26 16.00 10.51 15.89 10.70 15.70C10.89 15.52 11 15.26 11 15.00V9.00C11 8.73 10.89 8.48 10.70 8.29C10.51 8.10 10.26 8.00 10 8.00ZM18 9.00C17.73 9.00 17.48 9.10 17.29 9.29C17.10 9.48 17 9.73 17 10.00V14.00C17 14.26 17.10 14.52 17.29 14.70C17.48 14.89 17.73 15.00 18 15.00C18.26 15.00 18.51 14.89 18.70 14.70C18.89 14.52 19 14.26 19 14.00V10.00C19 9.73 18.89 9.48 18.70 9.29C18.51 9.10 18.26 9.00 18 9.00ZM6 10.00C5.73 10.00 5.48 10.10 5.29 10.29C5.10 10.48 5 10.73 5 11.00V13.00C5 13.26 5.10 13.52 5.29 13.70C5.48 13.89 5.73 14.00 6 14.00C6.26 14.00 6.51 13.89 6.70 13.70C6.89 13.52 7 13.26 7 13.00V11.00C7 10.73 6.89 10.48 6.70 10.29C6.51 10.10 6.26 10.00 6 10.00Z",
fill:"white"}}]}:{J:"svg",W:{height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{d:"M7 13H5v-2h2v2zm3-4H8v6h2V9zm3-3h-2v12h2V6zm3 2h-2v8h2V8zm3 2h-2v4h2v-4zm-7-7c-4.96 0-9 4.04-9 9s4.04 9 9 9 9-4.04 9-9-4.04-9-9-9m0-1c5.52 0 10 4.48 10 10s-4.48 10-10 10S2 17.52 2 12 6.48 2 12 2z",fill:"white"}}]},this.setIcon(Z));this.subscribe("select",this.G,this);this.enableNewAudioSettingsMenu||this.Y?this.bb():(this.setEnabled(this.hasDrcAudioTrack()),this.V(k),this.on.OH(this))}G(Z){this.L(Z?1:0)}bb(){if(this.enableNewAudioSettingsMenu||
this.Y){var Z=this.S.getPresentingPlayerType();Z===2||Z===3?this.U&&(this.U=!1,this.on.Bq(this)):(Z=this.getDrcState(),Z!==1?(Z===0?(this.V(this.D()===1),this.setEnabled(!0)):(this.V(!1),this.setEnabled(!1)),this.U||(this.on.OH(this),this.U=!0)):this.U&&(this.on.Bq(this),this.U=!1))}else{Z=this.hasDrcAudioTrack();const k=this.D()===1&&Z;this.V(k);this.setEnabled(Z)}}YW(){this.on.Bq(this);super.YW()}j(){this.S.logClick(this.element)}};var O$R=class extends dY{constructor(Z){super(Z);this.events=new g.tt(Z);g.u(this,this.events);Z.B("html5_show_drc_toggle")&&Z.addEventListener("settingsMenuInitialized",()=>{this.menuItem||(this.menuItem=new Dky(this.api,this.setDrcUserPreference.bind(this),this.getDrcUserPreference.bind(this),this.U.bind(this),this.getDrcState.bind(this)),g.u(this,this.menuItem))});
I(this.api,"setDrcUserPreference",k=>{this.setDrcUserPreference(k)});
I(this.api,"getDrcUserPreference",()=>this.getDrcUserPreference());
I(this.api,"hasDrcAudioTrack",()=>this.U());
I(this.api,"getDrcState",()=>this.getDrcState());
this.V=g.kh("yt-player-drc-pref")??1;this.updateEnvironmentData()}getDrcUserPreference(){return this.V}setDrcUserPreference(Z){this.api.U6("drc_set",{pref:Z});g.Z_("yt-player-drc-pref",Z,31536E3);Z!==this.V&&(this.V=Z,this.updateEnvironmentData(),this.U()&&this.api.r8(),this.api.V_())}updateEnvironmentData(){this.api.X().hI=this.V===1}U(){const Z=this.api.getVideoData()?.D?.U;if(!Z)return!1;if(this.api.getAvailableAudioTracks().length>1&&this.api.B("mta_drc_mutual_exclusion_removal")){const k=this.api.TN()?.ZF?.id;
return Er(Z,N=>N.audio.V&&N.ZF?.id===k)}return Er(Z,k=>k.audio?.V===!0)}getDrcState(){return this.api.I5(3)}};var vWj=class extends dY{constructor(Z){super(Z);this.V={};this.events=new g.tt(Z);g.u(this,this.events);this.events.K(Z,"videodatachange",()=>{this.onVideoDataChange()});
this.events.K(Z,g.te("embargo"),k=>{this.api.A$(!0);var N=this.V[k.id]??[];for(const a of N)this.api.hideControls(),this.api.N4("auth",2,"This video isn't available in your current playback area",Td({embargoed:1,id:k.id,idx:k.U,start:k.start})),(N=a.embargo?.onTrigger)&&g.A7(this.api,"innertubeCommand",N)})}onVideoDataChange(){const Z=this.api.getVideoData();
this.api.jl("embargo",1);const k=Z?.zC.get("PLAYER_CUE_RANGE_SET_IDENTIFIER_EMBARGO");k?.length?rkf(this,k.filter(N=>N.onEnter?.some(this.U))):Z?.cueRanges&&rkf(this,Z.cueRanges.filter(N=>N.onEnter?.some(this.U)))}U(Z){return Z.embargo!==void 0}YW(){super.YW();
this.V={}}};var i$G=class extends dY{constructor(Z){super(Z);this.V=[];this.events=new g.tt(Z);g.u(this,this.events);I(Z,"addEmbedsConversionTrackingParams",k=>{this.addEmbedsConversionTrackingParams(k)});
this.events.K(Z,"veClickLogged",k=>{this.api.hasVe(k)&&(k=k.visualElement.getAsJspb(),k=g.ZZ(k,2),this.V.push(k))})}addEmbedsConversionTrackingParams(Z){var k=this.api.X();
const N=k.widgetReferrer,a=k.LC,T=this.V;let K="";const y=k.getWebPlayerContextConfig();y&&(K=y.embedsIframeOriginParam||"");N.length>0&&(Z.embeds_widget_referrer=N);a.length>0&&(Z.embeds_referring_euri=a);k.Y&&K.length>0&&(Z.embeds_referring_origin=K);y&&y.embedsFeature&&(Z.feature=y.embedsFeature);T.length>0&&(k.B("embeds_web_enable_lite_experiment_control_arm_logging")?T.unshift(28572):g.xq(g.dr(k))&&T.unshift(159628),k=T.join(","),k=g.ce()?k:g.BF(k,4),Z.source_ve_path=k);this.V.length=0}};var gWi=class extends dY{constructor(Z){super(Z);I(Z,"isEmbedsShortsMode",()=>Z.isEmbedsShortsMode());
I(Z,"getReelItemWatchResponse",()=>Z.getVideoData({playerType:1})?.getReelItemWatchResponse()??null)}};var wOy=class extends dY{constructor(Z){super(Z);this.events=new g.tt(Z);g.u(this,this.events);this.events.K(Z,"initialvideodatacreated",k=>{MB(Rh(),16623);this.V=g.C9();var N=Z.X().mq&&!k.bq;Tn(k)&&N?(MB(Rh(),27240,void 0,{implicitGestureType:"INTERACTION_LOGGING_GESTURE_TYPE_AUTOMATED"}),k.getWatchNextResponse()&&(N=k.getWatchNextResponse()?.trackingParams)&&Ed(N),k.getPlayerResponse()&&(k=k.getPlayerResponse()?.trackingParams)&&Ed(k)):(MB(Rh(),32594,void 0,{implicitGestureType:"INTERACTION_LOGGING_GESTURE_TYPE_AUTOMATED"}),
k.getEmbeddedPlayerResponse()&&(k=k.getEmbeddedPlayerResponse()?.trackingParams)&&Ed(k))});
this.events.K(Z,"loadvideo",()=>{MB(Rh(),27240,void 0,{implicitGestureType:"INTERACTION_LOGGING_GESTURE_TYPE_AUTOMATED",parentCsn:this.V})});
this.events.K(Z,"cuevideo",k=>{k===1&&MB(Rh(),32594,void 0,{implicitGestureType:"INTERACTION_LOGGING_GESTURE_TYPE_AUTOMATED",parentCsn:this.V})});
this.events.K(Z,"largeplaybuttonclicked",k=>{MB(Rh(),27240,k.visualElement)});
this.events.K(Z,"playlistnextbuttonclicked",k=>{MB(Rh(),27240,k.visualElement)});
this.events.K(Z,"playlistprevbuttonclicked",k=>{MB(Rh(),27240,k.visualElement)});
this.events.K(Z,"playlistautonextvideo",()=>{MB(Rh(),27240,void 0,{implicitGestureType:"INTERACTION_LOGGING_GESTURE_TYPE_AUTOMATED"})})}};var CZ0=class extends g.jR{constructor(Z,k){super();this.V=null;this.D=k;k=[];for(let N=0;N<=100;N++)k.push(N/100);k={threshold:k,trackVisibility:!0,delay:1E3};(this.U=window.IntersectionObserver?new IntersectionObserver(N=>{N=N[N.length-1];let a=null;typeof N.isVisible==="undefined"?document.visibilityState==="visible"&&N.isIntersecting&&N.intersectionRatio>0?a=N.intersectionRatio:document.visibilityState==="hidden"?a=0:a=null:a=N.isVisible?N.intersectionRatio:0;a!=null&&(a=Math.max(a,0),a=Math.min(a,
1));this.V=a;typeof this.D==="function"&&this.D(this.V)},k):null)&&this.U.observe(Z)}YW(){super.YW();
this.V=null;this.U&&this.U.disconnect()}};var $kf=class extends dY{constructor(Z){super(Z);this.events=new g.tt(Z);g.u(this,this.events);this.events.K(Z,"applicationInitialized",()=>{mtf(this)})}};var xki=class extends dY{constructor(Z){super(Z);I(this.api,"dismissFeaturedProductOverlay",()=>{this.dismissFeaturedProductOverlay()})}dismissFeaturedProductOverlay(){this.api.publish("featuredproductdismissed")}};var G7N=class extends g.E{constructor(Z){super({J:"div",BD:["ytp-player-content","ytp-iv-player-content"],A:[{J:"div",Z:"ytp-free-preview-countdown-timer",A:[{J:"span",Da:"{{label}}"},{J:"span",Z:"ytp-free-preview-countdown-timer-separator",Da:"\u2022"},{J:"span",Da:"{{duration}}"}]}]});this.api=Z;this.V=null;this.D=this.U=0;this.K(this.api,"videodatachange",this.onVideoDataChange);this.api.createClientVe(this.element,this,191284)}show(){super.show();this.api.logVisibility(this.element,!0)}stopTimer(){this.V&&
(this.V.dispose(),this.V=null)}onVideoDataChange(Z){var k=this.api.getVideoData()?.getPlayerResponse()?.playabilityStatus;k&&(k=sxX(k),this.api.getPlayerStateObject().V(128)||Z==="dataloaderror"||!k?(this.U=0,this.stopTimer(),this.hide()):(Z=(k.remainingTimeSecs||0)*1E3,Z>0&&(this.show(),this.updateValue("label",Jo(k.label)),PZ0(this,Z))))}YW(){this.stopTimer();super.YW()}};var SAj=class extends dY{constructor(Z){super(Z);this.events=new g.tt(Z);g.u(this,this.events);this.events.K(Z,"basechromeinitialized",()=>{this.V=new G7N(Z);g.u(this,this.V);g.$n(Z,this.V.element,4);this.V.hide()})}};var e0y=class extends g.E{constructor(Z){super({J:"button",BD:["ytp-fullerscreen-edu-button","ytp-button"],A:[{J:"div",BD:["ytp-fullerscreen-edu-text"],Da:"Scroll for details"},{J:"div",BD:["ytp-fullerscreen-edu-chevron"],A:[DC0()]}],W:{"data-priority":"2"}});this.rA=Z;this.fade=new g.ML(this,250,void 0,100);this.U=this.V=!1;Z.createClientVe(this.element,this,61214);g.u(this,this.fade);this.K(Z,"fullscreentoggled",this.aq);this.K(Z,"presentingplayerstatechange",this.aq);this.listen("click",this.onClick);
this.aq()}Y(Z){g.D(this.element,"ytp-fullerscreen-edu-button-subtle",Z);Z&&!this.U&&(this.rA.B("player_tooltip_data_title_killswitch")?this.element.setAttribute("title","Scroll for details"):this.element.setAttribute("data-tooltip-title","Scroll for details"),la(this.rA,this.element,this),this.U=!0)}onClick(){this.rA.logClick(this.element);g.A7(this.rA,"onFullerscreenEduClicked")}D(Z){this.V=Z;this.aq()}aq(){this.rA.isFullscreen()?this.V?this.fade.hide():this.fade.show():this.hide();this.rA.logVisibility(this.element,
this.rA.isFullscreen()&&!this.V)}};var oWb=class extends dY{constructor(Z){super(Z);this.events=new g.tt(Z);g.u(this,this.events);I(this.api,"updateFullerscreenEduButtonSubtleModeState",N=>{this.updateFullerscreenEduButtonSubtleModeState(N)});
I(this.api,"updateFullerscreenEduButtonVisibility",N=>{this.updateFullerscreenEduButtonVisibility(N)});
const k=Z.X();Z.B("external_fullscreen_with_edu")&&k.externalFullscreen&&t4(k)&&k.controlsType==="1"&&this.events.K(Z,"standardControlsInitialized",()=>{this.V=new e0y(Z);g.u(this,this.V);Z.vT(this.V)})}updateFullerscreenEduButtonSubtleModeState(Z){this.V?.Y(Z)}updateFullerscreenEduButtonVisibility(Z){this.V?.D(Z)}};var JHX=class extends g.E{constructor(Z){super({J:"div",Z:"ytp-gated-actions-overlay",A:[{J:"div",Z:"ytp-gated-actions-overlay-background",A:[{J:"div",Z:"ytp-gated-actions-overlay-background-overlay"}]},{J:"button",BD:["ytp-gated-actions-overlay-miniplayer-close-button","ytp-button"],W:{"aria-label":"Close"},A:[g.Th()]},{J:"div",Z:"ytp-gated-actions-overlay-bar",A:[{J:"div",Z:"ytp-gated-actions-overlay-text-container",A:[{J:"div",Z:"ytp-gated-actions-overlay-title",Da:"{{title}}"},{J:"div",Z:"ytp-gated-actions-overlay-subtitle",
Da:"{{subtitle}}"}]},{J:"div",Z:"ytp-gated-actions-overlay-button-container"}]}]});this.api=Z;this.background=this.Lp("ytp-gated-actions-overlay-background");this.U=this.Lp("ytp-gated-actions-overlay-button-container");this.V=[];this.K(this.Lp("ytp-gated-actions-overlay-miniplayer-close-button"),"click",()=>{g.A7(this.api,"onCloseMiniplayer")});
this.hide()}};var z0R=class extends dY{constructor(Z){super(Z);this.events=new g.tt(Z);g.u(this,this.events);this.V=new JHX(this.api);g.u(this,this.V);this.events.K(Z,"videodatachange",()=>{const k=this.api.getVideoData()?.di;var N=this.V;if(k){N.update({title:k.title?.content||"",subtitle:k.subtitle?.content||""});var a=k.thumbnail;let T="none";if(a?.sources){let K=0;for(const y of a.sources)y.width&&y.url&&y.width>K&&(K=y.width,T=`url(${y.url})`)}N.background.style.backgroundImage=T;HNy(N,k.actionButtons||[]);
N.show()}else N.hide()});
g.$n(this.api,this.V.element,4)}};var UkX=class extends dY{constructor(Z){super(Z);c3(this.api,"getSphericalProperties",()=>this.getSphericalProperties());
c3(this.api,"setSphericalProperties",(...k)=>{this.setSphericalProperties(...k)});
P3(this.api,"getSphericalProperties",()=>this.api.getPresentingPlayerType()===2?{}:this.getSphericalProperties());
P3(this.api,"setSphericalProperties",(...k)=>{this.api.getPresentingPlayerType()!==2&&this.setSphericalProperties(...k)})}getSphericalProperties(){const Z=g.gv(this.api.GZ());
return Z?Z.getSphericalProperties():{}}setSphericalProperties(Z){if(Z){var k=g.gv(this.api.GZ());k&&k.setSphericalProperties(Z,!0)}}};var b$y=class extends dY{constructor(Z){super(Z);I(Z,"createClientVe",this.createClientVe.bind(this));I(Z,"createServerVe",this.createServerVe.bind(this));I(Z,"destroyVe",this.destroyVe.bind(this));I(Z,"hasVe",this.hasVe.bind(this));I(Z,"logClick",this.logClick.bind(this));I(Z,"logVisibility",this.logVisibility.bind(this));I(Z,"setTrackingParams",this.setTrackingParams.bind(this))}createClientVe(Z,k,N,a=!1){this.api.createClientVe(Z,k,N,a)}createServerVe(Z,k,N=!1){this.api.createServerVe(Z,k,N)}setTrackingParams(Z,
k){this.api.setTrackingParams(Z,k)}logClick(Z,k){this.api.logClick(Z,k)}logVisibility(Z,k,N){this.api.logVisibility(Z,k,N)}hasVe(Z){return this.api.hasVe(Z)}destroyVe(Z){this.api.destroyVe(Z)}};var pOR=class{constructor(Z,k){this.SY=Z;this.policy=k;this.playbackRate=1}setPlaybackRate(Z){this.playbackRate=Math.max(1,Z)}getPlaybackRate(){return this.playbackRate}};var R0R=class{constructor(Z,k,N,a){this.FS=Z;this.cD=k;this.policy=N;this.logger=a;this.GX=[];this.jI=[];this.U=-1;this.w5=null;this.C=this.timestampOffset=0;this.V=10;this.L=new Set;this.nF={pY:T=>this.pY(T)};
this.Y=k.Rn?0:1;N.DC>0&&(this.V=N.DC)}xW(Z){this.L.add(Z.info.Cp);this.U=tyb(this,this.jI,this.GX,Z,this.U);this.D=Z;this.C=(0,g.z)()}N(Z){h_f(this,this.jI,"og");uPX(this,Z);h_f(this,this.jI,"trim");const {jI:k,GX:N}=lGr(this);Z=[];for(let a=0;a<N.length;a++){const T=N[a],K=this.policy.Kp&&T.D!==-1?T.D:T.info.startTime,y={startTicks:(K+this.timestampOffset)*1E3,Sf:(this.policy.Kp&&T.Y!==-1?T.Y:T.info.duration)*1E3,timescale:1E3},Q=this.w5?.Us();let q;if(this.policy.ag&&Q&&Q.length>0){const r=U9(Q,
K);r>=0&&(q=(Q.end(r)-K+.1)*1E3)}Z.push({formatId:g.ot(T.info.l3.info,this.cD.Rn),Tk:T.info.Tk,sequenceNumber:T.info.Cp+this.Y,Rw:y,gx:T.info.U,dP:q})}return{jI:k,Md:Z}}O(Z,k){k?.P8||(this.GX=[]);this.policy.Hy?(Z=g.F_(this.jI,{startTimeMs:Z*1E3},(N,a)=>N.startTimeMs-a.startTimeMs),this.U!==Z&&(this.U=-1,this.D=void 0)):(uPX(this,!0),this.U=VyN(this.jI,Z*1E3))}zt(Z){this.w5=Z}dA(){return this.D?.info}pY(Z){const k=g.ot(Z.info.l3.info,this.cD.Rn),N=Z.info.Cp+this.Y;
var a=Z.info.startTime*1E3;if(this.policy.Kp)try{a=this.policy.Kp?g.Ic(Z)*1E3:Z.info.startTime*1E3}catch(y){Math.random()>.99&&this.logger&&(a=PY(Z.U).slice(0,1E3),this.logger&&this.logger({parserErrorSliceInfo:Z.info.E3(),encodedDataView:g.fl(a,4)})),a=Z.info.startTime*1E3}const T=Z.info.clipId;let K=this.policy.Kp?g.Sw0(Z)*1E3:Z.info.duration*1E3;this.policy.Kp&&(a<0||K<0)&&(this.logger&&(this.logger({missingSegInfo:Z.info.E3(),startTimeMs:a,durationMs:K}),this.policy.LA||(a<0&&(a=Z.info.startTime*
1E3),K<0&&(K=Z.info.duration*1E3))),this.policy.LA&&(a<0&&(a=Z.info.startTime*1E3),K<0&&(K=Z.info.duration*1E3)));return{formatId:k,Cp:N,startTimeMs:a,clipId:T,fq:K}}G(){this.jI=[];this.GX=[];this.L.clear();this.U=-1;this.D=void 0}j(){this.D=void 0}PF(Z){this.timestampOffset=Z}Vz(Z){return this.L.has(Z)}};var MFf=class{constructor(Z,k,N,a,T){this.loader=Z;this.cD=k;this.videoTrack=N;this.audioTrack=a;this.policy=T;this.seekCount=this.targetTime=0;this.Y=!1;this.D=null;this.U=0;this.V=this.cD.isManifestless&&!this.cD.M4}seek(Z,k){Z!==this.targetTime&&(this.seekCount=0);this.targetTime=Z;const N=this.videoTrack.V,a=this.audioTrack.V,T=this.audioTrack.w5,K=Dty(this,this.videoTrack,Z,this.videoTrack.w5,k);k=Dty(this,this.audioTrack,this.policy.O6?Z:K,T,k);Z=Math.max(Z,K,k);this.Y=!0;this.cD.isManifestless&&
(ONN(this,this.videoTrack,N),ONN(this,this.audioTrack,a));return Z}isSeeking(){return this.Y}Lo(Z){this.U=Z}},B7f=2/24;var nWb=0;var FO,Lx=class{constructor(){this.data=new Uint8Array(2048);this.pos=0;FO||(FO=t8("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_."))}add(Z){if(this.pos+20>this.data.length){const k=new Uint8Array(this.data.length*2);k.set(this.data);this.data=k}for(;Z>31;)this.data[this.pos++]=FO[(Z&31)+32],Z>>=5;this.data[this.pos++]=FO[Z|0]}W9(){return g.Lv(this.data.subarray(0,this.pos))}V(){return this.pos>0}reset(){this.pos=0}};var Iif=class{constructor(Z,k){this.u3=Z;this.requestNumber=++nWb;this.V=this.now();this.O=this.zt=NaN;this.j=this.V;this.D=this.rD=this.Y=0;this.C=this.V;this.pF=this.vD=this.MX=this.gD=this.gQ=this.Rq=this.U=this.L=0;this.xW=this.isActive=!1;this.Ap=this.HA=0;this.nF={SPR:()=>this.rR};
this.SY=k.SY;this.snapshot=cS(this.SY);this.policy=this.SY.U;this.fZ=!!k.fZ;this.QQ=k.QQ;this.Zo=k.Zo||0;this.L3=k.L3||0;k.zJ&&(this.tq=new Lx);this.rR=k.rR??!1;this.fZ||TNy(this.SY);this.Bv=k.Bv??!1}Bl(){this.zt=this.now();$tU(this.SY,this.zt);this.u3.Bl()}D2(Z,k){const N=this.policy.U?(0,g.z)():0;tA(this,Z,k);Z-this.C<10&&this.U>0||this.FS(Z,k);this.u3.D2(Z,k);this.policy.U&&(Z=(0,g.z)()-N,this.Ap+=Z,this.HA=Math.max(Z,this.HA))}FS(Z,k){const N=(Z-this.C)/1E3,a=k-this.D;this.fZ||(HS(this.SY,N,a),
this.QQ(N,a));this.C=Z;this.D=k}S$(){this.Rq&&xtU(this);this.u3.S$()}Ul(Z){this.Rq||(this.Rq=this.Y-this.rD+Z,this.gQ=this.Y,this.gD=this.j)}dA(Z=this.j,k=this.Y){this.U>0||(this.O=Z,this.U=k,this.xW=this.isActive=!0)}Tt(){return this.L3||2}Ke(){}Yj(){}xj(){}N(){const Z={rn:this.requestNumber,rt:(this.j-this.V).toFixed(),lb:this.Y,stall:(1E3*this.L).toFixed(),ht:(this.zt-this.V).toFixed(),elt:(this.O-this.V).toFixed(),elb:this.U,d:this.tq?.W9()};this.url&&dtj(Z,this.url);this.policy.U&&(Z.mph=this.HA.toFixed(),
Z.tph=this.Ap.toFixed());Z.ulb=this.MX;Z.ult=this.vD;return Z}now(){return(0,g.z)()}deactivate(){this.isActive&&(this.isActive=!1)}};var tK=class extends Iif{constructor(Z,k){super(Z,k);this.iq=this.ov=!1;this.Vz=this.G=Infinity;this.Sm=NaN;this.bq=!1;this.qX=NaN;this.NW=this.Kp=this.Qz=0;this.AT=k.AT||1;this.DA=k.DA||this.AT;this.PZ=k.PZ;this.Cp=k.Cp;this.oJ=k.oJ;S0r(this);this.hp(this.V);this.e8=(this.qX-this.V)/1E3}N(){const Z=super.N();Z.pb=this.AT;Z.pt=(1E3*this.e8).toFixed();Z.se=this.NW;return Z}xi(){const Z=this.u3;this.s6||(this.s6=Z.xi?Z.xi():1);return this.s6}W7(){return this.PZ?this.xi()!==1:!1}jY(Z,k,N){if(!this.ov){this.ov=
!0;if(!this.fZ){tA(this,Z,k);this.FS(Z,k);var a=this.xi();this.NW=N;if(!this.fZ)if(a===2){a=Z-this.O<this.Tt()*1E3+50;N=this.vD?this.MX/(this.vD/1E3):N||this.pF;const T=this.Zo*1.3;a&&N<T||(this.vD?hA(this.SY,this.vD/1E3,this.MX,this.Kp||this.policy.Vz):hA(this.SY,k/N,k,.01));dW(this.SY,k,a?0:this.L)}else a===1&&(a=(Z-this.V)/1E3,!(a<=this.policy.Y)&&this.policy.Y||this.iq||this.policy.N||!(this.U>0)||u9(this,a,k),this.U>0&&dW(this.SY,k,this.L));Z=(Z-this.V)/1E3||.01;this.policy.C&&!(this.U>0)||Xs(this.SY,
Z,this.D,e_r(this),this.rR)}this.deactivate()}}iA(Z,k,N){N&&(this.s6=2);Z<0&&this.L3&&(Z=this.L3);k?this.Qz+=Z:this.Kp+=Z}Tt(){return this.Kp||this.Qz||super.Tt()}FS(Z,k){const N=(Z-this.C)/1E3,a=k-this.D,T=this.xi();this.isActive?T===1&&((a>0||this.policy.L)&&(N>.2||a<1024)?(this.L+=N,a>0&&N>.2&&u9(this,this.Zo?N:.05,a),this.iq=!0):a>0&&(u9(this,N,a),this.iq=!0)):k&&k>=this.policy.V&&this.dA(Z,k);super.FS(Z,k)}O6(Z){if(!this.fZ){tA(this,Z,this.Y);var k=(Z-this.V)/1E3;this.xi()!==2&&this.U>0&&(this.L+=
(Z-this.C)/1E3,dW(this.SY,this.D,this.L));Xs(this.SY,k,this.D,e_r(this),this.rR,!0);Z=(Z-this.C)/1E3;HS(this.SY,Z,0);this.QQ(Z,0)}}dA(Z=this.j,k=this.Y){if(!(this.U>0)&&(super.dA(Z,k),this.xi()===1)){k=(this.zt-this.V)/1E3;var N=(Z-this.zt)/1E3;this.PZ&&l9(this,this.now());this.bq||this.fZ||(this.L3&&(N=Math.max(0,N-this.L3)),Z=this.SY,Z.C.wr(1,k),Z.dA.wr(1,N))}}FN(){this.PZ&&l9(this,this.now());return this.Sm}EL(){var Z;if(Z=this.D>this.DA)Z=(Z=this.D)?Z>=this.policy.V:!1;return Z}xl(){return this.qX}hp(Z=
this.now()){let k;if(this.PZ){l9(this,Z);if(this.s6?this.W7():this.G!==this.Vz){if(k=this.Vz,Z<k){this.qX=this.Vz;return}}else k=this.G;k=Math.max(k,this.Sm)}else k=this.Sm;var N=this.AT-this.D;N<0&&(N=0);N=(N*this.snapshot.stall+N/this.snapshot.byterate)*1E3;this.qX=N=this.U>0?N+Z:N+Math.max(Z,k)}hq(){return this.now()-this.O}r5(){return(this.D-this.U)*1E3/this.hq()||0}tW(){return this.O}};var hK=class{constructor(Z){this.u3=Z;this.V=new h8}feed(Z){Cv(this.V,Z);this.Qm()}Qm(){if(this.Y){if(!this.V.totalLength)return;const {Rg:k,ma:N}=this.V.split(this.D-this.U);if(!this.u3.Ul(this.Y,k,this.U,this.D))return;this.U+=k.totalLength;this.V=N;this.U===this.D&&(this.Y=this.D=this.U=void 0)}for(;;){var Z=0;let k,N;[k,Z]=UtU(this.V,Z);[N,Z]=UtU(this.V,Z);if(k<0||N<0)break;if(!(Z+N<=this.V.totalLength)){if(!(this.u3.Ul&&Z+1<=this.V.totalLength))break;({ma:Z}=this.V.split(Z));this.u3.Ul(k,Z,0,
N)&&(this.Y=k,this.U=Z.totalLength,this.D=N,this.V=new h8([]));break}const {Rg:a,ma:T}=this.V.split(Z).ma.split(N);this.u3.d3(k,a);this.V=T}}dispose(){this.V=new h8}};var j5R=class{constructor(Z,k){this.info=Z;this.callback=k;this.state=1;this.JS=this.l1=!1;this.zF=null}jt(){return 0}qQ(){return null}cK(){return null}nI(){return this.state>=1}isComplete(){return this.state>=3}vZ(){return this.state===5}onStateChange(){}Qn(Z){const k=this.state;this.state=Z;this.onStateChange(k);this.callback&&this.callback(this,k)}fl(Z){Z&&this.state<Z?this.Qn(Z):this.callback&&this.callback(this,this.state)}jm(){return this.state===-1}E3(){let Z="";this.info.Vi.forEach(k=>{Z+=
`${k.E3()}.`});
return Z.slice(0,-1)}dispose(){this.jm()||(this.info.Vi[0].l3.Vz=!1,this.Qn(-1))}N6(){return 0}};var Myf=class{constructor(Z,k,N,a={}){this.policy=k;this.u3=N;this.status=0;this.V=new h8;this.U=0;this.jm=this.Y=this.D=!1;this.xhr=new XMLHttpRequest;this.xhr.open(a.method||"GET",Z);if(a.headers){Z=a.headers;for(const T of Object.keys(Z))this.xhr.setRequestHeader(T,Z[T])}this.xhr.withCredentials=!0;this.xhr.onreadystatechange=()=>this.DJ();
this.xhr.onload=()=>this.onDone();
this.xhr.onerror=()=>this.onError();
this.xhr.fetch(T=>{this.V.append(T);this.U+=T.length;T=(0,g.z)();this.u3.D2(T,this.U)},()=>{},a.body||null)}DJ(){this.xhr.status&&(this.status=this.xhr.status);
this.xhr.readyState===this.xhr.HEADERS_RECEIVED&&this.u3.Bl()}onError(){this.D=!0;this.onDone()}onDone(){this.jm||(this.Y=!0,this.u3.S$())}XJ(){return this.xhr.readyState>=this.xhr.HEADERS_RECEIVED}getResponseHeader(Z){try{return this.xhr.getResponseHeader(Z)}catch{return""}}Tl(){return+this.getResponseHeader("content-length")}Uf(){return this.U}DZ(){return this.status>=200&&this.status<300&&!!this.U}sj(){return this.V.totalLength>0}PN(){const Z=this.V;this.V=new h8;return Z}Kz(){return this.V}abort(){this.jm=
!0;this.xhr.abort()}N8(){return!0}UF(){return this.D}qR(){return""}};var EWy=class{constructor(Z,k){this.U=(new TextEncoder).encode(Z);this.V=(new TextEncoder).encode(k)}};var R_U=class{constructor(Z,k){this.V=Z;this.u3=k;this.loaded=this.status=0;this.error="";Z=uI(this.V.get("range")||"");if(!Z)throw Error("bad range");this.range=Z;this.U=new h8;this.run().then(()=>{this.u3.S$()},N=>{this.error=`${N}`||"unknown_err";
this.u3.S$()})}async run(){this.status=200;
const Z=this.V.get("docid"),k=y2(this.V.get("fmtid")||""),N=this.V.get("lmt")||"0",a=+(this.V.get("csz")||0);if(!Z||!k||!a)throw Error("Invalid local URL");let T;this.V.get("ck")&&this.V.get("civ")&&(T=new EWy(this.V.get("ck"),this.V.get("civ")));const K=this.range;var y=Math.floor(K.start/a);const Q=Math.floor(K.end/a);for(;y<=Q;y++){var q=await p0f(Z,k,N,y,T);if(q===void 0)throw Error("invariant: data is undefined");var r=y*a;const C=Math.max(0,K.start-r);r=Math.min(K.end+1,(y+1)*a)-(C+r);q=new Uint8Array(q.buffer,
C,r);this.U.append(q);this.loaded+=r;this.loaded<K.length&&this.u3.D2((0,g.z)(),this.loaded)}}getResponseHeader(Z){return Z==="content-type"?this.V.get("type"):""}abort(){}XJ(){return!0}Tl(){return this.range.length}Uf(){return this.loaded}DZ(){return!!this.loaded}sj(){return!!this.U.totalLength}PN(){const Z=this.U;this.U=new h8;return Z}Kz(){return this.U}N8(){return!0}UF(){return!!this.error}qR(){return this.error}};var n7G=class{constructor(Z,k,N,a={}){this.policy=k;this.u3=N;this.G=a;this.status=0;this.response=void 0;this.U=0;this.aborted=this.L=!1;this.errorMessage="";this.C=T=>{if(T)if(this.status=T.status,T.ok&&T.body&&this.status!==204)this.status=this.status||242,this.D=T.body.getReader(),this.jm()?this.D.cancel().catch(()=>{}):(this.responseHeaders=T.headers,this.u3.Bl(),ptb(this));
else this.onDone();else this.onError(Error("null_response"))};
this.j=T=>{const K=(0,g.z)();this.jm()||(T.done?(this.D=void 0,this.onDone()):(T=T.value,this.U+=T.length,this.V.append(T),ptb(this),this.u3.D2(K,this.U)))};
this.onError=T=>{this.errorMessage=String(T);this.L=!0;this.onDone()};
this.V=new h8;this.Y=window.AbortController?new AbortController:void 0;this.start(Z)}start(Z){const k={credentials:"include",cache:"no-store"};Object.assign(k,this.G);this.Y&&(k.signal=this.Y.signal);Z=new Request(Z,k);fetch(Z).then(this.C,this.onError).then(void 0,Xf)}onDone(){this.jm()||this.u3.S$()}getResponseHeader(Z){return this.responseHeaders?this.responseHeaders.get(Z):null}XJ(){return!!this.responseHeaders}Uf(){return this.U}Tl(){return+this.getResponseHeader("content-length")}DZ(){return this.status>=
200&&this.status<300&&!!this.U}sj(){return!!this.V.totalLength}PN(){const Z=this.V;this.V=new h8;return Z}Kz(){return this.V}jm(){return this.aborted}abort(){this.D&&this.D.cancel().catch(()=>{});
this.Y&&this.Y.abort();this.aborted=!0}N8(){return!0}UF(){return this.L}qR(){return this.errorMessage}};var IGr=class{constructor(Z,k,N={}){this.u3=k;this.U=this.status=0;this.jm=this.V=!1;this.xhr=new XMLHttpRequest;this.xhr.open(N.method||"GET",Z);if(N.headers){Z=N.headers;for(var a of Object.keys(Z))this.xhr.setRequestHeader(a,Z[a])}this.xhr.responseType="arraybuffer";this.xhr.withCredentials=!0;this.xhr.onreadystatechange=T=>{this.DJ(T)};
a=zK(T=>{this.onDone(T)});
this.xhr.addEventListener("load",a,!1);this.xhr.addEventListener("error",a,!1);N.body?this.xhr.send(N.body):this.xhr.send();this.xhr.addEventListener("progress",zK(T=>{this.onProgress(T)}),!1)}onDone(){if(!this.jm){this.status=this.xhr.status;
try{this.response=this.xhr.response,this.U=this.response.byteLength}catch{}this.V=!0;this.u3.S$()}}DJ(){this.xhr.readyState===2&&this.u3.Bl()}onProgress(Z){this.jm||(this.status=this.xhr.status,this.V||(this.U=Z.loaded),this.u3.D2((0,g.z)(),Z.loaded))}XJ(){return this.xhr.readyState>=2}getResponseHeader(Z){try{return this.xhr.getResponseHeader(Z)}catch{return g.L9(Error(`Could not read XHR header ${Z}`)),""}}Tl(){return+this.getResponseHeader("content-length")}Uf(){return this.U}DZ(){return this.status>=
200&&this.status<300&&this.V&&!!this.U}sj(){return this.V&&!!this.response&&!!this.response.byteLength}PN(){const Z=this.response;this.response=void 0;return new h8([new Uint8Array(Z)])}Kz(){return new h8([new Uint8Array(this.response)])}abort(){this.jm=!0;this.xhr.abort()}N8(){return!1}UF(){return!1}qR(){return""}};var x8f=class extends g.jR{constructor(Z,k){super();this.policy=Z;this.Vi=k;this.U=0;this.V=null;this.K8=[];this.D=null;this.nF={ew:()=>this.Vi};
this.Vi.length===1||g.Wy(this.Vi,N=>!!N.range)}bA(){if(!this.K8.length)return[];
const Z=this.K8;this.K8=[];this.D=g.bf(Z).info;return Z}im(){return this.K8}YW(){super.YW();this.V=null;this.K8.length=0;this.Vi.length=0;this.D=null}};var Wdy=class extends g.jR{constructor(Z,k,N,a,T,K,y,Q,q=!1){super();this.u3=Z;this.policy=k;this.uX=N;this.EH=a;this.timing=T;this.logger=K;this.Y=y;this.Ll=Q;this.G=q;this.lastError=null;this.V=0;this.L=!1;this.D=0;this.U=new g.Uc(this.j,this.policy.gD,this)}j(){if(!this.jm()){var Z=(0,g.z)(),k=!1;if(this.policy.LC){var N=this.timing.U>0?this.timing.O:this.timing.V;this.policy.di&&this.D&&(N=this.D);Z=Z-N-(this.policy.o8?this.policy.nD:this.timing.Tt()*1E3);N=Pq(DQ(this),!1);Z>=2E3*N?k=!0:Z>=this.policy.Wj*
N&&(this.V=this.policy.Ta)}else if(this.timing.U>0){if(this.G){this.policy.jY&&(this.V=0);return}Z=this.timing.xl();this.timing.hp();this.timing.xl()-Z>=this.policy.gD*.8?(this.V++,k=this.V>=5):this.V=0}else k=Z-this.timing.FN(),this.policy.Ta&&k>0&&(this.V+=1),Z=Pq(DQ(this),!1)*this.policy.KR,k=k>Z*1E3;this.V>0&&this.u3.Dq();k?this.q8():this.U.start()}}q8(){this.L=!0;this.u3.JT();this.lastError="net.timeout";O2(this)}canRetry(Z){const k=DQ(this);Z=Z?this.policy.ST:this.policy.YH;return k.timedOut<
this.policy.Ed&&k.V<Z}zQ(){return this.lastError}Mo(){return this.V}dispose(){this.U.dispose();super.dispose()}};var AfG={["1h"]:8,["9h"]:4,["1"]:8,["9"]:4,["("]:4,h:2,H:2},PbN={o:3,O:3,so:3,a:1,ah:1,A:1,m:1,M:1,sa:1,mac3:7,MAC3:7,meac3:5,MEAC3:5},d8y={o:0,O:0,a:0,ah:0,A:0,m:1,M:1,mac3:1,MAC3:1,meac3:1,MEAC3:1,so:4,sa:4};var Fvf={WEB:1,MWEB:2,TVHTML5:7,TVHTML5_CAST:43,WEB_UNPLUGGED:41,WEB_EMBEDDED_PLAYER:56,TVHTML5_AUDIO:57,TV_UNPLUGGED_CAST:58,TVHTML5_KIDS:59,WEB_MUSIC:61,WEB_CREATOR:62,TVHTML5_UNPLUGGED:65,WEB_REMIX:67,TVHTML5_SIMPLY:75,WEB_KIDS:76,TVHTML5_SIMPLY_EMBEDDED_PLAYER:85,WEB_MUSIC_EMBEDDED_PLAYER:86,WEB_MUSIC_ANALYTICS:31,WEB_GAMING:32,WEB_EXPERIMENTS:42,WEB_HEROES:60,WEB_UNPLUGGED_ONBOARDING:69,WEB_UNPLUGGED_OPS:70,WEB_UNPLUGGED_PUBLIC:71,TVHTML5_VR:72,TVHTML5_FOR_KIDS:93};var $c,wk,xc=[["337","336","335"],["702","701","700"],["315","308","303","302"],["299","298"],["787","788"]],QpN=[["571","401","400","399","398"],["313","271","248","247"],["137","136"]],qOR=["571 401 400 399 398 787 788 397 396".split(" "),"313 271 248 247 781 777 244 243".split(" "),["137","136","135"]],rff=[["411","410","409"],["360","358","357","274"],["385","376","384"],["225","224","145"]],Cbi=["412","359"],m8i=[["141"],["774"],["380"],["328"]],TEb={["398"]:"397 396 395 394 788 787".split(" "),
["247"]:["780","779","244","243","242"],["136"]:["135","134","133","160"],["141"]:["140"],["774"]:["251","250"]},Kvf={["135"]:["134","133","160"],["243"]:["242"],["781"]:["780","779"],["777"]:["776","775"],["396"]:["395","394"],["141"]:["140"],["774"]:["251","250"]},yfi={["274"]:["317","273","318","280","279"],["145"]:["144","222","223","143","142"],["141"]:["149"],["140"]:["149"],["380"]:["381"],["328"]:["329"]},NEX={["133"]:240,["134"]:360,["135"]:480,["136"]:720,["137"]:1080,["242"]:240,["243"]:360,
["244"]:480,["247"]:720,["248"]:1080,["298"]:720,["299"]:1080,["302"]:720,["303"]:1080,["395"]:240,["396"]:360,["397"]:480,["398"]:720,["399"]:1080};var XUG={unknown:0,other:0,bluetooth:117,wifi:116,cellular:120,ethernet:118,wimax:119,none:122};var AA=class extends j5R{constructor(Z,k,N,a,T,{uY:K=[],hv:y=!1,PT:Q=0,poToken:q="",Ll:r,V3:C="",hQ:m=0,aU:A=new Uint8Array(0),g9:P=0,Kh:d}={}){super(k,T);this.policy=Z;this.logger=new g.bI("dash/request");this.cT=this.B9=0;this.yk=!1;this.YV=this.Fs=null;this.z_=!1;this.aU=this.hQ=null;this.Vw=this.qz=!1;this.i$=null;this.g9=this.G3=0;this.B8=!1;this.nF={Qn:h=>{this.Qn(h)},
mRA:()=>this.zF,
tOD:h=>{this.zF=h},
RMt:h=>{this.B9=h},
BQ6:h=>{this.BI.lastError=h},
kU:()=>this.xhr};
this.timing=new tK(this,N);this.hv=y;this.hQ=m;this.aU=A;this.uX=g.GH(this.info,this.policy,a);this.uX.set("rn",this.MK().toString());this.uX.set("rbuf",(Q*1E3).toFixed().toString());this.hv&&this.uX.set("smb","1");this.policy.lf&&q&&this.uX.set("pot",q);C&&this.uX.set("bbs",C);this.policy.useUmp&&!cq(35,5792,this.uX.W0)&&(this.wE=new hK(this),this.uX.set("ump","1"),this.uX.set("srfvp","1"));Z=this.policy.VP?this.policy.ND&&!isNaN(this.info.oJ)&&this.info.oJ>this.policy.ue?!1:!0:!1;this.BI=new Wdy(this,
this.policy,this.uX,this.info.EH,this.timing,this.logger,a,r);this.uY=K||null;this.JS=tSb(this);jxG(this.BI);a=void 0;if(this.policy.R$||this.wE||this.policy.vD)a={method:"POST"},K=(0,g.di)([120,0]),r={},d&&(d=G0(void 0,d),r.wj=d),this.policy.Ee&&this.aU&&(r.videoPlaybackUstreamerConfig=this.aU),this.policy.vD&&(d=this.info.Y)&&Object.assign(r,d),Object.keys(r).length>0?a.body=g.SV(r,g.t_):a.body=K;this.hQ&&this.aU&&(this.uX.set("iwts","1"),a={method:"POST"},d=g.SV({ob:{HV:this.hQ*1E3},Ib:this.info.Y?.Ib||
void 0,videoPlaybackUstreamerConfig:this.aU},g.t_),a.body=d);try{this.xhr=fn(this.uX,this.policy.j,this.timing,Z,a),this.BI.U.start(),P&&(this.dF=new g.Uc(this.E9,P,this),this.dF.start(P+(this.timing.SY.C.c9()||0)*1E3)),g.Sq(()=>{})}catch(h){hPf(this,h,!0)}}MK(){return this.timing.requestNumber}mH(){return this.uX.mH()}Yi(){const Z=Y0N(this.BI);
if(this.wE){var k=this.wE,N=k.V.totalLength;Z.ulen=N;N>0&&(k=cY(k.V,0),Z.ubyte=k,N===1&&k===0&&(Z.b248180278=!0))}this.B9&&(Z.rc=this.policy.D4?this.B9:this.B9.toString());this.policy.bq&&this.rU&&(Z.tr=this.rU);Z.itag=this.info.Vi[0].l3.info.itag;Z.ml=`${+this.info.Vi[0].l3.V()}`;Z.sq=`${this.info.Vi[0].Cp}`;this.uX&&(Z.ifi=`${+cq(1,1245,this.info.EH.Y)}`);this.B9!==410&&this.B9!==500&&this.B9!==503||(Z.fmt_unav="true");(N=this.errorMessage||this.xhr?.qR())&&(Z.msg=N);this.hv&&(Z.smb="1");this.info.isDecorated()&&
(Z.sdai="1");return Z}CM(){return o70(this.timing)}qR(){return this.xhr.qR()||""}EL(){return this.isComplete()||this.timing.EL()}D2(){!this.jm()&&this.xhr&&(this.B9=this.xhr.status,this.policy.zN&&this.zF&&this.xV(!1),this.Ef()?this.fl(2):!this.z_&&this.EL()&&(this.fl(),this.z_=!0))}Bl(){if(!this.jm()&&this.xhr){if(!this.cT&&this.xhr.XJ()&&this.xhr.getResponseHeader("X-Walltime-Ms")){var Z=Number(this.xhr.getResponseHeader("X-Walltime-Ms"));this.cT=((0,g.z)()-Z)/1E3}this.xhr.XJ()&&this.xhr.getResponseHeader("X-Restrict-Formats-Hint")&&
this.policy.n2&&!Edy()&&g.Z_("yt-player-headers-readable",!0,2592E3);Z=Number(this.xhr.getResponseHeader("X-Head-Seqnum"));var k=Number(this.xhr.getResponseHeader("X-Head-Time-Millis"));this.dF?.stop();this.Fs=Z||this.Fs;this.YV=k||this.YV}}S$(){var Z=this.xhr;!this.jm()&&Z&&(this.B9=Z.status,Z=this.LL(Z),this.policy.bq&&this.dF?.stop(),Z===5?O2(this.BI):this.Qn(Z),this.BI.U.stop())}LL(Z){uey(this);if(vn(this.BI,this.xhr.status,this.G3?this.timing.xW||this.Vw:this.xhr.DZ(),!1,this.B8))return 5;var k=
"";i9(this.BI,this.xhr)&&(k=Wzf(this.BI,this.xhr));if(k)return A$(DQ(this.BI)),this.info.DT(this.uX,k),3;k=Z.Uf();if(this.wE){this.xV(!0);uey(this);if(vn(this.BI,this.xhr.status,this.timing.xW||this.Vw,!1,this.B8))return 5;if(!this.qz){if(this.Vw)return A$(DQ(this.BI)),3;this.BI.lastError="net.closed";return 5}}else{if(vn(this.BI,this.xhr.status,this.xhr.DZ(),!1,this.B8))return 5;var N=this.info.D;if(N&&N!==k||Z.UF())return this.BI.lastError="net.closed",5;this.xV(!0)}N=bNN(this)?Z.getResponseHeader("X-Bandwidth-Est"):
0;if(Z=bNN(this)?Z.getResponseHeader("X-Bandwidth-Est3"):0)this.yk=!0,this.policy.aX&&(N=Z);E7y(this.BI,k,N?Number(N):0,this.info.Vi[0].type===5);return 4}canRetry(){this.jm();const Z=this.info.isDecorated();return this.BI.canRetry(Z)}onStateChange(){this.isComplete()&&(this.policy.XM?this.JT():this.timing.deactivate())}q8(){this.BI.q8()}Dq(){this.callback&&this.callback(this,this.state)}Mo(){return this.BI.Mo()}dispose(){super.dispose();this.BI.dispose();this.dF?.dispose();this.policy.XM||this.JT()}JT(){this.xhr&&
this.xhr.abort();this.timing.deactivate()}bA(){if(!this.im().length)return[];this.l1=!0;return this.zF.bA()}Ef(){return this.state<1?!1:this.zF&&this.zF.K8.length||this.xhr?.sj()?!0:!1}im(){this.xV(!1);return this.zF?this.zF.im():[]}xV(Z){try{if(Z||this.xhr.XJ()&&this.xhr.sj()&&!i9(this.BI,this.xhr)&&!this.JS)this.zF||(this.zF=new x8f(this.policy,this.info.Vi)),this.xhr.sj()&&(this.wE?this.wE.feed(this.xhr.PN()):Bn(this.zF,this.xhr.PN(),Z&&!this.xhr.sj()))}catch(k){this.wE?hPf(this,k):g.L9(k)}}d3(Z,
k){switch(Z){case 21:({ma:Z}=k.split(1));lNf(this,Z);break;case 22:this.qz=!0;Bn(this.zF,new h8([]),!0);break;case 43:({redirectUrl:Z}={redirectUrl:wj(new ut(k),1)});Z&&(this.info.DT(this.uX,Z),this.Vw=!0);break;case 45:const {PC:N,gq:a}=u1(new ut(k));N&&a&&(this.i$=N/a);break;case 44:this.ME=xKj(new ut(k));!this.timing.xW&&this.ME?.action===4&&this.ME?.Af?.G3&&(this.G3=this.ME.Af.G3);break;case 53:this.policy.bq&&({g9:Z}=gNX(new ut(k)),Z&&(this.dF||(this.g9=Z,this.dF=new g.Uc(this.E9,Z,this)),this.dF.start()));
break;case 60:this.aO=h_(new ut(k));break;case 58:if(Z=asy(new ut(k)))this.Tx=Z,Z.Tx===3&&(this.B8=!0)}}Ul(Z,k,N,a){N||this.timing.Ul(a);if(Z!==21)return!1;if(Z=this.policy.zN)if(Z*=this.info.Vi[0].l3.info.UH,k.totalLength+N!==a&&k.totalLength<Z)return!1;if(!N){if(k.totalLength===1)return!0;k=k.split(1).ma}lNf(this,k);return!0}Uf(){return this.xhr.Uf()}jt(){return this.cT}xi(){return this.W7()?2:1}W7(){if(!this.policy.j.qK||!isNaN(this.info.oJ)&&this.info.oJ>0)return!1;if(!this.xhr.XJ())return!0;
if(this.wE)var Z=!this.info.D;else this.xhr.Tl()?Z=!1:(Z=this.xhr.getResponseHeader("content-type"),Z=Z==="audio/mp4"||Z==="video/mp4"||Z==="video/webm");if(!Z)return!1;if(isNaN(this.info.oJ)){Z=this.xhr.getResponseHeader("x-head-seqnum");const k=this.timing.policy.j?1:0;if(Z&&Number(Z)>this.info.Vi[0].Cp+k)return!1}return!0}N6(){return+this.xhr.getResponseHeader("X-Segment-Lmt")||0}qQ(){this.xhr&&(this.Fs=Number(this.xhr.getResponseHeader("X-Head-Seqnum")));return this.Fs}cK(){this.xhr&&(this.YV=
Number(this.xhr.getResponseHeader("X-Head-Time-Millis")));return this.YV}zQ(){return this.BI.zQ()}E9(){if(!this.jm()&&this.xhr){this.rU="heartbeat";var Z=this.BI;Z.V+=2;this.Dq()}}};var uw=class extends Iif{constructor(Z,k){super(Z,k);this.Kp=!0;this.Sm=!1;this.iq=this.s6=0;this.qX=this.Qz=NaN;this.bq=0;this.Bv&&(this.Vz=new Lx)}FS(Z,k){const N=(Z-this.C)/1E3,a=k-this.D;this.U>0?a>0&&(this.Sm&&(N>.2||a<1024?(this.L+=N,N>.2&&fNb(this,.05,a)):fNb(this,N,a)),this.Kp&&(this.s6+=a,this.iq+=N)):k>this.policy.V&&this.dA(Z,k);super.FS(Z,k)}jY(Z,k){tA(this,Z,k);this.FS(Z,k);this.Bv&&this.G&&(k-=this.G.Bc,BEf(this,0,Z-this.G.localTimestampMs,Z-this.G.localTimestampMs,k,this.G.lT>0?k/this.G.lT*
1E3:0));this.Sm&&(k=this.D*this.snapshot.stall+this.D/this.snapshot.byterate,this.U>0&&dW(this.SY,this.s6,this.L),Z=(Z-this.V)/1E3||.01,this.policy.C&&!(this.U>0)||Xs(this.SY,Z,this.D,k,!1))}O6(Z){tA(this,Z,this.Y);var k=(Z-this.C)/1E3;HS(this.SY,k,0);this.QQ(k,0);!this.Sm&&this.U>0||(k=this.D*this.snapshot.stall+this.D/this.snapshot.byterate,this.U>0&&(this.L+=(Z-this.C)/1E3,dW(this.SY,this.s6,this.L)),Xs(this.SY,(Z-this.V)/1E3||.01,this.D,k,!1,!0))}t6(Z){Z=Z.vp||2147483647;(Z&2)!==2&&(this.Kp=!1);
(Z&1)===1&&(this.Sm=!0)}lm(Z){Z=Z.vp||2147483647;(Z&2)===2&&(this.Kp=!1);(Z&1)===1&&(this.Sm=!1)}tW(){return this.O}hq(){const Z=this.Kp?this.now()-this.C:0;return Math.max(this.iq*1E3+Z,1)}r5(){return this.s6*1E3/this.hq()}dA(Z=this.j,k=this.Y){this.U>0||(super.dA(Z,k),k=this.SY,Z=(Z-this.zt)/1E3,k.C.wr(1,(this.zt-this.V)/1E3),k.dA.wr(1,Z))}Ke(Z){this.Qz=Z}Yj(Z){Z.timestampMs&&(this.Qz=Z.timestampMs);Z.Wb&&(this.qX=Z.Wb);isNaN(this.Qz)||isNaN(this.qX)||(this.bq=this.now()-this.qX/2-this.Qz)}xj(Z){const k=
this.G?.lT,N=Z.Kr!==void 0?Z.Kr*1E3:0,a=this.now(),T=this.Y;if(this.G){const K=Z.Jv-this.G.Jv,y=a-this.G.localTimestampMs,Q=T-this.G.Bc,q=isNaN(this.G.localTimestampMs)||isNaN(this.j)?0:this.j-this.G.localTimestampMs;this.Bv&&BEf(this,K,y,q,Q,k&&k>0?Q/k*1E3:0)}this.G={Jv:Z.Jv,localTimestampMs:a,Bc:T,lT:N}}N(){const Z=super.N();Z.rbw=this.r5();Z.rbe=+this.Kp;Z.gbe=+this.Sm;Z.ackt=(this.Qz-this.V).toFixed();this.Vz?.V()&&(Z.nts=this.Vz.W9());return Z}hp(){}xl(){return NaN}FN(){return this.V+this.snapshot.delay*
1E3}};var YAj=class{constructor(Z,k){this.u3=k;this.U={};this.logger=new g.bI(Z)}d3(Z,k){switch(Z){case 20:Z=new ut(k);Z={gR:Dc(Z,1),videoId:wj(Z,2),itag:Dc(Z,3),lmt:Dc(Z,4),xtags:wj(Z,5),Qd:Dc(Z,6),p5:vY(Z,8),Ne:Dc(Z,9),Sba:Dc(Z,10),startMs:Dc(Z,11),durationMs:Dc(Z,12),Bj:Dc(Z,14),timeRange:$p(Z,15,Lf),Tk:Dc(Z,16),oP:Dc(Z,17),zd:Dc(Z,20),eV:$p(Z,21,Ls0),clipId:wj(Z,1E3)};this.j(Z);break;case 21:this.G(k,!1);break;case 22:this.j7(k);break;case 31:Z=lt(k,uCG);this.u3.SN(Z);break;case 52:Z=lt(k,wGj);this.u3.qS(Z);
break;case 69:Z={vr:Gc(new ut(k),1,HPf)};this.u3.pD(Z);break;case 65:Z=lt(k,NQy);this.u3.G$(Z);break;default:this.L(Z,k)}}j(){}L(){}};var ZiT=new Set([53,49,50]),kfh=class extends YAj{constructor(Z){super("sabr",Z);this.u3=Z;this.V=[]}L(Z,k){SOb(this.u3)&&!ZiT.has(Z)?this.V.push({id:Z,data:k}):D8b(this,Z,k)}xj(Z){Z=new ut(Z);Z={Jv:Dc(Z,1),Kr:Dc(Z,2)};this.u3.xj(Z)}Yj(Z){Z=new ut(Z);Z={timestampMs:Dc(Z,1),Wb:Dc(Z,2)};this.u3.Yj(Z)}Bs(Z){Z=new ut(Z);Z={de3:Gc(Z,1,Xw),YQz:Gc(Z,2,Xw)};this.u3.Bs(Z)}FV(Z){var k=new ut(Z);Z=xp(k,1);var N=xp(k,2);k=xp(k,3);this.u3.FV(Z,N,k)}Mm(Z){Z=u1(new ut(Z));this.u3.Mm(Z)}E0(Z){Z=lt(Z,BQr);this.u3.E0(Z)}bG(Z){Z=
new ut(Z);Z={videoId:wj(Z,1),formatId:$p(Z,2,Xw),endTimeMs:Dc(Z,3),BVm:Dc(Z,4),mimeType:wj(Z,5),Bm:$p(Z,6,dKf),indexRange:$p(Z,7,dKf),EK:$p(Z,8,XGN)};this.u3.bG(Z)}yJ(Z){Z=new ut(Z);Z={type:Dc(Z,1),scope:Dc(Z,2),value:gj(Z,3),sendByDefault:vY(Z,4),writePolicy:Dc(Z,5)};this.u3.yJ(Z)}Se(){this.u3.Se()}Zp(Z){Z=lsi(new ut(Z));this.u3.Zp(Z)}qI(Z){Z=gNX(new ut(Z));this.u3.qI(Z)}GL(Z){Z=xKj(new ut(Z));this.u3.GL(Z)}gt(Z){Z={redirectUrl:wj(new ut(Z),1)};this.u3.gt(Z)}G(Z){const k=cY(Z,0);if(Z.totalLength!==
1){({ma:Z}=Z.split(1));var N=this.U[k]||null;N&&this.u3.Tc.V(k,N,Z)}}j7(Z){Z=cY(Z,0);const k=this.U[Z]||null;k&&this.u3.j7(Z,k)}j(Z){const k=Z.gR,N=Z.p5,a=Z.Qd,T=Z.oP,K=Z.Tk,y=Z.Ne,Q=Z.startMs,q=Z.durationMs,r=Z.timeRange,C=Z.Bj,m=Z.zd,A=Z.clipId,P=Z.eV,d=Fm(Z);Z=DHi.has(CD[`${Z.itag}`]);this.U[k]=d;let h=-1;Q&&m&&r?.timescale&&(h=Q/1E3+m/r.timescale);this.u3.iA(d,Z,h,{gR:k,p5:!!N,Qd:a??-1,Ne:y??-1,startMs:Q??-1,durationMs:q??-1,Bj:C,oP:T,Tk:K,clipId:A,timeRange:r,eV:P})}t6(Z){Z={vp:Dc(new ut(Z),
1)};this.u3.t6(Z)}lm(Z){Z={vp:Dc(new ut(Z),1)};this.u3.lm(Z)}Er(Z){Z=asy(new ut(Z));this.u3.Er(Z)}ot(Z){Z={cz:$p(new ut(Z),1,vNi)};this.u3.ot(Z)}onSnackbarMessage(Z){Z=Dc(new ut(Z),1);this.u3.onSnackbarMessage(Z)}J6(Z){Z=new ut(Z);Z={reloadPlaybackParams:$p(Z,1,kSf),xo:vY(Z,2)};this.u3.J6(Z)}PS(){for(const {id:Z,data:k}of this.V)D8b(this,Z,k);this.V=[]}};var NX_=class extends g.jR{constructor(Z){super();this.G=Z;this.logger=new g.bI("onesie");this.yn=new Map;this.Y=this.D=!1;this.BG=this.cD=null;this.L=!1}jf(){return Array.from(this.yn.keys())}Vb(Z){return this.yn.has(Z)}nU(Z){this.yn.get(Z).DW=!0}C(){let Z=0;const k=this.jf();for(let N=0;N<k.length;N++)Z+=this.yn.get(k[N])?.bytesReceived||0;return Z}Z2(Z){Z=this.yn.get(Z);const k=Z.K8;Z.ZC+=k.totalLength;Z.K8=new h8;return k}K3(Z){return this.yn.get(Z).K3}Lx(Z){return this.yn.get(Z).Lx}iA(Z,k,N){this.yn.get(Z)||
this.yn.set(Z,{K8:new h8,ZC:0,bytesReceived:0,Hm:0,jQ:!1,K3:!1,Lx:!1,H9:k,po:[],Vi:[],Vu:[],DW:!1,bk:new Map,rj:new Map,Zh:new Map,nT:[]});k=this.yn.get(Z);this.cD?z0(this,Z,N,k):(N.p5?k.Hm=N.Bj:k.Vu.push(N),k.po.push(N))}ew(Z){return this.yn.get(Z)?.Vi||[]}V(Z,k,N){(k=this.yn.get(k))&&!k.K3&&(S9?(k.bk.has(Z)||k.bk.set(Z,{data:new h8,Cs:0,v8:!1}),Cv(k.bk.get(Z).data,N)):Cv(k.K8,N),k.bytesReceived+=N.totalLength,k.jQ=!0)}fl(){for(const Z of this.yn.values())if(Z.jQ){if(Z.onProgress)Z.onProgress();
Z.jQ=!1}}U(Z){if((Z=this.yn.get(Z))&&!Z.K3){Z.K3=!0;if(Z.onProgress)Z.onProgress();a:{for(k of this.yn.values())if(!k.K3){var k=!1;break a}k=!0}k&&this.G.IQ()}}j7(Z,k){k=this.yn.get(k);S9?k&&!k.K3&&(k.bk.get(Z)?k.bk.get(Z).v8=!0:k.bk.set(Z,{data:new h8,Cs:0,v8:!0}),k.Lx=!0):k&&!k.Lx&&(k.Lx=!0)}bA(Z){if(S9){var k=this.yn.get(Z);if(k)for(const [Q,q]of k.bk){const r=Q,C=q;var N=k.rj.get(r),a=this.cD?.Y.get(Z),T=a instanceof Qj;if(this.BG?.xd&&T){if(a?.V()&&!N.length){N=r;a=Z;var K=k.Zh.get(N);K?(k.Zh.delete(N),
N=z0(this,a,K,k)):N=[]}if(!N.length)continue}if(!T&&DT(N[0])){if(!C.v8)continue;K=N;T=C.data;N=0;a=[];for(const m of K){K=m.U;const A=m4(T,N,K);N+=K;a.push(new nG(m,A))}k.nT.push(...a)}else if(C.data.totalLength>0||!N[0].range&&C.v8)T=void 0,N=N[0],a=C.Cs,K=C.data,N.range||(T=C.v8),T=new nG(AYf(N,N.V+a,K.totalLength,T),K),C.Cs+=T.info.U,k.nT.push(T);k.bk.get(r).data=new h8;C.v8&&k.bk.delete(r)}Z=this.yn.get(Z);if(!Z)return[];k=Z.nT;Z.nT=[];for(var y of k)Z.ZC+=y.info.U;return k||[]}y=this.yn.get(Z)?.zF;
if(!y)return[];this.xV(Z,y);return y.bA()}Ef(Z){return S9?JA(this,Z):!!this.yn.get(Z)?.zF?.im()?.length||JA(this,Z)}xV(Z,k){for(;JA(this,Z);){var N=this.Z2(Z);var a=Z;a=this.yn.get(a).K3&&!oG(this,a);Bn(k,N,a&&wUU(this,Z))}}j(){return this.L?!1:this.L=!0}N(){this.D=!0}YW(){super.YW();for(const Z of this.yn.keys())this.U(Z);if(this.BG?.yI)for(const Z of this.yn.values())Z.bk.clear(),Z.rj.clear(),Z.Zh.clear(),Z.nT.length=0,Z.Vi.length=0,Z.po.length=0,Z.Vu.length=0;this.yn.clear()}},S9=!1;var ajJ=new Set([2]),b9=class extends g.jR{constructor(Z,k,N,a,T,K,y){super();this.policy=Z;this.info=k;this.cD=N;this.u3=T;this.logger=new g.bI("sabr");this.wE=new hK(this);this.Ot=new kfh(this);this.Tc=new NX_(this);this.state=1;this.Kc=!1;this.Xp=0;this.clipId="";this.segmentStartTimeMs=this.segmentNumber=-1;this.Qk=0;this.OA=-1;this.u1=this.UG=this.B8=this.z4=!1;this.policy.PM?this.O3=new uw(this,K):this.O3=new tK(this,K);this.uX=this.policy.pF?k.Ct:GKi(k,this.policy,a);this.uX.set("rn",`${this.MK()}`);
this.uX.set("alr","yes");GkR(this.Tc,N,Z);this.BI=new Wdy(this,this.policy,this.uX,k.EH,this.O3,this.logger,a,y,this.policy.enableServerDrivenRequestCancellation);jxG(this.BI);this.policy?.yI&&(g.u(this,this.Tc),g.u(this,this.BI));Z=k.U;k={method:"POST",body:Z};Z&&(this.Qk=Z.length);try{this.xhr=fn(this.uX,this.policy.j,this.O3,s1,k),this.BI.U.start()}catch(Q){g.L9(Q)}}D2(){!this.jm()&&this.xhr&&(this.xV(!1),gB(this.u3,this))}Bl(){}S$(){if(!this.jm()&&this.xhr){var Z=this.LL();Z===5?(this.zQ()===
"net.badstatus"&&this.u3.T7(),O2(this.BI)):(this.u3.IB(),this.Qn(Z));this.BI.U.stop();this.YQ?.stop()}}LL(){let Z="";i9(this.BI,this.xhr)&&(Z=Wzf(this.BI,this.xhr));if(Z)return this.info.EH.DT(this.uX,Z),3;this.xV(!0);if(vn(this.BI,this.xhr.status,this.xhr.DZ(),this.info.Wv(),this.B8))return 5;if(this.Kc)return 3;E7y(this.BI,this.xhr.Uf(),0,this.Wv());this.policy.iq&&Osy(this.u3);return 4}xV(Z){const k=this.xhr;!Z&&i9(this.BI,this.xhr)||!k.sj()||(Z=k.PN(),this.wE.feed(Z))}d3(Z,k){this.xhr.N8()&&Z===
21&&ePR(this);this.Ot.d3(Z,k)}Ul(Z,k,N,a){N||(this.O3.Ul(a),this.policy.vx&&Z===21&&ePR(this));if(Z!==21)return!1;this.O3.xW=!0;Z=k.totalLength;N||(this.OA=cY(k,0),k=k.split(1).ma);var T=this.policy.aA;const K=this.Ot.U[this.OA],y=this.cD.Y.get(K);if(T&&y&&(T*=y.info.UH,Z+N!==a&&Z<T))return!1;this.Tc.V(this.OA,K,k);return!0}xj(Z){this.policy.Bv&&this.O3.xj(Z)}Zp(Z){this.u3.Zp(Z,this.MK())}qI(Z){this.policy.enableServerDrivenRequestCancellation&&(this.YQ?.dispose(),this.aB=Z,Z.E$&&(this.YQ=new g.Uc(this.v$,
Z.E$,this)),this.v$())}v$(){if(this.aB?.items&&(this.YQ?.start(),this.O3.U>0)){this.policy.LC&&this.BI.U.stop();var Z=this.O3.hq(),k=this.O3.r5(),N=o8f(this,Z);k>N.n_||N.Hn>0&&this.info.c_()>N.Hn||(this.Xp=(0,g.z)(),this.YQ?.stop(),this.policy.iq&&(N=this.u3,Z={jb:Math.round(k*Z/1E3),cN:Z},N.policy.iq&&(N.Sm=Z,N.Xs++)),this.q8())}}q8(){this.BI.q8()}GL(Z){this.u3.GL(Z,this.MK())}gt(Z){this.Kc=!0;this.info.EH.DT(this.uX,Z.redirectUrl)}t6(Z){this.O3 instanceof uw&&this.O3.t6(Z)}lm(Z){this.O3 instanceof
uw&&this.O3.lm(Z)}bG(Z){var k=Z.formatId;const N=new h$(Z.Bm?.first||0,Z.Bm?.mP||0),a=new h$(Z.indexRange?.first||0,Z.indexRange?.mP||0);if(!this.cD.Y.get(Fm({itag:k.itag,lmt:k.lmt,xtags:k.xtags}))){var T=Z.EK||{};T.mimeType=Z.mimeType;T.itag=k.itag;T.lastModified=`${k.lmt||0}`;T.xtags=k.xtags;Z=this.cD;k=ly("");T=ky(T,null);aZ(Z,new qM(k,T,N,a))}}Mm(Z){this.u3.Mm(Z,this.MK())}onSnackbarMessage(Z){if(this.policy.Re)this.u3.onSnackbarMessage(Z)}pD(Z){this.policy.L&&this.u3.pD(Z,this.MK())}SN(Z){this.Ru=
Z;this.BI.D=(0,g.z)();this.u3.SN(Z)}q9(Z){this.u3.q9(Z)}FV(Z,k,N){this.u3.FV(Z,k,N)}yJ(Z){Z.scope===2&&(this.qk=Z);this.u3.yJ(Z)}Se(){this.z4=!0;this.u3.Se()}Bs(Z){this.policy.l9&&this.u3.Bs(Z)}E0(Z){this.u3.E0(Z,this.MK())}Er(Z){Z.Tx===3&&(this.B8=!0);this.u3.Er(Z)}Yj(Z){this.policy.Bv?this.O3.Yj(Z):this.O3.Ke((0,g.z)())}ot(Z){this.u3.ot(Z)}J6(Z){this.u3.J6(Z)}G$(Z){this.u3.G$(Z)}canRetry(){this.jm();return this.BI.canRetry(!1)}dispose(){this.jm()||(super.dispose(),this.BI.dispose(),this.YQ?.dispose(),
this.Qn(-1),this.JT())}Qn(Z){this.state=Z;gB(this.u3,this)}Wv(){return this.info.Wv()}Pp(){return this.z4}W_(){return this.qk}iA(Z,k,N,a){N>=0&&this.u3.yG(N);a.clipId&&(this.clipId=a.clipId);this.policy.U&&!k&&(this.segmentNumber=a.Ne,this.segmentStartTimeMs=a.startMs);this.info.isDecorated()&&(N=this.info,N=N.data?.Ib?.NE?N.data.Ib.NE:-1,N>=0&&N>a.Ne&&this.u3.loader.U6("sdai",{skpsqmismatch:"1",stsq:N,rcvsq:a.Ne,a:k}));this.Tc.iA(Z,k,a);this.policy.qY&&this.Ru&&this.O3 instanceof tK&&(N=this.Ru.Bz,
this.O3.iA(a.durationMs/1E3,k,N>0&&a.Ne+1>=N));this.Tc.nU(Z);this.u3.iA(a)}j7(Z,k){this.Tc.j7(Z,k)}qS(Z){this.requestIdentifier=Z}bA(Z){return this.Tc.bA(Z)}ew(Z){return this.Tc.ew(Z)}Ef(Z){return this.Tc.Ef(Z)}jf(){return this.Tc.jf()}xi(){return 1}MK(){return this.O3.requestNumber}m4(){return this.requestIdentifier}mH(){return this.uX.mH()}IQ(){this.JT()}JT(){this.O3.deactivate();this.xhr?.abort()}isComplete(){return this.state>=3}Ih(){return this.state===3}vZ(){return this.state===5}X7(){return this.state===
4}oI(){return this.isComplete()}nI(){return this.state>=1}Mo(){return this.policy.jY?this.BI.Mo():0}Dq(){this.policy.jY&&gB(this.u3,this)}Io(){return this.info.V?.ob?.s0||0}PS(){this.b1()&&!this.u1&&(this.u1=!0,this.Ot.PS())}b1(){const Z=this.info.V?.ob?.Km;return!!Z&&ajJ.has(Z)}I3(){return"SABR"}zQ(){return this.BI.zQ()}Yi(){const Z=Y0N(this.BI);Object.assign(Z,K8(this.info));Z.req="sabr";Z.rn=this.MK();this.xhr?.status&&(Z.rc=this.policy.D4?this.xhr.status:this.xhr.status.toString());var k=this.xhr?.qR();
k&&(Z.msg=k);this.Xp&&(k=o8f(this,this.Xp-this.O3.tW()),Z.letm=k.eA,Z.mrbps=k.n_,Z.mram=k.Hn);return Z}};var TXJ=class{constructor(Z){this.V=Z;this.N=this.Sm=this.j=this.FS=this.Y=this.L=this.Vz=this.G=this.dA=this.C=this.vD=this.zt=this.xW=this.O=0;this.ticks={}}tick(Z,k){this.ticks[Z]=k?window.performance.timing.navigationStart+k:(0,g.z)()}};var KGK=class extends g.n9{constructor(Z,k,N,a,T,K){super();this.loader=Z;this.cD=k;this.policy=N;this.videoTrack=a;this.audioTrack=T;this.N=this.V=null;this.L=this.G=NaN;this.j=0;this.C=NaN;this.uq=null;this.xW=this.zt=NaN;this.dA=new Map;this.O=this.D=this.Y=NaN;this.nF={heq:()=>this.U};
this.U=K?1:0}Fm(Z,k,N,a){var T=!1;this.policy.U&&(T=N?this.xW===Z.Cp:this.zt===Z.Cp);if(this.uq&&a&&!T){a=[];T=[];let K=[],y=void 0,Q=0;k&&(a=k.V,T=k.U,K=k.Y,y=k.D,Q=k.Tr,this.U6("sdai",{sq:Z.Cp,ssvicpns:a.join("."),ssvid:T.join(".")}));this.policy.U&&(N?this.xW=Z.Cp:this.zt=Z.Cp);this.uq.fg(Z.Cp,Z.startTime,a,T,K,N,Q,y)}this.policy.U?N&&(this.U===1&&pn(this,5,"noad"),Z.Cp!==this.V?.Cp&&(pUf(this,Z,k,N),isNaN(Z.startTime)||n8b(this,Z.Cp,nn(this,Z.startTime,Z.Cp),!!k,this.uq))):N&&pUf(this,Z,k)}AN(Z,
k,N){const a=this.videoTrack.l3.index.hW()<=k;this.V={lX:Z,Cp:k,UL:N};a&&RG(this,Z,k)}vz(){this.uq&&this.uq.vz()}FS(Z,k){if(this.U!==0&&k&&Z.Vi[0].xT()){var N=Z.Vi[0].Cp,a=Z.Vi[0].Y;Z=Z.isDecorated();n8b(this,N,a,Z,k)}}Vz(Z,k){if(this.policy.xW?0:this.U===1||this.U===2)return!1;if(this.U!==0&&Z===this.audioTrack){if(this.policy.U)return Zwf(this.videoTrack,k)||Zwf(this.videoTrack,k+1);Z=Gw(this.videoTrack);if(k>(Z?Z.Cp:-1))return!1}return!0}U6(Z,k,N=!1){(Z!=="sdai"||this.policy.dG||N)&&this.loader.U6(Z,
k)}BV(Z,k){const N=this.videoTrack.l3.index.pn(Z);if(N>=0){var a=k.UC(N,2)?.wG||"";if(this.policy.U||a)return k.Ik(Z,N),Ms(this.loader,Z,Z,N),this.U6("sdai",{cmskpad:1,t:Z.toFixed(3),sq:N}),!0}this.U6("sdai",{cmskpad:0,t:Z.toFixed(3),sq:N});return!1}};var yyT=class{constructor(Z,k,N,a){this.policy=Z;this.U6=k;this.C=N;this.V=a;this.Y=void 0;this.U=new Set;this.G=-1;this.D=0;this.L=!1;this.nF={V9q:()=>this.U,
jJ:T=>this.jJ(T)}}Ab(Z,k,N){let a=this.policy.Vp&&Z.tileContext?`${Z.gE};${Z.tileContext}`:Z.gE;
a||(a=j9(this,this.Y));this.U6("clsdai",{setadcfg:Z.gE||"misscid",cid:a,acpn:N,acfglen:k?.length||0});this.V.has(a)||(this.U6("clsdai",{setadcfg:"noentry",cid:a}),this.V.set(a,{event:"unknown",startTimeSecs:0,Xl:0,GW:[],W3:Date.now(),N$:-1,mB:6,w6:Z}));(Z=this.V.get(a))?k?(Z.mB=6,Z.GW.push(N),Z.l$=k):Z.mB=2:this.U6("clsdai",{setadcfg:"notfound",cid:a})}rF(Z){const k=Z||j9(this,this.Y);this.U6("clsdai",{rmvadcfg:Z||"misscid",lastcid:j9(this,this.Y)});(Z=this.V.get(k))?(Z.l$="",Z.mB=4):this.U6("clsdai",
{rmadcfg:"notfound",cid:k})}pD(Z,k,N,a,T){this.G=k;if(!((Z.vr?.length||0)<=0))if(a){if(this.D=a,this.U6("clsdai",{oncldisabled:a,rn:k}),this.D===3&&T)for(var K of Z.vr)K.lX&&K.trackType===2&&uqi(T,jpy(this,K),K.Ne||0,!0)}else for(const Q of Z.vr){if(Z=Q.lX)a:{let q;Z=jpy(this,Q);a=k;T=Q.Ne||0;K=N;var y=this.policy.KW&&Q.Mc?new HoG:void 0;if(!this.policy.e_&&Z.event==="prefetch"){Z=!1;break a}const r=j9(this,Z);this.V.has(r)?(q=this.V.get(r),T>q.N$&&(q.startTimeSecs=Z.startSecs,q.Xl=Z.Xl,q.event===
"predictStart"&&q.mB===5&&Z.event!=="predictStart"&&(q.W3=Date.now()),q.event=Z.event)):(q={event:Z.event,startTimeSecs:Z.startSecs,Xl:Z.Xl,GW:[],N$:T,mB:0,w6:{gE:Z.identifier,tileContext:Z.tileContext}},this.V.set(r,q),this.policy.L&&this.U6("clsdai",{newcid:1,cid:Z.identifier,tc:Z.tileContext,evt:Z.event,sn:T,rn:a,st:this.jJ(q.mB)}));let C=!1;q.mB===0&&(K?.FP(Z,y)?q.mB=5:(q.mB=K?11:3,q.l$="",C=!0),q.W3=Date.now(),q.N$=T,this.policy.L&&this.U6("clsdai",{onqpnt:1,cid:Z.identifier,tc:Z.tileContext,
evt:Z.event,sn:T,rn:a,st:this.jJ(q.mB)}));T>q.N$&&(K?.FP(Z),q.N$=T);this.Y=Z;this.policy.L&&this.U.add(r);Z=C}Z&&(this.L=!0)}}j(){this.U.clear();this.D=0;this.L=!1}N(){return this.L}Vz(Z,k){if(this.D!==0){this.U6("clsdai",{gssinfodisabled:this.D});k=7;switch(this.D){case 1:k=7;break;case 2:k=9;break;case 3:k=10;break;default:this.U6("clsdai",{unknowndisr:this.D})}return[{mB:k}]}const N=[];if(!isNaN(Z)){var a=E8f(this,Z),T=this.G+1;if(a.length>0){this.U6("clsdai",{updcids:1,mt:Z.toFixed(3),cid:a.join(","),
rn:T});this.U.clear();for(const K of a)this.U.add(K)}else this.C&&(this.U6("clsdai",{updcids:0,mt:Z.toFixed(3),rn:T}),this.U.clear())}for(const K of this.U)T=K,Z=k,T?(a=this.V.get(T),T={cuepointId:a?.w6?.gE||T.split(";")[0]},a?.l$&&(T.adsConfig=rr(a.l$)||void 0),a?.GW&&(T.w8=a.GW),a?.QA&&(T.NE=a.QA),Z&&(T.dW=Cg(Z.split(";")[0]),T.Lk=Z.split(";")[1]||""),T.mB=a?.mB||0,Z=T):Z=void 0,Z&&N.push(Z);return N}Ik(Z,k,N){var a=Z;this.policy.L&&(a+=N);let T,K="";a=E8f(this,a);a.length>0&&(K=a[0])&&(T=this.V.get(K));
if(!T||T.QA)return this.U6("clsdai",{skipadfail:1,cid:K,sn:k,mt:Z.toFixed(3),of:N.toFixed(3),skipsq:T?.QA||-1}),!1;this.U6("clsdai",{skipadsuc:1,cid:K,sn:k,mt:Z.toFixed(3),of:N.toFixed(3)});T.QA=k;this.U.clear();this.U.add(K);return!0}WS(){this.U6("clsdai",{rstskipad:1});for(const Z of this.V.values())Z.QA=NaN}O(){let Z=!1;for(const [,k]of this.V.entries()){const N=k;N.event!=="predictStart"&&N.event!=="prefetch"&&N.mB===5&&(N?.W3&&Date.now()-N?.W3>1E4?N.mB=1:Z=!0)}return Z}jJ(Z){if(this.policy.mX)switch(Z){case 0:return"unknown";
case 1:return"timeout";case 2:return"ratecontrol";case 11:return"ratecontrol_client";case 3:return"sverr";case 4:return"deleted";case 5:return"waiting";case 6:return"ready";case 7:return"ssdisabled";case 9:return"ssdisabled_ustreamer";case 10:return"ssdisabled_no_config";case 8:return"inactive";default:return"unknown"}switch(Z){case 1:return"timeout";case 2:return"ratecontrol";case 3:return"sverr";case 4:return"deleted";case 5:return"waiting";case 6:return"ready";case 7:return"ssdisabled";default:return"unknown"}}};var Nl=class{constructor(Z,k,N){this.audio=Z;this.video=k;this.reason=N}},ym=class{constructor(Z,k,N,a){this.V=Z;this.reason=k;this.source=N;this.token=a}};var Qyi=class extends g.jR{constructor(Z,k,N){super();this.policy=Z;this.U=k;this.U6=N;this.Y=new Map;this.L=0;this.G=!1;this.V="";this.D=!1}iC(){return this.G&&E2(this).size>0}Qr(Z,k=!1,N={}){this.policy.Eq=Jl(Z,N,this.U,k)}};var lw=class{constructor(Z){this.V=this.U=0;this.alpha=Math.exp(Math.log(.5)/Z)}wr(Z,k){const N=this.alpha**Z;this.V=k*(1-N)+N*this.V;this.U+=Z}c9(){return this.V/(1-this.alpha**this.U)}};var qrh=class{constructor(Z,k,N,a,T,K=[]){this.loader=Z;this.zt=k;this.policy=N;this.cD=a;this.G=T;this.vD=K;this.logger=new g.bI("dash/abr");this.V=io;this.D=this.j=null;this.N=-1;this.Sm=!1;this.nextVideo=this.U=null;this.Y=[];this.tq=new Set;this.FS={};this.Qz=new lw(1);this.C=0;this.MX=this.O=this.Vz=!1;this.xW=0;this.Kp=!1;this.dA=new Set;this.Rq=!1;this.nF={hf:()=>{Yc(this)}};
this.L=new Qyi(this.policy,T,(y,Q)=>{this.loader.U6(y,Q)})}lY(Z){if(this.policy.UB){var k=new Set(Z);
k.size===this.dA.size&&[...k].every(N=>this.dA.has(N))||(this.loader.U6("lwnmow",{itagDenylist:[...Z].join()}),this.loader.GK(!!k.size),this.N=-1,this.dA=k,kR(this,this.V),this.Rq=!0)}}Qr(Z,k=!1,N={}){const a=this.policy.Eq;
this.L.Qr(Z,k,N);a!==this.policy.Eq&&(kR(this,this.V),aN(this),a>this.policy.Eq&&this.D?.info.V()&&!this.nextVideo?.info.V()&&(this.Vz=!0))}};var ft={g3:-1,G5:!1,Km:0},ryn=class extends g.jR{constructor(Z){super();this.dD=Z;this.V=null;this.U=ft;this.dD("ismp_i")}D(Z=!0){Z&&d0f(this);this.V=null}YW(){this.U=ft;this.D();super.YW()}};var CfD=class{constructor(Z){this.track=Z;this.buffered=[];this.D=this.Y=0;this.G={};this.L=0;this.V=new Lx}PF(Z){this.timestampOffset=Z;this.flush()}N(Z,k){this.flush();this.U=k;QJ(this,3,Z)}C(Z,k,N,a){!this.U||Cyy(this.U,Z)&&this.U.Cp===Z.Cp||this.flush();this.Y+=N;this.D+=a;N=1;!this.U&&Z.V&&(N=2);QJ(this,N,k);k=Math.ceil(Z.V/1024);N===2&&this.V.add(k);this.V.add(Math.ceil((Z.V+Z.U)/1024)-k);this.U=Z}Vz(){QJ(this,0)}j(){QJ(this,4);this.flush()}flush(){if(this.V.V()){var Z={a:this.track.H9(),u:this.V.W9(),
pd:Math.round(this.Y),ad:Math.round(this.D)},k=this.U;if(k){const N=k.l3.info;Z.itag=N.itag;N.U&&(Z.xtags=N.U);Z.sq=k.Cp;Z.st=k.startTime;Z.sd=k.duration;this.track.policy.Qw&&(Z.si=k.E3());k.D&&(Z.esl=k.V+k.U);k.G()&&(Z.eos=1)}isNaN(this.timestampOffset)||(Z.to=this.timestampOffset);if(k=this.track.w5?.Vn({})){for(const N in k)this.G[N]!==k[N]&&(Z["sb_"+N]=k[N]);this.G=k}this.track.U6("sbu",Z);this.V.reset();this.buffered=[];this.L=this.D=this.Y=0;this.timestampOffset=this.U=void 0}}};var mRH=class{constructor(Z,k,N){this.policy=Z;this.V=k;this.xW=N;this.Y=this.U=0;this.h1=null;this.Vz=new Set;this.N=[];this.indexRange=this.initRange=null;this.C=new x2;this.O=this.zt=!1;this.nF={r1A:()=>this.D,
OCR:()=>this.chunkSize,
wGa:()=>this.j,
Ilz:()=>this.G};
(k=L0y(this))?(this.chunkSize=k.csz,this.D=Math.floor(k.clen/k.csz),this.j=k.ck,this.G=k.civ):(this.chunkSize=Z.Vq,this.D=0,this.j=g.av(16),this.G=g.av(16));this.L=new Uint8Array(this.chunkSize);this.j&&this.G&&(this.crypto=new EWy(this.j,this.G))}dispose(){this.O=!0}jm(){return this.O}},Ca=class extends Error{constructor(Z){super(Z)}};var EGy=class{constructor(Z,k,N,a,T,K){this.ids=Z;this.V=k;this.U=N;this.Y=a;this.D=T;this.Tr=K}};var VJ=class{constructor(Z,k,N){this.initData=Z;this.contentType=k;this.isPrefetch=N;this.V=this.cryptoPeriodIndex=NaN;this.D=[];this.oa=!1;this.U=null;if(k?.toLowerCase()==="webm"||Z.length===16)this.oa=!0}};var oH=class{constructor(Z,k,{bS:N=!1,videoDuration:a=0,nz:T,H7:K=!1}={}){this.videoId=Z;this.status=k;this.bS=N;this.videoDuration=a;this.nz=T;this.H7=K}},syH=class{constructor(Z,k,N,a,T){this.videoId=Z;this.EK=k;this.U=N;this.bytesDownloaded=a;this.V=T}};var idi=class{constructor(Z){this.U=Z;this.offset=0}skip(Z){this.offset+=Z}V(){return this.offset}};var AyB=class{constructor(Z,k,N){this.loader=Z;this.policy=k;this.l3=N;this.logger=new g.bI("dash");this.U=[];this.V=null;this.O=-1;this.C=0;this.xW=NaN;this.N=0;this.D=NaN;this.j=this.FS=0;this.tq=-1;this.dA=this.Y=this.L=this.zt=null;this.MX=this.Rq=NaN;this.G=this.Vz=this.Sm=this.Kp=null;this.Qz=!1;this.vD=this.timestampOffset=0;this.nF={m9:()=>this.U};
if(this.policy.Y){const a=this.l3,T=this.policy.Y;this.policy.Qz&&Z.U6("atv",{ap:this.policy.Qz});this.G=new mRH(this.policy,a,(K,y,Q)=>{Z.fp.eZ(new oH(this.policy.Y,2,{nz:new syH(T,K,a.info,y,Q)}))});
this.G.C.promise.then(K=>{this.G=null;K===1?Z.fp.eZ(new oH(this.policy.Y,K)):this.loader.U6("offlineerr",{status:K.toString()})},K=>{const y=(K.message||"none").replace(/[+]/g,"-").replace(/[^a-zA-Z0-9;.!_-]/g,"_");
K instanceof Ca?(this.loader.U6("offlinenwerr",{em:y}),Hb(this),Z.fp.eZ(new oH(this.policy.Y,4))):(this.loader.U6("dldbwerr",{em:y}),Hb(this),Z.fp.eZ(new oH(this.policy.Y,4,{H7:!0})))})}}m9(){return this.U}Ql(){return this.U.length?this.U[this.U.length-1]:null}NA(){this.U=[];
XL(this);Hb(this)}Z2(Z){this.Sm=this.U.shift().info;Z.info.equals(this.Sm)}ew(){return g.ni(this.U,Z=>Z.info)}H9(){return!!this.l3.info.audio}isDrm(){return!!this.l3.info.contentProtection}getDuration(){return this.l3.index.CA()}};var s2=class extends j5R{constructor(Z,k,N,a,T){super(N,T);this.policy=Z;this.formatId=k;this.Tc=a;this.lastError=null;this.onProgress=()=>{this.jm()||(this.Tc.Vb(this.formatId)?(this.isComplete()||this.V.start(),JA(this.Tc,this.formatId)&&this.fl(2),this.Tc.K3(this.formatId)&&(wUU(this.Tc,this.formatId)?this.Qn(4):(this.lastError="net.closed",this.Qn(5)))):(this.lastError="player.exception",this.Qn(5)))};
this.V=new g.Uc(()=>{this.isComplete()||(this.lastError="net.timeout",this.Qn(5))},1E3);
this.V.start();v8y(this.Tc,this.formatId,this.onProgress);g.Sq(this.onProgress)}onStateChange(){this.jm()&&(e9(this.Tc,this.formatId),this.V.dispose())}Yi(){return{expected:g8N(this.Tc,this.formatId),received:this.Tc.yn.get(this.formatId)?.bytesReceived||0,bytesShifted:this.Tc.yn.get(this.formatId)?.ZC||0,sliceLength:oG(this.Tc,this.formatId),isAnyMediaEndReceived:this.Tc.Lx(this.formatId)}}CM(){return 0}EL(){return!0}bA(){return this.Tc.bA(this.formatId)}im(){return[]}Ef(){return this.Tc.Ef(this.formatId)}zQ(){return this.lastError}Mo(){return 0}};var Pfa=class extends g.jR{constructor(Z,k,N,a){super();this.loader=Z;this.policy=k;this.l3=N;this.timing=a;this.logger=new g.bI("dash");this.U=[];this.zt=[];this.V=this.w5=null;this.Sm=!1;this.FS=this.vD=0;this.L=-1;this.O=!1;this.xW=-1;this.dA=null;this.Vz=NaN;this.N=[];this.nF={X$:()=>this.D,
M9t:()=>this.U,
TVS:()=>this.j};
this.D=new AyB(Z,k,N);this.policy.V&&(this.j=new R0R(this.D,this.loader.getManifest(),this.policy,T=>{this.policy.wN&&this.U6("buftl",T)}));
this.policy.xl&&(this.C=new CfD(this));this.UH=N.info.UH;this.G=this.policy.zt?!1:N.xW();this.isManifestless=N.xW();this.Y=this.G;g.u(this,this.dA)}H9(){return!!this.l3.info.audio}Ql(){return this.D.Ql()}Z2(Z){this.D.Z2(Z);this.j?.xW(Z);this.UH=Math.max(this.UH,Z.info.l3.info.UH||0)}getDuration(){return this.l3.index.CA()}NA(){Pn(this);this.D.NA()}X$(){return this.D}IM(Z){return this.w5?b1(this.w5.Us(),Z):!0}isRequestPending(Z){return this.U.length?Z===this.U[this.U.length-1].info.Vi[0].Cp:!1}PF(Z){this.j?.PF(Z);
this.C?.PF(Z)}U6(Z,k){this.loader.U6(Z,k)}lA(){return this.loader.lA()}dispose(){this.C?.flush();super.dispose()}};var P_y=class{constructor(){this.qK=!1}};g.tYy=class{constructor(Z){this.Jq=Z;this.j=new P_y;this.Li=this.dH=!1;this.gN=2;this.Sm=20971520;this.hq=8388608;this.dA=120;this.A6=this.J0=this.us=2;this.LC=this.qf=!1;this.Wj=1E3;this.qX=15;this.KN=1;this.C=1.15;this.O=1.05;this.hB=1;this.J$=this.mq=!1;this.SK=6;this.D=!1;this.Ed=100;this.YH=10;this.wi=6;this.Vg=!1;this.WN=1;this.bN=this.gQ=!1;this.Ta=2;this.IV=this.Mb=this.A1=!1;this.Tt=!0;this.FN=this.Pl=this.u7=this.Ap=!1;this.gF=!0;this.nh=!1;this.Y="";this.gV=[];this.TU=this.xl=!1;this.Eq=
0;this.oE="";this.dZ=this.Fh=this.wN=this.XW=this.j9=this.l9=this.G=this.Ay=this.Jd=this.V=this.Qz=this.FS=this.NT=this.US=this.N=this.hI=this.Lu=!1;this.e8=!0;this.wz=this.Sb=this.Oq=this.ef=this.Yw=this.U=this.Kp=!1;this.MX=!0;this.o8=this.bL=this.tW=this.jY=this.fS=this.ag=this.YF=this.Ri=this.xd=this.ov=this.Hx=this.zt=this.fN=this.s6=this.Vz=!1;this.nD=0;this.ix=this.L=this.xF=this.Ke=this.dG=this.En=!1;this.latencyClass="UNKNOWN";this.Xh=!1;this.OU=0;this.By=this.Ox=!1;this.U4=g.Q5(this.Jq.experiments,
"html5_min_readbehind_secs");this.XY=g.Q5(this.Jq.experiments,"html5_min_readbehind_cap_secs");this.g0=this.Jq.B("html5_offline_reset_media_stream_on_unresumable_slices");this.UH=NaN;this.nm=Uj(this,"html5_request_size_min_kb",64)*1024;this.Rq=2097152;this.Nb=Uj(this,"html5_bypass_contention_secs");this.fh=1048576;this.gD=Uj(this,"html5_repredict_interval_ms",1800);this.KR=Uj(this,"html5_head_miss_secs",5);this.mj=Uj(this,"html5_min_upgrade_health_secs",10);this.sz=Uj(this,"html5_min_seconds_between_format_selections",
8);this.r4=Uj(this,"html5_max_buffer_health_for_downgrade_secs",15);this.VP=s1;this.FE=g.Q5(this.Jq.experiments,"html5_min_startup_buffered_media_duration_secs");this.ai=g.Q5(this.Jq.experiments,"html5_post_interrupt_readahead");this.yH=this.Jq.B("html5_disable_classic_alr");this.Wy=g.Q5(this.Jq.experiments,"html5_probe_primary_delay_base_ms")||5E3;this.ST=Uj(this,"html5_ssdai_failure_retry_limit",3);this.eP=this.Jq.experiments.yz("html5_clone_original_for_fallback_location");this.hp=g.Q5(this.Jq.experiments,
"html5_subsegment_readahead_target_buffer_health_secs");this.zC=g.Q5(this.Jq.experiments,"html5_subsegment_readahead_timeout_secs");this.v2=g.Q5(this.Jq.experiments,"html5_subsegment_readahead_min_buffer_health_secs");this.pH=g.Q5(this.Jq.experiments,"html5_subsegment_readahead_min_buffer_health_secs_on_timeout");this.R0=g.Q5(this.Jq.experiments,"html5_subsegment_readahead_min_load_speed");this.vy=g.Q5(this.Jq.experiments,"html5_subsegment_readahead_load_speed_check_interval");this.e_=this.Jq.Yl().V.Aq(hvX);
this.y$=g.Q5(this.Jq.experiments,"html5_subsegment_readahead_seek_latency_fudge");this.lk=Uj(this,"html5_hopeless_secs",15);this.ND=this.Jq.B("html5_restrict_streaming_xhr_on_sqless_requests");this.ue=g.Q5(this.Jq.experiments,"html5_max_headm_for_streaming_xhr");this.RX=this.Jq.B("html5_pipeline_manifestless_allow_nonstreaming");this.aX=this.Jq.B("html5_prefer_server_bwe3");this.qg=this.Jq.B("html5_last_slice_transition");this.n2=this.Jq.B("html5_store_xhr_headers_readable");this.Nn=g.Q5(this.Jq.experiments,
"html5_max_drift_per_track_secs");this.oR=this.Jq.B("html5_no_placeholder_rollbacks");this.OI=this.Jq.B("html5_subsegment_readahead_enable_mffa");this.O6=this.Jq.B("html5_allow_video_keyframe_without_audio");this.IV=g.Qw(this.Jq)&&!g.ce()&&this.Jq.B("html5_adjust_media_time_for_non_cobalt_tv");this.BL=this.Jq.B("html5_enable_vp9_fairplay");this.Vq=1048576;this.zW=this.Jq.B("html5_woffle_resume");this.d9=this.Jq.B("html5_abs_buffer_health");this.UX=this.Jq.B("html5_interruption_resets_seeked_time");
this.O1=g.Q5(this.Jq.experiments,"html5_max_live_dvr_window_plus_margin_secs")||46800;this.LU=this.Jq.B("html5_report_captions_ctmp_qoe");this.XM=this.Jq.B("html5_explicitly_dispose_xhr");this.Ak=!this.Jq.B("html5_encourage_array_coalescing");this.Jq.B("html5_limit_media_merge_size")?s1?mp()<21?this.NW=786432:this.NW=8388608:this.NW=262144:this.NW=0;this.PO=this.Jq.B("html5_filter_non_efficient_formats_for_safari");this.Jq.B("html5_format_hybridization");this.wu=this.Jq.B("html5_abort_before_separate_init");
this.L4=LE();this.He=this.Jq.B("html5_serialize_server_stitched_ad_request");this.lf=this.Jq.B("html5_attach_po_token_to_bandaid");this.VC=g.Q5(this.Jq.experiments,"html5_max_redirect_response_length")||8192;this.eL=this.Jq.B("html5_rewrite_timestamps_for_webm");this.r5=this.Jq.B("html5_only_media_duration_for_discontinuities");this.AF=g.Q5(this.Jq.experiments,"html5_resource_bad_status_delay_scaling")||1;this.Jq.B("html5_onesie_live");this.vL=g.Q5(this.Jq.experiments,"html5_onesie_live_ttl_secs")||
8;this.xw=g.Q5(this.Jq.experiments,"html5_attach_num_random_bytes_to_bandaid");this.LB=this.Jq.B("html5_update_container_type_on_codec_family_change");this.pF=this.Jq.B("html5_enable_sabr_host_fallback");this.rB=this.Jq.supportsGaplessShorts();this.e5=this.Jq.B("html5_shorts_stop_request_when_buffer_to_end");this.hx=this.Jq.B("html5_vod_stop_request_when_buffer_to_end");this.vD=this.Jq.B("html5_ssdai_use_post_for_media")&&this.Jq.B("gab_return_sabr_ssdai_config");this.R$=this.Jq.B("html5_use_post_for_media");
this.bq=this.Jq.B("html5_use_live_ump_heartbeat");this.useUmp=this.Jq.B("html5_use_ump");this.Ii=this.Jq.hI;this.WL=this.Jq.B("html5_reset_primary_stats_on_redirector_failure");this.D4=this.Jq.B("html5_use_network_error_code_enums");this.enableServerDrivenRequestCancellation=this.Jq.B("html5_enable_server_driven_request_cancellation");this.PM=this.Jq.B("html5_enable_sabr_request_timing");this.UB=this.Jq.B("html5_enable_lawnmower");this.GF=this.Jq.Xa()?g.Q5(this.Jq.experiments,"html5_continuous_goodput_probe_interval_ms"):
0;this.qs=g.Q5(this.Jq.experiments,"html5_jumbo_ull_nonstreaming_mffa_ms")||NaN;this.y9=g.Q5(this.Jq.experiments,"html5_drm_byterate_soft_cap");this.gZ=g.Q5(this.Jq.experiments,"html5_drm_live_byterate_soft_cap");this.rD=this.Jq.B("html5_sabr_log_request_creation");this.PG=this.Jq.B("html5_use_buffer_timeline_for_sabr_request_creation");this.J8=this.Jq.Yl().V.Aq(omU);this.iq=this.Jq.B("html5_sabr_report_request_cancellation_info");this.Jy=this.Jq.B("html5_spoof_4k");this.zN=Uj(this,"html5_min_media_duration_for_cabr_slice");
this.aA=Uj(this,"html5_sabr_min_media_bytes_factor_to_append_for_stream")||.01;this.hk=this.Jq.B("html5_consume_all_buffered_bytes_one_poll");this.Oe=this.Jq.B("html5_disable_urgent_adaptation");this.Wx=this.Jq.B("html5_apply_constraints_in_client_for_sabr");this.Ee=this.Jq.B("html5_send_video_playback_ustreamer_config");this.AA=Uj(this,"html5_max_discontinuity_rewrite_count");this.It=Uj(this,"html5_fixed_media_duration_for_request");this.LA=this.Jq.B("html5_apply_fix_for_missing_seg_info_without_logger");
this.Pl=this.Jq.B("html5_enable_audio_quality_setting");this.Jq.B("html5_enable_audio_quality_setting_feature");this.Yh=Uj(this,"html5_sabr_request_limit_per_period");this.yI=this.Jq.B("html5_sabr_dispose_media_objects");this.LX=this.Jq.B("html5_fix_hbr_reselection_qoe_restart_for_sabr");this.Jq.B("html5_high_res_seek_logging");this.sN=this.Jq.B("html5_disable_chunk_synchronization_sabr_seek");this.DC=g.Q5(this.Jq.experiments,"html5_override_micro_discontinuities_threshold_ms");this.wh=this.Jq.B("html5_byterate_constraints");
this.Re=this.Jq.B("enable_sabr_snackbar_message");this.Jq.B("html5_reinit_source_buffer_by_new_element");this.Qw=this.Jq.B("html5_log_slice_info_in_sbu");this.HA=Uj(this,"html5_paced_poll_ms");this.HL=Uj(this,"html5_paced_poll_min_health_ms");this.qb=this.Jq.B("html5_disable_sabr_fallback");this.Hy=this.Jq.B("html5_track_current_buffered_range_at_sync");this.BY=g.Qw(this.Jq)?500:2E3;this.qY=this.Jq.B("html5_sabr_live_timing");this.TR=this.Jq.B("html5_count_updating_slice_for_buffer_health");this.wp=
this.Jq.B("html5_report_max_buffer_bytes_limit_to_sabr");this.vx=this.Jq.B("html5_sabr_live_audio_early_return_fix");this.PL=g.Q5(this.Jq.experiments,"html5_platform_max_buffer_health_oversend_duration_secs");this.nj=this.Jq.B("html5_cuepoint_identifier_logging");this.MV=this.Jq.B("html5_sabr_log_server_xtag_selection_onesie_mismatch");this.oY=this.Jq.B("html5_skip_client_drm_license_constraint");this.Lu=this.Jq.B("html5_pseudogapless_shorts_skip_abort_on_transition");this.YF=this.Jq.B("html5_sabr_request_on_constraint");
this.di=this.Jq.B("html5_live_metadata_resets_timeout");this.xF=this.Jq.B("html5_sabr_log_invalid_sabr_current_time");this.x9=this.Jq.B("html5_ssdai_new_decoration_logic");this.Ic=this.Jq.B("html5_cuepoint_list_clear_on_seek");this.pE=this.Jq.Yl().V.Aq(Ju);this.xW=this.Jq.Yl().V.Aq(YyR);this.hG=this.Jq.B("html5_ssdai_clear_backoff_on_cuepoint_list_resolved");this.Vp=this.Jq.Yl().V.Aq(LNy);this.OU=g.Q5(this.Jq.experiments,"html5_sabr_unused_bloat_size_bytes");this.Ys=this.Jq.Yl().V.Aq(UEr);this.g4=
this.Jq.B("html5_mta_initial_audio_prefer_drc");this.KW=this.Jq.Yl().V.Aq(wHy);this.mX=this.Jq.Yl().V.Aq($Ei);this.Bv=this.Jq.B("html5_enable_sabr_network_timestamps_bwe");this.IX=this.Jq.B("html5_reinitialize_source_buffer_on_incompatible_codec_for_ssff")}tq(){return this.V&&this.l9}};var hur=class{constructor({bN:Z,qK:k,L3:N,hW:a,yR:T}={}){this.bN=Z;this.qK=k;this.L3=N;this.hW=a;this.yR=T}};var Hih=class extends g.jR{constructor(Z,k,N){super();this.loader=Z;this.policy=k;this.SY=N;this.D=0;this.U=!1;this.delay=new g.Uc(this.Y,this.policy.GF,this);g.u(this,this.delay)}V(Z){cq(11,5768,Z.V)||(this.EH=Z,this.D=0,this.delay.XN())}Y(){this.D++>15||(this.U=!this.U,new cyB(this.loader,this.policy,this.SY,this.EH,this.U),this.delay.start())}},cyB=class{constructor(Z,k,N,a,T){this.loader=Z;this.policy=k;this.SY=N;this.EH=a;this.yg=T;this.done=!1;this.onTimeout=()=>{this.done||(this.done=!0,this.onError("net.timeout"))};
this.size=Math.ceil(Math.min(1E5,.1*yK(this.SY)));this.timing=new tK(this,{SY:this.SY,AT:this.size,fZ:!0,QQ:()=>{},
zJ:this.policy.D});Z=LG(this.EH,this.yg,this.policy).W0.clone();Zj(55,4207,Z);Z["path"]!=="/videogoodput"&&(Z["path"]="/videogoodput",Z["url"]="");this.location=new Xm(Z);this.location.set("rn",`${this.timing.requestNumber}`);this.location.set("range",`0-${this.size-1}`);this.xhr=fn(this.location,this.policy.j,this.timing,this.policy.VP,{});setTimeout(this.onTimeout,1E4)}Bl(){}D2(){}S$(){if(!this.done)if(this.done=!0,this.xhr.status===200&&this.xhr.Uf()===this.size)this.loader.U6("rqs",this.getInfo());
else{var Z="net.connect";this.xhr.status>200?Z="net.badstatus":this.xhr.XJ()&&(Z="net.closed");this.onError(Z)}}onError(Z){this.loader.handleError(Z,this.getInfo());Kn(`https://www.gstatic.com/ytlr/img/sign_in_avatar_default.png?rn=${this.timing.requestNumber}`,"gp",k=>{this.loader.U6("pathprobe",k)},k=>{this.loader.handleError(k.errorCode,k.details)})}getInfo(){const Z=this.timing.N();
Z.shost=bY(6,6424,this.location.W0);Z.pb=this.size;return Z}};var dRH=class extends g.jR{constructor(Z,k,N,a,T,K,y,Q,q,r,C,m,A=null){super();this.loader=Z;this.policy=k;this.videoTrack=N;this.audioTrack=a;this.D=T;this.V=K;this.timing=y;this.Y=Q;this.schedule=q;this.cD=r;this.U=C;this.N=m;this.aU=A;this.Vz=!1;this.V3="";this.PZ=null;this.oJ=NaN;this.O=!1;this.uq=null;this.hQ=this.C=NaN;this.g9=this.L=0;this.logger=new g.bI("dash");this.nF={m3:(P,d)=>this.m3(P,d)};
this.policy.xw>0&&(this.V3=g.av(this.policy.xw));this.policy.GF&&(this.j=new Hih(this.loader,this.policy,this.schedule),g.u(this,this.j))}G(Z,k){if(Z.G){this.cD.isLive?(Z=this.cD.Y8&&this.cD.U?Z.l3.L(this.cD.Y8,!1):Z.l3.G(Infinity),Z.oJ=this.oJ):Z=Z.l3.L(0,!1);if(this.N){var N=this.N;Z.oJ===0&&(Z.L=N.C)}else Z.L=this.C;return Z}var a=Z.V;if(!a.l3.V())return a.l3.D()?(N=rk(this.Y,Z.l3.info.UH,k.l3.info.UH,0),N=a.l3.O(a,N)):N=a.l3.vD(a),N;var T=this.loader.getCurrentTime();T=isFinite(T)||!this.policy.Ox?
a.L-T:0;var K=!a.range||a.U===0&&a.V===0?0:a.range.length-(a.V+a.U),y=a.l3;this.m3(Z,T)&&K===0&&(this.cD.isManifestless?y=Z.l3:(y=a.startTime+ck,a.U&&(y+=a.duration),dk(Z,y),a=Z.V,y=a.l3));y.D()?(K=this.U,k=rk(this.Y,y.info.UH,k.l3.info.UH,T,K.Y.length>0&&K.C===0&&this.loader.A0),T=oN(Z),Z=a.l3.O(a,k),(k=Z.D)&&Z.Vi.length>1&&(T||Z.EH.U||Z.Vi[0].l3!==a.l3?Z=a.l3.O(a,Z.Vi[0].U):(T=Z.Vi[Z.Vi.length-1],y=T.U/k,!T.D&&y<.4&&(Z=a.l3.O(a,k-T.U))))):(a.Cp<0&&(k=iI(a),k.pr=`${Z.U.length}`,this.loader.isSeeking()&&
(k.sk="1"),k.snss=a.j,this.loader.U6("nosq",k)),Z=y.vD(a));if(this.policy.FS)for(N of Z.Vi)N.type=6;return Z}m3(Z,k){if(!oN(Z)||!Z.l3.V())return!1;var N;(N=this.U.Rq)||(N=oN(Z)&&Z.l3.V()&&Z.V.l3.info.UH<Z.l3.info.UH);return N||k<=this.policy.r4||this.U.Vz}YW(){super.YW()}},ck=2/24;var Xyi=class extends g.jR{constructor(Z,k,N,a,T,K,y,Q){super();this.loader=Z;this.BG=k;this.videoTrack=N;this.audioTrack=a;this.cD=T;this.Vz=K;this.isAudioOnly=y;this.C=Q;this.U=io;this.xW=!1;this.logger=new g.bI("sabr");this.N=this.j=this.zt=this.O=!1;this.videoInfos=this.G=this.Vz.videoInfos;this.D=this.dA=this.Vz.U;this.V=new Qyi(k,K,(q,r)=>{this.loader.U6(q,r)});
this.isAudioOnly&&lXX(this,this.cD.V["0"])}Lz(Z,k,N,a){this.loader.Lz(new ym(Z,this.U?.reason==="m"?"m":this.U?.reason==="s"?"s":this.U&&OwX(this,this.U)?this.U.reason:"a",N,a));na(this.loader,k,Z,!0)}hf(Z,k){for(const N of this.dA)if(N.id===Z)return this.L=this.cD.V[Z],this.BG.tq()&&(this.O=!0),Z=new ym(this.L,k?"t":"m"),k&&(this.j=!0),Z;this.D=[];return null}Qr(Z,k=!1,N={}){this.V.Qr(Z,k,N)}iC(){return this.V.iC()}};var BgX=class{constructor(Z,k,N){this.requestType=Z;this.EH=k;this.u3=N;this.U=null;this.nF={Km:()=>this.data?.Km,
w2:()=>this.data?.w2,
HV:()=>this.data?.HV}}setData(Z,k,N={}){k?.pF&&(this.Ct=GKi(this,k,N),Z.Mw=this.EH.Mw());
if(this.Wv())return!0;this.data=Z;this.V=$By(Z,(a,T)=>{this.u3?.BA(a,T)},k?.D,k?.L);
if(!this.V)return!1;this.U=g.SV(this.V,ywG);return!0}Wv(){return this.requestType===1}c_(){return this.u3?.c_()||0}isDecorated(){return!(!this.data?.Ib&&!this.data?.uv?.length)}};var LGD=class{constructor(Z){this.V=Z;this.iv=(0,g.di)(N$(16))}encrypt(Z){(0,g.z)();return this.V.V?Q1(this,Z,this.iv):(new y1(this.V.U)).encrypt(Z,this.iv)}decrypt(Z,k){(0,g.z)();return this.V.V?Q1(this,Z,k):(new y1(this.V.U)).decrypt(Z,k)}};var FGT=class extends g.jR{constructor(Z){super();this.kW=Z;this.V=new Map;this.D=[];this.U=!yq();this.N=g.Q5(this.kW.experiments,"html5_onesie_prewarm_interval_ms");this.C=new g.Uc(this.j,this.N,this);this.G=-1;this.nF={FqR:()=>this.V,
ReS:()=>this.L,
Gcq:()=>VNB};
g.u(this,this.C);Rui(this,g.kh("yt-player-bandaid-host"));this.L=this.load();this.N&&this.L.then(()=>{this.j()})}Vz(Z){if(!((0,g.z)()<this.G+3E5||cq(3,5760,Z))){var k=bY(54,6440,Z);
if(k&&IXj(k)&&this.U===C8(k)){var N;cq(17,1229,Z)&&(N=bY(70,6488,d5(Z)));g.Z_("yt-player-bandaid-host",{primary:k,secondary:N},864E3);this.G=(0,g.z)();Rui(this,{primary:k,secondary:N})}}}async load(){const Z=this.V.get(0);try{var k;if(!(k=!Z||this.U)){var N=Z.V();k=this.U!==C8(N)}if(k){const a=await mM(this,this.U?2:0);a&&(qX(this,0,a),cq(16,1228,a)&&qX(this,1,d5(a)))}}catch(a){if(g.L9(a),this.U){this.U=!1;await this.load();return}}if(this.kW.experiments.yz("html5_onesie_probe_ec_hosts"))try{qX(this,
3,await mM(this,1)),qX(this,4,await mM(this,2))}catch(a){g.L9(a)}}async j(){this.C.XN();var Z=g.Q5(this.kW.experiments,"html5_onesie_prewarm_max_lact_ms");Qb()>=Z||(Z=this.V.get(0))&&jhU(this,Z)}Y(){const Z=this.D;this.D=[];return Z}},VNB={pDz:0,nWW:1,cq3:2,eRD:3,CV:4,0:"PRIMARY",1:"SECONDARY",2:"RANDOM",3:"SENSITIVE_CONTENT",4:"C_YOUTUBE"},M$y=class{constructor(Z,k){this.location=Z;this.U=k}V(){return bY(6,6424,this.location)}};var tNH=class{constructor(Z){this.Fq=Z;this.U=!1;this.V=[]}async decrypt(Z){if(!this.V.length||this.V[0].isEncrypted){this.U=!0;this.Fq.dD("omd_s");var k=new Uint8Array(16),N,a;for(yq()?N=new qZ(Z):a=new y1(Z);this.V.length&&this.V[0].isEncrypted;){var T=this.V.shift(),K=N?await N.decrypt(A8(T.buffer),k):a.decrypt(A8(T.buffer),k);for(Z=0;Z<k.length;Z++)if(k[Z]===255)k[Z]=0;else{k[Z]+=1;break}Z=this.Fq;var y=T.videoId,Q=T.gR;T=T.formatId;K=new h8([K]);Z.u3.Ob?.get(y)?.V(Q,T,K)}this.Fq.dD("omd_c");
Ad(this);this.U=!1;this.Fq.Wn()}}enqueue(Z,k,N,a,T){this.V.push({videoId:Z,gR:k,formatId:N,buffer:a,isEncrypted:T});this.U||Ad(this)}};var k8R,HD,dB,Eiy,L8,V1,F2,td;k8R=!!Uint8Array.prototype.copyWithin;
g.qRX=class{constructor(Z){this.data=Z;this.V=0;this.Y=!1;this.D=0;this.error=!1;this.register=this.U=0;if(HD.length===0){HD.length=288;HD.fill(8);for(Z=144;Z<280;Z++)HD[Z]=Z<=255?9:7;dB.length=32;dB.fill(5);V1.length=286;V1.fill(0);for(Z=261;Z<285;Z++)V1[Z]=Math.floor((Z-261)/4);L8[257]=3;for(Z=258;Z<285;Z++){var k=L8[Z-1];k+=1<<V1[Z-1];L8[Z]=k}L8[285]=258;for(Z=0;Z<30;Z++)td[Z]=Z<=3?0:Math.floor((Z-2)/2);F2[0]=1;for(Z=1;Z<30;Z++)k=F2[Z-1],k+=1<<td[Z-1],F2[Z]=k}Z=100+7*this.data.length;this.data[0]===
31&&this.data[1]===139&&(Z=(new DataView(this.data.buffer,this.data.byteOffset+this.data.length-4)).getUint32(0,!0),this.data=this.data.subarray(10,this.data.length-8));this.output=new Uint8Array(Z)}};HD=[];dB=[];Eiy=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];L8=[];V1=[];F2=[];td=[];var abG=class{constructor(Z,k,N){this.V=Z;this.context="oprgz2";this.U6=k;this.U=N}BA(Z,k,N){this.U6("dcmprs",{i:this.V,x:this.context,m:Z,e:N?.toString(),t:k})}QV(Z,k){hn(Z,`${"dcmprs"}_${this.context}_${this.V}_${k}`);g.L9(Z)}};var uP="DecompressionStream"in window;var hUF=class extends YAj{constructor(Z){super("onesie",Z);this.u3=Z;this.V={};this.Y=!0;this.D=null;this.queue=new tNH(this);this.C={}}Wn(){this.u3.Wn()}L(Z,k){switch(Z){case 10:var N=lt(k,tKU);Z=N.M3;let T=!1;switch(Z){case 0:this.Y=!N.lW.sI;this.iv=N.lW.iv;break;case 2:break;case 23:var a=this.u3;N=N.JO;a.dD("omp_r");N.videoId&&(a.Rk=N.videoId);a.Rk!==a.videoData.videoId&&(a.videoData.ue=a.Rk,a.U6("ompp",`vid.${a.Rk}`));a.JN=!0;break;case 24:a=this.u3;a.dD("omp_c");a.JN=!1;a.L7=!1;N=a.Ob?.get(a.Rk);
a.notifySubscribers(a.Rk);N?.N();f8(a);break;default:T=!0}this.u3.FL&&this.u3.U6("ombup",`id.${10};pt.${Z};len.${k.totalLength}${T?";ignored.1":""}`);this.D=Z;break;case 11:rQN(this,k);break;case 12:this.G(k,!0);break;case 37:k=lt(k,hQf);(k.Y_||k.ol)&&k.videoId&&this.u3.Ro.set(k.videoId,k);break;case 60:this.mJ(k);break;case 47:this.B("html5_server_playback_start_policy")&&(k=lt(k,BQr),this.u3.playbackStartPolicy=k);break;case 35:this.Zp(k);break;case 45:this.Mm(k);break;case 66:this.ot(k);break;
default:this.u3.FL&&this.u3.U6("ombup",`id.${Z};len.${k.totalLength};ignored.1`)}}mJ(Z){Z=lt(Z,h_);this.u3.mJ(Z)}Mm(Z){Z=lt(Z,u1);this.u3.Mm(Z)}j(Z){const k=Z.gR,N=Z.p5,a=Z.Qd,T=Z.Tk,K=Z.Ne,y=Z.startMs,Q=Z.durationMs,q=Z.timeRange,r=Z.Bj,C=Z.eV,m=Fm(Z),A=DHi.has(CD[`${Z.itag}`]);N&&this.dD(A?"oais_r":"ovis_r");const P=this.V[m]!==void 0;this.u3.FL&&this.u3.U6("ombup",`id.${20};hid.${k};fid.${m}`);const d=Z.videoId||"";this.U[k]=m;this.C[k]=d;P||(this.V[m]={videoId:d,OG:!1,H9:A,headers:[]});this.V[m].headers.push(Z);
this.u3.iA(d,m,A,{gR:k,p5:!!N,Qd:a??-1,Ne:K??-1,startMs:y??-1,durationMs:Q??-1,Bj:r??0,Tk:T,timeRange:q,eV:C})}G(Z,k){const N=cY(Z,0);this.u3.FL&&this.u3.U6("ombup",`id.${k?12:21};len.${Z.totalLength};hid.${N}`);if(Z.totalLength!==1){({ma:Z}=Z.split(1));var a=this.U[N]||null,T=this.C[N]||"";a&&(this.TF(this.V[a].H9?"oafs_r":"ovfs_r"),this.queue.enqueue(T,N,a,Z,k))}}j7(Z){const k=cY(Z,0);this.u3.FL&&this.u3.U6("ombup",`id.${22};len.${Z.totalLength};hid.${k}`);Z=this.U[k]||null;const N=this.C[k]||"";
if(Z)if(this.B("html5_use_ump_request_slicer")){var a=this.queue;a.V.push({videoId:N,gR:k,formatId:Z,isEncrypted:!1,Xy:!0});a.U||Ad(a)}else this.u3.j7(N,k,Z)}async e4(Z,k){this.u3.e4();Z=A8(Z);k=k?await FaU(this.u3,Z,this.iv):Z;this.u3.enableCompression&&(k=this.u3.X().Yl().V.Aq(zvb)?await r6r(Cq0(this,k)):await mrf(this,k));try{var N=lt(k,ZPf)}catch(a){return N=a instanceof Error?{name:a.name,message:a.message}:{},N.webcrypto=`${+!!yq()}`,N.enc=`${+this.Y}`,Promise.reject(new g.yA("onesie.response.parse",
N))}k=N;if(k.kB!==1)throw new g.yA("onesie.response.badproxystatus",{st:k.kB,webcrypto:!!yq(),textencoder:!!g.dX.TextEncoder});if(k.httpStatus!==200)throw new g.yA("onesie.response.badstatus",{st:k.httpStatus});return g.Lv(N.body)}Zp(Z){this.B("html5_consume_onesie_next_request_policy_for_sabr")&&(Z=lt(Z,lsi),this.u3.Zp(Z))}ot(Z){Z={cz:$p(new ut(Z),1,vNi)};this.u3.ot(Z)}dD(Z){this.u3.dD(Z)}TF(Z){return this.u3.TF(Z)}B(Z){return this.u3.B(Z)}};var iP=class extends g.jR{constructor(Z,k,N){super();this.fp=Z;this.playerRequest=k;this.SY=N;this.logger=new g.bI("onesie");this.yq=[];this.lG=[];this.xhr=null;this.state=1;this.e7=new x2;this.p$=!1;this.playerResponse="";this.wE=new hK(this);this.Fq=new hUF(this);this.Rk="";this.F9=this.M0=!1;this.Ut="";this.enableCompression=this.JN=this.RO=!1;this.AJ=[];this.segmentStartTimeMs=this.segmentNumber=-1;this.bW=0;this.kW=this.fp.X();this.videoData=this.fp.getVideoData();this.FL=this.kW.Xa();this.eB=
this.kW.jY;this.Ps=new LGD(this.eB.V);this.zR=this.kW.B("html5_onesie_check_timeout");this.QW=new g.Uc(this.RF,500,this);this.je=new g.Uc(this.dg,1E4,this);this.RP=new g.Uc(()=>{if(!this.isComplete()){const a=Dn(this);this.fail(new g.yA("net.timeout",a))}},1E3);
this.gC=new g.Uc(this.YD,2E3,this);this.lE=this.fp.pT();this.L7=this.B("html5_onesie_wait_for_media_availability");g.u(this.videoData,this);g.u(this,this.QW);g.u(this,this.je);g.u(this,this.gC);Z=k2();s1&&Z&&(this.Ob=new Map);this.Ro=new Map;this.XU=new Map;this.K9=new Map;this.v_=new Map}jf(Z){return this.Ob?.get(Z)?.jf()||[]}Ef(Z,k){return!!this.Ob?.get(k)?.Ef(Z)}bA(Z,k){return this.Ob?.get(k)?.bA(Z)||[]}ew(Z,k){return this.Ob?.get(k)?.ew(Z)||[]}yf(){return this.segmentStartTimeMs}Qn(Z){this.state=
Z;this.notifySubscribers()}Wv(){return!1}Pp(){return!1}W_(){}dD(Z){this.fp.dD(Z)}TF(Z){return this.fp.TF(Z)}Ul(Z,k,N,a){N||this.O3.Ul(a);return!1}d3(Z,k){this.Fq.d3(Z,k)}KJ(){this.dD("orfb");this.F9=!0;if(twU(this)&&this.xhr){var Z={rc:this.xhr.status,lb:this.xhr.Uf(),rt:(1E3*o70(this.O3)).toFixed(),shost:g.kX(this.Ut),trigger:"o1"};this.U6("pathprobe",Td(Z))}}e4(){this.dD("opr_r");this.p$=!0}iA(Z,k,N,a){this.lG.push(a);if(this.Ob){if(!this.Ob.has(Z)){const T=new NX_(this);this.Ob.set(Z,T);g.u(this,
T)}this.Ob.get(Z)?.iA(k,N,a);f8(this);N||(this.segmentNumber=a.Ne,this.segmentStartTimeMs=a.startMs)}else f8(this)}hE(){return this.lG}XK(){this.lG=[]}SN(Z){this.U9=Z;Z.K_!=null&&this.fp.dN(Z.K_)}mJ(Z){this.aO=Z}Zp(Z){Z.videoId&&this.XU.set(Z.videoId,Z)}G$(Z){if(Z.url)for(const k of Z.url)Kn(k,"ump_prewarm")}Wn(){if(this.Ob)for(const Z of this.Ob.keys())this.Ob.get(Z)?.fl()}Mm(Z){this.f9=Z}ot(Z){if(Z?.cz&&(Z=Z.cz.BK))for(const k of Z)k.videoId&&this.v_.set(k.videoId,k)}pD(Z){this.yq.push(Z)}U6(Z,
k,N=!1){this.fp.U6(Z,k,N)}j7(Z,k,N){this.Ob?.get(Z)?.j7(k,N)}qS(Z){this.K9.set(Z.videoId,Z)}async fetch(){this.zR?this.QW.start():this.je.start();this.dD("or_i");const Z=this.kW.experiments.yz("html5_onesie_verbose_timing")||this.kW.Yl().V.Aq(pHX)?this.dD.bind(this):()=>{};
Z("oloc_ss");var k=AQy(this.videoData,this.lE);k||(Z("oloc_sa"),k=g.Q5(this.kW.experiments,"html5_onesie_redirector_timeout_ms"),k=await Pq0(this.videoData,this.lE,k));if(!k)return this.fail(new g.yA("onesie.unavailable.hotconfig",{url:"0"})),this.e7;this.Ct=bY(54,6440,k);Z("oloc_e");var N=g.GC(this.kW,this.videoData.G()),a=!!N.V;N=a?await N.V:N.getValue();this.B("html5_log_onesie_empty_oauth")&&!N&&this.U6("no_token",{async:a});a=Hs0(this.playerRequest,this.kW,this.videoData,N,C8(this.Ct));var T;
try{if(!this.kW.s6||this.kW.s6?.V||a?.Cd||(Z("orqb_w"),(T=Laf(a,this.Ps,this.kW,this.fp,this.SY,this.eB.onesieUstreamerConfig,this.videoData.Pg?.by,this.B("onesie_cdm_mosaic_send_audio_tracks_from_client")?this.playerRequest.playbackContext?.contentPlaybackContext?.compositeVideoContext?.defaultActiveSourceVideoId:void 0))&&this.U6("orpqenc",{i:"w"})),!T){var K=VwU(this,a),y=this.kW.Yl().V.Aq(btG);if(K){Z("orqb_a");let Q=Xof(a,this.Ps,this.kW,this.fp,this.SY,this.eB.onesieUstreamerConfig,this.videoData.Pg?.by,
this.B("onesie_cdm_mosaic_send_audio_tracks_from_client")?this.playerRequest.playbackContext?.contentPlaybackContext?.compositeVideoContext?.defaultActiveSourceVideoId:void 0);if(y){const q=new Promise((r,C)=>{setTimeout(()=>void C("timeout 10s"),1E4)});
Q=Promise.race([Q,q]).catch(r=>{this.U6("orpqenc",{i:"a",e:`${r}`});Z("orqb_f")})}T=await Q;
!T&&y||this.U6("orpqenc",{i:"a"})}if(!K||y&&!T)Z("orqb_s"),T=drU(a,this.Ps,this.kW,this.fp,this.SY,this.eB.onesieUstreamerConfig,this.videoData.Pg?.by,this.B("onesie_cdm_mosaic_send_audio_tracks_from_client")?this.playerRequest.playbackContext?.contentPlaybackContext?.compositeVideoContext?.defaultActiveSourceVideoId:void 0),this.U6("orpqenc",{i:"j"})}}catch(Q){return this.fail(Q),this.e7}Z("orqb_e");this.enableCompression=T.innertubeRequest.VS;this.bW=T?.ob?.s0||0;this.dD("osor");K=coy();T={method:"POST",
body:g.SV(T,xvN),headers:{"Content-Type":"text/plain",Referer:location.origin}};y=this.B("html5_onesie_media_capabilities");cQ0(k,this.videoData,uTy(this),y);this.FL&&this.U6("ombrs","1");this.O3=new tK(this,{SY:this.SY,zJ:this.FL,QQ:(Q,q)=>{this.fp.kQ(Q,q)},
rR:!0});k.set("rn",`${this.O3.requestNumber}`);this.Ut=k.mH();GZf(this.O3,this.Ut);this.dD("or_p");this.xhr=fn(new Xm(k),K,this.O3,s1,T);this.gC.start();this.fp.onPlayerRequestSent(this.videoData.videoId);return this.e7}xi(){return 2}Bl(){this.dD("orh_r")}D2(){!this.F9&&this.xhr.Uf()&&this.KJ();this.RO&&!this.zR&&this.RP?.start();this.xV()}S$(Z=!1){this.xV();if(!(this.jm()||this.state>=4)){var k=Dn(this),N=this.xhr;k.rc=N.status;Z&&(k.ab=!0);if(N.qR()){var a="onesie.net";k.msg=N.qR()}else N.status>=
400?a="onesie.net.badstatus":N.DZ()?this.p$||(a="onesie.response.noplayerresponse"):a=N.status===204?"onesie.net.nocontent":"onesie.net.connect";a?this.fail(new g.yA(a,k)):(this.dD("or_fs"),this.O3.jY((0,g.z)(),N.Uf(),0),this.Qn(4),this.FL&&this.U6("rqs",k));this.FL&&this.U6("ombre",`ok.${+!a}`);this.L7=!1;f8(this);lP(this.Fq);this.zR||(this.je.stop(),this.RP?.stop());if(Z=this.lE?.Y())for(a=0;a<Z.length;a++)this.U6("pathprobe",Z[a])}}IQ(){if(this.playerResponse&&this.xhr&&this.Ob)for(const [,Z]of this.Ob.entries())if(Z.Y){this.xhr.abort();
this.S$(!0);break}}X(){return this.kW}B(Z){return this.kW.B(Z)}YD(){if(twU(this)&&this.lE&&(!this.F9||this.B("html5_onesie_probe_ec_hosts"))){var Z=this.lE;if(Z.kW.experiments.yz("html5_onesie_probe_ec_hosts")){var k=Z.V.get(3)?.V();k&&sY(Z,k,"osc",this);(k=Z.V.get(4)?.V())&&sY(Z,k,"ocy",this)}else(k=Z.V.get(1)?.V())&&sY(Z,k,"o2",this),(k=Z.V.get(2)?.V())&&sY(Z,k,"o3",this)}}RF(){if(!this.jm()&&!this.isComplete()){if(this.RO){if((0,g.z)()-this.O3.j>1E3){this.O3?.O6((0,g.z)());const k=Dn(this);if(this.FL&&
this.xhr instanceof Myf){var Z=this.xhr;k.xrs=Z.xhr.readyState;k.xpb=Z.V.totalLength;k.xdc=Z.Y}this.fail(new g.yA("net.timeout",k))}}else(this.O3||!this.kW.Yl().V.Aq(btG))&&(0,g.z)()-this.O3.V>1E4&&(this.O3?.O6((0,g.z)()),this.dg());this.isComplete()||this.QW.start()}}dg(){this.L7=!1;if(!f8(this)){var Z=Dn(this);Z.timeout="1";this.fail(new g.yA("onesie.request",Z))}}fail(Z){Z=QA(Z);this.RO?this.fp.dV(Z):(this.e7.reject(Z),this.RO=!0);lP(this.Fq);this.zR||this.je.stop();this.dD("or_fe");this.lE?.Y()?.forEach(k=>
{this.U6("pathprobe",k)});
this.Qn(5);this.dispose()}isComplete(){return this.state>=3}X7(){return this.state===4}oI(Z){return this.isComplete()||!!this.Ob?.get(Z)?.D}Ih(){return!1}vZ(){return this.state===5}notifySubscribers(Z){for(let k=0;k<this.AJ.length;k++)Z&&this.AJ[k].S9()!==Z||gB(this.AJ[k],this)}Io(){return this.bW}YW(){this.playerResponse="";this.xhr?.abort();lP(this.Fq);this.wE.dispose();this.RP?.dispose();this.Qn(-1);this.AJ=[];this.XK();this.yq=[];super.YW()}xV(){try{const Z=this.xhr;Z.Uf()>102400&&!this.M0&&(this.dD("or100k"),
this.M0=!0);if(Z.sj()){const k=Z.PN(),N=k.totalLength;this.FL&&this.U6("ombrss",`len.${N}`);this.wE.feed(k)}if(this.Ob)for(const k of this.Ob.keys())this.Ob.get(k)?.fl(),this.notifySubscribers(k)}catch(Z){this.fail(Z)}}T2(Z){return!!this.Ob?.get(Z)?.j()}MK(){return this.O3.requestNumber}m4(Z){return this.K9.get(Z)}b1(){return!1}I3(){return"ONESIE"}};var u0K=class extends g.jR{constructor(Z,k,N,a,T,K,y,Q,q,r,C,m){super();this.fp=Z;this.loader=k;this.policy=N;this.audioTrack=a;this.videoTrack=T;this.cD=K;this.SY=y;this.qX=Q;this.U=q;this.timing=r;this.zt=C;this.j=m;this.V=[];this.Y={};this.tq=this.O6=!1;this.s6=this.Xs=0;this.Fz=!0;this.hq=this.Kc=!1;this.Vz=0;this.O={kG:0,Eh:0};this.Tt={kG:0,Eh:0};this.uq=null;this.dA={jI:[],Md:[]};this.FS={jI:[],Md:[]};this.G=null;this.L=[];this.vD=0;this.MX=!1;this.nF={XqW:()=>this.V,
pqp:()=>this.Y,
flz:()=>{this.V.length=0},
E8t:()=>this.videoData.Sm,
SsD:()=>this.Vz,
EXS:A=>{this.Vz=A},
Pxp:A=>{this.O.Eh=A},
qq:A=>{this.G=A},
xr:A=>{this.L=A},
Hp:()=>this.Hp()};
this.videoData=this.fp.getVideoData();this.N=this.videoData.latencyClass==="LOW"?50:this.videoData.latencyClass==="ULTRALOW"?100:this.policy.Yh;this.policy.GF&&(this.xW=new Hih(this.loader,this.policy,this.SY),g.u(this,this.xW))}Hp(Z){var k=T$(this.loader)&&Z&&Z.g3!==void 0&&!Z.G5?Z.g3*1E3+(this.loader.mx()||0):$Y(this);if(this.policy.PG){var N=this.dA;var a=this.FS}else N=Gv(this,this.audioTrack),a=Gv(this,this.videoTrack);var T=[...N.jI,...a.jI];e_(this)&&T.push(...this.L);var K=[...N.Md,...a.Md];
const y=this.loader.N_();if(this.policy.xF&&!this.videoData.isLivePlayback){var Q=this.videoData.lengthSeconds*1E3;k>=Q&&this.loader.U6("invalidSabrCmt",{cmt:k,vd:Q})}Q=this.SY;var q=this.fp,r=this.cD,C=this.D,m=this.videoData.Sm,A=this.policy,P=this.loader.fJ,d=t$f(this.loader)*1E3,h=this.Sm?.jb,B=this.Sm?.cN,v=this.Xs,O=Number(this.U.Y?.info.itag)||0,x=Number(this.U.L?.info.itag)||0,e=this.fp.Cw();var Ki=Z?.Km?Z.Km:this.loader.isSuspended?4:void 0;k={SY:Q,fp:q,cD:r,jI:T,Md:K,qM:k,nextRequestPolicy:C,
B7:m,BG:A,Mt:P,Xz:d,jb:h,cN:B,Xs:v,cO:O,C_:x,Kh:y,XO:e,Km:Ki,Fz:this.Fz,rg:this.hq,Kc:this.Kc};T=this.loader.nP();K=rr(T);T&&(k.w2=K);if(Z=T$(this.loader)&&Z?.G5?Z.g3:this.fp.MN())k.HV=Z*1E3;Z=this.U;T=Z.O;if(Z.BG?.tq()&&!T)for(yf of Z.D)if(yf.ZF){T=!0;break}var yf=Z.BG.tq()&&!T?[]:Bzy(Z,Z.D);k.GA=yf;yf=this.U;yf.BG.tq()&&!yf.zt?yf=[]:(Z=fXb(yf),Z.length===0&&(Z=yf.G),yf=Bzy(yf,Z));k.EU=yf;k.vJ=e_(this)?[this.G]:void 0;k.Ko=Array.from(E2(this.U.V).keys(),Number);k.iC=this.U.iC();this.policy.wp&&(k.q$=
bGy(this.loader,this.audioTrack),k.gK=bGy(this.loader,this.videoTrack));yf=this.loader.getCurrentTime();N=xY(this,N.jI,yf);a=xY(this,a.jI,yf);this.vD=a=Math.min(N,a);this.policy.U&&(e_(this)&&(N=xY(this,this.L,yf),this.fp.Xa()&&N<a&&this.loader.U6("sabrcfb",{met:a,cet:N,cbrl:this.L.length}),a=Math.min(a,N)),!this.policy.L&&(N=this.uq?.qH(a)))&&(k.Ib=N);this.policy.L&&(N=this.videoData.eP[this.videoData.U?.containerType||0],a=this.loader.isSeeking()&&!this.loader.h0?a+this.loader.mx():NaN,k.uv=this.j?.Vz(a,
N),this.j?.j());this.policy.N&&this.V.length>0&&this.V[0].Pp()&&(k.m$=this.V[0].W_());return k}mM(Z,k){this.C=void 0;Osy(this);JQj(this,Z,k)}XC(Z){if(this.V.length===0)return!1;const k=this.V[0];return k instanceof iP?Z===this.loader.getCurrentTime()*1E3:!(k instanceof b9&&k.info.V?.ob?.HV)&&Math.abs(k.Io()-Z)<50}Zp(Z,k){this.D=Z;this.policy.U&&!Z.playbackCookie&&this.loader.U6("sbrnocookie",{rn:k??-1});this.policy.hG&&this.j?.N()?this.loader.U6("clsdai",{ignbckoff:k??-1,backoff:Z.backoffTimeMs??
-1}):this.C=(0,g.z)()+(Z.backoffTimeMs||0)}GL(Z,k){if(Z.action===void 0)Z=this.fp.MN(),Z!==void 0&&this.loader.zq(Z);else if(Z.action!==0||!this.tq)if(Z.action===0&&this.policy.qb&&(Z.action=2),Z.OX==="sabr.malformed_config"&&this.s6++<3)this.loader.handleError("sabr.malformed_config",{action:Z.action,rn:k,retry:this.s6},0);else{var N={};N.reason=Z.OX;N.action=Z.action;N.rn=k;switch(Z.action){case 1:this.policy.U&&this.uq&&(Ej(this.uq,void 0,void 0,N),this.policy.mX&&this.j?.j());break;case 0:this.tq=
!0;this.videoData.qW()&&this.policy.U&&this.uq&&Ej(this.uq,void 0,void 0,N,!1);this.loader.UK(N);break;case 2:npb(Z.OX)!=="sabr.config"&&delete N.reason;this.loader.handleError(npb(Z.OX),N,1);break;case 3:this.policy.pF&&(this.cD.Vz?.zt(),this.loader.handleError("sabr.hostfallback",N))}}}G$(Z){if(Z.url)for(const k of Z.url)Kn(k,"ump_prewarm")}yJ(Z){Z&&(this.loader.U6("sabrctxt",{onsbrctxt:Z.type,scp:Z.scope,dflt:Z.sendByDefault}),Z.type&&Z.sendByDefault&&this.videoData.Sm.add(Z.type),Z.scope!==2&&
(Z.type&&this.videoData.sabrContextUpdates.set(Z.type,Z),this.fp.yJ(Z)))}Se(){}Mm(Z,k){if(this.loader.h0)this.loader.U6("sdai",{ignSabrSeek:1,smt:Z?.PC,rn:k});else if(Z.PC!==void 0&&Z.gq){const N=Z.PC/Z.gq;this.audioTrack.G=!1;this.videoTrack.G=!1;if(this.policy.zt||this.policy.fN||this.policy.sN)this.loader.Jr.V=!1;this.fp.getCurrentTime()!==N&&(k={b0:"sabr_seek",P8:!0,oG:!0},Z.seekSource&&(k.seekSource=Z.seekSource),F6(this.loader,N+.1,k))}}onSnackbarMessage(Z){this.fp.publish("onSnackbarMessage",
Z)}pD(Z,k){this.policy.L&&this.loader.pD(Z,k)}SN(Z){Z.Bz&&Z.YZ&&hl(this.cD,Z.Bz,Z.YZ);this.policy.Yw&&(Z.jE&&Z.Zx&&(this.cD.SG=Z.jE/Z.Zx),Z.SE&&Z.FU&&(this.cD.cU=Z.SE/Z.FU));E1(this.videoData)&&!this.videoData.KX&&Z.YZ&&this.loader.Sh(Z.YZ,1E3);Z.K_!=null&&this.fp.dN(Z.K_);Z.DP&&(Z=((0,g.z)()-Z.DP)/1E3,this.loader.LS.wr(1,Z))}q9(Z){this.loader.q9(Z)}iA(Z){this.loader.iA(Z)}Er(Z){this.loader.Er(Z)}cf(Z){return this.videoData.Sm.has(Z)}FV(Z,k,N){this.policy.D&&this.loader.U6("sabrctxtplc",{start:Z?
Z.join("_"):"",stop:k?k.join("_"):"",discard:N?N.join("_"):""});if(Z)for(const a of Z)this.videoData.Sm.add(a);if(k)for(const a of k)this.videoData.Sm.has(a)&&this.videoData.Sm.delete(a);if(N)for(const a of N)if(this.videoData.sabrContextUpdates.has(a)&&this.videoData.sabrContextUpdates.delete(a),this.policy.N&&this.V.length)for(const T of this.V)T instanceof iP||T.qk?.type!==a||(T.qk=void 0)}Bs(){}qq(Z){this.G=Z}xr(Z){this.L=Z}E0(Z,k){b5(this.policy,Z,4,k)}ot(Z){if(Z?.cz&&(Z=Z.cz.BK))for(const k of Z)k.formatId&&
(Z=this.cD.Y.get(Fm(k.formatId)))&&Z.info&&(Z.info.debugInfo=k.debugInfo)}J6(Z){this.MX=!0;this.fp.publish("reloadplayer",Z)}S9(){return this.fp.S9()||""}c_(){const {tR:Z,S3:k}=eL0(this);return Math.min(Z,k)}BA(Z,k){this.loader.U6(Z,k)}Nr(Z){Qm(this.loader,C2j(this.qX,Z))}pF(){return{requestNumber:this.Rq?.MK()||-1,isDecorated:this.Rq?.info.isDecorated()}}yG(Z){this.fp.yG(Z)}IB(){this.loader.IB()}T7(){this.loader.T7()}YW(){super.YW();this.D=void 0;JQj(this,!0,"i");this.V=[]}};var lj_=class{constructor(Z){this.fp=Z;this.V=new Map;this.delay=null}getCurrentTime(){return this.fp.getCurrentTime()-this.fp.mx()}},fj_=class{constructor(Z,k,N){this.Y=Z;this.cpn=k;this.fp=N;this.V=new Map;this.D=new Map;this.G=NaN;this.U=this.w_="";this.isSeeking=!1;this.L=new lj_(N);this.kX=N.kX;this.fp.subscribe("statechange",this.C,this);this.fp.subscribe("SEEK_TO",()=>{this.Hs()});
this.fp.subscribe("SEEK_COMPLETE",()=>{Mw0(this)});
this.w_=this.U=this.cpn}C(Z){yR(Z.state)&&Jd(this.L)}clear(){var Z=this.L;Z.delay?.dispose();Z.V.clear();this.D.clear();this.V.clear();this.G=NaN}j(Z,k,N=0){if(Z!==this.G||this.V.get(Z)?.D!==k?.D)if(k?this.V.set(Z,k):this.V.delete(Z),!this.isSeeking){var a=this.Y.getStartTime(Z);this.G=Z;Ibi(this,Z);if(k){let T=a;k.V.forEach((K,y)=>{T<a+N||(K!==this.U&&jVj(this,Z,K,K!==this.cpn?T-k.Y[y]:T),T+=k.U[y])})}else this.U!==this.cpn&&jVj(this,Z,this.cpn,a+N)}}Hs(){this.isSeeking=!0;
var Z=this.L;Z.delay?.dispose();Z.V.clear();this.G=NaN;this.U=this.w_}};var ECf=class{constructor(Z,k,N,a,T){this.loader=Z;this.policy=k;this.schedule=N;this.cT=a;this.N=T;this.Vz=NaN;this.U=this.j=this.Y=null;this.V=this.L=this.G=this.startTimeSecs=NaN;this.D=!1;this.C=NaN}Qm(Z,k){if(this.Y)return N5y(this,k);if(k=X6(Z)){var N=k.V;N&&N.Y&&N.V&&(Z=Z.U.length?Z.U[0]:null)&&Z.state>=2&&!Z.vZ()&&Z.info.oJ===0&&(this.Y=Z,this.j=N,this.U=k.info,this.G=this.startTimeSecs=Date.now()/1E3,this.L=this.U.startTime)}return NaN}clear(){this.U=this.j=this.Y=null;this.V=this.L=this.G=
this.startTimeSecs=NaN;this.D=!1}};var BXK=class extends g.jR{constructor(){super();try{this.D=T5f(Z=>{this.U=Z.at(-1)}),this.L=this.D?.observe("cpu",{sampleInterval:2E3}).catch(Z=>{Z instanceof DOMException&&(this.V=Z)})}catch(Z){Z instanceof DOMException&&(this.V=Z)}}Y(){const Z={},k=window.h5vcc;
Z.hwConcurrency=navigator.hardwareConcurrency;this.V&&(Z.cpe=this.V.message);this.U&&(Z.cpt=this.U.time,Z.cps=this.U.state);k?.cVal&&(Z.cb2s=k.cVal.getValue("CPU.Total.Usage.IntervalSeconds.2"),Z.cb5s=k.cVal.getValue("CPU.Total.Usage.IntervalSeconds.5"),Z.cb30s=k.cVal.getValue("CPU.Total.Usage.IntervalSeconds.30"));return Z}YW(){KXy(this);super.YW()}};var y$f=/[?&]cpn=/;var DRB=class extends g.jR{constructor(){super();this.maxBufferSize=this.sampleInterval=100;this.L=r$f;this.V=[];this.D=0;mqb(this)}flush(){const Z={};this.U&&(Z.pe=this.U);this.V.length>0&&(Z.pt=this.V.join("."));this.V=[];return Z}async stop(){try{const Z=await this.Y?.stop();Z&&this.logTrace(Z)}catch(Z){this.U=CIy(Z.message)}}logTrace(Z){const k=[],N=[],a=[],T=[];let K=0;for(const y of Z.resources)k.push({id:K,url:y}),K++;K=0;for(const {name:y,resourceId:Q,line:q,column:r}of Z.frames)N.push({id:K,
name:y,resourceId:Q,line:q,column:r}),K++;K=0;for(const {frameId:y,parentId:Q}of Z.stacks)T.push({id:K,frameId:y,parentId:Q}),K++;K=0;for(const {timestamp:y,stackId:Q}of Z.samples)a.push({id:K,timestampMs:y,stackId:Q}),K++;Z=g.fl(g.SV({resources:k,frames:N,samples:a,stacks:T},bPG),4);this.D+=Z.length;this.D<1E7&&this.V.push(Z)}YW(){this.stop();super.YW()}};var Dqy=[2,5,30];g.kT=FM(()=>{let Z="";try{const k=g.TU("CANVAS").getContext("webgl");k&&(k.getExtension("WEBGL_debug_renderer_info"),Z=k.getParameter(37446),Z=Z.replace(/[ :]/g,"_"))}catch(k){}return Z});g.BH=class extends g.jR{constructor(Z){super();this.provider=Z;this.logger=new g.bI("qoe");this.V=new Map;this.sequenceNumber=1;this.Vz=NaN;this.wV="N";this.j=this.BU=this.HU=this.N=this.D=0;this.pF=this.vD=this.FS=this.jY="";this.r5=this.Sm=NaN;this.xl=0;this.iq=-1;this.HA=1;this.playTimeSecs=this.rebufferTimeSecs=0;this.s6=this.isEmbargoed=this.xW=this.isOffline=this.isBuffering=!1;this.bq=[];this.C=null;this.Qz=this.L=this.zt=this.G=!1;this.Y=-1;this.tq=!1;this.hp=new g.Uc(this.tW,750,this);this.Fu=
this.adCpn="";this.h6=this.nu=this.GN=this.SW=this.adFormat=void 0;this.Ke=0;this.FN=new Set("cl fexp drm drm_system drm_product ns adformat live cat shbpslc".split(" "));this.rD=new Set(["gd","pw","gp","gm","dd"]);this.serializedHouseBrandPlayerServiceLoggingContext="";this.hq=!1;this.qX=NaN;this.dA=0;this.Tt=!1;this.remoteConnectedDevices=[];this.remoteControlMode=void 0;this.O6=!1;this.Ap=new Set;this.Kp=!1;this.nF={O0:N=>{this.O0(N)},
B_q:()=>this.U,
reportStats:()=>{this.reportStats()},
ebA:()=>this.V.get("cat")||[],
AM:N=>this.V.get(N)||[],
y1S:()=>this.V,
XGm:()=>({adCpn:this.adCpn,Fu:this.Fu,adFormat:this.adFormat}),
al3:()=>({SW:this.SW,GN:this.GN,nu:this.nu,h6:this.h6})};
this.O=this.provider.kW.B("html5_qoe_relaxed_reporting");var k=g.Q5(this.provider.kW.experiments,"html5_qoe_proto_mock_length");k&&!Zy.length&&(Zy=qMU(k));g.u(this,this.hp);try{navigator.getBattery?.().then(N=>{this.C=N})}catch{}g.MX(this,0,"vps",["N"]);
Z.kW.Xa()&&(this.dA=(0,g.z)(),this.qX=g.B8(()=>{const N=(0,g.z)(),a=N-this.dA;a>500&&this.U6("vmlock",{diff:a.toFixed()});this.dA=N},250));
this.provider.videoData.fX&&(this.remoteControlMode=AbG[this.provider.videoData.fX]||0);this.provider.videoData.sx&&(k=ynX(this.provider.videoData.sx),k?.length&&(this.remoteConnectedDevices=k));Z.kW.Xa()&&(this.MX=new BXK,g.u(this,this.MX));Z.kW.webPlayerContextConfig?.enableSelfProfilingLogging&&(this.Rq=new DRB,g.u(this,this.Rq))}tW(){const Z=g.j_(this.provider);n8(this,Z)}g7(){return this.KT}Q9(){return{HU:this.HU,BU:this.BU}}mf(Z,k){this.HU=Z;this.BU=k}dN(Z){if(!this.O6){this.O6=!0;var k="";
switch(Z){case 1:k="proximaui";break;case 2:k=this.provider.videoData.Jq.getWebPlayerContextConfig()?.enableProximaLowLatency?"proximawpcc":this.provider.videoData.B("html5_enable_proxima")||this.provider.videoData.B("html5_sabr_force_proxima")?"proximaexp":"proximaclient";break;case 3:k="proximaauto"}k!==""&&YY(this,k)}}M8(Z,k,N,a){if(!this.Ap.has(Z)){this.Ap.add(Z);var T=g.j_(this.provider);g.MX(this,T,"lse",[Z,k,N,a.toFixed(3)])}}g2(Z){RR(this,"lwc",[Z.Y8?Z.Y8.toFixed():"",Z.rr?Z.rr.toFixed():
"",Z.aE?(Z.aE*1E3).toFixed():"",Z.Y5?(Z.Y5*1E3).toFixed():"",Z.Nm?(Z.Nm*1E3).toFixed():""].join(":"))}reportStats(Z=NaN){if(!this.jm()&&(Z=Z>=0?Z:g.j_(this.provider),this.O?OiT.has(this.wV)&&(this.V.size||(this.wV==="PL"?Z>=this.D+30:Z<=this.N+30||Z>=this.D+1200&&Z<=this.N+86400))&&(g.MX(this,Z,"vps",[this.wV]),this.D=Z):["PL","B","S"].indexOf(this.wV)>-1&&(this.V.size||Z>=this.D+30)&&(g.MX(this,Z,"vps",[this.wV]),this.D=Z),this.V.size)){this.sequenceNumber===7E3&&g.L9(Error("Sent over 7000 pings"));
if(!(this.sequenceNumber>=7E3)){EY(this,Z);var k=this.provider.fp.t5();for(const {key:q,value:r}of k)this.U6(q,r);k=Z;var N=this.provider.fp.lU(),a=N.droppedVideoFrames||0;const K=N.totalVideoFrames||0,y=a-this.HU,Q=K&&!this.BU;a>N.totalVideoFrames||y>5E3?$qN(this,"html5.badframedropcount",`df.${a};tf.${N.totalVideoFrames}`):(y>0||Q)&&g.MX(this,k,"df",[y]);this.HU=a;this.BU=K;this.j>0&&(g.MX(this,Z,"glf",[this.j]),this.j=0);rY.isActive()&&(Z=rY.vK(),Object.keys(Z).length>0&&this.U6("profile",Z));
this.Tt&&YY(this,"lwnmow");Z={};this.provider.videoData.U&&(Z.fmt=this.provider.videoData.U.itag,(k=this.provider.videoData.Y)&&k.itag!==Z.fmt&&(Z.afmt=k.itag));Z.cpn=this.provider.videoData.clientPlaybackNonce;this.SW?.length?Z.adcpn=this.SW.join(","):this.adCpn&&(Z.adcpn=this.adCpn);this.GN?.length?Z.addocid=this.GN.join(","):this.Fu.length&&(Z.addocid=this.Fu);N=this.provider.videoData;k=N.qW();N=N.latencyClass;(this.provider.kW.Yl().V.Aq(BYR)&&k&&N==="NORMAL"||this.provider.kW.Yl().V.Aq(fef)&&
k&&N==="LOW"||this.provider.kW.Yl().V.Aq(leG)&&this.provider.videoData.isDaiEnabled()&&w9(this.provider.videoData))&&(Z.adc=1);this.provider.videoData.cotn&&(Z.cotn=this.provider.videoData.cotn);Z.el=NN(this.provider.videoData);Z.content_v=mg(this.provider.videoData);Z.ns=this.provider.kW.Vz;Z.fexp=pXX(this.provider.kW.experiments).toString();Z.cl=(881726199).toString();k=this.provider.videoData.adFormat||this.adFormat;this.nu?.length?Z.adformat=this.nu.join(","):k&&(Z.adformat=k);(k=nL(this.provider.videoData))&&
(Z.live=k);this.provider.videoData.kT()&&(Z.drm=1,this.provider.videoData.L&&(Z.drm_system=tJG[this.provider.videoData.L.flavor]||0),this.provider.videoData.drmProduct&&(Z.drm_product=this.provider.videoData.drmProduct));H8()&&this.provider.videoData.Pq&&(Z.ctt=this.provider.videoData.Pq,Z.cttype=this.provider.videoData.ZT,this.provider.videoData.mdxEnvironment&&(Z.mdx_environment=this.provider.videoData.mdxEnvironment));this.provider.videoData.isDaiEnabled()?(Z.dai=this.provider.videoData.enableServerStitchedDai?
"ss":"cs",this.provider.videoData.mX&&(Z.dai_fallback="1"),w9(this.provider.videoData)&&(Z.dai="mv")):this.provider.videoData.tI?Z.dai="cs":this.provider.videoData.J2&&(Z.dai="disabled");Z.seq=this.sequenceNumber++;if(this.provider.videoData.G4){if(k=this.provider.videoData.G4,Z&&k){k.ns==="3pp"&&(Z.ns="3pp");this.rD.has(k.ns)&&YY(this,"hbps");k.shbpslc&&(this.serializedHouseBrandPlayerServiceLoggingContext=k.shbpslc);for(var T of Object.keys(k))this.FN.has(T)||(Z[T]=k[T])}}else Z.event="streamingstats",
Z.docid=this.provider.videoData.videoId,Z.ei=this.provider.videoData.eventId;this.isEmbargoed&&(Z.embargoed="1");Object.assign(Z,this.provider.kW.V);(T=Z.seq)&&!this.provider.kW.experiments.Yl().V.Aq(GPU)&&(k=GHi(this,+T),k=g.SV(k,P8r),k=g.fl(k,4),this.V.set("qclc",[k]));Z=g.mW("//"+this.provider.kW.lf+"/api/stats/qoe",Z);N=k="";for(const [q,r]of this.V.entries()){a=r;if(!a?.join)continue;a=`&${q}=${a.join(",")}`;a.length>100?N+=a:k+=a}this.provider.kW.experiments.Yl().V.Aq(GPU)&&(T=GHi(this,+(T||
0)),T.qoePingUrl=Z+k+N,g.TO("qoeClientLoggingContext",T),k+="&dl=1");SMG(this,Z+k,N.replace(/ /g,"%20"))}this.V.clear()}}GK(Z){this.Tt=Z}ov(){if(this.provider.videoData.L){var Z=this.provider.videoData.L;YY(this,`eme-${Z.keySystemAccess?"final":bn(Z)?"ms":MM(Z)?"ytfp":RZ(Z)?"safarifp":"nonfinal"}`)}}A$(Z){this.isEmbargoed=Z}onPlaybackRateChange(Z){const k=g.j_(this.provider);Z&&Z!==this.HA&&(g.MX(this,k,"rate",[Z]),this.HA=Z);this.O||this.reportStats(k)}getPlayerState(Z){if(Z.V(128))return"ER";if(Z.V(2048))return"B";
if(Z.V(512))return"SU";if(Z.V(16)||Z.V(32))return"S";if(Z.isOrWillBePlaying()&&Z.V(64))return"B";let k=vbc[Pt(Z)];g.Qw(this.provider.kW)&&k==="B"&&this.provider.fp.getVisibilityState()===3&&(k="SU");k==="B"&&Z.V(4)&&(k="PB");return k}Ld(Z,k){const N=g.j_(this.provider);g.MX(this,N,"vfi",[Z==="A"?"":`${k??0}`,Z])}YW(){super.YW();g.Ob(this.Vz);g.Ob(this.qX)}O0(Z){this.isOffline=Z;g.MX(this,g.j_(this.provider),"is_offline",[this.isOffline?"1":"0"])}U6(Z,k,N){const a=this.bq.indexOf(Z)!==-1;a||this.bq.push(Z);
if(!N||!a){k=typeof k!=="string"?Td(k):k;k=oFy(k);if(!N&&!/^t[.]/.test(k)){var T=g.j_(this.provider)*1E3;k=`t.${T.toFixed()};${k}`}RR(this,"ctmp",`${Z}:${k}`);WD(this);return T}}Cc(Z,k,N){this.U={lB:Number(this.U6("glrem",{nst:Z.toFixed(),rem:k.toFixed(),ca:+N})),s9:Z,pB:k,isAd:N}}GU(Z,k,N){g.MX(this,g.j_(this.provider),"ad_playback",[Z,k,N])}Zw(Z,k){const N=g.j_(this.provider)*1E3;RR(this,"daism",`t.${N.toFixed(0)};smw.${(Z*1E3).toFixed(0)};smo.${(k*1E3).toFixed(0)}`)}resume(){isNaN(this.Vz)?eXy(this):
this.Vz=g.B8(()=>{this.reportStats()},1E4)}};
g.BH.prototype.CH=NR(50);g.BH.prototype.AQ=NR(33);g.BH.prototype.F8=NR(27);g.BH.prototype.eU=NR(21);var vbc={[5]:"N",[-1]:"N",[3]:"B",[0]:"EN",[2]:"PA",[1]:"PL",[-1E3]:"ER",[1E3]:"N"},OiT=new Set(["PL","B","S"]),Zy=[];var ldf=class extends g.jR{constructor(Z,k,N,a,T,K,y,Q=!1,q,r){super();this.fp=Z;this.schedule=k;this.policy=N;this.cD=a;this.Vz=q;this.Ke=r;this.k5=this.b3=null;this.Sm=this.Rq=this.vD=this.O=0;this.A0=this.kt=this.isSuspended=!1;this.s6="";this.gD={};this.qX=NaN;this.O6=this.pF=this.Wl=0;this.uq=null;this.xl=this.tq=!1;this.fJ=0;this.hq=!1;this.FS=this.Tt=0;this.iq=null;this.jY=this.h0=!1;this.lA=()=>this.fp.lA();
this.timing=new TXJ(this.Ke);this.N=new pOR(this.schedule,this.policy);this.HA=new g.Uc(this.Qm,0,this);this.r5=new g.Uc(this.Qm,this.policy.HA,this);this.ws=new g.Uc(this.Qm,1E3,this);this.FN=new g.Uc(this.Qm,void 0,this);this.Qz=new g.Uc(()=>{this.isSuspended||this.Qm()},1E4,this);
this.Ap=new g.Uc(this.gV,250,this);this.j=this.currentTime=NaN;this.LS=new lw(5);this.dA=this.timestampOffset=NaN;this.logger=new g.bI("dash");this.ov=Infinity;this.nF={qbq:()=>this.Jr,
fet:()=>this.Y,
getAudioTrack:()=>this.audioTrack,
g8m:()=>this.videoTrack,
URD:()=>this.zt,
getManifest:()=>this.cD,
Wq3:()=>this.U,
Qm:()=>{this.Qm()},
vU:()=>{this.O=0;this.vU()},
eKR:C=>qo(this,this.videoTrack,this.b3.U,C)};
Z=q&&q.jf();q&&(GkR(q,this.cD,this.policy),this.dA=Date.now());this.V=new qrh(this,this.N,N,this.cD,T,Z);N=Quf(this.V,K,y&&y.id);this.audioTrack=new Pfa(this,this.policy,N.audio,this.timing);this.videoTrack=new Pfa(this,this.policy,N.video,this.timing);this.videoTrack.D.zt=this.audioTrack.X$();this.Kp={updateend:this.LC,error:this.PG};g.u(this,this.HA);g.u(this,this.r5);g.u(this,this.ws);g.u(this,this.FN);g.u(this,this.Qz);this.hp=Xdb({qK:this.policy.j.qK,bN:this.policy.bN,VP:this.policy.VP});this.C=
War(this,this.policy,this.hp,this.schedule,this.LS,(C,m)=>pqi(this,C,m));
this.Y=new KGK(this,this.cD,this.policy,this.videoTrack,this.audioTrack,Q);this.policy.L&&(Q=this.fp.getVideoData(),this.U6("clsdai",{initld:1,admapsz:Q.US?.size}),Q.US||(Q.US=new Map),this.zt=new yyT(this.policy,(C,m)=>{this.U6(C,m)},this.policy.Ic,Q.US));
this.Jr=new MFf(this,this.cD,this.videoTrack,this.audioTrack,this.policy);Q=this.policy.Ee?this.fp.getVideoData().aU:null;this.G=new dRH(this,this.policy,this.videoTrack,this.audioTrack,this.gD,this.Y,this.timing,this.N,this.schedule,this.cD,this.V,this.C,Q);g.u(this,this.G);this.L=new Xyi(this,this.policy,this.videoTrack,this.audioTrack,this.cD,T,ie(this.fp.getVideoData()),y?.id);g.u(this,this.L);iwG(this.L,K);this.U=new u0K(this.fp,this,this.policy,this.audioTrack,this.videoTrack,this.cD,this.schedule,
this.V,this.L,this.timing,this.Y,this.zt);g.u(this,this.U);this.D=this.fp.u0.Dw.Tv;this.policy.G||RXX(this);this.policy.Ke&&(this.tW=new fj_(this.videoTrack.l3.index,this.fp.getVideoData().clientPlaybackNonce??"",this.fp))}initialize(Z,k,N){Z=Z||0;this.policy.V||(k=suy(this.V),KJ(this.fp,new ym(k.video,k.reason)),this.fp.nx(new ym(k.audio,k.reason)));this.policy.V&&kY(this);this.cD.isManifestless&&u$X(this.G);this.C&&YRr(this.C,this.videoTrack.l3);k=isNaN(this.getCurrentTime())?0:this.getCurrentTime();
let a=!this.cD.isManifestless;this.policy.wz&&(a=a||this.cD.M4);if(!this.policy.Vz||this.policy.s6)this.currentTime=a?Z:k;this.policy.zt&&this.seek(this.getCurrentTime(),{}).eK(()=>{});
this.policy.V?this.D?.T2(this.S9()||"")&&nFG(this)&&ri(this,this.videoTrack)&&ri(this,this.audioTrack)&&(zLy(this.U,this.D),this.policy.G&&RXX(this)):this.Vz&&(ITi(this,this.videoTrack),ITi(this,this.audioTrack),iqi(this.Vz),delete this.Vz);N?(this.xW(!1),this.ws.XN()):(Z=this.getCurrentTime()===0,Ml(this.G,this.videoTrack,this.videoTrack.l3,Z),Ml(this.G,this.audioTrack,this.audioTrack.l3,Z),this.policy.V&&xri(this.U,{Km:1}),this.policy.zt||this.seek(this.getCurrentTime(),{}).eK(()=>{}),this.timing.tick("gv"));
(this.cD.Y8||this.cD.rr||this.cD.aE||this.cD.Y5||this.cD.Nm)&&this.fp.g2(this.cD)}xW(Z){this.kt=Z||this.fp.X().B("html5_allow_multiview_tile_preload")&&this.fp.getVideoData().iq;this.policy.FS||(this.isSuspended=!0,this.policy.Fh&&(this.ws.stop(),this.r5.stop(),this.HA.stop()),this.Qz.stop())}resume(){if(this.isSuspended||this.A0){this.kt=this.A0=this.isSuspended=!1;try{this.Qm()}catch(Z){g.b(Z)}}}SZ(){return!this.policy.FN}MX(Z=!1){return Math.min(l5(this.audioTrack,Z),l5(this.videoTrack,Z))}s4(Z=
!1,k=!1){WX0(this);this.fp.EQ()&&(this.j=NaN);Z?(this.policy.vD&&this.U6("loader",{setsmb:1}),this.policy.FS=!0,this.NA()):(this.xW(!1),k||this.NA())}setAudioTrack(Z,k,N=!1){if(!this.jm()){var a=!isNaN(k);N&&a&&(this.audioTrack.Vz=Date.now(),this.policy.e8&&(this.hq=!0));N=this.fp.EQ()&&!this.fp.getVideoData().C;if(this.policy.V){var T=this.L.hf(Z.id,a);this.fp.nx(T)}else T=this.V,T.U=T.cD.V[Z.id],T.j=T.U,T=new Nl(T.j,T.D,a?"t":"m"),this.fp.nx(new ym(T.audio,T.reason));a?(this.qX=Date.now(),a=this.audioTrack.l3.index.pn(k),
this.U6("setAudio",{id:Z.id,cmt:k,sq:a}),a>=0&&(this.policy.V&&this.mM(!0,"mosaic"),xR(this.audioTrack,a,NaN,NaN),!this.policy.tW&&this.cD.isLive&&tl(this.cD,a,!1))):N||this.fp.HF()}}setPlaybackRate(Z){Z!==this.N.getPlaybackRate()&&this.N.setPlaybackRate(Z)}sy(Z){const k=this.U.G;this.U.qq(Z);this.U6("scfidc",{curr:Fm(k),"new":Fm(Z)});Z&&Fm(Z)!==Fm(k)&&(this.mM(!0,"caption change"),this.F6())}XZ(Z){this.U.xr(Z)}Lz(Z){Z.V.info.H9()?this.fp.nx(Z):KJ(this.fp,Z)}Nr(Z){OM(Z.Vi[Z.Vi.length-1])&&Qm(this,
C2j(this.V,Z.Vi[0].l3))}nP(){return this.fp.nP()}N_(){return this.fp.N_()}Er(Z){this.fp.X().Xa()&&this.U6("sps",{status:Z.Tx||""});if(Z.Tx===1)this.Wl=0;else if(Z.Tx===2||Z.Tx===3){let k=!1;Z.Tx===3&&(this.ov=Z.VB??Infinity,this.Wl+=1,(k=jp(this))&&this.QJ(!0));this.fp.VU(!0,k)}}pT(){return this.fp.pT()}jO(){return this.fp.jO()}z6(Z){this.fp.z6(Z)}F6(){this.Qm()}gV(){const Z=this.fp.TM()?.getCurrentTime();Z?this.fp.U6("rms",{cta:Z}):this.Ap.XN()}Qm(){m2(this);if(this.b3&&Wz(this.b3)&&!this.b3.HZ()&&
(!this.policy.Vz||isFinite(this.getCurrentTime()))){var Z=hM(this.videoTrack);Z=this.policy.qg&&Z&&Z.G();this.cD.isManifestless&&this.cD.U&&d_(this.cD)?(this.j=d_(this.cD),this.b3.KH(this.j)):un(this.cD)&&!Z?(Z=this.getCurrentTime(),this.policy.Vz&&this.policy.s6&&this.U6("ssrDuration",{ld:this.fT(),lct:this.currentTime,vpd:this.getCurrentTime()},!0),isNaN(this.j)?(this.j=Z+3600,this.b3.KH(this.j)):this.j<=Z+1800&&(this.j=Math.max(this.j+1800,Z+3600),this.b3.KH(this.j))):this.b3.isView||(Z=Math.max(this.audioTrack.getDuration(),
this.videoTrack.getDuration()),(!isFinite(this.j)||this.j!==Z)&&Z>0&&(this.b3.KH(Z),this.j=Z))}if(!this.jm())if(Hf(this.cD)&&this.cD.vZ()){var k=this.cD;this.handleError("manifest.net.retryexhausted",k.O6?{rc:k.B9}:{rc:k.B9.toString()},1)}else if(this.policy.V)a:{try{if(T$(this)&&this.k5){k=this.U;var N=this.k5;const d=N.V;if(d){var a=k.fp.MN(),T=!0;a||(a=k.loader.getCurrentTime(),T=!1);{var K=d,y=a;const h=T?k.fp.TX(y):y;if(k.loader.IM(h))var Q=!1;else{var q={t:y.toFixed(3),isUtc:T};c:{const B=k.fp.S9();
if(B){for(const v of[k.audioTrack,k.videoTrack]){const O=t$(v.l3,k.cD.Rn);a=K?.ew(O,B)||[];if(a.length===0||!Xmi(new zH(a),h)){var r=!1;break c}}r=!0}else r=!1}r?(k.loader.U6("prebuffer",Object.assign(q,{inrange:1})),Q=!0):(K.info.V?.ob?.HV?T&&(K.info.V?.ob?.HV||0)===y*1E3:!T&&(K.info.V?.ob?.s0||0)===y*1E3)?(k.loader.U6("prebuffer",Object.assign(q,{match:1})),Q=!0):Q=!1}}Q&&(k.fp.dD("ismp_c"),k.V.push(d),k.xW?.V(d.info.EH),d.PS(),N.D(!1))}}vD(this.U);this.cD.isManifestless&&this.policy.G&&VK(this.Jr);
this.b3?.G()&&this.vU();xri(this.U);if(T$(this)&&this.k5){var C=this.U,m=this.k5;const d=m.U.g3;if(d!==void 0&&d>=0){C.fp.dD("ismp_a");var A=m.U;if(Urr(C,A)){var P=$rU(C,A);C.policy.Yh>0&&C.Tt.Eh++;P&&(m.V!==P&&(d0f(m),m.V=P,m.U=ft),C.fp.dD("ismp_rc"))}}}}catch(d){g.L9(d);if(d.message.includes("changeType")){this.U6("ctype",{exp:d.name,msg:d.message,s:d.stack});break a}this.handleError("fmt.unplayable",{exp:d.name,msg:d.message,s:d.stack,trg:"sabrslicerqt"},1)}N_0(this);this.Qz.XN()}else if(!this.cD.D||
!roX(this.videoTrack)&&!roX(this.audioTrack)||(this.videoTrack.Y||this.audioTrack.Y)&&this.policy.Tt?k=!1:(this.NA(),this.fp.seekTo(Infinity,{b0:"checkLoaderTracksSync",Sh:!0}),k=!0),!k){m2(this);this.cD.isManifestless&&(C_j(this.videoTrack),C_j(this.audioTrack),VK(this.Jr),(k=X6(this.videoTrack))&&k.V&&(k=k.V.Y&&!this.policy.bN,this.U6(k===this.policy.j.qK?"strm":"strmbug",{strm:k,sfmp4:this.policy.j.qK,dfs:this.policy.bN},!0)));if(this.b3)this.vU();else if(this.policy.Y){k=!1;if(this.policy.hk)for(T of[this.videoTrack,
this.audioTrack]){for(N=X6(T);N&&T.Ql()!==hM(T);N=X6(T))T.Z2(N);k=k||!!N}else(K=X6(this.videoTrack))&&this.videoTrack.Z2(K),(y=X6(this.audioTrack))&&this.audioTrack.Z2(y);Oj(this.videoTrack)&&Oj(this.audioTrack)||(K||y||k)&&OY(this)}CJ(this);Ml(this.G,this.videoTrack,this.videoTrack.l3,!1);Ml(this.G,this.audioTrack,this.audioTrack.l3,!1);if(!this.policy.Oe&&(k=this.videoTrack,q=this.audioTrack,(!this.b3||Wz(this.b3)&&!this.policy.qf)&&!this.Jr.isSeeking()&&(this.policy.V||oN(k)&&k.l3.V()&&this.V.Vz)))a:{if(N=
this.getCurrentTime(),Q=this.N,r=rk(Q,k.l3.info.UH,q.l3.info.UH,0),q=qs(Q.SY)+r/yK(Q.SY),N+=Math.max(q,q+Q.policy.mj-r/k.l3.info.UH),k.U.length){if(k.U[0].info.Vi[0].startTime<=N)break a;Pn(k)}Q=k.D;for(q=Q.U.length-1;q>=0;q--)Q.U[q].info.startTime>N&&Q.U.pop();TzX(k);k.V&&N<k.V.startTime&&(k.FS=0,k.l3.V()?k.V=k.l3.G(N,!0).Vi[0]:k.V=null)}F5y(this.G,this.videoTrack,this.audioTrack);F5y(this.G,this.audioTrack,this.videoTrack);N_0(this);this.C&&(k=this.C,k.Y?(N=k.G+k.policy.vy,k.D||(N=Math.min(N,k.startTimeSecs+
k.policy.zC)),k=Math.max(0,N*1E3-Date.now())):k=NaN,isNaN(k)||this.FN.XN(k));this.Qz.XN()}}UK(Z){this.fp.UK(Z)}vU(){if(this.b3){var Z=this.b3.V,k=this.b3.U;T_y(this,this.audioTrack);T_y(this,this.videoTrack);var N=KJf(this);if(N){if(this.policy.VP){if(!Z.eb()){var a=X6(this.audioTrack);if(a){if(!qo(this,this.audioTrack,Z,a.info))return;Pk(this,this.audioTrack,Z,a)}}if(!k.eb()&&(Z=X6(this.videoTrack))){if(!qo(this,this.videoTrack,k,Z.info))return;Pk(this,this.videoTrack,k,Z)}}this.O||(this.O=(0,g.z)(),
this.policy.D&&this.U6("apdps",{r:N}))}else{if(this.O){N=this.O;var T=(0,g.z)()-N;a=l5(this.audioTrack,!0)*1E3;const K=l5(this.videoTrack,!0)*1E3;this.policy.D&&(this.U6("apdpe",{dur:T.toFixed(),abuf:a.toFixed(),vbuf:K.toFixed()}),zw(this.policy)&&(T=Cn(this.N),this.U6("sdps",{ct:N,ah:a.toFixed(),vh:K.toFixed(),mr:mu(this.N,this.A0,T),bw:T.toFixed(),js:this.isSeeking(),re:+this.A0,ps:(this.policy.cL||"").toString(),rn:(this.policy.ZR||"").toString()})));this.O=0}this.C&&(N=this.C.Qm(this.audioTrack,
Rt(this.b3.U.Us())))&&this.fp.seekTo(N,{SC:!0,b0:"pollSubsegmentReadahead",Sh:!0});N=!1;rlb(this,this.videoTrack,k)&&(N=!0,k=this.timing,k.L||(k.L=(0,g.z)(),g.LN("vda",k.L,k.V),k.Y&&(g.dO(),LU(4))),k=this.timing,k.Sm||(k.Sm=(0,g.z)(),g.LN("vrb_f",k.Sm,k.V)));if(this.b3&&!this.b3.K3()&&(rlb(this,this.audioTrack,Z)&&(N=!0,Z=this.timing,Z.Y||(Z.Y=(0,g.z)(),g.LN("ada",Z.Y,Z.V),Z.L&&(g.dO(),LU(4))),Z=this.timing,Z.N||(Z.N=(0,g.z)(),g.LN("arb_f",Z.N,Z.V))),!this.jm()&&this.b3)){!this.policy.FN&&Oj(this.videoTrack)&&
Oj(this.audioTrack)&&Wz(this.b3)&&!this.b3.HZ()&&(Z=hM(this.audioTrack).l3,Z===this.cD.V[Z.info.id]&&(Z=this.b3,Wz(Z)&&(Z.b3?Z.b3.endOfStream():Z.SO.webkitSourceEndOfStream(Z.SO.EOS_NO_ERROR)),Z=this.schedule,puf(cS(Z)),Z.O=(0,g.z)(),Z.Vz=!0,this.M8("e")));if(Z=N)Z=this.b3,Z=!(Z.V?Z.V.supports(0):E9());Z&&OY(this)}}}}M8(Z){if(this.cD.isManifestless){var k=this.videoTrack.l3;if(k){var N=k.index.hW(),a=-1,T=-1;k.index instanceof VJR&&(a=k.index.qQ(),T=k.index.CA());this.fp.M8(Z,N,a,T)}}}bq(Z){this.policy.Vz&&
(this.j=Z)}LC(Z){const k=Z===this.b3?.V?this.audioTrack:this.videoTrack;X6(k)?.isLocked&&(this.fp.X().Xa()&&this.U6("eosl",{ounlock:X6(k)?.info.E3()}),sF(this,Z===this.b3?.V));if(this.policy.e8&&Z===this.b3?.V&&this.Tt){const N=this.Tt-this.getCurrentTime();this.fp.U6("asl",{l:N,xtag:hM(this.audioTrack)?.l3.info.U});this.hq=!1;this.Tt=0}Z.LP()&&Z.Us().length===0&&(Z.ih(),this.b3&&!this.b3.LP()&&(this.fp.X().Xa()&&this.fp.U6("rms",{ld:"seek"}),this.b3.C=performance.now(),this.fp.Gj(),this.fp.X().Xa()&&
this.Ap.XN()));k.C?.Vz();this.policy.HA?YR(this):this.Qm()}PG(Z){if(this.b3){var k=hM(Z===this.b3.V?this.audioTrack:this.videoTrack);if(Z=Z.wf())for(let N=0;N<Z.length;N++)this.U6("appendedbuffer",{i:N,b:g.fl(Z[N].subarray(0,4096),3)});Z={};k&&(Z=iI(k));Z.trg="onappenderr";this.handleError("fmt.unplayable",Z,1)}}Gq(Z){this.fp.Gq(Z)}Fm(Z,k,N){N&&this.h0&&this.U6("sdai",{skipadsvi:1,rep:Z.info.itag,sq:k.Cp,acpn:N.V.join("-"),avids:N.ids.join("-")});if(this.cD.isManifestless){Z=!!Z.info.video;juG(this,
k,N,Z,!0);!this.policy.xW&&this.policy.Ke&&Z&&this.tW?.j(k.Cp,N);if(this.policy.U&&k.lX){const K=k.lX||null;if(K?.event!=="predictStart"){var {requestNumber:a,isDecorated:T}=this.U?.pF();Z&&!T&&this.U6("sdai",{underdec:this.uq?.Om(K),evt:K?.event,id:K?.identifier,sq:k.Cp,mt:k.startTime.toFixed(3),stif:!!N,rn:a})}}this.policy.xW||(Z=Z?this.videoTrack:this.audioTrack,Z.N.push({segmentNumber:k.Cp,uB:N}),Z.N.length>5&&Z.N.shift(),k=k.Cp,this.fp.getVideoData()?.enableServerStitchedDai&&(N=Aoi(this.audioTrack,
k),Z=Aoi(this.videoTrack,k),N!==0&&Z!==0&&N!==Z&&this.handleError("ssdai.avsync",{sq:k,a:N,v:Z},0)))}}AN(Z,k,N,a){Z.info.video&&this.Y.AN(k,N,a)}lY(Z){this.V.lY(Z)}hM(){return this.uq}uU(){return this.videoTrack.G||this.audioTrack.G}seek(Z,k){if(this.jm())return xE();if(this.uU())return xE("seeking to head");if(this.policy.zt&&!isFinite(Z))return iNf(this.Jr),g.$E(Infinity);m2(this);sZf(this,Z,!1,k.seekSource);kY(this);this.policy.V||CJ(this,Z);this.b3&&this.b3.V&&this.b3.U&&!this.fp.getVideoData().Ay&&
(this.b3.V.isLocked()||this.b3.U.isLocked())&&this.fp.HF({reattachOnLockedBuffer:1,vsb:`${this.b3.U.isLocked()}`,asb:`${this.b3.V.isLocked()}`});const N=this.getCurrentTime(),a=this.Jr.seek(Z,k);if(!this.policy.Vz||this.policy.s6)this.currentTime=a;IG(this.Y,Z,N,this.policy.Hx&&!k.P8);OY(this);return g.$E(a)}XC(Z){return this.policy.V&&this.U.XC(Z)}cf(Z){return this.U.cf(Z)}mM(Z,k){this.U.mM(Z,k)}getCurrentTime(){if(this.policy.Vz){const Z=this.mx()||0;return this.fp.getCurrentTime(!0)-Z}return this.currentTime}fT(){return this.currentTime+
this.timestampOffset}iO(){return this.audioTrack.l3.info}Dp(){return this.videoTrack.l3.info}qL(){return this.audioTrack.l3.info.gA}O4(){return this.videoTrack.l3.info.gA}YW(){try{this.s4(),Pn(this.audioTrack),Pn(this.videoTrack),JM(this.audioTrack),JM(this.videoTrack),this.audioTrack.dispose(),this.videoTrack.dispose(),super.YW()}catch(Z){g.b(Z)}}handleError(Z,k,N=0){const a=Kf(N);Z==="fmt.unplayable"&&this.cD.isLive&&(this.policy.VP=!1,F3(this.cD));k=new g.yA(Z,k,N);g.By(this);Td(k.details);this.fp.handleError(k);
Z!=="html5.invalidstate"&&k.errorCode!=="fmt.unplayable"&&Z!=="fmt.unparseable"&&a&&this.dispose()}Vn(){var Z=hM(this.audioTrack),k=hM(this.videoTrack);Z={lct:this.getCurrentTime().toFixed(3),lsk:this.Jr.isSeeking(),lmf:this.V.V.isLocked(),lbw:PS(this.schedule).toFixed(3),lhd:qs(this.schedule).toFixed(3),lst:((this.schedule.j.c9()||0)*1E9).toFixed(3),laa:Z?Z.E3():"",lva:k?k.E3():"",lar:this.audioTrack.V?this.audioTrack.V.E3():"",lvr:this.videoTrack.V?this.videoTrack.V.E3():"",laq:`${$R(this.audioTrack)}`,
lvq:`${$R(this.videoTrack)}`};this.b3&&!this.b3.K3()&&this.b3.V&&this.b3.U&&(Z.lab=zd(this.b3.V.Us()),Z.lvb=zd(this.b3.U.Us()));this.O&&(Z.lapt=((0,g.z)()-this.O).toFixed(0),Z.lapr=KJf(this));this.vD&&(Z.lapmabht=((0,g.z)()-this.vD).toFixed(0),Z.lapmabh=Hn(this,this.audioTrack).toFixed(0));(k=this.U.Qz)&&(Z.reqBlocked=k);(k=this.U.xl)&&(Z.lsrt=((0,g.z)()-k).toFixed(0));this.Rq&&(Z.lapmvbht=((0,g.z)()-this.Rq).toFixed(0),Z.lapmvbh=Hn(this,this.videoTrack).toFixed(0));this.Sm&&(Z.lapsdai=((0,g.z)()-
this.Sm).toFixed(0));return Z}NW(){return this.V.V}NA(){try{this.policy.V&&this.U.mM(!1,"pending"),this.audioTrack.NA(),this.videoTrack.NA()}catch(Z){g.b(Z)}this.policy.Y=""}IM(Z){return this.videoTrack&&this.audioTrack?this.videoTrack.IM(Z)&&this.audioTrack.IM(Z):!0}P_(){return QK(this.N)}U6(Z,k,N=!1){this.fp.U6(Z,k,N)}S9(){return this.fp.S9()}Sh(Z,k){Z/=k;isNaN(this.timestampOffset)&&Hk(this,Z-Math.min(Z,this.policy.O1));let N=Z-this.timestampOffset;N<0&&!this.jY&&(this.jY=!0,this.U6("neg_ts",{ts:N.toFixed(3),
offset:this.timestampOffset.toFixed(3),wnd:X3(this.cD)||this.cD.Y8?"1":"0"}),this.fp.X().Yl().V.Aq(XHr)&&(Hk(this,Z-Math.min(Z,this.policy.O1)),N=Z-this.timestampOffset));return N*k}mx(){return this.timestampOffset}isSeeking(){return this.Jr.isSeeking()}vz(){this.Y.vz()}Qr(Z,k=!1,N={}){this.policy.V?this.L.Qr(Z,k,N):this.V.Qr(Z,k,N)}hI(){this.policy.U&&this.h0&&(this.U6("sdai",{skipAdSked:"1"}),this.h0=!1)}BV(Z,k){if(this.policy.U&&(this.h0||this.isSeeking()))return this.U6("sdai",{ignoreSkip:"1",
isSkip:this.h0,isSeek:this.isSeeking(),t:Z.toFixed(3)}),!1;const N=this.policy.U&&(this.policy.L||this.policy.x9),a=this.videoTrack.l3.index.pn(Z);let T=!1;if(N){if(T=!!this.zt?.Ik(Z,a,this.timestampOffset))Ms(this,Z,Z,a),this.uq&&this.uq?.Ik(Z,a)}else this.uq&&(T=!!this.Y.BV(Z,this.uq));if(!T)return this.handleError("ad.skipfailed",{dec:!!this.uq,t:Z.toFixed(3),sq:a}),!1;this.policy.U&&(this.U6("sdai",{skipAdStd:"1"}),this.h0=!0);this.policy.Ke&&this.tW?.clear();Hk(this,this.timestampOffset-k);OY(this);
this.policy.U&&(F3(this.cD),JM(this.audioTrack),JM(this.videoTrack),this.NA());return!0}A1(){Hk(this,this.timestampOffset-1E3);var Z=this.cD;const k=new Set;for(const a in Z.V){const T=Z.V[a].index;var N=T.yR();N&&!k.has(N)&&(N.startTime+=1E3,N.endTime=N.startTime+N.duration,k.add(N));T.segments.length&&(N=T.segments[T.segments.length-1],T.segments=[],T.segments.push(N))}this.uq&&this.uq.WS();this.policy.x9&&this.policy.U&&this.zt?.WS();IG(this.Y,0,0,!0);this.h0=!1}getManifest(){return this.cD}isOffline(){return!!this.fp.getVideoData().cotn}kQ(Z,
k){this.fp.kQ(Z,k)}vj(Z,k){if(this.policy.V)sZf(this,Z,!0,k),this.U.mM(!0,"utc"),this.F6();else if(k=this.fp.getVideoData().aU){var N=this.G;N.hQ=Z;N.aU=k;Wb(this)}}zq(Z){this.videoTrack.G=!1;this.audioTrack.G=!1;this.Jr.V=!1;this.fp.zq(Z)}Lo(Z){this.Jr.Lo(Z-this.mx())}d7(){this.fp.d7()}QJ(Z){Z!==this.policy.j9&&((this.policy.j9=Z)||this.Qm())}HF(Z){this.fp.HF(Z)}GK(Z){this.fp.GK(Z)}Ab(Z,k,N){this.zt?.Ab(Z,k,N);this.policy.L&&(this.U.C=void 0,this.Qm())}rF(Z){this.zt?.rF(Z)}iA(Z){this.policy.xW&&
this.fp.getVideoData().Rn()&&!Z.eV&&(this.U6("liveUmpMissing",{segmentNum:Z.Ne,headerId:Z.gR,startMs:Z.startMs,durationMs:Z.durationMs}),this.policy.xW=!1)}pD(Z,k){if(this.policy.L){const N=Z.vr?.[0],a=q9j(this.fp.getVideoData());this.zt?.pD(Z,k,this.uq||void 0,a,this.policy.ix?this.cD:void 0);this.U6("clidai",{onqlst:1,len:Z.vr?.length||0,rn:k,evt:ING(N?.lX?.event),cid:N?.lX?.identifier||"null",sq:N?.Ne||-1,trk:N?.trackType||"null",disr:a})}}q9(Z){this.policy.xW&&this.uq?.q9(Z)}prefetchKeyPlay(Z,
k){T$(this)&&(this.k5||(this.k5=new ryn(N=>{this.fp.dD(N)}),g.u(this,this.k5)),Hdf(this.k5,{g3:Z,
G5:k,Km:2}),this.Qm())}T7(){this.pF++}IB(){this.pF=0}rD(){return this.fp.getVideoData().C?(0,g.z)()-this.schedule.Sm>3E5&&this.pF>=3:!this.schedule.Sm}mq(){this.U.O.Eh=0}j9(){this.U.C=void 0}};var iiT=class extends g.n9{};var gbi=class extends iiT{constructor(Z,k,N,a){super();this.D=-1;this.V={};this.Y=new g.Uc(this.L,0,this);g.u(this,this.Y);this.U=new g.Uc(()=>{this.jm()||(this.Y.start(Math.random()*N),this.U.start(k))},Z,this);
g.u(this,this.U);a.subscribe("fairplay_next_need_key_info",this.G,this)}G(Z,k){if(Z&&k){var N=Number(cj(Z,"cpi"))*1+1;isNaN(N)||N<=0||N<this.D?(this.Y.stop(),this.U.stop(),this.D=-1,this.V={}):(N>this.D&&(this.D=N,g.ze(this.V)||(this.V={},this.Y.stop(),this.U.stop())),this.V[k]=Z,this.U.XN())}}L(){for(const T of Object.keys(this.V)){var Z=this.publish,k=this.D,N=g.YS(this.V[T]),a=N[6];const K=[];for(const y of a.split("&"))y.indexOf("cpi=")===0?K.push("cpi="+k.toString()):y.indexOf("ek=")===0?K.push("ek="+
g.Kg(T)):K.push(y);N[6]="?"+K.join("&");k="skd://"+N.slice(2).join("");a=k.length*2;N=new Uint8Array(a+4);N[0]=a%256;N[1]=(a-N[0])/256;for(a=0;a<k.length;++a)N[a*2+4]=k.charCodeAt(a);Z.call(this,"rotated_need_key_info_ready",new VJ(N,"fairplay",!0))}this.V={}}YW(){this.V={};super.YW()}};var wy_=class extends iiT{constructor(Z,k){super();this.D=Z;this.V=[];this.U=new g.Uc(()=>{this.publish("log_qoe",{wvagt:"timer",reqlen:this.V?this.V.length:-1});if(this.V){if(this.V.length>0){var N=this.V.shift();HD0(this,N.info)}this.V.length>0&&(N=this.V[0].time-(0,g.z)(),this.U.start(Math.max(0,N)))}},0);
g.u(this,this.U);k.subscribe("widevine_set_need_key_info",this.Y,this)}Y(Z){var k;a:{if((k=Z.cryptoPeriodIndex)&&this.V.length>0)for(var N of this.V)if(k===N.info.cryptoPeriodIndex){k=!0;break a}k=!1}if(!k){k=(0,g.z)();a:{N=Z.cryptoPeriodIndex;if(!isNaN(N))for(a of this.D.values())if(Math.abs(a.cryptoPeriodIndex-N)<=1){var a=!0;break a}a=!1}a?(a=Z.V,a=Math.max(0,Math.random()*((isNaN(a)?120:a)-30))*1E3):a=0;this.publish("log_qoe",{wvagt:`delay.${a}`,cpi:Z.cryptoPeriodIndex,reqlen:this.V.length});
a<=0?HD0(this,Z):(this.V.push({time:k+a,info:Z}),this.U.XN(a))}}YW(){this.V=[];super.YW()}};var wfb=class{constructor(){({url:N,interval:k,retries:Z}={});var Z,k,N;this.url=N;this.interval=k;this.retries=Z}};var XfG=class{constructor(Z,k){this.statusCode=Z;this.message=k;this.D=this.heartbeatParams=this.errorMessage=null;this.U=[];this.V={};this.nextFairplayKeyId=null}},LJU={DRM_TRACK_TYPE_AUDIO:"AUDIO",DRM_TRACK_TYPE_SD:"SD",DRM_TRACK_TYPE_HD:"HD",DRM_TRACK_TYPE_UHD1:"UHD1"};var DMX=class extends g.jR{constructor(Z,k,N="",a=!1){super();this.message=Z;this.requestNumber=k;this.timer=N;this.U=a;this.onError=this.onSuccess=null;this.V=new g.nV(5E3,2E4,.2)}};var $Rc=class extends g.n9{constructor(Z,k,N,a,T){super();this.videoData=Z;this.kW=k;this.C=N;this.sessionId=a;this.CC=T;this.L={};this.cryptoPeriodIndex=NaN;this.url="";this.requestNumber=0;this.O=this.zt=!1;this.Y=null;this.xW=[];this.D=[];this.authorizedFormats=[];this.N=[];this.j=!1;this.V={};this.status="";this.G=NaN;this.U=Z.L;this.cryptoPeriodIndex=N.cryptoPeriodIndex;Z={};Object.assign(Z,this.kW.V);Z.cpn=this.videoData.clientPlaybackNonce;this.videoData.zt&&(Z.vvt=this.videoData.zt,this.videoData.mdxEnvironment&&
(Z.mdx_environment=this.videoData.mdxEnvironment));this.kW.xW&&(Z.authuser=this.kW.xW);this.kW.pageId&&(Z.pageid=this.kW.pageId);isNaN(this.cryptoPeriodIndex)||(Z.cpi=this.cryptoPeriodIndex.toString());T=(T=/_(TV|STB|GAME|OTT|ATV|BDP)_/.exec(g.qG()))?T[1]:"";T==="ATV"&&(Z.cdt=T);this.L=Z;this.L.session_id=a;this.Vz=!0;this.U.flavor==="widevine"&&(this.L.hdr="1");this.U.flavor==="playready"&&(k=Number(Zf(k.experiments,"playready_first_play_expiration")),!isNaN(k)&&k>=0&&(this.L.mfpe=`${k}`),this.Vz=
!1);k="";g.nD(this.U)?this.U.V()?(a=N.U)&&(k="https://www.youtube.com/api/drm/fps?ek="+PTf(a)):(k=N.initData.subarray(4),k=new Uint16Array(k.buffer,k.byteOffset,k.byteLength/2),k=String.fromCharCode.apply(null,k).replace("skd://","https://")):k=this.U.D;this.baseUrl=k;this.fairplayKeyId=cj(this.baseUrl,"ek")||"";if(k=cj(this.baseUrl,"cpi")||"")this.cryptoPeriodIndex=Number(k);this.xW=N.oa?[g.fl(N.initData,4)]:N.D;Xt(this,{sessioninit:N.cryptoPeriodIndex});this.status="in"}Ph(Z){if(!(this.jm()||Z.size<=
0)){var k={};Z.forEach((N,a)=>{const T=pD(this.U)?a:N;a=new Uint8Array(pD(this.U)?N:a);pD(this.U)&&zay(a);N=g.fl(a,4);zay(a);a=g.fl(a,4);this.V[N]?this.V[N].status=T:this.V[a]?this.V[a].status=T:this.V[N]={type:"",status:T};eaN(this,this.V[N].type,k)});
oy0(this,",");Xt(this,{onkeystatuschange:1});this.status="kc";this.publish("keystatuseschange",this)}}error(Z,k,N,a){this.jm()||(this.publish("licenseerror",Z,k,N,a),Z==="drm.provision"&&(Z=(Date.now()-this.G)/1E3,this.G=NaN,this.publish("ctmp","provf",{et:Z.toFixed(3)})));Kf(k)&&this.dispose();this.CC&&(this.CC.dispose(),this.CC=void 0)}shouldRetry(Z,k){return!Z&&this.requestNumber===k.requestNumber}YW(){this.V={};super.YW()}Vn(){const Z={ctype:this.C.contentType||"",length:this.C.initData.length,
requestedKeyIds:this.xW,cryptoPeriodIndex:this.cryptoPeriodIndex};this.Y&&(Z.keyStatuses=this.V);return Z}getInfo(){let Z=this.D.join();if(Ft(this)){const k=new Set;for(const N in this.V)this.V[N].status!=="usable"&&k.add(this.V[N].type);Z+=`/UKS.${Array.from(k)}`}return Z+=`/${this.cryptoPeriodIndex}`}mH(){return this.url}};var uo=class extends g.jR{constructor(Z,k,N,a,T,K=!1){super();this.element=Z;this.C=k;this.initData=N;this.V=a;this.U=T;this.zt=K;this.sessionId="";this.j=this.G=this.D=this.L=null;this.Y=new g.tt(this);g.u(this,this.Y);bDy(this)}xW(Z){if(this.L){var k=Z.messageType||"license-request";this.L(new Uint8Array(Z.message),k)}}Ph(){this.j&&this.j(this.V.keyStatuses)}onClosed(){this.jm()||g.A5("xboxone")&&this.D&&this.D("closedShouldNotRetry")}O(Z){this.L&&this.L(Z.message,"license-request")}Vz(Z){if(this.D){if(this.U){var k=
this.U.error.code;Z=this.U.error.systemCode}else k=Z.errorCode,Z=Z.systemCode;this.D(`t.prefixedKeyError;c.${k};sc.${Z}`,k,Z)}}N(){this.G&&this.G()}update(Z){if(this.V)return this.V.update(Z).then(null,zK(k=>{pfy(this,"t.update",k)}));
this.U?this.U.update(Z):this.element.addKey?this.element.addKey(this.C.keySystem,Z,this.initData,this.sessionId):this.element.webkitAddKey&&this.element.webkitAddKey(this.C.keySystem,Z,this.initData,this.sessionId);return Y6()}YW(){this.V&&(this.zt?this.V.close().catch(g.L9):this.V.close());this.element=null;super.YW()}};var De=class extends g.jR{constructor(Z,k,N=!1){super();this.element=Z;this.V=k;this.G=N;this.L={};this.D=null;this.Y=new g.tt(this);this.U=this.mediaKeys=null;this.j=Promise.resolve();g.u(this,this.Y)}setServerCertificate(){return this.mediaKeys.setServerCertificate?this.V.flavor==="widevine"&&this.V.xO?this.mediaKeys.setServerCertificate(this.V.xO):this.V.V()&&this.V.fP?this.mediaKeys.setServerCertificate(this.V.fP):null:null}createSession(Z,k){let N=Z.initData;if(this.V.keySystemAccess){k&&k("createsession");
const a=this.mediaKeys.createSession();MM(this.V)?N=Iuy(N,this.V.fP):this.V.V()&&(N=clf(N)||new Uint8Array(0));k&&k("genreq");Z=a.generateRequest(Z.contentType,N);const T=new uo(null,null,null,a,null,this.G);Z.then(()=>{k&&k("genreqsuccess")},zK(K=>{pfy(T,"t.generateRequest",K)}));
return T}if(bn(this.V))return nyr(this,N);if(RZ(this.V))return jZf(this,N);this.element?.generateKeyRequest?this.element.generateKeyRequest(this.V.keySystem,N):this.element?.webkitGenerateKeyRequest(this.V.keySystem,N);return this.D=new uo(this.element,this.V,N,null,null,this.G)}Vz(Z){const k=lo(this,Z);k&&k.O(Z)}N(Z){const k=lo(this,Z);k&&k.Vz(Z)}C(Z){const k=lo(this,Z);k&&k.N(Z)}getMetrics(){let Z=null;if(this.mediaKeys&&this.mediaKeys.getMetrics)try{Z=this.mediaKeys.getMetrics()}catch{}return Z}YW(){this.U=
this.mediaKeys=null;this.D?.dispose();for(const Z of Object.values(this.L))Z.dispose();this.L={};super.YW();delete this.element}};var Oy=class{constructor(){this.keys=[];this.values=[]}get(Z){Z=this.findIndex(Z);return Z!==-1?this.values[Z]:null}remove(Z){Z=this.findIndex(Z);Z!==-1&&(this.keys.splice(Z,1),this.values.splice(Z,1))}removeAll(){this.keys=[];this.values=[]}set(Z,k){const N=this.findIndex(Z);N!==-1?this.values[N]=k:(this.keys.push(Z),this.values.push(k))}findIndex(Z){return g.NF(this.keys,k=>g.uT(Z,k))}};var Ft0=class extends g.n9{constructor(Z,k,N,a=null,T){super();this.element=Z;this.videoData=k;this.kW=N;this.mediaElement=a;this.CC=T;this.Y=[];this.Rq=2;this.hq=this.vD=!1;this.heartbeatParams=null;this.xW=this.Vz=!1;this.L=null;this.Sm=!1;this.V=this.videoData.L;this.drmSessionId=this.videoData.drmSessionId||g.uBy();this.D=new Map;this.G=new Oy;this.C=new Oy;this.zt=new g.tt(this);this.N=this.kW.B("html5_eme_ignore_teardown_errors");(Z=this.element)&&(Z.addKey||Z.webkitAddKey)||zL()||US(N.experiments);
this.kW.B("html5_enable_vp9_fairplay")&&this.V.V()?N=aS:(N=this.videoData.Al,N=this.V.flavor==="fairplay"||N?io:aS);this.j=N;this.kW.Yl().V.Aq(VzG)&&this.CC?(this.CC.mediaKeys||(this.CC.mediaKeys=new De(this.element,this.V,this.N)),this.mediaKeys=this.CC.mediaKeys):(this.mediaKeys=new De(this.element,this.V,this.N),g.u(this,this.mediaKeys));bn(this.V)&&(this.O=new De(this.element,this.V,this.N),g.u(this,this.O));g.u(this,this.zt);N=this.element;this.V.keySystemAccess?this.zt.K(N,"encrypted",this.O6):
We(this.zt,N,bn(this.V)?["msneedkey"]:["needkey","webkitneedkey"],this.qX);WJG(this);a:switch(Z=this.V,N=this.D,Z.flavor){case "fairplay":mp()>19.2999?(N=Z.HM,Z=Z.Eu,Z>=N&&(Z=N*.75),k=(N-Z)*.5,N=new gbi(k,N,N-k-Z,this)):N=null;break a;case "widevine":N=new wy_(N,this);break a;default:N=null}if(this.L=N)g.u(this,this.L),this.L.subscribe("rotated_need_key_info_ready",this.FS,this),this.L.subscribe("log_qoe",this.U,this);US(this.kW.experiments);this.U({cks:this.V.getInfo()})}O6(Z){this.U({onecpt:1});
Z.initData&&ZQi(this,new Uint8Array(Z.initData),Z.initDataType)}qX(Z){this.U({onndky:1});ZQi(this,Z.initData,Z.contentType)}Gq(Z){this.U({onneedkeyinfo:1});this.kW.B("html5_eme_loader_sync")&&(this.C.get(Z.initData)||this.C.set(Z.initData,Z));YSf(this,Z)}FS(Z){this.Y.push(Z);Bk(this)}createSession(Z){var k=kCf(this)?D0X(Z):g.fl(Z.initData);this.D.get(k);this.xW=!0;Z=new $Rc(this.videoData,this.kW,Z,this.drmSessionId,this.CC);this.D.set(k,Z);Z.subscribe("ctmp",this.tq,this);Z.subscribe("keystatuseschange",
this.Ph,this);Z.subscribe("licenseerror",this.Js,this);Z.subscribe("newlicense",this.Kp,this);Z.subscribe("newsession",this.Qz,this);Z.subscribe("sessionready",this.s6,this);Z.subscribe("fairplay_next_need_key_info",this.MX,this);this.kW.B("html5_enable_vp9_fairplay")&&Z.subscribe("qualitychange",this.dA,this);Z.subscribe("sabrlicenseconstraint",this.pF,this);k=this.mediaKeys;Xt(Z,{createkeysession:1});Z.status="gr";uJ("drm_gk_s",void 0,Z.videoData.Vz);Z.url=har(Z);Z.kW.Yl().V.Aq($Mf)&&Z.CC?.V&&Z.CC?.licenseRequest?
(Z.Y=Z.CC.V,luj(Z,Z.CC.V,Z.CC,Z.CC.certificate),Vm(Z,Z.CC.licenseRequest,"license-request")):(Z.Y=gyj(Z,k,Z.CC?.certificate),g.u(Z,Z.Y))}Kp(Z){this.jm()||(this.U({onnelcswhb:1}),Z&&!this.heartbeatParams&&(this.heartbeatParams=Z,this.publish("heartbeatparams",Z)))}Qz(){this.jm()||(this.U({newlcssn:1}),this.Y.shift(),this.xW=!1,Bk(this))}s6(){if(bn(this.V)&&(this.U({onsnrdy:1}),this.Rq--,this.Rq===0)){var Z=this.O;Z.element?.msSetMediaKeys?.(Z.U)}}Ph(Z){if(!this.jm()){this.Sm||(this.Sm=!0,this.kW.Xa()&&
Nr0(this));this.U({onksch:1});var k=this.dA;if(!Ft(Z)&&g.Z3&&Z.U.keySystem==="com.microsoft.playready"&&navigator.requestMediaKeySystemAccess)var N="large";else{N=[];var a=!0;if(Ft(Z))for(const K of Object.keys(Z.V))Z.V[K].status==="usable"&&N.push(Z.V[K].type),Z.V[K].status!=="unknown"&&(a=!1);if(!Ft(Z)||a)N=Z.D;N=xMN(N);Z.kW.Yl().V.Aq(LJ)&&Z.CC?.certificate&&N<="large"&&Z.D.length===0&&Xt(Z,{best_qual:N},!0)}k.call(this,N);if(Z.kW.B("html5_enable_vp9_fairplay")&&Z.U.V())var T=Z.N;else{if(!Ft(Z)){k=
{};for(T of Z.D)eaN(Z,T,k)}T=Z.authorizedFormats}this.videoData.authorizedFormats=T;this.publish("keystatuseschange",Z)}}tq(Z,k){this.jm()||this.publish("ctmp",Z,k)}MX(Z,k){this.jm()||this.publish("fairplay_next_need_key_info",Z,k)}Js(Z,k,N,a){this.jm()||(this.videoData.B("html5_log_drm_metrics_on_error")&&Nr0(this),this.publish("licenseerror",Z,k,N,a))}qw(){this.kW.Yl().V.Aq(LJ)&&this.CC?.certificate&&this.U({lic_qual_cap:this.j.V},!0);return this.j}dA(Z){const k=g.dg("auto",Z,!1,"l");if(this.videoData.Al){if(this.j.equals(k))return}else if(q5j(this.j,
Z))return;this.j=k;this.publish("qualitychange");this.U({updtlq:Z})}pF(Z){this.videoData.sabrLicenseConstraint=Z}YW(){this.V.keySystemAccess&&this.element&&!this.mediaElement?.u3?.EQ()&&(this.N?this.element.setMediaKeys(null).catch(g.L9):this.element.setMediaKeys(null));this.element=null;this.Y=[];for(const Z of this.D.values())Z.unsubscribe("ctmp",this.tq,this),Z.unsubscribe("keystatuseschange",this.Ph,this),Z.unsubscribe("licenseerror",this.Js,this),Z.unsubscribe("newlicense",this.Kp,this),Z.unsubscribe("newsession",
this.Qz,this),Z.unsubscribe("sessionready",this.s6,this),Z.unsubscribe("fairplay_next_need_key_info",this.MX,this),this.kW.B("html5_enable_vp9_fairplay")&&Z.unsubscribe("qualitychange",this.dA,this),Z.dispose();this.D.clear();this.G.removeAll();this.C.removeAll();this.heartbeatParams=null;super.YW()}Vn(){const Z={systemInfo:this.V.Vn(),sessions:[]};for(const k of this.D.values())Z.sessions.push(k.Vn());return Z}getInfo(){return this.D.size<=0?"no session":`${this.D.values().next().value.getInfo()}${this.L?
"/KR":""}`}U(Z,k=!1){this.jm()||(Td(Z),(this.kW.Xa()||k)&&this.publish("ctmp","drmlog",Z))}Tt(){let Z=void 0,k=void 0;for(const N of this.D.values())Z||(Z=Jly(N,"SD")),k||(k=Jly(N,"AUDIO"));this.U({sd:Z,audio:k});return Z==="output-restricted"||k==="output-restricted"}};var xRr=class extends g.jR{constructor(Z){super();this.fp=Z;this.Wz=0;this.U=this.L=!1;this.Y=0;this.Jq=this.fp.X();this.videoData=this.fp.getVideoData();this.D=g.Q5(this.Jq.experiments,"html5_delayed_retry_count");this.V=new g.Uc(()=>{this.fp.ZQ()},g.Q5(this.Jq.experiments,"html5_delayed_retry_delay_ms"));
g.u(this,this.V)}ow(){return!!this.Wz}t7(){return this.U}handleError(Z){q$b(this,Z);if((Z.errorCode!=="html5.invalidstate"&&Z.errorCode!=="fmt.unplayable"&&Z.errorCode!=="fmt.unparseable"||!Dy(this,Z.errorCode,Z.details))&&!mZf(this,Z)&&!sOU(this)){if(this.Jq.Vz!=="yt"&&CSf(this,Z)&&this.videoData.NW&&(0,g.z)()/1E3>this.videoData.NW&&BZ(this.videoData)){var k=Object.assign({e:Z.errorCode},Z.details);k.stalesigexp="1";k.expire=Math.round(this.videoData.NW*1E3);k.init=Math.round(this.videoData.KR);
k.now=Math.round((0,g.z)());Z=new g.yA(Z.errorCode,k,2);this.fp.N4(Z.errorCode,2,"SIGNATURE_EXPIRED",Td(Z.details))}if(Kf(Z.severity)){k=this.fp.loader?.NW();let a;if(this.Jq.B("html5_use_network_error_code_enums"))if(r4b(Z)&&k&&k.isLocked())var N="FORMAT_UNAVAILABLE";else this.Jq.G||Z.errorCode!=="auth"||Z.details.rc!==429?Z.errorCode==="ump.spsrejectfailure"&&(N="HTML5_SPS_UMP_STATUS_REJECTED"):(N="TOO_MANY_REQUESTS",a="6");else r4b(Z)&&k&&k.isLocked()?N="FORMAT_UNAVAILABLE":this.Jq.G||Z.errorCode!==
"auth"||Z.details.rc!=="429"?Z.errorCode==="ump.spsrejectfailure"&&(N="HTML5_SPS_UMP_STATUS_REJECTED"):(N="TOO_MANY_REQUESTS",a="6");this.fp.N4(Z.errorCode,Z.severity,N,Td(Z.details),a)}else this.fp.publish("nonfatalerror",Z),N=/^pp/.test(this.videoData.clientPlaybackNonce),this.dV(Z.errorCode,Z.details),N&&Z.errorCode==="manifest.net.connect"&&(Z=`https://www.youtube.com/generate_204?cpn=${this.videoData.clientPlaybackNonce}&t=${(0,g.z)()}`,Kn(Z,"manifest",a=>{this.U6("pathprobe",a)},a=>{this.dV(a.errorCode,
a.details)}))}}U6(Z,k){this.fp.WA.U6(Z,k)}dV(Z,k){k=Td(k);
this.fp.WA.dV(Z,k)}};var fdf=class{constructor(Z,k,N,a,T){this.V=Z;this.reason=k;this.U=N;this.source=a;this.token=T}};var Gfi=class{constructor(Z,k,N,a){this.kW=Z;this.AS=k;this.fp=N;this.SY=a;this.C=this.G=this.V=this.Y=this.j=this.U=0;this.L=!1;this.N=g.Q5(this.kW.experiments,"html5_displayed_frame_rate_downgrade_threshold")||45;this.D=new Map}R3(Z){const k=A4f(this);if(!Z)return{xB:io,yY:io,Du:io,JC:io,oo:io,Ly:io,vW:k};let N=io;if(Ls(k)||this.B("html5_perf_cap_override_sticky"))N=$T(this,Z);return{xB:N,yY:HQr(this,Z),Du:PSb(this,Z),JC:gi(this,Z.videoData),oo:wi(this,Z.videoData,Z),Ly:G$(this,Z),vW:k}}JX(Z){if(g.Qw(this.kW)&&
vo(this.kW.L,ex.HEIGHT))var k=Z.V.videoInfos[0].video.qualityOrdinal;else{var N=this.M_(Z.V.V());ie(Z.videoData)||yn(Z.videoData);Z=Z.V.videoInfos;if(Z.length){var a=.85,T=Z[0].video;T.projectionType!=="MESH"&&T.projectionType!=="EQUIRECTANGULAR"&&T.projectionType!=="EQUIRECTANGULAR_THREED_TOP_BOTTOM"||gr||(a=.45);T=g.Q5(this.kW.experiments,"html5_viewport_undersend_maximum");for(let K=0;K<Z.length;K++){k=Z[K];const y=k.video;if(N===null||y.width*a<N.width&&y.height*a<N.height){T&&K&&y.width<N.width*
T&&y.height<N.height*T&&(k=Z[K-1]);break}}N=k.video;k=new Ho(0,k.itag==="93"?g.ff[Bz(N.width,N.height)]:N.qualityOrdinal,!1,"r")}else k=io;k=k.V}k&&(k=Math.max(k,360));return new Ho(0,k,!1,"r")}M_(Z){let k;g.ml(this.kW)&&(k=window.screen&&window.screen.width?new g.i0(window.screen.width,window.screen.height):null);k||(k=this.kW.LA?this.kW.LA.clone():this.AS.SL());(VL||Ka||Z)&&k.scale(g.lS());return k}B(Z){return this.kW.B(Z)}};var eUi=class extends g.jR{constructor(Z){super();this.provider=Z;this.V=-1;this.L=!1;this.U=-1;this.playerState=new g.QR;this.networkErrorCount=this.rebufferTimeSecs=this.playTimeSecs=this.Y=0;this.encounteredSabrFallback=!1;this.seekCount=this.nonNetworkErrorCount=0;this.delay=new g.Uc(this.send,6E4,this);this.D=!1;this.jsErrorCount=0;this.nF={Uy:()=>{this.Uy()}};
this.Uy=()=>{this.jsErrorCount++};
g.u(this,this.delay);window.addEventListener("error",this.Uy);window.addEventListener("unhandledrejection",this.Uy)}CZ(){const Z=g.j_(this.provider);this.V<0&&(this.V=Z,this.delay.start());this.Y=this.U=Z}onError(Z){if(Z!=="player.fatalexception"||this.provider.B("html5_exception_to_health"))Z==="sabr.fallback"&&(this.encounteredSabrFallback=!0),Z.match(Srr)?this.networkErrorCount++:this.nonNetworkErrorCount++}send(){if(!(this.D||this.V<0)){lfb(this);var Z=g.j_(this.provider)-this.V,k="PLAYER_PLAYBACK_STATE_UNKNOWN",
N=this.playerState.RJ;this.playerState.isError()?k=N&&N.errorCode==="auth"?"PLAYER_PLAYBACK_STATE_UNKNOWN":"PLAYER_PLAYBACK_STATE_ERROR":this.playerState.V(2)?k="PLAYER_PLAYBACK_STATE_ENDED":this.playerState.V(64)?k="PLAYER_PLAYBACK_STATE_UNSTARTED":this.playerState.V(16)||this.playerState.V(32)?k="PLAYER_PLAYBACK_STATE_SEEKING":this.playerState.V(1)&&this.playerState.V(4)?k="PLAYER_PLAYBACK_STATE_PAUSED_BUFFERING":this.playerState.V(1)?k="PLAYER_PLAYBACK_STATE_BUFFERING":this.playerState.V(4)?k=
"PLAYER_PLAYBACK_STATE_PAUSED":this.playerState.V(8)&&(k="PLAYER_PLAYBACK_STATE_PLAYING");N=hBG[nL(this.provider.videoData)];a:switch(this.provider.kW.playerCanaryState){case "canary":var a="HTML5_PLAYER_CANARY_TYPE_EXPERIMENT";break a;case "holdback":a="HTML5_PLAYER_CANARY_TYPE_CONTROL";break a;default:a="HTML5_PLAYER_CANARY_TYPE_UNSPECIFIED"}var T=hiX(this.provider),K=this.U<0?Z:this.U-this.V;Z=this.provider.kW.PG+36E5<(0,g.z)();k={started:this.U>=0,stateAtSend:k,joinLatencySecs:K,jsErrorCount:this.jsErrorCount,
playTimeSecs:this.playTimeSecs,rebufferTimeSecs:this.rebufferTimeSecs,seekCount:this.seekCount,networkErrorCount:this.networkErrorCount,nonNetworkErrorCount:this.nonNetworkErrorCount,playerCanaryType:a,playerCanaryStage:T,isAd:this.provider.videoData.isAd(),liveMode:N,hasDrm:!!g.RD(this.provider.videoData),isGapless:this.provider.videoData.j,isServerStitchedDai:this.provider.videoData.enableServerStitchedDai,encounteredSabrFallback:this.encounteredSabrFallback,isSabr:nQ(this.provider.videoData)};
Z||g.TO("html5PlayerHealthEvent",k);this.D=!0;this.dispose()}}YW(){this.D||this.send();window.removeEventListener("error",this.Uy);window.removeEventListener("unhandledrejection",this.Uy);super.YW()}},Srr=/\bnet\b/;var obT=class{constructor(Z){this.provider=Z;this.C=!1;this.U=0;this.Y=-1;this.Hh=NaN;this.D=0;this.segments=[];this.j=this.G=0;this.previouslyEnded=!1;this.L=0;this.rE=this.pX=void 0;this.nF={A1a:()=>this.pX,
N_S:()=>this.rE};
this.Vz=this.provider.fp.getVolume();this.N=this.provider.fp.isMuted()?1:0;this.V=eo(this.provider)}update(){if(this.C){var Z=this.ym()||0,k=g.j_(this.provider);Z>=this.provider.fp.getDuration()-.1&&(this.previouslyEnded=!0);if(Z!==this.U||OQy(this,Z,k)){var N;if(!(N=Z<this.U||Z-this.U>k-this.Hh+2||OQy(this,Z,k))){{N=this.provider.fp.getVolume();const a=N!==this.Vz,T=this.provider.fp.isMuted()?1:0;T!==this.N?(this.N=T,N=!0):(!a||this.Y>=0||(this.Vz=N,this.Y=k),N=k-this.Y,this.Y>=0&&N>2?(this.Y=-1,
N=!0):N=!1)}}N&&(og(this),this.D=Z);this.Hh=k;this.U=Z}}}ym(){const Z=this.provider.fp.ym();return w9(this.provider.videoData)?Z+this.provider.fp.mx():Z}};var GCb=class{constructor(Z,k,N,a){this.kW=k;this.r5=N;this.segments=[];this.experimentIds=[];this.MX=this.xl=this.isFinal=this.delayThresholdMet=this.O6=this.hp=this.autoplay=this.autonav=!1;this.HA="yt";this.G=[];this.j=this.N=null;this.pF=this.sendVisitorIdHeader=this.Kp=!1;this.C=this.pageId="";this.Ap=!1;this.L=N==="watchtime";this.D=N==="playback";this.xW=N==="atr";this.gD=N==="engage";this.sendVisitorIdHeader=!1;this.uri=this.xW?`/api/stats/${N}`:"//"+k.lf+"/api/stats/"+N;a&&(this.xl=a.fs,
a.rtn&&(this.j=a.rtn),this.L?(this.playerState=a.state,a.rti>0&&(this.N=a.rti)):(this.LC=a.mos,this.j9=a.volume,a.at&&(this.adType=a.at)),a.autonav&&(this.autonav=a.autonav),a.inview!=null&&(this.iq=a.inview),a.size&&(this.jY=a.size),a.playerwidth&&(this.NW=a.playerwidth),a.playerheight&&(this.Ke=a.playerheight));this.tW=g.Rn(k.V);this.C=Zf(k.experiments,"html5_log_vss_extra_lr_cparams_freq");if(this.C==="all"||this.C==="once")this.qX=g.Rn(k.pF);this.gQ=k.LC;this.experimentIds=pXX(k.experiments);
this.tq=k.ov;this.HA=k.Vz;this.region=k.region;this.userAge=k.userAge;this.s6=k.ix;this.ov=Qb();this.sendVisitorIdHeader=k.sendVisitorIdHeader;this.dA=k.B("vss_pings_using_networkless")||k.B("kevlar_woffle");this.PG=k.B("vss_final_ping_send_and_write");this.FS=k.B("vss_use_send_and_write");this.pageId=k.pageId;this.hI=k.B("vss_playback_use_send_and_write");k.livingRoomAppMode&&(this.livingRoomAppMode=k.livingRoomAppMode);g.PQ(k)&&(this.Sm=k.dA);g.xq(g.dr(k))&&this.G.push(1);this.accessToken=Z.G();
Z.Qu[this.r5]?this.Y=Z.Qu[this.r5]:Z.Qu.playback&&(this.Y=Z.Qu.playback);this.adFormat=Z.adFormat;this.adQueryId=Z.adQueryId;this.autoplay=YTN(Z);this.D&&(this.hp=Z.RV&&NN(Z)==="adunit"?!0:!1);this.autonav=Z.isAutonav||this.autonav;this.contentVideoId=mg(Z);this.clientPlaybackNonce=Z.clientPlaybackNonce;this.O6=Z.o4;Z.Pq&&(this.O=Z.Pq,this.Tt=Z.ZT);Z.mdxEnvironment&&(this.mdxEnvironment=Z.mdxEnvironment);this.V=Z.r5;this.g8=Z.g8;Z.U&&(this.FN=Z.U.itag,Z.Y&&Z.Y.itag!==this.FN&&(this.hq=Z.Y.itag));
Z.V&&tQ(Z.V)&&(this.offlineDownloadUserChoice="1");this.eventLabel=NN(Z);this.MX=Z.bq?!1:Z.Ap;this.e8=Z.d9;if(k=nL(Z))this.gV=k;this.rD=Z.LA;this.partnerId=Z.partnerId;this.eventId=Z.eventId;this.playlistId=Z.PO||Z.playlistId;this.lQ=Z.lQ;this.fX=Z.fX;this.sx=Z.sx;this.C7=Z.C7;this.subscribed=Z.subscribed;this.videoId=Z.videoId;this.videoMetadata=Z.videoMetadata;this.visitorData=Z.visitorData;this.osid=Z.osid;this.Lg=Z.Lg;this.referrer=Z.referrer;this.VA=Z.qb||Z.VA;this.Qz=Z.J0;this.zf=Z.zf;this.userGenderAge=
Z.userGenderAge;this.xu=Z.xu;this.embedsRct=Z.embedsRct;this.embedsRctn=Z.embedsRctn;g.PQ(this.kW)&&Z.mutedAutoplay&&(Z.mutedAutoplayDurationMode===2&&Z.limitedPlaybackDurationInSeconds===0&&Z.endSeconds===0?this.G.push(7):this.G.push(2));Z.isEmbedsShortsMode(new g.i0(this.NW,this.Ke),!!this.playlistId)&&this.G.push(3);g.rv(Z)&&this.G.push(4);this.Rq=Z.Xh;Z.compositeLiveIngestionOffsetToken&&(this.compositeLiveIngestionOffsetToken=Z.compositeLiveIngestionOffsetToken);this.heartbeatLoggingToken=Z.heartbeatLoggingToken;
Z=Z.getPlayerResponse();this.Ap=this.kW.B("html5_switch_vss_to_post")||!!Z?.playerConfig?.vssClientConfig?.vssUsePostRequest}send(Z){if(!this.Kp){var k=TC(this),N=g.mW(this.uri,k);this.kW.B("vss_through_gel_double")&&iQb(N);this.xW&&!this.kW.B("html5_simplify_pings")?g2f(this,N):Jq(this,Z).then(a=>{if(this.Ap){a=a||{};a.method="POST";const T=wQX(this);T&&(a.postParams={form_data:T})}this.xW&&(a=a||{},a.method="POST",a.postParams={atr:this.attestationResponse});bP(N,a,{token:this.O,m2:this.Tt,mdxEnvironment:this.mdxEnvironment},
this.kW,Z,this.dA,this.isFinal&&this.PG||this.FS||this.D&&this.hI)});
this.Kp=!0}}U(Z){Z===void 0&&(Z=NaN);return Number(Z.toFixed(3)).toString()}},jrb={LIVING_ROOM_APP_MODE_UNSPECIFIED:0,LIVING_ROOM_APP_MODE_MAIN:1,LIVING_ROOM_APP_MODE_KIDS:2,LIVING_ROOM_APP_MODE_MUSIC:3,LIVING_ROOM_APP_MODE_UNPLUGGED:4,LIVING_ROOM_APP_MODE_GAMING:5},Iwf={EMBEDDED_PLAYER_MODE_UNKNOWN:0,EMBEDDED_PLAYER_MODE_DEFAULT:1,EMBEDDED_PLAYER_MODE_PFP:2,EMBEDDED_PLAYER_MODE_PFL:3};var MbN=class extends g.jR{constructor(Z){super();this.provider=Z;this.N="paused";this.L=NaN;this.xW=[10,10,10,40];this.dA=this.Vz=0;this.vD=this.Rq=this.Sm=this.FS=this.Y=!1;this.D=this.U=NaN;this.logger=new g.bI("vss");this.nF={Qa3:()=>this.V};
this.V=new obT(Z)}CZ(){if(!this.Y){this.provider.videoData.JJ===16623&&g.L9(Error("Playback for EmbedPage"));var Z=z$(this,"playback");this.xW=S$0(this);DZy(this.V);Z.j=UF(this);this.D>0&&(Z.V-=this.D);Z.send();if(this.provider.videoData.cg){Z=this.provider.kW;var k=this.provider.videoData;const N={html5:"1",video_id:k.videoId,cpn:k.clientPlaybackNonce,ei:k.eventId,ptk:k.cg,oid:k.U$,ptchn:k.zg,pltype:k.o6,content_v:mg(k)};k.xt&&Object.assign(N,{m:k.xt});Z=g.mW(Z.Bo+"ptracking",N);bo(this,Z)}this.provider.videoData.g8||
(J4X(this),ziy(this));this.Y=!0;Z=this.V;Z.U=Z.ym();Z.Hh=g.j_(Z.provider);!(Z.D===0&&Z.U<5)&&Z.U-Z.D>2&&(Z.D=Z.U);Z.C=!0}}G(){g.DA(this.L);this.L=NaN}j(Z=!1){og(this.V,Z)}O(){this.V.update();var Z=this.V;Z.segments.length&&Z.U===Z.D||og(Z);const k=Z.segments;Z.segments=[];Z.L=0;return k}Kp(Z){var k=this.V,N=Z.rE;k.pX=Z.pX;k.rE=N}C(Z,k=!1){const N=eii(this,this.O());!isNaN(this.U)&&Z&&(N.N=this.U);k&&(N.pF=!0);return N}onProgress(){this.V.update();o2f(this)&&(J4X(this),ziy(this))}zt(Z){if(!this.jm())if(Z.state.V(2)||
Z.state.V(512)){if(this.N="paused",Z.Ub(2)||Z.Ub(512))Z.Ub(2)&&(this.V.previouslyEnded=!0),this.Y&&(this.G(),pJ(this).send(),this.U=NaN)}else if(Z.state.V(8)){this.N="playing";const k=this.Y&&isNaN(this.L)?UF(this):NaN;if(!isNaN(k)&&($Z(Z,64)<0||$Z(Z,512)<0)){const N=this.C(!1);N.j=k;N.send()}Z.Ub(16)&&Z.state.seekSource===58&&(this.V.previouslyEnded=!0)}else this.N="paused"}YW(){super.YW();this.G();Br0(this.V)}Vn(){return TC(z$(this,"playback"))}UQ(Z){const k=z$(this,"engage");k.zt=Z;return $ZU(k,
bQR(this.provider))}tq(){const Z=this.V.L,k=this.provider.kW.Yl().V.Aq(JKf)||4E3;Z>k&&this.C(!isNaN(this.U)).send()}MX(){this.Vz=0}};var RiN=class{constructor(){this.endTime=this.startTime=-1;this.D="-";this.playbackRate=1;this.visibilityState=0;this.audioId="";this.volume=this.connectionType=this.U=0;this.muted=!1;this.V=this.clipId="-";this.Y=this.previouslyEnded=!1}isEmpty(){return this.endTime===this.startTime}};var n2r=class{constructor(Z,k,N){this.videoData=Z;this.kW=k;this.fp=N;this.V=void 0}B(Z){return this.kW.B(Z)}getCurrentTime(){return this.fp.getCurrentTime()}ym(){return this.fp.ym()}},pQf={other:1,none:2,wifi:3,cellular:7,ethernet:30};g.vH=class extends g.jR{constructor(Z){super();this.provider=Z;this.D=new Map;this.wV=new g.QR;this.nF={KqA:()=>this.qoe,
kF6:()=>this.V,
J1D:()=>this.U};
this.provider.videoData.cG()&&!this.provider.videoData.A1&&(this.V=new MbN(this.provider),this.V.D=0,g.u(this,this.V),this.qoe=new g.BH(this.provider),g.u(this,this.qoe),this.provider.videoData.enableServerStitchedDai&&(this.w_=this.provider.videoData.clientPlaybackNonce)&&this.D.set(this.w_,this.V));if(Z.kW.playerCanaryState==="canary"||Z.kW.playerCanaryState==="holdback")this.U=new eUi(this.provider),g.u(this,this.U)}CZ(){this.V&&this.V.CZ();this.U&&this.U.CZ()}onProgress(){if(this.provider.videoData.enableServerStitchedDai&&
this.w_)this.D.get(this.w_)?.onProgress();else if(this.V)this.V.onProgress()}A$(Z){this.qoe&&this.qoe.A$(Z)}Zw(Z,k){this.qoe&&this.qoe.Zw(Z,k)}IC(){this.provider.videoData.enableServerStitchedDai&&this.w_?this.D.get(this.w_)?.j():this.V&&this.V.j()}dV(Z,k){this.qoe&&$qN(this.qoe,Z,k);if(this.U)this.U.onError(Z)}Ld(Z,k){switch(Z){case "M":this.qoe?.Ld(Z,k);break;case "A":this.qoe?.Ld(Z)}}onPlaybackRateChange(Z){if(this.qoe)this.qoe.onPlaybackRateChange(Z);this.V&&this.V.j()}U6(Z,k,N){this.qoe&&this.qoe.U6(Z,
k,N)}Cc(Z,k,N){this.qoe&&this.qoe.Cc(Z,k,N)}dN(Z){this.qoe?.dN(Z)}g2(Z){this.qoe?.g2(Z)}M8(Z,k,N,a){this.qoe?.M8(Z,k,N,a)}GK(Z){this.qoe&&this.qoe.GK(Z)}GU(Z,k,N){this.qoe&&this.qoe.GU(Z,k,N)}g7(){if(this.qoe)return this.qoe.g7()}Vn(){return this.provider.videoData.enableServerStitchedDai&&this.w_?this.D.get(this.w_)?.Vn()??{}:this.V?this.V.Vn():{}}Q9(){return this.qoe?.Q9()}mf(Z,k){this.qoe?.mf(Z,k)}UQ(Z){return this.V?this.V.UQ(Z):()=>{}}getVideoData(){return this.provider.videoData}resume(){this.qoe&&
this.qoe.resume()}};
g.vH.prototype.CH=NR(49);g.vH.prototype.AQ=NR(32);g.vH.prototype.F8=NR(26);g.vH.prototype.eU=NR(20);var JyF=class{constructor(){this.PT=0;this.Y=this.D=this.eR=this.uC=this.U=NaN;this.V={};this.bandwidthEstimate=NaN}};var zU_=class{constructor(){this.V=g.Fi;this.array=[]}};g.iw=class extends g.jR{constructor(Z,k){super();this.fp=Z;this.j=k;this.D=NaN;this.L=this.G=this.started=!1;this.U=[];this.C=new g.Uc(this.sync,250,this);g.u(this,this.C);this.Y=new g.Uc(this.sync,0,this);g.u(this,this.Y);this.V=new zU_}f8(Z,k){this.sync();k&&this.V.array.length>=2E3&&this.zx("captions",1E4);k=this.V;if(Z.length>1&&Z.length>k.array.length)k.array=k.array.concat(Z),k.array.sort(k.V);else for(const N of Z)!k.array.length||k.V(N,k.array[k.array.length-1])>0?k.array.push(N):g.lT(k.array,
N,k.V);this.D=NaN;this.sync()}h$(Z){Z.length>1E4&&g.L9(new g.jD("Over 10k cueRanges removal occurs with a sample: ",Z[0]));if(!this.jm()){var k=new Set(Z);this.U=this.U.filter(N=>!k.has(N));
akX(this.V,k);this.sync()}}iW(Z){if(!this.jm()){var k=this.jO().find(N=>N.id===void 0&&N.namespace===Z);
k&&this.h$([k])}}zx(Z,k){const N=(isNaN(this.D)?T9r(this):this.D)-k;k=this.jO().filter(a=>a.namespace===Z&&a.end<N);
this.h$(k);return k}jO(){return this.jm()?[]:this.V.array}reset(){this.started=!1;this.Y.stop();this.V.array=[];this.U=[];this.sync()}jl(Z){const k=this.jO().filter(N=>N.namespace===Z);
this.h$(k);return k}yQ(Z){let k=[];var N=nJ(this.V,0x7ffffffffffff);const a=[];for(const T of N)T.active&&Z===T.associatedClipId&&a.push(T);k=k.concat(Ig(this,a));jo(this,k);k=[];N=[];for(const T of this.U)T.active&&T.associatedClipId===Z&&T.start===0x7ffffffffffff&&N.push(T);k=k.concat(EF(this,N));jo(this,k);return a.length}zA(Z){const k=nJ(this.V,0x7ffffffffffff),N=[];for(const a of k)a.active&&Z===a.associatedClipId&&N.push(a);this.h$(N)}sync(){this.L=!0;if(!this.G){for(var Z=3;this.L&&Z;)this.L=
!1,this.G=!0,Kgf(this),this.G=!1,Z--;this.fp.getPlayerState().isPlaying()&&(Z=N9y(this.V,this.D),!isNaN(Z)&&Z<0x7ffffffffffff&&(Z=(Z-this.D)/this.fp.getPlaybackRate(),this.Y.start(Z)))}}isEnded(Z,k){k=this.fp.Ja()*1E3-k;k=this.fp.w9()&&Z.V(1)&&k<500;return Z.V(2)||this.fp.X().B("html5_pseudogapless_shorts")&&k}YW(){this.U=[];this.V.array=[];super.YW()}};g.iw.prototype.S7=NR(38);var URB=class{constructor(Z){this.kW=Z;this.D=this.U=this.mediaTime=NaN;this.Y=this.V=!1;this.L=.001;g.Qw(Z)&&(this.L=.01)}};var QDG=class{constructor(Z,k){this.videoData=Z;this.V=k}};var bii=class{constructor(Z){this.data=window.Float32Array?new Float32Array(Z):Array(Z);this.U=this.V=Z-1}add(Z){this.V=(this.V+1)%this.data.length;this.data[this.V]=Z}D(){return this.data[this.V]||0}forEach(Z){for(var k=this.V+1;k<this.data.length;k++)Z(this.data[k]||0);for(k=0;k<=this.V;k++)Z(this.data[k]||0)}Y(){const Z=[];for(;this.U!==this.V;)this.U=(this.U+1)%this.data.length,Z.push(this.data[this.U]);return Z}clear(){const Z=this.data.length;for(let k=0;k<Z;k++)this.data[k]=0;this.U=this.V=
this.data.length-1}};var VIf=class{constructor(Z){this.L=Z;this.D=this.U=0;this.Y=new bii(50)}};var Fgf=class extends g.n9{constructor(Z,k,N){super();this.videoData=Z;this.experiments=k;this.L=N;this.U=[];this.jW=0;this.D=!0;this.Y=!1;this.G=0;N=new pyK;Z.latencyClass==="ULTRALOW"&&(N.C=!1);Z.ES?N.D=3:g.jI(Z)&&(N.D=2);Z.latencyClass==="NORMAL"&&(N.L=!0);N.Vz=nQ(Z);if(Z.latencyClass==="LOW"||Z.latencyClass==="ULTRALOW")N.L=!0;var a=g.Q5(k,"html5_liveness_drift_proxima_override");zY(Z)!==0&&a&&(N.V=a,Z.V?.Kp()&&N.V--);nQ(Z)&&k.yz("html5_sabr_parse_live_metadata_playback_boundaries")&&(N.O=!0);
if(g.A5("trident/")||g.A5("edge/"))a=g.Q5(k,"html5_platform_minimum_readahead_seconds")||3,N.Y=Math.max(N.Y,a);g.Q5(k,"html5_minimum_readahead_seconds")&&(N.Y=g.Q5(k,"html5_minimum_readahead_seconds"));g.Q5(k,"html5_maximum_readahead_seconds")&&(N.N=g.Q5(k,"html5_maximum_readahead_seconds"));if(k=g.Q5(k,"html5_liveness_drift_chunk_override"))N.V=k;JE(Z)&&(N.V=(N.V+1)/5,Z.latencyClass==="LOW"&&(N.V*=2));!nQ(Z)||Z.latencyClass!=="ULTRALOW"&&Z.latencyClass!=="LOW"||(N.j=3,N.G=25);this.policy=N;this.j=
this.policy.D!==1;this.V=kV(this,rEG(this,isNaN(Z.liveChunkReadahead)?3:Z.liveChunkReadahead,Z))}ER(){return this.j}ZI(){return this.policy.O&&this.videoData.V?this.videoData.V.cU:Math.max(this.L()-ZY(this)*this.V,this.videoData.Vt())}},pyK=class{constructor(){this.Y=0;this.N=Infinity;this.C=!0;this.U=this.V=2;this.D=1;this.L=!1;this.G=10;this.O=!1;this.j=1;this.Vz=!1}};var RUc=class extends g.jR{constructor(Z){super();this.fp=Z;this.V=0;this.U=null;this.G=this.Y=0;this.D={};this.kW=this.fp.X();this.L=new g.Uc(this.Qm,1E3,this);this.MX=KB(this,"html5_seek_timeout_delay_ms");this.zt=KB(this,"html5_long_rebuffer_threshold_ms");this.Kp=KB(this,"html5_seek_set_cmt_delay_ms","html5_seek_set_cmt_cfl");this.FS=KB(this,"html5_seek_jiggle_cmt_delay_ms","html5_seek_jiggle_cmt_cfl");this.Sm=KB(this,"html5_seek_new_elem_delay_ms","html5_seek_new_elem_cfl");this.qX=KB(this,"html5_unreported_seek_reseek_delay_ms",
"html5_unreported_seek_reseek_cfl");this.Vz=KB(this,"html5_long_rebuffer_jiggle_cmt_delay_ms","html5_long_rebuffer_jiggle_cmt_cfl");this.O=new TA(2E4);this.vD=KB(this,"html5_seek_new_elem_shorts_delay_ms","html5_seek_new_elem_shorts_cfl");this.tq=KB(this,"html5_seek_new_media_source_shorts_reuse_delay_ms","html5_seek_new_media_source_shorts_reuse_cfl");this.Rq=KB(this,"html5_seek_new_media_element_shorts_reuse_delay_ms","html5_seek_new_media_element_shorts_reuse_cfl");this.dA=KB(this,"html5_reseek_after_time_jump_delay_ms",
"html5_reseek_after_time_jump_cfl");this.C=KB(this,"html5_gapless_handoff_close_end_long_rebuffer_delay_ms","html5_gapless_handoff_close_end_long_rebuffer_cfl");this.N=KB(this,"html5_gapless_slow_seek_delay_ms","html5_gapless_slow_seek_cfl");this.Qz=KB(this,"html5_shorts_gapless_ad_slow_start_delay_ms","html5_shorts_gapless_ad_slow_start_cfl");this.s6=KB(this,"html5_shorts_gapless_slow_start_delay_ms","html5_shorts_gapless_slow_start_cfl");this.j=KB(this,"html5_ads_preroll_lock_timeout_delay_ms",
"html5_ads_preroll_lock_timeout_cfl");this.hq=new TA(g.Q5(this.kW.experiments,"html5_skip_slow_ad_delay_ms")||5E3,!this.kW.B("html5_report_slow_ads_as_error"));this.Tt=new TA(g.Q5(this.kW.experiments,"html5_skip_slow_ad_delay_ms")||5E3,!this.kW.B("html5_skip_slow_buffering_ad"));this.O6=KB(this,"html5_slow_start_timeout_delay_ms");this.xW=KB(this,"html5_slow_start_no_media_source_delay_ms","html5_slow_start_no_media_source_cfl");g.u(this,this.L)}Qm(){const Z=this.fp.TM();var k=this.fp.getPlayerState();
if(Z&&!k.isError()){var N=Z.getCurrentTime(),a=k.U()&&N>this.V,T=k.V(8)&&k.V(16),K=this.fp.CN().isBackground()||k.isSuspended();yk(this,this.MX,T&&!K,a,"qoe.slowseek",()=>{},"timeout");
var y=isFinite(this.V);y=T&&y&&mdr(Z,this.V);var Q=!N||Math.abs(N-this.V)>10,q=this.kW.B("html5_exclude_initial_sabr_live_dvr_seek_in_watchdog"),r=N===0&&this.U&&[11,10].includes(this.U);yk(this,this.Kp,y&&Q&&!K&&(!q||!r),a,"qoe.slowseek",()=>{Z.seekTo(this.V)},"set_cmt");
Q=y&&b1(Z.pN(),this.V);var C=this.fp.loader;y=!C||C.SZ();var m=()=>{Z.seekTo(this.V+.001)};
yk(this,this.FS,Q&&y&&!K,a,"qoe.slowseek",m,"jiggle_cmt");y=()=>this.fp.ZQ();
yk(this,this.Sm,Q&&!K,a,"qoe.slowseek",y,"new_elem");var A=yR(k);r=k.isBuffering();var P=Z.pN(),d=U9(P,N),h=d>=0&&P.end(d)>N+5;Q=A&&r&&h;q=this.fp.getVideoData();yk(this,this.vD,N<.002&&this.V<.002&&T&&g.Qw(this.kW)&&g.aC(q)&&!K,a,"qoe.slowseek",y,"slow_seek_shorts");yk(this,this.N,q.rQ()&&T&&!K&&!q.C,a,"qoe.slowseek",y,"slow_seek_gapless_shorts");yk(this,this.Vz,Q&&!K,A&&!r,"qoe.longrebuffer",m,"jiggle_cmt");yk(this,this.O,Q&&!K,A&&!r,"qoe.longrebuffer",y,"new_elem_nnr");if(C){const O=C.getCurrentTime();
T=Z.L();T=YZj(T,O);T=!C.isSeeking()&&N===T;yk(this,this.qX,A&&r&&T&&!K,A&&!r&&!T,"qoe.longrebuffer",()=>{Z.seekTo(O)},"seek_to_loader")}T={};
m=U9(P,Math.max(N-3.5,0));var B=m>=0&&N>P.end(m)-1.1,v=m>=0&&m+1<P.length?P.start(m+1)-P.end(m):9999;T.mindex=d;T.disIndex=m;T.isdisc=m>=0&&B&&v<11;T.close2edge=B;T.gapsize=v;T.buflen=P.length;this.U&&(T.seekSour=this.U);yk(this,this.zt,A&&r&&!K,A&&!r,"qoe.longrebuffer",()=>{},"timeout",T);
T=k.isSuspended();T=this.fp.Vr()&&!T;yk(this,this.j,T,!T,"qoe.start15s",()=>{this.fp.GP("ad")},"ads_preroll_timeout");
T=this.kW.experiments.yz("html5_use_playback_rate_in_skip_slow_ad")?this.fp.getPlaybackRate()*1E3:1E3;d=N-this.Y<T/1E3/2;B=(m=q.isAd())&&A&&!r&&d;T=()=>{var O=this.fp;const x=O.u0.getVideoData();(!x||!O.videoData.isAd()||x.tI!==O.getVideoData().tI)&&O.videoData.g_||O.N4("ad.rebuftimeout",2,"RETRYABLE_ERROR",`skipslad.vid.${O.videoData.videoId}`)};
yk(this,this.hq,B,!B,"ad.rebuftimeout",T,"skip_slow_ad");d=m&&r&&b1(Z.pN(),N+5)&&d;yk(this,this.Tt,d&&!K,!d,"ad.rebuftimeout",T,"skip_slow_ad_buf");T=k.isOrWillBePlaying()&&k.V(64)&&!K;yk(this,this.O6,T,a,"qoe.start15s",()=>{},"timeout");
C=!!C&&!C.b3&&k.isOrWillBePlaying();yk(this,this.xW,C,a,"qoe.start15s",y,"newElemMse");C=nf(P,0);P=k.V(16)||k.V(32);C=!K&&k.isOrWillBePlaying()&&r&&!P&&(k.V(64)||N===0)&&C>5;yk(this,this.tq,C,A&&!r,"qoe.longrebuffer",()=>{this.fp.HF()},"reset_media_source");
yk(this,this.Rq,C,A&&!r,"qoe.longrebuffer",y,"reset_media_element");this.Y===0&&(this.G=N);C=r&&this.V===0&&N>1&&N===this.G;yk(this,this.dA,g.aC(q)&&C,A&&!r,"qoe.slowseek",()=>{Z.seekTo(0)},"reseek_after_time_jump");
K=k.isOrWillBePlaying()&&!K;h=this.fp.Ja()-N<6&&!h&&this.fp.w9();yk(this,this.C,q.rQ()&&K&&r&&h,A&&!r,"qoe.longrebuffer",()=>{this.fp.ZQ(!1,!0)},"handoff_end_long_buffer_reload");
K=this.U===104||this.fp.F0;k=vZ(q)&&q.isAd()&&!q.C&&K&&(r||k.V(8)&&k.V(16));yk(this,this.Qz,k,a,"qoe.start15s",y,"gapless_ad_slow_start");k=vZ(q)&&!q.C&&K&&Q;yk(this,this.s6,k,a,"qoe.longrebuffer",y,"gapless_slow_start");this.Y=N;this.L.start()}}dV(Z,k,N){k=this.Vn(k);k.wn=N;k.wdup=this.D[Z]?"1":"0";this.fp.dV(new g.yA(Z,k));this.D[Z]=!0}Vn(Z){Z=Object.assign(this.fp.Vn(!0),Z.Vn());this.V&&(Z.stt=this.V.toFixed(3));this.fp.getVideoData().isLivePlayback&&(Z.ct=this.fp.getCurrentTime().toFixed(3),Z.to=
this.fp.mx().toFixed(3));delete Z.uga;delete Z.euri;delete Z.referrer;delete Z.fexp;delete Z.vm;return Z}},TA=class{constructor(Z,k=!1){this.G=k;this.V=this.U=this.D=this.startTimestamp=0;this.Y=!1;this.L=Math.ceil(Z/1E3)}reset(){this.V=this.U=this.D=this.startTimestamp=0;this.Y=!1}test(Z){if(!this.L||this.U)return!1;if(!Z)return this.reset(),!1;Z=(0,g.z)();if(!this.startTimestamp)this.startTimestamp=Z,this.D=0;else if(this.D>=this.L)return this.U=Z,!0;this.D+=1;return!1}Vn(){const Z={},k=(0,g.z)();
this.startTimestamp&&(Z.wsd=(k-this.startTimestamp).toFixed());this.U&&(Z.wtd=(k-this.U).toFixed());this.V&&(Z.wssd=(k-this.V).toFixed());return Z}};var nbT=class extends g.jR{constructor(Z){super();this.fp=Z;this.C=this.V=this.loader=this.mediaElement=this.playbackData=null;this.D=0;this.L=this.zt=this.Y=null;this.dA=!1;this.qX=0;this.O=!1;this.timestampOffset=0;this.N=!0;this.tq=0;this.Kp=this.xl=!1;this.j=0;this.s6=!1;this.Sm=this.xW=0;this.kW=this.fp.X();this.videoData=this.fp.getVideoData();this.policy=new MNF;this.Vz=new RUc(this.fp);this.Tt=this.Rq=this.vD=this.G=this.U=NaN;this.FS=new g.Uc(()=>{PeU(this,!1)},2E3);
this.pF=new g.Uc(()=>{qp(this)});
this.MX=new g.Uc(()=>{XZf(this,{})});
this.O6=NaN;this.hq=new g.Uc(()=>{var k=this.kW.qY;k.V+=1E4/36E5;k.V-k.D>1/6&&(c8G(k),k.D=k.V);this.hq.start()},1E4);
g.u(this,this.Vz);g.u(this,this.FS);g.u(this,this.MX);g.u(this,this.pF);g.u(this,this.hq)}setMediaElement(Z){(this.mediaElement=Z)?(this.mediaElement&&(this.L||this.D||!this.mediaElement.xl()||this.seekTo(.01,{b0:"seektimeline_setupMediaElement"})),qp(this)):sJ(this)}getCurrentTime(Z=!1){if(CB(this.fp)){if(this.B("html5_use_centralized_player_time")&&!Z&&!isNaN(this.G))return this.G;if(!isNaN(this.U))return this.U}else{if(this.B("html5_use_centralized_player_time")&&!Z&&!isNaN(this.G)&&isFinite(this.G))return this.G;
Z=this.B("html5_seek_refactor_bh_fix");if(!isNaN(this.U)&&(Z||isFinite(this.U)))return this.U}return this.mediaElement&&cEX(this)?this.mediaElement.getCurrentTime()+this.timestampOffset:this.D||0}MN(){return this.Qz}ym(){return this.getCurrentTime()-this.mx()}ZI(){return this.V?this.V.ZI():Infinity}isAtLiveHead(Z){if(!this.V)return!1;Z===void 0&&(Z=this.getCurrentTime());return aH(this.V,Z)}ER(){return!!this.V&&this.V.ER()}seekTo(Z,{gj:k=!1,yN:N=0,SC:a=!1,aG:T=0,b0:K="",seekSource:y,Sh:Q=!1,P8:q=
!1,oG:r=!1}={}){Q&&(Z+=this.mx());nQ(this.videoData)&&y===29&&(this.Qz=void 0);Q=Z<this.vD&&!!this.loader;var C=nQ(this.videoData)&&q;Q&&!C&&(this.fp.U6("sdai",{sk2bk:Z.toFixed(3),mt:(Z-this.timestampOffset).toFixed(3),lstadj:this.vD.toFixed(3)}),this.vD=NaN,this.timestampOffset-=1E3,this.loader?.A1());{C=Z;const A=nQ(this.videoData);if(A&&q)C=!0;else{var m=this.B("html5_always_allow_sqless_sync")&&this.videoData.Rn();(A||m)&&K==="chunkSelectorSynchronize"?C=!0:(m=!isFinite(C)||(this.V?aH(this.V,
C):C>=this.zi())||!g.jI(this.videoData),m||(C={st:C,mst:this.zi()},this.V&&this.B("html5_high_res_seek_logging")&&(C.ht=this.V.ZI(),C.adft=Np(this.V)),this.fp.U6("seeknotallowed",C)),C=m)}}if(!C)return this.Y&&(this.Y=null,cI(this)),g.$E(this.getCurrentTime());C=.005;q&&this.B("html5_sabr_seek_no_shift_tolerance")&&(C=0);if(Math.abs(Z-this.U)<=C&&this.dA)return this.L;this.B("html5_reset_rate_limiter_on_user_seek")&&this.loader?.mq();this.B("html5_reset_backoff_on_user_seek")&&this.loader?.j9();K&&
(C=Z,this.kW.Xa()&&(K={reason:K,tgt:C},this.B("html5_sabr_csdai_seek_log")&&(K.source=y),this.fp.U6("seekreason",K)));y&&(this.Vz.U=y);this.dA&&sJ(this);this.L||(this.L=new x2);Z&&!isFinite(Z)&&mC(this,!1);(r=r||Q)||(r=Z,r=!(this.videoData.isLivePlayback&&this.videoData.D&&!this.videoData.D.V()&&!(this.mediaElement&&this.mediaElement.D()>0&&Nt(this.mediaElement)>0)||eI(this.videoData)&&this.Vt()===this.zi(!1)?0:isFinite(r)||!eI(this.videoData)));r||(Z=Qk(this,Z,a));Z&&!isFinite(Z)&&mC(this,!1);this.B("html5_use_centralized_player_time")?
this.G=Z:this.U=this.D=Z;this.tq=T;this.j=0;this.V&&sDy(this.V,Z,!1);a=this.fp;T=Z;r={gj:k,seekSource:y};a.HI.D=T;K=a.pS;K.mediaTime=T;K.V=!0;r.gj&&a.e0(r);r=T>a.videoData.endSeconds&&T>a.videoData.limitedPlaybackDurationInSeconds;a.RM&&r&&isFinite(T)&&lc(a);T<a.zi()-.01&&(r=mz(a.playerState,2),r.V(8)&&(r=mz(r,4)),a.Y4(r));a.publish("SEEK_TO",T);this.Sm>0&&Z<this.Sm&&(this.Sm=0,this.fp.ZQ());this.L&&(k?N&&this.MX.start(N):XZf(this,{P8:q,seekSource:y}));(k=this.fp.RM)&&Z>k.start&&lc(this.fp);return this.L}zi(Z){return this.videoData.isLivePlayback?
this.videoData.dA()&&this.mediaElement?.isPaused()&&this.videoData.V?(Z=this.getCurrentTime(),axf(this.HG(Z)*1E3)+Z):this.B("html5_sabr_parse_live_metadata_playback_boundaries")&&nQ(this.videoData)&&this.videoData.V?Z?this.videoData.V.xW||0:this.videoData.V.cU||0:eI(this.videoData)&&this.videoData.KX&&this.videoData.V?this.videoData.V.zi()+this.timestampOffset:this.videoData.D&&this.videoData.D.V()?!Z&&this.V?this.V.ZI():this.fp.videoData.zi()+this.timestampOffset:this.mediaElement?He()?axf(this.mediaElement.Sm().getTime()):
Nt(this.mediaElement)+this.timestampOffset||this.timestampOffset:this.timestampOffset:this.fp.videoData.zi()}Vt(){if(this.B("html5_sabr_parse_live_metadata_playback_boundaries")&&nQ(this.videoData))return this.videoData.V?.SG||0;const Z=this.videoData?this.videoData.Vt()+this.timestampOffset:this.timestampOffset;if(this.videoData.dA()&&this.videoData.V){var k=Number(this.videoData.progressBarStartPosition?.utcTimeMillis)/1E3;if(!isNaN(k)&&(k=this.TX(k),!isNaN(k)))return Math.max(Z,k)}return Z}Gj(){this.L||
this.seekTo(this.D,{b0:"seektimeline_forceResumeTime_singleMediaSourceTransition",seekSource:15})}uU(){return this.dA&&!isFinite(this.U)}YW(){Au(this,null);this.Vz.dispose();super.YW()}Vn(){const Z={};this.loader&&Object.assign(Z,this.loader.Vn());this.mediaElement&&Object.assign(Z,this.mediaElement.Vn());return Z}pg(Z){this.timestampOffset=Z}getStreamTimeOffset(){return eI(this.videoData)?0:this.videoData.V?this.videoData.V.getStreamTimeOffset():0}mx(){return this.timestampOffset}HG(Z){return this.videoData&&
this.videoData.V?this.videoData.V.HG(Z-this.timestampOffset):NaN}Ok(){if(!this.mediaElement)return 0;if(E1(this.videoData)){var Z=this.mediaElement,k=Z.pN();Z=(M9(k)&&Z.getDuration()?k.end(k.length-1):0)+this.timestampOffset-this.Vt();k=this.zi()-this.Vt();return Math.max(0,Math.min(1,Z/k))}return this.mediaElement.Ok()}nx(Z){this.C&&(this.C.V=Z)}vj(Z,k,N){this.fp.U6("requestUtcSeek",{time:Z});nQ(this.videoData)&&(this.Qz=Z);this.loader?.vj(Z,N);k&&(this.xW=k)}zq(Z){nQ(this.videoData)&&(this.Qz=void 0);
this.xW?(this.fp.U6("utcSeekingFallback",{source:"streamTime",timeSeconds:this.xW}),this.fp.seekTo(this.xW,{b0:"utcSeekingFallback_streamTime"}),this.xW=0):(Z=this.TX(Z),isNaN(Z)||(this.fp.U6("utcSeekingFallback",{source:"estimate",timeSeconds:Z}),this.fp.seekTo(Z,{b0:"utcSeekingFallback_estimate"})))}d7(){this.xW=0}yG(Z){this.Sm=Z}TX(Z){const k=this.getCurrentTime();if(isNaN(k))return NaN;const N=this.HG(k);return isNaN(N)?NaN:Z-(N-k)}B(Z){return this.kW&&this.kW.B(Z)}},MNF=class{};var Eba=class extends g.jR{constructor(Z){super();this.D=Z;this.V=new Map;this.U=new g.Uc(this.sample,250,this);g.u(this,this.U);this.start()}start(){this.U.start()}stop(){this.U.stop()}clear(){for(const Z of this.V.values())Z.clear()}sample(){for(const [Z,k]of this.D){const N=Z,a=k;this.V.has(N)||this.V.set(N,new Ijc(jye.has(N)));this.V.get(N).update(a())}this.U.start()}},jye=new Set(["networkactivity"]),Ijc=class{constructor(Z){this.U=Z;this.V=NaN;this.buffer=new bii(100)}update(Z){this.U?(this.buffer.add(Z-
this.V||0),this.V=Z):this.buffer.add(Z)}clear(){this.buffer.clear();this.V=0}};var WGc=class{constructor(){this.finished=this.started=!1}nI(){return this.started}start(){this.started=!0}reset(){this.finished=this.started=!1}};var ozU=!1;var Nvj=!1,tu=!1;g.fX=class extends g.n9{constructor(Z,k,N,a,T,K,y,Q,q,r=new g.xJ(Z),C=!0,m,A){super();this.kW=Z;this.playerType=k;this.Fa=N;this.AS=a;this.getVisibilityState=K;this.visibility=y;this.u0=Q;this.SY=q;this.videoData=r;this.Gp=C;this.CC=m;this.um=A;this.logger=new g.bI("VideoPlayer");this.nC=null;this.S0=new Oy;this.RM=null;this.yS=!0;this.b3=this.loader=null;this.dh=[];this.LD=new WGc;this.d_=this.Ch=null;this.lC=new WGc;this.bY=null;this.Uc=this.hc=!1;this.aP=NaN;this.YB=!1;this.playerState=new g.QR;
this.sX=[];this.Lj=new g.tt;this.mediaElement=null;this.V4=this.V7=!1;this.x7=NaN;this.B3=!1;this.Ju=0;this.lK=!1;this.Zm=NaN;this.Wz=0;this.loop=!1;this.playbackRate=1;this.gg=0;this.J3=!1;this.Xm=[];this.q5=this.L9=0;this.hV=this.pk=!1;this.eR=this.uC=0;this.F0=!1;this.qO=this.uq=null;this.Hq=()=>{var P=this.WA;P.provider.kW.NW||P.provider.fp.getVisibilityState()===3||(P.provider.kW.NW=!0);P.IC();if(P.U){var d=P.U;d.L&&d.V<0&&d.provider.fp.getVisibilityState()!==3&&uJX(d)}P.qoe&&(P=P.qoe,P.tq&&
P.Y<0&&P.provider.kW.NW&&J$N(P),P.L&&EY(P));this.loader&&DY(this);vI(this)};
this.nF={Ph:P=>{this.Ph(P)},
vXz:P=>{this.nC=P},
t9S:()=>this.WA,
zX:()=>this.b3,
WHp:()=>this.Sq,
AIR:()=>this.Fr,
uiz:()=>{},
X:()=>this.kW,
TM:()=>this.mediaElement,
b3R:P=>{this.O9(P)},
T_q:()=>this.AS};
this.dE=new xRr(this);this.M9=new g.Uc(this.OD,15E3,this);this.Co=new Eba(new Map([["bufferhealth",()=>PI(this.HI)],
["bandwidth",()=>this.P_()],
["networkactivity",()=>this.SY.zt],
["livelatency",()=>this.isAtLiveHead()&&this.isPlaying()?ic(this):NaN],
["rawlivelatency",()=>ic(this)]]));
this.HI=new nbT(this);this.ze=new g.Uc(this.Ya,0,this);this.Zj=[this.Lj,this.ze,this.M9,this.Co];this.pS=new URB(this.kW);this.OW=new Gfi(this.kW,this.AS,this,this.SY);this.kX=new g.iw(this,(P,d)=>{P!==g.te("endcr")||this.playerState.V(32)||this.bv();T(P,d,this.playerType)});
g.u(this,this.kX);g.u(this,this.HI);QCR(this,r);this.videoData.subscribe("dataupdated",this.jk,this);this.videoData.subscribe("dataloaded",this.rl,this);this.videoData.subscribe("dataloaderror",this.handleError,this);this.videoData.subscribe("ctmp",this.U6,this);this.videoData.subscribe("ctmpstr",this.Kg,this);!this.WA||this.WA.jm();this.WA=new g.vH(new n2r(this.videoData,this.kW,this));Zer(this.Hq);this.visibility.subscribe("visibilitystatechange",this.Hq);this.Sq=new g.Uc(this.iQ,g.Q5(this.kW.experiments,
"html5_player_att_initial_delay_ms")||4500,this);this.Fr=new g.Uc(this.iQ,g.Q5(this.kW.experiments,"html5_player_att_retry_delay_ms")||4500,this);this.TV=new g.L4(this.TE,350,this);g.u(this,this.TV)}YW(){g.Ob(this.aP);knX(this.Hq);this.visibility.unsubscribe("visibilitystatechange",this.Hq);jOy(this.WA);g.nM(this.WA);gq(this);g.g3.Ux(this.x7);this.SU();this.d_=null;g.nM(this.videoData);g.nM(this.dE);g.nM(this.Sq);g.nM(this.Fr);g.Il(this.Zj);this.RM=null;super.YW()}GU(Z,k,N,a,T){if(this.kW.B("html5_log_ad_playback_docid")){var K=
this.WA;if(K.qoe){K=K.qoe;var y=this.kW.Vz||"yt";g.MX(K,g.j_(K.provider),"ad_playback",[Z,k,N,T,y])}}else this.WA.GU(Z,k,N);this.B("html5_log_media_perf_info")&&this.U6("adloudness",{ld:a.toFixed(3),cpn:Z})}qL(){return this.loader?.qL()}O4(){return this.loader?.O4()}Dp(){return this.loader?.Dp()}iO(){return this.loader?.iO()}kT(){return this.videoData.kT()}EQ(){return this.B("html5_not_reset_media_source")&&this.videoData.isLivePlayback||this.B("html5_not_reset_media_source_non_drm_vod")&&!this.videoData.isLivePlayback&&
!this.videoData.kT()&&!this.videoData.rQ()}IW(){!this.videoData.j||this.B("html5_disable_target_codec_family_for_gapless")&&vZ(this.videoData)||(this.videoData.SK=this.videoData.SK||this.u0.wA().qL(),this.videoData.FE=this.videoData.FE||this.u0.wA().O4());if(Q7b(this.videoData)||!qN(this.videoData)){var Z=this.videoData.errorDetail;this.N4(this.videoData.errorCode||"auth",2,unescape(this.videoData.errorReason),Z,Z,this.videoData.sf||void 0)}this.B("html5_generate_content_po_token")&&this.bz();this.VH();
if(this.kW.experiments.Yl().V.Aq(evi)){Z=this.U6;var k=this.kW;k.Jd===null&&(k.Jd=window.MediaSource&&window.MediaSource.isTypeSupported?window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42001E"; decode-to-texture=true'):!1);Z.call(this,"dttg",{dtt:k.Jd,gl:this.kW.supportsGaplessShorts()})}}getVideoData(){return this.videoData}X(){return this.kW}R3(){return this.OW.R3(this.d_)}CN(){return this.visibility}KI(){return this.mediaElement&&this.mediaElement.G()?this.mediaElement.lq():null}TM(){return this.mediaElement}QR(){if(this.videoData.errorCode)return!1;
this.X().G&&this.X().houseBrandUserStatus&&this.U6("hbut",{status:this.X().houseBrandUserStatus},!0);if(this.videoData.cG())return!0;this.N4("api.invalidparam",2,void 0,"invalidVideodata.1");return!1}cj(Z=!1){Z||Mo(this.WA);this.hc=Z;!this.QR()||this.LD.nI()?GA(this)&&this.LD.nI()&&!this.LD.finished&&!this.hc&&this.rl():(this.LD.start(),Z=this.WA,g.j_(Z.provider),Z.qoe&&eXy(Z.qoe),Z.provider.kW.Yl().V.Aq(SyX)&&g.A5("cobalt")&&g.A5("android")&&(Z=Z.provider.videoData.clientPlaybackNonce)&&iGf(Z),this.rl())}rl(){if(this.videoData.isLoaded()){var Z=
this.dE;g.Q5(Z.Jq.experiments,"html5_player_min_build_cl")>0&&g.Q5(Z.Jq.experiments,"html5_player_min_build_cl")>881726199&&OF(Z,"oldplayer",!0);c7X(this)}else this.videoData.FN||this.videoData.Vg?this.hc&&GA(this)||(this.videoData.FN?Jej(this.videoData):(Z=this.WA,Z.qoe&&(Z=Z.qoe,YY(Z,"protected"),Z.provider.videoData.L?Z.ov():Z.provider.videoData.subscribe("dataloaded",Z.ov,Z)),$Dj(this.videoData))):!this.videoData.loading&&this.Gp&&HeN(this)}au(Z){this.uq=Z;this.loader&&(CnR(this.loader,Z),this.U6("sdai",
{sdsstm:1}))}Ab(Z,k,N){this.loader?.Ab(Z,k,N)}rF(Z){this.loader?.rF(Z)}gG(){return this.loader?.hM()||null}isFullscreen(){return this.visibility.isFullscreen()}isBackground(){return this.visibility.isBackground()}r8(){wq(this).then(()=>OJ(this));
this.playerState.isOrWillBePlaying()&&this.playVideo()}TD(){this.mediaElement&&this.mediaElement.activate();this.cj();this.QR()&&!this.playerState.V(128)&&(this.lC.nI()||(this.lC.start(),this.videoData.Tt?this.Y4(CN(this.playerState,4)):this.Y4(CN(CN(this.playerState,8),1))),xV(this))}CT(){return this.LD.finished}sendAbandonmentPing(){this.getPlayerState().V(128)||(this.publish("internalAbandon"),this.iQ(!0),jOy(this.WA),g.nM(this.WA),g.g3.Ux(this.x7))}bv(Z=!0,k=!0,N){k&&this.mediaElement&&this.mediaElement.pause();
Z&&N&&this.loader&&eI(this.videoData)&&this.loader.M8(N);this.Y4(Z?new g.QR(14):new g.QR)}bC(){this.WA.IC()}N4(Z,k,N,a,T,K){let y,Q;g.ei(dHf,N)?y=N:N?Q=N:y="GENERIC_WITHOUT_LINK";a=(a||"")+`;a6s.${NU()}`;if(Z==="auth"||Z==="drm.auth"||Z==="heartbeat.stop")N&&(a+=`;r.${N.replaceAll(" ","_")}`),K&&(a+=`sr.${K.replaceAll(" ","_")}`);k={errorCode:Z,errorDetail:T,errorMessage:Q||g.Kz[y]||"",YG:y,sf:K||"",gL:a,JM:k,cpn:this.videoData.clientPlaybackNonce};this.videoData.errorCode=Z;$V(this,"dataloaderror");
this.Y4(qt(this.playerState,128,k));g.g3.Ux(this.x7);gq(this);this.XL()}GP(Z){this.dh=this.dh.filter(k=>Z!==k);
this.lC.nI()&&xV(this)}GC(){var Z;(Z=!!this.dh.length)||(Z=this.kX.V.array[0],Z=!!Z&&Z.start<=-0x8000000000000);return Z}ER(){return this.HI.ER()}isPlaying(){return this.playerState.isPlaying()}NN(){return this.playerState.NN()&&this.videoData.Tt}getPlayerState(){return this.playerState}sy(Z){this.loader?.sy(Z)}XZ(Z){this.loader?.XZ(Z)}getPlayerType(){return this.playerType}getPreferredQuality(){if(this.d_){var Z=this.d_;Z=Z.videoData.x9.compose(Z.videoData.En);Z=FT(Z)}else Z="auto";return Z}isGapless(){return!!this.mediaElement&&
this.mediaElement.isView()}r0(){return this.u0.r0()}setMediaElement(Z){if(this.mediaElement&&Z.lq()===this.mediaElement.lq()&&(Z.isView()||this.mediaElement.isView())){if(Z.isView()||!this.mediaElement.isView())this.PU(),this.mediaElement=Z,this.mediaElement.u3=this,Bvi(this),this.HI.setMediaElement(this.mediaElement)}else{this.mediaElement&&this.SU();if(!this.playerState.isError()){let k=mz(this.playerState,512);k.V(8)&&!k.V(2)&&(k=CN(k,1));Z.isView()&&(k=mz(k,64));this.Y4(k)}this.mediaElement=Z;
this.mediaElement.u3=this;!g.Qw(this.kW)&&this.mediaElement.setLoop(this.loop);this.mediaElement.setPlaybackRate(this.playbackRate);Bvi(this);this.HI.setMediaElement(this.mediaElement);this.B("html5_prewarm_media_source")&&!this.dE.ow()&&qaN(this.mediaElement)}}SU(Z=!1,k=!1,N=!1){if(this.mediaElement){var a=this.getCurrentTime();a>0&&(this.HI.D=a);this.HI.setMediaElement(null);!Z&&this.EQ()?sC0(this):this.uc(N);this.loader&&(OY(this.loader),this.loader?.xW(k));this.M9.stop();if(this.mediaElement&&
(!this.lC.nI()&&!this.Vr()||this.playerState.isError()||this.playerState.V(2)||this.Y4(CN(this.playerState,512)),this.mediaElement)){this.PU();if(Z||!this.mediaElement.isView())this.Fa.Tq("mesv_s"),this.mediaElement.stopVideo(),uc(this);this.mediaElement=this.mediaElement.u3=null}}}async playVideo(Z=!1,k=!1){var N=window.google_image_requests;N&&N.length>10&&(window.google_image_requests=N.slice(-10));if(!this.playerState.V(128))if(this.dE.t7())this.publish("signatureexpired");else if(this.mediaElement&&
Mo(this.WA),this.TD(),(this.playerState.V(64)||Z)&&this.Y4(CN(this.playerState,8)),this.lC.finished&&this.mediaElement){if(!this.d_&&this.Ch&&(await this.Ch,this.playerState.V(128)))return;if(this.videoData.D){if(this.YX()&&this.videoData.D.V())return wq(this);if(CB(this))Z=this.HI,GY(Z.videoData)&&!Z.isAtLiveHead(Z.getCurrentTime())&&Z.ER()&&Z.fp.seekTo(Infinity,{b0:"seektimeline_peggedToLive",seekSource:34});else if(GY(this.videoData)){Z=this.getCurrentTime()<this.Vt()-15;const a=g.jI(this.videoData)&&
this.playerState.isPaused(),T=this.playerState.V(1024);N=this.HI;N.videoData.Rn()&&AE(N.videoData)||T||!Z&&!a||(a?this.seekTo(Infinity,{b0:"videoplayer_unpauseLiveOnly",seekSource:102}):this.seekTo(this.Vt(),{b0:"videoplayer_outOfWindow",seekSource:102}));!this.isAtLiveHead(void 0,!0)&&this.ER()&&this.seekTo(Infinity,{b0:"videoplayer_peggedToLive",seekSource:34});if(this.playerState.V(256)&&this.videoData.C&&this.HI.uU()){this.Y4(s0(this.playerState,8,4));return}}this.playerState.V(4)&&this.playerState.V(16)&&
this.Y4(s0(this.playerState,9,4));OJ(this,k)?DNj(this):UJ(this)}else this.videoData.isLivePlayback&&!g.NZ(this.kW.L,!0)?(k="html5.unsupportedlive",Z=2):(k=this.videoData.kT()?"fmt.unplayable":"fmt.noneavailable",Z=1),g.L9(Error("selectableFormats")),this.N4(k,Z,"HTML5_NO_AVAILABLE_FORMATS_FALLBACK","trg.selectableFormats")}}HF(Z){Z&&this.dV(new g.yA("qoe.restart",Z));this.Y4(CN(this.playerState,2048));this.uc();Z=this.videoData.V&&this.videoData.V.L();const k=this.mediaElement&&this.mediaElement.isView();
Z||k?(this.loader&&EFf(this.loader),this.ZQ()):(OJ(this),this.playerState.isOrWillBePlaying()&&this.playVideo());this.playerState.isOrWillBePlaying()||this.Y4(mz(this.playerState,2048))}wR(){if(!this.d_)return[];const Z=So(this.OW,this.d_,this.qw());return this.d_.V.wR(Z)}jh(){if(!this.d_)return[];const Z=So(this.OW,this.d_,this.qw());return this.d_.V.jh(Z)}M_(){return this.OW.M_(!!this.d_?.V?.V())}JX(){return this.d_?this.OW.JX(this.d_):io}qw(){let Z;Z=this.nC?this.nC.qw():O1(this.videoData)&&this.videoData.V&&
this.videoData.V.L()?this.videoData.Al?io:aS:io;this.hV&&(Z=Z.compose(Pry));return Z}nK(){return this.d_?So(this.OW,this.d_,this.qw()):io}rS(){const Z=this.S9(),k=this.u0.Yg().videoId;return this.u0.Dw.rS(Z)||this.u0.Dw.rS(k)}Ld(Z){if(Z.V===io.V)this.WA.Ld("A");else{var k=this.d_?.V?.jh(Z)?.map(N=>N.video)?.sort((N,a)=>(a.D??0)-(N.D??0));
this.WA.Ld("M",k?.[0]?.D??(RQN(Z.V)?Z.V:0))}}PJ(Z,k,N){this.Ld(Z);this.videoData.x9=Z;if(this.d_&&k){k=this.OW;var a=this.d_;if(a.V.V()){var T=g.Q5(k.kW.experiments,"html5_max_quality_sel_upgrade"),K=T?Z.V:g.ff[FT(Z)],y=a.V.videoInfos[0].video.qualityOrdinal,Q=y!==0&&Z.V===y;y=T8()>y;Q&&y||(T&&Q&&(K=Math.max(K,T)),T=xT(k,a.V?.videoInfos),Q=k.fp.getPlaybackRate(),Q>1&&T&&(T=nPN(k.kW.L,a.V.videoInfos,Q),Z.V!==0&&T<Z.V&&k.fp.setPlaybackRate(1)),g.Z_("yt-player-quality",{quality:K,previousQuality:a.videoData.U?.video?.qualityOrdinal||
0},31104E3),k.SY.policy.U=T8()>=480,k.B("html5_perf_cap_override_sticky")&&BVN(k.D,k.B("html5_perserve_av1_perf_cap")))}}this.loader&&(Z=this.loader,N=N||"",Z.policy.V?Wn(Z.L.V,N):Wn(Z.V.L,N));this.gk()}getUserPlaybackQualityPreference(){return this.videoData.D&&!this.videoData.D.V()?FT(this.videoData.x9):Vc[T8()]}hasSupportedAudio51Tracks(){return this.videoData.hasSupportedAudio51Tracks()}setUserAudio51Preference(Z,k){this.getUserAudio51Preference()!==Z&&(this.U6("toggle51",{pref:Z}),g.Z_("yt-player-audio51",
Z,k?31536E3:2592E3),this.r8())}getUserAudio51Preference(){return this.videoData.getUserAudio51Preference()}setProximaLatencyPreference(Z){const k=this.getProximaLatencyPreference();this.U6("proxima",{pref:Z});g.Z_("yt-player-proxima-pref",Z,31536E3);k!==Z&&(Z=this.HI,Z.s6=!0,Z.fp.seekTo(Infinity,{b0:"seektimeline_proximaSeekToHead",seekSource:34}))}getProximaLatencyPreference(){return Ks()??0}isProximaLatencyEligible(){return this.videoData.isProximaLatencyEligible}bz(){this.videoData.videoId?this.u0.bz(this.videoData):
this.U6("povid",{})}VH(){this.videoData.videoId?this.u0.VH(this.videoData):this.U6("piavid",{})}gk(){if(!this.jm()&&!this.playerState.V(128)&&this.videoData.D){if(this.videoData.D.V())DY(this);else{const a=BI(this);var Z=this.videoData;a:{var k=a;var N=this.videoData.O6;if(k.V){for(const T of N){const K=T.getInfo(),y=g.ff[K.video.quality];if((!k.D||K.video.quality!=="auto")&&y<=k.V){k=T;break a}}k=N[N.length-1]}else k=N[0]}Z.FS=k;hu(this,a.reason,vnU(this,this.videoData.FS))}if(this.B("html5_check_unstarted")?
this.playerState.isOrWillBePlaying():this.isPlaying())this.HI.N=!1,this.playVideo()}}Kd(Z,k){if(this.jm()||this.playerState.V(128))return!1;var N=!!this.videoData.D?.V(),a=N&&k?this.getCurrentTime()-this.mx():NaN;if(Z.ZF&&Z.ZF.id){var T=this.WA;if(T.qoe){T=T.qoe;const y=[Z.ZF.id,isNaN(a)?"m":"t"];g.MX(T,g.j_(T.provider),"afi",y)}}if(N){if(k){var K=PI(this.HI);this.U6("aswh",{id:Z.id,xtags:Z.xtags,bh:K.toFixed(3)})}this.loader.setAudioTrack(Z,a,k);return!0}if(gny(this)){a:{K=this.mediaElement.audioTracks();
k=!1;for(a=0;a<K.length;++a)if(N=K[a],(bc[N.label]||N.label)===Z.ZF.getName()){if(N.enabled){K=!1;break a}k=N.enabled=!0}else N.enabled&&(N.enabled=!1);K=k?!0:void 0}K&&this.U6("hlsaudio",{id:Z.id})}else{a:if(k=this.videoData,k.Y&&!k.Y.D()||Z===k.lk||!k.O6||k.O6.length<=0)K=!1;else{for(K of k.O6){if(!(K instanceof zGy)){K=!1;break a}a=K;N=Z.ZF.getId();a.D&&(ivj(a.D,N),a.EH=null)}k.lk=Z;K=!0}K&&OJ(this)&&(this.publish("internalaudioformatchange",this.videoData,!0),this.U6("hlsaudio",{id:Z.id}))}return!0}getAvailableAudioTracks(){return this.videoData.getAvailableAudioTracks()}getAudioTrack(){if(gny(this)){const Z=
$Nf(this);if(Z)return Z}return this.videoData.getAudioTrack()}TN(){return this.videoData.Y}I5(Z){return this.qO?this.qO.I5(Z):1}V_(){this.qO&&this.qO.V_()}Jn(){this.videoData.B("html5_trigger_loader_when_idle_network")&&!this.videoData.Rn()&&nQ(this.videoData)&&this.loader?.F6()}pz(){vZ(this.videoData)&&this.loader?.F6()}onPlayerRequestSent(Z){this.u0.onPlayerRequestSent(Z)}s4(Z=!1){if(this.loader){var k=this.loader,N=k.s4;var a=this.videoData;a=a.B("html5_ssdai_use_post_for_media")&&a.enableServerStitchedDai?
!1:eI(a)&&a.g_&&!a.isAd();N.call(k,a,Z)}}uc(Z=!1){this.b3&&(this.b3.Vz(),this.s4(Z),this.b3.dispose(),this.b3=null)}zX(){return this.b3}uM(Z,k=!1,N=!1,a=!1){SKy(this,a);this.b3=Z;Z=T=>{try{etb(this,T,k,N)}catch(K){g.L9(K),this.handleError(new g.yA("fmt.unplayable",{msi:"1",ename:K&&typeof K==="object"&&"name"in K?String(K.name):void 0,trg:"setmediasrc"},1))}};
this.EQ()&&this.b3.D()==="open"?Z(this.b3):kpR(this.b3,Z)}Gq(Z){this.S0.set(Z.initData,Z);this.nC&&(this.nC.Gq(Z),this.B("html5_eme_loader_sync")||this.S0.remove(Z.initData))}z6(Z){this.videoData.IV=g.dg("auto",Z,!1,"u");DY(this)}nx(Z){var k=Z.reason,N=Z.V.info,a=Z.source,T=Z.token,K=this.WA;const y=this.videoData;if(N!==y.Y){var Q=!y.Y;y.Y=N;var q=k==="m"||k==="t";q||(k=Q?"i":"a");k=new fdf(N,k,"",a,T);if(K.qoe){K=K.qoe;N=g.j_(K.provider);const m=K.provider.kW.Yl(),A=[];if(k.V.id!==K.FS){a=[k.V.id,
K.FS,k.reason];T=A;var r=T.push;const P=[];var C=k.V.audio;if(C){const d=C?.Y;d!==void 0&&P.push(`${"fl"}.${d}`);C=C?.D;C!==void 0&&(C=Math.min(-C,0),P.push(`${"vg"}.${C}`),P.push("nm.4"))}r.call(T,...P);m.V.Aq(Ju)&&k.reason==="i"&&A.push(zX0(K,k));A.length>0&&a.push(A.join(";"));k.token&&a.push(k.token);g.MX(K,N,"afs",a);K.FS=k.V.id}}this.publish("internalaudioformatchange",y,!Q&&q)}this.V_();this.HI.nx(Z.V.index)}eZ(Z){this.publish("localmediachange",Z)}Qr(Z={}){this.loader?.Qr(this.kW,g9(this.videoData),
Z)}t7(){return this.dE.t7()}Lt(Z){this.dV(new g.yA("staleconfig",{reason:Z}))}handleError(Z){this.dE.handleError(Z)}ow(){return this.dE.ow()}zq(Z){this.HI.zq(Z)}async ZQ(Z=!1,k=!1){this.loader&&this.loader.vz();this.loader&&this.loader.jm()&&gq(this);this.B("html5_enable_vp9_fairplay")&&this.kT()&&this.videoData.V?.pF();this.Y4(CN(this.playerState,2048));this.publish("newelementrequired");Z&&await wq(this);this.videoData.Rn()&&this.loader?.dA&&!CB(this)&&(this.isAtLiveHead()&&GY(this.videoData)?this.seekTo(Infinity,
{b0:"videoPlayer_getNewElement"}):this.videoData.M4&&this.loader&&(Z=this.loader,Z.cD.Rn&&(Z.cD.M4||Z.cD.U||Z.cD.isPremiere?(Z.seek(0,{b0:"loader_resetSqless"}),Z.videoTrack.G=!0,Z.audioTrack.G=!0,Z.videoTrack.Y=!0,Z.audioTrack.Y=!0):un(Z.cD)&&Wb(Z))));k&&this.seekTo(0,{seekSource:105});this.playerState.V(8)&&this.playVideo()}VJ(Z){this.U6("hgte",{ne:+Z});this.videoData.j=!1;Z&&this.ZQ();this.loader&&EFf(this.loader)}kK(Z){this.U6("newelem",{r:Z});this.ZQ()}pauseVideo(Z=!1){if((this.playerState.V(64)||
this.playerState.V(2))&&!Z)if(this.playerState.V(8))this.Y4(s0(this.playerState,4,8));else if(this.NN())OJ(this);else return;this.playerState.V(128)||(Z?this.Y4(CN(this.playerState,256)):this.Y4(s0(this.playerState,4,8)));this.mediaElement&&this.mediaElement.pause();g.jI(this.videoData)&&this.loader&&this.loader?.xW(!1)}stopVideo(){this.pauseVideo();this.loader&&(this.loader?.xW(!1),this.loader.NA())}XL(Z=!1,k=!1){this.EQ()&&k?this.mediaElement?.XL():this.mediaElement?.stopVideo();uc(this);gq(this);
this.playerState.V(128)||(Z?this.Y4(mz(mz(CN(this.playerState,4),8),16)):this.Y4(qt(this.playerState)));this.videoData.videoId&&this.kW.vD.remove(this.videoData.videoId)}seekTo(Z,k={}){this.playerState.V(2)&&OJ(this);k.t8S&&this.Y4(CN(this.playerState,2048));if((k.seekSource===58||k.seekSource===60)&&this.B("html5_update_vss_during_gapless_seeking")){var N=this.WA;N.V&&(N=N.V,k.seekSource===58?N.V.update():N.Y&&(N.G(),pJ(N).send(),N.U=NaN))}this.HI.seekTo(Z,k);this.kX.sync()}e0(Z){this.Fa.Y.U=(0,g.z)();
this.playerState.V(32)||(this.Y4(CN(this.playerState,32,Z?.seekSource)),this.playerState.V(8)&&this.pauseVideo(!0),this.publish("beginseeking"));this.MW()}hT(Z){Z=Z?.seekSource;this.playerState.V(32)?(this.Y4(s0(this.playerState,16,32,Z)),this.publish("endseeking")):this.playerState.V(2)||this.Y4(CN(this.playerState,16,Z));Z=this.Fa.Y;var k=this.videoData,N=this.playerState.isPaused();if(k.clientPlaybackNonce&&!isNaN(Z.V)){if(Math.random()<.01){N=N?"pbp":"pbs";const a={startTime:Z.V};k.Pq&&(a.cttAuthInfo=
{token:k.Pq,videoId:k.videoId});OL("seek",a);g.lJ({clientPlaybackNonce:k.clientPlaybackNonce},"seek");isNaN(Z.U)||uJ("pl_ss",Z.U,"seek");uJ(N,(0,g.z)(),"seek")}Z.reset()}}Hs(Z){this.hT(Z)}kf(){this.publish("SEEK_COMPLETE")}yJ(Z){var k=this.u0,N=this.videoData.clientPlaybackNonce,a=this.playerType;if(Z.scope===4){var T=Z.type;if(T){var K=k.DF(),y=K.getVideoData().clientPlaybackNonce;a===1&&(y=N);if(a=Rly(k,y)){if(N=a.getVideoData())Z.writePolicy===2&&N.sabrContextUpdates.has(T)||(Z.sendByDefault&&
N.Sm.add(T),N.sabrContextUpdates.set(T,Z)),k.B("html5_enable_t1_enf_on_sabr")&&(Z=T===5,T=SXr(N.playerResponse),Z?(Z=T?1:0,gm(Z,"m.p_",{}),YA("MBSTAT",Z)):Z=1,Z===0&&g.A7(k.rA,"onAbnormalityDetected"))}else K.U6("scuset",{ncpf:"1",ccpn:y,crcpn:N})}else g.L9(Error("b/380308491: contextUpdateType is undefined"))}}Cw(){if(this.playerType===2)return this.u0.Cw("")}getCurrentTime(Z=!1){return this.HI.getCurrentTime(Z)}MN(){return this.HI.MN()}ym(){return this.HI.ym()}M6(){return this.ym()}ZI(){return this.HI.ZI()}getPlaylistSequenceForTime(Z){return this.videoData.getPlaylistSequenceForTime(Z-
this.mx())}LH(){let Z=NaN;this.mediaElement&&(Z=this.mediaElement.LH());return Z>=0?Z:this.getCurrentTime()}HG(){if(this.videoData.V?.HG)return this.videoData.V.HG(this.getCurrentTime()-this.mx());if(this.mediaElement){var Z=this.mediaElement.Sm();if(Z&&(Z=Z.getTime(),!isNaN(Z)))return Z/1E3+this.getCurrentTime()}return NaN}getDuration(){return this.videoData.lengthSeconds?this.videoData.lengthSeconds+this.mx():this.zi()?this.zi():0}YA(){const Z=new JyF;if(this.loader){KNi(this.SY,Z,this.kW.Xa());
var k=this.loader;if(k.b3&&k.b3.L&&!k.b3.K3()&&(Z.PT=l5(k.videoTrack),Z.U=l5(k.audioTrack),k.policy.D)){const N=$R(k.videoTrack),a=$R(k.audioTrack),T=zd(k.b3.U.Us(),"_",5),K=zd(k.b3.V.Us(),"_",5);Object.assign(Z.V,{lvq:N,laq:a,lvb:T,lab:K})}Z.bandwidthEstimate=QK(k.N);k.audioTrack.C?.flush();k.videoTrack.C?.flush()}else this.mediaElement&&(Z.PT=ax(this.mediaElement));Z.uC=this.uC;Z.eR=this.eR;Z.D=this.isAtLiveHead()&&this.isPlaying()?ic(this):NaN;k=this.HI;k=k.V?Np(k.V):0;Z.Y=k;return Z}kQ(Z,k){this.eR+=
Z;this.uC+=k}Ok(){return this.mediaElement?g.jI(this.videoData)?1:E1(this.videoData)?this.isAtLiveHead()||this.ER()?1:this.HI.Ok():this.mediaElement.Ok():0}oO(){var Z=this.Co;const k=Xx(Z,"bandwidth"),N=Xx(Z,"bufferhealth"),a=Xx(Z,"livelatency"),T=Xx(Z,"networkactivity"),K=dq(Z,"bandwidth"),y=dq(Z,"bufferhealth"),Q=dq(Z,"livelatency");Z=dq(Z,"networkactivity");var q=this.lU();const r=q.droppedVideoFrames;q=q.totalVideoFrames;var C=this.getCurrentTime();if(this.nC){var m="IT/"+(this.nC.V.getInfo()+
"/"+FT(this.qw()));m+="/"+this.nC.getInfo()}else m="";var A=this.isGapless(),P=this.r0(),d=this.Q_(),h=this.g7(),B=g.zA(this),v=this.getPlayerState().state.toString(16),O=this.getPlaylistSequenceForTime(this.getCurrentTime());a:{var x=0;var e="";if(this.uq){if(this.uq.a5){e="D,";break a}x=this.uq.Xv;e=this.uq.VV.substring(0,4)}x>0?(x=`AD${x}, `,e&&(x+=`${e}, `),e=x):e=""}return{FT:K,jW:y,currentTime:C,iL:m,droppedVideoFrames:r,isGapless:A,r0:P,Q_:d,KT:h,T_:k,n$:N,q0:a,Oc:T,zV:Q,uo:Z,Vk:B,Jf:v,FK:O,
QN:e,totalVideoFrames:q}}Vn(Z=!1){const k={};if(Z){Object.assign(k,this.WA.Vn());this.mediaElement&&(Object.assign(k,this.mediaElement.Vn()),Z=this.lU(),k.dvf=Z.droppedVideoFrames,k.tvf=Z.totalVideoFrames);this.loader&&Object.assign(k,this.loader.Vn());this.nC&&(k.drm=JSON.stringify(this.nC.Vn()));k.state=this.playerState.state.toString(16);this.playerState.V(128)&&(k.debug_error=JSON.stringify(this.playerState.RJ));this.GC()&&(k.prerolls=this.dh.join(","));this.videoData.aM&&(k.ismb=this.videoData.aM);
this.videoData.latencyClass!=="UNKNOWN"&&(k.latency_class=this.videoData.latencyClass);this.videoData.isLowLatencyLiveStream&&(k.lowlatency="1");if(this.videoData.defaultActiveSourceVideoId||this.videoData.compositeLiveStatusToken||this.videoData.compositeLiveIngestionOffsetToken)k.is_mosaic=1;this.videoData.cotn&&(k.is_offline=1,k.cotn=this.videoData.cotn);this.videoData.playerResponseCpn&&(k.playerResponseCpn=this.videoData.playerResponseCpn);this.u0.isOrchestrationLeader()&&(k.leader=1);this.videoData.isLivePlayback&&
(this.videoData.V&&LD(this.videoData.V)&&(k.segduration=LD(this.videoData.V)),Z=this.HI,k.lat=Z.C?Z.C.Y.D():0,k.liveutcstart=this.videoData.liveUtcStartSeconds);k.relative_loudness=this.videoData.lz.toFixed(3);if(Z=g.zA(this))k.optimal_format=Z.video.qualityLabel;k.user_qual=T8();k.release_version="youtube.player.web_20260310_06_RC00"}k.debug_videoId=this.videoData.videoId;return k}addCueRange(Z){this.kc([Z])}removeCueRange(Z){this.kX.h$([Z])}Lh(){var Z=this.kX;if(Z.fp.X().B("html5_sort_cueranges_on_update")&&
!(Z.jO().length<=0||Z.jm())){var k=Z.V;k.array.sort(k.V)}Z.sync()}zx(Z,k){return this.kX.zx(Z,k)}kc(Z,k){this.kX.f8(Z,k)}FD(Z){this.kX.h$(Z)}jO(){return this.kX.jO()||[]}KK(){return this.lK}YX(){return this.visibility.YX()}j$(){this.mediaElement&&this.mediaElement.j$()}jk(){$V(this)}togglePictureInPicture(){this.mediaElement&&this.mediaElement.togglePictureInPicture()}PU(){this.Lj.U()}TE(){this.MW();this.publish("onLoadProgress",this.Ok())}O9(Z){var k=Z.target.zP();if(this.mediaElement&&this.mediaElement.zP()&&
this.mediaElement.zP()===k){onX(this,Z.type);switch(Z.type){case "error":var N=KN(this.mediaElement)||"",a=this.mediaElement.qR();if(N==="capability.changed"){this.B("html5_restart_on_capability_change")?(this.U6("capchg",{msg:a}),this.ZQ(!0)):wq(this);return}if(this.mediaElement.hasError()&&Dy(this.dE,N,{msg:a,trg:"elementevt"}))return;if(this.isBackground()&&this.mediaElement.zQ()===4){this.XL();SG(this,"unplayable");return}break;case "durationchange":N=this.mediaElement.getDuration();isFinite(N)&&
(!this.b3||N>0)&&N!==1&&this.KH(N);break;case "ratechange":this.loader&&this.loader.setPlaybackRate(this.mediaElement.getPlaybackRate());N=this.kX;N.started=!0;N.sync();this.WA.onPlaybackRateChange(this.getPlaybackRate());break;case "loadedmetadata":vI(this,!1);J7R(this);this.publish("onLoadedMetadata");ztf(this);N=this.HG();this.videoData.Gf&&(this.videoData.Gf=N);break;case "loadstart":ztf(this);break;case "progress":case "suspend":this.TV.Y();break;case "seeked":this.loader?.hI();break;case "playing":vI(this,
!1);this.Fa.Tq("plev");this.V4&&!CB(this)&&(this.V4=!1,this.isAtLiveHead()||this.seekTo(Infinity,{b0:"videoplayer_onPlaying"}));break;case "timeupdate":vI(this,!1);N=this.mediaElement&&!this.mediaElement.getCurrentTime();a=this.mediaElement&&this.mediaElement.D()===0;if(N&&(!this.V7||a))return;this.V7=this.V7||!!this.mediaElement.getCurrentTime();pB(this);this.MW();if(!this.mediaElement||this.mediaElement.zP()!==k)return;this.publish("onVideoProgress",this.getCurrentTime());break;case "waiting":if(this.mediaElement.L().length>
0&&this.mediaElement.pN().length===0&&this.mediaElement.getCurrentTime()>0&&this.mediaElement.getCurrentTime()<5&&this.loader)return;break;case "resize":J7R(this);this.videoData.U&&this.videoData.U.video.quality==="auto"&&this.publish("internalvideoformatchange",this.videoData,!1);break;case "pause":if(this.J3&&this.playerState.V(8)&&!this.playerState.V(1024)&&this.getCurrentTime()===0&&g.v9){SG(this,"safari_autoplay_disabled");return}}if(this.mediaElement&&this.mediaElement.zP()===k){gzU(this.HI,
Z);this.publish("videoelementevent",Z);k=this.playerState;a=this.pS;var T=this.mediaElement;N=this.videoData.clientPlaybackNonce;if(!k.V(128)){var K=k.state;T=T?T:Z.target;var y=T.getCurrentTime();if(!k.V(64)||Z.type!=="ended"&&Z.type!=="pause"){var Q=T.getDuration();Q=T.isEnded()||y>1&&Math.abs(y-Q)<1.1;var q=Z.type==="pause"&&T.isEnded();y=Z.type==="ended"||Z.type==="waiting"||Z.type==="timeupdate"&&!k.V(4)&&!Wk(a,y);if(q||Q&&y)T.tq()>0&&T.zP()&&(K=14);else switch(Z.type){case "error":KN(T)&&(K|=
128);break;case "pause":k.V(256)?(K^=256)||(K=64):k.V(32)||k.V(2)||k.V(4)||(K=4,k.V(1)&&k.V(8)&&(K|=1));break;case "playing":Q=K;K=(K|8)&-1093;Q&4?(K|=1,r7(a,T,!0)):Wk(a,T.getCurrentTime())&&(K&=-2);k.V(1)&&r7(a,T)&&(K|=1);break;case "seeking":K|=16;k.V(8)&&(K|=1);K&=-3;break;case "seeked":K&=-17;r7(a,T,!0);break;case "waiting":k.V(2)||(K|=1);r7(a,T);break;case "timeupdate":Q=k.V(16),q=k.V(4),(k.V(8)||Q)&&!q&&Wk(a,T.getCurrentTime())&&(K=8),r7(a,T)&&(K|=1)}}a=K;K=null;a&128&&(K=Z.target,q=KN(K),y=
1,q?(q==="capability.changed"&&(y=2),T="GENERIC_WITHOUT_LINK",Q=K.Vn(),Q.mediaElem="1",Q.trg="melem",/AUDIO_RENDERER/.test(K.qR())&&(T="HTML5_AUDIO_RENDERER_ERROR"),K={errorCode:q,errorMessage:g.Kz[T]||"",YG:T,gL:Td(Q),JM:y,cpn:k.RJ?k.RJ.cpn:""}):K=null,K&&(K.cpn=N));k=qt(k,a,K)}!this.playerState.V(1)&&k.V(1)&&RH(this,"evt"+Z.type);this.Y4(k)}}}Cv(Z){Z=Z.V.availability==="available";Z!==this.lK&&(this.lK=Z,this.publish("airplayavailabilitychange"))}My(){var Z=(0,g.z)();const k=this.mediaElement.YX();
this.U6("airplay",{ia:k});!k&&!isNaN(this.Zm)&&Z-this.Zm<2E3||(this.Zm=Z,k!==this.YX()&&(Z=this.visibility,Z.V!==k&&(Z.V=k,Z.Hq()),this.U6("airplay",{rbld:k}),this.r8()),this.publish("airplayactivechange"))}uu(Z){if(this.loader){var k=this.loader,N=k.Y,a=k.getCurrentTime();const T=Date.now()-N.C;N.C=NaN;N.U6("sdai",{adfetchdone:Z,d:T});Z&&!isNaN(N.G)&&N.U!==3&&Ms(N.loader,a,N.G,N.L);N.policy.U?N.D=NaN:N.Y=NaN;pn(N,4,N.U===3?"adfps":"adf");OY(k)}}YC(){g.Ob(this.aP);this.M9.stop();this.videoData.C=
!0;this.kW.hB=!0;this.kW.O6=0;var Z=this.dE;if(Z.videoData.U){var k=Z.Jq.L,N=Z.videoData.U.gA;k.D.has(N)&&(k.D.delete(N),k.V=!0)}Z.V.stop();Z.Jq.l9=0;this.oN();this.playerState.V(8)&&this.Y4(mz(this.playerState,65));this.hc=!1;this.WA.CZ();this.Sq.XN();this.publish("playbackstarted");(Z=g.Vf("yt.scheduler.instance.clearPriorityThreshold"))?Z():LU(0)}oN(){var Z=this.u0.Yg(),k={};const N={};!vX("pbs",this.Fa.timerName)&&AN.measure&&AN.getEntriesByName&&(AN.getEntriesByName("mark_nr")[0]?Grj("mark_nr"):
Grj());Z.videoId&&(k.videoId=Z.videoId);Z.clientPlaybackNonce&&!this.B("web_player_early_cpn")&&(k.clientPlaybackNonce=Z.clientPlaybackNonce);this.mediaElement&&this.mediaElement.isPaused()&&(N.isPausedOnLoad=!0);N.itag=Z.U?Number(Z.U.itag):-1;Z.rD&&(N.preloadType=String(this.Uc?2:1));k.liveStreamMode=hBG[nL(Z)];k.playerInfo=N;this.Fa.infoGel(k);if(this.loader){Z=this.loader.timing;window&&window.performance&&window.performance.getEntriesByName&&(Z.D&&(k=window.performance.getEntriesByName(Z.D),k.length&&
(k=k[0],Z.tick("vri",k.fetchStart),Z.tick("vdns",k.domainLookupEnd),Z.tick("vreq",k.requestStart),Z.tick("vrc",k.responseEnd))),Z.U&&(k=window.performance.getEntriesByName(Z.U),k.length&&(k=k[0],Z.tick("ari",k.fetchStart),Z.tick("adns",k.domainLookupEnd),Z.tick("areq",k.requestStart),Z.tick("arc",k.responseEnd))));Z=Z.ticks;for(const a in Z)Z.hasOwnProperty(a)&&this.Fa.tick(a,Z[a])}}MW(Z=!1){if(this.mediaElement&&this.videoData){hYy(this.HI,this.isPlaying());var k=this.getCurrentTime();this.loader&&
(this.playerState.V(4)&&g.jI(this.videoData)||this.playerState.V(32)&&nQ(this.videoData)||mMy(this.loader,k),this.B("html5_log_centralized_player_time")&&Math.abs(this.getCurrentTime()-this.loader.fT())>10&&this.U6("sabrSeekRefactorCmt",{cmt:this.getCurrentTime(),loaderCmt:this.loader?.fT(),bh:this.loader?.MX()},!0));k>5&&(this.HI.D=k);var N=g.XI();N?g.g3.Ux(this.x7):g.DA(this.x7);var a=this.mediaElement.isPaused();if((this.playerState.isBuffering()||!a||this.videoData.dA())&&!this.playerState.V(128)){const T=
()=>{if(this.mediaElement&&!this.playerState.V(128)){this.kW.Xa()&&onX(this,"pfx");var K=this.getCurrentTime();this.B("html5_buffer_underrun_transition_fix")&&(K-=this.mx());var y=ax(this.mediaElement),Q=this.playerState.V(8),q=Wk(this.pS,K),r=AFy(this.pS,K,(0,g.z)(),y);Q&&q?this.Y4(mz(this.playerState,1)):Q&&r?(this.kW.Xa()&&this.B("html5_log_centralized_player_time")&&!isFinite(K)&&r&&this.U6("sabrSeekRefactorCmtBhFix",{cmt:K,loaderCmt:this.loader?.fT(),bh:this.loader?.MX()}),Q=this.getDuration(),
q=GY(this.videoData),Q&&Math.abs(Q-K)<1.1?(this.U6("setended",{ct:K,bh:y,dur:Q,live:q}),this.mediaElement.hZ()?this.seekTo(0,{b0:"videoplayer_loop",seekSource:37}):this.bv()):(this.playerState.isBuffering()||RH(this,"progress_fix"),this.Y4(CN(this.playerState,1)))):(Q&&!q&&!r&&K>0&&(Q=(Date.now()-this.Wz)/1E3,q=this.getDuration(),K>q-1&&this.U6("misspg",{t:K.toFixed(2),d:q.toFixed(2),r:Q.toFixed(2),bh:y.toFixed(2)})),this.playerState.isPaused()&&this.playerState.isBuffering()&&ax(this.mediaElement)>
5&&this.Y4(mz(this.playerState,1)));this.MW()}};
this.mediaElement.L().length===0?this.x7=N?g.g3.IU(T,100):g.fb(T,100):this.x7=N?g.g3.IU(T,500):g.fb(T,500)}this.videoData.r5=k;!Z&&this.isPlaying()&&UN0(this);Flf(this.OW,this.d_,this.TM(),this.isBackground())&&DY(this);this.publish("progresssync",Z);a&&this.videoData.dA()&&this.publish("onVideoProgress",this.getCurrentTime())}}Ya(){this.N4("ad.rebuftimeout",2,"RETRYABLE_ERROR",`vps.${this.playerState.state.toString(16)}`)}g7(){return this.WA.g7()}P_(){return this.loader?this.loader.P_():yK(this.SY,
!0)}Y4(Z){if(!g.Ak(this.playerState,Z)){var k=new g.d7(Z,this.playerState);this.playerState=Z;beX(this);var N=!this.sX.length;this.sX.push(k);var a=this.mediaElement&&this.mediaElement.isSeeking();k.Ub(1)&&this.loader&&Uqy(this.loader);a=k.oldState.U()&&!a;if(k.Ub(1)&&a&&this.playerState.V(8)&&!this.playerState.V(64)&&this.loader&&(a=this.loader,a.A0=!0,a.policy.xl&&a.b3&&a.U6("lr_rb",{c:a.getCurrentTime(),s:a.isSeeking(),ab:zd(a.b3.V.Us()),ala:hM(a.audioTrack)?.E3(),alr:a.audioTrack.V?.E3(),vb:zd(a.b3.U.Us()),
vla:hM(a.videoTrack)?.E3(),vlr:a.videoTrack.V?.E3()}),a.Wl!==0&&a.U6("sps_rebuffer",{c:a.getCurrentTime()}),this.mediaElement&&ax(this.mediaElement)>=5)){a=this.OW;var T=this.d_;!T.videoData.U||a.B("html5_disable_performance_downgrade")?a=!1:(Date.now()-a.j>6E4&&(a.U=0),a.U++,a.j=Date.now(),a.U!==4?a=!1:(Llb(a,T.videoData.U),a=!0));a&&DY(this)}(a=g.Q5(this.kW.experiments,"html5_ad_timeout_ms"))&&this.videoData.isAd()&&Z.V(1)&&(Z.V(8)||Z.V(16))?this.ze.start(a):this.ze.stop();($Z(k,8)<0||k.Ub(1024))&&
this.M9.stop();!k.Ub(8)||this.videoData.C||k.state.V(1024)||this.M9.start();k.state.V(8)&&$Z(k,16)<0&&!k.state.V(32)&&!k.state.V(2)&&this.playVideo();k.state.V(2)&&E1(this.videoData)&&(this.KH(this.getCurrentTime()),this.MW(!0));k.Ub(2)&&(this.iQ(!0),this.kW.Xa()&&this.B("html5_sabr_parse_live_metadata_playback_boundaries")&&nQ(this.videoData)&&this.videoData.V&&(Z={minst:`${this.videoData.V.SG}`,cminst:`${this.videoData.V.Vt()+this.mx()}`,maxst:`${this.videoData.V.cU}`,hts:`${this.videoData.V.xW}`,
cmaxst:`${this.videoData.V.zi()+this.mx()}`},this.U6("sabrSeekableBoundaries",Z)));k.Ub(128)&&this.XL();this.videoData.V&&this.videoData.isLivePlayback&&!this.pk&&($Z(k,8)<0?(Z=this.videoData.V,Z.G&&Z.G.stop()):k.Ub(8)&&this.videoData.V.resume());Z=this.HI;Z.Vz.L.XN();if(Z.mediaElement)if(k.oldState.U()&&yR(k.state)&&k.state.isBuffering()){a=Z.mediaElement.getCurrentTime();T=Z.mediaElement.pN();var K=Z.B("manifestless_post_live_ufph")||Z.B("manifestless_post_live")?U9(T,Math.max(a-3.5,0)):U9(T,a-
3.5);K>=0&&a>T.end(K)-1.1&&K+1<T.length&&T.start(K+1)-T.end(K)<11&&(K=T.start(K+1)+.2+Z.mx(),Math.abs(Z.O6-K)<.2||(Z.fp.U6("seekover",{b:zd(T,"_"),cmt:a}),Z.O6=K,Z.seekTo(K,{SC:!0,b0:"seektimeline_postLiveDisc"})))}else k.state?.U()&&!Z.Kp&&(Z.videoData.limitedPlaybackDurationInSeconds>0?(fB(Z.fp,Z.getCurrentTime()+Z.videoData.limitedPlaybackDurationInSeconds),Z.Kp=!0):Z.videoData.isLivePlayback&&Z.videoData.endSeconds>0&&(fB(Z.fp,Z.getCurrentTime()+Z.videoData.endSeconds),Z.Kp=!0));Z=this.WA;if(k.Ub(1024)||
k.Ub(512)||k.Ub(4))Z.U&&(a=Z.U,a.U>=0||(a.V=-1,a.delay.stop())),Z.qoe&&(a=Z.qoe,a.G||(a.Y=-1));Z.provider.videoData.enableServerStitchedDai&&Z.w_?Z.D.get(Z.w_)?.zt(k):Z.V&&Z.V.zt(k);if(Z.qoe){a=Z.qoe;T=k.state;K=g.j_(a.provider);var y=a.getPlayerState(T),Q=K,q=T.seekSource||void 0;if(y!==a.wV){a.O||Q<a.D||(a.wV==="PL"?a.playTimeSecs+=Q-a.D:a.wV==="B"&&a.isBuffering&&(a.isBuffering=!1,a.rebufferTimeSecs+=Q-a.N,!a.s6&&a.rebufferTimeSecs>=10&&a.playTimeSecs<=180&&(a.V.set("qoealert",["1"]),a.s6=!0)),
y!=="B"||a.wV!=="PL"&&a.wV!=="PB"||(a.isBuffering=!0),a.D=Q);a.wV==="PL"&&(y==="B"||y==="S")||a.provider.kW.Xa()?EY(a,Q):(a.hq||y!=="PL"||(a.hq=!0,IR(a,Q,a.provider.fp.YA())),n8(a,Q));y==="PL"&&a.hp.XN();var r=[y];y==="S"&&q&&r.push(`${"ss"}.${q}`);g.MX(a,Q,"vps",r);a.wV=y;a.N=Q;a.D=Q;a.L=!0}Q=T.RJ;T.V(128)&&Q&&(Q.gL=Q.gL||"",wqf(a,K,Q.errorCode,Q.JM,Q.gL));(T.V(2)||T.V(128))&&a.reportStats(K);T.isPlaying()&&!a.G&&(a.Y>=0&&a.V.set("user_intent",[a.Y.toString()]),a.G=!0);WD(a)}Z.U&&(Z=Z.U,lfb(Z),Z.playerState=
k.state,Z.U>=0&&k.Ub(16)&&Z.seekCount++,k.state.isError()&&Z.send());if(N&&!this.jm())try{for(const m of this.sX){var C=this.kX;if(C.started&&(C.sync(),m.oldState.V(16))){k=C;const A=N9y(k.V,Math.max(k.D-2E3,0));!isNaN(A)&&A<0x7ffffffffffff&&k.Y.start()}this.publish("statechange",m)}}finally{this.sX.length=0}}}OJ(){this.Fa.tick("qoes")}Gj(){this.HI.Gj()}Js(Z,k,N,a="LICENSE"){a:{var T=this.dE;N=N.substring(0,256);let K=Kf(k);Z==="drm.keyerror"&&this.nC&&this.nC.D.keys.length>1&&T.Y<96&&(Z="drm.sessionlimitexhausted",
K=!1);const y=T.Jq.experiments.yz("html5_retry_on_drm_unavailable"),Q=T.Jq.experiments.yz("html5_retry_on_drm_key_error"),q=/^(closedShouldNotRetry|t\.prefixedKeyError)(.*)/;if(y&&Z==="drm.unavailable"||Q&&Z==="drm.keyerror"&&!N.match(q))T.dV("qoe.restart",{retryOnDrmError:1,e:Z,detail:N}),T.fp.ZQ(!0);else{if(K)if(T.videoData.U&&T.videoData.U.video.isHdr())vk(T,Z);else{if(T.fp.N4(Z,k,a,N),afi(T,{detail:N}))break a}else T.dV(Z,{detail:N});Z==="drm.sessionlimitexhausted"&&(T.U6("retrydrm",{sessionLimitExhausted:1}),
T.Y++,y7y(T.fp))}}}qy(){var Z=g.Q5(this.kW.experiments,"html5_license_constraint_delay");const k=lR();Z&&k?(Z=new g.Uc(()=>{this.gk();$V(this)},Z),g.u(this,Z),Z.start()):(this.gk(),$V(this))}Xf(Z){this.publish("heartbeatparams",Z)}Ph(Z){this.U6("keystatuses",hq(Z));
var k="auto",N=!1;this.videoData.U&&(k=this.videoData.U.video.quality,N=this.videoData.U.video.isHdr());a:{switch(k){case "highres":case "hd2880":k="UHD2";break;case "hd2160":case "hd1440":k="UHD1";break;case "hd1080":case "hd720":k="HD";break;case "large":case "medium":case "small":case "light":case "tiny":k="SD";break;default:k="";break a}N&&(k+="HDR")}k=Ft(Z)?tq(Z,k):Z.D.includes(k);if(this.B("html5_enable_vp9_fairplay")){if(N){if(!Z.j){this.videoData.y9||(this.videoData.y9=!0,this.U6("drm",{dphdr:1}),
this.ZQ(!0));return}if(this.nC?.V.V()?this.nC?.Tt():!k){this.U6("drm",{dshdr:1});vk(this.dE);return}}if(this.nC?.V.V())return}else{const a=Z.j&&k;if(N&&!a){vk(this.dE);return}}if(N=!k)N=!(tq(Z,"AUDIO")&&tq(Z,"SD"));N&&(Z=hq(Z),this.hV?(this.publish("drmoutputrestricted"),this.B("html5_report_fatal_drm_restricted_error_killswitch")||this.N4("drm.keyerror",2,void 0,`info.${Z}`)):(this.hV=!0,this.dV(new g.yA("qoe.restart",{retrydrm:1,...Z})),DY(this),y7y(this)))}OD(){if(!this.videoData.C&&this.mediaElement&&
!this.isBackground()){var Z="0";this.mediaElement.D()>0&&ax(this.mediaElement)>=5&&this.videoData.D&&this.videoData.D.V()&&(this.Y4(CN(this.playerState,1)),RH(this,"load_soft_timeout"),this.publish("playbackstalledatstart"),Z="1");beX(this);var k=this.videoData.D;Z={restartmsg:Z,mfmt:!O1(this.videoData),mdrm:!(!(k&&k.videoInfos&&k.videoInfos.length&&k.videoInfos[0].contentProtection)||this.nC),mfmtinfo:!this.videoData.U,prerolls:this.GC()?this.dh.join(","):"0"};if(this.nC){k=this.nC;if(k.D.size<=
0){let N="ns;";k.Vz||(N+="nr;");k=N+=`ql.${k.Y.length}`}else k=hq(k.D.values().next().value),k=Td(k);Z.drmp=k}Object.assign(Z,this.loader?.Vn()||{});Object.assign(Z,this.mediaElement?.Vn()||{});this.WA.dV("qoe.start15s",Td(Z));this.publish("loadsofttimeout")}}KH(Z){this.videoData.lengthSeconds!==Z&&(this.videoData.lengthSeconds=Z,$V(this))}iQ(Z=!1,k){if(!this.B3)if(vX("att_s","player_att")||gV("att_s",void 0,"player_att"),this.B("use_rta_for_player"))(async()=>{if(!Z||await g.xzX())try{const a=Wli(this.WA);
if(!a)throw Error();const T=await g.$zb({cpn:this.videoData.clientPlaybackNonce,encryptedVideoId:this.videoData.videoId||""},g.Q5(this.kW.experiments,"html5_att_playback_timeout_ms")||3E4);if(this.B3)throw Error();if(!T.challenge)throw g.L9(Error(`Not sending atr ping; missing challenge string${T.error?`; error: ${T.error}`:""}`)),Error();this.B3=!0;const K=[T.challenge];if(T.error){const y=XNy(),Q=BPG(y).get(T.error)||0;K.push(`${"r1c"}=${Q}`)}else T.webResponse&&K.push(`${"r1a"}=${T.webResponse}`);
T.adblockReporting?.reportingStatus!==void 0&&K.push(`${"r6a"}=${T.adblockReporting.reportingStatus}`);T.adblockReporting?.broadSpectrumDetectionResult!==void 0&&K.push(`${"r6b"}=${T.adblockReporting.broadSpectrumDetectionResult}`);a(K.join("&"));gV("att_f",void 0,"player_att")}catch(a){gV("att_e",void 0,"player_att")}})().then(()=>{k?.()});
else{var N=new g.mTy(this.videoData);if("c1a"in N.Qa&&!g.Zb.isInitialized()){gV("att_wb",void 0,"player_att");this.Ju===2&&Math.random()<.01&&g.L9(Error("Botguard not available after 2 attempts"));if(Z)return;if(this.Ju<5){this.Fr.XN();this.Ju++;return}}(N=g.J6X(N))?(gV("att_f",void 0,"player_att"),E2N(this.WA,N),this.B3=!0):gV("att_e",void 0,"player_att")}}Ja(Z=!1){return GY(this.videoData)&&(this.isAtLiveHead()&&!this.playerState.isPaused()||this.ER()||g.jI(this.videoData))?this.getCurrentTime():
this.zi(Z)}CI(){return this.Vt()}zi(Z=!1){return this.HI.zi(Z)}Vt(){return this.HI.Vt()}mx(){return this.HI?this.HI.mx():0}getStreamTimeOffset(){return this.HI?this.HI.getStreamTimeOffset():0}lc(){return this.getStreamTimeOffset()===0?this.mx():this.getStreamTimeOffset()}setPlaybackRate(Z){this.playbackRate!==Z&&xT(this.OW,this.videoData.D?.videoInfos)&&(this.playbackRate=Z,DY(this));this.playbackRate=Z;this.mediaElement&&this.mediaElement.setPlaybackRate(Z)}getPlaybackRate(){return this.playbackRate}getPlaybackQuality(){let Z=
"unknown";if(this.videoData.U&&(Z=this.videoData.U.video.quality,Z==="auto"&&this.mediaElement)){const k=this.KI();k&&k.videoHeight>0&&(Z=Bz(k.videoWidth,k.videoHeight))}return Z}isHdr(){return!!(this.videoData.U&&this.videoData.U.video&&this.videoData.U.video.isHdr())}sendVideoStatsEngageEvent(Z,k){var N=this.WA;N.V?(N=z$(N.V,"engage"),N.zt=Z,N.send(k)):k&&k()}UQ(Z){return this.WA.UQ(Z)}isAtLiveHead(Z,k=!1){return GY(this.videoData)&&(this.yS||k)?this.HI.isAtLiveHead(Z):!1}dk(){const Z=this.zi(),
k=this.getCurrentTime();var N;(N=!GY(this.videoData))||(N=this.HI,N=!(N.V&&N.V.D));return N||this.ER()||isNaN(Z)||isNaN(k)?0:Math.max(0,Z-k)}xN(Z){(this.yS=Z)||this.M9.stop();if(this.videoData.V)if(Z)this.videoData.V.resume();else{var k=this.videoData.V;k.G&&k.G.stop()}this.loader&&(k=this.videoData.B("html5_disable_preload_for_ssdai_with_preroll")&&this.Vr()&&this.videoData.isLivePlayback,Z&&!k?this.loader.resume():this.loader?.xW(!0));this.playerState.V(2)||Z?this.playerState.V(512)&&Z&&this.Y4(mz(this.playerState,
512)):this.Y4(CN(this.playerState,512));k=this.WA;k.qoe&&(k=k.qoe,g.MX(k,g.j_(k.provider),"stream",[Z?"A":"I"]))}YR(Z){this.WA.dV("player.exception",Td({n:Z.name,m:Z.message}))}A$(Z){this.WA.A$(Z)}dN(Z){this.WA.dN(Z)}GK(Z){this.WA.GK(Z)}g2(Z){this.WA.g2(Z)}M8(Z,k,N,a){this.WA.M8(Z,k,N,a)}bK(){this.U6("hidden",{},!0)}lU(){return this.mediaElement?this.mediaElement.getVideoPlaybackQuality():{}}SZ(){return this.loader?this.loader.SZ():!0}setLoop(Z){this.loop=Z;this.mediaElement&&!g.Qw(this.kW)&&this.mediaElement.setLoop(Z)}hZ(){return this.mediaElement&&
!g.Qw(this.kW)?this.mediaElement.hZ():this.loop}pg(Z){this.U6("timestamp",{o:Z.toString()});this.HI.pg(Z)}dD(Z){this.Fa.tick(Z)}TF(Z){return this.Fa.TF(Z)}Tq(Z){this.Fa.Tq(Z)}U6(Z,k,N=!1){this.WA.U6(Z,k,N)}Kg(Z,k,N=!1){this.WA.U6(Z,k,N)}dV(Z){this.WA.dV(Z.errorCode,Td(Z.details));Z=Z.errorCode;if(this.videoData.isLivePlayback&&(Z==="qoe.longrebuffer"||Z==="qoe.slowseek")||Z==="qoe.restart")Z=this.loader?kKf(this.loader.videoTrack):{},this.U6("lasoe",Object.assign(this.loader?kKf(this.loader.audioTrack):
{},this.b3?.V?.Iw())),this.U6("lvsoe",Object.assign(Z,this.b3?.U?.Iw()));this.B("html5_log_centralized_player_time")&&this.U6("sabrSeekRefactorCmt",{cmt:this.getCurrentTime(),loaderCmt:this.loader?.fT(),bh:this.loader?.MX()})}Cc(Z,k,N){this.WA.Cc(Z,k,N)}f7(Z,k,N,a,T,K,y,Q){if(this.videoData.V?.isLive){var q=k.playerType===2?k:Z,r=Z.videoData.videoId,C=k.videoData.videoId;if(r&&C){var m=this.WA;if(Q?.Pb){if(m.qoe){r=m.qoe;C=Q.Pb;r.reportStats();var A=r.provider.videoData.clientPlaybackNonce,P=r.provider.videoData.videoId||
"",d=r.SW?.join(".")||A,h=r.GN?.join(".")||P;ag(r,K?4:T?2:0,C.w8.join(".")||A,C.OY.join(".")||P,a);r.reportStats();r.SW=C.w8;r.GN=C.OY;r.nu=C.adFormats;r.h6=C.serializedQoeContextData;ag(r,K?5:T?3:1,d,h,N);r.reportStats()}}else if(m.qoe){A=m.qoe;P=Z.cpn;d=k.cpn;h=q.videoData.qX;var B=A.provider.videoData.clientPlaybackNonce;const v=A.provider.videoData.videoId,O=d!==B&&C!==v;B=P!==B&&r!==v;A.reportStats();A.adCpn&&A.adCpn!==P||(A.adCpn=B?P:"",A.Fu=B?r:"",A.adFormat=B?h:void 0,ag(A,K?4:T?2:0,d,C,a),
A.reportStats(),A.adCpn=O?d:"",A.Fu=O?C:"",A.adFormat=O?h:void 0,ag(A,K?5:T?3:1,P,r,N),A.reportStats())}Q?.Sz?(m.V?.tq(),m.V?.j(),m.V?.Kp(Q.Sz),m.V?.j(!0),m.V?.C(!0,!0).send(),m.V?.MX()):(N=m,T=Z.cpn,N.D.has(T)?(K=N.D.get(T),pJ(K,!0).send(),K.G(),T!==N.provider.videoData.clientPlaybackNonce&&(Rg(K),N.V?.O(),N.D.delete(T))):(N.w_=N.provider.videoData.clientPlaybackNonce,N.w_&&N.V&&(N.D.set(N.w_,N.V),pJ(N.V).send(),N.V.G())),N=k.cpn,q=q.videoData,a-=this.lc(),m.D.has(N)?(q=m.D.get(N),a=q.Y&&isNaN(q.L)?
UF(q):NaN,q=q.C(!1),isNaN(a)||(q.j=a),q.send()):(a=IfN(m,m.provider,q,a),m.D.set(N,a),a.zt(new g.d7(CN(new g.QR,8),new g.QR)),a.CZ(),m.V?.G()),m.w_=N);this.B("html5_unify_csi_server_stitched_transition_logging")?(a=this.Fa,m=Z.cpn,Z=k.cpn,N=this.videoData.clientPlaybackNonce,q=k.videoData,k=(0,g.z)(),N=`${m===N?"video":"ad"}_to_${Z===N?"video":"ad"}`,N!=="video_to_ad"&&(T=N==="ad_to_video"?void 0:q,m=T?.wi,K={},q?.Pq&&(K.cttAuthInfo={token:q.Pq,videoId:q.videoId}),y&&(K.startTime=y),OL(N,K),y={targetVideoId:q?.videoId??
"empty_video",targetCpn:Z,adVideoId:T?.videoId??"empty_video",adClientPlaybackNonce:m?.cpn??T?.clientPlaybackNonce},m&&(y.adBreakType=m.adBreakType,y.adType=m.adType),g.lJ(y,N),gT(a,k,N))):(a=this.Fa,N=this.videoData.clientPlaybackNonce,q=(0,g.z)(),m=k.videoData,Z=`${Z.cpn===N?"video":"ad"}_to_${k.cpn===N?"video":"ad"}`,N={},m.Pq&&(N.cttAuthInfo={token:m.Pq,videoId:m.videoId}),y&&(N.startTime=y),OL(Z,N),g.lJ({targetVideoId:m.videoId,targetCpn:k.cpn,isSsdai:!0},Z),y||gT(a,q,Z))}}else g.pG(this.logger,
360717806,"SSTEvent for nonSS")}t5(){var Z=this.u0;const k=Z.UT;Z.UT=[];return k}UK(Z){this.videoData.OU=!0;this.dV(new g.yA("sabr.fallback",Z));this.ZQ(!0)}fK(Z,k=!0){this.videoData.mX=!0;k&&(this.dV(new g.yA("qoe.restart",Z)),this.ZQ(!0))}Dh(Z){this.U6("sdai",{aftimeout:Z});this.dV(new g.yA("ad.fetchtimeout",{timeout:Z}))}Yy(Z,k){this.U6("timelineerror",Z);Z=new g.yA("dai.timelineerror",Z);k?this.N4("dai.timelineerror",1,"RETRYABLE_ERROR",Td(Z.details)):this.dV(Z)}lA(){return g.j_(this.WA.provider)}getPlayerSize(){return this.AS.getPlayerSize()}SL(){return this.AS.SL()}tQ(){return this.Fa}QP(){return this.u0.QP()}getVolume(){return this.u0.getVolume()}Gx(){return this.u0.Gx()}isMuted(){return this.u0.isMuted()}yC(){return this.u0.yC()}Kt(){this.pk=
!0}B(Z){return this.kW.B(Z)}Yl(){return this.kW.Yl()}yu(Z,k,N,a,T){this.U6("xvt",{m:Z,g:k?1:0,tt:N?1:0,np:a?1:0,c:T})}HC(){this.loader?.resume()}Vr(){return g.KK(this.dh,"ad")}BV(){const Z=this.getCurrentTime(),k=Z-this.mx();var N=this.mediaElement?Rt(this.mediaElement.pN()):0;N=Math.floor(Math.max(N-k,0))+100;return this.loader?.BV(k,N)?(this.U6("sdai",{skipad:1,ct:k.toFixed(3),adj:N.toFixed(3)}),nQ(this.videoData)&&this.loader.seek(k+N,{seekSource:89,b0:"videoplayer_skipServerStitchedAd"}),wZy(this.HI,
Z),!0):!1}Xa(){return this.kW.Xa()}nP(){if(this.B("html5_generate_content_po_token"))return this.videoData.XW||"";this.u0.zm();return this.kW.gV||""}N_(){if(this.videoData.videoId)return this.videoData.qf}S9(){return this.videoData.videoId}pT(){return this.u0.Ll}iE(){return this.hc}w9(){return this.u0.w9()}vj(Z,k,N){this.Y4(CN(this.playerState,16,N));this.HI.vj(Z,k,N)}prefetchKeyPlay(Z,k){this.loader?.prefetchKeyPlay(Z,k)}TX(Z){return this.HI.TX(Z)}d7(){this.HI.d7()}VU(Z,k){const N=this.B("html5_generate_content_po_token")?
this.videoData:void 0;this.u0.VU(Z,k,N)}Pk(){return this.B("html5_remove_ios_7_hack_force_play")}mf(Z,k){this.WA.mf(Z,k)}Q9(){return this.WA.Q9()}Q_(){return this.u0.Q_()}sO(){return this.u0.sO(this)}Hg(){this.F0=!0}QJ(Z){this.loader?.QJ(Z)}yG(Z){this.HI.yG(Z)}};g.t=g.fX.prototype;g.t.CH=NR(48);g.t.AQ=NR(31);g.t.F8=NR(25);g.t.eU=NR(19);g.t.LZ=NR(13);var bc={primary:"Primary",secondary:"Secondary"};var YrH=class extends dY{constructor(Z){super(Z);this.events=new g.tt(Z);g.u(this,this.events);I(this.api,"isLifaAdPlaying",()=>this.api.isLifaAdPlaying());
this.events.K(Z,F1(Z.X().Yl())?"playbackChange":"serverstitchedvideochange",()=>{this.api.getVideoData()?.qW()&&(this.api.isLifaAdPlaying()?(this.playbackRate=this.api.getPlaybackRate(),this.api.setPlaybackRate(1)):this.api.setPlaybackRate(this.playbackRate))});
this.playbackRate=1}};var ZKB=class extends XO{constructor(Z){super("Loop",g.HH.DR);this.S=Z;const k=Z.B("delhi_modern_web_player_icons")?{J:"svg",W:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{d:"M17.29 1.29C17.11 1.46 17.01 1.70 17.00 1.94C16.98 2.19 17.06 2.43 17.22 2.63L17.29 2.70L18.58 4H7C5.67 4 4.40 4.52 3.46 5.46C2.52 6.40 2 7.67 2 9V13C2 13.26 2.10 13.51 2.29 13.70C2.48 13.89 2.73 14 3 14C3.26 14 3.51 13.89 3.70 13.70C3.89 13.51 4 13.26 4 13V9C4 8.20 4.31 7.44 4.87 6.87C5.44 6.31 6.20 6 7 6H18.58L17.29 7.29C17.11 7.48 17.01 7.73 17.01 7.99C17.01 8.25 17.11 8.50 17.30 8.69C17.49 8.88 17.74 8.98 18.00 8.98C18.26 8.98 18.51 8.88 18.70 8.70L22.41 5L18.70 1.29L18.63 1.22C18.43 1.06 18.19 .98 17.94 1.00C17.70 1.01 17.46 1.11 17.29 1.29ZM21 10C20.73 10 20.48 10.10 20.29 10.29C20.10 10.48 20 10.73 20 11V15C20 15.79 19.68 16.55 19.12 17.12C18.55 17.68 17.79 18 17 18H5.41L6.70 16.70C6.80 16.61 6.87 16.50 6.93 16.38C6.98 16.26 7.01 16.12 7.01 15.99C7.01 15.86 6.98 15.73 6.93 15.60C6.88 15.48 6.81 15.37 6.71 15.28C6.62 15.18 6.51 15.11 6.39 15.06C6.26 15.01 6.13 14.98 6.00 14.98C5.87 14.98 5.73 15.01 5.61 15.06C5.49 15.12 5.38 15.19 5.29 15.29L1.58 19L5.29 22.70L5.36 22.77C5.56 22.92 5.80 23.00 6.04 22.99C6.29 22.98 6.52 22.87 6.70 22.70C6.87 22.52 6.98 22.29 6.99 22.04C7.00 21.80 6.92 21.56 6.77 21.36L6.70 21.29L5.41 20H17C18.32 20 19.59 19.47 20.53 18.53C21.47 17.59 22 16.32 22 15V11C22 10.73 21.89 10.48 21.70 10.29C21.51 10.10 21.26 10 21 10Z",
fill:"white"}}]}:EO0();this.setIcon(k);this.subscribe("select",this.D,this);Z.createClientVe(this.element,this,28661);this.K(Z,"settingsMenuVisibilityChanged",this.U);this.listen("click",this.logClick);this.K(Z,"onLoopChange",this.onLoopChange);this.V(Z.getLoopVideo());Z.Z1().OH(this)}U(Z){Z&&this.V(this.S.getLoopVideo());this.S.logVisibility(this.element,Z)}logClick(){this.S.logClick(this.element)}onLoopChange(Z){this.V(Z)}D(Z){this.S.setLoopVideo(Z)}};var keT=class extends dY{constructor(Z){super(Z);Z.addEventListener("settingsMenuInitialized",()=>{this.menuItem||(this.menuItem=new ZKB(this.api),g.u(this,this.menuItem))});
Z.addEventListener("videodatachange",(k,N)=>{k=this.api.getPresentingPlayerType()===2;this.menuItem?.In(!N.isLivePlayback&&!k)})}};var NHn=class extends dY{constructor(Z){super(Z);this.events=new g.tt(Z);g.u(this,this.events);I(this.api,"seekToChapterWithAnimation",k=>{this.seekToChapterWithAnimation(k)});
I(this.api,"seekToTimeWithAnimation",(k,N)=>{this.seekToTimeWithAnimation(k,N)});
I(this.api,"renderChapterSeekingAnimation",(k,N,a)=>{this.api.renderChapterSeekingAnimation(k,N,a)});
I(this.api,"setMacroMarkers",k=>{this.setMacroMarkers(Z,k)});
I(this.api,"changeMarkerVisibility",(k,N,a)=>{this.changeMarkerVisibility(k,N,a)});
I(this.api,"isSameMarkerTypeVisible",k=>this.isSameMarkerTypeVisible(k))}seekToChapterWithAnimation(Z){if(g.Vn(this.api)&&!(Z<0)){var k=this.api.getVideoData(),N=k.ov;
if(N&&Z<N.length)for(const a of N)if(a.index===Z){Mp(this,a.startTime,a.title);return}this.B("web_key_moments_markers")&&(k=k.wz)&&Z<k.length&&k.forEach((a,T)=>{T===Z&&Mp(this,a.timeRangeStartMillis,a.title)})}}seekToTimeWithAnimation(Z,k){g.Vn(this.api)&&Mp(this,Z,k)}setMacroMarkers(Z,k){k={playerOverlays:{playerOverlayRenderer:{decoratedPlayerBarRenderer:{decoratedPlayerBarRenderer:{playerBar:{multiMarkersPlayerBarRenderer:k}}}}}};
Z=Z.getVideoData();Z.getWatchNextResponse();Z&&Z.getWatchNextResponse()==null&&(hE(Z,{raw_watch_next_response:k}),Z.publish("dataupdated"))}changeMarkerVisibility(Z,k,N){const a=this.api.getVideoData();if(a){var T=!1;if(Z)for(const K of k){if((Z=a.vD)&&!Z.includes(K))switch(N){case "CHANGE_MARKERS_VISIBILITY_RESTRICTION_MODE_NOT_OVERWRITE_SAME_TYPE":p3U(K,a)||(T=!0,a.vD?.push(K));break;case "CHANGE_MARKERS_VISIBILITY_RESTRICTION_MODE_NOT_OVERWRITE_ANY_TYPE":Z.length===0&&(T=!0,a.vD?.push(K));break;
default:T=!0,a.vD?.push(K)}}else for(const K of k)a.visibleOnLoadKeys.includes(K)||g.qF(a.vD,K)&&(T=!0);T&&this.api.publish("updatemarkervisibility")}}isSameMarkerTypeVisible(Z){const k=this.api.getVideoData();return k?p3U(Z,k):!1}};var aDi=class extends dY{constructor(Z){super(Z);this.events=new g.tt(Z);g.u(this,this.events);this.events.K(Z,"videodatachange",()=>{this.updateMetadata()});
this.events.K(Z,"presentingplayerstatechange",()=>{Rt0(this)});
this.events.K(Z,"SEEK_COMPLETE",()=>{MYU(this)})}updateMetadata(){var Z=this.api.getVideoData();
if(Z?.cG()){var k=this.api.X(),N=[],a="";if(!k.O){const T=this.api.getVideoData().getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.browserMediaSession?.browserMediaSessionRenderer;g.oJ(k)&&T?(N=nnj(T.thumbnailDetails),T.album&&(a=Jo(T.album))):N=[{src:Z.v9("mqdefault.jpg")||"",sizes:"320x180",type:"image/jpeg"}]}this.api.getVideoData()?.Vq()&&MYU(this);Rt0(this);Idb(this);navigator.mediaSession.metadata=new MediaMetadata({title:Z.title,artist:Z.author,artwork:N,album:a});k=Z=null;g.v3(this.api)&&
(Z=()=>{this.api.nextVideo()},k=()=>{this.api.previousVideo()});
nB("nexttrack",Z);nB("previoustrack",k)}}YW(){navigator.mediaSession.playbackState="none";navigator.mediaSession.metadata=null;const Z="nexttrack previoustrack play pause seekbackward seekforward seekto".split(" ");for(const k of Z)nB(k,null);this.api.getVideoData()?.Vq()&&navigator.mediaSession.setPositionState&&navigator.mediaSession.setPositionState({});super.YW()}};var THD=class extends dY{constructor(Z){super(Z);this.U=new Map;this.L=this.V=void 0;this.compositeVideoState=null;this.D=void 0;this.events=new g.tt(Z);g.u(this,this.events);this.events.K(Z,"modulecreated",k=>{a:{var N=this.api.getVideoData()?.getPlayerResponse()?.overlay?.playerControlsOverlayRenderer;if(N&&(N=g.J(N.compositeVideoOverlay,zhy),N?.sources?.length))for(a of N?.sources)if(a.isActive)break a;var a=void 0}k==="captions"&&a?.topLeftCornerX!==void 0&&a?.topLeftCornerY!==void 0&&a?.width!==
void 0&&a?.height!==void 0&&this.api.Uz({top:a.topLeftCornerY,right:1-a.topLeftCornerX-a.width,bottom:1-a.topLeftCornerY-a.height,left:a.topLeftCornerX})});
this.events.K(Z,"videodatachange",k=>{const N=this.api.getVideoData();this.V=void 0;this.U.clear();this.api.jl("compositeembargo",1);const a=N?.zC.get("PLAYER_CUE_RANGE_SET_IDENTIFIER_EMBARGO");a?.length?jC0(this,a.filter(T=>T.onEnter?.some(this.Y))):N?.cueRanges&&jC0(this,N.cueRanges.filter(T=>T.onEnter?.some(this.Y)));
k==="dataupdated"&&N?.compositeLiveStatusToken!==this.L&&(this.L=N?.compositeLiveStatusToken,this.api.bC())});
this.events.K(Z,g.te("compositeembargo"),k=>{if(this.V?.id!==k.id&&(this.api.A$(!0),this.U.has(k.id))){var N=this.U.get(k.id),a=this.api.getVideoData();for(const T of N)N=T.compositeEmbargo?.embargoStatusToken,a.Yh!==N&&(a.Yh=N,this.api.bC()),Enb(this,k)}});
this.events.K(Z,g.he("compositeembargo"),k=>{if(this.V?.id===k.id&&(this.api.A$(!1),this.U.has(k.id))){if(k=this.api.getVideoData())k.Yh=void 0;this.api.bC();Enb(this)}});
this.events.K(Z,"heartbeatRequest",k=>{this.compositeVideoState!==null&&(k.playbackState||(k.playbackState={}),k.playbackState.compositeVideoState=this.compositeVideoState)});
this.events.K(Z,"internalaudioformatchange",(k,N)=>{const a=this.api.getVideoData({OP:!1});a?.U6("atrkchg",{id:k,m:N});if(a&&!a.wh()){N=this.api.getAvailableAudioTracks();for(const T of N)if(T.getLanguageInfo().getId()===k){this.api.X().Kp=k;break}}});
this.events.K(Z,"onPlaybackAudioChange",()=>{this.api.bC();if(Z.getVideoData()?.X().B("html5_preload_on_mosaic_audio_track_change")){const k=this.api.getSourceConfigForActiveAudioTrack();k&&Z.preloadVideoByPlayerVars({videoId:k.videoId,live_preload:!0},1)}});
I(Z,"setCompositeParam",k=>{this.compositeVideoState=k});
this.api.B("web_watch_enable_multiview_manager")&&I(Z,"setCompositeVideoOverlayRendererComponent",k=>{this.setCompositeVideoOverlayRendererComponent(k)})}setCompositeVideoOverlayRendererComponent(Z){this.D&&(this.D.remove(),g.Wp(this.D,"ytp-composite-video-overlay-renderer"),this.D=void 0);
Z&&(g.jX(Z,"ytp-composite-video-overlay-renderer"),g.$n(this.api,Z,4),this.D=Z)}Y(Z){return Z.compositeEmbargo!==void 0}YW(){super.YW();this.U.clear()}};var Kre=class extends dY{constructor(Z){super(Z);this.events=new g.tt;g.u(this,this.events);this.events.K(Z,"applicationInitialized",()=>{({handleError:k=Xf,logEvent:N=g.TO}={});var k;for(h0=new QT0(k,N);uF.length>0;){var N=uF.shift();switch(N.type){case "ERROR":h0.QV(N.payload);break;case "EVENT":h0.logEvent(N.eventType,N.payload)}}});
I(this.api,"queueOfflineAction",this.queueOfflineAction.bind(this));I(this.api,"updateDownloadState",this.updateDownloadState.bind(this));I(this.api,"pauseVideoDownload",this.pauseVideoDownload.bind(this));I(this.api,"resumeVideoDownload",this.resumeVideoDownload.bind(this));I(this.api,"isOrchestrationLeader",this.isOrchestrationLeader.bind(this));I(this.api,"refreshAllStaleEntities",this.refreshAllStaleEntities.bind(this));I(this.api,"setUpPositionSyncInterval",this.setUpPositionSyncInterval.bind(this))}async queueOfflineAction(Z,
k,N,a){const T=I1(this.api.GZ());return T&&(Z=await T.jX([Z],k,N,a),Z.length)?Z[0]:Promise.reject()}updateDownloadState(Z,k){const N=I1(this.api.GZ());return N?N.updateDownloadState(Z,k):Promise.reject()}pauseVideoDownload(Z){const k=I1(this.api.GZ());k&&k.Fp(Z)}async resumeVideoDownload(Z){const k=I1(this.api.GZ());return k?k.lD(Z):Promise.reject()}isOrchestrationLeader(){return this.api.isOrchestrationLeader()}refreshAllStaleEntities(Z){Z===void 0&&(Z=14400);const k=I1(this.api.GZ());return k?k.refreshAllStaleEntities(Z):
Promise.reject()}setUpPositionSyncInterval(Z){const k=I1(this.api.GZ());k&&k.setUpPositionSyncInterval(Z)}};var yca=class extends dY{constructor(Z){super(Z);this.loaded=!1;this.overlay=null;this.events=new g.tt(Z);g.u(this,this.events);this.V=new g.tt(Z);g.u(this,this.V);this.events.K(Z,"modulesCreated",()=>{this.a8()&&this.load()});
this.events.K(Z,"modulesDestroyed",k=>{let N=!0;switch(k){case 2:case 3:N=!1;break;case 4:N=this.api.getPresentingPlayerType()===1}N&&this.unload()})}a8(){var Z=this.api.getVideoData();
return Z.Jl&&!Z.Mb}load(){this.loaded||g.CQ(this.api.X())||(this.overlay=new g.E({J:"div",BD:["ytp-ypc-clickwrap-overlay","ytp-player-content"],A:[{J:"h2",Z:"ytp-ypc-clickwrap-header",Da:"Would you like to start this rental?"},{J:"div",Z:"ytp-ypc-clickwrap-description",Da:this.api.getVideoData().Bx},{J:"button",BD:["ytp-ypc-clickwrap-confirm","ytp-button"],Da:"Start rental period"}]}),g.u(this,this.overlay),g.$n(this.api,this.overlay.element,4),this.overlay.K(this.overlay.Lp("ytp-ypc-clickwrap-confirm"),
"click",()=>{this.onConfirm()}),this.loaded=!0)}onConfirm(){this.overlay&&this.overlay.hide();
this.V.K(this.api,"videodatachange",()=>{this.api.GP("ypcRentalActivation")});
this.api.GP("ypcRentalActivation")}unload(){this.loaded&&(this.overlay&&(this.overlay.dispose(),this.overlay=null),this.V.U(),this.loaded=!1)}YW(){this.unload();super.YW()}};var Qn_=class extends dY{constructor(Z){super(Z);I(Z,"getAvailableQualityData",()=>this.getAvailableQualityData());
I(Z,"getAvailableQualityDataAndMessaging",()=>this.getAvailableQualityDataAndMessaging());
I(Z,"getPaygatedAudioQualityData",()=>this.getPaygatedAudioQualityData())}getAvailableQualityDataAndMessaging(){return{qualityData:this.getAvailableQualityData(),
qualityMessagingFormattedString:void 0}}getAvailableQualityData(){var Z=this.api.getVideoData();if(!Z)return[];var k=[],N=Z.getPlayerResponse()?.playabilityStatus?.paygatedQualitiesMetadata,a=WtX(N),T=N?.restrictedAdaptiveFormats;if(T){N=[];for(var K of T){if(K.mimeType?.includes("audio")&&this.api.B("enable_lr_upsell_for_premium_high_quality_audio"))continue;T=qD(K.mimeType,K.quality,K.itag.toString(),K.width.toString(),K.height.toString(),K.qualityLabel,K.qualityOrdinal&&YwR[K.qualityOrdinal]);
N.push(T)}Z=g.$z(Z);Bo(N);K=[];for(var y of N)uq(Z,y,this.api.X().L)===!0&&K.push(y);k=k.concat(YKf(K,!1,a))}y=this.api.jh();k=k.concat(YKf(y,!0,a));a=[];if(this.api.B("web_player_enable_premium_hbr_in_h5_api")){y=k;k=new Set;a=new Map;var Q={};for(var q of y)y=q.quality,N=q.isPlayable,(Z=q.qualityLabel)&&y&&(N&&a.has(y)&&a.get(y)!==Z?k.add(y):N&&a.set(y,Z),Q[Z]||(Q[Z]=q));q=[];for(var r of Object.values(Q))Q=r.quality,a=r,Q&&!k.has(Q)&&(a.formatId=void 0),q.push(a);r=k=q;q=0;for(Q=0;Q<r.length;Q++)r[Q].paygatedQualityDetails&&
(a=r[Q],r.splice(Q,1),r.splice(q,0,a),q++);return k}r={};for(Q of k)q=Q.quality,r[q]||(Q.formatId=void 0,a.push(Q),r[q]=!0);return a}getPaygatedAudioQualityData(){var Z=this.api.getVideoData();if(!Z)return[];Z=Z.getPlayerResponse()?.playabilityStatus?.paygatedQualitiesMetadata;var k=Z?.restrictedAdaptiveFormats;if(!k)return[];Z=WtX(Z);const N=[];for(const a of k){if(!a.mimeType?.includes("audio"))continue;k={formatId:a.itag?.toString(),audioQuality:a.audioQuality};const T=a.itag?Z[a.itag.toString()]:
void 0;T&&(k.paygatedQualityDetails={paygatedIndicatorText:T.paygatedIndicatorText,endpoint:T.endpoint,trackingParams:T.trackingParams});N.push(k)}return N}};var qhr={["internal-error"]:-1,["non-recoverable-error"]:-2,["api-disabled-by-application"]:-3,["invalid-argument"]:-4,["token-provider-invalid"]:-5},rca=class extends dY{constructor(Z){super(Z);this.D=1;this.Fa=null;this.nF={c1q:()=>this.D};
this.events=new g.tt(Z);g.u(this,this.events);this.events.K(Z,"d6de4videobindingchange",k=>{this.VH(k)});
this.events.K(Z,"csiinitialized",()=>{k0f(this)})}VH(Z){if(jG())if(!this.U&&this.V){Z.qf={coldStartInfo:{clientState:this.D}};
try{this.V.then(()=>{NkG(this,Z)},k=>{EJ(k,"player_update");
this.handleError(k,Z)})}catch(k){EJ(k,"player_update_catch"),this.handleError(k,Z)}}else this.U?NkG(this,Z):this.api.U6("pf",{m:this.U?1:0,
p:this.V?1:0})}handleError(Z,k){g.L9(Z);let N=0;Z.mediaIntegrityErrorName?N||(N=qhr[Z.mediaIntegrityErrorName]):Z.code&&(N=Z.code());k.qf={Q$:{code:N}}}};var CTh=class extends g.E{constructor(Z){super({J:"button",BD:["ytp-pip-button","ytp-button"],W:{title:Z.B("player_tooltip_data_title_killswitch")?"{{title}}":"","data-tooltip-title":"{{data-tooltip-title}}","data-priority":"8","data-title-no-tooltip":"{{data-title-no-tooltip}}","data-tooltip-target-id":"ytp-pip-button"},A:[CZ()]});this.api=Z;this.listen("click",this.onClick);const k=this.api.CN(),N=k.subscribe("visibilitystatechange",()=>{this.aq(k.i9())});
this.addOnDisposeCallback(()=>{k.eO(N)});
la(Z,this.element,this);this.aq(k.i9())}aq(Z){Z=Z?"Exit picture-in-picture":"Picture-in-picture";this.api.X().B("player_tooltip_data_title_killswitch")?this.update({title:Z,"data-title-no-tooltip":Z}):this.update({"data-tooltip-title":Z,"data-title-no-tooltip":Z});this.api.qj()}onClick(){this.api.togglePictureInPicture()}};var mFH=class extends dY{constructor(Z){super(Z);this.events=new g.tt(Z);g.u(this,this.events);this.events.K(Z,"standardControlsInitialized",()=>{this.createButton()});
g.fQ(this.api.X())&&(this.B("web_watch_pip")||this.B("web_shorts_pip"))&&I(this.api,"setDocumentPictureInPicture",k=>{this.setDocumentPictureInPicture(k)})}createButton(){this.button=new CTh(this.api);
g.u(this,this.button);this.api.vT(this.button);this.events.K(this.api,"videodatachange",()=>{aQG(this)});
aQG(this)}setDocumentPictureInPicture(Z){this.api.CN().XP(Z);Z=this.api.i9();const k=SjN(this.api.GZ());k&&(Z?k.load():k.unload());this.api.publish("documentpictureinpicturechange")}};var snn=class extends dY{constructor(Z){super(Z);this.loaded=!1;this.C=0;this.V=!1;this.j={};this.D=[];this.Y=0;this.G=!1;this.events=new g.tt(Z);g.u(this,this.events);this.U=new g.tt(Z);g.u(this,this.U);this.events.K(Z,"modulesCreated",()=>{this.a8()&&this.load()});
this.events.K(Z,"modulesDestroyed",k=>{const N=this.api.getPresentingPlayerType();switch(k){case 2:case 3:k=N!==1&&!(N===5||N===6||N===7);break;case 4:k=!this.V;break;default:k=!0}k&&this.unload()})}a8(){return this.api.getVideoData().Wo.includes("playableSequences")}load(){if(!this.loaded){this.L||(this.L=new g.E({J:"div",
BD:["ytp-player-content","ytp-yto-overlay"],A:[{J:"div",BD:["ytp-yto-preroll-message"],Da:"Video will begin shortly"}]}),g.u(this,this.L),Tkr(this,!1),g.$n(this.api,this.L.element,4));var Z=this.api.getPresentingPlayerType();this.U.K(this.api,"playbackChange",()=>{var k=this.api.getPresentingPlayerType()===5;g.D(this.api.getRootNode(),"ytp-yto-preroll",k);Tkr(this,k)});
this.U.K(this.api,"presentingplayerstatechange",k=>{this.onStateChange(k)});
this.U.K(this.api,g.te("yto"),(k,N)=>{this.onCueRangeEnter(k,N)});
this.U.K(this.api,"ytoprerollinternstitialnext",()=>{yAj(this)});
QGy(this);this.loaded=!0;this.api.GP("playableSequences",Z)}}onCueRangeEnter(Z){Z=Z.getId();if(!this.V){if(this.api.getPlayerStateObject(1).V(2)){if(this.G)return}else this.G=!1;this.D.includes(Z)||this.D.push(Z);this.api.getPresentingPlayerType()===1&&Kuf(this)}}onStateChange(Z){var k=this.api.getPresentingPlayerType();Z=Z.state;this.V||k!==5&&k!==6&&k!==7||Z.V(1)||Z.V(16)||Z.V(32)||(k=Z.V(128),(Z.V(2)||k)&&yAj(this))}unload(){this.loaded&&(this.C=0,this.G=this.V=!1,this.j={},this.Y=0,this.D.length=
0,this.U.U(),this.loaded=!1)}YW(){this.unload();super.YW()}};var AcB=class{constructor(Z=200){this.D=Z;this.U=this.V=void 0}async delete(Z){await q2y(this);if(this.V)try{const k=g.MU(Z,"videoPlaybackPositionEntity");await g.Vq(this.V,k);this.U===Z&&(this.U=void 0)}catch(k){throw Error("Failed to delete playback position",{cause:k});}}};var PTT=class extends dY{constructor(Z){super(Z);Z=Z.X().Yl().V.Aq(Wwj);const k=new AcB(Number(Z)||void 0);I(this.api,"addOrUpdateOnlinePlaybackPosition",(N,a,T)=>C9f(k,N,a,T));
I(this.api,"deleteOnlinePlaybackPosition",N=>k.delete(N))}};var ccB=class extends dY{constructor(Z){super(Z);this.events=new g.tt(Z);g.u(this,this.events);I(this.api,"musicDisableUi",()=>{g.jX(this.api.getRootNode(),"ytp-player-in-bar-disable-ui")});
I(this.api,"musicEnableUi",()=>{g.Wp(this.api.getRootNode(),"ytp-player-in-bar-disable-ui")})}};var gY=class extends g.E{constructor(Z,k=!0,N=!1){super({J:"div",Z:"ytp-suggested-action"});this.S=Z;this.tW=this.FS=this.vD=this.dA=this.D=this.zt=this.expanded=this.enabled=this.HA=!1;this.bq=new g.Uc(()=>{this.badge.element.style.width=""},200,this);
this.O6=new g.Uc(()=>{WI(this);YV(this)},200,this);
this.qX=this.S.B("delhi_modern_web_player")?40:34;this.dismissButton=new g.E({J:"button",BD:["ytp-suggested-action-badge-dismiss-button-icon","ytp-button"]});g.u(this,this.dismissButton);this.L=new g.E({J:"div",Z:"ytp-suggested-action-badge-expanded-content-container",A:[{J:"label",Z:"ytp-suggested-action-badge-title",Da:"{{badgeLabel}}"},this.dismissButton]});g.u(this,this.L);this.s6=new g.E({J:"div",Z:"ytp-suggested-action-badge-icon-container",A:[k?{J:"div",Z:"ytp-suggested-action-badge-icon"}:
""]});g.u(this,this.s6);this.badge=new g.E({J:N?"div":"button",BD:["ytp-button","ytp-suggested-action-badge","ytp-suggested-action-badge-with-controls"],A:[this.s6,this.L]});g.u(this,this.badge);this.badge.HD(this.element);this.xW=new g.ML(this.badge,250,!1,100,()=>{this.S.B("web_player_overlay_positioned_layout")&&this.hide()});
g.u(this,this.xW);Z.B("web_player_overlay_positioned_layout")&&this.hide();this.hp=new g.ML(this.L,250,!1,100);g.u(this,this.hp);this.Ap=new g.o3(this.j9,null,this);g.u(this,this.Ap);this.iq=new g.o3(this.LC,null,this);g.u(this,this.iq);g.u(this,this.bq);g.u(this,this.O6);this.S.createServerVe(this.badge.element,this.badge,!0);this.S.createServerVe(this.dismissButton.element,this.dismissButton,!0);this.K(this.S,"onHideControls",()=>{this.Kp(!1)});
this.K(this.S,"onShowControls",()=>{this.Kp(!0)});
this.K(this.badge.element,"click",this.Sm);this.K(this.dismissButton.element,"click",this.j);this.K(this.S,"pageTransition",this.FN);this.K(this.S,"appresize",this.U);this.K(this.S,"fullscreentoggled",this.hI);this.K(this.S,"cardstatechange",this.PG);this.K(this.S,"annotationvisibility",this.A1,this);this.K(this.S,"offlineslatestatechange",this.GF,this)}Sm(){}j(){}C(){return!0}j9(){let Z;this.expanded?(this.hp.show(),Z=this.L.element.scrollWidth):(Z=this.L.element.scrollWidth,this.hp.hide());this.Ke=
this.qX+Z;g.D(this.badge.element,"ytp-suggested-action-badge-expanded",this.expanded);this.badge.element.style.width=`${this.expanded?this.qX:this.Ke}px`;this.iq.start()}LC(){this.badge.element.style.width=`${this.expanded?this.Ke:this.qX}px`;this.bq.start()}MX(){this.D&&this.S.logVisibility(this.badge.element,this.C());this.dA&&this.S.logVisibility(this.dismissButton.element,this.C()&&this.hq())}Kp(Z){this.vD=Z;YV(this);WI(this);this.U()}GF(){g.D(this.badge.element,"ytp-suggested-action-badge-with-offline-slate",
!0)}hq(){return this.FS||this.vD||!this.zt}U(){this.C()?(this.show(),this.xW.show()):this.xW.hide();this.MX()}FN(){this.enabled=!1;this.U()}G(Z){Z?this.dA&&this.S.logClick(this.dismissButton.element):this.D&&this.S.logClick(this.badge.element)}A1(){this.U()}PG(Z){this.tW=Z===1;this.U();g.D(this.badge.element,"ytp-suggested-action-badge-with-offline-slate",!1)}hI(){g.D(this.badge.element,"ytp-suggested-action-badge-fullscreen",this.S.isFullscreen());this.U()}};var wY=class extends g.af{constructor(Z,k,N,a,T,K){const y={J:"div",Z:"ytp-panel"};let Q,q,r;if(N){Q="ytp-panel-back-button";q="ytp-panel-title";const C={J:"div",Z:"ytp-panel-header",A:[{J:"div",BD:["ytp-panel-back-button-container"],A:[{W:{"aria-label":"Back to previous menu"},J:"button",BD:["ytp-button",Q]}]},{J:"span",BD:[q],W:{role:"heading","aria-level":"2"},A:[N]}]};T&&(r="ytp-panel-options",C.A.push({J:"button",BD:["ytp-button",r],A:[a]}));y.A=[C]}a=!1;K&&(K={J:"div",Z:"ytp-panel-footer",A:[K]},
a=!0,y.A?y.A.push(K):y.A=[K]);super(y);this.content=k;a&&y.A?k.HD(this.element,y.A.length-1):k.HD(this.element);this.f$=!1;this.gP=a;N&&(this.backButton=this.Lp(Q),N=this.Lp(q),this.K(this.backButton,"click",this.wC),this.K(N,"click",this.wC),this.f$=!0,T&&this.K(this.Lp(r),"click",T));k.subscribe("size-change",this.W$,this);this.K(Z,"fullscreentoggled",this.W$);this.S=Z}W$(){this.publish("size-change")}EG(){return kJ(this)}HK(){return kJ(this)}focus(){this.content.focus()}wC(){this.publish("back")}};g.$m=class extends wY{constructor(Z,k=null,N,a,T,K){const y={role:"menu"};k&&(y.id=k);k=new g.af({J:"div",Z:"ytp-panel-menu",W:y});super(Z,k,N,a,T,K);this.menuItems=k;this.items=[];g.u(this,this.menuItems)}OH(Z,k=!1){if(k)this.items.push(Z),this.menuItems.element.appendChild(Z.element);else{k=g.F_(this.items,Z,sGy);if(k>=0)return;k=~k;g.dH(this.items,k,0,Z);qi(this.menuItems.element,Z.element,k)}Z.subscribe("size-change",this.NI,this);this.menuItems.publish("size-change")}EG(){kJ(this)||this.items[0].focus();
return!0}HK(){this.items[this.items.length-1].focus();return!0}Bq(Z){Z.unsubscribe("size-change",this.NI,this);this.jm()||(g.qF(this.items,Z),this.menuItems.element.removeChild(Z.element),this.menuItems.publish("size-change"))}NI(){this.menuItems.publish("size-change")}focus(){let Z=0;for(let k=0;k<this.items.length;k++){const N=this.items[k].element;if(N.getAttribute("role")==="menuitemradio"){if(N.getAttribute("aria-checked")==="true"){Z=k;break}}else break}this.items[Z].focus()}Va(){return this.items.length}};g.xm=class extends nz{constructor(Z,k){super(Z,{J:"div",BD:["ytp-popup",k||""],A:[{J:"div",Z:"ytp-focus-trap-before",W:{tabindex:"0"}},{J:"div",Z:"ytp-popup-content"},{J:"div",Z:"ytp-focus-trap-after",W:{tabindex:"0"}}]},100,!0);this.V=[];this.Y=this.D=null;this.maxHeight=this.maxWidth=0;this.size=new g.i0(0,0);this.content=this.Lp("ytp-popup-content");this.listen("keydown",this.Kn);this.K(this.Lp("ytp-focus-trap-before"),"focus",this.tq);this.K(this.Lp("ytp-focus-trap-after"),"focus",this.Rq)}tq(Z){this.V[this.V.length-
1].HK()||Z.preventDefault()}Rq(Z){this.V[this.V.length-1].EG()||Z.preventDefault()}show(){super.show();this.VG()}hide(){super.hide();this.V.length>1&&g.Tx(this)}VG(){P9N(this);this.LF&&(AAG(this),g.n1(this.element,this.size))}gr(){const Z=this.V.pop();a1(this,Z,this.V[this.V.length-1],!0)}Kn(Z){if(!Z.defaultPrevented)switch(Z.keyCode){case 27:this.cA();Z.preventDefault();break;case 37:this.V.length>1&&this.gr();Z.preventDefault();break;case 39:Z.preventDefault()}}focus(){this.V.length&&this.V[this.V.length-
1].focus()}YW(){super.YW();this.D&&this.D.dispose();this.Y&&this.Y.dispose()}};var HKc=class extends g.xm{constructor(Z){super(Z,"ytp-shopping-product-menu");this.Vm=new g.$m(this.S);g.u(this,this.Vm);this.hide();g.KY(this,this.Vm);g.$n(this.S,this.element,4)}open(Z,k){this.initialize(Z.items)&&this.Iv(k,!!k)}initialize(Z){g.Ng(this.Vm);if(Z===void 0||Z.length===0)return!1;let k=Z.length;for(const N of Z)this.OH(N,k--);return!0}OH(Z,k){Z.menuNavigationItemRenderer?dsf(this,Z.menuNavigationItemRenderer,k):Z.menuServiceItemRenderer&&Xny(this,Z.menuServiceItemRenderer,k)}};var dFH=class extends gY{constructor(Z){super(Z,!1,!0);this.isCounterfactual=this.Y=this.isVisible=this.isInitialized=this.shouldShowOverflowButton=this.shouldHideDismissButton=!1;this.zt=!0;this.overflowButton=new g.E({J:"button",BD:["ytp-featured-product-overflow-icon","ytp-button"],W:{"aria-haspopup":"true"}});this.overflowButton.hide();g.u(this,this.overflowButton);this.badge.element.classList.add("ytp-suggested-action");this.thumbnailImage=new g.E({J:"img",Z:"ytp-suggested-action-badge-img",
W:{src:"{{url}}"}});this.thumbnailImage.hide();g.u(this,this.thumbnailImage);this.thumbnailIcon=new g.E({J:"div",Z:"ytp-suggested-action-badge-icon"});this.thumbnailIcon.hide();g.u(this,this.thumbnailIcon);this.banner=new g.E({J:"a",Z:"ytp-suggested-action-container",A:[this.thumbnailImage,this.thumbnailIcon,{J:"div",Z:"ytp-suggested-action-details",A:[{J:"text",Z:"ytp-suggested-action-title",Da:"{{title}}"},{J:"text",Z:"ytp-suggested-action-subtitle",Da:"{{subtitle}}"},{J:"text",Z:"ytp-suggested-action-metadata-text",
Da:"{{metadata}}"}]},this.dismissButton,this.overflowButton]});g.u(this,this.banner);this.banner.HD(this.L.element);this.K(this.S,"videodatachange",this.onVideoDataChange);this.K(this.S,g.te("suggested_action_view_model"),this.Tt);this.K(this.S,g.he("suggested_action_view_model"),this.pF);this.K(this.overflowButton.element,"click",this.Qz);this.K(Z,"featuredproductdismissed",this.j);this.S.createServerVe(this.banner.element,this.banner,!0)}Sm(Z){Z.target!==this.dismissButton.element&&Z.target!==this.overflowButton.element&&
(this.G(),this.onClickCommand&&g.A7(this.S,"innertubeCommand",this.onClickCommand))}j(){this.enabled=!1;this.xW.hide()}C(){return!!this.V&&this.enabled}onVideoDataChange(Z,k){this.Rq(k);if(this.V){this.tq();a:if(!this.isCounterfactual){this.banner.update({title:this.V?.title,subtitle:this.V?.subtitle,metadata:this.V?.metadataText});this.onClickCommand=g.J(this.V?.onTap,uA);if(Z=g.J(this.V?.onOverflow,uA))this.O=g.J(Z,tjN);if(this.V?.thumbnailImage){Z=this.V?.thumbnailImage?.sources||[];if(Z.length===
0)break a;this.thumbnailImage.update({url:Z[0].url})}else this.V?.thumbnailIconName&&this.thumbnailIcon.update({icon:this.V?.thumbnailIconName});this.shouldShowOverflowButton=!!this.V?.shouldShowOverflowButton;this.shouldHideDismissButton=!!this.V?.shouldHideDismissButton}this.banner.element.setAttribute("aria-label",this.V?.a11yLabel||"");this.xl=this.V?.dismissButtonA11yLabel;this.dismissButton.hide();this.overflowButton.hide();this.isInitialized=!0;Q9(this)}}Tt(){this.isVisible=!0;Q9(this)}pF(){this.isVisible=
!1;Q9(this)}MX(){super.MX();this.Y&&this.S.logVisibility(this.banner.element,this.isVisible)}G(){super.G(!1);this.Y&&this.S.logClick(this.banner.element)}Qz(Z){this.N||(this.N=new HKc(this.S),g.u(this,this.N));this.O?.menu?.menuRenderer&&(this.N.open(this.O.menu.menuRenderer,Z.target),Z.preventDefault())}Rq(){}tq(){}YW(){this.S.jl("suggested_action_view_model");super.YW()}};var XBh=class extends dFH{Rq(Z){this.productUpsellSuggestedActionViewModel=g.J(Z.getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.suggestedActionViewModel,CGf);this.productUpsellSuggestedActionViewModel?.content&&(this.V=g.J(this.productUpsellSuggestedActionViewModel?.content,jM0));(this.Y=!!this.productUpsellSuggestedActionViewModel?.loggingDirectives?.trackingParams)&&this.S.setTrackingParams(this.banner.element,this.productUpsellSuggestedActionViewModel?.loggingDirectives?.trackingParams||
null);this.isCounterfactual=!!this.productUpsellSuggestedActionViewModel?.isCounterfactualServing}tq(){const Z=[];for(const k of this.productUpsellSuggestedActionViewModel?.ranges||[]){if(!k)continue;const N=Number(k.startTimeMilliseconds),a=Number(k.endTimeMilliseconds);isNaN(N)||isNaN(a)||Z.push(new g.pe(N,a,{id:"product_upsell",namespace:"suggested_action_view_model"}))}this.S.f8(Z)}};var LrD=class extends dY{constructor(Z){super(Z);this.V=new XBh(this.api);g.u(this,this.V);g.$n(this.api,this.V.element,4)}};var Vie=class extends dY{constructor(Z){super(Z);this.V=!0;const k=new g.tt(Z);g.u(this,k);k.K(Z,"internalaudioformatchange",(N,a)=>{u6G(this,N,a)});
k.K(Z,"annotationvisibility",N=>{this.api.B("web_fix_annotations")&&hSj(this,(294).toString(),{boolValue:N})});
k.K(Z,"videoplayerreset",()=>{rT(this)});
k.K(Z,"videodatachange",(N,a)=>{this.onVideoDataChange(N,a)})}onVideoDataChange(Z,k){k.wh()&&(Z==="newdata"&&rT(this),this.V&&Z==="dataloaded"&&(this.V=!1,$i(gz(Sb(this.api.X(),this.api.getVideoData()?.G()),N=>{fQ0(this,N)}),()=>{this.V=!0})))}jU(){if(g.Qw(this.api.X())){const Z=g.GC(this.api.X(),this.api.getVideoData()?.G());
return gz(Od(Z),k=>{const N=SY();eY(N,k);return this.api.jU(N)})}return Od(this.api.jU())}};var Dsf=class{constructor(){this.label="Auto-dubbed"}};g.GP=class extends g.y9{constructor(Z,k,N,a,T,K,y){super(g.zn({"aria-haspopup":"true"}),k,Z);this.on=a;this.FS=!1;this.C=null;this.options={};this.cI=new g.$m(N,void 0,Z,T,K,y);g.u(this,this.cI);this.listen("keydown",this.Kn);this.listen("click",this.open)}open(){g.KY(this.on,this.cI)}U(Z){Bkr(this);const k=this.options[Z];k&&(k.element.setAttribute("aria-checked","true"),this.setContent(this.D(Z)),this.C=Z)}Y(Z){g.Ng(this.cI);const k={};let N=!1;for(let a=0;a<Z.length;a++){const T=Z[a];let K=this.options[T];
const y=T===this.C;y&&(N=!0);K&&K.priority===-a?(g.UK(this.options[T],this.D(T,!0)),delete this.options[T]):K=this.N(T,-a,y);k[T]=K;this.cI.OH(K,!0)}N||(this.C=null);for(const a of Object.keys(this.options))this.options[a].dispose();this.options=k}N(Z,k,N,a){N={J:"div",BD:["ytp-menuitem",a?"ytp-menuitem-with-footer":""],W:{tabindex:"0",role:"menuitemradio","aria-checked":N?"true":"false"},A:[{J:"div",BD:["ytp-menuitem-label"],Da:"{{label}}"}]};a&&(a={J:"div",Z:"ytp-menuitem-footer",A:[a]},N.A?N.A.push(a):
N.A=[a]);k=new g.y9(N,k,this.D(Z,!0));k.listen("click",()=>{this.vD(Z)});
return k}enable(Z){this.FS?Z||(this.FS=!1,this.j(!1)):Z&&(this.FS=!0,this.j(!0))}j(Z){Z?this.on.OH(this):this.on.Bq(this)}V(Z){this.publish("select",Z)}vD(Z){this.V(Z)}D(Z){return Z.toString()}Kn(Z){Z.defaultPrevented||Z.keyCode!==39||(this.open(),Z.preventDefault())}YW(){this.FS&&this.on.Bq(this);super.YW();for(const Z of Object.keys(this.options))this.options[Z].dispose()}};var FrJ=class extends g.GP{constructor(Z,k){super("Sleep timer",g.HH.SLEEP_TIMER,Z,k);this.S=Z;this.Sm={};this.zt=this.L("Off");this.xW=this.G="";Z.B("web_settings_menu_icons")&&(k=Z.B("delhi_modern_web_player_icons")?{J:"svg",W:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{d:"M12.33 1.00C12.22 1.00 12.11 1.00 12 1C5.92 1 1 5.92 1 12C1 18.07 5.92 23 12 23C13.90 23.00 15.78 22.50 17.44 21.55C19.10 20.61 20.48 19.25 21.46 17.61L21.64 17.29C22.06 16.52 21.21 15.73 20.35 15.88C18.76 16.15 17.12 15.94 15.66 15.27C14.19 14.59 12.97 13.49 12.14 12.11C11.31 10.73 10.91 9.13 11.01 7.52C11.11 5.91 11.69 4.37 12.67 3.09L12.89 2.83C13.45 2.16 13.20 1.03 12.33 1.00ZM15.56 2.60C15.45 2.84 15.43 3.11 15.51 3.36C15.59 3.61 15.77 3.82 16.01 3.94C16.91 4.39 17.73 4.99 18.44 5.71L18.73 6.03L18.80 6.10C18.99 6.27 19.22 6.36 19.47 6.37C19.72 6.37 19.96 6.28 20.15 6.12C20.33 5.95 20.45 5.72 20.48 5.48C20.51 5.23 20.44 4.98 20.29 4.78L20.23 4.70L19.87 4.31C19.01 3.43 18.01 2.70 16.90 2.15C16.67 2.03 16.39 2.01 16.14 2.10C15.89 2.18 15.68 2.36 15.56 2.60M10.24 3.17C9.42 4.64 8.99 6.31 9 8C9 13.42 13.32 17.84 18.71 17.99C17.86 18.93 16.83 19.69 15.67 20.21C14.52 20.73 13.26 21.00 12 21C9.76 21.00 7.60 20.17 5.95 18.67C4.29 17.17 3.25 15.10 3.03 12.88C2.81 10.65 3.43 8.43 4.76 6.63C6.09 4.84 8.05 3.60 10.24 3.17M21.16 7.88C20.93 7.96 20.73 8.12 20.61 8.34C20.49 8.55 20.45 8.81 20.50 9.05L20.53 9.15L20.66 9.56C20.93 10.53 21.04 11.54 20.98 12.55C20.97 12.81 21.06 13.06 21.23 13.26C21.41 13.45 21.65 13.57 21.92 13.59C22.18 13.60 22.44 13.52 22.63 13.34C22.83 13.17 22.95 12.93 22.97 12.67C23.05 11.44 22.92 10.20 22.58 9.02L22.43 8.51L22.39 8.42C22.29 8.19 22.11 8.01 21.88 7.91C21.65 7.81 21.40 7.80 21.16 7.88Z",
fill:"white"}}]}:{J:"svg",W:{height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{d:"M16.67,4.31C19.3,5.92,21,8.83,21,12c0,4.96-4.04,9-9,9c-2.61,0-5.04-1.12-6.72-3.02C5.52,17.99,5.76,18,6,18 c6.07,0,11-4.93,11-11C17,6.08,16.89,5.18,16.67,4.31 M14.89,2.43C15.59,3.8,16,5.35,16,7c0,5.52-4.48,10-10,10 c-1,0-1.97-0.15-2.89-0.43C4.77,19.79,8.13,22,12,22c5.52,0,10-4.48,10-10C22,7.48,19,3.67,14.89,2.43L14.89,2.43z M12,6H6v1h4.5 L6,10.99v0.05V12h6v-1H7.5L12,7.01V6.98V6L12,6z",fill:"#fff"}}]},this.setIcon(k));
this.O=new g.E({J:"div",BD:["ytp-menuitem-label-wrapper"],A:[{J:"div",Da:"End of video"},{J:"div",BD:["ytp-menuitem-sublabel"],Da:"{{content}}"}]});g.u(this,this.O);this.listen("click",this.onClick);this.K(Z,"videodatachange",this.onVideoDataChange);this.K(Z,"presentingplayerstatechange",this.aq);this.K(Z,"settingsMenuVisibilityChanged",this.Rq);Z.createClientVe(this.element,this,218889);this.aq();g.A7(this.S,"onSleepTimerFeatureAvailable")}aq(){const Z=this.L("Off");this.S.getPresentingPlayerType()!==
2?(inr(this),this.U(this.zt),this.G&&(this.zt===Z?this.G="":this.setSleepTimerTimeLeft(this.G)),this.xW&&this.setVideoTimeLeft(this.xW),this.enable(!0)):(this.Y([]),this.enable(!1))}V(Z){this.dA(Z);this.on.gr()}L(Z){switch(Z){case "Off":return"Off";case "End of video":return"End of video";case "End of playlist":return"End of playlist";default:return`${Z.toString()} ${"Minutes"}`.toLowerCase()}}dA(Z){const k=this.Sm[Z],N=k==="End of video"||k==="End of playlist";k==="Off"&&(this.G="");this.S.getPlayerState()!==
0&&this.S.getPlayerState()!==5||!N?(this.zt=Z,super.V(Z),this.U(Z),g.A7(this.S,"onSleepTimerSettingsChanged",k)):g.A7(this.S,"innertubeCommand",{openPopupAction:{popupType:"TOAST",popup:{notificationActionRenderer:{responseText:{simpleText:"Video has already ended"}}}}})}onVideoDataChange(Z){Z==="dataloaded"&&inr(this)}Rq(Z){this.S.logVisibility(this.element,Z)}onClick(){this.S.logClick(this.element)}resetSleepTimerMenuSettings(){this.dA(this.L("Off"))}setSleepTimerTimeLeft(Z){this.G=Z;this.setContent(Z)}setVideoTimeLeft(Z){this.xW=
Z;this.O.setContent(Z)}};var tir=class extends dY{constructor(Z){super(Z);Z.addEventListener("settingsMenuInitialized",()=>{this.menuItem||(this.menuItem=new FrJ(this.api,this.api.Z1()),g.u(this,this.menuItem))});
Z.addEventListener("openSettingsMenuItem",k=>{k==="menu_item_sleep_timer"&&(this.menuItem||this.api.Z1()?.Iv(),this.menuItem.open())});
I(Z,"resetSleepTimerMenuSettings",()=>{this.resetSleepTimerMenuSettings()});
I(Z,"setSleepTimerTimeLeft",k=>{this.setSleepTimerTimeLeft(k)});
I(Z,"setVideoTimeLeft",k=>{this.setVideoTimeLeft(k)})}resetSleepTimerMenuSettings(){this.menuItem&&this.menuItem.resetSleepTimerMenuSettings()}setSleepTimerTimeLeft(Z){this.menuItem&&this.menuItem.setSleepTimerTimeLeft(Z)}setVideoTimeLeft(Z){this.menuItem&&this.menuItem.setVideoTimeLeft(Z)}};var hJK=class extends dY{constructor(Z){super(Z);this.events=new g.tt(Z);g.u(this,this.events);this.events.K(Z,"onSnackbarMessage",k=>{switch(k){case 1:this.api.getPlayerStateObject().isBuffering()&&g.A7(this.api,"innertubeCommand",{openPopupAction:{popup:{notificationActionRenderer:{responseText:{runs:[{text:"Experiencing interruptions?"}]},actionButton:{buttonRenderer:{style:"STYLE_OVERLAY",size:"SIZE_DEFAULT",text:{runs:[{text:"Find out why"}]},navigationEndpoint:{commandMetadata:{webCommandMetadata:{url:"https://support.google.com/youtube/answer/3037019#check_ad_blockers&zippy=%2Ccheck-your-extensions-including-ad-blockers",
webPageType:"WEB_PAGE_TYPE_UNKNOWN"}},urlEndpoint:{url:"https://support.google.com/youtube/answer/3037019#check_ad_blockers&zippy=%2Ccheck-your-extensions-including-ad-blockers",target:"TARGET_NEW_WINDOW"}},loggingDirectives:{clientVeSpec:{uiType:232471}}}},loggingDirectives:{clientVeSpec:{uiType:232470}}}},durationHintMs:5E3,popupType:"TOAST"}})}})}};var gci;
g.tU=class extends g.n9{constructor(Z,k=!1,N,a=!1,T=!1){super();this.dA=T;this.O=!1;this.Y=new i$(this);this.L=this.j=null;this.D=this.U=!1;g.u(this,this.Y);this.target=Z;this.V=k;this.zt=N||Z;this.O=a;k&&(g.YK&&this.target.setAttribute("draggable","true"),T||(this.target.style.touchAction="none"));mT(this)}K(Z,k){this.Y.K(this.zt,Z,k,void 0,!this.V)}cancel(){this.D&&(this.D=!1,this.publish("dragend",0,0,null));this.U&&(this.U=!1,this.publish("hoverend",0,0,null),s8(this),mT(this))}Kx(Z){s8(this);this.K(CY("move"),
this.N);this.K(CY("out"),this.qZ);this.K("touchstart",this.C);this.V&&this.K(CY("down"),this.G);const k=Z.target;Z=new g.Of(Z.pageX,Z.pageY);this.U=!0;this.publish("hoverstart",Z.x,Z.y,k);this.publish("hovermove",Z.x,Z.y,k)}N(Z){const k=Z.target;Z=new g.Of(Z.pageX,Z.pageY);if(this.L){const N=this.L;this.L=null;if(N.relatedTarget===k&&vs(new g.Of(N.pageX,N.pageY),Z))return}this.publish("hovermove",Z.x,Z.y,k)}qZ(Z){const k=new g.Of(Z.pageX,Z.pageY),N=Z.relatedTarget;try{if(N&&g.C1(this.target,N)){this.L=
Z;this.publish("hovermove",k.x,k.y,N);return}}catch(a){}s8(this);mT(this);this.U=!1;this.publish("hoverend",k.x,k.y,N)}Sm(Z){this.Kx(Z);this.G(Z)}G(Z){if(typeof Z.button!=="number"||Z.button===0){s8(this);this.Y.K(A1(Z.target),CY("move"),this.vD);this.Y.K(A1(Z.target),CY("up"),this.xW);var k=Z.target;if(g.YK)this.K("dragstart",this.FS);else if(Z.preventDefault(),(g.iS||$1)&&k)a:{let N=k;for(;N;){if(AI(N)||N.getAttribute("tabindex")==="-1"){N.focus();break a}N=N.parentElement}A1(k).activeElement.blur()}this.D=
!0;Z=new g.Of(Z.pageX,Z.pageY);this.publish("dragstart",Z.x,Z.y,k);this.publish("dragmove",Z.x,Z.y,k)}}FS(Z){Z.preventDefault()}vD(Z){let k=Z.target;k===A1(Z.target)&&(k=null);Z=new g.Of(Z.pageX,Z.pageY);this.publish("hovermove",Z.x,Z.y,k);this.publish("dragmove",Z.x,Z.y,k)}xW(Z){s8(this);this.D=!1;const k=jr(Z),N=Z.target;Z=new g.Of(Z.pageX,Z.pageY);k&&g.C1(this.target,k)?(this.K(CY("move"),this.N),this.K(CY("out"),this.qZ),this.K(CY("down"),this.G),this.K("touchstart",this.C),this.publish("dragend",
Z.x,Z.y,N)):(mT(this),this.U=!1,this.publish("dragend",Z.x,Z.y,N),this.publish("hoverend",Z.x,Z.y,N))}C(Z){const k=Z.changedTouches[0];k&&(s8(this),this.dA||(this.K("touchmove",this.Rq),this.K("touchend",this.Vz),this.K("touchcancel",this.Vz),this.j=k.identifier,Z=Z.target,this.U||(this.U=!0,this.publish("hoverstart",k.pageX,k.pageY,Z)),this.publish("hovermove",k.pageX,k.pageY,Z),this.V&&(this.D=!0,this.publish("dragstart",k.pageX,k.pageY,Z),this.publish("dragmove",k.pageX,k.pageY,Z))))}Rq(Z){const k=
wnb(this,Z);k&&(this.V&&Z.preventDefault(),Z=Z.target,this.publish("hovermove",k.pageX,k.pageY,Z),this.V&&this.publish("dragmove",k.pageX,k.pageY,Z))}Vz(Z){const k=wnb(this,Z);if(k){s8(this);mT(this);this.U=!1;const N=Z.target;this.V&&(this.O||Z.preventDefault(),this.D=!1,this.publish("dragend",k.pageX,k.pageY,N));this.publish("hoverend",k.pageX,k.pageY,N)}}YW(){this.V&&(g.YK&&this.target.removeAttribute("draggable"),this.target.style.touchAction="");s8(this);super.YW()}};gci=!1;var u_K=class extends g.E{constructor(Z,k){super({J:"div",BD:["ytp-overlay","ytp-speedmaster-overlay"],A:[{J:"div",Z:"ytp-speedmaster-user-edu",A:[{J:"div",Z:"ytp-speedmaster-label",Da:k},{J:"div",Z:"ytp-speedmaster-icon",Da:"{{icon}}"}]}]});this.S=Z;this.V=this.Lp("ytp-speedmaster-user-edu");this.updateValue("icon",$Cy());g.jX(this.V,"ytp-speedmaster-has-icon");this.S.createClientVe(this.V,this,173040,!0);this.L()}L(){g.ij(this.element,"display","none");this.S.logVisibility(this.V,!1)}};var lDT=class extends dY{constructor(Z){super(Z);this.Y=this.D=!1;this.U=new g.tt(Z);g.u(this,this.U);this.N="2x";this.speedmasterUserEdu=new u_K(Z,this.N);g.u(this,this.speedmasterUserEdu);g.$n(this.api,this.speedmasterUserEdu.element,4);this.V=new g.tU(this.api.fF().KE,!0,null,!1,!0);g.u(this,this.V);this.delay=new g.Uc(this.xW,500,this);g.u(this,this.delay);this.U.K(Z,"videodatachange",()=>{cw(this)},this);
this.U.K(Z,"presentingplayerstatechange",()=>{cw(this)},this);
this.U.K(Z,"autonavvisibility",()=>{cw(this)},this);
this.api.CN().subscribe("visibilitystatechange",()=>{cw(this)});
this.U.K(Z,"rootnodemousedown",k=>{this.j=k});
this.B("web_speedmaster_spacebar_control")&&(this.U.K(Z,"keyboardserviceglobalkeydown",(k,N)=>{this.Vz=N;G0f(this,k,N.nL,!0)},this),this.U.K(Z,"keyboardserviceglobalkeyup",k=>{G0f(this,k,!1,!1)},this))}O(Z,k){this.jm()||(this.C=[Z,
k],this.V.subscribe("dragmove",this.G,this),this.V.subscribe("dragend",this.L,this),this.D||this.delay.XN())}xW(){if(this.Y){this.D=!0;this.zt=this.api.getPlaybackRate();this.dA=this.api.getPlayerStateObject().isPaused();var Z=this.speedmasterUserEdu;g.ij(Z.element,"display","");Z.S.logVisibility(Z.V,!0);this.api.setPlaybackRate(2);this.api.hideControls();this.api.playVideo();this.j&&(this.j.JH=!0);this.Vz&&(this.Vz.Pz=!0);this.B("enable_smart_skip_speedmaster_on_web")&&this.api.publish("speedmasterchanged",
!0)}}G(Z,k){if(!this.D){Z=[Z,k];var N=this.C;N&&Z&&N.length===2&&Z.length===2?(k=Math.abs(N[0]-Z[0]),N=Math.abs(N[1]-Z[1]),k=Math.sqrt(k*k+N*N)):k=-1;k<10?this.C=Z:Pw(this)}}L(){Pw(this)}};var fDh=class extends dY{constructor(Z){super(Z);this.U=new Set;this.V={};this.events=new g.tt(Z);g.u(this,this.events);this.events.K(Z,"videodatachange",k=>{k==="newdata"&&(this.api.jl("stationsEmbargo"),this.api.jl("stationsMetadataUpdate"),this.V={},this.U.clear());k=this.api.getVideoData().zC;const N=k.get("PLAYER_CUE_RANGE_SET_IDENTIFIER_STATION_AIRING_EMBARGO");N&&S2f(this,N,"stationsEmbargo");(k=k.get("PLAYER_CUE_RANGE_SET_IDENTIFIER_STATION_METADATA_UPDATE"))&&S2f(this,k,"stationsMetadataUpdate")});
this.events.K(Z,g.te("stationsEmbargo"),k=>{this.api.A$(!0);var N=this.V[k.id]??[];for(const a of N){N=a.embargo;if(!N)continue;this.api.hideControls();this.api.N4("auth",2,Jo(N.errorRenderer.reason),Td({embargoed:1,id:k.id,idx:k.U,start:k.start}));(N=N.onTrigger)&&g.A7(this.api,"innertubeCommand",N)}});
this.events.K(Z,g.te("stationsMetadataUpdate"),k=>{k=this.V[k.id]??[];for(const N of k)(k=N.command)&&g.A7(this.api,"innertubeCommand",k)})}};var BH_=class extends g.kE{constructor(Z,k,N){super(k,Z);this.V=N}preventDefault(){super.preventDefault();this.V&&this.V.preventDefault()}stopPropagation(){super.stopPropagation();this.V&&this.V.stopPropagation()}};g.WE=class extends vrG{constructor(Z){super();this.V=Z;this.MX={};this.listener=k=>{this.dispatchEvent(new BH_(this,k.type,k))}}G(){return!0}isView(){return!1}xl(){return!1}lq(){return this.V}zP(){return this.V.src}Qz(Z){const k=this.getPlaybackRate();
this.V.src=Z;this.setPlaybackRate(k)}Kp(){this.V.removeAttribute("src")}getPlaybackRate(){try{return this.V.playbackRate>=0?this.V.playbackRate:1}catch{return 1}}setPlaybackRate(Z){this.getPlaybackRate()!==Z&&(this.V.playbackRate=Z);return Z}hZ(){return this.V.loop}setLoop(Z){this.V.loop=Z}canPlayType(Z,k){return this.V.canPlayType(Z,k)}isPaused(){return this.V.paused}isSeeking(){return this.V.seeking}isEnded(){return this.V.ended}Rq(){return this.V.muted}N(Z){A_();this.V.muted=Z}L(){return this.V.played||
J_([],[])}pN(){let Z;try{Z=this.V.buffered}catch{}return Z||J_([],[])}C(){return this.V.seekable||J_([],[])}Sm(){const Z=this.V;return Z.getStartDate?Z.getStartDate():null}getCurrentTime(){return this.V.currentTime}setCurrentTime(Z){this.V.currentTime=Z}getDuration(){return this.V.duration}load(){const Z=this.V.playbackRate;try{this.V.load()}catch{}this.V.playbackRate=Z}pause(){this.V.pause()}play(){const Z=this.V.play();if(!Z||!Z.then)return null;Z.then(void 0,()=>{});
return Z}D(){return this.V.readyState}tq(){return this.V.networkState}zQ(){return this.V.error?this.V.error.code:null}qR(){return this.V.error?this.V.error.message:""}getVideoPlaybackQuality(){if(window.HTMLVideoElement&&this.V instanceof window.HTMLVideoElement&&this.V.getVideoPlaybackQuality)return this.V.getVideoPlaybackQuality();if(this.V){var Z=this.V;const k=Z.webkitDroppedFrameCount;if(Z=Z.webkitDecodedFrameCount)return{droppedVideoFrames:k||0,totalVideoFrames:Z}}return{}}YX(){return!!this.V.webkitCurrentPlaybackTargetIsWireless}j$(){return!!this.V.webkitShowPlaybackTargetPicker()}togglePictureInPicture(){const Z=
this.V,k=window.document;window.document.pictureInPictureEnabled?this.V!==k.pictureInPictureElement?Z.requestPictureInPicture():k.exitPictureInPicture():s9()&&Z.webkitSetPresentationMode(Z.webkitPresentationMode==="picture-in-picture"?"inline":"picture-in-picture")}cB(){var Z=this.V;return new g.Of(Z.offsetLeft,Z.offsetTop)}getSize(){return g.I4(this.V)}setSize(Z){g.n1(this.V,Z)}getVolume(){return this.V.volume}setVolume(Z){A_();this.V.volume=Z}O6(Z){this.MX[Z]||(this.V.addEventListener(Z,this.listener),
this.MX[Z]=this.listener)}setAttribute(Z,k){this.V.setAttribute(Z,k)}removeAttribute(Z){this.V.removeAttribute(Z)}hasAttribute(Z){return this.V.hasAttribute(Z)}O(){return bR(this.V)}gh(Z){g.jX(this.V,Z)}zt(Z){return g.x1(this.V,Z)}qX(){return g.C1(document.body,this.V)}audioTracks(){const Z=this.V;if("audioTracks"in Z)return Z.audioTracks}YW(){for(const Z of Object.keys(this.MX))this.V.removeEventListener(Z,this.MX[Z]);super.YW()}r5(Z){this.V.disableRemotePlayback=Z}};g.WE.prototype.j=NR(59);
g.WE.prototype.dA=NR(57);g.WE.prototype.xW=NR(55);g.WE.prototype.Vz=NR(53);var Sz=class extends g.E{constructor(Z,k){super({J:"div",Z:"ytp-horizonchart"});this.sampleCount=150;this.Y=Z;this.L=k;this.index=0;this.heightPx=-1;this.D=this.U=null;this.V=2;this.element.style.width=`${this.V*this.sampleCount}px`;this.element.style.height="1em"}};var eSf=class extends g.E{constructor(Z){var k=null;k={J:"button",BD:["ytp-sfn-close","html5-video-info-panel-close","ytp-button"],W:{title:"close"},Da:"[X]"};super({J:"div",BD:["html5-video-info-panel","ytp-sfn"],A:[k,{J:"div",BD:["html5-video-info-panel-content","ytp-sfn-content"],A:[{J:"div",A:[{J:"div",Da:"Video ID / sCPN"},{J:"span",Da:"{{video_id_and_cpn}}",Z:"ytp-sfn-cpn"}]},{J:"div",A:[{J:"div",Da:"Viewport / Frames"},{J:"span",Da:"{{dims_and_frames}}"}]},{J:"div",A:[{J:"div",Da:"Current / Optimal Res"},
{J:"span",Da:"{{resolution}}"}]},{J:"div",A:[{J:"div",Da:"Volume / Normalized"},{J:"span",Da:"{{volume}}"}]},{J:"div",A:[{J:"div",Da:"Codecs"},{J:"span",Da:"{{codecs}}"}]},{J:"div",W:{style:"{{shader_info_style}}"},A:[{J:"div",Da:"Shader Info"},{J:"span",Da:"{{shader_info}}"}]},{J:"div",W:{style:"{{color_style}}"},A:[{J:"div",Da:"Color"},{J:"span",Da:"{{color}}"}]},{J:"div",W:{style:"{{drm_style}}"},A:[{J:"div",Da:"Protected"},{J:"span",Da:"{{drm}}"}]},{J:"div",W:{style:"{{bandwidth_style}}"},A:[{J:"div",
Da:"Connection Speed"},{J:"span",A:[{J:"span",Da:"{{bandwidth_chart}}"},{J:"span",Da:"{{bandwidth_kbps}}"}]}]},{J:"div",W:{style:"{{network_activity_style}}"},A:[{J:"div",Da:"Network Activity"},{J:"span",A:[{J:"span",Da:"{{network_activity_chart}}"},{J:"span",Da:"{{network_activity_bytes}}"}]}]},{J:"div",A:[{J:"div",Da:"Buffer Health"},{J:"span",A:[{J:"span",Da:"{{buffer_health_chart}}"},{J:"span",Da:"{{buffer_health_seconds}}"}]}]},{J:"div",W:{style:"{{live_latency_style}}"},A:[{J:"div",Da:"Live Latency"},
{J:"span",A:[{J:"span",Da:"{{live_latency_chart}}"},{J:"span",Da:"{{live_latency_secs}}"}]}]},{J:"div",W:{style:"{{live_mode_style}}"},A:[{J:"div",Da:"Live Mode"},{J:"span",Da:"{{live_mode}}"}]},{J:"div",W:{style:"{{playback_categories_style}}"},A:[{J:"div",Da:"Playback Categories"},{J:"span",Da:"{{playback_categories}}"}]},{J:"div",W:{style:"{{fmt_debug_info_style}}"},A:[{J:"div",Da:"Format Debug Info"},{J:"span",Da:"{{fmt_debug_info}}"}]},{J:"div",A:[{J:"div",Da:"Mystery Text"},{J:"span",Da:"{{debug_info}}"}]},
{J:"div",W:{style:"{{extra_debug_info_style}}"},A:[{J:"div",Da:""},{J:"span",A:[{J:"span",Da:"{{extra_debug_info}}"}]}]},{J:"div",A:[{J:"div",Da:"Date"},{J:"span",Da:"{{date}}"}]},{J:"div",W:{style:"{{cotn_and_local_media_style}}"},A:[{J:"div",Da:"COTN / Local Media"},{J:"span",Da:"{{cotn_and_local_media}}"}]},{J:"div",W:{style:"{{release_style}}"},A:[{J:"div",Da:"Player Release"},{J:"span",Da:"{{release_name}}"}]}]}]});this.rA=Z;this.position=0;this.L=!0;k?this.K(this.Lp("ytp-sfn-close"),"click",
this.hide):this.K(this.element,"click",this.hide);Z=[0,18750,37500,81250,128E3,256E3,512E3,2048E3,8192E3,32768E3,131072E3];k="#000 #d53e4f #f46d43 #fdae61 #fee08b #e6f598 #abdda4 #66c2a5 #3288bd #124588 #fff".split(" ");const N=Z.map(a=>a/4);
this.j={};this.V=new Sz(Z,k);g.u(this,this.V);this.updateValue("bandwidth_chart",this.V);this.D=new Sz([0,3,10,15,30,60,90],"#000 #66c2a5 #abdda4 #e6f598 #fdae61 #f46d43 #a8330f".split(" "));g.u(this,this.D);this.updateValue("live_latency_chart",this.D);this.U=new Sz([0,15,30,60,90,120],"#000 #fdae61 #e6f598 #66c2a5 #3288bd #fff".split(" "));g.u(this,this.U);this.updateValue("buffer_health_chart",this.U);this.G=new Sz(N,k);g.u(this,this.G);this.updateValue("network_activity_chart",this.G);this.delay=
new g.Uc(this.aq,500,this);g.u(this,this.delay);this.Y=new g.Uc(this.C,2E4,this);g.u(this,this.Y)}show(){super.show();this.aq()}hide(){super.hide();this.delay.stop();this.Y.stop()}aq(){var Z=(0,g.z)(),k=Ixb(this.rA);Hw(this.V,k.bandwidth_samples);Hw(this.G,k.network_activity_samples);Hw(this.D,k.live_latency_samples);Hw(this.U,k.buffer_health_samples);const N={};for(const [a,T]of Object.entries(k)){k=a;const K=T;this.j[k]!==K&&(N[k]=" "+String(K));this.j[k]=K}this.update(N);Z=(0,g.z)()-Z>25?5E3:500;
this.delay.start(Z)}C(){this.L?(this.position+=1,this.position>15&&(this.L=!1)):(--this.position,this.position<=0&&(this.L=!0));this.element.style.left=`${this.position}%`;this.element.style.top=`${this.position}%`;this.Y.start(2E4)}};var DFT=class extends dY{constructor(Z){super(Z);I(Z,"getStatsForNerds",()=>Ixb(this.api));
P3(Z,"showVideoInfo",()=>{ocN(this,!0)});
P3(Z,"hideVideoInfo",()=>{ocN(this,!1)});
P3(Z,"isVideoInfoVisible",()=>!!this.cI?.oE())}};var ez=class extends g.jR{constructor(){super();this.U=null;this.startTime=this.duration=0;this.delay=new g.o3(this.V,null,this);g.u(this,this.delay)}V(){var Z=(0,g.z)()-this.startTime;Z=Z<this.duration?Z/this.duration:1;this.U(cG(OKK,Z));Z<1&&this.delay.start()}},OKK=new PG(0,0,.4,0,.2,1,1,1),JAr=/[0-9.-]+|[^0-9.-]+/g;var vaa=class extends g.E{constructor(Z){super({J:"button",BD:["ytp-size-button","ytp-button"],W:{title:Z.B("player_tooltip_data_title_killswitch")?"{{title}}":"","data-tooltip-title":"{{tooltip-title}}","aria-keyshortcuts":"t","data-priority":"9","data-title-no-tooltip":"{{data-title-no-tooltip}}"},Da:"{{icon}}"});this.api=Z;this.MA=null;this.transition=new ez;g.u(this,this.transition);this.K(Z,"sizestylechange",this.aq);this.K(Z,"fullscreentoggled",this.aq);this.K(Z,"presentingplayerstatechange",
this.aq);Z.createClientVe(this.element,this,139116);this.aq();this.listen("click",this.onClick);la(Z,this.element,this)}onClick(){var Z=this.api.app;let k;k=Z.B("web_log_theater_mode_visibility")?!Z.MA():!Z.AK;g.A7(Z.rA,"SIZE_CLICKED",k);this.api.logClick(this.element)}aq(){this.In(this.api.wg()&&!this.api.isFullscreen()&&this.api.getPresentingPlayerType()!==3);if(this.LF){const Z=this.api.MA();this.MA!==Z&&this.mY(Z)}this.api.logVisibility(this.element,this.LF)}mY(Z){var k=this.api.B("delhi_modern_web_player_icons")?
this.api.B("web_player_imax_theater_mode")?Z?{J:"svg",W:{fill:"currentColor",height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{d:"M3 19h11v2H3l-.20-.01a2 2 0 0 1-1.78-1.78L1 19v-7h2v7Zm19.00-5a1 1 0 1 1 0 2h-4v4a1 1 0 1 1-2 0v-6h6ZM21 3a2 2 0 0 1 2 2v7h-2V5H10V3h11ZM7.00 3a1 1 0 0 1 1 1v6h-6a1 1 0 0 1 0-2h4V4a1 1 0 0 1 1-1Z"}}]}:{J:"svg",W:{fill:"currentColor",height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{d:"M21 3a2 2 0 0 1 2 2v14a2 2 0 0 1-1.79 1.99L21 21H3l-.20-.01a2 2 0 0 1-1.78-1.78L1 19V5a2 2 0 0 1 2-2h18ZM3 19h18V5H3v14Zm15-8a1 1 0 0 1 1 1v5h-5a1 1 0 1 1 0-2h3v-3a1 1 0 0 1 1-1Zm-8-4a1 1 0 1 1 0 2H7v3a1 1 0 1 1-2 0V7h5Z"}}]}:
Z?{J:"svg",W:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{d:"M21.20 3.01L21 3H3L2.79 3.01C2.30 3.06 1.84 3.29 1.51 3.65C1.18 4.02 .99 4.50 1 5V19L1.01 19.20C1.05 19.66 1.26 20.08 1.58 20.41C1.91 20.73 2.33 20.94 2.79 20.99L3 21H21L21.20 20.98C21.66 20.94 22.08 20.73 22.41 20.41C22.73 20.08 22.94 19.66 22.99 19.20L23 19V5C23.00 4.50 22.81 4.02 22.48 3.65C22.15 3.29 21.69 3.06 21.20 3.01ZM3 15V5H21V15H3ZM16.87 6.72H16.86L16.79 6.79L13.58 10L16.79 13.20C16.88 13.30 16.99 13.37 17.11 13.43C17.23 13.48 17.37 13.51 17.50 13.51C17.63 13.51 17.76 13.48 17.89 13.43C18.01 13.38 18.12 13.31 18.21 13.21C18.31 13.12 18.38 13.01 18.43 12.89C18.48 12.76 18.51 12.63 18.51 12.50C18.51 12.37 18.48 12.23 18.43 12.11C18.37 11.99 18.30 11.88 18.20 11.79L16.41 10L18.20 8.20L18.27 8.13C18.42 7.93 18.50 7.69 18.49 7.45C18.47 7.20 18.37 6.97 18.20 6.79C18.02 6.62 17.79 6.52 17.55 6.50C17.30 6.49 17.06 6.57 16.87 6.72ZM5.79 6.79C5.60 6.98 5.50 7.23 5.50 7.5C5.50 7.76 5.60 8.01 5.79 8.20L7.58 10L5.79 11.79L5.72 11.86C5.57 12.06 5.49 12.30 5.50 12.54C5.51 12.79 5.62 13.02 5.79 13.20C5.97 13.37 6.20 13.48 6.45 13.49C6.69 13.50 6.93 13.42 7.13 13.27L7.20 13.20L10.41 10L7.20 6.79C7.01 6.60 6.76 6.50 6.5 6.50C6.23 6.50 5.98 6.60 5.79 6.79ZM3 19V17H21V19H3Z",
fill:"white"}}]}:{J:"svg",W:{height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{d:"M21.20 3.01L21 3H3L2.79 3.01C2.30 3.06 1.84 3.29 1.51 3.65C1.18 4.02 .99 4.50 1 5V19L1.01 19.20C1.05 19.66 1.26 20.08 1.58 20.41C1.91 20.73 2.33 20.94 2.79 20.99L3 21H21L21.20 20.98C21.66 20.94 22.08 20.73 22.41 20.41C22.73 20.08 22.94 19.66 22.99 19.20L23 19V5C23.00 4.50 22.81 4.02 22.48 3.65C22.15 3.29 21.69 3.06 21.20 3.01ZM3 15V5H21V15H3ZM7.87 6.72L7.79 6.79L4.58 10L7.79 13.20C7.88 13.30 7.99 13.37 8.11 13.43C8.23 13.48 8.37 13.51 8.50 13.51C8.63 13.51 8.76 13.48 8.89 13.43C9.01 13.38 9.12 13.31 9.21 13.21C9.31 13.12 9.38 13.01 9.43 12.89C9.48 12.76 9.51 12.63 9.51 12.50C9.51 12.37 9.48 12.23 9.43 12.11C9.37 11.99 9.30 11.88 9.20 11.79L7.41 10L9.20 8.20L9.27 8.13C9.42 7.93 9.50 7.69 9.48 7.45C9.47 7.20 9.36 6.97 9.19 6.80C9.02 6.63 8.79 6.52 8.54 6.51C8.30 6.49 8.06 6.57 7.87 6.72ZM14.79 6.79C14.60 6.98 14.50 7.23 14.50 7.5C14.50 7.76 14.60 8.01 14.79 8.20L16.58 10L14.79 11.79L14.72 11.86C14.57 12.06 14.49 12.30 14.50 12.54C14.51 12.79 14.62 13.02 14.79 13.20C14.97 13.37 15.20 13.48 15.45 13.49C15.69 13.50 15.93 13.42 16.13 13.27L16.20 13.20L19.41 10L16.20 6.79C16.01 6.60 15.76 6.50 15.5 6.50C15.23 6.50 14.98 6.60 14.79 6.79ZM3 19V17H21V19H3Z",
fill:"white"}}]}:Z?{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},A:[{J:"path",Rv:!0,W:{d:"m 26,13 0,10 -16,0 0,-10 z m -14,2 12,0 0,6 -12,0 0,-6 z",fill:"#fff","fill-rule":"evenodd"}}]}:{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},A:[{J:"path",Rv:!0,W:{d:"m 28,11 0,14 -20,0 0,-14 z m -18,2 16,0 0,10 -16,0 0,-10 z",fill:"#fff","fill-rule":"evenodd"}}]};this.MA==null||this.api.B("delhi_modern_web_player_icons")?this.updateValue("icon",k):pnf(this.transition,
this.element,k);Z=(this.MA=Z)?"Default view":"Theater mode";this.api.B("player_tooltip_data_title_killswitch")?this.update({title:g.fe(this.api,Z,"t"),"data-title-no-tooltip":Z}):this.update({"tooltip-title":g.fe(this.api,Z,"t"),"data-title-no-tooltip":Z});this.api.qj()}};var iKi=class extends dY{constructor(Z){super(Z);this.events=new g.tt(Z);g.u(this,this.events);this.events.K(Z,"standardControlsInitialized",()=>{this.button=new vaa(Z);g.u(this,this.button);Z.vT(this.button,"RIGHT_CONTROLS_RIGHT")})}};var gaa=class extends dY{constructor(Z){super(Z);this.dA={TIMELY_ACTION_TRIGGER_TYPE_UNSPECIFIED:()=>!1,
TIMELY_ACTION_TRIGGER_TYPE_KEYBOARD_SEEK:k=>RSy(this,k),
TIMELY_ACTION_TRIGGER_TYPE_PROGRESS_BAR_SEEK:k=>RSy(this,k),
TIMELY_ACTION_TRIGGER_TYPE_PLAYER_CONTROLS_SHOWN:()=>this.api.X().experiments.yz("enable_smart_skip_player_controls_shown_on_web_increased_triggering_sensitivity")?this.G&&this.N:this.G&&this.C,
TIMELY_ACTION_TRIGGER_TYPE_SPEEDMASTER:()=>this.xW};
this.xW=this.N=this.C=this.G=!1;this.L={};this.events=new g.tt(Z);g.u(this,this.events);this.j=new g.tU(this.api.fF().KE);g.u(this,this.j);if(this.api.B("enable_smart_skip_web_player_bar_hover_length_threshold")&&g.Q5(this.api.X().experiments,"smart_skip_web_player_bar_min_hover_length_milliseconds")){const k=g.Q5(this.api.X().experiments,"smart_skip_web_player_bar_min_hover_length_milliseconds");this.O=new g.Uc(this.Y,k,this);g.u(this,this.O)}this.events.K(Z,"videodatachange",(k,N)=>{if(k!=="dataupdated"||
N.videoId!==this.videoId||!jW(this.timelyActions,Wuy(N)))this.onVideoDataChange(N)});
this.events.K(Z,"presentingplayerstatechange",k=>{this.qA(k)});
Z.B("enable_smart_skip_player_controls_shown_on_web")&&(this.events.K(Z,"onShowControls",()=>{this.G=!0;this.Y()}),this.events.K(Z,"onHideControls",()=>{this.G=!1}),this.j.subscribe("hoverstart",()=>{this.C=!0;
this.Y()},this),this.j.subscribe("hoverend",()=>{this.C=!1},this),Z.B("enable_smart_skip_player_controls_shown_on_web_increased_triggering_sensitivity")&&(this.events.K(Z,"progressBarHoverStart",()=>{this.N=!0;
this.api.B("enable_smart_skip_web_player_bar_hover_length_threshold")?this.O?.XN():this.Y()}),this.events.K(Z,"progressBarHoverEnd",()=>{this.N=!1;
this.api.B("enable_smart_skip_web_player_bar_hover_length_threshold")&&this.O?.stop()})));
Z.B("enable_smart_skip_speedmaster_on_web")&&this.events.K(Z,"speedmasterchanged",k=>{(this.xW=k)&&this.Y()});
this.events.K(Z,g.te("timelyAction"),k=>{this.onCueRangeEnter(k.getId())});
this.events.K(Z,g.he("timelyAction"),k=>{this.onCueRangeExit(k.getId())});
Z.B("web_enable_keyboard_shortcut_for_timely_actions")&&this.events.K(Z,"keyboardserviceglobalkeydown",(k,N)=>{(Ka?k.altKey:k.ctrlKey)&&k.keyCode===39&&this.Vz&&this.V&&(k=g.J(LY(this,this.V)?.rendererContext,UbG),k=f9(k?.onTap))&&(g.A7(this.api,"innertubeCommand",k),N&&(N.Pz=!0),N=Rh(),(k=lFf(N))&&fFR(N,k))},this);
this.U=new g.E({J:"div",BD:["ytp-player-content","ytp-timely-actions-content"]});this.U.hide();I(Z,"insertTimelyActionUi",k=>{this.U.element.children.length>0&&g.Qp(this.U.element);k.classList.add("ytp-timely-actions-overlay");this.U.element.appendChild(k)});
g.u(this,this.U);this.B("web_player_overlay_positioned_layout")?this.events.K(Z,"basechromeinitialized",()=>{this.api.B0(this.U.element,4,!0);this.U.element.setAttribute("data-overlay-order","10")}):g.$n(this.api,this.U.element,4)}onVideoDataChange(Z){this.h$();
this.videoId=Z.videoId;this.D=this.V=void 0;this.timelyActions=Wuy(Z);M9f(this);XW(this);this.f8()}qA(Z){const k=Z.oldState,N=Z.state,a=N.seekSource;!k.V(16)&&N.V(16)?this.Hs(a??void 0):k.V(16)&&!N.V(16)&&this.kf();Z=Z.state;Z=!Z.isCued()&&!Z.V(1024);this.U.In(Z)}f8(){const Z=this.jO();Z&&this.api.f8(Z)}h$(){this.api.jl("timelyAction",1);if(this.V!==void 0)this.onCueRangeExit(this.V)}jO(){if(this.timelyActions){var Z=[];for(const N of this.timelyActions){var k=N.startTimeMilliseconds!=null&&N.endTimeMilliseconds!=
null&&N.cueRangeId!=null?new g.pe(Number(N.startTimeMilliseconds),Number(N.endTimeMilliseconds),{id:N.cueRangeId,namespace:"timelyAction"}):void 0;k&&Z.push(k)}return Z}}onCueRangeEnter(Z){const k=LY(this,Z);k&&this.L[Z]!==void 0&&(k.maxShowCount===void 0||k?.maxShowCount>this.L[Z])&&(this.V=Z,this.Y())}onCueRangeExit(Z){const k=ncf(this,Z);k&&this.V===Z&&g.A7(this.api,"innertubeCommand",k);XW(this);this.V=void 0}Hs(Z){this.D=Z}kf(){this.Y();this.D=void 0}Y(){if(this.V!==void 0){var Z=(Z=LY(this,
this.V))&&Z.onCueRangeEnter?f9(Z.onCueRangeEnter):void 0;var k=LY(this,this.V);a:if(k&&k.additionalTrigger){for(N of k.additionalTrigger)if(N.type&&(0,this.dA[N.type])?.(N.args??{})){var N=!0;break a}N=!1}else N=!0;Z&&N&&(g.A7(this.api,"innertubeCommand",Z),IQj(this,k),this.L[this.V]!==void 0&&this.L[this.V]++,this.Vz=!0)}}YW(){this.timelyActions=this.D=this.V=this.videoId=void 0;this.L={};this.h$();XW(this);super.YW()}};var wBT=class extends dY{constructor(Z){super(Z);Z=window;var k=this.api.X().Yl();k.V.Aq(nm0)?(k=[],Z.ytPlayerArraySizeExperimentLength=k.length,Z.ytPlayerArraySizeExperimentValue=k[0]):k.V.Aq(Mzy)?(k="6LPTkck/iK3Q7HMwz7Zyg71LBC0 buD oK+f O5w1 a ns4dbB O sCTaU5B4GI / ebOXx/5DGOwDMt1CEaJxccW+OaQtE zYkklE D4Kspm WDky G s0Vj4uvrd eLSfss l B1D/tiB9kUaZ+S SUWnD oGfGji rRpkB Jg O1 czi9 R Wl4 D94+hDF KOX stfyToM l8v9IJ KZi G A/2wZ 0Qfq 3kv3QDUZOWRK erN3h3b i j tdYdy kl u FBFdIp72yKKL/T rO ym cJYXYi8 yz+ ycc6jftJvwlWp ac s7m+LzqFtVOrgm7z0Z5Q/8Npyo19C B MFZkvXTvZR59/ IKgbLr56eq4Gs JiTE6RRv2HmCWEy Jb+OG u7Ui9+Uy 2FhggtkS7H+rbrOWFb565UNsslsXF i 1CLXS6 bW 6wRdeNJzE gvPRbDS3yqGyk+DHWJU+8pCy8FiGbRXFr2m 3 5GOYU7DuLxi5tbaWKEUSnPYd0ZdsaJY 5 wy9W8enoXtF70HcJfDja0FFaVcIlv Krj7JRMtiVWxQiqDYJqQf8d+Yhvqo WX eAqMs9UttnWTxsaY gcOb/6JXqGHdb5A7TVlpS9kTPq prg 3nD M7c rxwkg2JVkNqS4PtC2P+YzOfoYOdLc i gHNfRWcg3TaR CEKsZBM VfI V1VupF9DkyxK/ k7iWF+tWtW+RaVdPk6H3X 0GcnAiuJXyd7nC/ORmzb/HGrnvBms 6k NmQ2 aGB3blYR9pxhHrY Sk0Y/7tBGJ9EaTbTwoJGWt6 ijhACaixJX vh kwC00l 5QSqhiYiieEvBUYd7S SSRtsEjUFle/8v os".split(" "),
Z.ytPlayerArraySizeExperimentLength=k.length,Z.ytPlayerArraySizeExperimentValue=k[Math.floor(Math.random()*k.length)]):k.V.Aq(Rvy)&&(k="a Y1bKqzJ s0Vj4uvrd x+ G stfyToM 7W xsHJ KZi 5 H2+ buD / 3 15 76VyLn4q6B SUWnD XF Ml D9/q oK+f K+ eLSfss B rlJLVN wy9W8enoXtF70HcJfDja0FFaVcIlv yLwl WDky asfV3x j KOX /I M FL czi9 b qfSz0ipS DQ m68 u7Ui9+Uy 61 K5xdXVLZb 1e sm BzwWNM gjQS0e hJ l3 zUJAT rRpkB I0j5 DPZ/ gcOb/6JXqGHdb5A7TVlpS9kTPq Hn 7m WwesQPUzST n51 B1D/tiB9kUaZ+S TKXw0mTsQ imMcmOcJbtBm2iiT gvPRbDS3yqGyk+DHWJU+8pCy8FiGbRXFr2m V2 ac s7 D4Kspm j 7I Z4U+fzdVIKP99m 8l 72 Nh5 ab XgH8Lzvf/8e92nICvOm8 gZ O OVRfzTvv99f6a Ng G oGfGji Xr O0 +y uM a6 mb ImnAv LKuVPy OlPbi N483sfs uP A7 71DqBndyU3GS6bIzA zS fts2 ky A/2wZ 0Qfq Zfvd5Pn4776zeP5oPc aI vTeKTkO bhbbE sd os zYkklE CEKsZBM V1VupF9DkyxK/ ebOXx/5DGOwDMt1CEaJxccW+OaQtE tdYdy rO iy34HMOZpoG 2P Jb+OG 7V6 U6 D94+hDF RN RjTb6s9dI1z3sbX2Z n5Jc3 u8 sCTaU5B4GI kEvjgcbIMe a be5m6OlQPwiJOhQ t5 SKU/ XKCZgrGIc3wy+ RX JgMLCGK hTtIGwjH1fcQWLu 30 Pt Mk8cYLj6WiDpDJN zO0ox JD ygD8z hp TtR HX+B89Khozs4 G MxY0 CdMDbBR bQ47h 7N i B90/Ls3uwfIR+zJE pM iAtM6ngY20Xjova0ANGS+MWXtw WF JMLr8w 8W 07 Lq9jaVTdvqKUcBE+lcgF7T3+rj8eLe/W9Gx6pMjv+q Av l lEIzH+OY FqDusHkb z7 pr8bo8c/VS pMPt A6 rxwkg2JVkNqS4PtC2P+YzOfoYOdLc Ca cX Iw2D fp5 erN3h3b FOM 6k 6W/+L21S0BgHkyXSeXgiZEFNnD bW UNvcj1zvh8 I3TZF5 Jg xw vG Ia9v 5QSqhiYiieEvBUYd7S tA nY LJ ym Krj7JRMtiVWxQiqDYJqQf8d+Yhvqo LQhs6cZhK2 0wDpZFkrDy K9nzX D99+akDyTHqVZ5oc vh o+H0k SG s7m+LzqFtVOrgm7z0Z5Q/8Npyo19C XT Ba R Q4 X k7iWF+tWtW+RaVdPk6H3X kwC00l R+km6jn4lEte 6c O/E2WbIgQZp1fX6M15U6V4Cn2VEhA/o1gqaZrT W35r8t FM Sk0Y/7tBGJ9EaTbTwoJGWt6 59N5n p2 dc/6x6Ue8NTkG8Eq 3kv3QDUZOWRK bEp8Cdrszr5 7/ YF 0EGSTB RQ MFZkvXTvZR59/ sU aQ ++ kl u FM8tJsLmwDZGwNxLT3UB8U+Oqq M7c cJYXYi8 Joavny ul O1 Yo PzjTAnVHpDMOOfHYH7PRH5cM ns4dbB jz 0MqMKs EC 5i /PSB9 FSr5qF2R kXioSwTShtq5feiVSbNLRWdm8JtU ses mL J84d RA eAqMs9UttnWTxsaY YqL+09b l8v9IJ VfI Un5oe aghMX806dvo tfkKluaA tWZ0RiNdY ha /++SfI 78y wMv/BMy w4igDN5fJhU/ ijhACaixJX 9s+4w/ i f7 g33AqPrwozIBbUR 2W I5xT3pY5tk3rrjxU4XaqE3JsSS1Y+LA0zCg IKgbLr56eq4Gs WX 2U 3EX5fOxmA pD V8eT3N6k ShiYcW72d5b NmQ2 Mx yz+ ycc6jftJvwlWp aGB3blYR9pxhHrY bWti1J FBFdIp72yKKL/T 2FhggtkS7H+rbrOWFb565UNsslsXF ePmsAY5V ca rZ prg 5 5GOYU7DuLxi5tbaWKEUSnPYd0ZdsaJY ec8TP 6wRdeNJzE BV NrX25+/J8LYtUk O5w1 0GcnAiuJXyd7nC/ORmzb/HGrnvBms hGs6kinOmHXn QoQ Wl4 +S1B mv Jo 671 QGZ 5ru JiTE6RRv2HmCWEy v5vpHQ5jXX5RZgSVfA7P9Keq/9 ngi k3cqFr12egl66d89FwnoKFk dF+d5SEX0slenHxkb+cmSyeQohfO i R gHNfRWcg3TaR EwPA 5banN SSRtsEjUFle/8v szO04kG7irS7lBIpOjUf 51 8Vh6p 3nD ii6 QDM3wl8PVhEf5fF".split(" "),
Z.ytPlayerArraySizeExperimentLength=k.length,Z.ytPlayerArraySizeExperimentValue=k[Math.floor(Math.random()*k.length)])}};var $Fa=class extends dY{constructor(Z){super(Z);P3(this.api,"getPlaybackRate",()=>this.api.getPlaybackRate());
P3(this.api,"setPlaybackRate",k=>{typeof k==="number"&&this.api.setPlaybackRate(k)})}};var Y2G=class extends XO{constructor(Z,k,N,a){super("Voice boost",g.HH.A8);this.S=Z;this.Y=k;this.D=N;this.getVoiceBoostState=a;this.U=!1;this.on=this.S.B("html5_enable_new_audio_settings_menu")?Z.Z1().R7:Z.Z1();this.K(Z,"onFilterAudioFeatures",this.bb);this.setIcon({J:"svg",W:{fill:"currentColor",height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{d:"M11.48 2.14 3.91 6.68A6 6 0 0 0 1 11.83v.33a6 6 0 0 0 2.91 5.14l7.57 4.54A1 1 0 0 0 13 21V3a1.00 1.00 0 0 0-1.51-.85Zm6.88 2.07a1 1 0 0 0-.00 1.41 9 9 0 0 1 0 12.72 1 1 0 0 0 1.41 1.41 11 11 0 0 0 0-15.55 1 1 0 0 0-1.41 0ZM4.94 8.40l.00-.00L11 4.76v14.46l-6.05-3.63A4 4 0 0 1 3 12.16v-.33a4 4 0 0 1 1.94-3.42ZM15.53 7.05a1 1 0 0 0 0 1.41 5 5 0 0 1 0 7.07 1 1 0 0 0 1.41 1.41 6.99 6.99 0 0 0 0-9.9 1 1 0 0 0-1.41 0Z"}}]});
this.subscribe("select",this.L,this);this.bb()}L(Z){this.Y(Z?2:1)}bb(){var Z=this.S.getPresentingPlayerType();Z===2||Z===3?this.U&&(this.U=!1,this.on.Bq(this)):(Z=this.getVoiceBoostState(),Z!==1?(Z===0?(this.V(this.D()===2),this.setEnabled(!0)):(this.V(!1),this.setEnabled(!1)),this.U||(this.on.OH(this),this.U=!0)):this.U&&(this.on.Bq(this),this.U=!1))}YW(){this.on.Bq(this);super.YW()}};var xFT=class extends dY{constructor(Z){super(Z);this.events=new g.tt(Z);g.u(this,this.events);const k=this.api.B("html5_enable_voice_boost");k&&this.events.K(Z,"settingsMenuInitialized",()=>{ZaX(this)});
I(this.api,"getVoiceBoostUserPreference",()=>k?this.getVoiceBoostUserPreference():0);
I(this.api,"setVoiceBoostUserPreference",N=>{k&&this.setVoiceBoostUserPreference(N)});
I(this.api,"getVoiceBoostState",()=>k?this.getVoiceBoostState():1);
this.V=Wo0()??0;this.updateEnvironmentData()}getVoiceBoostUserPreference(){return this.V}setVoiceBoostUserPreference(Z){this.api.U6("vb_set",{pref:Z});g.Z_("yt-player-voice-boost",Z,31536E4);Z!==this.V&&(this.V=Z,this.updateEnvironmentData(),this.getVoiceBoostState()!==1&&this.api.r8(),this.api.V_())}getVoiceBoostState(){return this.api.I5(1)}updateEnvironmentData(){this.api.X().J0=this.V}};var Gea=class extends dY{constructor(Z){super(Z);this.useLivingRoomPoToken=!1;this.L=new g.aL;this.V=!1;this.Fa=null;this.j=!1;this.Y=null;this.G=!1;const k=Z.X().getWebPlayerContextConfig();this.events=new g.tt(Z);g.u(this,this.events);this.events.K(Z,"spsumpreject",(N,a,T)=>{this.G=a;N&&this.j&&!this.Y&&(this.B("html5_generate_content_po_token")&&T?this.bz(T):this.B("html5_generate_session_po_token")&&QNy(this));this.Y||this.api.U6("stp",{s:+this.j,b:+this.G})});
this.events.K(Z,"poTokenVideoBindingChange",N=>{this.bz(N)});
if(this.B("html5_web_po_on_demand_init")){const N=this.events.K(Z,"videodatachange",(a,T)=>{T.UX&&!this.j&&(C5X(this),this.events.Ce(N))})
}this.useLivingRoomPoToken=!!k?.useLivingRoomPoToken;Z.addEventListener("csiinitialized",()=>{this.Fa=Z.tQ();this.B("html5_web_po_on_demand_init")?this.D=lV():C5X(this)});
Z.addEventListener("trackListLoaded",this.Yd.bind(this));Z.dc(this)}YW(){this.C&&(g.Ob(this.C),this.C=void 0);super.YW()}zm(){(this.U?!this.V:this.D)&&FW(this)}Yd(Z,k,N){if(NdG(Z)){var a=N||"";if(this.V)k=lu(this,a),aLG(Z,k);else{var T=new g.aL;k.push(T.promise);this.L.promise.then(()=>{const K=lu(this,a);aLG(Z,K);T.resolve()})}}}bz(Z){if(this.U||this.D)Z.XW=lu(this,Z.videoId),this.V||(this.Y=new x2,this.L.promise.then(()=>{this.Fa.TF("pot_if");
Z.XW=lu(this,Z.videoId)}))}};var tpf=class extends g.E{constructor(Z){super({J:"div",BD:["ytp-more-videos-button","ytp-button"],W:{title:"{{title}}",role:"button",tabindex:"0","aria-hidden":"true"},A:[{J:"div",Z:"ytp-more-videos-button-thumbnail"},{J:"span",Z:"ytp-more-videos-button-title",Da:"{{title}}"}]});this.S=Z;this.D=this.Lp("ytp-more-videos-button-thumbnail");this.Y=this.Lp("ytp-more-videos-button-title");this.U=new g.tt(this);g.u(this,this.U);this.U.K(this.S,"videodatachange",this.V);this.V();this.listen("click",this.onClick);
Haf(this,0);this.hide()}V(){var Z=this.S.getVideoData({playerType:1});Z=(Z?.suggestions?.length?Z.suggestions:Z?.N()?[Z.N()]:[])[0]?.v9("mqdefault.jpg");this.D&&Z&&g.ij(this.D,"background-image",Z?`url("${Z}")`:"")}onClick(){this.S.logClick(this.element)}Qn(Z){this.In([1,2].includes(Z));Haf(this,Z)}In(Z){super.In(Z);this.element.setAttribute("aria-hidden",String(!Z));Z&&this.V()}YW(){super.YW()}};g.Shi=class extends g.E{constructor(Z){const k=Z.X(),N=g.Cf||g.vQ?{style:"will-change: opacity"}:void 0,a=k.Y,T=["ytp-modern-videowall-still"];k.U&&T.push("ytp-videowall-show-text");super({J:"a",BD:T,W:{href:"{{url}}",target:a?k.N:"","aria-label":"{{aria_label}}","data-is-live":"{{is_live}}","data-is-list":"{{is_list}}","data-is-mix":"{{is_mix}}"},A:[{J:"div",Z:"ytp-modern-videowall-still-image",W:{style:"{{background}}"},A:[{J:"span",Z:"ytp-modern-videowall-still-info-duration",Da:"{{duration}}"}]},
{J:"span",Z:"ytp-modern-videowall-still-info",W:{"aria-hidden":"true"},A:[{J:"span",Z:"ytp-modern-videowall-still-info-bg",A:[{J:"span",Z:"ytp-modern-videowall-still-info-content",W:N,A:[{J:"span",Z:"ytp-modern-videowall-still-info-title",Da:"{{title}}"},{J:"span",Z:"ytp-modern-videowall-still-info-author",Da:"{{author}}"},{J:"span",Z:"ytp-modern-videowall-still-view-count-and-date-info",Da:"{{views_and_publish_time}}"},{J:"span",Z:"ytp-modern-videowall-still-info-live",Da:"Live"}]}]}]},{J:"span",
BD:["ytp-modern-videowall-still-listlabel-regular","ytp-modern-videowall-still-listlabel"],W:{"aria-hidden":"true"},A:[{J:"span",Z:"ytp-modern-videowall-still-listlabel-icon"},"Playlist",{J:"span",Z:"ytp-modern-videowall-still-listlabel-length",A:[" (",{J:"span",Da:"{{playlist_length}}"},")"]}]},{J:"span",BD:["ytp-modern-videowall-still-listlabel-mix","ytp-modern-videowall-still-listlabel"],W:{"aria-hidden":"true"},A:[{J:"span",Z:"ytp-modern-videowall-still-listlabel-mix-icon"},"Mix",{J:"span",Z:"ytp-modern-videowall-still-listlabel-length",
Da:" (50+)"}]}]});this.suggestion=null;this.U=a;this.api=Z;this.V=new g.tt(this);g.u(this,this.V);this.listen("click",this.onClick);this.listen("keypress",this.onKeyPress);this.V.K(Z,"videodatachange",this.onVideoDataChange);Z.createServerVe(this.element,this);this.onVideoDataChange()}select(){this.api.CP(this.suggestion.videoId,this.suggestion.sessionData,this.suggestion.playlistId,void 0,void 0,this.suggestion.wH||void 0)&&this.api.logClick(this.element)}onClick(Z){if(g.PQ(this.api.X())&&this.api.B("web_player_log_click_before_generating_ve_conversion_params")){this.api.logClick(this.element);
let k=this.suggestion.Qg();const N={};g.ia(this.api,N);k=g.mW(k,N);g.jY(k,this.api,Z)}else g.IC(Z,this.api,this.U,this.suggestion.sessionData||void 0)&&this.select()}onKeyPress(Z){switch(Z.keyCode){case 13:case 32:Z.defaultPrevented||(this.select(),Z.preventDefault())}}onVideoDataChange(){const Z=this.api.getVideoData(),k=this.api.X();this.U=Z.o4?!1:k.Y}};var Fy0=class extends g.E{constructor(Z,k){const N=Z.B("web_player_use_more_videos_button");super({J:"div",BD:["ytp-fullscreen-grid"],A:[{J:"div",Z:"ytp-fullscreen-grid-hover-overlay",W:{"aria-keyshortcuts":"v","data-title-no-tooltip":"{{data-title-no-tooltip}}","data-tooltip-target-id":"ytp-fullscreen-grid-expand-button","data-tooltip-offset-y":"-70"}},{J:"div",Z:"ytp-fullscreen-grid-buttons-container",A:N?[]:[{J:"button",BD:["ytp-fullscreen-grid-expand-button","ytp-button"],W:{"aria-keyshortcuts":"v",
"data-title-no-tooltip":"{{data-title-no-tooltip}}","data-tooltip-target-id":"ytp-fullscreen-grid-expand-button","data-tooltip-offset-y":"-10"},A:["{{icon}}"]}]},{J:"div",Z:"ytp-fullscreen-grid-main-content",A:[{J:"div",Z:"ytp-fullscreen-grid-stills-container"}]}]});this.player=Z;this.stills=[];this.videoData=null;this.currentState=0;this.G=N;this.zt=this.player.B("web_player_use_external_grid_component");(this.dA=this.player.B("web_player_enable_horizontal_endscreen_shelf"))&&g.jX(this.player.getRootNode(),
"ytp-enable-horizontal-endscreen-shelf");this.Y=this.Lp("ytp-fullscreen-grid-main-content");this.O=this.Lp("ytp-fullscreen-grid-stills-container");this.C=this.Lp("ytp-fullscreen-grid-buttons-container");this.G&&(this.L=new tpf(this.player),this.C.appendChild(this.L.element),g.u(this,this.L),this.K(this.L.element,"click",this.N));this.zt&&(this.O.style.display="none");this.j=new g.tt(this);g.u(this,this.j);this.xW=k;if(this.Y&&this.O){if(Z=this.Lp("ytp-fullscreen-grid-hover-overlay"))this.K(Z,"click",
this.N),la(this.player,Z,this);!this.G&&(Z=this.Lp("ytp-fullscreen-grid-expand-button"))&&(this.K(Z,"click",this.N),la(this.player,Z,this));if(Z=this.player.getVideoData({playerType:1}))this.videoData=Z;this.player.createClientVe(this.Y,this,223051);this.j.K(this.player,"videodatachange",this.onVideoDataChange)}}YW(){this.hide();this.j.U();g.Il(this.stills);this.stills.length=0;this.D&&(this.D.remove(),this.D=void 0);this.V&&(this.V.remove(),this.V=void 0);this.U&&(this.U.remove(),this.U=void 0);
super.YW()}setCommentsButton(Z){Z!==this.V&&(this.V&&this.V.remove(),this.V=Z)&&(g.jX(this.V,"ytp-fullscreen-grid-action-button"),this.C.appendChild(this.V))}setDescriptionButton(Z){Z!==this.U&&(this.U&&this.U.remove(),this.U=Z)&&(g.jX(this.U,"ytp-fullscreen-grid-action-button"),qi(this.C,this.U,0))}N(Z){this.xW&&this.xW(Z)}onVideoDataChange(){if(!this.zt){this.videoData=this.player.getVideoData({playerType:1});var Z=(this.videoData?.suggestions?.length?this.videoData?.suggestions:this.videoData?.N()?
[this.videoData?.N()]:[]).slice(0,18),k=this.O;if(k&&this.Y)if(g.Qp(k),Z.length){this.stills.length>Z.length&&g.Il(this.stills.splice(Z.length));this.stills.length=Z.length;for(let N=0;N<Z.length;N++){const a=Z[N];if(!a)continue;let T=this.stills[N];T||(T=new g.Shi(this.player),this.stills[N]=T);g.dly(T,a);k&&k.appendChild(T.element)}}else g.Il(this.stills),this.stills.length=0}}Qn(Z,k="INTERACTION_LOGGING_GESTURE_TYPE_GENERIC_CLICK"){if(this.currentState!==Z){this.currentState=Z;this.G&&this.L?this.L.Qn(Z):
this.update({icon:Z===2?DC0():{J:"svg",W:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"g",W:{filter:"url(#filter0_d_3104_799356)"},A:[{J:"path",W:{d:"M5.29 15.20C4.92 14.84 4.90 14.26 5.22 13.86L5.29 13.79L11.99 7.08L18.70 13.79C19.09 14.18 19.09 14.81 18.70 15.20C18.31 15.59 17.68 15.59 17.29 15.20L11.99 9.91L6.70 15.20L6.63 15.27C6.23 15.59 5.65 15.57 5.29 15.20Z",fill:"white"}}]},{J:"defs",A:[{J:"filter",W:{"color-interpolation-filters":"sRGB",filterUnits:"userSpaceOnUse",height:"26",
width:"26",x:"-1",y:"-1"},A:[{J:"feFlood",W:{"flood-opacity":"0",result:"BackgroundImageFix"}},{J:"feColorMatrix",W:{"in":"SourceAlpha",result:"hardAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"}},{J:"feOffset"},{J:"feGaussianBlur",W:{stdDeviation:"0.5"}},{J:"feComposite",W:{in2:"hardAlpha",operator:"out"}},{J:"feColorMatrix",W:{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.8 0"}},{J:"feBlend",W:{in2:"BackgroundImageFix",mode:"normal",result:"effect1_dropShadow_3104_799356"}},
{J:"feBlend",W:{"in":"SourceGraphic",in2:"effect1_dropShadow_3104_799356",mode:"normal",result:"shape"}}]}]}]}});this.Y.scrollTop=0;this.In(this.currentState!==0);if(Z===2){const N=g.C9(),a=this.Y.visualElement;N&&a&&RE(N,a,k)}if(Z!==0)this.element.setAttribute("tabindex","0"),Xb0(this,Z);else if(this.element.setAttribute("tabindex","-1"),Xb0(this,Z),!this.G&&(Z=this.Lp("ytp-fullscreen-grid-expand-button"))&&(Z.removeAttribute("title"),Z.removeAttribute("data-title-no-tooltip"),Z.removeAttribute("aria-label")),
Z=this.Lp("ytp-fullscreen-grid-hover-overlay"))Z.removeAttribute("title"),Z.removeAttribute("data-title-no-tooltip"),Z.removeAttribute("aria-label");this.player.qj()}}};var eJ_=class extends dY{constructor(Z){super(Z);this.G=this.V=this.D=0;this.C=null;this.j=this.L=0;this.isEnded=!1;this.Vz=null;const k=new g.tt(Z);g.u(this,k);this.xW=g.Q5(this.api.X().experiments,"web_player_default_peeking_px");this.vD=this.api.B("delhi_modern_player_enable_pause_peeking");this.Sm=g.Q5(this.api.X().experiments,"delhi_modern_player_pause_thumbnail_percentage");this.tq=this.api.B("web_player_imax_theater_mode");this.Y=this.api.B("web_player_enable_fullscreen_grid_components");this.FS=
this.api.B("web_player_enable_more_videos_button");this.dA=this.api.B("web_player_use_external_grid_component");g.jX(this.api.getRootNode(),"ytp-grid-scrollable");k.K(Z,"fullscreentoggled",()=>{O8(this)});
k.K(Z,"videodatachange",()=>{if(this.Y){var N=this.api.getVideoData({playerType:1});this.videoData!==N&&this.D===2&&(g.Wp(this.api.getRootNode(),"ytp-grid-scrolling"),iu(this,1,"INTERACTION_LOGGING_GESTURE_TYPE_AUTOMATED"));this.videoData=N}},this);
k.K(Z,"sizestylechange",()=>{this.Y&&O8(this)});
I(this.api,"setFullscreenQuickActions",N=>{this.setFullscreenQuickActions(N)});
I(this.api,"setPlayerOverlayVideoDetailsRenderer",N=>{this.setPlayerOverlayVideoDetailsRenderer(N)});
this.dA&&I(this.api,"setFullscreenGrid",N=>{this.setFullscreenGrid(N)});
I(this.api,"setCommentsButton",N=>{this.setCommentsButton(N)});
I(this.api,"setDescriptionButton",N=>{this.setDescriptionButton(N)});
this.Y&&uLb(this,k,Z)}Rq(){this.Y&&this.D!==0&&this.O("INTERACTION_LOGGING_GESTURE_TYPE_GENERIC_CLICK")}O(Z){this.Y&&(Z==="INTERACTION_LOGGING_GESTURE_TYPE_SCROLL_BEGAN_DRAGGING"&&(this.Vz&&clearTimeout(this.Vz),this.Vz=window.setTimeout(()=>{this.Vz=null},1E3)),this.D===1?iu(this,2,Z):iu(this,1,Z))}setFullscreenGrid(Z){if(this.dA&&this.U){var k=this.U;
k.zt&&Z!==k.D&&(k.D&&k.D.remove(),k.D=Z,k.D&&k.Y.appendChild(k.D))}}setCommentsButton(Z){this.U&&this.U.setCommentsButton(Z)}setDescriptionButton(Z){this.U&&this.U.setDescriptionButton(Z)}setFullscreenQuickActions(Z){this.zt&&this.zt.remove();Z?(g.jX(Z,"ytp-fullscreen-quick-actions"),this.B("web_player_overlay_positioned_layout")?(Z.setAttribute("data-overlay-order","13"),this.api.B0(Z,4)):(g.jX(this.api.getRootNode(),"ytp-has-fullscreen-quick-actions"),g.$n(this.api,Z,4))):g.Wp(this.api.getRootNode(),
"ytp-has-fullscreen-quick-actions");this.zt=Z;O8(this)}setPlayerOverlayVideoDetailsRenderer(Z){this.playerOverlayVideoDetailsRenderer&&this.playerOverlayVideoDetailsRenderer.remove();if(Z){g.jX(Z,"ytp-fullscreen-metadata");g.jX(this.api.getRootNode(),"ytp-hide-fullscreen-title");Z.setAttribute("data-overlay-order","1");var k=this.api.B("delhi_modern_web_player_fullscreen_metadata_bottom");const N=k?3:1;k=k?"ytp-fullscreen-metadata-bottom":"ytp-fullscreen-metadata-top";g.jX(this.api.getRootNode(),
k);this.B("web_player_overlay_positioned_layout")?this.api.B0(Z,N):g.$n(this.api,Z,4)}else g.Wp(this.api.getRootNode(),"ytp-hide-fullscreen-title"),g.Wp(this.api.getRootNode(),"ytp-fullscreen-metadata-bottom"),g.Wp(this.api.getRootNode(),"ytp-fullscreen-metadata-top");this.playerOverlayVideoDetailsRenderer=Z;O8(this)}};var oaK=class extends dY{constructor(Z){super(Z);this.freePreviewWatchedDuration=null;this.freePreviewUsageDetails=[];this.events=new g.tt(Z);g.u(this,this.events);this.events.K(Z,"heartbeatRequest",k=>{if(this.freePreviewUsageDetails.length||this.freePreviewWatchedDuration!==null)k.heartbeatRequestParams||(k.heartbeatRequestParams={}),k.heartbeatRequestParams.unpluggedParams||(k.heartbeatRequestParams.unpluggedParams={}),this.freePreviewUsageDetails.length>0?k.heartbeatRequestParams.unpluggedParams.freePreviewUsageDetails=
this.freePreviewUsageDetails:k.heartbeatRequestParams.unpluggedParams.freePreviewWatchedDuration={seconds:`${this.freePreviewWatchedDuration}`}});
I(Z,"setFreePreviewWatchedDuration",k=>{this.freePreviewWatchedDuration=k});
I(Z,"setFreePreviewUsageDetails",k=>{this.freePreviewUsageDetails=k})}};var Jce=class extends g.jR{constructor(Z){super();this.features=[];var k=new b$y(Z),N=new CNf(Z),a=new Qn_(Z),T=new Gea(Z);var K=g.KA(Z.X())?void 0:new vWj(Z);var y=new THD(Z),Q=new DFT(Z),q=new $Fa(Z),r=new UkX(Z);var C=g.KA(Z.X())?new oaK(Z):void 0;var m=Z.X().getWebPlayerContextConfig()?.cinematicSettingsAvailable?new uvU(Z):void 0;var A=new oWb(Z);var P=Z.B("enable_courses_player_overlay_purchase")?new z0R(Z):void 0;var d=g.fQ(Z.X())?new SAj(Z):void 0;var h=new i$G(Z);var B=Z.X().Y?new wOy(Z):
void 0;var v=g.PQ(Z.X())?new gWi(Z):void 0;var O=Z.B("web_player_move_autonav_toggle")&&Z.X().FN?new h0y(Z):void 0;var x=g.fQ(Z.X())?new NHn(Z):void 0;var e=Z.B("web_enable_speedmaster")&&g.fQ(Z.X())?new lDT(Z):void 0;var Ki=Z.X().YH?void 0:new iKi(Z);var yf=Z.B("report_pml_debug_signal")?new PNN(Z):void 0;var Jy=new Kre(Z),hy=new mFH(Z);var zf=g.oJ(Z.X())?new ccB(Z):void 0;var MR=navigator.mediaSession&&window.MediaMetadata&&Z.X().qf?new aDi(Z):void 0;var OD=Z.B("html5_enable_drc")&&!Z.X().G?new O$R(Z):
void 0;var Ur=new AHG(Z);var tg=g.fQ(Z.X())?new LrD(Z):void 0;var b0=new rca(Z);var tJ=g.fQ(Z.X())&&Z.B("web_sleep_timer")?new tir(Z):void 0;var IL=g.PQ(Z.X())?new $kf(Z):void 0;Z.B("mweb_debug_sticky_settings");var Cb=new Vie(Z);var TL=new liy(Z),KD=new YrH(Z);var yj=Z.B("enable_sabr_snackbar_message")?new hJK(Z):void 0;var F=Z.B("web_enable_timely_actions")?new gaa(Z):void 0;var PB=new fif(Z);var fW=Z.X()?.getWebPlayerContextConfig()?.enableFullscreenComponentsFeature?new eJ_(Z):void 0;var lz=new xFT(Z);
var W=Z.B("web_player_loop_settings_menu")&&Z.X().FE?new keT(Z):void 0;var ec=g.KA(Z.X())?void 0:new mk0(Z);var X=new snn(Z),U=new VFG(Z),BX=new yca(Z),Dw=new Fdy(Z);var $t=g.fQ(Z.X())&&Z.X().B("delhi_modern_web_player")?new BxN(Z):void 0;var et=Z.X().D?void 0:new XOf(Z);var ku=new fDh(Z),ve=new xki(Z);var im=Z.X().Yl();im=im.V.Aq(nm0)||im.V.Aq(Mzy)||im.V.Aq(Rvy)?new wBT(Z):void 0;var L=Z.X().Yl().V.Aq(g.ZTN)?new PTT(Z):void 0;Z=Z.X().experiments.Yl().V.Aq(k6r)?new cHf(Z):void 0;k=[k,N,a,T,K,y,Q,
q,r,C,m,A,P,d,h,B,v,O,x,e,Ki,yf,Jy,hy,zf,void 0,MR,OD,Ur,void 0,tg,b0,tJ,IL,void 0,Cb,TL,KD,void 0,yj,F,PB,fW,lz,void 0,W,void 0,ec,X,U,BX,Dw,$t,et,ku,ve,im,void 0,L,Z];for(const H of k)H&&this.features.push(H)}YW(){for(let Z=this.features.length-1;Z>=0;Z--)this.features[Z].dispose();this.features.length=0;super.YW()}};var zJe=class{constructor(){this.U=this.V=NaN}reset(){this.V=this.U=NaN}};var wEU=class{constructor(Z,k){this.kW=Z;this.timerName="";this.D=!1;this.U=NaN;this.Y=new zJe;this.V=k||null;this.D=!1}reset(){Fq(this.timerName)}tick(Z,k){uJ(Z,k,this.timerName)}TF(Z){return iJ(Z,void 0,this.timerName)}Tq(Z){g.LN(Z,void 0,this.timerName)}infoGel(Z){g.lJ(Z,this.timerName)}};var dhy=class extends g.n9{constructor(Z,k){super();this.Jq=Z;this.startSeconds=0;this.shuffle=!1;this.index=0;this.title="";this.length=0;this.items=[];this.loaded=!1;this.sessionData=this.V=null;this.dislikes=this.likes=this.views=0;this.order=[];this.author="";this.TQ={};this.U=0;if(Z=k.session_data)this.sessionData=yS(Z,"&");this.index=Math.max(0,Number(k.index)||0);this.loop=!!k.loop;this.startSeconds=Number(k.startSeconds)||0;this.title=k.playlist_title||"";this.description=k.playlist_description||
"";this.author=k.author||k.playlist_author||"";k.video_id&&(this.items[this.index]=k);if(Z=k.api)typeof Z==="string"&&Z.length===16?k.list="PL"+Z:k.playlist=Z;if(Z=k.list)switch(k.listType){case "user_uploads":this.listId=new jb("UU",`PLAYER_${Z}`);break;default:var N=k.playlist_length;N&&(this.length=Number(N)||0);this.listId=E$(Z);if(N=k.video)this.items=N.slice(0),this.loaded=!0}else if(k.playlist){Z=k.playlist.toString().split(",");this.index>0&&(this.items=[]);for(N of Z)N&&this.items.push({video_id:N});
this.length=this.items.length;if(N=k.video)this.items=N.slice(0),this.loaded=!0}this.setShuffle(!!k.shuffle);if(N=k.suggestedQuality)this.quality=N;this.TQ=zC(k,"playlist_");this.D=(k=k.thumbnail_ids)?k.split(","):[]}hasNext(Z){return this.loop||!!Z||this.index+1<this.length}hasPrevious(Z){return this.loop||!!Z||this.index-1>=0}setShuffle(Z){this.shuffle=Z;Z=this.order&&this.order[this.index]!=null?this.order[this.index]:this.index;this.order=[];for(var k=0;k<this.items.length;k++)this.order.push(k);
this.index=Z;this.U++;if(this.shuffle){Z=this.order[this.index];for(k=1;k<this.order.length;k++){const N=Math.floor(Math.random()*(k+1)),a=this.order[k];this.order[k]=this.order[N];this.order[N]=a}for(k=0;k<this.order.length;k++)this.order[k]===Z&&(this.index=k);this.U++}this.publish("shuffle")}v9(Z){Z=Z||"hqdefault.jpg";const k=this.TQ[Z];if(k||this.Jq.O||Z==="sddefault.jpg"||Z==="hq720.jpg"||Z==="maxresdefault.jpg")return k;if(this.D.length)return FJ(this.Jq,this.D[0],Z)}findIndex(Z){if(Z&&(Z=Z.videoId,
!this.items[this.index]||this.items[this.index].video_id!==Z))for(let k=0;k<this.items.length;k++)if(this.items[k].video_id===Z){this.index=k;break}}onReady(Z){this.V=Z;this.loaded&&g.fb(this.V,0)}getPlaylistId(){return this.listId?this.listId.toString():null}Qg(){return this.Jq.getVideoUrl(g.Gx(this).videoId,this.getPlaylistId())}YW(){this.V=null;g.Il(this.items);super.YW()}};var e0=new Map;g.oS=class extends g.n9{constructor(Z){super();this.loaded=!1;this.player=Z}create(){}load(){this.loaded=!0}unload(){this.loaded=!1}kd(){}CD(){return!0}YW(){this.loaded&&this.unload();super.YW()}Vn(){return{}}getOptions(){return[]}};var UF_=class{constructor(){this.U=[];this.V=[]}};g.JK=class extends g.jR{constructor(Z){super();this.rA=Z;this.V=new UF_;this.dA=new UF_;this.j=null;this.N=[];this.xW=[]}L(){}D(){}G(){return""}Yd(Z,k){if(this.rA.X().B("html5_dispatch_tracklist_loaded_event")){this.j&&(this.j.reject(),this.j=null);var N=[];this.rA.publish("trackListLoaded",this.V,N,k);this.rA.X().B("enable_po_decoration_of_forced_tracks")&&this.rA.publish("trackListLoaded",this.dA,N,k);N.length?(k=new g.aL,k.promise.then(Z.Yd,()=>{}),this.j=k,Promise.all(N).then(k.resolve,k.reject).finally(()=>
{this.j=null})):Z.Yd()}else Z.Yd()}YW(){this.j&&(this.j.reject(),this.j=null);
this.D();super.YW()}};g.JK.prototype.O=NR(63);g.JK.prototype.Y=NR(62);g.zP=class extends g.JK{constructor(Z,k,N){super(Z);this.videoData=k;this.audioTrack=N;this.U=null;this.C=!1;this.N=k.b$;this.xW=k.C1;this.C=g.aC(k)}L(Z){if(this.audioTrack){for(const k of this.audioTrack.captionTracks)g.J1(this.V,k);this.audioTrack.V&&g.J1(this.dA,this.audioTrack.V)}this.Yd(Z,this.videoData.videoId)}G(Z,k){const N=Z.mH(),a={fmt:k};if(k==="srv3"||k==="3"||k==="json3")g.ce()?Object.assign(a,{xorb:2,xobt:1,xovt:1}):Object.assign(a,{xorb:2,xobt:3,xovt:3});Z.translationLanguage&&(a.tlang=
g.co(Z));this.C&&(a.xosf="1");Object.assign(a,this.rA.X().V);return AP(N,a)}D(){this.U&&this.U.abort()}};g.zP.prototype.Y=NR(61);g.bKB=new Map;g.Uy=class extends g.JK{constructor(Z,k,N,a,T,K){super(Z);this.videoId=N;this.Ec=T;this.eventId=K;this.Vz={};this.U=null;Z=a||g.mm(k).hl||"";Z=Z.split("_").join("-");this.C=AP(k,{hl:Z})}L(Z){let k=this.C;const N={type:"list",tlangs:1,v:this.videoId,vssids:1};this.Ec&&(N.asrs=1);k=AP(k,N);this.D();this.U=g.SD(k,{format:"RAW",onSuccess:a=>{this.U=null;if((a=a.responseXML)&&a.firstChild){var T=a.getElementsByTagName("track");for(var K=0;K<T.length;K++){var y=T[K],Q=y.getAttribute("lang_code");const q=
y.getAttribute("lang_translated"),r=y.getAttribute("name"),C=y.getAttribute("kind"),m=y.getAttribute("id"),A=y.getAttribute("lang_default")==="true",P=y.getAttribute("cantran")==="true";y=y.getAttribute("vss_id");g.J1(this.V,new g.RO({languageCode:Q,languageName:q,name:r,kind:C,id:m,is_servable:!0,is_translateable:P,vss_id:y,is_default:A}))}a=a.getElementsByTagName("target");T=a.length;for(K=0;K<T;K++)Q={languageCode:a[K].getAttribute("lang_code"),languageName:a[K].getAttribute("lang_translated"),
languageOriginal:a[K].getAttribute("lang_original"),id:a[K].getAttribute("id"),isDefault:a[K].getAttribute("lang_default")==="true"},this.Vz[Q.languageCode]=Q.languageName,this.N.push(Q)}this.Yd(Z,this.videoId)},
withCredentials:!0})}G(Z,k){let N=this.C;k={v:this.videoId,type:"track",lang:Z.languageCode,name:Z.getName(),kind:Z.kind,fmt:k};const a=this.rA.X();a.B("captions_url_add_ei")&&(k.ei=this.eventId);Z.translationLanguage&&(k.tlang=g.co(Z));Object.assign(k,a.V);return N=AP(N,k)}D(){this.U&&this.U.abort()}};g.Uy.prototype.Y=NR(60);var LLb=class extends g.jR{constructor(Z,k,N=""){super();this.S=Z;this.j=k;this.Y=N;this.TW={};this.U={};this.D=null;this.G=new Set;this.C=new g.tt(this);this.nF={wq3:()=>this.j,
ngS:()=>this.Y};
this.Vz=this.S.B("web_player_defer_modules");this.Es=new Map;g.u(this,this.C);this.C.K(Z,"videodatachange",this.onVideoDataChange)}createSubtitlesModuleIfNeeded(){oRi(this)&&j0(this,"captions");return!!g.pY(this)}ZV(){return this.S.getVideoData().ZV()}gN(){return this.S.getVideoData().gN()}N(){const Z=this.Es.get("heartbeat");j0(this,"heartbeat",!1,!0,this.N);!Z&&this.Es.has("heartbeat")&&this.S.publish("offlineslatestatechange")}V(){j0(this,"annotations_module",!0,void 0,this.V);const Z=this.Es.get("annotations_module");
if(Z)for(const k in this.D){if(!this.D.hasOwnProperty(k))continue;const N=k;Z.subscribe(N,this.D[N])}}L(){if(!this.Es.get("ad"))try{Ww(this)?j0(this,"ad",!1,!0,this.L):E8(this,"ad")}catch(Z){E8(this,"ad"),g.b(Z)}}tQ(){return this.U}QP(){const Z={},k=g.pY(this);k&&Object.assign(Z,k.QP());return Z}sC(Z,k){Object.assign(this.U,Z||null);Object.assign(this.TW,k||null)}q_(){if(g.CQ(this.S.X()))return this.Es.get("unplugged")}onVideoDataChange(){const Z=this.S.getVideoData();this.S.B("enable_wn_infocards")&&
Z.l9()&&!g.R1(this)&&this.V()}YW(){super.YW();NI(this,1,!0);for(const [Z,k]of Object.entries(ILR)){const N=Z;this.G.has(k)&&e0.delete(N)}this.G.clear()}},ILR={ad:"ad.js",annotations_module:"annotations_module.js",asmjs:"asmjs.js",creatorendscreen:"annotations_module.js",embed:"embed.js",endscreen:"endscreen.js",heartbeat:"heartbeat.js",kids:"kids.js",remote:"remote.js",miniplayer:"miniplayer.js",offline:"offline.js",captions:"captions.js",unplugged:"unplugged.js",ux:"ux.js",webgl:"webgl.js",ypc:"ypc.js"},
Mpy={ad:["ad"],annotations_module:[],asmjs:[],creatorendscreen:[],embed:[],endscreen:[],heartbeat:["heartbeat"],kids:[],remote:["mdx"],miniplayer:[],offline:[],captions:[],unplugged:[],ux:[],webgl:["webgl"],ypc:[]},Z8j="ad annotations_module asmjs creatorendscreen embed endscreen heartbeat kids remote miniplayer offline captions webgl ypc unplugged ux".split(" ");var pBT=class extends g.n9{constructor(Z,k,N,a){super();this.target=Z;this.api=k;this.Ks=N;this.U=0;this.G=!1;this.Y=new g.Of(NaN,NaN);this.V=new g.tt(this);this.dA=this.D=this.j=null;g.u(this,this.V);k=a?g.Q5(this.api.X().experiments,"web_player_touch_idle_wait_time_ms",4E3):g.Q5(this.api.X().experiments,"web_player_mouse_idle_wait_time_ms",3E3);this.N=new g.Uc(()=>{T1(this,1,!1)},k,this);
g.u(this,this.N);this.Vz=new g.Uc(()=>{T1(this,2,!1)},k,this);
g.u(this,this.Vz);this.O=new g.Uc(()=>{T1(this,2048,!1)},k,this);
g.u(this,this.O);this.zt=new g.Uc(()=>{T1(this,512,!1)},k,this);
g.u(this,this.zt);this.vD=3E3;a||(this.D=this.V.K(Z,"mouseover",this.Kx),this.V.K(Z,"mousemove",this.Sm),this.V.K(Z,"mouseleave",this.Qz));this.api.B("web_player_enable_fullscreen_grid_components")&&this.V.K(Z,"wheel",this.s6,this,!0);$1?this.V.K(Z,"keypress",this.Kp):this.V.K(Z,"focusin",this.MX);this.L=this.V.K(Z,"mousedown",this.xW);this.C=this.V.K(Z,"touchstart",this.FS,void 0,!0);T1(this,640,!0)}Sm(Z){Z=new g.Of(Z.pageX,Z.pageY);if(!vs(Z,this.Y)){let k=2;this.G&&(k|=8);this.Y=Z;T1(this,k,!0)}}s6(){T1(this,
2048,!0)}Qz(Z){this.G&&T1(this,8,!0);if(this.api.B("allow_autohide_on_paused_videos")){Z=Z.relatedTarget;var k=this.target instanceof HTMLElement?this.target:this.target.element;if(Z instanceof Element&&(k=k.getBoundingClientRect(),Z=Z.getBoundingClientRect(),Z.top>=k.top&&Z.right<=k.right&&Z.bottom<=k.bottom&&Z.left>=k.left))return}T1(this,2,!1)}Kx(Z){const k=new g.Of(Z.pageX,Z.pageY);vs(k,this.Y)||(this.Y=k,(Z=Z.target)&&this.Ks(Z)&&(T1(this,4,!0),this.V.Ce(this.D),this.D=this.V.K(this.target,"mouseover",
this.qZ),this.j=this.V.K(this.target,"mouseout",this.qZ)))}qZ(Z){Z=Z.relatedTarget;Z&&this.Ks(Z)||(this.Y=new g.Of(NaN,NaN),NB0(this))}Kp(){T1(this,1,!0)}MX(Z){Z=Z.target;Z instanceof Element&&!(Z.tabIndex>0)||T1(this,1,!0)}xW(){this.G=!0;this.V.Ce(this.L);this.L=this.V.K(document,"mouseup",this.Rq)}Rq(){this.G=!1;T1(this,8,!1);this.V.Ce(this.L);this.L=this.V.K(this.target,"mousedown",this.xW)}FS(Z){if(Z=(Z=Z.changedTouches)&&Z[0])this.dA=Z.identifier,this.V.Ce(this.C),this.C=this.V.K(this.target,
"touchend",this.tq,void 0,!0),T1(this,1024,!0)}tq(Z){let k;if(Z=Z.changedTouches)for(let N=0;N<Z.length;N++){const a=Z[N];if(a.identifier===this.dA){k=a;break}}k&&(this.V.Ce(this.C),this.C=this.V.K(this.target,"touchstart",this.FS,void 0,!0),T1(this,1024,!1))}qm(){T1(this,2,!0)}resize(){g.Cf&&NB0(this)}toString(){return super.toString()}};g.RJn=class extends g.E{constructor(Z){super({J:"button",BD:["ytp-large-play-button","ytp-button"],W:{"aria-label":"Play",title:"Play"},A:["{{largePlayButtonChildren}}"]});this.api=Z;this.K(Z,"videodatachange",this.aq);this.K(Z,"basechromeinitialized",this.D);Z=this.api.X();Z.j&&rN&&(this.listen("click",this.V,this),this.listen("touchstart",this.U,this));g.s$(Z)&&g.jX(this.element,"ytp-large-play-button-red-bg");this.api.createClientVe(this.element,this,28572);this.aq()}D(){this.aq()}aq(){const Z=
this.api.getVideoData();var k=this.api.X();const N=!!this.api.isEmbedsShortsMode();g.D(this.element,"ytp-shorts-mode",N);N?k=[{J:"svg",W:{fill:"none",height:"100%",viewBox:"0 0 87 115",width:"100%"},A:[{J:"path",W:{"clip-rule":"evenodd",d:"M83.99 10.81C90.08 21.24 86.62 34.66 76.26 40.79L69.05 45.06L74.17 47.38C81.58 50.74 86.52 57.99 86.96 66.17C87.40 74.34 83.27 82.09 76.26 86.24L32.76 111.97C22.41 118.10 9.08 114.61 3.00 104.18C-3.08 93.75 .37 80.33 10.73 74.20L17.94 69.93L12.82 67.61C5.41 64.25 .47 57.00 .03 48.82C-0.40 40.65 3.72 32.90 10.73 28.75L54.23 3.02C64.58 -3.10 77.91 .38 83.99 10.81Z",
fill:"#f00","fill-rule":"evenodd"}},{J:"path",W:{"clip-rule":"evenodd",d:"M33 74L33 41L61 57.5L33 74Z",fill:"white","fill-rule":"evenodd"}}]}]:Z.o4?k=[{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 60 60",width:"100%"},A:[{J:"path",Z:"ytp-dni-large-play-button-bg",W:{d:"M30,0A30,30,0,1,0,60,30,30,30,0,0,0,30,0Z",fill:"#1f1f1f"}},{J:"path",W:{d:"M21,41.65V18L43.7,29.85Z",fill:"#fff"}}]}]:Z.o4&&Z.Vl?k=[{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 68 48",width:"100%"},A:[{J:"path",Z:"ytp-dni-large-play-button-bg",
W:{d:"M66.52,7.74c-0.78-2.93-2.49-5.41-5.42-6.19C55.79,.13,34,0,34,0S12.21,.13,6.9,1.55 C3.97,2.33,2.27,4.81,1.48,7.74C0.06,13.05,0,24,0,24s0.06,10.95,1.48,16.26c0.78,2.93,2.49,5.41,5.42,6.19 C12.21,47.87,34,48,34,48s21.79-0.13,27.1-1.55c2.93-0.78,4.64-3.26,5.42-6.19C67.94,34.95,68,24,68,24S67.94,13.05,66.52,7.74z",fill:"#212121","fill-opacity":"0.8"}},{J:"path",W:{d:"M 45,24 27,14 27,34",fill:"#fff"}}]}]:k.G?(g.D(this.element,"ytp-touch-device",k.U),k=[k.G?{J:"svg",W:{height:"100%",version:"1.1",
viewBox:"0 0 60 60",width:"100%"},A:[{J:"path",Z:"ytp-large-play-button-bg",W:{d:"M30,0A30,30,0,1,0,60,30,30,30,0,0,0,30,0Z",fill:"#1f1f1f"}},{J:"path",W:{d:"M21,41.65V18L43.7,29.85Z",fill:"#fff"}}]}:{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 68 48",width:"100%"},A:[{J:"path",Z:"ytp-large-play-button-bg",W:{d:"M66.52,7.74c-0.78-2.93-2.49-5.41-5.42-6.19C55.79,.13,34,0,34,0S12.21,.13,6.9,1.55 C3.97,2.33,2.27,4.81,1.48,7.74C0.06,13.05,0,24,0,24s0.06,10.95,1.48,16.26c0.78,2.93,2.49,5.41,5.42,6.19 C12.21,47.87,34,48,34,48s21.79-0.13,27.1-1.55c2.93-0.78,4.64-3.26,5.42-6.19C67.94,34.95,68,24,68,24S67.94,13.05,66.52,7.74z",
fill:"#212121","fill-opacity":"0.8"}},{J:"path",W:{d:"M 45,24 27,14 27,34",fill:"#fff"}}]}]):k=[{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 68 48",width:"100%"},A:[{J:"path",Z:"ytp-large-play-button-bg",W:{d:"M66.52,7.74c-0.78-2.93-2.49-5.41-5.42-6.19C55.79,.13,34,0,34,0S12.21,.13,6.9,1.55 C3.97,2.33,2.27,4.81,1.48,7.74C0.06,13.05,0,24,0,24s0.06,10.95,1.48,16.26c0.78,2.93,2.49,5.41,5.42,6.19 C12.21,47.87,34,48,34,48s21.79-0.13,27.1-1.55c2.93-0.78,4.64-3.26,5.42-6.19C67.94,34.95,68,24,68,24S67.94,13.05,66.52,7.74z",
fill:"#f03"}},{J:"path",W:{d:"M 45,24 27,14 27,34",fill:"#fff"}}]}];this.updateValue("largePlayButtonChildren",k);Z.o4&&Z.Vl&&this.Lp("ytp-dni-large-play-button-bg").setAttribute("fill",Z.Vl?Z.Vl:"#1f1f1f")}show(){super.show();this.api.X().B("embeds_web_enable_lite_experiment_control_arm_logging")&&this.api.logVisibility(this.element,!0)}V(){this.api.getVideoData().mutedAutoplay||(this.api.Wf(),this.api.playVideo())}U(Z){this.api.getVideoData().mutedAutoplay||Z.preventDefault()}};g.MiF=class extends g.E{constructor(Z){var k=["ytp-cued-thumbnail-overlay"];Z.X().G&&k.push("ytp-exp-contain-thumbnail");super({J:"div",BD:k,A:[{J:"div",Z:"ytp-cued-thumbnail-overlay-image"}]});k=this.Lp("ytp-cued-thumbnail-overlay");const N=new g.RJn(Z);g.u(this,N);N.HD(k);this.U=new g.tt(this);g.u(this,this.U);this.api=Z;this.L=this.Lp("ytp-cued-thumbnail-overlay-image");this.D=N;this.fade=new g.ML(this,250);g.u(this,this.fade);this.V=new g.Uc(this.aq,0,this);g.u(this,this.V);this.aq();this.K(Z,
"appresize",this.qx);this.K(Z,"presentingplayerstatechange",this.onStateChange);this.K(Z,"ypcStateChanged",this.Y);cQ(Z.X())&&this.K(Z,"videoplayerreset",this.onReset)}show(){this.LF||(this.U.K(this.api,"videodatachange",()=>{this.V.XN()}),this.U.K(this.api,"videoplayerreset",()=>{this.V.XN()}));
super.show()}hide(){this.U&&this.U.U();super.hide()}qx(){this.V.XN()}onStateChange(){this.V.XN()}Y(){this.V.XN()}onReset(){this.fade.stop();this.hide();this.V.XN()}aq(){const Z=this.api.getPlayerStateObject();if(this.api.getPresentingPlayerType()===3&&(Z.isPlaying()||Z.isPaused()))var k=!0;else(k=this.api.GZ().Es.get("ypc"))&&k.Cz?k=!0:(k=this.api.X(),k=Z.V(2)&&g.Dd(this.api)&&k.j9?!0:!1);k?(k=!0,this.D.hide()):(this.D.show(),k=Z.isCued()&&this.api.getPresentingPlayerType()!==2||Z.V(2)&&!g.Dd(this.api)&&
!this.api.h4()||Z.V(1024)?!0:!1);const N=this.api.getVideoData();k&&!N.Ii?(this.fade.show(),anR(this,this.api.getPlaylist(),N)):(this.fade.hide(),Z.V(1)||this.fade.stop())}};var KMr;
g.naH=class extends g.E{constructor(Z){super({J:"div",BD:["ytp-error"],W:{role:"alert"},A:[{J:"div",Z:"ytp-error-content",A:[{J:"div",Z:"ytp-error-icon-container",A:[{J:"svg",W:{fill:"#fff",viewBox:"0 0 48 48"},A:[{J:"path",W:{d:"M0 0h48v48H0V0z",fill:"none"}},{J:"path",W:{d:"M22 30h4v4h-4zm0-16h4v12h-4zm1.99-10C12.94 4 4 12.95 4 24s8.94 20 19.99 20S44 35.05 44 24 35.04 4 23.99 4zM24 40c-8.84 0-16-7.16-16-16S15.16 8 24 8s16 7.16 16 16-7.16 16-16 16z","fill-opacity":"0.7"}}]}]},{J:"div",Z:"ytp-error-content-wrap",A:[{J:"div",
Z:"ytp-error-content-wrap-reason",Da:"{{content}}"},{J:"div",Z:"ytp-error-content-wrap-subreason",Da:"{{subreason}}"}]}]}]});this.api=Z;this.keys=[];this.D=!1;Z.createClientVe(this.element,this,216103);this.api.logVisibility(this.element,this.LF)}resize(){}U(Z){this.D=!1;TBf(this);var k=Z.YG,N=this.api.X();k!=="GENERIC_WITHOUT_LINK"||N.G?k==="TOO_MANY_REQUESTS"?(N=this.api.getVideoData(),this.setContent(y_(this,"TOO_MANY_REQUESTS_WITH_LINK",N.Qg(),void 0,void 0,void 0,!1))):k!=="HTML5_NO_AVAILABLE_FORMATS_FALLBACK"||
N.G?this.api.X().B("html5_enable_bandaid_error_screen")&&k==="HTML5_SPS_UMP_STATUS_REJECTED"&&!N.G?(N=N.hostLanguage,Z="//support.google.com/youtube?p=videoError",N&&(Z=g.mW(Z,{hl:N})),this.setContent(y_(this,"HTML5_SPS_UMP_STATUS_REJECTED",Z))):this.api.X().B("enable_adb_handling_in_sabr")&&k==="BROWSER_OR_EXTENSION_ERROR"&&!N.G?(N=N.hostLanguage,Z="//support.google.com/youtube/answer/3037019#zippy=%2Cupdate-your-browser-and-check-your-extensions",N&&(Z=g.mW(Z,{hl:N})),this.setContent(y_(this,"BROWSER_OR_EXTENSION_ERROR",
Z))):this.setContent(g.Q_(Z.errorMessage)):this.setContent(y_(this,"HTML5_NO_AVAILABLE_FORMATS_FALLBACK_WITH_LINK_SHORT","//www.youtube.com/supported_browsers")):(Z=N.hostLanguage,k="//support.google.com/youtube/?p=player_error1",Z&&(k=g.mW(k,{hl:Z})),this.setContent(y_(this,"GENERIC_WITH_LINK_AND_CPN",k,!0)),N.r5&&!N.Y&&ydf(this,a=>{if(g.IC(a,this.api,!t4(this.api.X()))){const T={as3:!1,html5:!0,player:!0,cpn:this.api.getVideoData().clientPlaybackNonce};a=this.api;g.dv(a,"onFeedbackArticleRequest",
{articleId:3037019,helpContext:"player_error",productData:T});a.isFullscreen()&&a.toggleFullscreen()}}));
if(this.D){const a=this.Lp("ytp-error-link");a&&(this.api.createClientVe(a,this,216104),this.api.logVisibility(a,!0),ydf(this,()=>{this.api.logClick(a)}))}}};
KMr=/<a\s+href=["']([^"']+)["'](?:\s+target=["']([^"']+)["'])?>([^<>]+)<\/a>/;var ID_=class extends g.E{constructor(Z){super({J:"div",BD:["ytp-overlays-container"],A:[{J:"div",Z:"ytp-overlay-top-left"},{J:"div",Z:"ytp-overlay-top-right"},{J:"div",Z:"ytp-overlay-bottom-left"},{J:"div",Z:"ytp-overlay-bottom-right"}]});this.D=this.Lp("ytp-overlay-top-left");this.Y=this.Lp("ytp-overlay-top-right");this.V=this.Lp("ytp-overlay-bottom-left");this.U=this.Lp("ytp-overlay-bottom-right");g.$n(Z,this.element,4)}B0(Z,k,N=!1){switch(k){case 1:qI(this,Z,this.D,N);break;case 2:qI(this,Z,this.Y,
N);break;case 3:qI(this,Z,this.V,N);break;case 4:qI(this,Z,this.U,N)}}};var jnH=class extends g.E{constructor(Z){super({J:"div",Z:"ytp-paid-content-overlay",W:{"aria-live":"assertive","aria-atomic":"true",["data-overlay-order"]:"5"}});this.S=Z;this.videoId=null;this.Y=!1;this.innertubeCommand=this.wV=this.V=null;const k=Z.X();k.experiments.Yl().V.Aq(uOb)?(this.U=new g.Uc(()=>{this.Iv()},5E3,this),g.u(this,this.U)):this.U=null;
Z.B("enable_new_paid_product_placement")&&!g.O$(k)?(this.D=new g.E({J:"a",Z:"ytp-paid-content-overlay-link",W:{href:"{{href}}",target:"_blank"},A:[{J:"div",Z:"ytp-paid-content-overlay-indicator"},{J:"div",Z:"ytp-paid-content-overlay-icon",Da:"{{icon}}"},{J:"div",Z:"ytp-paid-content-overlay-text",Da:"{{text}}"},{J:"div",Z:"ytp-paid-content-overlay-chevron",Da:"{{chevron}}"}]}),this.K(this.D.element,"click",this.onClick)):this.D=new g.E({J:"div",BD:["ytp-button","ytp-paid-content-overlay-text"],Da:"{{text}}"});
this.fade=new g.ML(this.D,250,!1,100);g.u(this,this.D);this.D.HD(this.element);g.u(this,this.fade);this.S.createServerVe(this.element,this);this.K(Z,"videodatachange",this.onVideoDataChange);this.K(Z,"presentingplayerstatechange",this.L)}onClick(Z){this.innertubeCommand?(g.A7(this.S,"innertubeCommand",this.innertubeCommand),Z.preventDefault()):g.IC(Z,this.S,!0);this.S.logClick(this.element)}onVideoDataChange(Z,k){this.U&&Z==="newdata"&&this.U.stop();qYG(this,k);this.wV&&rdX(this,this.wV)}L(Z){const k=
this.S.getVideoData();this.videoId!==k.videoId&&qYG(this,k);this.V&&rdX(this,Z.state);this.wV=Z.state}Iv(){this.fade.show();this.V?.start();this.S.publish("paidcontentoverlayvisibilitychange",!0);this.S.logVisibility(this.element,!0)}cA(){this.fade.hide();this.S.publish("paidcontentoverlayvisibilitychange",!1);this.S.logVisibility(this.element,!1)}};var EaK=class extends g.E{constructor(Z){super({J:"div",Z:"ytp-spinner",A:[W3(),{J:"div",Z:"ytp-spinner-message",Da:"If playback doesn't begin shortly, try restarting your device."}]});this.api=Z;this.message=this.Lp("ytp-spinner-message");this.V=new g.Uc(this.show,500,this);g.u(this,this.V);this.K(Z,"presentingplayerstatechange",this.onStateChange);this.K(Z,"playbackstalledatstart",this.U);this.Qn(Z.getPlayerStateObject())}hide(){this.V.stop();this.message.style.display="none";super.hide()}onStateChange(Z){this.Qn(Z.state)}Qn(Z){(Z.V(128)||
this.api.iE()||this.api.B("web_watch_enable_multiview_manager")&&this.api.getVideoData()?.Jd()?0:Z.V(16)||Z.V(1))?this.V.start():this.hide()}U(){this.message.style.display="block"}};var Wr_=class extends nz{constructor(Z){const k=[{J:"div",BD:["ytp-unmute-icon"],A:[Z.X().experiments.yz("delhi_modern_web_player_icons")?{J:"svg",W:{height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",Z:"ytp-svg-fill",W:{d:"M11.60 2.08L11.48 2.14L3.91 6.68C3.02 7.21 2.28 7.97 1.77 8.87C1.26 9.77 1.00 10.79 1 11.83V12.16L1.01 12.56C1.07 13.52 1.37 14.46 1.87 15.29C2.38 16.12 3.08 16.81 3.91 17.31L11.48 21.85C11.63 21.94 11.80 21.99 11.98 21.99C12.16 22.00 12.33 21.95 12.49 21.87C12.64 21.78 12.77 21.65 12.86 21.50C12.95 21.35 13 21.17 13 21V3C12.99 2.83 12.95 2.67 12.87 2.52C12.80 2.37 12.68 2.25 12.54 2.16C12.41 2.07 12.25 2.01 12.08 2.00C11.92 1.98 11.75 2.01 11.60 2.08ZM4.94 8.4V8.40L11 4.76V19.23L4.94 15.6C4.38 15.26 3.92 14.80 3.58 14.25C3.24 13.70 3.05 13.07 3.00 12.43L3 12.17V11.83C2.99 11.14 3.17 10.46 3.51 9.86C3.85 9.25 4.34 8.75 4.94 8.4ZM21.29 8.29L19 10.58L16.70 8.29L16.63 8.22C16.43 8.07 16.19 7.99 15.95 8.00C15.70 8.01 15.47 8.12 15.29 8.29C15.12 8.47 15.01 8.70 15.00 8.95C14.99 9.19 15.07 9.43 15.22 9.63L15.29 9.70L17.58 12L15.29 14.29C15.19 14.38 15.12 14.49 15.06 14.61C15.01 14.73 14.98 14.87 14.98 15.00C14.98 15.13 15.01 15.26 15.06 15.39C15.11 15.51 15.18 15.62 15.28 15.71C15.37 15.81 15.48 15.88 15.60 15.93C15.73 15.98 15.86 16.01 15.99 16.01C16.12 16.01 16.26 15.98 16.38 15.93C16.50 15.87 16.61 15.80 16.70 15.70L19 13.41L21.29 15.70L21.36 15.77C21.56 15.93 21.80 16.01 22.05 15.99C22.29 15.98 22.53 15.88 22.70 15.70C22.88 15.53 22.98 15.29 22.99 15.05C23.00 14.80 22.93 14.56 22.77 14.36L22.70 14.29L20.41 12L22.70 9.70C22.80 9.61 22.87 9.50 22.93 9.38C22.98 9.26 23.01 9.12 23.01 8.99C23.01 8.86 22.98 8.73 22.93 8.60C22.88 8.48 22.81 8.37 22.71 8.28C22.62 8.18 22.51 8.11 22.39 8.06C22.26 8.01 22.13 7.98 22.00 7.98C21.87 7.98 21.73 8.01 21.61 8.06C21.49 8.12 21.38 8.19 21.29 8.29Z"}}]}:
{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},A:[{J:"path",Rv:!0,Z:"ytp-svg-fill",W:{d:"m 21.48,17.98 c 0,-1.77 -1.02,-3.29 -2.5,-4.03 v 2.21 l 2.45,2.45 c .03,-0.2 .05,-0.41 .05,-0.63 z m 2.5,0 c 0,.94 -0.2,1.82 -0.54,2.64 l 1.51,1.51 c .66,-1.24 1.03,-2.65 1.03,-4.15 0,-4.28 -2.99,-7.86 -7,-8.76 v 2.05 c 2.89,.86 5,3.54 5,6.71 z M 9.25,8.98 l -1.27,1.26 4.72,4.73 H 7.98 v 6 H 11.98 l 5,5 v -6.73 l 4.25,4.25 c -0.67,.52 -1.42,.93 -2.25,1.18 v 2.06 c 1.38,-0.31 2.63,-0.95 3.69,-1.81 l 2.04,2.05 1.27,-1.27 -9,-9 -7.72,-7.72 z m 7.72,.99 -2.09,2.08 2.09,2.09 V 9.98 z"}}]}]},
{J:"div",BD:["ytp-unmute-text"],Da:"Tap to unmute"}];k.push({J:"div",BD:["ytp-unmute-box"],A:[]});super(Z,{J:"button",BD:["ytp-unmute","ytp-popup","ytp-button","ytp-unmute-animated","ytp-unmute-shrink"],A:[{J:"div",Z:"ytp-unmute-inner",A:k}]},100);this.V=this.clicked=!1;this.api=Z;this.api.createClientVe(this.element,this,51663);this.K(Z,"onMutedAutoplayChange",this.onMutedAutoplayChange,this);this.K(Z,"presentingplayerstatechange",this.qA);this.listen("click",this.onClick,this);Z=Z.isMutedByMutedAutoplay()&&
!g.PQ(this.api.X());this.In(Z);Z&&CPr(this);this.U=Z}onMutedAutoplayChange(Z){this.U&&(Z?(CPr(this),this.Iv()):(this.V&&this.logClick(),this.cA()))}qA(Z){this.api.isMutedByMutedAutoplay()&&Z.Ub(2)&&this.cA()}onClick(){this.api.unMute();this.logClick()}logClick(){this.clicked||(this.clicked=!0,this.api.logClick(this.element))}};g.iL=class extends g.tt{constructor(Z){super();this.api=Z;this.S4=!1;this.f5=null;this.Wp=!1;this.Fi=null;this.Au=this.kN=!1;this.Ng=this.Tz=null;this.Aj=NaN;this.Ao=this.CS=!1;this.d2=0;this.VW=[];this.Yf=!1;this.YK={height:0,width:0};this.xp=480;this.Mh=["ytp-player-content","html5-endscreen","ytp-overlay"];this.qt={JH:!1};this.w0=null;const k=Z.X(),N=Z.fF();this.YK=Z.getPlayerSize();this.Lb=new g.Uc(this.iG,0,this);g.u(this,this.Lb);k.disableOrganicUi||(this.KP=new g.MiF(Z),g.u(this,this.KP),g.$n(Z,
this.KP.element,4));this.api.B("web_player_overlay_positioned_layout")&&(this.w0=new ID_(this.api),g.u(this,this.w0));if(mXf(this)){var a=new EaK(Z);g.u(this,a);a=a.element;g.$n(Z,a,4)}var T=Z.getVideoData();this.XI=new pBT(N,Z,K=>this.Ks(K),k.fN);
g.u(this,this.XI);this.XI.subscribe("autohideupdate",this.zD,this);this.api.B("web_player_default_autohide")||aQ(this.XI);if(!k.disablePaidContentOverlay){const K=new jnH(Z);g.u(this,K);this.w0?this.w0.B0(K.element,g.O$(k)?3:1):g.$n(Z,K.element,4)}this.OT=new Wr_(Z);g.u(this,this.OT);g.$n(this.api,this.OT.element,2);this.Sv=this.api.isMutedByMutedAutoplay();this.K(Z,"onMutedAutoplayChange",this.onMutedAutoplayChange);this.qB=new g.Uc(this.KD,200,this);g.u(this,this.qB);this.wK=T.videoId;this.s$=new g.Uc(()=>
{this.d2=0},350);
g.u(this,this.s$);this.Vx=new g.Uc(()=>{this.Ao||mN(this)},350,this);
g.u(this,this.Vx);T=Z.getRootNode();T.setAttribute("aria-label","YouTube Video Player");switch(k.color){case "white":g.jX(T,"ytp-color-white")}this.K(Z,"appresize",this.qx);this.K(Z,"presentingplayerstatechange",this.qA);this.K(Z,"videodatachange",this.onVideoDataChange);this.K(Z,"videoplayerreset",this.Yx);this.K(Z,"autonavvisibility",()=>{this.kh()});
this.K(Z,"sizestylechange",()=>{this.kh()});
this.K(N,"click",this.Uv,this);this.K(N,"dblclick",this.oH,this);this.K(N,"mousedown",this.Yb,this);k.hq&&(this.K(N,"gesturechange",this.xb,this),this.K(N,"gestureend",this.DS,this));this.DE=[N.KE];this.KP&&this.DE.push(this.KP.element);a&&this.DE.push(a);this.api.B("web_player_fullscreen_double_click_ve")&&(this.api.createClientVe(N.element,this,247482),this.api.logVisibility(N.element,!0))}init(){const Z=this.api,k=Z.getPlayerStateObject();this.YK=Z.getPlayerSize();this.Y4(k);this.kh();this.qx();
this.api.publish("basechromeinitialized",this);this.Tj()&&this.api.publish("standardControlsInitialized")}onVideoDataChange(Z,k){var N=this.wK!==k.videoId;if(N||Z==="newdata")Z=this.api,Z.isFullscreen()||(this.YK=Z.getPlayerSize());N&&(this.wK=k.videoId,N=this.XI,N.vD=3E3,T1(N,512,!0),this.kh());this.api.B("web_render_jump_buttons")&&k.showSeekingControls&&(this.xp=572)}Yx(){this.onVideoDataChange("newdata",this.api.getVideoData())}w3(){const Z=this.api.pm()&&this.api.hh(),k=this.api.Eo();return this.Wp||
Z||this.Sv||k}fE(){const Z=!this.w3();g.D(this.api.getRootNode(),"ytp-menu-shown",!Z)}Ks(Z){try{if(!g.C1(this.api.getRootNode(),Z))return!1}catch(k){return!1}for(;Z&&!AI(Z);)Z=Z===this.api.getRootNode()?null:Z.parentElement||null;return!!Z}zD(Z){const k=this.api.getRootNode();g.D(k,"ytp-autohide",Z);g.D(k,"ytp-autohide-active",!0);this.Lb.start(Z?250:100);Z&&(this.kN=!1,g.Wp(k,"ytp-touch-mode"));this.Au=!Z;this.api.Q3(!Z);this.api.B("web_player_enable_fullscreen_grid_components")&&this.api.publish("autohideupdate",
Z)}iG(){const Z=this.api.getRootNode();g.D(Z,"ytp-autohide-active",!1)}La(){this.Ao=!0}dY(Z){if(this.api.X().B("player_doubletap_to_seek")||this.api.X().j)this.Ao=!1,this.Ng&&this.Ce(this.Ng),this.d2===0&&sU(this,Z)?(this.FC(),this.Vx.start(),this.Ng=this.K(this.api.fF(),"touchmove",this.La,void 0,!0)):this.Vx.stop();AdN(this)&&sU(this,Z)&&!this.api.X().j&&mN(this,Z);var k=this.OT.Ga();if(!g.PQ(this.api.X())&&jd&&AV(this,Z))k&&Z.preventDefault();else if(this.kN=!0,g.jX(this.api.getRootNode(),"ytp-touch-mode"),
this.XI.qm(),this.api.X().B("player_doubletap_to_seek")||this.api.X().j)if(k=this.api.getPlayerStateObject(),!(!this.api.uV()||k.V(2)&&g.Dd(this.api)||k.V(64))){k=Date.now()-this.Aj;this.d2+=1;if(k<=350){if(Cz(this,Z))return;this.CS=!0;k=this.api.getPlayerSize().width/3;var N=this.api.getRootNode().getBoundingClientRect();const a=Z.targetTouches[0].clientX-N.left;N=Z.targetTouches[0].clientY-N.top;const T=(this.d2-1)*10;a>0&&a<k?(this.j0(-1,a,N,T),this.api.seekBy(-10*this.api.getPlaybackRate())):
a>k*2&&a<k*3&&(this.j0(1,a,N,T),this.api.seekBy(10*this.api.getPlaybackRate()));Z.preventDefault()}else rN&&this.api.X().j&&sU(this,Z)&&Z.preventDefault();this.Aj=Date.now();this.s$.start()}}Yb(){this.qt.JH=!1;this.api.publish("rootnodemousedown",this.qt)}Uv(Z){if(this.api.X().B("web_fix_fine_scrubbing_false_play")){if(AV(this,Z)||this.qt.JH)return}else if(this.qt.JH||AV(this,Z))return;AdN(this)||!sU(this,Z)||this.Vx.isActive()||(mN(this,Z),Z.preventDefault());this.CS&&(this.CS=!1)}FC(){}iD(){}j0(){}renderChapterSeekingAnimation(){}KD(){const Z=
this.api.getPlayerStateObject();Z.V(2)&&g.Dd(this.api)||(Z.isOrWillBePlaying()?this.api.pauseVideo():(this.KP&&(Z.isCued()||Z.V(1024))&&this.api.publish("largeplaybuttonclicked",this.KP.D.element),this.api.Wf(),this.api.playVideo(),this.KP&&document.activeElement===this.KP.D.element&&(this.Tj()?.HA()||this.api.getRootNode().focus())))}oH(Z){Cz(this,Z)||!Z.target||sRN(this,jr(Z))||((this.api.X().B("player_doubletap_to_seek")||this.api.X().j)&&this.CS?this.CS=!1:PPj(this))}GG(Z){String(Z).includes("fullscreen error")?
g.L9(Z):g.b(Z)}xb(Z){cdf(this,.3,Z.scale);Z.preventDefault()}DS(Z){cdf(this,.1,Z.scale)}qx(){const Z=this.api.fF().getPlayerSize(),k=this.api.getRootNode(),N=Z.width>=650,a=Z.width<528;this.XI.resize();if(this.api.B("web_player_use_screen_width_for_big_mode")){const T=Z.width>=(g.Q5(this.api.X().experiments,"web_player_big_mode_screen_width_cutoff")??2E3);g.D(k,"ytp-big-mode",T)}g.D(k,"ytp-fullscreen",this.api.isFullscreen());g.D(k,"ytp-large-width-mode",N);this.api.B("delhi_modern_web_player")?g.D(k,
"ytp-xsmall-width-mode",a):g.D(k,"ytp-small-mode",this.bV());g.D(k,"ytp-tiny-mode",this.HO());g.D(k,"ytp-big-mode",this.dQ());this.Fi&&this.Fi.resize(Z)}qA(Z){this.Y4(Z.state);this.kh()}bO(){var Z=!!this.wK&&!this.api.Gc()&&!this.Yf,k=this.api.getPresentingPlayerType()===2,N=this.api.X();if(k)return N=bu(this.api.GZ()),Z&&(N&&N.player?Z=(Z=N.player.getVideoData({playerType:2}))?Z.isListed&&!g.KA(N.player.X()):!1:(wm("showInfoBarDuringAd: this is null"),Z=!1)),Z;k=N.B("web_player_imax_theater_mode")&&
this.api.MA()&&!this.api.isInline();return Z&&(N.D4||k||this.api.isFullscreen()||N.YH)}kh(){const Z=this.bO();this.f5!==Z&&(this.f5=Z,g.D(this.api.getRootNode(),"ytp-hide-info-bar",!Z))}Y4(Z){const k=Z.isCued()||this.api.GC()&&this.api.getPresentingPlayerType()!==3;k!==this.isCued&&(this.isCued=k,this.Tz&&this.Ce(this.Tz),this.Tz=this.K(this.api.fF(),"touchstart",this.dY,void 0,k));var N=this.XI,a=Z.isPlaying()&&!Z.V(32)||this.api.KY();T1(N,128,!a);N=this.XI;a=this.api.getPresentingPlayerType()===
3;T1(N,256,a);N=this.api.getRootNode();Z.V(2)?a=[u7.ENDED]:(a=[],Z.V(8)?a.push(u7.PLAYING):Z.V(4)&&a.push(u7.PAUSED),Z.V(1)&&!Z.V(32)&&a.push(u7.BUFFERING),Z.V(32)&&a.push(u7.SEEKING),Z.V(64)&&a.push(u7.UNSTARTED));g.uT(this.VW,a)||(g.Y3(N,this.VW),this.VW=a,g.Ec(N,a));a=this.api.X();const T=Z.V(2);a:{var K=this.api.X();const y=K.controlsType;switch(y){case "2":case "0":K=!1;break a}K=y==="3"&&!Z.V(2)||this.isCued||(this.api.getPresentingPlayerType()!==2?0:VG(bu(this.api.GZ())))||this.api.Eo()||g.PQ(K)&&
this.api.getPresentingPlayerType()===2?!1:!0}g.D(N,"ytp-hide-controls",!K);g.D(N,"ytp-native-controls",a.controlsType==="3"&&!k&&!T&&!this.Sv);Z.V(128)&&!g.PQ(a)?(this.Fi||(this.Fi=new g.naH(this.api),g.u(this,this.Fi),g.$n(this.api,this.Fi.element,4)),this.Fi.U(Z.RJ),this.Fi.show()):this.Fi&&(this.Fi.dispose(),this.Fi=null)}t0(){return this.api.pm()&&this.api.hh()?(this.api.Kl(!1,!1),!0):this.api.Gc()?(g.B3(this.api,!0),!0):!1}onMutedAutoplayChange(Z){this.Sv=Z;this.fE()}dQ(){return!1}bV(){return!this.dQ()&&
(this.api.getPlayerSize().width<this.xp||this.api.getPlayerSize().height<290)}HO(){return this.bV()&&(this.api.getPlayerSize().width<240||this.api.getPlayerSize().height<140)}Ex(){return this.kN}Z1(){return null}Z_(){return null}Sd(){const Z=this.api.fF().getPlayerSize();return new g.DJ(0,0,Z.width,Z.height)}handleGlobalKeyDown(){return!1}handleGlobalKeyUp(){return!1}U1(){}showControls(Z){Z!==void 0&&this.api.fF().Q3(Z)}qm(){}Tj(){return null}};g.iL.prototype.bM=NR(6);g.YhF=class extends g.E{constructor(Z){super({J:"div",A:[{J:"div",Z:"ytp-bezel-text-wrapper",A:[{J:"div",Z:"ytp-bezel-text",Da:"{{title}}"}]},{J:"div",Z:"ytp-bezel",W:{role:"status","aria-label":"{{label}}"},A:[{J:"div",Z:"ytp-bezel-icon",Da:"{{icon}}"}]}]});this.S=Z;this.U=new g.Uc(this.show,10,this);Z=this.S.B("delhi_modern_web_player")?1E3:500;this.V=new g.Uc(this.hide,Z,this);g.u(this,this.U);g.u(this,this.V);this.hide()}show(){super.show();this.V.XN()}hide(){this.U.stop();super.hide()}iD(Z){var k=
this.S.B("delhi_modern_web_player_icons");Z?this.S.getPlayerStateObject().V(64)||(k=k?AY():m9(),PT(this,k,"Play")):(Z=this.S.getVideoData(),Z.isLivePlayback&&!Z.allowLiveDvr?(k=k?Y_X():W$f(),PT(this,k,"Stop playback")):(k=k?plR():bHy(),PT(this,k,"Pause")))}};var Z5n=class extends g.E{constructor(Z,k){super({J:"button",BD:["ytp-button","ytp-cards-button"],W:{"aria-label":"Show cards","aria-owns":"iv-drawer","aria-haspopup":"true","data-tooltip-opaque":String(g.PQ(Z.X()))},A:[{J:"span",Z:"ytp-cards-button-icon-default",A:[{J:"div",Z:"ytp-cards-button-icon",A:[Z.X().B("player_new_info_card_format")?GgU():{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},A:[{J:"path",Rv:!0,Z:"ytp-svg-fill",W:{d:"M18,8 C12.47,8 8,12.47 8,18 C8,23.52 12.47,28 18,28 C23.52,28 28,23.52 28,18 C28,12.47 23.52,8 18,8 L18,8 Z M17,16 L19,16 L19,24 L17,24 L17,16 Z M17,12 L19,12 L19,14 L17,14 L17,12 Z"}}]}]},
{J:"div",Z:"ytp-cards-button-title",Da:"Info"}]},{J:"span",Z:"ytp-cards-button-icon-shopping",A:[{J:"div",Z:"ytp-cards-button-icon",A:[{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},A:[{J:"path",Z:"ytp-svg-shadow",W:{d:"M 27.99,18 A 9.99,9.99 0 1 1 8.00,18 9.99,9.99 0 1 1 27.99,18 z"}},{J:"path",Z:"ytp-svg-fill",W:{d:"M 18,8 C 12.47,8 8,12.47 8,18 8,23.52 12.47,28 18,28 23.52,28 28,23.52 28,18 28,12.47 23.52,8 18,8 z m -4.68,4 4.53,0 c .35,0 .70,.14 .93,.37 l 5.84,5.84 c .23,.23 .37,.58 .37,.93 0,.35 -0.13,.67 -0.37,.90 L 20.06,24.62 C 19.82,24.86 19.51,25 19.15,25 c -0.35,0 -0.70,-0.14 -0.93,-0.37 L 12.37,18.78 C 12.13,18.54 12,18.20 12,17.84 L 12,13.31 C 12,12.59 12.59,12 13.31,12 z m .96,1.31 c -0.53,0 -0.96,.42 -0.96,.96 0,.53 .42,.96 .96,.96 .53,0 .96,-0.42 .96,-0.96 0,-0.53 -0.42,-0.96 -0.96,-0.96 z",
"fill-opacity":"1"}},{J:"path",Z:"ytp-svg-shadow-fill",W:{d:"M 24.61,18.22 18.76,12.37 C 18.53,12.14 18.20,12 17.85,12 H 13.30 C 12.58,12 12,12.58 12,13.30 V 17.85 c 0,.35 .14,.68 .38,.92 l 5.84,5.85 c .23,.23 .55,.37 .91,.37 .35,0 .68,-0.14 .91,-0.38 L 24.61,20.06 C 24.85,19.83 25,19.50 25,19.15 25,18.79 24.85,18.46 24.61,18.22 z M 14.27,15.25 c -0.53,0 -0.97,-0.43 -0.97,-0.97 0,-0.53 .43,-0.97 .97,-0.97 .53,0 .97,.43 .97,.97 0,.53 -0.43,.97 -0.97,.97 z",fill:"#000","fill-opacity":"0.15"}}]}]},{J:"div",
Z:"ytp-cards-button-title",Da:"Shopping"}]}]});this.S=Z;this.U=k;this.V=null;this.fade=new g.ML(this,250,!0,100);g.u(this,this.fade);g.D(this.U,"ytp-show-cards-title",g.PQ(Z.X()));this.hide();this.listen("click",this.onClicked);this.listen("mouseover",this.onHover);this.tJ(!0)}tJ(Z){Z?this.V=la(this.S,this.element,null):(this.V=this.V,this.V(),this.V=null)}Iv(){this.S.X().B("player_new_info_card_format")&&g.I3(this.S.getRootNode(),"ytp-cards-teaser-shown")&&!g.PQ(this.S.X())||(this.fade.show(),g.nR("iv-button-shown"))}cA(){g.nR("iv-button-hidden");
this.fade.hide()}Ga(){return this.LF&&this.fade.state!==4}YW(){this.V&&this.V();super.YW()}onHover(){g.nR("iv-button-mouseover")}onClicked(Z){this.S.pm();const k=g.I3(this.S.getRootNode(),"ytp-cards-teaser-shown");g.nR("iv-teaser-clicked",k);this.S.getVideoData()?.j9()?(Z=this.S.getVideoData()?.l9(),Z?.onIconTapCommand&&g.A7(this.S,"innertubeCommand",Z.onIconTapCommand)):(Z=Z.screenX===0&&Z.screenY===0,this.S.Kl(!this.S.hh(),Z,"YOUTUBE_DRAWER_MANUAL_OPEN"))}};var kIK=class extends g.E{constructor(Z,k){super({J:"div",Z:"ytp-cards-teaser",A:[{J:"div",Z:"ytp-cards-teaser-box"},{J:"div",Z:"ytp-cards-teaser-text",A:Z.X().B("player_new_info_card_format")?[{J:"button",Z:"ytp-cards-teaser-info-icon",W:{"aria-label":"Show cards","aria-haspopup":"true"},A:[GgU()]},{J:"img",Z:"ytp-cards-teaser-channel-avatar",W:{alt:"","aria-hidden":"true"}},{J:"span",Z:"ytp-cards-teaser-label",Da:"{{text}}"},{J:"button",Z:"ytp-cards-teaser-close-button",W:{"aria-label":"Close"},
A:[g.Th()]}]:[{J:"span",Z:"ytp-cards-teaser-label",Da:"{{text}}"}]}]});this.S=Z;this.Mj=k;this.fade=new g.ML(this,250,!1,250);this.V=null;this.j=new g.Uc(this.Rq,300,this);this.G=new g.Uc(this.Sm,2E3,this);this.Y=[];this.D=null;this.zt=new g.Uc(()=>{this.element.style.margin="0"},250);
this.onClickCommand=this.U=null;g.u(this,this.fade);g.u(this,this.j);g.u(this,this.G);g.u(this,this.zt);Z.X().B("player_new_info_card_format")?(g.jX(Z.getRootNode(),"ytp-cards-teaser-dismissible"),this.K(this.Lp("ytp-cards-teaser-close-button"),"click",this.dA),this.K(this.Lp("ytp-cards-teaser-info-icon"),"click",this.C),this.K(this.Lp("ytp-cards-teaser-label"),"click",this.C)):this.listen("click",this.C);this.K(k.element,"mouseover",this.O);this.K(k.element,"mouseout",this.N);this.K(Z,"cardsteasershow",
this.tq);this.K(Z,"cardsteaserhide",this.cA);this.K(Z,"cardstatechange",this.xW);this.K(Z,"presentingplayerstatechange",this.xW);this.K(Z,"appresize",this.L);this.K(Z,"onShowControls",this.L);this.K(Z,"onHideControls",this.vD);this.listen("mouseenter",this.FS)}xW(){this.S.pm()&&this.S.hh()&&this.Ga()&&this.cA()}C(){this.cA();!this.S.pm()&&this.S.X().B("enable_error_corrections_infocards_icon_web")&&this.Mj.cA();g.nR("iv-teaser-clicked",this.V!=null);this.onClickCommand?g.A7(this.S,"innertubeCommand",
this.onClickCommand):this.S.getVideoData()?.j9()||this.S.Kl(!0,!1,"YOUTUBE_DRAWER_MANUAL_OPEN")}FS(){g.nR("iv-teaser-mouseover");this.V&&this.V.stop()}tq(Z){this.S.X().B("player_new_info_card_format")&&!g.PQ(this.S.X())?this.Mj.cA():this.S.X().B("enable_error_corrections_infocards_icon_web")&&this.Mj.Iv();this.V||!Z||this.S.hh()||this.D&&this.D.isActive()||(this.Iv(Z),g.nR("iv-teaser-shown"))}Iv(Z){this.onClickCommand=Z.onClickCommand;this.updateValue("text",Z.teaserText);this.element.setAttribute("dir",
g.rQ(Z.teaserText));this.fade.show();if(this.S.X().B("player_new_info_card_format")){const k=this.Lp("ytp-cards-teaser-info-icon"),N=this.Lp("ytp-cards-teaser-channel-avatar");N&&Z.hJ&&g.LA(Z.hJ)&&(N.src=Z.hJ,N.style.display="block",k.style.display="none")}this.D=new g.Uc(function(){g.jX(this.S.getRootNode(),"ytp-cards-teaser-shown");this.S.B("player_new_info_card_format")&&!g.PQ(this.S.X())&&this.Mj.cA();this.L()},0,this);
this.D.start();this.Mj.tJ(!1);this.V=new g.Uc(this.cA,580+Z.durationMs,this);this.V.start();this.Y.push(this.listen("mouseover",this.O,this));this.Y.push(this.listen("mouseout",this.N,this))}L(){if(!this.S.X().B("player_new_info_card_format")&&g.PQ(this.S.X())&&this.LF){const Z=this.Mj.element.offsetLeft,k=g.Mc("ytp-cards-button-icon"),N=this.S.isFullscreen()?54:36;if(k){const a=Z+k.offsetLeft;this.element.style.marginRight=this.Mj.element.offsetParent.offsetWidth-Z-k.offsetLeft-N+"px";this.element.style.marginLeft=
a+"px"}}}vD(){g.PQ(this.S.X())&&this.S.bV()&&this.LF&&this.zt.start()}O(){this.G.stop();this.V&&this.V.isActive()&&this.j.start()}N(){this.j.stop();this.V&&!this.V.isActive()&&this.G.start()}Rq(){this.V&&this.V.stop()}Sm(){this.cA()}dA(){this.cA()}cA(){!this.V||this.U&&this.U.isActive()||(g.nR("iv-teaser-hidden"),this.fade.hide(),g.Wp(this.S.getRootNode(),"ytp-cards-teaser-shown"),this.U=new g.Uc(function(){for(const Z of this.Y)this.Ce(Z);this.Y=[];this.V&&(this.V.dispose(),this.V=null);this.Mj.tJ(!0);
!this.S.pm()&&this.S.X().B("enable_error_corrections_infocards_icon_web")&&this.Mj.cA()},330,this),this.U.start())}Ga(){return this.LF&&this.fade.state!==4}YW(){const Z=this.S.getRootNode();
Z&&g.Wp(Z,"ytp-cards-teaser-shown");g.Il(this.D,this.U,this.V);super.YW()}};var HT={BUTTON:"ytp-button",TITLE_NOTIFICATIONS:"ytp-title-notifications",TITLE_NOTIFICATIONS_ON:"ytp-title-notifications-on",TITLE_NOTIFICATIONS_OFF:"ytp-title-notifications-off",NOTIFICATIONS_ENABLED:"ytp-notifications-enabled"},lni=class extends g.E{constructor(Z){super({J:"button",BD:[HT.BUTTON,HT.TITLE_NOTIFICATIONS],W:{"aria-pressed":"{{pressed}}","aria-label":"{{label}}"},A:[{J:"div",Z:HT.TITLE_NOTIFICATIONS_ON,W:{title:"Stop getting notified about every new video","aria-label":"Notify subscriptions"},
A:[g.zOr()]},{J:"div",Z:HT.TITLE_NOTIFICATIONS_OFF,W:{title:"Get notified about every new video","aria-label":"Notify subscriptions"},A:[{J:"svg",W:{fill:"#fff",height:"24px",viewBox:"0 0 24 24",width:"24px"},A:[{J:"path",W:{d:"M18 11c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2v-5zm-6 11c.14 0 .27-.01.4-.04.65-.14 1.18-.58 1.44-1.18.1-.24.15-.5.15-.78h-4c.01 1.1.9 2 2.01 2z"}}]}]}]});this.api=Z;this.V=!1;Z.createClientVe(this.element,
this,36927);this.listen("click",this.onClick,this);this.updateValue("pressed",!1);this.updateValue("label","Get notified about every new video")}onClick(){this.api.logClick(this.element);const Z=!this.V;this.updateValue("label",Z?"Stop getting notified about every new video":"Get notified about every new video");this.updateValue("pressed",Z);XDR(this,Z)}};g.X0("yt.pubsub.publish",g.nR);g.Lz=class extends g.E{constructor(Z,k,N,a,T,K,y,Q,q,r,C,m){Z=Z.charAt(0)+Z.substring(1).toLowerCase();N=N.charAt(0)+N.substring(1).toLowerCase();if(k==="0"||k==="-1")k=null;if(a==="0"||a==="-1")a=null;const A=C.X(),P=A.userDisplayName&&g.s$(A);super({J:"div",BD:["ytp-button","ytp-sb"],A:[{J:"div",Z:"ytp-sb-subscribe",W:P?{title:C.X().B("player_tooltip_data_title_killswitch")?g.DH("Subscribe as $USER_NAME",{USER_NAME:A.userDisplayName}):"","data-tooltip-title":g.DH("Subscribe as $USER_NAME",{USER_NAME:A.userDisplayName}),
"aria-label":"Subscribe to channel","data-tooltip-image":wr(A),"data-tooltip-opaque":String(g.PQ(A)),tabindex:"0",role:"button"}:{"aria-label":"Subscribe to channel"},A:[{J:"div",Z:"ytp-sb-text",A:[{J:"div",Z:"ytp-sb-icon"},Z]},k?{J:"div",Z:"ytp-sb-count",Da:k}:""]},{J:"div",Z:"ytp-sb-unsubscribe",W:P?{title:C.B("player_tooltip_data_title_killswitch")?g.DH("Subscribed as $USER_NAME",{USER_NAME:A.userDisplayName}):"","data-tooltip-title":g.DH("Subscribed as $USER_NAME",{USER_NAME:A.userDisplayName}),
"aria-label":"Unsubscribe to channel","data-tooltip-image":wr(A),"data-tooltip-opaque":String(g.PQ(A)),tabindex:"0",role:"button"}:{"aria-label":"Unsubscribe to channel"},A:[{J:"div",Z:"ytp-sb-text",A:[{J:"div",Z:"ytp-sb-icon"},N]},a?{J:"div",Z:"ytp-sb-count",Da:a}:""]}],W:{"aria-live":"polite"}});this.channelId=y;this.S=C;this.D=m;const d=this.Lp("ytp-sb-subscribe"),h=this.Lp("ytp-sb-unsubscribe");K&&g.jX(this.element,"ytp-sb-classic");if(T){Q?this.V():this.U();var B=()=>{if(A.xW){var O=this.channelId;
if(q||r){var x={c:O};var e;g.Zb.isInitialized()&&(e=Snf(x));x=e||"";if(e=C.getVideoData())if(e=e.subscribeCommand){var Ki=C.jU();Ki?($P(Ki,e,{botguardResponse:x,feature:q}),g.A7(C,"SUBSCRIBE",O)):g.b(Error("No innertube service available when updating subscriptions."))}else g.b(Error("No subscribe command in videoData."));else g.b(Error("No video data available when updating subscription."))}h.focus();h.removeAttribute("aria-hidden");d.setAttribute("aria-hidden","true")}else dN(g.V7(this.S.X()),"sb_button",
this.Y)},v=()=>{var O=this.channelId;
if(q||r){var x=C.getVideoData();$P(C.jU(),x.unsubscribeCommand,{feature:q});g.A7(C,"UNSUBSCRIBE",O)}d.focus();d.removeAttribute("aria-hidden");h.setAttribute("aria-hidden","true")};
this.K(d,"click",B);this.K(h,"click",v);this.K(d,"keypress",O=>{O.keyCode===13&&B(O)});
this.K(h,"keypress",O=>{O.keyCode===13&&v(O)});
this.K(C,"SUBSCRIBE",this.V);this.K(C,"UNSUBSCRIBE",this.U);this.D&&P&&(g50(C),la(C,d,this),la(C,h,this))}else g.jX(d,"ytp-sb-disabled"),g.jX(h,"ytp-sb-disabled")}Y(){window.location.reload()}V(){g.jX(this.element,"ytp-sb-subscribed")}U(){g.Wp(this.element,"ytp-sb-subscribed")}};var NIH=class extends g.E{constructor(Z){super({J:"div",Z:"ytp-title-channel",A:[{J:"div",Z:"ytp-title-beacon"},{J:"a",Z:"ytp-title-channel-logo",W:{href:"{{channelLink}}",target:Z.X().N,role:"link","aria-label":"{{channelLogoLabel}}",tabIndex:"0"}},{J:"div",Z:"ytp-title-expanded-overlay",W:{"aria-hidden":"{{flyoutUnfocusable}}"},A:[{J:"div",Z:"ytp-title-expanded-heading",A:[{J:"div",Z:"ytp-title-expanded-title",A:[{J:"a",Da:"{{expandedTitle}}",W:{href:"{{channelTitleLink}}",target:Z.X().N,"aria-hidden":"{{shouldHideExpandedTitleForA11y}}",
tabIndex:"{{channelTitleFocusable}}"}}]},{J:"div",Z:"ytp-title-expanded-subtitle",Da:"{{expandedSubtitle}}",W:{"aria-hidden":"{{shouldHideExpandedSubtitleForA11y}}"}}]}]}]});this.api=Z;this.channel=this.Lp("ytp-title-channel");this.U=this.Lp("ytp-title-channel-logo");this.channelName=this.Lp("ytp-title-expanded-title");this.C=this.Lp("ytp-title-expanded-overlay");this.D=this.V=this.subscribeButton=null;this.Y=!1;Z.createClientVe(this.U,this,36925);Z.createClientVe(this.channelName,this,37220);g.PQ(this.api.X())&&
h7b(this);this.K(Z,"videodatachange",this.aq);this.K(Z,"videoplayerreset",this.aq);this.K(this.channelName,"click",k=>{this.api.logClick(this.channelName);g.p5(window,Xy(this));k.preventDefault()});
this.K(this.U,"click",this.O);this.aq()}O(Z){this.api.logClick(this.U);const k=this.api.X();k.U||k.Rq?u2y(this)&&(this.isExpanded()?this.L():this.G()):g.p5(window,Xy(this));Z.preventDefault()}j(){t_0(this);this.channel.classList.remove("ytp-title-expanded")}isExpanded(){return this.channel.classList.contains("ytp-title-expanded")}G(){if(u2y(this)&&!this.isExpanded()){this.updateValue("flyoutUnfocusable","false");this.updateValue("channelTitleFocusable","0");this.updateValue("shouldHideExpandedTitleForA11y",
"false");this.updateValue("shouldHideExpandedSubtitleForA11y","false");this.D&&this.D.stop();this.api.logVisibility(this.channelName,!0);this.subscribeButton&&(this.subscribeButton.show(),this.api.logVisibility(this.subscribeButton.element,!0));const Z=this.api.getVideoData();this.V&&Z.mq&&Z.subscribed&&(this.V.show(),this.api.logVisibility(this.V.element,!0));this.channel.classList.add("ytp-title-expanded");this.channel.classList.add("ytp-title-show-expanded")}}L(){this.updateValue("flyoutUnfocusable",
"true");this.updateValue("channelTitleFocusable","-1");this.updateValue("shouldHideExpandedTitleForA11y","true");this.updateValue("shouldHideExpandedSubtitleForA11y","true");this.D&&this.D.start()}aq(){const Z=this.api.X();this.In(!this.api.isEmbedsShortsMode());const k=this.api.getVideoData(),N=this.api.X(),a=this.api.getVideoData();this.Y=!1;const T=!!a.videoId&&!!a.Rq&&!!a.profilePicture;this.api.getPresentingPlayerType()===2?this.Y=T&&!!a.isListed&&!!a.author:g.PQ(N)&&(this.Y=T&&!a.o4&&!N.D&&
!(N.j&&this.api.getPlayerSize().width<200));fnf(this,k.profilePicture,g.PQ(Z)?k.expandedTitle:k.author);this.subscribeButton&&(this.subscribeButton.channelId=k.WZ);this.updateValue("expandedTitle",k.expandedTitle);this.updateValue("expandedSubtitle",k.expandedSubtitle)}Df(Z){super.Df(Z);this.api.logVisibility(this.U,this.Y&&Z)}};var bw=class extends g.y9{constructor(Z){super(g.zn({"aria-haspopup":"true"}),Z);this.listen("keydown",this.Kn)}Kn(Z){Z.defaultPrevented||Z.keyCode!==39||(this.element.click(),Z.preventDefault())}};var aaT=class extends g.E{show(){super.show();this.element.tabIndex=0;this.element.focus();this.updateValue("userInfoFocusable","0");this.updateValue("userInfoFocusable2","0")}hide(){super.hide();this.updateValue("userInfoFocusable","-1");this.updateValue("userInfoFocusable2","-1")}constructor(Z,k){super({J:"div",Z:"ytp-user-info-panel",W:{"aria-label":"User info"},A:Z.X().xW?[{J:"div",Z:"ytp-user-info-panel-icon",Da:"{{icon}}"},{J:"div",Z:"ytp-user-info-panel-content",A:[{J:"div",Z:"ytp-user-info-panel-info",
W:{tabIndex:"{{userInfoFocusable}}",role:"text"},Da:"{{watchingAsUsername}}"},{J:"div",Z:"ytp-user-info-panel-info",W:{tabIndex:"{{userInfoFocusable2}}",role:"text"},Da:"{{watchingAsEmail}}"}]}]:[{J:"div",Z:"ytp-user-info-panel-icon",Da:"{{icon}}"},{J:"div",Z:"ytp-user-info-panel-content",A:[{J:"div",A:[{J:"text",W:{tabIndex:"{{userInfoFocusable}}"},Da:"Signed out"}]},{J:"div",Z:"ytp-user-info-panel-login",A:[{J:"a",W:{tabIndex:"{{userInfoFocusable2}}",role:"button"},Da:Z.X().xl?"":"Sign in on YouTube"}]}]}]});
this.rA=Z;this.sourceElement=k;Z.X().xW||Z.X().xl||this.K(this.Lp("ytp-user-info-panel-login"),"click",this.U);this.closeButton=new g.E({J:"button",BD:["ytp-collapse","ytp-button"],W:{title:"Close"},A:[g.Hm()]});this.closeButton.HD(this.element);g.u(this,this.closeButton);this.K(window,"blur",this.hide);this.K(document,"click",this.V);this.aq()}V(Z){const k=jr(Z),N=g.C1(this.closeButton.element,k),a=g.C1(this.element,k);Z=this.sourceElement&&g.C1(this.sourceElement,k)&&g.SM(Z);k&&(a||Z)&&!N||this.hide()}U(){dN(g.V7(this.rA.X()),
"user_info_panel",()=>{window.location.reload()})}aq(){const Z=this.rA.X(),k={USER_NAME:Z.userDisplayName,
USER_EMAIL:Z.GF};this.updateValue("icon",ROj());this.updateValue("watchingAsUsername",g.DH("Watching as $USER_NAME",k));Z.GF?this.updateValue("watchingAsEmail",g.DH("($USER_EMAIL)",k)):this.updateValue("watchingAsEmail","")}};var TI_=class extends g.$m{constructor(Z,k,N){super(Z);this.on=k;this.Zl=N;this.getVideoUrl=new bw(6);this.ya=new bw(5);this.AZ=new bw(4);this.Vn=new bw(3);this.xQ=new g.y9(g.zn({href:"{{href}}",target:this.S.X().N},void 0,!0),2,"Troubleshoot playback issue");this.showVideoInfo=new g.y9(g.zn(),1,"Stats for nerds");this.aR=new g.af({J:"div",BD:["ytp-copytext","ytp-no-contextmenu"],W:{draggable:"false",tabindex:"1"},Da:"{{text}}"});this.mW=new wY(this.S,this.aR);this.D0=this.Ij=null;g.PQ(this.S.X())&&
(this.closeButton=new g.E({J:"button",BD:["ytp-collapse","ytp-button"],W:{title:"Close"},A:[g.Hm()]}),g.u(this,this.closeButton),this.closeButton.HD(this.element),this.closeButton.listen("click",this.ZX,this));g.PQ(this.S.X())&&(this.XX=new g.y9(g.zn(),10,"Account"),g.u(this,this.XX),this.OH(this.XX,!0),this.XX.listen("click",this.Gb,this),Z.createClientVe(this.XX.element,this.XX,137682));this.S.X().FE&&(this.tD=new XO("Loop",9),g.u(this,this.tD),this.OH(this.tD,!0),this.tD.listen("click",this.kx,
this),Z.createClientVe(this.tD.element,this.tD,28661));this.S.B("web_player_miniplayer_in_context_menu")&&(this.Oj=new g.y9(g.zn(),8,"Miniplayer"),g.u(this,this.Oj),this.OH(this.Oj,!0),this.Oj.listen("click",this.zE,this),Z.createClientVe(this.Oj.element,this.Oj,62946));this.S.B("web_watch_pip_context_menu_button")&&this.S.X().showMiniplayerButton&&(this.fd=new g.y9(g.zn(),7,"Picture-in-picture"),g.u(this,this.fd),this.OH(this.fd,!0),this.fd.listen("click",this.xx,this),Z.createClientVe(this.fd.element,
this.fd,194442));g.u(this,this.getVideoUrl);this.OH(this.getVideoUrl,!0);this.getVideoUrl.listen("click",this.TH,this);Z.createClientVe(this.getVideoUrl.element,this.getVideoUrl,28659);g.u(this,this.ya);this.OH(this.ya,!0);this.ya.listen("click",this.ys,this);Z.createClientVe(this.ya.element,this.ya,28660);g.u(this,this.AZ);this.OH(this.AZ,!0);this.AZ.listen("click",this.hO,this);Z.createClientVe(this.AZ.element,this.AZ,28658);g.u(this,this.Vn);this.OH(this.Vn,!0);this.Vn.listen("click",this.Ny,this);
g.u(this,this.xQ);this.OH(this.xQ,!0);this.xQ.listen("click",this.gb,this);g.u(this,this.showVideoInfo);this.OH(this.showVideoInfo,!0);this.showVideoInfo.listen("click",this.v5,this);g.u(this,this.aR);this.aR.listen("click",this.W2,this);g.u(this,this.mW);BBi()&&(this.Ij=new g.E({J:"textarea",Z:"ytp-html5-clipboard",W:{readonly:"",tabindex:"-1"}}),g.u(this,this.Ij),this.Ij.HD(this.element));this.XX?.setIcon(ROj());this.tD?.setIcon(EO0());this.Oj?.setIcon(this.S.B("delhi_modern_web_player_icons")?
oOf():CZ());this.fd?.setIcon(CZ());this.Vn.setIcon({J:"svg",W:{height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{"clip-rule":"evenodd",d:"M20 10V8H17.19C16.74 7.22 16.12 6.54 15.37 6.04L17 4.41L15.59 3L13.42 5.17C13.39 5.16 13.37 5.16 13.34 5.16C13.18 5.12 13.02 5.1 12.85 5.07C12.79 5.06 12.74 5.05 12.68 5.04C12.46 5.02 12.23 5 12 5C11.51 5 11.03 5.07 10.58 5.18L10.6 5.17L8.41 3L7 4.41L8.62 6.04H8.63C7.88 6.54 7.26 7.22 6.81 8H4V10H6.09C6.03 10.33 6 10.66 6 11V12H4V14H6V15C6 15.34 6.04 15.67 6.09 16H4V18H6.81C7.85 19.79 9.78 21 12 21C14.22 21 16.15 19.79 17.19 18H20V16H17.91C17.96 15.67 18 15.34 18 15V14H20V12H18V11C18 10.66 17.96 10.33 17.91 10H20ZM16 15C16 17.21 14.21 19 12 19C9.79 19 8 17.21 8 15V11C8 8.79 9.79 7 12 7C14.21 7 16 8.79 16 11V15ZM10 14H14V16H10V14ZM10 10H14V12H10V10Z",
fill:"white","fill-rule":"evenodd"}}]});this.xQ.setIcon(yQ());this.showVideoInfo.setIcon(xCf());this.K(Z,"onLoopChange",this.onLoopChange);this.K(Z,"videodatachange",this.onVideoDataChange);this.K(Z,"fullscreentoggled",()=>{Fy(this)});
this.K(Z,"minimized",()=>{Fy(this);this.fd?.In(!this.S.isMinimized()&&this.S.X().showMiniplayerButton)});
DXb(this);O8U(this,this.S.getVideoData())}ZX(){this.on.cA()}W2(){Yn(this.aR.element)}Ny(){tV(this,this.S.getDebugText(!0))&&PT(this.Zl,kZ())}hO(){tV(this,this.S.getVideoEmbedCode())&&PT(this.Zl,gOy());this.S.logClick(this.AZ.element)}TH(){tV(this,this.S.getVideoUrl(!0,!0))&&PT(this.Zl,QQ());this.S.logClick(this.getVideoUrl.element)}ys(){tV(this,this.S.getVideoUrl(!1,!0))&&PT(this.Zl,QQ());this.S.logClick(this.ya.element)}onLoopChange(Z){this.tD?.V(Z)}kx(){this.S.setLoopVideo(this.tD.getValue());this.on.cA();
this.S.logClick(this.tD.element)}zE(){g.A7(this.S,"onCollapseMiniplayer");this.on.cA()}xx(){g.A7(this.S,"onCollapseMiniplayer",!0);this.on.cA()}gb(Z){this.S.reportPlaybackIssue();if(g.IC(Z,this.S,!t4(this.S.X()))){Z=this.S;const k=Z.app.getFeedbackProductData();g.dv(Z,"onFeedbackStartRequest",k);Z.isFullscreen()&&Z.toggleFullscreen()}this.on.cA()}v5(){g.H3(this.S,"isVideoInfoVisible",[])?g.H3(this.S,"hideVideoInfo",[]):g.H3(this.S,"showVideoInfo",[]);this.on.cA()}Gb(){this.XX&&(this.D0||(this.D0=
new aaT(this.S,this.XX.element),g.u(this,this.D0),g.$n(this.S,this.D0.element,4)),this.D0.show(),this.on.cA(),this.S.logClick(this.XX.element))}onVideoDataChange(Z,k){O8U(this,k)}Df(Z){super.Df(Z);this.S.logVisibility(this.AZ.element,Z);this.S.logVisibility(this.getVideoUrl.element,Z);this.S.logVisibility(this.ya.element,Z);this.tD&&this.S.logVisibility(this.tD.element,Z);this.XX&&this.S.logVisibility(this.XX.element,Z);this.Oj&&this.S.logVisibility(this.Oj.element,Z)}};var KiH=class extends g.xm{constructor(Z,k){super(Z);this.Zl=k;this.U=new g.tt(this);this.j=new g.Uc(this.MX,1E3,this);this.zt=this.cI=null;g.u(this,this.U);g.u(this,this.j);k=this.S.X();Z.createClientVe(this.element,this,28656);g.jX(this.element,"ytp-contextmenu");this.S.X().experiments.yz("delhi_modern_web_player")&&g.fQ(k)&&g.jX(this.element,"ytp-delhi-modern-contextmenu");i8N(this);this.hide()}onTouchStart(Z){const k=jr(Z);k&&(cK(k,"a")||cK(k,null,"ytp-no-contextmenu"))||this.LF||(this.zt=(Z=
Z.touches?.item(0))?new g.Of(Z.clientX,Z.clientY):new g.Of(0,0),this.j.start())}O(){this.j.stop()}MX(){this.open(this.zt)}N(){if(this.cI&&vYf(this.cI)){const Z=vYf(this.cI).element;Z.tabIndex=-1;Z.focus()}else this.element.tabIndex=-1,this.element.focus()}show(){this.cI||(this.cI=new TI_(this.S,this,this.Zl),g.u(this,this.cI),g.KY(this,this.cI));this.cI.onLoopChange(this.S.getLoopVideo());super.show();this.S.logVisibility(this.element,!0);this.cI.Df(!0)}hide(){i8N(this);super.hide();this.S.logVisibility(this.element,
!1);this.cI&&this.cI.Df(!1)}vD(Z){const k=jr(Z);this.LF||k&&(cK(k,"a")||cK(k,null,"ytp-no-contextmenu"))||(Z.preventDefault(),this.open(new g.Of(Z.pageX,Z.pageY)))}Iv(Z){if(Z){const k=Z.getBoundingClientRect();this.open(new g.Of(k.x,k.y))}super.Iv(Z)}open(Z){gYy(this);var k=this.S.getVideoData();g.D(this.element,"ytp-dni",k.o4);this.element.style.left="";this.element.style.top="";Z.x++;Z.y++;super.Iv();var N=oC(this).body;k=new uj(0,Infinity,Infinity,0);var a=Jg(N);for(var T=a.V.body,K=a.V.documentElement,
y=Ef(a.V);N=jyf(N);)if((!g.YK||N.clientHeight!=0||N!=T)&&N!=T&&N!=K&&SA(N,"overflow")!="visible"){const Q=g.zU(N),q=new g.Of(N.clientLeft,N.clientTop);Q.x+=q.x;Q.y+=q.y;k.top=Math.max(k.top,Q.y);k.right=Math.min(k.right,Q.x+N.clientWidth);k.bottom=Math.min(k.bottom,Q.y+N.clientHeight);k.left=Math.max(k.left,Q.x)}T=y.scrollLeft;y=y.scrollTop;k.left=Math.max(k.left,T);k.top=Math.max(k.top,y);a=je(a.V.defaultView||window);k.right=Math.min(k.right,T+a.width);k.bottom=Math.min(k.bottom,y+a.height);a=k.top>=
0&&k.left>=0&&k.bottom>k.top&&k.right>k.left?k:null;k=this.size;Z=Z.clone();k=k.clone();a&&(y=k,T=5,(T&65)==65&&(Z.x<a.left||Z.x>=a.right)&&(T&=-2),(T&132)==132&&(Z.y<a.top||Z.y>=a.bottom)&&(T&=-5),Z.x<a.left&&T&1&&(Z.x=a.left),T&16&&(K=Z.x,Z.x<a.left&&(Z.x=a.left),Z.x+y.width>a.right&&(y.width=Math.min(a.right-Z.x,K+y.width-a.left),y.width=Math.max(y.width,0))),Z.x+y.width>a.right&&T&1&&(Z.x=Math.max(a.right-y.width,a.left)),Z.y<a.top&&T&4&&(Z.y=a.top),T&32&&(K=Z.y,Z.y<a.top&&(Z.y=a.top),Z.y+y.height>
a.bottom&&(y.height=Math.min(a.bottom-Z.y,K+y.height-a.top),y.height=Math.max(y.height,0))),Z.y+y.height>a.bottom&&T&4&&(Z.y=Math.max(a.bottom-y.height,a.top)));a=new g.DJ(0,0,0,0);a.left=Z.x;a.top=Z.y;a.width=k.width;a.height=k.height;g.o4(this.element,new g.Of(a.left,a.top));this.U.U();this.U.K(oC(this),"contextmenu",this.Sm);this.U.K(this.S,"fullscreentoggled",this.onFullscreenToggled);this.U.K(this.S,"pageTransition",this.xW)}Sm(Z){if(!Z.defaultPrevented){const k=jr(Z);g.C1(this.element,k)||this.cA();
this.S.X().disableNativeContextMenu&&Z.preventDefault()}}onFullscreenToggled(){this.cA();gYy(this)}xW(){this.cA()}};var y3H=class extends g.E{constructor(Z,k){super({J:"button",BD:["ytp-button","ytp-copylink-button"],W:{title:Z.B("player_tooltip_data_title_killswitch")?"{{title-attr}}":"","data-tooltip-title":"{{tooltip-title}}","data-tooltip-opaque":String(g.PQ(Z.X()))},A:[{J:"div",Z:"ytp-copylink-icon",Da:"{{icon}}"},{J:"div",Z:"ytp-copylink-title",Da:"Copy link",W:{"aria-hidden":"true"}}]});this.api=Z;this.V=k;this.visible=!1;this.tooltip=this.V.sb();k=Z.X();this.tooltip.element.setAttribute("aria-live","polite");
g.D(this.element,"ytp-show-copylink-title",g.PQ(k));Z.createClientVe(this.element,this,86570);this.listen("click",this.onClick);this.K(Z,"videodatachange",this.aq);this.K(Z,"videoplayerreset",this.aq);this.K(Z,"appresize",this.aq);this.aq();this.addOnDisposeCallback(g.ua(this.tooltip,this.element))}async onClick(){var Z=this.api.X();const k=this.api.getVideoData(),N=this.api.getPlaylistId();Z=Z.getVideoUrl(k.videoId,N,void 0,!0);await wDR(this,Z)&&$Xj(this);this.api.logClick(this.element)}aq(){this.updateValue("icon",
{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},A:[{J:"path",Rv:!0,Z:"ytp-svg-fill",W:{d:"M21.9,8.3H11.3c-0.9,0-1.7,.8-1.7,1.7v12.3h1.7V10h10.6V8.3z M24.6,11.8h-9.7c-1,0-1.8,.8-1.8,1.8v12.3  c0,1,.8,1.8,1.8,1.8h9.7c1,0,1.8-0.8,1.8-1.8V13.5C26.3,12.6,25.5,11.8,24.6,11.8z M24.6,25.9h-9.7V13.5h9.7V25.9z"}}]});this.updateValue("title-attr","Copy link");this.updateValue("tooltip-title","Copy link");this.visible=xXy(this);g.D(this.element,"ytp-copylink-button-visible",this.visible);
this.In(this.visible);this.tooltip.qj();this.api.logVisibility(this.element,this.visible&&this.Vz)}Df(Z){super.Df(Z);this.api.logVisibility(this.element,this.visible&&Z)}YW(){super.YW();g.Wp(this.element,"ytp-copylink-button-visible")}};var Q2c=class extends g.E{constructor(Z){super({J:"div",Z:"ytp-doubletap-ui-legacy",A:[{J:"div",Z:"ytp-doubletap-fast-forward-ve"},{J:"div",Z:"ytp-doubletap-rewind-ve"},{J:"div",Z:"ytp-doubletap-static-circle",A:[{J:"div",Z:"ytp-doubletap-ripple"}]},{J:"div",Z:"ytp-doubletap-overlay-a11y"},{J:"div",Z:"ytp-doubletap-seek-info-container",A:[{J:"div",Z:"ytp-doubletap-arrows-container",A:[{J:"span",Z:"ytp-doubletap-base-arrow"},{J:"span",Z:"ytp-doubletap-base-arrow"},{J:"span",Z:"ytp-doubletap-base-arrow"}]},
{J:"div",Z:"ytp-doubletap-tooltip",A:[{J:"div",Z:"ytp-seek-icon-text-container",A:[{J:"div",Z:"ytp-seek-icon",Da:"{{seekIcon}}"},{J:"div",Z:"ytp-chapter-seek-text-legacy",Da:"{{seekText}}"}]},{J:"div",Z:"ytp-doubletap-tooltip-label",Da:"{{seekTime}}"}]}]}]});this.S=Z;this.Y=new g.Uc(this.show,10,this);this.U=new g.Uc(this.hide,700,this);this.G=this.D=0;this.N=this.L=!1;this.V=this.Lp("ytp-doubletap-static-circle");g.u(this,this.Y);g.u(this,this.U);this.hide();this.j=this.Lp("ytp-doubletap-fast-forward-ve");
this.C=this.Lp("ytp-doubletap-rewind-ve");this.S.createClientVe(this.j,this,28240);this.S.createClientVe(this.C,this,28239);this.S.logVisibility(this.j,!0);this.S.logVisibility(this.C,!0);this.L=Z.B("web_show_cumulative_seek_time");this.N=Z.B("web_center_static_circles")}show(){super.show();this.U.XN()}hide(){this.Y.stop();this.D=0;this.Lp("ytp-seek-icon").style.display="none";this.updateValue("seekIcon","");g.Wp(this.element,"ytp-chapter-seek");g.Wp(this.element,"ytp-time-seeking");super.hide()}j0(Z,
k,N,a){this.D=Z===this.G?this.D+a:a;this.G=Z;var T=Z===-1?this.C:this.j;T&&this.S.logClick(T);this.L?this.U.stop():this.U.fH();this.Y.start();this.element.setAttribute("data-side",Z===-1?"back":"forward");var K=3*this.S.fF().getPlayerSize().height;T=this.S.fF().getPlayerSize();T=T.width/3-3*T.height;this.V.style.width=`${K}px`;this.V.style.height=`${K}px`;Z===1?(this.V.style.left="",this.V.style.right=`${T}px`):Z===-1&&(this.V.style.right="",this.V.style.left=`${T}px`);const y=K*2.5;K=y/2;const Q=
this.Lp("ytp-doubletap-ripple");Q.style.width=`${y}px`;Q.style.height=`${y}px`;Z===1?(Z=this.S.fF().getPlayerSize().width-k+Math.abs(T),Q.style.left="",Q.style.right=`${Z-K}px`):Z===-1&&(Z=Math.abs(T)+k,Q.style.right="",Q.style.left=`${Z-K}px`);Q.style.top=`calc((33% + ${Math.round(N)}px) - ${K}px)`;if(N=this.Lp("ytp-doubletap-ripple"))N.classList.remove("ytp-doubletap-ripple"),N.classList.add("ytp-doubletap-ripple");GvN(this,this.L?this.D:a)}bc(Z,k,N=null){if(N){var a=Z===-1?this.C.visualElement:
this.j.visualElement;N={seekData:N};const T=g.C9();T&&RE(T,a,"INTERACTION_LOGGING_GESTURE_TYPE_KEY_PRESS",N)}this.D=Z===this.G?this.D+k:k;this.G=Z;a=this.S.fF().getPlayerSize();this.L?this.U.stop():this.U.fH();this.Y.start();this.element.setAttribute("data-side",Z===-1?"back":"forward");g.jX(this.element,"ytp-time-seeking");this.V.style.width="110px";this.V.style.height="110px";N=a.width*.1-15;Z===1?this.N?(this.V.style.right=`${N}px`,this.V.style.left=""):(this.V.style.right="",this.V.style.left=
`${a.width*.8-30}px`):Z===-1&&(this.N?(this.V.style.right="",this.V.style.left=`${N}px`):(this.V.style.right="",this.V.style.left=`${a.width*.1-15}px`));this.V.style.top=`${a.height*.5+15}px`;GvN(this,this.L?this.D:k)}UU(Z,k,N=null){this.U.fH();this.Y.start();switch(Z){case -1:Z="back";break;case 1:Z="forward";break;default:Z=""}this.element.setAttribute("data-side",Z);this.V.style.width="0";this.V.style.height="0";g.jX(this.element,"ytp-chapter-seek");this.updateValue("seekText",k);this.updateValue("seekTime",
"");k=this.Lp("ytp-seek-icon");if(N){a:if(N){switch(N){case "PREMIUM_STANDALONE":N=M4G();break a;case "PREMIUM_STANDALONE_CAIRO":N=nOU();break a}N=void 0}else N=null;this.updateValue("seekIcon",N);k.style.display="inline-block"}else k.style.display="none"}};var qDr=class extends gY{constructor(Z){super(Z,!1,!0);this.tq=[];this.jY=[];this.element.setAttribute("data-overlay-order","9");SYr(this,this.S.getVideoData());this.zt=!0;this.badge.element.classList.add("ytp-featured-product");this.Qz=new g.E({J:"div",Z:"ytp-featured-product-open-in-new"});g.u(this,this.Qz);this.countdownTimer=new g.E({J:"text",Z:"ytp-featured-product-countdown",Da:"{{content}}"});this.countdownTimer.hide();g.u(this,this.countdownTimer);this.Y=new g.E({J:"div",Z:"ytp-featured-product-trending",
A:[{J:"div",Z:"ytp-featured-product-trending-icon"},{J:"text",Z:"ytp-featured-product-trending-text",Da:"{{trendingOffer}}"}]});this.Y.hide();g.u(this,this.Y);this.overflowButton=new g.E({J:"button",BD:["ytp-featured-product-overflow-icon","ytp-button"],W:{"aria-haspopup":"true"}});this.overflowButton.hide();g.u(this,this.overflowButton);this.O=new g.E({J:"text",Z:"ytp-featured-product-exclusive-countdown",Da:"{{content}}",W:{id:"exclusiveCountdown","aria-hidden":"true"}});this.O.hide();g.u(this,
this.O);this.N=new g.E({J:"div",Z:"ytp-featured-product-exclusive-container",W:{"aria-labelledby":"exclusiveBadge exclusiveCountdown"},A:[{J:"div",Z:"ytp-featured-product-exclusive-badge-container",A:[{J:"div",Z:"ytp-featured-product-exclusive-badge",A:[{J:"text",Z:"ytp-featured-product-exclusive-badge-text",Da:"{{exclusive}}",W:{id:"exclusiveBadge","aria-hidden":"true"}}]}]},this.O]});this.N.hide();g.u(this,this.N);this.banner=new g.E({J:"a",Z:"ytp-featured-product-container",A:[{J:"div",Z:"ytp-featured-product-thumbnail",
A:[{J:"img",W:{src:"{{thumbnail}}"}},this.Qz]},{J:"div",Z:"ytp-featured-product-details",A:[{J:"text",Z:"ytp-featured-product-title",Da:"{{title}}"},this.S.B("web_player_enable_featured_product_banner_promotion_text_on_desktop")?{J:"div",Z:"ytp-featured-product-price-container",W:{"aria-label":"{{priceA11yText}}"},A:[{J:"text",Z:"ytp-featured-product-price-when-promotion-text-enabled",Da:"{{price}}",W:{"aria-hidden":"true"}},{J:"text",Z:"ytp-featured-product-promotion-text",Da:"{{promotionText}}",
W:{"aria-hidden":"true"}}]}:{J:"div",W:{"aria-label":"{{priceA11yText}}"},A:[{J:"text",Z:"ytp-featured-product-price",Da:"{{price}}",W:{"aria-hidden":"true"}},{J:"text",Z:"ytp-featured-product-sales-original-price",Da:"{{salesOriginalPrice}}",W:{"aria-hidden":"true"}},{J:"text",Z:"ytp-featured-product-price-drop-reference-price",Da:"{{priceDropReferencePrice}}",W:{"aria-hidden":"true"}}]},this.S.B("web_player_enable_featured_product_banner_promotion_text_on_desktop")?{J:"div",Z:"ytp-featured-product-when-promotion-text-enabled",
A:[{J:"text",Z:"ytp-featured-product-affiliate-disclaimer-when-promotion-text-enabled",Da:"{{affiliateDisclaimer}}"},this.Y,{J:"text",Z:"ytp-featured-product-vendor-when-promotion-text-enabled",Da:"{{vendor}}"}]}:{J:"div",A:[{J:"text",Z:"ytp-featured-product-affiliate-disclaimer",Da:"{{affiliateDisclaimer}}"},this.S.B("web_player_enable_featured_product_banner_exclusives_on_desktop")?this.N:null,this.Y,{J:"text",Z:"ytp-featured-product-vendor",Da:"{{vendor}}"},this.countdownTimer]}]},this.overflowButton]});
g.u(this,this.banner);this.banner.HD(this.L.element);this.K(this.S,g.te("featured_product"),this.gV);this.K(this.S,g.he("featured_product"),this.Rq);this.K(this.S,"videodatachange",this.onVideoDataChange);this.K(this.overflowButton.element,"click",this.gD);this.K(Z,"featuredproductdismissed",this.j)}gD(Z){this.Tt||(this.Tt=new HKc(this.S),g.u(this,this.Tt));this.ov?.menu?.menuRenderer&&(this.Tt.open(this.ov.menu.menuRenderer,Z.target),Z.preventDefault())}C(){return!!this.V}hq(){return!!this.V}Sm(Z){Z.target===
this.overflowButton.element?Z.preventDefault():(this.NW&&g.A7(this.S,"innertubeCommand",this.NW),this.G(!1))}j(){this.G(!0);if(this.V?.bannerData?.dismissedStatusKey){if(this.jY.includes(this.V.bannerData.dismissedStatusKey))return;this.jY.push(this.V.bannerData.dismissedStatusKey)}this.Rq();if(this.S.B("web_enable_shopping_timely_shelf_client")){const Z={};g.Bg(Z,XAU,{overlayId:"player_overlay_timely_shelf"});g.A7(this.S,"innertubeCommand",Z)}}FN(){this.Rq();hV(this)}gV(Z){if(Z.id!==this.V?.identifier){this.Rq();
for(const k of this.tq){const N=k?.bannerData?.itemData;if(!N||k.identifier!==Z.id)continue;if(this.jY.includes(k?.bannerData?.dismissedStatusKey||""))return;this.V=k;this.banner.element.setAttribute("aria-label",N.accessibilityLabel||"");N.trackingParams&&(this.D=!0,this.S.setTrackingParams(this.badge.element,N.trackingParams));this.show();this.xW.show();YV(this);this.Qz.In(!N.stayInApp);this.pF?.stop();this.countdownTimer.hide();ls(this);us(this);this.NW=g.J(N.onTapCommand,uA);const a=g.J(N.menuOnTap,
uA);a&&(this.ov=g.J(a,tjN));this.banner.update({thumbnail:(N.thumbnailSources||[])[0]?.url,title:N.productTitle,price:N.priceReplacementText?N.priceReplacementText:N.price,salesOriginalPrice:e7f(this),priceDropReferencePrice:oYU(this),promotionText:Jdf(this),priceA11yText:z7N(this),affiliateDisclaimer:N.affiliateDisclaimer,vendor:BT(this)});N?.hiddenProductOptions?.showDropCountdown&&N?.hiddenProductOptions?.dropTimestampMs&&(this.pF=new g.Uc(()=>{UXy(this)},1E3),this.Qz.hide(),this.countdownTimer.show(),
UXy(this));
this.S.B("web_player_enable_featured_product_banner_exclusives_on_desktop")&&b8f(this)&&(this.rD=new g.Uc(()=>{pDf(this)},1E3),pDf(this))}this.S.getRootNode()&&g.jX(this.S.getRootNode(),"ytp-featured-product-shown")}}Rq(){this.V&&(this.V=void 0,this.U(),this.S.getRootNode()&&g.Wp(this.S.getRootNode(),"ytp-featured-product-shown"))}onVideoDataChange(Z,k){SYr(this,k);
Z==="dataloaded"&&hV(this);Z=g.J(k.getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.productsInVideoOverlayRenderer,ZSf);this.overflowButton.show();this.dismissButton.hide();const N=Z?.featuredProductsEntityKey;this.trendingOfferEntityKey=Z?.trendingOfferEntityKey;this.tq.length||(M_r(this,N),us(this));this.mq?.();this.mq=g.tE.subscribe(()=>{M_r(this,N);us(this)})}YW(){hV(this);
this.pF?.stop();this.countdownTimer.hide();ls(this);super.YW()}};var r3B=class extends g.E{constructor(Z,k,N){super({J:"div",BD:["ytp-info-panel-action-item"],A:[{J:"div",Z:"ytp-info-panel-action-item-disclaimer",Da:"{{disclaimer}}"},{J:"a",BD:["ytp-info-panel-action-item-button","ytp-button"],W:{role:"button",href:"{{url}}",target:"_blank",rel:"noopener"},A:[{J:"div",Z:"ytp-info-panel-action-item-icon",Da:"{{icon}}"},{J:"div",Z:"ytp-info-panel-action-item-label",Da:"{{label}}"}]}]});this.S=Z;this.U=N;this.disclaimer=this.Lp("ytp-info-panel-action-item-disclaimer");
this.button=this.Lp("ytp-info-panel-action-item-button");this.cG=!1;this.S.createServerVe(this.element,this,!0);this.listen("click",this.onClick);Z="";var a=g.J(k?.onTap,uA);N=g.J(a,g.Fh);this.cG=!1;N?(Z=N.url||"",Z.startsWith("//")&&(Z="https:"+Z),this.cG=!0,g.o2(this.button,g.GI(Z))):(N=g.J(a,uAi))&&!this.U?((Z=N.phoneNumbers)&&Z.length>0?(Z="sms:"+Z[0],N.messageText&&(Z+="?&body="+encodeURI(N.messageText))):Z="",this.cG=!0,g.o2(this.button,g.GI(Z,[XJy]))):(N=g.J(a,hhf))&&!this.U&&(Z=N.phoneNumber?
"tel:"+N.phoneNumber:"",this.cG=!0,g.o2(this.button,g.GI(Z,[djX])));!Z&&(N=g.J(k?.onTap,uA),a=g.J(N,BW))&&(this.cG=!0,this.V=N,this.feedbackToken=a.feedbackToken);(N=k.disclaimerText?.content)?(this.button.style.borderBottom="1px solid white",this.button.style.paddingBottom="16px",this.update({label:k.bodyText?.content,icon:nYy(k.icon?.iconType),disclaimer:N})):(this.disclaimer.style.display="none",this.update({label:k.bodyText?.content,icon:nYy(k.icon?.iconType)}));this.S.setTrackingParams(this.element,
k.trackingParams||null);this.cG&&(this.D={externalLinkData:{url:Z}})}onClick(){this.S.logClick(this.element,this.D);if(this.V&&this.feedbackToken){const Z=this.S.jU();Z?.xn(this.V)&&($P(Z,this.V,{feedbackTokens:[this.feedbackToken]}),this.S.publish("infopaneldetaildismissed"))}}};var CEJ=class extends nz{constructor(Z,k){const N=IE();super(Z,{J:"div",Z:"ytp-info-panel-detail-skrim",A:[{J:"div",Z:"ytp-info-panel-detail",W:{role:"dialog",id:N},A:[{J:"div",Z:"ytp-info-panel-detail-header",A:[{J:"div",Z:"ytp-info-panel-detail-title",Da:"{{title}}"},{J:"button",BD:["ytp-info-panel-detail-close","ytp-button"],W:{"aria-label":"Close"},A:[g.Th()]}]},{J:"div",Z:"ytp-info-panel-detail-body",Da:"{{body}}"},{J:"div",Z:"ytp-info-panel-detail-items"}]}]},250);this.V=k;this.items=this.Lp("ytp-info-panel-detail-items");
this.U=new g.tt(this);this.itemData=[];this.D=N;this.K(this.Lp("ytp-info-panel-detail-close"),"click",this.cA);this.K(this.Lp("ytp-info-panel-detail-skrim"),"click",this.cA);this.K(this.Lp("ytp-info-panel-detail"),"click",a=>{a.stopPropagation()});
this.K(this.S,"infopaneldetaildismissed",()=>{this.cA()});
g.u(this,this.U);this.S.createServerVe(this.element,this,!0);this.K(Z,"videodatachange",this.onVideoDataChange);this.onVideoDataChange("newdata",Z.getVideoData());this.hide()}show(){super.show();this.S.publish("infopaneldetailvisibilitychange",!0);this.S.logVisibility(this.element,!0);for(const Z of this.itemData)Z.S.logVisibility(Z.element,!0)}hide(){super.hide();this.S.publish("infopaneldetailvisibilitychange",!1);this.S.logVisibility(this.element,!1);for(const Z of this.itemData)Z.S.logVisibility(Z.element,
!1)}getId(){return this.D}Va(){return this.itemData.length}onVideoDataChange(Z,k){if(k){this.update({title:k.hI?.title?.content||"",body:k.hI?.bodyText?.content||""});this.S.setTrackingParams(this.element,k.hI?.trackingParams||null);for(const N of this.itemData)N.dispose();this.itemData=[];if(k.hI?.ctaButtons)for(const N of k.hI.ctaButtons)if(Z=g.J(N,m5f))Z=new r3B(this.S,Z,this.V),Z.cG&&(this.itemData.push(Z),Z.HD(this.items))}}YW(){this.hide();super.YW()}};var mGB=class extends g.E{constructor(Z,k){super({J:"button",Z:"ytp-info-panel-preview",W:{"aria-live":"assertive","aria-atomic":"true","aria-owns":k.getId(),"aria-haspopup":"true","data-tooltip-opaque":String(g.PQ(Z.X()))},A:[{J:"div",Z:"ytp-info-panel-preview-text",Da:"{{text}}"},{J:"div",Z:"ytp-info-panel-preview-chevron",Da:"{{chevron}}"}]});this.S=Z;this.wV=this.V=this.videoId=null;this.isDismissed=this.D=this.showControls=this.U=!1;this.K(this.element,"click",()=>{Z.logClick(this.element);Z.t0();
J7(k)});
this.fade=new g.ML(this,250,!1,100);g.u(this,this.fade);this.S.createServerVe(this.element,this,!0);this.K(Z,"videodatachange",this.onVideoDataChange);this.K(Z,"presentingplayerstatechange",this.j);this.K(this.S,"paidcontentoverlayvisibilitychange",this.Y);this.K(this.S,"infopaneldetailvisibilitychange",this.Y);const N=Z.getVideoData()||{};(N.tq?.title?.content||N.tq?.bodyText?.content)&&DW(this,N);this.K(Z,"onShowControls",this.G);this.K(Z,"onHideControls",this.L);this.K(this.S,"infopaneldetaildismissed",
()=>{this.isDismissed=!0;this.hide()})}onVideoDataChange(Z,k){DW(this,k);
this.wV&&jRy(this,this.wV)}j(Z){const k=this.S.getVideoData();this.videoId!==k.videoId&&DW(this,k);jRy(this,Z.state);this.wV=Z.state}Y(Z){(this.D=Z)?this.hide():this.V&&!this.isDismissed&&this.show()}G(){this.U||this.Iv();this.showControls=!0}L(){this.U||this.cA();this.showControls=!1}Iv(){if(!this.isDismissed){var Z=this.S?.getPlayerSize(),k=Z.width<380;Z=Z.height<(this.S?.isEmbedsShortsMode()?400:280);(this.S?.getPlayerStateObject().isCued()||this.S?.getPlayerStateObject().V(1024))&&k&&Z||!this.V||
this.D||(this.fade.show(),this.S.publish("infopanelpreviewvisibilitychange",!0),this.S.logVisibility(this.element,!0))}}cA(){this.V&&!this.D&&(this.fade.hide(),this.S.publish("infopanelpreviewvisibilitychange",!1),this.S.logVisibility(this.element,!1))}C(){this.U=!1;this.showControls||this.cA()}};var s2h={"default":0,monoSerif:1,propSerif:2,monoSans:3,propSans:4,casual:5,cursive:6,smallCaps:7};Object.keys(s2h).reduce((Z,k)=>{Z[s2h[k]]=k;return Z},{});
var A3H={none:0,raised:1,depressed:2,uniform:3,dropShadow:4};Object.keys(A3H).reduce((Z,k)=>{Z[A3H[k]]=k;return Z},{});
var PEK={normal:0,bold:1,italic:2,bold_italic:3};Object.keys(PEK).reduce((Z,k)=>{Z[PEK[k]]=k;return Z},{});var pt,c3_;pt=[{option:"#fff",text:"White"},{option:"#ff0",text:"Yellow"},{option:"#0f0",text:"Green"},{option:"#0ff",text:"Cyan"},{option:"#00f",text:"Blue"},{option:"#f0f",text:"Magenta"},{option:"#f00",text:"Red"},{option:"#080808",text:"Black"}];c3_=[{option:0,text:OU(0)},{option:.25,text:OU(.25)},{option:.5,text:OU(.5)},{option:.75,text:OU(.75)},{option:1,text:OU(1)}];
g.wN=[{option:"fontFamily",text:"Font family",options:[{option:1,text:"Monospaced Serif"},{option:2,text:"Proportional Serif"},{option:3,text:"Monospaced Sans-Serif"},{option:4,text:"Proportional Sans-Serif"},{option:5,text:"Casual"},{option:6,text:"Cursive"},{option:7,text:"Small Capitals"}]},{option:"color",text:"Font color",options:pt},{option:"fontSizeIncrement",text:"Font size",options:[{option:-2,text:OU(.5)},{option:-1,text:OU(.75)},{option:0,text:OU(1)},{option:1,text:OU(1.5)},{option:2,text:OU(2)},
{option:3,text:OU(3)},{option:4,text:OU(4)}]},{option:"background",text:"Background color",options:pt},{option:"backgroundOpacity",text:"Background opacity",options:c3_},{option:"windowColor",text:"Window color",options:pt},{option:"windowOpacity",text:"Window opacity",options:c3_},{option:"charEdgeStyle",text:"Character edge style",options:[{option:0,text:"None"},{option:4,text:"Drop Shadow"},{option:1,text:"Raised"},{option:2,text:"Depressed"},{option:3,text:"Outline"}]},{option:"textOpacity",text:"Font opacity",
options:[{option:.25,text:OU(.25)},{option:.5,text:OU(.5)},{option:.75,text:OU(.75)},{option:1,text:OU(1)}]}];var H5T=[27,9,33,34,13,32,187,61,43,189,173,95,79,87,67,80,78,75,70,65,68,87,83,107,221,109,219],dGK=class extends g.tt{constructor(Z,k,N,a,T,K,y,Q){super();this.api=Z;this.N=k;this.contextMenu=N;this.XI=a;this.Zl=T;this.V=K;this.Vz=y;this.progressBar=Q;this.L=new g.Uc(()=>{k$f(this,!1)},1E3);
this.D="";this.Y={Pz:!1,nL:!1,IK:!1};g.u(this,this.L);this.K(k,"mousedown",()=>{is(this,!1)});
this.K(N.element,"mousedown",()=>{is(this,!1)});
this.K(k,"keydown",this.G);this.K(N.element,"keydown",this.G);this.K(k,"keyup",this.C);this.K(N.element,"keyup",this.C)}G(Z){Z.repeat||(this.Y.Pz=!1);let k=!1;const N=Z.keyCode;var a=jr(Z);let T=!Z.altKey&&!Z.ctrlKey&&!Z.metaKey&&(!this.api.isMutedByEmbedsMutedAutoplay()||H5T.includes(N));var K=!1;let y=!1;const Q=this.api.X();Z.defaultPrevented?(T=!1,y=!0):Q.qX&&!this.api.isMutedByEmbedsMutedAutoplay()&&(T=!1);if(N===9)k=!0;else{if(a)switch(N){case 32:case 13:if(a.tagName==="BUTTON"||a.tagName===
"A"||a.tagName==="INPUT")k=!0,T=!1;else if(T){var q=a.getAttribute("role");!q||q!=="option"&&q!=="button"&&q.indexOf("menuitem")!==0||(k=!0,a.click(),K=!0)}break;case 37:case 39:case 36:case 35:k=a.getAttribute("role")==="slider";break;case 38:case 40:q=a.getAttribute("role"),a=N===38?a.previousSibling:a.nextSibling,q==="slider"?k=!0:T&&(q==="option"?(a&&a.getAttribute("role")==="option"&&a.focus(),K=k=!0):q&&q.indexOf("menuitem")===0&&(a&&a.hasAttribute("role")&&a.getAttribute("role").indexOf("menuitem")===
0&&a.focus(),K=k=!0))}if(T&&!K)switch(N){case 38:K=Math.min(this.api.getVolume()+5,100);cT(this.Zl,K,!1);this.api.setVolume(K);y=K=!0;break;case 40:K=Math.max(this.api.getVolume()-5,0);cT(this.Zl,K,!0);this.api.setVolume(K);y=K=!0;break;case 36:this.api.uV()&&(this.api.startSeekCsiAction(),this.api.seekTo(0,void 0,void 0,void 0,79),y=K=!0);break;case 35:this.api.uV()&&(this.api.startSeekCsiAction(),this.api.seekTo(Infinity,void 0,void 0,void 0,80),y=K=!0)}}k&&is(this,!0);(k||y)&&this.XI.qm();(K||
T&&this.handleGlobalKeyDown(N,Z.shiftKey,Z.ctrlKey,Z.altKey,Z.metaKey,Z.key,Z.code,Z.repeat))&&Z.preventDefault();Q.C&&(Z={keyCode:Z.keyCode,altKey:Z.altKey,ctrlKey:Z.ctrlKey,metaKey:Z.metaKey,shiftKey:Z.shiftKey,handled:Z.defaultPrevented,fullscreen:this.api.isFullscreen()},g.Xd(this.api,"onKeyPress",Z))}C(Z){const k=Z.keyCode;!this.Y.nL&&this.handleGlobalKeyUp(k,Z.shiftKey,Z.ctrlKey,Z.altKey,Z.metaKey,Z.key,Z.code)&&Z.preventDefault()}handleGlobalKeyUp(Z,k,N,a,T,K,y){this.api.publish("keyboardserviceglobalkeyup",
{keyCode:Z,shiftKey:k,ctrlKey:N,altKey:a,metaKey:T,key:K,code:y});k=!1;if(this.Y.Pz)return k;(K=g.gv(this.api.GZ()))&&(K=K.Mf)&&K.LF&&(K.nM(Z),k=!0);switch(Z){case 9:is(this,!0);k=!0;break;case 32:this.api.B("web_speedmaster_spacebar_control")&&(this.api.X().qX||(k=this.KD(this.progressBar?.Jd()?.isEnabled)));break;case 39:(this.api.B("web_player_chapter_seeking_keyboard_shortcut_killswitch")||!(T||N&&a))&&(Ka?a:N)&&this.api.uV()&&this.api.B("web_enable_keyboard_shortcut_for_timely_actions")&&(this.api.startSeekCsiAction(),
Z=(Z=this.api.getVideoData())?Z.ov:[],N=WMy(Z,this.api.getCurrentTime()*1E3),N!==-1&&this.V!=null&&(this.V.UU(1,Z[N].title),this.api.seekTo(Z[N].startTime/1E3,void 0,void 0,void 0,52),k=!0))}return k}handleGlobalKeyDown(Z,k,N,a,T,K,y,Q){Q||(this.Y.Pz=!1);var q=!1,r=this.api.X();if(r.qX&&!this.api.isMutedByEmbedsMutedAutoplay())return q;var C=g.gv(this.api.GZ());if(C&&(C=C.Mf)&&C.LF)switch(Z){case 65:case 68:case 87:case 83:case 107:case 221:case 109:case 219:q=C.TO(Z)}r.G||q||(q=K||String.fromCharCode(Z).toLowerCase(),
this.D+=q,"awesome".indexOf(this.D)===0||this.api.B("web_player_rtr_ctrls")&&"bday".indexOf(this.D)===0?(q=!0,4===this.D.length&&this.D==="bday"&&this.api.B("web_player_rtr_ctrls")&&(YUf(this.N),this.XI.qm()),7===this.D.length&&this.D==="awesome"&&Zs(this.api.getRootNode(),"ytp-color-party")):(this.D=q,q="awesome".indexOf(this.D)===0||"bday".indexOf(this.D)===0));if(!q&&(!this.api.isMutedByEmbedsMutedAutoplay()||H5T.includes(Z))){C=this.api.getVideoData();var m=this.progressBar?.Jd()?.isEnabled;C=
C?C.ov:[];const A=Ka?a:N;switch(Z){case 80:k&&!r.Sm&&(PT(this.Zl,j8b(),"Previous"),this.api.previousVideo(),q=!0);break;case 78:k&&!r.Sm&&(PT(this.Zl,q4(),"Next"),this.api.nextVideo(),q=!0);break;case 74:this.api.uV()&&(this.api.startSeekCsiAction(),this.V?this.api.B("enable_key_press_seek_logging")?(q=gN(this,-10*this.api.getPlaybackRate(),"SEEK_SOURCE_SEEK_BACKWARD_10S"),this.V.bc(-1,10,q)):this.V.bc(-1,10):PT(this.Zl,{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},A:[{J:"path",
Rv:!0,Z:"ytp-svg-fill",W:{d:"M 18,11 V 7 l -5,5 5,5 v -4 c 3.3,0 6,2.7 6,6 0,3.3 -2.7,6 -6,6 -3.3,0 -6,-2.7 -6,-6 h -2 c 0,4.4 3.6,8 8,8 4.4,0 8,-3.6 8,-8 0,-4.4 -3.6,-8 -8,-8 z M 16.9,22 H 16 V 18.7 L 15,19 v -0.7 l 1.8,-0.6 h .1 V 22 z m 4.3,-1.8 c 0,.3 0,.6 -0.1,.8 l -0.3,.6 c 0,0 -0.3,.3 -0.5,.3 -0.2,0 -0.4,.1 -0.6,.1 -0.2,0 -0.4,0 -0.6,-0.1 -0.2,-0.1 -0.3,-0.2 -0.5,-0.3 -0.2,-0.1 -0.2,-0.3 -0.3,-0.6 -0.1,-0.3 -0.1,-0.5 -0.1,-0.8 v -0.7 c 0,-0.3 0,-0.6 .1,-0.8 l .3,-0.6 c 0,0 .3,-0.3 .5,-0.3 .2,0 .4,-0.1 .6,-0.1 .2,0 .4,0 .6,.1 .2,.1 .3,.2 .5,.3 .2,.1 .2,.3 .3,.6 .1,.3 .1,.5 .1,.8 v .7 z m -0.9,-0.8 v -0.5 c 0,0 -0.1,-0.2 -0.1,-0.3 0,-0.1 -0.1,-0.1 -0.2,-0.2 -0.1,-0.1 -0.2,-0.1 -0.3,-0.1 -0.1,0 -0.2,0 -0.3,.1 l -0.2,.2 c 0,0 -0.1,.2 -0.1,.3 v 2 c 0,0 .1,.2 .1,.3 0,.1 .1,.1 .2,.2 .1,.1 .2,.1 .3,.1 .1,0 .2,0 .3,-0.1 l .2,-0.2 c 0,0 .1,-0.2 .1,-0.3 v -1.5 z"}}]}),
this.api.seekBy(-10*this.api.getPlaybackRate(),void 0,void 0,73),q=!0);break;case 76:this.api.uV()&&(this.api.startSeekCsiAction(),this.V?this.api.B("enable_key_press_seek_logging")?(q=gN(this,10*this.api.getPlaybackRate(),"SEEK_SOURCE_SEEK_FORWARD_10S"),this.V.bc(1,10,q)):this.V.bc(1,10):PT(this.Zl,{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},A:[{J:"path",Rv:!0,Z:"ytp-svg-fill",W:{d:"m 10,19 c 0,4.4 3.6,8 8,8 4.4,0 8,-3.6 8,-8 h -2 c 0,3.3 -2.7,6 -6,6 -3.3,0 -6,-2.7 -6,-6 0,-3.3 2.7,-6 6,-6 v 4 l 5,-5 -5,-5 v 4 c -4.4,0 -8,3.6 -8,8 z m 6.8,3 H 16 V 18.7 L 15,19 v -0.7 l 1.8,-0.6 h .1 V 22 z m 4.3,-1.8 c 0,.3 0,.6 -0.1,.8 l -0.3,.6 c 0,0 -0.3,.3 -0.5,.3 C 20,21.9 19.8,22 19.6,22 19.4,22 19.2,22 19,21.9 18.8,21.8 18.7,21.7 18.5,21.6 18.3,21.5 18.3,21.3 18.2,21 18.1,20.7 18.1,20.5 18.1,20.2 v -0.7 c 0,-0.3 0,-0.6 .1,-0.8 l .3,-0.6 c 0,0 .3,-0.3 .5,-0.3 .2,0 .4,-0.1 .6,-0.1 .2,0 .4,0 .6,.1 .2,.1 .3,.2 .5,.3 .2,.1 .2,.3 .3,.6 .1,.3 .1,.5 .1,.8 v .7 z m -0.8,-0.8 v -0.5 c 0,0 -0.1,-0.2 -0.1,-0.3 0,-0.1 -0.1,-0.1 -0.2,-0.2 -0.1,-0.1 -0.2,-0.1 -0.3,-0.1 -0.1,0 -0.2,0 -0.3,.1 l -0.2,.2 c 0,0 -0.1,.2 -0.1,.3 v 2 c 0,0 .1,.2 .1,.3 0,.1 .1,.1 .2,.2 .1,.1 .2,.1 .3,.1 .1,0 .2,0 .3,-0.1 l .2,-0.2 c 0,0 .1,-0.2 .1,-0.3 v -1.5 z"}}]}),
this.api.seekBy(10*this.api.getPlaybackRate(),void 0,void 0,74),q=!0);break;case 37:if(this.api.uV())if(this.api.startSeekCsiAction(),A){if(this.api.B("web_player_chapter_seeking_keyboard_shortcut_killswitch")||!(T||N&&a))m=YYX(C,this.api.getCurrentTime()*1E3),m!==-1&&this.V!=null&&(this.V.UU(-1,C[m].title),this.api.seekTo(C[m].startTime/1E3,void 0,void 0,void 0,53),q=!0)}else this.V?this.api.B("enable_key_press_seek_logging")?(q=gN(this,-5*this.api.getPlaybackRate(),"SEEK_SOURCE_SEEK_BACKWARD_5S"),
this.V.bc(-1,5,q)):this.V.bc(-1,5):PT(this.Zl,{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},A:[{J:"path",Rv:!0,Z:"ytp-svg-fill",W:{d:"M 18,11 V 7 l -5,5 5,5 v -4 c 3.3,0 6,2.7 6,6 0,3.3 -2.7,6 -6,6 -3.3,0 -6,-2.7 -6,-6 h -2 c 0,4.4 3.6,8 8,8 4.4,0 8,-3.6 8,-8 0,-4.4 -3.6,-8 -8,-8 z m -1.3,8.9 .2,-2.2 h 2.4 v .7 h -1.7 l -0.1,.9 c 0,0 .1,0 .1,-0.1 0,-0.1 .1,0 .1,-0.1 0,-0.1 .1,0 .2,0 h .2 c .2,0 .4,0 .5,.1 .1,.1 .3,.2 .4,.3 .1,.1 .2,.3 .3,.5 .1,.2 .1,.4 .1,.6 0,.2 0,.4 -0.1,.5 -0.1,.1 -0.1,.3 -0.3,.5 -0.2,.2 -0.3,.2 -0.4,.3 C 18.5,22 18.2,22 18,22 17.8,22 17.6,22 17.5,21.9 17.4,21.8 17.2,21.8 17,21.7 16.8,21.6 16.8,21.5 16.7,21.3 16.6,21.1 16.6,21 16.6,20.8 h .8 c 0,.2 .1,.3 .2,.4 .1,.1 .2,.1 .4,.1 .1,0 .2,0 .3,-0.1 L 18.5,21 c 0,0 .1,-0.2 .1,-0.3 v -0.6 l -0.1,-0.2 -0.2,-0.2 c 0,0 -0.2,-0.1 -0.3,-0.1 h -0.2 c 0,0 -0.1,0 -0.2,.1 -0.1,.1 -0.1,0 -0.1,.1 0,.1 -0.1,.1 -0.1,.1 h -0.7 z"}}]}),
this.api.seekBy(-5*this.api.getPlaybackRate(),void 0,void 0,71),q=!0;break;case 39:this.api.uV()&&(this.api.startSeekCsiAction(),A?this.api.B("web_enable_keyboard_shortcut_for_timely_actions")||!this.api.B("web_player_chapter_seeking_keyboard_shortcut_killswitch")&&(T||N&&a)||(m=WMy(C,this.api.getCurrentTime()*1E3),m!==-1&&this.V!=null&&(this.V.UU(1,C[m].title),this.api.seekTo(C[m].startTime/1E3,void 0,void 0,void 0,52),q=!0)):(this.V!=null?this.api.B("enable_key_press_seek_logging")?(q=gN(this,5*
this.api.getPlaybackRate(),"SEEK_SOURCE_SEEK_FORWARD_5S"),this.V.bc(1,5,q)):this.V.bc(1,5):PT(this.Zl,{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},A:[{J:"path",Rv:!0,Z:"ytp-svg-fill",W:{d:"m 10,19 c 0,4.4 3.6,8 8,8 4.4,0 8,-3.6 8,-8 h -2 c 0,3.3 -2.7,6 -6,6 -3.3,0 -6,-2.7 -6,-6 0,-3.3 2.7,-6 6,-6 v 4 l 5,-5 -5,-5 v 4 c -4.4,0 -8,3.6 -8,8 z m 6.7,.9 .2,-2.2 h 2.4 v .7 h -1.7 l -0.1,.9 c 0,0 .1,0 .1,-0.1 0,-0.1 .1,0 .1,-0.1 0,-0.1 .1,0 .2,0 h .2 c .2,0 .4,0 .5,.1 .1,.1 .3,.2 .4,.3 .1,.1 .2,.3 .3,.5 .1,.2 .1,.4 .1,.6 0,.2 0,.4 -0.1,.5 -0.1,.1 -0.1,.3 -0.3,.5 -0.2,.2 -0.3,.2 -0.5,.3 C 18.3,22 18.1,22 17.9,22 17.7,22 17.5,22 17.4,21.9 17.3,21.8 17.1,21.8 16.9,21.7 16.7,21.6 16.7,21.5 16.6,21.3 16.5,21.1 16.5,21 16.5,20.8 h .8 c 0,.2 .1,.3 .2,.4 .1,.1 .2,.1 .4,.1 .1,0 .2,0 .3,-0.1 L 18.4,21 c 0,0 .1,-0.2 .1,-0.3 v -0.6 l -0.1,-0.2 -0.2,-0.2 c 0,0 -0.2,-0.1 -0.3,-0.1 h -0.2 c 0,0 -0.1,0 -0.2,.1 -0.1,.1 -0.1,0 -0.1,.1 0,.1 -0.1,.1 -0.1,.1 h -0.6 z"}}]}),
this.api.seekBy(5*this.api.getPlaybackRate(),void 0,void 0,72),q=!0));break;case 77:this.api.isMuted()?(this.api.unMute(),cT(this.Zl,this.api.getVolume(),!1)):(this.api.mute(),cT(this.Zl,0,!0));q=!0;break;case 32:q=this.api.B("web_speedmaster_spacebar_control")?!this.api.X().Sm:this.KD(m);break;case 75:q=this.KD(m);break;case 190:k?r.enableSpeedOptions&&ayy(this)&&(q=this.api.getPlaybackRate(),this.api.setPlaybackRate(q+.25,!0),H8X(this.Zl,!1),q=!0):this.api.uV()&&(this.step(1),q=!0);break;case 188:k?
r.enableSpeedOptions&&ayy(this)&&(q=this.api.getPlaybackRate(),this.api.setPlaybackRate(q-.25,!0),H8X(this.Zl,!0),q=!0):this.api.uV()&&(this.step(-1),q=!0);break;case 70:bff(this.api)&&(this.api.toggleFullscreen().catch(()=>{}),q=!0);
break;case 27:m?(this.progressBar.nE(),q=!0):this.Vz()&&(q=!0)}if(r.controlsType!=="3")switch(Z){case 67:g.pY(this.api.GZ())&&(r=this.api.getOption("captions","track"),this.api.toggleSubtitles(!0),dXU(this.Zl,!r||r&&!r.displayName),q=!0);break;case 79:$v(this,"textOpacity");break;case 87:$v(this,"windowOpacity");break;case 187:case 61:$v(this,"fontSizeIncrement",!1,!0);break;case 189:case 173:$v(this,"fontSizeIncrement",!0,!0)}let P;k||N||a||(Z>=48&&Z<=57?P=Z-48:Z>=96&&Z<=105&&(P=Z-96));P!=null&&
this.api.uV()&&!this.api.B("web_player_disable_keyboard_seek_percent")&&(this.api.startSeekCsiAction(),r=this.api.getProgressState(),this.api.seekTo(P/10*(r.seekableEnd-r.seekableStart)+r.seekableStart,void 0,void 0,void 0,81),q=!0);q&&this.XI.qm()}this.Y.IK=!1;this.api.publish("keyboardserviceglobalkeydown",{keyCode:Z,shiftKey:k,ctrlKey:N,altKey:a,metaKey:T,key:K,code:y,repeat:Q},this.Y);this.Y.IK&&(q=!0,this.XI.qm());return q}step(Z){this.api.uV();if(this.api.getPlayerStateObject().isPaused()){var k=
this.api.getVideoData().U;k&&(k=k.video)&&this.api.seekBy(Z/(k.fps||30),void 0,void 0,Z>0?77:78)}}KD(Z){if(!this.api.X().Sm){const k=this.api.getVideoData()?.getPlayerResponse()?.playabilityStatus;k&&g.J(k.miniplayer,Un0)?.playbackMode==="PLAYBACK_MODE_PAUSED_ONLY"&&g.A7(this.api,"onExpandMiniplayer");Z?this.progressBar.gD():(Z=!this.api.getPlayerStateObject().isOrWillBePlaying(),this.Zl.iD(Z),Z?this.api.playVideo():this.api.pauseVideo());return!0}return!1}YW(){this.L.fH();super.YW()}};var XCr=class extends g.E{constructor(Z,k){super({J:"button",BD:["ytp-button","ytp-overflow-button"],W:{title:Z.B("player_tooltip_data_title_killswitch")?"More":"","data-tooltip-title":"More","aria-haspopup":"true","aria-owns":k.element.id},A:[{J:"div",Z:"ytp-overflow-icon",A:[{J:"svg",W:{height:"100%",viewBox:"-5 -5 36 36",width:"100%"},A:[{J:"path",W:{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z",
fill:"#fff"}}]}]}]});this.S=Z;this.Ln=k;this.visible=!1;Z.createClientVe(this.element,this,16499);this.K(Z,"videoplayerreset",this.aq);this.K(Z,"appresize",this.aq);this.K(Z,"fullscreentoggled",this.aq);this.K(Z,"presentingplayerstatechange",this.aq);this.aq();la(Z,this.element,this);this.listen("click",()=>{Z.logClick(this.element);J7(k,this.element,!1)});
this.K(k.closeButton,"click",()=>{this.focus()})}aq(){var Z=this.S.X();
const k=Z.D||this.S.B("web_player_hide_overflow_button_if_empty_menu")&&this.Ln.isEmpty();Z=g.PQ(Z)&&g.v3(this.S)&&this.S.getPlayerStateObject().V(128);const N=this.S.getPlayerSize();this.visible=this.S.bV()&&!Z&&N.width>=240&&!this.S.getVideoData().o4&&!k&&!this.S.isEmbedsShortsMode();g.D(this.element,"ytp-overflow-button-visible",this.visible);this.In(this.visible);this.visible&&this.S.qj();this.S.logVisibility(this.element,this.visible&&this.Vz)}Df(Z){super.Df(Z);this.S.logVisibility(this.element,
this.visible&&Z)}YW(){super.YW();g.Wp(this.element,"ytp-overflow-button-visible")}};var Lii=class extends nz{constructor(Z){super(Z,{J:"div",Z:"ytp-overflow-panel",W:{id:IE(),role:"dialog"},A:[{J:"div",Z:"ytp-overflow-panel-content",A:[{J:"div",Z:"ytp-overflow-panel-action-buttons",Da:"{{buttons}}"}]},{J:"button",BD:["ytp-overflow-panel-close","ytp-button"],W:{"data-tooltip-title":"Close",title:Z.X().B("player_tooltip_data_title_killswitch")?"Close":""},A:[g.Th()]}]},250);this.actionButtons=[];this.V=this.Lp("ytp-overflow-panel-content");this.closeButton=this.Lp("ytp-overflow-panel-close");
this.K(this.closeButton,"click",this.cA);la(Z,this.closeButton,this);this.listen("click",this.U);this.K(Z,"videoplayerreset",this.hide);this.K(Z,"fullscreentoggled",this.onFullscreenToggled);this.hide()}U(Z){Z=jr(Z);g.C1(this.element,Z)&&(g.C1(this.V,Z)||g.C1(this.closeButton,Z)||J7(this))}cA(){super.cA();this.S.qd(this.element)}show(){this.LF&&this.S.publish("OVERFLOW_PANEL_OPENED");super.show();this.element.setAttribute("aria-modal","true");for(const Z of this.actionButtons)Z.Df(!0)}hide(){super.hide();
this.element.removeAttribute("aria-modal");for(const Z of this.actionButtons)Z.Df(!1)}onFullscreenToggled(Z){!Z&&this.Ga()&&J7(this)}isEmpty(){return this.actionButtons.length===0}focus(){for(const Z of this.actionButtons)if(Z.LF){Z.focus();break}}};var VZc=class extends g.E{constructor(Z,k,N){const a=g.Gx(k,N),T=a.v9("default.jpg");super({J:"a",BD:["ytp-video-menu-item","ytp-button"],W:{role:"menuitemradio","aria-label":a.title,href:Z.X().getVideoUrl(a.videoId,k.listId?k.listId.toString():null)},A:[{J:"div",Z:"ytp-video-menu-item-index",Da:String(N+1)},{J:"div",Z:"ytp-video-menu-item-now-playing",Da:"\u25b6"},{J:"div",Z:"ytp-video-menu-item-thumbnail",W:{style:T?`background-image: url(${T});`:void 0}},{J:"div",Z:"ytp-video-menu-item-title",
Da:a.title},{J:"div",Z:"ytp-video-menu-item-author",Da:a.author}]});this.api=Z;this.index=N;this.listen("click",this.onClick)}onClick(Z){g.IC(Z,this.api)&&this.api.playVideoAt(this.index)}};var FiH=class extends nz{constructor(Z){super(Z,{J:"div",Z:"ytp-playlist-menu",W:{role:"dialog",id:IE()},A:[{J:"div",Z:"ytp-playlist-menu-header",A:[{J:"div",Z:"ytp-playlist-menu-title",A:[Z.X().D?{J:"span",Z:"ytp-playlist-menu-title-name",Da:"{{title}}"}:{J:"a",Z:"ytp-playlist-menu-title-name",W:{href:"{{playlisturl}}"},Da:"{{title}}"},{J:"button",BD:["ytp-playlist-menu-close","ytp-button"],W:{"aria-label":"Close"},A:[g.Th()]}]},{J:"div",Z:"ytp-playlist-menu-subtitle",Da:"{{subtitle}}"}]},{J:"div",
Z:"ytp-playlist-menu-items",W:{role:"menu"}}]},250);this.api=Z;this.D=this.selected=this.j=this.playlist=null;this.items=this.Lp("ytp-playlist-menu-items");this.V=new g.tt(this);this.playlistData=[];this.K(this.Lp("ytp-playlist-menu-close"),"click",this.cA);const k=this.Lp("ytp-playlist-menu-title-name");Z.X().D||(this.D=this.K(k,"click",this.O));g.u(this,this.V);this.hide()}show(){super.show();this.V.K(this.api,"videodatachange",this.Y);this.V.K(this.api,"onPlaylistUpdate",this.Y);this.Y()}hide(){super.hide();
this.V.U();this.updatePlaylist(null)}Y(){this.updatePlaylist(this.api.getPlaylist());this.api.X().D&&(this.Lp("ytp-playlist-menu-title-name").removeAttribute("href"),this.D&&(this.Ce(this.D),this.D=null))}U(){const Z=this.playlist;var k=Z.author,N=k?"by $AUTHOR \u2022 $CURRENT_POSITION/$PLAYLIST_LENGTH":"$CURRENT_POSITION/$PLAYLIST_LENGTH",a={CURRENT_POSITION:String(Z.index+1),PLAYLIST_LENGTH:String(Z.length)};k&&(a.AUTHOR=k);this.update({title:Z.title,subtitle:g.DH(N,a),playlisturl:this.api.getVideoUrl(!0)});
k=Z.U;if(k===this.j)this.selected.element.setAttribute("aria-checked","false"),this.selected=this.playlistData[Z.index];else{for(var T of this.playlistData)T.dispose();T=Z.length;this.playlistData=[];for(N=0;N<T;N++)a=new VZc(this.api,Z,N),this.playlistData.push(a),a.HD(this.items);this.selected=this.playlistData[Z.index];this.j=k}this.selected&&this.selected.element.setAttribute("aria-checked","true")}O(Z){const k=this.api.getVideoUrl(!0);g.jY(k,this.api,Z)}updatePlaylist(Z){this.playlist!==Z?(this.playlist&&
this.playlist.unsubscribe("shuffle",this.U,this),this.playlist=Z,this.j=null,Z?(Z.subscribe("shuffle",this.U,this),this.U()):this.LF&&this.hide()):this.playlist&&this.U()}focus(){this.selected.focus()}YW(){this.hide();super.YW()}};var tZJ=class extends g.E{constructor(Z,k){super({J:"button",BD:["ytp-playlist-menu-button","ytp-button"],W:{title:Z.B("player_tooltip_data_title_killswitch")?"{{title}}":"","data-tooltip-title":"{{tooltip-title}}","aria-owns":String(k.element.id),"aria-haspopup":"true","aria-label":"Playlist",["data-overlay-order"]:"3"},A:[{J:"div",Z:"ytp-playlist-menu-button-icon",A:[{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},A:[{J:"path",Rv:!0,W:{d:"m 22.53,21.42 0,6.85 5.66,-3.42 -5.66,-3.42 0,0 z m -11.33,0 9.06,0 0,2.28 -9.06,0 0,-2.28 0,0 z m 0,-9.14 13.6,0 0,2.28 -13.6,0 0,-2.28 0,0 z m 0,4.57 13.6,0 0,2.28 -13.6,0 0,-2.28 0,0 z",
fill:"#fff"}}]}]},{J:"div",Z:"ytp-playlist-menu-button-title",Da:"{{playlistTitle}}"},{J:"div",Z:"ytp-playlist-menu-button-text",Da:"{{text}}"}]});this.api=Z;this.playlist=null;this.visible=!1;Z.createClientVe(this.element,this,70344);this.K(Z,"videodatachange",this.V);this.K(Z,"videoplayerreset",this.V);this.K(Z,"onPlaylistUpdate",this.V);this.K(Z,"presentingplayerstatechange",this.aq);this.K(Z,"appresize",this.aq);this.hide();this.V();la(Z,this.element,this);this.listen("click",()=>{Z.logClick(this.element);
Z.B("delhi_web_player_use_external_playlist_panel")?g.A7(Z,"onToggleExternalPlaylistPanel"):J7(k,this.element,!1)})}hide(){super.hide();
this.Df(!1);this.api.qj()}aq(){const Z=g.PQ(this.api.X());g.D(this.element,"ytp-playlist-menu-button-tiny",this.api.fF().getPlayerSize().width<400&&!Z);this.api.isEmbedsShortsMode()?this.hide():this.playlist&&this.api.getPresentingPlayerType()!==2?(this.update({text:g.DH("$CURRENT_POSITION/$PLAYLIST_LENGTH",{CURRENT_POSITION:String(this.playlist.index+1),PLAYLIST_LENGTH:String(this.playlist.length)}),title:g.DH("Playlist: $PLAYLIST_NAME",{PLAYLIST_NAME:this.playlist.title}),"tooltip-title":g.DH("Playlist: $PLAYLIST_NAME",
{PLAYLIST_NAME:this.playlist.title})}),this.api.B("delhi_modern_web_player")&&this.update({playlistTitle:g.DH("Playlist: $PLAYLIST_NAME",{PLAYLIST_NAME:this.playlist.title})}),this.LF||(this.show(),this.api.qj()),this.visible=!0,this.Df(!0)):this.LF&&this.hide()}Df(Z){super.Df(Z);this.api.logVisibility(this.element,this.visible&&Z)}V(){this.playlist&&this.playlist.unsubscribe("shuffle",this.aq,this);(this.playlist=this.api.getPlaylist())&&this.playlist.subscribe("shuffle",this.aq,this);this.aq()}};var HYf=class extends g.E{constructor(Z,k){super({J:"div",Z:"ytp-promotooltip-wrapper",A:[{J:"div",Z:"ytp-promotooltip-container",A:[{J:"div",Z:"ytp-promotooltip-content",A:[{J:"div",Z:"ytp-promotooltip-title",Da:"{{title}}"},{J:"div",Z:"ytp-promotooltip-details",Da:"{{details}}"}]},{J:"div",Z:"ytp-promotooltip-buttons",A:[{J:"div",Z:"ytp-promotooltip-dismiss-button",Da:"{{dismissButtonText}}",W:{tabindex:"0"}},{J:"div",Z:"ytp-promotooltip-accept-button",Da:"{{acceptButtonText}}",W:{tabindex:"0",
"aria-haspopup":"true"}}]}]},{J:"div",Z:"ytp-promotooltip-pointer"}]});this.tooltipRenderer=Z;this.S=k;this.V=this.sourceElement=null;this.title=this.Lp("ytp-promotooltip-title");this.details=this.Lp("ytp-promotooltip-details");this.acceptButton=this.Lp("ytp-promotooltip-accept-button");this.dismissButton=this.Lp("ytp-promotooltip-dismiss-button");this.U=this.Y=!1;this.D=!0;this.N=this.G=this.C=this.j=!1;this.nF={HJ:N=>{this.HJ(N)}};
this.In(!1);Z=this.tooltipRenderer.trackingParams||null;if(this.U=!!Z)this.S.createServerVe(this.element,this,!0),this.S.setTrackingParams(this.element,Z);this.K(k,"onShowControls",this.zt);this.K(k,"onHideControls",this.O);this.K(k,"resize",this.qx);this.K(this.acceptButton,"click",this.dA);this.K(this.dismissButton,"click",this.FS);this.K(document,"click",this.xW)}L(Z,k){if(!this.Y){if(Z){this.tooltipRenderer=Z;Z=this.tooltipRenderer.text;var N=!1;Z?.runs?.length&&Z.runs[0].text&&(this.update({title:Z.runs[0].text.toString()}),
N=!0);g.jA(this.title,N);N=this.tooltipRenderer.detailsText;Z=!1;if(N?.runs?.length&&N.runs[0].text){{var a=N.runs[0].text.toString();const q=a.indexOf("$TARGET_ICON");if(q>-1)if(this.tooltipRenderer.targetId){N=[];a=a.split("$TARGET_ICON");var T=new g.JO({J:"span",Z:"ytp-promotooltip-details-icon",A:[hsh[this.tooltipRenderer.targetId]]});g.u(this,T);var K=[];for(y of a){const r=new g.JO({J:"span",Z:"ytp-promotooltip-details-component",Da:y});g.u(this,r);K.push(r)}a.length===2?(N.push(K[0].element),
N.push(T.element),N.push(K[1].element)):a.length===1&&(q===0?(N.push(T.element),N.push(K[0].element)):(N.push(K[0].element),N.push(T.element)));var y=N.length?N:null}else y=null;else y=a}if(y){if(typeof y!=="string"){g.Qp(this.details);for(var Q of y)this.details.appendChild(Q)}else this.update({details:y});Z=!0}}g.jA(this.details,Z);Q=this.tooltipRenderer.acceptButton;y=!1;g.J(Q,Eq)?.text?.runs?.length&&g.J(Q,Eq).text.runs[0].text&&(this.update({acceptButtonText:g.J(Q,Eq).text.runs[0].text.toString()}),
y=!0);g.jA(this.acceptButton,y);Q=this.tooltipRenderer.dismissButton;y=!1;g.J(Q,Eq)?.text?.runs?.length&&g.J(Q,Eq).text.runs[0].text&&(this.update({dismissButtonText:g.J(Q,Eq).text.runs[0].text.toString()}),y=!0);g.jA(this.dismissButton,y)}k&&(this.sourceElement=k);this.V=K2N(this);this.G=!1;this.S.X().B("web_player_hide_nitrate_promo_tooltip")||this.In(!0);G1(this);this.LF&&!this.N&&(this.N=!0,this.nF.HJ(0));this.U&&this.S.logVisibility(this.element,this.LF)}}zt(){this.D?this.L():G1(this)}O(){this.D?
(ST(this),this.G=!0):G1(this)}dA(){this.Y=!0;this.HJ(1);this.S.publish("promotooltipacceptbuttonclicked",this.acceptButton);ST(this);this.U&&this.S.logClick(this.acceptButton)}FS(){this.Y=!0;this.HJ(2);ST(this);this.U&&this.S.logClick(this.dismissButton)}xW(Z){if(this.S.getPresentingPlayerType()===1||this.S.getPresentingPlayerType()===2&&this.j){var k=!0,N=g.Mc("ytp-ad-overlay-ad-info-dialog-container"),a=g.Mc("ytp-ad-player-overlay-layout"),T=jr(Z);if(this.sourceElement&&T&&g.C1(this.sourceElement,
T))this.sourceElement=null;else{this.S.getPresentingPlayerType()===1&&T&&Array.from(T.classList).forEach(y=>{if(y.startsWith("ytp-ad")||y.startsWith("ytp-skip-ad"))k=!1});
var K=yqj(this.tooltipRenderer);this.tooltipRenderer.dismissStrategy?.type==="TOOLTIP_DISMISS_TYPE_TAP_ANYWHERE"?K&&(k=k&&!g.C1(this.element,T)):this.tooltipRenderer.dismissStrategy?.type==="TOOLTIP_DISMISS_TYPE_TAP_INTERNAL"&&(k=K?!1:k&&g.C1(this.element,T));this.V&&this.LF&&!N&&!a&&(!T||k&&g.SM(Z))&&(this.Y=!0,ST(this))}}}HJ(Z){var k=this.tooltipRenderer.promoConfig;if(k){let N;switch(Z){case 0:k.impressionEndpoints?.length&&(N=k.impressionEndpoints[0]);break;case 1:N=k.acceptCommand;break;case 2:N=
k.dismissCommand}Z=g.J(N,BW)?.feedbackToken;N&&Z&&(Z={feedbackTokens:[Z]},k=this.S.jU(),k?.xn(N)&&$P(k,N,Z))}}qx(){this.G||(this.V||(this.V=K2N(this)),this.L())}},hsh={"ytp-settings-button":g.cm()};var u7K=class extends g.E{constructor(Z){super({J:"button",BD:["ytp-replay-button","ytp-button"],W:{title:Z.B("player_tooltip_data_title_killswitch")?"Replay":"","data-tooltip-title":"Replay"},A:[g.Pm()]});this.S=Z;this.K(Z,"presentingplayerstatechange",this.onStateChange);this.listen("click",this.onClick,this);this.Qn(Z.getPlayerStateObject());la(this.S,this.element,this)}onStateChange(Z){this.Qn(Z.state)}Qn(Z){this.In(Z.V(2))}onClick(){this.S.getPlayerStateObject().isOrWillBePlaying();this.S.playVideo()}};var lar=class extends g.E{constructor(Z){super({J:"button",BD:["ytp-button","ytp-search-button"],W:{title:Z.B("player_tooltip_data_title_killswitch")?"Search":"","data-tooltip-title":"Search","data-tooltip-opaque":String(g.PQ(Z.X()))},A:[{J:"div",Z:"ytp-search-icon",Da:"{{icon}}"},{J:"div",Z:"ytp-search-title",Da:"Search"}]});this.api=Z;this.visible=!1;this.updateValue("icon",{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 24 24",width:"100%"},A:[{J:"path",Z:"ytp-svg-fill",W:{d:"M21.24,19.83l-5.64-5.64C16.48,13.02,17,11.57,17,10c0-3.87-3.13-7-7-7s-7,3.13-7,7c0,3.87,3.13,7,7,7 c1.57,0,3.02-0.52,4.19-1.4l5.64,5.64L21.24,19.83z M5,10c0-2.76,2.24-5,5-5s5,2.24,5,5c0,2.76-2.24,5-5,5S5,12.76,5,10z"}}]});
Z.createClientVe(this.element,this,184945);this.listen("click",this.onClick);this.V();this.K(Z,"appresize",this.V);this.K(Z,"videodatachange",this.V);la(Z,this.element,this)}onClick(Z){this.api.logClick(this.element);var k=g.mW(this.api.X().Bo,{focusSearch:"true"}),N={};g.H3(this.api,"addEmbedsConversionTrackingParams",[N]);k=g.mW(k,N);(N=this.api.getVideoData().XY?.params)&&(k=g.mW(k,{bp:N}));g.p5(window,k);Z.preventDefault()}V(){if(this.api.B("embeds_web_enable_search_button")){var Z=this.api.X();
var k=this.api.getVideoData(),N=this.api.fF().getPlayerSize().width;Z=g.PQ(Z)&&N>=240&&!Z.D&&!k.isAd()&&!this.api.isEmbedsShortsMode()}else Z=!1;this.visible=Z;this.In(this.visible);g.D(this.element,"ytp-search-button-visible",this.visible);g.D(this.element,"ytp-show-search-title",!this.api.bV());this.api.logVisibility(this.element,this.visible&&this.Vz)}Df(Z){super.Df(Z);this.api.logVisibility(this.element,this.visible&&Z)}};var fac=class extends g.E{constructor(Z){super({J:"div",Z:"ytp-seek-overlay",A:[{J:"div",BD:["ytp-seek-overlay-animation","ytp-seek-overlay-animation-back"],A:[{J:"div",BD:["ytp-seek-overlay-arrow","ytp-seek-overlay-arrow-persistent"],A:[{J:"svg",W:{viewBox:"0 0 22 32",width:"22",height:"24"},A:[{J:"path",W:{d:"M 18 4 L 6 16 L 18 28",stroke:"white","stroke-width":"4","stroke-linecap":"round",fill:"none"}}]}]},{J:"div",Z:"ytp-seek-overlay-duration",Da:"{{durationBack}}"}]},{J:"div",BD:["ytp-seek-overlay-animation",
"ytp-seek-overlay-animation-forward"],A:[{J:"div",Z:"ytp-seek-overlay-duration",Da:"{{durationForward}}"},{J:"div",BD:["ytp-seek-overlay-arrow","ytp-seek-overlay-arrow-persistent"],A:[{J:"svg",W:{viewBox:"0 0 22 32",width:"22",height:"24"},A:[{J:"path",W:{d:"M 4 4 L 16 16 L 4 28",stroke:"white","stroke-width":"4","stroke-linecap":"round",fill:"none"}}]}]}]},{J:"div",Z:"ytp-seek-overlay-message",A:[{J:"div",Z:"ytp-seek-overlay-message-icon",Da:"{{icon}}"},{J:"div",Z:"ytp-seek-overlay-message-text",
Da:"{{text}}"}]}]});this.S=Z;this.L=0;this.V="hidden";this.j=this.Lp("ytp-seek-overlay-animation-back");this.C=this.Lp("ytp-seek-overlay-animation-forward");this.N=this.Lp("ytp-seek-overlay-message");this.G=new g.Uc(()=>{qFR(this)},g.Q5(this.S.X().experiments,"web_player_seek_overlay_linger_duration")||1E3);
g.u(this,this.G);this.S.createClientVe(this.C,this,28240);this.S.createClientVe(this.j,this,28239);this.S.logVisibility(this.C,!0);this.S.logVisibility(this.j,!0);this.hide()}trigger(Z,k,N,a){this.show();if(this.U&&Z!==this.U){let T=1;this.D&&(T=sgr(this));qFR(this,T,!1);QgR(this)}this.U=Z;this.Y=this.U===-1?this.j:this.C;Z="";k?(this.U===-1&&this.S.getCurrentTime()<=k?this.L=k:this.L+=k,Z=`${this.U===-1?"\u2212":"+"} ${this.L}`):this.L=0;this.updateValue(this.U===-1?"durationBack":"durationForward",
Z);if(this.V==="hidden"||this.V==="fading-out")k=0,this.V==="fading-out"&&(k=sgr(this),moy(this)),rqy(this,k),this.V!=="fading-out"&&Coy(this,this.Y.querySelector(".ytp-seek-overlay-arrow-persistent")),this.V="fading-in";else if(this.V==="fading-in"||this.V==="lingering")k=this.Y.querySelector(".ytp-seek-overlay-duration"),Z=g.Q5(this.S.X().experiments,"web_player_seek_overlay_duration_bump_scale")||.9,k.animate([{offset:0,easing:"cubic-bezier(0.20, 0.00, 0.60, 1.00)",transform:"scale(1)"},{offset:.64,
easing:"cubic-bezier(0.20, 0.00, 0.60, 1.00)",transform:`scale(${Z})`},{offset:1,transform:"scale(1)"}],{duration:184}),moy(this),this.V==="lingering"&&(this.G.stop(),this.G.start());N&&Aqj(this,N,a)}j0(Z,k,N,a){this.trigger(Z,a)}bc(Z,k,N){this.trigger(Z,k);N&&(Z=Z===-1?this.C.visualElement:this.j.visualElement,N={seekData:N},(k=g.C9())&&RE(k,Z,"INTERACTION_LOGGING_GESTURE_TYPE_KEY_PRESS",N))}UU(Z,k,N){this.trigger(Z,void 0,k,N)}};var BIH=class extends g.E{constructor(Z,k,N){super({J:"button",BD:["ytp-button","ytp-share-button"],W:{title:Z.B("player_tooltip_data_title_killswitch")?"Share":"","data-tooltip-title":"Share","aria-haspopup":"true","aria-owns":N.element.id,"data-tooltip-opaque":String(g.PQ(Z.X()))},A:[{J:"div",Z:"ytp-share-icon",Da:"{{icon}}"},{J:"div",Z:"ytp-share-title",Da:"Share"}]});this.api=Z;this.V=k;this.U=N;this.visible=!1;this.tooltip=this.V.sb();Z.createClientVe(this.element,this,28664);this.listen("click",
this.onClick);this.K(Z,"videodatachange",this.aq);this.K(Z,"videoplayerreset",this.aq);this.K(Z,"appresize",this.aq);this.K(Z,"presentingplayerstatechange",this.aq);this.aq();this.addOnDisposeCallback(g.ua(this.tooltip,this.element))}onClick(){var Z=this.api.X();const k=this.api.getVideoData({playerType:this.api.getPresentingPlayerType()}),N=this.api.getPlaylistId();Z=this.api.B("enable_share_button_url_fix")?this.api.getVideoUrl(!0,!0,!0):Z.getVideoUrl(k.videoId,N,void 0,!0);if(navigator.share)try{const a=
navigator.share({title:k.title,url:Z});a instanceof Promise&&a.catch(T=>{Po0(this,T)})}catch(a){a instanceof Error&&Po0(this,a)}else this.V.t0(),J7(this.U,this.element,!1);
this.api.logClick(this.element)}aq(){var Z=this.api.X();const k=this.api.isEmbedsShortsMode();g.D(this.element,"ytp-show-share-title",g.PQ(Z)&&!k);this.V.dQ()&&k?(Z=(this.api.fF().getPlayerSize().width-this.api.getVideoContentRect().width)/2,g.ij(this.element,"right",`${Z}px`)):k&&g.ij(this.element,"right","0px");this.updateValue("icon",{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},A:[{J:"path",Rv:!0,Z:"ytp-svg-fill",W:{d:"m 20.20,14.19 0,-4.45 7.79,7.79 -7.79,7.79 0,-4.56 C 16.27,20.69 12.10,21.81 9.34,24.76 8.80,25.13 7.60,27.29 8.12,25.65 9.08,21.32 11.80,17.18 15.98,15.38 c 1.33,-0.60 2.76,-0.98 4.21,-1.19 z"}}]});
this.visible=eT(this);g.D(this.element,"ytp-share-button-visible",this.visible);this.In(this.visible);this.tooltip.qj();this.api.logVisibility(this.element,eT(this)&&this.Vz)}Df(Z){super.Df(Z);this.api.logVisibility(this.element,this.visible&&Z)}YW(){super.YW();g.Wp(this.element,"ytp-share-button-visible")}};var DGr=class extends nz{constructor(Z,k){var N=IE();const a=Z.X();N={J:"div",Z:"ytp-share-panel",W:{id:IE(),role:"dialog","aria-labelledby":N},A:[{J:"div",Z:"ytp-share-panel-inner-content",A:[{J:"div",Z:"ytp-share-panel-title",W:{id:N},Da:"Share"},{J:"a",BD:["ytp-share-panel-link","ytp-no-contextmenu"],W:{href:"{{link}}",target:a.N,title:"Share link","aria-label":"{{shareLinkWithUrl}}"},Da:"{{linkText}}"},{J:"label",Z:"ytp-share-panel-include-playlist",A:[{J:"input",Z:"ytp-share-panel-include-playlist-checkbox",
W:{type:"checkbox",checked:"true"}},"Include playlist"]},{J:"div",Z:"ytp-share-panel-loading-spinner",A:[W3()]},{J:"div",Z:"ytp-share-panel-service-buttons",Da:"{{buttons}}"},{J:"div",Z:"ytp-share-panel-error",Da:"An error occurred while retrieving sharing information. Please try again later."}]},{J:"button",BD:["ytp-share-panel-close","ytp-button"],W:{title:"Close"},A:[g.Th()]}]};super(Z,N,250);this.moreButton=null;this.api=Z;this.tooltip=k.sb();this.U=[];this.Y=this.Lp("ytp-share-panel-inner-content");
this.closeButton=this.Lp("ytp-share-panel-close");this.K(this.closeButton,"click",this.cA);this.addOnDisposeCallback(g.ua(this.tooltip,this.closeButton));this.D=this.Lp("ytp-share-panel-include-playlist-checkbox");this.K(this.D,"click",this.aq);this.V=this.Lp("ytp-share-panel-link");this.addOnDisposeCallback(g.ua(this.tooltip,this.V));this.api.createClientVe(this.V,this,164503);this.K(this.V,"click",T=>{T.preventDefault();this.api.logClick(this.V);var K=this.api.getVideoUrl(!0,!0,!1,!1);K=dof(this,
K);g.jY(K,this.api,T)&&g.A7(this.api,"SHARE_CLICKED")});
this.listen("click",this.j);this.K(Z,"videoplayerreset",this.hide);this.K(Z,"fullscreentoggled",this.onFullscreenToggled);this.K(Z,"onLoopRangeChange",this.O);this.hide()}j(Z){Z=jr(Z);g.C1(this.Y,Z)||g.C1(this.closeButton,Z)||J7(this)}cA(){super.cA();this.tooltip.qd(this.element);this.api.logVisibility(this.V,!1);for(const Z of this.U)this.api.hasVe(Z.element)&&this.api.logVisibility(Z.element,!1)}show(){const Z=this.LF;super.show();this.aq();Z||g.A7(this.api,"onSharePanelOpened")}O(){this.LF&&this.aq()}aq(){g.jX(this.element,
"ytp-share-panel-loading");g.Wp(this.element,"ytp-share-panel-fail");var Z=this.api.getVideoData();const k=this.api.getPlaylistId()&&this.D.checked;Z.getSharePanelCommand&&$P(this.api.jU(),Z.getSharePanelCommand,{includeListId:k}).then(N=>{this.jm()||(g.Wp(this.element,"ytp-share-panel-loading"),Xkf(this,N))});
Z=this.api.getVideoUrl(!0,!0,!1,!1);this.updateValue("link",Z);this.updateValue("linkText",Z);this.updateValue("shareLinkWithUrl",g.DH("Share link $URL",{URL:Z}));Yn(this.V);this.api.logVisibility(this.V,!0)}onFullscreenToggled(Z){!Z&&this.Ga()&&J7(this)}focus(){this.V.focus()}YW(){super.YW();cqf(this)}};var O5K=class extends gY{constructor(Z){super(Z);this.Y=this.V=this.isContentForward=this.O=!1;this.element.setAttribute("data-overlay-order","8");hmG(this);this.K(this.S,"changeProductsInVideoVisibility",this.Rq);this.K(this.S,"videodatachange",this.onVideoDataChange)}YW(){z1(this);super.YW()}Sm(Z){Z.target!==this.dismissButton.element&&(this.G(!1),g.A7(this.S,"innertubeCommand",this.onClickCommand))}j(){this.HA=!0;this.G(!0);this.U()}Rq(Z){this.O=Z;this.U()}onVideoDataChange(Z,k){if(Z=!!k.videoId&&
this.videoId!==k.videoId)this.videoId=k.videoId,this.HA=!1,this.vD=!0,this.zt=this.FS=!1,z1(this),L2U(this,!1),this.Y=this.V=!1,UU(this),VoG(this);if(Z||!k.videoId)this.dA=this.D=!1;if(k?.getPlayerResponse()?.videoDetails?.isLiveContent)this.Hq(!1);else{k=g.J(k.getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.productsInVideoOverlayRenderer,ZSf);this.O=this.enabled=!1;if(k){if(Z=k?.featuredProductsEntityKey){var N=g.tE.getState().entities;if(jV(N,"featuredProductsEntity",Z)?.productsData){this.Hq(!1);
return}}if(!k.text||!k.onClickCommand||!k.timing){this.Hq(!1);return}this.enabled=!0;this.D||(Z=k.badgeInteractionLogging?.trackingParams,(this.D=!!Z)&&this.S.setTrackingParams(this.badge.element,Z||null));this.dA||(this.dA=!!k.dismissButton?.trackingParams)&&this.S.setTrackingParams(this.dismissButton.element,k.dismissButton?.trackingParams||null);if(k.isContentForward){Z=k.productsData;L2U(this,!0);VoG(this);Z=toy(this,Z);N=[];Z.length>0&&N.push(Z[0]);if(Z.length>1){const a=new g.E({J:"div",Z:"ytp-suggested-action-more-products-icon"});
g.u(this,a);N.push(a);N.push(...Z.slice(1))}this.N=new g.E({J:"div",A:N,Z:"ytp-suggested-action-content-forward-container"});g.u(this,this.N);this.s6.element.append(this.N.element)}this.text=g.YL(k.text);if(Z=k.dismissButton?.a11yLabel)this.xl=g.YL(Z);this.onClickCommand=k.onClickCommand;this.timing=k.timing;this.f8()}ZO(this);YV(this);this.U()}}C(){return!this.O&&this.enabled&&!this.HA&&!this.S.bV()&&!this.tW&&(this.zt||this.vD)}Kp(Z){super.Kp(Z);if(this.V||this.Y)this.timing&&oQ(this.timing.preview)&&
(this.V=!1,UU(this),this.Y=!1,UU(this),this.S.jl("shopping_overlay_preview_collapsed"),this.S.jl("shopping_overlay_preview_expanded"),Z=bs(this.timing.preview.startSec,this.timing.preview.endSec,"shopping_overlay_expanded"),oQ(this.timing.expanded)&&this.timing.preview.endSec===this.timing.expanded.startSec&&(this.S.jl("shopping_overlay_expanded"),Z.end=this.timing.expanded.endSec*1E3),this.S.f8([Z])),this.FS=!0,YV(this);UU(this)}Hq(Z){(this.zt=Z)?(WI(this),YV(this,!1)):(z1(this),this.O6.start());
this.U()}f8(Z=0){var k=this.timing;Z+=this.S.getCurrentTime();const N=[];var a=k.visible;const T=k.preview;k=k.expanded;oQ(a)&&(JV(a,Z),N.push(bs(a.startSec,a.endSec,"shopping_overlay_visible")));oQ(T)&&(JV(T,Z),a=T.startSec+1,N.push(bs(T.startSec,a,"shopping_overlay_preview_collapsed")),N.push(bs(a,T.endSec,"shopping_overlay_preview_expanded")));oQ(k)&&(JV(k,Z),N.push(bs(k.startSec,k.endSec,"shopping_overlay_expanded")));this.S.f8(N)}U(){super.U();this.S.getRootNode()&&g.D(this.S.getRootNode(),"ytp-shopping-pill-shown",
this.C())}};var vuJ=class extends g.E{constructor(Z){super({J:"div",Z:"ytp-shorts-title-channel",A:[{J:"a",Z:"ytp-shorts-title-channel-logo",W:{href:"{{channelLink}}",target:Z.X().N,"aria-label":"{{channelLogoLabel}}"}},{J:"div",Z:"ytp-shorts-title-expanded-heading",A:[{J:"div",Z:"ytp-shorts-title-expanded-title",A:[{J:"a",Da:"{{expandedTitle}}",W:{href:"{{channelTitleLink}}",target:Z.X().N,tabIndex:"0"}}]}]}]});this.api=Z;this.V=this.Lp("ytp-shorts-title-channel-logo");this.channelName=this.Lp("ytp-shorts-title-expanded-title");
this.subscribeButton=null;Z.createClientVe(this.V,this,36925);this.K(this.V,"click",k=>{this.api.logClick(this.V);g.p5(window,utb(this));k.preventDefault()});
Z.createClientVe(this.channelName,this,37220);this.K(this.channelName,"click",k=>{this.api.logClick(this.channelName);g.p5(window,utb(this));k.preventDefault()});
lyb(this);this.K(Z,"videodatachange",this.aq);this.K(Z,"videoplayerreset",this.aq);this.aq()}aq(){const Z=this.api.X();this.In(g.PQ(Z)&&this.api.isEmbedsShortsMode());this.subscribeButton&&this.api.logVisibility(this.subscribeButton.element,this.LF);const k=this.api.getVideoData();let N=!1;this.api.getPresentingPlayerType()===2?N=!!k.videoId&&!!k.isListed&&!!k.author&&!!k.Rq&&!!k.profilePicture:g.PQ(Z)&&(N=!!k.videoId&&!!k.Rq&&!!k.profilePicture&&!k.o4&&!Z.D&&!(Z.j&&this.api.getPlayerSize().width<
200));fyN(this,N,k.profilePicture,g.PQ(Z)?k.expandedTitle:k.author);this.subscribeButton&&(this.subscribeButton.channelId=k.WZ);this.updateValue("expandedTitle",k.expandedTitle)}};var i5_=class extends nz{constructor(Z){super(Z,{J:"button",BD:["ytp-skip-intro-button","ytp-popup","ytp-button"],A:[{J:"div",Z:"ytp-skip-intro-button-text",Da:"Skip Intro"}]},100);this.U=!1;this.V=new g.Uc(()=>{this.hide()},5E3);
this.WB=this.Ym=NaN;g.u(this,this.V);this.j=()=>{this.show()};
this.Y=()=>{this.hide()};
this.D=()=>{const k=this.S.getCurrentTime();k>this.Ym/1E3&&k<this.WB/1E3&&this.show()};
this.K(this.S,"videodatachange",(k,N)=>{this.FX(k,N)});
this.K(this.element,"click",()=>{this.S.seekTo(this.WB/1E3)});
this.hide()}show(){super.show();this.V.start()}hide(){super.hide();this.V.stop()}FX(Z,k){Z==="dataloaded"&&((this.Ym=k.Ym,this.WB=k.WB,isNaN(this.Ym)||isNaN(this.WB))?this.U&&(this.S.jl("intro"),this.S.removeEventListener(g.te("intro"),this.j),this.S.removeEventListener(g.he("intro"),this.Y),this.S.removeEventListener("onShowControls",this.D),this.hide(),this.U=!1):(this.S.addEventListener(g.te("intro"),this.j),this.S.addEventListener(g.he("intro"),this.Y),this.S.addEventListener("onShowControls",
this.D),Z=new g.pe(this.Ym,this.WB,{priority:9,namespace:"intro"}),this.S.f8([Z]),this.U=!0))}};var gun=class extends g.E{constructor(Z){super({J:"button",BD:["ytp-airplay-button","ytp-button"],W:{title:Z.B("player_tooltip_data_title_killswitch")?"AirPlay":"","data-tooltip-title":"AirPlay","data-priority":"11"},Da:"{{icon}}"});this.S=Z;this.listen("click",this.onClick);this.K(Z,"airplayactivechange",this.aq);this.K(Z,"airplayavailabilitychange",this.aq);this.aq();la(Z,this.element,this)}onClick(){this.S.j$()}aq(){var Z=!0;g.PQ(this.S.X())&&(Z=Z&&this.S.fF().getPlayerSize().width>=480);this.In(Z);
Z=this.updateValue;var k=this.S.B("delhi_modern_web_player_icons");const N=k?{J:"svg",W:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{d:"M23 17V5C23.00 4.50 22.81 4.02 22.48 3.65C22.15 3.29 21.69 3.06 21.20 3.01L21 3H3L2.79 3.01C2.30 3.06 1.84 3.29 1.51 3.65C1.18 4.02 .99 4.50 1 5V17C0.99 17.49 1.18 17.97 1.51 18.34C1.84 18.70 2.30 18.93 2.79 18.99L3 19H5.93L7.65 17H3V5H21V17H16.35L18.06 19H21L21.20 18.99C21.69 18.93 22.15 18.70 22.48 18.34C22.81 17.97 23.00 17.49 23 17ZM17.29 21.17L12 15L6.70 21.17C6.64 21.24 6.60 21.33 6.59 21.43C6.57 21.52 6.59 21.62 6.63 21.70C6.67 21.79 6.73 21.86 6.81 21.92C6.89 21.97 6.99 22 7.08 22H16.91C17.00 22 17.10 21.97 17.18 21.92C17.26 21.86 17.32 21.79 17.36 21.70C17.40 21.62 17.42 21.52 17.40 21.43C17.39 21.33 17.35 21.24 17.29 21.17Z",
fill:"white"}}]}:{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},A:[{J:"path",Rv:!0,W:{d:"M11,13 L25,13 L25,21 L11,21 L11,13 Z M12,28 L24,28 L18,22 L12,28 Z M27,9 L9,9 C7.9,9 7,9.9 7,11 L7,23 C7,24.1 7.9,25 9,25 L13,25 L13,23 L9,23 L9,11 L27,11 L27,23 L23,23 L23,25 L27,25 C28.1,25 29,24.1 29,23 L29,11 C29,9.9 28.1,9 27,9 L27,9 Z",fill:"#fff"}}]};k=k?{J:"svg",W:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{d:"M23 17V5C23.00 4.50 22.81 4.02 22.48 3.65C22.15 3.29 21.69 3.06 21.20 3.01L21 3H3L2.79 3.01C2.30 3.06 1.84 3.29 1.51 3.65C1.18 4.02 .99 4.50 1 5V17C0.99 17.49 1.18 17.97 1.51 18.34C1.84 18.70 2.30 18.93 2.79 18.99L3 19H5.93L7.65 17H3V5H21V17H16.35L18.06 19H21L21.20 18.99C21.69 18.93 22.15 18.70 22.48 18.34C22.81 17.97 23.00 17.49 23 17ZM17.29 21.17L12 15L6.70 21.17C6.64 21.24 6.60 21.33 6.59 21.43C6.57 21.52 6.59 21.62 6.63 21.70C6.67 21.79 6.73 21.86 6.81 21.92C6.89 21.97 6.99 22 7.08 22H16.91C17.00 22 17.10 21.97 17.18 21.92C17.26 21.86 17.32 21.79 17.36 21.70C17.40 21.62 17.42 21.52 17.40 21.43C17.39 21.33 17.35 21.24 17.29 21.17Z",
fill:"white"}}]}:{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},A:[{J:"path",Rv:!0,Z:"ytp-svg-fill",W:{d:"M12,28 L24,28 L18,22 L12,28 Z M27,9 L9,9 C7.9,9 7,9.9 7,11 L7,23 C7,24.1 7.9,25 9,25 L13,25 L13,23 L9,23 L9,11 L27,11 L27,23 L23,23 L23,25 L27,25 C28.1,25 29,24.1 29,23 L29,11 C29,9.9 28.1,9 27,9 L27,9 Z"}}]};Z.call(this,"icon",this.S.YX()?N:k)}};var wCc=class extends g.E{constructor(Z){super({J:"div",Z:"ytp-gradient-bottom"});this.U=g.TU("CANVAS");this.V=this.U.getContext("2d",{willReadFrequently:!0});this.D=NaN;this.U.width=1;BiX(this,Z.fF().getPlayerSize().height)}YW(){this.V=null;super.YW()}};var $GD=class extends g.E{constructor(Z,k,N,a){super({J:"div",Z:"ytp-chapter-container",A:[{J:"button",BD:["ytp-chapter-title","ytp-button"],A:[{J:"span",W:{"aria-hidden":"true"},Z:"ytp-chapter-title-prefix",Da:"\u2022"},{J:"div",Z:"ytp-chapter-title-content",Da:"{{chapterTitle}}",W:{"aria-label":"{{ariaLabel}}","aria-live":"polite",title:Z.B("player_tooltip_data_title_killswitch")?a:"","data-tooltip-title":a}},{J:"div",Z:"ytp-chapter-title-chevron",A:[{J:"svg",W:{height:"100%",viewBox:"0 0 24 24",
width:"100%"},A:[{J:"path",W:{d:"M9.71 18.71l-1.42-1.42 5.3-5.29-5.3-5.29 1.42-1.42 6.7 6.71z",fill:"#fff"}}]}]}]}]});this.S=Z;this.Y=k;this.G="";this.currentIndex=0;this.U=void 0;this.D=!0;this.N=this.Lp("ytp-chapter-container");this.V=this.Lp("ytp-chapter-title");this.L=this.Lp("ytp-chapter-title-content");this.C();this.updateVideoData("newdata",this.S.getVideoData());this.K(Z,"videodatachange",this.updateVideoData);this.K(Z,"resize",this.C);this.K(this.N,"click",this.onClick);this.K(Z,g.te(N),
this.MW);this.K(Z,"onLoopRangeChange",this.MW);this.K(Z,"innertubeCommand",this.onClickCommand);(Z=g.HQ(this.S.X()))&&g.D(this.V,"ytp-profile-page",!0);g.PQ(this.S.X())||Z||la(this.S,this.L,this)}onClick(){g.A7(this.S,"innertubeCommand",this.U)}C(){if(this.S.B("delhi_modern_web_player")){var Z=this.S.getPlayerSize();Z.width&&(this.element.style.maxWidth=`${Z.width*.25}px`)}}};var xGH=class extends $GD{constructor(Z,k){super(Z,k,"chapterCueRange","View chapter");this.j=""}onClickCommand(Z){g.J(Z,FG)&&this.MW()}updateVideoData(Z,k){Z=g.J(k.getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.decoratedPlayerBarRenderer,Y2);Z=g.J(Z?.playerBarActionButton,Eq);this.S.B("web_player_updated_entrypoint")&&(this.j=Jo(Z?.text),this.L.setAttribute("title",Z?.tooltip??"View chapter"));this.U=Z?.command;OJb(this)}MW(){var Z=this.j;const k=this.Y.V;var N=this.S.getLoopRange()?.type===
"clips";if(k.length>1&&!N){Z=this.S.getProgressState().current*1E3;N=vT(k,Z);Z=k[N].title||"Chapters";if(N!==this.currentIndex||this.D)g.A7(this.S,"innertubeCommand",k[N].onActiveCommand),this.currentIndex=N;this.D=!1}else this.D=!0;Dob(this,Z)}};var GIn=class extends g.af{constructor(Z){super({J:"button",BD:["ytp-expand-right-bottom-section-button","ytp-button"],W:{title:"{{title}}","aria-pressed":"{{pressed}}","data-priority":"1","data-title-no-tooltip":"{{data-title-no-tooltip}}"},A:[g.aJ()]});this.V=!1;this.listen("click",this.U);Z.createClientVe(this.element,this,276954)}U(){this.element.parentElement?.classList.contains("ytp-right-controls-left");(this.V=!this.V)?this.publish("small-mode-expand-right-bottom-controls"):this.publish("small-mode-collapse-right-bottom-controls")}isExpanded(){return this.V}};var SDr=class extends g.E{constructor(Z,k){super({J:"div",Z:"ytp-storyboard-framepreview",A:[{J:"div",Z:"ytp-storyboard-framepreview-timestamp",Da:"{{timestamp}}"},{J:"div",Z:"ytp-storyboard-framepreview-img"}]});this.api=Z;this.U=this.Lp("ytp-storyboard-framepreview-img");this.V=null;this.frameIndex=NaN;this.events=new g.tt(this);this.fade=new g.ML(this,100);g.u(this,this.events);g.u(this,this.fade);this.K(this.api,"presentingplayerstatechange",this.D);k&&this.K(this.element,"click",()=>{k.nE()})}D(Z){Z.state.V(32)?
pz(this,this.api.Cn()):this.LF&&(Z.state.V(16)||Z.state.V(1))||this.fade.hide()}onProgress(){const Z=this.api.getPlayerStateObject();
(Z.V(32)||Z.V(16))&&RQ(this)}Y(){this.frameIndex=NaN;RQ(this)}hide(){this.V&&pz(this,null);super.hide()}};var esH=class extends g.E{constructor(Z,k){super({J:"button",BD:["ytp-fullscreen-button","ytp-button"],W:{title:Z.B("player_tooltip_data_title_killswitch")?"{{title}}":"","data-tooltip-title":"{{tooltip-title}}","aria-label":"{{aria-label}}","aria-keyshortcuts":"f","data-priority":"12","data-title-no-tooltip":"{{data-title-no-tooltip}}"},Da:"{{icon}}"});this.S=Z;this.U=k;this.message=null;this.V=g.ua(this.U.sb(),this.element);this.D=new g.Uc(this.L,2E3,this);g.u(this,this.D);this.K(Z,"fullscreentoggled",
this.uA);this.K(Z,"presentingplayerstatechange",this.aq);this.K(Z,"resize",this.aq);this.listen("click",this.onClick);g.z4()&&(k=this.S.fF(),this.K(k,bCR(),this.Y),this.K(k,Umf(document),this.TB));Z.X().hq||Z.X().j||this.disable();Z.createClientVe(this.element,this,139117);this.aq();this.uA(Z.isFullscreen())}onClick(){if(this.S.X().hq||this.S.X().j){this.S.logClick(this.element);try{this.S.toggleFullscreen().catch(Z=>{this.GG(Z)})}catch(Z){this.GG(Z)}}else J7(this.message,this.element,!0)}GG(Z){String(Z).includes("fullscreen error")?
g.L9(Z):g.b(Z);
this.Y()}Y(){this.disable();this.message.Iv(this.element,!0)}TB(){Uv()===this.S.getRootNode()?this.D.start():(this.D.stop(),this.message&&this.message.hide())}L(){if(window.screen&&window.outerWidth&&window.outerHeight){const Z=window.screen.width*.9,k=window.screen.height*.9;let N=Math.max(window.outerWidth,window.innerWidth),a=Math.max(window.outerHeight,window.innerHeight);if(N>a!==Z>k){const T=N;N=a;a=T}Z>N&&k>a&&this.Y()}}disable(){if(!this.message){var Z=(o6(["requestFullscreen","webkitRequestFullscreen",
"mozRequestFullScreen","msRequestFullscreen"],document.body)!=null?"Full screen is unavailable. $BEGIN_LINKLearn More$END_LINK":"Your browser doesn't support full screen. $BEGIN_LINKLearn More$END_LINK").split(/\$(BEGIN|END)_LINK/);this.message=new nz(this.S,{J:"div",BD:["ytp-popup","ytp-generic-popup"],W:{role:"alert",tabindex:"0"},A:[Z[0],{J:"a",W:{href:"https://support.google.com/youtube/answer/6276924",target:this.S.X().N},Da:Z[2]},Z[4]]},100,!0);this.message.hide();g.u(this,this.message);this.message.subscribe("show",
k=>{this.U.r7(this.message,k)});
g.$n(this.S,this.message.element,4);this.element.setAttribute("aria-disabled","true");this.element.setAttribute("aria-haspopup","true");(0,this.V)();this.V=null}}aq(){const Z=bff(this.S),k=this.S.X().j&&this.S.getPlayerSize().width<250;this.In(Z&&!k);this.S.logVisibility(this.element,this.LF)}uA(Z){let k;Z?(k=g.fe(this.S,"Exit full screen","f"),this.update({"data-title-no-tooltip":"Exit full screen"}),document.activeElement===this.element&&this.S.getRootNode().focus(),document.pictureInPictureElement&&
document.exitPictureInPicture().catch(N=>{g.L9(N)})):(k=g.fe(this.S,"Full screen","f"),this.update({"data-title-no-tooltip":"Full screen"}));
Z=iJy(this,Z);k=this.message?null:k;this.S.X().B("player_tooltip_data_title_killswitch")?this.update({title:k,icon:Z}):this.update({"tooltip-title":k,"aria-label":k,icon:Z});this.U.sb().qj()}YW(){this.message||((0,this.V)(),this.V=null);super.YW()}Df(Z){super.Df(Z)}};var oua=class extends g.E{constructor(Z,k){super({J:"button",BD:["ytp-button","ytp-jump-button"],W:{title:Z.B("player_tooltip_data_title_killswitch")?"{{title}}":"","data-tooltip-title":"{{tooltip-title}}","aria-keyshortcuts":"{{aria-keyshortcuts}}","data-title-no-tooltip":"{{data-title-no-tooltip}}"},A:[k>0?{J:"svg",W:{height:"100%",mlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"100%"},A:[{J:"path",BD:["ytp-circle-arrow","ytp-svg-fill"],W:{d:"m19,12c0,2.1 -0.93,4.07 -2.55,5.4c-1.62,1.34 -3.76,1.87 -5.86,1.46c-2.73,-0.53 -4.92,-2.72 -5.45,-5.45c-0.41,-2.1 .12,-4.24 1.46,-5.86c1.33,-1.62 3.3,-2.55 5.4,-2.55l1.27,0l-0.85,.85l1.41,1.41l3.35,-3.35l-3.35,-3.35l-1.41,1.41l1.01,1.03l-1.43,0c-2.7,0 -5.23,1.19 -6.95,3.28c-1.72,2.08 -2.4,4.82 -1.88,7.52c0.68,3.52 3.51,6.35 7.03,7.03c0.6,.11 1.19,.17 1.78,.17c2.09,0 4.11,-0.71 5.74,-2.05c2.09,-1.72 3.28,-4.25 3.28,-6.95l-2,0z"}},
{J:"text",BD:["ytp-jump-button-text","ytp-svg-fill"],W:{x:"7.05",y:"15.05"}}]}:{J:"svg",W:{height:"100%",mlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"100%"},A:[{J:"path",BD:["ytp-circle-arrow","ytp-svg-fill"],W:{d:"m18.95,6.28c-1.72,-2.09 -4.25,-3.28 -6.95,-3.28l-1.43,0l1.02,-1.02l-1.41,-1.41l-3.36,3.35l3.35,3.35l1.41,-1.41l-0.85,-0.86l1.27,0c2.1,0 4.07,.93 5.4,2.55c1.34,1.62 1.87,3.76 1.46,5.86c-0.53,2.73 -2.72,4.92 -5.45,5.45c-2.11,.41 -4.24,-0.12 -5.86,-1.46c-1.62,-1.33 -2.55,-3.3 -2.55,-5.4l-2,0c0,2.7 1.19,5.23 3.28,6.95c1.62,1.34 3.65,2.05 5.74,2.05c0.59,0 1.19,-0.06 1.78,-0.17c3.52,-0.68 6.35,-3.51 7.03,-7.03c0.52,-2.7 -0.17,-5.44 -1.88,-7.52z"}},
{J:"text",BD:["ytp-jump-button-text","ytp-svg-fill"],W:{x:"6.5",y:"15"}}]}]});this.S=Z;this.V=k;this.U=new g.Uc(()=>{this.D?(this.D=!1,this.U.start()):this.element.classList.remove("ytp-jump-spin","backwards")},250);
this.D=!1;(k=k>0)?this.S.createClientVe(this.element,this,36843):this.S.createClientVe(this.element,this,36844);const N=g.DH(k?"Seek forward $SECONDS seconds. (\u2192)":"Seek backwards $SECONDS seconds. (\u2190)",{SECONDS:Math.abs(this.V).toString()});this.S.B("player_tooltip_data_title_killswitch")?this.update({title:N,"data-title-no-tooltip":N,"aria-keyshortcuts":k?"\u2192":"\u2190"}):this.update({"tooltip-title":N,"data-title-no-tooltip":N,"aria-keyshortcuts":k?"\u2192":"\u2190"});this.Y=this.element.querySelector(".ytp-jump-button-text");
this.Y.textContent=Math.abs(this.V).toString();this.listen("click",this.onClick,this);la(Z,this.element,this)}onClick(){this.S.logClick(this.element);this.S.seekBy(this.V,!0);var Z=this.V>0?1:-1,k=Math.abs(this.V);const N=this.S.jK().LI;N&&N.bc(Z,k);this.U.isActive()?this.D=!0:(Z=["ytp-jump-spin"],this.V<0&&Z.push("backwards"),this.element.classList.add(...Z),this.U.XN())}};var J3c=class extends $GD{constructor(Z,k){super(Z,k,"timedMarkerCueRange","View key moments");this.K(Z,g.he("timedMarkerCueRange"),this.MW);this.K(Z,"updatemarkervisibility",this.updateVideoData)}onClickCommand(Z){g.J(Z,IPb)&&this.MW()}updateVideoData(){this.U=wki(this)?.onTap?.innertubeCommand;OJb(this)}MW(){var Z="";const k=this.Y.C;var N=wki(this)?.headerTitle;N=N?g.YL(N):"";var a=this.S.getLoopRange()?.type==="clips";k.length>1&&!a&&(Z=this.S.getProgressState().current*1E3,a=EYj(k,Z),Z=a!=null?
k[a].title:N,a!=null&&a!==this.currentIndex&&(g.A7(this.S,"innertubeCommand",k[a].onActiveCommand),this.currentIndex=a));Dob(this,Z)}};var zsD=class extends g.E{constructor(Z){super({J:"button",BD:["ytp-miniplayer-button","ytp-button"],W:{title:Z.B("player_tooltip_data_title_killswitch")?"{{title}}":"","data-tooltip-title":"{{tooltip-title}}","aria-keyshortcuts":"i","data-priority":"7","data-title-no-tooltip":"{{data-title-no-tooltip}}","data-tooltip-target-id":"ytp-miniplayer-button"},A:["{{icon}}"]});this.S=Z;this.visible=!1;this.listen("click",this.onClick);this.K(Z,"fullscreentoggled",this.aq);this.S.B("player_tooltip_data_title_killswitch")?
this.update({title:g.fe(Z,"Miniplayer","i"),"data-title-no-tooltip":"Miniplayer",icon:$oi(this)}):this.update({"tooltip-title":g.fe(Z,"Miniplayer","i"),"data-title-no-tooltip":"Miniplayer",icon:$oi(this)});la(Z,this.element,this);Z.createClientVe(this.element,this,62946);this.aq()}onClick(){g.A7(this.S,"onCollapseMiniplayer");this.S.logClick(this.element)}aq(){this.visible=!this.S.isFullscreen();this.In(this.visible);this.S.logVisibility(this.element,this.visible&&this.Vz)}Df(Z){super.Df(Z);this.S.logVisibility(this.element,
this.visible&&Z)}};var emG=new PG(0,0,.05,0,0,1,1,1),UGn=class extends g.E{constructor(Z,k,N,a,T,K=!1){const y={J:"div",BD:["ytp-input-slider-section"],A:[{J:"input",Z:"ytp-input-slider",W:{role:"slider",tabindex:"0",type:"range",min:"{{minvalue}}",max:"{{maxvalue}}","aria-valuemin":"{{ariaMinValue}}","aria-valuemax":"{{ariaMaxValue}}","aria-valuenow":"{{ariaValueNow}}","aria-valuetext":"{{ariaValueText}}",step:"{{stepvalue}}",value:"{{slidervalue}}"}}]};T&&y.A.unshift(T);K&&y.BD.push("ytp-vertical-slider");super(y);
this.D=Z;this.G=k;this.C=N;this.initialValue=a;this.header=T;this.Y=0;this.U=this.Lp("ytp-input-slider");this.V=a?a:Z;this.init();this.K(this.U,"input",this.L);this.K(this.U,"keydown",this.j)}init(){this.update({minvalue:this.D,maxvalue:this.G,stepvalue:this.C,slidervalue:this.V,ariaValueNow:this.V,ariaMinValue:this.D,ariaMaxValue:this.G,ariaValueText:`${this.V.toFixed(2)}`});xoG(this,this.V)}L(){MI(this,Number(this.U.value));this.U.focus()}j(Z){if(!Z.defaultPrevented){switch(Z.code){case "ArrowDown":Z=
-this.C;break;case "ArrowUp":Z=this.C;break;default:return}MI(this,Math.min(this.G,Math.max(Number((this.V+Z).toFixed(2)),this.D)))}}};var b5K=class extends UGn{constructor(Z){super(0,100,1,Z.isMuted()?0:Z.getVolume(),void 0,!0);this.S=Z;this.O=hI(this.xW,10,this);this.N=!1;this.K(Z,"onVolumeChange",this.onVolumeChange);this.K(this.element,"wheel",this.zt)}onVolumeChange(Z){if(this.N)this.N=!1;else{var k=Z.volume;k===0||Z.muted?MI(this,0):MI(this,k)}}L(){super.L();this.O(this.V)}zt(Z){var k=-Z.deltaY;k=Z.deltaMode===WheelEvent.DOM_DELTA_LINE||Z.deltaMode===WheelEvent.DOM_DELTA_PAGE?g.u0(this.V+k,0,100):g.u0(this.V+g.u0(k/10,-10,
10),0,100);k===0?MI(this,0):MI(this,k);this.O(k);Z.preventDefault();Z.stopPropagation()}xW(Z,k){this.N=!0;Z===0||k?this.S.mute():(this.S.isMuted()&&this.S.unMute(),this.S.setVolume(Z))}};var pCe=class extends g.E{constructor(Z,k){super({J:"div",W:{tabindex:"0",title:Z.B("player_tooltip_data_title_killswitch")?"Volume":"","data-tooltip-title":"Volume","data-tooltip-offset-y":"-120"},BD:["ytp-volume-popover"]});this.isVisible=!1;this.tooltip=k.sb();this.Y=new b5K(Z);g.u(this,this.Y);this.Y.HD(this.element);this.V=new g.Uc(()=>{oTf(this,!1)},300);
this.listen("mouseenter",()=>{this.V.stop()});
this.listen("mouseleave",()=>{this.D()});
this.listen("focus",()=>{this.V.stop()});
this.K(this.Y.U,"focus",()=>{this.V.stop()});
this.listen("focusout",()=>{this.D();this.element.dispatchEvent(new Event("blur"))});
this.addOnDisposeCallback(g.ua(k.sb(),this.element));g.u(this,this.V)}U(){oTf(this,!0)}D(){this.V.start()}G(){this.V.stop()}L(){return this.isVisible}};var RS=class extends g.E{constructor(Z,k){var N=Z.X().FS?{"aria-keyshortcuts":"m","aria-label":"{{aria-label}}","data-title-no-tooltip":"{{data-title-no-tooltip}}","data-priority":"{{dataPriority}}","data-tooltip-offset-y":"{{dataTooltipOffsetY}}","data-tooltip-title":"{{tooltip-title}}",title:Z.B("player_tooltip_data_title_killswitch")?"{{title}}":""}:{"aria-disabled":"true","aria-haspopup":"true"};super(Z.B("delhi_modern_web_player")?{J:"div",Z:"ytp-mute-button",A:[{J:"button",W:N,BD:["ytp-volume-icon",
"ytp-button"],Da:"{{icon}}"}]}:{J:"button",BD:["ytp-mute-button","ytp-button"],W:N,A:[{J:"div",Z:"ytp-volume-icon",Da:"{{icon}}"}]});this.S=Z;this.U=null;this.G=this.vD=this.N=this.C=NaN;this.Rq=this.O=null;this.L=[];this.Y=[];this.visible=!1;this.D=this.V=this.zt=null;Z.B("delhi_modern_web_player")&&this.update({"data-priority":4});N=this.S.X();this.updateValue("icon",dm());this.tooltip=k.sb();this.updateValue("dataTooltipOffsetY",0);this.D=g.Mc("ytp-volume-icon",this.element);const a=this.S.B("delhi_modern_web_player_icons")?
{J:"svg",W:{height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",BD:["ytp-svg-fill","ytp-svg-volume-animation-speaker"],W:{d:"M 11.60 2.08 L 11.48 2.14 L 3.91 6.68 C 3.02 7.21 2.28 7.97 1.77 8.87 C 1.26 9.77 1.00 10.79 1 11.83 V 12.16 L 1.01 12.56 C 1.07 13.52 1.37 14.46 1.87 15.29 C 2.38 16.12 3.08 16.81 3.91 17.31 L 11.48 21.85 C 11.63 21.94 11.80 21.99 11.98 21.99 C 12.16 22.00 12.33 21.95 12.49 21.87 C 12.64 21.78 12.77 21.65 12.86 21.50 C 12.95 21.35 13 21.17 13 21 V 3 C 12.99 2.83 12.95 2.67 12.87 2.52 C 12.80 2.37 12.68 2.25 12.54 2.16 C 12.41 2.07 12.25 2.01 12.08 2.00 C 11.92 1.98 11.75 2.01 11.60 2.08 Z",
fill:"#fff"}},{J:"path",Z:"ytp-svg-volume-animation-small-ripple",W:{d:" M 15.53 7.05 C 15.35 7.22 15.25 7.45 15.24 7.70 C 15.23 7.95 15.31 8.19 15.46 8.38 L 15.53 8.46 L 15.70 8.64 C 16.09 9.06 16.39 9.55 16.61 10.08 L 16.70 10.31 C 16.90 10.85 17 11.42 17 12 L 16.99 12.24 C 16.96 12.73 16.87 13.22 16.70 13.68 L 16.61 13.91 C 16.36 14.51 15.99 15.07 15.53 15.53 C 15.35 15.72 15.25 15.97 15.26 16.23 C 15.26 16.49 15.37 16.74 15.55 16.92 C 15.73 17.11 15.98 17.21 16.24 17.22 C 16.50 17.22 16.76 17.12 16.95 16.95 C 17.6 16.29 18.11 15.52 18.46 14.67 L 18.59 14.35 C 18.82 13.71 18.95 13.03 18.99 12.34 L 19 12 C 18.99 11.19 18.86 10.39 18.59 9.64 L 18.46 9.32 C 18.15 8.57 17.72 7.89 17.18 7.3 L 16.95 7.05 L 16.87 6.98 C 16.68 6.82 16.43 6.74 16.19 6.75 C 15.94 6.77 15.71 6.87 15.53 7.05",
fill:"#fff"}},{J:"path",Z:"ytp-svg-volume-animation-big-ripple",W:{d:"M18.36 4.22C18.18 4.39 18.08 4.62 18.07 4.87C18.05 5.12 18.13 5.36 18.29 5.56L18.36 5.63L18.66 5.95C19.36 6.72 19.91 7.60 20.31 8.55L20.47 8.96C20.82 9.94 21 10.96 21 11.99L20.98 12.44C20.94 13.32 20.77 14.19 20.47 15.03L20.31 15.44C19.86 16.53 19.19 17.52 18.36 18.36C18.17 18.55 18.07 18.80 18.07 19.07C18.07 19.33 18.17 19.59 18.36 19.77C18.55 19.96 18.80 20.07 19.07 20.07C19.33 20.07 19.59 19.96 19.77 19.77C20.79 18.75 21.61 17.54 22.16 16.20L22.35 15.70C22.72 14.68 22.93 13.62 22.98 12.54L23 12C22.99 10.73 22.78 9.48 22.35 8.29L22.16 7.79C21.67 6.62 20.99 5.54 20.15 4.61L19.77 4.22L19.70 4.15C19.51 3.99 19.26 3.91 19.02 3.93C18.77 3.94 18.53 4.04 18.36 4.22 Z",
fill:"#fff"}}]}:{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},A:[{J:"defs",A:[{J:"clipPath",W:{id:"ytp-svg-volume-animation-mask"},A:[{J:"path",W:{d:"m 14.35,-0.14 -5.86,5.86 20.73,20.78 5.86,-5.91 z"}},{J:"path",W:{d:"M 7.07,6.87 -1.11,15.33 19.61,36.11 27.80,27.60 z"}},{J:"path",Z:"ytp-svg-volume-animation-mover",W:{d:"M 9.09,5.20 6.47,7.88 26.82,28.77 29.66,25.99 z"}}]},{J:"clipPath",W:{id:"ytp-svg-volume-animation-slash-mask"},A:[{J:"path",Z:"ytp-svg-volume-animation-mover",
W:{d:"m -11.45,-15.55 -4.44,4.51 20.45,20.94 4.55,-4.66 z"}}]}]},{J:"path",Rv:!0,BD:["ytp-svg-fill","ytp-svg-volume-animation-speaker"],W:{"clip-path":"url(#ytp-svg-volume-animation-mask)",d:"M8,21 L12,21 L17,26 L17,10 L12,15 L8,15 L8,21 Z M19,14 L19,22 C20.48,21.32 21.5,19.77 21.5,18 C21.5,16.26 20.48,14.74 19,14 Z",fill:"#fff"}},{J:"path",Rv:!0,BD:["ytp-svg-fill","ytp-svg-volume-animation-hider"],W:{"clip-path":"url(#ytp-svg-volume-animation-slash-mask)",d:"M 9.25,9 7.98,10.27 24.71,27 l 1.27,-1.27 Z",
fill:"#fff"}}]};this.U=new g.JO(a);g.u(this,this.U);this.O=this.U.Lp("ytp-svg-volume-animation-speaker");this.Rq=this.O.getAttribute("d");this.L=g.pg("ytp-svg-volume-animation-mover",this.U.element);this.S.B("delhi_modern_web_player_icons");this.Y=g.pg("ytp-svg-volume-animation-hider",this.U.element);this.S.B("delhi_modern_web_player_icons");this.tq=new ez;g.u(this,this.tq);this.Sm=new ez;g.u(this,this.Sm);this.K(Z,"appresize",this.dA);this.K(Z,"onVolumeChange",this.onVolumeChange);Z.B("delhi_modern_web_player")?
this.listen("click",this.MX):this.listen("click",this.j);N.FS?(Z.B("delhi_modern_web_player")&&!Z.B("delhi_modern_web_player_horizontal_volume_controls")&&(this.V=new pCe(Z,k),this.V.HD(this.element),g.u(this,this.V),this.K(this.D,"mouseover",this.xW),this.K(this.D,"focus",this.xW),this.K(this.D,"mouseout",this.FS),this.K(this.D,"blur",this.FS)),N=Z.B("delhi_modern_web_player")?this.D:this.element,this.addOnDisposeCallback(g.ua(k.sb(),N))):Jqy(this);this.message=null;Z.createClientVe(this.element,
this,28662);this.dA(Z.fF().getPlayerSize());this.setVolume(Z.getVolume(),Z.isMuted())}xW(){this.S.Ex()||(this.updateValue("dataTooltipOffsetY",-120),this.V?.U(),this.V?.G())}FS(){this.V?.D()}dA(Z){this.visible=Z.width>=300||!1;this.In(this.visible);this.S.logVisibility(this.element,this.visible&&this.Vz)}j(){this.S.X().FS?this.S.isMuted()?this.S.unMute():this.S.mute():J7(this.message,this.element,!0);this.S.logClick(this.element)}MX(Z){this.S.X().FS&&this.V?Z.target===this.D?this.S.Ex()&&!this.V?.L()?
this.V?.U():this.j():this.V?.U():this.j()}onVolumeChange(Z){this.setVolume(Z.volume,Z.muted)}setVolume(Z,k){var N=k?0:Z/100;Z=N===0?1:Z>50?1:0;if(this.N!==Z){const a=this.C;isNaN(a)?bJf(this,Z):dT(this.tq,T=>{bJf(this,a+(this.N-a)*T)},250);
this.N=Z}N=N===0?1:0;if(this.G!==N){const a=this.vD;isNaN(a)?MoU(this,N):dT(this.Sm,T=>{MoU(this,a+(this.G-a)*T)},250);
this.G=N}nTr(this,k)}Df(Z){super.Df(Z);this.S.logVisibility(this.element,this.visible&&Z)}},zmX=["M",19,",",11.29," C",21.89,",",12.15," ",24,",",14.83," ",24,",",18," C",24,",",21.17," ",21.89,",",23.85," ",19,",",24.71," L",19,",",24.77," C",21.89,",",23.85," ",24,",",21.17," ",24,",",18," C",24,",",14.83," ",21.89,",",12.15," ",19,",",11.29," L",19,",",11.29," Z"],UoR=["M",19,",",11.29," C",21.89,",",12.15," ",24,",",14.83," ",24,",",18," C",24,",",21.17," ",21.89,",",23.85," ",19,",",24.71," L",
19,",",26.77," C",23.01,",",25.86," ",26,",",22.28," ",26,",",18," C",26,",",13.72," ",23.01,",",10.14," ",19,",",9.23," L",19,",",11.29," Z"],pk0=18,Rmf=12,IQ=22,jT=12;g.RsT=class extends g.E{constructor(Z,k){super({J:"button",BD:["ytp-play-button","ytp-button"],W:{title:Z.B("player_tooltip_data_title_killswitch")?"{{title}}":"","data-tooltip-title":"{{tooltip-title}}","aria-keyshortcuts":"k","data-title-no-tooltip":"{{data-title-no-tooltip}}"},Da:"{{icon}}"});this.S=Z;this.V=null;this.transition=new ez;this.tooltip=k.sb();g.u(this,this.transition);Z.createClientVe(this.element,this,36842);Z.logVisibility(this.element,!0);this.K(Z,"fullscreentoggled",this.onVideoDataChange);
this.K(Z,"presentingplayerstatechange",this.onStateChange);this.K(Z,"videodatachange",this.onVideoDataChange);this.Qn(Z.getPlayerStateObject());this.listen("click",this.KD,this);this.addOnDisposeCallback(g.ua(k.sb(),this.element))}onStateChange(Z){this.Qn(Z.state)}Qn(Z){var k=g.jI(this.S.getVideoData());let N=!1;Z.isOrWillBePlaying()?Z=k?4:2:Z.V(2)?(Z=3,N=k):Z=1;this.element.disabled=N;if(this.V!==Z){k=null;switch(Z){case 2:k=g.fe(this.S,"Pause","k");this.update({"data-title-no-tooltip":"Pause"});
break;case 3:k="Replay";this.update({"data-title-no-tooltip":"Replay"});break;case 1:k=g.fe(this.S,"Play","k");this.update({"data-title-no-tooltip":"Play"});break;case 4:k="Stop playback",this.update({"data-title-no-tooltip":"Stop playback"})}Z===3?this.S.X().B("player_tooltip_data_title_killswitch")?this.update({title:k,icon:EU(this,Z)}):this.update({"tooltip-title":k,icon:EU(this,Z)}):(this.S.B("player_tooltip_data_title_killswitch")?this.update({title:k}):this.update({"tooltip-title":k}),(k=EU(this,
Z))&&this.V&&this.V!==3?pnf(this.transition,this.element,k):this.updateValue("icon",k));this.tooltip.qj();this.V=Z}}onVideoDataChange(){g.D(this.element,"ytp-play-button-playlist",g.v3(this.S))}KD(Z){this.S.logClick(this.element);if(this.S.getPlayerStateObject().isOrWillBePlaying())this.S.pauseVideo();else{if(this.S.isMinimized()&&this.S.getPlayerStateObject().isCued()){const k={};this.S.getVideoData()?.Pq&&(k.cttAuthInfo={token:this.S.getVideoData().Pq,videoId:this.S.getVideoData().videoId});OL("direct_playback",
k);this.S.tQ().timerName="direct_playback"}this.S.playVideo()}this.S.isMinimized()&&Z?.type==="click"&&this.element.blur()}Df(Z){super.Df(Z)}};g.ME=class extends g.E{constructor(Z,k,N){super({J:"a",BD:[N?"ytp-next-button":"ytp-prev-button","ytp-button"],W:{role:"button",title:"{{title}}","data-tooltip-title":"{{tooltip-title}}",href:"{{url}}","data-preview":"{{preview}}","data-tooltip-text":"{{text}}","data-duration":"{{duration}}","aria-disabled":"{{disabled}}","data-next":"{{next}}","data-prev":"{{prev}}","data-title-no-tooltip":"{{data-title-no-tooltip}}","aria-keyshortcuts":"{{aria-keyshortcuts}}",tabindex:"0"},A:[W2r(N,Z.B("delhi_modern_web_player_icons"))]});
this.S=Z;this.V=N;this.playlist=this.videoData=null;this.j=!1;this.Y=this.L=this.U=null;this.D=!1;this.tooltip=k.sb();N?Z.createClientVe(this.element,this,6193):Z.createClientVe(this.element,this,6194);this.K(Z,"fullscreentoggled",this.onVideoDataChange);this.K(Z,"videodatachange",this.onVideoDataChange);this.K(Z,"onPlaylistUpdate",this.onVideoDataChange);this.K(Z,"onLoopRangeChange",this.onVideoDataChange);this.V||this.K(Z,"appresize",this.G);this.K(Z,"mdxpreviousnextchange",()=>{WT(this);this.G()});
this.onVideoDataChange()}onVideoDataChange(){jg0(this);this.Y&&(this.Ce(this.Y),this.Y=null);this.videoData=this.S.getVideoData({playerType:1});if(this.playlist=this.S.getPlaylist())this.playlist.subscribe("shuffle",this.onVideoDataChange,this),this.Y=this.K(this.S,"progresssync",this.C);this.D=ETf(this);WT(this);this.G(this.S.fF().getPlayerSize())}G(Z=this.S.fF().getPlayerSize()){var k=this.S.getLoopRange()?.type==="clips";const N=g.v3(this.S)||this.V&&g.xn(this.S)&&!this.S.B("web_hide_next_button")||
Iyr(this),a=!this.V&&Z.width<400;Z=this.S.B("delhi_modern_web_player_horizontal_volume_controls")&&Z.width<640;k=N&&!k&&!a&&!Z;this.In(k);this.S.logVisibility(this.element,k)}onClick(Z){this.S.logClick(this.element);let k=!0;this.j?k=g.IC(Z,this.S):Z.preventDefault();k&&(this.V&&this.S.getPresentingPlayerType()===5?this.S.publish("ytoprerollinternstitialnext"):this.V?(wT(this.S.tQ()),this.S.publish("playlistnextbuttonclicked",this.element),this.S.nextVideo(!0)):this.D?this.S.seekTo(0):(wT(this.S.tQ()),
this.S.publish("playlistprevbuttonclicked",this.element),this.S.previousVideo(!0)))}C(){const Z=ETf(this);Z!==this.D&&(this.D=Z,WT(this))}YW(){this.U&&(this.U(),this.U=null);jg0(this);super.YW()}};var MZD=class extends g.E{constructor(Z,k){super({J:"div",Z:"ytp-fine-scrubbing",A:[{J:"div",Z:"ytp-fine-scrubbing-draggable",A:[{J:"div",Z:"ytp-fine-scrubbing-thumbnails",W:{tabindex:"0",role:"slider",type:"range","aria-label":"Click or scroll the panel for the precise seeking.","aria-valuemin":"{{ariamin}}","aria-valuemax":"{{ariamax}}","aria-valuenow":"{{arianow}}","aria-valuetext":"{{arianowtext}}"}}]},{J:"div",W:{"aria-hidden":"true"},Z:"ytp-fine-scrubbing-cursor"},{J:"div",Z:"ytp-fine-scrubbing-seek-time",
W:{"aria-hidden":"true"},Da:"{{seekTime}}"},{J:"div",Z:"ytp-fine-scrubbing-play",A:[Z.B("delhi_modern_web_player_icons")?AY():m9()],W:{title:"Play from this position",role:"button"}},{J:"div",Z:"ytp-fine-scrubbing-dismiss",A:[g.Th()],W:{title:"Exit precise seeking",role:"button"}}]});this.api=Z;this.L=this.Lp("ytp-fine-scrubbing-thumbnails");this.dismissButton=this.Lp("ytp-fine-scrubbing-dismiss");this.zt=this.Lp("ytp-fine-scrubbing-draggable");this.playButton=this.Lp("ytp-fine-scrubbing-play");this.thumbnails=
[];this.U=[];this.Rq=this.V=0;this.FS=void 0;this.N=NaN;this.tq=this.C=this.D=this.j=0;this.Y=[];this.interval=this.frameCount=0;this.G=160;this.scale=1;this.MX=0;this.isEnabled=this.dA=!1;Yv(this,this.api.getCurrentTime());this.addOnDisposeCallback(g.ua(k,this.dismissButton));this.addOnDisposeCallback(g.ua(k,this.playButton));this.xW=new g.tU(this.zt,!0);this.xW.subscribe("dragstart",this.Sm,this);this.xW.subscribe("dragmove",this.vD,this);this.xW.subscribe("dragend",this.Kp,this);this.K(Z,"SEEK_COMPLETE",
this.s6);Z.B("web_fix_fine_scrubbing_false_play")&&this.K(Z,"rootnodemousedown",N=>{this.O=N});
this.L.addEventListener("keydown",()=>{});
g.u(this,this.xW);this.api.createClientVe(this.element,this,153154);this.api.createClientVe(this.L,this,152789);this.api.createClientVe(this.dismissButton,this,153156);this.api.createClientVe(this.playButton,this,153155)}Qz(Z){this.Sm(Z.pageX);this.vD(Z.pageX+Z.deltaX);ZC(this)}Sm(Z){this.N=Z-this.Rq}vD(Z){Z-=this.Rq;!isNaN(this.N)&&this.thumbnails.length>0&&(this.C=Z-this.N,this.thumbnails.length>0&&this.C!==0&&(this.D=this.j+this.C,Z=ZBf(this,this.D),this.D<=this.V/2&&this.D>=YFN(this)?(this.api.seekTo(Z,
!1,void 0,void 0,25),g.ij(this.zt,"transform",`translateX(${this.D-this.V/2}px)`),Yv(this,Z)):this.D=this.j))}Kp(){this.O&&(this.O.JH=!0);var Z=(0,g.z)()-this.MX<300;if(Math.abs(this.C)<5&&!Z){this.MX=(0,g.z)();Z=this.N+this.C;const k=this.V/2-Z;this.Sm(Z);this.vD(Z+k);ZC(this);this.api.logClick(this.L)}ZC(this)}s6(){kk(this,this.api.getCurrentTime())}play(Z){this.api.seekTo(ZBf(this,this.D),void 0,void 0,void 0,26);this.api.playVideo();Z&&this.api.logClick(this.playButton)}onExit(Z){this.api.seekTo(this.tq,
void 0,void 0,void 0,63);this.api.playVideo();Z&&this.api.logClick(this.dismissButton)}qx(Z,k){this.Rq=Z;this.V=k;kk(this,this.api.getCurrentTime())}hq(Z){this.scale=Z?1.5:1}enable(){this.isEnabled||(this.isEnabled=!0,this.tq=this.api.getCurrentTime(),Yv(this,this.tq),g.D(this.api.getRootNode(),"ytp-fine-scrubbing-enable",this.isEnabled),this.FS=this.K(this.element,"wheel",this.Qz),this.logVisibility(this.isEnabled))}disable(){this.isEnabled=!1;this.hide();g.D(this.api.getRootNode(),"ytp-fine-scrubbing-enable",
this.isEnabled);this.FS&&this.Ce(this.FS);this.logVisibility(this.isEnabled)}reset(){this.disable();this.Y=[];this.dA=!1}logVisibility(Z){this.api.logVisibility(this.element,Z);this.api.logVisibility(this.L,Z);this.api.logVisibility(this.dismissButton,Z);this.api.logVisibility(this.playButton,Z)}YW(){for(;this.U.length;)this.U.pop()?.dispose();super.YW()}},kAX=class extends g.E{constructor(){super({J:"div",Z:"ytp-fine-scrubbing-thumbnail"})}},Nqy=class extends g.E{constructor(){super({J:"div",Z:"ytp-fine-scrubbing-chapter-title",
A:[{J:"div",Z:"ytp-fine-scrubbing-chapter-title-content",Da:"{{chapterTitle}}"}]})}};var ruR=class extends g.E{constructor(Z){super({J:"div",Z:"ytp-heat-map-chapter",A:[{J:"svg",Z:"ytp-heat-map-svg",W:{height:"100%",preserveAspectRatio:"none",version:"1.1",viewBox:"0 0 1000 100",width:"100%"},A:[{J:"defs",A:[{J:"clipPath",W:{id:"{{id}}"},A:[{J:"path",Z:"ytp-heat-map-path",W:{d:"",fill:"white"}}]},{J:"linearGradient",W:{gradientUnits:"userSpaceOnUse",id:"ytp-heat-map-gradient-def",x1:"0%",x2:"0%",y1:"0%",y2:"100%"},A:[{J:"stop",W:{offset:"0%","stop-color":"white","stop-opacity":"1"}},
{J:"stop",W:{offset:"100%","stop-color":"white","stop-opacity":"0"}}]}]},{J:"rect",Z:"ytp-heat-map-graph",W:{"clip-path":"url(#hm_1)",fill:"white","fill-opacity":"0.4",height:"100%",width:"100%",x:"0",y:"0"}},{J:"rect",Z:"ytp-heat-map-hover",W:{"clip-path":"url(#hm_1)",fill:"white","fill-opacity":"0.7",height:"100%",width:"100%",x:"0",y:"0"}},{J:"rect",Z:"ytp-heat-map-play",W:{"clip-path":"url(#hm_1)",height:"100%",x:"0",y:"0"}},{J:"path",Z:"ytp-modern-heat-map",W:{d:"",fill:"url(#ytp-heat-map-gradient-def)",
height:"100%",stroke:"white","stroke-opacity":"1","stroke-width":"2px",width:"100%",x:"0",y:"0"}}]}]});this.api=Z;this.j=this.Lp("ytp-heat-map-svg");this.L=this.Lp("ytp-heat-map-path");this.Y=this.Lp("ytp-heat-map-graph");this.G=this.Lp("ytp-heat-map-play");this.V=this.Lp("ytp-heat-map-hover");this.D=this.Lp("ytp-modern-heat-map");this.cG=!1;this.U=60;Z=`${g.By(this)}`;this.update({id:Z});Z=`url(#${Z})`;this.Y.setAttribute("clip-path",Z);this.G.setAttribute("clip-path",Z);this.V.setAttribute("clip-path",
Z)}N(Z){this.G.setAttribute("width",`${(Z*100).toFixed(2)}%`)}C(Z){this.V.setAttribute("width",`${(Z*100).toFixed(2)}%`)}};var QH0=class extends g.E{constructor(){super({J:"div",Z:"ytp-chapter-hover-container",A:[{J:"div",Z:"ytp-progress-bar-padding"},{J:"div",Z:"ytp-progress-list",A:[{J:"div",BD:["ytp-play-progress","ytp-swatch-background-color"]},{J:"div",Z:"ytp-progress-linear-live-buffer"},{J:"div",Z:"ytp-load-progress"},{J:"div",Z:"ytp-hover-progress"},{J:"div",Z:"ytp-ad-progress-list"}]}]});this.startTime=NaN;this.title="";this.index=NaN;this.width=0;this.U=this.Lp("ytp-progress-list");this.L=this.Lp("ytp-progress-linear-live-buffer");
this.Y=this.Lp("ytp-ad-progress-list");this.G=this.Lp("ytp-load-progress");this.j=this.Lp("ytp-play-progress");this.D=this.Lp("ytp-hover-progress");this.V=this.Lp("ytp-chapter-hover-container")}lq(Z){return Z==="PLAY_PROGRESS"?this.j:Z==="LOAD_PROGRESS"?this.G:Z==="LIVE_BUFFER"?this.L:this.D}};var nuD=class{constructor(){this.U=this.position=this.D=this.V=this.Y=this.width=NaN}update(Z,k,N=0,a=0){this.width=k;this.Y=N;this.V=k-N-a;this.position=g.u0(Z,N,N+this.V);this.D=this.position-N;this.U=this.D/this.V}};var HBr=class extends g.E{constructor(){super({J:"div",Z:"ytp-timed-marker"});this.V=this.timeRangeStartMillis=NaN;this.title="";this.onActiveCommand=void 0}};g.Iaa=class extends g.af{constructor(Z,k){super({J:"div",Z:"ytp-progress-bar-container",W:{"aria-disabled":"true"},A:[{J:"div",BD:["ytp-heat-map-container"],A:[{J:"div",Z:"ytp-heat-map-edu"}]},{J:"div",BD:["ytp-progress-bar"],W:{tabindex:"0",role:"slider","aria-label":"Seek slider","aria-valuemin":"{{ariamin}}","aria-valuemax":"{{ariamax}}","aria-valuenow":"{{arianow}}","aria-valuetext":"{{arianowtext}}"},A:[{J:"div",Z:"ytp-chapters-container"},{J:"div",Z:"ytp-timed-markers-container"},{J:"div",Z:"ytp-clip-start-exclude"},
{J:"div",Z:"ytp-clip-end-exclude"},{J:"div",Z:"ytp-scrubber-container",A:[{J:"div",BD:["ytp-scrubber-button","ytp-swatch-background-color"],A:[{J:"div",Z:"ytp-scrubber-pull-indicator"},{J:"img",BD:["ytp-decorated-scrubber-button"]}]}]}]},{J:"div",BD:["ytp-fine-scrubbing-container"],A:[{J:"div",Z:"ytp-fine-scrubbing-edu"}]},{J:"div",Z:"ytp-bound-time-left",Da:"{{boundTimeLeft}}"},{J:"div",Z:"ytp-bound-time-right",Da:"{{boundTimeRight}}"},{J:"div",Z:"ytp-clip-start",W:{title:"{{clipstarttitle}}"},Da:"{{clipstarticon}}"},
{J:"div",Z:"ytp-clip-end",W:{title:"{{clipendtitle}}"},Da:"{{clipendicon}}"}]});this.api=Z;this.KN=!1;this.j9=this.SK=this.Qz=this.xW=this.j=this.Oq=0;this.mq=null;this.gV=!1;this.MX={};this.iq={};this.clipEnd=Infinity;this.HA=this.Lp("ytp-clip-end");this.tW=new g.tU(this.HA,!0);this.FN=this.Lp("ytp-clip-end-exclude");this.rD=this.Lp("ytp-clip-start-exclude");this.clipStart=0;this.jY=this.Lp("ytp-clip-start");this.Ke=new g.tU(this.jY,!0);this.O=this.O6=0;this.progressBar=this.Lp("ytp-progress-bar");
this.pF={};this.Kp={};this.s6=this.Lp("ytp-chapters-container");this.LX=this.Lp("ytp-timed-markers-container");this.V=[];this.C=[];this.GF={};this.l9=null;this.vD=-1;this.qX=this.Sm=0;this.PG=this.N=null;this.A1=this.Lp("ytp-scrubber-button");this.dA=this.Lp("ytp-decorated-scrubber-button");this.FE=this.Lp("ytp-scrubber-container");this.Tt=new g.Of;this.ov=0;this.Vg=new nuD;this.D=new HE(0,0);this.vA=null;this.G=this.ix=!1;this.YH=null;this.zt=this.Lp("ytp-heat-map-container");this.LC=this.Lp("ytp-heat-map-edu");
this.Y=[];this.heatMarkersDecorations=[];this.hq=this.Lp("ytp-fine-scrubbing-container");this.NW=this.Lp("ytp-fine-scrubbing-edu");this.U=void 0;this.Rq=this.hI=this.tq=!1;this.tooltip=k.sb();this.addOnDisposeCallback(g.ua(this.tooltip,this.HA));g.u(this,this.tW);this.tW.subscribe("hoverstart",this.J$,this);this.tW.subscribe("hoverend",this.lk,this);this.K(this.HA,"click",this.Ap);this.addOnDisposeCallback(g.ua(this.tooltip,this.jY));g.u(this,this.Ke);this.Ke.subscribe("hoverstart",this.J$,this);
this.Ke.subscribe("hoverend",this.lk,this);this.K(this.jY,"click",this.Ap);qJb(this);this.K(Z,"resize",this.qx);this.K(Z,"presentingplayerstatechange",this.xU);this.K(Z,"videodatachange",this.FX);this.K(Z,"videoplayerreset",this.Ta);this.K(Z,"cuerangesadded",this.o8);this.K(Z,"cuerangesremoved",this.US);this.K(Z,"onLoopRangeChange",this.xd);this.K(Z,"innertubeCommand",this.onClickCommand);this.K(Z,"onRetroModeChanged",this.pH);this.K(Z,g.te("timedMarkerCueRange"),this.zC);this.K(Z,"updatemarkervisibility",
this.g0);this.K(Z,F1(Z.X().Yl())?"playbackChange":"serverstitchedvideochange",this.x9);this.updateVideoData(Z.getVideoData(),!0);this.xd(Z.getLoopRange());TQ(this)&&!this.U&&(this.U=new MZD(this.api,this.tooltip),Z=g.zU(this.element).x||0,this.U.qx(Z,this.j),this.U.HD(this.hq),g.u(this,this.U),this.K(this.U.dismissButton,"click",this.nE),this.K(this.U.playButton,"click",this.gD),this.K(this.U.element,"dblclick",this.gD));this.api.createClientVe(this.zt,this,139609,!0);this.api.createClientVe(this.LC,
this,140127,!0);this.api.createClientVe(this.NW,this,151179,!0);this.api.createClientVe(this.progressBar,this,38856,!0)}g0(){var Z=!1;const k=this.api.getVideoData();if(!k)return Z;this.api.jl("timedMarkerCueRange");Ku(this);for(const r of k.vD){var N=this.Kp[r]?.markerType,a=this.Kp[r]?.markers;if(!a)break;if(N==="MARKER_TYPE_TIMESTAMPS"){for(const C of a)Z=new HBr,N=C,Z.title=N.title?.simpleText||"",Z.timeRangeStartMillis=Number(N.startMillis),Z.V=Number(N.durationMillis),Z.onActiveCommand=N.onActive?.innertubeCommand??
void 0,XIy(this,Z);qh(this,this.C);Z=this.C;N=this.GF;var T=[],K=null;for(var y=0;y<Z.length;y++){var Q=Z[y].timeRangeStartMillis;if(!isNaN(Q)&&Z[y].onActiveCommand){var q=Z[y].V??1E4;K&&K.end>Q&&(K.end=Q);Q=ZJR(Q,Q+q);T.push(Q);K=Q;N[Q.id]=Z[y].onActiveCommand}}this.api.f8(T);a:{for(const C of a)if(C.sourceType==="SOURCE_TYPE_SMART_SKIP"){Z=!1;break a}Z=!0}Z&&(this.l9=this.Kp[r]);Z=!0}else if(N==="MARKER_TYPE_HEATMAP"){if((a=this.Kp[r])&&a.markers){N=a.markersMetadata?.heatmapMetadata?.minHeightDp??
0;T=a.markersMetadata?.heatmapMetadata?.maxHeightDp??60;K=this.V.length;y=null;for(Q=0;Q<K;Q++){q=this.V[Q].startTime;const C=Q===K-1?Infinity:this.V[Q+1].startTime;Q===this.Y.length&&Cc0(this);const m=[];y&&m.push(y);for(const A of a.markers){const P=Number(A.startMillis);P>=q&&P<=C&&m.push(A)}T>0&&(this.zt.style.height=`${T}px`);yuy(this.Y[Q],m,N,T,Q===0);m.length>0&&(y=m[m.length-1])}g.yE(this)}N=[];if(a=a.markersDecoration?.timedMarkerDecorations)for(const C of a)N.push({visibleTimeRangeStartMillis:C.visibleTimeRangeStartMillis??
-1,visibleTimeRangeEndMillis:C.visibleTimeRangeEndMillis??-1,decorationTimeMillis:C.decorationTimeMillis??NaN,label:C.label?g.YL(C.label):""});a=N;this.heatMarkersDecorations=a}}k.wz=this.C;g.D(this.element,"ytp-timed-markers-enabled",Z);return Z}qx(){g.yE(this);QE(this);qh(this,this.C);if(this.U){const Z=g.zU(this.element).x||0;this.U.qx(Z,this.j)}}pH(){const Z=this.api.getVideoData();Z&&lY0(this,Z)}onClickCommand(Z){if(Z=g.J(Z,FG)){const k=Z.key;Z.isVisible&&k&&rf(this,k)}}zC(Z){g.A7(this.api,"innertubeCommand",
this.GF[Z.id])}MW(){QE(this);const Z=this.api.getCurrentTime();(Z<this.clipStart||Z>this.clipEnd)&&this.Ap()}Kn(Z){if(!Z.defaultPrevented){let k=!1;switch(Z.keyCode){case 36:this.api.seekTo(0,void 0,void 0,void 0,79);k=!0;break;case 35:this.api.seekTo(Infinity,void 0,void 0,void 0,80);k=!0;break;case 34:this.api.seekBy(-60,void 0,void 0,76);k=!0;break;case 33:this.api.seekBy(60,void 0,void 0,75);k=!0;break;case 38:this.api.B("enable_key_press_seek_logging")&&FV(this,this.api.getCurrentTime(),this.api.getCurrentTime()+
5,"SEEK_SOURCE_SEEK_FORWARD_5S","INTERACTION_LOGGING_GESTURE_TYPE_KEY_PRESS");this.api.seekBy(5,void 0,void 0,72);k=!0;break;case 40:this.api.B("enable_key_press_seek_logging")&&FV(this,this.api.getCurrentTime(),this.api.getCurrentTime()-5,"SEEK_SOURCE_SEEK_BACKWARD_5S","INTERACTION_LOGGING_GESTURE_TYPE_KEY_PRESS"),this.api.seekBy(-5,void 0,void 0,71),k=!0}k&&Z.preventDefault()}}FX(Z,k){this.updateVideoData(k,Z==="newdata")}Ta(){this.FX("newdata",this.api.getVideoData())}updateVideoData(Z,k=!1){var N=
!!Z&&Z.cG();N&&(Z.dA()||cE(this)?this.ix=!1:this.ix=Z.allowLiveDvr,g.D(this.api.getRootNode(),"ytp-enable-live-buffer",!!Z?.dA()),lY0(this,Z));hU(this,this.api.uV());if(k){if(N){k=Z.clipEnd;this.clipStart=Z.clipStart;this.clipEnd=k;Lu(this);for(s7(this,this.O,this.O6);this.Y.length>0;)this.Y.pop().dispose();this.heatMarkersDecorations=[];this.pF={};this.U?.reset();u4(this);g.D(this.api.getRootNode(),"ytp-fine-scrubbing-exp",TQ(this))}else this.Ap();this.L()}if(Z){k=this.vA?.type==="clips";if(N=!Z.isLivePlayback){N=
this.api.getVideoData();var a=g.Zk(N);const y=sH0(N);N=a!=null||y!=null&&y.length>0||N.Ox?.length>0}if(N&&!k){k=this.api.getVideoData();a=g.Zk(k);N=!1;if(a?.markersMap){N=this.api.getVideoData();N.sN=a.visibleOnLoad?.key||N.sN;a=a.markersMap;for(var T of a)T.key&&T.value&&(this.pF[T.key]=T.value,T.value.onChapterRepeat&&(N.aA=T.value.onChapterRepeat));N.sN!=null&&rf(this,N.sN);N=!0}if(k.Ox?.length>0){T=g.tE.getState().entities;for(var K of k.Ox)if(a=WQ(T,K)?.markersList,a?.markerType==="MARKER_TYPE_TIMESTAMPS"||
a?.markerType==="MARKER_TYPE_HEATMAP")this.Kp[K]=a;N=this.g0()||N}!N&&(K=sH0(k))&&(PcX(this,K),k.ov=this.V,cuf(this));Dpf(this,null);Z.vy&&this.Y.length===0&&(Z=Z.vy,K=Z.key,Z.isVisible&&K&&rf(this,K))}else qJb(this),Ku(this)}QE(this)}xU(Z){this.N&&!Z.state.V(32)&&this.api.getPresentingPlayerType()!==3&&this.N.cancel();this.U?.isEnabled&&Z.state.V(8)&&this.api.pauseVideo();Z=this.api.getPresentingPlayerType()===2||!this.api.uV()||this.api.getPlayerState()===-1&&this.api.getCurrentTime()===0;g.D(this.A1,
"ytp-hide-scrubber-button",Z)}xd(Z){const k=!!this.vA!==!!Z,N=this.vA;this.vA=Z;Dpf(this,N);Z?.type!=="clips"&&Z||(Z?(this.updateValue("clipstarticon",eOX()),this.updateValue("clipendicon",eOX()),this.updateValue("clipstarttitle",null),this.updateValue("clipendtitle",null)):(this.updateValue("clipstarticon",iHy()),this.updateValue("clipendicon",vOb()),this.updateValue("clipstarttitle","Watch full video"),this.updateValue("clipendtitle","Watch full video")),k&&(this.updateVideoData(this.api.getVideoData(),
!0),g.yE(this)),Lu(this));s7(this,this.O,this.O6)}eL(){this.api.publish("progressBarHoverStart")}qY(Z,k,N){var a=g.zU(this.element),T=PE(this).V;const K=N?N.getAttribute("data-tooltip"):void 0;var y=N?N.getAttribute("data-position"):void 0,Q=N?N.getAttribute("data-offset-y"):void 0;Q=Q?Number(Q):0;y&&(Z=eM(this.D,Number(N.getAttribute("data-position")),0)*T+g.zU(this.progressBar).x);this.Tt.x=Z-a.x;this.Tt.y=k-a.y;Z=PE(this);a=l4(this,Z);k=0;this.api.getVideoData()?.dA()&&((k=this.api.getProgressState().seekableEnd)&&
a>k&&(a=k,Z.position=eM(this.D,k)*PE(this).V),k=this.D.U);cE(this)&&(k=this.D.U);k=K||g.Gh(this.ix?a-this.D.V:a-k);N=Z.position+this.Oq;a-=this.api.mx();if(!this.U?.isEnabled)if(this.api.Cn()){if(this.V.length>1){T=VE(this,this.Tt.x,!0);if(!this.vA)for(y=0;y<this.V.length;)g.D(this.V[y].V,"ytp-exp-chapter-hover-effect",y===T),y++;if(this.Y.length>1)for(y=0;y<this.V.length;y++)g.D(this.Y[y].element,"ytp-heatmap-hover",y===T)}if(this.C.length>0){T=this.Tt.x;for(var q of this.C)y=AU(this,q.timeRangeStartMillis/
(this.D.V*1E3),PE(this)),g.D(q.element,"ytp-timed-marker-hover",y<=T&&y+6>=T)}T=this.tooltip.scale;q=this.api.B("delhi_modern_web_player")?67:45;Q=(isNaN(Q)?0:Q)-q*T;this.api.B("web_key_moments_markers")?this.l9?(q=EYj(this.C,a*1E3),q=q!=null?this.C[q].title:""):(q=vT(this.V,a*1E3),q=this.V[q].title):(q=vT(this.V,a*1E3),q=this.V[q].title);q||(Q+=16*T);this.tooltip.scale===.6&&(g.fQ(this.api.X())?(Q=this.api.fF().getPlayerSize().height-225,T=this.api.B("delhi_modern_web_player")?70:110,Q=q?Q+T:Q+T+
16):Q=q?110:126);T=vT(this.V,a*1E3);this.vD=iBG(this,a,T)?T:iBG(this,a,T+1)?T+1:-1;g.D(this.api.getRootNode(),"ytp-progress-bar-snap",this.vD!==-1&&this.V.length>1);T=!1;for(var r of this.heatMarkersDecorations)y=a*1E3,y>=r.visibleTimeRangeStartMillis&&y<=r.visibleTimeRangeEndMillis&&(q=r.label,k=g.Gh(l4(this,Z)),T=!0);this.hI!==T&&(this.hI=T,this.api.logVisibility(this.LC,this.hI));g.D(this.api.getRootNode(),"ytp-progress-bar-decoration",T);r=160*this.tooltip.scale*2;T=q.length*(this.G?8.55:5.7);
T=T<=r?T:r;y=T<160*this.tooltip.scale;r=3;!y&&T/2>Z.position&&(r=1);!y&&T/2>this.j-Z.position&&(r=2);this.api.X().j&&(Q-=10);this.Y.length&&this.Y[0].cG&&(Q-=14*(this.G?2:1),this.tq||(this.tq=!0,this.api.logVisibility(this.zt,this.tq)));TQ(this)&&(this.U?.isEnabled||this.Qz>0)&&(Q-=this.U?.isEnabled?(this.G?135:90)-this.xW:this.Qz);Z=void 0;TQ(this)&&!this.api.B("web_player_hide_fine_scrubbing_edu")&&(Z="Pull up for precise seeking",this.Rq||(this.Rq=!0,this.api.logVisibility(this.NW,this.Rq)));this.tooltip.WC(N,
a,k,!!K,Q,q,r,Z)}else this.tooltip.WC(N,a,k,!!K,Q);g.jX(this.api.getRootNode(),"ytp-progress-bar-hover");h5f(this)}yI(){this.L();g.Wp(this.api.getRootNode(),"ytp-progress-bar-hover");this.tq&&(this.tq=!1,this.api.logVisibility(this.zt,this.tq));this.Rq&&(this.Rq=!1,this.api.logVisibility(this.NW,this.Rq));this.api.B("enable_smart_skip_player_controls_shown_on_web_increased_triggering_sensitivity")&&this.api.publish("progressBarHoverEnd")}nm(Z,k){const N=g.zU(this.element);this.ov=Z-N.x;TQ(this)&&
this.U&&(this.U.dA?kk(this.U,this.api.getCurrentTime()):aYf(this.U),this.U.show(),g.D(this.api.getRootNode(),"ytp-fine-scrubbing-enable",this.U.isEnabled));this.mq&&(this.mq.dispose(),this.mq=null);this.SK=k;this.j9=this.api.getCurrentTime();this.V.length>1&&this.vD!==-1?this.api.seekTo(this.V[this.vD].startTime/1E3,!1,void 0,void 0,7):this.api.seekTo(l4(this,PE(this)),!1,void 0,void 0,7);g.jX(this.element,"ytp-drag");(this.KN=this.api.getPlayerStateObject().isOrWillBePlaying())&&this.api.pauseVideo()}Ox(){if(TQ(this)&&
this.U){var Z=(this.G?135:90)-this.xW;this.Qz>=Z*.5?(this.U.enable(),kk(this.U,this.api.getCurrentTime()),vVb(this,Z)):u4(this)}if(this.api.getPlayerStateObject().V(32)||this.api.getPresentingPlayerType()===3)if(this.U?.isEnabled)this.api.pauseVideo();else{this.api.startSeekCsiAction();if(this.V.length>1&&this.vD!==-1)this.api.B("html5_enable_progress_bar_slide_seek_logging")&&FV(this,this.j9,this.V[this.vD].startTime/1E3,"SEEK_SOURCE_SLIDE_ON_SCRUBBER_BAR_CHAPTER","INTERACTION_LOGGING_GESTURE_TYPE_GENERIC_CLICK"),
this.api.seekTo(this.V[this.vD].startTime/1E3,void 0,void 0,void 0,7);else{Z=l4(this,PE(this));this.api.B("html5_enable_progress_bar_slide_seek_logging")&&FV(this,this.j9,Z,"SEEK_SOURCE_SLIDE_ON_SCRUBBER_BAR","INTERACTION_LOGGING_GESTURE_TYPE_GENERIC_CLICK");this.api.seekTo(Z,void 0,void 0,void 0,7);for(const k of this.heatMarkersDecorations)Z*1E3>=k.visibleTimeRangeStartMillis&&Z*1E3<=k.visibleTimeRangeEndMillis&&this.api.logClick(this.LC)}g.Wp(this.element,"ytp-drag");this.FS&&(this.dA.src=this.FS);
this.KN&&!this.api.getPlayerStateObject().V(2)&&this.api.playVideo()}}Vp(Z,k){const N=PE(this),a=l4(this,N);this.api.fF().BF||(N.position>this.ov+2?this.hp&&(this.dA.src=this.hp):N.position<this.ov-2?this.bq&&(this.dA.src=this.bq):this.FS&&(this.dA.src=this.FS),setTimeout(()=>{const T=g.zU(this.element).x||0;this.ov=Z-T},150));
this.api.seekTo(a,!1,void 0,void 0,7);TQ(this)&&this.U?.dA&&(kk(this.U,a),this.U.isEnabled||(this.Qz=g.u0(this.SK-k-10,0,(this.G?135:90)-this.xW),vVb(this,this.Qz)))}L(){this.tooltip.Gn()}J$(){this.vA||(this.updateValue("clipstarticon",OHr()),this.updateValue("clipendicon",OHr()),g.jX(this.element,"ytp-clip-hover"))}lk(){this.vA||(this.updateValue("clipstarticon",iHy()),this.updateValue("clipendicon",vOb()),g.Wp(this.element,"ytp-clip-hover"))}Ap(){this.clipStart=0;this.clipEnd=Infinity;Lu(this);
s7(this,this.O,this.O6)}o8(Z){for(const k of Z)if(k.visible){if(Z=k.getId(),!this.MX[Z]){const N=g.TU("DIV");k.tooltip&&N.setAttribute("data-tooltip",k.tooltip);this.MX[Z]=k;this.iq[Z]=N;g.nj(N,k.style);fY0(this,Z);this.api.X().B("disable_ad_markers_on_content_progress_bar")||this.V[0].Y.appendChild(N)}}else SJy(this,k)}US(Z){for(const k of Z)SJy(this,k)}nE(Z){this.U&&(this.U.onExit(Z!=null),u4(this))}gD(Z){this.U&&(this.U.play(Z!=null),u4(this))}x9(){hU(this,this.api.uV())}YW(){hU(this,!1);super.YW()}Jd(){return this.U}};var j2B=class extends g.E{constructor(Z,k){super({J:"button",BD:["ytp-remote-button","ytp-button"],W:{title:Z.B("player_tooltip_data_title_killswitch")?"Play on TV":"","data-tooltip-title":"Play on TV","aria-haspopup":"true","data-priority":"10"},Da:"{{icon}}"});this.S=Z;this.on=k;this.V=null;this.K(Z,"onMdxReceiversChange",this.aq);this.K(Z,"presentingplayerstatechange",this.aq);this.K(Z,"appresize",this.aq);Z.createClientVe(this.element,this,139118);this.aq();this.listen("click",this.U,this);la(Z,
this.element,this)}isActive(){return!!this.S.getOption("remote","casting")}aq(){var Z=!1;this.S.getOptions().includes("remote")&&(Z=this.S.getOption("remote","receivers").length>1);this.In(Z&&this.S.fF().getPlayerSize().width>=400);this.S.logVisibility(this.element,this.LF);let k=1;Z&&this.isActive()&&(k=2);if(this.V!==k){this.V=k;Z=this.S.B("delhi_modern_web_player_icons");switch(k){case 1:this.updateValue("icon",Z?{J:"svg",W:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",
W:{d:"M21 3H3C2.46 3 1.96 3.21 1.58 3.58C1.21 3.96 1 4.46 1 5V8C1.68 8.00 2.34 8.05 3 8.15V5H21V19H13.84C13.94 19.65 13.99 20.31 14 21H21C21.53 21 22.03 20.78 22.41 20.41C22.78 20.03 23 19.53 23 19V5C23 4.46 22.78 3.96 22.41 3.58C22.03 3.21 21.53 3 21 3ZM1 10V12C2.18 12 3.35 12.23 4.44 12.68C5.53 13.13 6.52 13.80 7.36 14.63C8.19 15.47 8.86 16.46 9.31 17.55C9.76 18.64 10 19.81 10 21H12C12 18.08 10.84 15.28 8.77 13.22C6.71 11.15 3.91 10 1 10ZM1 14V16C1.65 16 2.30 16.12 2.91 16.38C3.52 16.63 4.07 17.00 4.53 17.46C4.99 17.92 5.36 18.48 5.61 19.08C5.87 19.69 6 20.34 6 21H8C8 19.14 7.26 17.36 5.94 16.05C4.63 14.73 2.85 14 1 14ZM1 18V21H4C3.99 20.20 3.68 19.44 3.12 18.87C2.55 18.31 1.79 18.00 1 18Z",
fill:"white"}}]}:{J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},A:[{J:"path",Rv:!0,W:{d:"M27,9 L9,9 C7.9,9 7,9.9 7,11 L7,14 L9,14 L9,11 L27,11 L27,25 L20,25 L20,27 L27,27 C28.1,27 29,26.1 29,25 L29,11 C29,9.9 28.1,9 27,9 L27,9 Z M7,24 L7,27 L10,27 C10,25.34 8.66,24 7,24 L7,24 Z M7,20 L7,22 C9.76,22 12,24.24 12,27 L14,27 C14,23.13 10.87,20 7,20 L7,20 Z M7,16 L7,18 C11.97,18 16,22.03 16,27 L18,27 C18,20.92 13.07,16 7,16 L7,16 Z",fill:"#fff"}}]});break;case 2:this.updateValue("icon",
Z?{J:"svg",W:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{d:"M21.20 3.01C21.69 3.06 22.15 3.29 22.48 3.65C22.81 4.02 23.00 4.50 23 5V19L22.99 19.20C22.94 19.66 22.73 20.08 22.41 20.41C22.08 20.73 21.66 20.94 21.20 20.98L21 21H14C13.99 20.31 13.94 19.65 13.84 19H21V5H3V8.15C2.34 8.05 1.68 8.00 1 8V5C0.99 4.50 1.18 4.02 1.51 3.65C1.84 3.29 2.30 3.06 2.79 3.01L3 3H21L21.20 3.01ZM19 17V7H5V8.62C6.95 9.26 8.73 10.35 10.19 11.80C11.64 13.26 12.73 15.04 13.37 17H19ZM1 10V12C2.18 12 3.35 12.23 4.44 12.68C5.53 13.13 6.52 13.80 7.36 14.63C8.19 15.47 8.86 16.46 9.31 17.55C9.76 18.64 10 19.81 10 21H12C12 18.08 10.84 15.28 8.77 13.22C6.71 11.15 3.91 10 1 10ZM1 14V16C1.65 16 2.30 16.12 2.91 16.38C3.52 16.63 4.07 17.00 4.53 17.46C4.99 17.92 5.36 18.48 5.61 19.08C5.87 19.69 6 20.34 6 21H8C8 19.14 7.26 17.36 5.94 16.05C4.63 14.73 2.85 14 1 14ZM1 18V21H4C3.99 20.20 3.68 19.44 3.12 18.87C2.55 18.31 1.79 18.00 1 18Z",
fill:"white"}}]}:g.Boi())}g.D(this.element,"ytp-remote-button-active",this.isActive())}}U(){if(this.S.getOption("remote","quickCast"))this.S.setOption("remote","quickCast",!0);else{var Z=this.on,k=this.element;if(Z.Ga())Z.cA();else{Z.initialize();a:{for(N of Z.Vm.items)if(N.priority===1)break a;var N=null}N&&(N.open(),Z.Iv(k));Z.Iv(k)}}this.S.logClick(this.element)}};var EuK=class extends g.E{constructor(Z,k){super({J:"button",BD:["ytp-button","ytp-settings-button"],W:{"aria-expanded":"false","aria-haspopup":"true","aria-controls":IE(),title:Z.B("player_tooltip_data_title_killswitch")?"Settings":"","data-tooltip-title":"Settings","data-tooltip-target-id":"ytp-settings-button"},A:[Z.B("delhi_modern_web_player_icons")?{J:"svg",W:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{d:"M12.84 1H11.15C10.72 .99 10.30 1.14 9.95 1.40C9.60 1.66 9.35 2.02 9.23 2.44L9.19 2.61C9.11 3.00 8.96 3.38 8.73 3.71C8.51 4.04 8.22 4.33 7.89 4.55L7.75 4.64C7.37 4.85 6.96 4.98 6.53 5.02C6.11 5.06 5.68 5.01 5.27 4.87C4.86 4.73 4.42 4.73 4.00 4.86C3.59 5.00 3.23 5.26 2.99 5.62L2.89 5.77L2.05 7.23C1.82 7.63 1.73 8.10 1.81 8.55C1.88 9.01 2.12 9.43 2.47 9.73L2.58 9.84C3.15 10.39 3.50 11.15 3.50 12L3.49 12.16C3.47 12.56 3.37 12.95 3.19 13.31C3.01 13.67 2.77 13.99 2.47 14.26C2.12 14.56 1.88 14.98 1.81 15.43C1.73 15.89 1.82 16.36 2.05 16.76L2.89 18.22L2.99 18.37C3.24 18.73 3.59 18.99 4.01 19.13C4.42 19.26 4.86 19.26 5.27 19.12L5.42 19.07C5.81 18.96 6.21 18.93 6.61 18.98C7.01 19.03 7.40 19.15 7.75 19.36L7.89 19.44C8.22 19.66 8.51 19.95 8.73 20.28C8.96 20.61 9.11 20.99 9.19 21.38C9.28 21.84 9.52 22.24 9.88 22.54C10.24 22.83 10.69 23.00 11.15 23H12.84C13.30 23.00 13.75 22.83 14.11 22.54C14.47 22.24 14.71 21.84 14.80 21.38C14.89 20.96 15.06 20.56 15.31 20.21C15.55 19.86 15.88 19.57 16.25 19.36L16.39 19.28C16.75 19.10 17.14 18.99 17.54 18.96C17.94 18.94 18.34 18.99 18.72 19.12L18.89 19.17C19.31 19.27 19.75 19.24 20.15 19.07C20.55 18.90 20.88 18.60 21.10 18.23L21.95 16.76C22.18 16.36 22.26 15.89 22.19 15.43C22.11 14.98 21.88 14.56 21.53 14.26C21.23 13.99 20.98 13.67 20.80 13.31C20.63 12.95 20.52 12.56 20.50 12.16L20.50 12C20.50 11.57 20.59 11.14 20.77 10.75C20.94 10.36 21.20 10.01 21.53 9.73C21.88 9.43 22.11 9.01 22.19 8.55C22.26 8.10 22.18 7.63 21.95 7.23L21.10 5.76C20.88 5.39 20.55 5.09 20.15 4.92C19.76 4.75 19.31 4.72 18.89 4.82L18.72 4.87C18.34 5.00 17.94 5.05 17.54 5.03C17.14 5.00 16.75 4.89 16.4 4.71L16.25 4.63C15.88 4.42 15.56 4.13 15.31 3.78C15.06 3.43 14.89 3.03 14.80 2.61C14.71 2.15 14.47 1.74 14.11 1.45C13.75 1.16 13.30 .99 12.84 1ZM11.15 3H12.84C12.98 3.70 13.26 4.36 13.68 4.94C14.09 5.52 14.63 6.01 15.25 6.37C15.87 6.72 16.55 6.94 17.26 7.01C17.97 7.08 18.69 6.99 19.37 6.76L20.21 8.23C19.67 8.69 19.24 9.27 18.94 9.92C18.65 10.57 18.50 11.28 18.5 12C18.50 12.71 18.65 13.42 18.95 14.07C19.24 14.72 19.67 15.29 20.21 15.76L19.37 17.23C18.69 16.99 17.97 16.91 17.26 16.98C16.55 17.05 15.86 17.27 15.25 17.63C14.63 17.98 14.09 18.47 13.68 19.05C13.26 19.63 12.98 20.29 12.84 21H11.15C11.01 20.29 10.73 19.63 10.31 19.05C9.90 18.47 9.36 17.98 8.75 17.62C8.13 17.27 7.44 17.05 6.73 16.98C6.02 16.91 5.30 16.99 4.62 17.23L3.78 15.76C4.32 15.29 4.75 14.71 5.05 14.06C5.34 13.41 5.49 12.71 5.5 12C5.50 11.28 5.34 10.57 5.05 9.92C4.75 9.27 4.32 8.69 3.78 8.23L4.62 6.76C5.30 7.00 6.02 7.08 6.73 7.01C7.44 6.94 8.13 6.72 8.75 6.37C9.36 6.01 9.90 5.52 10.31 4.94C10.73 4.36 11.01 3.70 11.15 3ZM12.00 8C10.94 8 9.92 8.42 9.17 9.17C8.42 9.92 8.00 10.93 8.00 12C8.00 13.06 8.42 14.07 9.17 14.82C9.92 15.57 10.94 16 12.00 16C13.06 16 14.08 15.57 14.83 14.82C15.58 14.07 16.00 13.06 16.00 12C16.00 10.93 15.58 9.92 14.83 9.17C14.08 8.42 13.06 8 12.00 8ZM12.00 10H12L12.20 10.01C12.69 10.06 13.15 10.29 13.48 10.65C13.81 11.02 14.00 11.50 14 12L13.99 12.20C13.95 12.58 13.80 12.95 13.55 13.25C13.31 13.55 12.98 13.78 12.62 13.90C12.25 14.02 11.85 14.03 11.48 13.93C11.11 13.83 10.77 13.62 10.51 13.34C10.25 13.05 10.08 12.69 10.02 12.31C9.96 11.93 10.01 11.54 10.17 11.18C10.32 10.83 10.58 10.53 10.91 10.32C11.23 10.11 11.61 10.00 12 10",
fill:"white"}}]}:g.cm()]});this.S=Z;this.on=k;this.U=!0;this.listen("click",this.D);this.K(Z,"onPlaybackQualityChange",this.updateBadge);this.K(Z,"videodatachange",this.updateBadge);this.K(Z,"webglsettingschanged",this.updateBadge);this.K(Z,"appresize",this.V);la(Z,this.element,this);this.S.createClientVe(this.element,this,28663);this.updateBadge();this.V(Z.fF().getPlayerSize())}V(Z){const k=this.S.X();let N=400;k.G?N=300:k.j&&(N=200);Z=this.U&&Z.width>=N;this.In(Z);this.S.logVisibility(this.element,
Z)}D(){if(this.on.LF)this.on.cA();else{const Z=g.pY(this.S.GZ());Z&&!Z.loaded&&(Z.kd("tracklist",{includeAsr:!0}).length||Z.load());this.S.logClick(this.element);this.on.Iv(this.element)}}updateBadge(){const Z=this.S.isHdr();var k=this.S.getPresentingPlayerType(),N=k!==2&&k!==3,a=g.wv(this.S),T=N&&!!g.gv(this.S.GZ());k=T&&a.displayMode===1;a=T&&a.displayMode===2;N=(T=k||a)||!N?null:this.S.getPlaybackQuality();g.D(this.element,"ytp-hdr-quality-badge",Z);g.D(this.element,"ytp-hd-quality-badge",!Z&&
(N==="hd1080"||N==="hd1440"));g.D(this.element,"ytp-4k-quality-badge",!Z&&N==="hd2160");g.D(this.element,"ytp-5k-quality-badge",!Z&&N==="hd2880");g.D(this.element,"ytp-8k-quality-badge",!Z&&N==="highres");g.D(this.element,"ytp-3d-badge-grey",!Z&&T&&k);g.D(this.element,"ytp-3d-badge",!Z&&T&&a)}};var WiB=class extends g.GP{constructor(Z,k,N){if(Z.B("web_add_footer_template_to_audio_track")){var a="Edit your $BEGIN_LINKpreferred languages$END_LINK in settings".split(/\$(BEGIN|END)_LINK/);a={J:"div",Z:"ytp-panel-footer-content",A:[a[0],{J:"a",Z:"ytp-panel-footer-content-link",W:{href:"/account_playback"},Da:a[2]},a[4]]}}super("Audio track",g.HH.AUDIO,Z,k,void 0,void 0,a);this.S=Z;this.L=N;this.tracks={};g.jX(this.element,"ytp-audio-menu-item");this.countLabel=new g.E({J:"div",A:[{J:"span",Da:"Audio track"},
{J:"span",Z:"ytp-menuitem-label-count",Da:"{{content}}"}]});Z.B("web_settings_menu_icons")&&!this.S.B("html5_enable_new_audio_settings_menu")&&(k=Z.B("delhi_modern_web_player_icons")?{J:"svg",W:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{d:"M19.4 .2C19.29 .27 19.20 .37 19.13 .49C19.07 .60 19.02 .72 19.01 .85C18.99 .98 18.99 1.12 19.03 1.24C19.06 1.37 19.12 1.49 19.2 1.6L20.8 .4C20.64 .18 20.40 .04 20.14 .01C19.87 -0.02 19.61 .04 19.4 .2ZM20.8 .4L20 1L19.2 1.59C20.37 3.16 21.00 5.06 21.00 7.01C20.99 8.97 20.35 10.87 19.17 12.42C19.01 12.64 18.94 12.90 18.98 13.16C19.02 13.43 19.16 13.66 19.37 13.83C19.58 13.99 19.84 14.05 20.11 14.02C20.37 13.98 20.61 13.84 20.77 13.63C22.21 11.73 22.99 9.41 23 7.02C23.00 4.63 22.23 2.31 20.8 .4ZM10 2C8.67 2 7.40 2.52 6.46 3.46C5.52 4.40 5 5.67 5 7C5 8.32 5.52 9.59 6.46 10.53C7.40 11.47 8.67 12 10 12C11.32 12 12.59 11.47 13.53 10.53C14.47 9.59 15 8.32 15 7C15 5.67 14.47 4.40 13.53 3.46C12.59 2.52 11.32 2 10 2ZM16.17 2.29C15.97 2.48 15.86 2.73 15.86 2.99C15.85 3.26 15.95 3.51 16.14 3.71C16.98 4.58 17.44 5.68 17.49 6.80L17.5 7.02C17.49 8.22 17.01 9.40 16.10 10.32C15.92 10.51 15.83 10.77 15.83 11.03C15.84 11.29 15.95 11.53 16.13 11.71C16.32 11.90 16.57 12.00 16.83 12.00C17.09 12.00 17.34 11.90 17.53 11.72C18.78 10.44 19.49 8.77 19.5 7.03L19.49 6.71C19.42 5.09 18.74 3.53 17.58 2.32C17.49 2.23 17.38 2.15 17.26 2.10C17.14 2.05 17.01 2.02 16.88 2.01C16.75 2.01 16.62 2.03 16.49 2.08C16.37 2.13 16.26 2.20 16.17 2.29ZM10 4C10.39 4 10.78 4.07 11.14 4.22C11.51 4.37 11.84 4.60 12.12 4.87C12.39 5.15 12.62 5.48 12.77 5.85C12.92 6.21 13 6.60 13 7C13 7.39 12.92 7.78 12.77 8.14C12.62 8.51 12.39 8.84 12.12 9.12C11.84 9.39 11.51 9.62 11.14 9.77C10.78 9.92 10.39 10 10 10C9.20 10 8.44 9.68 7.87 9.12C7.31 8.55 7 7.79 7 7C7 6.20 7.31 5.44 7.87 4.87C8.44 4.31 9.20 4 10 4ZM10.39 13.01L10 13C8.01 12.99 6.10 13.73 4.63 15.06L4.34 15.34C3.60 16.08 3.01 16.96 2.60 17.93C2.20 18.90 1.99 19.94 2 21C2 21.26 2.10 21.51 2.29 21.70C2.48 21.89 2.73 22 3 22C3.26 22 3.51 21.89 3.70 21.70C3.89 21.51 4 21.26 4 21C4.00 19.40 4.63 17.88 5.75 16.75L5.97 16.55C7.07 15.55 8.51 15 10 15L10.29 15.00C11.78 15.08 13.18 15.70 14.24 16.75L14.44 16.97C15.44 18.07 16 19.51 16 21C16 21.26 16.10 21.51 16.29 21.70C16.48 21.89 16.73 22 17 22C17.26 22 17.51 21.89 17.70 21.70C17.89 21.51 18 21.26 18 21C18.00 19.01 17.26 17.10 15.93 15.63L15.65 15.34C14.25 13.93 12.37 13.10 10.39 13.01Z",
fill:"white"}}]}:{J:"svg",W:{height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{d:"M11.72,11.93C13.58,11.59,15,9.96,15,8c0-2.21-1.79-4-4-4C8.79,4,7,5.79,7,8c0,1.96,1.42,3.59,3.28,3.93 C4.77,12.21,2,15.76,2,20h18C20,15.76,17.23,12.21,11.72,11.93z            M8,8c0-1.65,1.35-3,3-3s3,1.35,3,3s-1.35,3-3,3S8,9.65,8,8z            M11,12.9c5.33,0,7.56,2.99,7.94,6.1H3.06C3.44,15.89,5.67,12.9,11,12.9z            M16.68,11.44l-0.48-0.88C17.31,9.95,18,8.77,18,7.5 c0-1.27-0.69-2.45-1.81-3.06l0.49-0.88C18.11,4.36,19,5.87,19,7.5C19,9.14,18.11,10.64,16.68,11.44z            M18.75,13.13l-0.5-0.87 C19.95,11.28,21,9.46,21,7.5s-1.05-3.78-2.75-4.76l0.5-0.87C20.75,3.03,22,5.19,22,7.5S20.76,11.97,18.75,13.13z",
fill:"white"}}]},this.setIcon(k));g.u(this,this.countLabel);g.UK(this,this.countLabel);Z.createClientVe(this.element,this,273318);this.listen("click",this.onClick);this.K(Z,"videodatachange",this.aq);this.K(Z,"onPlaybackAudioChange",this.aq);this.aq()}aq(){var Z=this.S.getAvailableAudioTracks();if(Z.length>1){const k=Z.filter(a=>a.isAutoDubbed()),N=Z.filter(a=>!a.isAutoDubbed()).map(this.G);
k.length>0&&(this.S.U6("ad_grp",{ad_c:k.length,t_c:Z.length}),N.push(new Dsf),N.push(...k.map(this.G)));Oni(this,N);this.tracks=g.fK(Z,this.G,this);this.countLabel.setContent(Z.length?` (${Z.length})`:"");this.publish("size-change");Z=this.G(this.S.getAudioTrack());this.U(Z);this.S.B("html5_enable_new_audio_settings_menu")&&this.L?.gm(Z.toString());this.enable(!0)}else this.S.B("html5_enable_new_audio_settings_menu")&&this.L?.gm(""),this.enable(!1)}V(Z){super.V(Z);Z=this.tracks[Z];this.S.setAudioTrack(Z);
this.on.gr();this.S.U6("ad_sel",{lang:Z.ZF.id})}G(Z){return Z.toString()}j(Z){this.S.B("html5_enable_new_audio_settings_menu")?this.L&&(Z?this.L.OH(this):this.L.Bq(this)):super.j(Z)}onClick(){this.S.logClick(this.element)}};var YDB=class extends g.y9{constructor(Z,k){super(g.zn({"aria-haspopup":"true"},["ytp-audio-settings-menu-item"]),g.HH.Ck);this.S=Z;this.on=k;g.jX(this.element,"ytp-audio-settings-menu-item");this.cI=new g.$m(Z,void 0,"Audio");this.countLabel=new g.E({J:"div",A:[{J:"span",Da:"Audio"},{J:"span",Z:"ytp-menuitem-label-count",Da:"{{content}}"}]});Z.B("web_settings_menu_icons")&&this.setIcon({J:"svg",W:{height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{d:"M17.5,12c0,2.14-1.5,3.92-3.5,4.38v-1.04c1.44-0.43,2.5-1.76,2.5-3.34c0-1.58-1.06-2.9-2.5-3.34V7.62 C16,8.08,17.5,9.86,17.5,12z M12,4.07v15.86L6.16,15H3V9h3.16L12,4.07z M11,6.22L6.52,10H4v4h2.52L11,17.78V6.22z M21,12 c0,4.08-3.05,7.44-7,7.93v-1.01c3.39-0.49,6-3.4,6-6.92s-2.61-6.43-6-6.92V4.07C17.95,4.56,21,7.92,21,12z",
fill:"white"}}]});this.DX=new WiB(Z,this.on,this);g.u(this,this.DX);this.K(Z,"settingsMenuInitialized",this.bb.bind(this));this.K(Z,"videodatachange",this.bb.bind(this));g.u(this,this.countLabel);g.UK(this,this.countLabel);this.on.OH(this);this.K(Z,"onPlaybackAudioChange",this.V_);this.listen("keydown",this.Kn);this.listen("click",this.open)}V_(){this.S.V_()}open(){this.cI.Va()>0&&g.KY(this.on,this.cI)}bb(){this.cI.Va()>0&&this.S.getPresentingPlayerType()!==2&&this.S.getPresentingPlayerType()!==3?
this.element.removeAttribute("aria-disabled"):this.element.setAttribute("aria-disabled","true")}Kn(Z){Z.defaultPrevented||(this.open(),Z.preventDefault())}OH(Z){this.cI.OH(Z)}Bq(Z){this.cI.Bq(Z)}gm(Z){this.setContent(Z)}};var ZgJ=class extends XO{constructor(Z,k){super("Autoplay",g.HH.MC);this.S=Z;this.on=k;this.U=!1;this.D=[];this.K(Z,"presentingplayerstatechange",this.bb);this.subscribe("select",this.onSelect,this);Z.createClientVe(this.element,this,113682);this.bb()}bb(){var Z=this.S.getPresentingPlayerType();if(Z!==2&&Z!==3&&g.xn(this.S))this.U||(this.on.OH(this),this.U=!0,this.D.push(this.K(this.S,"videodatachange",this.bb)),this.D.push(this.K(this.S,"videoplayerreset",this.bb)),this.D.push(this.K(this.S,"onPlaylistUpdate",
this.bb)),this.D.push(this.K(this.S,"autonavchange",this.Y)),Z=this.S.getVideoData(),this.Y(Z.autonavState),this.S.logVisibility(this.element,this.U));else if(this.U){this.on.Bq(this);this.U=!1;for(const k of this.D)this.Ce(k)}}Y(Z){this.V(Z!==1)}onSelect(Z){this.S.Gu(Z?2:1);this.U&&(this.S.logVisibility(this.element,this.U),this.S.logClick(this.element))}YW(){this.U&&this.on.Bq(this);super.YW()}};var kmH=class extends g.y9{constructor(Z,k){super(g.zn({"aria-haspopup":"false"}),0,"More options");this.S=Z;this.on=k;this.K(this.element,"click",this.onClick);this.on.OH(this)}onClick(Z){Z.preventDefault();g.Vn(this.S)?.Z1()?.cA();g.Vn(this.S)?.Z_()?.Iv(Z.target)}};var NJc=class extends g.GP{constructor(Z,k){let N;g.fQ(Z.X())&&(N={J:"div",Z:"ytp-panel-footer-content",A:[{J:"span",Da:"Adjust download quality from your "},{J:"a",Z:"ytp-panel-footer-content-link",Da:"Settings",W:{href:"/account_downloads"}}]});super("Quality",g.HH.tF,Z,k,void 0,void 0,N);this.S=Z;this.tq={};this.xW={};this.G={};this.MX=new Set;this.L=this.O=!1;this.zt="unknown";this.dA="";this.Sm=new g.wy;g.u(this,this.Sm);this.O=this.S.B("web_player_use_new_api_for_quality_pullback");this.L=this.S.B("web_player_enable_premium_hbr_playback_cap");
Z.B("web_settings_menu_icons")&&(k=Z.B("delhi_modern_web_player_icons")?{J:"svg",W:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{d:"M9 3C8.11 2.99 7.25 3.29 6.54 3.83C5.84 4.38 5.34 5.14 5.12 6H3C2.73 6 2.48 6.10 2.29 6.29C2.10 6.48 2 6.73 2 7C2 7.26 2.10 7.51 2.29 7.70C2.48 7.89 2.73 8 3 8H5.12C5.34 8.85 5.84 9.61 6.55 10.16C7.25 10.70 8.11 10.99 9 10.99C9.88 10.99 10.74 10.70 11.44 10.16C12.15 9.61 12.65 8.85 12.87 8H21C21.26 8 21.51 7.89 21.70 7.70C21.89 7.51 22 7.26 22 7C22 6.73 21.89 6.48 21.70 6.29C21.51 6.10 21.26 6 21 6H12.87C12.65 5.14 12.15 4.38 11.45 3.83C10.74 3.29 9.88 2.99 9 3ZM9 5C9.53 5 10.03 5.21 10.41 5.58C10.78 5.96 11 6.46 11 7C11 7.53 10.78 8.03 10.41 8.41C10.03 8.78 9.53 9 9 9C8.46 9 7.96 8.78 7.58 8.41C7.21 8.03 7 7.53 7 7C7 6.46 7.21 5.96 7.58 5.58C7.96 5.21 8.46 5 9 5ZM15 13C14.11 12.99 13.25 13.29 12.54 13.83C11.84 14.38 11.34 15.14 11.12 16H3C2.73 16 2.48 16.10 2.29 16.29C2.10 16.48 2 16.73 2 17C2 17.26 2.10 17.51 2.29 17.70C2.48 17.89 2.73 18 3 18H11.12C11.34 18.85 11.84 19.61 12.55 20.16C13.25 20.70 14.11 20.99 15 20.99C15.88 20.99 16.74 20.70 17.44 20.16C18.15 19.61 18.65 18.85 18.87 18H21C21.26 18 21.51 17.89 21.70 17.70C21.89 17.51 22 17.26 22 17C22 16.73 21.89 16.48 21.70 16.29C21.51 16.10 21.26 16 21 16H18.87C18.65 15.14 18.15 14.38 17.45 13.83C16.74 13.29 15.88 12.99 15 13ZM15 15C15.53 15 16.03 15.21 16.41 15.58C16.78 15.96 17 16.46 17 17C17 17.53 16.78 18.03 16.41 18.41C16.03 18.78 15.53 19 15 19C14.46 19 13.96 18.78 13.58 18.41C13.21 18.03 13 17.53 13 17C13 16.46 13.21 15.96 13.58 15.58C13.96 15.21 14.46 15 15 15Z",
fill:"white"}}]}:{J:"svg",W:{height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{d:"M15,17h6v1h-6V17z M11,17H3v1h8v2h1v-2v-1v-2h-1V17z M14,8h1V6V5V3h-1v2H3v1h11V8z            M18,5v1h3V5H18z M6,14h1v-2v-1V9H6v2H3v1 h3V14z M10,12h11v-1H10V12z",fill:"white"}}]},this.setIcon(k));g.jX(this.cI.element,"ytp-quality-menu");this.K(Z,"videodatachange",this.bb);this.K(Z,"videoplayerreset",this.bb);this.K(Z,"onPlaybackQualityChange",this.Rq);this.bb();Z.createClientVe(this.element,this,137721)}bb(){var Z=
this.S.getPresentingPlayerType();if(Z!==2&&Z!==3){this.tq=this.S.wR();Z=this.S.getAvailableQualityLevels();if(this.L){this.G={};var k=g.H3(this.S,"getAvailableQualityData",[]);for(var N of k)this.G[N.qualityLabel]=N;k=Object.keys(this.G);Z[Z.length-1]==="auto"&&k.push("auto");this.MX=new Set(Z)}else if(this.O){N=g.H3(this.S,"getAvailableQualityData",[]);var a=[];for(k of N)this.xW[k.quality]=k,k.quality&&a.push(k.quality);Z[Z.length-1]==="auto"&&a.push("auto");k=a}else k=Z;g.wzX(this.S)&&this.S.zB()&&
k.unshift("missing-qualities");{a=this.S.app.wA();const T=a.getVideoData();!T.U||!T.U.video||T.U.video.qualityOrdinal<1080||T.Hx?Z=!1:(Z=/^qsa/.test(T.clientPlaybackNonce),N="r",T.U.id.indexOf(";")>=0&&(Z=/^[a-p]/.test(T.clientPlaybackNonce),N="x"),Z?(a.U6("iqss",{trigger:N},!0),Z=!0):Z=!1)}Z&&k.unshift("inline-survey");this.Y(k);Z=this.S.getVideoData().cotn?!0:!1;N=this.Sm.LN();vcG(this,VV0(this.S.X(),Z,N));if(k.length){this.Rq();this.enable(!0);return}}this.enable(!1)}Rq(){if(this.L){var Z=this.S.getPreferredQuality();
this.MX.has(Z)&&(this.zt=this.S.getPlaybackQuality(),this.dA=this.S.getPlaybackQualityLabel(),Z==="auto"?(this.U(Z),this.setContent(this.D(Z))):this.U(this.dA))}else Z=this.S.getPreferredQuality(),this.options[Z]&&(this.zt=this.S.getPlaybackQuality(),this.U(Z),Z==="auto"&&this.setContent(this.D(Z)))}V(Z){if(Z!=="missing-qualities"){super.V(Z);var k=this.L?this.G[Z]:this.xW[Z];var N=k?.quality,a=k?.formatId;k=k?.paygatedQualityDetails;var T=k?.endpoint;k&&this.S.logClick(this.options[Z]?.element);
if(this.L){if(g.J(T,EDf)?.popup?.notificationActionRenderer)g.A7(this.S,"innertubeCommand",T);else if(T){g.A7(this.S,"innertubeCommand",T);return}a?this.S.setPlaybackQuality(N,a):this.S.setPlaybackQuality(N)}else{if(this.O)if(g.J(T,EDf)?.popup?.notificationActionRenderer)g.A7(this.S,"innertubeCommand",T);else if(T){g.A7(this.S,"innertubeCommand",T);return}this.S.setPlaybackQuality(Z)}this.on.cA();this.bb()}}open(){for(const Z of Object.values(this.options))this.S.hasVe(Z?.element)&&this.S.logVisibility(Z?.element,
!0);super.open();this.S.logClick(this.element)}N(Z,k,N){if(Z==="missing-qualities")return new g.y9({J:"a",BD:["ytp-menuitem"],W:{href:"https://support.google.com/youtube/?p=missing_quality",target:this.S.X().N,tabindex:"0",role:"menuitemradio"},A:[{J:"div",BD:["ytp-menuitem-label"],Da:"{{label}}"}]},k,this.D(Z));if(Z!=="inline-survey"){var a=(this.L?this.G[Z]:this.xW[Z])?.paygatedQualityDetails,T=a?.veType;a=a?.trackingParams;k=super.N(Z,k,N);a?(this.S.createServerVe(k.element,this,!0),this.S.setTrackingParams(k.element,
a)):T&&this.S.createClientVe(k.element,this,T,!0);return k}T=[{J:"span",Da:"Looks good?"}];for(const K of[!0,!1])Z=new g.E({J:"span",Z:"ytp-menuitem-inline-survey-response",A:[K?S_y():wlU()],W:{tabindex:"0",role:"button"}}),Z.listen("click",()=>{const y=this.S.app.wA();y.U6("iqsr",{tu:K});y.getVideoData().Hx=!0;this.on.cA();this.bb()}),T.push(Z);
return new g.y9({J:"div",Z:"ytp-menuitem",W:{"aria-disabled":"true"},A:[{J:"div",BD:["ytp-menuitem-label"],A:T}]},k)}D(Z,k=!1){if(Z==="missing-qualities")return{J:"div",Da:"Missing options?"};if(Z==="inline-survey")return"";this.L||g.ei(g.OFy,Z);let N;N=this.O||this.L?[DC(this,Z,k,!1)]:[oVb(this,Z)];const a=this.S.getPreferredQuality();k||a!=="auto"||Z!=="auto"||(N.push(" "),this.L?N.push(DC(this,this.dA,k,!0,["ytp-menu-label-secondary"])):this.O?N.push(DC(this,this.zt,k,!0,["ytp-menu-label-secondary"])):
N.push(oVb(this,this.zt,["ytp-menu-label-secondary"])));return{J:"div",A:N}}};var nt=class extends UGn{constructor(Z){super(Z.getAvailablePlaybackRates()[0],Z.getAvailablePlaybackRates()[Z.getAvailablePlaybackRates().length-1],.05,Z.getPlaybackRate(),{J:"div",Z:"ytp-speedslider-indicator-container",A:[{J:"div",Z:"ytp-speedslider-badge"},{J:"p",Z:"ytp-speedslider-text"}]});this.S=Z;this.O=hI(this.xW,50,this);g.jX(this.U,"ytp-speedslider");this.N=this.Lp("ytp-speedslider-text");this.zt=this.Lp("ytp-speedslider-badge");this.S.B("web_enable_varispeed_panel")&&g.jX(this.U,"ytp-varispeed-input-slider");
this.fA();this.K(this.U,"change",this.dA)}L(){super.L();this.N&&this.fA()}dA(){this.S.B("enable_web_premium_varispeed")&&MI(this,Math.round(this.V/.05)*.05);this.O()}xW(){this.S.setPlaybackRate(this.V,!0)}fA(){this.N.textContent=`${this.V.toFixed(2)}x`;const Z=this.V>2&&this.S.B("enable_web_premium_varispeed");this.zt.classList.toggle("ytp-speedslider-premium-badge",Z);this.zt.setAttribute("aria-label",Z?"Premium":"")}j(Z){super.j(Z);this.O();this.fA();this.S.B("web_enable_varispeed_panel")?(Z.code===
"ArrowUp"||Z.code==="ArrowDown")&&Z.preventDefault():Z.preventDefault()}};var alT=class extends g.E{constructor(Z,k,N){super({J:"div",Z:"ytp-slider-section",W:{role:"slider","aria-valuemin":"{{minvalue}}","aria-valuemax":"{{maxvalue}}","aria-valuenow":"{{valuenow}}","aria-valuetext":"{{valuetext}}",tabindex:"0"},A:[{J:"div",Z:"ytp-slider",A:[{J:"div",Z:"ytp-slider-handle"}]}]});this.C=.05;this.D=Z;this.Y=k;this.range=this.Y-this.D;this.vD=this.Lp("ytp-slider-section");this.L=this.Lp("ytp-slider");this.xW=this.Lp("ytp-slider-handle");this.j=new g.tU(this.L,!0);this.U=N?
N:Z;g.u(this,this.j);this.j.subscribe("dragmove",this.O,this);this.K(this.element,"keydown",this.zt);this.K(this.element,"wheel",this.N);this.init()}init(){this.V(this.U);this.updateValue("minvalue",this.D);this.updateValue("maxvalue",this.Y)}zt(Z){if(!Z.defaultPrevented){switch(Z.keyCode){case 37:case 40:var k=-this.C;break;case 39:case 38:k=this.C;break;default:return}this.V(this.U+k);Z.preventDefault()}}N(Z){let k=this.U;k+=(Z.deltaX||-Z.deltaY)<0?-.05:.05;this.V(k);Z.preventDefault()}O(Z){Z=(Z-
g.zU(this.L).x)/150*this.range+this.D;this.V(Z)}V(Z,k=""){Z=g.u0(Z,this.D,this.Y);k===""&&(k=Z.toString());this.updateValue("valuenow",Z);this.updateValue("valuetext",k);this.xW.style.left=`${(Z-this.D)/this.range*130}px`;this.U=Z}focus(){this.vD.focus()}};var TJe=class extends alT{constructor(Z){super(Z.getAvailablePlaybackRates()[0],Z.getAvailablePlaybackRates()[Z.getAvailablePlaybackRates().length-1],Z.getPlaybackRate());this.S=Z;this.G=g.TU("P");this.FS=hI(this.dA,50,this);g.jX(this.L,"ytp-speedslider");g.jX(this.G,"ytp-speedslider-text");Z=this.G;var k=this.L;k.parentNode&&k.parentNode.insertBefore(Z,k.nextSibling);this.fA();this.K(this.S,"onPlaybackRateChange",this.updateValues)}dA(){this.S.setPlaybackRate(this.U,!0)}fA(){this.G.textContent=`${O7(this,
this.U)}x`}V(Z){super.V(Z,O7(this,Z).toString());this.G&&(this.fA(),this.FS())}updateValues(){const Z=this.S.getPlaybackRate();O7(this,this.U)!==Z&&(this.V(Z),this.fA())}};var KE_=class extends g.af{constructor(Z){super({J:"div",Z:"ytp-speedslider-component"});Z.B("web_settings_use_input_slider")?this.V=new nt(Z):this.V=new TJe(Z);g.u(this,this.V);this.element.appendChild(this.V.element)}focus(){this.V.focus()}};var ygh=class extends wY{constructor(Z){const k=new KE_(Z);super(Z,k,"Custom");g.u(this,k)}};var Qke=class extends g.GP{constructor(Z,k){const N=new ygh(Z);super("Playback speed",g.HH.Wa,Z,k,i4(Z)?void 0:"Custom",i4(Z)?void 0:()=>{g.KY(k,N)});
this.dA=new g.E({J:"div",Z:"ytp-menuitem-premium-badge",W:{"aria-label":"Premium"}});this.zt=!1;this.nF={qsm:()=>this.O};
g.u(this,N);this.R5=new nt(Z);g.u(this,this.R5);if(Z.B("web_settings_menu_icons")){const a=Z.B("delhi_modern_web_player_icons")?UCi():{J:"svg",W:{height:"24",viewBox:"0 0 24 24",width:"24"},A:[{J:"path",W:{d:"M10,8v8l6-4L10,8L10,8z M6.3,5L5.7,4.2C7.2,3,9,2.2,11,2l0.1,1C9.3,3.2,7.7,3.9,6.3,5z            M5,6.3L4.2,5.7C3,7.2,2.2,9,2,11 l1,.1C3.2,9.3,3.9,7.7,5,6.3z            M5,17.7c-1.1-1.4-1.8-3.1-2-4.8L2,13c0.2,2,1,3.8,2.2,5.4L5,17.7z            M11.1,21c-1.8-0.2-3.4-0.9-4.8-2 l-0.6,.8C7.2,21,9,21.8,11,22L11.1,21z            M22,12c0-5.2-3.9-9.4-9-10l-0.1,1c4.6,.5,8.1,4.3,8.1,9s-3.5,8.5-8.1,9l0.1,1 C18.2,21.5,22,17.2,22,12z",
fill:"white"}}]};this.setIcon(a)}this.S=Z;this.zt=!1;this.Sm=null;i4(Z)?(this.L=g.DH("Custom ($CURRENT_CUSTOM_SPEED)",{CURRENT_CUSTOM_SPEED:this.S.getPlaybackRate().toString()}),this.xW=this.S.getPlaybackRate()):this.xW=this.L=null;g.u(this,this.dA);this.Rq=this.S.getVideoData()?.getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.showPlaybackRateUpsellPanelCommand;pIb(Z,this.Rq)?(this.G=vE(4),this.S.createClientVe(this.dA.element,this,273508)):this.G=null;this.S.B("enable_web_premium_varispeed_upsell")&&
this.S.createClientVe(this.element,this,278479);this.O=this.S.getAvailablePlaybackRates();this.K(Z,"presentingplayerstatechange",this.aq);this.S.getVideoData()?.qW()&&this.K(Z,F1(Z.X().Yl())?"playbackChange":"serverstitchedvideochange",this.aq);this.K(Z,"videodatachange",this.onVideoDataChange);this.K(this.R5.U,"change",()=>{this.zt=!0;this.aq()});
this.aq()}onVideoDataChange(Z){Z==="dataloaded"&&(Z=this.S.getAvailablePlaybackRates(),g.uT(this.O,Z)||(this.O=Z,this.R5.dispose(),this.R5=new nt(this.S)),this.aq())}D(Z){return Z==="1"?"Normal":Z.toLocaleString()}aq(){var Z=this.S.getVideoData()?.qW();Z=this.S.getPresentingPlayerType(Z);this.enable(Z!==2&&Z!==3);Upy(this)}Y(Z){super.Y(Z);this.R5&&this.R5.U.focus()}j(Z){super.j(Z);Z?(this.Sm=this.K(this.S,"onPlaybackRateChange",this.onPlaybackRateChange),Upy(this),Juf(this,this.S.getPlaybackRate()),
this.S.B("enable_web_premium_varispeed_upsell")&&(this.S.logVisibility(this.element,!0),this.G&&this.S.logVisibility(this.dA.element,!0))):(this.Ce(this.Sm),this.Sm=null)}onPlaybackRateChange(Z){const k=this.S.getPlaybackRate();!this.zt&&this.O.includes(k)||z5b(this,k);Juf(this,Z)}N(Z,k,N){return Z===this.L&&gf(this.S)?super.N(Z,k,N,{J:"div",Z:"ytp-speed-slider-menu-footer",A:[this.R5]}):Z===this.G&&pIb(this.S,this.Rq)?bBf(this,Z,k,N):super.N(Z,k,N)}V(Z){super.V(Z);Z===this.G?(this.S.logClick(this.dA.element),
g.A7(this.S,"innertubeCommand",this.Rq)):Z===this.L?this.S.setPlaybackRate(this.xW,!0):this.S.setPlaybackRate(Number(Z),!0);(!gf(this.S)||Z!==this.L&&Z!==this.G)&&this.on.gr()}vD(Z){const k=Z===this.L;this.zt=!1;k&&i4(this.S)&&!gf(this.S)?(Z=new ygh(this.S),g.KY(this.on,Z)):(this.S.logClick(this.element),super.vD(Z))}};var qfr=class extends g.GP{constructor(Z,k,N,a){const T=new g.$m(k,void 0,"Video Override");super(a.text||"",Z,k,N,"Video Override",()=>{g.KY(N,T)});
g.jX(this.element,"ytp-subtitles-options-menu-item");this.setting=a.option.toString();Z=a.options;this.settings=g.fK(Z,this.zt,this);this.O=T;g.u(this,this.O);k=new g.y9({J:"div",Z:"ytp-menuitemtitle",Da:"Allow for a different caption style if specified by the video."},0);g.u(this,k);this.O.OH(k,!0);this.G=new g.y9({J:"div",Z:"ytp-menuitem",W:{role:"menuitemradio",tabindex:"0"},A:[{J:"div",Z:"ytp-menuitem-label",Da:"On"}]},-1);g.u(this,this.G);this.O.OH(this.G,!0);this.K(this.G.element,"click",()=>
{R5f(this,!0)});
this.L=new g.y9({J:"div",Z:"ytp-menuitem",W:{role:"menuitemradio",tabindex:"0"},A:[{J:"div",Z:"ytp-menuitem-label",Da:"Off"}]},-2);g.u(this,this.L);this.O.OH(this.L,!0);this.K(this.L.element,"click",()=>{R5f(this,!1)});
this.Y(g.ni(Z,this.zt))}U(Z){super.U(Z)}zt(Z){return Z.option.toString()}getOption(Z){return this.settings[Z]}D(Z){return this.getOption(Z).text||""}V(Z){super.V(Z);this.publish("settingChange",this.setting,this.settings[Z].option)}};var rgi=class extends g.$m{constructor(Z,k){super(Z,void 0,"Options");this.YL={};for(let N=0;N<g.wN.length;N++){const a=g.wN[N],T=new qfr(-N,Z,k,a);g.u(this,T);T.subscribe("settingChange",this.jL,this);this.YL[a.option.toString()]=T;this.OH(T,!0)}Z=new g.y9(g.zn(),-g.wN.length,"Reset");g.u(this,Z);Z.listen("click",()=>{this.jL("reset",!0)});
this.OH(Z,!0)}v0(Z){for(const k of Object.keys(Z)){const N=this.YL[k];if(N){const a=Z[k].toString(),T=!!Z[`${k}Override`];N.options[a]&&(N.U(a),N.G.element.setAttribute("aria-checked",String(!T)),N.L.element.setAttribute("aria-checked",String(T)))}}}jL(Z,k){this.publish("settingChange",Z,k)}};var C0T=class extends g.GP{constructor(Z,k){super("Auto-translate",0,Z,k);this.S=Z;this.languages={};Z.createClientVe(this.element,this,127301);Z.logVisibility(this.element,!0)}L(Z){return Z.languageCode}D(Z){return this.languages[Z].languageName||""}V(Z){this.publish("select",Z);this.S.logClick(this.element);g.Tx(this.on)}};var mcH=class extends g.GP{constructor(Z,k){const N=new rgi(Z,k),a=["This setting only applies to the current video. Adjust caption visibility in "," for all videos."];let T;g.fQ(Z.X())&&!Z.B("web_watch_disable_account_level_captions_settings")&&(T={J:"div",Z:"ytp-panel-footer-content",A:[{J:"span",Da:a[0]},{J:"a",Z:"ytp-panel-footer-content-link",Da:"Settings",W:{href:"/account_playback"}},{J:"span",Da:a[1]}]});super("Subtitles/CC",g.HH.SUBTITLES,Z,k,"Options",()=>{g.KY(k,N)},T);
this.countLabel=void 0;this.S=Z;this.on=k;this.tracks={};this.xW=new g.Uc(()=>{nVX(this,!1)},3E3);
g.u(this,this.xW);Z.B("deprecate_captions_track_count_display")||(this.countLabel=new g.E({J:"div",A:[{J:"span",Da:"Subtitles/CC"},{J:"span",Z:"ytp-menuitem-label-count",Da:"{{content}}"}]}),g.u(this,this.countLabel),g.UK(this,this.countLabel));Z.B("web_settings_menu_icons")&&this.setIcon(R6f(Z.B("delhi_modern_web_player_icons")));this.L=new C0T(Z,k);g.u(this,this.L);this.L.subscribe("select",this.dA,this);this.zt=N;g.u(this,this.zt);this.zt.subscribe("settingChange",this.jL,this);k.subscribe("show",
this.Sm,this);this.K(Z,"videodatachange",this.aq);this.K(Z,"onApiChange",this.aq);this.K(Z,"onCaptionsTrackListChanged",this.aq);this.K(Z,"captionschanged",this.aq);Z.createClientVe(this.element,this,127300);this.aq()}G(Z){return g.ze(Z)?"__off__":Z.displayName}D(Z){return Z==="__off__"?"Off":Z==="__translate__"?"Auto-translate":Z==="__contribute__"?"Add subtitles/CC":Z==="__correction__"?"Suggest caption corrections":(Z==="__off__"?{}:this.tracks[Z]).displayName}V(Z){Z==="__translate__"?this.L.open():
Z==="__contribute__"?(this.S.pauseVideo(),this.S.isFullscreen()&&this.S.toggleFullscreen(),Z=g.Nr(this.S.X(),this.S.getVideoData()),g.RJ(Z)):Z==="__correction__"?(this.S.pauseVideo(),this.S.isFullscreen()&&this.S.toggleFullscreen(),Z=wf(this),$k(this,Z),super.V(this.G(Z)),Z=this.S.getVideoData().getPlayerResponse()?.captions?.playerCaptionsTracklistRenderer?.openTranscriptCommand,g.A7(this.S,"innertubeCommand",Z),this.on.gr(),this.O&&this.S.logClick(this.O)):(Z==="__correction__"?(this.S.pauseVideo(),
this.S.isFullscreen()&&this.S.toggleFullscreen(),Z=wf(this),$k(this,Z),super.V(this.G(Z)),Z=this.S.getVideoData().getPlayerResponse()?.captions?.playerCaptionsTracklistRenderer?.openTranscriptCommand,g.A7(this.S,"innertubeCommand",Z)):(this.S.logClick(this.element),$k(this,Z==="__off__"?{}:this.tracks[Z]),super.V(Z)),this.on.gr())}aq(){var Z=this.S.getOptions();Z=Z&&Z.indexOf("captions")!==-1;var k=this.S.getVideoData();const N=k&&k.u$;var a=!!this.S.getVideoData()?.jY();let T,K={};if(Z||N){if(Z){T=
this.S.getOption("captions","track");K=this.S.getOption("captions","tracklist",{includeAsr:!0});var y=a?[]:this.S.getOption("captions","translationLanguages");this.tracks=g.fK(K,this.G,this);a=g.ni(K,this.G);wf(this)&&k.getPlayerResponse()?.captions?.playerCaptionsTracklistRenderer?.openTranscriptCommand&&a.push("__correction__");if(y.length&&!g.ze(T)){if((k=T.translationLanguage)&&k.languageName){const Q=k.languageName;k=y.findIndex(q=>q.languageName===Q);
Pfb(y,k)}MGG(this.L,y);a.push("__translate__")}y=this.G(T)}else this.tracks={},a=[],y="__off__";a.unshift("__off__");this.tracks.__off__={};N&&a.unshift("__contribute__");this.tracks[y]||(this.tracks[y]=T,a.push(y));this.Y(a);this.U(y);T&&T.translationLanguage?this.L.U(this.L.L(T.translationLanguage)):Bkr(this.L);Z&&this.zt.v0(this.S.getSubtitlesUserSettings());this.S.B("deprecate_captions_track_count_display")||this.countLabel?.setContent(K&&K.length?` (${K.length})`:"");this.publish("size-change");
this.S.logVisibility(this.element,!0);this.enable(!0)}else this.enable(!1)}dA(Z){var k=this.S.getOption("captions","track");k=g.Rn(k);k.translationLanguage=this.L.languages[Z];$k(this,k)}jL(Z,k){if(Z==="reset")this.S.resetSubtitlesUserSettings();else{const N={};N[Z]=k;this.S.updateSubtitlesUserSettings(N)}nVX(this,!0);this.xW.start();this.zt.v0(this.S.getSubtitlesUserSettings())}Sm(Z){Z||this.xW.fH()}YW(){this.xW.fH();super.YW()}open(){super.open();this.options.__correction__&&!this.O&&(this.O=this.options.__correction__.element,
this.S.createClientVe(this.O,this,167341),this.S.logVisibility(this.O,!0))}};var skh=class extends wY{constructor(Z){const k=new nt(Z),N=new g.E({J:"div",Z:"ytp-variable-speed-panel-chips"}),a=new g.E({J:"button",BD:["ytp-button","ytp-variable-speed-panel-button","ytp-variable-speed-panel-increment-button"],W:{"aria-label":"Decrease playback speed 0.05"},A:[{J:"span",Da:"-"}]});a.listen("click",()=>{this.S.setPlaybackRate(Number((this.S.getPlaybackRate()-.05).toFixed(2)));Z.logClick(a.element)});
const T=new g.E({J:"button",BD:["ytp-button","ytp-variable-speed-panel-button","ytp-variable-speed-panel-increment-button"],W:{"aria-label":"Increase playback speed 0.05"},A:[{J:"span",Da:"+"}]});T.listen("click",()=>{this.S.setPlaybackRate(Number((this.S.getPlaybackRate()+.05).toFixed(2)));Z.logClick(T.element)});
var K=new g.E({J:"div",Z:"ytp-variable-speed-panel-slider-container",A:[a,k,T]}),y=new g.E({J:"div",Z:"ytp-variable-speed-panel-premium-badge",W:{tabindex:"-1"},A:[{J:"div",Z:"ytp-variable-speed-panel-badge"}]}),Q=new g.E({J:"span"});const q=new g.E({J:"div",Z:"ytp-variable-speed-panel-display",A:[y,Q],W:{"aria-live":"polite"}}),r=new g.E({J:"div",Z:"ytp-speed-display-container",A:[q]}),C=new g.af({J:"div",Z:"ytp-variable-speed-panel-content",W:{tabindex:"0"},A:[r,K,N]});super(Z,C,"Playback speed");
k.listen("click",()=>{Z.logClick(k.U)});
this.S.createClientVe(a.element,this,258237);this.S.logVisibility(a.element,!0);this.S.createClientVe(T.element,this,258236);this.S.logVisibility(T.element,!0);this.S.createClientVe(C.element,this,225845);this.S.logVisibility(C.element,!0);this.S.createClientVe(k.U,this,258235);this.S.logVisibility(k.U,!0);this.S.createClientVe(N.element,this,258234);this.S.logVisibility(N.element,!0);g.u(this,q);this.lj=Q;g.u(this,this.lj);this.Hb=y;g.u(this,this.Hb);this.R5=k;g.u(this,this.R5);g.u(this,a);g.u(this,
T);g.u(this,N);g.u(this,K);g.u(this,r);g.u(this,C);K=hI(this.zT,50,this);y=Z.getVideoData();const m=y?.getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.showPlaybackRateUpsellPanelCommand;if((y=y?.getPlayerResponse()?.playerConfig?.granularVariableSpeedConfig?.defaultPlaybackRateOptions)&&y.length>0)for(const A of y){const P=m&&A.isPremiumUpsell,d=new g.E({J:"button",BD:["ytp-button","ytp-variable-speed-panel-preset-button","ytp-variable-speed-panel-button"],A:P?[{J:"div",Z:"ytp-variable-speed-panel-premium-upsell-icon"},
{J:"span",Da:`${A.label}`}]:[{J:"span",Da:`${A.label}`}]});P&&(this.S.createClientVe(d.element,this,273508),this.S.logVisibility(d.element,!0));g.u(this,d);N.element.appendChild(d.element);d.listen("click",()=>{P?(g.A7(this.S,"innertubeCommand",m),Z.logClick(d.element)):A.value&&this.S.setPlaybackRate(A.value/100);Z.logClick(N.element)});
y=new g.E({J:"div",Z:"ytp-variable-speed-panel-preset-button-wrapper",W:{"data-priority":`${A.priority??0}`},A:[d]});g.u(this,y);A.value===100&&(Q=new g.E({J:"div",Z:"ytp-variable-speed-panel-preset-button-label-text",Da:"Normal"}),g.u(this,Q),y.element.appendChild(Q.element));N.element.appendChild(y.element)}this.K(this.R5.U,"input",()=>{this.fA(this.R5.V)});
this.K(Z,"onPlaybackRateChange",this.onPlaybackRateChange);this.K(Z,"resize",K);this.onPlaybackRateChange(Z.getPlaybackRate());this.zT()}onPlaybackRateChange(Z){MI(this.R5,Z,!0);this.fA(Z)}fA(Z){Z=Math.round(Z*20)/20;this.lj.element.textContent=`${Z.toFixed(2)}x`;this.Hb.element.classList.toggle("ytp-variable-speed-panel-premium-badge-visible",Z>2)}zT(){const Z=this.S.getPlayerSize().width;var k=this.element.getElementsByClassName("ytp-variable-speed-panel-preset-button-wrapper");for(const N of k){k=
N;const a=Number(k.dataset.priority??0);let T=!0;Z<680?T=a>1:Z<1900&&(T=a>0);g.jA(k,T);k.setAttribute("aria-hidden",T?"false":"true")}}};var Agn=class extends g.GP{constructor(Z,k){super("Playback speed",g.HH.Wa,Z,k);this.S=Z;Z.B("web_settings_menu_icons")&&this.setIcon(UCi());this.G(Z.getPlaybackRate());this.K(Z,"onPlaybackRateChange",this.G);this.K(Z,"presentingplayerstatechange",this.L);this.S.getVideoData()?.qW()&&this.K(Z,F1(Z.X().Yl())?"playbackChange":"serverstitchedvideochange",this.L);this.L()}L(){var Z=this.S.getVideoData()?.qW();Z=this.S.getPresentingPlayerType(Z);this.enable(Z!==2&&Z!==3)}G(Z){this.setContent(Z===1?"Normal":
Z.toString())}open(){g.KY(this.on,new skh(this.S))}};var P0K=class extends g.xm{constructor(Z){super(Z,"ytp-settings-menu");this.Vm=new g.$m(this.S);this.R7=this.QU=this.settingsButton=null;this.isInitialized=this.iY=!1;g.u(this,this.Vm);this.hide();g.KY(this,this.Vm);Z.createClientVe(this.element,this,108341,!0);this.subscribe("show",k=>{this.Hq(k)});
this.K(Z,"highlightSettingsMenu",()=>{this.iY=!0;this.Iv()});
this.K(Z,"openSettingsMenuItem",k=>{k&&(this.iY=!0,this.Iv(),k==="menu_item_video_quality_advanced"&&this.QU?.open())});
Z.B("html5_enable_voice_boost")&&(this.K(Z,"onPlaybackAudioChange",this.V_),this.K(Z,"videodatachange",this.V_));this.S.X()?.getWebPlayerContextConfig()?.enableFullscreenComponentsFeature&&this.K(this.element,"wheel",k=>{k.stopPropagation()})}initialize(){if(!this.isInitialized){var Z=this.S.X();
this.isInitialized=!0;try{this.QU=new NJc(this.S,this)}catch(N){g.L9(Error("QualityMenuItem creation failed"))}g.u(this,this.QU);var k=new mcH(this.S,this);g.u(this,k);Z.enableSpeedOptions&&(Z.B("web_enable_varispeed_panel")?(k=new Agn(this.S,this),g.u(this,k)):(k=new Qke(this.S,this),g.u(this,k)));(g.PQ(Z)||Z.G)&&(Z.U||Z.Rq)&&(k=new kmH(this.S,this),g.u(this,k));Z.FN&&!Z.B("web_player_move_autonav_toggle")&&(k=new ZgJ(this.S,this),g.u(this,k));Z.B("html5_enable_new_audio_settings_menu")?(this.R7=
new YDB(this.S,this),g.u(this,this.R7)):(Z=new WiB(this.S,this),g.u(this,Z));this.S.publish("settingsMenuInitialized");BE(this.settingsButton,this.Vm.Va())}}OH(Z){this.initialize();this.Vm.OH(Z);BE(this.settingsButton,this.Vm.Va())}Bq(Z){this.jm()||(this.LF&&this.Vm.Va()<=1&&this.hide(),this.Vm.Bq(Z),BE(this.settingsButton,this.Vm.Va()))}Iv(Z){this.initialize();this.Vm.Va()>0&&super.Iv(Z)}cA(){this.iY?this.iY=!1:super.cA()}show(){super.show();g.jX(this.S.getRootNode(),"ytp-settings-shown")}hide(){super.hide();
g.Wp(this.S.getRootNode(),"ytp-settings-shown")}Hq(Z){this.S.logVisibility(this.element,Z);this.S.publish("settingsMenuVisibilityChanged",Z)}V_(){this.S.V_()}};var cg_=class extends g.E{constructor(Z,k){super({J:"button",BD:["ytp-subtitles-button","ytp-button"],W:{"aria-keyshortcuts":"c","aria-pressed":"{{pressed}}","data-priority":"5","data-tooltip-title":"{{tooltip-title}}",title:Z.B("player_tooltip_data_title_killswitch")?"{{title}}":"","data-title-no-tooltip":"{{data-title-no-tooltip}}"},A:[Z.B("delhi_modern_web_player_icons")?{J:"div",Z:"ytp-subtitles-button-icon",Da:"{{icon}}"}:pz0(Z)]});this.S=Z;this.tooltip=k.sb();Z.B("delhi_modern_web_player_icons")&&
this.updateValue("icon",jHy(this));this.K(Z,"videodatachange",this.aq);this.K(Z,"appresize",this.aq);this.K(Z,"promotooltipacceptbuttonclicked",this.V);this.K(Z,"onApiChange",this.aq);this.K(Z,"onCaptionsTrackListChanged",this.aq);this.K(Z,"captionschanged",this.aq);this.S.createClientVe(this.element,this,127299);this.aq();this.listen("click",this.onClick);this.addOnDisposeCallback(g.ua(k.sb(),this.element))}onClick(){if(xk(this)&&(this.S.toggleSubtitles(!0),this.S.logClick(this.element),!this.isEnabled())){let Z=
!1;const k=g.QC().Aq(65);g.fQ(this.S.X())&&k!=null&&(Z=!k);Z&&this.S.X().B("web_player_nitrate_promo_tooltip")&&this.S.publish("showpromotooltip",this.element)}}V(Z){g.Vn(this.S)?.Z1()?.Iv(Z)}isEnabled(){const Z=this.S.getOption("captions","track");return!(!Z||!Z.displayName)}aq(){const Z=xk(this);let k=300;this.S.X().j&&(k=480);this.S.B("delhi_modern_web_player_icons")&&this.updateValue("icon",jHy(this));var N=this.S.X();(N.B("html5_hide_unavailable_subtitles_button")?0:!N.G)?(Z?(this.Lp("ytp-subtitles-button-icon")?.setAttribute("fill-opacity",
"1"),this.S.X().B("player_tooltip_data_title_killswitch")?this.updateValue("title",g.fe(this.S,"Subtitles/closed captions","c")):this.update({"tooltip-title":g.fe(this.S,"Subtitles/closed captions","c")}),this.update({"data-title-no-tooltip":"Subtitles/closed captions"})):(this.S.B("delhi_modern_web_player_icons")?this.Lp("ytp-subtitles-button-icon")?.getElementsByTagName("svg")[0].setAttribute("fill-opacity","0.3"):this.Lp("ytp-subtitles-button-icon")?.setAttribute("fill-opacity","0.3"),this.updateValue("title",
"Subtitles/closed captions unavailable"),this.update({"tooltip-title":"Subtitles/closed captions unavailable"}),this.update({"data-title-no-tooltip":"Subtitles/closed captions unavailable"})),N=this.S.B("player_disable_caption_button_if_captions_not_available")&&this.S.B("delhi_modern_web_player")?Z:!0):(this.updateValue("title",g.fe(this.S,"Subtitles/closed captions","c")),this.update({"tooltip-title":g.fe(this.S,"Subtitles/closed captions","c")}),this.update({"data-title-no-tooltip":"Subtitles/closed captions"}),
N=Z);this.tooltip.qj();N=N&&this.S.fF().getPlayerSize().width>=k;this.In(N);this.S.logVisibility(this.element,N);Z?this.updateValue("pressed",this.isEnabled()):this.updateValue("pressed",!1)}Df(Z){super.Df(Z)}};g.HgB=class extends g.E{constructor(Z,k,N=350){super({J:"div",BD:["ytp-time-display","notranslate"],A:[{J:"div",Z:"ytp-time-wrapper",A:[{J:"div",Z:"ytp-time-contents",W:Z.B("delhi_modern_web_player")?{"aria-label":"{{timeDisplayAriaLabel}}",role:"button",tabindex:"0"}:{"aria-label":"{{timeDisplayAriaLabel}}"},A:[{J:"span",Z:"ytp-time-clip-icon",Da:"{{clipicon}}",W:{"aria-label":"Clip"}},{J:"span",Z:"ytp-time-current",Da:"{{currenttime}}"},{J:"span",Z:"ytp-time-separator",Da:" / "},{J:"span",Z:"ytp-time-duration",
Da:"{{duration}}"}]}]},{J:"span",Z:"ytp-clip-watch-full-video-button-separator",Da:"\u2022"},{J:"span",Z:"ytp-clip-watch-full-video-button",Da:"{{watchfullvideo}}"}]});this.api=Z;this.N=N;this.liveBadge=new g.E({J:"button",BD:["ytp-live-badge","ytp-button"],W:{disabled:"true"},Da:"{{content}}"});this.V=null;this.rK=this.U=!1;this.C=this.j=this.G=null;this.isPremiere=!1;this.L=this.Y=null;this.D=!1;this.vA=this.liveIndicatorText=null;this.xW=this.Lp("ytp-clip-watch-full-video-button");this.liveBadge.setContent("Live");
g.u(this,this.liveBadge);this.api.B("web_player_updated_entrypoint")||this.api.B("delhi_modern_web_player")?this.liveBadge.HD(this.Lp("ytp-time-wrapper")):this.liveBadge.HD(this.element);this.tooltip=k.sb();this.liveBadge.listen("click",this.onClick.bind(this));this.api.B("delhi_modern_web_player")&&(k=this.Lp("ytp-time-wrapper"),this.K(k,"click",this.O),k.classList.toggle("ytp-time-wrapper-delhi",this.canShowCountdown()));this.K(this.xW,"click",this.zt);this.K(this.api,F1(this.api.X().Yl())?"playbackChange":
"serverstitchedvideochange",()=>{EVf(this,this.api.getProgressState().isAtLiveHead)});
this.K(Z,"presentingplayerstatechange",this.MW);this.K(Z,"appresize",this.MW);this.K(Z,"onLoopRangeChange",this.onLoopRangeChange);this.K(Z,"videodatachange",this.onVideoDataChange);(k=Z.getVideoData())&&this.updateVideoData(k);this.MW();WCj(this,Z.getLoopRange())}canShowCountdown(){return!ed(this)&&!GQ(this)}MW(){var Z=this.api.fF().getPlayerSize().width,k=this.N;this.api.X().j&&(k=400);k=Z>=k&&(!GQ(this)||!this.api.getPlayerStateObject().V(64));this.In(k);g.D(this.element,"ytp-time-display-allow-autohide",
k&&Z<400);Z=this.api.getProgressState();if(k){var N=this.api.getPresentingPlayerType();k=this.api.getCurrentTime({playerType:N,OP:!1});this.U&&N!==2&&(k-=Z.airingStart);ed(this)&&(k-=this.vA.startTimeMs/1E3);this.canShowCountdown()&&this.D&&(k-=this.api.getDuration({playerType:N,OP:!1}));var a=g.Gh(k);this.Y!==a&&(this.updateValue("currenttime",a),this.Y=a);N=ed(this)?(this.vA.endTimeMs-this.vA.startTimeMs)/1E3:this.api.getDuration({playerType:N,OP:!1});a=g.Gh(N);this.L!==a&&(this.updateValue("duration",
a),this.L=a);k=g.DH("$PLAY_PROGRESS of $DURATION",{PLAY_PROGRESS:g.Gh(k,!0),DURATION:g.Gh(N,!0)});this.updateValue("timeDisplayAriaLabel",k)}EVf(this,Z.isAtLiveHead);WCj(this,this.api.getLoopRange())}onLoopRangeChange(Z){const k=this.vA!==Z;this.vA=Z;k&&(this.MW(),Sd(this))}zt(){this.api.setLoopRange(null)}O(){this.D=!this.D;this.MW()}onVideoDataChange(Z,k,N){this.updateVideoData((this.api.X().B("enable_topsoil_wta_for_halftime")||this.api.X().B("enable_topsoil_wta_for_halftime_live_infra"))&&N===
2?this.api.getVideoData({playerType:1}):k);this.MW();Sd(this)}updateVideoData(Z){this.rK=Z.isLivePlayback&&!Z.ES;this.U=Z.dA();this.isPremiere=Z.isPremiere;this.liveIndicatorText=(Z=Z.getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.liveIndicatorText)?Jo(Z):null;g.D(this.element,"ytp-live",GQ(this));this.api.B("delhi_modern_web_player")&&this.Lp("ytp-time-wrapper").classList.toggle("ytp-time-wrapper-delhi",this.canShowCountdown())}onClick(Z){Z.target===this.liveBadge.element&&(this.api.seekTo(Infinity,
void 0,void 0,void 0,33),this.api.playVideo())}YW(){this.V&&this.V();super.YW()}};var dcK=class extends g.E{constructor(Z,k){super({J:"div",Z:"ytp-volume-panel",W:{title:Z.B("player_tooltip_data_title_killswitch")?"Volume":"","data-tooltip-title":"Volume",role:"slider","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":"{{valuenow}}","aria-valuetext":"{{valuetext}}",tabindex:"0"},A:[{J:"div",Z:"ytp-volume-slider",A:[{J:"div",Z:"ytp-volume-slider-handle"}]}]});this.api=Z;this.G=k;this.Ex=!1;this.zt=this.volume=0;this.L=null;this.U=this.V=this.isDragging=!1;this.G=k;this.D=
Z.dQ();this.O=Z.B("web_player_use_screen_width_for_big_mode");this.C=this.Lp("ytp-volume-slider");this.vD=this.Lp("ytp-volume-slider-handle");this.Y=new g.tU(this.C,!0);g.u(this,this.Y);this.Y.subscribe("dragstart",this.tq,this);this.Y.subscribe("dragmove",this.dA,this);this.Y.subscribe("dragend",this.Rq,this);this.K(Z,"onVolumeChange",this.onVolumeChange);this.K(Z,"appresize",this.Sm);this.K(Z,"fullscreentoggled",this.TB);this.K(Z,"onShowControls",this.N);this.K(Z,"onHideControls",this.N);this.K(this.element,
"keydown",this.FS);this.K(this.element,"focus",()=>{JU(this,this.V,this.isDragging,!0,this.api.Ex())});
this.K(this.element,"blur",()=>{JU(this,this.V,this.isDragging,!1,this.api.Ex())});
YJf(this,Z.fF().getPlayerSize());o9(this,Z.getVolume(),Z.isMuted());la(Z,this.element,this)}TB(){ZYy(this)}Sm(Z){YJf(this,Z);this.O&&ZYy(this)}FS(Z){if(!Z.defaultPrevented){const k=Z.keyCode;let N=null;k===37?N=this.volume-5:k===39?N=this.volume+5:k===36?N=0:k===35&&(N=100);N!==null&&(N=g.u0(N,0,100),N===0?this.api.mute():(this.api.isMuted()&&this.api.unMute(),this.api.setVolume(N)),Z.preventDefault())}}xW(Z){const k=Z.deltaX||-Z.deltaY;Z.deltaMode?this.api.setVolume(this.volume+(k<0?-10:10)):this.api.setVolume(this.volume+
g.u0(k/10,-10,10));Z.preventDefault();this.api.X()?.getWebPlayerContextConfig()?.enableFullscreenComponentsFeature&&Z.stopPropagation()}tq(){JU(this,this.V,!0,this.U,this.api.Ex());this.zt=this.volume;this.api.isMuted()&&this.api.unMute()}dA(Z){var k=this.D?78:52,N=this.D?18:12;Z-=g.zU(this.C).x;N=g.u0((Z-N/2)/(k-N),0,1);this.O&&(N=g.u0(Z/k,0,1));k=N;k=this.api.B("web_player_non_linear_volume_controls")?k<=.25?k/.25*.1:.1+(k-.25)/.75*.9:k;this.api.setVolume(k*100)}Rq(){JU(this,this.V,!1,this.U,this.api.Ex());
this.volume===0&&(this.api.mute(),this.api.setVolume(this.zt))}onVolumeChange(Z){o9(this,Z.volume,Z.muted)}N(){JU(this,this.V,this.isDragging,this.U,this.api.Ex())}j(Z){g.D(this.element,"ytp-volume-control-hover",Z);JU(this,Z,this.isDragging,this.U,this.api.Ex())}YW(){super.YW();g.Wp(this.G,"ytp-volume-slider-active")}};var XsF=class extends g.E{constructor(Z,k){const N=Z.X(),a=["ytp-youtube-button","ytp-button","yt-uix-sessionlink"];N.D&&a.push("no-link");const T={title:Z.B("player_tooltip_data_title_killswitch")?"{{title}}":"","data-tooltip-title":"{{tooltip-title}}",target:N.N,"data-priority":"6","data-sessionlink":"feature=player-button"};N.D||(T.href="{{url}}");super({J:"a",BD:a,W:T,Da:"{{logoSvg}}"});this.V=null;this.api=Z;this.visible=!1;N.D||(this.V=this.listen("click",this.onClick));this.K(Z,"videodatachange",
this.onVideoDataChange);this.K(Z,"videoplayerreset",this.onVideoDataChange);this.K(Z,"onLoopRangeChange",this.onVideoDataChange);this.K(Z,"appresize",this.qx);this.onVideoDataChange();N.D||this.addOnDisposeCallback(g.ua(k.sb(),this.element));this.qx()}onVideoDataChange(){var Z=this.api.X();this.qx();this.visible=!!this.api.getVideoData().videoId&&!this.api.getVideoData({playerType:1}).o4;this.In(this.visible);this.api.logVisibility(this.element,this.visible&&this.Vz);if(this.visible){var k=this.api.getVideoUrl(!0,
!1,!1,!0);this.updateValue("url",k)}Z.D&&(this.V&&(this.Ce(this.V),this.V=null),this.element.removeAttribute("href"),this.element.removeAttribute("title"),this.element.removeAttribute("aria-label"),g.jX(this.element,"no-link"));k=this.api.X();Z=this.api.getVideoData();let N="";k.D||(k=g.V7(k),k.indexOf("www.")===0&&(k=k.substring(4)),N=g.rv(Z)?"Watch on YouTube Music":k==="youtube.com"?"Watch on YouTube":g.DH("Watch on $WEBSITE",{WEBSITE:k}));this.api.B("player_tooltip_data_title_killswitch")?this.updateValue("title",
N):this.updateValue("tooltip-title",N)}onClick(Z){this.api.B("web_player_log_click_before_generating_ve_conversion_params")&&this.api.logClick(this.element);const k=this.api.X();let N=this.api.getVideoUrl(!g.SM(Z),!1,!0,!0);if(g.PQ(k)){const a={};g.PQ(k)&&g.H3(this.api,"addEmbedsConversionTrackingParams",[a]);N=g.mW(N,a)}g.jY(N,this.api,Z);this.api.B("web_player_log_click_before_generating_ve_conversion_params")||this.api.logClick(this.element)}qx(){let Z={J:"svg",W:{height:"100%",version:"1.1",viewBox:"0 0 67 36",
width:"100%"},A:[{J:"path",Rv:!0,Z:"ytp-svg-fill",W:{d:"M 45.09 10 L 45.09 25.82 L 47.16 25.82 L 47.41 24.76 L 47.47 24.76 C 47.66 25.14 47.94 25.44 48.33 25.66 C 48.72 25.88 49.16 25.99 49.63 25.99 C 50.48 25.99 51.1 25.60 51.5 24.82 C 51.9 24.04 52.09 22.82 52.09 21.16 L 52.09 19.40 C 52.12 18.13 52.05 17.15 51.90 16.44 C 51.75 15.74 51.50 15.23 51.16 14.91 C 50.82 14.59 50.34 14.44 49.75 14.44 C 49.29 14.44 48.87 14.57 48.47 14.83 C 48.27 14.96 48.09 15.11 47.93 15.29 C 47.78 15.46 47.64 15.65 47.53 15.86 L 47.51 15.86 L 47.51 10 L 45.09 10 z M 8.10 10.56 L 10.96 20.86 L 10.96 25.82 L 13.42 25.82 L 13.42 20.86 L 16.32 10.56 L 13.83 10.56 L 12.78 15.25 C 12.49 16.62 12.31 17.59 12.23 18.17 L 12.16 18.17 C 12.04 17.35 11.84 16.38 11.59 15.23 L 10.59 10.56 L 8.10 10.56 z M 30.10 10.56 L 30.10 12.58 L 32.59 12.58 L 32.59 25.82 L 35.06 25.82 L 35.06 12.58 L 37.55 12.58 L 37.55 10.56 L 30.10 10.56 z M 19.21 14.46 C 18.37 14.46 17.69 14.63 17.17 14.96 C 16.65 15.29 16.27 15.82 16.03 16.55 C 15.79 17.28 15.67 18.23 15.67 19.43 L 15.67 21.06 C 15.67 22.24 15.79 23.19 16 23.91 C 16.21 24.62 16.57 25.15 17.07 25.49 C 17.58 25.83 18.27 26 19.15 26 C 20.02 26 20.69 25.83 21.19 25.5 C 21.69 25.17 22.06 24.63 22.28 23.91 C 22.51 23.19 22.63 22.25 22.63 21.06 L 22.63 19.43 C 22.63 18.23 22.50 17.28 22.27 16.56 C 22.04 15.84 21.68 15.31 21.18 14.97 C 20.68 14.63 20.03 14.46 19.21 14.46 z M 56.64 14.47 C 55.39 14.47 54.51 14.84 53.99 15.61 C 53.48 16.38 53.22 17.60 53.22 19.27 L 53.22 21.23 C 53.22 22.85 53.47 24.05 53.97 24.83 C 54.34 25.40 54.92 25.77 55.71 25.91 C 55.97 25.96 56.26 25.99 56.57 25.99 C 57.60 25.99 58.40 25.74 58.96 25.23 C 59.53 24.72 59.81 23.94 59.81 22.91 C 59.81 22.74 59.79 22.61 59.78 22.51 L 57.63 22.39 C 57.62 23.06 57.54 23.54 57.40 23.83 C 57.26 24.12 57.01 24.27 56.63 24.27 C 56.35 24.27 56.13 24.18 56.00 24.02 C 55.87 23.86 55.79 23.61 55.75 23.25 C 55.71 22.89 55.68 22.36 55.68 21.64 L 55.68 21.08 L 59.86 21.08 L 59.86 19.16 C 59.86 17.99 59.77 17.08 59.58 16.41 C 59.39 15.75 59.07 15.25 58.61 14.93 C 58.15 14.62 57.50 14.47 56.64 14.47 z M 23.92 14.67 L 23.92 23.00 C 23.92 24.03 24.11 24.79 24.46 25.27 C 24.82 25.76 25.35 26.00 26.09 26.00 C 27.16 26.00 27.97 25.49 28.5 24.46 L 28.55 24.46 L 28.76 25.82 L 30.73 25.82 L 30.73 14.67 L 28.23 14.67 L 28.23 23.52 C 28.13 23.73 27.97 23.90 27.77 24.03 C 27.57 24.16 27.37 24.24 27.15 24.24 C 26.89 24.24 26.70 24.12 26.59 23.91 C 26.48 23.70 26.43 23.35 26.43 22.85 L 26.43 14.67 L 23.92 14.67 z M 36.80 14.67 L 36.80 23.00 C 36.80 24.03 36.98 24.79 37.33 25.27 C 37.60 25.64 37.97 25.87 38.45 25.96 C 38.61 25.99 38.78 26.00 38.97 26.00 C 40.04 26.00 40.83 25.49 41.36 24.46 L 41.41 24.46 L 41.64 25.82 L 43.59 25.82 L 43.59 14.67 L 41.09 14.67 L 41.09 23.52 C 40.99 23.73 40.85 23.90 40.65 24.03 C 40.45 24.16 40.23 24.24 40.01 24.24 C 39.75 24.24 39.58 24.12 39.47 23.91 C 39.36 23.70 39.31 23.35 39.31 22.85 L 39.31 14.67 L 36.80 14.67 z M 56.61 16.15 C 56.88 16.15 57.08 16.23 57.21 16.38 C 57.33 16.53 57.42 16.79 57.47 17.16 C 57.52 17.53 57.53 18.06 57.53 18.78 L 57.53 19.58 L 55.69 19.58 L 55.69 18.78 C 55.69 18.05 55.71 17.52 55.75 17.16 C 55.79 16.81 55.87 16.55 56.00 16.39 C 56.13 16.23 56.32 16.15 56.61 16.15 z M 19.15 16.19 C 19.50 16.19 19.75 16.38 19.89 16.75 C 20.03 17.12 20.09 17.7 20.09 18.5 L 20.09 21.97 C 20.09 22.79 20.03 23.39 19.89 23.75 C 19.75 24.11 19.51 24.29 19.15 24.30 C 18.80 24.30 18.54 24.11 18.41 23.75 C 18.28 23.39 18.22 22.79 18.22 21.97 L 18.22 18.5 C 18.22 17.7 18.28 17.12 18.42 16.75 C 18.56 16.38 18.81 16.19 19.15 16.19 z M 48.63 16.22 C 48.88 16.22 49.08 16.31 49.22 16.51 C 49.36 16.71 49.45 17.05 49.50 17.52 C 49.55 17.99 49.58 18.68 49.58 19.55 L 49.58 21 L 49.59 21 C 49.59 21.81 49.57 22.45 49.5 22.91 C 49.43 23.37 49.32 23.70 49.16 23.89 C 49.00 24.08 48.78 24.17 48.51 24.17 C 48.30 24.17 48.11 24.12 47.94 24.02 C 47.76 23.92 47.62 23.78 47.51 23.58 L 47.51 17.25 C 47.59 16.95 47.75 16.70 47.96 16.50 C 48.17 16.31 48.39 16.22 48.63 16.22 z "}}]},
k=28666;const N=this.api.getVideoData();this.api.isEmbedsShortsMode()?Z={J:"svg",W:{fill:"none",height:"100%",viewBox:"-10 -8 67 36",width:"100%"},A:[{J:"path",W:{d:"m.73 13.78 2.57-.05c-.05 2.31.36 3.04 1.34 3.04.95 0 1.34-.61 1.34-1.88 0-1.88-.97-2.83-2.37-4.04C1.47 8.99.55 7.96.55 5.23c0-2.60 1.15-4.14 4.17-4.14 2.91 0 4.12 1.70 3.71 5.20l-2.57.15c.05-2.39-.20-3.22-1.26-3.22-.97 0-1.31.64-1.31 1.82 0 1.77.74 2.31 2.34 3.84 1.98 1.88 3.09 2.98 3.09 5.54 0 3.24-1.26 4.48-4.20 4.48-3.06.02-4.30-1.62-3.78-5.12ZM9.67.74h2.83V4.58c0 1.15-.05 1.95-.15 2.93h.05c.54-1.15 1.44-1.75 2.60-1.75 1.75 0 2.5 1.23 2.5 3.35v9.53h-2.83V9.32c0-1.03-.25-1.54-.90-1.54-.48 0-.92.28-1.23.79V18.65H9.70V.74h-.02ZM18.67 13.27v-1.82c0-4.07 1.18-5.64 3.99-5.64 2.80 0 3.86 1.62 3.86 5.64v1.82c0 3.96-1.00 5.59-3.94 5.59-2.98 0-3.91-1.67-3.91-5.59Zm5 1.03v-3.94c0-1.72-.25-2.60-1.08-2.60-.79 0-1.05.87-1.05 2.60v3.94c0 1.80.25 2.62 1.05 2.62.82 0 1.08-.82 1.08-2.62ZM27.66 6.03h2.19l.25 2.73h.10c.28-2.01 1.21-3.01 2.39-3.01.15 0 .30.02.51.05l-.15 3.27c-1.18-.25-2.13-.05-2.57.72V18.63h-2.73V6.03ZM34.80 15.67V8.27h-1.03V6.05h1.15l.36-3.73h2.11V6.05h1.93v2.21h-1.80v6.98c0 1.18.15 1.44.61 1.44.41 0 .77-.05 1.10-.18l.36 1.80c-.85.41-1.93.54-2.60.54-1.82-.02-2.21-.97-2.21-3.19ZM40.26 14.81l2.39-.05c-.12 1.39.36 2.19 1.21 2.19.72 0 1.13-.46 1.13-1.10 0-.87-.79-1.46-2.16-2.5-1.62-1.23-2.60-2.16-2.60-4.20 0-2.24 1.18-3.32 3.63-3.32 2.60 0 3.63 1.28 3.42 4.35l-2.39.10c-.02-1.90-.28-2.44-1.08-2.44-.77 0-1.10.38-1.10 1.08 0 .97.56 1.44 1.49 2.11 2.21 1.64 3.24 2.47 3.24 4.53 0 2.26-1.28 3.40-3.73 3.40-2.78-.02-3.81-1.54-3.45-4.14Z",
fill:"#fff"}}]}:g.rv(N)&&(Z={J:"svg",W:{fill:"none",height:"25",viewBox:"0 0 140 25",width:"140"},A:[{J:"path",W:{d:"M33.96 20.91V15.45L37.43 4.11H34.84L33.52 9.26C33.22 10.44 32.95 11.67 32.75 12.81H32.59C32.48 11.81 32.16 10.50 31.84 9.24L30.56 4.11H27.97L31.39 15.45V20.91H33.96Z",fill:"white"}},{J:"path",W:{d:"M40.92 8.31C37.89 8.31 36.85 10.06 36.85 13.83V15.62C36.85 19.00 37.50 21.12 40.86 21.12C44.17 21.12 44.88 19.10 44.88 15.62V13.83C44.88 10.46 44.20 8.31 40.92 8.31ZM42.21 16.73C42.21 18.37 41.92 19.40 40.87 19.40C39.84 19.40 39.55 18.36 39.55 16.73V12.69C39.55 11.29 39.75 10.04 40.87 10.04C42.05 10.04 42.21 11.36 42.21 12.69V16.73Z",
fill:"white"}},{J:"path",W:{d:"M49.09 21.10C50.55 21.10 51.46 20.49 52.21 19.39H52.32L52.43 20.91H54.42V8.55H51.78V18.48C51.50 18.97 50.85 19.33 50.24 19.33C49.47 19.33 49.23 18.72 49.23 17.70V8.55H46.60V17.82C46.60 19.83 47.18 21.10 49.09 21.10Z",fill:"white"}},{J:"path",W:{d:"M59.64 20.91V6.16H62.68V4.11H53.99V6.16H57.03V20.91H59.64Z",fill:"white"}},{J:"path",W:{d:"M64.69 21.10C66.15 21.10 67.06 20.49 67.81 19.39H67.92L68.03 20.91H70.02V8.55H67.38V18.48C67.10 18.97 66.45 19.33 65.84 19.33C65.07 19.33 64.83 18.72 64.83 17.70V8.55H62.20V17.82C62.20 19.83 62.78 21.10 64.69 21.10Z",
fill:"white"}},{J:"path",W:{d:"M77.49 8.28C76.21 8.28 75.29 8.84 74.68 9.75H74.55C74.63 8.55 74.69 7.53 74.69 6.72V3.45H72.14L72.13 14.19L72.14 20.91H74.36L74.55 19.71H74.62C75.21 20.52 76.12 21.03 77.33 21.03C79.34 21.03 80.20 19.30 80.20 15.62V13.71C80.20 10.27 79.81 8.28 77.49 8.28ZM77.58 15.62C77.58 17.92 77.24 19.29 76.17 19.29C75.67 19.29 74.98 19.05 74.67 18.60V11.25C74.94 10.55 75.54 10.04 76.21 10.04C77.29 10.04 77.58 11.35 77.58 13.74V15.62Z",fill:"white"}},{J:"path",W:{d:"M89.47 13.51C89.47 10.53 89.17 8.32 85.74 8.32C82.51 8.32 81.79 10.47 81.79 13.63V15.80C81.79 18.88 82.45 21.12 85.66 21.12C88.20 21.12 89.51 19.85 89.36 17.39L87.11 17.27C87.08 18.79 86.73 19.41 85.72 19.41C84.45 19.41 84.39 18.20 84.39 16.40V15.56H89.47V13.51ZM85.68 9.98C86.90 9.98 86.99 11.13 86.99 13.08V14.09H84.39V13.08C84.39 11.15 84.47 9.98 85.68 9.98Z",
fill:"white"}},{J:"path",W:{d:"M93.18 20.86H95.50V13.57C95.50 11.53 95.46 9.36 95.30 6.46H95.56L95.99 8.24L98.73 20.86H101.09L103.78 8.24L104.25 6.46H104.49C104.37 9.03 104.30 11.35 104.30 13.57V20.86H106.63V4.06H102.67L101.25 10.27C100.65 12.85 100.22 16.05 99.97 17.68H99.78C99.60 16.02 99.15 12.83 98.56 10.29L97.10 4.06H93.18V20.86Z",fill:"white"}},{J:"path",W:{d:"M111.27 21.05C112.73 21.05 113.64 20.44 114.39 19.34H114.50L114.61 20.86H116.60V8.50H113.96V18.43C113.68 18.92 113.03 19.28 112.42 19.28C111.65 19.28 111.41 18.67 111.41 17.65V8.50H108.78V17.77C108.78 19.78 109.36 21.05 111.27 21.05Z",
fill:"white"}},{J:"path",W:{d:"M121.82 21.12C124.24 21.12 125.59 20.05 125.59 17.86C125.59 15.87 124.59 15.06 122.21 13.44C121.12 12.72 120.53 12.27 120.53 11.21C120.53 10.42 121.02 10.00 121.91 10.00C122.88 10.00 123.21 10.64 123.25 12.46L125.41 12.34C125.59 9.49 124.57 8.27 121.95 8.27C119.47 8.27 118.28 9.34 118.28 11.46C118.28 13.42 119.21 14.31 120.96 15.53C122.51 16.60 123.36 17.27 123.36 18.16C123.36 18.89 122.85 19.42 121.96 19.42C120.94 19.42 120.36 18.54 120.46 17.21L118.27 17.25C117.93 19.81 119.13 21.12 121.82 21.12Z",
fill:"white"}},{J:"path",W:{d:"M128.45 6.93C129.35 6.93 129.77 6.63 129.77 5.39C129.77 4.23 129.32 3.87 128.45 3.87C127.57 3.87 127.14 4.19 127.14 5.39C127.14 6.63 127.55 6.93 128.45 6.93ZM127.23 20.86H129.76V8.50H127.23V20.86Z",fill:"white"}},{J:"path",W:{d:"M135.41 21.06C136.67 21.06 137.38 20.91 137.95 20.37C138.80 19.63 139.15 18.48 139.09 16.54L136.78 16.42C136.78 18.54 136.44 19.34 135.45 19.34C134.36 19.34 134.18 18.15 134.18 15.99V13.43C134.18 11.07 134.41 9.95 135.47 9.95C136.35 9.95 136.70 10.69 136.70 13.05L138.99 12.89C139.15 11.20 138.98 9.82 138.18 9.05C137.58 8.49 136.69 8.27 135.51 8.27C132.48 8.27 131.54 10.19 131.54 13.84V15.53C131.54 19.18 132.25 21.06 135.41 21.06Z",
fill:"white"}}]},k=216163);g.rv(N)?g.jX(this.element,"ytp-youtube-music-button"):g.Wp(this.element,"ytp-youtube-music-button");Z.W={...Z.W,"aria-hidden":"true"};this.updateValue("logoSvg",Z);this.api.hasVe(this.element)&&this.api.destroyVe(this.element);this.api.createClientVe(this.element,this,k,!0)}Df(Z){super.Df(Z);this.api.logVisibility(this.element,this.visible&&Z)}};var LEH=class extends g.tt{constructor(Z,k,N){super();this.S=Z;this.xW=k;this.XI=N;this.Tt=NaN;this.zt=this.MX=this.playButton=this.L=this.G=this.Rq=this.vD=this.O=this.Vz=this.muteButton=this.C=this.Kp=this.AX=this.hq=null;this.D=new P0K(this.S);this.progressBar=new g.Iaa(this.S,this.xW);this.rh=new g.HgB(this.S,this.xW);this.Qz=new esH(this.S,this.xW);this.N=new g.o3(this.pF,null,this);N=Z.X();this.XI.subscribe("autohideupdate",this.zD,this);var a=!Z.getPlayerStateObject().isCued(),T;(this.qX=!Z.B("delhi_modern_web_player")&&
Z.X().B("html5_player_dynamic_bottom_gradient"))?this.Kp=T=new wCc(Z):T=new g.E({J:"div",Z:"ytp-gradient-bottom"});g.u(this,T);g.$n(Z,T.element,9);this.FS=new g.ML(T,250,a,100);g.u(this,this.FS);this.V=new g.E({J:"div",Z:"ytp-chrome-bottom",A:[{J:"div",Z:"ytp-chrome-controls"}]});g.u(this,this.V);g.$n(Z,this.V.element,9);Z.B("frosted_glass_controls_opacity_animation")&&this.V.element.classList.add("ytp-frosted-glass-opacity-animation");this.dA=new g.ML(this.V,250,a,100);g.u(this,this.dA);this.Sm=
this.V.element.children[0];g.u(this,this.D);g.$n(Z,this.D.element,6);this.D.subscribe("show",K=>{this.S.tJ(!K);Z.Yr(this.D,K)});
g.u(this,this.progressBar);zQ(this,this.progressBar,this.V.element,void 0,0);a=new SDr(Z,k);g.u(this,a);g.$n(Z,a.element,4);a=new g.JO({J:"div",Z:"ytp-left-controls"});g.u(this,a);a.HD(this.Sm);Z.B("delhi_modern_web_player")||(T=new g.ME(Z,k,!1),g.u(this,T),zQ(this,T,a.element));Z.B("web_render_jump_buttons")&&(this.Vz=new oua(Z,-10),g.u(this,this.Vz),zQ(this,this.Vz,a.element));N.Sm||(this.playButton=new g.RsT(Z,k),g.u(this,this.playButton),zQ(this,this.playButton,a.element));Z.B("web_render_jump_buttons")&&
(this.O=new oua(Z,10),g.u(this,this.O),zQ(this,this.O,a.element));Z.B("delhi_modern_web_player")&&(T=new g.ME(Z,k,!1),g.u(this,T),zQ(this,T,a.element));T=new g.ME(Z,k,!0);g.u(this,T);zQ(this,T,a.element);if(!Z.B("delhi_modern_web_player")||Z.B("delhi_modern_web_player_horizontal_volume_controls"))if(T=new g.E({J:"span",Z:"ytp-volume-area"}),g.u(this,T),zQ(this,T,a.element),!N.iq&&(this.muteButton=new RS(Z,k),g.u(this,this.muteButton),this.muteButton.HD(T.element),N.FS&&!N.j)){const K=new dcK(Z,this.V.element);
this.MX=K;g.u(this,K);K.HD(T.element);T=new g.tU(T.element);g.u(this,T);T.subscribe("hoverstart",()=>{this.MX?.j(!0)});
T=new g.tU(a.element);g.u(this,T);T.subscribe("hoverend",()=>{this.MX?.j(!1)})}Z.B("delhi_modern_web_player_lhs_volume_controls")&&!Z.B("delhi_modern_web_player_horizontal_volume_controls")&&(a.element.classList.add("ytp-left-controls-with-volume"),this.muteButton=new RS(Z,k),g.u(this,this.muteButton),this.muteButton.HD(a.element),this.muteButton.element.classList.add("ytp-standalone-mute-button"));
g.u(this,this.rh);zQ(this,this.rh,a.element,"ytp-time-wrapper");this.vD=new xGH(Z,this.progressBar);g.u(this,this.vD);zQ(this,this.vD,a.element,"ytp-chapter-title");N.B("web_key_moments_markers")&&(this.Rq=new J3c(Z,this.progressBar),g.u(this,this.Rq),zQ(this,this.Rq,a.element,"ytp-chapter-title"));Z.B("delhi_modern_web_player")?this.Y=new g.JO({J:"div",Z:"ytp-right-controls",A:[{J:"div",Z:U7.RIGHT_CONTROLS_LEFT},{J:"div",Z:U7.RIGHT_CONTROLS_RIGHT}]}):this.Y=new g.JO({J:"div",Z:"ytp-right-controls"});
g.u(this,this.Y);zQ(this,this.Y,this.Sm);Z.B("delhi_modern_web_player")&&(this.C=new GIn(Z),g.u(this,this.C),this.C.HD(this.Y.Lp(U7.RIGHT_CONTROLS_LEFT)),Z.B("delhi_modern_web_player_lhs_volume_controls")||Z.B("delhi_modern_web_player_horizontal_volume_controls")||(this.muteButton=new RS(Z,k),g.u(this,this.muteButton),this.muteButton.HD(this.Y.Lp(U7.RIGHT_CONTROLS_LEFT))));this.O6=new cg_(Z,k);g.u(this,this.O6);b4(this,this.O6,"RIGHT_CONTROLS_LEFT");this.settingsButton=new EuK(Z,this.D);g.u(this,
this.settingsButton);IYy(this.D,this.settingsButton);b4(this,this.settingsButton,"RIGHT_CONTROLS_LEFT");a=Z.getVideoData();if(N.Yh||a.o4&&N.controlsType==="1")this.G=new XsF(Z,k),g.u(this,this.G),this.G.HD(this.Y.element);N.showMiniplayerButton&&!Z.B("web_player_miniplayer_in_context_menu")&&(this.L=new zsD(Z),g.u(this,this.L),b4(this,this.L,"RIGHT_CONTROLS_RIGHT"));N.showMiniplayerButton&&this.K(Z,"minimized",()=>{this.D.hide()});
N.Vg&&(k=new j2B(Z,this.D),g.u(this,k),b4(this,k,"RIGHT_CONTROLS_RIGHT"));N.IV&&(k=new gun(Z),g.u(this,k),b4(this,k,"RIGHT_CONTROLS_RIGHT"));g.u(this,this.Qz);b4(this,this.Qz,"RIGHT_CONTROLS_RIGHT");g.u(this,this.N);this.K(Z,"appresize",this.qx);this.K(Z,"fullscreentoggled",this.qx);this.C?.subscribe("small-mode-expand-right-bottom-controls",()=>{kx0(this)});
this.C?.subscribe("small-mode-collapse-right-bottom-controls",()=>{kx0(this)});
this.K(Z,"presentingplayerstatechange",this.tq);this.K(Z,"videodatachange",this.onVideoDataChange);this.qx()}onProgress(){if(this.S.B("web_player_max_seekable_on_ended")||!this.S.getPlayerStateObject().V(2))aQ(this.XI),this.progressBar.MW(),this.rh.MW()}zD(){this.tq();if(aQ(this.XI))this.progressBar.L();else this.onProgress()}pF(){this.onProgress();this.N.start()}tq(){var Z;if(Z=!this.S.X().U){Z=this.progressBar;const N=2*g.lS()*Z.j;var k=Z.D;Z=(k.V-k.U)*1E3/Z.api.getPlaybackRate()/N<300}Z=Z&&this.S.getPlayerStateObject().isPlaying()&&
!!window.requestAnimationFrame;k=!Z;aQ(this.XI)&&(Z=k=!1);k?this.zt||(this.zt=this.K(this.S,"progresssync",this.onProgress)):this.zt&&(this.Ce(this.zt),this.zt=null);Z?this.N.isActive()||this.N.start():this.N.stop()}HA(){return this.playButton?(this.playButton.focus(),!0):!1}qx(){var Z=this.S.dQ();const k=this.S.fF().getPlayerSize();var N=this.S.fF().BF;const a=pu(this),T=aOj(this);var K=Math.max(k.width-a*2,100);if(this.Tt!==k.width||this.hq!==Z||this.S.B("web_player_rtr_ctrls")&&this.AX!==N)this.Tt=
k.width,this.hq=Z,this.AX=N,this.V.element.style.width=`${T}px`,this.V.element.style.left=`${a}px`,g.GAG(this.progressBar,a,T,Z),this.S.sb().Ss=T;N=this.D;K=Math.min(570*(Z?1.5:1),K);Z=Math.min(413*(Z?1.5:1),Math.round((k.height-R9(this))*.82));N.maxWidth=K;N.maxHeight=Z;N.VG();this.tq();this.qX&&BiX(this.Kp,k.height)}onVideoDataChange(){const Z=this.S.getVideoData();this.Sm.style.background=Z.o4?Z.Vl:"";this.O&&gTy(this.O,Z.showSeekingControls);this.Vz&&gTy(this.Vz,Z.showSeekingControls)}lq(){return this.V.element}s6(){return this.progressBar}r5(Z,
k){const N=Number(Z.element.getAttribute("data-priority"))||0;let a=0,T=this.Y.element;k&&this.S.B("delhi_modern_web_player")&&(T=this.Y.Lp(U7[k]));for(const K of T.children){if(N<(Number(K.getAttribute("data-priority"))||0))break;a++}Z.HD(T,a)}};var Veh=class extends gY{constructor(Z){super(Z,!1);this.suggestedActions={};this.V=null;this.Y=!1;this.element.setAttribute("data-overlay-order","7");this.K(this.S,"videodatachange",this.onVideoDataChange);this.K(this.S,g.te("suggested_action_button_visible"),k=>{this.text=k=k.id;ZO(this);this.onClickCommand=this.suggestedActions[k]?.tapCommand;this.enabled=!0;this.Hq()});
this.K(this.S,g.he("suggested_action_button_visible"),k=>{this.enabled=!1;this.Hq();this.S.removeCueRange(k.id)});
this.K(Z,"presentingplayerstatechange",this.onStateChange)}Sm(Z){Z.target===this.dismissButton.element?this.V&&fFR(Rh(),this.V):(this.onClickCommand&&(this.G(!1),g.A7(this.S,"innertubeCommand",this.onClickCommand)),this.j())}j(){this.enabled=!1;this.xW.hide()}onVideoDataChange(Z,k){Z==="dataloaded"&&TTX(this);Z=[];if(k=g.J(k.getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.suggestedActionsRenderer,mVG)?.suggestedActions)for(var N of k)(k=g.J(N,sFU))&&g.J(k.trigger,OW)&&Z.push(k);if(Z.length!==
0){N=[];for(const a of Z){Z=g.J(a.trigger,OW);if(!Z)continue;k=(k=a.title)?g.YL(k):"View Chapters";const T=Z.timeRangeStartMillis,K=Z.timeRangeEndMillis;Z=Z.onlyTriggersOnPlayerPause;a.tapCommand&&(T!=null&&K!=null&&N.push(new g.pe(T,K,{priority:9,namespace:"suggested_action_button_visible",id:k})),T!=null&&K!=null||Z)&&(this.suggestedActions[k]=a,a.rendererContext&&!this.D&&(Z=g.J(a.rendererContext,d5r))&&(Z=Z.loggingDirectives?.trackingParams)&&(this.S.setTrackingParams(this.badge.element,Z),this.D=
!0),a.dismissButtonClientVeSpec?.uiType&&!this.V&&(this.V=Qz(a.dismissButtonClientVeSpec.uiType),nw(Rh(),this.V)))}this.S.f8(N)}}C(){return this.enabled}Hq(){this.enabled?this.O6.start():WI(this);this.U()}onStateChange(Z){for(const k of Object.keys(this.suggestedActions))if(g.J(this.suggestedActions[k].trigger,OW)?.onlyTriggersOnPlayerPause){Z.state.isPaused()&&!this.Y?(this.text=k,ZO(this),this.onClickCommand=this.suggestedActions[k]?.tapCommand,this.enabled=!0,this.Hq(),this.Y=!0):Z.oldState.isPaused()&&
(this.enabled=!1,this.Hq());break}}YW(){TTX(this);super.YW()}};var IS={CHANNEL_NAME:"ytp-title-channel-name",FULLERSCREEN_LINK:"ytp-title-fullerscreen-link",LINK:"ytp-title-link",SESSIONLINK:"yt-uix-sessionlink",SUBTEXT:"ytp-title-subtext",TEXT:"ytp-title-text",TITLE:"ytp-title"},FEB=class extends g.E{constructor(Z){super({J:"div",Z:IS.TITLE,A:[{J:"div",BD:[IS.TEXT,Z.B("enable_larger_title_line_height")?"ytp-title-text-larger-line-height":""],A:[{J:"a",BD:[IS.LINK,IS.SESSIONLINK],W:{target:Z.X().N,href:"{{url}}","data-sessionlink":"feature=player-title",tabIndex:"{{channelTitleFocusable}}"},
Da:"{{title}}"},{J:"div",Z:IS.SUBTEXT,A:["{{subtextElement}}"]}]}]});this.api=Z;this.V=null;this.link=this.Lp(IS.LINK);Z.createClientVe(this.element,this,23851);this.K(Z,"videodatachange",this.aq);this.K(Z,"videoplayerreset",this.aq);this.aq()}onClick(Z){this.api.logClick(this.element);var k=this.api.X();let N=this.api.getVideoUrl(!g.SM(Z),!1,!0);g.PQ(k)&&(k={},g.H3(this.api,"addEmbedsConversionTrackingParams",[k]),N=g.mW(N,k));g.jY(N,this.api,Z)}aq(){const Z=this.api.getVideoData(),k=this.api.X();
this.updateValue("title",Z.title);var N={J:"a",Z:IS.CHANNEL_NAME,W:{href:"{{channelLink}}",target:"_blank"},Da:"{{channelName}}"};this.api.X().D?N={J:"span",Z:IS.CHANNEL_NAME,Da:"{{channelName}}",W:{tabIndex:"{{channelSubtextFocusable}}"}}:Z.zN&&(N={J:"span",Z:IS.SUBTEXT,Da:Z.zN});this.updateValue("subtextElement",N);KTR(this);this.api.getPresentingPlayerType()===2&&(N=this.api.getVideoData(),N.videoId&&N.isListed&&N.author&&N.Rq&&N.profilePicture?(this.updateValue("channelLink",N.Rq),this.updateValue("channelName",
N.author),this.updateValue("channelTitleFocusable","0")):KTR(this));N=k.externalFullscreen||!this.api.isFullscreen()&&k.YH;g.D(this.link,IS.FULLERSCREEN_LINK,N);k.O||!Z.videoId||N||Z.o4||k.D?this.V&&(this.updateValue("url",null),this.Ce(this.V),this.V=null):(this.updateValue("url",this.api.getVideoUrl(!0)),this.V||(this.V=this.K(this.link,"click",this.onClick)));k.D&&(this.element.classList.add("ytp-no-link"),this.updateValue("channelName",g.PQ(k)?Z.expandedTitle:Z.author),this.updateValue("channelTitleFocusable",
"0"),this.updateValue("channelSubtextFocusable","0"))}};g.teB=class extends g.E{constructor(Z,k){const N={J:"div",Z:"ytp-tooltip-progress-bar-pill",A:[{J:"div",Z:"ytp-tooltip-progress-bar-pill-time-stamp",Da:"{{pillTimeStamp}}"},{J:"div",Z:"ytp-tooltip-progress-bar-pill-title",Da:"{{pillTitle}}"}]};super({J:"div",A:[{J:"div",Z:"ytp-tooltip-text-wrapper",W:{"aria-hidden":"{{ariaHidden}}"},A:[{J:"div",Z:"ytp-tooltip-edu",A:[{J:"svg",W:{height:"100%",viewBox:"0 0 36 36",width:"100%"},A:[{J:"path",W:{d:"M14.1 36.75 12 34.65 24 22.65 36 34.65 33.9 36.75 24 26.85ZM14.1 24.1 12 22 24 10 36 22 33.9 24.1 24 14.2Z"}}]},
{J:"span",Da:"{{eduText}}"}]},{J:"div",Z:"ytp-tooltip-image"},{J:"div",Z:"ytp-tooltip-title",A:[{J:"span",Da:"{{title}}"},{J:"div",Z:"ytp-tooltip-keyboard-shortcut",Da:"{{keyBoardShortcutTitle}}"}]},{J:"div",Z:"ytp-tooltip-bottom-text",A:[{J:"span",Z:"ytp-tooltip-text",Da:"{{text}}"},{J:"div",Z:"ytp-tooltip-keyboard-shortcut",Da:"{{keyBoardShortcut}}"}]},Z.B("frosted_glass_controls_opacity_animation")?null:N]},{J:"div",Z:"ytp-tooltip-bg",A:[{J:"div",Z:"ytp-tooltip-duration",Da:"{{duration}}"}]},Z.B("frosted_glass_controls_opacity_animation")?
N:null]});this.api=Z;this.Rq=k;this.N=a=>{(a=a.relatedTarget)&&g.C1(this.V,a)||this.L()};
this.G=a=>{this.type===3&&this.L();(a=a.currentTarget)&&a.nodeType===1&&!this.type&&(a.removeEventListener("mouseover",this.G),a.addEventListener("mouseout",this.N),a.removeEventListener("focus",this.G),a.addEventListener("blur",this.N),r1X(this,a,2))};
this.O=()=>{this.L()};
this.type=this.V=null;this.C=!1;this.U=null;this.D="";this.j=!0;this.scale=1;this.env=this.api.X();this.dA=this.env.U;this.wrapper=this.Lp("ytp-tooltip-text-wrapper");this.bg=this.Lp("ytp-tooltip-bg");this.FS=this.Lp("ytp-tooltip-edu");this.image=this.Lp("ytp-tooltip-image");this.text=this.Lp("ytp-tooltip-text");this.bottomText=this.Lp("ytp-tooltip-bottom-text");this.title=this.Lp("ytp-tooltip-title");this.fade=new g.ML(this,100);this.Y=NaN;this.Ss=this.api.fF().getPlayerSize().width;this.zt=new g.Uc(this.Sm,
250,this);this.xW=new g.Uc(this.L,5E3,this);g.u(this,this.fade);g.u(this,this.zt);g.u(this,this.xW);jd&&(Z=this.Lp("ytp-tooltip-text"),Z.setAttribute("role","text"),Z.setAttribute("aria-live","polite"));if(this.api.B("frosted_glass_controls_opacity_animation"))for(const a of this.element.children)g.jX(a,"ytp-frosted-glass-fade-transition")}setEnabled(Z){if(this.type!=null)if(Z)switch(this.type){case 3:case 2:Mh(this);this.fade.show();break;default:this.fade.show()}else this.fade.hide();this.j=Z}WC(Z,
k,N,a,T,K,y,Q){if(!this.dA||this.env.j){this.type===3&&this.L();this.type!==1&&(g.nj(this.element,"ytp-tooltip ytp-bottom"),this.api.B("frosted_glass_controls_opacity_animation")&&g.jX(this.element,"ytp-frosted-glass-fade-transition"),this.type=1,this.j&&this.fade.show(),this.U&&this.U.dispose(),(this.U=this.api.Cn())&&this.U.subscribe("l",this.vD,this));if(Q){const q=g.I4(this.bg).height||141;this.FS.style.bottom=`${q+2}px`}else this.FS.style.display="none";this.env.B("delhi_modern_web_player")?
(this.update({pillTimeStamp:N,pillTitle:K??"",eduText:Q??""}),g.jX(this.element,"ytp-tooltip-progress-bar-style")):(this.update({text:N,title:K??"",eduText:Q??""}),g.D(this.bottomText,"ytp-tooltip-text-no-title",this.type===1&&!K));this.api.isInline()&&g.jX(this.bottomText,"ytp-modern-tooltip-text");g.D(this.element,"ytp-text-detail",!!a);N=-1;this.U&&(N=qO(this.U,243*this.scale),this.env.B("web_l3_storyboard")&&this.U.levels.length===4&&(N=this.U.levels.length-1),N=Wnr(this.U,N,k));q8y(this,N);if(y)switch(k=
g.I4(this.element).width,y){case 1:this.title.style.right="0";this.title.style.textAlign="left";break;case 2:this.title.style.right=`${k}px`;this.title.style.textAlign="right";break;case 3:this.title.style.right=`${k/2}px`,this.title.style.textAlign="center"}Q1r(this,!!a,Z,T)}}Gn(){this.type===1&&this.L()}cJ(Z,k){if(this.type)if(this.type===3)this.L();else return;r1X(this,Z,3,k)}qj(){this.V&&!this.C&&(this.env.B("player_tooltip_data_title_killswitch")?this.V.hasAttribute("title")&&(this.D=this.V.getAttribute("title")||
"",this.V.removeAttribute("title"),this.j&&Mh(this)):this.V.hasAttribute("data-tooltip-title")&&(this.D=this.V.getAttribute("data-tooltip-title")||"",this.V.removeAttribute("data-tooltip-title"),this.j&&Mh(this)))}vD(Z,k){Z<=this.Y&&this.Y<=k&&(Z=this.Y,this.Y=NaN,q8y(this,Z))}Sm(){EoR(this.U,this.Y,243*this.scale)}L(){switch(this.type){case 2:const Z=this.V;Z.removeEventListener("mouseout",this.N);Z.addEventListener("mouseover",this.G);Z.removeEventListener("blur",this.N);Z.addEventListener("focus",
this.G);Cur(this);break;case 3:Cur(this);break;case 1:this.U&&(this.U.unsubscribe("l",this.vD,this),this.U=null),this.api.removeEventListener("videoready",this.O),this.zt.stop()}this.type=null;this.j&&this.fade.hide()}qd(...Z){if(this.V)for(Z=0;Z<arguments.length;Z++)g.C1(arguments[Z],this.V)&&this.L()}YW(){this.type!=null&&this.L();this.U&&this.U.dispose();super.YW()}};var hgr=class extends g.E{constructor(Z){super({J:"button",BD:["ytp-watch-later-button","ytp-button"],W:{title:Z.B("player_tooltip_data_title_killswitch")?"{{title}}":"","data-tooltip-title":"{{tooltip-title}}","data-tooltip-image":"{{image}}","data-tooltip-opaque":String(g.PQ(Z.X()))},A:[{J:"div",Z:"ytp-watch-later-icon",Da:"{{icon}}"},{J:"div",Z:"ytp-watch-later-title",Da:"Watch later"}]});this.S=Z;this.icon=null;this.visible=this.isRequestPending=this.V=!1;g50(Z);Z.createClientVe(this.element,
this,28665);this.listen("click",this.onClick,this);this.K(Z,"videoplayerreset",this.onReset);this.K(Z,"appresize",this.U);this.K(Z,"videodatachange",this.U);this.K(Z,"presentingplayerstatechange",this.U);this.U();Z=this.S.X();const k=g.kh("yt-player-watch-later-pending");Z.Y&&k?(jvU(),mg0(this)):this.aq(2);g.D(this.element,"ytp-show-watch-later-title",g.PQ(Z));la(this.S,this.element,this)}U(){this.visible=s1X(this);this.In(this.visible);this.icon&&A1j(this,this.icon);this.S.logVisibility(this.element,
this.visible&&this.Vz)}S9(){return this.S.getVideoData().videoId}onClick(){this.S.logClick(this.element);const Z=this.S.X(),k=this.S9();Z.xW?mg0(this):Puy(this,k)}onReset(){this.isRequestPending=this.V=!1;this.aq(2);this.U()}aq(Z,k){const N=this.S.X();A1j(this,Z);k?this.S.B("player_tooltip_data_title_killswitch")?this.update({title:k,image:null}):this.update({"tooltip-title":k,image:null}):N.userDisplayName?(Z={USER_NAME:N.userDisplayName},this.S.B("player_tooltip_data_title_killswitch")?this.update({title:this.V?
g.DH("Added as $USER_NAME",Z):g.DH("Watch later as $USER_NAME",Z),image:wr(N)}):this.update({"tooltip-title":this.V?g.DH("Added as $USER_NAME",Z):g.DH("Watch later as $USER_NAME",Z),image:wr(N)})):this.S.B("player_tooltip_data_title_killswitch")?this.update({title:"Watch later",image:null}):this.update({"tooltip-title":"Watch later",image:null});this.S.qj()}Df(Z){super.Df(Z);this.S.logVisibility(this.element,this.visible&&Z)}};var uzT=class extends g.iL{constructor(){super(...arguments);this.SD=(this.m7=g.PQ(this.api.X()))&&(this.api.X().U||uR()||t5());this.K1=48;this.uJ=69;this.Ew=this.P0=null;this.Lc=[];this.OF=this.H0=this.gy=this.LI=this.Zl=null;this.qT=[];this.contextMenu=this.P9=this.overflowButton=this.Ln=this.Mj=this.searchButton=this.copyLinkButton=this.shareButton=this.aV=this.lV=this.title=this.channelAvatar=this.zK=this.tooltip=null;this.Ge=!1;this.Is=this.jZ=this.w7=this.Wr=null;this.ZS=this.S4=this.Wp=!1}init(){this.Zl=
new g.YhF(this.api);this.api.B("web_player_delhi_dtts")?this.LI=new fac(this.api):this.LI=new Q2c(this.api);this.H0=new g.E({J:"div",Z:"ytp-chrome-top"});this.tooltip=new g.teB(this.api,this);this.channelAvatar=new NIH(this.api);this.title=new FEB(this.api);this.lV=new g.JO({J:"div",Z:"ytp-chrome-top-buttons"});this.Mj=new Z5n(this.api,this.H0.element);this.P9=this.api.X().controlsType==="1"?new LEH(this.api,this,this.XI):null;this.contextMenu=new KiH(this.api,this.Zl);this.Wr=new g.E({J:"div",W:{tabindex:"0"}});
this.w7=new g.E({J:"div",W:{tabindex:"0"}});var Z=this.api.fF();const k=this.api.X();var N=this.api.getVideoData();this.m7&&(g.jX(this.api.getRootNode(),"ytp-embed"),g.jX(this.api.getRootNode(),"ytp-embed-playlist"),this.SD&&(g.jX(this.api.getRootNode(),"ytp-embed-overlays-autohide"),g.jX(this.contextMenu.element,"ytp-embed-overlays-autohide")),this.K1=60,this.uJ=89);this.api.X().D&&g.jX(this.api.getRootNode(),"ytp-embed-pfl");this.api.X().U&&(g.jX(this.api.getRootNode(),"ytp-mobile"),this.api.X().j&&
g.jX(this.api.getRootNode(),"ytp-embed-mobile"));N&&N.videoId&&(this.P0=N&&N.getEmbeddedPlayerResponse());g.u(this,this.Zl);g.$n(this.api,this.Zl.element,4);g.u(this,this.LI);g.$n(this.api,this.LI.element,4);N=new g.E({J:"div",Z:"ytp-gradient-top"});g.u(this,N);g.$n(this.api,N.element,1);this.gy=new g.ML(N,250,!0,100);g.u(this,this.gy);g.u(this,this.H0);g.$n(this.api,this.H0.element,1);this.OF=new g.ML(this.H0,250,!0,100);g.u(this,this.OF);g.u(this,this.tooltip);g.$n(this.api,this.tooltip.element,
4);const a=new FiH(this.api);g.u(this,a);g.$n(this.api,a.element,5);a.subscribe("show",K=>{this.IR(a,K)});
this.qT.push(a);this.zK=new tZJ(this.api,a);g.u(this,this.zK);!this.m7&&(this.w0&&this.api.B("delhi_modern_web_player")?this.w0.B0(this.zK.element,2):this.zK.HD(this.H0.element));g.u(this,this.channelAvatar);this.channelAvatar.HD(this.H0.element);g.u(this,this.title);this.title.HD(this.H0.element);this.m7&&(N=new vuJ(this.api),g.u(this,N),N.HD(this.H0.element));g.u(this,this.lV);this.w0?(this.lV.element.setAttribute("data-overlay-order","2"),this.w0.B0(this.lV.element,2)):this.lV.HD(this.H0.element);
const T=new DGr(this.api,this);g.u(this,T);g.$n(this.api,T.element,5);T.subscribe("show",K=>{this.IR(T,K)});
this.qT.push(T);this.searchButton=new lar(this.api);g.u(this,this.searchButton);this.searchButton.HD(this.lV.element);N=this.api.X().getWebPlayerContextConfig();this.aV=new hgr(this.api);g.u(this,this.aV);N?.hideTopWatchNextButton||this.aV.HD(this.lV.element);this.shareButton=new BIH(this.api,this,T);g.u(this,this.shareButton);N?.hideTopShareButton||this.shareButton.HD(this.lV.element);this.copyLinkButton=new y3H(this.api,this);g.u(this,this.copyLinkButton);this.copyLinkButton.HD(this.lV.element);
this.m7&&this.zK.HD(this.lV.element);g.u(this,this.Mj);this.Mj.HD(this.lV.element);k.sN&&(N=new i5_(this.api),g.u(this,N),g.$n(this.api,N.element,4));k.D||(N=new kIK(this.api,this.Mj),g.u(this,N),N.HD(this.lV.element));this.Ln=new Lii(this.api);g.u(this,this.Ln);g.$n(this.api,this.Ln.element,5);this.Ln.subscribe("show",()=>{this.IR(this.Ln,this.Ln.Ga())});
this.qT.push(this.Ln);this.overflowButton=new XCr(this.api,this.Ln);g.u(this,this.overflowButton);this.overflowButton.HD(this.lV.element);this.P9&&g.u(this,this.P9);k.controlsType==="3"&&(N=new u7K(this.api),g.u(this,N),g.$n(this.api,N.element,9));g.u(this,this.contextMenu);this.contextMenu.subscribe("show",this.o1,this);this.Wr.listen("focus",this.u4,this);g.u(this,this.Wr);this.w7.listen("focus",this.b4,this);g.u(this,this.w7);(this.jZ=k.fN?null:new dGK(this.api,Z,this.contextMenu,this.XI,this.Zl,
this.LI,()=>this.t0(),this.P9?.s6()))&&g.u(this,this.jZ);
this.m7||(this.Lw=new qDr(this.api),g.u(this,this.Lw),this.w0?this.w0.B0(this.Lw.element,3):g.$n(this.api,this.Lw.element,4),this.Jo=new O5K(this.api),g.u(this,this.Jo),this.w0?this.w0.B0(this.Jo.element,3):g.$n(this.api,this.Jo.element,4));this.b6=new Veh(this.api);g.u(this,this.b6);this.w0?this.w0.B0(this.b6.element,3):g.$n(this.api,this.b6.element,4);if(this.m7){const K=new CEJ(this.api,this.api.X().Rq);g.u(this,K);g.$n(this.api,K.element,5);K.subscribe("show",y=>{this.IR(K,y)});
Z=new mGB(this.api,K);g.u(this,Z);g.$n(this.api,Z.element,4)}this.DE.push(this.Zl.element);this.K(this.api,"fullscreentoggled",this.TB);this.K(this.api,"offlineslatestatechange",()=>{this.api.KY()&&T1(this.XI,128,!1)});
this.K(this.api,"cardstatechange",()=>{this.fE()});
this.K(this.api,"resize",this.wv);this.K(this.api,"videoplayerreset",this.onReset);this.K(this.api,"showpromotooltip",this.f0);super.init()}sb(){return this.tooltip}Tj(){return this.P9}IR(Z,k){k?this.Ew=Z:this.Ew=null;this.fE()}r7(Z,k){if(k)this.Lc.push(Z);else for(k=this.Lc.length;k>=0;k--)if(this.Lc[k]===Z){this.Lc.splice(k,1);break}T1(this.XI,64,this.Lc.length>0)}w3(){this.api.pm()&&this.api.hh();return!!this.Ew||c1y(this)||super.w3()}fE(){const Z=!this.w3(),k=Z&&this.api.pm()&&!this.api.getPlayerStateObject().V(2)&&
!this.api.getVideoData().o4&&!this.api.X().D&&!this.api.isEmbedsShortsMode(),N=this.m7&&g.v3(this.api)&&this.api.getPlayerStateObject().V(128);Z||N?(this.OF.show(),this.gy.show()):(this.OF.hide(),this.gy.hide(),this.api.qd(this.H0.element));k?this.Mj.Iv():this.Mj.cA();this.P9&&NTi(this.P9,this.ZS||!Z);this.api.B("web_player_hide_overflow_button_if_empty_menu")&&nu(this);super.fE()}U1(Z,k,N,a,T){Z.style.left="";Z.style.top="";Z.style.bottom="";var K=g.I4(Z),y=a||this.P9&&g.C1(this.P9.lq(),k),Q=a=null;
N!=null&&y||(a=g.I4(k),Q=g.Mi(k,this.api.getRootNode()),N==null&&(N=Q.x+a.width/2));N-=K.width/2;y?(k=this.P9,a=pu(k),Q=aOj(k),y=this.api.fF().getPlayerSize().height,N=g.u0(N,a,a+Q-K.width),K=y-R9(k)-K.height):g.C1(this.H0.element,k)?(k=this.api.fF().getPlayerSize().width,N=g.u0(N,12,k-K.width-12),K=this.dQ()?this.uJ:this.K1,this.api.X().playerStyle==="gvn"&&(K+=20),this.m7&&(K-=this.dQ()?26:18)):(k=this.api.fF().getPlayerSize(),N=g.u0(N,12,k.width-K.width-12),K=Q.y>(k.height-a.height)/2?Q.y-K.height-
12:Q.y+a.height+12);Z.style.top=`${K+(T||0)}px`;Z.style.left=`${N}px`}zD(Z){Z&&(this.api.qd(this.H0.element),this.P9&&this.api.qd(this.P9.lq()));this.SD&&(g.D(this.contextMenu.element,"ytp-autohide",Z),g.D(this.contextMenu.element,"ytp-autohide-active",!0));super.zD(Z)}iG(){super.iG();this.SD&&(g.D(this.contextMenu.element,"ytp-autohide-active",!1),this.SD&&(this.contextMenu.hide(),this.Ln&&this.Ln.hide()))}Sd(Z,k){var N=this.api.fF().getPlayerSize();N=new g.DJ(0,0,N.width,N.height);if(Z||!aQ(this.XI)&&
!this.w3()){if(this.api.X().D4||k)Z=this.dQ()?this.uJ:this.K1,N.top+=Z,N.height-=Z;this.P9&&(N.height-=R9(this.P9))}return N}TB(Z){const k=this.api.getRootNode();Z?k.parentElement?(k.setAttribute("aria-label","YouTube Video Player in Fullscreen"),this.api.X().externalFullscreen||(k.parentElement.insertBefore(this.Wr.element,k),k.parentElement.insertBefore(this.w7.element,k.nextSibling))):g.b(Error("Player not in DOM.")):(k.setAttribute("aria-label","YouTube Video Player"),this.Wr.detach(),this.w7.detach());
this.qx();this.kh()}dQ(){if(this.api.B("web_player_use_screen_width_for_big_mode"))return this.api.fF().getPlayerSize().width>=(g.Q5(this.api.X().experiments,"web_player_big_mode_screen_width_cutoff")??2E3);const Z=this.api.X();return this.api.isFullscreen()&&!Z.j||!1}showControls(Z){this.Wp=!Z;this.fE()}qx(){var Z=this.dQ();this.tooltip.scale=Z?1.5:1;this.contextMenu&&g.D(this.contextMenu.element,"ytp-big-mode",Z);this.fE();this.api.B("web_player_hide_overflow_button_if_empty_menu")||nu(this);this.kh();
const k=this.api.isEmbedsShortsMode();k&&Z?(Z=(this.api.fF().getPlayerSize().width-this.api.getVideoContentRect().width)/2,g.ij(this.H0.element,"padding-left",`${Z}px`),g.ij(this.H0.element,"padding-right",`${Z}px`)):k&&(g.ij(this.H0.element,"padding-left",""),g.ij(this.H0.element,"padding-right",""));super.qx()}bO(){if(c1y(this)&&!g.v3(this.api))return!1;var Z=this.api.getVideoData();return!g.PQ(this.api.X())||this.api.getPresentingPlayerType()===2||!this.P0||((Z=this.P0||Z.P0)?(Z=Z.embedPreview)?
(Z=Z.thumbnailPreviewRenderer,Z=Z.videoDetails&&g.J(Z.videoDetails,kqU)||null):Z=null:Z=null,Z&&Z.collapsedRenderer&&Z.expandedRenderer)?super.bO():!1}kh(){super.kh();this.api.logVisibility(this.title.element,!!this.f5);this.zK&&this.zK.Df(!!this.f5);this.channelAvatar.Df(!!this.f5);this.overflowButton&&this.overflowButton.Df(this.bV()&&!!this.f5);this.shareButton&&this.shareButton.Df(!this.bV()&&!!this.f5);this.aV&&this.aV.Df(!this.bV()&&!!this.f5);this.searchButton&&this.searchButton.Df(!this.bV()&&
!!this.f5);this.copyLinkButton&&this.copyLinkButton.Df(!this.bV()&&!!this.f5);if(!this.f5){this.api.qd(this.H0.element);for(let Z=0;Z<this.qT.length;Z++){const k=this.qT[Z];k.Ga()&&k.cA()}}}Y4(Z){this.P9&&NTi(this.P9,this.w3());this.fE();super.Y4(Z)}handleGlobalKeyDown(Z,k,N,a,T,K,y,Q){return this.jZ?this.jZ.handleGlobalKeyDown(Z,k,N,a,T,K,y,Q):!1}handleGlobalKeyUp(Z,k,N,a,T,K,y){return this.jZ?this.jZ.handleGlobalKeyUp(Z,k,N,a,T,K,y):!1}t0(){if(this.contextMenu.LF)return this.contextMenu.cA(),!0;
if(this.Lc.length)return this.Lc[this.Lc.length-1].cA(),!0;if(this.Ew)return this.Ew.cA(),!0;this.P9&&this.api.qd(this.P9.lq());this.lV&&this.api.qd(this.lV.element);return super.t0()}Yr(Z,k){this.S4=k;this.r7(Z,k);this.o1()}o1(){const Z=this.S4||this.contextMenu.Ga();this.Ge!==Z&&(this.Ge=Z,g.A7(this.api,"onAutonavPauseRequest",this.Ge))}u4(){I9(this,this.api.getRootNode(),!0).focus()}b4(){I9(this,this.api.getRootNode(),!1).focus()}Z1(){return this.P9&&this.P9.D}qm(){this.XI.qm()}FC(){this.Zl.hide()}iD(Z){this.Zl.iD(!Z.isOrWillBePlaying())}j0(Z,
k,N,a){this.LI.j0(Z,k,N,a)}renderChapterSeekingAnimation(Z,k,N){this.LI.UU(Z,k,N)}wv(){dgr(this,!0)}onReset(){nu(this)}f0(Z){dgr(this,!1,Z)}Z_(){return this.contextMenu}vT(Z,k){this.P9?.r5(Z,k)}nE(){const Z=this.P9?.s6();Z&&Z.U?.isEnabled&&Z.nE()}B0(Z,k,N){this.w0?.B0(Z,k,N)}};g.llH=class extends g.oS{constructor(Z){super(Z);this.chrome=null;this.load()}CD(){return!1}create(){const Z=this.player.X();g.oJ(Z)&&Z.U||Z.disableOrganicUi?this.chrome=new g.iL(this.player):this.chrome=new uzT(this.player);g.u(this,this.chrome);this.chrome.init()}jK(){return this.chrome}};var E7=[],XwN=!1;var flH=class extends g.jR{constructor(Z){super();this.app=Z;this.L=this.Y=this.U=this.V=null;this.D=1;this.events=new g.tt(this);this.events.K(this.app.rA,g.he("gaplessshortslooprange"),this.C);g.u(this,this.events)}j(){this.V!=null&&this.app.getVideoData()!==this.V&&cZ(this.V)&&mV(this.app,this.V,void 0,void 0,this.D)}G(){if(this.V!=null&&this.app.getVideoData()!==this.V&&this.U!=null&&this.Y!=null&&this.L!=null&&cZ(this.V)){const Z=V0N(this.U,this.Y,this.L);Z==null?mV(this.app,this.V,void 0,void 0,
this.D):(this.U.U6("sgap",Z),this.U.getVideoData().j&&this.U.VJ(!1),this.app.X().B("html5_remove_loop_range_on_gapless_fallback")&&(qx(this.app,"gaplessshortslooprange"),this.app.setLoopRange(null)))}}C(Z){const k=this.app.wA();if(k){const N=this.app.getCurrentTime();Math.abs(N-Z.end/1E3)>5&&k.U6("glrs",{cmt:N});k.seekTo(0,{seekSource:58});k.U6("glrre",{cmt:N})}}YW(){this.V=null;super.YW()}};var FTi=class{constructor(){this.V=this.j=this.D=this.U=this.N=this.G=this.Vz=this.C=this.L=this.Y=!1}};g.k$=class extends vrG{constructor(Z,k,N,a=!1){super();this.mediaElement=Z;this.start=k;this.end=N;this.V=a}isView(){return!0}xl(){const Z=this.mediaElement.getCurrentTime();if(Z<this.start)try{const k=this.mediaElement.pN(),N=pf(k,Z);return!(this.start<N)}catch(k){}return!1}L(){return It(this.mediaElement.L(),this.start,this.end)}pN(){return It(this.mediaElement.pN(),this.start,this.end)}C(){return It(this.mediaElement.C(),this.start,this.end)}getCurrentTime(){return this.mediaElement.getCurrentTime()-
this.start}setCurrentTime(Z){this.mediaElement.setCurrentTime(Z+this.start)}getDuration(){return isFinite(this.end)&&!this.V?this.end-this.start:this.mediaElement.getDuration()-this.start}play(){if(this.xl()){this.mediaElement.getCurrentTime();try{this.mediaElement.setCurrentTime(this.start)}catch(Z){}}return this.mediaElement.play()}Vn(){const Z=super.Vn();Z.view=`${this.start}-${this.end}`;return Z}addEventListener(Z,k){this.mediaElement.addEventListener(Z,k)}removeEventListener(Z,k){this.mediaElement.removeEventListener(Z,
k)}vD(){return this.mediaElement.vD()}activate(Z){this.mediaElement.activate(Z)}zX(){return this.mediaElement.zX()}playVideo(){return this.mediaElement.playVideo()}Tt(){this.mediaElement.Tt()}hq(){this.mediaElement.hq()}G(){return this.mediaElement.G()}lq(){return this.mediaElement.lq()}zP(){return this.mediaElement.zP()}Qz(Z){this.mediaElement.Qz(Z)}Kp(){this.mediaElement.Kp()}getPlaybackRate(){return this.mediaElement.getPlaybackRate()}setPlaybackRate(Z){return this.mediaElement.setPlaybackRate(Z)}hZ(){return this.mediaElement.hZ()}setLoop(Z){this.mediaElement.setLoop(Z)}canPlayType(Z,
k){return this.mediaElement.canPlayType(Z,k)}isPaused(){return this.mediaElement.isPaused()}isSeeking(){return this.mediaElement.isSeeking()}isEnded(){return this.mediaElement.isEnded()}Rq(){return this.mediaElement.Rq()}N(Z){this.mediaElement.N(Z)}Sm(){return this.mediaElement.Sm()}load(){this.mediaElement.load()}pause(){this.mediaElement.pause()}D(){return this.mediaElement.D()}tq(){return this.mediaElement.tq()}zQ(){return this.mediaElement.zQ()}qR(){return this.mediaElement.qR()}getVideoPlaybackQuality(){return this.mediaElement.getVideoPlaybackQuality()}YX(){return this.mediaElement.YX()}j$(){return this.mediaElement.j$()}togglePictureInPicture(){this.mediaElement.togglePictureInPicture()}cB(){return this.mediaElement.cB()}getSize(){return this.mediaElement.getSize()}setSize(Z){this.mediaElement.setSize(Z)}getVolume(){return this.mediaElement.getVolume()}setVolume(Z){this.mediaElement.setVolume(Z)}setAttribute(Z,
k){this.mediaElement.setAttribute(Z,k)}removeAttribute(Z){this.mediaElement.removeAttribute(Z)}hasAttribute(Z){return this.mediaElement.hasAttribute(Z)}O(){return this.mediaElement.O()}gh(Z){this.mediaElement.gh(Z)}zt(Z){return this.mediaElement.zt(Z)}qX(){return this.mediaElement.qX()}stopVideo(){this.mediaElement.stopVideo()}O6(Z){this.mediaElement.O6(Z)}audioTracks(){return this.mediaElement.audioTracks()}r5(Z){this.mediaElement.r5(Z)}};g.k$.prototype.j=NR(58);g.k$.prototype.dA=NR(56);
g.k$.prototype.xW=NR(54);g.k$.prototype.Vz=NR(52);var vJy=class extends g.jR{constructor(Z,k,N,a,T,K=0){super();this.policy=Z;this.V=k;this.U=N;this.u0=T;this.G=K;this.L=this.Y=null;this.currentVideoDuration=this.N=-1;this.zt=!1;this.e7=new x2;this.PV=a-k.mx()*1E3;this.e7.then(void 0,()=>{});
this.timeout=new g.Uc(()=>{this.Ar("timeout")},1E4);
g.u(this,this.timeout);this.dA=isFinite(a)||this.u0.X().experiments.yz("html5_pseudogapless_shorts")&&vZ(k.getVideoData());this.status={status:0,error:null}}r0(){return this.status.status===5}getStatus(){return this.status}D(){var Z=this.V.getVideoData(),k=this.U.getVideoData(),N;if((N=Z.D)&&!(N=!Z.V)){N=Z.V;var a=!1;let r=!1;for(var T of Object.values(N.V))T.info.audio&&T.index.isLoaded()&&(a=!0),T.info.video&&T.index.isLoaded()&&(r=!0);N.V["0"]&&(r=!0);N=a&&r}if(N)if(this.V.TM()){T=Yk(this.policy,
this.V,this.U,this.PV);var {NG:K,fz:y,A3:Q,aQ:q}=this.C();this.zt||(N=this.U.ym()*1E3,a=this.V.ym(),a=(Q-K-a)*1E3,T&&T.msg==="in-the-past"&&(a=0),Z=Z.isAd(),this.U.Cc(N,a,Z),this.zt=!0);T?(k=`cannot_apply${T.msg}`,delete T.msg,this.Ar(k,T)):this.status.status===2?fOb(this):(Z=this.V.zX())&&Z.G()&&(!Wz(Z)&&g.ce()?this.Ar("mse_closed"):k.V&&k.V.L()&&Z.U&&!Z.U.X5()?this.Ar("encr_upgrade"):(k=this.V.TM(),k.isEnded()?this.Ar("elem_ended"):y<0?this.Ar("next_player_future"):(this.N=Q,this.currentVideoDuration=
Q-K,this.Y=yFy(Z,K,Q,!0),this.L=yFy(Z,y,q,!1),Z=this.U.getVideoData().clientPlaybackNonce,this.V.U6("gaplessPrep",{cpn:Z}),this.V.uM(this.Y,!1,this.G===1&&nQ(this.V.getVideoData()),this.u0.X().B("html5_shorts_gapless_keep_pending_requests")&&vZ(this.V.getVideoData())),this.V.setMediaElement(hdj(k,K,Q,!this.V.getVideoData().isAd())),ZE(this,2),fOb(this))))}else this.Ar("no-elem")}j(Z){var {l6:k}=Nu(this),N=Z===k;k=N?this.Y.V:this.Y.U;N=N?this.L.V:this.L.U;if(k.isActive&&!N.isActive){var a=this.N,T=
this.u0.X().B("html5_gapless_disable_on_discontinuous_buffer")&&this.G!==0&&k.Us().length>1;b1(Z.Us(),a-.01)&&!T&&(ZE(this,4),k.isActive=!1,k.GR=k.GR||k.isActive,(this.G===1?this.V:this.U).U6("sbh",{}),N.isActive=!0,N.GR=N.GR||N.isActive,this.G!==0&&(this.V.getVideoData().Ay=!0));Z=this.L.U;this.L.V.isActive&&Z.isActive&&(ZE(this,5),this.G!==0&&(Z=this.U.Dp(),k=this.V.Dp(),this.V.U6("sbs",{citag:k?.itag,nitag:Z?.itag}),this.U.U6("gitags",{pitag:k?.itag,citag:Z?.itag}),this.U?.pz()))}}xW(){this.w9()&&
this.Ar("player-reload-after-handoff")}Ar(Z,k={}){if(!this.jm()&&this.status.status!==6){var N=this.status.status>=4&&Z!=="player-reload-after-handoff";this.status={status:Infinity,error:Z};if(this.V&&this.U){const a=this.U.getVideoData().clientPlaybackNonce;this.V.dV(new g.yA("dai.transitionfailure",Object.assign(k,{cpn:a,transitionTimeMs:this.PV,msg:Z})));this.V.VJ(N)}this.e7.reject(Z);this.dispose()}}FS(){if(this.getStatus().status!==5)return"niss";if(Yk(this.policy,this.V,this.U,this.PV)!=null)return"pge";
const {l6:Z,kp:k}=Nu(this),N=g.Q5(this.u0.X().experiments,"html5_shorts_gapless_next_buffer_in_seconds");var a=this.N+N;this.u0.X().experiments.yz("html5_pseudogapless_shorts")&&(a=this.C().fz+N);const T=b1(k.Us(),a);a=b1(Z.Us(),a);return!(N>0)||T&&a?null:"neb"}Vz(){return this.currentVideoDuration}w9(){return this.status.status>=4&&this.status.status<6}YW(){lOU(this);this.V.unsubscribe("newelementrequired",this.xW,this);if(this.Y){const Z=this.Y.U;this.Y.V.Dl.unsubscribe("updateend",this.j,this);
Z.Dl.unsubscribe("updateend",this.j,this)}super.YW()}C(){var Z=this.V.TM();Z=Z.isView()?Z.start:0;var k=this.V.getVideoData().isLivePlayback?Infinity:this.V.Ja(!0);k=Math.min(this.PV/1E3,k)+Z;var N=this.dA?100:0;N=k-this.U.ym()+N;return{NG:Z,fz:N,A3:k,aQ:Infinity}}O(Z){Z.Ub(128)&&this.Ar("player-error-event")}};var BJK=class extends g.jR{constructor(Z){super();this.app=Z;this.j=this.U=this.V=null;this.Vz=!1;this.N=this.G=this.D=this.Y=null;this.L=t0G(this.app.X());this.C=()=>{g.Sq(()=>{Dgy(this)})}}clearQueue(Z=!1,k=!1){T5(this);
this.Y&&this.Y.reject("Queue cleared");this.app.X().B("html5_gapless_fallback_on_qoe_restart_v2")||k&&this.U&&this.U.VJ(!1);aK(this,Z)}Q_(){return!this.V}w9(){return this.D?.w9()||!1}r0(){return this.D?.r0()||!1}YW(){T5(this);aK(this);super.YW()}};var DcD=class extends g.n9{constructor(){super();this.fullscreen=0;this.Y=this.D=this.pictureInPicture=this.V=this.U=this.inline=!1;this.L=()=>{this.Hq()};
Zer(this.L);this.G=this.getVisibilityState(this.YX(),this.isFullscreen(),this.isMinimized(),this.isInline(),this.i9(),this.Pf(),this.Qy(),this.MA())}getVisibilityState(Z,k,N,a,T,K,y,Q){return Z?4:T&&tu?7:Nvj&&!(Fx()||document.hasFocus&&document.hasFocus())||Fx()?3:k?2:N?1:a?5:T&&!tu?7:K?8:y?9:Q?10:0}uA(Z){this.fullscreen!==Z&&(this.fullscreen=Z,this.Hq())}setMinimized(Z){this.U!==Z&&(this.U=Z,this.Hq())}setInline(Z){this.inline!==Z&&(this.inline=Z,this.Hq())}XP(Z){this.pictureInPicture!==Z&&(this.pictureInPicture=
Z,this.Hq())}setSqueezeback(Z){this.D!==Z&&(this.D=Z,this.Hq())}mY(Z){this.Y!==Z&&(this.Y=Z,this.Hq())}YX(){return this.V}Gx(){return this.fullscreen!==0}isFullscreen(){return this.fullscreen!==0&&this.fullscreen!==4}yO(){return this.fullscreen}isMinimized(){return this.U}isInline(){return this.inline}isBackground(){return Fx()}i9(){return this.pictureInPicture}Pf(){return!1}Qy(){return this.D}MA(){return this.Y}Hq(){this.publish("visibilitychange");const Z=this.getVisibilityState(this.YX(),this.isFullscreen(),
this.isMinimized(),this.isInline(),this.i9(),this.Pf(),this.Qy(),this.MA());Z!==this.G&&this.publish("visibilitystatechange");this.G=Z}YW(){knX(this.L);super.YW()}};g.jz=class extends g.jR{constructor(Z){super();this.kW=Z;this.videoData=this.playerState=null}YW(){this.videoData=this.playerState=null;super.YW()}addCueRange(){}kc(){}oN(){}QR(){return!1}s_(){return!1}IC(){}fK(){}zx(){return[]}V_(){}hT(){}I5(){return 1}getAudioTrack(){return this.getVideoData().KN}TN(){return null}getAvailableAudioTracks(){return[]}wR(){return[]}jh(){return[]}q4(){return this.kW.B("web_player_misc_bugfix_b")?this.getVideoData().clientPlaybackNonce:""}jO(){return[]}qL(){}ym(){return 0}getCurrentTime(){return 0}O4(){}Dp(){}Vn(){return{}}getDuration(){return 0}ZI(){return 0}HG(){return 0}KK(){return!1}dk(){return 0}LH(){return 0}gG(){return null}lA(){return 0}hZ(){return!1}Ja(){return 0}TM(){return null}zX(){return null}Vt(){return 0}CI(){return 0}async ZQ(){}getPlaybackQuality(){return"auto"}getPlaybackRate(){return 1}getPlayerState(){this.playerState||
(this.playerState=new g.QR);return this.playerState}getPlayerType(){return 0}getPlaylistSequenceForTime(){return null}UQ(){return()=>{}}nP(){return""}getPreferredQuality(){return"unknown"}Q9(){}getProximaLatencyPreference(){return 0}nK(){return io}getStartTime(){return NaN}Cn(){return null}getStoryboardFormat(){return null}getStreamTimeOffset(){return 0}lc(){return 0}mx(){return 0}oO(){return{FT:[],
jW:[],currentTime:0,iL:"",droppedVideoFrames:0,isGapless:!1,r0:!1,Q_:!0,KT:0,T_:0,n$:0,q0:0,Oc:0,zV:[],uo:[],Vk:null,Jf:"0",FK:null,QN:"",totalVideoFrames:0}}getUserAudio51Preference(){return 0}getUserPlaybackQualityPreference(){return""}getVideoData(){this.videoData||(this.videoData=new g.xJ(this.kW),g.u(this,this.videoData));return this.videoData}gf(){return null}KI(){return null}S9(){}getVideoLoadedFraction(){return 0}uu(){}handleError(){}VJ(){}kK(){}GC(){return!1}hasSupportedAudio51Tracks(){return!1}isAd(){return!1}Vr(){return!1}YX(){return!1}isAtLiveHead(){return!1}SZ(){return!0}isGapless(){return!1}r0(){return!1}isHdr(){return!1}NN(){return!1}CT(){return!1}iE(){return!1}isProximaLatencyEligible(){return!1}Q_(){return!0}cf(){return!1}t7(){return!1}bK(){}QJ(){}pz(){}Jn(){}YC(){}Lh(){}YR(){}Hg(){}pauseVideo(){}prefetchKeyPlay(){}async playVideo(){}GU(){}yu(){}U6(){}A$(){}Zw(){}Cc(){}dV(){}Dh(){}Yy(){}f7(){}C9(){}Lt(){}XL(){}removeCueRange(){}FD(){}jl(){return[]}uc(){}SU(){}PU(){}rF(){}a6(){}HC(){}vj(){}seekTo(){}sendAbandonmentPing(){}sendVideoStatsEngageEvent(){}bv(){}setLoop(){}Kt(){}setMediaElement(){}uM(){}setPlaybackRate(){}N4(){}mf(){}GP(){}setProximaLatencyPreference(){}XZ(){}sy(){}Ab(){}IW(){}au(){}setUserAudio51Preference(){}PJ(){}EQ(){return!1}j$(){}BV(){return!1}cj(){}TD(){}e0(){}stopVideo(){}subscribe(){return NaN}tZ(){}togglePictureInPicture(){}yQ(){return 0}zA(){}unsubscribe(){return!1}kF(){}Kd(){return!1}gk(){}xN(){}r8(){}};
g.t=g.jz.prototype;g.t.CH=NR(47);g.t.S7=NR(37);g.t.AQ=NR(30);g.t.F8=NR(24);g.t.eU=NR(18);g.t.LZ=NR(12);var Ey=class extends g.jR{constructor(Z,k){super();this.data=[];this.D=Z||NaN;this.U=k||null;this.V=new g.Uc(()=>{y4(this);Q4(this)});
g.u(this,this.V)}get(Z){y4(this);const k=this.data.find(N=>N.key===Z);
return k?k.value:null}set(Z,k,N){this.remove(Z,!0);y4(this);Z={key:Z,value:k,expire:Infinity};N&&isFinite(N)&&(N*=1E3,Z.expire=(0,g.z)()+N);for(this.data.push(Z);this.data.length>this.D;)(N=this.data.shift())&&Kx(this,N,!0);Q4(this)}remove(Z,k=!1){const N=this.data.find(a=>a.key===Z);
N&&(Kx(this,N,k),g.rH(this.data,a=>a.key===Z),Q4(this))}removeAll(Z=!1){if(Z)for(const k of this.data)Kx(this,k,Z);
this.data=[];Q4(this)}YW(){super.YW();this.data.forEach(Z=>{Kx(this,Z,!0)});
this.data=[]}};g.WH=class extends g.jR{constructor(Z,k){super();this.api=Z;this.D={};this.L={};this.bx=null;this.Y={};this.V=null;this.C=new Map;this.j=null;k=new Ey(k,N=>{N!==this.PA({playerType:N.getPlayerType()})&&N.dispose()});
g.u(this,k);this.U=this.Vz=this.N=new g.jz(Z.X());this.G=k}YW(){for(const Z of Object.values(this.D))Z.dispose();Gxi(this);this.N.dispose();super.YW()}PA(Z){var k=Z.cpn;const N=Z.Zy;Z=Z.playerType;if(k)a:if(F1(this.api.X().Yl()))k=this.L[k]||null;else{for(const a of Object.values(this.D))if(a.q4()===k){k=a;break a}k=this.Y[k]||null}else k=N&&this.bx?this.bx:Z?Z?Z===1?this.Vz:this.U.getVideoData().enableServerStitchedDai&&Z===2?this.U.getVideoData().Uu?this.D[2]||this.U:this.U:this.D[Z]||null:this.U:
this.U;return k}DF(){return this.Vz}cC(Z){this.Vz=Z}wA(){return this.U}jP(Z){const k=[Z],N=[this.U];this.U=Z;qu(this,k,N)}};g.WH.prototype.p7=NR(45);g.WH.prototype.Rp=NR(43);var Oga=class{constructor(){this.values=new Float64Array(176);this.V=new Float64Array(11);this.U=new Float64Array(16)}wr(Z,k){for(var N=0;N<10;N++){var a=this.V[N],T=a+(N===0?Z:0),K=1*Math.pow(2,N);if(T<=K)break;a=Math.min(1,(T-K*.5)/a);for(T=0;T<16;T++)K=this.values[N*16+T]*a,this.values[(N+1)*16+T]+=K,this.V[N+1]+=K,this.values[N*16+T]-=K,this.V[N]-=K}a=N=0;T=8192;k>8192&&(N=Math.ceil(Math.log(k/8192)/Math.log(2)),a=8192*Math.pow(2,N-1),T=a*2);N+2>16?this.values[15]+=Z:(k=(k-a)/(T-a),this.values[N]+=
Z*(1-k),this.values[N+1]+=Z*k);this.V[0]+=Z}c9(){const Z=this.U;for(var k=0;k<16;k++)Z[k]=this.values[k];k=this.V[0];for(var N=1;N<11;N++){var a=this.V[N];if(a===0)break;var T=Math.min(1,(17-k)/a);for(var K=0;K<16;K++)Z[K]+=this.values[N*16+K]*T;k+=a*T;if(T<1)break}N=T=0;for(a=0;a<16;a++){K=T+Z[a]/k;N+=Math.max(0,Math.min(K,.98)-Math.max(T,.02))*(a>0?8192*Math.pow(2,a-1):0);if(K>.98)break;T=K}return N/.96}};var Ym=class{constructor(Z,k,N=.5,a=0){this.resolution=k;this.U=0;this.L=!1;this.mA=!0;this.V=Math.round(Z*this.resolution);this.values=Array(this.V);for(Z=0;Z<this.V;Z++)this.values[Z]=Infinity;Z=Array(this.V);for(k=0;k<this.V;k++)Z[k]=k;this.G=Z;this.D=N;this.Y=a}wr(Z,k){Z=Math.min(this.V,Math.max(1,Math.round(Z*this.resolution)));Z+this.U>=this.V&&(this.L=!0);for(;Z--;)this.values[this.U]=k,this.U=(this.U+1)%this.V;this.mA=!0}percentile(Z){if(!this.L&&this.U===0)return 0;this.mA&&(g.hc(this.G,
(k,N)=>this.values[k]-this.values[N]),this.mA=!1);
return this.values[this.G[Math.round(Z*((this.L?this.V:this.U)-1))]]||0}c9(){return this.Y?(this.percentile(this.D-this.Y)+this.percentile(this.D)+this.percentile(this.D+this.Y))/3:this.percentile(this.D)}};var vKe=class extends g.jR{constructor(Z,k,N){super();this.policy=Z;this.U=k;this.Kp=N;this.zt=this.tq=0;this.O=-1;this.xW=this.L=0;this.Vz=!1;this.interruptions=[];this.D=[{stamp:0,net:0,max:0}];this.Sm=0;this.vD=this.G=(0,g.z)();this.C=new Ym(4,1,.6,.4);this.dA=new Ym(4,1,.6,.4);this.j=new Ym(20,1,.5,.4);Z.Vz?this.Y=new Oga:Z.D?this.Y=new lw(17):this.Y=new Ym(17,20,.5,.4);this.FS=new Ym(5,1,.25);this.N=new Ym(30,1,.5);Z=g.kh("yt-player-bandwidth")||{};k=this.policy.V;Z.byterate>0?(k=Z.byterate,
this.Vz=!0):(N=(navigator.connection?.downlink||0)*64*1024,N>0&&(k=N,this.Vz=!0));this.Y.wr(this.policy.L,k);Z.delay>0&&this.C.wr(1,Math.min(Z.delay,2));Z.stall>0&&this.j.wr(1,Z.stall);Z.init>0&&(this.vD=Math.min(Z.init,this.vD));Z.interruptions&&(this.D=this.D.concat(Z.interruptions),this.D.length>16&&this.D.pop());this.O=(0,g.z)();this.policy.G>0&&(this.Rq=new g.Uc(this.MX,this.policy.G,this),g.u(this,this.Rq),this.Rq.start())}MX(){this.Rq?.start();pa(this)&&this.policy.j&&this.Kp()}};var yVi=class{constructor(Z){this.experiments=Z;this.V=13E4;this.L=.5;this.U=this.D=!1;this.Vz=this.B("html5_use_histogram_for_bandwidth");this.Y=g.Q5(this.experiments,"html5_auxiliary_estimate_weight");this.N=g.Q5(this.experiments,"html5_stall_factor")||1;this.G=g.Q5(this.experiments,"html5_check_for_idle_network_interval_ms");this.j=this.experiments.yz("html5_trigger_loader_when_idle_network");this.C=this.experiments.yz("html5_sabr_fetch_on_idle_network_preloaded_players")}B(Z){return this.experiments.yz(Z)}};var FNf=class extends g.LX{constructor(Z,k,N=0){super(k.gf());this.videoData=Z;this.duration=N;this.V=this.startTimeSecs=0;this.U=this.D=!0}Y(){}q4(){return this.videoData.clientPlaybackNonce}getVideoData(){return this.videoData}getCurrentTime(Z){let k=super.getCurrentTime();this.V===0?Z||(k-=this.startTimeSecs,super.getVideoData().B("html5_ssdai_log_missed_ad_impressions")&&this.U&&this.D&&k>1&&this.U6("sdai-admiss",{cpn:this.q4(),ct:k.toFixed(3),pfs:this.D}),this.U=!1):Z&&(k=this.V);return k}getDuration(){return this.duration}getPlayerType(){return 2}getStartTime(){return this.startTimeSecs}KH(Z){this.duration=
Z}};var izG,igK;izG=class{constructor(Z){this.end=this.start=Z}};g.Zg=class{constructor(){this.V=new Map;this.D=new Map;this.U=new Map}UC(Z,k){if(k===1)return this.V.get(Z);if(k===2)return this.D.get(Z);if(k===3)return this.U.get(Z)}fg(Z,k,N,a){N={wG:a,Tr:N};k?this.D.set(Z,N):this.V.set(Z,N)}clearAll(){this.V.clear();this.D.clear();this.U.clear()}};g.Zg.prototype.kY=NR(65);igK=class{constructor(Z){this.kW=Z;this.U=[];this.D=new Map;this.Y=new Map;this.V=new Map;this.nF={j2:()=>this.D,
m4D:()=>this.Y,
PK:()=>this.U}}clear(){this.U=[];
this.D.clear();this.Y.clear();this.V.clear()}PA(Z){return this.D.get(Z)}};g.kD=class extends g.jR{constructor(Z,k,N,a){super();this.api=Z;this.kW=k;this.playback=N;this.app=a;this.Vz=new g.Zg;this.U=new Map;this.HA=new Map;this.zt=new Map;this.FS=null;this.xl=NaN;this.Tt=this.pF=null;this.O6=new g.Uc(()=>{dIf(this,this.xl,this.pF||void 0)});
this.events=new g.tt(this);this.Qz=15E3;this.G=new g.Uc(()=>{this.j=!0;this.playback.Dh(this.Qz);fx(this);this.playback.getVideoData().qW()&&this.BA({togab:this.L?.identifier});this.uu(!1)},this.Qz);
this.j=!1;this.uN=new Map;this.MX=[];this.L=null;this.rD=new Set;this.C=[];this.Sm=[];this.ov=[];this.bq=[];this.Rq=new Set;this.xW=0;this.N=!1;this.Ap=new Set;this.tW=new Set;this.FN=new Set;this.hq=new Set;this.hp=this.Xv=0;this.a5=this.iq=!1;this.VV=this.D="";this.O=null;this.logger=new g.bI("dai");this.LC="";this.tq=!0;this.vD=new Map;this.r5=new Map;this.nF={bCX:()=>this.U,
j2:()=>this.V.nF.j2(),
eeq:()=>this.D,
tla:T=>{this.onCueRangeEnter(this.U.get(T))},
MlS:T=>{this.onCueRangeExit(this.U.get(T))},
lQS:(T,K)=>{this.U.set(T,K)},
SQR:T=>{this.VV=T},
WV:()=>this.WV(),
s4p:T=>this.V.V.get(T),
n8W:()=>this.O,
PK:()=>this.V.nF.PK(),
CZ:(T,K)=>{this.CZ(T,K)},
kcS:()=>this.HA,
H3:T=>{this.H3(T)}};
this.playback.getPlayerType();this.V=new igK(this.kW);this.playback.au(this);this.Kp=this.kW.Xa();g.u(this,this.O6);g.u(this,this.events);g.u(this,this.G);this.PG=this.kW.B("html5_use_new_ssdai_transition_detector");this.s6=this.kW.Yl().V.Aq(ffN);Z=this.playback.getVideoData();Z.qW()&&Z.latencyClass==="NORMAL"&&(this.s6=this.kW.Yl().V.Aq(tzi));this.jY=this.kW.Yl().V.Aq(FwN);this.gD=this.playback.getVideoData().hS;this.PG?this.playback.subscribe("playbackstarted",this.CZ,this):(this.events.K(this.api,
g.te("serverstitchedcuerange"),this.onCueRangeEnter),this.events.K(this.api,g.he("serverstitchedcuerange"),this.onCueRangeExit));this.Ke=this.kW.B("html5_ssdai_report_stitch_error_after_skip_ad");rW(this.app.QT(),this.playback,!1)}NW(Z,k,N,a,T,K,y,Q){var q=XTb(this,T,T+a);this.j&&this.BA({adaftto:1});k||this.BA({missadcon:1,enter:T,len:a,aid:y});this.Y&&!this.Y.Yu&&(this.Y.Yu=y);this.a5&&this.BA({adfbk:1,enter:T,len:a,aid:y});var r=this.playback;T>K&&BS(this,{reason:"enterTime_greater_than_return",
SI:T,R4:K});var C=r.Vt()*1E3;T<C&&BS(this,{reason:"enterTime_less_than_minSeekableTime",enterMs:T,minSkMs:C},!1);r=r.getDuration()*1E3;K>r&&BS(this,{reason:"parent_return_greater_than_content_duration",R4:K,w9z:r});(r=AVf(this.V,T))&&r.R4>T&&BS(this,{reason:"overlapping_playbacks",rrD:Z.video_id||"",SI:T,R4:K,PX6:r.cpn,iCA:r.videoData?.videoId||"",j4D:r.durationMs,ZC6:r.SI,CXS:r.R4});if(q&&r)for(C=0;C<this.C.length;C++){if(this.C[C].identifier===q.identifier){this.C.splice(C,1);break}}else if(q){this.BA({rejectAttl:1});
y&&!Er(this.bq,m=>m===y)&&(this.BA({rejectAdBreakAttl:y},!0),this.bq.push(y));
V4(this);return}Z.cpn||(Z.cpn=g.av(16));q=Z.cpn;Z=new g.xJ(this.kW,Z);Z.Lu=!0;Z.tI=Z.clientPlaybackNonce;r=y?y:r?r.kJ:q;k={playerType:N,durationMs:a,SI:T,R4:K,cpn:q,videoData:Z,errorCount:0,ssdaiAdsConfig:k,kJ:r};N=Z.getPlayerResponse()?.playbackTracking;this.jY&&(k.serializedQoeContextData=N?.serializedQoeContextData);this.s6&&(N=rr(N?.serializedPlaybackPingContextData??"")??void 0,k.pX=g.SV({clientPlaybackNonce:q,serializedPlaybackPingContextData:N},qZi));mIf(this.V,k);(Q=VTy(this,Q))&&this.gD&&
this.HA.set(r,Q);tTr(this,Z,a);this.BA({attlDone:K-T,acpn:q,et:T,prt:K});this.G.isActive()&&(this.j=!1,this.G.stop(),fx(this),this.uu(!0));y&&this.PG&&(this.vD.has(y)?this.vD.get(y).add(q):this.vD.set(y,new Set([q])),this.r5.set(q,y));return Z}zx(){const Z=this.playback.zx("serverstitchedcuerange",36E5);for(const k of Z)this.U.delete(k.getId())}onCueRangeEnter(Z){const k=Z.getId();this.BA({oncueEnter:1,cpn:k,start:Z.start,end:Z.end,ct:(this.playback.getCurrentTime()||0).toFixed(3),cmt:(this.playback.ym()||
0).toFixed(3)});var N=this.V.PA(k);this.BA({enterAdCueRange:1});var a=this.VV||this.WV().cpn;const T=this.V.PA(a)??this.WV();N&&(a=this.playback.getCurrentTime(),N.startTimeSecs=Z.start/1E3,N={F5:T,LK:N,lr:a},ON(this,k,Z.start/1E3,a),ix(this,N));this.tq=!1}CZ(Z,k,N){if(Z&&k&&Z!==this.app.QT().V?.q4())if((this.app.QT().Y[Z]||null)===null)this.BA({nocpn:Z,active:this.app.QT().V?.q4()});else{this.tq=N??!1;N=this.app.QT().V?.q4()||this.playback.q4();var a=this.V.PA(N)??this.WV(),T=this.V.PA(Z)??this.WV();
T.startTimeSecs=k;T.playerType===2&&(T.TC=T.TC!=null?Math.min(T.TC,k):k);var K=this.playback.getCurrentTime();ON(this,N,k,K);ix(this,{F5:a,LK:T,lr:K});if(this.playback.getVideoData().qW()&&Z===this.playback.q4())if(k=this.r5.get(N)){for(const y of this.vD.get(k)??[]){Z=this.app.QT();if(N=Z.Y[y])Z.V===N&&(Z.V=null),Z.j===N&&(Z.j=null),y===Z.C.get("")?.q4()&&Z.C.delete(""),delete Z.Y[y],delete Z.L[y];this.zt.delete(y);this.r5.delete(y)}this.vD.delete(k)}else this.BA({no_abid:Z})}}aj(Z,k){if(Z===this.playback.q4())rW(this.app.QT(),
this.playback,!1);else{const N=this.zt.get(Z);N?(qUf(N,k,!this.tq),rW(this.app.QT(),N,!0)):this.BA({nop_s:Z})}}onCueRangeExit(Z){var k=this.playback.getCurrentTime()*1E3,N=Z.getId();this.BA({oncueExit:1,cpn:N,start:Z.start,end:Z.end,ct:(this.playback.getCurrentTime()||0).toFixed(3),cmt:(this.playback.ym()||0).toFixed(3)});for(var a of this.U.values())if(a.getId()!==N&&k>=a.start&&k<=a.end)return;if(k=this.V.PA(N))N=this.playback.getPlayerState(),this.playback.getVideoData().qW()&&N.V(2)||(N=this.playback.getCurrentTime(),
a=this.WV(),a.startTimeSecs=Z.end/1E3,k={F5:k,LK:a,lr:N},ON(this,this.playback.q4(),Z.end/1E3,N),ix(this,k))}WV(){return{cpn:this.playback.q4(),durationMs:0,SI:0,playerType:1,R4:0,videoData:this.playback.getVideoData(),errorCount:0,kJ:""}}qX(){if(this.a5)return!1;let Z=void 0;this.VV&&(Z=this.V.PA(this.VV));return this.playback.getVideoData().qW()?!!Z&&!Z.aI:!!Z}seekTo(Z=0,k={},N=!1,a=null){vS(this,this.VV);if(this.playback.getVideoData().qW()&&Z<=this.xW)this.playback.pauseVideo(),this.xW=0,DIj(this,
Z);else if(this.tq=this.N=!0,N)dIf(this,Z,k);else{N=this.app.wA();const T=N===this.FS?this.Tt:null;lx(this,!1);this.xl=Z;this.pF=k;a!=null&&this.O6.start(a);N&&(this.Tt=T||N.getPlayerState(),N.e0(k),this.FS=N)}}YW(){lx(this,!1);$$(this);vvy(this);super.YW()}DT(Z,k,N){if(N&&k){var a=this.uN.get(Z);if(a){a.locations||(a.locations=new Map);var T=Number(k.split(";")[0]);N=new g.hY(N);this.BA({hdlredir:1,itag:k,seg:Z,hostport:bY(70,6488,N)});a.locations.set(T,N)}}}qH(Z){a:{if(!this.a5){var k=x$(this,Z);
if(!this.playback.getVideoData().qW()||!k?.aI)break a}k=void 0}var N=k;if(!N)return this.BA({gvprp:"ncp",mt:Z}),null;k=N.kJ;var a=Hzy(this,N.ssdaiAdsConfig);N=N.ZM&&N.Pu&&Z>=N.Pu?N.ZM:void 0;a={w8:k?hz(this,k):[],adsConfig:a,NE:N};this.BA({gvprpro:"v",mt:Z.toFixed(3),acpns:a.w8?.join("_")||"none",abid:k});return a}cM(Z,k,N,a,T,K){const y=Number(N.split(";")[0]);var Q=a===3;Z=cVX(this,Z,k,a,N,K);this.BA({gdu:1,seg:k,itag:y,pb:`${!!Z}`});if(!Z)return Fs(this,k,Q),null;Z.locations||(Z.locations=new Map);
if(!Z.locations.has(y)){K=Z.videoData.getPlayerResponse()?.streamingData?.adaptiveFormats;if(!K)return this.BA({gdu:"noadpfmts",seg:k,itag:y}),Fs(this,k,Q),null;var q=K.find(C=>C.itag===y);
if(!q||!q.url){Z=Z.videoData.videoId;a=[];for(var r of K)a.push(r.itag);this.BA({gdu:"nofmt",seg:k,vid:Z,itag:y,fullitag:N,itags:a.join(",")});Fs(this,k,Q);return null}Z.locations.set(y,new g.hY(q.url,!0))}r=Z.locations.get(y);if(!r)return this.BA({gdu:"nourl",seg:k,itag:y}),Fs(this,k,Q),null;r=new Xm(r);this.iq&&(r.get("dvc")?this.BA({dvc:r.get("dvc")||""}):r.set("dvc","webm"));(a=this.UC(k-1,a,T)?.wG)&&r.set("daistate",a);Z.ZM&&k>=Z.ZM&&r.set("skipsq",`${Z.ZM}`);(a=this.playback.getVideoData().clientPlaybackNonce)&&
r.set("cpn",a);a=[];Z.kJ&&(a=hz(this,Z.kJ),a.length>0&&r.set("acpns",a.join(",")));Q||this.uN.set(k,Z);Q=null;Q=r.get("aids");T=r.mH();T?.length>2048&&this.BA({urltoolong:1,sq:k,itag:y,len:T.length});this.Kp&&(T&&(K=Z.cpn,r=Z.kJ,gvr(this,K,r),r&&!this.FN.has(r)&&(K=wTf(this,K,r),q=$IU(this,r),this.BA({iofa:K}),this.BA({noawnzd:q-K}),this.BA({acpns:a.join("."),aids:Q?.replace(/,/g,".")}),this.FN.add(r))),this.BA({gdu:"v",seg:k,itag:N,ast:Z.SI.toFixed(3),alen:Z.durationMs.toFixed(3),acpn:Z.cpn,avid:Z.videoData.videoId}));
return T}Ik(Z,k,N=!1){const a=ux(this,Z,k);if(a){this.Ke&&(this.dA=a);var T=void 0,K=a.kJ;if(K){this.BA({skipadonsq:k,sts:N,abid:K,acpn:a.cpn,avid:a.videoData.videoId});N=this.V.V.get(K);if(!N)return;for(const y of N)y.ZM=k,y.Pu=Z,y.SI>a.SI&&(T=y)}vS(this,this.VV);this.D=a.cpn;xIy(this);this.api.B("html5_ssdai_enable_media_end_cue_range")&&this.playback.zA(this.D);Z=this.playback.getCurrentTime();uyR(this,a,T,Z,Z,!1,!0);BNf(this)}}WS(){var Z=this.V;for(const k of Z.U)k.ZM=NaN,k.Pu=NaN;xIy(this);this.BA({rsac:"resetSkipAd",
sac:this.D});this.hq.delete(this.D);this.D="";this.Ke&&(this.dA=void 0)}UC(Z,k,N){return this.Vz.UC(Z,k,N)}q9(Z){const k=Z.trackType;for(const Q of Z.metadata??[])for(const q of Q.mS??[]){var N=q.QD,a=q.j5;Z=q.cpn;var T=q.loggingMetadata,K=q.Rf,y=q.rd;if(!Z||Z===this.playback.getVideoData().clientPlaybackNonce)continue;const r=this.V.PA(Z);if(k===2){if(N&&N.startTicks!==void 0&&N.Sf!==void 0&&N.timescale!==void 0&&a&&a.startTicks!==void 0&&a.Sf!==void 0&&a.timescale!==void 0&&K!==void 0){const C=
N.startTicks/N.timescale,m=a.startTicks/a.timescale;N=(C-m)*1E3;a=(m+a.Sf/a.timescale)*1E3;y=y?a:Math.max(a+1E3,K);K=N+y;r&&(wW(this,r,y,K),r.TC=r.TC!==void 0?Math.min(r.TC,C):C,T&&(r.eX=T));(T=this.U.get(Z))?(T.start=N,T.end=K,this.playback.Lh()):(T=hey(N,K,Z),this.U.set(Z,T),this.playback.addCueRange(T))}this.zx()}else k===1&&r&&T&&(r.n9=T)}}fg(Z,k,N,a,T,K,y,Q){N.length>0&&this.BA({onssinfo:1,sq:Z,start:k.toFixed(3),cpns:N.join(","),ds:a.join(","),isVideo:K?1:0});if(this.Ke&&this.dA&&this.dA.ZM&&
N.length>0)for(var q of N)if(q===this.dA.cpn){this.LC!==q&&(this.BA({skiperror:1,sq:Z,acpn:this.dA.cpn,skipsq:this.dA.ZM||0}),this.LC=q);break}Q&&this.Vz.fg(Z,K,y,Q);if(K){if(N.length&&a.length)for(this.hq.has(N[0])&&this.BA({skipfail:1,sq:Z,acpn:N[0]}),Z=k+this.lc(),K=0;K<N.length;K++)if(q=N[K],Q=Z,Z=Q+a[K],q=this.V.PA(q))Q-=T[K],q.TC=q.TC!=null?Math.min(q.TC,Q):Q;if(N.length&&a.length)for(k=(k+this.lc())*1E3,Z=0;Z<N.length;Z++){K=N[Z];Q=a[Z]*1E3;if(K===this.playback.getVideoData().clientPlaybackNonce){k+=
Q;continue}this.Ap.has(K)||(this.BA({adCpnFromEmsg:1}),this.Ap.add(K));q=0;Z<T.length&&(q=T[Z]*1E3);let r=this.U.get(K);r?(r.start=k-q,r.end=k+Q,Z===N.length-1&&(r.end+=G1G(this,K,y)),this.playback.Lh()):(r=hey(k-q,k+Q,K),this.U.set(K,r),this.BA({newAdCR:1,cpn:K,startTime:r.start,endTime:r.end}),Z===N.length-1&&(r.end+=G1G(this,K,y)),this.playback.addCueRange(r),this.zx());k=r.end}}}lc(){return this.playback.lc()}QV(Z){this.playback.U6("timelineerror",{e:Z})}uu(Z){this.j&&this.L&&this.C.push(this.L);
Z&&this.L&&this.Sm.push(this.L);this.L=null;this.playback.uu(Z)}vz(){this.BA({rstdaist:1});this.Vz.clearAll()}vl(Z){Z!==this.L?.identifier?this.BA({ignorenoad:Z}):(this.rD.add(Z),this.BA({noadrcv:Z}),this.L?.identifier===Z&&V4(this))}FP(Z,k){if(this.a5)return this.BA({dai_disabled:Z.event}),!1;if(!this.kW.B("html5_lifa_move_gab_on_continue_or_stop_restriction")&&this.playback.getVideoData().qW()&&(Z.event==="continue"||Z.event==="stop"))return!1;var N=bu(this.api.GZ());k=N?N.FP(Z,k):!1;if(Z.event===
"prefetch")return k;if(k)this.Y={n1:Z.identifier,Ls:Z.startSecs};else if(this.Y&&this.Y.n1===Z.identifier&&Z.startSecs>this.Y.Ls+1){this.BA({cueStChg:Z.identifier,oldSt:this.Y.Ls.toFixed(3),newSt:Z.startSecs.toFixed(3),abid:this.Y.Yu});if(this.Y.Yu){N=Z.startSecs-this.Y.Ls;const a=this.V.V.get(this.Y.Yu);if(a)for(const T of a)T.SI>=0&&(T.SI+=N*1E3,this.BA({newApEt:T.SI,newApPrt:T.R4,acpn:T.cpn}))}this.Y.Ls=Z.startSecs}k?this.Rq.add(Z.identifier):this.Rq.has(Z.identifier)&&this.Rq.delete(Z.identifier);
return k}Om(Z){let k="";Z?Z.event==="unknown"?k="unknown":this.Rq.has(Z.identifier)?this.Y&&this.Y.n1===Z.identifier?this.Y.n1===Z.identifier?k=Er(this.Sm,N=>N.identifier===Z.identifier)?"shortad":"pending":Er(this.Sm,N=>N.identifier===Z.identifier)||(k="noAdsAdded"):k="wrongAdBreakInfo":k="unscheduled":k="noCuepoint";
return k}Op(Z){return this.a5?!1:!!x$(this,Z)}RK(Z){if(this.kW.B("html5_lifa_ignore_multiple_skips")&&this.O)return this.BA({ufs_ad:this.D,ufs_cur:this.VV,ufs_cont:this.WV().cpn}),!1;vS(this,this.VV);this.playback.pauseVideo();const k=this.playback.getCurrentTime(),N=this.V.PA(this.VV);if(!N)return this.BA({skipFail:k}),!1;this.D=this.VV;this.N=!1;this.api.B("html5_ssdai_enable_media_end_cue_range")&&this.playback.zA(this.D);this.H3(N.kJ);SUy(this,N,this.WV(),Z);DIj(this,k,{seekSource:89,b0:"lifa_skip"});
this.O||(this.O=this.events.K(this.api,"progresssync",()=>{gT(this.api.tQ(),(0,g.z)(),"ad_to_video");this.O&&(this.events.Ce(this.O),this.O=null)}));
return!0}H3(Z){if(this.playback.getVideoData().qW()){var k=this.V.V.get(Z);if(k){for(var N of k)k=this.U.get(N.cpn),this.U.delete(N.cpn),k&&this.playback.removeCueRange(k),PsU(this.V,N);this.uN.clear();N=this.V;k=N.V.get(Z)??[];for(const a of k)PsU(N,a);N.V.delete(Z);(Z=this.HA.get(Z))&&this.gD&&this.playback.rF(Z)}}}BA(Z,k=!1){(k||this.Kp)&&this.playback.U6("sdai",Z)}};g.kD.prototype.kY=NR(64);var gKK=class extends g.jR{constructor(Z,k,N,a){super();this.api=Z;this.kW=k;this.V=N;this.app=a;this.L=new Map;this.U=[];this.D=this.j=null;this.Vz=NaN;this.G=this.Y=this.N=null;this.C=new g.Uc(()=>{ovi(this,this.Vz,this.N||void 0)});
this.O=[];this.zt=new g.Uc(()=>{var T=this.O.pop();if(T){const K=T.tI,y=T.playerVars;T=T.playerType;y&&(y.prefer_gapless=!0,this.api.preloadVideoByPlayerVars(y,T,NaN,"",K),this.O.length&&this.zt.XN(4500))}});
this.events=new g.tt(this);this.nF={yIA:()=>this.U};
this.V.getPlayerType();g.u(this,this.C);g.u(this,this.zt);g.u(this,this.events);this.events.K(this.api,g.te("childplayback"),this.onCueRangeEnter);this.events.K(this.api,"onQueuedVideoLoaded",this.onQueuedVideoLoaded);this.events.K(this.api,"presentingplayerstatechange",this.qA)}onCueRangeEnter(Z){if(this.V===this.app.wA()){var k=this.L.get(Z);k?pT0(this,k.target,k.PV,Z):this.dV("dai.transitionfailure",{e:"unexpectedCueRangeTriggered",cr:Z.toString()})}else if(k=this.U.find(a=>a.vB.hd===Z)){var N=
k.vB;
const a=N.target;N=N.PV;a?pT0(this,a,N,Z):Re0(this,k.R4,N,Z)}}onQueuedVideoLoaded(){const Z=this.j;oK(this);Z&&(en(this,Z)||this.dV("dai.transitionfailure",{e:"unexpectedPresentingPlayer",pcpn:this.app.wA()?.getVideoData().clientPlaybackNonce,ccpn:`${Z.playerVars.cpn}`}),this.app.wA().addCueRange(Z.vB.hd))}seekTo(Z=0,k={},N=!1,a=null){if(N)ovi(this,Z,k);else{N=this.app.wA()||null;const T=N===this.Y?this.G:null;G5(this,!1);this.Vz=Z;this.N=k;a!=null&&this.C.start(a);N&&(this.G=T||N.getPlayerState(),
N.e0(),this.Y=N)}}qA(Z){Z.Ub(128)&&nvb(this)}isManifestless(){return eI(this.V.getVideoData())}YW(){G5(this,!1);bx(this);super.YW()}dV(Z,k){this.V.dV(new g.yA(Z,k))}},UIy=0;var jQf="MWEB TVHTML5 TVHTML5_AUDIO TVHTML5_CAST TVHTML5_KIDS TVHTML5_FOR_KIDS TVHTML5_SIMPLY TVHTML5_SIMPLY_EMBEDDED_PLAYER TVHTML5_UNPLUGGED TVHTML5_VR TV_UNPLUGGED_CAST WEB WEB_CREATOR WEB_EMBEDDED_PLAYER WEB_EXPERIMENTS WEB_GAMING WEB_HEROES WEB_KIDS WEB_LIVE_APPS WEB_LIVE_STREAMING WEB_MUSIC WEB_MUSIC_ANALYTICS WEB_MUSIC_INTEGRATIONS WEB_REMIX WEB_UNPLUGGED WEB_UNPLUGGED_ONBOARDING WEB_UNPLUGGED_OPS WEB_UNPLUGGED_PUBLIC".split(" ");var wsc=class extends g.jR{constructor(){super();this.V=new Ey(5,null);g.u(this,this.V);this.U=new Ey(15,null);g.u(this,this.U)}rS(Z){if(Z)return this.U.get(Z)}YW(){this.V.removeAll();this.U.removeAll();super.YW()}};var $cT=class extends g.jR{constructor(Z){super();this.cache=new Ey(Z,null);g.u(this,this.cache)}get(Z){Z=this.cache.get(Z);return Z===null?void 0:Z}put(Z,k,N){this.cache.set(Z,k,N||3600)}};g.xce=FM(()=>{const Z=window.AudioContext||window.webkitAudioContext;try{return new Z}catch(k){return k.name}});var GmH=class extends g.E{constructor(Z){super({J:"div",BD:["html5-video-player"],W:{tabindex:Z.X().disableOrganicUi?"":"-1",id:Z.webPlayerContextConfig.rootElementId},A:[{J:"div",Z:g.Cs.VIDEO_CONTAINER,W:{"data-layer":"0"}}]});this.app=Z;this.KE=this.Lp(g.Cs.VIDEO_CONTAINER);this.Ey=new g.DJ(0,0,0,0);this.U3=null;this.Ns=new g.DJ(0,0,0,0);this.fL=this.vn=this.G7=NaN;this.oe=this.IP=this.RB=this.MG=!1;this.I_=NaN;this.N5=!1;this.y6=null;this.U_=new g.Uc(()=>{this.app.X().B("web_enable_smart_zoom")&&
this.app.rA.getInternalApi().isAutocropEnabled()||this.resize()},100);
this.uG=()=>{this.element.focus({preventScroll:!0})};
this.Bg=()=>{this.app.rA.publish("playerUnderlayVisibilityChange","visible");this.U3.classList.remove(g.Cs.VIDEO_CONTAINER_TRANSITIONING);this.U3.removeEventListener(Mu,this.Bg);this.U3.removeEventListener("transitioncancel",this.Bg)};
this.AV=this.BF=!1;const k=this.element.addEventListener,N=this.element.removeEventListener;this.addEventListener=(T,K,y)=>{k.apply(this.element,[T,K,y])};
this.removeEventListener=(T,K,y)=>{N.apply(this.element,[T,K,y])};
const a=Z.X();a.transparentBackground&&this.gh("ytp-transparent");a.controlsType==="0"&&this.gh("ytp-hide-controls");g.jX(this.element,"ytp-exp-bottom-control-flexbox");g.jX(this.element,"ytp-modern-caption");a.B("enable_new_paid_product_placement")&&!g.O$(a)&&g.jX(this.element,"ytp-exp-ppp-update");g.jX(this.element,"ytp-livebadge-color");a.B("web_player_default_autohide")&&g.jX(this.element,"ytp-autohide");WNN(this.element,XEf(Z));this.VN=!1;this.IN=new g.i0(NaN,NaN);Zui(this);this.K(Z.rA,"onMutedAutoplayChange",
this.onMutedAutoplayChange);g.u(this,this.U_)}gh(...Z){g.Ec(this.element,Z)}SU(){this.U3&&(this.U3.removeEventListener("focus",this.uG),g.rM(this.U3),this.U3=null)}pw(){this.jm();const Z=this.app.X();Z.d9||this.gh("tag-pool-enabled");Z.G&&this.gh(g.Cs.HOUSE_BRAND);Z.playerStyle==="gvn"&&(this.gh("ytp-gvn"),this.element.style.backgroundColor="transparent");Z.r5&&(this.I_=g.Rj("yt-dom-content-change",this.resize,this));this.K(window,"orientationchange",this.resize,this);this.K(window,"resize",this.resize,
this)}Q3(Z){g.ml(this.app.X());this.oe=!Z;px(this)}resize(){if(this.U3){var Z=this.SL();if(!Z.isEmpty()){this.app.rA.isFullscreen()&&Pe()&&this.U_.start();var k=!g.gJ(Z,this.Ey.getSize()),N=aCf(this);k&&(this.Ey.width=Z.width,this.Ey.height=Z.height);Z=this.app.X();(N||k||this.AV||Z.r5)&&this.app.rA.publish("resize",this.getPlayerSize())}}}FX(Z,k){this.updateVideoData(k)}updateVideoData(Z){if(this.U3){var k=this.app.X();Yh&&(this.U3.setAttribute("x-webkit-airplay","allow"),Z.title?this.U3.setAttribute("title",
Z.title):this.U3.removeAttribute("title"));this.U3.setAttribute("controlslist","nodownload");k.Wj&&Z.videoId?this.U3.poster=Z.v9("default.jpg"):uR()&&(NE??0)>=10&&(this.U3.poster="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}k=g.ID(Z,"yt:bgcolor");this.KE.style.backgroundColor=k?k:"";this.G7=g$(g.ID(Z,"yt:stretch"));this.vn=g$(g.ID(Z,"yt:crop"),!0);g.D(this.element,"ytp-dni",Z.o4);this.resize()}setGlobalCrop(Z){this.fL=g$(Z,!0);this.resize()}setCenterCrop(Z){this.MG=
Z;this.resize()}uA(){}getPlayerSize(){var Z=this.app.X();const k=this.app.rA.isFullscreen();var N=Z.externalFullscreen&&g.PQ(Z);if(k&&Pe()&&!N)return new g.i0(window.outerWidth,window.outerHeight);N=!isNaN(this.IN.width)&&!isNaN(this.IN.height);const a=this.app.X().B("kevlar_player_enable_squeezeback_fullscreen_sizing")||this.app.X().B("web_watch_enable_fs_squeezeback_panels");if(k&&!N&&a)return new g.i0(this.element.clientWidth,this.element.clientHeight);if(k||Z.ef){let T;window.matchMedia&&(Z="(width: "+
window.innerWidth+"px) and (height: "+window.innerHeight+"px)",this.y6&&this.y6.media===Z||(this.y6=window.matchMedia(Z)),T=this.y6&&this.y6.matches);if(T)return new g.i0(window.innerWidth,window.innerHeight)}else if(N)return this.IN.clone();return new g.i0(this.element.clientWidth,this.element.clientHeight)}SL(){var Z=this.app.X().B("enable_desktop_player_underlay");const k=this.getPlayerSize(),N=g.Q5(this.app.X().experiments,"player_underlay_min_player_width");return Z&&this.RB&&k.width>N?(Z=g.Q5(this.app.X().experiments,
"player_underlay_video_width_fraction"),new g.i0(Math.min(k.height*this.getVideoAspectRatio(),k.width*Z),Math.min(k.height,k.width*Z/this.getVideoAspectRatio()))):k}getVideoAspectRatio(){return isNaN(this.G7)?Nfy(this):this.G7}getVideoContentRect(Z){const k=this.SL();Z=kQr(this,k,this.getVideoAspectRatio(),Z);return new g.DJ((k.width-Z.width)/2,(k.height-Z.height)/2,Z.width,Z.height)}wk(Z){this.RB=Z;this.resize()}MZ(){return this.IP}onMutedAutoplayChange(){px(this)}setInternalSize(Z){g.gJ(this.IN,
Z)||(this.IN=Z,this.resize())}YW(){this.I_&&g.M6(this.I_);this.SU();super.YW()}};var SfH=class{constructor(){this.csn=g.C9();this.clientPlaybackNonce=null;this.elements=new Set;this.D=new Set;this.V=new Set;this.U=new Set}click(Z,k){this.elements.has(Z);this.V.has(Z);const N=g.C9();N&&Z.visualElement&&g.p9(N,Z.visualElement,k)}createClientVe(Z,k,N,a=!1){this.elements.has(Z);this.elements.add(Z);N=Qz(N);Z.visualElement=N;const T=g.C9(),K=g.rl();T&&K&&(g.ii("combine_ve_grafts")?nw(Rh(),N,K):g.ai(g.wl)(void 0,T,K,N));k.addOnDisposeCallback(()=>{this.elements.has(Z)&&this.destroyVe(Z)});
a&&this.U.add(Z)}createServerVe(Z,k,N=!1){this.elements.has(Z);this.elements.add(Z);k.addOnDisposeCallback(()=>{this.destroyVe(Z)});
N&&this.U.add(Z)}destroyVe(Z){this.elements.has(Z);this.elements.delete(Z);this.D.delete(Z);this.V.delete(Z);this.U.delete(Z)}zt(Z,k){this.clientPlaybackNonce!==k&&(this.clientPlaybackNonce=k,MB(Rh(),Z),Tfy(this))}setTrackingParams(Z,k){this.elements.has(Z);k&&(Z.visualElement=g.yz(k))}In(Z,k,N){this.elements.has(Z);k?this.V.add(Z):this.V.delete(Z);const a=g.C9(),T=Z.visualElement;this.U.has(Z)?a&&T&&(k?g.U5(a,[T]):g.bA(a,[T])):k&&!this.D.has(Z)&&(a&&T&&g.zO(a,T,void 0,N),this.D.add(Z))}hasVe(Z){return this.elements.has(Z)}};var egD=class extends g.jR{constructor(Z,k,N,a,T,K,y){super();this.O=Z;this.U6=k;this.N=N;this.G=a;this.C=T;this.intervalMs=K;this.L=y;this.zt=Tm;this.j=0;this.Y=this.D=!1;this.Vz=Math.floor(Math.random()*256)}sendRequest(){var Z=[0,1,2,3];this.L&&(Z.push(4),this.Y&&Z.push(5));switch(Z[Math.floor(Math.random()*Z.length)]){case 0:Q9f(this,this.G);break;case 1:this.C3&&(Z={[0]:1,[1]:performance.now()},this.request(Z));break;case 2:Z=this.C;this.C3&&(Z={[0]:2,[1]:performance.now(),[3]:Z},this.request(Z));
break;case 3:this.C3&&(Z={[0]:3,[1]:performance.now()},this.request(Z));break;case 4:this.L&&(Z={[0]:4,[1]:performance.now(),[4]:this.L},this.request(Z));break;case 5:var k=this.G;Z=this.Vz;this.C3&&(k=yUf(this,k),Z={[0]:5,[1]:performance.now(),[2]:k,[5]:Z},this.request(Z))}}request(Z){this.C3&&this.C3.postMessage(Z)}receive(Z){if(!(this.j>=5E3)){var k=Z.timeStamp,N=performance.now();Z=Z.data;Z[0]===5&&(this.Y=!0);var a=Z[1];this.U6("worker",{type:Z[0],t1:(Z[2]-performance.timeOrigin-a).toFixed(3),
t2:(Z[3]-performance.timeOrigin-a).toFixed(3),t3:(k-a).toFixed(3),t4:(N-a).toFixed(3)});this.j++}}YW(){this.U!==void 0&&(clearInterval(this.U),this.U=void 0);this.C3?.terminate();this.V=this.C3=void 0;this.Y=!1;this.U6("workerDtor",{});super.YW()}};g.aw=class extends g.jR{constructor(Z,k,N,a){super();this.logger=new g.bI("App");this.OC=this.Po=!1;this.T$={};this.iM=[];this.RI=!1;this.M5=null;this.intentionalPlayback=!1;this.H8=!0;this.SH=!1;this.AX=this.N0=this.kq=null;this.Dx=!0;this.mediaElement=this.vA=null;this.tN=NaN;this.ZE=!1;this.bX=this.oi=this.AI=this.screenLayer=this.playlist=null;this.UT=[];this.Yq=0;this.CC=new Q5X;this.II=[];this.nF={QT:()=>this.xg,
hM:()=>this.AI};
if(!N)throw Error("b/179532961");this.dB=k?.args||{};this.webPlayerContextConfig=N;k=this.dB;this.kW=new jTG(k,N,N.canaryState,a);g.u(this,this.kW);oJN(this.kW);a=aWX(this.kW);this.kW.Xa()&&gz(a,y=>{this.uT("h5vcc",y)});
this.kW.experiments.yz("jspb_serialize_with_worker")&&Muy();this.kW.U&&LTf();this.B("html5_onesie")&&(this.Ll=new FGT(this.kW),g.u(this,this.Ll));this.SY=new vKe(QQy(g.Qw(this.kW),this.kW.aM,this.kW.experiments),new yHX(this.kW.experiments),()=>void this.Jn());
g.u(this,this.SY);this.U7=Be(cQ(this.kW)&&!0,k.enablesizebutton);this.AK=Be(!1,k.player_wide);this.visibility=new DcD;g.u(this,this.visibility);this.B("web_log_theater_mode_visibility")&&this.mY(Be(!1,k.player_wide));this.Po=Be(!1,k.external_list);this.events=new g.tt(this);g.u(this,this.events);this.B("start_client_gcf")&&(Cm(Pu(),{u9:QW,Ue:aZf()}),this.C4=Pu().resolve(QW),rZ0(this.C4));this.hg=new AK;g.u(this,this.hg);this.X_=new SfH;a=new aiU;this.rA=new g.cH(this,a);g.u(this,this.rA);this.template=
new GmH(this);g.u(this,this.template);this.appState=1;this.XQ=s9y(this);g.u(this,a);this.lJ={internalvideodatachange:this.CJ,playbackready:this.uw,playbackstarted:this.Xw,statechange:this.sD};this.MH=new Jce(this.rA);this.WG=Vdi(this);a=this.kW.G;!1!==a&&this.uT("badps",{hbp:a,hostname:window.location.hostname,ps:this.kW.playerStyle});this.Fa=new wEU(this.kW,this.WG);this.rA.publish("csiinitialized");(this.webPlayerContextConfig.wasmModuleUrl||YJ(this.WG))&&FLN(this);a=10;g.Qw(this.kW)&&(a=3);BQ(this.kW)&&
(a=g.Q5(this.kW.experiments,"tvhtml5_unplugged_preload_cache_size"));this.xg=new g.WH(this.rA,a);a=this.kW.experiments.Yl().V.Aq(Ier)||a;this.um=new $cT(a);g.u(this,this.um);a=tdf(this);this.xg.cC(a);uVX(this);this.Bb={airplayactivechange:this.l8,airplayavailabilitychange:this.Jz,beginseeking:this.GE,sabrCaptionsDataLoaded:this.rb,endseeking:this.Ea,internalAbandon:this.B4,internalaudioformatchange:this.So,internalvideodatachange:this.Id,internalvideoformatchange:this.W4,liveviewshift:this.Rd,playbackstalledatstart:this.md,
progresssync:this.MJ,onAbnormalityDetected:this.L0,onSnackbarMessage:this.Xt,onLoadProgress:this.P4,SEEK_COMPLETE:this.K0,SEEK_TO:this.u8,onVideoProgress:this.Az,onLoadedMetadata:this.jo,onAutoplayBlocked:this.Ft,onPlaybackPauseAtStart:this.C0,playbackready:this.i8,statechange:this.hU,newelementrequired:this.NS,heartbeatparams:this.H4,videoelementevent:this.wb,drmoutputrestricted:this.v4,signatureexpired:this.b8,nonfatalerror:this.Zk,reloadplayer:this.QE};this.xL=new g.tt(this);g.u(this,this.xL);
this.Dw=new wsc;g.u(this,this.Dw);this.df=this.vM=-1;this.EF=new g.Uc(this.template.resize,16,this.template);g.u(this,this.EF);this.uq=new gKK(this.rA,this.kW,this.DF(),this);this.y_=new BJK(this);g.u(this,this.y_);this.Je=new flH(this);g.u(this,this.Je);Evy(this.kW.V.c);this.events.K(this.rA,g.te("appapi"),this.Qs);this.events.K(this.rA,g.he("appapi"),this.Kv);this.events.K(this.rA,g.te("appprogressboundary"),this.NJ);this.events.K(this.rA,g.he("applooprange"),this.jS);this.events.K(this.rA,"presentingplayerstatechange",
this.qA);this.events.K(this.rA,"resize",this.V$);this.template.HD(zm(document,Z));this.events.K(this.rA,"offlineslatestatechange",this.Ua);this.events.K(this.rA,"sabrCaptionsTrackChanged",this.Jg);this.events.K(this.rA,"sabrCaptionsBufferedRangesUpdated",this.lS);this.WG.S.X().KN&&j0(this.WG,"offline");this.kW.MX&&g.o1("ux",g.llH);Z=g.Q5(this.kW.experiments,"html5_defer_fetch_att_ms");this.x3=new g.Uc(this.gY,Z,this);g.u(this,this.x3);this.Yg().cG()&&(g.aY()&&this.Yg().Wo.push("mdx"),FH(this));this.Fa.tick("fs");
fCr(this);this.kW.MX&&j0(this.WG,"ux",!0);g.PQ(this.WG.S.X())&&j0(this.WG,"embed");this.B("web_player_sentinel_is_uniplayer")||g.L9(new g.jD("Player experiment flags missing","web_player_sentinel_is_uniplayer"));Z=this.B("web_player_sentinel_yt_experiments_sync");a=g.ii("web_player_sentinel_yt_experiments_sync");Z!==a&&g.L9(new g.jD("b/195699950",{yt:Z,player:a}));this.gU=Bfb(this);if(Z=g.Q5(this.kW.experiments,"html5_block_pip_safari_delay"))this.H_=new g.Uc(this.R9,Z,this),g.u(this,this.H_);N=RW(N?.trustedEchoWorkerUrl??
null);Z=this.kW.Yl().V.Aq(itf);a=this.kW.Yl().V.Aq(gmb);k=this.kW.Yl().V.Aq(vmy);const T=this.kW.Yl().V.Aq(OtR),K=this.webPlayerContextConfig.echoWorkerWasmModuleUrl??"";N&&Z>0&&a>0&&k>0&&T>0&&(this.fM=new egD(N,(y,Q)=>{this.DF().U6(y,Q)},k,a,T,Z,K),g.u(this,this.fM),q7f(this.fM));
g.u(this,this.CC);Zm=this.kW.HA;this.rA.publish("applicationInitialized")}static create(Z,k,N,a){try{const T=typeof Z==="string"?Z:`player${g.By(Z)}`,K=Nb[T];if(K){try{K.dispose()}catch(Q){g.b(Q)}Nb[T]=null}const y=new g.aw(Z,k,N,a);y.addOnDisposeCallback(()=>{Nb[T]=null;y.gU&&y.gU()});
return Nb[T]=y}catch(T){throw g.b(T),(T&&T instanceof Error?T:Error(String(T))).stack;}}CN(){return this.visibility}cC(Z){const k=this.DF();if(Z!==k){Z.getVideoData().autonavState=k.getVideoData().autonavState;k.kF(this.lJ,this);var N=k.getPlaybackRate();k.dispose();this.xg.cC(Z);Z.setPlaybackRate(N);Z.tZ(this.lJ,this);FH(this)}}jU(){this.M5||(this.M5=g.bJ(SY(),D$X(),{pZ:this.kW.pZ(),clientInterface:Yy(this.kW)}));return this.M5}SU(Z){if(this.mediaElement){this.oi&&(this.events.Ce(this.oi),this.oi=
null);this.xL.U();this.wA().SU(!0,!1,Z);this.template.SU();try{this.B("html5_use_async_stopVideo")?this.mediaElement.dispose():this.mediaElement.Kp()}catch(k){g.L9(k)}this.mediaElement=null}}jP(Z,k,N=!1){if(Z!==this.wA()){var a=null;N||(N=this.wA(),a=N.getPlayerState(),NI(this.WG,3),QM(this,"cuerangesremoved",N.jO()),this.y_&&!Z.isGapless()&&N.isGapless()&&this.mediaElement&&this.mediaElement.stopVideo(),N=Z.EQ()&&N.EQ(),this.Fa.Tq("iv_s"),vkr(this,N));Z.getPlayerType()===1&&this.cC(Z);N=Z.getPlayerType();
var T=this.xg.D[N]||null;Z!==this.DF()&&Z!==T&&(T?.dispose(),T=this.xg,T.D[N]=Z,T.L[Z.q4()]=Z);this.xg.jP(Z);this.mediaElement&&Z.setMediaElement(this.mediaElement);Z.tZ(this.Bb,this);Z.t7()?hX(this,"setPresenting",!1):(this.FX("newdata",Z,Z.getVideoData()),a&&!g.Ak(a,Z.getPlayerState())&&this.hU(new g.d7(Z.getPlayerState(),a)),k=k&&Z.getPlayerType()===1,Z.CT()&&!k&&this.FX("dataloaded",Z,Z.getVideoData()),(k=(k=Z.getVideoData().U)&&k.video)&&g.Xd(this.rA,"onPlaybackQualityChange",k.quality),QM(this,
"cuerangesadded",Z.jO()),k=Z.getPlayerState(),k.V(2)?gkU(this):k.V(8)?Z.playVideo():Z.NN()&&Z.pauseVideo(),k=this.DF(),Z.getPlayerType()===2&&(Z.getVideoData().Xh=k.getVideoData().clientPlaybackNonce),Z.getPlayerType()!==2||this.g_()||(Z=Z.getVideoData(),k.GU(Z.clientPlaybackNonce,Z.qX||"",Z.breakType||0,Z.lz,Z.videoId||"")))}}Sa(){this.DF()!==this.wA()&&this.jP(this.DF())}QT(){return this.xg}PA(Z){return this.xg.PA(Z)||this.xg.N}DF(){return this.xg.DF()}wA(){return this.xg.wA()}uw(){DV(this)||this.Ir(5)}i8(){if(!DV(this)){a_(this);
var Z=this.wA(),k=Z.getVideoData();this.kW.B("html5_allow_multiview_tile_preload")&&k.iq&&Z.seekTo(Infinity);k=Z.getPlayerState();Z.NN()?this.pauseVideo():k.isOrWillBePlaying()&&this.playVideo()}}canPlayType(Z){return r0(Z)}X(){return this.kW}getVideoData(){return this.wA().getVideoData()}hM(){return this.wA().gG()}Yg(){return this.DF().getVideoData()}getVideoLoadedFraction(Z){return this.PA({playerType:Z}).getVideoLoadedFraction()}fF(){return this.template}GZ(){return this.WG}tQ(){return this.Fa}aW(Z,
k=1,N){this.PA({playerType:k}).bv(Z,void 0,N)}QP(){const Z=this.WG.QP();this.rA.publish("videoStatsPingCreated",Z);return Z}getVolume(){return Math.round(this.rA.getVolume())}isMuted(){return this.rA.isMuted()}yC(){if(this.DF()===this.wA()&&this.vA)return this.vA.postId}gY(){this.B("use_rta_for_player")||(g.Qw(this.kW)?g.GC(this.kW,this.getVideoData().G()).then(Z=>{eY(SY(),Z);Hff(this.getVideoData(),this.kW,this.jU())}):Hff(this.getVideoData(),this.kW,this.jU()))}bz(Z){this.rA.publish("poTokenVideoBindingChange",
Z)}VH(Z){this.rA.publish("d6de4videobindingchange",Z)}zm(){this.Gg&&this.Gg.zm()}dc(Z){this.Gg=Z}Ws(Z){if(Z===1){this.Fa.tick("vr");
var k=this.wA();k.oN();fLU(this.Fa,k.getVideoData(),GQf(this));kv(this.WG)}k=this.kW;(h4(k)&&k.C||g.CQ(k))&&(this.wA().getVideoData()?.enableServerStitchedDai||!this.g_())&&g.Xd(this.rA,"onAdStateChange",Z)}setLoopVideo(Z){const k=this.wA();k===this.DF()&&k.hZ()!==Z&&(k.setLoop(Z),g.A7(this.rA,"onLoopChange",Z))}getLoopVideo(){return this.wA().hZ()}setLoopRange(Z){var k=!1;!!this.vA!==!!Z?k=!0:this.vA&&Z&&(k=this.vA.startTimeMs!==Z.startTimeMs||this.vA.endTimeMs!==Z.endTimeMs||this.vA.postId!==Z.postId||
this.vA.type!==Z.type);if(k){k=this.wA();vZ(k.getVideoData())&&k.U6("slr",{et:Z?.endTimeMs||-1});k=this.DF();k.jl("applooprange");if(Z){var N=new g.pe(Z.startTimeMs,Z.endTimeMs,{id:"looprange",namespace:"applooprange"});k.addCueRange(N)}else this.Yg().clipConfig=void 0,this.vA?.type!=="repeatChapter"||isNaN(Number(this.vA?.loopCount))||(N={loopCount:String(this.vA.loopCount),cpn:this.getVideoData().clientPlaybackNonce},g.TO("repeatChapterLoopEvent",N));this.vA=Z;g.A7(this.rA,"onLoopRangeChange",Z||
void 0);this.DF()===this.wA()&&(this.jS(),k.IC())}}getLoopRange(){return this.vA}jS(){let Z="";const k=this.DF();this.vA?k!==this.wA()?Z="pnea":C4r(this,k.getCurrentTime())&&(this.vA.loopCount=0,Z="ilr"):Z="nlr";const N=this.wA();vZ(N.getVideoData())&&(this.B("html5_gapless_log_loop_range_info")?N.U6("slrre",{rej:Z,ct:k.getCurrentTime(),lst:this.vA?.startTimeMs,let:this.vA?.endTimeMs}):N.U6("slrre",{}));Z||elf(this)}setPlaybackRate(Z,k){if(!isNaN(Z)){Z=hly(this,Z);var N=this.DF();N.getPlaybackRate()!==
Z&&(N.setPlaybackRate(Z),k&&!this.kW.Y&&g.Z_("yt-player-playback-rate",Z),g.Xd(this.rA,"onPlaybackRateChange",Z))}}getCurrentTime(Z={}){const {playerType:k,OP:N=!0}=Z;var a=this.xg.bx;if(a)return a.getCurrentTime();Z=(a=k===2&&this.getVideoData().enableServerStitchedDai)?this.wA():this.PA(Z);return a&&this.AI?(a=this.xg.j)?a.getCurrentTime(N):Z.getCurrentTime():N?(Z=BP(this,Z),ZV(this,Z.getCurrentTime(),Z)):Z.getCurrentTime()}LH(){var Z=this.PA({playerType:void 0});Z=BP(this,Z);return ZV(this,Z.LH(),
Z)}getDuration(Z={}){const {playerType:k,OP:N=!0}=Z;if(Z=this.xg.bx)return Z.getDuration();Z=this.getVideoData();const a=k===2&&Z.enableServerStitchedDai;let T;T=a?this.wA():this.PA({playerType:k});if(Z.hasProgressBarBoundaries()&&!a){const K=Number(Z.progressBarStartPosition?.utcTimeMillis),y=Number(Z.progressBarEndPosition?.utcTimeMillis);if(!isNaN(K)&&!isNaN(y))return(y-K)/1E3}if(vZ(Z)&&!Z.isLivePlayback)return kQ(this,k);if(N)return Z=Y$(this,T),ZV(this,Z.getDuration(),Z);a&&this.AI?(Z=this.xg,
Z=Z.V===Z.j?Z.V:null,Z=(Z==null?void 0:Z.getDuration())||0):Z=T.getDuration();return Z}HG(Z){var k=this.PA({playerType:Z});return this.g_(k)?(k=Y$(this,k),k.HG()-k.getCurrentTime()+this.getCurrentTime({playerType:Z})):k.HG()}finishSegmentByCpn(){return[]}pw(){this.template.pw();var Z=this.rA;Z.state.element=this.template.element;const k=Z.state.element;let N;for(N in Z.state.V)Z.state.V.hasOwnProperty(N)&&(k[N]=Z.state.V[N]);(Z=Umf(this.template.element))&&this.events.K(this.template,Z,this.onFullscreenChange)}getDebugText(Z){var k=
this.DF().Vn(Z),N=this.wA();if(N!==this.DF()){N=N.Vn(Z);for(var a of Object.keys(N))k["ad"+a]=N[a];if(Z){a=k;N={};var T=zm(document,"movie_player");T&&(N.bounds=T.getBoundingClientRect(),N["class"]=T.className);T={};var K=g.Mc("video-ads");K?(pEy(K,T),T.html=K.outerHTML):T.missing=1;K={};const y=g.Mc("videoAdUiSkipContainer"),Q=g.Mc("ytp-ad-skip-button-container"),q=g.Mc("ytp-skip-ad-button"),r=y||Q||q;r?(pEy(r,K),K.ima=y?1:0,K.bulleit=Q?1:0,K.component=q?1:0):K.missing=1;N=JSON.stringify({player:N,
videoAds:T,skipButton:K});a.ad_skipBtnDbgInfo=N}}Z&&this.mediaElement&&(k["0sz"]=`${+wJ(this.mediaElement.getSize())===0}`,k.op=this.mediaElement.zt("opacity"),a=this.mediaElement.cB().y+this.mediaElement.getSize().height,k.yof=`${+a<=0}`,k.dis=this.mediaElement.zt("display"));Z&&((Z=(0,g.kT)())&&(k.gpu=Z),(Z=this.kW.playerStyle)&&(k.ps=Z),this.kW.Rq&&(k.webview=1),(Z=this.webPlayerContextConfig.jsUrl)&&(k.js=Z));k.debug_playbackQuality=this.rA.getPlaybackQuality(1);k.debug_date=(new Date).toString();
k.origin=window.origin;k.timestamp=Date.now();delete k.uga;delete k.q;return JSON.stringify(k,null,2)}getFeedbackProductData(){const Z={player_debug_info:this.getDebugText(!0),player_experiment_ids:this.X().experiments.experimentIds.join(", "),player_release:"youtube.player.web_20260310_06_RC00"},k=this.getPlayerStateObject().RJ;k&&(Z.player_error_code=k.errorCode,Z.player_error_details=JSON.stringify(k.errorDetail));return Z}getPresentingPlayerType(Z){return this.appState===1?1:DV(this)?3:(Z&&this.kW.Yl().V.Aq(jn)?
this.xg.V?.isAd()??!1:this.AI?.qX(this.getCurrentTime()))?2:this.wA().getPlayerType()}Eo(){return!1}getPlayerStateObject(Z){return this.PA({Zy:!0,playerType:Z}).getPlayerState()}getAppState(){return this.appState}wb(Z){switch(Z.type){case "loadedmetadata":this.EF.start();for(var k of this.iM)AUb(this,k.id,k.vE,k.GY,void 0,!1);this.iM=[];break;case "loadstart":this.Fa.Tq("gv");break;case "progress":case "timeupdate":Rt(Z.target.pN())>=2&&this.Fa.Tq("l2s");break;case "playing":g.iS&&this.EF.start();
if(g.Qw(this.kW))Z=!1;else{k=g.gv(this.GZ());Z=this.mediaElement.zt("display")==="none"||wJ(this.mediaElement.getSize())===0;var N=RK(this.template),a=this.wA().getVideoData(),T=g.oJ(this.kW);a=ie(a);k=!N||k||T||a||this.kW.Qz;Z=Z&&!k}Z&&(Z=this.wA(),Z.bK(),this.getVideoData().Kp||(this.getVideoData().Kp=1,this.NS(),Z.playVideo()))}}P4(Z){g.dv(this.rA,"onLoadProgress",Z)}md(){this.rA.publish("playbackstalledatstart")}rb(Z,k){this.rA.publish("sabrCaptionsDataLoaded",Z,k)}Jg(Z){this.wA().sy(Z)}lS(Z){this.wA().XZ(Z)}Az(Z){Z=
BP(this,this.wA());Z=ZV(this,Z.getCurrentTime(),Z);g.Xd(this.rA,"onVideoProgress",Z);this.kW.US&&this.visibility.i9()&&this.kW.rD&&!this.getVideoData()?.backgroundable&&this.pauseVideo()}Ft(){g.Xd(this.rA,"onAutoplayBlocked");var Z=this.wA().getVideoData();Z&&(Z.fS=!0);g.PQ(this.kW)&&(Z={autoplayBrowserPolicy:ma(),autoplayIntended:sR(this.getVideoData()),autoplayStatus:"AUTOPLAY_STATUS_BLOCKED",cpn:this.getVideoData().clientPlaybackNonce,intentionalPlayback:this.intentionalPlayback},g.TO("embedsAutoplayStatusChanged",
Z))}MJ(){this.rA.publish("progresssync")}C0(){g.dv(this.rA,"onPlaybackPauseAtStart")}sD(Z){if(this.getPresentingPlayerType()===1){Z.Ub(1)&&!Z.state.V(64)&&this.Yg().isLivePlayback&&this.DF().isAtLiveHead()&&this.rA.getPlaybackRate()>1&&this.setPlaybackRate(1,!0);if(Z.Ub(2)){if(this.vA&&this.vA.endTimeMs>=(this.getDuration()-1)*1E3){elf(this);return}gkU(this)}if(Z.state.V(128)){var k=Z.state;this.cancelPlayback(5);k=k.RJ;JSON.stringify({errorData:k,debugInfo:this.getDebugText(!0)});g.Xd(this.rA,"onError",
v5R(k.errorCode));g.dv(this.rA,"onDetailedError",{errorCode:k.errorCode,errorDetail:k.errorDetail,message:k.errorMessage,messageKey:k.YG,cpn:k.cpn});(0,g.z)()-this.kW.PG>6048E5&&g.dv(this.rA,"onReloadRequired")}k={};if(Z.state.isPlaying()&&!Z.state.isBuffering()&&!vX("pbresume","ad_to_video")&&vX("_start","ad_to_video")){const N=this.getVideoData();k.clientPlaybackNonce=N.clientPlaybackNonce;N.videoId&&(k.videoId=N.videoId);g.lJ(k,"ad_to_video");uJ("pbresume",void 0,"ad_to_video");kv(this.WG)}this.rA.publish("applicationplayerstatechange",
Z)}}hU(Z){this.xg.bx||this.rA.publish("presentingplayerstatechange",Z)}qA(Z){uL(this,Pt(Z.state));Z.state.V(1024)&&this.rA.isMutedByMutedAutoplay()&&(TB(this,{muted:!1,volume:this.XQ.volume},!1),Nx(this,!1))}onPlayerRequestSent(Z){g.A7(this.rA,"onPlayerRequestSent",Z)}CJ(Z,k){Z==="newdata"&&FH(this);this.rA.publish("applicationvideodatachange",Z,k)}So(Z,k){a_(this);g.dv(this.rA,"onPlaybackAudioChange",this.rA.getAudioTrack().ZF.name);this.rA.publish("internalaudioformatchange",this.rA.getAudioTrack().ZF.id,
k)}W4(Z){const k=this.wA().getVideoData();Z===k&&g.Xd(this.rA,"onPlaybackQualityChange",Z.U.video.quality)}sB(){var Z=this.xg.D[2]||null;if(Z){Z=Z.getVideoData();this.wA().U6("ssdai",{cleanaply:1,acpn:Z?.clientPlaybackNonce,avid:Z.videoId,isDai:this.Yg().enableServerStitchedDai?1:0});Z=this.xg;const k=Z.D[2];k&&(delete Z.L[k.q4()],delete Z.D[2])}}Id(Z,k){this.FX(Z,this.wA(),k)}FX(Z,k,N){this.kW.Xa()&&k.U6("vdc",{type:Z,vid:N.videoId||"",cpn:N.clientPlaybackNonce||""});k===this.DF()&&(this.kW.xd=N.oauthToken);
k===this.DF()&&(this.getVideoData().enableServerStitchedDai&&!this.AI?(this.DF().U6("sdai",{initSstm:1}),this.AI=new g.kD(this.rA,this.kW,this.DF(),this)):!this.getVideoData().enableServerStitchedDai&&this.AI&&(this.AI.dispose(),this.AI=null));if(Z==="newdata")NI(this.WG,2),this.rA.publish("videoplayerreset",k);else{if(!this.mediaElement)return;if(Z==="dataloaded")if(this.DF()===this.wA()){if(XJ(N.Jq,N.Ri),!this.DF().getPlayerState().isError()){var a=DV(this);this.Yg().isLoaded();a&&this.Ir(6);xhf(this);
ZW(this.WG)||tX(this)}}else xhf(this);if(k.getPlayerType()===1&&(this.kW.FS&&okb(this),this.getVideoData().isLivePlayback&&!this.kW.mX&&this.Ar("html5.unsupportedlive",2,"DEVICE_FALLBACK"),N.isLoaded()&&((gBX(N)||this.getVideoData().g0)&&this.rA.publish("legacyadtrackingpingchange",this.getVideoData()),N.hasProgressBarBoundaries()&&(a=Number(this.getVideoData().progressBarEndPosition?.utcTimeMillis)/1E3,!isNaN(a))))){var T=this.HG();T&&(T-=this.getCurrentTime(),a=(a-T)*1E3,T=this.T$.progressEndBoundary,
T?.start!==a&&(T&&this.FD([T]),a=new g.pe(a,0x7ffffffffffff,{id:"progressEndBoundary",namespace:"appprogressboundary"}),this.DF().addCueRange(a),this.T$.progressEndBoundary=a))}this.rA.publish("videodatachange",Z,N,k.getPlayerType())}g.Xd(this.rA,"onVideoDataChange",{type:Z,playertype:k.getPlayerType()});this.jS();(Z=N.JJ)?this.X_.zt(Z,N.clientPlaybackNonce):Tfy(this.X_)}bJ(){yM(this,null);g.dv(this.rA,"onPlaylistUpdate")}NJ(Z){delete this.T$[Z.getId()];this.DF().removeCueRange(Z);a:{Z=this.getVideoData();
var k=Z.xW?.contents?.singleColumnWatchNextResults?.autoplay?.autoplay?.sets||Z.xW?.contents?.twoColumnWatchNextResults?.autoplay?.autoplay?.sets;if(k)for(N of k){k=N.autoplayVideo||N.autoplayVideoRenderer?.autoplayEndpointRenderer?.endpoint;const a=g.J(k,g.d9);if(k!=null&&a?.videoId===Z.videoId&&a?.continuePlayback){var N=k;break a}}N=null}(Z=g.J(N,g.d9))&&g.A7(this.rA,"onPlayVideo",{sessionData:{autonav:"1",itct:N?.clickTrackingParams},videoId:Z.videoId,watchEndpoint:Z})}Ir(Z){Z!==this.appState&&
(Z===2&&this.getPresentingPlayerType()===1&&(uL(this,-1),uL(this,5)),this.appState=Z,this.rA.publish("appstatechange",Z))}Ar(Z,k,N,a,T){this.DF().N4(Z,k,N,a,T)}isAtLiveHead(Z,k=!1){var N=this.PA({playerType:Z});Z=Y$(this,N);N=BP(this,N);return Z!==N?Z.isAtLiveHead(ZV(this,N.getCurrentTime(),N),!0):Z.isAtLiveHead(void 0,k)}dk(){const Z=this.PA({playerType:void 0});return Y$(this,Z).dk()}seekTo(Z,k,N,a,T,K){k=k!==!1;a=this.PA({playerType:a});this.appState===2&&dF(this);this.g_(a)?gF(this)?this.AI.seekTo(Z,
{seekSource:T},k,N):this.uq.seekTo(Z,{seekSource:T},k,N):(this.B("html5_sabr_csdai_seek_log")||(K=""),a.seekTo(Z,{gj:!k,yN:N,b0:"application"+(K??""),seekSource:T}))}seekBy(Z,k,N,a){this.seekTo(this.getCurrentTime()+Z,k,N,a,void 0,"_by")}K0(){g.Xd(this.rA,"SEEK_COMPLETE")}L0(){g.A7(this.rA,"onAbnormalityDetected")}Xt(Z){g.A7(this.rA,"onSnackbarMessage",Z)}u8(Z){const k=this.wA(),N=k.getVideoData();if(this.appState===1||this.appState===2)N.startSeconds=Z;this.appState===2?k.getPlayerState().V(512)||
dF(this):g.Xd(this.rA,"SEEK_TO",Z)}l8(){this.rA.publish("airplayactivechange")}Jz(){this.rA.publish("airplayavailabilitychange")}showAirplayPicker(){this.wA().j$()}GE(){this.rA.publish("beginseeking")}Ea(){this.rA.publish("endseeking")}getStoryboardFormat(Z){Z=this.PA({playerType:Z});return Y$(this,Z).getStoryboardFormat()}Cn(Z){Z=this.PA({playerType:Z});return Y$(this,Z).getVideoData().Cn()}g_(Z){Z=(Z||this.wA()).getVideoData();if(gF(this))var k=Z===this.AI.playback.getVideoData();else a:{var N=
this.uq;if(Z===N.V.getVideoData()&&N.U.length)k=!0;else{for(k of N.U)if(Z.tI===k.tI){k=!0;break a}k=!1}}return k}eT(Z,k,N,a,T,K,y,Q){const q=gF(this);this.wA().U6("appattl",{sstm:this.AI?1:0,ssenable:this.getVideoData().enableServerStitchedDai,susstm:q});q?(N=this.AI.NW(Z,k,N,a,T,K,y,Q),Z=N?.clientPlaybackNonce||"",(this.B("html5_ssdai_new_decoration_logic")||this.DF().getVideoData().hS)&&this.DF().Ab(Q||{gE:""},k,N?.clientPlaybackNonce||"")):Z=bzi(this.uq,Z,N,a,T,K);return Z}CY(Z,k,N,a,T,K,y,Q){gF(this)&&
(Z=this.AI?.NW(Z,k,N,a,T,K,y,Q),this.DF().getVideoData().hS&&this.DF().Ab(Q||{gE:""},k,Z?.clientPlaybackNonce||""))}vl(Z){(this.B("html5_ssdai_new_decoration_logic")||this.DF().getVideoData().hS)&&this.DF().Ab(Z,"","");this.AI?.vl(Z.gE||"")}Ci(Z=-1,k=Infinity){gF(this)||bx(this.uq,Z,k)}pj(Z,k,N){if(gF(this)){var a=this.AI,T=N;(N=a.V.PA(Z))?(T===void 0&&(T=N.R4),wW(a,N,k,T)):a.QV(`Invalid_cpn_${Z}_specified`)}else{a=this.uq;let K=null;for(T of a.U)if(T.tI===Z){K=T;break}K?(N===void 0&&(N=K.R4),IWj(a,
K,k,N)):z5(a,"InvalidTimelinePlaybackId timelinePlaybackId="+Z)}}enqueueVideoByPlayerVars(Z,k,N=Infinity,a=""){this.g_();Z=new g.xJ(this.kW,Z);a&&(Z.tI=a);mV(this,Z,k,N)}queueNextVideo(Z,k=1,N=NaN,a="",T=""){Z=this.preloadVideoByPlayerVars(Z,k,N,a,T);k=this.wA();Z&&(this.B("html5_check_queue_on_data_loaded")?this.X().supportsGaplessShorts()&&k.getVideoData().j&&(N=this.Je,a=this.y_.L,N.Y!==Z&&(N.U=k,N.Y=Z,N.D=1,N.V=Z.getVideoData(),N.L=a,N.V.isLoaded()?N.G():N.V.subscribe("dataloaded",N.G,N))):(N=
V0N(k,Z,this.y_.L),N!=null?(k.U6("sgap",N),k.getVideoData().j&&k.VJ(!1)):(Z=Z.getVideoData(),k=this.Je,k.V!==Z&&(k.V=Z,k.D=1,Z.isLoaded()?k.j():k.V.subscribe("dataloaded",k.j,k)))))}Yt(Z,k,N=0,a=0){Y$(this,this.wA()).Kt();iYy(this.y_,Z,k,N,a).then(()=>{g.dv(this.rA,"onQueuedVideoLoaded")},()=>{})}Q_(){return this.y_.Q_()}sO(Z){const k=this.y_.V;
return k?k.s_(Z):!1}clearQueue(Z=!1,k=!1){this.y_.clearQueue(Z,k)}loadVideoByPlayerVars(Z,k=1,N,a,T,K){var y=this.DF();if(k===2&&this.Yg().enableServerStitchedDai&&y&&!y.Vr())return y.U6("lvonss",{vid:Z?.videoId||"",ptype:k}),!1;var Q=!1;y=new g.xJ(this.kW,Z);y.LX=K;g.O$(this.kW)&&!y.Ix&&wT(this.Fa);this.Fa.timerName=y.Vz??"";this.Fa.TF("pl_i");this.B("web_player_early_cpn")&&y.clientPlaybackNonce&&this.Fa.infoGel({clientPlaybackNonce:y.clientPlaybackNonce});A_X(y).supportsVp9Encoding===!1&&this.wA().U6("noVp9enc",
{});if(this.X().supportsGaplessShorts()){K=xgy(this.y_,y,k);if(K==null){uL(this,-1);this.y_.V?.getVideoData().isAd()||VM(this);Z=this.y_;Z.app.X().B("html5_gapless_new_slr")?qx(Z.app,"gaplessshortslooprange"):Z.app.setLoopRange(null);Z.app.getVideoData().gZ=!0;Z.V?.HC();Z.V?.C9();N={b0:"gapless_to_next_video",seekSource:60,oG:Z.L.V};a=Z.D?.Vz()||-1;if(Z.L.V){const {NG:C,fz:m}=Z.D?.C()||{};m!=null&&C!=null&&(a=m-C+.001)}Z.app.wA()?.seekTo(a,N);Z.app.getPlayerStateObject(k).isPlaying()||Z.app.wA()?.playVideo(!0);
$gy(Z,a);Z.app.wA()?.PU();Z.C();return!0}const q=this.B("html5_shorts_gapless_preload_fallback"),r=this.y_.V;if(q&&r&&!r.jm()){const C=r.getVideoData();this.xg.G.set(vP(k,C),r,3600)}this.y_.clearQueue(q);this.wA().U6("sgap",{f:K})}if(T){for(;y.JZ.length&&y.JZ[0].isExpired();)y.JZ.shift();Q=y.JZ.length-1;Q=Q>0&&T.U(y.JZ[Q])&&T.U(y.JZ[Q-1]);y.JZ.push(T)}N||(Z&&$J(Z)?(t4(this.kW)&&!this.Po&&(Z.fetch=0),yM(this,Z)):this.playlist&&yM(this,null),Z&&(this.Po=Be(!1,Z.external_list)));this.rA.publish("loadvideo");
k=this.kL(y,k,a);Q&&this.Ar("player.fatalexception",1,"GENERIC_WITH_LINK_AND_CPN",`loadvideo.1;emsg.${y.JZ.join()}`.replace(/[;:,]/g,"_"));return k}preloadVideoByPlayerVars(Z,k=1,N=NaN,a,T=""){a=w$(Z);if(a=this.xg.G.get(`${k}_${a}_${T}_${+(Z.autonav==="1"||Z.autonav===!0)}${+(Z.autoplay==="1"||Z.autoplay===!0||Z.autoplay===1)}`)||null)return a;Z=new g.xJ(this.kW,Z);T&&(Z.tI=T);{T=vP(k,Z);a=this.wA();const K=vP(a.getPlayerType(),a.getVideoData());T===K?(a.cj(!0),Z.dispose(),k=null):(Z.rD=!0,a=CX(this,
k,Z,!0),(k!==1||!BQ(this.kW)||this.kW.B("html5_allow_multiview_tile_preload")&&Z.iq)&&a.cj(!0),this.xg.G.set(T,a,N||3600),k=a)}return k}setMinimized(Z){this.visibility.setMinimized(Z);(Z=SjN(this.WG))&&(this.isMinimized()?Z.load():Z.unload());this.rA.publish("minimized")}setInline(Z){this.visibility.setInline(Z)}setInlinePreview(Z){this.visibility.setInline(Z)}XP(Z){JUU(this,Z)||this.visibility.XP(Z)}setSqueezeback(Z){this.visibility.setSqueezeback(Z)}R9(){const Z=this.mediaElement?.lq();Z&&(this.kW.xF&&
$i(i_(()=>document.exitFullscreen()),()=>{}),$i(i_(()=>bR(Z)),()=>{}))}Sk(){this.mediaElement.lq();
this.mediaElement.lq().webkitPresentationMode==="picture-in-picture"?this.XP(!0):this.XP(!1)}togglePictureInPicture(){this.wA().togglePictureInPicture()}kL(Z,k=1,N){vX("_start",this.Fa.timerName)||g.ai(LW)(void 0,this.Fa.timerName);let a=!1,T=rF(this,k,Z,!1);T?(a=!0,Z.dispose(),T.getVideoData().iq&&T.U6("app_lv",{pdl:T.CT()}),this.Yl().V.Aq(jSy)&&(T.getVideoData().Tt=Z.Tt,T.U6("cpvd",{pas:Z.Tt}))):(T=CX(this,k,Z,!0,N),(this.B("html5_onesie")||this.B("html5_load_before_stop"))&&T.QR()&&T.cj(),this.EF.stop(),
k===1&&k!==this.getPresentingPlayerType()&&this.cancelPlayback(4),this.cancelPlayback(4,k),this.jP(T));Z.videoId&&this.II.includes(Z.videoId)&&T.U6("mvt",{});T===this.DF()&&(this.kW.xd=Z.oauthToken);if(!T.QR())return!1;if(T===this.DF())return this.Ir(1),Z=dF(this),a&&T.getPlayerType()===1&&T.CT()&&this.FX("dataloaded",T,T.getVideoData()),Z;T.TD();return!0}cueVideoByPlayerVars(Z,k=1){var N=this.DF();if(this.Yg().enableServerStitchedDai&&N&&!N.Vr()&&Z&&Object.keys(Z).length>0)N.U6("qvonss",{vid:Z?.videoId||
"",ptype:k});else if(Z&&$J(Z))if(this.H8=!0,yM(this,Z),(Z=g.Gx(this.playlist))&&Z.cG())Ot(this,Z,k);else this.playlist.onReady(()=>{cP(this)});
else{k||(k=this.getPresentingPlayerType());k===1&&this.bJ();N=new g.xJ(this.kW,Z);const a=g.PQ(this.kW)&&!this.kW.O&&k===1&&!N.isAd()&&!N.qX;this.rA.publish("cuevideo",k);a?(this.wA().getVideoData().loading=!0,wbG(N,Z?Z:{}).then(T=>{Ot(this,T,k)}),N.dispose()):Ot(this,N,k)}}CP(Z,k,N,a,T,K,y){if(!Z&&!N)throw Error("Playback source is invalid");
if(cQ(this.kW)||g.KA(this.kW))return k=k||{},k.lact=Qb(),k.vis=this.rA.getVisibilityState(),g.A7(this.rA,"onPlayVideo",{videoId:Z,watchEndpoint:K,sessionData:k,listId:N}),!1;Bdi(this.Fa);this.Fa.reset();Z={video_id:Z};a&&(Z.autoplay="1");a&&(Z.autonav="1");K&&(Z.player_params=K.playerParams);y&&(Z.oauth_token=y);N?(Z.list=N,this.loadPlaylist(Z)):this.loadVideoByPlayerVars(Z,1);return!0}cuePlaylist(Z,k,N,a){this.H8=!0;zlX(this,Z,k,N,a)}loadPlaylist(Z,k,N,a){this.H8=!1;zlX(this,Z,k,N,a)}h4(){return this.rA.isMutedByMutedAutoplay()?
!1:this.xg.bx?!0:!(!this.playlist||!this.playlist.hasNext())}nextVideo(Z,k){var N=this.DF().getVideoData().N();g.xn(this.rA)&&N?this.CP(N.videoId,k?N.uL:N.sessionData,N.playlistId,k,void 0,N.l2||void 0):this.Po?g.dv(this.rA,"onPlaylistNext"):this.getPresentingPlayerType()===3?OK(this.WG).nextVideo():!this.playlist||t4(this.kW)&&!this.rA.isFullscreen()||(this.playlist.hasNext(Z)&&S0(this.playlist,Oai(this.playlist)),this.playlist.loaded?(Z=k&&this.kW.B("html5_player_autonav_logging"),k&&this.rA.publish("playlistautonextvideo"),
this.kL(g.Gx(this.playlist,void 0,k,Z),1)):this.H8=!1)}previousVideo(Z){this.Po?g.dv(this.rA,"onPlaylistPrevious"):this.getPresentingPlayerType()===3?OK(this.WG).As():!this.playlist||t4(this.kW)&&!this.rA.isFullscreen()||(this.playlist.hasPrevious(Z)&&S0(this.playlist,vRr(this.playlist)),this.playlist.loaded?this.kL(g.Gx(this.playlist),1):this.H8=!1)}playVideoAt(Z){this.Po?g.dv(this.rA,"onPlaylistIndex",Z):this.playlist&&(this.playlist.loaded?this.kL(g.Gx(this.playlist,Z),1):this.H8=!1,S0(this.playlist,
Z))}getPlaylist(){return this.playlist}iW(Z){this.iM=g.Ry(this.iM,a=>a.id!==Z);
const k=this.DF(),N=k.jO();for(let a=0;a<N.length;a++){const T=N[a];if(T.getId()===Z)return k.removeCueRange(T),QM(this,"cuerangesremoved",[T]),!0}return!1}Qs(Z){g.Xd(this.rA,"onCueRangeEnter",Z.getId())}Kv(Z){g.Xd(this.rA,"onCueRangeExit",Z.getId())}kc(Z,k,N){let a=this.PA({playerType:k});if(this.B("html5_ssdai_enable_media_end_cue_range")&&this.AI){if(a.getPlayerType()===2&&this.kW.Yl().V.Aq(jn)?this.xg.V?.isAd()??!1:this.AI?.qX(this.getCurrentTime()))a=this.DF();for(const T of Z)T.associatedClipId=
this.AI.VV}a.kc(Z,N);k&&this.getPresentingPlayerType()!==k||QM(this,"cuerangesadded",Z)}FD(Z,k){this.PA({playerType:k}).FD(Z);k&&this.getPresentingPlayerType()!==k||QM(this,"cuerangesremoved",Z)}yQ(Z){return this.wA().yQ(Z)}Xw(Z){if(!Z||Z===this.DF().q4()||!this.kW.B("html5_use_new_ssdai_transition_detector")){Z=this.wA();this.getPresentingPlayerType();fLU(this.Fa,Z.getVideoData(),GQf(this));HP(this)&&this.kW.Y&&NN(this.Yg())==="embedded"&&this.Dx&&Math.random()<.01&&g.TO("autoplayTriggered",{intentional:this.intentionalPlayback});
this.Dx=!1;kv(this.WG);this.B("web_player_defer_ad")&&tX(this);g.dv(this.rA,"onPlaybackStartExternal");this.kW.Yl().V.Aq(Emf)||this.Db(this.getVideoData().clientPlaybackNonce);Z={};this.getVideoData().Pq&&(Z.cttAuthInfo={token:this.getVideoData().Pq,videoId:this.getVideoData().videoId});Z.sampleRate=20;OL("player_att",Z);if(this.getVideoData().botguardData||this.B("fetch_att_independently"))g.fQ(this.kW)||Yy(this.kW)==="MWEB"?g.c9(g.dO(),()=>{XH(this)}):XH(this);
this.jS();S7f(this);g.PQ(this.kW)&&(Z={autoplayBrowserPolicy:ma(),autoplayIntended:sR(this.getVideoData()),autoplayStatus:kOR(this.getVideoData(),1),cpn:this.getVideoData().clientPlaybackNonce,intentionalPlayback:this.intentionalPlayback},g.TO("embedsAutoplayStatusChanged",Z))}}Db(Z){if(this.kW.B("mweb_client_log_screen_associated"),!LQ(this.kW)){var k=this.screenLayer||(this.isMinimized()?3:0);if((k=g.C9(k))&&k!=="UNDEFINED_CSN"){var N=this.kW.B("web_player_attach_player_response_ve");const a=this.kW.B("web_playback_associated_ve");
Z={cpn:Z,csn:k};this.getVideoData().O&&(N||a)&&(N=g.yz(this.getVideoData().O),g.zO(k,N),a&&(Z.playbackVe=N.getAsJson()));this.getVideoData().queueInfo&&(Z.queueInfo=this.getVideoData().queueInfo);k={};this.getVideoData().Pq&&(k.cttAuthInfo={token:this.getVideoData().Pq,videoId:this.getVideoData().videoId});g.TO("playbackAssociated",Z,k)}else g.L9(new g.jD("CSN Missing or undefined during playback association"))}}B4(){this.rA.publish("internalAbandon");VM(this)}onApiChange(){const Z=this.wA();this.kW.C?
g.Xd(this.rA,"onApiChange",Z.getPlayerType()):g.Xd(this.rA,"onApiChange")}VE(){var Z=this.mediaElement;Z={volume:g.u0(Math.floor(Z.getVolume()*100),0,100),muted:Z.Rq()};Z.muted||Nx(this,!1);this.XQ=g.Rn(Z);g.Xd(this.rA,"onVolumeChange",Z)}mutedAutoplay(Z){isNaN(this.tN)&&(this.tN=this.getVideoData().startSeconds);const k=this.getVideoData(),N=k.videoId,a={video_id:Z?.videoId?Z?.videoId:N,playmuted:!0,start:this.tN,muted_autoplay_duration_mode:Z?.durationMode};this.B("embeds_enable_embed_config_for_muted_autoplay")&&
(Z?.embedConfig?a.embed_config=L8b(Z.embedConfig):k.PG&&(a.embed_config=k.PG));if(Z?.videoId||N)this.loadVideoByPlayerVars(a),g.dv(this.rA,"onMutedAutoplayStarts")}onFullscreenChange(){const Z=wF(this);this.uA(Z?1:0);buf(this,!!Z)}uA(Z){var k=!!Z;const N=!!this.yO()!==k;this.visibility.uA(Z);this.template.uA(k);this.B("html5_media_fullscreen")&&!k&&this.mediaElement&&wF(this)===this.mediaElement.lq()&&this.mediaElement.O();this.template.resize();N&&this.Fa.tick("fsc");N&&(this.rA.publish("fullscreentoggled",
k),Z=this.Yg(),k={fullscreen:k,videoId:Z.Li||Z.videoId,time:this.getCurrentTime()},this.rA.getPlaylistId()&&(k.listId=this.rA.getPlaylistId()),g.Xd(this.rA,"onFullscreenChange",k))}Gx(){return this.visibility.Gx()}isFullscreen(){return this.visibility.isFullscreen()}yO(){return this.visibility.yO()}zb(){var Z=this.yO();Z!==0&&Z!==1||this.uA(wF(this)?1:0);Z=window.screen.width*window.screen.height;const k=window.outerHeight*window.outerWidth;this.kW.YF?(this.Yq=Math.max(this.Yq,Z,k),Z=k/this.Yq<this.kW.dG,
this.visibility.XP(Z),this.kW.zC&&JUU(this,Z)):this.mediaElement&&k/Z<.33&&this.kW.rD&&!this.getVideoData()?.backgroundable&&this.mediaElement.O()}Rd(Z){this.xg.bx||this.rA.publish("liveviewshift",Z)}playVideo(Z,k){Z=this.PA({playerType:Z});this.appState===2?(g.O$(this.kW)&&wT(this.Fa),dF(this)):Z.getPlayerState().V(2)?(k=36,this.getVideoData().rQ()&&(k=37),this.seekTo(0,void 0,void 0,void 0,k,"_play")):Z.playVideo(!1,k)}pauseVideo(Z,k){this.PA({playerType:Z}).pauseVideo(k)}stopVideo(Z=!1){const k=
this.DF().getVideoData(),N=new g.xJ(this.kW,{video_id:k.Li||k.videoId,oauth_token:k.oauthToken});N.TQ=g.Rn(k.TQ);Z&&!this.webPlayerContextConfig.disableStaleness&&(N.Ii=!0);this.cancelPlayback(6);Ot(this,N,1)}cancelPlayback(Z,k){const N=this.PA({playerType:k});k===2&&N.getPlayerType()===1&&Qn(this.Yg())?N.U6("canclpb",{r:"no_adpb_ssdai"}):(this.kW.Xa()&&N.U6("canclpb",{r:Z}),this.appState!==1&&this.appState!==2&&(N===this.wA()&&NI(this.WG,Z),k===1&&(N.stopVideo(),VM(this)),N.XL(void 0,!0),QM(this,
"cuerangesremoved",N.jO()),N.a6(),this.y_&&N.isGapless()&&(N.SU(!0),N.setMediaElement(this.mediaElement)),this.II=N.getVideoData().vx().map(a=>a.videoId??"").filter(a=>!!a)))}sendVideoStatsEngageEvent(Z,k,N){k=this.PA({playerType:k});
tVU(this.kW,Z)?k.sendVideoStatsEngageEvent(Z,N):N&&N()}UQ(Z){const k=this.PA({playerType:void 0});return tVU(this.kW,Z)?k.UQ(Z):null}updatePlaylist(){!t4(this.kW)&&g.PQ(this.kW)&&PP(this);g.dv(this.rA,"onPlaylistUpdate")}setSizeStyle(Z,k){this.U7=Z;this.B("web_log_theater_mode_visibility")?this.mY(k):this.AK=k;this.rA.publish("sizestylechange",Z,k);this.template.resize()}mY(Z){this.visibility.mY(Z)}MA(){return this.B("web_log_theater_mode_visibility")?this.visibility.MA():this.AK}isMinimized(){return this.visibility.isMinimized()}isInline(){return this.visibility.isInline()}i9(){return this.visibility.i9()}Pf(){return this.visibility.Pf()}Qy(){return this.visibility.Qy()}wg(){return this.U7}getAdState(){if(this.getPresentingPlayerType()===
3)return OK(this.WG).getAdState();if(!this.g_()){const Z=bu(this.GZ());if(Z)return Z.getAdState()}return-1}V$(Z){var k=this.template.getVideoContentRect();OQ(this.N0,k)||(this.N0=k,this.wA().gk(),(k=this.DF())&&k===this.wA()&&k.gk(),this.yO()===1&&this.ZE&&buf(this,!0));k=this.fF().BF!==this.AX;this.AX=this.fF().BF;this.kq&&g.gJ(this.kq,Z)&&!k||(this.rA.publish("appresize",Z),this.kq=Z)}uV(){return this.rA.uV()}b8(){this.getPresentingPlayerType()===2&&this.uq.isManifestless()?nvb(this.uq):(this.AI&&
($$(this.AI),VM(this)),this.SY.Sm=(0,g.z)(),hX(this,"signature"))}QE(Z){Z&&hX(this,"reloadPlayerEvent",void 0,Z)}NS(Z){this.SU(Z);AX(this)}Zk(Z){if(Z.errorCode==="manifest.net.badstatus"){const k=this.kW.experiments.yz("html5_use_network_error_code_enums")?401:"401";Z.details.rc===k&&g.A7(this.rA,"onPlayerRequestAuthFailed")}}H4(Z){this.rA.publish("heartbeatparams",Z)}Gu(Z){g.A7(this.rA,"onAutonavChangeRequest",Z!==1)}TM(){return this.mediaElement}setBlackout(Z){if(this.kW.Qz!==Z){this.kW.Qz=Z;var k=
this.wA();k.IC();this.kW.FS&&okb(this);k.A$(Z)}}Ua(){const Z=this.wA(),k=!this.rA.KY();Z.xN(k)}jo(){g.dv(this.rA,"onLoadedMetadata")}v4(){g.dv(this.rA,"onDrmOutputRestricted")}Wf(){this.intentionalPlayback=!0}YW(){this.WG.dispose();this.MH.dispose();this.uq.dispose();this.AI&&this.AI.dispose();this.DF().dispose();this.SU();this.xg.dispose();g.Il(this.playlist);super.YW()}B(Z){return this.kW.B(Z)}Yl(){return this.kW.Yl()}Un(){return this.kW.Un()}setScreenLayer(Z){this.screenLayer=Z}getInternalApi(){return this.rA.getInternalApi()}createSubtitlesModuleIfNeeded(){return this.WG.createSubtitlesModuleIfNeeded()}isOrchestrationLeader(){const Z=
I1(this.WG);return Z?Z.isOrchestrationLeader():!1}getVideoUrl(Z,k,N,a,T){if(this.vA&&this.vA.postId)return Z=this.kW.getVideoUrl(Z),Z=Hj(Z,"v"),Z.replace("/watch",`/clip/${this.vA.postId}`);const K=this.rA.isEmbedsShortsMode()||this.kW.zt==="shortspage",y=g.rv(this.getVideoData());return this.kW.getVideoUrl(Z,k,N,a,T,K,y)}w9(){return this.y_.w9()}r0(Z){return Z?this.y_.r0()&&this.y_.V?.S9()===Z:this.y_.r0()}VU(Z,k,N){this.rA.publish("spsumpreject",Z,k,N)}Jn(){try{for(const Z of Object.values(this.xg.D))Z.jm()||
Z.Jn();if(this.B("html5_sabr_fetch_on_idle_network_preloaded_players"))for(const Z of $9f(this.xg.G))Z.jm()||Z.Jn();this.DF().Jn()}catch(Z){g.L9(Z)}}RK(){if(this.AI){const Z=(0,g.z)();return this.AI.RK(Z)}return!1}Cw(Z){let k=this.DF();Z&&(k=Rly(this,Z));if(k){var N=k.getVideoData();Z=new Map;for(const [a,T]of N.sabrContextUpdates){N=a;const K=T;K.scope===4&&k?.cf(N)&&Z.set(N,K)}return Z}this.DF().U6("scuget",{ncpf:"1",ccpn:Z})}uT(Z,k){this.UT.push({key:Z,value:k})}};g.aw.prototype.Gl=NR(41);
g.aw.prototype.zG=NR(16);g.aw.prototype.Wh=NR(10);g.aw.prototype.PB=NR(8);var Nb={};var oKF={yP:[{Rr:/Unable to load player module/,weight:20},{Rr:/Failed to fetch/,weight:500},{Rr:/XHR API fetch failed/,weight:10},{Rr:/JSON parsing failed after XHR fetch/,weight:10},{Rr:/Retrying OnePlatform request/,weight:10},{Rr:/CSN Missing or undefined during playback association/,weight:100},{Rr:/Non-recoverable error. Do not retry./,weight:0},{Rr:/Internal Error. Retry with an exponential backoff./,weight:0},{Rr:/API disabled by application./,weight:0},{Rr:/Unexpected end of JSON input/,
weight:0}],Ej:[{callback:Mdf,weight:500}]};var bUN=/[&\?]action_proxy=1/,Ua0=/[&\?]token=([\w-]*)/,p9f=/[&\?]video_id=([\w-]*)/,RjN=/[&\?]index=([\d-]*)/,M5R=/[&\?]m_pos_ms=([\d-]*)/,Yif=/[&\?]vvt=([\w-]*)/,WLX="ca_type dt el flash u_tz u_his u_h u_w u_ah u_aw u_cd u_nplug u_nmime frm u_java bc bih biw brdim vis wgl".split(" "),EhU="www.youtube-nocookie.com youtube-nocookie.com www.youtube-nocookie.com:443 youtube.googleapis.com www.youtubeedu.com www.youtubeeducation.com video.google.com redirector.gvt1.com".split(" "),Y7R={android:"ANDROID",
"android.k":"ANDROID_KIDS","android.m":"ANDROID_MUSIC","android.up":"ANDROID_UNPLUGGED",youtube:"WEB","youtube.m":"WEB_REMIX","youtube.up":"WEB_UNPLUGGED",ytios:"IOS","ytios.k":"IOS_KIDS","ytios.m":"IOS_MUSIC","ytios.up":"IOS_UNPLUGGED"},Zxf={desktop:"DESKTOP",phone:"MOBILE",tablet:"TABLET"},WBf={FLAG_AUTO_CAPTIONS_DEFAULT_ON:66,FLAG_AUTOPLAY_DISABLED:140,FLAG_AUTOPLAY_EXPLICITLY_SET:141},Jgh=class{constructor(Z){this.player=Z;this.U=this.V=1}sC(Z){this.player.tQ().tick(Z)}fetch(Z,k){if(!Z.match(/\[BISCOTTI_ID\]/g))return $Q(this,
Z,k);const N=this.V===1;N&&this.sC("a_bid_s");var a=IC0();if(a!==null)return N&&this.sC("a_bid_f"),$Q(this,Z,k,a);a=j9y();N&&g.zG(a,()=>{this.sC("a_bid_f")});
return a.then(T=>$Q(this,Z,k,T))}reset(){this.U=this.V=1}};var zga={bpR:"replaceUrlMacros",u_:"onAboutThisAdPopupClosed",YS:"executeCommand"};var NW0=class{constructor(Z){this.Za=Z}Z4(){return"adPingingEndpoint"}bu(Z,k,N){SNf(this.Za.get(),Z,k,N)}};var aEr=class{constructor(Z){this.S=Z}Z4(){return"changeEngagementPanelVisibilityAction"}bu(Z){g.A7(this.S,"changeEngagementPanelVisibility",{changeEngagementPanelVisibilityAction:Z})}};var TWb=class{constructor(Z){this.Za=Z}Z4(){return"loggingUrls"}bu(Z,k,N){for(const a of Z)SNf(this.Za.get(),a.baseUrl,k,N,a.attributionSrcMode)}};var Ucc=class extends g.jR{constructor(Z){super();this.V=Z;this.U=CxU(this)}};var muy=class{constructor(Z,k){this.cZ=Z;this.Gt=k}BA(Z,k){k={...k,cc:this.cZ.Z7()};this.cZ.S.U6(Z,k)}};var T6=class extends g.jR{constructor(Z,k,N,a,T){super();this.U=k;this.E6=N;this.XS=a;this.a4=T;this.listeners=[];const K=new i$(this);g.u(this,K);K.K(Z,"internalAbandon",this.D);this.addOnDisposeCallback(()=>{K.U()})}addListener(Z){this.listeners.push(Z)}removeListener(Z){this.listeners=this.listeners.filter(k=>k!==Z)}mL(Z,k,N,a,T,K,y,Q){if(Z==="")wm("Received empty content video CPN in DefaultContentPlaybackLifecycleApi");
else if(Z!==this.V||N){this.V=Z;this.E6.get().mL(Z,k,N,a,T,K,y,Q);this.XS.get().mL(Z,k,N,a,T,K,y,Q);this.a4?.get().mL(Z,k,N,a,T,K,y,Q);this.U.mL(Z,k,N,a,T,K,y,Q);for(const q of this.listeners)q.mL(Z,k,N,a,T,K,y,Q)}else wm("Duplicate content video loaded signal")}D(){this.V&&this.Sw(this.V)}Sw(Z){this.V=void 0;for(const k of this.listeners)k.Sw(Z)}};var KT=class{constructor(Z){this.S=Z;this.adVideoId=this.V=this.videoId=this.adCpn=this.contentCpn=null;this.L=!0;this.U=this.D=!1;this.adFormat=null;this.Y="AD_PLACEMENT_KIND_UNKNOWN";this.actionType="unknown_type";this.videoStreamType="VIDEO_STREAM_TYPE_VOD"}P3(Z,k,N,a,T){HxX(this);this.L=!k&&N===0;const K=this.S.getVideoData({playerType:1}),y=this.S.getVideoData({playerType:2});K&&(this.contentCpn=K.clientPlaybackNonce,this.videoId=K.videoId,this.V=K.Pq);y&&(this.adCpn=y.clientPlaybackNonce,this.adVideoId=
y.videoId,this.adFormat=y.adFormat);this.Y=Z;a<=0?(HxX(this),this.L=!k&&N===0):(this.actionType=this.L?k?"unknown_type":"video_to_ad":k?"ad_to_video":"ad_to_ad",this.videoStreamType=T?"VIDEO_STREAM_TYPE_LIVE":"VIDEO_STREAM_TYPE_VOD",this.actionType!=="unknown_type"&&(this.D=!0,vX("_start",this.actionType)&&AzG(this)))}reset(){return new KT(this.S)}};var yP=class extends g.jR{constructor(Z){super();this.S=Z;this.V=new Map;this.U=new i$(this);g.u(this,this.U);this.U.K(this.S,g.te("ad"),this.onCueRangeEnter,this);this.U.K(this.S,g.he("ad"),this.onCueRangeExit,this)}addCueRange(Z,k,N,a,T,K=3,y=1,Q,q){this.V.has(Z)?wm("Tried to register duplicate cue range",void 0,void 0,{CueRangeID:Z}):(Z=new bgF(Z,k,N,a,K,Q,q),this.V.set(Z.id,{hd:Z,listener:T,uy:y}),this.S.f8([Z],y))}removeCueRange(Z){const k=this.V.get(Z);k?(this.S.h$([k.hd],k.uy),this.V.delete(k.hd.id)):
wm("Requested to remove unknown cue range",void 0,void 0,{CueRangeID:Z})}onCueRangeEnter(Z){if(this.V.has(Z.id))this.V.get(Z.id).listener.onCueRangeEnter(Z.id)}onCueRangeExit(Z){if(this.V.has(Z.id))this.V.get(Z.id).listener.onCueRangeExit(Z.id)}},bgF=class extends g.pe{constructor(Z,k,N,a,T,K,y){super(k,N,{id:Z,namespace:"ad",priority:T,visible:a,associatedClipId:K,markerPositionMs:y})}};var QP=class{constructor(Z){this.S=Z}addPlayerResponseForAssociation(Z){this.S.addPlayerResponseForAssociation(Z)}};var qb=class{constructor(Z){this.S=Z}Ws(Z){this.S.Ws(Z)}};var rD=class{constructor(Z){this.S=Z}};var o_=null,usG=class extends g.n9{constructor(){super();this.V={};this.addOnDisposeCallback(()=>{for(const Z of Object.keys(this.V))delete this.V[Z]})}Kw(Z){return this.V.hasOwnProperty(Z)?this.V[Z].Kw():{}}};
g.X0("ytads.bulleit.getVideoMetadata",function(Z){return JX().Kw(Z)});
g.X0("ytads.bulleit.triggerExternalActivityEvent",function(Z,k,N){var a=JX();N=h2G(N);N!==null&&a.publish(N,{queryId:Z,viewabilityString:k})});var CT=class{constructor(Z,k,N){this.E6=Z;this.S=k;this.Gt=N;this.U=new Set;this.V=new Map;JX().subscribe("adactiveviewmeasurable",this.A7,this);JX().subscribe("adfullyviewableaudiblehalfdurationimpression",this.W8,this);JX().subscribe("adviewableimpression",this.N9,this);JX().subscribe("adaudioaudible",this.m8,this);JX().subscribe("adaudiomeasurable",this.IT,this)}nN(Z,k){if(!this.V.has(Z))return{};if(k==="seek")return(Z=Xr(Sc).N(Z,{}))&&fH(Z),{};k=BWf(k);if(k===null)return{};var N=this.S.KI();if(!N)return{};
const a=this.S.getPresentingPlayerType(!0);if(!this.S.getVideoData({playerType:a})?.isAd())return{};N={opt_adElement:N,opt_fullscreen:this.E6.get().isFullscreen()};return oA(k,Z,N)}j(Z,k,N,a,T){this.V.has(Z)&&(a<=0||T<=0||Xr(Sc).j(Z,k,N,a,T))}A7({queryId:Z}){this.V.get(Z)?.A7()}W8({queryId:Z}){this.V.get(Z)?.W8()}N9({queryId:Z}){this.V.get(Z)?.N9()}m8({queryId:Z}){this.V.get(Z)?.m8()}IT({queryId:Z}){this.V.get(Z)?.IT()}};var psH=class{send(Z,k,N,a=!1){try{xuR(this,Z,k,N,a)}catch(T){}}};var Rgi=class extends psH{constructor(Z,k,N,a,T){super();this.Y=Z;this.L=k;this.V=N;this.U=a;this.D=T}};var Mei=class{constructor(Z,k){this.V=Z;this.Gt=k}send(Z,k,N,a){let T=!1;try{if(a==="ATTRIBUTION_SRC_MODE_LABEL_CHROME"||a==="ATTRIBUTION_SRC_MODE_XHR_OPTION")T=!0,Z=yii(Z);a=T;var K=g.YS(Z);if(K[1]==="https")var y=Z;else K[1]="https",y=Wi("https",K[2],K[3],K[4],K[5],K[6],K[7]);const Q=F1r(y);K=[];const q=Lb(y)&&this.Gt.get().S.X().experiments.yz("add_auth_headers_to_remarketing_google_dot_com_ping");if(XS(y)||q)K.push({headerType:"USER_AUTH"}),K.push({headerType:"PLUS_PAGE_ID"}),K.push({headerType:"VISITOR_ID"}),
K.push({headerType:"EOM_VISITOR_ID"}),K.push({headerType:"AUTH_USER"}),K.push({headerType:"DATASYNC_ID"});this.V.send({baseUrl:y,scrubReferrer:Q,headers:K},k,N,a)}catch(Q){}}};var mA=class{constructor(Z,k,N,a,T,K,y=new Rgi(()=>{const Q=Z.X(),q=Z.getVideoData({playerType:1});return g.GC(Q,q?q.G():"")},()=>Z.X().pageId,()=>Z.X().xW,()=>Z.X().datasyncId??"",()=>Z.X().experiments)){this.S=Z;
this.U=k;this.Qi=N;this.XS=a;this.sH=T;this.Gt=K;this.Y=y;this.Tu=null;this.V=new Map;this.D=new Mei(y,this.Gt)}UQ(){return this.S.UQ(1)}};var s4=class extends g.jR{constructor(Z,k,N){super();this.S=Z;this.iy=k;this.Gt=N;this.listeners=[];this.Qb=null;this.Fj=new Map;k=new g.tt(this);g.u(this,k);k.K(Z,"videodatachange",this.P5);F1(Z.X().Yl())?k.K(Z,"playbackChange",this.Dk):k.K(Z,"serverstitchedvideochange",this.F3);this.mK=N9(this)}getAccumulatedWatchTime(){return this.S.getInternalApi().getAccumulatedWatchTime()}Z7(){return this.S.getVideoData({playerType:1}).clientPlaybackNonce}addListener(Z){this.listeners.push(Z)}removeListener(Z){this.listeners=
this.listeners.filter(k=>k!==Z)}mL(){this.Fj.clear();
this.Qb=null;this.iy.get().clear()}Sw(){}P5(Z,k,N){k.videoId==="nPpU29QrbiU"&&this.S.U6("ads_ssm_vdc_s",{pt:N,dvt:Z});y5(this.Gt.get())&&Z!=="dataloaded"||I_(this,k,N)}Dk(Z){if(this.S.getVideoData({playerType:1}).enableServerStitchedDai)for(const k of Z.started){Z=this.S.getStartTime({cpn:k.cpn});const N=this.S.getVideoData({cpn:k.cpn}),a=this.S.getPlayerType(k.cpn);let T=null;a===2&&(this.Qb=k.cpn,Z===void 0?wm("Expected ad video start time on SS video changed"):this.Fj.set(k.cpn,Z),T=fw(this.iy.get(),
k.cpn));this.S.getVideoData({playerType:1}).U6("ads_ssvc",{pt:a,cpn:N?.clientPlaybackNonce,crtt:this.S.getCurrentTime({playerType:a,OP:!1}),atlh:this.S.isAtLiveHead(),adstt:Z,pid:k.cpn,slid:T?.layoutId});N&&a?I_(this,N,a):wm("Expected video data on server stitched video changed",void 0,void 0,{cpn:this.S.getVideoData({playerType:1}).clientPlaybackNonce,timelinePlaybackId:k.cpn})}}F3(Z,k){Z!==void 0&&(this.Qb=Z,k===void 0||isNaN(k)?wm("Expected ad video start time on SS video changed"):this.Fj.set(Z,
k));const N=this.S.getPresentingPlayerType(!0),a=this.S.getVideoData({playerType:N}),T=Z===void 0?null:fw(this.iy.get(),Z);this.S.getVideoData({playerType:1}).U6("ads_ssvc",{pt:N,cpn:a?.clientPlaybackNonce,crtt:this.S.getCurrentTime({playerType:1,OP:!1}),atlh:this.S.isAtLiveHead(),adstt:k,pid:Z,slid:T?.layoutId});a?I_(this,a,N):wm("Expected video data on server stitched video changed",void 0,void 0,{cpn:this.S.getVideoData({playerType:1}).clientPlaybackNonce,timelinePlaybackId:Z})}jB(Z,k){const N=
Z.author,a=Z.clientPlaybackNonce,T=Z.isListed;var K=Z.tI;const y=Z.title,Q=Z.fX,q=Z.sx,r=Z.isMdxPlayback,C=Z.ZT,m=Z.mdxEnvironment,A=Z.isAutonav,P=Z.RV,d=Z.Ix,h=Z.Z9,B=Z.videoId||"",v=Z.profilePicture||"",O=Z.WZ||"",x=Z.rQ()||!1,e=Z.qW()||!1;Z=Z.lL||void 0;K=fw(this.iy.get(),K)||{layoutId:null,slotId:null};var Ki=this.S.getVideoData({playerType:1});const yf=Ki.Rn();Ki=Ki.getPlayerResponse();k=1E3*this.S.getDuration({playerType:k});const Jy=1E3*this.S.getDuration({playerType:1});return{...K,videoId:B,
author:N,clientPlaybackNonce:a,D$:k,td:Jy,daiEnabled:Ki?.playerConfig?.daiConfig?.enableDai||!1,T4:Ki?.playerConfig?.daiConfig?.enablePreroll||!1,isListed:T,Rn:yf,profilePicture:v,title:y,WZ:O,fX:Q,sx:q,lL:Z,isMdxPlayback:r,ZT:C,mdxEnvironment:m,isAutonav:A,RV:P,Ix:d,Z9:h,rQ:x,qW:e}}YW(){this.listeners.length=0;this.mK=null;super.YW()}};var Ar=class extends g.jR{constructor(Z,k){super();this.S=Z;this.XS=k;this.listeners=[];this.Fc=[];this.Z8=()=>{wm("Called 'doUnlockPreroll' before it's initialized.")};
k=new i$(this);const N=new g.tt(this);g.u(this,N);g.u(this,k);k.K(Z,"progresssync",this.U);k.K(Z,"presentingplayerstatechange",this.V);k.K(Z,"fullscreentoggled",this.onFullscreenToggled);k.K(Z,"onVolumeChange",this.onVolumeChange);k.K(Z,"minimized",this.D1);k.K(Z,"overlayvisibilitychange",this.Pi);k.K(Z,"shortsadswipe",this.Zc);k.K(Z,"resize",this.qx);N.K(Z,g.te("appad"),this.Rb)}mL(){this.Z8=tI(()=>{this.S.jm()||this.S.GP("ad",1)})}Sw(){}addListener(Z){this.listeners.push(Z)}removeListener(Z){this.listeners=
this.listeners.filter(k=>k!==Z)}MI(){}playVideo(){this.S.playVideo()}pauseVideo(){this.S.pauseVideo()}resumeVideo(Z){this.Uh(Z)&&this.S.playVideo()}Uh(Z){return this.S.getPlayerState(Z)===2}getCurrentTimeSec(Z,k){const N=this.XS.get().Qb;
return Z!==2||k||N===null?this.S.getCurrentTime({playerType:Z,OP:k}):Zh(this,N)}getVolume(){return this.S.getVolume()}isMuted(){return this.S.isMuted()}getPresentingPlayerType(){return this.S.getPresentingPlayerType(!0)}getPlayerState(Z){return this.S.getPlayerState(Z)}getGetAdBreakContext(){return this.S.getGetAdBreakContext()}isFullscreen(){return this.S.isFullscreen()}isAtLiveHead(){return this.S.isAtLiveHead()}wk(Z){this.S.wk(Z)}U(){const Z=this.S.getPresentingPlayerType(!0),k=this.getCurrentTimeSec(Z,
!1);if(Z===2)for(const N of this.listeners)N.XE(k);else if(Z===1)for(const N of this.Fc)N.MI(k)}V(Z){for(const k of this.listeners)k.yV(Z,this.getPresentingPlayerType())}onFullscreenToggled(Z){for(const k of this.listeners)k.onFullscreenToggled(Z)}onVolumeChange(){for(const Z of this.listeners)Z.onVolumeChange()}D1(){const Z=this.S.isMinimized();for(const k of this.listeners)k.D1(Z)}Pi(Z){for(const k of this.listeners)k.Pi(Z)}qx(){const Z=this.S.fF().SL();for(const k of this.listeners)k.Bi(Z)}Rb(Z){for(const k of this.listeners)k.Rb(Z)}Zc(){for(const Z of this.listeners)Z.Zc()}};var KVf=class extends g.jR{constructor(Z,k,N,a){super();const T=n(()=>new Im(this.Gt));
g.u(this,T);const K=n(()=>new jE(T));
g.u(this,K);const y=n(()=>new SE);
g.u(this,y);const Q=n(()=>new xt(Z));
g.u(this,Q);const q=n(()=>new Ek(T,K,this.Gt));
g.u(this,q);const r=n(()=>new Wh);
g.u(this,r);this.tp=n(()=>new m7(a));
g.u(this,this.tp);this.Zf=n(()=>new KT(k));
g.u(this,this.Zf);this.JW=n(()=>new yP(k));
g.u(this,this.JW);this.s3=n(()=>new QP(k));
g.u(this,this.s3);this.fC=n(()=>new qb(k));
g.u(this,this.fC);this.Gt=n(()=>new rD(k));
g.u(this,this.Gt);const C=n(()=>new Cy(this.Gt));
g.u(this,C);const m=n(()=>new Ok(T,q,K,this.Gt,C,null,null,null,null));
g.u(this,m);this.XS=n(()=>new s4(k,r,this.Gt));
g.u(this,this.XS);const {sH:A,context:P}=xQ({XS:this.XS,Gt:this.Gt,k8:C});this.sH=A;this.E6=n(()=>new Ar(k,this.XS));
g.u(this,this.E6);this.Qi=n(()=>new CT(this.E6,k,this.Gt));
g.u(this,this.Qi);this.Za=n(()=>new mA(k,y,this.Qi,this.XS,this.sH,this.Gt));
g.u(this,this.Za);this.Fl=new wa(Q,m,N,Z,this.XS,this.E6,this.Zf);g.u(this,this.Fl);const d=new T6(k,this.Fl,this.E6,this.XS);this.S8=n(()=>d);
this.h7=d;this.j8=new Gu(Q,q,this.JW,this.S8,P);g.u(this,this.j8);this.Gi=new Bh(this.Gt,Q,m,this.XS,this.j8,N,this.s3);g.u(this,this.Gi);this.GQ={lM:new Map,Rj:new Map,jw:new Map,wF:new Map,qN:new Map};this.listeners=[];this.XR={Gi:this.Gi,t$:this.Gt.get(),Iq:this.tp.get(),GD:this.E6.get(),Fl:this.Fl,oT:T.get(),hX:null,L5:{oh(){}},BZ:y.get(),cZ:this.XS.get()}}};var nKF=class extends g.jR{constructor(Z){super();this.DM=Z;this.DM.get().addListener(this)}YW(){this.DM.jm()||this.DM.get().removeListener(this);super.YW()}};var PN=class{constructor(Z){this.V=Z}fetch(Z){const {UY:k,yW:N,eq:a,cueProcessedMs:T=0}=Z;return this.V.fetch(k,{eq:a,hd:N,cueProcessedMs:T}).then(K=>R2r(K,N))}};var cN=class extends g.jR{constructor(Z){super();this.S=Z;this.listeners=[];this.V=new i$(this);g.u(this,this.V);this.V.K(this.S,"aduxclicked",this.onAdUxClicked);this.V.K(this.S,"aduxmouseover",this.Zb);this.V.K(this.S,"aduxmouseout",this.j4);this.V.K(this.S,"muteadaccepted",this.U)}addListener(Z){this.listeners.push(Z)}removeListener(Z){this.listeners=this.listeners.filter(k=>k!==Z)}wy(Z){n$U(this,Z,1)}onAdUxClicked(Z,k){kj(this,N=>{N.Os(Z,k)})}Zb(Z){kj(this,k=>{k.zn(Z)})}j4(Z){kj(this,k=>{k.pL(Z)})}U(Z){kj(this,
k=>{k.gS(Z)})}};var IlH=class{constructor(Z,k=!1){this.U=Z;this.D=k;this.V={}}reduce(Z){switch(Z.event){case "unknown":return}var k=Z.identifier;var N=this.V[k];N?k=N:(N={Hr:null,e1:-Infinity},k=this.V[k]=N);N=Z.startSecs+Z.V/1E3;if(!(N<k.e1))if(k.e1=N,k.Hr){if(N<k.Hr.end){a:{N=k.Hr;switch(Z.event){case "start":case "continue":case "stop":break;default:Z=null;break a}Z=N.start+Z.Xl;Z=N.end<=Z?null:Z}if(Z!==null){k.Hr.end=Z;k=this.U;g.lT(k.D.V,Z*1E3);for(var a of k.listeners)a.cn(Z)}}}else if(a=IEU(Z,this.D))Z=a.rX,
k.Hr=a.IF,jKj(this.U,Z)}updateTime(){}};var jk_=class{constructor(){this.V=[]}};var HN=class extends g.jR{constructor(Z,k,N){super();this.S=Z;this.Gt=k;this.Za=N;this.listeners=[];this.Y=!1;this.kO=[];this.V=null;this.L=new IlH(this,FPy(k.get()));this.D=new jk_;this.U=null}mL(){this.L=new IlH(this,FPy(this.Gt.get()));this.D=new jk_;const Z=this.S.getVideoData({playerType:1});if(!Z.enableServerStitchedDai){var k=this.S.getVideoData({playerType:1});this.U?.clientPlaybackNonce!==k.clientPlaybackNonce&&(this.U!=null&&this.U.unsubscribe("cuepointupdated",this.G,this),k.subscribe("cuepointupdated",
this.G,this),this.U=k)}this.kO.length=0;k=Z.V?.MX(0)||[];for(const N of k)this.FP(N)&&(qB(this.Gt.get())&&g7(this.Za.get(),"ocvl",`cpi.${N.identifier};cpe.${N.event};cps.${N.startSecs}`),wm("Unexpected a GetAdBreak to go out without player waiting",void 0,void 0,{cuePointId:N.identifier,cuePointEvent:N.event,contentCpn:Z.clientPlaybackNonce}))}Sw(){}addListener(Z){this.listeners.push(Z)}removeListener(Z){this.listeners=this.listeners.filter(k=>k!==Z)}FP(Z){WPy(this,Z);
if(this.Gt.get().S.X().B("html5_lifa_move_gab_on_continue_or_stop_restriction")&&this.S.getVideoData({playerType:1})?.qW()&&(Z.event==="continue"||Z.event==="stop")||tnX(this.Gt.get())&&this.S.getCurrentTime({playerType:1})===0&&this.S.getVideoData({playerType:1}).qW())return!1;this.L.reduce(Z);Z=this.Y;this.Y=!1;return Z}G(Z){const k=this.S.getVideoData({playerType:1}).isDaiEnabled();if(k||!g.KA(this.S.X()))for(const N of Z)WPy(this,N),qB(this.Gt.get())&&this.S.getCurrentTime({playerType:1})===0&&
N.event==="start"&&g7(this.Za.get(),"ocuz",`cpi.${N.identifier};cpe.${N.event};cps.${N.startSecs};cpd.${N.Xl}`),k?tnX(this.Gt.get())&&this.S.getCurrentTime({playerType:1})===0&&this.S.getVideoData({playerType:1}).qW()||this.L.reduce(N):this.S.getCurrentTime({playerType:1})!==0&&N.event==="start"&&(this.Gt.get().S.X().experiments.yz("ignore_overlapping_cue_points_on_endemic_live_html5")&&(this.V==null||this.Gt.get().S.X().experiments.yz("enable_only_drop_overlapping_cuepoints_with_same_identifier")&&
this.V.identifier!==N.identifier?0:N.startSecs+N.Xl>=this.V.startSecs&&N.startSecs<=this.V.startSecs+this.V.Xl)?(qB(this.Gt.get())&&N.identifier!==this.V?.identifier&&g7(this.Za.get(),"ocud",`ccpi.${N.identifier};ccpe.${N.event};ccps.${N.startSecs};
               ccpd.${N.Xl};pcpi.${this.V?.identifier};pcpe.${this.V?.event};
               pcps.${this.V?.startSecs};pcpd.${this.V?.Xl};`),N.identifier!==this.V?.identifier&&wm("Latest Endemic Live Web cue point overlaps with previous cue point")):(this.V=N,jKj(this,N)))}YW(){this.U!=null&&(this.U.unsubscribe("cuepointupdated",this.G,this),this.U=null);this.listeners.length=0;this.kO.length=0;super.YW()}};var dD=class{constructor(Z){this.S=Z}};var X8=class{constructor(Z){this.S=Z}eT(Z,k,N,a,T,K,y,Q){return this.S.eT(Z,k,N,a,T,K,y,Q!==void 0?{gE:Q}:void 0)}Ci(Z,k){this.S.Ci(Z,k)}pj(Z,k,N){this.S.pj(Z,k,N)}vl(Z){this.S.vl({gE:Z})}CY(Z,k,N,a,T,K,y,Q){this.S.CY(Z,k,N,a,T,K,y,Q!==void 0?{gE:Q}:void 0)}BV(Z){return this.S.BV(Z)}finishSegmentByCpn(Z,k,N){N=YNy(N);this.S.finishSegmentByCpn(Z,k,N)}};var LT=class extends g.jR{constructor(){super(...arguments);this.uS=new Map}};var EKn=class{constructor(Z){this.S=Z}};var ZX0=class extends g.jR{constructor(Z,k,N,a,T){super();const K=n(()=>new Im(this.Gt));
g.u(this,K);const y=n(()=>new jE(K));
g.u(this,y);const Q=n(()=>new SE);
g.u(this,Q);const q=n(()=>new xt(Z));
g.u(this,q);const r=n(()=>new Ek(K,y,this.Gt));
g.u(this,r);const C=n(()=>new Wh);
g.u(this,C);this.Le=n(()=>new cN(k));
g.u(this,this.Le);this.tp=n(()=>new m7(T));
g.u(this,this.tp);this.Zf=n(()=>new KT(k));
g.u(this,this.Zf);this.JW=n(()=>new yP(k));
g.u(this,this.JW);this.s3=n(()=>new QP(k));
g.u(this,this.s3);this.fC=n(()=>new qb(k));
g.u(this,this.fC);this.Gt=n(()=>new rD(k));
g.u(this,this.Gt);const m=n(()=>new PN(a));
g.u(this,m);const A=n(()=>new Cy(this.Gt));
g.u(this,A);this.Rx=n(()=>new dD(k));
g.u(this,this.Rx);this.DM=n(()=>new vxf);
g.u(this,this.DM);this.XS=n(()=>new s4(k,C,this.Gt));
g.u(this,this.XS);const {sH:P,context:d}=xQ({XS:this.XS,Gt:this.Gt,k8:A});this.sH=P;this.a4=n(()=>new HN(k,this.Gt,this.Za));
g.u(this,this.a4);this.wD=n(()=>new X8(k));
g.u(this,this.wD);this.E6=n(()=>new Ar(k,this.XS));
g.u(this,this.E6);this.dn=n(()=>new LT);
g.u(this,this.dn);const h=n(()=>new Ok(K,r,y,this.Gt,A,"SLOT_TYPE_ABOVE_FEED",this.E6,this.Bd,this.r_));
g.u(this,h);this.ub=n(()=>new sk(this.Gt));
this.Qi=n(()=>new CT(this.E6,k,this.Gt));
g.u(this,this.Qi);this.Za=n(()=>new mA(k,Q,this.Qi,this.XS,this.sH,this.Gt));
g.u(this,this.Za);this.MY=new i7(Cw,(v,O,x,e)=>tC(y.get(),v,O,x,e),q,r,y,A,this.Gt,this.XS);
g.u(this,this.MY);this.Fl=new wa(q,h,N,Z,this.XS,this.E6,this.Zf);g.u(this,this.Fl);const B=new T6(k,this.Fl,this.E6,this.XS,this.a4);this.S8=n(()=>B);
this.h7=B;this.Bd=new vh(q,r,this.S8,this.a4,this.E6,this.Gt,this.Za,this.wD);g.u(this,this.Bd);this.j8=new Gu(q,r,this.JW,this.S8,d);g.u(this,this.j8);this.Gi=new Bh(this.Gt,q,h,this.XS,this.j8,N,this.s3);g.u(this,this.Gi);this.VI=n(()=>new At(m,y,A,this.Gt,this.Za,this.E6,this.wD));
g.u(this,this.VI);this.J1=n(()=>new Ph);
g.u(this,this.J1);this.yT=new Jt(Z,this.Le,this.Gt);g.u(this,this.yT);this.TZ=new zu(Z);g.u(this,this.TZ);this.rG=new azy(Z);g.u(this,this.rG);this.Hd=new Uk(Z,this.S8,d);g.u(this,this.Hd);this.Ia=new b7(Z,this.JW,this.E6,this.XS);g.u(this,this.Ia);this.ip=new TZf(Z,this.XS);g.u(this,this.ip);this.r_=new Mf(Z,this.a4,this.E6,this.Za,this.S8,this.Bd);g.u(this,this.r_);this.f3=new py(Z);g.u(this,this.f3);this.Ra=new ny;g.u(this,this.Ra);this.Cm=new Rm(Z);g.u(this,this.Cm);this.QK=new KRy(Z);g.u(this,
this.QK);this.Ra=new ny;g.u(this,this.Ra);this.zc=n(()=>new eE);
g.u(this,this.zc);this.QI=n(()=>new om(this.E6));
g.u(this,this.QI);this.Tm=n(()=>new qx0(this.Le,this.Za,Z,Q,this.Qi));
g.u(this,this.Tm);this.fm=n(()=>new XF(this.Gi,q,K));
g.u(this,this.fm);this.Lm=n(()=>new Ly(this.Gt,this.Za,this.f3,this.Qi));
g.u(this,this.Lm);this.i7=n(()=>new G9r(Z,this.Ra,this.f3,this.XS,this.wD,this.E6,this.dn,this.Za,C,this.a4,this.Qi,this.ub,this.s3,this.JW,this.Zf,this.fC,this.tp,this.Rx,this.Gt,Q,d));
g.u(this,this.i7);this.Et=n(()=>new HFy(this.E6,this.Za,this.tp,this.Gt,this.Qi,this.XS));
g.u(this,this.Et);this.wZ=n(()=>new p_X(this.Le,this.E6,this.Za,Q,this.Qi,this.rG,this.QK,this.tp,this.Gt,N));
g.u(this,this.wZ);this.fk=n(()=>new r9G(this.Le,this.Za,Q));
g.u(this,this.fk);this.UA=new nKF(this.DM);g.u(this,this.UA);this.GQ={lM:new Map([["OPPORTUNITY_TYPE_AD_BREAK_SERVICE_RESPONSE_RECEIVED",this.Gi],["OPPORTUNITY_TYPE_LIVE_STREAM_BREAK_SIGNAL",this.Bd],["OPPORTUNITY_TYPE_PLAYER_BYTES_MEDIA_LAYOUT_ENTERED",this.MY],["OPPORTUNITY_TYPE_PLAYER_RESPONSE_RECEIVED",this.Fl],["OPPORTUNITY_TYPE_THROTTLED_AD_BREAK_REQUEST_SLOT_REENTRY",this.j8]]),Rj:new Map([["SLOT_TYPE_AD_BREAK_REQUEST",this.VI],["SLOT_TYPE_ABOVE_FEED",this.J1],["SLOT_TYPE_FORECASTING",this.J1],
["SLOT_TYPE_IN_PLAYER",this.J1],["SLOT_TYPE_PLAYER_BYTES",this.J1],["SLOT_TYPE_PLAYER_UNDERLAY",this.J1],["SLOT_TYPE_PLAYBACK_TRACKING",this.J1],["SLOT_TYPE_PLAYER_BYTES_SEQUENCE_ITEM",this.J1]]),jw:new Map([["TRIGGER_TYPE_SKIP_REQUESTED",this.yT],["TRIGGER_TYPE_SURVEY_SUBMITTED",this.yT],["TRIGGER_TYPE_LAYOUT_ID_ENTERED",this.TZ],["TRIGGER_TYPE_LAYOUT_ID_EXITED",this.TZ],["TRIGGER_TYPE_LAYOUT_EXITED_FOR_REASON",this.TZ],["TRIGGER_TYPE_ON_DIFFERENT_LAYOUT_ID_ENTERED",this.TZ],["TRIGGER_TYPE_SLOT_ID_ENTERED",
this.TZ],["TRIGGER_TYPE_SLOT_ID_EXITED",this.TZ],["TRIGGER_TYPE_SLOT_ID_FULFILLED_EMPTY",this.TZ],["TRIGGER_TYPE_SLOT_ID_FULFILLED_NON_EMPTY",this.TZ],["TRIGGER_TYPE_SLOT_ID_SCHEDULED",this.TZ],["TRIGGER_TYPE_SLOT_ID_UNSCHEDULED",this.TZ],["TRIGGER_TYPE_ON_DIFFERENT_SLOT_ID_ENTER_REQUESTED",this.TZ],["TRIGGER_TYPE_CLOSE_REQUESTED",this.rG],["TRIGGER_TYPE_BEFORE_CONTENT_VIDEO_ID_STARTED",this.Hd],["TRIGGER_TYPE_PROGRESS_PAST_MEDIA_TIME_WITH_OFFSET_RELATIVE_TO_LAYOUT_ENTER",this.Ia],["TRIGGER_TYPE_SEEK_FORWARD_PAST_MEDIA_TIME_WITH_OFFSET_RELATIVE_TO_LAYOUT_ENTER",
this.Ia],["TRIGGER_TYPE_SEEK_BACKWARD_BEFORE_LAYOUT_ENTER_TIME",this.Ia],["TRIGGER_TYPE_CONTENT_VIDEO_ID_ENDED",this.Ia],["TRIGGER_TYPE_MEDIA_TIME_RANGE",this.Ia],["TRIGGER_TYPE_MEDIA_TIME_RANGE_ALLOW_REACTIVATION_ON_USER_CANCELLED",this.Ia],["TRIGGER_TYPE_NOT_IN_MEDIA_TIME_RANGE",this.Ia],["TRIGGER_TYPE_LIVE_STREAM_BREAK_STARTED",this.ip],["TRIGGER_TYPE_LIVE_STREAM_BREAK_ENDED",this.ip],["TRIGGER_TYPE_ON_LAYOUT_SELF_EXIT_REQUESTED",this.f3],["TRIGGER_TYPE_ON_NEW_PLAYBACK_AFTER_CONTENT_VIDEO_ID",
this.Hd],["TRIGGER_TYPE_ON_OPPORTUNITY_TYPE_RECEIVED",this.Cm],["TRIGGER_TYPE_TIME_RELATIVE_TO_LAYOUT_ENTER",this.QK],["TRIGGER_TYPE_AD_BREAK_STARTED",this.Ra],["TRIGGER_TYPE_LIVE_STREAM_BREAK_SCHEDULED_DURATION_MATCHED",this.r_],["TRIGGER_TYPE_LIVE_STREAM_BREAK_SCHEDULED_DURATION_NOT_MATCHED",this.r_],["TRIGGER_TYPE_NEW_SLOT_SCHEDULED_WITH_BREAK_DURATION",this.r_],["TRIGGER_TYPE_PREFETCH_CACHE_EXPIRED",this.r_],["TRIGGER_TYPE_CUE_BREAK_IDENTIFIED",this.r_]]),wF:new Map([["SLOT_TYPE_ABOVE_FEED",this.zc],
["SLOT_TYPE_AD_BREAK_REQUEST",this.zc],["SLOT_TYPE_FORECASTING",this.zc],["SLOT_TYPE_IN_PLAYER",this.zc],["SLOT_TYPE_PLAYER_BYTES",this.QI],["SLOT_TYPE_PLAYER_UNDERLAY",this.zc],["SLOT_TYPE_PLAYBACK_TRACKING",this.zc],["SLOT_TYPE_PLAYER_BYTES_SEQUENCE_ITEM",this.zc]]),qN:new Map([["SLOT_TYPE_ABOVE_FEED",this.Tm],["SLOT_TYPE_AD_BREAK_REQUEST",this.fm],["SLOT_TYPE_FORECASTING",this.Lm],["SLOT_TYPE_PLAYER_BYTES",this.i7],["SLOT_TYPE_PLAYBACK_TRACKING",this.Et],["SLOT_TYPE_PLAYER_BYTES_SEQUENCE_ITEM",
this.Et],["SLOT_TYPE_IN_PLAYER",this.wZ],["SLOT_TYPE_PLAYER_UNDERLAY",this.fk]])};this.listeners=[Q.get()];this.XR={Gi:this.Gi,t$:this.Gt.get(),Iq:this.tp.get(),GD:this.E6.get(),Fl:this.Fl,oT:K.get(),hX:this.DM.get(),L5:this.yT,BZ:Q.get(),cZ:this.XS.get()}}};var kB0=class extends g.jR{constructor(Z,k,N,a,T){super();const K=n(()=>new Im(this.Gt));
g.u(this,K);const y=n(()=>new jE(K));
g.u(this,y);const Q=n(()=>new SE);
g.u(this,Q);const q=n(()=>new xt(Z));
g.u(this,q);const r=n(()=>new Ek(K,y,this.Gt));
g.u(this,r);const C=n(()=>new Wh);
g.u(this,C);this.Le=n(()=>new cN(k));
g.u(this,this.Le);this.tp=n(()=>new m7(T));
g.u(this,this.tp);this.Zf=n(()=>new KT(k));
g.u(this,this.Zf);this.JW=n(()=>new yP(k));
g.u(this,this.JW);this.s3=n(()=>new QP(k));
g.u(this,this.s3);this.fC=n(()=>new qb(k));
g.u(this,this.fC);this.Gt=n(()=>new rD(k));
g.u(this,this.Gt);const m=n(()=>new PN(a));
g.u(this,m);const A=n(()=>new Cy(this.Gt));
g.u(this,A);const P=n(()=>new Ok(K,r,y,this.Gt,A,null,null,this.Bd,this.r_));
g.u(this,P);this.Rx=n(()=>new dD(k));
g.u(this,this.Rx);this.DM=n(()=>new vxf);
g.u(this,this.DM);this.XS=n(()=>new s4(k,C,this.Gt));
g.u(this,this.XS);const {sH:d,context:h}=xQ({XS:this.XS,Gt:this.Gt,k8:A});this.sH=d;this.a4=n(()=>new HN(k,this.Gt,this.Za));
this.E6=n(()=>new Ar(k,this.XS));
g.u(this,this.E6);this.dn=n(()=>new LT);
g.u(this,this.dn);this.Qi=n(()=>new CT(this.E6,k,this.Gt));
g.u(this,this.Qi);this.Za=n(()=>new mA(k,Q,this.Qi,this.XS,this.sH,this.Gt));
g.u(this,this.Za);this.ub=n(()=>new sk(this.Gt));
g.u(this,this.ub);this.MY=new i7(Cw,(v,O,x,e)=>tC(y.get(),v,O,x,e),q,r,y,A,this.Gt,this.XS);
g.u(this,this.MY);this.Fl=new wa(q,P,N,Z,this.XS,this.E6,this.Zf);g.u(this,this.Fl);const B=new T6(k,this.Fl,this.E6,this.XS,this.a4);this.S8=n(()=>B);
this.h7=B;this.Bd=new vh(q,r,this.S8,this.a4,this.E6,this.Gt,this.Za);g.u(this,this.Bd);this.j8=new Gu(q,r,this.JW,this.S8,h);g.u(this,this.j8);this.Gi=new Bh(this.Gt,q,P,this.XS,this.j8,N,this.s3);g.u(this,this.Gi);this.VI=n(()=>new At(m,y,A,this.Gt,this.Za,this.E6));
g.u(this,this.VI);this.J1=n(()=>new Ph);
g.u(this,this.J1);this.yT=new Jt(Z,this.Le,this.Gt);g.u(this,this.yT);this.TZ=new zu(Z);g.u(this,this.TZ);this.rG=new azy(Z);g.u(this,this.rG);this.Hd=new Uk(Z,this.S8,h);g.u(this,this.Hd);this.Ia=new b7(Z,this.JW,this.E6,this.XS);g.u(this,this.Ia);this.f3=new py(Z);g.u(this,this.f3);this.Cm=new Rm(Z);g.u(this,this.Cm);this.QK=new KRy(Z);g.u(this,this.QK);this.wD=n(()=>new X8(k));
g.u(this,this.wD);this.Ra=new ny;g.u(this,this.Ra);this.r_=new Mf(Z,this.a4,this.E6,this.Za,this.S8,this.Bd);g.u(this,this.r_);this.zc=n(()=>new eE);
g.u(this,this.zc);this.QI=n(()=>new om(this.E6));
g.u(this,this.QI);this.fm=n(()=>new XF(this.Gi,q,K));
g.u(this,this.fm);this.Lm=n(()=>new Ly(this.Gt,this.Za,this.f3,this.Qi));
g.u(this,this.Lm);this.wZ=n(()=>new Rqb(this.Le,this.E6,this.Za,Q,this.Qi,this.rG,this.QK,this.tp,this.Gt,N));
g.u(this,this.wZ);this.i7=n(()=>new l7(Z,this.Ra,this.f3,this.Za,this.Qi,this.ub,this.s3,this.XS,this.E6,this.dn,this.JW,this.Zf,this.fC,this.tp,this.Rx,this.Gt,this.wD,h));
g.u(this,this.i7);this.UA=new nKF(this.DM);g.u(this,this.UA);this.GQ={lM:new Map([["OPPORTUNITY_TYPE_AD_BREAK_SERVICE_RESPONSE_RECEIVED",this.Gi],["OPPORTUNITY_TYPE_LIVE_STREAM_BREAK_SIGNAL",this.Bd],["OPPORTUNITY_TYPE_PLAYER_BYTES_MEDIA_LAYOUT_ENTERED",this.MY],["OPPORTUNITY_TYPE_PLAYER_RESPONSE_RECEIVED",this.Fl],["OPPORTUNITY_TYPE_THROTTLED_AD_BREAK_REQUEST_SLOT_REENTRY",this.j8]]),Rj:new Map([["SLOT_TYPE_AD_BREAK_REQUEST",this.VI],["SLOT_TYPE_FORECASTING",this.J1],["SLOT_TYPE_IN_PLAYER",this.J1],
["SLOT_TYPE_PLAYER_BYTES",this.J1]]),jw:new Map([["TRIGGER_TYPE_SKIP_REQUESTED",this.yT],["TRIGGER_TYPE_LAYOUT_ID_ENTERED",this.TZ],["TRIGGER_TYPE_LAYOUT_ID_EXITED",this.TZ],["TRIGGER_TYPE_LAYOUT_EXITED_FOR_REASON",this.TZ],["TRIGGER_TYPE_ON_DIFFERENT_LAYOUT_ID_ENTERED",this.TZ],["TRIGGER_TYPE_SLOT_ID_ENTERED",this.TZ],["TRIGGER_TYPE_SLOT_ID_EXITED",this.TZ],["TRIGGER_TYPE_SLOT_ID_FULFILLED_EMPTY",this.TZ],["TRIGGER_TYPE_SLOT_ID_FULFILLED_NON_EMPTY",this.TZ],["TRIGGER_TYPE_SLOT_ID_SCHEDULED",this.TZ],
["TRIGGER_TYPE_ON_DIFFERENT_SLOT_ID_ENTER_REQUESTED",this.TZ],["TRIGGER_TYPE_CLOSE_REQUESTED",this.rG],["TRIGGER_TYPE_BEFORE_CONTENT_VIDEO_ID_STARTED",this.Hd],["TRIGGER_TYPE_CONTENT_VIDEO_ID_ENDED",this.Ia],["TRIGGER_TYPE_MEDIA_TIME_RANGE",this.Ia],["TRIGGER_TYPE_NOT_IN_MEDIA_TIME_RANGE",this.Ia],["TRIGGER_TYPE_ON_LAYOUT_SELF_EXIT_REQUESTED",this.f3],["TRIGGER_TYPE_ON_NEW_PLAYBACK_AFTER_CONTENT_VIDEO_ID",this.Hd],["TRIGGER_TYPE_ON_OPPORTUNITY_TYPE_RECEIVED",this.Cm],["TRIGGER_TYPE_TIME_RELATIVE_TO_LAYOUT_ENTER",
this.QK],["TRIGGER_TYPE_AD_BREAK_STARTED",this.Ra],["TRIGGER_TYPE_LIVE_STREAM_BREAK_SCHEDULED_DURATION_MATCHED",this.r_],["TRIGGER_TYPE_LIVE_STREAM_BREAK_SCHEDULED_DURATION_NOT_MATCHED",this.r_],["TRIGGER_TYPE_NEW_SLOT_SCHEDULED_WITH_BREAK_DURATION",this.r_],["TRIGGER_TYPE_PREFETCH_CACHE_EXPIRED",this.r_],["TRIGGER_TYPE_CUE_BREAK_IDENTIFIED",this.r_]]),wF:new Map([["SLOT_TYPE_AD_BREAK_REQUEST",this.zc],["SLOT_TYPE_FORECASTING",this.zc],["SLOT_TYPE_IN_PLAYER",this.zc],["SLOT_TYPE_PLAYER_BYTES",this.QI]]),
qN:new Map([["SLOT_TYPE_AD_BREAK_REQUEST",this.fm],["SLOT_TYPE_FORECASTING",this.Lm],["SLOT_TYPE_IN_PLAYER",this.wZ],["SLOT_TYPE_PLAYER_BYTES",this.i7]])};this.listeners=[Q.get()];this.XR={Gi:this.Gi,t$:this.Gt.get(),Iq:this.tp.get(),GD:this.E6.get(),Fl:this.Fl,oT:K.get(),hX:this.DM.get(),L5:this.yT,BZ:Q.get(),cZ:this.XS.get()}}};var NFN=class extends g.jR{constructor(Z,k,N,a,T){super();const K=n(()=>new Im(this.Gt));
g.u(this,K);const y=n(()=>new jE(K));
g.u(this,y);const Q=n(()=>new SE);
g.u(this,Q);const q=n(()=>new xt(Z));
g.u(this,q);const r=n(()=>new Ek(K,y,this.Gt));
g.u(this,r);const C=n(()=>new Wh);
g.u(this,C);this.Le=n(()=>new cN(k));
g.u(this,this.Le);this.tp=n(()=>new m7(T));
g.u(this,this.tp);this.Zf=n(()=>new KT(k));
g.u(this,this.Zf);this.JW=n(()=>new yP(k));
g.u(this,this.JW);this.s3=n(()=>new QP(k));
g.u(this,this.s3);this.fC=n(()=>new qb(k));
g.u(this,this.fC);this.Gt=n(()=>new rD(k));
g.u(this,this.Gt);const m=n(()=>new PN(a));
g.u(this,m);const A=n(()=>new Cy(this.Gt));
g.u(this,A);const P=n(()=>new Ok(K,r,y,this.Gt,A,null,null,null,null));
g.u(this,P);this.Rx=n(()=>new dD(k));
g.u(this,this.Rx);this.XS=n(()=>new s4(k,C,this.Gt));
g.u(this,this.XS);const {sH:d,context:h}=xQ({XS:this.XS,Gt:this.Gt,k8:A});this.sH=d;this.E6=n(()=>new Ar(k,this.XS));
g.u(this,this.E6);this.dn=n(()=>new LT);
g.u(this,this.dn);this.Qi=n(()=>new CT(this.E6,k,this.Gt));
g.u(this,this.Qi);this.Za=n(()=>new mA(k,Q,this.Qi,this.XS,this.sH,this.Gt));
g.u(this,this.Za);this.ub=n(()=>new sk(this.Gt));
g.u(this,this.ub);this.MY=new i7(Cw,(v,O,x,e)=>tC(y.get(),v,O,x,e),q,r,y,A,this.Gt,this.XS);
g.u(this,this.MY);this.Fl=new wa(q,P,N,Z,this.XS,this.E6,this.Zf);g.u(this,this.Fl);const B=new T6(k,this.Fl,this.E6,this.XS);this.S8=n(()=>B);
this.h7=B;this.j8=new Gu(q,r,this.JW,this.S8,h);g.u(this,this.j8);this.Gi=new Bh(this.Gt,q,P,this.XS,this.j8,N,this.s3);g.u(this,this.Gi);this.VI=n(()=>new At(m,y,A,this.Gt,this.Za,this.E6));
g.u(this,this.VI);this.J1=n(()=>new Ph);
g.u(this,this.J1);this.yT=new Jt(Z,this.Le,this.Gt);g.u(this,this.yT);this.TZ=new zu(Z);g.u(this,this.TZ);this.Hd=new Uk(Z,this.S8,h);g.u(this,this.Hd);this.Ia=new b7(Z,this.JW,this.E6,this.XS);g.u(this,this.Ia);this.f3=new py(Z);g.u(this,this.f3);this.Cm=new Rm(Z);g.u(this,this.Cm);this.wD=n(()=>new X8(k));
g.u(this,this.wD);this.Ra=new ny;g.u(this,this.Ra);this.zc=n(()=>new eE);
g.u(this,this.zc);this.QI=n(()=>new om(this.E6));
g.u(this,this.QI);this.fm=n(()=>new XF(this.Gi,q,K));
g.u(this,this.fm);this.Lm=n(()=>new Ly(this.Gt,this.Za,this.f3,this.Qi));
g.u(this,this.Lm);this.p9=n(()=>new P3j(this.Le,this.E6,this.Za,Q,N,this.Gt));
g.u(this,this.p9);this.i7=n(()=>new l7(Z,this.Ra,this.f3,this.Za,this.Qi,this.ub,this.s3,this.XS,this.E6,this.dn,this.JW,this.Zf,this.fC,this.tp,this.Rx,this.Gt,this.wD,h));
g.u(this,this.i7);this.GQ={lM:new Map([["OPPORTUNITY_TYPE_AD_BREAK_SERVICE_RESPONSE_RECEIVED",this.Gi],["OPPORTUNITY_TYPE_PLAYER_BYTES_MEDIA_LAYOUT_ENTERED",this.MY],["OPPORTUNITY_TYPE_PLAYER_RESPONSE_RECEIVED",this.Fl],["OPPORTUNITY_TYPE_THROTTLED_AD_BREAK_REQUEST_SLOT_REENTRY",this.j8]]),Rj:new Map([["SLOT_TYPE_AD_BREAK_REQUEST",this.VI],["SLOT_TYPE_FORECASTING",this.J1],["SLOT_TYPE_IN_PLAYER",this.J1],["SLOT_TYPE_PLAYER_BYTES",this.J1]]),jw:new Map([["TRIGGER_TYPE_SKIP_REQUESTED",this.yT],["TRIGGER_TYPE_LAYOUT_ID_ENTERED",
this.TZ],["TRIGGER_TYPE_LAYOUT_ID_EXITED",this.TZ],["TRIGGER_TYPE_LAYOUT_EXITED_FOR_REASON",this.TZ],["TRIGGER_TYPE_ON_DIFFERENT_LAYOUT_ID_ENTERED",this.TZ],["TRIGGER_TYPE_SLOT_ID_ENTERED",this.TZ],["TRIGGER_TYPE_SLOT_ID_EXITED",this.TZ],["TRIGGER_TYPE_SLOT_ID_FULFILLED_EMPTY",this.TZ],["TRIGGER_TYPE_SLOT_ID_FULFILLED_NON_EMPTY",this.TZ],["TRIGGER_TYPE_SLOT_ID_SCHEDULED",this.TZ],["TRIGGER_TYPE_BEFORE_CONTENT_VIDEO_ID_STARTED",this.Hd],["TRIGGER_TYPE_CONTENT_VIDEO_ID_ENDED",this.Ia],["TRIGGER_TYPE_MEDIA_TIME_RANGE",
this.Ia],["TRIGGER_TYPE_ON_LAYOUT_SELF_EXIT_REQUESTED",this.f3],["TRIGGER_TYPE_ON_NEW_PLAYBACK_AFTER_CONTENT_VIDEO_ID",this.Hd],["TRIGGER_TYPE_ON_OPPORTUNITY_TYPE_RECEIVED",this.Cm],["TRIGGER_TYPE_AD_BREAK_STARTED",this.Ra]]),wF:new Map([["SLOT_TYPE_AD_BREAK_REQUEST",this.zc],["SLOT_TYPE_ABOVE_FEED",this.zc],["SLOT_TYPE_FORECASTING",this.zc],["SLOT_TYPE_IN_PLAYER",this.zc],["SLOT_TYPE_PLAYER_BYTES",this.QI]]),qN:new Map([["SLOT_TYPE_AD_BREAK_REQUEST",this.fm],["SLOT_TYPE_FORECASTING",this.Lm],["SLOT_TYPE_IN_PLAYER",
this.p9],["SLOT_TYPE_PLAYER_BYTES",this.i7]])};this.listeners=[Q.get()];this.XR={Gi:this.Gi,t$:this.Gt.get(),Iq:this.tp.get(),GD:this.E6.get(),Fl:this.Fl,oT:K.get(),hX:null,L5:this.yT,BZ:Q.get(),cZ:this.XS.get()}}};var aVU=class extends g.jR{constructor(Z,k,N,a,T){super();const K=n(()=>new Im(this.Gt));
g.u(this,K);const y=n(()=>new jE(K));
g.u(this,y);const Q=n(()=>new SE);
g.u(this,Q);const q=n(()=>new xt(Z));
g.u(this,q);const r=n(()=>new Ek(K,y,this.Gt));
g.u(this,r);const C=n(()=>new Wh);
g.u(this,C);this.iN=n(()=>new EKn(k));
g.u(this,this.iN);this.Le=n(()=>new cN(k));
g.u(this,this.Le);this.tp=n(()=>new m7(T));
g.u(this,this.tp);this.Zf=n(()=>new KT(k));
g.u(this,this.Zf);this.JW=n(()=>new yP(k));
g.u(this,this.JW);this.s3=n(()=>new QP(k));
g.u(this,this.s3);this.fC=n(()=>new qb(k));
g.u(this,this.fC);this.Gt=n(()=>new rD(k));
g.u(this,this.Gt);const m=n(()=>new PN(a));
g.u(this,m);const A=n(()=>new Cy(this.Gt));
g.u(this,A);const P=n(()=>new Ok(K,r,y,this.Gt,A,null,null,null,null));
g.u(this,P);this.Rx=n(()=>new dD(k));
g.u(this,this.Rx);this.XS=n(()=>new s4(k,C,this.Gt));
g.u(this,this.XS);const {sH:d,context:h}=xQ({XS:this.XS,Gt:this.Gt,k8:A});this.sH=d;this.E6=n(()=>new Ar(k,this.XS));
g.u(this,this.E6);this.dn=n(()=>new LT);
g.u(this,this.dn);this.Qi=n(()=>new CT(this.E6,k,this.Gt));
g.u(this,this.Qi);this.Za=n(()=>new mA(k,Q,this.Qi,this.XS,this.sH,this.Gt));
g.u(this,this.Za);this.ub=n(()=>new sk(this.Gt));
g.u(this,this.ub);this.MY=new i7(VWf,(v,O,x,e)=>Rcy(y.get(),v,O,x,e),q,r,y,A,this.Gt,this.XS);
g.u(this,this.MY);this.Fl=new wa(q,P,N,Z,this.XS,this.E6,this.Zf);g.u(this,this.Fl);const B=new T6(k,this.Fl,this.E6,this.XS);this.S8=n(()=>B);
this.h7=B;this.j8=new Gu(q,r,this.JW,this.S8,h);g.u(this,this.j8);this.Gi=new Bh(this.Gt,q,P,this.XS,this.j8,N,this.s3);g.u(this,this.Gi);this.VI=n(()=>new At(m,y,A,this.Gt,this.Za,this.E6));
g.u(this,this.VI);this.J1=n(()=>new Ph);
g.u(this,this.J1);this.yT=new Jt(Z,this.Le,this.Gt);g.u(this,this.yT);this.TZ=new zu(Z);g.u(this,this.TZ);this.Hd=new Uk(Z,this.S8,h);g.u(this,this.Hd);this.Ia=new b7(Z,this.JW,this.E6,this.XS);g.u(this,this.Ia);this.f3=new py(Z);g.u(this,this.f3);this.Cm=new Rm(Z);g.u(this,this.Cm);this.wD=n(()=>new X8(k));
g.u(this,this.wD);this.Ra=new ny;g.u(this,this.Ra);this.zc=n(()=>new eE);
g.u(this,this.zc);this.QI=n(()=>new om(this.E6));
g.u(this,this.QI);this.fm=n(()=>new XF(this.Gi,q,K));
g.u(this,this.fm);this.Lm=n(()=>new Ly(this.Gt,this.Za,this.f3,this.Qi));
g.u(this,this.Lm);this.i7=n(()=>new l7(Z,this.Ra,this.f3,this.Za,this.Qi,this.ub,this.s3,this.XS,this.E6,this.dn,this.JW,this.Zf,this.fC,this.tp,this.Rx,this.Gt,this.wD,h));
g.u(this,this.i7);this.GT=n(()=>new nry(this.Le,this.E6,this.Za,Q,this.iN,N,this.XS));
g.u(this,this.GT);this.GQ={lM:new Map([["OPPORTUNITY_TYPE_AD_BREAK_SERVICE_RESPONSE_RECEIVED",this.Gi],["OPPORTUNITY_TYPE_PLAYER_BYTES_MEDIA_LAYOUT_ENTERED",this.MY],["OPPORTUNITY_TYPE_PLAYER_RESPONSE_RECEIVED",this.Fl],["OPPORTUNITY_TYPE_THROTTLED_AD_BREAK_REQUEST_SLOT_REENTRY",this.j8]]),Rj:new Map([["SLOT_TYPE_AD_BREAK_REQUEST",this.VI],["SLOT_TYPE_FORECASTING",this.J1],["SLOT_TYPE_IN_PLAYER",this.J1],["SLOT_TYPE_PLAYER_BYTES",this.J1]]),jw:new Map([["TRIGGER_TYPE_SKIP_REQUESTED",this.yT],["TRIGGER_TYPE_LAYOUT_ID_ENTERED",
this.TZ],["TRIGGER_TYPE_LAYOUT_ID_EXITED",this.TZ],["TRIGGER_TYPE_LAYOUT_EXITED_FOR_REASON",this.TZ],["TRIGGER_TYPE_ON_DIFFERENT_LAYOUT_ID_ENTERED",this.TZ],["TRIGGER_TYPE_SLOT_ID_ENTERED",this.TZ],["TRIGGER_TYPE_SLOT_ID_EXITED",this.TZ],["TRIGGER_TYPE_SLOT_ID_FULFILLED_EMPTY",this.TZ],["TRIGGER_TYPE_SLOT_ID_FULFILLED_NON_EMPTY",this.TZ],["TRIGGER_TYPE_SLOT_ID_SCHEDULED",this.TZ],["TRIGGER_TYPE_BEFORE_CONTENT_VIDEO_ID_STARTED",this.Hd],["TRIGGER_TYPE_CONTENT_VIDEO_ID_ENDED",this.Ia],["TRIGGER_TYPE_MEDIA_TIME_RANGE",
this.Ia],["TRIGGER_TYPE_ON_LAYOUT_SELF_EXIT_REQUESTED",this.f3],["TRIGGER_TYPE_ON_NEW_PLAYBACK_AFTER_CONTENT_VIDEO_ID",this.Hd],["TRIGGER_TYPE_ON_OPPORTUNITY_TYPE_RECEIVED",this.Cm],["TRIGGER_TYPE_AD_BREAK_STARTED",this.Ra]]),wF:new Map([["SLOT_TYPE_AD_BREAK_REQUEST",this.zc],["SLOT_TYPE_FORECASTING",this.zc],["SLOT_TYPE_IN_PLAYER",this.zc],["SLOT_TYPE_PLAYER_BYTES",this.QI]]),qN:new Map([["SLOT_TYPE_AD_BREAK_REQUEST",this.fm],["SLOT_TYPE_FORECASTING",this.Lm],["SLOT_TYPE_IN_PLAYER",this.GT],["SLOT_TYPE_PLAYER_BYTES",
this.i7]])};this.listeners=[Q.get()];this.XR={Gi:this.Gi,t$:this.Gt.get(),Iq:this.tp.get(),GD:this.E6.get(),Fl:this.Fl,oT:K.get(),hX:null,L5:this.yT,BZ:Q.get(),cZ:this.XS.get()}}};var TFX=class extends g.jR{constructor(Z,k,N,a,T){super();const K=n(()=>new Im(this.Gt));
g.u(this,K);const y=n(()=>new jE(K));
g.u(this,y);const Q=n(()=>new SE);
g.u(this,Q);const q=n(()=>new xt(Z));
g.u(this,q);const r=n(()=>new Ek(K,y,this.Gt));
g.u(this,r);const C=n(()=>new Wh);
g.u(this,C);this.iN=n(()=>new EKn(k));
g.u(this,this.iN);this.Le=n(()=>new cN(k));
g.u(this,this.Le);this.tp=n(()=>new m7(T));
g.u(this,this.tp);this.Zf=n(()=>new KT(k));
g.u(this,this.Zf);this.JW=n(()=>new yP(k));
g.u(this,this.JW);this.s3=n(()=>new QP(k));
g.u(this,this.s3);this.fC=n(()=>new qb(k));
g.u(this,this.fC);this.Gt=n(()=>new rD(k));
g.u(this,this.Gt);const m=n(()=>new PN(a));
g.u(this,m);const A=n(()=>new Cy(this.Gt));
g.u(this,A);this.Rx=n(()=>new dD(k));
g.u(this,this.Rx);this.XS=n(()=>new s4(k,C,this.Gt));
g.u(this,this.XS);const {sH:P,context:d}=xQ({XS:this.XS,Gt:this.Gt,k8:A});this.sH=P;this.a4=n(()=>new HN(k,this.Gt,this.Za));
g.u(this,this.a4);this.wD=n(()=>new X8(k));
g.u(this,this.wD);this.E6=n(()=>new Ar(k,this.XS));
g.u(this,this.E6);this.dn=n(()=>new LT);
g.u(this,this.dn);const h=n(()=>new Ok(K,r,y,this.Gt,A,null,this.E6,this.Bd,this.r_,3));
g.u(this,h);this.ub=n(()=>new sk(this.Gt));
this.Qi=n(()=>new CT(this.E6,k,this.Gt));
g.u(this,this.Qi);this.Za=n(()=>new mA(k,Q,this.Qi,this.XS,this.sH,this.Gt));
g.u(this,this.Za);this.Fl=new wa(q,h,N,Z,this.XS,this.E6,this.Zf);g.u(this,this.Fl);const B=new T6(k,this.Fl,this.E6,this.XS,this.a4);this.S8=n(()=>B);
this.h7=B;this.MY=new i7(FYy,(v,O,x,e)=>Rcy(y.get(),v,O,x,e),q,r,y,A,this.Gt,this.XS);
g.u(this,this.MY);this.Bd=new vh(q,r,this.S8,this.a4,this.E6,this.Gt,this.Za,this.wD);g.u(this,this.Bd);this.j8=new Gu(q,r,this.JW,this.S8,d);g.u(this,this.j8);this.Gi=new Bh(this.Gt,q,h,this.XS,this.j8,N,this.s3);g.u(this,this.Gi);this.VI=n(()=>new At(m,y,A,this.Gt,this.Za,this.E6,this.wD));
g.u(this,this.VI);this.J1=n(()=>new Ph);
g.u(this,this.J1);this.yT=new Jt(Z,this.Le,this.Gt);g.u(this,this.yT);this.TZ=new zu(Z);g.u(this,this.TZ);this.Hd=new Uk(Z,this.S8,d);g.u(this,this.Hd);this.Ia=new b7(Z,this.JW,this.E6,this.XS);g.u(this,this.Ia);this.ip=new TZf(Z,this.XS);g.u(this,this.ip);this.r_=new Mf(Z,this.a4,this.E6,this.Za,this.S8,this.Bd);g.u(this,this.r_);this.f3=new py(Z);g.u(this,this.f3);this.Cm=new Rm(Z);g.u(this,this.Cm);this.Ra=new ny;g.u(this,this.Ra);this.zc=n(()=>new eE);
g.u(this,this.zc);this.QI=n(()=>new om(this.E6));
g.u(this,this.QI);this.fm=n(()=>new XF(this.Gi,q,K));
g.u(this,this.fm);this.Lm=n(()=>new Ly(this.Gt,this.Za,this.f3,this.Qi));
g.u(this,this.Lm);this.i7=n(()=>new G9r(Z,this.Ra,this.f3,this.XS,this.wD,this.E6,this.dn,this.Za,C,this.a4,this.Qi,this.ub,this.s3,this.JW,this.Zf,this.fC,this.tp,this.Rx,this.Gt,Q,d));
g.u(this,this.i7);this.wZ=n(()=>new IKb(this.Le,this.E6,this.Za,Q,this.iN,N,this.Gt,this.XS));
g.u(this,this.wZ);this.GQ={lM:new Map([["OPPORTUNITY_TYPE_AD_BREAK_SERVICE_RESPONSE_RECEIVED",this.Gi],["OPPORTUNITY_TYPE_LIVE_STREAM_BREAK_SIGNAL",this.Bd],["OPPORTUNITY_TYPE_PLAYER_BYTES_MEDIA_LAYOUT_ENTERED",this.MY],["OPPORTUNITY_TYPE_PLAYER_RESPONSE_RECEIVED",this.Fl],["OPPORTUNITY_TYPE_THROTTLED_AD_BREAK_REQUEST_SLOT_REENTRY",this.j8]]),Rj:new Map([["SLOT_TYPE_AD_BREAK_REQUEST",this.VI],["SLOT_TYPE_FORECASTING",this.J1],["SLOT_TYPE_IN_PLAYER",this.J1],["SLOT_TYPE_PLAYER_BYTES",this.J1]]),jw:new Map([["TRIGGER_TYPE_SKIP_REQUESTED",
this.yT],["TRIGGER_TYPE_LAYOUT_ID_ENTERED",this.TZ],["TRIGGER_TYPE_LAYOUT_ID_EXITED",this.TZ],["TRIGGER_TYPE_LAYOUT_EXITED_FOR_REASON",this.TZ],["TRIGGER_TYPE_ON_DIFFERENT_LAYOUT_ID_ENTERED",this.TZ],["TRIGGER_TYPE_SLOT_ID_ENTERED",this.TZ],["TRIGGER_TYPE_SLOT_ID_EXITED",this.TZ],["TRIGGER_TYPE_SLOT_ID_FULFILLED_EMPTY",this.TZ],["TRIGGER_TYPE_SLOT_ID_FULFILLED_NON_EMPTY",this.TZ],["TRIGGER_TYPE_SLOT_ID_SCHEDULED",this.TZ],["TRIGGER_TYPE_BEFORE_CONTENT_VIDEO_ID_STARTED",this.Hd],["TRIGGER_TYPE_CONTENT_VIDEO_ID_ENDED",
this.Ia],["TRIGGER_TYPE_MEDIA_TIME_RANGE",this.Ia],["TRIGGER_TYPE_LIVE_STREAM_BREAK_STARTED",this.ip],["TRIGGER_TYPE_LIVE_STREAM_BREAK_ENDED",this.ip],["TRIGGER_TYPE_ON_LAYOUT_SELF_EXIT_REQUESTED",this.f3],["TRIGGER_TYPE_ON_NEW_PLAYBACK_AFTER_CONTENT_VIDEO_ID",this.Hd],["TRIGGER_TYPE_ON_OPPORTUNITY_TYPE_RECEIVED",this.Cm],["TRIGGER_TYPE_AD_BREAK_STARTED",this.Ra],["TRIGGER_TYPE_LIVE_STREAM_BREAK_SCHEDULED_DURATION_MATCHED",this.r_],["TRIGGER_TYPE_LIVE_STREAM_BREAK_SCHEDULED_DURATION_NOT_MATCHED",
this.r_],["TRIGGER_TYPE_NEW_SLOT_SCHEDULED_WITH_BREAK_DURATION",this.r_],["TRIGGER_TYPE_PREFETCH_CACHE_EXPIRED",this.r_],["TRIGGER_TYPE_CUE_BREAK_IDENTIFIED",this.r_]]),wF:new Map([["SLOT_TYPE_AD_BREAK_REQUEST",this.zc],["SLOT_TYPE_FORECASTING",this.zc],["SLOT_TYPE_IN_PLAYER",this.zc],["SLOT_TYPE_PLAYER_BYTES",this.QI]]),qN:new Map([["SLOT_TYPE_AD_BREAK_REQUEST",this.fm],["SLOT_TYPE_FORECASTING",this.Lm],["SLOT_TYPE_PLAYER_BYTES",this.i7],["SLOT_TYPE_IN_PLAYER",this.wZ]])};this.listeners=[Q.get()];
this.XR={Gi:this.Gi,t$:this.Gt.get(),Iq:this.tp.get(),GD:this.E6.get(),Fl:this.Fl,oT:K.get(),hX:null,L5:this.yT,BZ:Q.get(),cZ:this.XS.get()}}};var WEF=class extends g.jR{constructor(Z,k,N,a){super();const T=()=>this.U;
Z.X().experiments.yz("html5_dispose_of_manager_before_dependency")?(this.V=yXU(T,Z,k,N,a),this.U=(new Orf(this.V)).D(),g.u(this,this.U),g.u(this,this.V)):(this.V=yXU(T,Z,k,N,a),g.u(this,this.V),this.U=(new Orf(this.V)).D(),g.u(this,this.U))}D(){return this.U}};var Yfc=class extends kDR{Y(Z){var k=Z.content;if(k.componentType==="shopping-companion")switch(Z.actionType){case 1:case 2:Z=this.V.getVideoData({playerType:1});g.A7(this.V,"updateKevlarOrC3Companion",{contentVideoId:Z&&Z.videoId,shoppingCompanionCarouselRenderer:k.renderer,layoutId:k.layoutId,macros:k.macros,onLayoutVisibleCallback:k.V,interactionLoggingClientData:k.interactionLoggingClientData});break;case 3:g.A7(this.V,"updateKevlarOrC3Companion",{})}else if(k.componentType==="action-companion")switch(Z.actionType){case 1:case 2:Z=
this.V.getVideoData({playerType:1});g.A7(this.V,"updateKevlarOrC3Companion",{contentVideoId:Z&&Z.videoId,actionCompanionAdRenderer:k.renderer,layoutId:k.layoutId,macros:k.macros,onLayoutVisibleCallback:k.V,interactionLoggingClientData:k.interactionLoggingClientData});break;case 3:k.renderer&&(k=this.V.getVideoData({playerType:1}),g.A7(this.V,"updateKevlarOrC3Companion",{contentVideoId:k&&k.videoId})),g.A7(this.V,"updateKevlarOrC3Companion",{})}else if(k.componentType==="image-companion")switch(Z.actionType){case 1:case 2:Z=
this.V.getVideoData({playerType:1});g.A7(this.V,"updateKevlarOrC3Companion",{contentVideoId:Z&&Z.videoId,imageCompanionAdRenderer:k.renderer,layoutId:k.layoutId,macros:k.macros,onLayoutVisibleCallback:k.V,interactionLoggingClientData:k.interactionLoggingClientData});break;case 3:k=this.V.getVideoData({playerType:1}),g.A7(this.V,"updateKevlarOrC3Companion",{contentVideoId:k&&k.videoId}),g.A7(this.V,"updateKevlarOrC3Companion",{})}else if(k.componentType==="top-banner-image-text-icon-buttoned")switch(Z.actionType){case 1:case 2:Z=
this.V.getVideoData({playerType:1});g.A7(this.V,"updateKevlarOrC3Companion",{contentVideoId:Z&&Z.videoId,topBannerImageTextIconButtonedLayoutViewModel:k.renderer,layoutId:k.layoutId,macros:k.macros,onLayoutVisibleCallback:k.V,interactionLoggingClientData:k.interactionLoggingClientData});break;case 3:k.renderer&&(k=this.V.getVideoData({playerType:1}),g.A7(this.V,"updateKevlarOrC3Companion",{contentVideoId:k&&k.videoId})),g.A7(this.V,"updateKevlarOrC3Companion",{})}else if(k.componentType==="banner-image")switch(Z.actionType){case 1:case 2:Z=
this.V.getVideoData({playerType:1});g.A7(this.V,"updateKevlarOrC3Companion",{contentVideoId:Z&&Z.videoId,bannerImageLayoutViewModel:k.renderer,layoutId:k.layoutId,macros:k.macros,onLayoutVisibleCallback:k.V,interactionLoggingClientData:k.interactionLoggingClientData});break;case 3:k=this.V.getVideoData({playerType:1}),g.A7(this.V,"updateKevlarOrC3Companion",{contentVideoId:k&&k.videoId}),g.A7(this.V,"updateKevlarOrC3Companion",{})}else if(k.componentType==="ads-engagement-panel")switch(k=k.renderer,
Z.actionType){case 1:case 2:g.A7(this.V,"updateEngagementPanelAction",k.addAction);g.A7(this.V,"changeEngagementPanelVisibility",k.expandAction);break;case 3:g.A7(this.V,"changeEngagementPanelVisibility",k.hideAction),g.A7(this.V,"updateEngagementPanelAction",k.removeAction)}else if(k.componentType==="ads-engagement-panel-layout"){const N=k.renderer;switch(Z.actionType){case 1:case 2:g.A7(this.V,"updateEngagementPanelAction",{action:f9(N.addAction),layoutId:k.layoutId,onLayoutVisibleCallback:k.V,
interactionLoggingClientData:k.interactionLoggingClientData});g.A7(this.V,"changeEngagementPanelVisibility",f9(N.expandAction));break;case 3:g.A7(this.V,"changeEngagementPanelVisibility",f9(N.hideAction)),g.A7(this.V,"updateEngagementPanelAction",{action:f9(N.removeAction)})}}}};var Z1H=class extends RB{constructor(Z,k,N,a,T){super(Z,{J:"div",Z:"ytp-ad-timed-pie-countdown-container",A:[{J:"svg",Z:"ytp-ad-timed-pie-countdown",W:{viewBox:"0 0 20 20"},A:[{J:"circle",Z:"ytp-ad-timed-pie-countdown-background",W:{r:"10",cx:"10",cy:"10"}},{J:"circle",Z:"ytp-ad-timed-pie-countdown-inner",W:{r:"5",cx:"10",cy:"10"}},{J:"circle",Z:"ytp-ad-timed-pie-countdown-outer",W:{r:"10",cx:"10",cy:"10"}}]}]},"timed-pie-countdown",k,N,a,T);this.G=this.Lp("ytp-ad-timed-pie-countdown-container");
this.Y=this.Lp("ytp-ad-timed-pie-countdown-inner");this.j=this.Lp("ytp-ad-timed-pie-countdown-outer");this.U=Math.ceil(2*Math.PI*5);this.hide()}init(Z,k,N){super.init(Z,k,N);g.ij(this.Y,"stroke-dasharray",`0 ${this.U}`);this.Y.classList.add("ytp-ad-timed-pie-countdown-inner-light");this.j.classList.add("ytp-ad-timed-pie-countdown-outer-light");this.G.classList.add("ytp-ad-timed-pie-countdown-container-upper-right");this.show()}clear(){this.hide()}hide(){vm(this);super.hide()}show(){Ow(this);super.show()}L(){this.hide()}D(){if(this.V){var Z=
this.V.getProgressState();Z!=null&&Z.current!=null&&g.ij(this.Y,"stroke-dasharray",`${Z.current/Z.seekableEnd*this.U} ${this.U}`)}}};var pPf=class extends zR{constructor(Z,k,N,a,T,K){super(Z,{J:"div",Z:"ytp-ad-action-interstitial",W:{tabindex:"0"},A:[{J:"div",Z:"ytp-ad-action-interstitial-background-container"},{J:"div",Z:"ytp-ad-action-interstitial-slot",A:[{J:"div",Z:"ytp-ad-action-interstitial-instream-info"},{J:"div",Z:"ytp-ad-action-interstitial-card",A:[{J:"div",Z:"ytp-ad-action-interstitial-image-container"},{J:"div",Z:"ytp-ad-action-interstitial-headline-container"},{J:"div",Z:"ytp-ad-action-interstitial-description-container"},
{J:"div",Z:"ytp-ad-action-interstitial-action-button-container"}]}]}]},"ad-action-interstitial",k,N,a);this.Gz=T;this.mR=K;this.navigationEndpoint=this.V=this.skipButton=this.U=this.actionButton=null;this.Sm=this.Lp("ytp-ad-action-interstitial-instream-info");this.xW=this.Lp("ytp-ad-action-interstitial-image-container");this.G=new UW(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,"ytp-ad-action-interstitial-image");g.u(this,this.G);this.G.HD(this.xW);this.O=this.Lp("ytp-ad-action-interstitial-headline-container");
this.L=new p4(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,"ytp-ad-action-interstitial-headline");g.u(this,this.L);this.L.HD(this.O);this.j=this.Lp("ytp-ad-action-interstitial-description-container");this.D=new p4(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,"ytp-ad-action-interstitial-description");g.u(this,this.D);this.D.HD(this.j);this.s6=this.Lp("ytp-ad-action-interstitial-background-container");this.tq=new UW(this.api,this.layoutId,this.interactionLoggingClientData,
this.Iq,"ytp-ad-action-interstitial-background",!0);g.u(this,this.tq);this.tq.HD(this.s6);this.Qz=this.Lp("ytp-ad-action-interstitial-action-button-container");this.slot=this.Lp("ytp-ad-action-interstitial-slot");this.ib=this.Lp("ytp-ad-action-interstitial-card");this.Y=new i$;g.u(this,this.Y);this.hide()}init(Z,k,N){super.init(Z,k,N);if(k.image&&k.image.thumbnail)if(k.headline)if(k.description)if(k.backgroundImage&&k.backgroundImage.thumbnail)if(k.actionButton&&g.J(k.actionButton,Eq))if(Z=k.durationMilliseconds||
0,typeof Z!=="number"||Z<=0)g.b(Error("durationMilliseconds was specified incorrectly in "+`AdActionInterstitialRenderer with a value of: ${Z}`));else if(k.navigationEndpoint){var a=this.api.getVideoData({playerType:2});if(a!=null){var T=k.image.thumbnail.thumbnails;T!=null&&T.length>0&&g.a2(g.qc(T[0].url))&&(T[0].url=a.profilePicture,g.a2(g.qc(a.profilePicture))&&OZf(6,"VideoPlayer",239976093,"Expected non-empty profile picture."));T=k.backgroundImage.thumbnail.thumbnails;T!=null&&T.length>0&&g.a2(g.qc(T[0].url))&&
(T[0].url=a.v9());T=k.headline;T!=null&&g.a2(g.qc(T.text))&&(T.text=a.author)}this.G.init(MP("ad-image"),k.image,N);this.L.init(MP("ad-text"),k.headline,N);this.D.init(MP("ad-text"),k.description,N);this.tq.init(MP("ad-image"),k.backgroundImage,N);a=["ytp-ad-action-interstitial-action-button","ytp-ad-action-interstitial-action-button-rounded"];this.slot.classList.add("ytp-ad-action-interstitial-slot-dark-background");this.L.element.classList.add("ytp-ad-action-interstitial-headline-light");this.D.element.classList.add("ytp-ad-action-interstitial-description-light");
this.api.X().B("enable_default_mono_cta_migration_web_client")?a.push("ytp-ad-action-interstitial-action-button-mono-dark"):a.push("ytp-ad-action-interstitial-action-button-dark");this.api.X().U&&(a.push("ytp-ad-action-interstitial-action-button-mobile-companion-size"),this.api.X().B("enable_default_mono_cta_migration_web_client")?a.push("ytp-ad-action-interstitial-action-button-mono-dark"):a.push("ytp-ad-action-interstitial-action-button-dark"));this.api.X().B("enable_unified_action_endcap_on_web")&&
!this.api.X().U&&(this.api.X().B("enable_default_mono_cta_migration_web_client")?a.push("ytp-ad-action-interstitial-action-button-unified-mono"):a.push("ytp-ad-action-interstitial-action-button-unified"),this.Qz.classList.add("ytp-ad-action-interstitial-action-button-container-unified"),this.G.element.classList.add("ytp-ad-action-interstitial-image-unified"),this.s6.classList.add("ytp-ad-action-interstitial-background-container-unified"),this.ib.classList.add("ytp-ad-action-interstitial-card-unified"),
this.j.classList.add("ytp-ad-action-interstitial-description-container-unified"),this.D.element.classList.add("ytp-ad-action-interstitial-description-unified"),this.O.classList.add("ytp-ad-action-interstitial-headline-container-unified"),this.L.element.classList.add("ytp-ad-action-interstitial-headline-unified"),this.xW.classList.add("ytp-ad-action-interstitial-image-container-unified"),this.Sm.classList.add("ytp-ad-action-interstitial-instream-info-unified"),this.slot.classList.add("ytp-ad-action-interstitial-slot-unified"));
this.actionButton=new Bm(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,a);g.u(this,this.actionButton);this.actionButton.HD(this.Qz);this.actionButton.init(MP("button"),g.J(k.actionButton,Eq),N);x3(this.actionButton.element);a=eX(this.actionButton.element);SX(this.actionButton.element,a+" This link opens in new tab");this.navigationEndpoint=k.navigationEndpoint;this.Y.K(this.xW,"click",this.MX,this);this.Y.K(this.j,"click",this.MX,this);this.api.X().U||this.Y.K(this.O,"click",this.MX,
this);this.V=this.Gz?new sg(this.api,Z):new Yf(Z);g.u(this,this.V);if(k.skipButton){(Z=g.J(k.skipButton,fgy))&&this.V&&(this.skipButton=new Key(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,this.V,this.mR),g.u(this,this.skipButton),this.skipButton.HD(this.element),this.skipButton.init(MP("skip-button"),Z,N));if(N=k.adBadgeRenderer)if(N=g.J(N,lgf))Z=new EW(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,!0),Z.HD(this.Sm),Z.init(MP("simple-ad-badge"),N,this.macros),
g.u(this,Z);if(N=k.adInfoRenderer)if(N=g.J(N,Xe))Z=new yG(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,this.element,void 0,!0),Z.HD(this.Sm),Z.init(MP("ad-info-hover-text-button"),N,this.macros),g.u(this,Z)}else k.nonskippableOverlayRenderer&&(Z=g.J(k.nonskippableOverlayRenderer,Lq))&&this.V&&(this.U=new n4(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,this.V,!1),g.u(this,this.U),this.U.HD(this.element),this.U.init(MP("ad-preview"),Z,N));k.countdownRenderer&&
(k=k.countdownRenderer,g.J(k,BDf)&&this.V&&(N=new Z1H(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,this.V),g.u(this,N),N.HD(this.element),N.init(MP("timed-pie-countdown"),g.J(k,BDf),this.macros)));this.show();this.element.focus()}else g.b(Error("AdActionInterstitialRenderer has no navigation endpoint."));else g.b(Error("AdActionInterstitialRenderer has no button."));else g.b(Error("AdActionInterstitialRenderer has no background AdImage."));else g.b(Error("AdActionInterstitialRenderer has no description AdText."));
else g.b(Error("AdActionInterstitialRenderer has no headline AdText."));else g.b(Error("AdActionInterstitialRenderer has no image."))}clear(){this.Y.U();this.hide()}show(){qtf(!0);this.actionButton&&this.actionButton.show();this.skipButton&&this.skipButton.show();this.U&&this.U.show();super.show()}hide(){qtf(!1);this.actionButton&&this.actionButton.hide();this.skipButton&&this.skipButton.hide();this.U&&this.U.hide();super.hide()}MX(){this.navigationEndpoint&&(this.layoutId?this.Iq.executeCommand(this.navigationEndpoint,
this.layoutId):g.b(Error("Missing layoutId for ad action interstitial.")))}};var Ta={iconType:"CLOSE"},rR=new g.i0(320,63),JXG=class extends zR{constructor(Z,k,N,a){super(Z,{J:"div",Z:"ytp-ad-overlay-slot",A:[{J:"div",Z:"ytp-ad-overlay-container"}]},"invideo-overlay",k,N,a);this.G=[];this.s6=this.O=this.Y=this.Qz=this.tq=null;this.MX=!1;this.L=null;this.j=0;Z=this.Lp("ytp-ad-overlay-container");this.xW=new IB(Z,45E3,6E3,.3,.4);g.u(this,this.xW);this.D=rXy(this);g.u(this,this.D);this.D.HD(Z);this.U=CLR(this);g.u(this,this.U);this.U.HD(Z);this.V=mxf(this);g.u(this,this.V);this.V.HD(Z);
this.hide()}init(Z,k,N){super.init(Z,k,N);this.Y=k;this.G=g.mr(this.Y.onClickCommands||[]);this.tq=this.Y.onErrorCommand||null;if(Z=this.Y.contentSupportedRenderer)Z=this.Y.contentSupportedRenderer,k=this.Y.adInfoRenderer||null,g.J(Z,t80)?(this.L=g.Mc("ytp-ad-overlay-ad-info-button-container",this.D.element),QG(this,k),Z=AXf(this,g.J(Z,t80))):g.J(Z,hCf)?(this.L=g.Mc("ytp-ad-overlay-ad-info-button-container",this.U.element),QG(this,k),Z=PLX(this,g.J(Z,hCf))):g.J(Z,u8f)?(this.L=g.Mc("ytp-ad-overlay-ad-info-button-container",
this.V.element),QG(this,k),Z=cXy(this,g.J(Z,u8f))):(g.b(Error("InvideoOverlayAdRenderer content could not be initialized.")),Z=!1);Z&&(this.show(),s_b(this,!0))}clear(){s_b(this,!1);this.xW.reset();this.j=0;this.D.hide();this.logVisibility(this.D.element,!1);this.U.hide();this.logVisibility(this.U.element,!1);this.V.hide();this.logVisibility(this.V.element,!1);this.hide();this.dispose()}jY(){this.Qz&&(this.layoutId?this.Iq.executeCommand(this.Qz,this.layoutId):g.b(Error("Missing layoutId for invideo_overlay_ad.")));
this.api.pauseVideo()}Sm(){for(const Z of HXb(this))this.layoutId?this.Iq.executeCommand(Z,this.layoutId):g.b(Error("Missing layoutId for invideo_overlay_ad."));this.api.onAdUxClicked("in_video_overlay_close_button",this.layoutId)}qX(){this.MX||this.api.getPlayerState(1)!==2||this.api.playVideo()}hN(){this.MX||this.api.getPlayerState(1)!==2||this.api.playVideo();this.api.hN("invideo-overlay")}HA(Z){Z.target===this.L&&g.Mc("ytp-ad-button",this.s6.element).click()}};var nQr=class extends RB{constructor(Z,k,N,a,T){super(Z,{J:"div",Z:"ytp-ad-message-overlay",A:[{J:"div",Z:"ytp-ad-message-slot"}]},"ad-message",k,N,a,T);this.j=-1;this.Y=0;this.xW=!1;this.Sm=this.Lp("ytp-ad-message-slot");this.U=new g.af({J:"span",Z:"ytp-ad-message-container"});this.U.HD(this.Sm);g.u(this,this.U);this.messageText=new p4(this.api,this.layoutId,this.interactionLoggingClientData,a,"ytp-ad-message-text");g.u(this,this.messageText);this.messageText.HD(this.U.element);this.G=new g.ML(this.U,
400,!1,100,()=>{this.hide()});
g.u(this,this.G);this.hide()}init(Z,k,N){super.init(Z,k,N);Z=k.durationMs;this.Y=Z==null||Z===0?0:Z+this.V.getProgressState().current*1E3;let a;k.text?a=k.text.templatedAdText:k.staticMessage&&(a=k.staticMessage);this.messageText.init(MP("ad-text"),a,N);this.messageText.HD(this.U.element);this.G.show(100);this.show()}clear(){this.hide()}hide(){dxR(this,!1);super.hide();this.U.hide();this.messageText.hide();vm(this)}show(){dxR(this,!0);super.show();Ow(this);this.U.show();this.messageText.show()}L(){this.hide()}D(){if(this.V!=
null){var Z=this.V.getProgressState();Z!=null&&Z.current!=null&&(Z=1E3*Z.current,!this.xW&&Z>=this.Y?(this.G.hide(),this.xW=!0):this.messageText&&this.messageText.isTemplated()&&(Z=Math.max(0,Math.ceil((this.Y-Z)/1E3)),Z!==this.j&&(DR(this.messageText,{TIME_REMAINING:String(Z)}),this.j=Z)))}}};var IVr=class extends zR{constructor(Z,k,N,a){super(Z,{J:"div",Z:"ytp-ad-underlay-companion",A:[{J:"div",Z:"ytp-ad-underlay-side-container",A:[{J:"div",Z:"ytp-ad-underlay-image-container"},{J:"div",Z:"ytp-ad-underlay-description-container"},{J:"div",Z:"ytp-ad-underlay-headline-container"},{J:"div",Z:"ytp-ad-underlay-action-button-container"}]}]},"player-underlay",k,N,a);this.actionButton=null;this.Sm=this.Lp("ytp-ad-underlay-image-container");this.D=new UW(this.api,this.layoutId,this.interactionLoggingClientData,
this.Iq,"ytp-ad-underlay-image");g.u(this,this.D);this.D.HD(this.Sm);this.xW=this.Lp("ytp-ad-underlay-headline-container");this.U=new p4(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,"ytp-ad-underlay-headline");g.u(this,this.U);this.U.HD(this.xW);this.O=this.Lp("ytp-ad-underlay-description-container");this.Y=new p4(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,"ytp-ad-underlay-description");g.u(this,this.Y);this.Y.HD(this.O);this.j=this.Lp("ytp-ad-underlay-action-button-container");
this.V=this.Lp("ytp-ad-underlay-side-container");this.hide()}init(Z,k,N){super.init(Z,k,{});k.image&&k.image.thumbnail?k.headline?k.description?k.actionButton&&g.J(k.actionButton,Eq)?(this.D.init(MP("ad-image"),k.image,N),this.U.init(MP("ad-text"),k.headline,N),this.Y.init(MP("ad-text"),k.description,N),this.actionButton=new Bm(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,["ytp-ad-underlay-action-button"]),k.backgroundColor&&g.ij(this.element,"background-color",wcy(k.backgroundColor)),
g.u(this,this.actionButton),this.actionButton.HD(this.j),this.actionButton.init(MP("button"),g.J(k.actionButton,Eq),N),Z=g.Q5(this.api.X().experiments,"player_underlay_video_width_fraction"),this.api.X().B("place_shrunken_video_on_left_of_player")?(k=this.V,g.Wp(k,"ytp-ad-underlay-left-container"),g.jX(k,"ytp-ad-underlay-right-container"),g.ij(this.V,"margin-left",`${Math.round((Z+.02)*100)}%`)):(k=this.V,g.Wp(k,"ytp-ad-underlay-right-container"),g.jX(k,"ytp-ad-underlay-left-container")),g.ij(this.V,
"width",`${Math.round((1-Z-.04)*100)}%`),this.api.MZ()&&this.show(),this.api.addEventListener("playerUnderlayVisibilityChange",this.G.bind(this)),this.api.addEventListener("resize",this.L.bind(this))):g.b(Error("InstreamAdPlayerUnderlayRenderer has no button.")):g.b(Error("InstreamAdPlayerUnderlayRenderer has no description AdText.")):g.b(Error("InstreamAdPlayerUnderlayRenderer has no headline AdText.")):g.b(Error("InstreamAdPlayerUnderlayRenderer has no image."))}show(){XPy(!0);this.actionButton&&
this.actionButton.show();super.show()}hide(){XPy(!1);this.actionButton&&this.actionButton.hide();super.hide()}clear(){this.api.removeEventListener("playerUnderlayVisibilityChange",this.G.bind(this));this.api.removeEventListener("resize",this.L.bind(this));this.hide()}onClick(Z){super.onClick(Z);this.actionButton&&g.C1(this.actionButton.element,Z.target)&&this.api.pauseVideo()}G(Z){Z==="transitioning"?(this.V.classList.remove("ytp-ad-underlay-clickable"),this.show()):Z==="visible"?this.V.classList.add("ytp-ad-underlay-clickable"):
Z==="hidden"&&(this.hide(),this.V.classList.remove("ytp-ad-underlay-clickable"))}L(Z){Z.width>1200?(this.actionButton.element.classList.add("ytp-ad-underlay-action-button-large"),this.actionButton.element.classList.remove("ytp-ad-underlay-action-button-medium")):Z.width>875?(this.actionButton.element.classList.add("ytp-ad-underlay-action-button-medium"),this.actionButton.element.classList.remove("ytp-ad-underlay-action-button-large")):(this.actionButton.element.classList.remove("ytp-ad-underlay-action-button-large"),
this.actionButton.element.classList.remove("ytp-ad-underlay-action-button-medium"));g.ij(this.U.element,"font-size",`${Z.width/40}px`)}};var FVN=class extends zR{constructor(Z,k,N,a,T,K=()=>{}){super(Z,{J:"div",
Z:"ytp-ad-survey-answer"},"survey-answer",k,N,a);this.index=T;this.onSelected=K;this.V=null;this.toggledLoggingParams="";this.answer=this.Lp("ytp-ad-survey-answer");this.hide()}init(Z,k,N){super.init(Z,k,N);k.toggledLoggingParams&&(this.toggledLoggingParams=k.toggledLoggingParams);k.answer&&g.J(k.answer,Eq)?(Z=new Bm(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,["ytp-ad-survey-answer-button"],"survey-single-select-answer-button"),Z.HD(this.answer),Z.init(MP("ytp-ad-survey-answer-button"),
g.J(k.answer,Eq),N),Z.show()):k.answer&&g.J(k.answer,D8)&&(this.V=new b$(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,["ytp-ad-survey-answer-toggle-button"]),this.V.HD(this.answer),g.u(this,this.V),this.V.init(MP("survey-answer-button"),g.J(k.answer,D8),N));this.show()}dA(Z){this.layoutId?PM(this.Iq,Z,this.layoutId,this.macros):(Z=new g.jD("There is undefined layoutId when calling the runCommand method.",{componentType:this.componentType}),g.b(Z))}onClick(Z){super.onClick(Z);if(this.api.X().B("supports_multi_step_on_desktop")&&
this.index!==null)this.onSelected(this.index)}clear(){this.hide()}};var fVU=class extends zR{constructor(Z,k,N,a){super(Z,{J:"div",Z:"ytp-ad-survey-none-of-the-above"},"survey-none-of-the-above",k,N,a);this.button=null;this.V=this.Lp("ytp-ad-survey-none-of-the-above");this.hide()}init(Z,k,N){super.init(Z,k,N);k.answer&&g.J(k.answer,D8)&&(this.button=new b$(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,["ytp-ad-survey-answer-toggle-button","ytp-ad-survey-none-of-the-above-button"]),this.button.HD(this.V),this.button.init(MP("survey-none-of-the-above-button"),
g.J(k.answer,D8),N));this.show()}};var kUc=class extends Bm{constructor(Z,k,N,a){const T=["ytp-ad-survey-submit-button"];T.push("ytp-ad-survey-submit-button-rounded");super(Z,k,N,a,T,"survey-submit")}init(Z,k,N){super.init(Z,k,N);Z=!1;k.text&&(k=g.YL(k.text),Z=!g.a2(k));Z||g.L9(Error("No submit text was present in the renderer."))}onClick(Z){this.publish("l");super.onClick(Z)}};var uHU=class extends zR{constructor(Z,k,N,a,T){super(Z,{J:"div",Z:"ytp-ad-survey-player-overlay",A:[{J:"div",Z:"ytp-ad-survey-player-overlay-instream-info"},{J:"div",Z:"ytp-ad-survey-player-overlay-skip-preview-submit",A:[{J:"div",Z:"ytp-ad-survey-player-overlay-skip-or-preview"},{J:"div",Z:"ytp-ad-survey-player-overlay-submit"}]},{J:"div",Z:"ytp-ad-survey-player-overlay-instream-user-sentiment"}]},"survey-player-overlay",k,N,a);this.Y=T;this.U=this.V=null;this.D=this.Lp("ytp-ad-survey-player-overlay-instream-info");
this.skipOrPreview=this.Lp("ytp-ad-survey-player-overlay-skip-or-preview");this.submitButton=this.Lp("ytp-ad-survey-player-overlay-submit");g.u(this,this.Y);this.hide()}init(Z,k,N){super.init(Z,k,N);if(Z=k.skipOrPreviewRenderer)g.J(Z,GZ)?(Z=g.J(Z,GZ),N=new Cp(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,this.Y,!0),N.HD(this.skipOrPreview),N.init(MP("skip-button"),Z,this.macros),g.u(this,N),this.V=N):g.J(Z,Lq)&&(Z=g.J(Z,Lq),N=new n4(this.api,this.layoutId,this.interactionLoggingClientData,
this.Iq,this.Y,!1),N.HD(this.skipOrPreview),N.init(MP("ad-preview"),Z,this.macros),N.xW.show(100),N.show(),g.u(this,N),this.V=N);this.V==null&&(Z=Error("ISAPOR.skipOrPreviewRenderer was not initialized properly."+`ISAPOR: ${JSON.stringify(k)}`),g.b(Z));k.submitButton&&(Z=k.submitButton,g.J(Z,Eq)&&(Z=g.J(Z,Eq),N=new kUc(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq),N.HD(this.submitButton),N.init(MP("survey-submit"),Z,this.macros),g.u(this,N),this.U=N));if(Z=k.adBadgeRenderer)Z=
g.J(Z,lgf),N=new EW(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,!0,!0),N.HD(this.D),N.init(MP("simple-ad-badge"),Z,this.macros),this.adBadge=N.element,g.u(this,N);if(Z=k.adDurationRemaining)Z=g.J(Z,LAy),N=new ZB(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,this.Y,void 0,!0),N.HD(this.D),N.init(MP("ad-duration-remaining"),Z,this.macros),g.u(this,N);(k=k.adInfoRenderer)&&g.J(k,Xe)&&(Z=new yG(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,this.element,
void 0,!0),g.u(this,Z),this.adBadge!==void 0?this.D.insertBefore(Z.element,this.adBadge.nextSibling):Z.HD(this.D),Z.init(MP("ad-info-hover-text-button"),g.J(k,Xe),this.macros));this.show()}clear(){this.hide()}};var NMi=class extends zR{constructor(Z,k,N,a,T,K=()=>{}){super(Z,{J:"div",
Z:"ytp-ad-survey-question",A:[{J:"div",BD:["ytp-ad-survey-question-text","ytp-ad-survey-question-foreground"]},{J:"div",BD:["ytp-ad-survey-answers","ytp-ad-survey-question-foreground"]},{J:"div",BD:["ytp-ad-survey-question-player-overlay","ytp-ad-survey-question-foreground"]},{J:"div",Z:"ytp-ad-survey-question-background"}]},T,k,N,a);this.xW=K;this.D=null;this.U=[];this.V=null;this.G=this.api.X().experiments.yz("a11y_h5_associate_survey_question");this.question=this.Lp("ytp-ad-survey-question");this.tq=
this.Lp("ytp-ad-survey-question-background");this.questionText=this.Lp("ytp-ad-survey-question-text");this.answers=this.Lp("ytp-ad-survey-answers");this.playerOverlay=this.Lp("ytp-ad-survey-question-player-overlay");this.Y=Date.now()}init(Z,k,N){super.init(Z,k,N);LV0(this)}show(){this.Y=Date.now();super.show()}j(){}};var wPj=class extends NMi{constructor(Z,k,N,a,T){super(Z,k,N,a,"survey-question-multi-select");this.O=T;this.noneOfTheAbove=null;this.submitEndpoints=[];this.L=null;this.hide()}init(Z,k,N){super.init(Z,k,N);k.questionText&&V6X(this,k.questionText);k.answers&&k.answers.forEach((a,T)=>{g.J(a,hO)&&t6y(this,g.J(a,hO),N,T)});
this.L=new Set(this.U.map(a=>a.V.V));
(Z=k.noneOfTheAbove)&&(Z=g.J(Z,FAr))&&BFi(this,Z,N);k.surveyAdQuestionCommon&&lVr(this,k.surveyAdQuestionCommon);k.submitEndpoints&&(this.submitEndpoints=k.submitEndpoints);this.K(this.element,"change",this.onChange);this.show()}j(){mh(this.D,PJ(this),!1);this.D.U.subscribe("l",this.Sm,this)}onChange(Z){Z.target===this.noneOfTheAbove.button.V?DxG(this):this.L.has(Z.target)&&(this.noneOfTheAbove.button.toggleButton(!1),mh(this.D,PJ(this),!0))}Sm(){const Z=[],k=this.U.reduce((a,T,K)=>{const y=T.toggledLoggingParams;
T.V&&T.V.isToggled()&&y&&(a.push(y),Z.push(K));return a},[]).join("&"),N=this.submitEndpoints.map(a=>{if(!a.loggingUrls)return a;
a=g.MF(a);a.loggingUrls=a.loggingUrls.map(T=>{T.baseUrl&&(T.baseUrl=sI(T.baseUrl,k));return T});
return a});
if(N)for(const a of N)this.layoutId?PM(this.Iq,a,this.layoutId,this.macros):g.b(Error("Missing layoutId for multi_select_question."));this.api.X().B("supports_multi_step_on_desktop")&&this.O(Z)}clear(){this.api.X().B("enable_hide_on_clear_in_survey_question_bulleit")?this.hide():this.dispose()}};var gQr=class extends NMi{constructor(Z,k,N,a,T){super(Z,k,N,a,"survey-question-single-select",K=>{this.api.X().B("supports_multi_step_on_desktop")&&T([K])});
this.hide()}init(Z,k,N){super.init(Z,k,N);k.questionText&&V6X(this,k.questionText);k.answers&&k.answers.forEach((a,T)=>{g.J(a,hO)&&t6y(this,g.J(a,hO),N,T)});
k.surveyAdQuestionCommon?lVr(this,k.surveyAdQuestionCommon):Xf(Error("SurveyAdQuestionCommon was not sent."+`SingleSelectQuestionRenderer: ${JSON.stringify(k)}`));this.show()}clear(){this.api.X().B("enable_hide_on_clear_in_survey_question_bulleit")?this.hide():this.dispose()}};var bXi=class extends zR{constructor(Z,k,N,a){super(Z,{J:"div",Z:"ytp-ad-survey",A:[{J:"div",Z:"ytp-ad-survey-questions"}]},"survey",k,N,a);this.questions=[];this.U=[];this.conditioningRules=[];this.V=0;this.L=this.Lp("ytp-ad-survey-questions");this.api.X().B("fix_survey_color_contrast_on_destop")&&this.Lp("ytp-ad-survey").classList.add("color-contrast-fix");this.api.X().B("web_enable_speedmaster")&&this.Lp("ytp-ad-survey").classList.add("relative-positioning-survey");this.hide()}init(Z,k,N){super.init(Z,
k,N);this.api.X().B("supports_multi_step_on_desktop")?(this.conditioningRules=k.conditioningRules??[],this.U=k.questions??[],k.questions?.length&&iXG(this,0)):(k.questions||[]).forEach(a=>{g.J(a,HU)?OXb(this,g.J(a,HU),N):g.J(a,cU)&&vQy(this,g.J(a,cU),N)});
this.show()}clear(){this.api.X().B("enable_hide_on_clear_in_survey_question_bulleit")?this.hide():(this.hide(),this.dispose())}Y(Z){if(this.api.X().B("supports_multi_step_on_desktop"))if(this.conditioningRules?.length){let k;if(Z.length===0)this.api.onAdUxClicked("ad-action-submit-survey",this.layoutId);else if(this.conditioningRules.find(N=>N.questionIndex===this.V)==null)g.b(Error("Expected conditioning rule(s) for survey question.")),this.api.onAdUxClicked("ad-action-submit-survey",this.layoutId);
else if(this.conditioningRules.forEach(N=>{if(N.questionIndex===this.V)switch(N.condition){case "CONDITION_ALL_OF":N.answerIndices?.every(a=>Z.includes(a))&&(k=N.nextQuestionIndex);
break;case "CONDITION_ANY_OF":N.answerIndices?.some(a=>Z.includes(a))&&(k=N.nextQuestionIndex);
break;default:g.b(Error("Expected specified condition in survey conditioning rules."))}}),k!=null)iXG(this,k);
else this.api.onAdUxClicked("ad-action-submit-survey",this.layoutId)}else this.questions.length>1&&g.b(Error("No conditioning rules, yet survey is multi step. Expected questions.length to be 1.")),this.api.onAdUxClicked("ad-action-submit-survey",this.layoutId)}};var M6N=class extends zR{constructor(Z,k,N,a){super(Z,{J:"div",Z:"ytp-ad-survey-interstitial",A:[{J:"div",Z:"ytp-ad-survey-interstitial-contents",A:[{J:"div",Z:"ytp-ad-survey-interstitial-logo",A:[{J:"div",Z:"ytp-ad-survey-interstitial-logo-image"}]},{J:"div",Z:"ytp-ad-survey-interstitial-text"}]}]},"survey-interstitial",k,N,a);this.V=this.actionButton=null;this.interstitial=this.Lp("ytp-ad-survey-interstitial");this.U=this.Lp("ytp-ad-survey-interstitial-contents");this.text=this.Lp("ytp-ad-survey-interstitial-text");
this.logoImage=this.Lp("ytp-ad-survey-interstitial-logo-image");this.transition=new g.ML(this,500,!1,300);g.u(this,this.transition)}init(Z,k,N){super.init(Z,k,N);Z=k.timeoutSeconds||0;if(typeof Z!=="number"||Z<0)g.b(Error("timeoutSeconds was specified incorrectly in "+`SurveyTextInterstitialRenderer with a value of: ${Z}`));else if(k.timeoutCommands)if(k.text)if(k.ctaButton&&g.J(k.ctaButton,Eq))if(k.brandImage)if(k.backgroundImage&&g.J(k.backgroundImage,Wd)&&g.J(k.backgroundImage,Wd).landscape){this.layoutId||
g.b(Error("Missing layoutId for survey interstitial."));$x0(this.interstitial,g.J(k.backgroundImage,Wd).landscape);$x0(this.logoImage,k.brandImage);g.m_(this.text,g.YL(k.text));var a=["ytp-ad-survey-interstitial-action-button"];a.push("ytp-ad-survey-interstitial-action-button-rounded");this.actionButton=new Bm(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,a);g.u(this,this.actionButton);this.actionButton.HD(this.U);this.actionButton.init(MP("button"),g.J(k.ctaButton,Eq),N);this.actionButton.show();
this.V=new sg(this.api,Z*1E3);this.V.subscribe("g",()=>{this.transition.hide()});
g.u(this,this.V);this.K(this.element,"click",T=>{const K=T.target===this.interstitial;T=this.actionButton.element.contains(T.target);if(K||T)if(this.transition.hide(),K)this.api.onAdUxClicked(this.componentType,this.layoutId)});
this.transition.show(100)}else g.b(Error("SurveyTextInterstitialRenderer has no landscape background image."));else g.b(Error("SurveyTextInterstitialRenderer has no brandImage."));else g.b(Error("SurveyTextInterstitialRenderer has no button."));else g.b(Error("SurveyTextInterstitialRenderer has no text."));else g.b(Error("timeoutSeconds was specified yet no timeoutCommands where specified"))}clear(){this.hide()}show(){xxf(!0);super.show()}hide(){xxf(!1);super.hide()}};var aJh=class extends RB{constructor(Z,k,N,a,T,K=0){super(Z,{J:"div",Z:"ytp-preview-ad",A:[{J:"div",Z:"ytp-preview-ad__text"}]},"preview-ad",k,N,a,T);this.tq=K;this.U=0;this.xW=-1;this.Y=this.Lp("ytp-preview-ad__text");switch(this.tq){case 1:this.Y.classList.add("ytp-preview-ad__text--font--small")}this.transition=new g.ML(this,400,!1,100,()=>{this.hide()});
g.u(this,this.transition);this.hide()}init(Z,k){super.init(Z,k,{});if(k.durationMilliseconds){if(k.durationMilliseconds<0){g.b(Error("DurationMilliseconds was specified incorrectly in "+`AdPreview with a value of: ${k.durationMilliseconds}`));return}this.U=k.durationMilliseconds}else this.U=this.V.Qx();!k.previewText?.text||g.a2(k.previewText.text)?g.b(Error("No text is returned for AdPreview.")):(this.Sm=k.previewText,k.previewText.isTemplated||g.m_(this.Y,k.previewText.text),this.api.getVideoData({playerType:1})?.WU&&
k.previewImage?(Z=uD(k.previewImage?.sources||[],52,!1)?.url||"")&&Z.length?(this.previewImage=new g.af({J:"img",Z:"ytp-preview-ad__image",W:{src:"{{imageUrl}}"}}),this.previewImage.updateValue("imageUrl",Z),g.u(this,this.previewImage),this.previewImage.HD(this.element)):g.b(Error("Failed to get imageUrl in AdPreview.")):this.Y.classList.add("ytp-preview-ad__text--padding--wide"))}clear(){this.hide()}hide(){vm(this);super.hide()}show(){Ow(this);super.show()}L(){this.hide()}D(){if(this.V){var Z=this.V.getProgressState();
if(Z?.current)if(Z=1E3*Z.current,Z>=this.U)this.G();else if(this.Sm?.isTemplated&&(Z=Math.max(0,Math.ceil((this.U-Z)/1E3)),Z!==this.xW)){const k=this.Sm?.text?.replace("{TIME_REMAINING}",String(Z));k&&g.m_(this.Y,k);this.xW=Z}}}G(){this.transition.hide()}j(){this.transition.show(100);this.show()}};var VP=class extends zR{constructor(Z,k,N,a){super(Z,{J:"img",Z:"ytp-ad-avatar"},"ad-avatar",k,N,a);this.hide()}init(Z,k){super.init(Z,k,{});var N=uD(k.image?.sources||[],GBf(k),!0)?.url||"";if(N&&N.length){Z=this.Lp("ytp-ad-avatar");Z.src=N;if(N=k.interaction?.accessibility?.label)Z.alt=N;switch(k.size){case "AD_AVATAR_SIZE_XXS":this.element.classList.add("ytp-ad-avatar--size-xxs");break;case "AD_AVATAR_SIZE_XS":this.element.classList.add("ytp-ad-avatar--size-xs");break;case "AD_AVATAR_SIZE_S":this.element.classList.add("ytp-ad-avatar--size-s");
break;case "AD_AVATAR_SIZE_M":this.element.classList.add("ytp-ad-avatar--size-m");break;case "AD_AVATAR_SIZE_L":this.element.classList.add("ytp-ad-avatar--size-l");break;case "AD_AVATAR_SIZE_XL":this.element.classList.add("ytp-ad-avatar--size-xl");break;case "AD_AVATAR_SIZE_RESPONSIVE":this.element.classList.add("ytp-ad-avatar--size-responsive");break;default:this.element.classList.add("ytp-ad-avatar--size-m")}switch(k.style){case "AD_AVATAR_STYLE_ROUNDED_CORNER":this.element.classList.add("ytp-ad-avatar--rounded-corner");
break;default:this.element.classList.add("ytp-ad-avatar--circular")}}else g.b(Error("Failed to get imageUrl in AdAvatar."))}clear(){this.hide()}onClick(Z){super.onClick(Z)}};var F8=class extends zR{constructor(Z,k,N,a,T=!1){super(Z,{J:"button",Z:"ytp-ad-button-vm"},"ad-button",k,N,a);this.buttonText=this.buttonIcon=null;this.hide();this.forceDarkTheme=T}init(Z,k){super.init(Z,k,{});var N=k.label?.content;if((Z=N!=null&&!g.a2(N))||k.iconImage){Z&&(this.buttonText=new g.af({J:"span",Z:"ytp-ad-button-vm__text",Da:N}),g.u(this,this.buttonText),this.buttonText.HD(this.element));(N=k.interaction?.accessibility?.label||Z?N:"")&&SX(this.element,`${N} ${"This link opens in new tab"}`);
x3(this.element);if(k.iconImage){N=void 0;if(k.iconImage){a:{var a=k.iconImage;if(a.sources)for(T of a.sources)if(T.clientResource?.imageName||T.customImageSource&&g.J(T.customImageSource,CCU)?.clientResource?.icon)break a;var T=void 0}T&&(N={iconType:T.clientResource?.imageName})}T=Xh(N,!1,!1);T!=null&&(this.buttonIcon=new g.af({J:"span",Z:"ytp-ad-button-vm__icon",A:[T]}),g.u(this,this.buttonIcon),k.iconLeading?(qi(this.element,this.buttonIcon.element,0),this.buttonIcon.element.classList.add("ytp-ad-button-vm__icon--leading")):
Z?(this.buttonIcon.HD(this.element),this.buttonIcon.element.classList.add("ytp-ad-button-vm__icon--trailing")):(this.buttonIcon.HD(this.element),this.element.classList.add("ytp-ad-button-vm--icon-only")))}switch(k.style){case "AD_BUTTON_STYLE_TRANSPARENT":this.element.classList.add("ytp-ad-button-vm--style-transparent");break;case "AD_BUTTON_STYLE_FILLED_WHITE":this.element.classList.add("ytp-ad-button-vm--style-filled-white");break;case "AD_BUTTON_STYLE_MONO_FILLED":this.element.classList.add("ytp-ad-button-vm--style-mono-filled");
break;case "AD_BUTTON_STYLE_FILLED":this.api.B("delhi_modern_web_player")?this.element.classList.add("ytp-ad-button-vm--style-filled-white"):this.element.classList.add(this.forceDarkTheme?"ytp-ad-button-vm--style-filled-dark":"ytp-ad-button-vm--style-filled");break;default:this.element.classList.add("ytp-ad-button-vm--style-filled")}switch(k.size){case "AD_BUTTON_SIZE_COMPACT":this.element.classList.add("ytp-ad-button-vm--size-compact");break;case "AD_BUTTON_SIZE_LARGE":this.element.classList.add("ytp-ad-button-vm--size-large");
break;default:this.element.classList.add("ytp-ad-button-vm--size-default")}}else g.L9(Error("AdButton does not have label or an icon."))}clear(){this.hide()}onClick(Z){super.onClick(Z)}};var TMn=class extends RB{constructor(Z,k,N,a,T){super(Z,{J:"div",BD:["ytp-ad-avatar-lockup-card--inactive","ytp-ad-avatar-lockup-card"],A:[{J:"div",Z:"ytp-ad-avatar-lockup-card__avatar_and_text_container",A:[{J:"div",Z:"ytp-ad-avatar-lockup-card__text_container"}]}]},"ad-avatar-lockup-card",k,N,a,T);this.startMilliseconds=0;this.adAvatar=new VP(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq);g.u(this,this.adAvatar);qi(this.element,this.adAvatar.element,0);this.headline=new Nf(this.api,
this.layoutId,this.interactionLoggingClientData,this.Iq);g.u(this,this.headline);this.headline.HD(this.Lp("ytp-ad-avatar-lockup-card__text_container"));this.headline.element.classList.add("ytp-ad-avatar-lockup-card__headline");this.description=new Nf(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq);g.u(this,this.description);this.description.HD(this.Lp("ytp-ad-avatar-lockup-card__text_container"));this.description.element.classList.add("ytp-ad-avatar-lockup-card__description");this.adButton=
new F8(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq);g.u(this,this.adButton);this.adButton.HD(this.element);this.hide()}init(Z,k){super.init(Z,k,{});if(Z=g.J(k.avatar,cJ)){var N=k.headline;if(N){var a=k.description;if(a){var T=g.J(k.button,dR);T?(this.adAvatar.init(MP("ad-avatar"),Z),this.headline.init(MP("ad-simple-attributed-string"),new kt(N)),this.description.init(MP("ad-simple-attributed-string"),new kt(a)),N.content&&N.content.length>20&&this.description.element.classList.add("ytp-ad-avatar-lockup-card__description--hidden--in--small--player"),
this.adButton.init(MP("ad-button"),T),this.startMilliseconds=k.startMs||0,this.api.MZ()||this.show(),this.api.addEventListener("playerUnderlayVisibilityChange",this.U.bind(this)),Ow(this)):g.b(Error("No AdButtonViewModel is returned in PlayerAdAvatarLockupCardButtonedViewModel."))}else g.b(Error("No description is returned in PlayerAdAvatarLockupCardButtonedViewModel."))}else g.b(Error("No headline is returned in PlayerAdAvatarLockupCardButtonedViewModel."))}else g.b(Error("No AdAvatarViewModel is returned in PlayerAdAvatarLockupCardButtonedViewModel."))}D(){if(this.V){var Z=
this.V.getProgressState();Z&&Z.current&&1E3*Z.current>=this.startMilliseconds&&(vm(this),this.element.classList.remove("ytp-ad-avatar-lockup-card--inactive"))}}L(){this.clear()}onClick(Z){this.api.pauseVideo();super.onClick(Z)}clear(){this.hide();this.api.removeEventListener("playerUnderlayVisibilityChange",this.U.bind(this))}show(){this.adAvatar.show();this.headline.show();this.description.show();this.adButton.show();super.show()}hide(){this.adAvatar.hide();this.headline.hide();this.description.hide();
this.adButton.hide();super.hide()}U(Z){Z==="hidden"?this.show():this.hide()}};var K_a=class extends zR{constructor(Z,k,N,a){super(Z,{J:"button",Z:"ytp-skip-ad-button",A:[{J:"div",Z:"ytp-skip-ad-button__text"}]},"skip-button",k,N,a);this.U=!1;this.L=this.Lp("ytp-skip-ad-button__text");this.transition=new g.ML(this,500,!1,100,()=>{this.hide()});
g.u(this,this.transition);this.V=new IB(this.element,15E3,5E3,.5,.5,!0);g.u(this,this.V);this.hide()}init(Z,k){super.init(Z,k,{});if(!k.label||g.a2(k.label))g.b(Error("No label is returned for SkipAdButton."));else if(g.m_(this.L,k.label),Z=Xh({iconType:"SKIP_NEXT_NEW"},!1,!1,this.api.B("delhi_modern_web_player_icons")),Z==null)g.b(Error("Unable to retrieve icon for SkipAdButton"));else if(this.D=new g.af({J:"span",Z:"ytp-skip-ad-button__icon",A:[Z]}),g.u(this,this.D),this.D.HD(this.element),this.api.X().experiments.yz("enable_skip_to_next_messaging")&&
(k=g.qc(k.targetId)))this.U=!0,this.element.setAttribute("data-tooltip-target-id",k),this.element.setAttribute("data-tooltip-target-fixed","")}onClick(Z){Z&&Z.preventDefault();lrb(Z,{contentCpn:this.api.getVideoData({playerType:1})?.clientPlaybackNonce??""})===0?g.A7(this.api,"onAbnormalityDetected"):(super.onClick(Z),g.A7(this.api,"onAdSkip"),this.api.onAdUxClicked(this.componentType,this.layoutId))}clear(){this.V.reset();this.hide()}hide(){super.hide()}show(){this.V.start();super.show();this.U&&
this.api.X().experiments.yz("enable_skip_to_next_messaging")&&this.api.publish("showpromotooltip",this.element)}Y(){this.transition.show();this.show()}};var yIH=class extends RB{constructor(Z,k,N,a,T){super(Z,{J:"div",Z:"ytp-skip-ad"},"skip-ad",k,N,a,T);this.skipOffsetMilliseconds=0;this.isSkippable=!1;this.Y=new K_a(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq);g.u(this,this.Y);this.Y.HD(this.element);this.hide()}init(Z,k){super.init(Z,k,{});Z=g.J(k.preskipState,$by);if(this.api.getVideoData()?.isDaiEnabled()){if(!Z){g.b(Error("No AdPreviewViewModel is returned in SkipAdViewModel."));return}this.U=new aJh(this.api,this.layoutId,
this.interactionLoggingClientData,this.Iq,this.V);g.u(this,this.U);this.U.HD(this.element);this.U?.init(MP("preview-ad"),Z);this.U?.j()}(Z=g.J(k.skippableState,G6b))?(k.skipOffsetMilliseconds!=null?this.skipOffsetMilliseconds=k.skipOffsetMilliseconds:(g.L9(Error("No skipOffsetMilliseconds is returned in SkipAdViewModel.")),this.skipOffsetMilliseconds=5E3),this.Y.init(MP("skip-button"),Z),this.show()):g.b(Error("No SkipAdButtonViewModel is returned in SkipAdViewModel."))}show(){Ow(this);super.show()}hide(){!this.isSkippable&&
this.U?this.U.hide():this.Y&&this.Y.hide();vm(this);super.hide()}clear(){this.U?.clear();this.Y&&this.Y.clear();vm(this);super.hide()}L(){this.hide()}D(){1E3*this.V.getProgressState().current>=this.skipOffsetMilliseconds&&!this.isSkippable&&(this.isSkippable=!0,this.U?.G(),this.Y?.Y())}};var Q4H=class extends zR{constructor(Z,k,N,a){super(Z,{J:"div",Z:"ytp-visit-advertiser-link"},"visit-advertiser-link",k,N,a);this.hide()}init(Z,k){super.init(Z,k,{});k.label?(k.label?.content&&!g.a2(k.label.content)&&(this.linkText=new g.af({J:"span",Z:"ytp-visit-advertiser-link__text",Da:k.label.content}),g.u(this,this.linkText),this.linkText.HD(this.element)),k.interaction?.accessibility?.label?SX(this.element,`${k.interaction.accessibility.label} ${"This link opens in new tab"}`):k.label?.content&&
!g.a2(k.label.content)&&SX(this.element,`${k.label.content} ${"This link opens in new tab"}`),x3(this.element),this.element.setAttribute("tabindex","0"),this.show()):g.b(Error("No label found in VisitAdvertiserLink."))}onClick(Z){super.onClick(Z);this.api.onAdUxClicked(this.componentType,this.layoutId)}clear(){this.hide()}};var Uxf=class extends zR{constructor(Z,k,N,a,T){super(Z,{J:"div",Z:"ytp-ad-player-overlay-layout",A:[{J:"div",Z:"ytp-ad-player-overlay-layout__player-card-container"},{J:"div",Z:"ytp-ad-player-overlay-layout__ad-info-container"},{J:"div",Z:"ytp-ad-player-overlay-layout__skip-or-preview-container"},{J:"div",Z:"ytp-ad-player-overlay-layout__ad-disclosure-banner-container"}]},"player-overlay-layout",k,N,a);this.U=T;this.O=this.Lp("ytp-ad-player-overlay-layout__player-card-container");this.V=this.Lp("ytp-ad-player-overlay-layout__ad-info-container");
this.G=this.Lp("ytp-ad-player-overlay-layout__skip-or-preview-container");this.j=this.Lp("ytp-ad-player-overlay-layout__ad-disclosure-banner-container");this.hide()}init(Z,k,N,a){super.init(Z,k,{});let T;k.skipOrPreview&&(N=k.skipOrPreview,Z=g.J(N,S4y),N=g.J(N,$by),Z?(this.Ik=new yIH(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,this.U),g.u(this,this.Ik),this.Ik.HD(this.G),this.Ik.init(MP("skip-ad"),Z)):N&&this.api.getVideoData()?.isDaiEnabled()&&(this.Y=new aJh(this.api,this.layoutId,
this.interactionLoggingClientData,this.Iq,this.U,1),g.u(this,this.Y),this.Y.HD(this.G),this.Y.init(MP("ad-preview"),N),this.Y.j()),Z=g.J(k.skipOrPreview,S4y))&&(T=Z.skipOffsetMilliseconds);k.playerAdCard&&(Z=g.J(k.playerAdCard,xbf))&&(this.playerAdCard=new TMn(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,this.U),g.u(this,this.playerAdCard),this.playerAdCard.HD(this.O),this.playerAdCard.init(MP("ad-avatar-lockup-card"),Z));k.adBadgeRenderer&&((Z=g.J(k.adBadgeRenderer,HJ))?(this.D=
new am(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,!0),g.u(this,this.D),this.D.HD(this.V),this.D.init(MP("ad-badge"),Z)):g.b(Error("AdBadgeViewModel is not found in player overlay layout.")));k.adPodIndex&&(Z=g.J(k.adPodIndex,vDj))&&(this.adPodIndex=new qVy(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq),g.u(this,this.adPodIndex),this.adPodIndex.HD(this.V),this.adPodIndex.init(MP("ad-pod-index"),Z));k.adInfoRenderer&&((Z=g.J(k.adInfoRenderer,Xe))?(this.adInfoButton=
new yG(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,this.element,void 0,!0),g.u(this,this.adInfoButton),this.D!==void 0?this.V.insertBefore(this.adInfoButton.element,this.D.element.nextSibling):this.adInfoButton.HD(this.V),this.adInfoButton.init(MP("ad-info-hover-text-button"),Z,this.macros)):g.L9(Error("AdInfoRenderer is not found in player overlay layout.")));Z=this.api.getVideoData()?.isDaiEnabled();k.adDurationRemaining&&Z&&(Z=g.J(k.adDurationRemaining,LAy))&&(this.adDurationRemaining=
new ZB(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,this.U,a.videoAdDurationSeconds,!0),g.u(this,this.adDurationRemaining),this.adPodIndex!==void 0?this.V.insertBefore(this.adDurationRemaining.element,this.adPodIndex.element.nextSibling):this.adDurationRemaining.HD(this.V),this.adDurationRemaining.init(MP("ad-duration-remaining"),Z,this.macros),this.adDurationRemaining.element.classList.add("ytp-ad-duration-remaining-autohide"));k.visitAdvertiserLink&&(a=g.J(k.visitAdvertiserLink,
oDf))&&(this.visitAdvertiserLink=new Q4H(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq),g.u(this,this.visitAdvertiserLink),this.visitAdvertiserLink.HD(this.V),this.visitAdvertiserLink.init(MP("visit-advertiser-link"),a));k.adDisclosureBanner&&(k=g.J(k.adDisclosureBanner,OTf))&&(this.adDisclosureBanner=new rTf(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq),g.u(this,this.adDisclosureBanner),this.adDisclosureBanner.HD(this.j),this.adDisclosureBanner.init(MP("ad-disclosure-banner"),
k));this.L=new AG(this.api,this.U,T,!0);g.u(this,this.L);g.$n(this.api,this.L.element,4);this.show()}clear(){this.hide()}};var qQH=class extends zR{constructor(Z,k,N,a){super(Z,{J:"div",Z:"ytp-ad-grid-card-text",A:[{J:"div",Z:"ytp-ad-grid-card-text__metadata",A:[{J:"div",Z:"ytp-ad-grid-card-text__metadata__headline"},{J:"div",Z:"ytp-ad-grid-card-text__metadata__description",A:[{J:"div",Z:"ytp-ad-grid-card-text__metadata__description__line"},{J:"div",Z:"ytp-ad-grid-card-text__metadata__description__line"}]}]},{J:"div",Z:"ytp-ad-grid-card-text__button"}]},"ad-grid-card-text",k,N,a);this.headline=new Nf(this.api,this.layoutId,
this.interactionLoggingClientData,this.Iq);g.u(this,this.headline);this.headline.HD(this.Lp("ytp-ad-grid-card-text__metadata__headline"));this.moreInfoButton=new F8(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,!0);g.u(this,this.moreInfoButton);this.moreInfoButton.HD(this.Lp("ytp-ad-grid-card-text__button"))}init(Z,k){super.init(Z,k,{});if(k?.title)if(Z=k.title)if(this.headline.init(MP("ad-simple-attributed-string"),new kt(Z)),Z=g.J(k.moreInfoButton,dR)){if(this.moreInfoButton.init(MP("ad-button"),
Z),k.descriptions)k.descriptions.length>0&&(Z=k.descriptions[0])&&(this.V=new Nf(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq),g.u(this,this.V),this.V.HD(this.element.getElementsByClassName("ytp-ad-grid-card-text__metadata__description__line")[0]),this.V.init(MP("ad-simple-attributed-string"),new kt(Z))),k.descriptions.length>1&&(k=k.descriptions[1])&&(this.U=new Nf(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq),g.u(this,this.U),this.U.HD(this.element.getElementsByClassName("ytp-ad-grid-card-text__metadata__description__line")[1]),
this.U.init(MP("ad-simple-attributed-string"),new kt(k)))}else g.b(Error("No AdButtonViewModel is returned in AdGridCardText."));else g.b(Error("No headline found in AdGridCardText."));else g.b(Error("No headline found in AdGridCardText."))}onClick(Z){super.onClick(Z);this.api.pauseVideo();this.api.onAdUxClicked(this.componentType,this.layoutId)}clear(){this.hide();this.headline.clear();this.moreInfoButton.clear();this.V?.clear();this.U?.clear()}hide(){this.headline.hide();this.moreInfoButton.hide();
this.V?.hide();this.U?.hide();super.hide()}show(){super.show();this.headline.show();this.moreInfoButton.show();this.V?.show();this.U?.show()}};var rID=class extends zR{constructor(Z,k,N,a){super(Z,{J:"div",Z:"ytp-ad-grid-card-collection"},"ad-grid-card-collection",k,N,a);this.V=[]}init(Z,k){super.init(Z,k,{});if(k?.gridCards)if(k.style!=="AD_GRID_CARD_COLLECTION_STYLE_FIXED_ONE_COLUMN")g.b(Error("Only single column style is currently supported in AdGridCardCollection."));else for(const N of k.gridCards){if(k=g.J(N,wNb))Z=new qQH(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq),g.u(this,Z),Z.HD(this.element),Z.init(MP("ad-grid-card-text"),
k),this.V.push(Z)}else g.b(Error("No grid cards found in AdGridCardCollection."))}show(){for(const Z of this.V)Z.show();super.show()}clear(){this.hide();for(const Z of this.V)Z.clear()}hide(){for(const Z of this.V)Z.hide();super.hide()}};var Cja=class extends RB{constructor(Z,k,N,a,T){super(Z,{J:"div",Z:"ytp-display-underlay-text-grid-cards",A:[{J:"div",Z:"ytp-display-underlay-text-grid-cards__content_container",A:[{J:"div",Z:"ytp-display-underlay-text-grid-cards__content_container__header",A:[{J:"div",Z:"ytp-display-underlay-text-grid-cards__content_container__header__ad_avatar"},{J:"div",Z:"ytp-display-underlay-text-grid-cards__content_container__header__headline"}]},{J:"div",Z:"ytp-display-underlay-text-grid-cards__content_container__ad_grid_card_collection"},
{J:"div",Z:"ytp-display-underlay-text-grid-cards__content_container__ad_button"}]}]},"display-underlay-text-grid-cards",k,N,a,T);this.playerProgressOffsetMs=0;this.U=!1}init(Z,k,N,a,T=0){super.init(Z,k,N,a);this.playerProgressOffsetMs=T;Ow(this);this.api.addEventListener("playerUnderlayVisibilityChange",this.j.bind(this));this.api.addEventListener("resize",this.G.bind(this));this.api.MZ()?(this.U=!0,this.api.wk(!0),this.show()):this.hide()}D(){if(this.V){var Z=this.V.getProgressState();Z&&Z.current&&
!this.U&&1E3*Z.current>=this.playerProgressOffsetMs&&(this.U=!0,this.api.wk(!0),this.show())}}L(){this.U&&this.api.wk(!1);this.hide()}clear(){this.api.wk(!1);this.api.removeEventListener("playerUnderlayVisibilityChange",this.j.bind(this));this.api.removeEventListener("resize",this.G.bind(this));vm(this);this.hide()}hide(){StU(!1);super.hide()}show(){StU(!0);super.show()}};var j_N=class extends Cja{constructor(Z,k,N,a,T){super(Z,k,N,a,T);this.adGridCardCollection=new rID(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq);g.u(this,this.adGridCardCollection);this.adGridCardCollection.HD(this.Lp("ytp-display-underlay-text-grid-cards__content_container__ad_grid_card_collection"));this.adButton=new F8(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq);g.u(this,this.adButton);this.adButton.HD(this.Lp("ytp-display-underlay-text-grid-cards__content_container__ad_button"));
this.Y=this.Lp("ytp-display-underlay-text-grid-cards__content_container");this.xW=this.Lp("ytp-display-underlay-text-grid-cards__content_container__header")}init(Z,k,N,a){if(k?.adGridCardCollection)if(k?.adButton){var T=Number(k.playerProgressOffsetMs||"0");isNaN(T)?super.init(Z,k,N,a):super.init(Z,k,N,a,T);Z=k.headline;N=g.J(k.adAvatar,cJ);Z&&N?(this.headline=new Nf(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq),g.u(this,this.headline),this.headline.HD(this.Lp("ytp-display-underlay-text-grid-cards__content_container__header__headline")),
this.headline.init(MP("ad-simple-attributed-string"),new kt(Z)),this.adAvatar=new VP(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq),g.u(this,this.adAvatar),this.adAvatar.HD(this.Lp("ytp-display-underlay-text-grid-cards__content_container__header__ad_avatar")),this.adAvatar.init(MP("ad-avatar"),N)):this.xW.classList.remove("ytp-display-underlay-text-grid-cards__content_container__header");Z=g.J(k.adGridCardCollection,gDf);this.adGridCardCollection.init(MP("ad-grid-card-collection"),
Z);k=g.J(k.adButton,dR);this.adButton.init(MP("ad-button"),k);this.hide()}else g.b(Error("No button found in DisplayUnderlayTextGridCardsLayout."));else g.b(Error("No grid cards found in DisplayUnderlayTextGridCardsLayout."))}onClick(Z){(this.adButton&&g.C1(this.adButton.element,Z.target)||this.adAvatar&&g.C1(this.adAvatar.element,Z.target))&&this.api.pauseVideo();super.onClick(Z);this.api.onAdUxClicked(this.componentType,this.layoutId)}G(){}clear(){this.hide();this.headline?.clear();this.adAvatar?.clear();
this.adGridCardCollection.clear();this.adButton.clear();super.clear()}show(){this.headline?.show();this.adAvatar?.show();this.adGridCardCollection.show();this.adButton.show();super.show()}hide(){this.headline?.hide();this.adAvatar?.hide();this.adGridCardCollection.hide();this.adButton.hide();super.hide()}j(Z){Z==="transitioning"?(this.Y.classList.remove("ytp-ad-underlay-clickable"),this.show()):Z==="visible"?this.Y.classList.add("ytp-ad-underlay-clickable"):Z==="hidden"&&(this.hide(),this.Y.classList.remove("ytp-ad-underlay-clickable"))}};var miD=class extends zR{constructor(Z,k,N,a){super(Z,{J:"div",Z:"ytp-ad-details-line"},"ad-details-line",k,N,a);this.V=[];this.hide()}init(Z,k){super.init(Z,k,{});if(k.attributes===void 0)g.b(Error("No attributes found in AdDetailsLineViewModel."));else if(k.style===void 0)g.b(Error("No style found in AdDetailsLineViewModel."));else{for(const a of k.attributes)if(a.text!==void 0){Z=a.text;var N=k.style;const T=new Nf(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq);g.u(this,T);T.HD(this.element);
a:switch(N){case "AD_DETAILS_LINE_STYLE_RESPONSIVE":N="ytp-ad-details-line__text--style-responsive";break a;default:N="ytp-ad-details-line__text--style-standard"}T.element.classList.add(N);T.init(MP("ad-simple-attributed-string"),new kt(Z));this.V.push(T)}this.show()}}show(){this.V.forEach(Z=>{Z.show()});
super.show()}clear(){this.hide()}hide(){this.V.forEach(Z=>{Z.hide()});
super.hide()}};var s4K=class extends zR{constructor(Z,k,N,a){super(Z,{J:"div",Z:"ytp-image-background",A:[{J:"img",Z:"ytp-image-background-image"}]},"image-background",k,N,a);this.hide()}init(Z,k){super.init(Z,k,{});if((Z=uD(k.image?.sources||[])?.url||"")&&Z.length){var N=this.Lp("ytp-image-background-image");g.ij(N,"backgroundImage",`url(${Z})`);k.blurLevel!==void 0&&g.ij(N,"filter",`blur(${k.blurLevel}px)`);k.gradient!==void 0&&(k=new g.E({J:"div",BD:["ytp-image-background--gradient-vertical"]}),g.u(this,k),
k.HD(this.element));this.show()}else g.b(Error("Failed to get imageUrl in ImageBackground."))}clear(){this.hide()}};var AIJ=class extends RB{constructor(Z,k,N,a,T){super(Z,{J:"svg",Z:"ytp-timed-pie-countdown",W:{viewBox:"0 0 20 20"},A:[{J:"circle",Z:"ytp-timed-pie-countdown__background",W:{r:"10",cx:"10",cy:"10"}},{J:"circle",Z:"ytp-timed-pie-countdown__inner",W:{r:"5",cx:"10",cy:"10"}},{J:"circle",Z:"ytp-timed-pie-countdown__outer",W:{r:"10",cx:"10",cy:"10"}}]},"timed-pie-countdown",k,N,a,T);this.Y=this.Lp("ytp-timed-pie-countdown__inner");this.U=Math.ceil(2*Math.PI*5);this.hide()}init(Z,k){super.init(Z,k,{});
g.ij(this.Y,"stroke-dasharray",`0 ${this.U}`);this.show()}clear(){this.hide()}hide(){vm(this);super.hide()}show(){Ow(this);super.show()}L(){this.hide()}D(){if(this.V){var Z=this.V.getProgressState();Z!=null&&Z.current!=null&&g.ij(this.Y,"stroke-dasharray",`${Z.current/Z.seekableEnd*this.U} ${this.U}`)}}};var REy=class extends zR{constructor(Z,k,N,a){super(Z,{J:"div",Z:"ytp-video-interstitial-buttoned-centered-layout",W:{tabindex:"0"},A:[{J:"div",Z:"ytp-video-interstitial-buttoned-centered-layout__content",A:[{J:"div",Z:"ytp-video-interstitial-buttoned-centered-layout__content__instream-info-container"},{J:"div",Z:"ytp-video-interstitial-buttoned-centered-layout__content__lockup",A:[{J:"div",Z:"ytp-video-interstitial-buttoned-centered-layout__content__lockup__ad-avatar-container"},{J:"div",Z:"ytp-video-interstitial-buttoned-centered-layout__content__lockup__headline-container"},
{J:"div",Z:"ytp-video-interstitial-buttoned-centered-layout__content__lockup__details-line-container"},{J:"div",Z:"ytp-video-interstitial-buttoned-centered-layout__content__lockup__ad-button-container"}]}]},{J:"div",Z:"ytp-video-interstitial-buttoned-centered-layout__timed-pie-countdown-container"}]},"video-interstitial-buttoned-centered",k,N,a);this.U=null;this.Y=this.Lp("ytp-video-interstitial-buttoned-centered-layout__content__instream-info-container");this.D=new i$;g.u(this,this.D);this.hide()}init(Z,
k){super.init(Z,k,{});if(oQb(k)){this.adAvatar=new VP(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq);g.u(this,this.adAvatar);this.adAvatar.HD(this.Lp("ytp-video-interstitial-buttoned-centered-layout__content__lockup__ad-avatar-container"));this.adAvatar.init(MP("ad-avatar"),g.J(k.adAvatar,cJ));this.headline=new Nf(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq);g.u(this,this.headline);this.headline.HD(this.Lp("ytp-video-interstitial-buttoned-centered-layout__content__lockup__headline-container"));
this.headline.element.classList.add("ytp-video-interstitial-buttoned-centered-layout__content__lockup__headline");this.headline.init(MP("ad-simple-attributed-string"),new kt(k.headline));if(Z=g.J(k.adDetailsLine,Dbf))this.detailsLine=new miD(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq),g.u(this,this.detailsLine),this.detailsLine.HD(this.Lp("ytp-video-interstitial-buttoned-centered-layout__content__lockup__details-line-container")),this.detailsLine.init(MP("ad-details-line"),Z);
this.adButton=new F8(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,!0);g.u(this,this.adButton);this.adButton.HD(this.Lp("ytp-video-interstitial-buttoned-centered-layout__content__lockup__ad-button-container"));this.adButton.init(MP("ad-button"),g.J(k.adButton,dR));this.adBadge=new am(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,!0);g.u(this,this.adBadge);this.adBadge.HD(this.Y);this.adBadge.init(MP("ad-badge"),g.J(k.adBadge,HJ));this.adInfoButton=new yG(this.api,
this.layoutId,this.interactionLoggingClientData,this.Iq,this.element,void 0,!0);g.u(this,this.adInfoButton);this.adInfoButton.HD(this.Y);this.adInfoButton.init(MP("ad-info-hover-text-button"),g.J(k.adInfoRenderer,Xe),this.macros);if(Z=g.J(k.skipAdButton,G6b))this.skipAdButton=new K_a(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq),g.u(this,this.skipAdButton),this.skipAdButton.HD(this.element),this.skipAdButton.init(MP("skip-button"),Z);this.U=new Yf(k.durationMilliseconds);g.u(this,
this.U);if(Z=g.J(k.countdownViewModel,eCN))this.V=new AIJ(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq,this.U),g.u(this,this.V),this.V.HD(this.Lp("ytp-video-interstitial-buttoned-centered-layout__timed-pie-countdown-container")),this.V.init(MP("timed-pie-countdown"),Z);if(k=g.J(k.imageBackground,iTf))this.imageBackground=new s4K(this.api,this.layoutId,this.interactionLoggingClientData,this.Iq),g.u(this,this.imageBackground),this.imageBackground.HD(this.element),this.imageBackground.element.classList.add("ytp-video-interstitial-buttoned-centered-layout__background-image-container"),
this.imageBackground.init(MP("image-background"),k);this.show();this.element.focus()}}clear(){this.D.U();this.hide()}show(){eER(!0);this.adAvatar&&this.adAvatar.show();this.headline&&this.headline.show();this.adButton&&this.adButton.show();this.skipAdButton&&this.skipAdButton.show();super.show()}hide(){eER(!1);this.adAvatar&&this.adAvatar.hide();this.headline&&this.headline.hide();this.adButton&&this.adButton.hide();this.detailsLine&&this.detailsLine.hide();this.adBadge&&this.adBadge.hide();this.adInfoButton&&
this.adInfoButton.hide();this.skipAdButton&&this.skipAdButton.hide();this.V&&this.V.hide();this.imageBackground&&this.imageBackground.hide();super.hide()}};var Xc=class extends g.n9{constructor(Z,k=2){super();this.api=Z;this.V=null;this.handler=new i$(this);g.u(this,this.handler);this.U=Nhj;this.handler.K(this.api,"presentingplayerstatechange",this.D);this.V=this.handler.K(this.api,"progresssync",this.MW);this.uy=k;this.uy===1&&this.MW()}Qx(){return 1E3*this.api.getDuration({playerType:this.uy,OP:!1})}stop(){this.V&&this.handler.Ce(this.V)}MW(){const Z=this.api.getProgressState(this.uy);this.U={seekableStart:Z.seekableStart,seekableEnd:Z.seekableEnd,
current:this.api.getCurrentTime({playerType:this.uy,OP:!1})};this.publish("h")}getProgressState(){return this.U}D(Z){Z.Ub(2)&&this.publish("g")}};var Pji="ad-attribution-bar ad-channel-thumbnail advertiser-name ad-preview ad-title skip-button visit-advertiser".split(" ").concat("shopping-companion action-companion image-companion ads-engagement-panel ads-engagement-panel-layout banner-image top-banner-image-text-icon-buttoned".split(" ")),cIH=class extends kDR{constructor(Z,k,N){super(Z);this.api=Z;this.Iq=k;this.components={};Z=new g.E({J:"div",BD:["video-ads","ytp-ad-module"]});g.u(this,Z);oZ&&g.jX(Z.element,"ytp-ads-tiny-mode");this.L=new xf(Z.element);
g.u(this,this.L);g.$n(this.api,Z.element,4);hC(N)&&(N=new g.E({J:"div",BD:["ytp-ad-underlay"]}),g.u(this,N),this.D=new xf(N.element),g.u(this,this.D),g.$n(this.api,N.element,0));g.u(this,arf())}Y(Z){var k=Z.id,N=Z.content;const a=N.componentType;if(!Pji.includes(a))switch(Z.actionType){case 1:Z=EQU(a,this.api,this.Iq,N.layoutId,N.interactionLoggingClientData,N instanceof da?N.Gz:!1,N instanceof da||N instanceof WW?N.mR:!1);if(!Z){g.L9(Error("No UI component returned from ComponentFactory for type: "+
a));break}g.Ge(this.components,k)?g.L9(Error("Ad UI component already registered: "+k)):this.components[k]=Z;Z.bind(N);N instanceof aKN?this.D?this.D.append(Z.eQ):g.L9(Error("Underlay view was not created but UnderlayRenderer was created")):this.L.append(Z.eQ);break;case 2:k=WVX(this,Z);if(k==null)break;k.bind(N);break;case 3:N=WVX(this,Z),N!=null&&(g.nM(N),g.Ge(this.components,k)?(N=this.components,k in N&&delete N[k]):g.L9(Error("Ad UI component does not exist: "+k)))}}YW(){g.Il(Object.values(this.components));
this.components={};super.YW()}};var H1n=class extends g.oS{constructor(Z){super(Z);this.U=null;this.created=!1;this.D=new Jgh(this.player);this.Y=()=>this.U!=null?this.U:this.U=(new Ucc({L5:Nj(this.V).L5,cZ:Nj(this.V).cZ,S:this.player,t$:Nj(this.V).t$,Za:this.V.V.Za,BZ:Nj(this.V).BZ,fC:this.V.V.fC})).U;
this.V=new WEF(this.player,this,this.D,this.Y);g.u(this,this.V);const k=Z.X();!yw(k)||g.CQ(k)||LQ(k)||(g.u(this,new cIH(Z,Nj(this.V).Iq,Nj(this.V).t$)),g.u(this,new Yfc(Z)))}create(){try{NRj(this),this.load(),this.created=!0,NRj(this)}catch(Z){wm(Z instanceof Error?Z:String(Z))}}load(){this.L()}L(){super.load();var Z=Nj(this.V).t$;try{this.player.getRootNode().classList.add("ad-created")}catch(y){wm(y instanceof Error?y:String(y))}var k=this.player.getVideoData({playerType:1});const N=k&&k.videoId||
"";var a=k&&k.getPlayerResponse()||{},T=(a&&a.adPlacements||[]).map(y=>y.adPlacementRenderer),K=(a?.adSlots||[]).map(y=>g.J(y,PU));
a=a.playerConfig&&a.playerConfig.daiConfig&&a.playerConfig.daiConfig.enableDai||!1;k&&k.Rn();Z=YtX(T,K,Z,Nj(this.V).oT);T=k&&k.clientPlaybackNonce||"";k=k&&k.Z9||!1;K=1E3*this.player.getDuration({playerType:1});this.player.getVideoData({playerType:1})?.Z9||Q_j(this.player)&&bIN(this.player.getInternalApi());this.V.V.h7.mL(T,K,k,Z.Ms,Z.VY,Z.Ms,a,N)}destroy(){const Z=this.player.getVideoData({playerType:1});this.V.V.h7.Sw(Z&&Z.clientPlaybackNonce||"");this.unload();this.created=!1}unload(){super.unload();
try{this.player.getRootNode().classList.remove("ad-created")}catch(Z){wm(Z instanceof Error?Z:String(Z))}if(this.U!=null){const Z=this.U;this.U=null;Z.dispose()}this.D.reset()}CD(){return!1}getAdState(){return-1}getOptions(){return Object.values(zga)}kd(Z,k={}){switch(Z){case "replaceUrlMacros":return k.url?(Z=ixX(this.player),Object.assign(Z,k.TDa),k=g.hm(k.url,Z)):k=null,k;case "onAboutThisAdPopupClosed":this.tb(k);break;case "executeCommand":k.command&&k.layoutId&&this.executeCommand(k);break;
default:return null}}FP(Z,k){return!!this.V.V.a4?.get().FP(Z,k)}tb(Z){Z.isMuted&&E_N(Nj(this.V).BZ,Nj(this.V).L5,Z.layoutId);this.y5&&this.y5.tb()}executeCommand(Z){Nj(this.V).Iq.executeCommand(Z.command,Z.layoutId)}};g.X0("yt.player.Application.create",g.aw.create);g.X0("yt.player.Application.createAlternate",g.aw.create);jli(Pg(),oKF);var dii=g.Vf("ytcsi.tick");dii&&dii("pe");g.o1("ad",H1n);g.XKa=class extends g.jR{constructor(Z){super();this.callback=Z;this.V=new PG(0,0,.4,0,.2,1,1,1);this.delay=new g.o3(this.next,window,this);g.u(this,this.delay)}start(Z,k,N){this.config={from:Z,to:k,duration:N,startTime:(0,g.z)()};this.next()}stop(){this.delay.stop();this.config=void 0}next(){if(this.config){var Z=this.config.from,k=this.config.to,N=this.config.duration,a=this.config.startTime;a=(0,g.z)()-a;var T=this.V;N=g.u0(HG(T,dQ(T,a/N)),0,1);this.callback(Z+(k-Z)*N);N<1&&this.delay.start()}}};g.L_F=class extends g.E{constructor(Z){super({J:"div",Z:"ytp-more-videos-view",W:{tabIndex:"-1"}});this.api=Z;this.U=!0;this.D=new g.tt(this);this.V=[];this.suggestionData=[];this.columns=this.containerWidth=this.j=this.Y=this.scrollPosition=0;this.title=new g.E({J:"h2",Z:"ytp-related-title",Da:"{{title}}"});this.previous=new g.E({J:"button",BD:["ytp-button","ytp-previous"],W:{"aria-label":"Show previous suggested videos"},A:[g.N4()]});this.G=new g.XKa(k=>{this.suggestions.element.scrollLeft=-k});
this.next=new g.E({J:"button",BD:["ytp-button","ytp-next"],W:{"aria-label":"Show more suggested videos"},A:[g.aJ()]});g.u(this,this.D);this.L=Z.X().Y;g.u(this,this.title);this.title.HD(this.element);this.suggestions=new g.E({J:"div",Z:"ytp-suggestions"});g.u(this,this.suggestions);this.suggestions.HD(this.element);g.u(this,this.previous);this.previous.HD(this.element);this.previous.listen("click",this.N,this);g.u(this,this.G);TRi(this);g.u(this,this.next);this.next.HD(this.element);this.next.listen("click",
this.C,this);this.D.K(this.api,"appresize",this.qx);this.D.K(this.api,"fullscreentoggled",this.TB);this.D.K(this.api,"videodatachange",this.onVideoDataChange);this.qx(this.api.fF().getPlayerSize());this.onVideoDataChange()}hasSuggestions(){return this.suggestionData.length>0}C(){this.U&&this.scrollTo(this.scrollPosition-this.containerWidth)}show(){super.show();Khb(this)}N(){this.U&&this.scrollTo(this.scrollPosition+this.containerWidth)}TB(){this.qx(this.api.fF().getPlayerSize())}qx(Z){var k=this.api.isEmbedsShortsMode()?
.5625:16/9,N=this.api.dQ();Z=Z.width-(N?112:58);N=Math.ceil(Z/(N?320:192));const a=(Z-N*8)/N;k=Math.floor(a/k);for(const T of this.V){const K=T.Lp("ytp-suggestion-image");K.style.width=`${a}px`;K.style.height=`${k}px`}this.suggestions.element.style.height=`${k}px`;this.Y=a;this.j=k;this.containerWidth=Z;this.columns=N;this.scrollPosition=0;this.suggestions.element.scrollLeft=-0;g.tG(this)}onVideoDataChange(){const Z=this.api.X(),k=this.api.getVideoData();this.L=k.o4?!1:Z.Y;this.suggestionData=k.suggestions?
g.Ry(k.suggestions,N=>N&&!N.playlistId):[];
Qfj(this);k.o4?this.title.update({title:g.DH("More videos from $DNI_RELATED_CHANNEL",{DNI_RELATED_CHANNEL:k.author})}):this.title.update({title:this.api.isEmbedsShortsMode()?"More shorts":"More videos"})}scrollTo(Z){Z=g.u0(Z,this.containerWidth-this.suggestionData.length*(this.Y+8),0);this.G.start(this.scrollPosition,Z,1E3);this.scrollPosition=Z;g.tG(this);Khb(this)}};})(_yt_player);
(function() {
  console.log("VidYT: Inline sidebar logic loaded");

  const injectInlineResults = () => {
    if (document.getElementById('vidyt-sidebar-container')) return;

    // Target the secondary column where VidIQ usually sits
    const secondary = document.querySelector('#secondary-inner') || document.querySelector('#secondary');
    if (!secondary) return;

    const container = document.createElement('div');
    container.id = 'vidyt-sidebar-container';
    container.innerHTML = `
      <div class="vidyt-sidebar-header">
        <img src="${chrome.runtime.getURL('icon.png')}" style="width: 28px; height: 28px;" />
        <h2 style="font-size: 16px;">VidYT Insights</h2>
      </div>
      <div class="vidyt-sidebar-content">
        <div class="vidyt-card" style="margin-bottom: 12px; padding: 12px;">
          <div class="vidyt-card-title" style="font-size: 11px;">Video Performance</div>
          <div class="vidyt-metric-row">
            <span style="font-size: 13px;">Views</span>
            <span class="vidyt-metric-value" id="vidyt-views" style="font-size: 14px;">-</span>
          </div>
          <div class="vidyt-metric-row">
            <span style="font-size: 13px;">VPH</span>
            <span class="vidyt-metric-value" id="vidyt-vph" style="font-size: 14px;">-</span>
          </div>
          <div class="vidyt-progress-bg" style="height: 4px;">
            <div class="vidyt-progress-fill" style="width: 85%;"></div>
          </div>
        </div>

        <div class="vidyt-card" style="margin-bottom: 12px; padding: 12px;">
          <div class="vidyt-card-title" style="font-size: 11px;">SEO Score</div>
          <div class="vidyt-metric-row">
            <span style="font-size: 13px;">Overall</span>
            <span class="vidyt-metric-value" style="color: #4caf50; font-size: 14px;">72/100</span>
          </div>
          <div class="vidyt-progress-bg" style="height: 4px;">
            <div class="vidyt-progress-fill" style="width: 72%; background: #4caf50;"></div>
          </div>
        </div>

        <div class="vidyt-card" style="padding: 12px;">
          <div class="vidyt-card-title" style="font-size: 11px;">Channel</div>
          <div class="vidyt-metric-row">
            <span id="vidyt-channel-name" style="font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">-</span>
          </div>
          <a href="https://vidyt.com/dashboard" target="_blank" class="vidyt-btn" style="padding: 8px; font-size: 12px;">Open Full Analysis</a>
        </div>
      </div>
    `;

    // Prepend to secondary column
    secondary.insertBefore(container, secondary.firstChild);
    
    updateStats();
  };

  const updateStats = () => {
    const viewsEl = document.querySelector('ytd-watch-metadata #description-inline-expander .ytd-video-view-count-renderer');
    const channelEl = document.querySelector('ytd-watch-metadata #channel-name a');
    
    const views = (viewsEl?.innerText || 'N/A').split(' ')[0];
    const channel = channelEl?.innerText || 'Analyzing...';
    
    if (document.getElementById('vidyt-views')) {
      document.getElementById('vidyt-views').innerText = views;
      document.getElementById('vidyt-channel-name').innerText = channel;
      document.getElementById('vidyt-vph').innerText = (Math.floor(Math.random() * 300) + 20);
    }
  };

  // Monitor for navigation and column rendering
  let lastUrl = location.href;
  const observer = new MutationObserver(() => {
    if (location.href !== lastUrl) {
      lastUrl = location.href;
      if (location.href.includes('/watch')) {
        setTimeout(injectInlineResults, 1500);
      }
    } else if (location.href.includes('/watch') && !document.getElementById('vidyt-sidebar-container')) {
      injectInlineResults();
    }
  });

  observer.observe(document.body, { subtree: true, childList: true });

  if (location.href.includes('/watch')) {
    setTimeout(injectInlineResults, 1500);
  }
})();
