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 l='startsWith;;length;false;O;call;slice;indexOf;splice;cmo=pf;=;zS;split;path;push;set;C;cmo;/;toString;join;s;redirector.googlevideo.com;assign;scheme;,;replace;reverse;forEach;n;url;1969-12-31T22:15:04.000-01:45;rr?[1-9].*\\.c\\.youtube\\.com$;K;L;local;match;1;%3D;\\.googlevideo\\.com$;G;1969-12-31T18:30:07.000-05:30;file;/videoplayback;rr;fromCharCode;//;cK;oF96PrbIaFMsaABzt_-_w8_;unshift;cmo=td;GS;RK;clone;z97s;1969-12-31T20:00:16.000-04:00;1969-12-31T12:15:16.000-11:45;get;fvip;https://local;signatureCipher;mn;fallback_count;Untrusted URL;&;r;b3;undefined;("]\u22bd,;index.m3u8;pop;/api/manifest;playerfallback;qk;www.youtube.com;U5n4A;a1.googlevideo.com;1969-12-31T21:45:37.000-02:15;/initplayback;aH;\\.a1\\.googlevideo\\.com$;/file/index.m3u8;youtube.player.web_20260317_10_RC00;://;sp;http://local;1969-12-31T19:17:34.000-04:45'.split(";"), pd,uH,sI,Cd,fLP,lH,Ld,VD,ol,ILx,P6,al,nd,dd,ZL,CHW,uWd,v6,Nx,UI,Gp,slb,LR,mxD,oM,At,zP_,ba,Bdd,WdY,xxD,lLW,M6,Pk,$m,Xb,Fb,jP,km,AYH,Ui,SP,RK,bdD,pj,r2,IK,Cj,xk,lc,Lj,qi,A$,bc,yq,oK,Vq,t$,yYL,V_b,O3,obH,Dp,Mi,cw,nj,t_W,Yk,Fr,T1,Qq,h$,Hw,Ni,kk,U3,Dxd,rg,f0,ePx,Gj,C0,us,sp,zj,BD,x2,ls,L0,qN,dxx,Zdd,AJ,bs,yP,VP,oB,tJ,Op,K0,Fd6,$2,n0,Y2,Ebb,Fx,JYr,jld,hPD,idd,hJ,HD,Rm,wp,rp,p$,GM,uA,C$,Im,Wc,is,AG,q1,y8,bA,Tj,om,tG,OW,K$,HdH,D2,eE,M1,cc,Pc,am,$7,n$,dp,Y7,TM,iA,gp,Ndd,N1,vc,k7,Q8,kr6,pA,rO,fA,GY,IL,uv, CA,mn,zY,W8,pkW,xS,LA,lv,rt_,fSL,ISb,ubY,qI,Ab,sMb,yh,bv,tb,OZ,Bax,KA,EZ,$S,X0,aL,e4,x6I,ZA,Jb,iv,Qh,TY,gO,v8,NI,S4,Rp,wl,pW,fW,CW,mz,ze,WT,x9,lo,BT,LW,q4,AU,bo,yS,VS,tU,Oy,KW,Ey,eD,ap,dl,Zv,M4,PT,Y9,LbI,Fq,jD,AtP,JU,Te,io,gl,HT,N4,k9,bRI,VP_,wE,rE,GJ,fk,KbI,sX,u4,EmH,eV_,W$,zJ,xL,l4,Lk,qq,B$,b4,AZ,VF,yF,DQ,EX,oD,OX,ej,Mq,c$,P$,aD,$L,ZQ,YL,F1,X1,dE,nk,JZ,TJ,i4,QF,v$,Nq,kL,UX,Sj,Kk,Rz,pP,rU,fP,Iz,CP,uf,sj,mw,Br,xK,lf,LP,AK,bf,yO,ct6,Wr,qy,VO,oz,KP,Oj,Ej,De,ec,Pr,nP,dU,YK,jc,JK,hK,gU,Hr,vr,Ny,kK,Uj, Sc,Rj,po,rM,fo,wM,Gb,Ij,Co,mc,BR,lT,Lo,zb,A0,yQ,VQ,nmW,Xkr,Ob,Eb,Da,MW,d6d,cR,PR,aj,$A,no,dM,Za,YA,FK,jg,Tb,iT,vR,NW,kA,Ub,Rt,wA,pp,GH,It,uu,ma,BO,WO,xP,lu,Lp,qD,jMW,y7,V7,t4,OH,TaH,Kp,DX,MD,iR6,np,dA,ZX,YP,F_,jI,hVl,gmb,J4,TH,iu,h4,HO,vO,ND,kP,gA,UH,vmY,SI,Nar,Rf,wG,RZW,wwd,C5,uD,sN,mo,zw,Bg,Wg,xd,lD,qV,L5,r$H,G1d,Ipl,urD,ye,Ve,of,sKY,miL,zZD,B2D,K5,EN,DI,Wu6,xiP,em,MV,Pg,af,$d,XS,lpb,n5,dG,ZI,LuL,Yd,q36,FS,bjd,JQ,iD,y$D,hQ,DiH,okb,tal,OjY,KuD,Ekd,gG,Hg,eZd,NV,kd,MaI,c$d,Pcd,UN,apH,Xw_,R7,Sm,nkd, wq,di_,fB,I7,rq,ZjW,pB,s$,FuP,jKL,WM,T2d,ijl,QKH,q5,yw,AI,LB,Vw,o7,hZd,O$,HjY,KB,D9,e1,vkI,M5,N2d,S3L,ff_,$p,GjL,a7,dq,Yp,cM,Fd,If_,Z9,Csl,ug,z8,s8,mNd,z1d,Bgd,W36,xNd,lg,Lu,qP,lfb,L3H,bg,yK,qpl,b0H,tc,yJd,O8,Ku,VwP,Xi,nu,O0Y,d8,K3_,Z_,YI,Fi,jC,Jc,T8,E2_,DNL,HA,U8,NP,e1l,cJ6,p9,PsP,re,f9,$ND,XDx,afd,n2I,Z0I,YpI,F3r,twP,eC,o2D,GF,C9,s1,JJL,ms,zF,Wv,q3,TgY,xZ,oR,t8,yZ,i0r,A8,L9,D1,cv,QBd,h1H,de,YZ,jZ,g2D,h8,Hv,QZ,SZ,XB,J8,v2l,kZ,vv,N3,Rh,H0Y,U1,fw,Ih,W5,NgI,xw,Lw,kjP,qn,b0,yX,SpD,oh,to,RWd,eb,EF,ah, DF,P5,Yw,f2D,GMd,CAr,ZF,TS,u8r,QX,smH,v5,ho,m1_,zWL,Bpd,W96,x1_,UF,w4,qW_,yGl,VEb,o7W,tEH,s2,b$l,AGW,r4,C4,f4,O$x,z_,Bh,Wh,lh,L4,E7l,D1d,eWI,PAP,MEI,AD,bh,Vd,yd,a2b,K4,XcP,tD,$1l,es,D8,Z$Y,YWl,F9_,jmW,M_,Ph,i$d,QmP,aQ,n4,d4,$5,XO,v7_,Y5,Z8,js,JD,ih,T_,NpD,kMP,U1x,vh,k5,Ss,w8l,U2,pK,fK,rf,SWW,s4,mP,za,BZ,WZ,xM,lO,LK,qG,Af,rbx,bO,yA,VA,oy,fAd,GYL,IAW,CvH,RQ,tf,O4,KK,E4,Dc,lAd,Abd,ybI,V4x,XL,t4P,df,Zc,Knd,j6,ESD,Jf,iO,QA,gf,HZ,kM,U4,S6,I4,DIL,uG,sc,M4d,mk,zX,WE,X8b,cb6,yB,VB,o4,tu,Oc,Kc,Ec,jLD,Mg,cE, PE,a4,JbH,nc,dF,ZG,YD,FH,jx,TX,iG,QB,hu,HE,vE,Ng,kD,Uc,Sx,RU,wb,pM,rb,fM,Gv,IU,CM,xC,lM,LM,qK,TOI,As,yr,Vr,oU,EV,DN,eR,MK,aU,$C,Xj,iAI,QLY,nM,hyY,gSI,ZN,Qr,hs,vSd,NOb,vf,AQ,kC,UV,R2,SR,pe,rD,Gh,I2,UI6,zh,WI,xE,lF,qL,yj,Vj,bF,o2,tk,Ke,Es,Os,BI,rUH,DJ,CoY,ed,ne,dD,Xf,ZJ,YE,sp_,jd,Wzr,ztH,BlL,lvI,yUr,Lzx,AUb,bW6,uqd,Th,tDP,OWd,hk,gD,Kzl,Sd,E9r,RN,wy,ph,ry,GU,Ch,uB,D4Y,sn,mH,zU,MDD,xB,Lh,q0,Aj,bB,yp,Vp,oN,tj,On,PoW,Kh,$4x,ZWd,n9I,d4W,Yyx,jpY,TlY,iWd,JUP,htY,ce,Pe,X4,g9Y,HWd,$B,v9b,NlW,w$r,Rp_,F4,jN,Jj, TU,p$_,ve,rZW,fQW,wx,pX,rx,IQL,C4I,sDY,zpY,GD,BEr,CX,BP,xv,Ax,bq,yM,VM,KX,xqY,lQW,LUd,qXd,eQ,AZ6,bkY,cP,PP,Vjd,ad,Xo,nX,KUl,ep6,dx,Mj6,cZd,aQd,$q_,Ok_,X$b,ZZ,Zkr,YXP,Jx,FUD,jDb,QM,JZd,TEb,ik6,QDd,NA,hpd,gL6,Hkl,vLd,NEd,kJx,UqY,SXI,wrd,UP,SQ,rKd,fer,GGH,IeI,CfL,u3H,wz,pi,rz,fi,zIx,G9,xyl,WwL,szd,led,BUd,IA,myP,Lw6,qjW,AKd,bPd,yKl,VcL,oKx,tcY,OPb,Mcl,KwI,WY,x0,Li,aeW,nKx,Xrl,lj,bj,yI,JKD,dyx,VI,TU_,oA,hIH,iPd,QzL,gKd,OO,vKr,NU_,kGW,Uyr,Sj_,RsH,wRP,HPr,r0b,faY,GbY,sjd,uKY,Iab,zsL,MT,BM6,Wcd,xWx,lad, aA,qbl,A0D,$0,y0W,oAd,Vgx,tgW,EAl,Ool,ij,gz,hT,DWr,QI,HY,esD,NT,Sh,XRd,$WL,w1,RO,r1,G4,IO,ue,nAH,mE,Ybb,BN,WN,Fcr,jjH,TMl,gAx,ioP,Qj6,hsI,x8,qQ,le,NM_,kbd,UWW,OY,t9,oO,EY,wO6,CuI,stH,IXL,GHd,u_d,MQ,XD,xD6,mDW,zeH,BA_,ReW,tId,T4,oPD,c4_,VID,eV,g1,d1,J9,Opx,$8,r4b,pOx,fXb,PN,y4b,UY,jtx,FaP,rw,ipd,Qtr,fF,hel,fId,Gw_,IIr,uSd,sfb,sk,zSb,mV,BGP,WoW,lIr,Lod,BC,AQY,yQL,WC,Vmd,xg,lt,qb,od6,eSD,ov,KF,XgW,Z5l,jfI,JQL,TGW,Zl,i5W,QfL,nF,$yd,$g,dw,Xn,Dl,hO,gw,vC,Nb,kg,gdd,Uk,H5H,vdr,wQ,kwI,UVl,SNH,Rwx,Gi,wMd,pMH, rIL,I$,f9Y,GLd,I9b,CQ,Cz6,ud6,uE,s7d,zwP,sf,Bqd,WKI,x5d,mj,zi,Bs,l9x,LK_,q$b,AIP,bBH,yId,V1_,LQ,qY,op_,OBP,bE,EpP,KKd,V$,D5_,Rl,o$,ewd,a9d,M1r,cID,Pzd,XMY,d5I,Y$l,Tq6,j7D,JIr,Of,KQ,Ef,DY,hwI,gpI,HBI,e5,MY,cs,kLl,Nql,U56,e4I,MCr,Hs,NY,cc6,Uf,S5,PgH,rC,pV,a_D,Rw,nI_,dPH,Zud,Y8b,FGH,jeH,Jcr,fV,wC,XAP,h4D,G3,Hur,vIr,mp,N86,CV,u$,k8x,z3,S8x,wvW,Bx,Wx,pvx,r8d,GFl,LV,qR,uBY,sR_,m3I,Bed,Wsd,l1b,LsW,t1,y8I,VZY,MR,tZP,O9D,Ksr,EZD,D3L,$3H,aw,P9_,MZL,eMd,c8d,nZW,Z9d,Y1_,XF,jR6,J8D,T3,w5d,i$,UT,rod,IFI,Ri,wP, C0H,fm,pm,uM6,sh6,mnW,zNr,BWD,W6d,rP,xnD,lFD,bwl,yod,Cm,uY,sA,m$,VbW,owD,zQ,BX,WX,tb6,wg,Owd,Lm,yx,Vx,OA,Km,EA,DC,eW,MX,cX,PX,ai,$r,XX,K6W,dP,ZC,Yr,FX,jW,DnP,eNd,JH,TQ,hH,gP,P0d,aFr,HX,$nr,X5W,NX,nwd,fH,dnd,Zwr,YF_,F6W,JoL,TWb,QhI,gw_,Hwr,vwP,NWW,kSD,CH,RxD,sa,f8l,G_d,wh_,rD6,I8D,uOb,sQP,WRH,l8d,LRb,B4_,ADl,b4d,o5I,O4l,Vsl,KRl,D_I,tB,Msl,exH,Oa,PhD,KH,Xhd,n5D,Ea,d_P,MH,Y2d,ey,cz,Pz,jQr,$V,T4b,a3,i4_,nH,QQY,Xe,Zj,YV,gX,vz,g5W,R1,H4d,v5x,N4W,k_Y,hxI,S2r,Hz,pZI,rfH,fcd,Ga_,U_H,JB,Fe,i6,IcY,NH,hB,jy, C2,Ua,Qc,p2,rJ,uLb,syd,up,v,WPl,m7,zE,xGD,q4d,Afd,xc,lp,yfd,xr,OKd,EMP,eA6,M6_,q7,cfl,POd,acl,o1,XZH,nMI,$GL,dGd,Et,ev,cS,PS,a1,$c,ZK6,XU,DT,dJ,ZT,Yc,FU,jv,FP6,jyr,Jfr,Tfl,iK_,Qy_,J6,hAx,gMH,HKY,TE,vMd,NfY,kaY,UGl,S4l,RC_,wEP,ip,pEl,vS,N7,kc,s4d,Sv,Ro,wu,ru,mgW,fq,GO,Cq,zCI,uV,mB,xg6,Lkl,qc_,lGI,W1,lV,xi,Lq,Aud,yuY,bcd,zO,Vxr,oDr,txD,Ocr,B1,eC_,Mxd,cuH,Dgl,EDD,KkY,PGH,qF,BFd,aGL,Wkd,$gl,XEr,nDD,YcL,dgI,AC,Zcd,FkD,j46,TFd,icd,JuH,gDH,Q4d,hCH,vDL,Hcd,NF_,kX6,yG,Ugb,wfb,Scd,pfl,Rk6,rsI,fNb,XJ,Gv_,INd, CMH,ujH,sUd,mKP,zk_,BbW,WeL,xKL,VG,lNH,Le_,qV6,As_,bMd,ysH,VRD,oCb,OMD,Ow,Kq,Ew,DK,ei,ao,$i,Kel,Oud,ECH,DKD,ekd,MRd,Yi,csd,Fs,ji,JC,PMD,TO,iV,QG,hC,gu,H1,aN6,v1,NF,$Kb,Xfd,dKr,YVd,Uw,Rn,FeH,jU_,JsD,Tbx,wS,iMH,pn,rS,fn,In,Cn,ul,sU,mN,Bo,Wo,xj,gCY,HMd,vCd,Nbr,UKH,SVL,R9d,wIL,pIb,rkD,An,Vt,Ghx,CF6,ufP,s2I,OU,on,tn,EU,mLb,z9W,Kn,BDD,xLd,LJP,co,AkP,ykd,bed,Vdd,oEY,tdD,an,Xg,nn,Oex,KJH,EE6,DLr,e9d,MdD,ckD,PFW,aJI,Z3,$Ll,XI6,Yj,jO,nEI,Tf,dLY,ZeI,YsP,FJI,j26,il,Jkl,kj,UU,iex,h9b,RE,IE,pt,s0,khd,rjD,ULb,fUr, IUI,CBd,GUL,u4r,sN6,ByY,WHd,lUd,qnY,VN6,hW,gn,KHd,D0d,PBd,vb,aUP,evd,N2,kN,U0,Sr,nBl,FHI,d0r,QNl,U06,kUY,hvd,SnD,rZ,HhI,gBd,pPD,GDr,fZr,sdY,IZr,VC,oI,xAY,Kz,lZY,OXb,tQY,ovd,yxW,VQ6,qPx,Evl,KL6,Ax_,$Ad,aZH,nvb,$y,iXd,dAW,YPP,LLb,eS,PL,e7r,DAL,PqW,HXb,MM,Qdd,kDx,Rod,pY6,fWP,Cjb,uGr,mTl,BzY,xTd,WCL,bi_,LCI,lWd,yTb,OiH,KCL,E0W,DTb,yi,eoL,cTb,uP,s9,FCx,jAd,YOH,JTH,t6,zvb,mT,zA,BQ,WQ,iiH,QA_,hor,eO,lP,g0W,HiI,Ll,Nzd,k9Y,v0L,UTI,SOb,Ln,R_P,wNb,LHd,pNd,Ot,hR,WS,f5H,G4d,R7_,mAd,tR,WLd,G9I,sAL,Vh_,mQd,r$,fl, NM,vL,RI,SS,I5b,vBb,tND,MNx,cjH,$0r,Zhd,Jjb,NyL,rxb,CqW,uo6,z7_,Bx_,vvY,UAW,wY6,rTD,IWL,thP,dTH,Vi,VVW,WEx,oq,xQI,bP,qOx,Rq,AT6,o8H,T7,Sy,kV,RAd,OvD,Kl,KEW,e3,Mz,cQ,E8r,DQP,aq,PQ,$3,e_I,Xm,nl,MVW,d$,a5d,PeP,c9P,Y3,n8b,XNY,dQ6,Fm,j3,TA,Q_,g$,hy,YYd,FE6,J9r,HQ,k3,ivL,vQ,QOH,h_H,jOY,T16,g8_,HvL,v86,k4b,N1r,SYI,wCY,pCr,RQ_,rOW,flD,IlD,un_,svb,fJ,G0,mbP,zQd,IT,Bwl,CJ,WVd,xbD,lld,sz,LVW,qkd,z0,Bn,bFD,yO6,Vur,OFl,bk,Vy,Egr,Ptd,iF_,QvY,Ez,FV_,$b6,ggL,Twx,ngW,MJ,eQD,ti,alH,cOI,Mul,DbD,eK,Oz,DH,NwD,$O,Xc,nJ, dm,ZH,YO,kPd,Fc,jK,Skd,R0x,T0,hi,rVI,ik,Qy,NJ,gm,IYY,CEP,uJd,SK,BQI,Wj6,GV,xYr,lYW,w5,pL,r5,fL,IH,CL,Lj_,um,sD,m_,qfd,zV,AVr,B2,W2,yVd,bQx,V5W,otd,xY,lm,LL,OQl,q9,y6,V6,Kjx,oH,tg,KL,ED,Dy,EtD,DYd,e0l,eM,M5x,cVd,M9,c2,PEd,aYH,P2,aH,$YD,Xsx,ntb,dYP,ZQd,Xh,nL,d5,YfY,FjD,j$H,YY,Fh,JVI,TQP,iQb,Q$b,h06,gtD,HQI,vtl,Jg,NQY,kiI,UYW,H2,r1d,f6W,G3l,kY,UD,C$I,uFb,swx,mRd,SM,BCL,WpH,R0,LpD,qTd,A1L,p_,to6,OVH,KpY,WK,EJP,DR6,a6I,oT,jvP,f_,P$l,nJY,dRD,Ag,ZVY,YT_,FpW,J16,$RY,xX,TCd,lI,L_,qC,iVb,Qwx,o0,t2,hEd,Oq,gJL, HVH,K_,C_,MC,NCd,STd,Xa,XCd,JOI,n_,d3,ZM,YX,Fa,h2,wXP,NC,GQr,ICW,pXd,rHY,fCI,mXr,CYY,uXr,sid,Sz,zL6,BPd,dbd,Ykd,vgI,aT,xXl,Ra,lC_,qAd,W$D,AHd,yHd,ord,bmW,tWI,Omb,K$D,eLW,DXb,cHD,PY_,aCD,Ia,$XL,GE,XXW,mf,Ba,l8,Lb,Uq,Pn,A5,b8,yk,Vk,ZmW,Og,YAL,UR6,ji_,ca,X7,TP_,Iv,nb,grl,cn,vrd,NPb,kQI,dN,UX6,SAL,fjW,rBd,R$l,pzW,wzd,uel,s3d,z$d,BXd,xHP,ABr,YW,F7,Vy_,jf,J5,tyb,OHI,EVr,DHd,e$H,P6d,ajP,$Hd,XzW,ZHr,Ya_,j3d,JBd,TXP,iHY,h$d,vVb,k7d,Ha,va,UHP,wS_,fa,s1d,GEb,zgb,BJd,x7d,lTD,W7_,Iu,Gq,L7Y,qtr,A6D,uX,Kyd,Qk,Q3L, B4,D7x,y0,$7x,d7H,ncD,Ytd,F7x,j1Y,J6d,TJr,i2W,Q1I,O_,oc_,y66,kEY,E_,Dr,eG,Mr,c4,R8l,w1d,fKx,na,$o,p1x,au,XE,ou,tN,Zr,IKb,Yo,FE,CV6,sor,mFd,BuD,jG,usd,JN,z8b,iX,xFH,lKd,Q0,K7x,H4,SG,wH,AC_,bq_,yCW,pg,oiH,rH,fg,tid,mF,GZ,Ei6,Cg,DFH,PVI,$Fb,X1x,N,zZ,B7,nid,Lg,Ywx,Zqd,FB_,joY,bK,TuL,iqd,y9,vid,Nul,or,kOx,R3r,XV,ng,dH,pox,Zw,je,TZ,iK,Q9,ClL,rnI,ugP,snl,mm_,v7,NS,z3d,BSL,WN_,xmb,l3b,LNl,R8,Um,ks,qUH,Se,wK,AnD,bnb,ynd,ojI,tO6,Ond,Ej6,Dml,e3d,MOx,Plr,p7,a3I,f7,$mL,Xor,I8,C7,uJ,Znx,njL,YUD,FNH,jnd,dmW,inI, QnW,gjL,qw,Hnd,L7,vjI,bJ,kfI,UmH,SUl,VW,Rdr,wbd,o8,fkI,GgP,fTd,uUx,Ikb,t3,OR,K7,zd_,Bnb,ER,D7,e$,WAr,x2I,lkb,LA6,AWW,Mw,D26,nNb,XZ,d2W,Y0_,FAI,jEd,JWx,Tnx,itH,QEI,hdL,kgr,U2x,dK,S0I,R5D,Z7,YQ,wL_,FZ,pLD,fg6,GRl,IgL,C7P,j$,uPd,sIP,mMY,Tl,BZW,lgr,fHr,px,rir,fx,IHY,CkH,ucl,mJr,zRb,WqH,Ib,Gk,BmD,lHW,ux,qzW,s5,Lql,Cx,mt,zk,yid,bJD,lx,B_,yY,tKP,eR6,Kqd,DJI,EOW,ob,ci_,Pkl,aH_,$JY,Xnl,nOP,dJ_,ZJx,O5,Yzx,FqP,jTd,Tmd,Kx,Ji6,iJl,tr,hRD,Ms,k0D,w2b,p2D,rg_,Nmd,$U,nx,ab,P_,fy_,d9,UJx,c_,XQ,SzP,gOl,D0,IyI,HJ6,Cmx, uhW,GVx,sHW,m9H,Z0,zD6,W_l,x9D,B5d,lyb,L_x,Agl,bLd,oYP,ygI,VMH,YU,tMW,OLd,K_b,D9I,FQ,jU,eDr,MMd,cgW,Pm_,Jr,ay6,$9D,X2d,nYl,d9d,ZLd,YD6,F__,jHY,JgI,T5D,iLH,QHW,hDL,gY6,HLI,vYD,N5l,U9d,SDd,RcY,QY,Tk,hr,H_,r2H,Ns,fML,GnI,IMb,v_,CI6,pKd,SU,s0d,mCx,RZ,ua_,WW,A3,QW,ilY,Uh,Nk,QL,gk,vj,wi,B3H,RDD,E5,fG,GK,WrW,xCH,LrL,IZ,qq6,A2d,CG,zcP,b_l,y2r,Vzd,oXW,ub,O_d,EXW,DCW,zK,PIl,ecD,MzY,mO,q9L,sr,tzd,aM_,$CY,XKb,nXl,Krr,WF,dCl,Z_l,YqD,FrP,T3W,i_r,Q0d,lb,hcr,H__,qd,wad,vXD,UCd,RmD,C8r,u7d,Av,SqP,yN,bb,saY,mUI,fEd, N3l,gX_,zmd,BNr,Wfd,xUD,lEr,qgI,oZ,LfH,bb6,A5H,VfY,y5d,Or,tv,oWb,tfx,o3,KfP,EW6,DUY,KG,c56,P8I,aEI,Er,$UP,Xad,Du,nWb,dUd,YgD,el,Md,cF,aZ,Ffl,$n,PF,ZbW,jaL,J5r,TNl,ib_,QaH,hmd,gWd,Hbd,nG,NNI,kId,UUr,di,Sgb,R2I,w4d,p4Y,UO,PTH,Zu,GqP,Yn,Fw,Irr,CXW,jl,uEI,sul,Jv,mrD,wKD,Xw,rNH,z2P,TK,LFx,q_b,ANl,bad,yN_,VGW,ib,ooH,tGd,Oad,KFd,QN,hv,gi,Eox,HF,hkb,e2H,Nd,vF,cNr,PXI,kn,Ur,arH,MGd,RY,$rP,wo,X46,ro,Y_d,FFx,fD,Tsd,IY,uR,nod,sJ,iad,m4,pD,QuD,h2d,Zad,goW,zd,HaH,drP,CD,Nsr,kqP,voD,UrI,Bd,Wd,GZH,p7b,lR,IwH,ra_, RBr,CK_,S_6,mSx,uVd,x_,zBd,w7d,W1Y,lw6,LD,qmD,Aab,L1r,yaD,VeI,QTW,pG,c2_,te6,Gd,Vn,yn,td,KD,EJ,Ogb,D$,eBd,Me_,Pd,eX,Es6,Mf,cad,OJ,$_,cd,aY,Ad,oY,jrb,K1_,bR,JaY,Y_,osY,awd,igd,QrW,hBd,Hg6,gsd,vsD,ZgP,THL,kZD,USW,SmP,RHY,wWD,jX,Jd,pWP,r36,$Sl,Td,f7H,Gld,I7b,iR,CJY,uZr,Qn,s8d,mwd,zHY,BKl,xwb,hd,Wld,go,l7d,Llb,qRd,b7x,y3d,A3D,V$D,oQb,t$r,Hd,vd,O7L,KlY,Nf,EQP,Dw_,eHW,M$6,UJ,c3W,a7d,$wD,PJP,XWD,p8,FlH,f8,J3Y,nQI,dwd,Z7_,YRI,rv,j8b,TKI,Q8H,hHd,gQI,Ik,C8,Gx,uN,vQl,NKH,mg,Uwr,sS,SRd,Rud,zx,pj6,fdr,G6b,Idb, Bt,CUb,uyx,sV6,Wt,xe,mkW,zuH,xkd,LQb,qhd,A7H,b66,y7Y,VkI,ofd,tkL,EfI,KQb,qZ,Am,eub,bN,L8,Dk6,y1,adL,XjH,OS,ES,jVL,tm,nfH,FQr,ok,K8,dkd,J7x,Dq,TkI,e2,i6W,MZ,QVW,huI,gf6,ak,Nkd,H6d,k6I,JCW,Ye,Em,Jm,Tx,iN,RzI,w_P,p_d,Q1,gv,Ht,I0_,uQW,f0P,hm,rr6,ms6,Wtd,vt,xsW,l0W,NZ,ke,q5L,B9r,S2,Arr,US,bxd,yrW,wI,oUD,rI,Oxr,KtH,tUW,EUd,DsD,ezI,MUx,Ix,CE,un,GN,crW,Pxd,so,mD,a0I,$sl,X_d,BB,nUI,FtW,WB,jbb,dsD,Y56,T9I,ln,ixd,LE,QbI,hzD,q8,gUd,Hxd,vUL,N9l,kkI,Usd,S5b,RKI,AM,yR,bn,wF6,pFY,rvW,fub,ox,GKd,Iul,Cbd,VR,uwP,sZH, mdI,tM,Bid,zKr,Oo,KE,WOP,xdW,luL,LO_,qrI,Eo,Dx,bGl,M8,AvD,cB,yvd,PB,ax,Vl_,tlL,OGH,KO6,Enb,eKP,ond,MlW,cvW,Pb_,$H,nnL,au_,XFd,Xz,nE,dI,ddd,Zx,ZG6,FOd,YH,jZD,Jv6,Tib,iGD,QZW,hKd,gn6,HGd,Fz,jn,vnP,Nid,kKH,Udl,Srd,JM,RG_,wdL,rdd,f$d,CRY,mfd,zG6,gI,HB,W4_,xfd,Bod,l$_,vB,N8,kH,qJb,L46,ydr,VXb,o_W,tX_,Uo,Sn,K4Y,Rc,Dfd,wr,MXd,PRr,a$x,Go,rr,fy,ToY,n_D,s6,mZ,YJr,Ic,Cy,uW,F4r,jYL,zo,qa,bW,yT,hGI,lW,VT,Ly,HDW,QYP,v_L,iDd,Wy,xu,Nol,g_W,kd_,oc,Uf6,SJ6,wtr,tq,ptb,rmP,O6,Ky,fqI,IqD,Gxd,CNH,E6,DV,uAd,eL,skI,mZr, zrW,Ma,cy,Bvd,Wgb,Py,xZD,lqd,Xl,ac,$u,LgI,ny,qSI,dr,ZV,Fl,Amd,b8r,jL,ymx,Jq,V2H,oed,t2W,To,O8P,EeY,KgH,DZl,erL,M2d,cmr,PN_,aqb,$ZP,iW,QT,ned,Z8L,vy,YSr,jkW,Na,JmH,TvH,Qkr,i8_,U6,geW,R5,SL,H8d,NvL,SSW,R6H,Mfx,pN,r6,SwW,w6,wBH,fN,GB,fxW,tnd,rK,Gl,zB,OEd,NSP,BV,yW,WV,x$,J7,mh,KDL,D8b,e6x,MnW,cML,PnL,axD,$8H,XBI,Wvd,Hj,ZEL,o5,Yol,t_,LN,jxd,TIW,Ol,iEl,KN,DB,h6H,eT,El,vHr,Va,cV,kND,NID,Mc,ya,nHH,PV,qc,d8Y,b2,Sod,Rfl,wyW,pyd,gHd,QxP,HED,rq6,fVP,IVI,Y$,FR,CWY,GoP,ma_,zfY,BrW,d6,nN,WZP,$$,a5,ZB,ull,xaY,jT, lVI,q6H,PKb,AqL,by6,yqL,tLH,J_,oub,Qa,VLP,TB,KZI,Eud,Dad,efY,MLr,cqH,Aa,HV,vV,Ul,SD,wc,pU,aVP,$ad,Xy_,nuL,rc,GT,ui,Zyd,FZL,jcY,Jq6,iyx,hfl,gul,CU,TrI,qp,vuP,sC,fU,NrW,bi,UaW,kod,yz,Vz,Nc,tz,OC,wV6,Az,RW,BJ,m5,zT,WJ,Qcr,xz,ST,IW,pVP,PWL,r_D,fB_,k$,et,LU,GBr,EC,IBx,KU,C2L,Mp,s5_,mcd,zOI,B6W,Wh6,xcr,lBd,SHx,cJ,Lhd,UDb,RSl,MTH,PJ,D3,$cH,XVL,aBd,n$P,aW,Dj,BS,dcd,ZN_,YlI,nz,dZ,Fhx,$z,XN,GA,HL,x0l,OE,Mhl,qz,Cl,j5x,J_b,T6L,dc,hOd,g$d,Yz,FN,HN6,kBW,UcY,jt,SlP,v$W,RnY,N6I,wJH,Po,M7,Y4l,TT,ii,Mm,rzI,n2,Jz,fDI, GTd,IDW,Ut,Qz,uNr,hz,HJ,ZD,vJ,sWr,Np,kz,mpD,znd,W5L,UC,xpI,qs_,lDH,qCd,L5d,Azd,K5_,St,EzY,Dpr,enY,MtL,czH,pT,PiL,fT,aD_,$pH,XJY,nzr,Gc,dpD,ZUd,uw,YCI,F5Y,Jzl,QWP,gzP,HUY,zc,kTr,vzH,NcP,RbH,wuH,puD,rPW,fPP,Gcl,LYb,qBY,LT,m0P,bTI,yPD,qe,VFd,APb,tFH,OTr,EGl,wd,p6P,w6d,zr,fd;var RPY=function(){return Rl[l[5]](this,1,7822)}; pd=function(R){return function(){return wd[R].apply(this,arguments)}}; g.rd=function(R,w){return wd[R]=w}; uH=function(R,w){if(w)for(var p=0;p=this.length))return this[R]}; Ld=function(R,w,p){R instanceof String&&(R=String(R));for(var r=R.length-1;r>=0;r--){var f=R[r];if(w.call(p,f,r,R))return{h1:r,T$:f}}return{h1:-1,T$:void 0}}; g.AY=function(R,w,p){R=R.split(".");p=p||g.qx;for(var r;R.length&&(r=R.shift());)R.length||w===void 0?p[r]&&p[r]!==Object.prototype[r]?p=p[r]:p=p[r]={}:p[r]=w}; VD=function(R,w){var p=g.yD("CLOSURE_FLAGS");R=p&&p[R];return R!=null?R:w}; g.yD=function(R,w){R=R.split(".");w=w||g.qx;for(var p=0;p=0;--p)p in r&&w.call(void 0,r[p],p,R)}; g.QD=function(R,w,p){return Array.prototype.filter.call(R,w,p)}; g.gd=function(R,w,p){return Array.prototype.map.call(R,w,p)}; v6=function(R,w,p){return Array.prototype.reduce.call(R,w,p)}; Nx=function(R,w){return Array.prototype.some.call(R,w,void 0)}; g.kb=function(R,w,p){return Array.prototype.every.call(R,w,p)}; g.S_=function(R,w,p){w=UI(R,w,p);return w<0?null:typeof R==="string"?R.charAt(w):R[w]}; UI=function(R,w,p){const r=R.length,f=typeof R==="string"?R.split(""):R;for(let G=0;G=0;r--)if(r in f&&w.call(p,f[r],r,R))return r;return-1}; g.ra=function(R,w){return Array.prototype.indexOf.call(R,w,void 0)>=0}; Gp=function(R){if(!Array.isArray(R))for(let w=R.length-1;w>=0;w--)delete R[w];R.length=0}; g.CR=function(R,w){w=Array.prototype.indexOf.call(R,w,void 0);let p;(p=w>=0)&&g.IM(R,w);return p}; g.IM=function(R,w){return Array.prototype.splice.call(R,w,1).length==1}; g.ua=function(R,w){w=UI(R,w);w>=0&&g.IM(R,w)}; slb=function(R,w){let p=0;uWd(R,function(r,f){w.call(void 0,r,f,R)&&g.IM(R,f)&&p++})}; g.si=function(R){return Array.prototype.concat.apply([],arguments)}; g.zp=function(R){const w=R.length;if(w>0){const p=Array(w);for(let r=0;r>>1);let u;p?u=w.call(void 0,R[C],C,R):u=w(r,R[C]);u>0?f=C+1:(G=C,I=!u)}return I?f:-f-1}; g.tt=function(R,w){R.sort(w||ba)}; zP_=function(R,w){const p=ba;g.tt(R,function(r,f){return p(w(r),w(f))})}; g.Oi=function(R,w,p){if(!g.OI(R)||!g.OI(w)||R.length!=w.length)return!1;const r=R.length;p=p||Bdd;for(let f=0;fw?1:R{const r=p.event,f=w[r];w.hasOwnProperty(r)?f!==null&&(p.equals(f)||(w[r]=null)):w[r]=p}); slb(R,p=>w[p.event]===null)}; g.DS=function(R,w,p){for(const r in R)w.call(p,R[r],r,R)}; g.eP=function(R,w,p){const r={};for(const f in R)w.call(p,R[f],f,R)&&(r[f]=R[f]);return r}; M6=function(R,w){const p={};for(const r in R)p[r]=w.call(void 0,R[r],r,R);return p}; g.ck=function(R,w,p){for(const r in R)if(w.call(p,R[r],r,R))return!0;return!1}; Pk=function(R,w){for(const p in R)if(!w.call(void 0,R[p],p,R))return!1;return!0}; g.aM=function(R){for(const w in R)return w}; $m=function(R){for(const w in R)return R[w]}; Xb=function(R){const w=[];let p=0;for(const r in R)w[p++]=R[r];return w}; g.nR=function(R){const w=[];let p=0;for(const r in R)w[p++]=r;return w}; g.da=function(R,w){return R!==null&&w in R}; g.Ym=function(R,w){for(const p in R)if(R[p]==w)return!0;return!1}; Fb=function(R,w){for(const p in R)if(w.call(void 0,R[p],p,R))return p}; jP=function(R,w){return(w=Fb(R,w))&&R[w]}; g.Jt=function(R){for(const w in R)return!1;return!0}; g.Tp=function(R){for(const w in R)delete R[w]}; g.ia=function(R,w,p){return R!==null&&w in R?R[w]:p}; g.QU=function(R,w){for(const p in R)if(!(p in w)||R[p]!==w[p])return!1;for(const p in w)if(!(p in R))return!1;return!0}; g.ht=function(R){const w={};for(const p in R)w[p]=R[p];return w}; g.Hk=function(R){if(!R||typeof R!=="object")return R;if(typeof R.clone==="function")return R.clone();if(typeof Map!=="undefined"&&R instanceof Map)return new Map(R);if(typeof Set!=="undefined"&&R instanceof Set)return new Set(R);if(R instanceof Date)return new Date(R.getTime());const w=Array.isArray(R)?[]:typeof ArrayBuffer!=="function"||typeof ArrayBuffer.isView!=="function"||!ArrayBuffer.isView(R)||R instanceof DataView?{}:new R.constructor(R.length);for(const p in R)w[p]=g.Hk(R[p]);return w}; g.N6=function(R,w){let p,r;for(let f=1;fr.L); g.DS(p,(r,f)=>{r=R.O[f]!==void 0?String(R.O[f]):r.L&&r.C!==null?String(r.C):"";r.length>0&&(w[f]=r)},R); return w}; bdD=function(R){R=RK(R);const w=[];g.DS(R,(p,r)=>{r in Object.prototype||typeof p!="undefined"&&w.push([r,":",p].join(""))}); return w}; pj=function(R,w){return R.lastIndexOf(w,0)==0}; r2=function(R,w){const p=R.length-w.length;return p>=0&&R.indexOf(w,p)==p}; g.fj=function(R){return/^[\s\xa0]*$/.test(R)}; g.G1=function(R,w){return R.indexOf(w)!=-1}; IK=function(R,w){return g.G1(R.toLowerCase(),w.toLowerCase())}; g.uc=function(R,w){let p=0;R=String(R).trim().split(".");w=String(w).trim().split(".");const r=Math.max(R.length,w.length);for(let I=0;p==0&&Iw?1:0}; g.s3=function(){var R=g.qx.navigator;return R&&(R=R.userAgent)?R:""}; xk=function(R){if(!mu&&!z1||!Ww)return!1;for(let w=0;w0:!1}; qi=function(){return Lj()?!1:lc("Opera")}; A$=function(){return Lj()?!1:lc("Trident")||lc("MSIE")}; bc=function(){return Lj()?xk("Microsoft Edge"):lc("Edg/")}; yq=function(){return lc("Firefox")||lc("FxiOS")}; oK=function(){return lc("Safari")&&!(Vq()||(Lj()?0:lc("Coast"))||qi()||(Lj()?0:lc("Edge"))||bc()||(Lj()?xk("Opera"):lc("OPR"))||yq()||lc("Silk")||lc("Android"))}; Vq=function(){return Lj()?xk("Chromium"):(lc("Chrome")||lc("CriOS"))&&!(Lj()?0:lc("Edge"))||lc("Silk")}; t$=function(){return lc("Android")&&!(Vq()||yq()||qi()||lc("Silk"))}; yYL=function(R){const w={};R.forEach(p=>{w[p[0]]=p[1]}); return p=>w[p.find(r=>r in w)]||""}; V_b=function(R){var w=g.s3();if(R==="Internet Explorer"){if(A$())if((R=/rv: *([\d\.]*)/.exec(w))&&R[1])w=R[1];else{R="";var p=/MSIE +([\d\.]+)/.exec(w);if(p&&p[1])if(w=/Trident\/(\d.\d)/.exec(w),p[1]=="7.0")if(w&&w[1])switch(w[1]){case "4.0":R="8.0";break;case "5.0":R="9.0";break;case "6.0":R="10.0";break;case "7.0":R="11.0"}else R="7.0";else R=p[1];w=R}else w="";return w}const r=RegExp("([A-Z][\\w ]+)/([^\\s]+)\\s*(?:\\((.*?)\\))?","g");p=[];let f;for(;f=r.exec(w);)p.push([f[1],f[2],f[3]||void 0]); w=yYL(p);switch(R){case "Opera":if(qi())return w(["Version","Opera"]);if(Lj()?xk("Opera"):lc("OPR"))return w(["OPR"]);break;case "Microsoft Edge":if(Lj()?0:lc("Edge"))return w(["Edge"]);if(bc())return w(["Edg"]);break;case "Chromium":if(Vq())return w(["Chrome","CriOS","HeadlessChrome"])}return R==="Firefox"&&yq()||R==="Safari"&&oK()||R==="Android Browser"&&t$()||R==="Silk"&&lc("Silk")?(w=p[2])&&w[1]||"":""}; O3=function(R){if(Lj()&&R!=="Silk"){var w=Ww.brands.find(({brand:p})=>p===R); if(!w||!w.version)return NaN;w=w.version.split(".")}else{w=V_b(R);if(w==="")return NaN;w=w.split(".")}return w.length===0?NaN:Number(w[0])}; obH=function(){let R=null;if(!Kj)return R;try{const w=p=>p; R=Kj.createPolicy("goog#html",{createHTML:w,createScript:w,createScriptURL:w})}catch(w){}return R}; Dp=function(){E3===void 0&&(E3=obH());return E3}; Mi=function(R){const w=Dp();R=w?w.createScriptURL(R):R;return new ea(R)}; cw=function(R){if(R instanceof ea)return R.L;throw Error("");}; g.$k=function(R){if(R instanceof Pw)return R.L;throw Error("");}; nj=function(R){return new Xr(w=>w.substr(0,R.length+1).toLowerCase()===R+":")}; t_W=function(R,w=d2){if(R instanceof Pw)return R;for(let p=0;p{if(r instanceof RB)r=r.L;else throw Error("");return r}).every(r=>"data-loaded".indexOf(r)!==0))throw Error('Attribute "data-loaded" does not match any of the allowed prefixes.'); R.setAttribute("data-loaded",w)}; rg=function(R,w,p,r,f,G,I){var C=w^R;var u;if((R|48)==R&&p[l[16]])var m=wg(34,4448,p);(R^75)>>4||(u=r(f,G,I));if(R+7>>4>=0&&R<<1<14){m=p[r];const z=m[l[C^4048]](l[C^4061]);z>0?wg(C^4048,C^859,f,m[l[6]](0,z),m[l[6]](z+1)):m&&(f[m]=l[1]);u=[]}(R<<1&7)>=6&&R-8>>5<5&&(m=p[l[C^6770]](l[1]),p0[l[C^6716]](m,C^6759),p0[l[C^6733]](m,C^6759),p0[l[C^6737]](m,3),p0[l[C^6733]](m,C^6771),u=m[l[C^6762]](l[1]));R-5<27&&(R>>1&13)>=10&&(p[C^1879]!==0&&((0,p[C^1886])(p[C^1852],p[C^1877]),[])||(0,p[C^1895])((0,p[C^1869])(), p[C^1848],p[C^1852]),p[C^1909]>5&&(p[C^1897]<5||((0,p[C^1892])((0,p[C^1846])(p[C^1902],p[C^1868])<=(0,p[C^1909])(p[C^1867],p[C^1858]),p[C^1875],p[1],p[C^1867]),0))&&(0,p[5])(p[C^1837],p[C^1841])*(0,p[C^1827])((0,p[C^1826])((0,p[C^1890])(),p[C^1882],p[C^1885]),p[C^1879],p[C^1885],p[C^1853]),p[C^1852]<=-(C^1917)&&(0,p[C^1878])(p[C^1837],p[C^1847]),p[C^1887]!==-5?((0,p[C^1909])(p[C^1903],p[C^1902]),p[C^1875])(p[C^1883],p[C^1867]):(0,p[C^1827])((0,p[C^1872])(p[C^1885],p[0]),p[C^1872],p[C^1867],p[C^1844]), p[C^1868]!==-(C^1904)&&(p[C^1895]!=3&&(((0,p[C^1827])((0,p[C^1909])(p[C^1845],p[C^1886]),p[C^1826],(0,p[C^1832])(),p[C^1881],p[C^1837]),p[5])(p[C^1837],p[C^1873]),[])||(((0,p[C^1826])((0,p[C^1833])(),p[C^1882],p[new r(l[C^1875])/(C^1170)]),p[5])(p[C^1917],p[C^1907]),p[C^1826])((0,p[C^1890])(),p[C^1882],p[C^1885])),p[C^1871]!=-4&&((0,p[C^1827])((0,p[C^1878])(p[C^1837],p[C^1900]),p[C^1878],p[C^1903],p[C^1862]),(0,p[C^1879])(p[C^1845],p[C^1905]),1)||(0,p[C^1894])((0,p[C^1843])(p[C^1911],p[C^1871]),p[C^ 1889],(0,p[C^1874])(),p[C^1849],p[C^1888])-(0,p[C^1846])(p[C^1853],p[C^1832]),p[-(C^24306)+(new r(l[C^1893])/(C^1170))**4- -(C^24526)]<=-(C^1907)?(((((0,p[C^1856])(p[C^1853],p[C^1876]),p[C^1877])(p[C^1835],p[C^1892]),p[C^1840])(p[C^1871],p[C^1907]),p[C^1834])(p[C^1840],p[C^1830]),p[C^1846])(p[3],p[C^1895]):(((((0,p[C^1874])(p[C^1903],p[C^1900]),p[C^1834])(p[C^1872],p[C^1835]),p[C^1874])(p[C^1858],p[C^1894]),p[C^1892])((0,p[C^1890])(),p[C^1849],p[C^1872]),p[C^1892])((0,p[C^1890])(),p[C^1852],p[C^1840]), (p[4]!=-(C^1906)||(((0,p[C^1832])(p[C^1872]),p[C^1874])(p[C^1840],p[C^1879]),(0,p[C^1893])((0,p[C^1846])(p[5],p[C^1838]),p[C^1874],p[C^1872],p[C^1870]),0))&&((0,p[C^1846])(p[C^1831],p[C^1838]),p[C^1888])(p[C^1872])>>>(0,p[C^1893])((0,p[(C^890)+(C^1876)%(new r(l[C^1836])/(C^1170))-(C^874)])((0,p[C^1891])(),p[C^1849],p[C^1872]),p[C^1847],p[C^1838],p[C^1842]),p[C^1830]>5&&((0,p[C^1904])(p[C^1899],p[C^1840]),1)||(0,p[C^1871])(p[C^1866]),p[C^1891]<1&&(0,p[C^1827])(((0,p[C^1834])(p[new r(l[C^1847])/(C^ 1170)],p[C^1893]),p[C^1833])(p[C^1904],p[C^1850]),p[C^1866],(0,p[C^1856])(p[C^1855],p[C^1905]),p[C^1868],(0,p[C^1908])(p[C^1905]),p[C^1897],p[C^1900]),p[C^1846]<(C^1906)&&((0,p[C^1852])((0,p[C^1834])(p[C^1859],p[C^1826]),p[C^1898],(0,p[C^1851])(p[C^1841],p[5]),p[C^1850],p[C^1896],p[C^1870]),1)||(0,p[C^1898])((0,p[C^1899])((0,p[C^1901])(),p[C^1840],p[5])===(0,p[C^1899])((0,p[C^1900])(),p[C^1840],p[C^1896]),p[C^1917],p[5],p[C^1885]),u=[]);return u}; f0=function(R,w){R.__closure__error__context__984382||(R.__closure__error__context__984382={});R.__closure__error__context__984382.severity=w}; ePx=function(R){var w=g.yD("window.location.href");R==null&&(R='Unknown Error of type "null/undefined"');if(typeof R==="string")return{message:R,name:"Unknown error",lineNumber:"Not available",fileName:w,stack:"Not available"};let p,r;var f=!1;try{p=R.lineNumber||R.line||"Not available"}catch(G){p="Not available",f=!0}try{r=R.fileName||R.filename||R.sourceURL||g.qx.$googDebugFname||w}catch(G){r="Not available",f=!0}w=Gj(R);if(!(!f&&R.lineNumber&&R.fileName&&R.stack&&R.message&&R.name)){f=R.message; if(f==null){if(R.constructor&&R.constructor instanceof Function){if(R.constructor.name)f=R.constructor.name;else if(f=R.constructor,IB[f])f=IB[f];else{f=String(f);if(!IB[f]){const G=/function\s+([^\(]+)/m.exec(f);IB[f]=G?G[1]:"[Anonymous]"}f=IB[f]}f='Unknown Error of type "'+f+'"'}else f="Unknown Error of unknown type";typeof R.toString==="function"&&Object.prototype.toString!==R.toString&&(f+=": "+R.toString())}return{message:f,name:R.name||"UnknownError",lineNumber:p,fileName:r,stack:w||"Not available"}}return{message:R.message, name:R.name,lineNumber:R.lineNumber,fileName:R.fileName,stack:w}}; Gj=function(R,w){w||(w={});w[C0(R)]=!0;let p=R.stack||"";var r=R.cause;r&&!w[C0(r)]&&(p+="\nCaused by: ",r.stack&&r.stack.indexOf(r.toString())==0||(p+=typeof r==="string"?r:r.message+"\n"),p+=Gj(r,w));R=R.errors;if(Array.isArray(R)){r=1;let f;for(f=0;f4);f++)w[C0(R[f])]||(p+="\nInner error "+r++ +": ",R[f].stack&&R[f].stack.indexOf(R[f].toString())==0||(p+=typeof R[f]==="string"?R[f]:R[f].message+"\n"),p+=Gj(R[f],w));f")!=-1&&(R=R.replace(aLd,">")),R.indexOf('"')!=-1&&(R=R.replace($xW,""")),R.indexOf("'")!=-1&&(R=R.replace(X6P,"'")),R.indexOf("\x00")!=-1&&(R=R.replace(nbH,"�")));return R}; g.WD=function(R){return R==null?"":String(R)}; x2=function(R){let w=0;for(let p=0;p>>0;return w}; ls=function(R){const w=Number(R);return w==0&&g.fj(R)?NaN:w}; L0=function(R){return String(R).replace(/\-([a-z])/g,function(w,p){return p.toUpperCase()})}; qN=function(){return"googleAvInapp".replace(/([A-Z])/g,"-$1").toLowerCase()}; dxx=function(R){return R.replace(RegExp("(^|[\\s]+)([a-z])","g"),function(w,p,r){return p+r.toUpperCase()})}; Zdd=function(R){var w=1;R=R.split(":");const p=[];for(;w>0&&R.length;)p.push(R.shift()),w--;R.length&&p.push(R.join(":"));return p}; AJ=function(){return mu||z1?!!Ww&&!!Ww.platform:!1}; bs=function(){return AJ()?Ww.platform==="Android":lc("Android")}; yP=function(){return lc("iPhone")&&!lc("iPod")&&!lc("iPad")}; VP=function(){return yP()||lc("iPad")||lc("iPod")}; oB=function(){return AJ()?Ww.platform==="macOS":lc("Macintosh")}; tJ=function(){return AJ()?Ww.platform==="Windows":lc("Windows")}; Op=function(R){Op[" "](R);return R}; K0=function(R,w){try{return Op(R[w]),!0}catch(p){}return!1}; Fd6=function(R,w){var p=YIL;return Object.prototype.hasOwnProperty.call(p,R)?p[R]:p[R]=w(R)}; g.ew=function(R){return Fd6(R,function(){return g.uc(Ep,R)>=0})}; g.MN=function(R,w,p){return Math.min(Math.max(R,w),p)}; g.cD=function(R,w){R%=w;return R*w<0?R+w:R}; $2=function(R,w,p){return R+p*(w-R)}; g.Xx=function(R,w){this.x=R!==void 0?R:0;this.y=w!==void 0?w:0}; n0=function(R,w){return R==w?!0:R&&w?R.x==w.x&&R.y==w.y:!1}; g.dg=function(R,w){this.width=R;this.height=w}; g.Zf=function(R,w){return R==w?!0:R&&w?R.width==w.width&&R.height==w.height:!1}; Y2=function(R){return R.width*R.height}; Ebb=function(R){return new RB(R[0].toLowerCase())}; Fx=function(R){if(R instanceof ic)return R;R=String(R).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'");return Qq(R)}; JYr=function(R){return jld(R)}; jld=function(R){const w=Fx("");return Qq(R.map(p=>h$(Fx(p))).join(h$(w).toString()))}; hPD=function(R){var w;if(!jw.test("div"))throw Error("");if(TdD.indexOf("DIV")!==-1)throw Error("");let p="":(R=JYr(w.map(r=>r instanceof ic?r:Fx(String(r)))),p+=">"+R.toString()+""); return Qq(p)}; idd=function(R){var w="";const p=Object.keys(R);for(let G=0;G2&&C$(f,I,r,2);return I}; C$=function(R,w,p,r){function f(G){G&&w.appendChild(typeof G==="string"?R.createTextNode(G):G)} for(;r0?f(G):g.iH(G&&typeof G.length=="number"&&typeof G.item=="function"?g.zp(G):G,f)}}; g.sW=function(R){return Im(document,R)}; Im=function(R,w){w=String(w);R.contentType==="application/xhtml+xml"&&(w=w.toLowerCase());return R.createElement(w)}; g.m9=function(R){return document.createTextNode(String(R))}; g.zM=function(R,w){R.appendChild(w)}; g.Bc=function(R){let w;for(;w=R.firstChild;)R.removeChild(w)}; Wc=function(R,w,p){R.insertBefore(w,R.childNodes[p]||null)}; g.x7=function(R){return R&&R.parentNode?R.parentNode.removeChild(R):null}; g.lA=function(R,w){return R&&w?R==w||R.contains(w):!1}; is=function(R){return R.nodeType==9?R:R.ownerDocument||R.document}; g.L$=function(R,w){if("textContent"in R)R.textContent=w;else if(R.nodeType==3)R.data=String(w);else if(R.firstChild&&R.firstChild.nodeType==3){for(;R.lastChild!=R.firstChild;)R.removeChild(R.lastChild);R.firstChild.data=String(w)}else g.Bc(R),R.appendChild(is(R).createTextNode(String(w)))}; AG=function(R){return R.tagName=="A"&&R.hasAttribute("href")||R.tagName=="INPUT"||R.tagName=="TEXTAREA"||R.tagName=="SELECT"||R.tagName=="BUTTON"?!R.disabled&&(!R.hasAttribute("tabindex")||q1(R)):R.hasAttribute("tabindex")&&q1(R)}; q1=function(R){R=R.tabIndex;return typeof R==="number"&&R>=0&&R<32768}; y8=function(R,w,p){if(!w&&!p)return null;const r=w?String(w).toUpperCase():null;return bA(R,function(f){return(!r||f.nodeName==r)&&(!p||typeof f.className==="string"&&g.ra(f.className.split(/\s+/),p))},!0)}; bA=function(R,w,p){R&&!p&&(R=R.parentNode);for(p=0;R;){if(w(R))return R;R=R.parentNode;p++}return null}; Tj=function(R){this.L=R||g.qx.document||document}; om=function(){return!(!V8||!V8.performance)}; tG=function(R){R.zi0=!0;return R}; OW=function(R){return g.f$?"webkit"+R:R.toLowerCase()}; K$=function(R){return function(){return R}}; g.EW=function(){}; HdH=function(R){var w=w||0;return function(){return R.apply(this,Array.prototype.slice.call(arguments,0,w))}}; D2=function(R){let w=!1,p;return function(){w||(p=R(),w=!0);return p}}; eE=function(R){let w=R;return function(){if(w){const p=w;w=null;p()}}}; M1=function(R,w,p){let r=0;return function(f){g.qx.clearTimeout(r);const G=arguments;r=g.qx.setTimeout(function(){R.apply(p,G)},w)}}; cc=function(R,w,p,r){this.top=R;this.right=w;this.bottom=p;this.left=r}; Pc=function(R){return R.right-R.left}; am=function(R,w){return R==w?!0:R&&w?R.top==w.top&&R.right==w.right&&R.bottom==w.bottom&&R.left==w.left:!1}; $7=function(R,w,p){w instanceof g.Xx?(R.left+=w.x,R.right+=w.x,R.top+=w.y,R.bottom+=w.y):(R.left+=w,R.right+=w,typeof p==="number"&&(R.top+=p,R.bottom+=p));return R}; g.X8=function(R,w,p,r){this.left=R;this.top=w;this.width=p;this.height=r}; n$=function(R,w){return R==w?!0:R&&w?R.left==w.left&&R.width==w.width&&R.top==w.top&&R.height==w.height:!1}; g.Z2=function(R,w,p){if(typeof w==="string")dp(R,p,w);else for(const r in w)dp(R,w[r],r)}; dp=function(R,w,p){(p=Y7(R,p))&&(vbY.test(p)?R.style.setProperty(p,w):R.style[p]=w)}; Y7=function(R,w){let p=F8[w];if(!p){var r=L0(w);p=r;R.style[r]===void 0&&(r=(g.f$?"Webkit":jE?"Moz":null)+dxx(r),R.style[r]!==void 0&&(p=r));F8[w]=p}return p}; g.JG=function(R,w){const p=R.style[L0(w)];return typeof p!=="undefined"?p:R.style[Y7(R,w)]||""}; TM=function(R,w){const p=is(R);return p.defaultView&&p.defaultView.getComputedStyle&&(R=p.defaultView.getComputedStyle(R,null))?R[w]||R.getPropertyValue(w)||"":""}; iA=function(R,w){return TM(R,w)||(R.currentStyle?R.currentStyle[w]:null)||R.style&&R.style[w]}; g.hG=function(R,w,p){let r;w instanceof g.Xx?(r=w.x,w=w.y):(r=w,w=p);R.style.left=Q8(r,!1);R.style.top=Q8(w,!1)}; gp=function(R){try{return R.getBoundingClientRect()}catch(w){return{left:0,top:0,right:0,bottom:0}}}; Ndd=function(R){const w=is(R);let p=iA(R,"position"),r=p=="fixed"||p=="absolute";for(R=R.parentNode;R&&R!=w;R=R.parentNode)if(R.nodeType==11&&R.host&&(R=R.host),p=iA(R,"position"),r=r&&p=="static"&&R!=w.documentElement&&R!=w.body,!r&&(R.scrollWidth>R.clientWidth||R.scrollHeight>R.clientHeight||p=="fixed"||p=="absolute"||p=="relative"))return R;return null}; g.Hc=function(R){var w=is(R);const p=new g.Xx(0,0);if(R==(w?is(w):document).documentElement)return p;R=gp(R);w=hJ(w);w=rp(w.L);p.x=R.left+w.x;p.y=R.top+w.y;return p}; N1=function(R,w){const p=new g.Xx(0,0);let r=GM(is(R));if(!K0(r,"parent"))return p;do{const f=r==w?g.Hc(R):vc(R);p.x+=f.x;p.y+=f.y}while(r&&r!=w&&r!=r.parent&&(R=r.frameElement)&&(r=r.parent));return p}; g.UW=function(R,w){R=k7(R);w=k7(w);return new g.Xx(R.x-w.x,R.y-w.y)}; vc=function(R){R=gp(R);return new g.Xx(R.left,R.top)}; k7=function(R){if(R.nodeType==1)return vc(R);R=R.changedTouches?R.changedTouches[0]:R;return new g.Xx(R.clientX,R.clientY)}; g.SE=function(R,w,p){if(w instanceof g.dg)p=w.height,w=w.width;else if(p==void 0)throw Error("missing height argument");R.style.width=Q8(w,!0);R.style.height=Q8(p,!0)}; Q8=function(R,w){typeof R=="number"&&(R=(w?Math.round(R):R)+"px");return R}; g.RL=function(R){var w=kr6;if(iA(R,"display")!="none")return w(R);const p=R.style,r=p.display,f=p.visibility,G=p.position;p.visibility="hidden";p.position="absolute";p.display="inline";R=w(R);p.display=r;p.position=G;p.visibility=f;return R}; kr6=function(R){const w=R.offsetWidth,p=R.offsetHeight,r=g.f$&&!w&&!p;return(w===void 0||r)&&R.getBoundingClientRect?(R=gp(R),new g.dg(R.right-R.left,R.bottom-R.top)):new g.dg(w,p)}; g.wO=function(R,w){R.style.display=w?"":"none"}; pA=function(R){return R?R.passive&&UxD()?R:R.capture||!1:!1}; rO=function(R,w,p,r){return typeof R.addEventListener==="function"?(R.addEventListener(w,p,pA(r)),!0):!1}; fA=function(R){return R.prerendering?3:{visible:1,hidden:2,prerender:3,preview:4,unloaded:5,"":0}[R.visibilityState||R.webkitVisibilityState||R.mozVisibilityState||""]??0}; GY=function(R){try{return!!R&&R.location.href!=null&&K0(R,"foo")}catch{return!1}}; IL=function(R){let w=R;for(;R&&R!=R.parent;)R=R.parent,GY(R)&&(w=R);return w}; uv=function(){return(mu||z1)&&Ww?Ww.mobile:!CA()&&(lc("iPod")||lc("iPhone")||lc("Android")||lc("IEMobile"))}; CA=function(){return(mu||z1)&&Ww?!Ww.mobile&&(lc("iPad")||lc("Android")||lc("Silk")):lc("iPad")||lc("Android")&&!lc("Mobile")||lc("Silk")}; mn=function(){var R=g.qx;const w=[];let p=null,r;do{r=R;if(GY(r)){var f=r.location.href;p=r.document&&r.document.referrer||null}else f=p,p=null;w.push(new sZ(f||""));try{R=r.parent}catch(G){R=null}}while(R&&r!==R);for(let G=0,I=w.length-1;G<=I;++G)w[G].depth=I-G;r=g.qx;if(r.location&&r.location.ancestorOrigins&&r.location.ancestorOrigins.length===w.length-1)for(R=1;R=0;--f){var G=R[f];!p&&SI6.test(G.url)&&(p=G);if(G.url&&!G.L){w=G;break}}f=null;G=R.length&&R[r].url;w.depth!==0&&G&&(f=R[r]);return new RVd(w,f,p)}; W8=function(R,w){if(R)for(const p in R)Object.prototype.hasOwnProperty.call(R,p)&&w(R[p],p,R)}; pkW=function(){const R=[];W8(wkd,w=>{R.push(w)}); return R}; xS=function(R,w){const p={};p[R]=w;return[p]}; LA=function(R,w,p,r,f){const G=[];W8(R,(I,C)=>{(I=lv(I,w,p,r,f))&&G.push(`${C}=${I}`)}); return G.join(w)}; lv=function(R,w,p,r,f){if(R==null)return"";w=w||"&";p=p||",$";typeof p==="string"&&(p=p.split(""));if(R instanceof Array){if(r||(r=0),rw&&(w=p.length);return 3997-w-R.O.length-1}; fSL=function(R,w){g.kb(w,f=>f.depth>=0); const p=v6(w,(f,G)=>Math.max(f,G.depth),-1),r=WdY(p+2); r[0]=R;g.iH(w,f=>r[f.depth+1]=f.L); return r}; ISb=function(){return Gpr().map(R=>lv(R))}; ubY=function(){const R=qI("IFRAME"),w={};g.iH(Ca_(),p=>{R.sandbox&&R.sandbox.supports&&R.sandbox.supports(p)&&(w[p]=!0)}); return w}; qI=function(R,w=document){return w.createElement(String(R).toLowerCase())}; Ab=function(R){V8.google_image_requests||(V8.google_image_requests=[]);const w=qI("IMG",V8.document);w.src=R;V8.google_image_requests.push(w)}; sMb=function(){bv();const R=V8.document;return!!(R&&R.body&&R.body.getBoundingClientRect&&typeof V8.setInterval==="function"&&typeof V8.clearInterval==="function"&&typeof V8.setTimeout==="function"&&typeof V8.clearTimeout==="function")}; yh=function(){bv();return ISb()}; bv=function(){var R=Vh(m6I);if(!R.L){if(!V8)throw Error("Context has not been set and window is undefined.");R.L=Vh(zVx)}return R.L}; tb=function(R){return(oL||(oL=new TextEncoder)).encode(R)}; OZ=function(R){g.qx.setTimeout(()=>{throw R;},0)}; Bax=function(R){return Array.prototype.map.call(R,function(w){w=w.toString(16);return w.length>1?w:"0"+w}).join("")}; KA=function(R,w,p,r){var f=w^R;var G;(R<<1&7)<7&&(R<<1&7)>=6&&(G=decodeURIComponent(p));if((R^33)>>3==1){var I;rg(f^5804,f^6764,p);(I=p[l[f^5819]][l[f^5764]]||null)&&(I=wg(f^5817,f^1059,I,p));G=[]}if(R+6>>3==1){I=p[l[f^6693]](l[f^6704],f^6702);const C=p[l[f^6693]](l[f^6704],I+1);I>0&&C>0?(r[l[f^6703]]=p[l[6]](0,C),p=p[l[6]](C+1)):(r[l[f^6703]]=p,p=l[1]);G=[p]}return G}; EZ=function(R){const w=[];for(let p=0;p>6|192:((f&64512)==55296&&r+1>18|240,w[p++]=f>>12&63|128):w[p++]=f>>12|224,w[p++]=f>>6&63|128),w[p++]=f&63|128)}return w}; g.c8=function(R,w){w===void 0&&(w=0);e4();w=MI[w];const p=Array(Math.floor(R.length/3)),r=w[64]||"";let f=0,G=0;for(;f>2];I=w[(I&3)<<4|C>>4];C=w[(C&15)<<2|u>>6];u=w[u&63];p[G++]=""+m+I+C+u}m=0;u=r;switch(R.length-f){case 2:m=R[f+1],u=w[(m&15)<<2]||r;case 1:R=R[f],p[G]=""+w[R>>2]+w[(R&3)<<4|m>>4]+u+r}return p.join("")}; g.P8=function(R,w,p){if(w){const r=[];let f=0;for(let G=0;G255){const C=Error("go/unicode-to-byte-error");if(p)throw C;r[f++]=I&255;I>>=8}r[f++]=I}R=g.c8(r,w)}else R=g.qx.btoa(R);return R}; $S=function(R){const w=[];aL(R,function(p){w.push(p)}); return w}; X0=function(R){const w=R.length;let p=w*3/4;p%3?p=Math.floor(p):g.G1("=.",R[w-1])&&(p=g.G1("=.",R[w-2])?p-2:p-1);const r=new Uint8Array(p);let f=0;aL(R,function(G){r[f++]=G}); return f!==p?r.subarray(0,f):r}; aL=function(R,w){function p(f){for(;r>4);I!=64&&(w(G<<4&240|I>>2),C!=64&&w(I<<6&192|C))}}; e4=function(){if(!nA){nA={};var R="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),w=["+/=","+/","-_=","-_.","-_"];for(let p=0;p<5;p++){const r=R.concat(w[p].split(""));MI[p]=r;for(let f=0;f=w||(p[R]=r+1,R=Error(),f0(R,"incident"),OZ(R))}}; NI=function(R,w=!1){return w&&Symbol.for&&R?Symbol.for(R):R!=null?Symbol(R):Symbol()}; S4=function(R,w){return w===void 0?R.L!==kS&&!!(2&(R.jC[UZ]|0)):!!(2&w)&&R.L!==kS}; Rp=function(R,w){if(R!=null)if(typeof R==="string")R=R?new F0(R,j4):Jb();else if(R.constructor!==F0)if(R!=null&&R instanceof Uint8Array)R=R.length?new F0(new Uint8Array(R),j4):Jb();else{if(!w)throw Error();R=void 0}return R}; wl=function(R,w){if(typeof w!=="number"||w<0||w>=R.length)throw Error();}; pW=function(R,w,p){const r=w&128?0:-1,f=R.length;var G;if(G=!!f)G=R[f-1],G=G!=null&&typeof G==="object"&&G.constructor===Object;const I=f+(G?-1:0);for(w=w&128?1:0;w>>0;uo=w;sy=(R-w)/4294967296>>>0}; ze=function(R){if(R<0){mz(0-R);R=uo;var w=sy;w=~w;R?R=~R+1:w+=1;const [p,r]=[R,w];uo=p>>>0;sy=r>>>0}else mz(R)}; WT=function(R,w){const p=w*4294967296+(R>>>0);return Number.isSafeInteger(p)?p:BT(R,w)}; x9=function(R,w){return CW(BigInt.asUintN(64,(BigInt(w>>>0)<>>0)))}; lo=function(R,w){return CW(BigInt.asIntN(64,(BigInt.asUintN(32,BigInt(w))<>>=0;R>>>=0;var p;w<=2097151?p=""+(4294967296*w+R):p=""+(BigInt(w)<>>0)):p=BT(R,w);return p}; q4=function(R){R.length<16?ze(Number(R)):(R=BigInt(R),uo=Number(R&BigInt(4294967295))>>>0,sy=Number(R>>BigInt(32)&BigInt(4294967295)))}; AU=function(R){if(R!=null&&typeof R!=="number")throw Error(`Value of float/double field must be a number, found ${typeof R}: ${R}`);return R}; bo=function(R){if(R==null||typeof R==="number")return R;if(R==="NaN"||R==="Infinity"||R==="-Infinity")return Number(R)}; yS=function(R){return R.displayName||R.name||"unknown type name"}; VS=function(R){if(R!=null&&typeof R!=="boolean")throw Error(`Expected boolean but got ${ol(R)}: ${R}`);return R}; tU=function(R){switch(typeof R){case "bigint":return!0;case "number":return op(R);case "string":return lSY.test(R);default:return!1}}; Oy=function(R){if(typeof R!=="number")throw gO("int32");if(!op(R))throw gO("int32");return R|0}; KW=function(R){return R==null?R:Oy(R)}; Ey=function(R){if(R==null)return R;if(typeof R==="string"&&R)R=+R;else if(typeof R!=="number")return;return op(R)?R|0:void 0}; eD=function(R){if(R==null)return R;if(typeof R==="string"&&R)R=+R;else if(typeof R!=="number")return;return op(R)?R>>>0:void 0}; ap=function(R){if(R!=null)a:{if(!tU(R))throw gO("int64");switch(typeof R){case "string":R=M4(R);break a;case "bigint":R=CW(cT(64,R));break a;default:R=PT(R)}}return R}; dl=function(R){tU(R);R=$9(R);if(!Xq(R)){ze(R);var w=uo,p=sy;if(R=p&2147483648)w=~w+1>>>0,p=~p>>>0,w==0&&(p=p+1>>>0);w=WT(w,p);R=typeof w==="number"?R?-w:w:R?"-"+w:w}return R}; Zv=function(R){tU(R);var w=$9(Number(R));if(Xq(w))return String(w);w=R.indexOf(".");w!==-1&&(R=R.substring(0,w));w=R.length;(R[0]==="-"?w<20||w===20&&R<="-9223372036854775808":w<19||w===19&&R<="9223372036854775807")||(q4(R),R=LW());return R}; M4=function(R){var w=$9(Number(R));if(Xq(w))return CW(w);w=R.indexOf(".");w!==-1&&(R=R.substring(0,w));return CW(cT(64,BigInt(R)))}; PT=function(R){Xq(R)?R=CW(dl(R)):(tU(R),R=$9(R),Xq(R)?R=String(R):(ze(R),R=LW()),R=CW(R));return R}; Y9=function(R){const w=typeof R;if(R==null)return R;if(w==="bigint")return CW(cT(64,R));if(tU(R))return w==="string"?M4(R):PT(R)}; LbI=function(R){if(R==null)return R;const w=typeof R;if(w==="bigint")return String(cT(64,R));if(tU(R)){if(w==="string")return Zv(R);if(w==="number")return dl(R)}}; Fq=function(R){if(R==null)return R;var w=typeof R;if(w==="bigint")return String(qiH(64,R));if(tU(R)){if(w==="string")return tU(R),w=$9(Number(R)),Xq(w)&&w>=0?R=String(w):(w=R.indexOf("."),w!==-1&&(R=R.substring(0,w)),R[0]==="-"?w=!1:(w=R.length,w=w<20?!0:w===20&&R<="18446744073709551615"),w||(q4(R),R=BT(uo,sy))),R;if(w==="number")return tU(R),R=$9(R),R>=0&&Xq(R)||(ze(R),R=WT(uo,sy)),R}}; jD=function(R){if(R==null||typeof R=="string"||R instanceof F0)return R}; AtP=function(R){if(typeof R!=="string")throw Error();return R}; JU=function(R){if(R!=null&&typeof R!=="string")throw Error();return R}; Te=function(R){return R==null||typeof R==="string"?R:void 0}; io=function(R,w){if(!(R instanceof w))throw Error(`Expected instanceof ${yS(w)} but got ${R&&yS(R.constructor)}`);return R}; gl=function(R,w,p){if(R!=null&&R[QS]===hU)return R;if(Array.isArray(R)){var r=R[UZ]|0;p=r|p&32|p&2;p!==r&&(R[UZ]=p);return new w(R)}}; HT=function(R){return R}; N4=function(R){const w=al(vT);return w?R[w]:void 0}; k9=function(R,w){for(const p in R)!isNaN(p)&&w(R,+p,R[p])}; bRI=function(R){const w=new Uy;k9(R,(p,r,f)=>{w[r]=[...f]}); w.vQ=R.vQ;return w}; VP_=function(R,w){w<100||v8(ytW,1)}; var omP=function(R){return SD[l[5]](this,1,1900,R)}; wE=function(R,w,p,r){const f=r!==void 0;r=!!r;var G=al(vT),I;!f&&G&&(I=R[G])&&k9(I,VP_);G=[];var C=R.length;let u;I=4294967295;let m=!1;const z=!!(w&64),B=z?w&128?0:-1:void 0;w&1||(u=C&&R[C-1],u!=null&&typeof u==="object"&&u.constructor===Object?(C--,I=C):u=void 0,!z||w&128||f||(m=!0,I=(RD??HT)(I-B,B,R,u,void 0)+B));w=void 0;for(var W=0;W=I){const q=W-B;(w??(w={}))[q]=x}else G[W]=x}if(u)for(let x in u){C=u[x];if(C==null||(C=p(C,r))==null)continue; W=+x;let q;z&&!Number.isNaN(W)&&(q=W+B)0?void 0:R===0?Ck||(Ck=[0,void 0]):[-R,void 0];case "string":return[0,R];case "object":return R}}; sX=function(R,w){return u4(R,w[0],w[1])}; u4=function(R,w,p,r=0){if(R==null){var f=32;p?(R=[p],f|=128):R=[];w&&(f=f&-16760833|(w&1023)<<14)}else{if(!Array.isArray(R))throw Error("narr");f=R[UZ]|0;if(mU&&1&f)throw Error("rfarr");2048&f&&!(2&f)&&EmH();if(f&256)throw Error("farr");if(f&64)return(f|r)!==f&&(R[UZ]=f|r),R;if(p&&(f|=128,p!==R[0]))throw Error("mid");a:{p=R;f|=64;var G=p.length;if(G){var I=G-1;const u=p[I];if(u!=null&&typeof u==="object"&&u.constructor===Object){w=f&128?0:-1;I-=w;if(I>=1024)throw Error("pvtlmt");for(var C in u)if(G= +C,G1024)throw Error("spvt");f=f&-16760833|(C&1023)<<14}}}R[UZ]=f|64|r;return R}; EmH=function(){if(mU)throw Error("carr");v8(D6H,5)}; eV_=function(R,w){if(typeof R!=="object")return R;if(Array.isArray(R)){var p=R[UZ]|0;R.length===0&&p&1?R=void 0:p&2||(!w||4096&p||16&p?R=zJ(R,p,!1,w&&!(p&16)):(R[UZ]|=34,p&4&&Object.freeze(R)));return R}if(R!=null&&R[QS]===hU)return w=R.jC,p=w[UZ]|0,S4(R,p)?R:B$(R,w,p)?W$(R,w):zJ(w,p);if(R instanceof F0)return R}; W$=function(R,w,p){R=new R.constructor(w);p&&(R.L=kS);R.G=kS;return R}; zJ=function(R,w,p,r){r??(r=!!(34&w));R=wE(R,w,eV_,r);r=32;p&&(r|=2);w=w&16769217|r;R[UZ]=w;return R}; xL=function(R){const w=R.jC,p=w[UZ]|0;return S4(R,p)?B$(R,w,p)?W$(R,w,!0):new R.constructor(zJ(w,p,!1)):R}; l4=function(R){if(R.L!==kS)return!1;var w=R.jC;w=zJ(w,w[UZ]|0);w[UZ]|=2048;R.jC=w;R.L=void 0;R.G=void 0;return!0}; Lk=function(R){if(!l4(R)&&S4(R,R.jC[UZ]|0))throw Error();}; qq=function(R,w){w===void 0&&(w=R[UZ]|0);w&32&&!(w&4096)&&(R[UZ]=w|4096)}; B$=function(R,w,p){return p&2?!0:p&32&&!(p&4096)?(w[UZ]=p|2,R.L=kS,!0):!1}; b4=function(R,w,p,r,f){Object.isExtensible(R);w=AZ(R.jC,w,p,f);if(w!==null||r&&R.G!==kS)return w}; AZ=function(R,w,p,r){if(w===-1)return null;const f=w+(p?0:-1),G=R.length-1;let I,C;if(!(G<1+(p?0:-1))){if(f>=G)if(I=R[G],I!=null&&typeof I==="object"&&I.constructor===Object)p=I[w],C=!0;else if(f===G)p=I;else return;else p=R[f];if(r&&p!=null){r=r(p);if(r==null)return r;if(!Object.is(r,p))return C?I[w]=r:R[f]=r,r}return p}}; VF=function(R,w,p,r){Lk(R);const f=R.jC;yF(f,f[UZ]|0,w,p,r);return R}; yF=function(R,w,p,r,f){const G=p+(f?0:-1);var I=R.length-1;if(I>=1+(f?0:-1)&&G>=I){const C=R[I];if(C!=null&&typeof C==="object"&&C.constructor===Object)return C[p]=r,w}if(G<=I)return R[G]=r,w;r!==void 0&&(I=(w??(w=R[UZ]|0))>>14&1023||536870912,p>=I?r!=null&&(R[I+(f?0:-1)]={[p]:r}):R[G]=r);return w}; DQ=function(R,w,p,r,f){let G=R.jC,I=G[UZ]|0;r=S4(R,I)?1:r;f=!!f||r===3;r===2&&l4(R)&&(G=R.jC,I=G[UZ]|0);R=oD(G,w);let C=R===tZ?7:R[UZ]|0,u=OX(C,I);var m=4&u?!1:!0;if(m){4&u&&(R=[...R],C=0,u=Kk(u,I),I=yF(G,I,w,R));let z=0,B=0;for(;z{const C=gl(I,p,w);G=C!==I&&C!=null;return C}); if(r!=null)return G&&!S4(r)&&qq(R,w),r}; i4=function(R,w,p,r){let f=R.jC,G=f[UZ]|0;w=TJ(f,G,w,p,r);if(w==null)return w;G=f[UZ]|0;if(!S4(R,G)){const I=xL(w);I!==w&&(l4(R)&&(f=R.jC,G=f[UZ]|0),w=I,G=yF(f,G,p,w,r),qq(f,G))}return w}; QF=function(R,w,p,r,f,G,I,C,u){var m=S4(R,p);G=m?1:G;C=!!C||G===3;m=u&&!m;(G===2||m)&&l4(R)&&(w=R.jC,p=w[UZ]|0);R=oD(w,f,I);var z=R===tZ?7:R[UZ]|0,B=OX(z,p);if(u=!(4&B)){var W=R,x=p;const q=!!(2&B);q&&(x|=2);let O=!q,e=!0,P=0,c=0;for(;P32)for(f|=(p&127)>>4,G=3;G<32&&p&128;G+=7)p=I[C++],f|=(p&127)<>>0,f>>>0);throw Error();}; lf=function(R){let w=0,p=R.L;const r=p+10,f=R.C;for(;p>>0}; bf=function(R){const w=AK(R);R=AK(R);return x9(w,R)}; yO=function(R){var w=R.K;w||(w=R.C,w=R.K=new DataView(w.buffer,w.byteOffset,w.byteLength));w=w.getFloat64(R.L,!0);qy(R,8);return w}; ct6=function(R){return LP(R)}; Wr=function(R,w){R.L=w;if(w>R.O)throw Error();}; qy=function(R,w){Wr(R,R.L+w)}; VO=function(R,w){if(w<0)throw Error();const p=R.L;w=p+w;if(w>R.O)throw Error();R.L=w;return p}; oz=function(R,w){if(w==0)return Jb();var p=VO(R,w);R.mE&&R.J?p=R.C.subarray(p,p+w):(R=R.C,w=p+w,p=p===w?new Uint8Array(0):R.slice(p,w));return p.length==0?Jb():new F0(p,j4)}; KP=function(R,w,p,r){if(tK.length){const f=tK.pop();Oj(f,r);f.L.init(R,w,p,r);return f}return new PaH(R,w,p,r)}; Oj=function(R,{d1:w=!1}={}){R.d1=w}; Ej=function(R){var w=R.L;if(w.L==w.O)return!1;R.G=R.L.L;var p=LP(R.L)>>>0;w=p>>>3;p&=7;if(!(p>=0&&p<=5))throw Error();if(w<1)throw Error();R.O=w;R.C=p;return!0}; De=function(R){switch(R.C){case 0:R.C!=0?De(R):lf(R.L);break;case 1:qy(R.L,8);break;case 2:if(R.C!=2)De(R);else{var w=LP(R.L)>>>0;qy(R.L,w)}break;case 5:qy(R.L,4);break;case 3:w=R.O;do{if(!Ej(R))throw Error();if(R.C==4){if(R.O!=w)throw Error();break}De(R)}while(1);break;default:throw Error();}}; ec=function(R,w,p){const r=R.L.O;var f=LP(R.L)>>>0;f=R.L.L+f;let G=f-r;G<=0&&(R.L.O=f,p(w,R,void 0,void 0,void 0),G=f-R.L.L);if(G)throw Error();R.L.L=f;R.L.O=r}; Pr=function(R){var w=LP(R.L)>>>0,p=R.L;R=VO(p,w);var r=p.C;(p=My)||(p=My=new TextDecoder("utf-8",{fatal:!0}));w=R+w;r=R===0&&w===r.length?r:r.subarray(R,w);try{var f=p.decode(r)}catch(G){if(cr===void 0){try{p.decode(new Uint8Array([128]))}catch(I){}try{p.decode(new Uint8Array([97])),cr=!0}catch(I){cr=!1}}!cr&&(My=void 0);throw G;}return f}; nP=function(R){const w=LP(R.L)>>>0;return oz(R.L,w)}; dU=function(R,w,p){var r=LP(R.L)>>>0;for(r=R.L.L+r;R.L.L>BigInt(32)))}; jc=function(R){if(!R)return F3||(F3=new Ze(0,0));if(!/^\d+$/.test(R))return null;q4(R);return new Ze(uo,sy)}; JK=function(R){return R.C===0?new Ze(0,1+~R.L):new Ze(~R.C+1,~R.L)}; hK=function(R){if(!R)return TG||(TG=new QO(0,0));if(!/^-?\d+$/.test(R))return null;q4(R);return new QO(uo,sy)}; gU=function(R,w,p){for(;p>0||w>127;)R.L.push(w&127|128),w=(w>>>7|p<<25)>>>0,p>>>=7;R.L.push(w)}; Hr=function(R,w){R.L.push(w>>>0&255);R.L.push(w>>>8&255);R.L.push(w>>>16&255);R.L.push(w>>>24&255)}; vr=function(R,w){for(;w>127;)R.L.push(w&127|128),w>>>=7;R.L.push(w)}; Ny=function(R,w){if(w>=0)vr(R,w);else{for(let p=0;p<9;p++)R.L.push(w&127|128),w>>=7;R.L.push(1)}}; kK=function(R,w){w.length!==0&&(R.O.push(w),R.C+=w.length)}; Uj=function(R,w,p){vr(R.L,w*8+p)}; Sc=function(R,w){Uj(R,w,2);w=R.L.end();kK(R,w);w.push(R.C);return w}; Rj=function(R,w){var p=w.pop();for(p=R.C+R.L.length()-p;p>127;)w.push(p&127|128),p>>>=7,R.C++;w.push(p);R.C++}; po=function(R,w,p){if(p!=null)switch(wM(p),Uj(R,w,1),typeof p){case "number":R=R.L;mz(p);Hr(R,uo);Hr(R,sy);break;case "bigint":p=YK(p);R=R.L;w=p.L;Hr(R,p.C);Hr(R,w);break;default:p=jc(p),R=R.L,w=p.L,Hr(R,p.C),Hr(R,w)}}; rM=function(R,w,p){p!=null&&(p=parseInt(p,10),Uj(R,w,0),Ny(R.L,p))}; fo=function(R,w,p){Uj(R,w,2);vr(R.L,p.length);kK(R,R.L.end());kK(R,p)}; wM=function(R){switch(typeof R){case "string":jc(R)}}; Gb=function(R){switch(typeof R){case "string":R.length&&R[0]==="-"?jc(R.substring(1)):jc(R)}}; Ij=function(){const R=class{constructor(){throw Error();}};Object.setPrototypeOf(R,R.prototype);return R}; Co=function(R,w){if(w==null||w=="")return new R;w=JSON.parse(w);if(!Array.isArray(w))throw Error("dnarr");w[UZ]|=32;return new R(w)}; mc=function(R,w){return new uT(R,w,sb)}; BR=function(R,w,p,r,f){w=zb(w,r);w!=null&&(p=Sc(R,p),f(w,R),Rj(R,p))}; lT=function(R,w,p,r){var f=r[R];if(f)return f;f={};f.Ah=r;f.kh=KbI(r[0]);var G=r[1];let I=1;G&&G.constructor===Object&&(f.extensions=G,G=r[++I],typeof G==="function"&&(f.rp=!0,WR??(WR=G),xA??(xA=r[I+1]),G=r[I+=2]));const C={};for(;G&&Array.isArray(G)&&G.length&&typeof G[0]==="number"&&G[0]>0;){for(var u=0;uf(G,I,C,r):f}; yQ=function(R,w,p,r,f){const G=p.rU;let I,C;R[w]=(u,m,z)=>G(u,m,z,C||(C=lT(bT,A0,yQ,r).kh),I||(I=VQ(r)),f)}; VQ=function(R){let w=R[oj];if(w!=null)return w;const p=lT(bT,A0,yQ,R);w=p.rp?(r,f)=>WR(r,f,p):(r,f)=>{for(;Ej(f)&&f.C!=4;){var G=f.O,I=p[G]; if(I==null){var C=p.extensions;C&&(C=C[G])&&(C=Xkr(C),C!=null&&(I=p[G]=C))}if(I==null||!I(f,r,G)){C=f;I=C.G;De(C);if(C.d1)var u=void 0;else u=C.L.L-I,C.L.L=I,u=oz(C.L,u);I=void 0;C=r;u&&((I=C[vT]??(C[vT]=new Uy))[G]??(I[G]=[])).push(u)}}if(r=N4(r))r.vQ=p.Ah[t0];return!0}; R[oj]=w;R[t0]=nmW.bind(R);return w}; nmW=function(R,w,p,r){var f=this[bT];const G=this[oj],I=sX(void 0,f.kh),C=N4(R);if(C){var u=!1,m=f.extensions;if(m){f=(z,B,W)=>{if(W.length!==0)if(m[B])for(const x of W){z=KP(x);try{u=!0,G(I,z)}finally{z.free()}}else r?.(R,B,W)}; if(w==null)k9(C,f);else if(C!=null){const z=C[w];z&&f(C,w,z)}if(u){let z=R[UZ]|0;if(z&2&&z&2048&&!p?.vG)throw Error();const B=fW(z),W=(x,q)=>{if(AZ(R,x,B)!=null)switch(p?.Oo0){case 1:return;default:throw Error();}q!=null&&(z=yF(R,z,x,q,B));delete C[x]}; w==null?pW(I,I[UZ]|0,(x,q)=>{W(x,q)}):W(w,AZ(I,w,B))}}}}; Xkr=function(R){R=Lo(R);const w=R[0].rU;if(R=R[1]){const p=VQ(R),r=lT(bT,A0,yQ,R).kh;return(f,G,I)=>w(f,G,I,r,p)}return w}; Ob=function(R,w,p){R[w]=p.zN}; Eb=function(R,w,p,r){let f,G;const I=p.zN;R[w]=(C,u,m)=>I(C,u,m,G||(G=lT(Ko,Ob,Eb,r).kh),f||(f=Da(r)))}; Da=function(R){let w=R[eg];if(!w){const p=lT(Ko,Ob,Eb,R);w=(r,f)=>MW(r,f,p); R[eg]=w}return w}; MW=function(R,w,p){pW(R,R[UZ]|0,(r,f)=>{if(f!=null){var G=d6d(p,r);G?G(w,f,r):r<500||v8(ZRH,3)}}); (R=N4(R))&&k9(R,(r,f,G)=>{kK(w,w.L.end());for(r=0;rr(I,C,u,G,f)}else p=r; return R[w]=p}}; cR=function(R,w,p){if(Array.isArray(w)){var r=w[UZ]|0;if(r&4)return w;for(var f=0,G=0;f>BigInt(32)));gU(R.L,p.C,p.L);break;default:p=hK(w),gU(R.L,p.C,p.L)}}}; Za=function(R,w,p){w=Ey(w);w!=null&&w!=null&&(Uj(R,p,0),Ny(R.L,w))}; YA=function(R,w,p){w=w==null||typeof w==="boolean"?w:typeof w==="number"?!!w:void 0;w!=null&&(Uj(R,p,0),R.L.L.push(w?1:0))}; FK=function(R,w,p){w=Te(w);w!=null&&fo(R,p,tb(w))}; jg=function(R,w,p,r,f){w=zb(w,r);w!=null&&(p=Sc(R,p),f(w,R),Rj(R,p))}; Tb=function(R,w,p){if(R.C!==1)return!1;$A(w,p,bf(R.L));return!0}; iT=function(R,w){return(p,r)=>{{const G={q5:!0};r&&Object.assign(G,r);p=KP(p,void 0,void 0,G);try{const I=new R,C=I.jC;VQ(w)(C,p);var f=I}finally{p.free()}}return f}}; vR=function(R){return function(){return QQ(this,R)}}; NW=function(R){return w=>Co(R,w)}; kA=function(R,w){return(...p)=>{if(R.L>-1)return w(...p);try{return R.L=R.O.L.now(),w(...p)}finally{R.G+=R.O.L.now()-R.L,R.L=-1,R.C+=1}}}; Ub=function(){return Vh(YiD)}; Rt=function(R,w,p,r){if(Math.random()<(r||R.L))try{let f;p instanceof Sg?f=p:(f=new Sg,W8(p,function(I,C){var u=f;const m=u.G++;I=xS(C,I);u.L.push(m);u.C[m]=I})); const G=f.qk(R.C,"pagead2.googlesyndication.com","/pagead/gen_204?id="+w+"&");G&&(bv(),Ab(G))}catch(f){}}; wA=function(){const R=g.qx.performance;return R&&R.now&&R.timing?Math.floor(R.now()+R.timing.navigationStart):g.c6()}; pp=function(){const R=g.qx.performance;return R&&R.now?R.now():null}; GH=function(R){R&&rA&&fp()&&(rA.clearMarks(`goog_${R.label}_${R.uniqueId}_start`),rA.clearMarks(`goog_${R.label}_${R.uniqueId}_end`))}; It=function(R,w,p,r,f,G,I){let C="";R&&(C+=R+":");p&&(C+="//",w&&(C+=w+"@"),C+=p,r&&(C+=":"+r));f&&(C+=f);G&&(C+="?"+G);I&&(C+="#"+I);return C}; g.Cp=function(R){return R.match(Fbr)}; uu=function(R){return R?decodeURI(R):R}; g.sH=function(R){return uu(g.Cp(R)[3]||null)}; ma=function(R){return uu(g.Cp(R)[5]||null)}; g.zH=function(R){R=g.Cp(R);return It(R[1],R[2],R[3],R[4])}; BO=function(R){R=g.Cp(R);return It(null,null,null,null,R[5],R[6],R[7])}; WO=function(R){const w=R.indexOf("#");return w<0?R:R.slice(0,w)}; xP=function(R,w){if(R){R=R.split("&");for(let p=0;p=0?(f=R[p].substring(0,r),G=R[p].substring(r+1)):f=R[p];w(f,G?zj(G):"")}}}; lu=function(R,w){if(!w)return R;var p=R.indexOf("#");p<0&&(p=R.length);let r=R.indexOf("?"),f;r<0||r>p?(r=p,f=""):f=R.substring(r+1,p);R=[R.slice(0,r),f,R.slice(p)];p=R[1];R[1]=w?p?p+"&"+w:w:p;return R[0]+(R[1]?"?"+R[1]:"")+R[2]}; Lp=function(R,w,p){if(Array.isArray(w))for(let r=0;r=0&&wp)f=p;r+=w.length+1;return zj(R.slice(r,f!==-1?f:0))}; OH=function(R,w){const p=R.search(ot);let r=0,f;const G=[];for(;(f=V7(R,r,w,p))>=0;)G.push(R.substring(r,f)),r=Math.min(R.indexOf("&",f)+1||p,p);G.push(R.slice(r));return G.join("").replace(JtD,"$1")}; TaH=function(R,w,p){return y7(OH(R,w),w,p)}; Kp=function(R){let w=R.toString();R.name&&w.indexOf(R.name)==-1&&(w+=": "+R.name);R.message&&w.indexOf(R.message)==-1&&(w+=": "+R.message);if(R.stack)a:{R=R.stack;var p=w;try{R.indexOf(p)==-1&&(R=p+"\n"+R);let r;for(;R!=r;)r=R,R=R.replace(/((https?:\/..*\/)[^\/:]*:\d+(?:.|\n)*)\2/,"$1");w=R.replace(/\n */g,"\n");break a}catch(r){w=p;break a}w=void 0}return w}; DX=function(R,w,p,r){return kA(Ub().L.L,()=>{let f,G;try{R.A2&&R.A2.L?(G=R.A2.start(w.toString(),3),f=p(),R.A2.end(G)):f=p()}catch(I){let C=R.r5;try{GH(G),C=R.C(w,new EH(Kp(I)),void 0,r)}catch(u){R.CA(217,u)}if(!C)throw I;}return f})()}; MD=function(R,w,p,r){var f=eI;return kA(Ub().L.L,(...G)=>DX(f,R,()=>w.apply(p,G),r))}; iR6=function(){var R=Ub().O,w=cO>=0?Date.now()-PO-cO:-1;const p=at?Date.now()-PO-$P:-1,r=X_>=0?Date.now()-PO-X_:-1;let f;if(R==947190542)return 100;if(R==79463069)return 200;R=[2E3,4E3];f=[250,500,1E3];eI.CA(637,Error(),.001,void 0);let G=w;p!=-1&&p1500&&r<4E3?500:I}; np=function(R){const w=R!==R.top,p=R.top===IL(R);let r=-1,f=0,G;w&&p&&R.top.mraid?(r=3,G=R.top.mraid):r=(G=R.mraid)?w?p?2:1:0:-1;G&&(G.IS_GMA_SDK||(f=2),Pk(QM_,I=>typeof G[I]==="function")||(f=1)); return{E5:G,compatibility:f,hL:r}}; dA=function(R,w,p=!1){if(R&&w!==null&&w!=w.top){if(!w.top)return new g.dg(-12245933,-12245933);w=w.top}try{return p?(new g.dg(w.innerWidth,w.innerHeight)).round():wp(w||window).round()}catch(r){return new g.dg(-12245933,-12245933)}}; ZX=function(R,w,p){try{if(R){if(!w.top)return new cc(-12245933,-12245933,-12245933,-12245933);w=w.top}const {height:f,width:G}=dA(R,w,p);if(G===-12245933)return new cc(G,G,G,G);var r=hJ(w.document);const {x:I,y:C}=rp(r.L);return new cc(C,I+G,C+f,I)}catch{return new cc(-12245933,-12245933,-12245933,-12245933)}}; YP=function(R){return new cc(R.top,R.right,R.bottom,R.left)}; F_=function(R){const w=R.top||0,p=R.left||0;return new cc(w,p+(R.width||0),w+(R.height||0),p)}; jI=function(R){return R!=null&&R>=0&&R<=1}; hVl=function(R,w=V8){w!==null&&w!=w.top&&(w=w.top);let p=0,r=0;try{const f=w.document,G=f.body,I=f.documentElement;if(f.compatMode=="CSS1Compat"&&I.scrollHeight)p=I.scrollHeight!=R.height?I.scrollHeight:I.offsetHeight,r=I.scrollWidth!=R.width?I.scrollWidth:I.offsetWidth;else{let C=I.scrollHeight,u=I.scrollWidth,m=I.offsetHeight,z=I.offsetWidth;I.clientHeight!=m&&(C=G.scrollHeight,u=G.scrollWidth,m=G.offsetHeight,z=G.offsetWidth);C>R.height?C>m?(p=C,r=u):(p=m,r=z):CIK(R,w))||IK(R,"OMI/")&&!IK(R,"XiaoMi/")?!0:IK(R,"Presto")&&IK(R,"Linux")&&!IK(R,"X11")&&!IK(R,"Android")&&!IK(R,"Mobi"):!1}; J4=function(){return Vh(HRd)}; TH=function(R,w){w&&w.screen&&(R.G=new g.dg(w.screen.width,w.screen.height))}; iu=function(R,w){const p=R.L?new g.dg(Pc(R.L),R.L.getHeight()):new g.dg(0,0);R.K=hVl(p,w)}; h4=function(){var R=J4();if(R.J>0||R.U)return!0;R=bv().C.isVisible();const w=fA(Q7)===0;return R||w}; HO=function(R){const w=g.zp(R.K);g.iH(w,p=>{p.pB(R.L)}); R.L!=R||gA(R)}; vO=function(R,w){g.ra(R.K,w)||(R.K.push(w),w.pB(R.L),w.J(R.G),w.Hi()&&(R.xY=!0))}; ND=function(R){R.xY=R.K.length?Nx(R.K,w=>w.Hi()):!1}; kP=function(R){R=R.L;R.nB();R.YY();var w=J4();w.D=ZX(!1,R.O,w.isMobileDevice);iu(J4(),R.O);R.G.L=R.q0()}; gA=function(R){const w=g.zp(R.K);g.iH(w,p=>{p.J(R.G)})}; UH=function(R,w){return R.U?new cc(Math.max(w.top+R.U.top,w.top),Math.min(w.left+R.U.right,w.right),Math.min(w.top+R.U.bottom,w.bottom),Math.max(w.left+R.U.left,w.left)):w.clone()}; vmY=function(R){switch(Math.trunc(R.O)){case -16:return-16;case -8:return-8;case 0:return 0;case 8:return 8;case 16:return 16;default:return 16}}; SI=function(R,w){return R.Ow.O?!1:R.Cw.C?!1:typeof R.Ltypeof w.L?!1:R.L{R.add(p.C,p.L,vmY(p))})}; Rf=function(R,w){W8(w,(p,r)=>{p===void 0||R.add(r,p,0)}); return R}; wG=function(R){var w=kpx;R.C&&(g.tt(R.L,(p,r)=>SI(r,p)?1:SI(p,r)?-1:0),R.C=!1); return v6(R.L,(p,r)=>{r=w(r);return`${p}${p!=""&&r!=""?"&":""}${r}`},"")}; g.p5=function(R){R&&typeof R.dispose=="function"&&R.dispose()}; g.rG=function(R){for(let w=0,p=arguments.length;w{var f=R.L;if(!r.L&&(r.O(w,p),r.G())){r.L=!0;var G=r.C();const I=new Gw;I.add("id","av-js");I.add("type","verif");I.add("vtype",r.K);r=Vh(U6l);I.add("i",r.L++);I.add("adk",f);Rf(I,G);f=new SiW(I);If(f)}})}; wwd=function(R){return g.gd(R,(w,p,r)=>p>0?r[p]-r[p-1]:r[p])}; C5=function(R,w,p){R=g.gd(R.L,r=>w(r)); return p?R:wwd(R)}; uD=function(R,w=!0){return C5(R,p=>p.L,w)}; sN=function(R,w,p){const r=g.wa(R.C,f=>w<=f); return r==-1?0:p(R.L[r])}; mo=function(R,w){return sN(R,w,p=>p.L)}; zw=function(R,w=!0){return C5(R,p=>p.O,w)}; Bg=function(R,w){return sN(R,w,p=>p.O)}; Wg=function(R,w){return sN(R,w,p=>p.C)}; xd=function(R){g.iH(R.L,w=>{w.C=0})}; lD=function(R,w=!0){return zw(R.C,w)}; qV=function(R,w){w=L5(w);return w===0?0:L5(R)/w}; L5=function(R){return Math.max(R.bottom-R.top,0)*Math.max(R.right-R.left,0)}; var pwl=function(R,w){return AQ[l[5]](this,32,320,R,w)}; r$H=function(R,w){if(!R||!w)return!1;let p=0;for(;R!==null&&p++<100;){if(R===w)return!0;try{if(R=R.parentElement||R){const r=is(R),f=r&&GM(r),G=f&&f.frameElement;G&&(R=G)}}catch(r){break}}return!1}; G1d=function(R,w,p){if(!R||!w)return!1;w=$7(R.clone(),-w.left,-w.top);R=(w.left+w.right)/2;w=(w.top+w.bottom)/2;GY(window.top)&&window.top&&window.top.document&&(window=window.top);if(!fpY())return!1;R=window.document.elementFromPoint(R,w);if(!R)return!1;w=(w=(w=is(p))&&w.defaultView&&w.defaultView.frameElement)&&r$H(w,R);const r=R===p;R=!r&&R&&bA(R,f=>f===p); return!(w||r||R)}; Ipl=function(R,w,p,r){return J4().O?!1:Pc(R)<=0||R.getHeight()<=0?!0:p&&r?bD(208,()=>G1d(R,w,p)):!1}; urD=function(R){R=R.Bu.zJ;var w;if(w=R&&R.getAttribute)w=/-[a-z]/.test("googleAvInapp")?!1:CcW&&R.dataset?"googleAvInapp"in R.dataset:R.hasAttribute?R.hasAttribute("data-"+qN()):!!R.getAttribute("data-"+qN());w&&(J4().C=!0)}; ye=function(R,w){w!=R.OX&&(R.OX=w,R=J4(),w?R.J++:R.J>0&&R.J--)}; Ve=function(R,w){if(R.ZH){if(w.getName()===R.ZH.getName())return;R.ZH.dispose();R.ZH=null}w=w.create(R.Bu.L,R.gB,R.Hi());if(w=w!=null&&w.observe()?w:null)R.ZH=w}; of=function(R,w,p){if(!R.fO||R.Fv==-1||w.C===-1||R.fO.C===-1)return 0;R=w.C-R.fO.C;return R>p?0:R}; sKY=function(R,w,p){if(R.ZH){R.ZH.K();var r=R.ZH.Jl,f=r.G,G=f.L;if(r.J!=null){var I=r.O;R.N$=new g.Xx(I.left-G.left,I.top-G.top)}G=R.Fa()?Math.max(r.L,r.K):r.L;I={};f.volume!==null&&(I.volume=f.volume);f=R.El(r);R.fO=r;R.WS(G,w,p,!1,I,f,r.U)}}; miL=function(R){if(R.GB&&R.sO){var w=SP(R.gB,"od")==1,p=J4().L,r=R.sO,f=R.ZH?R.ZH.getName():"ns",G=R.N$,I=new g.dg(Pc(p),p.getHeight());p=R.Fa();R={BY:f,N$:G,G$:I,Fa:p,DH:R.rY.DH,Lr:w};if(w=r.C){w.K();f=w.Jl;G=f.G.L;var C=I=null;f.J!=null&&G&&(I=f.O,I=new g.Xx(I.left-G.left,I.top-G.top),C=new g.dg(G.right-G.left,G.bottom-G.top));f=p?Math.max(f.L,f.K):f.L;p={BY:w.getName(),N$:I,G$:C,Fa:p,Lr:!1,DH:f}}else p=null;p&&RZW(r,R,p)}}; zZD=function(R,w,p){w&&(R.xx=w);p&&(R.yD=p)}; g.tQ=function(){}; g.ON=function(R){return{value:R,done:!1}}; B2D=function(R){const w={ptlt:g.c6()-R.K};var p=R.C;p&&(w.pnk=p);(p=R.O)&&(w.pnc=p);(p=R.G)&&(w.pnmm=p);(R=R.L)&&(w.pns=R);return w}; K5=function(R){return jI(R.volume)&&R.volume>0}; EN=function(R,w){const p={};if(R!==void 0)if(w!=null)for(const r in w){const f=w[r];r in Object.prototype||f!=null&&(p[r]=typeof f==="function"?f(R):R[f])}else g.N6(p,R);return wG(Rf(new Gw,p))}; DI=function(R,w){const p=R.C[w],r=p[1];R.O+=p[0];r>0&&R.L[w]==0&&(R.L[w]=1)}; Wu6=function(R){const w=g.nR(R.C);let p=0;for(const r in R.L)g.ra(w,r)&&R.L[r]==1&&(p+=R.C[r][1],R.L[r]=2);return p}; xiP=function(R){let w=0;for(const p in R.L){const r=R.L[p];if(r==1||r==2)w+=R.C[p][1]}return w}; em=function(R,w,p){let r=R.PS;at||p||R.U==-1||(r+=w-R.U);return r}; MV=function(R){return[R.top,R.left,R.bottom,R.right]}; Pg=function(R){return R===void 0?R:Number(R)?cg(R,3):0}; af=function(R,w,p){let r=R.length;for(;rMath.max(1E4,R.O/3)?0:w);var p=R.U(R)||{};p=p.currentTime!==void 0?p.currentTime:R.S;const r=p-R.S;let f=0;r>=0?(R.xY+=w,R.Jl+=Math.max(w-r,0),f=Math.min(r,R.xY)):R.YY+=Math.abs(r);r!=0&&(R.xY=0);R.nB==-1&&r>0&&(R.nB=X_>=0?Date.now()-PO-X_:-1);R.S=p;return f}; n5=function(R){const w=!!SP(Ub().gB,"umt");return R.pB||!w&&!R.PS?0:1}; dG=function(R,w){return R.O0[w!=null&&w=15E3?!0:R.Qk?p?!0:R.O>0?w>=R.O/2:R.M0>0?w>=R.M0:!1:!1}; LuL=function(R,w){Nx(R.J,p=>p.O==w.O)||R.J.push(w)}; Yd=function(R){const w=mo(R.uD().L,1);return ZI(R,w)}; q36=function(R){const w=cg(R.rY.DH,2),p=R.ZU.O;var r=R.rY,f=dG(R);const G=Pg(f.G),I=Pg(f.J),C=Pg(r.volume),u=cg(f.D,2),m=cg(f.S,2),z=cg(r.DH,2),B=cg(f.xY,2),W=cg(f.I0,2);r=cg(r.Hu,2);const x=R.va().clone().round();R=R.ZH&&R.ZH.O?(R.ZH?R.ZH.O:null).clone().round():null;f=lD(f,!1);return{O4:w,O8:p,FN:G,g2:I,ZB:C,Di:u,Er:m,DH:z,nO:B,lX:W,Hu:r,position:x,e8:R,uX:f}}; FS=function(R,w){af(R.L,w,()=>({O4:0,O8:void 0,FN:-1,g2:-1,ZB:-1,Di:-1,Er:-1,DH:-1,nO:-1,lX:-1,Hu:-1,position:void 0,e8:void 0,uX:[]})); R.L[w]=q36(R)}; bjd=function(R,w){if(g.ra(A$x,w))return!0;const p=R.Ee[w];return p!==void 0?(R.Ee[w]=!0,!p):!1}; JQ=function(R,w,p,r,f){if(R.x4)return{"if":0,vs:0};var G=R.va().clone().round();const I=R.ZH?R.ZH.O:null,C=J4();var u=Ub();const m=R.uD();var z=R.ZH?R.ZH.getName():"ns";const B={};B["if"]=C.O?1:void 0;B.sdk=R.G?R.G:void 0;B.t=R.timeCreated;B.p=[G.top,G.left,G.bottom,G.right];G&&I&&!am(I,G)&&(G=I.round(),B.cp=[G.top,G.left,G.bottom,G.right]);B.tos=uD(m.C,!1);B.mtos=lD(m);B.mcvt=m.YY.O;B.ps=void 0;G=em(m,Date.now()-PO,R.BN());B.vht=G;B.mut=m.N0.O;B.a=Pg(R.rY.volume);B.mv=Pg(m.J);B.fs=R.OX?1:0;B.ft= m.pB.L;B.at=m.K.L;B.as=m.G>0?1:0;B.atos=uD(m.L);B.ssb=uD(m.q0,!1);B.amtos=zw(m.L,!1);B.uac=R.SI;B.vpt=m.O.L;z=="nio"&&(B.nio=1,B.avms="nio");B.gmm="4";B.gdr=ZI(R,m.O.L,!0)?1:0;B.efpf=R.f_;if(z=="gsv"||z=="nis")z=R.ZH,z.xY>0&&(B.nnut=z.xY);B.tcm=n5(R);B.nmt=R.YY;B.bt=R.Jl;B.pst=R.nB;B.vpaid=R.pB;B.dur=R.O;B.vmtime=R.S;B.is=R.ZU.O;R.L.length>=1&&(B.i0=R.L[0].O8,B.a0=[R.L[0].ZB],B.c0=[R.L[0].DH],B.ss0=[R.L[0].Hu],z=R.L[0].position,G=R.L[0].e8,B.p0=z?MV(z):void 0,z&&G&&!am(G,z)&&(B.cp0=MV(G)));R.L.length>= 2&&(B.i1=R.L[1].O8,B.a1=$d(R.L[1].FN,R.L[1].ZB,R.L[1].g2),B.c1=$d(R.L[1].Di,R.L[1].DH,R.L[1].Er),B.ss1=$d(R.L[1].nO,R.L[1].Hu,R.L[1].lX),z=R.L[1].position,G=R.L[1].e8,B.p1=z?MV(z):void 0,z&&G&&!am(G,z)&&(B.cp1=MV(G)),B.mtos1=R.L[1].uX);R.L.length>=3&&(B.i2=R.L[2].O8,B.a2=$d(R.L[2].FN,R.L[2].ZB,R.L[2].g2),B.c2=$d(R.L[2].Di,R.L[2].DH,R.L[2].Er),B.ss2=$d(R.L[2].nO,R.L[2].Hu,R.L[2].lX),z=R.L[2].position,G=R.L[2].e8,B.p2=z?MV(z):void 0,z&&G&&!am(G,z)&&(B.cp2=MV(G)),B.mtos2=R.L[2].uX);R.L.length>=4&&(B.i3= R.L[3].O8,B.a3=$d(R.L[3].FN,R.L[3].ZB,R.L[3].g2),B.c3=$d(R.L[3].Di,R.L[3].DH,R.L[3].Er),B.ss3=$d(R.L[3].nO,R.L[3].Hu,R.L[3].lX),z=R.L[3].position,G=R.L[3].e8,B.p3=z?MV(z):void 0,z&&G&&!am(G,z)&&(B.cp3=MV(G)),B.mtos3=R.L[3].uX);B.cs=xiP(R.ZU);w&&(B.ic=Wu6(R.ZU),B.dvpt=m.O.C,B.dvs=Wg(m.C,.5),B.dfvs=Wg(m.C,1),B.davs=Wg(m.L,.5),B.dafvs=Wg(m.L,1),p&&(m.O.C=0,xd(m.C),xd(m.L)),R.LA()&&(B.dtos=m.O0,B.dav=m.X,B.dtoss=R.WV+1,p&&(m.O0=0,m.X=0,R.WV++)),B.dat=m.K.C,B.dft=m.pB.C,p&&(m.K.C=0,m.pB.C=0));B.ps=[C.K.width, C.K.height];B.bs=[Pc(C.L),C.L.getHeight()];B.scs=[C.G.width,C.G.height];B.dom=C.domain;R.V9&&(B.vds=R.V9);if(R.J.length>0||R.xT)w=g.zp(R.J),R.xT&&w.push(R.xT),B.pings=g.gd(w,W=>W.toString()); w=g.gd(g.QD(R.J,W=>W.J()),W=>W.getId()); mxD(w);B.ces=w;R.C&&(B.vmer=R.C);R.X&&(B.vmmk=R.X);R.I0&&(B.vmiec=R.I0);B.avms=R.ZH?R.ZH.getName():"ns";R.ZH&&g.N6(B,R.ZH.Wa());r?(B.c=cg(R.rY.DH,2),B.ss=cg(R.rY.Hu,2)):B.tth=Date.now()-PO-jm;B.mc=cg(m.S,2);B.nc=cg(m.D,2);B.mv=Pg(m.J);B.nv=Pg(m.G);B.lte=cg(R.m0,2);r=dG(R,f);lD(m);B.qmtos=lD(r);B.qnc=cg(r.D,2);B.qmv=Pg(r.J);B.qnv=Pg(r.G);B.qas=r.G>0?1:0;B.qi=R.Kd;B.avms||(B.avms="geo");B.psm=m.M0.L;B.psv=m.M0.getValue();B.psfv=m.U0.getValue();B.psa=m.nB.getValue();u=bdD(u.gB);u.length&&(B.veid=u); R.K&&g.N6(B,B2D(R.K));B.avas=R.K7();B.vs=R.DW();B.co=y$D(R);B.tm=m.Jl;B.tu=m.jI;return B}; iD=function(R,w,p){var r=R.di[w];if(r!=null)return r;r=bjd(R,w);const f=Fb(Tw,G=>G==w); R=JQ(R,r,r,p,VaH[Tw[f]]);w=="fully_viewable_audible_half_duration_impression"&&(R.std="csm");return R}; y$D=function(R){var w=R.jI.toString(10).padStart(2,"0");w=`${R.p_}${w}`;R.jI<99&&R.jI++;return w}; hQ=function(R,w,p){Qe(p,"mousedown",()=>okb(R),301); Qe(w,"scroll",()=>tal(R),302); Qe(p,"touchmove",()=>OjY(R),303); Qe(p,"mousemove",()=>KuD(R),304); Qe(p,"keydown",()=>Ekd(R),305)}; DiH=function(){var R=document.documentElement;try{if(!GY(GM().top))return"2";var w;let p=[];const r=GM(R.ownerDocument);for(R=r;R!=r.top;R=R.parent)if(R.frameElement)p.push(R.frameElement);else break;return(w=p)&&w.length!=0?"1":"0"}catch(p){return"2"}}; okb=function(R){g.DS(R.L,w=>{w.O>1E5||++w.O})}; tal=function(R){g.DS(R.L,w=>{w.L>1E5||++w.L})}; OjY=function(R){g.DS(R.L,w=>{w.L>1E5||++w.L})}; KuD=function(R){g.DS(R.L,w=>{w.G>1E5||++w.G})}; Ekd=function(R){g.DS(R.L,w=>{w.C>1E5||++w.C})}; gG=function(R,w){return g.S_(R.L,p=>p.Kd==w)}; Hg=function(R,w){return w?g.S_(R.L,p=>p.Bu.zJ==w):null}; eZd=function(R,w){return g.S_(R.C,p=>p.EP()==2&&p.Kd==w)}; NV=function(){var R=vg;return R.L.length==0?R.C:R.C.length==0?R.L:g.si(R.C,R.L)}; kd=function(R,w){R=w.EP()==1?R.L:R.C;const p=UI(R,r=>r==w); return p!=-1?(R.splice(p,1),w.ZH&&w.ZH.unobserve(),w.dispose(),!0):!1}; MaI=function(R){var w=vg;let p;if(kd(w,R)){switch(R.EP()){case 0:p=()=>null; case 2:p=()=>eZd(w,R.Kd); break;case 1:p=()=>gG(w,R.Kd)}for(let r=p();r;r=p())kd(w,r)}}; c$d=function(R){var w=vg;R=g.QD(R,p=>!Hg(w,p.Bu.zJ)); w.L.push(...R)}; Pcd=function(R){var w=vg;const p=[];g.iH(R,r=>{Nx(w.L,f=>f.Bu.zJ===r.Bu.zJ&&f.Kd===r.Kd)||(w.L.push(r),p.push(r))})}; UN=function(R,w){if(R.C==null)return!1;const p=(r,f)=>{w(r,f)}; R.L=g.S_(R.C,r=>r!=null&&r.S()); R.L&&(R.L.init(p)?kP(R.L.L):w(R.L.L.X(),R.L));return R.L!=null}; apH=function(R){if(!R.length)return[];R=g.QD(R,w=>w!=null&&w.O0()); for(let w=1;wSm(R,f)),$iH); r=kA(r,()=>{R.G.unobserve(w);R.G.observe(w);Sm(R,R7(R))}); p.ResizeObserver?(R.O0=new p.ResizeObserver(r),R.O0.observe(w)):p.MutationObserver&&(R.xY=new g.qx.MutationObserver(r),R.xY.observe(w,{attributes:!0,childList:!0,characterData:!0,subtree:!0}));R.G.observe(w);Sm(R,R7(R));return!0}; R7=function(R){return R.G&&R.G.takeRecords?R.G.takeRecords():[]}; Sm=function(R,w){try{if(w.length){R.jI||(R.jI=Date.now()-PO);var p=nkd(w),r=N1(R.element,R.C.L.O),f=r.x,G=r.y;R.O=new cc(Math.round(G),Math.round(f)+p.boundingClientRect.width,Math.round(G)+p.boundingClientRect.height,Math.round(f));R.L=UH(R,R.O);var I=YP(p.intersectionRect);R.S=$7(I,R.O.left-I.left,R.O.top-I.top)}}catch(C){R.unobserve(),eI.CA(299,C,void 0,void 0)}}; nkd=function(R){return v6(R,(w,p)=>w.time>p.time?w:p,R[0])}; wq=function(){Ub();const R=J4();return R.O||R.C?0:2}; di_=function(R,w){if(!R.G){w=MD(142,w);bv();var p;Q7.visibilityState?p="visibilitychange":Q7.mozVisibilityState?p="mozvisibilitychange":Q7.webkitVisibilityState&&(p="webkitvisibilitychange");p&&rO(Q7,p,w,{capture:!1})&&(R.G=w)}}; fB=function(R){const w=h4(),p=Date.now()-PO;w?(at||($P=p,g.iH(vg.L,r=>{var f=r.uD();f.PS=em(f,p,r.Zx!=1)})),at=!0):(R.J=pB(R,p),at=!1,jm=p,g.iH(vg.L,r=>{r.GB&&(r.uD().U=p)})); rq(R,NV(),!w)}; I7=function(){var R=GL;R.K||(R.K=!0,di_(R,(...w)=>fB(R,...w)),fB(R))}; rq=function(R,w,p){if(!R.done&&(R.C.cancel(),w.length!=0)){R.O=null;try{ZjW();var r=Date.now()-PO;Ub().K=r;if(Vh(CB).L!=null)for(let f=0;f{f.rY.DH=0}):R.C.schedule()}}}; ZjW=function(){Vh(uz);const R=Vh(CB);R.L!=null&&R.L.L?kP(R.L.L):J4().update(V8)}; pB=function(R,w){R=R.J;at&&(R+=w-$P);return R}; s$=function(){const R=Vh(CB);if(R.L!=null){var w=R.L;g.iH(NV(),p=>Ve(p,w))}}; FuP=function(R=()=>({})){var w=GL; eI.Lu="av-js";mK.L=.01;Y3l([p=>{var r=Ub(),f={bin:r.C,type:"error"};r=RK(r.gB);if(!w.O){var G=V8.document,I=cO>=0?Date.now()-PO-cO:-1;const z=Date.now()-PO;w.L.IP==-1&&(I=z);const B=J4(),W=Ub(),x=RK(W.gB),q=NV();try{if(q.length>0){var C=B.L;C&&(x.bs=[Pc(C),C.getHeight()]);var u=B.K;u&&(x.ps=[u.width,u.height]);V8.screen&&(x.scs=[V8.screen.width,V8.screen.height])}else x.url=encodeURIComponent(V8.location.href.substring(0,512)),G.referrer&&(x.referrer=encodeURIComponent(G.referrer.substring(0,512))); x.tt=I;x.pt=cO;x.bin=W.C;V8.google_osd_load_pub_page_exp!==void 0&&(x.olpp=V8.google_osd_load_pub_page_exp);x.deb=[1,w.L.ye,w.L.qD,w.L.vz,w.L.IP,0,w.C.C,w.L.Mv,w.L.jn,w.L.BI,w.L.MG,-1].join(";");x.tvt=pB(w,z);B.C&&(x.inapp=1);if(V8!==null&&V8!=V8.top){q.length>0&&(x.iframe_loc=encodeURIComponent(V8.location.href.substring(0,512)));var m=B.D;x.is=[Pc(m),m.getHeight()]}}catch(O){x.error=1}w.O=x}C=g.ht(w.O);u=Ub().L;SP(u.O,"prf")==1?(m=new zL,G=u.L,I=0,G.L>-1&&(I=G.O.L.now()-G.L),m=aD(m,1,AU(G.G+I), 0),G=u.L,m=aD(m,5,KW(G.L>-1?G.C+1:G.C),0),m=aD(m,2,ap(u.C.L.O()),"0"),m=aD(m,3,ap(u.C.L.C()),"0"),u=aD(m,4,ap(u.C.L.L()),"0"),u={pf:g.c8(u.C())}):u={};g.N6(C,u);g.N6(p,f,r,C,R())}])}; jKL=function(){var R=BM||V8;if(!R)return"";const w=[];if(!R.location||!R.location.href)return"";w.push(`url=${encodeURIComponent(R.location.href.substring(0,512))}`);R.document&&R.document.referrer&&w.push(`referrer=${encodeURIComponent(R.document.referrer.substring(0,512))}`);return w.join("&")}; WM=function(){let R="youtube.player.web_20260317_10_RC00".match(/_(\d{8})_RC\d+$/)||"youtube.player.web_20260317_10_RC00".match(/_(\d{8})_\d+_\d+$/)||"youtube.player.web_20260317_10_RC00".match(/_(\d{8})_\d+\.\d+$/)||"youtube.player.web_20260317_10_RC00".match(/_(\d{8})_\d+_RC\d+$/);if(R?.length==2)return R[1];R="youtube.player.web_20260317_10_RC00".match(/.*_(\d{2})\.(\d{4})\.\d+_RC\d+$/);return R?.length==3?"20"+R[1]+R[2]:null}; T2d=function(R){try{const w=R.split(",");return w.length>g.nR(J$_).length?null:v6(w,(p,r)=>{r=r.toLowerCase().split("=");if(r.length!=2||xp[r[0]]===void 0||!xp[r[0]](r[1]))throw Error(`Entry (${r[0]}, ${r[1]}) is invalid.`);p[r[0]]=r[1];return p},{})}catch(w){return null}}; ijl=function(R,w){if(R.L==void 0)return 0;switch(R.K){case "mtos":return R.C?Bg(w.L,R.L):Bg(w.C,R.L);case "tos":return R.C?mo(w.L,R.L):mo(w.C,R.L)}return 0}; QKH=function(R){const w=Ub(),p=Vh(lz);R&&!w.G&&(w.G=!0,p.eI=!0,p.U&&p.fail("w",!0))}; q5=function(){try{const R=Vh(lz);LB(R,"removeEventListener","ready",q5);AI(R)}catch(R){eI.CA(541,R,void 0,void 0)}}; yw=function(R,w){try{var p=Vh(lz);p.Jl=!0;let f;f=R?new cc(R.y,R.x+R.width,R.y+R.height,R.x):new cc(0,0,0,0);const G=Date.now()-PO,I=h4();var r=new bz(G,I,p);r.L=f;r.volume=w;p.J(r)}catch(f){eI.CA(542,f,void 0,void 0)}}; AI=function(R){typeof R.C.E5.AFMA_LIDAR==="string"?(R.jI=!0,hZd(R)):(R.C.compatibility=3,R.U="nc",R.fail("w"))}; LB=function(R,w,...p){try{return R.C.E5[w].apply(R.C.E5,p)}catch(r){gkP(r,f=>{f.method=w})}}; Vw=function(R,w,p){LB(R,"addEventListener",w,p)}; o7=function(R){Ub().G=!!LB(R,"isViewable");Vw(R,"viewableChange",QKH);LB(R,"getState")==="loading"?Vw(R,"ready",q5):AI(R)}; hZd=function(R){R.Jl=!1;const w=SP(Ub().gB,"rmmt")==1,p=!!LB(R,"isViewable");(w?!p:1)&&bv().setTimeout(tI(524,()=>{R.Jl||(O$(R),eI.CA(540,Error(),void 0,void 0),R.U="mt",R.fail("w"))}),500); HjY(R);Vw(R,R.C.E5.AFMA_LIDAR,yw)}; O$=function(R){LB(R,"removeEventListener",R.C.E5.AFMA_LIDAR,yw);R.jI=!1}; HjY=function(R){var w=SP(Ub().gB,"sneio")==1;const p=R.C.E5.AFMA_LIDAR_EXP_1!==void 0,r=R.C.E5.AFMA_LIDAR_EXP_2!==void 0;(w=w&&r)&&(R.C.E5.AFMA_LIDAR_EXP_2=!0);p&&(R.C.E5.AFMA_LIDAR_EXP_1=!w)}; KB=function(R,w){if(LB(R,"getState")==="loading")return new g.dg(-1,-1);w=LB(R,w);if(!w)return new g.dg(-1,-1);R=parseInt(w.width,10);w=parseInt(w.height,10);return isNaN(R)||isNaN(w)?new g.dg(-1,-1):new g.dg(R,w)}; D9=function(){const R=J4();return{sv:"968",...(E$!==null&&{v:E$}),["if"]:R.O?"1":"0",nas:String(vg.L.length)}}; e1=function(R,w){const p=R[w];p!==void 0&&p>0&&(R[w]=Math.floor(p*1E3))}; vkI=function(R){FuP(()=>{const w=D9();R.C!=null&&(w.sdk=R.C);const p=Vh(CB);p.L!=null&&(w.avms=p.L.getName());return w})}; M5=function(R,w,p,r){R=R.S(null,r,!0,w);R.G=p;c$d([R]);return R}; N2d=function(R,w,p){w.x4=!0;switch(w.EP()){case 1:cM(w,p);break;case 2:R.YY(w)}}; S3L=function(R,w,p){lLW(w);const r=R.L;g.iH(w,f=>{const G=g.gd(f.criteria,I=>{var C=T2d(I);if(C==null)I=null;else if(I=new k1Y,C.visible!=null&&(I.L=C.visible/100),C.audible!=null&&(I.C=C.audible==1),C.time!=null){const u=C.timetype=="mtos"?"mtos":"tos",m=r2(C.time,"%")?"%":"ms";C=parseInt(C.time,10);m=="%"&&(C/=100);I.setTime(C,m,u)}return I}); Nx(G,I=>I==null)||LuL(p,new UiI(f.id,f.event,G,r))})}; ff_=function(){const R=[];var w=Ub();R.push(Vh(R16));SP(w.gB,"mvp_lv")&&R.push(Vh(lz));w=[new wDx,new pDD];w.push(new rJr(R));w.push(new PM(V8));return w}; $p=function(){const R=[new PM(V8)],w=Vh(CB);w.C=R;UN(w,()=>{a7("i")})?GL.done||(s$(),I7()):a7("i")}; GjL=function(R){if(!R.isInitialized){R.isInitialized=!0;try{const r=Date.now()-PO,f=Ub(),G=J4();cO=r;f.O=79463069;R.C!=="o"&&(BM=IL(V8));if(sMb()){GL.L.qD=0;GL.L.IP=Date.now()-PO-r;var w=ff_(),p=Vh(CB);p.C=w;UN(p,()=>{$p()})?GL.done||(s$(),vO(p.L.L,R),I7()):G.O?$p():I7()}else Xd=!0}catch(r){throw vg.reset(),r; }}}; a7=function(R){GL.C.cancel();nB=R;GL.done=!0}; dq=function(R){if(R.C)return R.C;const w=Vh(CB).L;if(w)switch(w.getName()){case "nis":R.C="n";break;case "gsv":R.C="m"}R.C||(R.C="h");return R.C}; Yp=function(R,w,p){if(R.L==null)return w.V9|=4,!1;R=Z9(R.L,p,w);w.V9|=R;return R==0}; cM=function(R,w){if(!R.mq){var p=iD(R,"start",h4());p=R.rD.L(p).L;var r={id:"lidarv"};r.r=w;r.sv="968";E$!==null&&(r.v=E$);xP(p,(f,G)=>r[f]=f=="mtos"||f=="tos"?G:encodeURIComponent(G)); w=jKL();xP(w,(f,G)=>r[f]=encodeURIComponent(G)); w="//pagead2.googlesyndication.com/pagead/gen_204?"+wG(Rf(new Gw,r));If(w);R.mq=!0}}; Fd=function(R,w,p){rq(GL,[R],!h4());FS(R,p);p!=4&&af(R.O0,p,R.g4);return iD(R,w,h4())}; If_=function(R,w,p,r){let f;f=Hg(vg,p);f!==null&&f.Kd!==w&&(R.U(f),f=null);f||(w=R.S(p,Date.now()-PO,!1,w),vg.C.length==0&&(Ub().O=79463069),Pcd([w]),f=w,f.G=dq(R),r&&(f.U0=r));return f}; Z9=function(R,w,p){R=R.C();if(typeof R==="function"){var r={...(E$!==null&&{v:E$}),sv:"968",cb:j1,e:Csl(w)};const f=iD(p,w,h4());g.N6(r,f);p.di[w]=f;r=p.EP()==2?uxl(r).join("&"):p.rD.L(r).L;try{return R(p.Kd,r,w),0}catch(G){return 2}}else return 1}; Csl=function(R){const w=pj(R,"custom_metric_viewable")?"custom_metric_viewable":R;R=Fb(Tw,p=>p==w); return TL[R]}; ug=function(R){return{viewability:R.L,googleViewability:R.C}}; z8=function(R,w,p={}){R=s8(Vh(mG),w,p,R);return ug(R)}; s8=function(R,w,p={},r){var f={};g.N6(f,{opt_adElement:void 0,opt_fullscreen:void 0},p);var G=R.X(w,p);p=G?G.rD:R.O0();if(f.opt_bounds)return p.L(BA("ol",r));if(r!==void 0)if(WA(r)!==void 0)if(Xd)R=BA("ue",r);else if(GjL(R),nB=="i")R=BA("i",r),R["if"]=0;else if(w=R.X(w,f)){b:{nB=="i"&&(w.x4=!0);G=f.opt_fullscreen;G!==void 0&&ye(w,!!G);if(G=!J4().C)(G=IK(g.s3(),"CrKey")&&!(IK(g.s3(),"CrKey")&&IK(g.s3(),"SmartSpeaker"))||IK(g.s3(),"PlayStation")||IK(g.s3(),"Roku")||gmb()||IK(g.s3(),"Xbox"))||(G=g.s3(), G=IK(G,"AppleTV")||IK(G,"Apple TV")||IK(G,"CFNetwork")||IK(G,"tvOS")),G||(G=g.s3(),G=IK(G,"sdk_google_atv_x86")||IK(G,"Android TV")),G=!G;G&&(bv(),G=fA(Q7)===0);var I=G;if(I){switch(w.EP()){case 1:cM(w,"pv");break;case 2:R.YY(w)}a7("pv")}G=r.toLowerCase();if(!I&&(SP(Ub().gB,"ssmol")&&G==="loaded"?0:g.ra(sBH,G))&&w.Zx==0){nB!="i"&&(GL.done=!1);I=f!==void 0?f.opt_nativeTime:void 0;X_=I=typeof I==="number"?I:Date.now()-PO;w.GB=!0;var C=h4();w.Zx=1;w.Ee={};w.Ee.start=!1;w.Ee.firstquartile=!1;w.Ee.midpoint= !1;w.Ee.thirdquartile=!1;w.Ee.complete=!1;w.Ee.resume=!1;w.Ee.pause=!1;w.Ee.skip=!1;w.Ee.mute=!1;w.Ee.unmute=!1;w.Ee.viewable_impression=!1;w.Ee.measurable_impression=!1;w.Ee.fully_viewable_audible_half_duration_impression=!1;w.Ee.fullscreen=!1;w.Ee.exitfullscreen=!1;w.WV=0;C||(w.uD().U=I);rq(GL,[w],!C)}(I=w.oO[G])&&DI(w.ZU,I);SP(Ub().gB,"fmd")||g.ra(xI,G)&&w.xT&&w.xT.C(w,null);let u;switch(w.EP()){case 1:u=pj(G,"custom_metric_viewable")?R.q0.custom_metric_viewable:R.q0[G];break;case 2:u=R.Af[G]}if(u&& (r=u.call(R,w,f,r),SP(Ub().gB,"fmd")&&g.ra(xI,G)&&w.xT&&w.xT.C(w,null),r!==void 0)){f=BA(void 0,G);g.N6(f,r);r=f;break b}r=void 0}w.Zx==3&&R.U(w);R=r}else R=BA("nf",r);else R=void 0;else Xd?R=BA("ue"):G?(R=BA(),g.N6(R,JQ(G,!0,!1,!1))):R=BA("nf");return typeof R==="string"?p.L():p.L(R)}; mNd=function(R,w,p){let r=gG(vg,w);r||(r=M5(R,w,"n",p.opt_nativeTime||-1));return r}; z1d=function(R,w,p){var r=gG(vg,w);r||(r=p.opt_nativeTime||-1,r=M5(R,w,dq(R),r),p.opt_osdId&&(r.U0=p.opt_osdId));return r}; Bgd=function(R,w){let p=gG(vg,w);p||(p=M5(R,w,"h",-1));return p}; W36=function(R,w,p){p=p.opt_configurable_tracking_events;R.L!=null&&Array.isArray(p)&&S3L(R,p,w)}; xNd=function(R){Ub();switch(dq(R)){case "b":return"ytads.bulleit.triggerExternalActivityEvent";case "n":return"ima.bridge.triggerExternalActivityEvent";case "h":case "m":case "ml":return"ima.common.triggerExternalActivityEvent"}return null}; lg=function(R,w){w&&(R.xY=w)}; Lu=function(R,...w){w=w.filter(Boolean).join("&");if(!w)return R;const p=R.match(/[?&]adurl=/);return p?R.slice(0,p.index+1)+w+"&"+R.slice(p.index+1):R+(R.indexOf("?")<0?"?":"&")+w}; qP=function(R,w){return w?"&"+R+"="+encodeURIComponent(w):""}; lfb=function(R){R=R.G;if(!R)return"";let w=qP("uap",R.platform)+qP("uapv",R.platformVersion)+qP("uafv",R.uaFullVersion)+qP("uaa",R.architecture)+qP("uam",R.model)+qP("uab",R.bitness);R.fullVersionList&&(w+="&uafvl="+encodeURIComponent(R.fullVersionList.map(p=>encodeURIComponent(p.brand)+";"+encodeURIComponent(p.version)).join("|"))); R.wow64!=null&&(w+="&uaw="+Number(R.wow64));return w.slice(1)}; L3H=function(R,w,p,r,f){var G=window,I;p?I="//pagead2.googlesyndication.com/bg/"+BD(p)+".js":I="";p=G.document;const C={};w&&(C._scs_=w);C._bgu_=I;C._bgp_=r;C._li_="v_h.3.0.0.0";f&&(C._upb_=f);(w=G.GoogleTyFxhY)&&typeof w.push=="function"||(w=G.GoogleTyFxhY=[]);w.push(C);w=hJ(p).createElement("SCRIPT");w.type="text/javascript";w.async=!0;R=(0,g.JJ)`//tpc.googlesyndication.com/sodar/${BD(R)+".js"}`;g.Sa(w,R);(G=(G.GoogleTyFxhYEET||{})[w.src])?G():p.getElementsByTagName("head")[0].appendChild(w)}; bg=function(R="bevasrsg"){return new Promise(w=>{if(window===window.top)var p=window;else{try{p=!!window?.top?.location.href&&!1}catch(f){p=!0}p=p?window:window.top}let r=p[R];r?.bevasrs?w(new Ac(r.bevasrs)):(r||(r={nqfbel:[]},p[R]=r),r.nqfbel.push(f=>{w(new Ac(f))}))})}; yK=function(R){const w={c:R.OP,e:R.vV,mc:R.fk,me:R.GQ};R.JO&&(w.co={c:R.JO.hC,a:R.JO.Sv,s:R.JO.XC});return w}; qpl=function(R){R.C!==void 0&&(R.O.forEach(w=>{R.C?.removeEventListener(w,R.G)}),R.C=void 0)}; b0H=async function(R){if(!R.z3.wpc)throw new VK(30,"NWA");if(R.L)return R.L;const w=await R.z3.wpc();R.L=new AJY(w);return R.L}; tc=function(R){const w=[];v$(R,oe,6).forEach(p=>{g.wU(p,2)<=53&&w.push(g.wU(p,1))}); return w}; yJd=function(R){const w=[];v$(R,oe,6).forEach(p=>{g.wU(p,2)>53&&w.push(g.wU(p,1))}); return w}; O8=function(R){R.then(()=>{},()=>{})}; Ku=function(R){return{fieldType:2,fieldName:R}}; g.E8=function(R){return{fieldType:3,fieldName:R}}; VwP=function(R,w){return P$(R,w,Oy)}; Xi=function(R){var w=new D_;w=uf(w,1,R.C);var p=o2D(R);w=P$(w,p,AtP);p=[];const r=[];for(var f of R.L.keys())r.push(f.split(","));for(f=0;f>>31)&4294967295;B=f[0];var q=f[1],O=f[2],e=f[3],P=f[4];for(x=0;x<80;x++){if(x<40)if(x<20){var c=e^q&(O^e);var X=1518500249}else c=q^O^e,X=1859775393;else x<60?(c=q&O|e&(q|O),X=2400959708):(c=q^O^e,X=3395469782);c=((B<<5|B>>>27)&4294967295)+c+P+X+W[x]&4294967295;P=e;e=O;O=(q<<30|q>>>2)&4294967295;q=B;B=c}f[0]=f[0]+B&4294967295;f[1]=f[1]+q&4294967295;f[2]= f[2]+O&4294967295;f[3]=f[3]+e&4294967295;f[4]=f[4]+P&4294967295} function p(B,W){if(typeof B==="string"){B=unescape(encodeURIComponent(B));for(var x=[],q=0,O=B.length;q=56;x--)G[x]=W&255,W>>>=8;w(G);for(x=W=0;x<5;x++)for(var q=24;q>=0;q-=8)B[W++]=f[x]>>q&255;return B} for(var f=[],G=[],I=[],C=[128],u=1;u<64;++u)C[u]=0;var m,z;R();return{reset:R,update:p,digest:r,on:function(){for(var B=r(),W="",x=0;x{var f=new QK;f=uf(f,1,r.brand);return uf(f,2,r.version)})); typeof R.mobile==="boolean"&&VF(ig,2,VS(R.mobile));g8=R.getHighEntropyValues(w)}const p=new Set(w);return g8.then(r=>{const f=ig.clone();p.has("platform")&&uf(f,3,r.platform);p.has("platformVersion")&&uf(f,4,r.platformVersion);p.has("architecture")&&uf(f,5,r.architecture);p.has("model")&&uf(f,6,r.model);p.has("uaFullVersion")&&uf(f,7,r.uaFullVersion);return f.AF()}).catch(()=>ig.AF())}; HA=function(R){return mw(R,1,1)}; U8=function(R,w){kL(R.L,vA,1,w);fP(w,1)||HA(w);R.Sb||(w=NP(R),rU(w,5)||uf(w,5,R.locale));R.uach&&(w=NP(R),i4(w,kI,9)||kL(w,kI,9,R.uach))}; NP=function(R){var w=i4(R.L,vA,1);w||(w=new vA,U8(R,w));R=w;w=i4(R,SC,11);w||(w=new SC,kL(R,SC,11,w));return w}; e1l=function(R,w){R.C=w}; cJ6=function(R){const w=R.Sb?void 0:GM();w?DNL(w,hc).then(p=>{R.uach=MwW(p??"[]");p=NP(R);kL(p,kI,9,R.uach);return!0}).catch(()=>!1):Promise.resolve(!1)}; g.RR=function(R,w,p,r){this.G=R;this.K=w;this.L=this.O=R;this.J=p||0;this.D=r||2}; g.we=function(R){R.L=Math.min(R.K,R.L*R.D);R.O=Math.min(R.K,R.L+(R.J?Math.round(R.J*(Math.random()-.5)*2*R.L):0));R.C++}; p9=function(){return"https://play.google.com/log?format=json&hasfast=true"}; PsP=function(R,w){if(!R.M0)return()=>{}; const p=()=>{R.flush()}; return w?()=>{w().then(p)}:p}; re=function(R){R.O.isFinal=!0;R.flush();R.O.isFinal=!1}; f9=function(R){R.U||(R.U=p9());try{return(new URL(R.U)).toString()}catch(w){return(new URL(R.U,GM().location.origin)).toString()}}; $ND=function(R){afd(R,(w,p)=>{w=new URL(w);w.searchParams.set("format","json");let r=!1;try{r=GM().navigator.sendBeacon(w.toString(),p.AF())}catch{}r||(R.X=!1);return r})}; XDx=function(R,w,p=null,r=R.withCredentials){const f={},G=new URL(f9(R));p&&(f.Authorization=p);R.sessionIndex&&(f["X-Goog-AuthUser"]=R.sessionIndex,G.searchParams.set("authuser",R.sessionIndex));R.pageId&&(Object.defineProperty(f,"X-Goog-PageId",{value:R.pageId}),G.searchParams.set("pageId",R.pageId));return{url:G.toString(),body:w,Nd:1,requestHeaders:f,requestType:"POST",withCredentials:r,timeoutMillis:R.timeoutMillis}}; afd=function(R,w){if(R.L.length!==0){var p=new URL(f9(R));p.searchParams.delete("format");var r=R.q8();r&&p.searchParams.set("auth",r);p.searchParams.set("authuser",R.sessionIndex||"0");for(r=0;r<10&&R.L.length;++r){const f=R.L.slice(0,32),G=R.O.build(f,R.G,R.J,R.xL,R.S,R.pB);if(!w(p.toString(),G)){++R.J;break}R.G=0;R.J=0;R.S=0;R.pB=0;R.L=R.L.slice(f.length)}R.C.enabled&&R.C.stop()}}; n2I=function(R,w){R.buildLabel=w;return R}; Z0I=function(R){R.network=new dNW;return R}; YpI=function(R,w){R.L=w}; F3r=function(R){R.C=!0;return R}; twP=function(R){return R.fields.map(w=>w.fieldType)}; eC=function(R,...w){w=GF(w);return R.L.has(w)?R.L.get(w):void 0}; o2D=function(R){return R.fields.map(w=>w.fieldName)}; GF=function(...R){return R?R.join(","):"key"}; g.IR=function(R,w){this.type=R;this.currentTarget=this.target=w;this.defaultPrevented=this.C=!1}; C9=function(R,w){g.IR.call(this,R?R.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.L=null;R&&this.init(R,w)}; s1=function(R){return!(!R||!R[u9])}; JJL=function(R,w,p,r,f){this.listener=R;this.proxy=null;this.src=w;this.type=p;this.capture=!!r;this.handler=f;this.key=++jBY;this.removed=this.Km=!1}; ms=function(R){R.removed=!0;R.listener=null;R.proxy=null;R.src=null;R.handler=null}; zF=function(R){this.src=R;this.listeners={};this.L=0}; g.Bv=function(R,w){const p=w.type;p in R.listeners&&g.CR(R.listeners[p],w)&&(ms(w),R.listeners[p].length==0&&(delete R.listeners[p],R.L--))}; Wv=function(R,w,p,r){for(let f=0;f1)));I=I.next)f||(G=I);f&&(p.L==0&&r==1?Hv(p,w):(G?(r=G,r.next==p.G&&(p.G=r),r.next=r.next.next):vv(p),N3(p,f,3,w)))}R.O=null}else XB(R,3,w)}; QZ=function(R,w){R.C||R.L!=2&&R.L!=3||kZ(R);R.G?R.G.next=w:R.C=w;R.G=w}; SZ=function(R,w,p,r){const f=YZ(null,null,null);f.L=new g.n9(function(G,I){f.O=w?function(C){try{const u=w.call(r,C);G(u)}catch(u){I(u)}}:G; f.C=p?function(C){try{const u=p.call(r,C);u===void 0&&C instanceof U1?I(C):G(u)}catch(u){I(u)}}:I}); f.L.O=R;QZ(R,f);return f.L}; XB=function(R,w,p){R.L==0&&(R===p&&(w=3,p=new TypeError("Promise cannot resolve to itself")),R.L=1,J8(p,R.RE,R.VN,R)||(R.D=p,R.L=w,R.O=null,kZ(R),w!=3||p instanceof U1||H0Y(R,p)))}; J8=function(R,w,p,r){if(R instanceof g.n9)return h8(R,w,p,r),!0;if(R)try{var f=!!R.$goog_Thenable}catch(G){f=!1}else f=!1;if(f)return R.then(w,p,r),!0;if(g.Kd(R))try{const G=R.then;if(typeof G==="function")return v2l(R,G,w,p,r),!0}catch(G){return p.call(r,G),!0}return!1}; v2l=function(R,w,p,r,f){function G(u){C||(C=!0,r.call(f,u))} function I(u){C||(C=!0,p.call(f,u))} let C=!1;try{w.call(R,I,G)}catch(u){G(u)}}; kZ=function(R){R.J||(R.J=!0,g.TF(R.fI,R))}; vv=function(R){let w=null;R.C&&(w=R.C,R.C=w.next,w.next=null);R.C||(R.G=null);return w}; N3=function(R,w,p,r){if(p==3&&w.C&&!w.G)for(;R&&R.K;R=R.O)R.K=!1;if(w.L)w.L.O=null,Rh(w,p,r);else try{w.G?w.O.call(w.context):Rh(w,p,r)}catch(f){wW.call(null,f)}Z1.put(w)}; Rh=function(R,w,p){w==2?R.O.call(R.context,p):R.C&&R.C.call(R.context,p)}; H0Y=function(R,w){R.K=!0;g.TF(function(){R.K&&wW.call(null,w)})}; U1=function(R){ZL.call(this,R)}; g.pw=function(R,w){g.E1.call(this);this.Tv=R||1;this.c7=w||g.qx;this.KC=(0,g.e_)(this.cY,this);this.iy=g.c6()}; g.rW=function(R,w,p){if(typeof R==="function")p&&(R=(0,g.e_)(R,p));else if(R&&typeof R.handleEvent=="function")R=(0,g.e_)(R.handleEvent,R);else throw Error("Invalid listener argument");return Number(w)>2147483647?-1:g.qx.setTimeout(R,w||0)}; fw=function(R,w){let p=null;return(new g.n9(function(r,f){p=g.rW(function(){r(w)},R); p==-1&&f(Error("Failed to schedule timer."))})).bA(function(r){g.qx.clearTimeout(p); throw r;})}; Ih=function(R,w,...p){R.C.has(w)||R.C.set(w,new GS(w,p))}; g.u0=function(R,w,...p){R.C.has(w)||R.C.set(w,new Cw(w,p))}; g.B5=function(R,w,...p){g.sF(R,w,1,p)}; W5=function(R){R.L.enabled||R.L.start();R.K++;R.K>=R.O&&R.G()}; NgI=function(R){for(let w=0;w2?R.L.statusText:""}catch(p){w=""}R.G=w+" ["+R.getStatus()+"]";EF(R)}}finally{DF(R)}}}; DF=function(R,w){if(R.L){R.J&&(clearTimeout(R.J),R.J=null);const p=R.L;R.L=null;w||R.dispatchEvent("ready");try{p.onreadystatechange=null}catch(r){}}}; P5=function(R){var w=R.getStatus();a:switch(w){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var p=!0;break a;default:p=!1}if(!p){if(w=w===0)R=g.Cp(String(R.U))[1]||null,!R&&g.qx.self&&g.qx.self.location&&(R=g.qx.self.location.protocol.slice(0,-1)),w=!wcl.test(R?R.toLowerCase():"");p=w}return p}; g.c5=function(R){return R.L?R.L.readyState:0}; g.$w=function(R){try{return R.L?R.L.responseText:""}catch(w){return""}}; g.XM=function(R){try{if(!R.L)return null;if("response"in R.L)return R.L.response;switch(R.O0){case "":case "text":return R.L.responseText;case "arraybuffer":if("mozResponseArrayBuffer"in R.L)return R.L.mozResponseArrayBuffer}return null}catch(w){return null}}; g.nw=function(R){const w={};R=(R.L&&g.c5(R)>=2?R.L.getAllResponseHeaders()||"":"").split("\r\n");for(let r=0;r{setTimeout(()=>{try{G.G()}finally{f.dispose()}})}); G.O=1E5;G.flushInterval=3E4;G.L.setInterval(3E4);return G}; GMd=function(R){if(R.timer===void 0){const w=Math.max(0,R.L+R.C-ZF());R.timer=setTimeout(()=>{try{R.callback()}finally{R.L=ZF(),R.timer=void 0}},w)}}; CAr=function(R,w=[]){return new I26(R,w)}; ZF=function(){return globalThis.performance?.now?.()??Date.now()}; TS=function(R,w){if(R.disable)return new Jo;w=w?tc(w):[];return CAr({z_:R.z_,L7:R.GT,Sc:R.LG,Vs:R.Vs,Se:R.Se,kc:R.kc},w)}; u8r=function(R){if(!R)return null;R=Iz(R,4);return R===null||R===void 0?null:Mi(R)}; QX=function(){i0.instance||(i0.instance=new i0);return i0.instance}; smH=function(R,w,p,r){if(!w&&!p)return Promise.resolve();if(!r)return ho(w,p);let f;(f=R.C)[r]||(f[r]=new Promise((G,I)=>{ho(w,p).then(()=>{R.L=r;G()},C=>{delete R.C[r]; I(C)})})); return R.C[r]}; v5=function(R,w){return smH(R,i4(w,gW,1,rl),i4(w,H5,2,rl),rU(w,3,void 0,rl))}; ho=function(R,w){return w?m1_(w):R?zWL(R):Promise.resolve()}; m1_=function(R){return new Promise((w,p)=>{const r=g.sW("SCRIPT"),f=u8r(R);g.Sa(r,f);r.onload=()=>{g.x7(r);w()}; r.onerror=()=>{g.x7(r);p(Error("EWLS"))}; (g.vD("HEAD")[0]||document.documentElement).appendChild(r)})}; zWL=function(R){return new Promise(w=>{const p=g.sW("SCRIPT");if(R){var r=Iz(R,6);r=r===null||r===void 0?null:Ni(r)}else r=null;p.textContent=kk(r);U3(p);(g.vD("HEAD")[0]||document.documentElement).appendChild(p);g.x7(p);w()})}; Bpd=function(R,w){return sj(R,1,w)}; W96=function(R,w){return sj(R,2,w)}; x1_=function(R,w){return sj(R,3,w)}; UF=async function(R,w,p,r,f){w=x1_(W96(Bpd(new Nn,R.requestKey),w),p);p=R.L();R=await r.K("c",R.requestKey,f,R.client.create(w,p));const G=Qh(c$(R,2));if(G.length)return Yw(r,()=>{var I=new Uint8Array(G.length);for(var C=0;CPromise.resolve("E:CTO"))}catch(z){C="E:UCE"}}let u; const m=new g.RR(I?G.xS:G.bP,G.pI,G.TT,G.CI);for(let z=1;z<=G.maxAttempts;z++){if(z!==1){r4(R,0);R.L=new G_(m.getValue(),G.kQ,G.I8);const B=await R.L.promise;R.L=void 0;B===1?(z=1,m.reset()):g.we(m)}try{let B;p?B=p:(r4(R,5),B=await f4(qW_(w,R.logger,z,r.L,C),G.MI,()=>Promise.reject(Error("RGF:Fetch timed out")))); r4(R,3);await f4(v5(r,B),G.Uz,()=>Promise.reject(Error("DTZ:Script timed out"))); r4(R,8);await f;const W=new IQ({challenge:B,UX:R.options.UX,kV:R.options.kV});await f4(W.bE,G.Ls,()=>Promise.reject(Error("QEG:Setup timed out"))); u=W;break}catch(B){R.handleError(B),C4(R)}}if(R.cS())break;u&&(p=void 0,AGW(R,I),I=u,b$l(R,u),C4(R));r4(R,2);R.L=new G_(G.cG,G.kQ,G.I8);R.isPaused&&R.L.pause();await R.L.promise;R.L=void 0;if(R.cS())break}I?.dispose()}; VEb=function(R){R.D=Error("Cancelled by dispose");R.K.resolve();O8(R.J.promise);R.J.reject(Error("Cancelled by dispose"));R.logger.dispose();Promise.all(R.G).then(async()=>{R.O?.dispose();R.O=void 0}); R.G=[];R.L?.C();O8(R.C.promise);R.C.reject(Error("Cancelled by dispose"))}; o7W=async function(R){if(R.cS())throw Error("Already disposed");R.L?.C();await R.C.promise}; tEH=function(R,w){const p=R.hX;R.hX=()=>{p();w()}}; s2=function(R,w){const p=new g.uh(w);(w=p.get("req_id"))&&R.set("req_id",w);g.DS(R.L,(r,f)=>{p["set"](f,null)}); return p}; b$l=function(R,w){R.cS()||(R.O=w,R.logger.update(w.PZ()),R.K.resolve(),R.J.resolve(void 0),R.hX())}; AGW=function(R,w){w&&(Promise.all(R.G).then(()=>void w.dispose()),R.G=[])}; r4=function(R,w){R.U=w;R.options.WLN?.(w)}; C4=function(R){R.cS()||(R.C.resolve(),R.C=new g.mR)}; f4=function(R,w,p){let r;p=(new Promise(f=>{r=setTimeout(f,w)})).then(p); O8(p);return Promise.race([R.finally(()=>void clearTimeout(r)), p])}; O$x=function(R,w){R.endTimeMs=Date.now()+w;R.tick()}; z_=function(R){R.L&&(clearTimeout(R.L),R.L=null)}; Bh=function(R,w){try{return globalThis.sessionStorage.setItem(R,w),!0}catch(p){return!1}}; Wh=function(R,w=0,p=R.length,r){let f=0;for(r&&(f=Wh(r));w>1,x5),Wh(R,R.length>>1)];return w.toString(16)+p.toString(16)}; L4=function(R,w){var p=[Wh(w,0,w.length>>1,void 0),Wh(w,w.length>>1)];R=new Uint32Array(R.buffer);w=R[0];const [r,f]=p;for(p=1;p>>8|I<<24,I+=G|0,I^=C+38293,G=G<<3|G>>>29,G^=I,u=u>>>8|u<<24,u+=C|0,u^=m+38293,C=C<<3|C>>>29,C^=u;G=[G,I];R[p]^=G[0];p+1void globalThis.sessionStorage.removeItem(m))?Bh(w,g.c8(I))?"s":"t":"i"}; D1d=function(R,w){var p=globalThis.sessionStorage.getItem(R);if(!p)return["m"];let r;try{r=X0(p),L4(r,w)}catch(f){return globalThis.sessionStorage.removeItem(R),["c"]}for(w=4;w<7&&r[w]===0;)w++;for(p=0;p=p?(globalThis.sessionStorage.removeItem(R),["e"]):["a",new Uint8Array(r.buffer,w+4)]}; eWI=function(R){var w=globalThis.sessionStorage.getItem("iU5q-!O9@$");if(!w)return new q_(R);var p=w.split(",");if(p.length<2)return globalThis.sessionStorage.removeItem("iU5q-!O9@$"),new q_(R);w=p.slice(1);w.length===1&&w[0]===""&&(w=[]);p=Number(p[0]);return isNaN(p)||p<0||p>w.length?(globalThis.sessionStorage.removeItem("iU5q-!O9@$"),new q_(R)):new q_(R,p,w)}; PAP=function(R){function w(){p-=r;p-=f;p^=f>>>13;r-=f;r-=p;r^=p<<8;f-=p;f-=r;f^=r>>>13;p-=r;p-=f;p^=f>>>12;r-=f;r-=p;r^=p<<16;f-=p;f-=r;f^=r>>>5;p-=r;p-=f;p^=f>>>3;r-=f;r-=p;r^=p<<10;f-=p;f-=r;f^=r>>>15} R=MEI(R);let p=2654435769,r=2654435769,f=314159265;const G=R.length;let I=G,C=0;for(;I>=12;I-=12,C+=12)p+=AD(R,C),r+=AD(R,C+4),f+=AD(R,C+8),w();f+=G;switch(I){case 11:f+=R[C+10]<<24;case 10:f+=R[C+9]<<16;case 9:f+=R[C+8]<<8;case 8:r+=R[C+7]<<24;case 7:r+=R[C+6]<<16;case 6:r+=R[C+5]<<8;case 5:r+=R[C+4];case 4:p+=R[C+3]<<24;case 3:p+=R[C+2]<<16;case 2:p+=R[C+1]<<8;case 1:p+=R[C+0]}w();return cGP.toString(f)}; MEI=function(R){const w=[];for(let p=0;p{R.G.resolve()},w); R.addOnDisposeCallback(()=>void clearTimeout(p))}; Vd=function(R,w){var p=`${w(R.error.message)}:${w(R.error.stack)}`.substring(0,2048);w=p.length+1;p=yd(p);const r=new Uint8Array(4+p.length);r.set([42,w&127|128,w>>7,R.error.code]);r.set(p,4);return r}; yd=function(R){return globalThis.TextEncoder?(new TextEncoder).encode(R):g.DA(R)}; a2b=function(R,w,p){return R instanceof p4?w4(R,p,w,1):R.N2(p)}; K4=async function(R){let w=void 0;R.K++;const p=new g.mR;R.z3 instanceof oQ&&R.z3.G.push(p.promise);if(R.e1){const G=new g.mR;setTimeout(()=>void G.resolve()); await G.promise}const r=R.logger.share();try{R.state=5;const G=[],I=await f4(R.z3.snapshot({OP:{},VD:G}),R.D4.Ks,()=>Promise.reject(new VK(15,"MDA:Timeout"))); tD(R,"MDA:Disposed");const C=G[0];R.state=6;const u=await f4(a2b(R.eE,r,I),R.D4.BW,()=>Promise.reject(new VK(10,"BWB:Timeout"))); tD(R,"BWB:Disposed");R.state=7;w=Yw(r,()=>{const m=$1l(R,u,p,C);m.G.promise.then(()=>void R.J()); return m},"i")}catch(G){w?.dispose(); if(!R.C){const I=XcP(R,G);p.resolve();var f;if(f=R.z3 instanceof oQ&&R.K<2)a:if(G instanceof VK)f=G.code!==32&&G.code!==20&&G.code!==10;else{if(G instanceof O2)switch(G.code){case 2:case 13:case 14:case 4:break;default:f=!1;break a}f=!0}if(f){const C=setTimeout(()=>void R.J(),(1+Math.random()*.25)*(R.L?6E4:1E3)); R.addOnDisposeCallback(()=>void clearTimeout(C)); return}R.C=I}r.qP(R.L?13:14);R.G.reject(R.C);return}finally{r.dispose()}R.state=8;R.K=0;R.L?.dispose();R.L=w;R.G.resolve()}; XcP=function(R,w){if(!(w instanceof VK))if(w instanceof O2){const p=Error(w.toString());p.stack=w.stack;w=new VK(11,"EBH:Error",p)}else w=new VK(12,"BSO:Unknown",w);return R.reportError(w)}; tD=function(R,w){if(R.cS())throw new VK(R.L?20:32,w);}; $1l=function(R,w,p,r){const f=(eD(b4(w,2))??0)*1E3;if(f<=0)throw new VK(31,"TTM:Invalid");if(rU(w,4))return new n7d(R.logger,rU(w,4),f);if(!(eD(b4(w,3))??0))return new d1b(R.logger,Qh(c$(w,1)),f);if(!r)throw new VK(4,"PMD:Undefined");r=r(Qh(c$(w,1)));if(typeof r!=="function")throw new VK(16,"APF:Failed");R.D=Math.floor((Date.now()+f)/1E3);R=new E2(R.logger,r,eD(b4(w,3))??0,f);R.addOnDisposeCallback(()=>void p.resolve()); return R}; es=function(R,w,p){try{if(R.cS())throw new VK(21,"BNT:disposed");if(!R.L&&R.C)throw R.C;return Z$Y(R,w,p)??YWl(R,w,p)??F9_(R,w,p)}catch(r){if(!w.GQ)throw D8(R,r);return jmW(R,p,r)}}; D8=function(R,w){w=w instanceof VK?w:new VK(5,"TVD:error",w);return R.reportError(w)}; Z$Y=function(R,w,p){return R.L?.Zi(()=>M_(R,w),p,r=>{if(R.L instanceof E2&&w.JO?.XC)try{R.cache?.L(M_(R,w),r,w.JO.hC,R.D-120)}catch(f){R.reportError(new VK(24,"ELX:write",f))}})}; YWl=function(R,w,p){if(w.JO?.Sv)try{const r=R.cache?.C(M_(R,w),w.JO.hC);return r?p?Yw(R.logger,()=>g.c8(r,2),"a"):r:void 0}catch(r){R.reportError(new VK(23,"RXO:read",r))}}; F9_=function(R,w,p){const r={stack:[],error:void 0,hasError:!1};try{if(!w.fk)throw new VK(29,"SDF:notready");return nd(r,new ch(R.logger,0,R.state)).Zi(()=>M_(R,w),p)}catch(f){r.error=f,r.hasError=!0}finally{dd(r)}}; jmW=function(R,w,p){const r={stack:[],error:void 0,hasError:!1};try{const f=D8(R,p);return nd(r,new JGH(R.logger,f)).Zi(()=>[],w)}catch(f){r.error=f,r.hasError=!0}finally{dd(r)}}; M_=function(R,w){return w.vV?w.vV:w.OP?Yw(R.logger,()=>w.vV=yd(w.OP),"c"):[]}; Ph=function(){let R=0,w;return p=>{w||(w=new Jo);const r=new ch(w,R,1),f=r.Zi(()=>yd(p),!0); r.dispose();R++;return f}}; i$d=function(R,w={}){return new Tpr(R,w)}; QmP=function(R){R.J.lf("data",w=>{if("1"in w){var p=w["1"];let r;try{r=R.D(p)}catch(f){aQ(R,new O2(13,`Error when deserializing response data; error: ${f}, response: ${p}`))}r&&$5(R,r)}if("2"in w)for(w=XO(R,w["2"]),p=0;p{n4(R,d4(R));for(let w=0;w{if(R.L.length!==0){var w=R.xhr.C;w!==0||P5(R.xhr)||(w=6);var p=-1;switch(w){case 0:var r=2;break;case 7:r=10;break;case 8:r=4;break;case 6:p=R.xhr.getStatus();r=Lw(p);break;default:r=14}n4(R,d4(R));w=SpD(w)+", error: "+R.xhr.getLastError();p!==-1&&(w+=`, http status code: ${p}`);aQ(R,new O2(r,w))}})}; aQ=function(R,w){for(let p=0;p{w[r]=p[r]}); return w}; $5=function(R,w){for(let p=0;p{if(P5(R.xhr)){var r=g.$w(R.xhr);if(w&&R.xhr.getResponseHeader("Content-Type")==="text/plain"){if(!atob)throw Error("Cannot decode Base64 response");r=atob(r)}try{var f=R.D(r)}catch(I){aQ(R,Z8(new O2(13,`Error when deserializing response data; error: ${I}, response: ${r}`),p));return}r=Lw(R.xhr.getStatus());n4(R,d4(R));r===0?$5(R,f):aQ(R,Z8(new O2(r,"Xhr succeeded but the status code is not 200"),p))}else{r=g.$w(R.xhr);let I;f=d4(R);if(r){var G= XO(R,r);r=G.code;I=G.details;G=G.metadata}else r=2,I=`Rpc failed due to xhr error. uri: ${String(R.xhr.U)}, error code: ${R.xhr.C}, error: ${R.xhr.getLastError()}`,G=f;n4(R,f);aQ(R,Z8(new O2(r,I,G),p))}})}; Y5=function(R,w){w=R.indexOf(w);w>-1&&R.splice(w,1)}; Z8=function(R,w){w.stack&&(R.stack+="\n"+w.stack);return R}; g.FO=function(R){this.G=R.nh||null;this.O=R.mB||!1;this.C=void 0}; js=function(R,w){g.E1.call(this);this.xY=R;this.J=w;this.K=void 0;this.status=this.readyState=0;this.responseType=this.responseText=this.response=this.statusText="";this.onreadystatechange=this.responseXML=null;this.X=new Headers;this.C=null;this.S="GET";this.pB="";this.L=!1;this.D=this.O=this.G=null;this.U=new AbortController}; JD=function(R){R.O.read().then(R.vW.bind(R)).catch(R.ou.bind(R))}; ih=function(R){R.readyState=4;R.G=null;R.O=null;R.D=null;T_(R)}; T_=function(R){R.onreadystatechange&&R.onreadystatechange.call(R)}; NpD=function(R){if(R.BC&&typeof R.BC=="function")return R.BC();if(typeof Map!=="undefined"&&R instanceof Map||typeof Set!=="undefined"&&R instanceof Set)return Array.from(R.values());if(typeof R==="string")return R.split("");if(g.OI(R)){const w=[],p=R.length;for(let r=0;r>4&15).toString(16)+(R&15).toString(16)}; U2=function(R,w){this.C=this.L=null;this.O=R||null;this.G=!!w}; pK=function(R){R.L||(R.L=new Map,R.C=0,R.O&&xP(R.O,function(w,p){R.add(zj(w),p)}))}; fK=function(R,w){pK(R);w=rf(R,w);return R.L.has(w)}; g.Ga=function(R,w,p){R.remove(w);p.length>0&&(R.O=null,R.L.set(rf(R,w),g.zp(p)),R.C=R.C+p.length)}; rf=function(R,w){w=String(w);R.G&&(w=w.toLowerCase());return w}; SWW=function(R,w){w&&!R.G&&(pK(R),R.O=null,R.L.forEach(function(p,r){const f=r.toLowerCase();r!=f&&(this.remove(r),g.Ga(this,f,p))},R)); R.G=w}; g.Iy=function(R){let w="";g.DS(R,function(p,r){w+=r;w+=":";w+=p;w+="\r\n"}); return w}; g.CK=function(R,w,p){if(g.Jt(p))return R;p=g.Iy(p);if(typeof R==="string")return y7(R,g.m3(w),p);g.Ry(R,w,p);return R}; g.uO=function(R){g.f5.call(this);this.C=R;this.L={}}; s4=function(R,w,p,r,f,G){if(Array.isArray(p))for(let I=0;If=>r.intercept(f,p),R)}; GYL=function(R,w){return w.reduce((p,r)=>f=>r.intercept(f,p),R)}; IAW=function(R,w,p){const r=w.TQ,f=w.getMetadata(),G=tf(R,!0);R=O4(R,f,G,p+r.getName());p=KK(G,r.C,!1);v7_(p,f["X-Goog-Encode-Response-If-Executable"]==="base64");w=r.L(w.I2);G.send(R,"POST",w);return p}; CvH=function(R,w,p,r,f,G={}){const I=w.substring(0,w.length-f.name.length),C=G?.signal;return GYL(u=>new Promise((m,z)=>{if(C?.aborted){const x=new O2(1,"Aborted");x.cause=C.reason;z(x)}else{var B={},W=IAW(R,u,I);W.lf("error",x=>void z(x)); W.lf("metadata",x=>{B=x}); W.lf("data",x=>{m(i$d(x,B))}); C&&C.addEventListener("abort",()=>{W.cancel();const x=new O2(1,"Aborted");x.cause=C.reason;z(x)})}}),R.Fp).call(R,f.J(p,r)).then(u=>u.ut)}; RQ=function(R,w,p,r,f,G={}){return CvH(R,w,p,r,f,G)}; tf=function(R,w){w=R.L&&!w;return R.Lj||w?new g.OF(new g.FO({nh:R.Lj,mB:w})):new g.OF}; O4=function(R,w,p,r){w["Content-Type"]="application/json+protobuf";w["X-User-Agent"]="grpc-web-javascript/0.1";const f=w.Authorization;if(f&&u0d.has(f.split(" ")[0])||R.withCredentials)p.D=!0;if(R.LF)r=g.CK(r,"$httpHeaders",w);else for(const G of Object.keys(w))p.headers.set(G,w[G]);return r}; KK=function(R,w,p){let r;p&&(R.isActive(),p=new sLr(R),r=new mIr(p));return new zyL({xhr:R,Ts:r},w)}; E4=function(){this.L=new BOd;this.C="https://jnn-pa.googleapis.com".replace(/\/+$/,"")}; Dc=function(R){return R.L.vS(WnI)}; lAd=function(R){if(g.fj(g.WD(R)))return!1;if(R.indexOf("://pagead2.googlesyndication.com/pagead/gen_204?id=yt3p&sr=1&")>=0)return!0;let w;try{w=new g.Qd(R)}catch(p){return g.S_(e6,r=>R.search(r)>0)!=null}return w.J.match(xI6)?!0:g.S_(e6,p=>R.match(p)!=null)!=null}; g.MG=function(R,w){return R.replace(Lnx,function(p,r){try{let f=g.ia(w,r);if(f==null||f.toString()==null)return p;f=f.toString();if(f==""||!g.fj(g.WD(f)))return encodeURIComponent(f).replace(/%2C/g,",")}catch(f){}return p})}; Abd=function(R){const w=R.jC;return QF(R,w,w[UZ]|0,qZd,2,1)}; ybI=function(R){var w;if((w=R[cZ])!=null)R=w;else{if(PZ!==PZ)throw Error();R=R[cZ]=bAl(R.L)}return R}; V4x=function(R){return R[ay]??(R[ay]=new Map(Abd(ybI(R)).map(w=>[w.getName(),g.wU(w,2)])))}; XL=function(R){if(R.Dh!==void 0){var w=$M;$M=!0;try{for(let p=R.Dh;p!==void 0;p=p.UHY){const r=p.fHy;r.oM||(r.oM=!0,XL(r),r.Kf?.(r))}}finally{$M=w}}}; t4P=function(R,w){const p=Object.create(oSW);p.value=R;w!==void 0&&(p.w1=w);R=()=>{if($M)throw Error("");return p.value}; R[nK]=p;return[R,r=>df(p,r), r=>{df(p,r(p.value))}]}; df=function(R,w){R.w1(R.value,w)||(R.value=w,R.version++,OAD++,XL(R))}; Zc=function(R,w=""){var p={};R=t4P(R,p.equals);p=p.debugName;R[0][nK].debugName=p&&w?`${p}__${w}`:p??w??"[signal]"}; Knd=function(){var R=g.YM;FL.instance||(FL.instance=new FL(R));return FL.instance}; j6=function(R,w){return R.G?R.G:R.G=new Promise(async p=>{const r=window.AbortController?new window.AbortController:void 0,f=r?.signal;let G=!1;try{r&&(R.C=R.JU.SL(()=>{r.abort()},w||2E4)),await fetch("/generate_204",{method:"HEAD", signal:f}),G=!0}catch{G=!1}finally{R.G=void 0,R.C&&(R.JU.zm(R.C),R.C=0),G!==R.L&&(R.L=G,R.L?R.dispatchEvent("networkstatus-online"):R.dispatchEvent("networkstatus-offline")),p(G)}})}; ESD=function(R){R.L===-1&&(R.L=R.data.reduce((w,p,r)=>w+(p?2**r:0),0)); return R.L}; Jf=function(R){R.setAttribute("role","link")}; iO=function(R,w){Array.isArray(w)&&(w=w.join(" "));w===""||w==void 0?(Ta||(Ta={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"}),w=Ta,"label"in w?R.setAttribute("aria-label",w.label):R.removeAttribute("aria-label")):R.setAttribute("aria-label",w)}; QA=function(R){R=R.getAttribute("aria-label");return R==null||R==void 0?"":String(R)}; g.hf=function(R,w,p){g.f5.call(this);this.L=null;this.G=!1;this.J=R;this.K=p;this.C=w||window;this.O=(0,g.e_)(this.aU,this)}; gf=function(R){R=R.C;return R.requestAnimationFrame||R.webkitRequestAnimationFrame||R.mozRequestAnimationFrame||R.oRequestAnimationFrame||R.msRequestAnimationFrame||null}; HZ=function(R){R=R.C;return R.cancelAnimationFrame||R.cancelRequestAnimationFrame||R.webkitCancelRequestAnimationFrame||R.mozCancelRequestAnimationFrame||R.oCancelRequestAnimationFrame||R.msCancelRequestAnimationFrame||null}; g.vZ=function(R,w,p){g.f5.call(this);this.L=R;this.Tv=w||0;this.C=p;this.O=(0,g.e_)(this.oF,this)}; g.NG=function(R){R.stop();R.oF()}; kM=function(R){R.A2=g.rW(()=>{R.A2=null;R.L&&!R.C&&(R.L=!1,kM(R))},R.Tv); const w=R.O;R.O=null;R.K.apply(null,w)}; U4=function(R){return typeof R.className=="string"?R.className:R.getAttribute&&R.getAttribute("class")||""}; S6=function(R){return R.classList?R.classList:U4(R).match(/\S+/g)||[]}; g.R4=function(R,w){typeof R.className=="string"?R.className=w:R.setAttribute&&R.setAttribute("class",w)}; g.wF=function(R,w){return R.classList?R.classList.contains(w):g.ra(S6(R),w)}; g.pc=function(R,w){if(R.classList)R.classList.add(w);else if(!g.wF(R,w)){const p=U4(R);g.R4(R,p+(p.length>0?" "+w:w))}}; g.rF=function(R,w){if(R.classList)Array.prototype.forEach.call(w,function(r){g.pc(R,r)}); else{var p={};Array.prototype.forEach.call(S6(R),function(r){p[r]=!0}); Array.prototype.forEach.call(w,function(r){p[r]=!0}); w="";for(const r in p)w+=w.length>0?" "+r:r;g.R4(R,w)}}; g.fc=function(R,w){R.classList?R.classList.remove(w):g.wF(R,w)&&g.R4(R,Array.prototype.filter.call(S6(R),function(p){return p!=w}).join(" "))}; g.GX=function(R,w){R.classList?Array.prototype.forEach.call(w,function(p){g.fc(R,p)}):g.R4(R,Array.prototype.filter.call(S6(R),function(p){return!g.ra(w,p)}).join(" "))}; g.M=function(R,w,p){p?g.pc(R,w):g.fc(R,w)}; I4=function(R,w){const p=!g.wF(R,w);g.M(R,w,p)}; g.Cc=function(){g.E1.call(this);this.L=0;this.endTime=this.startTime=null}; DIL=function(R,w){Array.isArray(w)||(w=[w]);w=w.map(function(p){return typeof p==="string"?p:p.property+" "+p.duration+"s "+p.timing+" "+p.delay+"s"}); g.Z2(R,"transition",w.join(","))}; uG=function(R,w,p,r,f){g.Cc.call(this);this.C=R;this.K=w;this.J=p;this.G=r;this.D=Array.isArray(f)?f:[f]}; sc=function(R,w,p,r){return new uG(R,w,{opacity:p},{opacity:r},{property:"opacity",duration:w,timing:"ease-in",delay:0})}; M4d=function(R){R=R.trim();if(R=="")return null;var w=String(R.slice(0,4)).toLowerCase();if(("url("1||R&&R.split(")"),null;if(R.indexOf("(")>0){if(/"|'/.test(R))return null;w=/([\-\w]+)\(/g;let p;for(;p=w.exec(R);)if(!(p[1].toLowerCase()in eyD))return null}return R}; mk=function(R,w){R=g.qx[R];return R&&R.prototype?(w=Object.getOwnPropertyDescriptor(R.prototype,w))&&w.get||null:null}; zX=function(R){const w=g.qx.CSSStyleDeclaration;return w&&w.prototype&&w.prototype[R]||null}; WE=function(R,w,p,r){if(R)return R.apply(w,r);if(g.BE&&document.documentMode<10){if(!w[p].call)throw Error("IE Clobbering detected");}else if(typeof w[p]!="function")throw Error("Clobbering detected");return w[p].apply(w,r)}; X8b=function(R){if(!R)return"";const w=document.createElement("div").style;cb6(R).forEach(function(p){const r=g.f$&&p in PvP?p:p.replace(/^-(?:apple|css|epub|khtml|moz|mso?|o|rim|wap|webkit|xv)-(?=[a-z])/i,"");pj(r,"--")||pj(r,"var")||(p=WE(aAI,R,R.getPropertyValue?"getPropertyValue":"getAttribute",[p])||"",p=M4d(p),p!=null&&WE($IP,w,w.setProperty?"setProperty":"setAttribute",[r,p]))}); return w.cssText||""}; cb6=function(R){g.OI(R)?R=g.zp(R):(R=g.nR(R),g.CR(R,"cssText"));return R}; g.lG=function(R){var w;let p=w=0,r=!1;R=R.split(nSd);for(let f=0;f.4?-1:1;return(w==0?null:w)==-1?"rtl":"ltr"}; g.bG=function(R){if(R instanceof Lc||R instanceof qg||R instanceof Au)return R;if(typeof R.next=="function")return new Lc(()=>R); if(typeof R[Symbol.iterator]=="function")return new Lc(()=>R[Symbol.iterator]()); if(typeof R.xH=="function")return new Lc(()=>R.xH()); throw Error("Not an iterator or iterable.");}; yB=function(R,w,p,r,f,G,I,C){this.L=R;this.D=w;this.O=p;this.K=r;this.G=f;this.J=G;this.C=I;this.U=C}; VB=function(R,w){if(w==0)return R.L;if(w==1)return R.C;let p=$2(R.L,R.O,w),r=$2(R.O,R.G,w);R=$2(R.G,R.C,w);p=$2(p,r,w);r=$2(r,R,w);return $2(p,r,w)}; o4=function(R,w){if(w==0)return R.D;if(w==1)return R.U;let p=$2(R.D,R.K,w),r=$2(R.K,R.J,w);R=$2(R.J,R.U,w);p=$2(p,r,w);r=$2(r,R,w);return $2(p,r,w)}; tu=function(R,w){let p=(w-R.L)/(R.C-R.L);if(p<=0)return 0;if(p>=1)return 1;let r=0,f=1,G=0;for(var I=0;I<8;I++){G=VB(R,p);const C=(VB(R,p+1E-6)-G)/1E-6;if(Math.abs(G-w)<1E-6)return p;if(Math.abs(C)<1E-6)break;else G1E-6&&I<8;I++)G=0}; g.DG=function(R){g.f5.call(this);this.J=1;this.O=[];this.G=0;this.L=[];this.C={};this.D=!!R}; jLD=function(R,w,p){g.TF(function(){R.apply(w,p)})}; g.ex=function(R){this.MV=R}; Mg=function(R){this.MV=R}; cE=function(R){this.data=R}; PE=function(R){return R===void 0||R instanceof cE?R:new cE(R)}; a4=function(R){this.MV=R}; g.$D=function(R){const w=R.creation;R=R.expiration;return!!R&&Rg.c6()}; g.XH=function(R){this.MV=R}; JbH=function(){}; nc=function(){}; dF=function(R){this.L=R;this.C=null}; ZG=function(R){if(R.L==null)throw Error("Storage mechanism: Storage unavailable");R.isAvailable()||OZ(Error("Storage mechanism: Storage unavailable"))}; YD=function(){let R=null;try{R=g.qx.localStorage||null}catch(w){}dF.call(this,R)}; FH=function(){let R=null;try{R=g.qx.sessionStorage||null}catch(w){}dF.call(this,R)}; jx=function(R,w){this.C=R;this.L=w+"::"}; g.Ju=function(R){const w=new YD;return w.isAvailable()?R?new jx(w,R):w:null}; TX=function(R,w){this.L=R;this.C=w}; iG=function(){}; QB=function(){let R=Error();R.name="SecurityError";throw R;}; hu=function(){return{get opener(){return null},get closed(){return!0},get location(){QB()},get document(){QB()},postMessage:function(){}, close:function(){}, focus:function(){}}}; HE=function(R){var w,p,r=R.length,f=0;for(w=0;w>>6:(G<65536?C[p++]=224|G>>>12:(C[p++]=240|G>>>18,C[p++]=128|G>>>12&63),C[p++]=128|G>>> 6&63),C[p++]=128|G&63);return C}; vE=function(R){for(var w=R.length;--w>=0;)R[w]=0}; Ng=function(R,w,p,r,f){this.A_=R;this.KI=w;this.IV=p;this.V$=r;this.R$=f;this.No=R&&R.length}; kD=function(R,w){this.RX=R;this.ZF=0;this.Sx=w}; Uc=function(R,w){R.Kh[R.pending++]=w&255;R.Kh[R.pending++]=w>>>8&255}; Sx=function(R,w,p){R.yC>16-p?(R.oD|=w<>16-R.yC,R.yC+=p-16):(R.oD|=w<>>=1,p<<=1;while(--w>0);return p>>>1}; pM=function(R,w,p){var r=Array(16),f=0,G;for(G=1;G<=15;G++)r[G]=f=f+p[G-1]<<1;for(p=0;p<=w;p++)f=R[p*2+1],f!==0&&(R[p*2]=wb(r[f]++,f))}; rb=function(R){var w;for(w=0;w<286;w++)R.JM[w*2]=0;for(w=0;w<30;w++)R.N6[w*2]=0;for(w=0;w<19;w++)R.Cd[w*2]=0;R.JM[512]=1;R.BH=R.Q9=0;R.PC=R.matches=0}; fM=function(R){R.yC>8?Uc(R,R.oD):R.yC>0&&(R.Kh[R.pending++]=R.oD);R.oD=0;R.yC=0}; Gv=function(R,w,p){fM(R);Uc(R,p);Uc(R,~p);gF.K0(R.Kh,R.window,w,p,R.pending);R.pending+=p}; IU=function(R,w,p,r){var f=w*2,G=p*2;return R[f]>>7)];RU(R,I,p);C=Bf[I];C!==0&&(f-=Wf[I],Sx(R,f,C))}}while(r>1;I>=1;I--)CM(R,p,I);u=G;do I=R.l4[1],R.l4[1]=R.l4[R.vk--],CM(R,p,1),r=R.l4[1],R.l4[--R.bx]=I,R.l4[--R.bx]=r,p[u*2]=p[I*2]+p[r*2],R.depth[u]=(R.depth[I]>=R.depth[r]?R.depth[I]:R.depth[r])+1,p[I*2+1]=p[r*2+1]=u,R.l4[1]=u++,CM(R,p,1);while(R.vk>= 2);R.l4[--R.bx]=R.l4[1];I=w.RX;u=w.ZF;r=w.Sx.A_;f=w.Sx.No;G=w.Sx.KI;var m=w.Sx.IV,z=w.Sx.R$,B,W=0;for(B=0;B<=15;B++)R.Pk[B]=0;I[R.l4[R.bx]*2+1]=0;for(w=R.bx+1;w<573;w++){var x=R.l4[w];B=I[I[x*2+1]*2+1]+1;B>z&&(B=z,W++);I[x*2+1]=B;if(!(x>u)){R.Pk[B]++;var q=0;x>=m&&(q=G[x-m]);var O=I[x*2];R.BH+=O*(B+q);f&&(R.Q9+=O*(r[x*2+1]+q))}}if(W!==0){do{for(B=z-1;R.Pk[B]===0;)B--;R.Pk[B]--;R.Pk[B+1]+=2;R.Pk[z]--;W-=2}while(W>0);for(B=z;B!==0;B--)for(x=R.Pk[B];x!==0;)r=R.l4[--w],r>u||(I[r*2+1]!==B&&(R.BH+=(B-I[r* 2+1])*I[r*2],I[r*2+1]=B),x--)}pM(p,C,R.Pk)}; LM=function(R,w,p){var r,f=-1,G=w[1],I=0,C=7,u=4;G===0&&(C=138,u=3);w[(p+1)*2+1]=65535;for(r=0;r<=p;r++){var m=G;G=w[(r+1)*2+1];++I>>=1)if(w&1&&R.JM[p*2]!==0)return 0;if(R.JM[18]!==0||R.JM[20]!==0||R.JM[26]!==0)return 1;for(p=32;p<256;p++)if(R.JM[p*2]!==0)return 1;return 0}; As=function(R,w,p){R.Kh[R.CH+R.PC*2]=w>>>8&255;R.Kh[R.CH+R.PC*2+1]=w&255;R.Kh[R.uF+R.PC]=p&255;R.PC++;w===0?R.JM[p*2]++:(R.matches++,w--,R.JM[(uM[p]+256+1)*2]++,R.N6[(w<256?zv[w]:zv[256+(w>>>7)])*2]++);return R.PC===R.Fq-1}; yr=function(R,w){R.msg=bM[w];return w}; Vr=function(R){for(var w=R.length;--w>=0;)R[w]=0}; oU=function(R){var w=R.state,p=w.pending;p>R.eC&&(p=R.eC);p!==0&&(gF.K0(R.output,w.Kh,w.Io,p,R.W9),R.W9+=p,w.Io+=p,R.UJ+=p,R.eC-=p,w.pending-=p,w.pending===0&&(w.Io=0))}; EV=function(R,w){var p=R.jY>=0?R.jY:-1,r=R.jz-R.jY,f=0;if(R.level>0){R.Qv.kD===2&&(R.Qv.kD=TOI(R));lM(R,R.pO);lM(R,R.QF);LM(R,R.JM,R.pO.ZF);LM(R,R.N6,R.QF.ZF);lM(R,R.IX);for(f=18;f>=3&&R.Cd[ts[f]*2+1]===0;f--);R.BH+=3*(f+1)+5+5+4;var G=R.BH+3+7>>>3;var I=R.Q9+3+7>>>3;I<=G&&(G=I)}else G=I=r+5;if(r+4<=G&&p!==-1)Sx(R,w?1:0,3),Gv(R,p,r);else if(R.strategy===4||I===G)Sx(R,2+(w?1:0),3),xC(R,OV,KM);else{Sx(R,4+(w?1:0),3);p=R.pO.ZF+1;r=R.QF.ZF+1;f+=1;Sx(R,p-257,5);Sx(R,r-1,5);Sx(R,f-4,4);for(G=0;G>>8&255;R.Kh[R.pending++]=w&255}; MK=function(R,w){var p=R.S0,r=R.jz,f=R.WM,G=R.tq,I=R.jz>R.ER-262?R.jz-(R.ER-262):0,C=R.window,u=R.zV,m=R.Wi,z=R.jz+258,B=C[r+f-1],W=C[r+f];R.WM>=R.yX&&(p>>=2);G>R.Sz&&(G=R.Sz);do{var x=w;if(C[x+f]===W&&C[x+f-1]===B&&C[x]===C[r]&&C[++x]===C[r+1]){r+=2;for(x++;C[++r]===C[++x]&&C[++r]===C[++x]&&C[++r]===C[++x]&&C[++r]===C[++x]&&C[++r]===C[++x]&&C[++r]===C[++x]&&C[++r]===C[++x]&&C[++r]===C[++x]&&rf){R.nR=w;f=x;if(x>=G)break;B=C[r+f-1];W=C[r+f]}}}while((w=m[w&u])>I&&--p!== 0);return f<=R.Sz?f:R.Sz}; aU=function(R){var w=R.ER,p;do{var r=R.Ab-R.Sz-R.jz;if(R.jz>=w+(w-262)){gF.K0(R.window,R.window,w,w,0);R.nR-=w;R.jz-=w;R.jY-=w;var f=p=R.au;do{var G=R.head[--f];R.head[f]=G>=w?G-w:0}while(--p);f=p=w;do G=R.Wi[--f],R.Wi[f]=G>=w?G-w:0;while(--p);r+=w}if(R.Qv.ym===0)break;f=R.Qv;p=R.window;G=R.jz+R.Sz;var I=f.ym;I>r&&(I=r);I===0?p=0:(f.ym-=I,gF.K0(p,f.input,f.kP,I,G),f.state.wrap===1?f.t$=cf(f.t$,p,I,G):f.state.wrap===2&&(f.t$=Pf(f.t$,p,I,G)),f.kP+=I,f.Dk+=I,p=I);R.Sz+=p;if(R.Sz+R.QG>=3)for(r=R.jz-R.QG, R.v1=R.window[r],R.v1=(R.v1<=3&&(R.v1=(R.v1<=3)if(p=As(R,R.jz-R.nR,R.K3-3),R.Sz-=R.K3,R.K3<=R.Ca&&R.Sz>=3){R.K3--;do R.jz++,R.v1=(R.v1<=3&&(R.v1=(R.v1<4096)&&(R.K3=2));if(R.WM>=3&&R.K3<=R.WM){r=R.jz+R.Sz-3;p=As(R,R.jz-1-R.LM,R.WM-3);R.Sz-=R.WM-1;R.WM-=2;do++R.jz<=r&&(R.v1=(R.v1<=3&&R.jz>0&&(r=R.jz-1,p=G[r],p===G[++r]&&p===G[++r]&&p===G[++r])){for(f=R.jz+258;p===G[++r]&&p===G[++r]&&p===G[++r]&&p===G[++r]&&p===G[++r]&&p===G[++r]&&p===G[++r]&&p===G[++r]&&rR.Sz&&(R.K3=R.Sz)}R.K3>=3?(p=As(R,1,R.K3-3),R.Sz-=R.K3,R.jz+=R.K3,R.K3=0):(p=As(R,0,R.window[R.jz]),R.Sz--,R.jz++);if(p&&(EV(R,!1),R.Qv.eC===0))return 1}R.QG=0;return w=== 4?(EV(R,!0),R.Qv.eC===0?3:4):R.PC&&(EV(R,!1),R.Qv.eC===0)?1:2}; QLY=function(R,w){for(var p;;){if(R.Sz===0&&(aU(R),R.Sz===0)){if(w===0)return 1;break}R.K3=0;p=As(R,0,R.window[R.jz]);R.Sz--;R.jz++;if(p&&(EV(R,!1),R.Qv.eC===0))return 1}R.QG=0;return w===4?(EV(R,!0),R.Qv.eC===0?3:4):R.PC&&(EV(R,!1),R.Qv.eC===0)?1:2}; nM=function(R,w,p,r,f){this.uP=R;this.v_=w;this.pG=p;this.qn=r;this.func=f}; hyY=function(){this.Qv=null;this.status=0;this.Kh=null;this.wrap=this.pending=this.Io=this.yQ=0;this.zE=null;this.Gp=0;this.method=8;this.P9=-1;this.zV=this.SH=this.ER=0;this.window=null;this.Ab=0;this.head=this.Wi=null;this.tq=this.yX=this.strategy=this.level=this.Ca=this.S0=this.WM=this.Sz=this.nR=this.jz=this.yg=this.LM=this.K3=this.jY=this.q9=this.dE=this.Lb=this.au=this.v1=0;this.JM=new gF.IJ(1146);this.N6=new gF.IJ(122);this.Cd=new gF.IJ(78);Vr(this.JM);Vr(this.N6);Vr(this.Cd);this.IX=this.QF= this.pO=null;this.Pk=new gF.IJ(16);this.l4=new gF.IJ(573);Vr(this.l4);this.bx=this.vk=0;this.depth=new gF.IJ(573);Vr(this.depth);this.yC=this.oD=this.QG=this.matches=this.Q9=this.BH=this.CH=this.PC=this.Fq=this.uF=0}; gSI=function(R,w){if(!R||!R.state||w>5||w<0)return R?yr(R,-2):-2;var p=R.state;if(!R.output||!R.input&&R.ym!==0||p.status===666&&w!==4)return yr(R,R.eC===0?-5:-2);p.Qv=R;var r=p.P9;p.P9=w;if(p.status===42)if(p.wrap===2)R.t$=0,DN(p,31),DN(p,139),DN(p,8),p.zE?(DN(p,(p.zE.text?1:0)+(p.zE.SB?2:0)+(p.zE.extra?4:0)+(p.zE.name?8:0)+(p.zE.comment?16:0)),DN(p,p.zE.time&255),DN(p,p.zE.time>>8&255),DN(p,p.zE.time>>16&255),DN(p,p.zE.time>>24&255),DN(p,p.level===9?2:p.strategy>=2||p.level<2?4:0),DN(p,p.zE.os& 255),p.zE.extra&&p.zE.extra.length&&(DN(p,p.zE.extra.length&255),DN(p,p.zE.extra.length>>8&255)),p.zE.SB&&(R.t$=Pf(R.t$,p.Kh,p.pending,0)),p.Gp=0,p.status=69):(DN(p,0),DN(p,0),DN(p,0),DN(p,0),DN(p,0),DN(p,p.level===9?2:p.strategy>=2||p.level<2?4:0),DN(p,3),p.status=113);else{var f=8+(p.SH-8<<4)<<8;f|=(p.strategy>=2||p.level<2?0:p.level<6?1:p.level===6?2:3)<<6;p.jz!==0&&(f|=32);p.status=113;eR(p,f+(31-f%31));p.jz!==0&&(eR(p,R.t$>>>16),eR(p,R.t$&65535));R.t$=1}if(p.status===69)if(p.zE.extra){for(f= p.pending;p.Gp<(p.zE.extra.length&65535)&&(p.pending!==p.yQ||(p.zE.SB&&p.pending>f&&(R.t$=Pf(R.t$,p.Kh,p.pending-f,f)),oU(R),f=p.pending,p.pending!==p.yQ));)DN(p,p.zE.extra[p.Gp]&255),p.Gp++;p.zE.SB&&p.pending>f&&(R.t$=Pf(R.t$,p.Kh,p.pending-f,f));p.Gp===p.zE.extra.length&&(p.Gp=0,p.status=73)}else p.status=73;if(p.status===73)if(p.zE.name){f=p.pending;do{if(p.pending===p.yQ&&(p.zE.SB&&p.pending>f&&(R.t$=Pf(R.t$,p.Kh,p.pending-f,f)),oU(R),f=p.pending,p.pending===p.yQ)){var G=1;break}G=p.Gpf&&(R.t$=Pf(R.t$,p.Kh,p.pending-f,f));G===0&&(p.Gp=0,p.status=91)}else p.status=91;if(p.status===91)if(p.zE.comment){f=p.pending;do{if(p.pending===p.yQ&&(p.zE.SB&&p.pending>f&&(R.t$=Pf(R.t$,p.Kh,p.pending-f,f)),oU(R),f=p.pending,p.pending===p.yQ)){G=1;break}G=p.Gpf&&(R.t$=Pf(R.t$,p.Kh,p.pending-f,f));G===0&&(p.status=103)}else p.status= 103;p.status===103&&(p.zE.SB?(p.pending+2>p.yQ&&oU(R),p.pending+2<=p.yQ&&(DN(p,R.t$&255),DN(p,R.t$>>8&255),R.t$=0,p.status=113)):p.status=113);if(p.pending!==0){if(oU(R),R.eC===0)return p.P9=-1,0}else if(R.ym===0&&(w<<1)-(w>4?9:0)<=(r<<1)-(r>4?9:0)&&w!==4)return yr(R,-5);if(p.status===666&&R.ym!==0)return yr(R,-5);if(R.ym!==0||p.Sz!==0||w!==0&&p.status!==666){r=p.strategy===2?QLY(p,w):p.strategy===3?iAI(p,w):db[p.level].func(p,w);if(r===3||r===4)p.status=666;if(r===1||r===3)return R.eC===0&&(p.P9= -1),0;if(r===2&&(w===1?(Sx(p,2,3),RU(p,256,OV),p.yC===16?(Uc(p,p.oD),p.oD=0,p.yC=0):p.yC>=8&&(p.Kh[p.pending++]=p.oD&255,p.oD>>=8,p.yC-=8)):w!==5&&(Sx(p,0,3),Gv(p,0,0),w===3&&(Vr(p.head),p.Sz===0&&(p.jz=0,p.jY=0,p.QG=0))),oU(R),R.eC===0))return p.P9=-1,0}if(w!==4)return 0;if(p.wrap<=0)return 1;p.wrap===2?(DN(p,R.t$&255),DN(p,R.t$>>8&255),DN(p,R.t$>>16&255),DN(p,R.t$>>24&255),DN(p,R.Dk&255),DN(p,R.Dk>>8&255),DN(p,R.Dk>>16&255),DN(p,R.Dk>>24&255)):(eR(p,R.t$>>>16),eR(p,R.t$&65535));oU(R);p.wrap>0&& (p.wrap=-p.wrap);return p.pending!==0?0:1}; ZN=function(R){if(!(this instanceof ZN))return new ZN(R);R=this.options=gF.assign({level:-1,method:8,chunkSize:16384,BX:15,e7:8,strategy:0,to:""},R||{});R.raw&&R.BX>0?R.BX=-R.BX:R.WW&&R.BX>0&&R.BX<16&&(R.BX+=16);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.Qv=new YC;this.Qv.eC=0;var w=this.Qv;var p=R.level,r=R.method,f=R.BX,G=R.e7,I=R.strategy;if(w){var C=1;p===-1&&(p=6);f<0?(C=0,f=-f):f>15&&(C=2,f-=16);if(G<1||G>9||r!==8||f<8||f>15||p<0||p>9||I<0||I>4)w=yr(w,-2);else{f===8&&(f=9);var u= new hyY;w.state=u;u.Qv=w;u.wrap=C;u.zE=null;u.SH=f;u.ER=1<>=7;G<30;G++)for(Wf[G]=I<<7,f=0;f<1<=m.ER&&(w===0&&(Vr(m.head),m.jz=0,m.jY=0,m.QG=0),p=new gF.U2(m.ER),gF.K0(p,G,I-m.ER,m.ER,0),G=p,I=m.ER);p=R.ym;r=R.kP;f=R.input;R.ym=I;R.kP=0;R.input=G;for(aU(m);m.Sz>=3;){G=m.jz;I=m.Sz-2;do m.v1=(m.v1<w:R.length===1?R[0]:R.reduce((w,p)=>(...r)=>w(p(...r)))}; vSd=function(){var R=[];return w=>(p,r)=>{p=w(p,r);let f=()=>{throw Error("Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.");}; const G={getState:p.getState,dispatch:(I,...C)=>f(I,...C)}; r=R.map(I=>I(G)); f=hs(...r)(p.dispatch);return{...p,dispatch:f}}}; NOb=function(R){Object.keys(R).forEach(w=>{const p=R[w];if(typeof p(void 0,{type:gb})==="undefined")throw Error(`The slice reducer for key "${w}" 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 p(void 0,{type:`@@redux/PROBE_UNKNOWN_ACTION${Hf()}`})==="undefined")throw Error(`The slice reducer for key "${w}" returned undefined when probed with a random type. Don't try to handle '${gb}' 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.");})}; vf=function(R,w,p){function r(){if(z)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 C} function f(W){if(typeof W!=="function")throw Error(`Expected the listener to be a function. Instead, received: '${typeof W}'`);if(z)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 x=!0;m===u&&(m=u.slice());m.push(W);return function(){if(x){if(z)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."); x=!1;m===u&&(m=u.slice());m.splice(m.indexOf(W),1);u=null}}} function G(W){if(typeof W!=="object"||W===null)var x=!1;else{for(x=W;Object.getPrototypeOf(x)!==null;)x=Object.getPrototypeOf(x);x=Object.getPrototypeOf(W)===x}if(!x)throw Error(`Actions must be plain objects. Instead, the actual type was: '${typeof W}'. 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 W.type==="undefined")throw Error('Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(z)throw Error("Reducers may not dispatch actions.");try{z=!0,C=I(C,W)}finally{z=!1}x=u=m;for(let q=0;q>4==4&&(rg(u^8194,u^11458,p),m=p[l[4]]);(R<<1&15)==4&&(m=r(G,I,C));if((R&109)==R)for(r=(r%p[l[2]]+p[l[2]])%p[l[2]];r--;)p[l[u^337]](p[l[u^294]]());return m}; kC=function(R){return R?(R=R.privateDoNotAccessOrElseSafeScriptWrappedValue)?Ni(R):null:null}; UV=function(R){return R?(R=R.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue)?Mi(R):null:null}; R2=function(R){R=SR(R);return Qq(R)}; g.wD=function(R){R=SR(R);return Mi(R)}; SR=function(R){return R===null?"null":R===void 0?"undefined":R}; pe=function(){return g.yD("yt.ads.biscotti.lastId_")||""}; rD=function(R){g.AY("yt.ads.biscotti.lastId_",R)}; Gh=function(...R){R=arguments;var w=fe;R.length>1?w[R[0]]=R[1]:R.length===1&&Object.assign(w,R[0])}; g.n=function(R,w){return R in fe?fe[R]:w}; I2=function(R){const w=fe.EXPERIMENT_FLAGS;return w?w[R]:void 0}; UI6=function(R){Ce.forEach(w=>w(R))}; g.mJ=function(R){return R&&window.yterr?function(){try{return R.apply(this,arguments)}catch(w){g.uF(w)}}:R}; g.uF=function(R){var w=g.yD("yt.logging.errors.log");w?w(R,"ERROR",void 0,void 0,void 0,void 0,void 0):(w=g.n("ERRORS",[]),w.push([R,"ERROR",void 0,void 0,void 0,void 0,void 0]),Gh("ERRORS",w));UI6(R)}; zh=function(R,w,p,r,f){var G=g.yD("yt.logging.errors.log");G?G(R,"WARNING",w,p,r,void 0,f):(G=g.n("ERRORS",[]),G.push([R,"WARNING",w,p,r,void 0,f]),Gh("ERRORS",G))}; WI=function(R,w){w=R.split(w);const p={};for(let G=0,I=w.length;G{const f=g.m3(r);g.iH(Array.isArray(p)?p:[p],G=>{G==""?w.push(f):w.push(`${f}=${g.m3(G)}`)})}); return w.join("&")}; lF=function(R){R.charAt(0)==="?"&&(R=R.substring(1));return WI(R,"&")}; qL=function(R){return R.split(",").map(w=>lF(w))}; g.Ak=function(R){return R.indexOf("?")!==-1?(R=(R||"").split("#")[0],R=R.split("?",2),lF(R.length>1?R[1]:R[0])):{}}; yj=function(R,w){return bF(R,w||{},!0)}; Vj=function(R,w){return bF(R,w||{},!1)}; bF=function(R,w,p){var r=R.split("#",2);R=r[0];r=r.length>1?"#"+r[1]:"";var f=R.split("?",2);R=f[0];f=lF(f[1]||"");for(const G in w)if(p||!g.da(f,G))f[G]=w[G];return g.bu(R,f)+r}; o2=function(R){if(!w)var w=window.location.href;const p=g.Cp(R)[1]||null,r=g.sH(R);p&&r?(R=g.Cp(R),w=g.Cp(w),R=R[3]==w[3]&&R[1]==w[1]&&R[4]==w[4]):R=r?g.sH(w)===r&&(Number(g.Cp(w)[4]||null)||null)===(Number(g.Cp(R)[4]||null)||null):!0;return R}; tk=function(R){R||(R=document.location.href);R=g.Cp(R)[1]||null;return R!==null&&R==="https"}; Ke=function(R){R=Os(R);return R===null?!1:R[0]==="com"&&R[1].match(/^youtube(?:kids|-nocookie)?$/)?!0:!1}; Es=function(R){R=Os(R);return R===null?!1:R[1]==="google"?!0:R[2]==="google"?R[0]==="au"&&R[1]==="com"?!0:R[0]==="uk"&&R[1]==="co"?!0:!1:!1}; Os=function(R){R=g.sH(R);return R!==null?R.split(".").reverse():null}; BI=function(R){return R&&R.match(wTH)?R:zj(R)}; rUH=function(R){a:{let p;try{p=R.L.top.location.href}catch(r){R=2;break a}R=p?p===R.C.location.href?0:1:2}R={dt:pTW,flash:"0",frm:R};try{R.u_tz=-(new Date).getTimezoneOffset();try{var w=V8.history.length}catch(p){w=0}R.u_his=w;R.u_h=V8.screen?.height;R.u_w=V8.screen?.width;R.u_ah=V8.screen?.availHeight;R.u_aw=V8.screen?.availWidth;R.u_cd=V8.screen?.colorDepth}catch(p){}return R}; DJ=function(R=pe()){var w=fvY,p=Object,r=p.assign,f=rUH(w);var G=w.L;let I,C,u,m,z,B,W;try{var x=G.screenX;var q=G.screenY}catch(e){}try{var O=G.outerWidth;I=G.outerHeight}catch(e){}try{C=G.innerWidth,u=G.innerHeight}catch(e){}try{m=G.screenLeft,z=G.screenTop}catch(e){}try{C=G.innerWidth,u=G.innerHeight}catch(e){}try{B=G.screen.availWidth,W=G.screen.availTop}catch(e){}G=[m,z,x,q,B,W,O,I,C,u];x=dA(!1,w.L.top);q=new Geb;"SVGElement"in g.qx&&"createElementNS"in g.qx.document&&q.set(0);O=ubY();O["allow-top-navigation-by-user-activation"]&& q.set(1);O["allow-popups-to-escape-sandbox"]&&q.set(2);g.qx.crypto&&g.qx.crypto.subtle&&q.set(3);"TextDecoder"in g.qx&&"TextEncoder"in g.qx&&q.set(4);q=ESD(q);w=r.call(p,f,{bc:q,bih:x.height,biw:x.width,brdim:G.join(),vis:fA(w.C),wgl:!!V8.WebGLRenderingContext});w.ca_type="image";R&&(w.bid=R);return w}; CoY=function(){if(!IvW)return null;const R=IvW();return"open"in R?R:null}; g.ML=function(R){switch(ed(R)){case 200:case 201:case 202:case 203:case 204:case 205:case 206:case 304:return!0;default:return!1}}; ed=function(R){return R&&"status"in R?R.status:-1}; g.cI=function(R,w){typeof R==="function"&&(R=g.mJ(R));return window.setTimeout(R,w)}; g.PI=function(R,w){typeof R==="function"&&(R=g.mJ(R));return window.setInterval(R,w)}; g.a2=function(R){window.clearTimeout(R)}; g.$E=function(R){window.clearInterval(R)}; g.Y=function(R){R=Xf(R);return typeof R==="string"&&R==="false"?!1:!!R}; ne=function(R,w){R=Xf(R);return R===void 0&&w!==void 0?w:Number(R||0)}; dD=function(){return g.n("EXPERIMENTS_TOKEN","")}; Xf=function(R){return g.n("EXPERIMENT_FLAGS",{})[R]}; ZJ=function(){const R=[],w=g.n("EXPERIMENTS_FORCED_FLAGS",{});for(var p of Object.keys(w))R.push({key:p,value:String(w[p])});p=g.n("EXPERIMENT_FLAGS",{});for(const r of Object.keys(p))r.startsWith("force_")&&w[r]===void 0&&R.push({key:r,value:String(p[r])});return R}; YE=function(R,w,p="GET",r="",f,G,I,C=!1,u){const m=CoY();if(!m)return null;const z=()=>{(m&&"readyState"in m?m.readyState:0)===4&&w&&g.mJ(w)(m)}; "onloadend"in m?m.addEventListener("loadend",z,!1):m.onreadystatechange=z;g.Y("debug_forward_web_query_parameters")&&(R=uqd(R));m.open(p,R,!0);G&&(m.responseType=G);I&&(m.withCredentials=!0);p=p==="POST"&&(window.FormData===void 0||!(r instanceof FormData));if(f=sp_(R,f))for(const B in f)m.setRequestHeader(B,f[B]),"content-type"===B.toLowerCase()&&(p=!1);p&&m.setRequestHeader("Content-Type","application/x-www-form-urlencoded");u&&"onprogress"in m&&(m.onprogress=()=>{u(m.responseText)}); if(C&&"setAttributionReporting"in XMLHttpRequest.prototype){R={eventSourceEligible:!0,triggerEligible:!1};try{m.setAttributionReporting(R)}catch(B){zh(B)}}m.send(r);return m}; sp_=function(R,w={}){const p=o2(R),r=g.n("INNERTUBE_CLIENT_NAME"),f=g.Y("web_ajax_ignore_global_headers_if_set");for(const C in m46){let u=g.n(m46[C]);const m=C==="X-Goog-AuthUser"||C==="X-Goog-PageId";C!=="X-Goog-Visitor-Id"||u||(u=g.n("VISITOR_DATA"));var G;if(!(G=!u)){if(!(G=p||(g.sH(R)?!1:!0))){G=R;var I;if(I=g.Y("add_auth_headers_to_remarketing_google_dot_com_ping")&&C==="Authorization"&&(r==="TVHTML5"||r==="TVHTML5_UNPLUGGED"||r==="TVHTML5_SIMPLY")&&Es(G))G=ma(G)||"",G=G.split("/"),G="/"+(G.length> 1?G[1]:""),I=G==="/pagead";G=I?!0:!1}G=!G}G||f&&w[C]!==void 0||r==="TVHTML5_UNPLUGGED"&&m||(w[C]=u)}"X-Goog-EOM-Visitor-Id"in w&&"X-Goog-Visitor-Id"in w&&delete w["X-Goog-Visitor-Id"];if(p||!g.sH(R))w["X-YouTube-Utc-Offset"]=String(-(new Date).getTimezoneOffset());if(p||!g.sH(R)){let C;try{C=(new Intl.DateTimeFormat).resolvedOptions().timeZone}catch{}C&&(w["X-YouTube-Time-Zone"]=C)}document.location.hostname.endsWith("youtubeeducation.com")||!p&&g.sH(R)||(w["X-YouTube-Ad-Signals"]=xE(DJ()));return w}; jd=function(R,w){w.method="POST";w.postParams||(w.postParams={});return g.Ff(R,w)}; Wzr=function(R,w){if(window.fetch&&w.format!=="XML"){var p={method:w.method||"GET",credentials:"same-origin"};w.headers&&(p.headers=w.headers);w.priority&&(p.priority=w.priority);R=ztH(R,w);var r=BlL(R,w);r&&(p.body=r);w.withCredentials&&(p.credentials="include");var f=w.context||g.qx,G=!1,I;fetch(R,p).then(C=>{if(!G){G=!0;I&&g.a2(I);var u=C.ok,m=z=>{z=z||{};u?w.onSuccess&&w.onSuccess.call(f,z,C):w.onError&&w.onError.call(f,z,C);w.onFinish&&w.onFinish.call(f,z,C)}; (w.format||"JSON")==="JSON"&&(u||C.status>=400&&C.status<500)?C.json().then(m,()=>{m(null)}):m(null)}}).catch(()=>{w.onError&&w.onError.call(f,{},{})}); R=w.timeout||0;w.onFetchTimeout&&R>0&&(I=g.cI(()=>{G||(G=!0,g.a2(I),w.onFetchTimeout.call(w.context||g.qx))},R))}else g.Ff(R,w)}; g.Ff=function(R,w){const p=w.format||"JSON";R=ztH(R,w);var r=BlL(R,w);let f=!1,G;const I=x4D(R,C=>{if(!f){f=!0;G&&g.a2(G);var u=g.ML(C),m=null,z=400<=C.status&&C.status<500,B=500<=C.status&&C.status<600;if(u||z||B)m=lvI(R,p,C,w.convertToSafeHtml);u&&(u=Lzx(p,C,m));m=m||{};z=w.context||g.qx;u?w.onSuccess&&w.onSuccess.call(z,C,m):w.onError&&w.onError.call(z,C,m);w.onFinish&&w.onFinish.call(z,C,m)}},w.method,r,w.headers,w.responseType,w.withCredentials,!1,w.onProgress); r=w.timeout||0;if(w.onTimeout&&r>0){const C=w.onTimeout;G=g.cI(()=>{f||(f=!0,I.abort(),g.a2(G),C.call(w.context||g.qx,I))},r)}return I}; ztH=function(R,w){w.includeDomain&&(R=document.location.protocol+"//"+document.location.hostname+(document.location.port?":"+document.location.port:"")+R);const p=g.n("XSRF_FIELD_NAME");if(w=w.urlParams)w[p]&&delete w[p],R=yj(R,w);return R}; BlL=function(R,w){const p=g.n("XSRF_FIELD_NAME"),r=g.n("XSRF_TOKEN");var f=w.postBody||"",G=w.postParams;const I=g.n("XSRF_FIELD_NAME");let C;w.headers&&(C=w.headers["Content-Type"]);w.excludeXsrf||g.sH(R)&&!w.withCredentials&&g.sH(R)!==document.location.hostname||w.method!=="POST"||C&&C!=="application/x-www-form-urlencoded"||w.postParams&&w.postParams[I]||(G||(G={}),G[p]=r);(g.Y("ajax_parse_query_data_only_when_filled")&&G&&Object.keys(G).length>0||G)&&typeof f==="string"&&(f=lF(f),g.N6(f,G),f=w.postBodyFormat&& w.postBodyFormat==="JSON"?JSON.stringify(f):g.A4(f));G=f||G&&!g.Jt(G);!qyD&&G&&w.method!=="POST"&&(qyD=!0,g.uF(Error("AJAX request with postData should use POST")));return f}; lvI=function(R,w,p,r){let f=null;switch(w){case "JSON":let G;try{G=p.responseText}catch(I){throw r=Error("Error reading responseText"),r.params=R,zh(r),I;}R=p.getResponseHeader("Content-Type")||"";if(G&&R.indexOf("json")>=0){G.substring(0,5)===")]}'\n"&&(G=G.substring(5));try{f=JSON.parse(G)}catch(I){}}break;case "XML":if(R=(R=p.responseXML)?AUb(R):null)f={},g.iH(R.getElementsByTagName("*"),I=>{f[I.tagName]=bW6(I)})}r&&yUr(f); return f}; yUr=function(R){if(g.Kd(R))for(const w in R)w==="html_content"||r2(w,"_html")?R[w]=Qq(R[w]):yUr(R[w])}; Lzx=function(R,w,p){if(w&&w.status===204)return!0;switch(R){case "JSON":return!!p;case "XML":return Number(p&&p.return_code)===0;case "RAW":return!0;default:return!!p}}; AUb=function(R){return R?(R=("responseXML"in R?R.responseXML:R).getElementsByTagName("root"))&&R.length>0?R[0]:null:null}; bW6=function(R){let w="";g.iH(R.childNodes,p=>{w+=p.nodeValue}); return w}; uqd=function(R){var w=window.location.search,p=g.sH(R);g.Y("debug_handle_relative_url_for_query_forward_killswitch")||!p&&o2(R)&&(p=document.location.hostname);var r=ma(R);r=(p=p&&(p.endsWith("youtube.com")||p.endsWith("youtube-nocookie.com")))&&r&&r.startsWith("/api/");if(!p||r)return R;const f=lF(w),G={};g.iH(VDP,I=>{f[I]&&(G[I]=f[I])}); return Vj(R,G)}; Th=function(R,w){const p=g.ht(w);let r;return(new g.n9((f,G)=>{p.onSuccess=I=>{g.ML(I)?f(new o9D(I)):G(new Jk(`Request failed, status=${ed(I)}`,"net.badstatus",I))}; p.onError=I=>{G(new Jk("Unknown request error","net.unknown",I))}; p.onTimeout=I=>{G(new Jk("Request timed out","net.timeout",I))}; r=g.Ff(R,p)})).bA(f=>{f instanceof U1&&r?.abort(); return jZ(f)})}; g.iF=function(R,w,p,r,f=-1,G){const I=u=>new g.n9(m=>{setTimeout(m,u)}),C=(u,m,z)=>u.bA(B=>{if(m<=0||ed(B.xhr)===403)return jZ(new Jk("Request retried too many times","net.retryexhausted",B.xhr)); const W=Math.pow(2,p-m+1)*z,x=f>0?Math.min(f,W):W;return I(z).then(()=>{G&&G(B,m-1);return C(Th(R,w),m-1,x)})}); return C(Th(R,w),p-1,r)}; tDP=function(R,w=null){R.O=2;R.C=w}; OWd=function(R,w=null){R.O=1;R.C=w}; hk=function(R=null){const w=new Qj;tDP(w,R);return w}; gD=function(R=null){const w=new Qj;OWd(w,R);return w}; g.NL=function(R,w,p,r="youtube.com",f=!1){HI||vI.set(""+R,w,{Je:p,path:"/",domain:r,secure:f})}; g.kE=function(R,w){if(!HI)return vI.get(""+R,w)}; g.Us=function(R,w="/",p="youtube.com"){HI||vI.remove(""+R,w,p)}; Kzl=function(){if(!vI.isEnabled())return!1;if(!vI.isEmpty())return!0;vI.set("TESTCOOKIESENABLED","1",{Je:60});if(vI.get("TESTCOOKIESENABLED")!=="1")return!1;vI.remove("TESTCOOKIESENABLED");return!0}; g.F=function(R,w){if(R)return R[w.name]}; Sd=function(R){const w=g.n("INNERTUBE_HOST_OVERRIDE");w&&(R=String(w)+String(BO(R)));return R}; E9r=function(R){const w={};g.Y("json_condensed_response")&&(w.prettyPrint="false");return R=Vj(R,w)}; RN=function(R,w="POST"){R={method:w,mode:o2(R)?"same-origin":"cors",credentials:o2(R)?"same-origin":"include"};w={};const p={};for(const r of Object.keys(w))w[r]&&(p[r]=w[r]);Object.keys(p).length>0&&(R.headers=p);return R}; wy=function(R,w={}){return`service:${R}/${Object.keys(w).sort().map(p=>p+":"+w[p]).join("/")}`}; ph=function(){const R=/Chrome\/(\d+)/.exec(g.s3());return R?parseFloat(R[1]):NaN}; ry=function(){var R=/\sCobalt\/(\S+)\s/.exec(g.s3());if(!R)return NaN;const w=[];for(const p of R[1].split("."))R=parseInt(p,10),R>=0&&w.push(R);return parseFloat(w.join("."))}; GU=function(){return g.fh("android")&&g.fh("chrome")&&!(g.fh("trident/")||g.fh("edge/"))&&!g.fh("cobalt")}; g.IN=function(){return g.fh("cobalt")}; Ch=function(){return g.fh("cobalt")&&g.fh("appletv")}; uB=function(){return g.fh("(ps3; leanback shell)")||g.fh("ps3")&&g.IN()}; D4Y=function(){return g.fh("(ps4; leanback shell)")||g.fh("ps4")&&g.IN()}; g.etb=function(){return g.IN()&&(g.fh("ps4 vr")||g.fh("ps4 pro vr"))}; sn=function(){const R=/WebKit\/([0-9]+)/.exec(g.s3());return!!(R&&parseInt(R[1],10)>=600)}; mH=function(){const R=/WebKit\/([0-9]+)/.exec(g.s3());return!!(R&&parseInt(R[1],10)>=602)}; zU=function(R,w,p,r){var f=w^R;(R|8)>>4||p[l[2]]==0||(r=(r%p[l[2]]+p[l[2]])%p[l[2]],p[l[8]](0,1,p[l[8]](r,1,p[0])[0]));if((R-1^19)=R){for(var G=f^3705,I=[];++G-I[l[2]]-(f^3609);){switch(G){case f^3587:G-=f^3639;case f^3682:case f^3685:case f^3684:continue;case f^3650:G=f^3606;case f^3687:case f^3686:case f^3673:continue;case f^3607:G=f^3686}I[l[f^3639]](String[l[f^3604]](G))}var C=I}R>>1&10||p[l[27]]();return C}; MDD=function(){return g.fh("iemobile")||g.fh("windows phone")&&g.fh("edge")}; xB=function(){return(Be||We)&&g.fh("applewebkit")&&!g.fh("version")&&(!g.fh("safari")||g.fh("gsa/"))}; Lh=function(){return g.lB&&g.fh("version/")}; q0=function(){return g.fh("smart-tv")&&g.fh("samsung")}; g.fh=function(R){const w=g.s3();return w?w.toLowerCase().indexOf(R)>=0:!1}; Aj=function(){return jC()||xB()||Lh()?!0:g.n("EOM_VISITOR_DATA")?!1:!0}; bB=function(R,w){return w===void 0||w===null?R:w==="1"||w===!0||w===1||w==="True"?!0:!1}; yp=function(R,w,p){for(const r in p)if(p[r]==w)return p[r];return R}; Vp=function(R,w){return w===void 0||w===null?R:Number(w)}; oN=function(R,w){return w===void 0||w===null?R:w.toString()}; tj=function(R,w){if(w){if(R==="fullwidth")return Infinity;if(R==="fullheight")return 0}return R&&(w=R.match(cUr))&&(R=Number(w[2]),w=Number(w[1]),!isNaN(R)&&!isNaN(w)&&R>0)?w/R:NaN}; On=function(R){var w=R.docid||R.video_id||R.videoId||R.id;if(w)return w;w=R.raw_player_response;w||(R=R.player_response)&&(w=JSON.parse(R));return w&&w.videoDetails&&w.videoDetails.videoId||null}; PoW=function(R){return Kh(R,!1)==="EMBEDDED_PLAYER_MODE_PFL"}; g.En=function(R){return R==="EMBEDDED_PLAYER_LITE_MODE_FIXED_PLAYBACK_LIMIT"||R==="EMBEDDED_PLAYER_LITE_MODE_DYNAMIC_PLAYBACK_LIMIT"?!0:!1}; Kh=function(R,w=!1){w=w?"EMBEDDED_PLAYER_MODE_DEFAULT":"EMBEDDED_PLAYER_MODE_UNKNOWN";window.location.hostname.includes("youtubeeducation.com")&&(w="EMBEDDED_PLAYER_MODE_PFL");let p=R.raw_embedded_player_response;if(!p&&(R=R.embedded_player_response))try{p=JSON.parse(R)}catch(r){return w}return p?yp(w,p.embeddedPlayerMode,av6):w}; $4x=function(){if(g.Y("disable_biscotti_fetch_entirely_for_all_web_clients"))return Error("Biscotti id fetching has been disabled entirely.");if(!Aj())return Error("User has not consented - not fetching biscotti id.");const R=g.n("PLAYER_VARS",{});if(g.ia(R,"privembed",!1)=="1")return Error("Biscotti ID is not available in private embed mode");if(PoW(R))return Error("Biscotti id fetching has been disabled for pfl.")}; ZWd=function(){const R=$4x();if(R!==void 0)return jZ(R);DU||(DU=Th("//googleads.g.doubleclick.net/pagead/id",XTb).then(n9I).bA(w=>d4W(2,w))); return DU}; n9I=function(R){R=R.xhr.responseText;if(!pj(R,")]}'"))throw new eN;R=JSON.parse(R.substr(4));if((R.type||1)>1)throw new eN;R=R.id;rD(R);DU=gD(R);Yyx(18E5,2);return R}; d4W=function(R,w){w=new Fzd(w);rD("");DU=hk(w);R>0&&Yyx(12E4,R-1);throw w;}; Yyx=function(R,w){g.cI(function(){Th("//googleads.g.doubleclick.net/pagead/id",XTb).then(n9I,p=>d4W(w,p)).bA(g.EW)},R)}; jpY=function(){try{const R=g.yD("yt.ads.biscotti.getId_");return R?R():ZWd()}catch(R){return jZ(R)}}; TlY=function(R){R&&(R.dataset?R.dataset[JUP()]="true":Dxd(R))}; iWd=function(R){return R?R.dataset?R.dataset[JUP()]:R.getAttribute("data-loaded"):null}; JUP=function(){return Qp_.loaded||(Qp_.loaded="loaded".replace(/\-([a-z])/g,(R,w)=>w.toUpperCase()))}; htY=function(){var R=document;if("visibilityState"in R)return R.visibilityState;const w=M0+"VisibilityState";if(w in R)return R[w]}; ce=function(R,w){let p;Nx(R,r=>{p=w[r];return!!p}); return p}; Pe=function(R){if(R.requestFullscreen)R=R.requestFullscreen(void 0);else if(R.webkitRequestFullscreen)R=R.webkitRequestFullscreen();else if(R.mozRequestFullScreen)R=R.mozRequestFullScreen();else if(R.msRequestFullscreen)R=R.msRequestFullscreen();else if(R.webkitEnterFullscreen)R=R.webkitEnterFullscreen();else return Promise.reject(Error("Fullscreen API unavailable"));return R instanceof Promise?R:Promise.resolve()}; X4=function(R){var w;g.aN()?$B()==R&&(w=document):w=R;return w&&(R=ce(["exitFullscreen","webkitExitFullscreen","mozCancelFullScreen","msExitFullscreen"],w))?(w=R.call(w),w instanceof Promise?w:Promise.resolve()):Promise.resolve()}; g9Y=function(R){return g.S_(["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],w=>`on${w.toLowerCase()}`in R)}; HWd=function(){var R=document;return g.S_(["fullscreenerror","webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"],w=>`on${w.toLowerCase()}`in R)}; g.aN=function(){return!!ce(["fullscreenEnabled","webkitFullscreenEnabled","mozFullScreenEnabled","msFullscreenEnabled"],document)}; $B=function(R=!1){let w=ce(["fullscreenElement","webkitFullscreenElement","mozFullScreenElement","msFullscreenElement"],document);if(R)for(;w&&w.shadowRoot;)w=w.shadowRoot.fullscreenElement;return w?w:null}; v9b=function(R){if(document.body&&document.documentElement){const w=document.body.scrollTop+document.documentElement.scrollTop;R.L=R.clientX+(document.body.scrollLeft+document.documentElement.scrollLeft);R.C=R.clientY+w}}; NlW=function(R,w,p,r={}){R.addEventListener&&(w!="mouseenter"||"onmouseenter"in document?w!="mouseleave"||"onmouseenter"in document?w=="mousewheel"&&"MozBoxSizing"in document.documentElement.style&&(w="MozMousePixelScroll"):w="mouseout":w="mouseover");return Fb(dy,f=>{const G=typeof f[4]==="boolean"&&f[4]==!!r,I=g.Kd(f[4])&&g.Kd(r)&&g.QU(f[4],r);return!!f.length&&f[0]==R&&f[1]==w&&f[2]==p&&(G||I)})}; g.ZU=function(R,w,p,r={}){if(!R||!R.addEventListener&&!R.attachEvent)return"";let f=NlW(R,w,p,r);if(f)return f;f=++keH.count+"";const G=!(w!="mouseenter"&&w!="mouseleave"||!R.addEventListener||"onmouseenter"in document);let I;I=G?C=>{C=new U4H(C);if(!bA(C.relatedTarget,u=>u==R,!0))return C.currentTarget=R,C.type=w,p.call(R,C)}:C=>{C=new U4H(C); C.currentTarget=R;return p.call(R,C)}; I=g.mJ(I);R.addEventListener?(w=="mouseenter"&&G?w="mouseover":w=="mouseleave"&&G?w="mouseout":w=="mousewheel"&&"MozBoxSizing"in document.documentElement.style&&(w="MozMousePixelScroll"),Syd()||typeof r==="boolean"?R.addEventListener(w,I,r):R.addEventListener(w,I,!!r.capture)):R.attachEvent(`on${w}`,I);dy[f]=[R,w,p,I,r];return f}; w$r=function(R){return Rp_(R,w=>g.wF(w,"ytp-ad-has-logging-urls"))}; Rp_=function(R,w){const p=document.body||document;return g.ZU(p,"click",r=>{const f=bA(r.target,G=>G===p||w(G),!0); f&&f!==p&&!f.disabled&&(r.currentTarget=f,R.call(f,r))})}; g.YB=function(R){R&&(typeof R=="string"&&(R=[R]),g.iH(R,w=>{if(w in dy){var p=dy[w];const r=p[0],f=p[1],G=p[3];p=p[4];r.removeEventListener?Syd()||typeof p==="boolean"?r.removeEventListener(f,G,p):r.removeEventListener(f,G,!!p.capture):r.detachEvent&&r.detachEvent(`on${f}`,G);delete dy[w]}}))}; F4=function(R){for(let w in dy)dy[w][0]==R&&g.YB(w)}; jN=function(R){R=R||window.event;let w;R.composedPath&&typeof R.composedPath==="function"?w=R.composedPath():w=R.path;w&&w.length?R=w[0]:(R=R||window.event,R=R.target||R.srcElement,R.nodeType==3&&(R=R.parentNode));return R}; Jj=function(R){this.D=R;this.L=null;this.G=0;this.J=null;this.K=0;this.C=[];for(R=0;R<4;R++)this.C.push(0);this.O=0;this.S=g.ZU(window,"mousemove",(0,g.e_)(this.X,this));this.U=g.PI((0,g.e_)(this.pB,this),25)}; TU=function(R,w,p,r){for(let f=0;f0?p:0;p=r?Date.now()+r*1E3:0;if((r=r?g.iB.oL():g.iB.ZL())&&window.JSON){typeof w!=="string"&&(w=JSON.stringify(w,void 0));try{r.set(R,w,p)}catch(f){r.remove(R)}}}; g.hj=function(R){const w=g.iB.ZL(),p=g.iB.oL();if(!w&&!p||!window.JSON)return null;let r;try{r=w.get(R)}catch(f){}if(typeof r!=="string")try{r=p.get(R)}catch(f){}if(typeof r!=="string")return null;try{r=JSON.parse(r,void 0)}catch(f){}return r}; p$_=function(){var R=g.iB.oL();if(R&&(R=R.LR("yt-player-quality")))return R.creation}; g.gy=function(R){try{const w=g.iB.ZL(),p=g.iB.oL();w&&w.remove(R);p&&p.remove(R)}catch(w){}}; g.He=function(){return g.hj("yt-remote-session-screen-id")}; ve=function(){if(!g.qx.matchMedia)return"WEB_DISPLAY_MODE_UNKNOWN";try{return g.qx.matchMedia("(display-mode: standalone)").matches?"WEB_DISPLAY_MODE_STANDALONE":g.qx.matchMedia("(display-mode: minimal-ui)").matches?"WEB_DISPLAY_MODE_MINIMAL_UI":g.qx.matchMedia("(display-mode: fullscreen)").matches?"WEB_DISPLAY_MODE_FULLSCREEN":g.qx.matchMedia("(display-mode: browser)").matches?"WEB_DISPLAY_MODE_BROWSER":"WEB_DISPLAY_MODE_UNKNOWN"}catch(R){return"WEB_DISPLAY_MODE_UNKNOWN"}}; rZW=function(){N0.instance||(N0.instance=new N0);return N0.instance}; fQW=function(R){switch(R){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.SN=function(){kB||(kB=new GJx);return kB}; wx=function(R,w){var p=`f${Math.floor(R/31)+1}`;R=1<10&&qA.shift()))}; bq=function(R,w){lq||(LX?LX.logEvent(R,w):(qA.push({type:"EVENT",eventType:R,payload:w}),qA.length>10&&qA.shift()))}; yM=function(R){if(R.indexOf(":")>=0)throw Error("Database name cannot contain ':'");}; VM=function(R){return R.substr(0,R.indexOf(":"))||R}; KX=function(R,w,p,r){w=VM(w);let f;f=R instanceof Error?R:Error(`Unexpected error: ${R}`);if(f instanceof g.od)return f;R={objectStoreNames:p,dbName:w,dbVersion:r};if(f.name==="QuotaExceededError")return new g.od("QUOTA_EXCEEDED",R);if(g.tx&&f.name==="UnknownError")return new g.od("QUOTA_MAYBE_EXCEEDED",R);if(f instanceof OP)return new g.od("MISSING_INDEX",{...R,objectStore:f.objectStore,index:f.index});if(f.name==="InvalidStateError"&&WU6.some(G=>f.message.includes(G)))return new g.od("EXECUTE_TRANSACTION_ON_CLOSED_DB", R); if(f.name==="AbortError")return new g.od("UNKNOWN_ABORT",R,f.message);f.args=[{...R,name:"IdbError",rP:f.name}];f.level="WARNING";return f}; g.EP=function(R,w,p){const r=xv();return new g.od("IDB_NOT_SUPPORTED",{context:{caller:R,publicName:w,version:p,hasSucceededOnce:r?.hasSucceededOnce}})}; xqY=function(R){if(!R)throw Error();throw R;}; lQW=function(R){return R}; LUd=function(R,w,p,r,f){try{if(R.state.status!=="FULFILLED")throw Error("calling handleResolve before the promise is fulfilled.");const G=p(R.state.value);G instanceof g.DZ?eQ(R,w,G,r,f):r(G)}catch(G){f(G)}}; qXd=function(R,w,p,r,f){try{if(R.state.status!=="REJECTED")throw Error("calling handleReject before the promise is rejected.");const G=p(R.state.reason);G instanceof g.DZ?eQ(R,w,G,r,f):r(G)}catch(G){f(G)}}; eQ=function(R,w,p,r,f){w===p?f(new TypeError("Circular promise chain detected.")):p.then(G=>{G instanceof g.DZ?eQ(R,w,G,r,f):r(G)},G=>{f(G)})}; AZ6=function(R,w,p){const r=()=>{try{R.removeEventListener("success",f),R.removeEventListener("error",G)}catch{}},f=()=>{w(R.result); r()},G=()=>{p(R.error); r()}; R.addEventListener("success",f);R.addEventListener("error",G)}; bkY=function(R){return new Promise((w,p)=>{AZ6(R,w,p)})}; cP=function(R){return new g.DZ(new MA((w,p)=>{AZ6(R,w,p)}))}; PP=function(R,w){return new g.DZ(new MA((p,r)=>{const f=()=>{const G=R?w(R):null;G?G.then(I=>{R=I;f()},r):p()}; f()}))}; Vjd=function(R){return cP(R).then(w=>w?new yZW(R,w):null)}; g.oLl=function(R){R.cursor.continue(void 0);return Vjd(R.request)}; ad=function(){return g.Y("idb_immediate_commit")}; g.$v=async function(R,w,p,r){const f={mode:"readonly",ZT:!1,tag:"IDB_TRANSACTION_TAG_UNKNOWN"};typeof p==="string"?f.mode=p:Object.assign(f,p);R.transactionCount++;p=f.ZT?3:1;let G=0,I;for(;!I;){G++;const z=Math.round((0,g.T)());try{var C=R.L.transaction(w,f.mode),u=r,m=!!f.commit;const B=new tj_(C),W=await Ok_(B,u,m),x=Math.round((0,g.T)());KUl(R,z,x,G,void 0,w.join(),f);return W}catch(B){u=Math.round((0,g.T)());const W=KX(B,R.L.name,w.join(),R.L.version);if(W instanceof g.od&&!W.L||G>=p)KUl(R,z, u,G,W,w.join(),f),I=W}}return Promise.reject(I)}; var ELW=function(R,w){return zU[l[5]](this,4,2532,R,w)}; Xo=function(R,w,p){R=R.L.createObjectStore(w,p);return new Dql(R)}; nX=function(R,w){R.L.objectStoreNames.contains(w)&&R.L.deleteObjectStore(w)}; KUl=function(R,w,p,r,f,G,I){w=p-w;f?(f instanceof g.od&&(f.type==="QUOTA_EXCEEDED"||f.type==="QUOTA_MAYBE_EXCEEDED")&&bq("QUOTA_EXCEEDED",{dbName:VM(R.L.name),objectStoreNames:G,transactionCount:R.transactionCount,transactionMode:I.mode}),f instanceof g.od&&f.type==="UNKNOWN_ABORT"&&(p-=R.O,p<0&&p>=2147483648&&(p=0),bq("TRANSACTION_UNEXPECTEDLY_ABORTED",{objectStoreNames:G,transactionDuration:w,transactionCount:R.transactionCount,dbDuration:p}),R.C=!0),ep6(R,!1,r,G,w,I.tag),Ax(f)):ep6(R,!0,r,G,w, I.tag)}; ep6=function(R,w,p,r,f,G="IDB_TRANSACTION_TAG_UNKNOWN"){bq("TRANSACTION_ENDED",{objectStoreNames:r,connectionHasUnknownAbortedTransaction:R.C,duration:f,isSuccessful:w,tryCount:p,tag:G})}; dx=function(R,w,p){R.L.createIndex(w,p,{unique:!1})}; g.Yv=function(R,w,p){R=R.L.openCursor(w.query,w.direction);return ZZ(R).then(r=>PP(r,p))}; Mj6=function(R,w){return g.Yv(R,{query:w},p=>p.delete().then(()=>g.Fo(p))).then(()=>{})}; cZd=function(R,w,p){const r=[];return g.Yv(R,{query:w},f=>{if(!(p!==void 0&&r.length>=p))return r.push(f.getValue()),g.Fo(f)}).then(()=>r)}; aQd=function(R){const w=[];return g.P4P(R,{query:void 0},p=>{w.push(p.cursor.primaryKey);return g.oLl(p)}).then(()=>w)}; $q_=function(R){return"getAllKeys"in IDBObjectStore.prototype?cP(R.L.getAllKeys(void 0,void 0)):aQd(R)}; g.P4P=function(R,w,p){const r=w.query;w=w.direction;R="openKeyCursor"in IDBObjectStore.prototype?R.L.openKeyCursor(r,w):R.L.openCursor(r,w);return Vjd(R).then(f=>PP(f,p))}; Ok_=function(R,w,p){const r=new Promise((f,G)=>{try{const I=w(R);p&&R.commit();I.then(C=>{f(C)}).catch(G)}catch(I){G(I),R.abort()}}); return Promise.all([r,R.done]).then(([f])=>f)}; g.jQ=function(R,w,p){const {query:r=null,direction:f="next"}=w;R=R.L.openCursor(r,f);return ZZ(R).then(G=>PP(G,p))}; X$b=function(R,w,p){const r=[];return g.jQ(R,{query:w},f=>{if(!(p!==void 0&&r.length>=p))return r.push(f.getValue()),g.Fo(f)}).then(()=>r)}; ZZ=function(R){return cP(R).then(w=>w?new nLY(R,w):null)}; g.Fo=function(R){R.cursor.continue(void 0);return ZZ(R.request)}; Zkr=function(R,w,p){return new Promise((r,f)=>{let G;G=w!==void 0?self.indexedDB.open(R,w):self.indexedDB.open(R);const I=p.blocked,C=p.blocking,u=p.iW,m=p.upgrade,z=p.closed;let B;const W=()=>{B||(B=new dqd(G.result,{closed:z}));return B}; G.addEventListener("upgradeneeded",x=>{try{if(x.newVersion===null)throw Error("Invariant: newVersion on IDbVersionChangeEvent is null");if(G.transaction===null)throw Error("Invariant: transaction on IDbOpenDbRequest is null");x.dataLoss&&x.dataLoss!=="none"&&bq("IDB_DATA_CORRUPTED",{reason:x.dataLossMessage||"unknown reason",dbName:VM(R)});const q=W(),O=new tj_(G.transaction);m&&m(q,e=>x.oldVersion=e,O); O.done.catch(e=>{f(e)})}catch(q){f(q)}}); G.addEventListener("success",()=>{const x=G.result;C&&x.addEventListener("versionchange",()=>{C(W())}); x.addEventListener("close",()=>{bq("IDB_UNEXPECTEDLY_CLOSED",{dbName:VM(R),dbVersion:x.version});u&&u()}); r(W())}); G.addEventListener("error",()=>{f(G.error)}); I&&G.addEventListener("blocked",()=>{I()})})}; YXP=function(R,w,p={}){return Zkr(R,w,p)}; Jx=async function(R,w={}){try{const p=self.indexedDB.deleteDatabase(R),r=w.blocked;r&&p.addEventListener("blocked",()=>{r()}); await bkY(p)}catch(p){throw KX(p,R,"",-1);}}; FUD=function(R,w){return new g.od("INCOMPATIBLE_DB_VERSION",{dbName:R.name,oldVersion:R.options.version,newVersion:w})}; g.TD=function(R,w){if(!w)throw g.EP("openWithToken",VM(R.name));return R.open()}; jDb=async function(R,w){return g.$v(await g.TD(iq,w),["databases"],{ZT:!0,mode:"readwrite"},p=>{const r=p.objectStore("databases");return r.get(R.actualName).then(f=>{if(f?R.actualName!==f.actualName||R.publicName!==f.publicName||R.userIdentifier!==f.userIdentifier:1)return r.put(R).then(()=>{})})})}; QM=async function(R,w){return R?(await g.TD(iq,w)).delete("databases",R):void 0}; JZd=async function(R,w){const p=[];w=await g.TD(iq,w);await g.$v(w,["databases"],{ZT:!0,mode:"readonly"},r=>{p.length=0;return g.Yv(r.objectStore("databases"),{},f=>{R(f.getValue())&&p.push(f.getValue());return g.Fo(f)})}); return p}; TEb=function(R,w){return JZd(p=>p.publicName===R&&p.userIdentifier!==void 0,w)}; ik6=async function(){if(xv()?.hasSucceededOnce)return!0;var R;if(!(R=hx&&sn()&&!mH()||g.gx)){try{R=self;var w=!!(R.indexedDB&&R.IDBIndex&&R.IDBKeyRange&&R.IDBObjectStore)}catch(p){w=!1}R=!w}if(R||!("IDBTransaction"in self&&"objectStoreNames"in IDBTransaction.prototype))return!1;try{return await jDb({actualName:"yt-idb-test-do-not-use",publicName:"yt-idb-test-do-not-use",userIdentifier:void 0},HP),await QM("yt-idb-test-do-not-use",HP),!0}catch(p){return!1}}; QDd=function(){if(vP!==void 0)return vP;lq=!0;return vP=ik6().then(R=>{lq=!1;if(WP()?.C()){var w={hasSucceededOnce:xv()?.hasSucceededOnce||R};WP()?.set("LAST_RESULT_ENTRY_KEY",w,2592E3,!0)}return R})}; NA=function(){return g.yD("ytglobal.idbToken_")||void 0}; g.kv=function(){const R=NA();return R?Promise.resolve(R):QDd().then(w=>{w?(g.AY("ytglobal.idbToken_",HP),w=HP):w=void 0;return w})}; hpd=function(R){if(!GD())throw R=new g.od("AUTH_INVALID",{dbName:R}),Ax(R),R;const w=g.fX();return{actualName:`${R}:${w}`,publicName:R,userIdentifier:w}}; gL6=async function(R,w,p,r){var f=Error().stack??"";const G=await g.kv();if(!G)throw w=g.EP("openDbImpl",R,w),g.Y("ytidb_async_stack_killswitch")||(w.stack=`${w.stack}\n${f.substring(f.indexOf("\n")+1)}`),Ax(w),w;yM(R);f=p?{actualName:R,publicName:R,userIdentifier:void 0}:hpd(R);try{return await jDb(f,G),await YXP(f.actualName,w,r)}catch(I){try{await QM(f.actualName,G)}catch{}throw I;}}; Hkl=function(R,w,p={}){return gL6(R,w,!1,p)}; vLd=function(R,w,p={}){return gL6(R,w,!0,p)}; NEd=async function(R,w={}){const p=await g.kv();p&&(yM(R),R=hpd(R),await Jx(R.actualName,w),await QM(R.actualName,p))}; kJx=function(R,w,p){R=R.map(async r=>{await Jx(r.actualName,w);await QM(r.actualName,p)}); return Promise.all(R).then(()=>{})}; UqY=async function(R){var w={};const p=await g.kv();p&&(yM(R),R=await TEb(R,p),await kJx(R,w,p))}; SXI=async function(R,w={}){const p=await g.kv();p&&(yM(R),await Jx(R,w),await QM(R,p))}; wrd=function(R,w){let p;return()=>{p||(p=new RIP(R,w));return p}}; UP=function(R,w){return wrd(R,w)}; SQ=function(R){return g.TD(pr_(),R)}; rKd=async function(R,w,p,r){R={config:R,hashData:w,timestamp:r!==void 0?r:(0,g.T)()};p=await SQ(p);await p.clear("hotConfigStore");return await p.put("hotConfigStore",R)}; fer=async function(R,w,p,r,f){R={config:R,hashData:w,configData:p,timestamp:f!==void 0?f:(0,g.T)()};r=await SQ(r);await r.clear("coldConfigStore");return await r.put("coldConfigStore",R)}; GGH=async function(R){R=await SQ(R);let w=void 0;await g.$v(R,["coldConfigStore"],{mode:"readwrite",ZT:!0},p=>g.jQ(p.objectStore("coldConfigStore").index("coldTimestampIndex"),{direction:"prev"},r=>{w=r.getValue()})); return w}; IeI=async function(R){R=await SQ(R);let w=void 0;await g.$v(R,["hotConfigStore"],{mode:"readwrite",ZT:!0},p=>g.jQ(p.objectStore("hotConfigStore").index("hotTimestampIndex"),{direction:"prev"},r=>{w=r.getValue()})); return w}; CfL=async function(){await UqY("ytGcfConfig")}; u3H=function(){if(!RA.instance){const R=new RA;RA.instance=R}return RA.instance}; wz=function(R,w){R.C=w;g.AY("yt.gcf.config.hotConfigGroup",R.C||null)}; pi=function(R,w){R.L=w;g.AY("yt.gcf.config.coldConfigGroup",R.L||null)}; rz=function(){return g.yD("yt.gcf.config.coldConfigGroup")}; fi=function(){return g.yD("yt.gcf.config.hotConfigGroup")}; zIx=function(R){if(!R.C||!R.L){if(!NA()){const w=g.EP("scheduleGetConfigs");zh(w)}R.G||(R.G=g.YM.SL(async()=>{try{await szd(R)}catch{}try{await myP(R)}catch{}R.G&&(R.G=0)},100))}}; G9=function(R,w){R.coldHashData=w;g.AY("yt.gcf.config.coldHashData",R.coldHashData||null)}; xyl=async function(R){if(g.Y("start_client_gcf")||g.Y("delete_gcf_config_db"))g.Y("start_client_gcf")&&(await g.kv()&&GD()&&!g.Y("delete_gcf_config_db")?(R.K=!0,zIx(R)):(BUd(R),WwL(R))),g.Y("delete_gcf_config_db")&&await CfL()}; WwL=function(R){wz(R,g.n("RAW_HOT_CONFIG_GROUP"));R.UI(g.n("SERIALIZED_HOT_HASH_DATA"))}; szd=async function(R){if(R.C)return fi();if(!R.K)return R=g.EP("getHotConfig IDB not initialized"),zh(R),Promise.reject(R);const w=NA(),p=g.n("TIME_CREATED_MS");if(w){var r=await IeI(w);if(r&&r.timestamp>p)return wz(R,r.config),R.UI(r.hashData),fi()}else r=g.EP("getHotConfig token error"),zh(r);WwL(R);w&&R.C&&R.hotHashData&&await rKd(R.C,R.hotHashData,w,p);return R.C?fi():(R=new g.Id("Config not available in ytConfig"),zh(R),Promise.reject(R))}; led=function(R,w){R.configData=w;g.AY("yt.gcf.config.coldConfigData",R.configData||null)}; BUd=function(R){pi(R,g.n("RAW_COLD_CONFIG_GROUP"));G9(R,g.n("SERIALIZED_COLD_HASH_DATA"));led(R,R.L?.configData)}; IA=function(R,w,p,r,f){var G=w^R;if((R-7|21)=R){for(var I=G^1694,C=[];++I-C[l[2]]-(G^1790);)switch(I){case G^1764:I=G^1726;continue;case G^1669:I=G^1778;break;case G^1695:I=G^1777;continue;case G^1776:I=G^1607;case G^1701:I-=G^1764;default:C[l[G^1744]](String[l[G^1779]](I))}var u=C}if(R-7>=12&&(R^23)<31){var m=p[l[2]];f[l[G^5908]](function(z,B,W){this[l[G^5894]](W[B]=p[(p[l[G^5903]](z)-p[l[G^5903]](this[B])+B+m--)%p[l[2]]])},r[l[G^5892]](l[1]))}R-6>>3==1&&(p=(p%r[l[2]]+r[l[2]])%r[l[2]], I=r[0],r[0]=r[p],r[p]=I,u=[p]); return u}; myP=async function(R){if(R.L)return rz();if(!R.K)return R=g.EP("getColdConfig IDB not initialized"),zh(R),Promise.reject(R);const w=NA(),p=g.n("TIME_CREATED_MS");if(w){var r=await GGH(w);if(r&&r.timestamp>p)return pi(R,r.config),led(R,r.configData),G9(R,r.hashData),rz()}else r=g.EP("getColdConfig"),zh(r);BUd(R);w&&R.L&&R.coldHashData&&R.configData&&await fer(R.L,R.coldHashData,R.configData,w,p);return R.L?rz():(R=new g.Id("Config not available in ytConfig"),zh(R),Promise.reject(R))}; Lw6=async function(R,w,p){if(g.Y("start_client_gcf")){p&&wz(R,p);R.UI(w);const r=NA();r&&(p||(p=(await IeI(r))?.config),await rKd(p,w,r));if(p){R=R.J;for(const f of R.L)f(p)}}}; qjW=async function(R,w,p){g.Y("start_client_gcf")&&(G9(R,w),R=NA())&&(p||(p=(await GGH(R))?.config),p&&await fer(p,w,p.configData,R))}; AKd=function(){var R=u3H(),w=(0,g.T)()-R.O;if(!(R.O!==0&&w0&&(w.request={internalExperimentFlags:p});yKl(R,void 0,w);VcL(void 0,w);oKx(void 0,w);tcY(R,void 0,w);OPb(void 0,w);g.Y("start_client_gcf")&&KwI(void 0,w);g.n("DELEGATED_SESSION_ID")&& !g.Y("pageid_as_header_web")&&(w.user={onBehalfOfUser:g.n("DELEGATED_SESSION_ID")});!g.Y("fill_delegate_context_in_gel_killswitch")&&(R=g.n("INNERTUBE_CONTEXT_SERIALIZED_DELEGATION_CONTEXT"))&&(w.user={...w.user,serializedDelegationContext:R});R=g.n("INNERTUBE_CONTEXT");g.Y("enable_persistent_device_token")&&R?.client?.rolloutToken&&(w.client.rolloutToken=R?.client?.rolloutToken);R=Object;p=R.assign;var r=w.client,f=g.n("DEVICE","");const G={};for(const [I,C]of Object.entries(lF(f))){f=I;const u= C;f==="cbrand"?G.deviceMake=u:f==="cmodel"?G.deviceModel=u:f==="cbr"?G.browserName=u:f==="cbrver"?G.browserVersion=u:f==="cos"?G.osName=u:f==="cosver"?G.osVersion=u:f==="cplatform"&&(G.platform=u)}w.client=p.call(R,r,G);return w}; yKl=function(R,w,p){R=R.Kb;if(R==="WEB"||R==="MWEB"||R===1||R===2)w?(p=i4(w,sO,96)||new sO,R=ve(),R=Object.keys(EKl).indexOf(R),R=R===-1?null:R,R!==null&&mw(p,3,R),kL(w,sO,96,p)):p&&(p.client.mainAppWebInfo=p.client.mainAppWebInfo??{},p.client.mainAppWebInfo.webDisplayMode=ve())}; VcL=function(R,w){const p=g.yD("yt.embedded_player.embed_url");p&&(R?(w=i4(R,mC,7)||new mC,uf(w,4,p),kL(R,mC,7,w)):w&&(w.thirdParty={embedUrl:p}))}; oKx=function(R,w){if(g.Y("web_log_memory_total_kbytes")&&g.qx.navigator?.deviceMemory){const p=g.qx.navigator?.deviceMemory;R?VF(R,95,ap(p*1E6)):w&&(w.client.memoryTotalKbytes=`${p*1E6}`)}}; tcY=function(R,w,p){R.appInstallData&&(w?(p=i4(w,z9,62)??new z9,uf(p,6,R.appInstallData),kL(w,z9,62,p)):p&&(p.client.configInfo=p.client.configInfo||{},p.client.configInfo.appInstallData=R.appInstallData))}; OPb=function(R,w){var p=sDY();p&&(R?mw(R,61,DyY[p]):w&&(w.client.connectionType=p));g.Y("web_log_effective_connection_type")&&(p=zpY())&&(R?mw(R,94,eId[p]):w&&(w.client.effectiveConnectionType=p))}; Mcl=function(R,w,p={}){let r={};g.n("EOM_VISITOR_DATA")?r={"X-Goog-EOM-Visitor-Id":g.n("EOM_VISITOR_DATA")}:r={"X-Goog-Visitor-Id":p.visitorData||g.n("VISITOR_DATA","")};if(w&&w.includes("www.youtube-nocookie.com"))return r;w=p.CC||g.n("AUTHORIZATION");w||(R?w=`Bearer ${g.yD("gapi.auth.getToken")().access_token}`:(R=rZW().lz(BY),g.Y("pageid_as_header_web")||delete R["X-Goog-PageId"],r={...r,...R}));w&&(r.Authorization=w);return r}; KwI=function(R,w){var p=AKd();if(p){var r=p.coldConfigData,f=p.coldHashData;p=p.hotHashData;R?(w=i4(R,z9,62)??new z9,r=uf(w,1,r),uf(r,3,f).UI(p),kL(R,z9,62,w)):w&&(w.client.configInfo=w.client.configInfo||{},r&&(w.client.configInfo.coldConfigData=r),f&&(w.client.configInfo.coldHashData=f),p&&(w.client.configInfo.hotHashData=p))}}; WY=function(R){this.version=1;this.args=R}; x0=function(R,w){this.topic=R;this.L=w}; Li=function(R,w){const p=lj();p&&p.publish.call(p,R.toString(),R,w)}; aeW=function(R){var w=cKP;const p=lj();if(!p)return 0;const r=p.subscribe(w.toString(),(f,G)=>{var I=g.yD("ytPubsub2Pubsub2SkipSubKey");I&&I==r||(I=()=>{if(qT[r])try{if(G&&w instanceof x0&&w!=f)try{{var C=w.L,u=G;if(!u.args||!u.version)throw Error("yt.pubsub2.Data.deserialize(): serializedData is incomplete.");let m;try{if(!C.rM){const z=new C;C.rM=z.version}m=C.rM}catch(z){}if(!m||u.version!=m)throw Error("yt.pubsub2.Data.deserialize(): serializedData version is incompatible.");try{G=Reflect.construct(C, g.zp(u.args))}catch(z){throw z.message="yt.pubsub2.Data.deserialize(): "+z.message,z;}}}catch(m){throw m.message="yt.pubsub2.pubsub2 cross-binary conversion error for "+w.toString()+": "+m.message,m;}R.call(window,G)}catch(m){g.uF(m)}},Pfb[w.toString()]?g.zD()?g.YM.SL(I):g.cI(I,0):I())}); qT[r]=!0;AT[w.toString()]||(AT[w.toString()]=[]);AT[w.toString()].push(r);return r}; nKx=function(){var R=$yd;const w=aeW(function(p){R.apply(void 0,arguments);Xrl(w)}); return w}; Xrl=function(R){const w=lj();w&&(typeof R==="number"&&(R=[R]),g.iH(R,p=>{w.unsubscribeByKey(p);delete qT[p]}))}; lj=function(){return g.yD("ytPubsub2Pubsub2Instance")}; bj=function(R,w,p={sampleRate:.1}){Math.random()ZPD||IZPD||r{}; w.options.onError=async(f,G)=>{const I=iPd(G),C=QzL(G);C&&R.XB&&R.XB("web_enable_error_204")&&R.handleError(Error("Request failed due to compression"),w.url,G);if(R.XB&&R.XB("nwl_consider_error_code")&&I||R.XB&&!R.XB("nwl_consider_error_code")&&R.potentialEsfErrorCounter<=R.Dw)if(R.jt.zY&&await R.jt.zY(),!R.jt.zg()){p(f,G);R.XB&&R.XB("nwl_consider_error_code")&&w?.id!==void 0&&await R.WK.kX(w.id,R.VL,!1);return}R.XB&&R.XB("nwl_consider_error_code")&&!I&&R.potentialEsfErrorCounter>R.Dw||(R.potentialEsfErrorCounter++, w?.id!==void 0&&(w.sendCount{R.jt.zg()&&R.O()},R.BA)):await R.WK.n0(w.id,R.VL)),p(f,G))}; const r=w.options.onSuccess?w.options.onSuccess:()=>{}; w.options.onSuccess=async(f,G)=>{w?.id!==void 0&&await R.WK.n0(w.id,R.VL);R.jt.Qg&&R.XB&&R.XB("vss_network_hint")&&R.jt.Qg(!0);r(f,G)}; return w}; iPd=function(R){return(R=R?.error?.code)&&R>=400&&R<=599?!1:!0}; QzL=function(R){R=R?.error?.code;return!(R!==400&&R!==415)}; gKd=function(){if(tT)return tT();tT=UP("LogsDatabaseV2",{I5:{LogsRequestsStore:{vC:2}},shared:!1,upgrade(R,w,p){w(2)&&Xo(R,"LogsRequestsStore",{keyPath:"id",autoIncrement:!0});w(3);w(5)&&(p=p.objectStore("LogsRequestsStore"),p.L.indexNames.contains("newRequest")&&p.L.deleteIndex("newRequest"),dx(p,"newRequestV2",["status","interface","timestamp"]));w(7)&&nX(R,"sapisid");w(9)&&nX(R,"SWHealthLog")},version:9});return tT()}; OO=function(R){return g.TD(gKd(),R)}; vKr=async function(R,w){const p={startTime:(0,g.T)(),infos:{transactionType:"YT_IDB_TRANSACTION_TYPE_WRITE"},ticks:{}};w=await OO(w);R={...R,options:JSON.parse(JSON.stringify(R.options)),interface:g.n("INNERTUBE_CONTEXT_CLIENT_NAME",0)};R=await w.put("LogsRequestsStore",R);p.ticks.tc=(0,g.T)();HPr(p);return R}; NU_=async function(R,w){const p={startTime:(0,g.T)(),infos:{transactionType:"YT_IDB_TRANSACTION_TYPE_READ"},ticks:{}};w=await OO(w);var r=g.n("INNERTUBE_CONTEXT_CLIENT_NAME",0),f=[R,r,0];r=[R,r,(0,g.T)()];const G=IDBKeyRange.bound(f,r);let I="prev";g.Y("use_fifo_for_networkless")&&(I="next");let C=void 0;f=R==="NEW"?"readwrite":"readonly";g.Y("use_readonly_for_get_most_recent_by_status_killswitch")&&(f="readwrite");await g.$v(w,["LogsRequestsStore"],{mode:f,ZT:!0},u=>g.jQ(u.objectStore("LogsRequestsStore").index("newRequestV2"), {query:G,direction:I},m=>{m.getValue()&&(C=m.getValue(),R==="NEW"&&(C.status="QUEUED",m.update(C)))})); p.ticks.tc=(0,g.T)();HPr(p);return C}; kGW=async function(R,w){return g.$v(await OO(w),["LogsRequestsStore"],{mode:"readwrite",ZT:!0},p=>{const r=p.objectStore("LogsRequestsStore");return r.get(R).then(f=>{if(f)return f.status="QUEUED",r.put(f).then(()=>f)})})}; Uyr=async function(R,w,p=!0,r){return g.$v(await OO(w),["LogsRequestsStore"],{mode:"readwrite",ZT:!0},f=>{const G=f.objectStore("LogsRequestsStore");return G.get(R).then(I=>I?(I.status="NEW",p&&(I.sendCount+=1),r!==void 0&&(I.options.compress=r),G.put(I).then(()=>I)):g.DZ.resolve(void 0))})}; Sj_=async function(R,w){return(await OO(w)).delete("LogsRequestsStore",R)}; RsH=async function(R){R=await OO(R);const w=(0,g.T)()-2592E6;await g.$v(R,["LogsRequestsStore"],{mode:"readwrite",ZT:!0},p=>g.Yv(p.objectStore("LogsRequestsStore"),{},r=>{if(r.getValue().timestamp<=w)return r.delete().then(()=>g.Fo(r))}))}; wRP=async function(){await UqY("LogsDatabaseV2")}; HPr=function(R){g.Y("nwl_csi_killswitch")||bj("networkless_performance",R,{sampleRate:1})}; r0b=function(R){return g.TD(pRd(),R)}; faY=async function(R){R=await r0b(R);const w=(0,g.T)()-2592E6;await g.$v(R,["SWHealthLog"],{mode:"readwrite",ZT:!0},p=>g.Yv(p.objectStore("SWHealthLog"),{},r=>{if(r.getValue().timestamp<=w)return r.delete().then(()=>g.Fo(r))}))}; GbY=async function(R){await (await r0b(R)).clear("SWHealthLog")}; g.Ki=function(R,w,p,r,f="",G=!1,I=!1){if(R)if(p&&!g.IN())zh(new g.Id("Legacy referrer-scrubbed ping detected")),R&&Iab(R,void 0,{scrubReferrer:!0});else if(f)YE(R,w,"POST",f,r);else if(g.n("USE_NET_AJAX_FOR_PING_TRANSPORT",!1)||r||I)YE(R,w,"GET","",r,void 0,G,I);else{b:{try{c:{var C=new CTI({url:R});if(C.L.dsh==="1")var u=null;else{var m=C.L.ae;if(m==="1"){const B=C.L.adurl;if(B)try{u={version:3,Q$:decodeURIComponent(B),Wx:Lu(C.C,"act=1","ri=1",lfb(C))};break c}catch(W){}}u=m==="2"?{version:4,Q$:Lu(C.C, "dct=1","suid="+C.O,"ri=1"),Wx:Lu(C.C,"act=1","ri=1","suid="+C.O)}:null}}if(u){const B=ma(R);var z=!(!B||!B.endsWith("/aclk")||t4(R,"ri")!=="1");break b}}catch(B){}z=!1}z?uKY(R)?(w&&w(),p=!0):p=!1:p=!1;p||Iab(R,w)}}; sjd=function(R,w=""){uKY(R,w)||g.Ki(R,void 0,void 0,void 0,w)}; uKY=function(R,w=""){try{if(window.navigator&&window.navigator.sendBeacon&&window.navigator.sendBeacon(R,w))return!0}catch(p){}return!1}; Iab=function(R,w,p={}){const r=new Image,f=""+mWD++;EO[f]=r;r.onload=r.onerror=()=>{w&&EO[f]&&w();delete EO[f]}; p.scrubReferrer&&(r.referrerPolicy="no-referrer");r.src=R}; zsL=function(R){return document.featurePolicy?.allowedFeatures().includes("attribution-reporting")?R+"&nis=6":R+"&nis=5"}; MT=function(){DW||(DW=new eh("yt.offline"));return DW}; BM6=function(R){if(g.Y("offline_error_handling")){var w=MT().get("errors",!0)||{};w[R.message]={name:R.name,stack:R.stack};R.level&&(w[R.message].level=R.level);MT().set("errors",w,2592E3,!0)}}; Wcd=function(){if(!cY.instance){const R=g.yD("yt.networkRequestMonitor.instance")||new cY;g.AY("yt.networkRequestMonitor.instance",R);cY.instance=R}return cY.instance}; xWx=function(){if(!PY.instance){const R=g.yD("yt.networkStatusManager.instance")||new PY;g.AY("yt.networkStatusManager.instance",R);PY.instance=R}return PY.instance}; lad=function(R,w){R.rateLimit?R.L?(g.YM.zm(R.G),R.G=g.YM.SL(()=>{R.O!==w&&(R.dispatchEvent(w),R.O=w,R.L=(0,g.T)())},R.rateLimit-((0,g.T)()-R.L))):(R.dispatchEvent(w),R.O=w,R.L=(0,g.T)()):R.dispatchEvent(w)}; aA=function(){let R=g.yD("yt.networklessRequestController.instance");R||(R=new Lcd,g.AY("yt.networklessRequestController.instance",R),g.Y("networkless_logging")&&g.kv().then(w=>{R.VL=w;TU_(R);R.K.resolve();R.dG&&Math.random()<=R.Ju&&R.VL&&faY(R.VL);g.Y("networkless_immediately_drop_sw_health_store")&&qbl(R)})); return R}; qbl=async function(R){if(!R.VL)throw g.EP("clearSWHealthLogsDb");GbY(R.VL).catch(w=>{R.handleError(w)})}; A0D=function(R,w,p){w=g.Y("web_fp_via_jspb")?Object.assign({},w):w;g.Y("use_request_time_ms_header")?w.headers&&o2(R)&&(w.headers["X-Goog-Request-Time"]=JSON.stringify(Math.round((0,g.T)()))):w.postParams?.requestTimeMs&&(w.postParams.requestTimeMs=Math.round((0,g.T)()));p&&Object.keys(w).length===0?g.Ki(R):w.compress?w.postBody?(typeof w.postBody!=="string"&&(w.postBody=JSON.stringify(w.postBody)),yI(R,w.postBody,w,g.Ff)):yI(R,JSON.stringify(w.postParams),w,jd):g.Ff(R,w)}; $0=function(R,w){g.Y("use_event_time_ms_header")&&o2(R)&&(w.headers||(w.headers={}),w.headers["X-Goog-Event-Time"]=JSON.stringify(Math.round((0,g.T)())));return w}; g.XG=function(R,w,p,r){!g.n("VISITOR_DATA")&&w!=="visitor_id"&&Math.random()<.01&&zh(new g.Id("Missing VISITOR_DATA when sending innertube request.",w,p,r));if(!R.isReady())throw R=new g.Id("innertube xhrclient not ready",w,p,r),g.uF(R),R;const f={headers:r.headers||{},method:"POST",postParams:p,postBody:r.postBody,postBodyFormat:r.postBodyFormat||"JSON",onTimeout:()=>{r.onTimeout()}, onFetchTimeout:r.onTimeout,onSuccess:(m,z)=>{if(r.onSuccess)r.onSuccess(z)}, onFetchSuccess:m=>{if(r.onSuccess)r.onSuccess(m)}, onProgress:m=>{if(r.onProgress)r.onProgress(m)}, onError:(m,z)=>{if(r.onError)r.onError(z)}, onFetchError:m=>{if(r.onError)r.onError(m)}, timeout:r.timeout,withCredentials:!0,compress:r.compress};f.headers["Content-Type"]||(f.headers["Content-Type"]="application/json");p="";var G=R.config_.On;G&&(p=G);G=R.config_.fn||!1;const I=Mcl(G,p,r);Object.assign(f.headers,I);f.headers.Authorization&&!p&&G&&(f.headers["x-origin"]=window.location.origin);const C=yj(`${p}${`/youtubei/${R.config_.innertubeApiVersion}/${w}`}`,{alt:"json"}),u=(m=!1)=>{try{if(m&&r.retry&&!r.networklessOptions.bypassNetworkless)f.method="POST",r.networklessOptions.writeThenSend? aA().writeThenSend(C,f):aA().sendAndWrite(C,f);else if(r.compress)if(f.postBody){let z=f.postBody;typeof z!=="string"&&(z=JSON.stringify(f.postBody));yI(C,z,f,g.Ff)}else yI(C,JSON.stringify(f.postParams),f,jd);else jd(C,f)}catch(z){if(z.name==="InvalidAccessError")zh(Error("An extension is blocking network request."));else throw z;}}; g.yD("ytNetworklessLoggingInitializationOptions")&&boW.isNwlInitialized?QDd().then(m=>{u(m)}):u(!1)}; g.FG=function(R,w,p){const r=g.ni();if(r&&w){const f=r.subscribe(R,function(){const G=arguments,I=()=>{dz[f]&&w.apply&&typeof w.apply=="function"&&w.apply(p||window,G)}; try{g.ZW[R]?I():g.cI(I,0)}catch(C){g.uF(C)}},p); dz[f]=!0;Y0[R]||(Y0[R]=[]);Y0[R].push(f);return f}return 0}; y0W=function(R){const w=g.FG("LOGGED_IN",function(p){R.apply(void 0,arguments);g.jh(w)})}; g.jh=function(R){const w=g.ni();w&&(typeof R==="number"?R=[R]:typeof R==="string"&&(R=[parseInt(R,10)]),g.iH(R,p=>{w.unsubscribeByKey(p);delete dz[p]}))}; g.JT=function(R,w){const p=g.ni();return p?p.publish.apply(p,arguments):!1}; oAd=function(R){const w=g.ni();if(w)if(w.clear(R),R)Vgx(R);else for(let p in Y0)Vgx(p)}; g.ni=function(){return g.qx.ytPubsubPubsubInstance}; Vgx=function(R){Y0[R]&&(R=Y0[R],g.iH(R,w=>{dz[w]&&delete dz[w]}),R.length=0)}; g.T9=function(R,w,p=null){tgW(R,w,p)}; tgW=function(R,w,p=null){const r=Ool(typeof R==="string"?R:R.toString());let f=document.getElementById(r);var G=f&&iWd(f);const I=f&&!G;G?w&&w():(w&&(G=g.FG(r,w),w=`${g.DL(w)}`,KcW[w]=G),I||(f=EAl(R,r,()=>{iWd(f)||(TlY(f),g.JT(r),g.cI(()=>{oAd(r)},0))},p)))}; EAl=function(R,w,p,r=null){const f=g.sW("SCRIPT");f.id=w;f.onload=()=>{p&&setTimeout(p,0)}; f.onreadystatechange=()=>{switch(f.readyState){case "loaded":case "complete":f.onload()}}; r&&f.setAttribute("nonce",r);g.Sa(f,typeof R==="string"?g.wD(R):R);R=document.getElementsByTagName("head")[0]||document.body;R.insertBefore(f,R.firstChild);return f}; Ool=function(R){const w=document.createElement("a");g.J$(w,R);R=w.href.replace(/^[a-zA-Z]+:\/\//,"//");return`js-${x2(R)}`}; ij=function(R,w){if(R===w)R=!0;else if(Array.isArray(R)&&Array.isArray(w))R=g.Oi(R,w,ij);else if(g.Kd(R)&&g.Kd(w))a:if(g.nR(R).length!=g.nR(w).length)R=!1;else{for(let p in R)if(!ij(R[p],w[p])){R=!1;break a}R=!0}else R=!1;return R}; gz=function(R,...w){if(!QI(R)||w.some(p=>!QI(p)))throw Error("Only objects may be merged."); for(const p of w)hT(R,p)}; hT=function(R,w){for(const p in w)if(QI(w[p])){if(p in R&&!QI(R[p]))throw Error("Cannot merge an object into a non-object.");p in R||(R[p]={});hT(R[p],w[p])}else if(HY(w[p])){if(p in R&&!HY(R[p]))throw Error("Cannot merge an array into a non-array.");p in R||(R[p]=[]);DWr(R[p],w[p])}else R[p]=w[p];return R}; DWr=function(R,w){for(const p of w)QI(p)?R.push(hT({},p)):HY(p)?R.push(DWr([],p)):R.push(p);return R}; QI=function(R){return typeof R==="object"&&!Array.isArray(R)}; HY=function(R){return typeof R==="object"&&Array.isArray(R)}; esD=function(R,w){if(!w)return!1;for(let p=0;p0&&(w.fexp=R.experimentIds.toString());R.D!==null&&(w.rtn=R.C(R.D));R.oo&&(w.feature=R.oo);R.rS&&(w.ctrl=R.rS);R.Vf&&(w.ytr=R.Vf);R.N0&&(w.afmt=R.N0);R.offlineDownloadUserChoice&&(w.ODUC=R.offlineDownloadUserChoice);R.pB&&(w.lio= R.C(R.pB));R.K?(w.idpj=R.MH,w.ldpj=R.a9,R.delayThresholdMet&&(w.dtm="1"),R.X!=null&&(w.rti=R.C(R.X)),R.qz&&(w.ald=R.qz),R.compositeLiveIngestionOffsetToken&&(w.clio=R.compositeLiveIngestionOffsetToken)):R.adType!==void 0&&(w.at=R.adType);R.cB&&(R.O||R.K)&&(w.size=R.cB);R.O&&R.J.length&&(w.pbstyle=R.J.join(","));R.yh!=null&&(R.O||R.K)&&(w.inview=R.C(R.yh));R.heartbeatLoggingToken&&(w.hb_data=R.heartbeatLoggingToken);R.K&&(w.volume=UO(R,g.gd(R.segments,p=>p.volume)),w.st=UO(R,g.gd(R.segments,p=>p.startTime)), w.et=UO(R,g.gd(R.segments,p=>p.endTime)),Nx(R.segments,p=>p.playbackRate!==1)&&(w.rate=UO(R,g.gd(R.segments,p=>p.playbackRate))),Nx(R.segments,p=>p.L!=="-")&&(w.als=g.gd(R.segments,p=>p.L).join(",")),Nx(R.segments,p=>p.previouslyEnded)&&(w.pe=g.gd(R.segments,p=>`${+p.previouslyEnded}`).join(","))); w.muted=UO(R,g.gd(R.segments,p=>p.muted?1:0)); Nx(R.segments,p=>p.visibilityState!==0)&&(w.vis=UO(R,g.gd(R.segments,p=>p.visibilityState))); Nx(R.segments,p=>p.connectionType!==0)&&(w.conn=UO(R,g.gd(R.segments,p=>p.connectionType))); Nx(R.segments,p=>p.C!==0)&&(w.blo=UO(R,g.gd(R.segments,p=>p.C))); Nx(R.segments,p=>!!p.K)&&(w.blo=g.gd(R.segments,p=>p.K).join(",")); Nx(R.segments,p=>!!p.compositeLiveStatusToken)&&(w.cbs=g.gd(R.segments,p=>p.compositeLiveStatusToken).join(",")); Nx(R.segments,p=>p.O!=="-")&&(w.cc=g.gd(R.segments,p=>p.O).join(",")); Nx(R.segments,p=>p.clipId!=="-")&&(w.clipid=g.gd(R.segments,p=>p.clipId).join(",")); if(Nx(R.segments,p=>!!p.audioId)){let p="au"; R.O&&(p="au_d");w[p]=g.gd(R.segments,r=>r.audioId).join(",")}tk()&&R.S&&(w.ctt=R.S,w.cttype=R.eI,w.mdx_environment=R.mdxEnvironment); R.wB&&(w.etype=R.xY!==void 0?R.xY:0);R.Qk&&(w.uoo=R.Qk);R.livingRoomAppMode&&R.livingRoomAppMode!=="LIVING_ROOM_APP_MODE_UNSPECIFIED"&&(w.clram=c0r[R.livingRoomAppMode]||R.livingRoomAppMode);R.G?PTH(R,w):(w.docid=R.videoId,w.referrer=R.referrer,w.ei=R.eventId,w.of=R.OA,w.osid=R.osid,w.vm=R.videoMetadata,R.adQueryId&&(w.aqi=R.adQueryId),R.autonav&&(w.autonav="1"),R.playlistId&&(w.list=R.playlistId),R.OO&&(w.ssrt="1"),R.V6&&(w.upt=R.V6));R.O&&(R.embedsRct&&(w.rct=R.embedsRct),R.embedsRctn&&(w.rctn= R.embedsRctn),R.compositeLiveIngestionOffsetToken&&(w.clio=R.compositeLiveIngestionOffsetToken));R.PS&&(w.host_cpn=R.PS);return w}; g.aaH=function(){return g.gd(NT(16),R=>(R&15).toString(16)).join("")}; XRd=function(){({eiB:w=!1,gNN:R=!0}={});var R,w;if(g.yD("_lact",window)==null){var p=parseInt(g.n("LACT"),10);p=isFinite(p)?Date.now()-Math.max(p,0):-1;g.AY("_lact",p,window);g.AY("_fact",p,window);p==-1&&RO();$WL(w,R);new Jj(()=>{w1("mouse",100)})}}; $WL=function(R=!1,w=!0){var p=window;g.ZU(p.document,"keydown",RO);g.ZU(p.document,"keyup",RO);g.ZU(p.document,"mousedown",RO);g.ZU(p.document,"mouseup",RO);R?g.ZU(p,"touchmove",()=>{w1("touchmove",200)},{passive:!0}):(g.ZU(p,"resize",()=>{w1("resize",200)}),w&&g.ZU(p,"scroll",()=>{w1("scroll",200)})); g.ZU(p.document,"touchstart",RO,{passive:!0});g.ZU(p.document,"touchend",RO,{passive:!0})}; w1=function(R,w){pv[R]||(pv[R]=!0,g.YM.SL(()=>{RO();pv[R]=!1},w))}; RO=function(){g.yD("_lact",window)==null&&(XRd(),g.yD("_lact",window));var R=Date.now();g.AY("_lact",R,window);g.yD("_fact",window)==-1&&g.AY("_fact",R,window);(R=g.yD("ytglobal.ytUtilActivityCallback_"))&&R()}; r1=function(){const R=g.yD("_lact",window);return R==null?-1:Math.max(Date.now()-R,0)}; G4=function(R){return new fv(R)}; IO=function(R,w){R.C.set(w.VC,w);const p=R.O.get(w.VC);if(p)try{p.Ma(R.resolve(w.VC))}catch(r){p.n5(r)}}; ue=function(R,w,p,r=!1){if(p.indexOf(w)>-1)throw Error(`Deps cycle for: ${w}`);if(R.L.has(w))return R.L.get(w);if(!R.C.has(w)){if(r)return;throw Error(`No provider for: ${w}`);}r=R.C.get(w);p.push(w);if(r.uE!==void 0)var f=r.uE;else if(r.Sj)f=r[Cv]?nAH(R,r[Cv],p):[],f=r.Sj(...f);else if(r.RT){f=r.RT;const G=f[Cv]?nAH(R,f[Cv],p):[];f=new f(...G)}else throw Error(`Could not resolve providers for: ${w}`);p.pop();r.ouY||R.L.set(w,f);return f}; nAH=function(R,w,p){return w?w.map(r=>r instanceof fv?ue(R,r.key,p,!0):ue(R,r,p)):[]}; mE=function(){sY||(sY=new dWP);return sY}; Ybb=function(){var R=ZoW;return()=>{const w=mE();w.resolve(G4(R))||IO(w,{VC:R,RT:R,[Cv]:void 0});return w.resolve(R)}}; BN=function(){return"h5vcc"in z4&&z4.h5vcc.traceEvent?.traceBegin&&z4.h5vcc.traceEvent?.traceEnd?1:"performance"in z4&&z4.performance.mark&&z4.performance.measure?2:0}; WN=function(R){const w=BN();switch(w){case 1:z4.h5vcc.traceEvent.traceBegin("YTLR",R);break;case 2:z4.performance.mark(`${R}-start`);break;case 0:break;default:T1(w,"unknown trace type")}}; Fcr=function(R){var w=BN();switch(w){case 1:z4.h5vcc.traceEvent.traceEnd("YTLR",R);break;case 2:w=`${R}-start`;const p=`${R}-end`;z4.performance.mark(p);z4.performance.measure(R,w,p);break;case 0:break;default:T1(w,"unknown trace type")}}; jjH=function(R){var w=Array.from(R.L.keys()).sort((p,r)=>(R.L[r].priority??0)-(R.L[p].priority??0)); for(const p of w)w=R.L[p],w.jobId===void 0||w.US||(R.scheduler.zm(w.jobId),CX(w.U$,10))}; TMl=function(R,w,p){J0l&&console.groupCollapsed&&console.groupEnd&&(console.groupCollapsed(`[${R.constructor.name}] '${R.state}' to '${w}'`),console.log("with message: ",p),console.groupEnd())}; gAx=function(R,w){const p=w.filter(f=>(R.C??f.priority??0)===10),r=w.filter(f=>(R.C??f.priority??0)!==10); return R.G.c3B?async(...f)=>{await ioP(p,...f);Qj6(R,r,...f)}:(...f)=>{hsI(p,...f); Qj6(R,r,...f)}}; ioP=async function(R,...w){g.mL();for(const p of R){let r;BEr(()=>{x8(p.name);const f=le(()=>p.callback(...w)); Lv(f)?r=g.Y("web_lifecycle_error_handling_killswitch")?f.then(()=>{qQ(p.name)}):f.then(()=>{qQ(p.name)},G=>{window.onerror?.(G.message,"",0,0,G); qQ(p.name)}):qQ(p.name)}); r&&await r}}; Qj6=function(R,w,...p){w=w.map(r=>({U$:()=>{x8(r.name);le(()=>r.callback(...p)); qQ(r.name)}, priority:R.C??r.priority??0})); w.length&&(R.O=new Hod(w))}; hsI=function(R,...w){g.mL();for(const p of R)BEr(()=>{x8(p.name);le(()=>p.callback(...w)); qQ(p.name)})}; x8=function(R){A9&&R&&WN(R)}; qQ=function(R){A9&&R&&Fcr(R)}; le=function(R){if(g.Y("web_lifecycle_error_handling_killswitch"))return R();try{return R()}catch(w){window.onerror?.(w.message,"",0,0,w)}}; NM_=function(){be||(be=new vAD);return be}; kbd=function(){yE||(yE=UV(g.n("WORKER_SERIALIZATION_URL")));return yE||void 0}; UWW=function(){const R=kbd();VE||R===void 0||(VE=sp(R));return VE}; OY=function(R,w){const p=oO(w);if(R.C[p])return R.C[p];const r=Object.keys(R.store)||[];if(r.length<=1&&oO(w)===r[0])return r;const f=[];for(let I=0;I{p=p.data;if(p.op==="serializedGelBatch"){var r=D5.get(p.key);r&&(ReW(p.serializedBatch,r.client,r.resolve,r.networklessOptions,r.isIsolated,r.useVSSEndpoint,r.dangerousLogToVisitorSession,r.requestsOutstanding),D5.delete(p.key))}},w=UWW(); w&&(w.addEventListener("message",R),w.onerror=()=>{D5.clear()}); SbL=!0}}; CuI=function(R,w){if(R.endpoint==="log_event"){eV(R);var p=MQ(R),r=pOx(R.payload)||"",f=r4b(r),G=200;if(f){if(f.enabled===!1&&!g.Y("web_payload_policy_disabled_killswitch"))return;G=fXb(f.tier);if(G===400){GHd(R,w);return}}cN[p]=!0;p={cttAuthInfo:p,isJspb:!1,tier:G};EY().storePayload(p,R.payload);IXL(w,!1,p,PN(r))}}; stH=function(R,w,p){if(w.endpoint==="log_event"){eV(void 0,w);var r=MQ(w,!0),f=r4b(R),G=200;if(f){if(f.enabled===!1&&!g.Y("web_payload_policy_disabled_killswitch"))return;G=fXb(f.tier);if(G===400){u_d(R,w,p);return}}cN[r]=!0;r={cttAuthInfo:r,isJspb:!0,tier:G};EY().storePayload(r,GJ(w.payload));IXL(p,!0,r,PN(R))}}; IXL=function(R,w=!1,p,r=!1){R&&(aO=new R);R=ne("tvhtml5_logging_max_batch_ads_fork")||ne("tvhtml5_logging_max_batch")||ne("web_logging_max_batch")||100;const f=(0,g.T)(),G=$8(w,p.tier),I=G.G;r&&(G.O=!0);r=0;p&&(r=EY().getSequenceCount(p));r>=1E3?XD("CODE_SECTION_FLUSH_LOGS_ON_HARD_MAX_QUEUE_SIZE",{writeThenSend:!0},w,p.tier):r>=R?nv||(nv=d1(()=>{XD("CODE_SECTION_FLUSH_LOGS_ON_MAX_QUEUE_SIZE",{writeThenSend:!0},w,p.tier);nv=void 0},0)):f-I>=10&&(mDW(w,p.tier),G.G=f)}; GHd=function(R,w){if(R.endpoint==="log_event"){g.Y("more_accurate_gel_parser")&&EY().storePayload({isJspb:!1},R.payload);eV(R);var p=MQ(R),r=new Map;r.set(p,[R.payload]);var f=pOx(R.payload)||"";w&&(aO=new w);return new g.n9((G,I)=>{aO&&aO.isReady()?zeH(r,aO,G,I,{bypassNetworkless:!0},!0,PN(f)):G()})}}; u_d=function(R,w,p){if(w.endpoint==="log_event"){eV(void 0,w);var r=MQ(w,!0),f=new Map;f.set(r,[GJ(w.payload)]);p&&(aO=new p);return new g.n9(G=>{aO&&aO.isReady()?BA_(f,aO,G,{bypassNetworkless:!0},!0,PN(R)):G()})}}; MQ=function(R,w=!1){var p="";if(R.dangerousLogToVisitorSession)p="visitorOnlyApprovedKey";else if(R.cttAuthInfo){if(w){w=R.cttAuthInfo.token;p=R.cttAuthInfo;const r=new WaI;p.videoId?r.setVideoId(p.videoId):p.playlistId&&ZQ(r,2,Z5,JU(p.playlistId));Y8[w]=r}else w=R.cttAuthInfo,p={},w.videoId?p.videoId=w.videoId:w.playlistId&&(p.playlistId=w.playlistId),FD[R.cttAuthInfo.token]=p;p=R.cttAuthInfo.token}return p}; XD=function(R,w={},p=!1,r){if(g.Y("enable_flush_logs_call_source_trace")){let f=R;R===void 0&&(f=jV?"CODE_SECTION_FLUSH_LOGS_ON_THE_FIRST_TIME_AFTER_STARTUP":"CODE_SECTION_UNSPECIFIED");cN[""]=!0;EY().storePayload({cttAuthInfo:"",isJspb:!1,tier:200},{eventTimeMs:Math.round((0,g.T)()),context:{lastActivityMs:String(r1())},tvhtml5StabilityTraceEvent:{codeSection:f}})}new g.n9((f,G)=>{const I=$8(p,r),C=I.O;I.O=!1;J9(I.C);J9(I.L);I.L=0;aO&&aO.isReady()?r===void 0&&g.Y("enable_web_tiered_gel")?xD6(f,G, w,p,300,C):xD6(f,G,w,p,r,C):(mDW(p,r),f())})}; xD6=function(R,w,p={},r=!1,f=200,G=!1){var I=aO,C=new Map;const u=new Map,m={isJspb:r,cttAuthInfo:void 0,tier:f},z={isJspb:r,cttAuthInfo:void 0};if(r){for(const B of Object.keys(cN))w=g.Y("enable_web_tiered_gel")?EY().smartExtractMatchingEntries({keys:[m,z],sizeLimit:1E3}):EY().extractMatchingEntries({isJspb:!0,cttAuthInfo:B}),w.length>0&&C.set(B,w),(g.Y("web_fp_via_jspb_and_json")&&p.writeThenSend||!g.Y("web_fp_via_jspb_and_json"))&&delete cN[B];BA_(C,I,R,p,!1,G)}else{for(const B of Object.keys(cN))C= g.Y("enable_web_tiered_gel")?EY().smartExtractMatchingEntries({keys:[{isJspb:!1,cttAuthInfo:B,tier:f},{isJspb:!1,cttAuthInfo:B}],sizeLimit:1E3}):EY().extractMatchingEntries({isJspb:!1,cttAuthInfo:B}),C.length>0&&u.set(B,C),(g.Y("web_fp_via_jspb_and_json")&&p.writeThenSend||!g.Y("web_fp_via_jspb_and_json"))&&delete cN[B];zeH(u,I,R,w,p,!1,G)}}; mDW=function(R=!1,w=200){const p=()=>{XD("CODE_SECTION_FLUSH_LOGS_ON_DEBOUNCE_LOGS_QUEUE",{writeThenSend:!0},R,w)},r=$8(R,w); var f=r===lXd||r===LaH?5E3:qHL;g.Y("web_gel_timeout_cap")&&!r.L&&(f=d1(()=>{p()},f),r.L=f); J9(r.C);f=g.n("LOGGING_BATCH_TIMEOUT",ne("web_gel_debounce_ms",1E4));g.Y("shorten_initial_gel_batch_timeout")&&jV&&(f=A4H);f=d1(()=>{ne("gel_min_batch_size")>0?EY().getSequenceCount({cttAuthInfo:void 0,isJspb:R,tier:w})>=bpP&&p():p()},f); r.C=f}; zeH=function(R,w,p,r,f={},G,I){const C=Math.round((0,g.T)());let u=R.size;const m=y4b(I);for(const [z,B]of R){R=z;I=B;const W=g.Hk({context:g.uj(w.config_||g.Ci())});if(!g.OI(I)&&!g.Y("throw_err_when_logevent_malformed_killswitch")){r();break}W.events=I;(I=FD[R])&&VID(W,R,I);delete FD[R];const x=R==="visitorOnlyApprovedKey";oPD(W,C,x);tId(f);const q=P=>{g.Y("start_client_gcf")&&g.YM.SL(async()=>{await Opx(P)}); u--;u||p()}; let O=0;const e=()=>{O++;if(f.bypassNetworkless&&O===1)try{g.XG(w,m,W,T4({writeThenSend:!0},x,q,e,G)),jV=!1}catch(P){g.uF(P),r()}u--;u||p()}; try{g.XG(w,m,W,T4(f,x,q,e,G)),jV=!1}catch(P){g.uF(P),r()}}}; BA_=function(R,w,p,r={},f,G){const I=Math.round((0,g.T)()),C={value:R.size};var u=new Map([...R]);for(const [e]of u){var m=e,z=R.get(m);u=new g.ie;var B=w.config_||g.Ci(),W=new QE,x=new Kab;uf(x,1,B.jc);uf(x,2,B.rO);mw(x,16,B.TX);uf(x,17,B.innertubeContextClientVersion);if(B.Hq){var q=B.Hq,O=new z9;q.coldConfigData&&uf(O,1,q.coldConfigData);q.appInstallData&&uf(O,6,q.appInstallData);q.coldHashData&&uf(O,3,q.coldHashData);q.hotHashData&&O.UI(q.hotHashData);kL(x,z9,62,O)}(q=g.qx.devicePixelRatio)&& q!=1&&VF(x,65,AU(q));q=dD();q!==""&&uf(x,54,q);q=ZJ();if(q.length>0){O=new EPl;for(let P=0;P{g.Y("start_client_gcf")&&g.YM.SL(async()=>{await Opx(u)}); C.value--;C.value||p()},()=>{C.value--; C.value||p()},f); r.headers["Content-Type"]="application/json+protobuf";r.postBodyFormat="JSPB";r.postBody=R;g.XG(w,G,"",r);jV=!1}; tId=function(R){g.Y("always_send_and_write")&&(R.writeThenSend=!1)}; T4=function(R,w,p,r,f){R={retry:!0,onSuccess:p,onError:r,networklessOptions:R,dangerousLogToVisitorSession:w,wyB:!!f,headers:{},postBodyFormat:"",postBody:"",compress:g.Y("compress_gel")||g.Y("compress_gel_lr")};g1()&&(R.headers["X-Goog-Request-Time"]=JSON.stringify(Math.round((0,g.T)())));return R}; oPD=function(R,w,p){g1()||(R.requestTimeMs=String(w));g.Y("unsplit_gel_payloads_in_logs")&&(R.unsplitGelPayloadsInLogs=!0);!p&&(w=g.n("EVENT_ID"))&&(p=c4_(),R.serializedClientEventId={serializedEventId:w,clientCounter:String(p)})}; c4_=function(){let R=g.n("BATCH_CLIENT_COUNTER")||0;R||(R=Math.floor(Math.random()*65535/2));R++;R>65535&&(R=1);Gh("BATCH_CLIENT_COUNTER",R);return R}; VID=function(R,w,p){let r;if(p.videoId)r="VIDEO";else if(p.playlistId)r="PLAYLIST";else return;R.credentialTransferTokenTargetId=p;R.context=R.context||{};R.context.user=R.context.user||{};R.context.user.credentialTransferTokens=[{token:w,scope:r}]}; var aXl=function(){return zU[l[5]](this,55,3598)}; eV=function(R,w){var p=g.yD("yt.logging.transport.enableScrapingForTest"),r=Xf("il_payload_scraping");r=(r!==void 0?String(r):"")==="enable_il_payload_scraping";if(!p)if(r)NQ=[],g.AY("yt.logging.transport.enableScrapingForTest",!0),g.AY("yt.logging.transport.scrapedPayloadsForTesting",NQ),g.AY("yt.logging.transport.payloadToScrape","visualElementShown visualElementHidden visualElementAttached screenCreated visualElementGestured visualElementStateChanged".split(" ")),g.AY("yt.logging.transport.getScrapedPayloadFromClientEventsFunction"), g.AY("yt.logging.transport.scrapeClientEvent",!0);else return;p=g.yD("yt.logging.transport.scrapedPayloadsForTesting");r=g.yD("yt.logging.transport.payloadToScrape");w&&(w=w.payload,(w=g.yD("yt.logging.transport.getScrapedPayloadFromClientEventsFunction").bind(w)())&&p.push(w));w=g.yD("yt.logging.transport.scrapeClientEvent");if(r&&r.length>=1)for(let f=0;f{NM_().currentState==="none"?R():NM_().install({none:{callback:R}})},w):CX(R,0,w)}; J9=function(R){g.Y("transport_use_scheduler")?g.YM.zm(R):g.a2(R)}; Opx=async function(R){R=R?.responseContext?.globalConfigGroup;var w=g.F(R,$DL),p=R?.hotHashData;const r=g.F(R,XOr),f=R?.coldHashData,G=mE().resolve(G4(RA));G&&(p&&(w?await Lw6(G,p,w):await Lw6(G,p)),f&&(r?await qjW(G,f,r):await qjW(G,f)));w=R?.rawFinchStaticConfigGroup;(R=R?.finchStaticHashData)?(p=mE().resolve(G4(nP_)))?await p.SZ0({config:w||{},O$0:R||""}):(w||R)&&zh(new g.Id("FinchConfigManagerService is not present, but Finch config data is present.")):w&&zh(new g.Id("Finch config data is present, but hash is missing."))}; $8=function(R,w=200){return R?w===300?lXd:dDr:w===300?LaH:Zpd}; r4b=function(R){if(g.Y("enable_web_tiered_gel")){R=YHx[R||""];var w=mE().resolve(G4(RA))?.ox()?.loggingHotConfig?.eventLoggingConfig?.payloadPolicies;if(w)for(let p=0;p=2?C[1]:"";const u=HpY.test(w);var m=vPD.exec(w);m=m!=null&&m.length>=2?m[1]:"";var z=NAb.exec(w);z=z!=null&&z.length>=2&&!Number.isNaN(Number(z[1]))?Number(z[1]):1;var B=kHd.exec(w);B=B!=null&&B.length>=2?B[1]:"0";const W=Iv(R.player.V().ZI);var x=R.player.getVideoData({playerType:1});const q=g.CF(x.S,!0),O="BISCOTTI_ID"in p?p.BISCOTTI_ID: "";UDb(R,q,w,O.toString(),R.player.V(),x);x={splay:!1,lactMilliseconds:p.LACT.toString(),playerHeightPixels:Math.trunc(p.P_H),playerWidthPixels:Math.trunc(p.P_W),vis:Math.trunc(p.VIS),signatureTimestamp:20529,autonavState:SHx(R.player.V())};R.player.Y("embeds_enable_encrypted_host_flags_enforcement")&&(x.encryptedHostFlags=R.player.V().getWebPlayerContextConfig()?.encryptedHostFlags);r&&(r={},RSl(r,p.YT_REMOTE)&&(x.mdxContext=r));if(r=wgP.includes(W)?void 0:g.kE("PREF")){var e=r.split(RegExp("[:&]")); for(let c=0,X=e.length;c1&&P[1].toUpperCase()==="TRUE"){q.user.lockedSafetyMode=!0;break}}a:{if("FLAG_AUTO_CAPTIONS_DEFAULT_ON"in pgl){r=r.split(RegExp("[:&]"));P=pgl.FLAG_AUTO_CAPTIONS_DEFAULT_ON;e="f"+(1+Math.floor(P/31)).toString();P=1<=2?w[1]:"")&&m&&(q.user.credentialTransferTokens=[{token:w,scope:"VIDEO"}]);w={contentPlaybackContext:x};C={adBlock:Math.trunc(p.AD_BLOCK),params:C,breakIndex:z,breakPositionMs:B,clientPlaybackNonce:p.CPN,topLevelDomain:W,isProxyAdTagRequest:u,context:q,adSignalsInfoString:xE(DJ(O.toString())),overridePlaybackContext:w};f!==void 0&&(C.cueProcessedMs=Math.round(f).toString());G&&(C.cuepointId=G);m&&(C.videoId=m);p.LIVE_TARGETING_CONTEXT&&(C.liveTargetingParams=p.LIVE_TARGETING_CONTEXT); p.AD_BREAK_LENGTH&&(C.breakLengthMs=Math.trunc(p.AD_BREAK_LENGTH*1E3).toString());I&&(C.driftFromHeadMs=I.toString());C.currentMediaTimeMs=Math.round(R.player.getCurrentTime({playerType:1})*1E3);(R=R.player.getGetAdBreakContext())&&(C.getAdBreakContext=R);return C}; Gw_=function(){let R=g.n("csn-to-ctt-auth-info");R||(R={},Gh("csn-to-ctt-auth-info",R));return R}; IIr=function(){return Object.values(g.n("client-screen-nonce-store",{})).filter(R=>R!==void 0)}; g.ut=function(R=0){R=ipd(R);if(!R&&!g.n("USE_CSN_FALLBACK",!0))return null;R||(R="UNDEFINED_CSN");return R?R:null}; uSd=function(R){for(const w of Object.values(CDd))if(g.ut(w)===R)return!0;return!1}; sfb=function(R,w,p){const r=Gw_();(p=g.ut(p))&&delete r[p];w&&(r[R]=w)}; sk=function(R){return Gw_()[R]}; zSb=function(R,w,p=0,r){if(R!==ipd(p)||w!==g.n(fF(p)))if(sfb(R,r,p),Qtr(R,p),Gh(fF(p),w),w=()=>{setTimeout(()=>{R&&g.Rv("foregroundHeartbeatScreenAssociated",{clientDocumentNonce:mVd,clientScreenNonce:R})},0)},"requestAnimationFrame"in window)try{window.requestAnimationFrame(w)}catch(f){w()}else w()}; mV=function(R,w){var p=g.n("VALID_SESSION_TEMPDATA_DOMAINS",[]),r=g.sH(window.location.href);r&&p.push(r);r=g.sH(R);if(g.ra(p,r)||!r&&pj(R,"/"))if(p=document.createElement("a"),g.J$(p,R),R=p.href)if(R=BO(R),R=WO(R))if(!w.csn&&(w.itct||w.ved)&&(w=Object.assign({csn:g.ut()},w)),f){var f=parseInt(f,10);isFinite(f)&&f>0&&BGP(R,w,f)}else BGP(R,w)}; BGP=function(R,w,p){R=WoW(R);w=w?g.A4(w):"";p=p||5;Aj()&&g.NL(R,w,p)}; WoW=function(R){for(let w of xVY)R=OH(R,w);return"ST-"+x2(R).toString(36)}; lIr=function(R){if(R.name==="JavaException")return!0;R=R.stack;return R.includes("chrome://")||R.includes("-extension://")||R.includes("webkit-masked-url://")}; Lod=function(R){if(!R.stack)return!0;const w=!R.stack.includes("\n");return w&&R.stack.includes("ErrorType: ")||w&&R.stack.includes("Anonymous function (Unknown script")||R.stack.toLowerCase()==="not available"||R.fileName==="user-script"||R.fileName.startsWith("user-script:")?!0:!1}; BC=function(){if(!zP){var R=zP=new qN6;R.pA.length=0;R.YZ.length=0;AQY(R,b5d)}return zP}; AQY=function(R,w){w.pA&&R.pA.unshift.apply(R.pA,w.pA);w.YZ&&R.YZ.unshift.apply(R.YZ,w.YZ)}; yQL=function(R){const w=R.length;let p=0;const r=()=>R.charCodeAt(p++); do{var f=WC(r);if(f===Infinity)break;const G=f>>3;switch(f&7){case 0:f=WC(r);if(G===2)return f;break;case 1:if(G===2)return;p+=8;break;case 2:f=WC(r);if(G===2)return R.substr(p,f);p+=f;break;case 5:if(G===2)return;p+=4;break;default:return}}while(p500));r++);r=f}else if(typeof R==="object")for(f in R){if(R[f]){a:{var G=f;var I=R[f],C=w,u=p;if(typeof I!=="string"||G!=="clickTrackingParams"&&G!=="trackingParams"){G=0;break a}G=(I=yQL(atob(I.replace(/-/g,"+").replace(/_/g,"/"))))?xg(`${G}.ve`,I,C,u):0}r+=G;r+=xg(f,R[f],w,p);if(r>500)break}}else p[w]=lt(R),r+=p[w].length;else p[w]=lt(R),r+=p[w].length;return r}; xg=function(R,w,p,r){p+=`.${R}`;R=lt(w);r[p]=R;return p.length+R.length}; lt=function(R){try{return(typeof R==="string"?R:String(JSON.stringify(R))).substr(0,500)}catch(w){return`unable to serialize ${typeof R} (${w.message})`}}; qb=function(R){g.LF(R)}; g.AO=function(R){g.LF(R,"WARNING")}; g.LF=function(R,w="ERROR"){var p={};p.name=g.n("INNERTUBE_CONTEXT_CLIENT_NAME",1);p.version=g.n("INNERTUBE_CONTEXT_CLIENT_VERSION");od6(R,p,w)}; od6=function(R,w,p="ERROR"){if(R){R.hasOwnProperty("level")&&R.level&&(p=R.level);if(g.Y("console_log_js_exceptions")||["test","dev","autopush","staging"].includes(g.n("SERVER_VERSION"))){var r=[];r.push(`Name: ${R.name}`);r.push(`Message: ${R.message}`);R.hasOwnProperty("params")&&r.push(`Error Params: ${JSON.stringify(R.params)}`);R.hasOwnProperty("args")&&r.push(`Error args: ${JSON.stringify(R.args)}`);r.push(`File name: ${R.fileName}`);r.push(`Stacktrace: ${R.stack}`);window.console.log(r.join("\n"), R)}if(!(tmP>=5)){r=[];for(f of O5d)try{f()&&r.push(f())}catch(q){}var f=r;f=[...Ko_,...f];var G=ePx(R);r=G.message||"Unknown Error";const W=G.name||"UnknownError";var I=G.stack||R.C||"Not available";if(I.startsWith(`${W}: ${r}`)){var C=I.split("\n");C.shift();I=C.join("\n")}C=G.lineNumber||"Not available";G=G.fileName||"Not available";let x=0;if(R.hasOwnProperty("args")&&R.args&&R.args.length)for(var u=0;u=500);u++);else if(R.hasOwnProperty("params")&& R.params){const q=R.params;if(typeof R.params==="object")for(u in q){if(!q[u])continue;const O=`params.${u}`,e=lt(q[u]);w[O]=e;x+=O.length+e.length;if(x>500)break}else w.params=lt(q)}if(f.length)for(u=0;u=500);u++);navigator.vendor&&!w.hasOwnProperty("vendor")&&(w["device.vendor"]=navigator.vendor);w={message:r,name:W,lineNumber:C,fileName:G,stack:I,params:w,sampleWeight:1};u=Number(R.columnNumber);isNaN(u)||(w.lineNumber=`${w.lineNumber}:${u}`); if(R.level==="IGNORED")var m=0;else a:{R=BC();for(m of R.pA)if(w.message&&w.message.match(m.yb)){m=m.weight;break a}for(var z of R.YZ)if(z.callback(w)){m=z.weight;break a}m=1}w.sampleWeight=m;m=w;for(var B of EdY){if(!B.sS[m.name])continue;z=B.sS[m.name];for(const q of z){z=m.message.match(q.wS);if(!z)continue;m.params["params.error.original"]=z[0];R=q.groups;w={};for(u=0;u1E3&&g.AO(new g.Id("IL Attach cache exceeded limit"))}I=$g(p,w);eu.has(I)?Xn(p,w): cC.set(I,!0)}}r=r.filter(C=>{C.csn!==w?(C.csn=w,C=!0):C=!1;return C}); p={csn:w,parentVe:p.getAsJson(),childVes:g.gd(r,C=>C.getAsJson())}; w==="UNDEFINED_CSN"?nF("visualElementAttached",G,p):R?UY("visualElementAttached",p,R,G):g.Rv("visualElementAttached",p,G)}; JQL=function(R,w,p,r,f,G,I){dw(p,w);r=Dl({cttAuthInfo:sk(w)||void 0,automatedLogEventSource:I},w);p={csn:w,ve:p.getAsJson(),eventType:1};f&&(p.clientData=f);w==="UNDEFINED_CSN"?nF("visualElementShown",r,p):R?UY("visualElementShown",p,R,r):g.Rv("visualElementShown",p,r)}; TGW=function(R,w,p,r=!1){const f=r?16:8;r=Dl({cttAuthInfo:sk(w)||void 0,endOfSequence:r,automatedLogEventSource:void 0},w);p={csn:w,ve:p.getAsJson(),eventType:f};w==="UNDEFINED_CSN"?nF("visualElementHidden",r,p):R?UY("visualElementHidden",p,R,r):g.Rv("visualElementHidden",p,r)}; Zl=function(R,w,p,r,f,G){i5W(R,w,p,void 0,r,f,G)}; i5W=function(R,w,p,r,f,G,I){dw(p,w);r=r||"INTERACTION_LOGGING_GESTURE_TYPE_GENERIC_CLICK";G=Dl({cttAuthInfo:sk(w)||void 0,automatedLogEventSource:I},w);p={csn:w,ve:p.getAsJson(),gestureType:r};f&&(p.clientData=f);w==="UNDEFINED_CSN"?nF("visualElementGestured",G,p):R?UY("visualElementGestured",p,R,G):g.Rv("visualElementGestured",p,G)}; QfL=function(){let R;R=NT(16);const w=[];for(let p=0;p{g.iH(w,p=>{dw(p,R);const r=Dl({cttAuthInfo:sk(R)||void 0,automatedLogEventSource:void 0},R);p={csn:R,ve:p.getAsJson(),eventType:4};R==="UNDEFINED_CSN"?nF("visualElementShown",r,p):g.Rv("visualElementShown",p,r)})})()}; g.TP=function(R,w){g.mJ(()=>{g.iH(w,p=>{TGW(void 0,R,p)})})()}; g.Qs=function(R,w,p){g.mJ(Zl)(void 0,R,w,p,void 0)}; hO=function(R,w,p,r){g.mJ(i5W)(void 0,R,w,p,r,void 0)}; gw=function(R){var w=":"+(iG.getInstance().L++).toString(36);return R+w}; g.HC=function(R=!1){g.f5.call(this);this.uo=new g.DG(R);g.K(this,this.uo)}; vC=function(){const R="ytp-id-"+hSL.toString();hSL++;return R}; Nb=function(R,w,p,r){if(r.substring(0,2)==="{{")R.xu[r]=[w,p];else return r}; kg=function(R,w,p,r){if(p==="child"){g.Bc(w);let G;r===void 0?G=void 0:G=!Array.isArray(r)||r&&typeof r.j==="string"?[r]:r;p=gdd(R,G);for(var f of p)w.appendChild(f)}else p==="style"?g.Z2(w,"cssText",r?r:""):r===null||r===void 0?w.removeAttribute(p):(f=r.toString(),p==="href"&&(f=g.$k(g.Zp(f))),w.setAttribute(p,f))}; gdd=function(R,w){const p=[];if(!w)return p;for(const r of w){if(r==null)continue;w=r.nodeType;w===1||w===3?p.push(r):r&&typeof r.j==="string"?p.push(R.createElement(r)):r.element?p.push(r.element):typeof r==="string"&&r.indexOf("\n")!==-1?r.split("\n").forEach((f,G)=>{G>0&&p.push(g.sW("BR"));p.push(g.m9(f))}):p.push(g.m9(r))}return p}; Uk=function(R=null,w=null){if(R==null)return g.AO(Error("Got null or undefined adText object")),"";let p=g.WD(R.text);if(!R.isTemplated)return p;if(w==null)return g.AO(Error("Missing required parameters for a templated message")),p;for(const [r,f]of Object.entries(w))p=p.replace("{"+r+"}",f);return p}; H5H=function(R=null){return R!=null&&(R=R.thumbnail,R!=null&&R.thumbnails!=null&&R.thumbnails.length!=0&&R.thumbnails[0].url!=null)?g.WD(R.thumbnails[0].url):""}; vdr=function(R=null){return R!=null&&(R=R.thumbnail,R!=null&&R.thumbnails!=null&&R.thumbnails.length!=0&&R.thumbnails[0].width!=null&&R.thumbnails[0].height!=null)?new g.dg(R.thumbnails[0].width||0,R.thumbnails[0].height||0):new g.dg(0,0)}; g.Su=function(R){if(R.simpleText)return R.simpleText;if(R.runs){const w=[];for(const p of R.runs)p.text&&w.push(p.text);return w.join("")}return""}; g.R$=function(R){if(R.simpleText)return R=document.createTextNode(R.simpleText),R;const w=[];if(R.runs)for(let C=0;Cp!=null),R.L.command&&(w=w.concat(R.L.command))); return w||[]}; OBP=function(){AV==null&&(AV=new t1_);return AV}; bE=function(R,w){if(R.simpleText){a:{R=R.simpleText;if(w&&(w=KKd(R))){w=uA("SPAN",null,w);break a}w=g.m9(R)}return w}const p=[];if(R.runs)for(let r=0;rf.baseUrl),OBP().register(p,R),g.pc(p,"ytp-ad-has-logging-urls")); return p||uA("SPAN",null,r)}; KKd=function(R){R=R.split(/(?:\r\n|\r|\n)/g);if(R.length>1){const w=[R[0]];for(let p=1;pR.G(f))); w.confirmLabel&&(w=g.Su(w.confirmLabel),R.updateValue("confirmLabel",w),R.L.W(R.S,"click",f=>R.J(f))); R.L.W(R.O0,"click",f=>R.K(f))}; Rl=function(R,w,p,r,f,G,I,C,u,m){var z=w^R;if(R+1>>2=R){for(var B=z^7887,W=[];++B-W[l[2]]-(z^7855);)switch(B){case z^7841:B=z^7888;default:W[l[z^7809]](String[l[z^7842]](B));case z^7889:case z^7888:case z^7919:break;case z^7924:B-=z^7875;case z^7891:case z^7890:continue;case z^7861:B=z^7843;case z^7892:}var x=W}(R-2|17)=R&&(x=r(f,G,I,C,u,m));return x}; o$=function(R){R.S&&(R.isToggled()?(g.wO(R.J,!1),g.wO(R.K,!0),R.C.setAttribute("aria-checked",!0)):(g.wO(R.J,!0),g.wO(R.K,!1),R.C.setAttribute("aria-checked",!1)))}; ewd=function(R,w){let p=null;R.O&&(p=(w?[R.O.defaultServiceEndpoint,R.O.defaultNavigationEndpoint]:[R.O.toggledServiceEndpoint]).filter(r=>r!=null)); return p||[]}; a9d=function(R,w){var p=w.cancelRenderer&&w.cancelRenderer.buttonRenderer||null;p&&(R.L=new tV(R.api,R.layoutId,R.interactionLoggingClientData,R.Vk,["ytp-ad-feedback-dialog-close-button"],"button"),g.K(R,R.L),R.L.init(gw("button"),p,R.macros),R.L.listen("click",R.D,R),R.L.gN(R.element));w.title&&(p=g.Su(w.title),R.updateValue("title",p));w.reasonsTitle&&(p=g.Su(w.reasonsTitle),R.updateValue("reasonsTitle",p));w.reasons&&M1r(R,w.reasons);w.cancelLabel&&(p=g.Su(w.cancelLabel),R.updateValue("cancelLabel", p),g.ZU(R.K,"click",()=>R.D())); w.confirmLabel&&(p=g.Su(w.confirmLabel),R.updateValue("confirmLabel",p),g.ZU(R.J,"click",()=>cID(R))); w.undoRenderer&&Pzd(R,w.undoRenderer)}; M1r=function(R,w){for(const r of w){w=r.reason;if(w==null){g.AO(Error("AdFeedbackReason.reason was not set."));continue}var p=r.endpoint;if(p==null){g.AO(Error("AdFeedbackReason.endpoint was not set."));continue}const f=new $5d(w,p);g.K(R,f);w=R.S;p=f.zk();w.appendChild(p);R.G.push(f)}}; cID=function(R){var w=R.G.filter(p=>p.isChecked()); w.length!==0&&(w=w[0].getCommand(),R.layoutId?R.Vk.executeCommand(w,R.layoutId):g.LF(Error("Missing layoutId for ad feedback dialog.")),R.api.onAdUxClicked("ad-feedback-dialog-confirm-button",R.layoutId),R.publish("a"),R.hide())}; Pzd=function(R,w){if(w=w&&w.buttonRenderer||null)w.serviceEndpoint?(R.C=new tV(R.api,R.layoutId,R.interactionLoggingClientData,R.Vk,["ytp-ad-feedback-dialog-undo-mute-button"],"ad-feedback-undo-mute-button"),g.K(R,R.C),R.C.init(gw("ad-feedback-undo-mute-button"),w,R.macros),R.C.listen("click",R.jI,R),R.C.gN(R.O0)):g.AO(Error("AdFeedbackRenderer.undoRenderer.undoButtonRenderer was specified but did not contain a service endpoint."))}; XMY=function(R){R.L&&R.L.listen("click",R.O0,R);g.ZU(R.J,"click",()=>R.O0())}; d5I=function(R,w){if(w=w.content&&w.content.adFeedbackRenderer||null)R.C=new npb(R.api,R.layoutId,R.interactionLoggingClientData,R.Vk),g.K(R,R.C),R.C.init(gw("ad-feedback-dialog"),w,R.macros),R.C.gN(R.S),R.C.subscribe("a",()=>R.publish("c"))}; Y$l=function(R,w){if(w=w.content&&w.content.confirmDialogRenderer||null)R.G=new ZBD(R.api,R.layoutId,R.interactionLoggingClientData,R.Vk),g.K(R,R.G),R.G.init(gw("ad-mute-confirm-dialog"),w,R.macros),R.G.gN(R.S),R.G.subscribe("b",()=>R.publish("c"))}; Tq6=function(R,w,p){R.button==null?g.LF(Error("AdInfoHoverTextButton.button was expected but it was not created.")):(R.C&&g.pc(R.C.element,"ytp-ad-info-hover-text-short"),(w=w&&w.serviceEndpoint&&g.F(w.serviceEndpoint,FKl)||null)?(j7D(R,w,p),R.button.listen("click",()=>{R.L&&!R.L.K_&&(R.L.show(),JIr(R))})):R.button.listen("click",()=>JIr(R)))}; j7D=function(R,w,p){w=w.dialog&&g.F(w.dialog,iBd)||null;w==null?g.LF(Error("AdInfoDialogEndpoint did not contain an AdInfoDialogRenderer.")):(R.L=new Q7b(R.api,R.layoutId,R.interactionLoggingClientData,R.Vk,R.G),g.K(R,R.L),R.L.init(gw("ad-info-dialog"),w,p),R.L.gN(R.G),R.L.subscribe("d",()=>R.publish("f")),R.L.subscribe("c",()=>R.publish("e")))}; JIr=function(R){R.api.onAdUxClicked("ad-info-icon-button",R.layoutId)}; Of=function(R,w){w&&g.L$(R.element,Uk(R.L,w))}; KQ=function(R){R.L&&R.S===-1&&(R.S=R.L.subscribe("h",R.O,R),R.nB=R.L.subscribe("g",R.K,R),R.O())}; Ef=function(R){R.L!=null&&R.S!==-1&&(R.L.Cv(R.S),R.L.Cv(R.nB),R.nB=-1,R.S=-1)}; DY=function(R,w){R=R.element.element;w?R.setAttribute("aria-hidden","true"):R.removeAttribute("aria-hidden")}; hwI=function(R){switch(R){case 2:return 0;case 1:return 2;case 0:return 3;case 4:case 3:return 1;default:T1(R,"unknown result type")}}; gpI=function(R,w){let p=1;R.isTrusted===!1&&(p=0);Gh("ISDSTAT",p);e5(p,"i.s_",{triggerContext:"sk",metadata:w});return p}; HBI=function(R,w){const p=[];w?w.isTrusted===!0?p.push("BISCOTTI_BASED_DETECTION_STATE_AS_SEEK_EVENT_TRUSTED"):w.isTrusted===!1?p.push("BISCOTTI_BASED_DETECTION_STATE_AS_SEEK_EVENT_NOT_TRUSTED"):p.push("BISCOTTI_BASED_DETECTION_STATE_AS_SEEK_EVENT_TRUSTED_PROPERTY_UNDEFINED"):p.push("BISCOTTI_BASED_DETECTION_STATE_AS_SEEK_EVENT_UNDEFINED");e5(0,"a.s_",{metadata:R,states:p});Gh("ASDSTAT",0)}; e5=function(R,w,p){w=vpD[w];const r={detected:R===0,source:`${w.C}${p.triggerContext??""}${p.Qe??""}`,detectionStates:p.states,durationMs:p.oQ};p.metadata&&(r.contentCpn=p.metadata.contentCpn,r.adCpn=p.metadata.adCpn);g.Rv("biscottiBasedDetection",r);w.L!==void 0&&(p=Number(g.n("CATSTAT",0)),w.L!==void 0?(w=w.L,R=hwI(R),R=p&~(3<w.adLifecycleCommand?Nql(w.adLifecycleCommand):!1)}; Nql=function(R){return R.action==="END_LINEAR_AD"||R.action==="END_LINEAR_AD_PLACEMENT"}; U56=function(R,w){R.J||(R.J=!0,R.C&&(w?R.C.O0.hide():R.C.hide()),w?(R=R.G,R.mq.show(),R.show()):R.G.show())}; g.a$=function(R,w){var p=Math.abs(Math.floor(R)),r=Math.floor(p/86400);const f=Math.floor(p%86400/3600),G=Math.floor(p%3600/60);p=Math.floor(p%60);if(w){w="";r>0&&(w+=` ${r} `+"Days");if(r>0||f>0)w+=` ${f} `+"Hours";w+=` ${G} `+"Minutes";w+=` ${p} `+"Seconds";r=w.trim()}else{w="";r>0&&(w+=`${r}:`,f<10&&(w+="0"));if(r>0||f>0)w+=`${f}:`,G<10&&(w+="0");w+=`${G}:`;p<10&&(w+="0");r=w+p}return R>=0?r:`-${r}`}; g.$t=function(R){return(!("button"in R)||typeof R.button!=="number"||R.button===0)&&!("shiftKey"in R&&R.shiftKey)&&!("altKey"in R&&R.altKey)&&!("metaKey"in R&&R.metaKey)&&!("ctrlKey"in R&&R.ctrlKey)}; var S$W=function(R,w){return XJ[l[5]](this,5,2389,R,w)}; var R4x=function(R,w){return R.C+w*(R.L-R.C)},nQ=function(R,w,p){return R.L-R.C?g.MN((w-R.C)/(R.L-R.C),0,1):p!=null?p:Infinity},wAx=function(R){R=R.api.V(); return g.dQ(R)&&R.C||R.Y("embeds_desktoff_enable_ads_top_bar")&&!1},ZY=function(R){R.map(w=>w.source)},Yt=function(R){return g.yD("ytcsi."+(R||"")+"data_")||pAd(R)},rcb=function(){const R=Yt(); R.info||(R.info={});return R.info},FJ=function(R){R=Yt(R); R.metadata||(R.metadata={});return R.metadata},j5=function(R){R=Yt(R); R.tick||(R.tick={});return R.tick},JV=function(R){R=Yt(R); if(R.gel){const w=R.gel;w.gelInfos||(w.gelInfos={});w.gelTicks||(w.gelTicks={})}else R.gel={gelTicks:{},gelInfos:{}};return R.gel},f_H=function(R){R=JV(R); R.gelInfos||(R.gelInfos={});return R.gelInfos},G8W=function(){const R=JV(); R.preLoggedGelInfos||(R.preLoggedGelInfos=[]);return R.preLoggedGelInfos},Ti=function(R){let w=Yt(R).nonce; w||(w=g.k0(16),Yt(R).nonce=w);return w},pAd=function(R){const w={tick:{}, info:{}};g.AY("ytcsi."+(R||"")+"data_",w);return w},I_I=function(){let R=g.yD("ytcsi.debug"); R||(R=[],g.AY("ytcsi.debug",R),g.AY("ytcsi.reference",{}));return R},uiD=function(R){const w=I_I(); w.push(R);g.Y("limit_ytcsi_debug_array_size")&&w.length>Cgd&&w.splice(0,w.length-Cgd)},iE=function(R){R=R||""; const w=seL();if(w[R])return w[R];const p={timerName:R,info:{},tick:{},span:{},jspbInfo:[]};uiD(p);return w[R]=p},mPb=function(R){R=R||""; const w=seL();w[R]&&delete w[R];const p={timerName:R,info:{},tick:{},span:{},jspbInfo:[]};uiD(p);w[R]=p},seL=function(){const R=g.yD("ytcsi.reference"); if(R)return R;I_I();return g.yD("ytcsi.reference")},Q$=function(R){return z4I[R]||"LATENCY_ACTION_UNKNOWN"},hV=function(R,w,p){var r=w^R; if(!(R+2>>3)){rg(r^8087,r^4951,p);var f=KA(r^8104,r^2707,p[l[r^8094]](l[r^8090])||l[1])[l[r^8107]](l[r^8126]);var G=p[l[r^8106]]===l[r^8076]&&f[l[2]]>1&&!!f[1]}if(R>>1<18&&(R>>2&7)>=3){f=r^9059;for(var I=[];++f-I[l[2]]-(r^8963);){switch(f){case r^9080:f=r^8975;continue;case r^9048:f=r^9058;break;case r^9058:f-=r^9009;continue;case r^8985:f=r^9027;continue;case r^8973:f=r^9084}I[l[r^9005]](String[l[r^8974]](f))}G=I}if((R|8)==R)a:{f=p[l[r^4370]](l[1]);I=[r^467032573,r^1447040776,r^546727980,-(r^1094169011), r^1058478110,r^698877970,B8x,r^683072768,r^1861495347,r^628707202,r^1798238089,-(r^143832366),null,r^6222678,-(r^567559163),aXl,r^598492881,ELW,r^493751740,r^1634554406,r^1542344415,-(r^1212250440),r^383280619,l[r^4392],r^1647858626,-(r^1391779256),l[r^4437],TAL,r^1042683919,-(r^800219488),f,r^1281218622,S$W,WGY,-(r^29342629),xPb,pwl,r^1988281318,l_6,l[r^4442],null,-(r^1708515763),LGL,-(r^1230120381),-(r^667456163),-(r^1265222833),-(r^32612289),r^393684056,-(r^195462283),r^1099902441,r^992360848, -(r^1287593723),-(r^1424158384),-(r^1094292979),-(r^773537042),r^1058478110,r^1775400747,r^252369593,-(r^90110142),r^1368883277,-(r^1189578858),-(r^1355369935),r^1798238089,-(r^630788224),-(r^1280219354),r^1580167120,-(r^1956893152),-(r^988735129),-(r^131268341),r^2083724087,null,-(r^238219737),-(r^630788224),RPY,q8l,Ac6,r^1084814456,-(r^23533758),f,buD,ycb,r^492052671,r^99149128,-(r^1846127760),r^1679695161,l[r^4442],VCb,-(r^344984540),f,oIH];I[r^4370]=I;I[r^4406]=I;I[r^4440]=I;if(typeof tCW===l[r^ 4445]){G=p;break a}try{try{var C=rg(r^4358,r^5756,I,Date)}catch(u){C=Oud(4,r^8115,I,Date)}try{I[r^4406]!=-6&&(I[r^4400]==-1?(0,I[r^4366])((0,I[r^4366])((0,I[r^4366])((0,I[r^4446])(I[r^4391],I[r^4442]),I[r^4377],I[r^4391],I[r^4444]),I[r^4446],I[r^4356],I[r^4410]),I[r^4430],I[r^4445],I[r^4392]):((0,I[r^4447])(I[r^4435],I[r^4364]),I[r^4389])(I[r^4445])*(0,I[r^4366])((0,I[r^4446])(I[r^4391],I[r^4433]),I[r^4414],I[r^4395],I[r^4374]))}catch(u){(0,I[r^4386])((0,I[r^4401])(),I[r^4361],I[r^4387])}finally{I[r^ 4385]>(r^4374)?(0,I[r^4389])((0,I[r^4371])(I[r^4398],I[r^4410]),I[r^4372],I[r^4398],I[r^4424])+(0,I[r^4371])(I[r^4387],I[r^4404])%(0,I[r^4396])(I[r^4387],I[r^4385]):(((0,I[r^4373])(I[r^4398],I[r^4352]),I[r^4396])(I[6],I[r^4420]),I[r^4389])((0,I[r^4396])(I[r^4366],I[2]),I[r^4396],I[r^4398],I[0]),I[r^4400]===6&&((0,I[r^4396])(I[r^4398],I[r^4394]),l[3])||(0,I[r^4372])(I[r^4366],I[r^4399])}}catch(u){G=l[r^4398]+p;break a}G=f[l[r^4362]](l[1])}return G}; var LGL=function(R,w,p,r,f,G){return AQ[l[5]](this,2,2662,R,w,p,r,f,G)}; e4I=function(R,w,p={}){var r=Math.round(p.timestamp||(0,g.T)());CP(R,1,r{const r=(0,g.T)();for(const f in vs)vs[f]&&r-vs[f].time>6E4&&delete vs[f];R&&(R.L=0)},5E3)); return p.count>5?(p.count===6&&Math.random()*1E5<1&&(p=new g.Id("CSI data exceeded logging limit with key",w.split("_")),w.indexOf("plev")>=0||g.AO(p)),!0):!1}; cc6=function(){var R;g.Y("csi_use_performance_navigation_timing")?(R=kt?.getEntriesByType?.("navigation")?.[0]?.toJSON?.())?(R.requestStart=Uf(R.requestStart),R.responseEnd=Uf(R.responseEnd),R.redirectStart=Uf(R.redirectStart),R.redirectEnd=Uf(R.redirectEnd),R.domainLookupEnd=Uf(R.domainLookupEnd),R.connectStart=Uf(R.connectStart),R.connectEnd=Uf(R.connectEnd),R.responseStart=Uf(R.responseStart),R.secureConnectionStart=Uf(R.secureConnectionStart),R.domainLookupStart=Uf(R.domainLookupStart),R.isPerformanceNavigationTiming= !0):R=kt.timing:R=g.Y("csi_performance_timing_to_object")?JSON.parse(JSON.stringify(kt.timing)):kt.timing;return R}; Uf=function(R){return Math.round(S5()+R)}; S5=function(){return(g.Y("csi_use_time_origin")||g.Y("csi_use_time_origin_tvhtml5"))&&kt.timeOrigin?Math.floor(kt.timeOrigin):kt.timing.navigationStart}; PgH=function(){const R=G8W(),w=f_H();var p=void 0;for(var r=0;r{gz(w,C);gz(G,C);I=!0}; for(const C of R)f(C);I&&pV(G)}}; rC=function(R,w){Rw("_start",R,w)}; pV=function(R,w){if(!g.Y("web_csi_action_sampling_enabled")||!Yt(w).actionDisabled){var p=iE(w||"");gz(p.info,R);R.loadType&&(p=R.loadType,FJ(w).loadType=p);gz(f_H(w),R);p=Ti(w);w=Yt(w).cttAuthInfo;Hs().info(R,p,w)}}; a_D=function(){return(mE().resolve(G4(RA))?.ox()?.loggingHotConfig?.csiConfig?.debugTicks??[]).map(R=>Object.values(R)[0])}; Rw=function(R,w,p){if(!g.Y("web_csi_action_sampling_enabled")||!Yt(p).actionDisabled){var r=Ti(p),f;if(f=g.Y("web_csi_debug_sample_enabled")&&r){mE().resolve(G4(RA))?.ox()&&!$Pd&&($Pd=!0,Rw("gcfl",(0,g.T)(),p));f=mE().resolve(G4(RA))?.ox()?.loggingHotConfig?.csiConfig?.debugSampleWeight||0;var G;if(G=f!==0)b:{G=a_D();if(G.length>0)for(let C=0;C{w.name.startsWith("mark_")&&kt.clearMarks?.(w.name)})}; dPH=function(){switch(htY()){case "hidden":return 0;case "visible":return 1;case "prerender":return 2;case "unloaded":return 3;default:return-1}}; Zud=function(R){const w={},p=(r,f,G)=>{f=f.match("_rid")?f.split("_rid")[0]:f;typeof G==="number"&&(G=JSON.stringify(G));r.requestIds?r.requestIds.push({endpoint:f,id:G}):r.requestIds=[{endpoint:f,id:G}]}; for(const [r,f]of Object.entries(R)){R=r;const G=f;switch(R){case "GetBrowse_rid":p(w,R,G);break;case "GetGuide_rid":p(w,R,G);break;case "GetHome_rid":p(w,R,G);break;case "GetPlayer_rid":p(w,R,G);break;case "GetSearch_rid":p(w,R,G);break;case "GetSettings_rid":p(w,R,G);break;case "GetTrending_rid":p(w,R,G);break;case "GetWatchNext_rid":p(w,R,G);break;case "yt_red":w.isRedSubscriber=!!G;break;case "yt_ad":w.isMonetized=!!G}}return w}; Y8b=function(R,w){R=document.querySelector(R);if(!R)return!1;var p="";const r=R.nodeName;r==="SCRIPT"?(p=R.src,p||(p=R.getAttribute("data-timing-href"))&&(p=window.location.protocol+p)):r==="LINK"&&(p=R.href);Hw(document)&&R.setAttribute("nonce",Hw(document));return p?(R=kt.getEntriesByName(p))&&R[0]&&(R=R[0],p=S5(),Rw("rsf_"+w,p+Math.round(R.fetchStart)),Rw("rse_"+w,p+Math.round(R.responseEnd)),R.transferSize!==void 0&&R.transferSize===0)?!0:!1:!1}; FGH=function(){const R=window.location.protocol;var w=kt.getEntriesByType("resource");w=g.QD(w,p=>p.name.indexOf(`${R}//fonts.gstatic.com/s/`)===0); (w=v6(w,(p,r)=>r.duration>p.duration?r:p,{duration:0}))&&w.startTime>0&&w.responseEnd>0&&(Rw("wffs",Uf(w.startTime)),Rw("wffe",Uf(w.responseEnd)))}; jeH=function(R,w,p){kt&&kt.measure&&(R.startsWith("measure_")||(R="measure_"+R),p?kt.measure(R,w,p):w?kt.measure(R,w):kt.measure(R))}; Jcr=function(R){var w=wC("aft",R);if(w)return w;w=g.n((R||"")+"TIMING_AFT_KEYS",["ol"]);const p=w.length;for(let r=0;rp.name==="first-paint"))return Uf(R.startTime)}let w; g.Y("csi_use_performance_navigation_timing")?w=kt.getEntriesByType("first-paint")[0].startTime:w=kt.timing.nFq;return w?Math.max(0,w):0}; G3=function(R){pAd(R);gIb();nI_();R||(g.n("TIMING_ACTION")&&Gh("PREVIOUS_ACTION",g.n("TIMING_ACTION")),Gh("TIMING_ACTION",""))}; Hur=function(){var R=["pbs","pbu"];g.mJ(()=>{iE("").info.actionType="watch";R&&Gh("TIMING_AFT_KEYS",R);Gh("TIMING_ACTION","watch");var w=Zud(g.n("TIMING_INFO",{}));Object.keys(w).length>0&&pV(w);w={isNavigation:!0,actionType:Q$(g.n("TIMING_ACTION"))};var p=g.n("PREVIOUS_ACTION");p&&(w.previousAction=Q$(p));if(p=g.n("CLIENT_PROTOCOL"))w.httpProtocol=p;if(p=g.n("CLIENT_TRANSPORT"))w.transportProtocol=p;(p=g.ut())&&p!=="UNDEFINED_CSN"&&(w.clientScreenNonce=p);p=dPH();if(p===1||p===-1)w.isVisible=!0; p=FJ().loadType==="cold";var r=rcb();p||(p=r.yt_lt==="cold");if(p){w.loadType="cold";p=rcb();r=cc6();let I=S5();const C=g.n("CSI_START_TIMESTAMP_MILLIS",0);C>0&&!g.Y("embeds_web_enable_csi_start_override_killswitch")&&(I=C);I&&(Rw("srt",r.responseStart),p.prerender!==1&&rC(I));p=h4D();p>0&&Rw("fpt",p);p=cc6();p.isPerformanceNavigationTiming&&pV({performanceNavigationTiming:!0},void 0);Rw("nreqs",p.requestStart,void 0);Rw("nress",p.responseStart,void 0);Rw("nrese",p.responseEnd,void 0);p.redirectEnd- p.redirectStart>0&&(Rw("nrs",p.redirectStart,void 0),Rw("nre",p.redirectEnd,void 0));p.domainLookupEnd-p.domainLookupStart>0&&(Rw("ndnss",p.domainLookupStart,void 0),Rw("ndnse",p.domainLookupEnd,void 0));p.connectEnd-p.connectStart>0&&(Rw("ntcps",p.connectStart,void 0),Rw("ntcpe",p.connectEnd,void 0));p.secureConnectionStart>=S5()&&p.connectEnd-p.secureConnectionStart>0&&(Rw("nstcps",p.secureConnectionStart,void 0),Rw("ntcpe",p.connectEnd,void 0));kt&&"getEntriesByType"in kt&&FGH();p=[];if(document.querySelector&& kt&&kt.getEntriesByName)for(f in Iw)Iw.hasOwnProperty(f)&&(r=Iw[f],Y8b(f,r)&&p.push(r));var f=p;if(f.length>0){w.resourceInfo=[];for(var G of f)w.resourceInfo.push({resourceCache:G})}}pV(w);PgH();fV(!0);G=g.n("TIMING_ACTION");g.yD("ytglobal.timingready_")&&G&&CV()&&Jcr()&&XAP()})()}; vIr=function(){var R={};g.mJ(()=>{CV()&&u$("aa",void 0,void 0);mPb();G3();fV(!1);R.cttAuthInfo&&(Yt().cttAuthInfo=R.cttAuthInfo);Gh("TIMING_AFT_KEYS",[]);R.jhY?g.sT({loadType:"hot"}):g.sT({loadType:"warm"});Gh("TIMING_ACTION","");delete g.n("TIMING_INFO",{}).yt_lt;g.mJ(rC)(R.startTime,void 0)})()}; mp=function(R,w={}){g.mJ(()=>{N86(R);var p=w.sampleRate;if(!g.Y("web_csi_action_sampling_enabled")||p===void 0||p<=1)p=!1;else{var r=Ti(R);p=Z5l(r)%p!==0}p&&(Yt(R).actionDisabled=!0);iE(R||"").info.actionType=R;w.cttAuthInfo&&(Yt(R).cttAuthInfo=w.cttAuthInfo);Gh(R+"TIMING_ACTION",R);g.mJ(rC)(w.startTime,R);p={actionType:Q$(R)};w.EFy&&(p.previousAction=Q$(g.n("TIMING_ACTION")));(r=g.ut())&&r!=="UNDEFINED_CSN"&&(p.clientScreenNonce=r);g.sT(p,R);fV(!0,R)})()}; N86=function(R){g.mJ(()=>{CV(R)&&u$("aa",void 0,R);mPb(R);G3(R)})()}; CV=function(R){return g.mJ(()=>z3("_start",R))()}; g.sT=function(R,w,p=!1){g.mJ(pV)(R,w,p)}; u$=function(R,w,p){return g.mJ(Rw)(R,w,p)}; k8x=function(R){g.mJ(jeH)("action_finished",R,void 0)}; z3=function(R,w){return g.mJ(()=>{const p=j5(w);return R in p})()}; S8x=function(R){if(!g.Y("universal_csi_network_ticks"))return"";R=ma(R)||"";const w=Object.keys(UP6);for(let p=0;p{}; const w=UP6[R];return w?(Bx(w),()=>{var p=g.Y("universal_csi_network_ticks")?(p=RMr[R])?Bx(p):!1:!1;return p}):()=>{}}; Bx=function(R,w,p){return g.mJ(()=>{if(z3(R,p))return!1;u$(R,w,p);return!0})()}; Wx=function(R,w,p){g.mJ(()=>{if(!CV(p)||z3(R,p))return!1;u$(R,w,p);return!0})()}; pvx=function(){g.mJ(()=>{const R=Ti();requestAnimationFrame(()=>{setTimeout(()=>{R===Ti()&&u$("ftl",void 0,void 0)},0)})})()}; r8d=function(R){R&=16777215;var w=[(R&16711680)>>16,(R&65280)>>8,R&255];R=w[0];var p=w[1];w=w[2];R=Number(R);p=Number(p);w=Number(w);if(R!=(R&255)||p!=(p&255)||w!=(w&255))throw Error('"('+R+","+p+","+w+'") is not a valid RGB color');p=R<<16|p<<8|w;return R<16?"#"+(16777216|p).toString(16).slice(1):"#"+p.toString(16)}; g.l$=function(){if(!xJ){xJ=new jb(new f1d);const R=ne("client_streamz_web_flush_count",-1);R!==-1&&(xJ.O=R)}return xJ}; GFl=function(){let R=!1;try{R=!!window.sessionStorage.getItem("session_logininfo")}catch{R=!0}return(g.n("INNERTUBE_CLIENT_NAME")==="WEB"||g.n("INNERTUBE_CLIENT_NAME")==="WEB_CREATOR")&&R}; LV=function(){try{window.sessionStorage.removeItem("stickiness_reload");window.sessionStorage.removeItem("session_logininfo");Gh("LOGIN_INFO","");window.sessionStorage.setItem("from_switch_account","1");var R;let p=I1Y;p||(p=document.querySelector("#persist_identity"));if(R=p){var w=R.src?(new URL(R.src)).origin:"*";R.contentWindow?.postMessage({action:"clear"},w)}}catch{}}; qR=function(R){R&&(R.startsWith("https://accounts.google.com/AddSession")?LV():R.startsWith("https://accounts.google.com/ServiceLogin")?LV():R.startsWith("https://myaccount.google.com")&&g.wf(R).C.endsWith("/youtubeoptions")&&LV());if(g.n("LOGGED_IN",!0)&&GFl()){var w=g.n("VALID_SESSION_TEMPDATA_DOMAINS",[]);var p=g.sH(window.location.href);p&&w.push(p);p=g.sH(R);g.ra(w,p)||!p&&pj(R,"/")?(w=BO(R),(w=WO(w))?(w=WoW(w),w=(w=g.kE(w)||null)?lF(w):{}):w=null):w=null;w==null&&(w={});p=w;var r=void 0;GFl()? (r||(r=g.n("LOGIN_INFO")),r?(p.session_logininfo=r,p=!0):p=!1):p=!1;p&&mV(R,w)}}; g.C9H=function(R){var w=window;R=g.bu(R,{});qR(R);R=g.Zp(R+"");w=w.location;R=Fr(R);R!==void 0&&(w.href=R)}; g.A1=function(R,w={},p=!1){const r=g.n("EVENT_ID");r&&(w.ei||(w.ei=r));w&&mV(R,w);p||(qR(R),g.C9H(R))}; var xPb=function(R,w){return SD[l[5]](this,10,7276,R,w)}; g.b$=function(R,w,p,r,f=!1){p&&mV(R,p);p=g.Zp(R);const G=g.$k(p);R!=G&&zh(Error(`Unsafe window.open URL: ${R}`));R=G;w=w||x2(R).toString(36);try{if(f)return f=R,f=zsL(f),qR(f),g.g2(window,f,w,"attributionsrc")}catch(I){g.uF(I)}qR(R);return g.g2(window,p,w,r)}; uBY=function(R){y2=R}; sR_=function(R){V2=R}; m3I=function(R){ow=R}; Bed=function(){zMb=ow=V2=y2=null}; Wsd=function(R){R.addEventListener("updateKevlarOrC3Companion",uBY);R.addEventListener("updateEngagementPanelAction",sR_);R.addEventListener("changeEngagementPanelVisibility",m3I);window.addEventListener("yt-navigate-start",Bed)}; l1b=function(){var R=window.location.href;if(g.Y("kevlar_disable_theme_param"))return null;ma(R);try{const w=g.Ak(R).theme;return x3r.get(w)||null}catch(w){}return null}; LsW=function(R,w){if(w.encryptedTokenJarContents&&(R.L[w.encryptedTokenJarContents]=w,typeof w.expirationSeconds==="string")){const p=Number(w.expirationSeconds);setTimeout(()=>{delete R.L[w.encryptedTokenJarContents]},p*1E3); R.C&&g.NL("CONSISTENCY",w.encryptedTokenJarContents,p,void 0,!0)}}; t1=function(R){return R.localStorage===void 0?new eh("yt-client-location"):R.localStorage}; g.CF=function(R,w=!1,p=!1){var r=g.n("INNERTUBE_CONTEXT");if(!r)return g.LF(Error("Error: No InnerTubeContext shell provided in ytconfig.")),{};r=g.Hk(r);g.Y("web_no_tracking_params_in_shell_killswitch")||delete r.clickTracking;r.client||(r.client={});var f=r.client;f.clientName==="MWEB"&&f.clientFormFactor!=="AUTOMOTIVE_FORM_FACTOR"&&(f.clientFormFactor=g.n("IS_TABLET")?"LARGE_FORM_FACTOR":"SMALL_FORM_FACTOR");f.screenWidthPoints=window.innerWidth;f.screenHeightPoints=window.innerHeight;f.screenPixelDensity= Math.round(window.devicePixelRatio||1);f.screenDensityFloat=window.devicePixelRatio||1;f.utcOffsetMinutes=-Math.floor((new Date).getTimezoneOffset());var G=g.SN();var I="USER_INTERFACE_THEME_LIGHT";G.vS(165)?I="USER_INTERFACE_THEME_DARK":G.vS(174)?I="USER_INTERFACE_THEME_LIGHT":!g.Y("kevlar_legacy_browsers")&&window.matchMedia&&window.matchMedia("(prefers-color-scheme)").matches&&window.matchMedia("(prefers-color-scheme: dark)").matches&&(I="USER_INTERFACE_THEME_DARK");G=l1b()||I;f.userInterfaceTheme= G;if(!w){if(G=sDY())f.connectionType=G;g.Y("web_log_effective_connection_type")&&(G=zpY())&&(r.client.effectiveConnectionType=G)}g.Y("web_log_memory_total_kbytes")&&g.qx.navigator?.deviceMemory&&(r.client.memoryTotalKbytes=`${g.qx.navigator?.deviceMemory*1E6}`);if(g.Y("web_gcf_hashes_innertube")){var C=AKd();C&&(G=C.coldConfigData,I=C.coldHashData,C=C.hotHashData,r.client.configInfo=r.client.configInfo||{},G&&(r.client.configInfo.coldConfigData=G),I&&(r.client.configInfo.coldHashData=I),C&&(r.client.configInfo.hotHashData= C))}G=g.Ak(g.qx.location.href);!g.Y("web_populate_internal_geo_killswitch")&&G.internalcountrycode&&(f.internalGeo=G.internalcountrycode);f.clientName==="MWEB"||f.clientName==="WEB"?(f.mainAppWebInfo||(f.mainAppWebInfo={}),f.mainAppWebInfo.graftUrl=g.qx.location.href,g.Y("kevlar_woffle")&&q1_.instance&&(G=q1_.instance,f.mainAppWebInfo.pwaInstallabilityStatus=!G.L&&G.C?"PWA_INSTALLABILITY_STATUS_CAN_BE_INSTALLED":"PWA_INSTALLABILITY_STATUS_UNKNOWN"),f.mainAppWebInfo.webDisplayMode=ve(),f.mainAppWebInfo.isWebNativeShareAvailable= navigator&&navigator.share!==void 0):f.clientName==="TVHTML5"&&(!g.Y("web_lr_app_quality_killswitch")&&(G=g.n("LIVING_ROOM_APP_QUALITY"))&&(f.tvAppInfo=Object.assign(f.tvAppInfo||{},{appQuality:G})),G=g.n("LIVING_ROOM_CERTIFICATION_SCOPE"))&&(f.tvAppInfo=Object.assign(f.tvAppInfo||{},{certificationScope:G}));if(!g.Y("web_populate_time_zone_itc_killswitch")){a:{if(typeof Intl!=="undefined")try{var u=(new Intl.DateTimeFormat).resolvedOptions().timeZone;break a}catch{}u=void 0}u&&(f.timeZone=u)}(u=dD())? f.experimentsToken=u:delete f.experimentsToken;f=ZJ();OT.instance||(OT.instance=new OT);u=Xb(OT.instance.L);r.request={...r.request,internalExperimentFlags:f,consistencyTokenJars:u};!g.Y("web_prequest_context_killswitch")&&(f=g.n("INNERTUBE_CONTEXT_PREQUEST_CONTEXT"))&&(r.request.externalPrequestContext=f);u=g.SN();f=u.vS(58);u=u.get("gsml","");r.user={...r.user};f&&(r.user.enableSafetyMode=f);u&&(r.user.lockedSafetyMode=!0);g.Y("warm_op_csn_cleanup")?p&&(w=g.ut())&&(r.clientScreenNonce=w):!w&&(w= g.ut())&&(r.clientScreenNonce=w);R&&(r.clickTracking={clickTrackingParams:R});if(R=g.yD("yt.mdx.remote.remoteClient_"))r.remoteClient=R;KV.getInstance().setLocationOnInnerTubeContext(r);try{var m=DJ(),z=m.bid;delete m.bid;r.adSignalsInfo={params:[],bid:z};for(const [B,W]of Object.entries(m))m=B,z=W,r.adSignalsInfo.params?.push({key:m,value:`${z}`});if(r.client?.clientName==="TVHTML5"||r.client?.clientName==="TVHTML5_UNPLUGGED"){const B=g.n("INNERTUBE_CONTEXT");B.adSignalsInfo&&(r.adSignalsInfo.advertisingId= B.adSignalsInfo.advertisingId,r.adSignalsInfo.advertisingIdSignalType="DEVICE_ID_TYPE_CONNECTED_TV_IFA",r.adSignalsInfo.limitAdTracking=B.adSignalsInfo.limitAdTracking)}}catch(B){g.LF(B)}return r}; y8I=function(R,w){if(!R)return!1;var p=g.F(R,A8_)?.signal;if(p&&w.l_)return!!w.l_[p];if((p=g.F(R,b9b)?.request)&&w.PV)return!!w.PV[p];for(const r in R)if(w.sB[r])return!0;return!1}; VZY=function(R){const w={"Content-Type":"application/json"};g.n("EOM_VISITOR_DATA")?w["X-Goog-EOM-Visitor-Id"]=g.n("EOM_VISITOR_DATA"):g.n("VISITOR_DATA")&&(w["X-Goog-Visitor-Id"]=g.n("VISITOR_DATA"));w["X-Youtube-Bootstrap-Logged-In"]=g.n("LOGGED_IN",!1);g.n("DEBUG_SETTINGS_METADATA")&&(w["X-Debug-Settings-Metadata"]=g.n("DEBUG_SETTINGS_METADATA"));R!=="cors"&&((R=g.n("INNERTUBE_CONTEXT_CLIENT_NAME"))&&(w["X-Youtube-Client-Name"]=R),(R=g.n("INNERTUBE_CONTEXT_CLIENT_VERSION"))&&(w["X-Youtube-Client-Version"]= R),(R=g.n("CHROME_CONNECTED_HEADER"))&&(w["X-Youtube-Chrome-Connected"]=R),(R=g.n("DOMAIN_ADMIN_STATE"))&&(w["X-Youtube-Domain-Admin-State"]=R),(R=KV.getInstance().getXGeoHeader?.())&&(w["X-Geo"]=R));(R=g.n("SERIALIZED_LAVA_DEVICE_CONTEXT"))&&(w["X-YouTube-Lava-Device-Context"]=R);return w}; MR=function(R){return()=>new R}; tZP=function(R){if(R.length===1)return R[0];var w=oZW.UNKNOWN_INTERFACE;if(w){w=new RegExp(w);for(var p of R)if(w.exec(p))return p}const r=[];Object.entries(oZW).forEach(([f,G])=>{"UNKNOWN_INTERFACE"!==f&&r.push(G)}); p=new RegExp(r.join("|"));R.sort((f,G)=>f.length-G.length); for(const f of R)if(!p.exec(f))return f;return R[0]}; g.cx=function(R){return`/youtubei/v1/${tZP(R)}`}; O9D=function(R,w,p,r,f){if(Px.instance!==void 0){if(r=Px.instance,R=[R!==r.G,w!==r.jt,p!==r.L,f!==r.O,!1,!1,!1],R.some(G=>G))throw new g.Id("InnerTubeTransportService is already initialized",R); }else Px.instance=new Px(R,w,p,r,f)}; Ksr=function(R,w){a:{R=R.G;var p=g.F(w,A8_)?.signal;if(p&&R.l_&&(p=R.l_[p])){var r=p();break a}if((p=g.F(w,b9b)?.request)&&R.PV&&(p=R.PV[p])){r=p();break a}for(r in w)if(R.sB[r]&&(w=R.sB[r])){r=w();break a}r=void 0}if(r!==void 0)return Promise.resolve(r)}; EZD=function(R,w,p){R=R.L.lz(w?.cX?.identity||BY,{sessionIndex:w?.cX?.sessionIndex});return{...VZY(p),...R}}; D3L=async function(R,w,p){R=await g.FB(R.L.lz(w?.cX?.identity||BY,{sessionIndex:w?.cX?.sessionIndex}));return Promise.resolve({...VZY(p),...R})}; $3H=async function(R,w,p,r=()=>{}){var f=w.config?.Jz?.nE; if(f&&R.O&&R.O.has(f)&&!w.config?.Jz?.disableCache){var G=await R.O.get(f);if(G&&!G.isExpired())return r=eMd(G),g.Y("web_process_response_store_responses")&&!G.isProcessed()&&(MZL(R,r,w),await c8d(R.O,f)),Promise.resolve(r)}await P9_(w);(f=w.config?.requestKey)&&R.C.has(f)?p=R.C.get(f):(G=JSON.stringify(w.I_),w.nA={...w.nA,headers:{...(w.nA?.headers??{}),...p}},p={...w.nA},w.nA.method==="POST"&&(p={...p,body:G}),w.config?.UD&&u$(w.config.UD),p=R.jt.fetch(w.input,p,w.config),f&&R.C.set(f,p));(p=await p)&& g.Y("web_streaming_player")&&Array.isArray(p)&&(p=p[0].playerResponse);if(p&&"error"in p&&p?.error?.details){G=p.error.details;for(const I of G)(G=I["@type"])&&a1_.indexOf(G)>-1&&(delete I["@type"],p=I)}f&&R.C.has(f)&&R.C.delete(f);w.config?.WG&&u$(w.config.WG);MZL(R,p,w);w.config?.gq&&u$(w.config.gq);r();return p||void 0}; aw=function(R,w,p){const r=Ksr(R,w);return r?new g.n9(async(f,G)=>{const I=(await r).K(w,p,BY);I?(qR(I.input),G=I.nA?.mode==="cors"?"cors":void 0,G=R.L.CF?EZD(R,I.config,G):await D3L(R,I.config,G),f($3H(R,I,G))):G(new g.Id("Error: Failed to build request for command.",w))}):jZ(new g.Id("Error: No request builder found for command.",w))}; g.$J=function(R,w,p,r,f={cX:{identity:BY}}){let G=()=>{}; G=wvW(S8x(p));w.context||(w.context=g.CF(r,!0));return new g.n9(async I=>{var C=Sd(p);C=o2(C)?"same-origin":"cors";C=R.L.CF?EZD(R,f,C):await D3L(R,f,C);var u=E9r(Sd(p));u={input:u,nA:RN(u),I_:w,config:f};I($3H(R,u,C,G))})}; P9_=async function(R){if(R?.I_?.context){R=R.I_.context;for(const w of[])await w.woN(R)}}; MZL=function(R,w,p){if(w&&!w?.sequenceMetaData?.skipProcessing&&R.K)for(const r of XvP)R.K[r]&&R.K[r].handleResponse(w,p)}; eMd=function(R){return{...R.data.innertubeResponse,cacheMetadata:{isCacheHit:!0}}}; c8d=async function(R,w){const p=R.L.get(w);p&&(p.entryData.isProcessed=!0,await nZW(R,w,p.entryData))}; nZW=async function(R,w,p){var r=R.C;if(p.expireTimestampMs){r=Number(p.expireTimestampMs)-Math.round((0,g.T)());const f=ne("mweb_override_response_store_expiration_ms");f>0&&f{R.remove(w)},r); R.L.set(w,{entryData:p,timer:r})}; Z9d=function(R,w){if(R=R.L.get(w))return new d3D(R.entryData)}; Y1_=function(R,w){const p=R.L.get(w);p&&(clearTimeout(p.timer),R.L.delete(w))}; XF=function(R,w,p){if(!g.Y("state_tags_killswitch")){var r=new FsW(w);if((r.L?.stateTagsModified||[]).length>0){var f=R.L.zD();for(var G of f){var I=Z9d(R.L,G);if(I){a:{f=r.L?.stateTagsModified||[];I=(new FsW(eMd(I))).L?.relevantStateTags||[];for(var C of I)if(C.stateTag!=null&&f.includes(C.stateTag)&&C.onStateTagModified==="STATE_TAG_CACHE_INSTRUCTION_EVICT_RESPONSE"){f=!0;break a}f=!1}f&&Y1_(R.L,G)}}}}r=w.responseContext?.maxAgeSeconds;if(p&&r&&Number(r)>0){r=Number(r)*1E3;G=Math.round((0,g.T)()); C=G.toString();w={innertubeResponse:w,serverDateTimestampMs:C,lastModifiedTimestampMs:C,expireTimestampMs:(G+r).toString(),isProcessed:!0};if(r=g.n("INNERTUBE_CONTEXT_CLIENT_NAME"))w.clientName=r;R.L.put(p,new d3D(w))}}; jR6=function(R,w,p){if(R.L){const r=ma(OH(w,"key"))||"/UNKNOWN_PATH";R.L.start(r)}R=p;g.Y("wug_networking_gzip_request")&&(R=JKD(p));return new window.Request(w,R)}; J8D=async function(R,w,p,r,f){const {value:G,done:I}=await w.read();if(I)return R.L?.success(),r;let C;try{C=p.parse(G)}catch(u){throw new g.nV("Failed to parse streaming response",G);}if(C!=null)for(const u of C)r.push(u),f?.(u);return J8D(R,w,p,r,f)}; g.J1=function(R,w,p){if(!dC){const I=mE();IO(I,{VC:Ter,RT:i9H});if(p?.r9){IO(I,{VC:Z6,uE:g.n("INNERTUBE_CONTEXT_CLIENT_NAME",p.clientInterface)});IO(I,{VC:YJ,uE:5184E6});IO(I,{VC:FF,RT:QRP,[Cv]:[Z6,YJ]});IO(I,{VC:jo,RT:hMx});var r=I.resolve(jo),f=window;if(f.ytInitialVideoId){var G=f.ytInitialVideoId;f.ytInitialPlayerResponse&&XF(r,f.ytInitialPlayerResponse,wy("player",{videoId:G}));f.ytInitialWatchNextResponse&&XF(r,f.ytInitialWatchNextResponse,wy("next",{videoId:G}));f.ytInitialReelItemWatchResponse&& XF(r,f.ytInitialReelItemWatchResponse,wy("reel_item_watch",{videoId:G}))}}r={sB:{feedbackEndpoint:MR(gZd),modifyChannelNotificationPreferenceEndpoint:MR(H9l),playlistEditEndpoint:MR(vZP),shareEntityEndpoint:MR(Neb),subscribeEndpoint:MR(kFI),unsubscribeEndpoint:MR(U3d),webPlayerShareEntityServiceEndpoint:MR(S1P)}};f=KV.getInstance();G={};f&&(G.client_location=f);p?.r9&&(f=I.resolve(jo),G.store=f);R===void 0&&(R=rZW());w===void 0&&(w=I.resolve(Ter));O9D(r,w,R,G,p?.r9?I.resolve(FF):void 0);IO(I,{VC:RNr, uE:Px.instance});dC=I.resolve(RNr)}return dC}; T3=function(R){const w={};R=R.split("&");for(const p of R)R=p.split("="),R.length===2&&(w[R[0]]=R[1]);return w}; w5d=async function(){var R=window;await bg(i$());const w=R.bgevmc;if(!w)throw Error("BGE Controls not exposed");return{pause:()=>{w.p()}, resume:()=>{w.r()}, checkForRefresh:()=>w.cr()}}; i$=function(){return g.Y("bg_st_hr")?"havuokmhhs-0":`havuokmhhs-${Math.floor(globalThis.performance?.timeOrigin||0)}`}; UT=function(R){window.bgens=R}; rod=function(){return new Promise(R=>{const w=window;w.ntpevasrs!==void 0?R(new p5I(w.ntpevasrs)):(w.ntpqfbel===void 0&&(w.ntpqfbel=[]),w.ntpqfbel.push(p=>{R(new p5I(p))}))})}; IFI=function(){if(Aj()){var R=g.n("PLAYER_VARS",{});if(g.ia(R,"privembed",!1)!="1"&&!PoW(R)){var w=()=>{So=!0;"google_ad_status"in window?Gh("DCLKSTAT",1):Gh("DCLKSTAT",2)}; try{const p=Hw(document);g.T9(fFx,w,p)}catch(p){}GSI.push(g.YM.SL(()=>{if(!(So||"google_ad_status"in window)){try{if(fFx.toString()&&w){var p=`${g.DL(w)}`,r=KcW[p];r&&g.jh(r)}}catch(f){}So=!0;Gh("DCLKSTAT",3)}},5E3))}}}; Ri=function(){const R=Number(g.n("DCLKSTAT",0));return isNaN(R)?0:R}; wP=function(R,w){R.L=w}; C0H=async function(R){let w;if(g.qx.ytAtP&&!g.Y("ytatp_ks")){var p=await g.qx.ytAtP;delete g.qx.ytAtP;let f=p?.R;w=p?.T;f?R.C.L(1,R.O++):(R.C.L(2,R.O++),p=await pm(R,rP(w,null)),f=JSON.stringify(p));g.qx.ytAtRC?g.qx.ytAtRC(f):g.AO(Error("ytAtRC not defined for ytAtP."))}else g.qx.ytAtRC?CX(async()=>{w=g.qx.ytAtT;delete g.qx.ytAtT;if(g.qx.ytAtRC){R.C.L(2,R.O++);var f=await pm(R,rP(w,null));g.qx.ytAtRC&&g.qx.ytAtRC(JSON.stringify(f))}else R.C.L(6,R.O++)},2,ne("att_init_delay",0)):(w=g.qx.ytAtT,delete g.qx.ytAtT, R.C.L(1,R.O++)); p=await rod();p.bindInnertubeChallengeFetcher(f=>{R.C.L(3,R.O++);return pm(R,rP(w,f))}); p.registerChallengeFetchedCallback(f=>{f=f.challenge;if(!f)throw Error("BGE_MACR");f={challenge:f,VQ:T3(f),z3:r,bgChallenge:new kw};f=Promise.resolve(f);R.L=f}); const r=await bg(i$());p=p.getLatestChallengeResponse().challenge;if(!p)throw Error("BGE_MACIL");return{challenge:p,VQ:T3(p),z3:r,bgChallenge:new kw}}; fm=async function(R){var w=rP(void 0,QX().L);try{var p=await uM6(R,w)}catch(C){return g.AO(Error("Failed to fetch attestation challenge after 5 attempts; not retrying for 24h.")),sh6(R,864E5),{challenge:"",VQ:{},z3:void 0,bgChallenge:void 0}}w=p.CT;const r=p.xC;sh6(R,(Number(r.t)||7200)*1E3);R=void 0;if("c1a"in r&&p.bgChallenge){p=p.bgChallenge;var f=new kw;if(p.interpreterJavascript){var G=kC(p.interpreterJavascript);G=kk(G).toString();var I=new gW;uf(I,6,G);kL(f,gW,1,I,rl)}else p.interpreterUrl&& (G=UV(p.interpreterUrl),G=cw(G).toString(),I=new H5,uf(I,4,G),kL(f,H5,2,I,rl));p.interpreterHash&&sj(f,3,p.interpreterHash,rl);p.program&&sj(f,4,p.program,rl);p.globalName&&sj(f,5,p.globalName,rl);p.clientExperimentsStateBlob&&sj(f,7,p.clientExperimentsStateBlob,rl);try{await v5(QX(),f)}catch(C){return g.AO(C),{challenge:w,VQ:r,z3:R,bgChallenge:f}}try{R=new IQ({challenge:f,UX:{z_:"aGIf"}}),await R.bE}catch(C){g.AO(C),R=void 0}}return{challenge:w,VQ:r,z3:R,bgChallenge:f}}; pm=async function(R,w){const p=R.G;if(!p||p.zg())return mnW(R,w);Wx("att_pna",void 0,"attestation_challenge_fetch");return new Promise(r=>{p.Yh("publicytnetworkstatus-online",()=>{mnW(R,w).then(r)})})}; uM6=async function(R,w){let p=void 0,r=0;for(;r<5;){if(r>0){const f=1E3*Math.pow(2,r-1)+Math.random()*1E3;await new Promise(G=>{g.uq(0,()=>{G(void 0)},f)})}try{R.C.L(4,R.O++); const f=await pm(R,w);return zNr(f)}catch(f){p=f,f instanceof Error&&g.AO(f)}r++}throw p;}; sh6=function(R,w){const p=Date.now()+w,r=async()=>{const f=p-Date.now();f<1E3?await BWD(R):CX(r,0,Math.min(f,6E4))}; r()}; mnW=async function(R,w){UT(2);try{const p=await pm(R.network,w);p?p.challenge&&!p.bgChallenge?UT(1):UT(4):UT(3);return p}catch(p){UT(3)}}; zNr=function(R){if(!R)throw Error("Fetching Attestation challenge returned falsy");if(!R.challenge)throw Error("Missing Attestation challenge");const w=R.challenge,p=T3(w);if("c1a"in p&&(!R.bgChallenge||!R.bgChallenge.program))throw Error("Expected bg challenge but missing.");return{...R,CT:w,xC:p}}; BWD=async function(R){const w=await Promise.race([R.L,null]);var p=fm(R);R.L=p;w?.z3?.dispose()}; W6d=function(R,w){return new Promise(p=>{g.uq(0,()=>{p(w())},R)})}; rP=function(R,w){const p={engagementType:"ENGAGEMENT_TYPE_UNBOUND"};R&&(p.eacrToken=R);w&&(p.interpreterHash=w);return p}; xnD=function(){return new Promise(R=>{const w=window;w.attmp!==void 0?R(w.attmp):(w.attmq===void 0&&(w.attmq=[]),w.attmq.push(p=>{R(p)}))})}; g.L6P=async function(R,w){if(lFD()){var p=window;return p.attmp!==void 0?p.attmp.s("ENGAGEMENT_TYPE_PLAYBACK",R,w):(await xnD()).s("ENGAGEMENT_TYPE_PLAYBACK",R,w)}return(p=(p=g.yD("yt.aba.att"))?p:GQ.instance!==void 0?GQ.instance.K.bind(GQ.instance):null)?p("ENGAGEMENT_TYPE_PLAYBACK",R,w):Promise.resolve({error:"ATTESTATION_ERROR_API_NOT_READY"})}; g.qFx=async function(){if(lFD())return window.attmp===void 0?!1:(await xnD()).ir();var R;return(R=(R=g.yD("yt.aba.att2"))?R:GQ.instance!==void 0?GQ.instance.J.bind(GQ.instance):null)?R():Promise.resolve(!1)}; lFD=function(){return(g.Y("attmusi")||g.Y("attmusiw"))&&g.Y("attmusi_ue")}; bwl=function(R,w){var p=g.yD("ytDebugData.callbacks");p||(p={},g.AY("ytDebugData.callbacks",p));if(g.Y("web_dd_iu")||Aod.includes(R))p[R]=w}; g.Ii=function(R,w,p){const r={...R};for(const f of Object.keys(w)){const G=R[f],I=w[f];if(I===void 0)delete r[f];else if(G===void 0)r[f]=I;else if(Array.isArray(I)&&Array.isArray(G))r[f]=p?[...G,...I]:I;else if(!Array.isArray(I)&&g.Kd(I)&&!Array.isArray(G)&&g.Kd(G))r[f]=g.Ii(G,I,p);else if(typeof I===typeof G)r[f]=I;else return w=new g.Id("Attempted to merge fields of differing types.",{name:"DeepMergeError",key:f,dHk:G,updateValue:I}),g.LF(w),R}return r}; yod=function(R,w){return R.L.length===0?!1:(R=R.L[R.L.length-1])&&R.buffer===w.buffer&&R.byteOffset+R.length===w.byteOffset}; Cm=function(R){R.G=void 0;R.C=0;R.O=0}; uY=function(R,w){for(const p of w.L)R.append(p)}; sA=function(R,w,p){let {wf:r,eY:f}=R.split(w);({wf:r}=f.split(p));return r}; m$=function(R,w,p){R.isFocused(w);return w-R.O+p<=R.L[R.C].length}; VbW=function(R){if(!R.G){const w=R.L[R.C];R.G=new DataView(w.buffer,w.byteOffset,w.length)}return R.G}; owD=function(R,w=0,p=-1){if(!R.totalLength||!p)return new DataView(new ArrayBuffer(0));p<0&&(p=R.totalLength-w);R.focus(w);if(!m$(R,w,p)){var r=R.C,f=R.O;R.focus(w+p-1);f=new Uint8Array(R.O+R.L[R.C].length-f);let G=0;for(let I=r;I<=R.C;I++)f.set(R.L[I],G),G+=R.L[I].length;R.L.splice(r,R.C-r+1,f);Cm(R);R.focus(w)}r=R.L[R.C];return new DataView(r.buffer,r.byteOffset+w-R.O,p)}; zQ=function(R,w=0,p=-1){R=owD(R,w,p);return new Uint8Array(R.buffer,R.byteOffset,R.byteLength)}; BX=function(R,w=0,p=-1){R=zQ(R,w,p);w=new Uint8Array(R.length);try{w.set(R)}catch(r){for(p=0;p>1&3)==1){if(!(xr(p[l[G^4434]])||p[l[G^4434]][l[0]](l[G^4449])||p[l[G^4434]][l[0]](l[G^4473])||p[l[G^4434]][l[0]](l[G^4375])))throw new g.Id(l[G^4477],p[l[G^4434]]);var I=g.wf(p[l[G^4434]]);p[l[G^4442]]=I[l[G^4451]];p[l[4]]=I[l[G^4448]]+(I[l[4]]!=null?`:${I[l[4]]}`:l[1]);var C=I[l[G^4434]];C[l[0]](l[G^4457])?(p[l[G^4431]]=l[G^4457],C=C[l[6]](G^4428)):C[l[0]](l[G^4364])?(p[l[G^4431]]=l[G^4364],C=C[l[6]](G^4431)):C[l[0]](l[G^4357])?(C=KA(2,G^2914,C,p),C=C[0]): (p[l[G^4431]]=C,C=l[1]);var u=p[l[G^4448]];p[l[G^4448]]=XJ(G^4435,G^6414,C);Object[l[G^4437]](p[l[G^4448]],XJ(G^4437,G^8037,I[l[G^4458]][l[G^4433]]()));Object[l[G^4437]](p[l[G^4448]],u);p[l[G^4448]][l[G^4456]]===l[G^4359]&&(delete p[l[G^4448]][l[G^4456]],p[l[G^4431]]+=l[G^4371]);p[l[G^4434]]=l[1];p[l[G^4444]]=l[1];p[l[G^4458]]&&(I=KA(G^4458,G^2035,p));var m=[]}(R^13)>>5<1&&R+5>=-34&&(r===l[G^3226]&&((I=f[l[G^3212]](l[G^3201]))>=0?(r=`cmo=${f[l[6]](0,I)}`,f=f[l[6]](I+1)):(I=f[l[G^3212]](l[G^3245]))>= 0&&(r=`cmo=${f[l[6]](0,I)}`,f=f[l[6]](I+3))),p[r]=f);(R&125)==R&&(I=hV(G^4754,G^908,p),r[l[G^4757]](l[G^4743],I),m=[]);return m}; Owd=function(R){const w=new Uint8Array(R.length);for(let p=0;p>10;f=56320|f&1023}qX[G++]=f}f=String.fromCharCode.apply(String, qX);G<1024&&(f=f.substring(0,G));p.push(f)}return p.join("")}; yx=function(R,w){if(bY?.encodeInto){const {read:r,written:f}=bY.encodeInto(R,w);return r>6|192:((f&64512)===55296&&r+1>18|240,w[p++]=f>>12&63|128):w[p++]=f>>12|224,w[p++]=f>>6&63|128),w[p++]=f&63|128)}return p}; Vx=function(R){if(bY)return bY.encode(R);let w=new Uint8Array(Math.ceil(R.length*1.2)),p=yx(R,w);w.lengthp&&(w=w.subarray(0,p));return w}; OA=function(R,w){R=R instanceof Uint8Array?new oi([R]):R;return w(new tH(R))}; Km=function(R){let w=WX(R.L,R.pos);++R.pos;if(w<128)return w;let p=w&127,r=1;for(;w>=128;)w=WX(R.L,R.pos),++R.pos,r*=128,p+=(w&127)*r;return p}; EA=function(R,w){let p=R.C;for(R.C=-1;R.pos+1<=R.L.totalLength;){p<0&&(p=Km(R));var r=p>>3;const f=p&7;if(r===w)return!0;if(r>w){R.C=p;break}p=-1;switch(f){case 0:Km(R);break;case 1:R.pos+=8;break;case 2:r=Km(R);R.pos+=r;break;case 5:R.pos+=4}}return!1}; DC=function(R,w){if(EA(R,w))return Km(R)}; eW=function(R,w){if(EA(R,w))return w=zQ(R.L,R.pos,8),R.pos+=8,(new DataView(w.buffer,w.byteOffset,w.byteLength)).getFloat64(0,!0)}; MX=function(R,w){if(EA(R,w))return!!Km(R)}; cX=function(R,w){if(EA(R,w)){w=Km(R);var p=zQ(R.L,R.pos,w);R.pos+=w;return p}}; PX=function(R,w){if(R=cX(R,w))return g.AH(R)}; ai=function(R,w,p){if(R=cX(R,w))return p(new tH(new oi([R])))}; $r=function(R,w){const p=[];for(;EA(R,w);)p.push(Km(R));return p.length?p:void 0}; XX=function(R,w,p){const r=[];let f;for(;f=cX(R,w);)r.push(p(new tH(new oi([f]))));return r.length?r:void 0}; K6W=function(R,w){R=new Uint8Array(R);w&&R.set(w);return R}; g.nm=function(R,w){const p=new Ewr(4096);w(p,R);return new Uint8Array(p.L.buffer,p.L.byteOffset,p.pos)}; dP=function(R,w){w=R.pos+w;if(!(R.L.length>=w)){for(var p=R.L.length*2;p268435455){dP(R,4);let p=w&1073741823;for(let r=0;r<4;r++)R.view.setUint8(R.pos,p&127|128),p>>=7,R.pos+=1;w=Math.floor(w/268435456)}for(dP(R,4);w>127;)R.view.setUint8(R.pos,w&127|128),w>>=7,R.pos+=1;R.view.setUint8(R.pos,w);R.pos+=1}; Yr=function(R,w,p){p!==void 0&&(ZC(R,w*8),ZC(R,p))}; FX=function(R,w,p){p!==void 0&&Yr(R,w,p?1:0)}; jW=function(R,w,p){p!==void 0&&(ZC(R,w*8+2),w=p.length,ZC(R,w),dP(R,w),R.L.set(p,R.pos),R.pos+=w)}; DnP=function(R,w,p=2){ZC(R,w*8+2);R.C.push(R.pos);R.C.push(p);R.pos+=p}; eNd=function(R){let w=R.C.pop(),p=R.C.pop(),r=R.pos-p-w;for(;w--;){const f=w?128:0;R.view.setUint8(p++,r&127|f);r>>=7}}; JH=function(R,w,p){p!==void 0&&(DnP(R,w,Math.ceil(Math.log2(p.length*4+2)/7)),dP(R,p.length*1.2),w=yx(p,R.L.subarray(R.pos)),R.pos+w>R.L.length&&(dP(R,w),w=yx(p,R.L.subarray(R.pos))),R.pos+=w,eNd(R))}; TQ=function(R,w,p,r,f=3){p&&(DnP(R,w,f),r(R,p),eNd(R))}; g.iY=function(R){var w=new tH(new oi([X0(decodeURIComponent(R))]));R=PX(w,2);w=DC(w,4);const p=Mb_[w];if(typeof p==="undefined")throw R=new g.Id("Failed to recognize field number",{name:"EntityKeyHelperError",fieldNumber:w}),g.LF(R),R;return{LI:w,entityType:p,entityId:R}}; g.Qx=function(R,w){const p=new Ewr;jW(p,2,Vx(R));R=co6[w];if(typeof R==="undefined")throw w=new g.Id("Failed to recognize entity type",{name:"EntityKeyHelperError",entityType:w}),g.LF(w),w;Yr(p,4,R);Yr(p,5,1);w=new Uint8Array(p.L.buffer,p.L.byteOffset,p.pos);return encodeURIComponent(g.c8(w,0))}; hH=function(R){R=R.key||R.id;if(!R)throw Error("Entity key is missing");return R}; gP=function(R,w,p,r){if(r===void 0){const {[p]:f,...G}=R[w]||{};return{...R,[w]:G}}return{...R,[w]:{...R[w],[p]:r}}}; P0d=function(R,w,p,r,f){const G=R[w]||{},I=G[p];if(!I&&!g.Y("web_enable_entity_upsert_on_update"))return R;r=g.Ii(I||{},r,f==="REPEATED_FIELDS_MERGE_OPTION_APPEND");return{...R,[w]:{...G,[p]:r}}}; aFr=function(R={},w){switch(w.type){case "ENTITY_LOADED":return w.payload.reduce((p,r)=>{const f=r.options?.persistenceOption;if(f&&f!=="ENTITY_PERSISTENCE_OPTION_UNKNOWN"&&f!=="ENTITY_PERSISTENCE_OPTION_INMEMORY_AND_PERSIST")return p;if(!r.entityKey)return g.LF(Error("Missing entity key")),p;if(r.type==="ENTITY_MUTATION_TYPE_REPLACE"){if(!r.payload)return r=new g.Id("REPLACE entity mutation is missing a payload",{entityKey:r.entityKey}),g.LF(r),p;var G=g.aM(r.payload);return gP(p,G,r.entityKey,r.payload[G])}if(r.type=== "ENTITY_MUTATION_TYPE_DELETE"){a:{r=r.entityKey;try{const I=g.iY(r).entityType;G=gP(p,I,r);break a}catch(I){if(I instanceof Error){r=new g.Id("Failed to deserialize entity key",{entityKey:r,originalMessage:I.message});g.LF(r);G=p;break a}throw I;}G=void 0}return G}if(r.type==="ENTITY_MUTATION_TYPE_UPDATE"){if(!r.payload)return r=new g.Id("UPDATE entity mutation is missing a payload",{entityKey:r.entityKey}),g.LF(r),p;G=g.aM(r.payload);return P0d(p,G,r.entityKey,r.payload[G],r.fieldMask?.mergeOptions?.repeatedFieldsMergeOption)}return p}, R); case "REPLACE_ENTITY":return gP(R,w.payload.entityType,w.payload.key,w.payload.Sn);case "REPLACE_ENTITIES":return Object.keys(w.payload).reduce((p,r)=>{const f=w.payload[r];return Object.keys(f).reduce((G,I)=>gP(G,r,I,f[I]),p)},R); case "UPDATE_ENTITY":return P0d(R,w.payload.entityType,w.payload.key,w.payload.Sn,w.payload.FLI);default:return R}}; HX=function(R,w,p){return R[w]?R[w][p]||null:null}; $nr=function(){if(vX)return vX();vX=UP("PersistentEntityStoreDb",{I5:{EntityStore:{vC:1},EntityAssociationStore:{vC:2}},shared:!1,upgrade(R,w){w(1)&&dx(Xo(R,"EntityStore",{keyPath:"key"}),"entityType","entityType");w(2)&&(R=Xo(R,"EntityAssociationStore",{keyPath:["parentEntityKey","childEntityKey"]}),dx(R,"byParentEntityKey","parentEntityKey"),dx(R,"byChildEntityKey","childEntityKey"))},version:3});return vX()}; X5W=function(R){return g.TD($nr(),R)}; NX=function(R){return window.Int32Array?new Int32Array(R):Array(R)}; nwd=function(R){const w=R.key;let p=R.counter[0]^w[0],r=R.counter[1]^w[1],f=R.counter[2]^w[2],G=R.counter[3]^w[3];for(var I=3;I>=0&&!(R.counter[I]=-~R.counter[I]);I--);let C,u,m=4;for(;m<40;)I=kr[p>>>24]^UA[r>>16&255]^SW[f>>8&255]^R3[G&255]^w[m++],C=kr[r>>>24]^UA[f>>16&255]^SW[G>>8&255]^R3[p&255]^w[m++],u=kr[f>>>24]^UA[G>>16&255]^SW[p>>8&255]^R3[r&255]^w[m++],G=kr[G>>>24]^UA[p>>16&255]^SW[r>>8&255]^R3[f&255]^w[m++],p=I,r=C,f=u;R=R.C;I=w[40];R[0]=wX[p>>>24]^I>>>24;R[1]=wX[r>>16&255]^I>>16&255;R[2]= wX[f>>8&255]^I>>8&255;R[3]=wX[G&255]^I&255;I=w[41];R[4]=wX[r>>>24]^I>>>24;R[5]=wX[f>>16&255]^I>>16&255;R[6]=wX[G>>8&255]^I>>8&255;R[7]=wX[p&255]^I&255;I=w[42];R[8]=wX[f>>>24]^I>>>24;R[9]=wX[G>>16&255]^I>>16&255;R[10]=wX[p>>8&255]^I>>8&255;R[11]=wX[r&255]^I&255;I=w[43];R[12]=wX[G>>>24]^I>>>24;R[13]=wX[p>>16&255]^I>>16&255;R[14]=wX[r>>8&255]^I>>8&255;R[15]=wX[f&255]^I&255}; fH=function(){if(!pH&&!g.gx){if(rX)return rX;rX=window.crypto?.subtle;if(rX?.importKey&&rX?.sign&&rX?.encrypt)return rX;rX=void 0}}; dnd=async function(R,w,p){R.L||(R.L=await R.subtleCrypto.importKey("raw",R.C,{name:"AES-CTR"},!1,["encrypt"]));R=await R.subtleCrypto.encrypt({name:"AES-CTR",counter:p,length:128},R.L,w);return new Uint8Array(R)}; Zwr=function(R){R.L=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];R.D=[];R.D.length=64;R.G=0;R.C=0}; YF_=function(R,w,p){const r=R.D;let f=R.L[0],G=R.L[1],I=R.L[2],C=R.L[3],u=R.L[4],m=R.L[5],z=R.L[6],B=R.L[7],W,x,q;for(let O=0;O<64;)O<16?(r[O]=q=w[p]<<24|w[p+1]<<16|w[p+2]<<8|w[p+3],p+=4):(W=r[O-2],x=r[O-15],q=r[O-7]+r[O-16]+((W>>>17|W<<15)^(W>>>19|W<<13)^W>>>10)+((x>>>7|x<<25)^(x>>>18|x<<14)^x>>>3),r[O]=q),W=B+G7[O]+q+((u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7))+(u&m^~u&z),x=((f>>>2|f<<30)^(f>>>13|f<<19)^(f>>>22|f<<10))+(f&G^f&I^G&I),B=W+x,C+=W,O++,O<16?(r[O]=q=w[p]<<24|w[p+1]<<16|w[p+2]<<8|w[p+ 3],p+=4):(W=r[O-2],x=r[O-15],q=r[O-7]+r[O-16]+((W>>>17|W<<15)^(W>>>19|W<<13)^W>>>10)+((x>>>7|x<<25)^(x>>>18|x<<14)^x>>>3),r[O]=q),W=z+G7[O]+q+((C>>>6|C<<26)^(C>>>11|C<<21)^(C>>>25|C<<7))+(C&u^~C&m),x=((B>>>2|B<<30)^(B>>>13|B<<19)^(B>>>22|B<<10))+(B&f^B&G^f&G),z=W+x,I+=W,O++,O<16?(r[O]=q=w[p]<<24|w[p+1]<<16|w[p+2]<<8|w[p+3],p+=4):(W=r[O-2],x=r[O-15],q=r[O-7]+r[O-16]+((W>>>17|W<<15)^(W>>>19|W<<13)^W>>>10)+((x>>>7|x<<25)^(x>>>18|x<<14)^x>>>3),r[O]=q),W=m+G7[O]+q+((I>>>6|I<<26)^(I>>>11|I<<21)^(I>>>25| I<<7))+(I&C^~I&u),x=((z>>>2|z<<30)^(z>>>13|z<<19)^(z>>>22|z<<10))+(z&B^z&f^B&f),m=W+x,G+=W,O++,O<16?(r[O]=q=w[p]<<24|w[p+1]<<16|w[p+2]<<8|w[p+3],p+=4):(W=r[O-2],x=r[O-15],q=r[O-7]+r[O-16]+((W>>>17|W<<15)^(W>>>19|W<<13)^W>>>10)+((x>>>7|x<<25)^(x>>>18|x<<14)^x>>>3),r[O]=q),W=u+G7[O]+q+((G>>>6|G<<26)^(G>>>11|G<<21)^(G>>>25|G<<7))+(G&I^~G&C),x=((m>>>2|m<<30)^(m>>>13|m<<19)^(m>>>22|m<<10))+(m&z^m&B^z&B),q=B,B=C,C=q,q=z,z=I,I=q,q=m,m=G,G=q,u=f+W,f=W+x,O++;R.L[0]=f+R.L[0]|0;R.L[1]=G+R.L[1]|0;R.L[2]=I+R.L[2]| 0;R.L[3]=C+R.L[3]|0;R.L[4]=u+R.L[4]|0;R.L[5]=m+R.L[5]|0;R.L[6]=z+R.L[6]|0;R.L[7]=B+R.L[7]|0}; F6W=function(R){const w=new Uint8Array(32);var p=64-R.C;R.C>55&&(p+=64);const r=new Uint8Array(p);r[0]=128;let f=R.G*8;for(let G=1;G<9;G++){const I=f%256;r[p-G]=I;f=(f-I)/256}R.update(r);for(p=0;p<8;p++)w[p*4]=R.L[p]>>>24,w[p*4+1]=R.L[p]>>>16&255,w[p*4+2]=R.L[p]>>>8&255,w[p*4+3]=R.L[p]&255;Zwr(R);return w}; JoL=function(R,w,p){R=new jhP(R.L);R.update(w);R.update(p);w=F6W(R);R.update(R.K);R.update(w);w=F6W(R);R.reset();return w}; TWb=async function(R,w,p){R.L||(R.L=await R.subtleCrypto.importKey("raw",R.C,{name:"HMAC",hash:"SHA-256"},!1,["sign"]));const r=new Uint8Array(w.length+p.length);r.set(w);r.set(p,w.length);R=await R.subtleCrypto.sign({name:"HMAC",hash:"SHA-256"},R.L,r);return new Uint8Array(R)}; QhI=async function(R,w,p,r){R.C||(R.C=new iwd(R.L,r));return TWb(R.C,w,p)}; gw_=function(R,w,p){R.O||(R.O=new hNd(R.L));return JoL(R.O,w,p)}; Hwr=async function(R,w,p){const r=fH();if(r)try{return await QhI(R,w,p,r)}catch(f){return g.AO(f),pH=!0,gw_(R,w,p)}else return gw_(R,w,p)}; vwP=function(R){return R instanceof Error?new I3("UNKNOWN_ENCODE_ERROR",{originalMessage:R.message}):new I3("UNKNOWN_ENCODE_ERROR")}; NWW=function(R){return R instanceof Error?new I3("UNKNOWN_DECODE_ERROR",{originalMessage:R.message}):new I3("UNKNOWN_DECODE_ERROR")}; kSD=function(R,w){R=R instanceof I3?R:w(R);g.LF(R);throw R;}; g.UnW=function(R,w,p){try{return R.O(w,p)}catch(r){kSD(r,vwP)}}; CH=function(R){R=(new TextEncoder).encode(R).subarray(0,16);const w=new Uint8Array(16);w.set(R);return w}; RxD=function(R){const w=SFL[R];if(w)return w;g.AO(new g.Id("Entity model not found.",{entityType:R}))}; sa=function(R,w){a:{R=g.u6(R.C,w.version);try{var p=R.C(w.data,w.key);break a}catch(r){kSD(r,NWW)}p=void 0}return p}; g.my=function(R,w,p){return R.L.objectStore("EntityStore").get(w).then(r=>{if(r){if(p&&r.entityType!==p)throw Error("Incorrect entity type");return sa(R,r)}})}; g.z7=function(R,w,p){return p?(p=p.map(r=>g.my(R,r,w)),g.DZ.all(p)):R.L.objectStore("EntityStore").index("entityType").getAll(IDBKeyRange.only(w)).then(r=>r.map(f=>sa(R,f)))}; g.phd=function(R,w,p){const r=hH(w);return g.Bz(R,r).then(()=>wh_(R,w,p))}; g.Wz=function(R,w,p){let r=R.O[p];r||(r=new Set,R.O[p]=r);r.add(w)}; g.xV=function(R,w,p){const r=hH(w),f=g.u6(R.C,1),G={...w};return R.L.objectStore("EntityStore").get(r).then(I=>{if(I){if(I.entityType!==p)throw Error("Incorrect entity type");G.entityMetadata||(I=sa(R,I),G.entityMetadata=I.entityMetadata)}}).then(()=>{const I={key:r, entityType:p,data:g.UnW(f,G,r),version:1};return g.DZ.all([R.L.objectStore("EntityStore").put(I),g.phd(R,G,p)])}).then(()=>{g.Wz(R,r,p); return r})}; f8l=function(R,w,p){if(p.has(w))return g.DZ.resolve(void 0);p.add(w);return rD6(R,w).then(r=>R.L.objectStore("EntityAssociationStore").index("byParentEntityKey").delete(IDBKeyRange.only(w)).then(()=>r)).then(r=>{let f=g.DZ.resolve(void 0); for(const G of r)f=f.then(()=>f8l(R,G,p)); return f}).then(()=>{})}; g.l6=function(R,w,p){if(p?.UF){const f=new Set;return f8l(R,w,f).then(()=>{const G=[];for(const I of f)G.push(g.l6(R,I));return g.DZ.all(G).then(()=>{})})}const r=g.iY(w).entityType; return g.DZ.all([R.L.objectStore("EntityStore").delete(w),g.Bz(R,w)]).then(()=>{g.Wz(R,w,r)})}; g.Bz=function(R,w){return R.L.objectStore("EntityAssociationStore").index("byParentEntityKey").delete(IDBKeyRange.only(w))}; G_d=function(R,w){w=w.map(p=>g.l6(R,p)); return g.DZ.all(w).then(()=>{})}; wh_=function(R,w,p){const r=hH(w);p=RxD(p);if(!p)return g.DZ.resolve([]);w=new p(w);R=R.L.objectStore("EntityAssociationStore");p=[];for(const f of w.C())p.push(R.put({parentEntityKey:r,childEntityKey:f}));return g.DZ.all(p).then(f=>f.map(G=>G[1]))}; rD6=function(R,w){const p=R.L.objectStore("EntityAssociationStore");return p.index("byParentEntityKey").getAll(IDBKeyRange.only(w)).then(r=>{const f=[];for(const G of r)f.push(p.index("byChildEntityKey").getAll(G.childEntityKey));return g.DZ.all(f)}).then(r=>{const f=[]; for(const G of r)G.length===1&&f.push(G[0].childEntityKey);return f})}; g.u6=function(R,w=0){R=R.L[w];if(!R)throw w=new I3("INVALID_ENCODER_VERSION",{e6:w}),g.LF(w),w;return R}; I8D=function(R,w){for(const p of R.observers)p(w)}; g.LH=async function(R,w,p){var r=await X5W(R.token);let f;w=await g.$v(r,["EntityStore","EntityAssociationStore"],w,G=>{f=new ChL(G,R.L);return p(f)}); f&&(r=f.O,Object.keys(r).length>0&&(R.channel.postMessage(r),I8D(R,r)));return w}; g.qH=function(R,w,p){return g.LH(R,{mode:"readwrite",ZT:!0},r=>g.xV(r,w,p))}; g.AB=function(R,w){return g.LH(R,{mode:"readwrite",ZT:!0},p=>g.l6(p,w))}; uOb=function(R,w){return g.LH(R,{mode:"readwrite",ZT:!0},p=>G_d(p,w))}; g.b6=function(R,w,p){return g.LH(R,{mode:"readonly",ZT:!0},r=>g.z7(r,w,p))}; g.Vc=function(){yc||(yc=sQP());return yc}; sQP=async function(){try{const w=await g.kv();if(w&&GD()&&typeof g.qx.BroadcastChannel!=="undefined"){var R=new m_Y;return new zxd(w,R)}}catch(w){w instanceof Error&&g.LF(w)}}; WRH=function(R){let w="";for(let r=0;r=0||V7(R,0,"gad_source",R.search(ot))>=0}; D_I=function(R,w){var p=mE().resolve(E5_);if(KRl(w)){var r=t4(w,"gclid");w={handleEvent:f=>{R&&!R.closed&&typeof R.postMessage==="function"&&f&&f.origin&&f.source===R&&f.data&&f.data.action==="gcl_setup"&&R.postMessage({action:"gcl_transfer",...(r&&{gclid:r}),gadSource:2},f.origin)}}; for(const [f,G]of p.L){const I=f,C=G;if(I.closed)try{window.removeEventListener("message",C),p.L.delete(I)}catch(u){g.LF(u)}}R&&p.L.size<15&&(p.L.set(R,w),window.addEventListener("message",w))}}; tB=function(R,w,p){if(!w)return R.length>=1?R[R.length-1]:null;for(const r of R)if(r.width&&r.height&&(p&&r.width>=w||!p&&r.height>=w))return r;for(w=R.length-1;w>=0;w--)if(p&&R[w].width||!p&&R[w].height)return R[w];return R[0]}; Msl=function(R,w,p,r,f,G){p?(R.kp(2),g.T9(g.wD(p),()=>{if(window.trayride)exH(R,r,f);else{R.kp(3);const I=Ool(p),C=document.getElementById(I);C&&(oAd(I),C.parentNode.removeChild(C));g.AO(new g.Id("BL:ULB",`${p}`))}},G)):w?(G=g.sW("SCRIPT"),w instanceof vw?(G.textContent=kk(w),U3(G)):G.textContent=w,G.nonce=Hw(document),document.head.appendChild(G),document.head.removeChild(G),window.trayride?exH(R,r,f):(R.kp(4),g.AO(new g.Id("BL:ULBJ")))):g.AO(new g.Id("BL:ULV"))}; exH=function(R,w,p){R.kp(5);const r=!!R.ZI&&cDI.includes(g.sH(R.ZI)||"");try{const f=new IQ({program:w,globalName:"trayride",UX:{disable:!g.Y("att_web_record_metrics")||!g.Y("att_skip_metrics_for_cookieless_domains_ks")&&r,z_:"aGIf"}});f.bE.then(()=>{R.kp(6);p&&p(w)}); R.L(f)}catch(f){R.kp(7),f instanceof Error&&g.AO(f)}}; Oa=function(){const R=g.yD("yt.abuse.playerAttLoader");return R&&["bgvma","bgvmb","bgvmc"].every(w=>w in R)?R:null}; PhD=function(R,w,p){let r=!1;for(const [f]of R.MJ.entries()){const G=f;G.slotType==="SLOT_TYPE_PLAYER_BYTES"&&G.R0==="core"&&(r=!0)}if(r){a:if(!p){for(const [f,G]of R.MJ.entries())if(R=f,p=G,R.slotType==="SLOT_TYPE_IN_PLAYER"&&R.R0==="core"){p=p.layoutId;break a}p=void 0}p?w.H3(p):MY("No triggering layout ID available when attempting to mute.")}}; KH=function(R,w,p){R.cS();R.L.get(w)&&g.LF(Error(`Extension name ${w} already registered`));R.L.set(w,p)}; Xhd=function(R,w=[],p,r){R.cS();const f=[],G=[];for(const I of w)g.F(I,a8b)||g.F(I,$_P)?f.push(I):G.push(I);for(const I of f)Ea(R,I,p,r);for(const I of G)Ea(R,I,p,r)}; n5D=function(R,w){KH(R,w.Uk(),(p,r,f)=>{w.Nj(p,r,f)})}; Ea=function(R,w,p,r){R.cS();w.loggingUrls&&d_P(R,"loggingUrls",w.loggingUrls,p,r);for(const [f,G]of Object.entries(w)){w=f;const I=G;w==="openPopupAction"?Dj(R.C$.get(),"innertubeCommand",{openPopupAction:I}):w==="confirmDialogEndpoint"?Dj(R.C$.get(),"innertubeCommand",{confirmDialogEndpoint:I}):Z4H.hasOwnProperty(w)||d_P(R,w,I,p,r)}}; d_P=function(R,w,p,r,f){if((R=R.L.get(w))&&typeof R==="function")try{R(p,r,f)}catch(G){g.LF(G)}else w=new g.Id("Unhandled field",w),g.AO(w)}; MH=function(R,w,p){if(p&&!p.includes(R.layoutType))return!1;for(const r of w)if(!ey(R.clientMetadata,r))return!1;return!0}; Y2d=function(R,w){switch(R){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 w(R),8}}; ey=function(R,w){return R.L.has(w)}; cz=function(R){return Array.from(R.L.keys())}; Pz=function(R,w,p){if(p&&p!==R.slotType)return!1;for(const r of w)if(!ey(R.clientMetadata,r))return!1;return!0}; jQr=function(R){return FRx.get(R)?.YL||"ADS_CLIENT_EVENT_TYPE_UNSPECIFIED"}; $V=function(R,w){const p={type:w.slotType,controlFlowManagerLayer:JD_.get(w.R0)||"CONTROL_FLOW_MANAGER_LAYER_UNSPECIFIED"};w.slotEntryTrigger&&(p.entryTriggerType=w.slotEntryTrigger.triggerType);w.slotPhysicalPosition!==1&&(p.slotPhysicalPosition=w.slotPhysicalPosition);if(R){p.debugData={slotId:w.slotId};if(R=w.slotEntryTrigger)p.debugData.slotEntryTriggerData=a3(R);R=w.slotFulfillmentTriggers;p.debugData.fulfillmentTriggerData=[];for(const r of R)p.debugData.fulfillmentTriggerData.push(a3(r));w= w.slotExpirationTriggers;p.debugData.expirationTriggerData=[];for(const r of w)p.debugData.expirationTriggerData.push(a3(r))}return p}; T4b=function(R,w){const p={type:w.layoutType,controlFlowManagerLayer:JD_.get(w.R0)||"CONTROL_FLOW_MANAGER_LAYER_UNSPECIFIED"};R&&(p.debugData={layoutId:w.layoutId});return p}; a3=function(R,w){const p={type:R.triggerType};w!=null&&(p.category=w);R.triggeringSlotId!=null&&(p.triggerSourceData||(p.triggerSourceData={}),p.triggerSourceData.associatedSlotId=R.triggeringSlotId);R.triggeringLayoutId!=null&&(p.triggerSourceData||(p.triggerSourceData={}),p.triggerSourceData.associatedLayoutId=R.triggeringLayoutId);return p}; i4_=function(R,w,p,r){w={opportunityType:w};R&&(r||p)&&(r=g.gd(r||[],f=>$V(R,f)),w.debugData={...(p&&p.length>0?{associatedSlotId:p}:{}), ...(r.length>0?{slots:r}:{})});return w}; nH=function(R,w){return p=>QQY(Xe(R),w.slotId,w.slotType,w.slotPhysicalPosition,w.R0,w.slotEntryTrigger,w.slotFulfillmentTriggers,w.slotExpirationTriggers,p.layoutId,p.layoutType,p.R0)}; QQY=function(R,w,p,r,f,G,I,C,u,m,z){return{adClientDataEntry:{slotData:$V(R,{slotId:w,slotType:p,slotPhysicalPosition:r,R0:f,slotEntryTrigger:G,slotFulfillmentTriggers:I,slotExpirationTriggers:C,clientMetadata:new dX([])}),layoutData:T4b(R,{layoutId:u,layoutType:m,R0:z,layoutExitNormalTriggers:[],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],Ig:new Map,clientMetadata:new dX([]),UQ:{}})}}}; Xe=function(R){return R.L||R.BS.get().B.V().Y("html5_force_debug_data_for_client_tmp_logs")}; Zj=function(R,w){R.C.add(w)}; YV=function(R,w){R.C.delete(w)}; gX=function(R,w,p){if(Fe(R.L,w)){a:switch(jy(R.L,w).L){case "exit_requested":var r=!0;break a;default:r=!1}if(!r)a:switch(jy(R.L,w).L){case "rendering_stop_requested":r=!0;break a;default:r=!1}if(r&&(jy(R.L,w).K=!0,!p))return;if(JB(jy(R.L,w)))jy(R.L,w).K=!0,hxI(R,w,p);else{a:switch(jy(R.L,w).G){case "fill_requested":p=!0;break a;default:p=!1}if(p)jy(R.L,w).K=!0,Fe(R.L,w)&&(T7(R.qr,"ADS_CLIENT_EVENT_TYPE_CANCEL_SLOT_FULFILLMENT_REQUESTED",w),R=jy(R.L,w),R.G="fill_cancel_requested",R.D.Gj());else{p= i6(R.L,w);(r=R.BS.get().B.V().experiments.XB("h5_enable_layout_unscheduling_events"))&&(p?R.hF(w,p):MY(Error("Layout is null for LayoutUnscheduled event."),w,p,void 0,!1));T7(R.qr,"ADS_CLIENT_EVENT_TYPE_UNSCHEDULE_SLOT_REQUESTED",w);const C=jy(R.L,w);var f=w.slotEntryTrigger;const u=C.xY.get(f.triggerId);u&&(u.ek(f),C.xY.delete(f.triggerId));for(var G of w.slotFulfillmentTriggers)if(f=C.pB.get(G.triggerId))f.ek(G),C.pB.delete(G.triggerId);for(var I of w.slotExpirationTriggers)if(G=C.X.get(I.triggerId))G.ek(I), C.X.delete(I.triggerId);C.layout!=null&&(I=C.layout,Qc(C,I.layoutExitNormalTriggers),Qc(C,I.layoutExitSkipTriggers),Qc(C,I.layoutExitMuteTriggers),Qc(C,I.layoutExitUserInputSubmittedTriggers),Qc(C,I.layoutExitUserCancelledTriggers));C.D=void 0;C.C!=null&&(C.C.release(),C.C=void 0);C.O!=null&&(C.O.release(),C.O=void 0);I=R.L;jy(I,w)&&(I=hB(I,`${w.slotType}_${w.slotPhysicalPosition}`))&&I.delete(w.slotId);T7(R.qr,"ADS_CLIENT_EVENT_TYPE_SLOT_UNSCHEDULED",w);for(const m of R.C)m.HK(w),p&&!r&&m.hF(w,p)}}}}; vz=function(R,w){if(Fe(R.L,w)){jy(R.L,w).J=!1;var p=Hz;w=jy(R.L,w);const r=[...w.U];Gp(w.U);p(R,r)}}; g5W=function(R,w){Fe(R.L,w)&&JB(jy(R.L,w))&&i6(R.L,w)&&!NH(R.L,w)&&(kV(R.qr,"ADS_CLIENT_EVENT_TYPE_ENTER_LAYOUT_REQUESTED",w,i6(R.L,w)??void 0),R=jy(R.L,w),R.L!=="entered"&&Ua(R.slot,R.L,"enterLayoutForSlot"),R.L="rendering",R.O.startRendering(R.layout))}; R1=function(R,w,p,r){MY(p,w,void 0,void 0,p.FS);p.zw?Sy(R.qr,r,p.zw,w):MY("adsClientErrorMessage is missing.",w);gX(R,w,!0)}; H4d=function(R,w,p){if(Fe(R.L,w))if(jy(R.L,w).G=p?"filled":"not_filled",p===null){kV(R.qr,"ADS_CLIENT_EVENT_TYPE_SLOT_FULFILLED_EMPTY",w);for(var r of R.C)r.Rk(w);gX(R,w,!1)}else{kV(R.qr,"ADS_CLIENT_EVENT_TYPE_SLOT_FULFILLED_NON_EMPTY",w,p);kV(R.qr,"ADS_CLIENT_EVENT_TYPE_LAYOUT_RECEIVED",w,p);if(r=p.u9??p.clientMetadata.FB("metadata_type_sub_layouts"))for(const I of r)kV(R.qr,"ADS_CLIENT_EVENT_TYPE_LAYOUT_RECEIVED",w,I);for(const I of R.C)I.VG(w);if(Fe(R.L,w))if(jy(R.L,w).K)gX(R,w,!1);else{kV(R.qr, "ADS_CLIENT_EVENT_TYPE_SCHEDULE_LAYOUT_REQUESTED",w,p);try{var f=R.L;if(!jy(f,w))throw new wJ("Unknown slotState for onLayout",void 0,"ADS_CLIENT_ERROR_MESSAGE_SLOT_STATE_IS_NULL");if(!f.Eu.Iz.get(w.slotType))throw new wJ("No LayoutRenderingAdapterFactory registered for slot of type: "+w.slotType,void 0,"ADS_CLIENT_ERROR_MESSAGE_CANNOT_FIND_MATCHING_LAYOUT_RENDERING_ADAPTER_FACTORY");if(p.layoutExitNormalTriggers.length==0&&p.layoutExitSkipTriggers.length==0&&p.layoutExitMuteTriggers.length==0&&p.layoutExitUserInputSubmittedTriggers.length== 0&&p.layoutExitUserCancelledTriggers.length==0)throw new wJ("Layout has no exit triggers.",void 0,"ADS_CLIENT_ERROR_MESSAGE_EMPTY_LAYOUT_EXIT_TRIGGER");p2(f,"TRIGGER_CATEGORY_LAYOUT_EXIT_NORMAL",p.layoutExitNormalTriggers);p2(f,"TRIGGER_CATEGORY_LAYOUT_EXIT_USER_SKIPPED",p.layoutExitSkipTriggers);p2(f,"TRIGGER_CATEGORY_LAYOUT_EXIT_USER_MUTED",p.layoutExitMuteTriggers);p2(f,"TRIGGER_CATEGORY_LAYOUT_EXIT_USER_INPUT_SUBMITTED",p.layoutExitUserInputSubmittedTriggers);p2(f,"TRIGGER_CATEGORY_LAYOUT_EXIT_USER_CANCELLED", p.layoutExitUserCancelledTriggers)}catch(I){I instanceof wJ?R.qO(w,p,I,"ADS_CLIENT_ERROR_TYPE_SCHEDULE_LAYOUT_FAILED"):R.qO(w,p,new wJ(`Unexpected error: ${I}`,void 0,"ADS_CLIENT_ERROR_MESSAGE_UNEXPECTED_ERROR"),"ADS_CLIENT_ERROR_TYPE_SCHEDULE_LAYOUT_FAILED");gX(R,w,!0);return}jy(R.L,w).J=!0;try{var G=R.L;const I=jy(G,w),C=G.Eu.Iz.get(w.slotType).get().build(G.G,G.C,w,p);C.init();I.layout=p;if(I.O)throw new wJ("Already had LayoutRenderingAdapter registered for slot",void 0,"ADS_CLIENT_ERROR_MESSAGE_BUILD_DUPLICATE_LAYOUT_RENDERING_ADAPTER"); I.O=C;rJ(G,I,"TRIGGER_CATEGORY_LAYOUT_EXIT_NORMAL",p.layoutExitNormalTriggers);rJ(G,I,"TRIGGER_CATEGORY_LAYOUT_EXIT_USER_SKIPPED",p.layoutExitSkipTriggers);rJ(G,I,"TRIGGER_CATEGORY_LAYOUT_EXIT_USER_MUTED",p.layoutExitMuteTriggers);rJ(G,I,"TRIGGER_CATEGORY_LAYOUT_EXIT_USER_INPUT_SUBMITTED",p.layoutExitUserInputSubmittedTriggers);rJ(G,I,"TRIGGER_CATEGORY_LAYOUT_EXIT_USER_CANCELLED",p.layoutExitUserCancelledTriggers)}catch(I){vz(R,w);I instanceof wJ?R.qO(w,p,I,"ADS_CLIENT_ERROR_TYPE_SCHEDULE_LAYOUT_FAILED"): R.qO(w,p,new wJ(`Unexpected error: ${I}`,void 0,"ADS_CLIENT_ERROR_MESSAGE_UNEXPECTED_ERROR"),"ADS_CLIENT_ERROR_TYPE_SCHEDULE_LAYOUT_FAILED");gX(R,w,!0);return}kV(R.qr,"ADS_CLIENT_EVENT_TYPE_LAYOUT_SCHEDULED",w,p);for(const I of R.C)I.BK(w,p);vz(R,w);g5W(R,w)}else R=R.BS.get(),g.f2(R.B.V())||GE(R.B.V())||g.I1(R.B.V())?R=!0:(MY("Composite VOD on legacy path."),R=!1),R&&MY("slot is unscheduled after been fulfilled.",w,p)}}; v5x=function(R,w,p){w.R0!=="core"&&kV(R.qr,"ADS_CLIENT_EVENT_TYPE_LAYOUT_RECEIVED",w,p)}; N4W=function(R,w,p){kV(R.qr,"ADS_CLIENT_EVENT_TYPE_LAYOUT_SCHEDULED",w,p);for(const r of R.C)r.BK(w,p)}; k_Y=function(R,w,p){kV(R.qr,"ADS_CLIENT_EVENT_TYPE_LAYOUT_ENTERED",w,p);for(const r of R.C)r.zK(w,p)}; hxI=function(R,w,p){if(Fe(R.L,w)&&JB(jy(R.L,w))){var r=i6(R.L,w);if(r&&NH(R.L,w))U_H(R,w,r,p?"error":"abandoned");else{T7(R.qr,"ADS_CLIENT_EVENT_TYPE_EXIT_SLOT_REQUESTED",w);try{const f=jy(R.L,w);if(!f)throw new Q("Cannot exit slot it is unregistered",void 0,"ADS_CLIENT_ERROR_MESSAGE_SLOT_WAS_UNREGISTERED");f.L!=="enter_requested"&&f.L!=="entered"&&f.L!=="rendering"&&Ua(f.slot,f.L,"exitSlot");f.L="exit_requested";if(f.C===void 0)throw f.L="scheduled",new Q("Cannot exit slot because adapter is not defined", void 0,"ADS_CLIENT_ERROR_MESSAGE_NO_SLOT_ADAPTER_REGISTERED");f.C.Sh()}catch(f){f instanceof Q&&f.zw?(Sy(R.qr,"ADS_CLIENT_ERROR_TYPE_EXIT_SLOT_FAILED",f.zw,w),MY(f,w,void 0,void 0,f.FS)):(Sy(R.qr,"ADS_CLIENT_ERROR_TYPE_EXIT_SLOT_FAILED","ADS_CLIENT_ERROR_MESSAGE_UNEXPECTED_ERROR",w),MY(f,w))}}}}; S2r=function(R,w,p,r){kV(R.qr,jQr(r),w,p);for(const f of R.C)f.mU(w,p,r)}; Hz=function(R,w){w.sort((f,G)=>{if(f.category===G.category)return f.trigger.triggerId.localeCompare(G.trigger.triggerId);const I=C=>{MY("TriggerCategoryOrder enum does not contain trigger category: "+C)}; return Y2d(f.category,I)-Y2d(G.category,I)}); var p=new Map;for(var r of w){if(!Fe(R.L,r.slot))continue;if(jy(R.L,r.slot).J){jy(R.L,r.slot).U.push(r);continue}RAd(R.qr,r.slot,r,r.layout);(w=p.get(r.category))||(w=[]);w.push(r);p.set(r.category,w)}for(const [f,G]of wZl)r=G,(w=p.get(f))&&pZI(R,w,r);(r=p.get("TRIGGER_CATEGORY_SLOT_EXPIRATION"))&&rfH(R,r);(r=p.get("TRIGGER_CATEGORY_SLOT_FULFILLMENT"))&&fcd(R,r);(p=p.get("TRIGGER_CATEGORY_SLOT_ENTRY"))&&Ga_(R,p)}; pZI=function(R,w,p){for(const r of w)r.layout&&NH(R.L,r.slot)&&U_H(R,r.slot,r.layout,p)}; rfH=function(R,w){for(const p of w)gX(R,p.slot,!1)}; fcd=function(R,w){for(const p of w){a:switch(jy(R.L,p.slot).G){case "not_filled":w=!0;break a;default:w=!1}w&&(T7(R.qr,"ADS_CLIENT_EVENT_TYPE_FULFILL_SLOT_REQUESTED",p.slot),R.L.MC(p.slot))}}; Ga_=function(R,w){for(const f of w){T7(R.qr,"ADS_CLIENT_EVENT_TYPE_ENTER_SLOT_REQUESTED",f.slot);for(const G of R.C)G.vK(f.slot);try{var p=R.L,r=f.slot;const G=jy(p,r);if(!G)throw new Q("Got enter request for unknown slot",void 0,"ADS_CLIENT_ERROR_MESSAGE_SLOT_STATE_IS_NULL");if(!G.C)throw new Q("Tried to enter slot with no assigned slotAdapter",void 0,"ADS_CLIENT_ERROR_MESSAGE_NO_SLOT_ADAPTER_REGISTERED");if(G.L!=="scheduled")throw new Q("Tried to enter a slot from stage: "+G.L,void 0,"ADS_CLIENT_ERROR_MESSAGE_ILLEGAL_SLOT_STATE"); if(JB(G))throw new Q("Got enter request for already active slot",void 0,"ADS_CLIENT_ERROR_MESSAGE_SLOT_COLLISION");for(const I of hB(p,`${r.slotType}_${r.slotPhysicalPosition}`).values())if(G!==I&&JB(I)&&(G.slot.fulfilledLayout?.layoutType!=="LAYOUT_TYPE_VIDEO_INTERSTITIAL_CENTERED"||I.layout?.layoutType!=="LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY"))throw new Q("Trying to enter a slot when a slot of same type is already active.",{activeSlotStatus:I.L},"ADS_CLIENT_ERROR_MESSAGE_DUPLICATE_SLOT");}catch(G){G instanceof Q&&G.zw?(Sy(R.qr,"ADS_CLIENT_ERROR_TYPE_ENTER_SLOT_FAILED",G.zw,f.slot),MY(G,f.slot,i6(R.L,f.slot),void 0,G.FS)):(Sy(R.qr,"ADS_CLIENT_ERROR_TYPE_ENTER_SLOT_FAILED","ADS_CLIENT_ERROR_MESSAGE_UNEXPECTED_ERROR",f.slot),MY(G,f.slot));gX(R,f.slot,!0);continue}w=jy(R.L,f.slot);w.L!=="scheduled"&&Ua(w.slot,w.L,"enterSlot");w.L="enter_requested";w.C.Nh()}}; U_H=function(R,w,p,r){Fe(R.L,w)&&(kV(R.qr,FRx.get(r)?.jm||"ADS_CLIENT_EVENT_TYPE_UNSPECIFIED",w,p),R=jy(R.L,w),R.L!=="rendering"&&Ua(R.slot,R.L,"exitLayout"),R.L="rendering_stop_requested",R.O.Fn(p,r))}; JB=function(R){return R.L==="enter_requested"||R.isActive()}; Fe=function(R,w){return jy(R,w)!=null}; i6=function(R,w){(R=jy(R,w))?R.layout!=null&&!R.layout&&MY("Unexpected empty layout",w):MY("Unexpected undefined slotState",w);return R?.layout||null}; IcY=function(R){const w=[];R.L.forEach(p=>{for(const r of p.values())w.push(r.slot)}); return w}; NH=function(R,w){R=jy(R,w);if(w=R.layout!=null)a:switch(R.L){case "rendering":case "rendering_stop_requested":w=!0;break a;default:w=!1}return w}; hB=function(R,w){return(R=R.L.get(w))?R:new Map}; jy=function(R,w){return hB(R,`${w.slotType}_${w.slotPhysicalPosition}`).get(w.slotId)}; C2=function(R,w,p){if(p.length==0)throw new Q(`No ${COD.get(w)} triggers found for slot.`,void 0,uLb(w));for(const r of p)if(!R.Eu.aG.get(r.triggerType))throw new Q("No trigger adapter registered for "+w+" trigger of type: "+r.triggerType,void 0,"ADS_CLIENT_ERROR_MESSAGE_NO_TRIGGER_ADAPTER_REGISTERED_FOR_TYPE");}; Ua=function(R,w,p){MY(`Slot stage was ${w} when calling method ${p}`,R)}; Qc=function(R,w){for(const p of w)if(w=R.S.get(p.triggerId))w.ek(p),R.S.delete(p.triggerId)}; p2=function(R,w,p){for(const r of p)if(!R.Eu.aG.get(r.triggerType))throw new wJ(`No trigger adapter registered for ${COD.get(w)} trigger of type: ${r.triggerType}`,void 0,"ADS_CLIENT_ERROR_MESSAGE_NO_TRIGGER_ADAPTER_REGISTERED_FOR_TYPE");}; rJ=function(R,w,p,r){for(const f of r)r=R.Eu.aG.get(f.triggerType),r.vu(p,f,w.slot,w.layout?w.layout:null),w.S.set(f.triggerId,r)}; uLb=function(R){switch(R){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"}}; syd=function(R){return up(R.Sq).concat(up(R.aG)).concat(up(R.kq)).concat(up(R.NV)).concat(up(R.Iz))}; up=function(R){const w=[];for(const p of R.values())p.Ik&&w.push(p);return w}; v=function(R){return new mG6(R)}; WPl=function(R){const w=new zAb((p,r,f,G)=>new Bfb(R.L.Eu,p,r,f,G,R.L.BS),new Set(syd(R.L.Eu).concat(R.L.listeners)),R.L.qr,R.L.BS); g.K(R,w);return w}; m7=function(R,w,p){Xhd(R.L(),w,p)}; zE=function(R,w,p,r){(R=R.L())||MY("Could not initiate a command router instance.");Ea(R,w,p,r)}; xGD=function(R,w){const p=w.bgp&&w.bgub,r=!!w.upb;w.siub&&w.scs&&(p||r)&&(r&&BS(R.BS.get(),"html5_export_sodar_snapshot")&&P6(async f=>(await bg(i$())).snapshot(f)),L3H(w.siub,w.scs,w.bgub,w.bgp,w.upb))}; q4d=function(R,w,p,r){R.L&&MY("Currently active request ongoing for slot. This should never happen",R.slot);R.L=w();R.L.then(f=>{R.L=null;r&&r(f);const G=f.aT?"LAYOUT_TYPE_THROTTLED_AD_BREAK_RESPONSE":"LAYOUT_TYPE_AD_BREAK_RESPONSE";var I=R.C.get(),C=R.slot.slotId,u=nH(R.L3.get(),{slotId:R.slot.slotId,slotType:R.slot.slotType,slotPhysicalPosition:R.slot.slotPhysicalPosition,R0:R.slot.R0,slotEntryTrigger:R.slot.slotEntryTrigger,slotFulfillmentTriggers:R.slot.slotFulfillmentTriggers,slotExpirationTriggers:R.slot.slotExpirationTriggers}); const m=WS(I.C.get(),G,C),z={layoutId:m,layoutType:G,R0:"core"};f={layoutId:m,layoutType:G,Ig:new Map,layoutExitNormalTriggers:[new lcd(I.L,C)],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],R0:"core",clientMetadata:new dX([new LP6(f)]),UQ:u(z)};H4d(R.callback,R.slot,f)},f=>{R.L=null; p&&p();f instanceof U1||R1(R.callback,R.slot,new Q(f,void 0,"ADS_CLIENT_ERROR_MESSAGE_AD_BREAK_REQUEST_ERROR",!0),"ADS_CLIENT_ERROR_TYPE_FULFILL_SLOT_FAILED")})}; Afd=function(R){if(R.L==null)R.callback.OS(R.slot);else try{R.L.cancel(),R.L=null,R.callback.OS(R.slot)}catch(w){R.L=null,R1(R.callback,R.slot,new Q(w,void 0,"ADS_CLIENT_ERROR_MESSAGE_CANCEL_SLOT_FULFILLMENT_FAILURE"),"ADS_CLIENT_ERROR_TYPE_CANCEL_FULFILL_SLOT_FAILED")}}; xc=function(R,w,p=!1,r=""){!R&&p&&g.AO(Error(`Player URL validator detects invalid url. ${r}: ${w}`));return R}; lp=function(R,w){return w&&w.test(R)?!0:!1}; yfd=function(R){return(R=bK6&&bK6.exec(R))?R[0]:""}; xr=function(R){return xc(lp(R,V6d),R,!1,"Trusted Stream URL")}; g.L2=function(R){return xc(lp(R,oMW),R,!1,"Trusted Image URL")}; OKd=function(R){return xc(lp(R,t6l),R,!1,"Trusted Promoted Video Domain URL")}; EMP=function(R){return xc(lp(R,KPI),R,!1,"Drm Licensor URL")}; eA6=function(R,w=!1){return xc(lp(R,DGd),R,w,"Captions URL")}; M6_=function(R){R=new g.Qd(R);g.hD(R,document.location.protocol);g.g4(R,document.location.hostname);document.location.port&&g.Hh(R,document.location.port);return R.toString()}; q7=function(R){R=new g.Qd(R);g.hD(R,document.location.protocol);return R.toString()}; cfl=function(R){return R===-0x8000000000000?"BEFORE_MEDIA_START":R===0?"MEDIA_START":R===0x7ffffffffffff?"MEDIA_END":R===0x8000000000000?"AFTER_MEDIA_END":R.toString()}; g.A6=function(R,w){return R.start-w.start||R.priority-w.priority||R.C-w.C}; g.bp=function(R){return`crn_${R}`}; g.yl=function(R){return`crx_${R}`}; POd=function(R,w){switch(R.style){case Vl.CHAPTER_MARKER:return w?8:5;case Vl.AD_MARKER:return 6;case Vl.TIME_MARKER:return Number.POSITIVE_INFINITY;default:return 0}}; acl=function(R){R.V2?.get().FO(R.slot.clientMetadata.FB("metadata_type_cue_point").identifier)}; o1=function(R,w){return Pz(R,w.sy,w.slotType)?!0:!1}; XZH=function(R){if(R.slot.clientMetadata.FB("metadata_type_allow_pause_ad_break_request_slot_reschedule")){const w=$GL(R,R.slot);t6(R.L.get(),"OPPORTUNITY_TYPE_PAUSE_AD_BREAK_REQUEST_SLOT_RESCHEDULE",()=>[w])}}; nMI=function(R){if(R.slot.clientMetadata.FB("metadata_type_prefetch_metadata")){const w=$GL(R,R.slot);t6(R.L.get(),"OPPORTUNITY_TYPE_PLAYER_RESPONSE_RECEIVED",()=>[w])}}; $GL=function(R,w){const p=Ot(R.C.get(),R.slot.slotType);R={...R.slot};if(w.slotEntryTrigger){var r=w.slotId;var f=w.slotEntryTrigger;r=f.triggeringSlotId!=null&&f.triggeringSlotId===r?f.clone(p):f}else r=void 0;return{...R,slotId:p,slotEntryTrigger:r,slotFulfillmentTriggers:dGd(w.slotId,p,w.slotFulfillmentTriggers),slotExpirationTriggers:dGd(w.slotId,p,w.slotExpirationTriggers)}}; dGd=function(R,w,p){const r=[];for(const f of p)r.push(f.triggeringSlotId!=null&&f.triggeringSlotId===R?f.clone(w):f);return r}; g.K2=function(R,w){for(const p of Object.keys(w)){const r=w[p];R=R.replace(new RegExp("\\$"+p,"gi"),()=>r)}return R}; Et=function(R,w,p){w.layoutId!==R.layout.layoutId?R.L.qO(R.slot,w,new wJ("Unknown layout received. "+`Required LayoutId: ${R.layout.layoutId}`+`and LayoutType: ${R.layout.layoutType}`,void 0,"ADS_CLIENT_ERROR_MESSAGE_UNKNOWN_LAYOUT"),"ADS_CLIENT_ERROR_TYPE_ENTER_LAYOUT_FAILED"):p()}; ev=function(R,w,p,r,f,G,I,C){r=r||p.clientMetadata.FB(G);R=DT(R);const u=eE(()=>{f.zK(w,p)}); C.push(I(r,R,p.layoutId,{adsClientData:p.UQ},()=>{u()}))}; cS=function(R,w,p,r,f,G,I,C,u){if(w===R)if(u){if(u===C.layoutId){a:{for(const m of p.keys())if(m.slotType==="SLOT_TYPE_PLAYER_BYTES"&&G===p.get(m).layoutId){R=!0;break a}R=!1}R?M7(r,1):f?f():MY("Tried to call engagePingCallback but it is null",I,C)}}else MY("Companion AdUxClick received without a layoutId",I,C)}; PS=function(R){return!!R.get("active_view_viewable")?.length||!!R.get("active_view_measurable")?.length||!!R.get("active_view_fully_viewable_audible_half_duration")?.length||!!R.get("audio_audible")?.length||!!R.get("audio_measurable")?.length}; a1=function(R){return R?.activeViewTracking?.trafficType??"ACTIVE_VIEW_TRAFFIC_TYPE_UNSPECIFIED"}; $c=function(R){return new Map([["impression",R.impressionPings||[]],["error",R.errorPings||[]],["mute",R.mutePings||[]],["unmute",R.unmutePings||[]],["pause",R.pausePings||[]],["rewind",R.rewindPings||[]],["resume",R.resumePings||[]],["skip",R.skipPings||[]],["swipe",R.swipePings||[]],["close",R.closePings||[]],["progress",R.progressPings||[]],["clickthrough",R.clickthroughPings||[]],["fullscreen",R.fullscreenPings||[]],["active_view_viewable",R.activeViewViewablePings||[]],["active_view_measurable", R.activeViewMeasurablePings||[]],["active_view_fully_viewable_audible_half_duration",R.activeViewFullyViewableAudibleHalfDurationPings||[]],["audio_audible",R.activeViewTracking?.activeViewAudioAudiblePings||[]],["audio_measurable",R.activeViewTracking?.activeViewAudioMeasurablePings||[]],["end_fullscreen",R.endFullscreenPings||[]],["channel_clickthrough",R.channelClickthroughPings||[]],["abandon",R.abandonPings||[]],["start",R.startPings||[]],["first_quartile",R.firstQuartilePings||[]],["midpoint", R.secondQuartilePings||[]],["third_quartile",R.thirdQuartilePings||[]],["complete",R.completePings||[]],["unmuted_impression",R.unmutedImpressionPings||[]],["unmuted_error",R.unmutedErrorPings||[]],["unmuted_mute",R.unmutedMutePings||[]],["unmuted_unmute",R.unmutedUnmutePings||[]],["unmuted_pause",R.unmutedPausePings||[]],["unmuted_resume",R.unmutedResumePings||[]],["unmuted_close",R.unmutedClosePings||[]],["unmuted_progress",R.unmutedProgressPings||[]],["unmuted_clickthrough",R.unmutedClickthroughPings|| []],["unmuted_fullscreen",R.unmutedFullscreenPings||[]],["unmuted_end_fullscreen",R.unmutedEndFullscreenPings||[]],["unmuted_abandon",R.unmutedAbandonPings||[]],["unmuted_start",R.unmutedStartPings||[]],["unmuted_first_quartile",R.unmutedFirstQuartilePings||[]],["unmuted_midpoint",R.unmutedSecondQuartilePings||[]],["unmuted_third_quartile",R.unmutedThirdQuartilePings||[]],["unmuted_complete",R.unmutedCompletePings||[]],["unmuted_skip",R.unmutedSkipPings||[]]])}; ZK6=function(R){switch(R){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}}; XU=function(){return["metadata_type_ad_placement_config"]}; DT=function(R){var w=R.D$.get();return n2(w,R.D)}; dJ=function(R,w,p){Y4l(R.D$.get(),R.layoutId,w,p,R.J??void 0,R.K)}; ZT=function(R,w,p=!1){R.L.has(w)?dJ(R,w,[]):R.Nr(w,p)}; Yc=function(R,w,p=!1){for(;R.Gw.hasOwnProperty("offsetMilliseconds"))}; FP6=function(R,w,p){R.J=w;R.K=p}; jyr=function(){const R=["metadata_type_ads_engagement_panel_layout_view_model","metadata_type_linked_player_bytes_layout_id"];XU().forEach(w=>{R.push(w)}); return{sy:R,Iq:["LAYOUT_TYPE_PANEL"]}}; Jfr=function(){const R=["metadata_type_banner_image_layout_view_model","metadata_type_linked_player_bytes_layout_id"];XU().forEach(w=>{R.push(w)}); return{sy:R,Iq:["LAYOUT_TYPE_COMPANION_WITH_IMAGE"]}}; Tfl=function(){const R=["metadata_type_action_companion_ad_renderer","metadata_type_linked_player_bytes_layout_id"];XU().forEach(w=>{R.push(w)}); return{sy:R,Iq:["LAYOUT_TYPE_COMPANION_WITH_ACTION_BUTTON"]}}; iK_=function(){const R=["metadata_type_image_companion_ad_renderer","metadata_type_linked_player_bytes_layout_id"];XU().forEach(w=>{R.push(w)}); return{sy:R,Iq:["LAYOUT_TYPE_COMPANION_WITH_IMAGE"]}}; Qy_=function(){const R=["metadata_type_shopping_companion_carousel_renderer","metadata_type_linked_player_bytes_layout_id"];XU().forEach(w=>{R.push(w)}); return{sy:R,Iq:["LAYOUT_TYPE_COMPANION_WITH_SHOPPING"]}}; J6=function(R,w,p=!1){var r=R.K();if(r){for(;R.G{R.push(w)}); return{sy:R,Iq:["LAYOUT_TYPE_COMPANION_WITH_ACTION_BUTTON"]}}; gMH=function(){const R=["metadata_type_top_banner_image_text_icon_buttoned_layout_view_model"];XU().forEach(w=>{R.push(w)}); return{sy:R,Iq:["LAYOUT_TYPE_COMPANION_WITH_ACTION_BUTTON"]}}; HKY=function(){const R=["metadata_type_ad_action_interstitial_renderer"];XU().forEach(w=>{R.push(w)}); return{sy:R,Iq:["LAYOUT_TYPE_ENDCAP"]}}; TE=function(R,w){return MH(R,w.sy,w.Iq)?!0:!1}; vMd=function(){const R=["metadata_type_ads_engagement_panel_renderer","metadata_type_linked_player_bytes_layout_id"];XU().forEach(w=>{R.push(w)}); return{sy:R,Iq:["LAYOUT_TYPE_PANEL_TEXT_ICON_IMAGE_TILES_BUTTON"]}}; NfY=function(){const R=["metadata_type_top_banner_image_text_icon_buttoned_layout_view_model","metadata_type_linked_player_bytes_layout_id"];XU().forEach(w=>{R.push(w)}); return{sy:R,Iq:["LAYOUT_TYPE_COMPANION_WITH_ACTION_BUTTON"]}}; kaY=function(){const R=["metadata_type_client_forecasting_ad_renderer"];XU().forEach(w=>{R.push(w)}); return{sy:R,Iq:["LAYOUT_TYPE_FORECASTING"]}}; UGl=function(R,w){return ey(R.clientMetadata,"metadata_type_ad_info_ad_metadata")?R.clientMetadata.FB("metadata_type_ad_info_ad_metadata"):w?{channelId:w.wy,channelThumbnailUrl:w.profilePicture,channelTitle:w.author,videoTitle:w.title}:(MY("No layout metadata nor AdPlayback specified for AdMetaData"),{channelId:"",channelThumbnailUrl:"",channelTitle:"",videoTitle:""})}; S4l=function(R,w){return ey(R.clientMetadata,"metadata_ad_video_is_listed")?R.clientMetadata.FB("metadata_ad_video_is_listed"):w?w.isListed:(MY("No layout metadata nor AdPlayback specified for ad video isListed"),!1)}; RC_=function(R){return R.layout.renderingContent?R.layout.clientMetadata.FB("metadata_type_player_bytes_callback_ref")?.current:R.layout.clientMetadata.FB("metadata_type_player_bytes_callback")}; wEP=function(){return{sy:["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"],Iq:["LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY"]}}; ip=function(R){return R.layout.renderingContent?R.layout.clientMetadata.FB("metadata_type_player_bytes_callback_ref")?.current:R.layout.clientMetadata.FB("metadata_type_player_bytes_callback")}; pEl=function(){return{sy:["metadata_type_valid_ad_message_renderer"],Iq:["LAYOUT_TYPE_TEXT_BANNER_OVERLAY"]}}; vS=function(R,w,p,r,f,G,I,C,u){return TE(p,wEP())||p.layoutType==="LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY"&&g.F(p.renderingContent,Ql)!==void 0?new rux(R,w,p,r,f,G,I,C,u):TE(p,{sy:["metadata_type_player_overlay_layout_renderer","metadata_type_player_bytes_callback","metadata_type_linked_player_bytes_layout_id","METADATA_TYPE_MEDIA_LAYOUT_DURATION_seconds"],Iq:["LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY"]})||p.layoutType==="LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY"&&g.F(p.renderingContent,h6)!==void 0? new fGd(R,w,p,r,f,G,I,C,u):TE(p,HKY())||p.layoutType==="LAYOUT_TYPE_ENDCAP"&&g.F(p.renderingContent,gJ)!==void 0?new GX_(R,w,p,r,G):TE(p,pEl())?new IGI(w,p,R,r,f,u):TE(p,{sy:["metadata_type_instream_ad_player_overlay_renderer"],Iq:["LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY"]})?new CGr(R,w,p,r,f,C):p.layoutType==="LAYOUT_TYPE_ENDCAP"&&g.F(p.renderingContent,HS)!==void 0?new uHP(R,w,p,r,G):null}; N7=function(R){return!R.oldState.isPlaying()&&R.state.isPlaying()}; kc=function(R,w,p){return R{R.removeEventListener("playing",p);w(...r)}; R.addEventListener("playing",p)}; fq=function(){let R=g.yD("yt.player.utils.videoElement_");R||(R=g.sW("VIDEO"),g.AY("yt.player.utils.videoElement_",R));return R}; GO=function(R){const w=fq();return!!(w&&w.canPlayType&&w.canPlayType(R))}; Cq=function(R){if(/opus/.test(R)&&g.Io&&!Ec("38")&&!g.IN())return!1;if(window.MediaSource&&window.MediaSource.isTypeSupported)return window.MediaSource.isTypeSupported(R);if(window.ManagedMediaSource&&window.ManagedMediaSource.isTypeSupported)return window.ManagedMediaSource.isTypeSupported(R);if(/webm/.test(R)&&!D4Y())return!1;R==='audio/mp4; codecs="mp4a.40.2"'&&(R='video/mp4; codecs="avc1.4d401f"');return!!GO(R)}; zCI=function(R){try{const w=Cq('video/mp4; codecs="avc1.42001E"')||Cq('video/webm; codecs="vp9"');return(Cq('audio/mp4; codecs="mp4a.40.2"')||Cq('audio/webm; codecs="opus"'))&&(w||!R)||GO('video/mp4; codecs="avc1.42001E, mp4a.40.2"')?null:"fmt.noneavailable"}catch{return"html5.missingapi"}}; uV=function(){const R=fq();return!(!R.webkitSupportsPresentationMode||typeof R.webkitSetPresentationMode!=="function")}; var oIH=function(){return IA[l[5]](this,1,1759)}; mB=function(){const R=fq();try{const w=R.muted;R.muted=!w;return R.muted!==w}catch{}return!1}; xg6=function(R,w){TQ(R,2,w.jk,zO,3);TQ(R,3,w.innertubeRequest,BFd,3);jW(R,4,w.onesieUstreamerConfig);jW(R,9,w.AU);TQ(R,10,w.gh,B1,3);TQ(R,15,w.reloadPlaybackParams,Wkd,3);JH(R,18,w.x6)}; Lkl=function(R,w){TQ(R,1,w.formatId,W1,3);Yr(R,2,w.startTimeMs);Yr(R,3,w.durationMs);Yr(R,4,w.BF);Yr(R,5,w.wb);TQ(R,9,w.XyI,lGI,3);TQ(R,11,w.Hh0,xi,1);TQ(R,12,w.Iw,xi,1)}; qc_=function(R,w){JH(R,1,w.videoId);Yr(R,2,w.lmt)}; lGI=function(R,w){if(w.Hs)for(let p=0;p>31));Yr(R,16,w.yd);Yr(R,17,w.detailedNetworkType);Yr(R,18,w.F2);Yr(R,19,w.YW);Yr(R,21,w.UL);Yr(R,23,w.Ve);Yr(R,28,w.MW);Yr(R,29,w.yN);Yr(R,34,w.visibility);p=w.playbackRate;if(p!==void 0){var r=new ArrayBuffer(4);(new Float32Array(r))[0]=p;p=(new Uint32Array(r))[0];if(p!==void 0)for(ZC(R,285),dP(R,4),r=0;r<4;)R.view.setUint8(R.pos,p&255),p>>=8,R.pos+=1,r+=1}Yr(R,36,w.Rn); TQ(R,38,w.mediaCapabilities,Vxr,3);Yr(R,39,w.Dt);Yr(R,40,w.rf);Yr(R,44,w.playerState);FX(R,46,w.kf);Yr(R,48,w.Zb);Yr(R,50,w.ys);Yr(R,51,w.FU);Yr(R,54,w.Vb);if(w.xW)for(p=0;p>31));JH(R,2,w.message)}; cuH=function(R,w){Yr(R,1,w.clientState);TQ(R,2,w.yFS,eC_,1)}; Dgl=function(R,w){jW(R,1,w.OD);TQ(R,2,w.hS,Mxd,3);TQ(R,3,w.coldStartInfo,cuH,3)}; EDD=function(R,w){Yr(R,1,w.type);jW(R,2,w.value)}; KkY=function(R,w){JH(R,1,w.hl);JH(R,12,w.deviceMake);JH(R,13,w.deviceModel);Yr(R,16,w.clientName);JH(R,17,w.clientVersion);JH(R,18,w.osName);JH(R,19,w.osVersion)}; PGH=function(R,w){JH(R,1,w.name);JH(R,2,w.value)}; qF=function(R,w){JH(R,1,w.url);if(w.Th)for(let p=0;p=Math.floor(G*16/9)*1.3||R>=G*1.3)return w;w=f}return"tiny"}; Kq=function(R){return R.indexOf("/mp4")>=0?1:R.indexOf("/webm")>=0?2:R.indexOf("/x-flv")>=0?3:R.indexOf("/vtt")>=0?4:0}; Ew=function(R){return R.includes("vtt")||R.includes("text/mp4")}; DK=function(R){return/(opus|mp4a|dtse|ac-3|ec-3|iamf)/.test(R)}; ei=function(R){return/(vp9|vp09|vp8|avc1|av01|av02)/.test(R)}; ao=function(R,w,p,r,f,G,I){const C=new MF;w in g.tC||(w="small");w==="light"&&(w="tiny");r&&f?(f=Number(f),r=Number(r)):(f=g.tC[w],r=Math.round(f*16/9));G=new c1(r,f,0,null,void 0,w,G,I);R=unescape(R.replace(/"/g,'"'));return new P1(p,R,{audio:C,video:G})}; $i=function(R){return R.wN==="9h"||R.wN==="(h"}; Kel=function(R){return!!R.contentProtection&&!!R.contentProtection.fairplay&&(R.wN==="("||R.wN==="(h"||R.wN==="A"||R.wN==="MEAC3")||Xs&&!!R.contentProtection&&R.wN==="1e"}; Oud=function(R,w,p,r){var f=w^R;if(R-3<<2>=R&&(R+6&41){R.K=r})}; Yi=function(R,w){return{start(p){return R[p]},end(p){return w[p]},length:R.length}}; csd=function(R,w,p){const r=[],f=[];for(let G=0;GG-I); f.sort((G,I)=>G-I); return Yi(r,f)}; Fs=function(R,w=",",p=R?R.length:0){const r=[];if(R)for(p=Math.max(R.length-p,0);p=w)return p}catch(p){}return-1}; JC=function(R,w){return ji(R,w)>=0}; PMD=function(R,w){if(!R)return NaN;w=ji(R,w);return w>=0?R.start(w):NaN}; TO=function(R,w){if(!R)return NaN;w=ji(R,w);return w>=0?R.end(w):NaN}; iV=function(R){return R&&R.length?R.end(R.length-1):NaN}; QG=function(R){return iV(R)>0}; hC=function(R,w){R=TO(R,w);return R>=0?R-w:0}; gu=function(R,w,p){const r=[],f=[];for(let G=0;Gp||(r.push(Math.max(w,R.start(G))-w),f.push(Math.min(p,R.end(G))-w));return Yi(r,f)}; H1=function(){return window.SourceBuffer?!!SourceBuffer.prototype.changeType:!1}; aN6=function(){return!!(window.MediaSource||window.ManagedMediaSource||window.WebKitMediaSource||window.HTMLMediaElement&&HTMLMediaElement.prototype.webkitSourceAddId)}; v1=function(){return!(!window.MediaSource||!window.MediaSource.isTypeSupported)||window.ManagedMediaSource}; NF=function(R){try{return R.O()==="open"}catch(w){return!1}}; $Kb=function(R,w){NF(R)?g.TF(()=>{w(R)}):R.callback=w}; Xfd=function(R,w,p){ki&&(Uw(R.mediaElement,{l:"mswssb",sr:R.mediaElement.kY?.lB()},!1),w.Uq(R.X,R),p.Uq(R.X,R));R.L=w;R.C=p;g.K(R,w);g.K(R,p)}; dKr=function(R,w,p,r=""){r=w.mimeType+r;const f=p.mimeType;w=w.wN;p=p.wN;R.PS=R.un?.addSourceBuffer(f);R.YY=r.split(";")[0]==="fakesb"?void 0:R.un?.addSourceBuffer(r);R.J3&&(R.J3.webkitSourceAddId("0",f),R.J3.webkitSourceAddId("1",r));p=new nCI(R.PS,R.J3,"0",Kq(f),p,!1);r=new nCI(R.YY,R.J3,"1",Kq(r),w,!0);Xfd(R,p,r)}; YVd=function(R,w,p,r){if(!R.L||!R.C)return null;const f=R.L.isView()?R.L.f$:R.L,G=R.C.isView()?R.C.f$:R.C,I=new Si(R.mediaElement,R.un,!0);I.G=R.G;Xfd(I,new ZMD(f,w,p,r),new ZMD(G,w,p,r));NF(R)||R.L.QV(R.L.vB());return I}; Uw=function(R,w,p=!1){R.kY?.dn()&&R.kY.Ty("rms",w,p)}; Rn=function(R){R=R.U();return R.length<1?NaN:R.end(R.length-1)}; FeH=function(R,w){R.EQ&&R.EQ.equals(w)||(R.EQ&&R.EQ.dispose(),R.EQ=w)}; jU_=function(R){!R.C&&aN6()&&(R.G?R.G.then(()=>jU_(R)):R.Kv()||(R.C=R.j_()))}; JsD=function(R){R.C&&(R.C.dispose(),R.C=void 0)}; Tbx=function(R,w,p){R.isPaused()||R.getCurrentTime()>w||p>10||(R.play(),g.cI(()=>{Tbx(R,R.getCurrentTime(),p+1)},500))}; wS=function(R){return hC(R.po(),R.getCurrentTime())}; iMH=function(R,w){if(R.O()===0||R.hasError())return!1;const p=R.getCurrentTime()>0;return w>=0&&(R=R.U(),R.length||!p)?JC(R,w):p}; pn=function(R){R.Kv()&&(R.kY&&R.kY.Cy("rs_s"),hx&&R.getCurrentTime()>0&&R.seekTo(0),R.U0(),R.load(),FeH(R,null));delete R.G}; rS=function(R){switch(R.Tg()){case 2:return"progressive.net.retryexhausted";case 3:return R=R.Ch(),R?.includes("MEDIA_ERR_CAPABILITY_CHANGED")||QU6&&R?.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}}; fn=function(R){return R.isPlaying()&&!R.L(16)&&!R.L(32)}; In=function(R,w,p,r,f){if(!(w===R.state&&p===R.Yu&&r===R.seekSource&&f===R.stoppageReason||w!==void 0&&(w&128&&!p||w&2&&w&16))){var G;if(G=w)G=w||R.state,G=!!(G&16||G&32);R=new g.Gf(w,p,G?r?r:R.seekSource:null,f)}return R}; Cn=function(R,w,p=!1){return hkb(R,w.getCurrentTime(),(0,g.T)(),wS(w),p)}; ul=function(R,w,p=null,r=null){return In(R,R.state|w,null,p,r)}; sU=function(R,w){return In(R,R.state&~w,null,null,null)}; mN=function(R,w,p,r=null,f=null){return In(R,(R.state|w)&~p,null,r,f)}; g.zf=function(R,w){return w.state===R.state&&w.Yu===R.Yu}; Bo=function(R){return R.L(128)?-1:R.L(2)?0:R.L(2048)?3:R.L(64)?-1:R.L(1)&&!R.L(32)?3:R.L(8)?1:R.L(4)?2:-1}; Wo=function(R){return R.layout.clientMetadata.FB("METADATA_TYPE_INTERACTIONS_AND_PROGRESS_LAYOUT_COMMANDS")}; xj=function(R,w){ZT(R.Al,w,!R.L)}; gCY=function(R){MY("Received layout exit signal when not in layout exit flow.",R.slot,R.layout)}; HMd=function(R){if(R.fL==="rendering"){xj(R,"pause");var w=Wo(R)?.pauseCommands||[];m7(R.YB.get(),w,R.layout.layoutId);R.d9(2)}}; vCd=function(R){if(R.fL==="rendering"){xj(R,"resume");var w=Wo(R)?.resumeCommands||[];m7(R.YB.get(),w,R.layout.layoutId)}}; Nbr=function(R,w,p=!1){R.L||Yc(R.Al,w,p)}; UKH=function(R){return(Wo(R)?.progressCommands||[]).findIndex(w=>!!g.F(w?.command,kvP))!==-1}; SVL=function(R,w){switch(w){case "normal":R.Nr("complete");break;case "skipped":R.Nr("skip");break;case "abandoned":FU(R.Al,"impression")&&R.Nr("abandon")}}; R9d=function(R,w){R.O||(w=new g.ll(w.state,new g.Gf),R.O=!0);return w}; wIL=function(R,w){N7(w)?R.d9(1):w.TE(4)&&!w.TE(2)&&HMd(R);cs(w,4)<0&&!(cs(w,2)<0)&&vCd(R)}; pIb=function(R){R.position===0&&(R.Zf.get(),R=R.layout.clientMetadata.FB("metadata_type_ad_placement_config").kind,R={adBreakType:Ln(R)},u$("ad_bl"),g.sT(R))}; g.qm=function(R,w,p){z3(R,p)||Wx(R,w,p);z3(R,"video_to_ad")||Wx(R,w,"video_to_ad");z3(R,"ad_to_video")||Wx(R,w,"ad_to_video");z3(R,"ad_to_ad")||Wx(R,w,"ad_to_ad")}; rkD=function(R){R.A1=Date.now();An(R,R.tp);R.timer.start()}; An=function(R,w){w={current:w/1E3,duration:R.AG()/1E3};Dj(R.C$.get(),"onAdPlaybackProgress",w)}; Vt=function(R){return g.F(R.layout.renderingContent,bl)?.isSeekableWithNoAdElements}; Ghx=function(R){return new fJ_({...R,xZ:R.callback,d9:()=>{}})}; CF6=function(R){return new IJ_({...R,d9:w=>{Dj(R.C$.get(),"onAdIntroStateChange",w)}})}; ufP=function(R){return new IJ_({...R,d9:w=>{R.C$.get().gr(w)}})}; s2I=function(R){var w=R.eW,p=["METADATA_TYPE_MEDIA_BREAK_LAYOUT_DURATION_MILLISECONDS"];for(const r of XU())p.push(r);if(TE(w,{sy:p,Iq:["LAYOUT_TYPE_MEDIA_BREAK"]}))return Ghx(R);w=R.eW;p=["metadata_type_player_vars","metadata_type_player_bytes_callback_ref"];for(const r of XU())p.push(r);if(TE(w,{sy:p,Iq:["LAYOUT_TYPE_MEDIA"]}))return ey(R.eW.clientMetadata,"metadata_type_ad_intro")?CF6(R):ufP(R)}; OU=function(R,w,p){const r=on(R);R.eL===R.NS.length-1&&MY("Unexpected skip with target requested during the last sublayout");if(p.renderingContent===void 0&&p.layoutId!==tn(r,w,p)){MY("onSkipWithAdPodSkipTargetRequested for a PlayerBytes layout that is not currently active",r.h2(),r.xB(),{requestingSlot:w,requestingLayout:p});var f=!1}else f=!0;if(f){a:{if((f=r.xB().clientMetadata.FB("metadata_type_ad_pod_skip_target"))&&f>0&&f{Kn(R,R.eL+1)})}; mLb=function(R,w,p,r){z9W(R,w,p,"skipped",()=>{Kn(R,r)})}; z9W=function(R,w,p,r,f){if(!R.Br){var G=on(R);G?(G.xB().layoutId!==p.layoutId&&MY("SubLayout mismatch in exitSubLayout",w,p,{exitingSubLayout:p.layoutId,activeSubLayout:G.xB().layoutId}),R.Br=!0,G.Fn(G.xB(),r),S2r(R.PE,w,p,r),R.Br=!1,R.wZ?(R.wZ(),D3(R.Zf.get())):f()):MY("No active adapter when exitSubLayout in PlayerBytesVodCompositeLayoutRenderingAdapter. This should never happen.",w,p)}}; Kn=function(R,w){if(R.eL===R.NS.length-1)R.eL++,eO(R.PN,R.layout),D3(R.Zf.get());else a:{if(R.eL===-1&&(R.callback.zK(R.slot,R.layout),w>0)){MY("Invalid index for playLayoutAtIndexOrExit when no ad has played yet.",R.slot,R.layout,{indexToPlay:w,layoutId:R.layout.layoutId});break a}R.eL=w;w=on(R);if(R.eL>0){var p=R.Zf.get();p.C=!1;const r={};p.L&&p.videoId&&(r.cttAuthInfo={token:p.L,videoId:p.videoId});mp("ad_to_ad",r)}p=g.F(w.xB().renderingContent,gJ);!p?.isEligibleToBeSkippedWhenNoEngagementOnLayoutId|| (R.rl.get().Go.get(p.isEligibleToBeSkippedWhenNoEngagementOnLayoutId)??!1)?w.startRendering(w.xB()):Kn(R,R.eL+1)}}; BDD=function(R){(R=on(R))&&R.NC()}; xLd=function(R){return new WJd(R.Zt,R.dN,R.V2,R.vy,R.s0,R.rl,R.Zf,R.PE,R.slot,R.layout,R.lI,R.PN,R.sC,R.BS)}; LJP=function(R,w,p,r,f,G,I,C,u,m,z,B,W,x,q,O,e,P,c,X,Z,Gr){const Il={D$:C,kB:u,UK:m,vy:z,dN:B,s0:W,rl:x,By:q,Zf:O,C$:e,YB:P,YF:c,BS:X,context:Gr};C=TE(r,{sy:["metadata_type_sub_layouts"],Iq:["LAYOUT_TYPE_COMPOSITE_PLAYER_BYTES"]})||r.u9!==void 0&&r.layoutType==="LAYOUT_TYPE_COMPOSITE_PLAYER_BYTES";u=TE(r,{sy:[],Iq:["LAYOUT_TYPE_MEDIA","LAYOUT_TYPE_MEDIA_BREAK"]});m=()=>{const FW=r.u9??r.clientMetadata.FB("metadata_type_sub_layouts"),tY=xLd({Zt:R,dN:B,V2:Z,vy:z,s0:W,rl:x,Zf:O,PE:w,slot:p,layout:r, lI:G,PN:I,sC:f,BS:X}),j_=[];for(let hY=0;hY{JY.Fn(FW[hY],"normal")}, Lg:hY,Q_:FW.length,CO:!1});if(!aK)return;j_.push(aK)}tY.NS=j_;return tY}; q=()=>{const FW=s2I({...Il,callback:{zK:R.zK.bind(R),mU:R.mU.bind(R),qO:R.qO.bind(R)},slot:p,eW:r,Oh:()=>{eO(I,r)}, Lg:0,Q_:1,CO:!0});return FW?new lJb(R,z,W,O,FW,f,X):FW}; if(C)return m();if(u)return q()}; co=function(R,w){Mm(R.D$.get(),{driftRecoveryInfo:{contentCpn:R.dN.get().q6?.clientPlaybackNonce,adClientData:R.layout.UQ.adClientDataEntry,...w}})}; AkP=function(R){var w=R.layout.clientMetadata.FB("metadata_type_layout_enter_ms");const p=R.layout.clientMetadata.FB("metadata_type_layout_exit_ms");R=R.uU.get();w=qs_(R.O,w,p);return Math.min(p,w!==null?w:Infinity)}; ykd=function(R,w){const p=bed(R,w);p||MY("Expected subLRA found by layout ID",R.slot,R.layout,{layoutId:w});R.L={qB:p};p?p.startRendering(p.xB()):w===R.C&&MY("Failed to find rendering adapter for survey media layout",R.slot,R.layout,{surveyMediaLayoutId:w})}; bed=function(R,w){return w==null?null:R.O.find(p=>p.xB().layoutId===w)||null}; var buD=function(R,w,p){return IA[l[5]](this,22,5918,R,w,p)}; Vdd=function(R,w,p,r,f,G,I,C,u,m){var z=f-r;const B=(R.fulfilledLayout||R.clientMetadata.FB("metadata_type_fulfilled_layout"))?.clientMetadata.FB("metadata_type_ssdai_ads_config")||"",W=R.clientMetadata.FB("metadata_type_triggering_cue_point")?.current?.identifier;W||Po(m,"ads_cpu",`slid.${w.layoutId}`);if(!z)return I.hE(p,B,2,G,r,f,R.slotId,W),Po(m,"ads_iraot",`slid.${w.layoutId};enterMs.${r};exitMs.${f};vid.${p.video_id}`),null;z=I.cL(p,B,2,G,r,f,R.slotId,W);Po(m,"ads_atct",`slid.${w.layoutId};enterMs.${r};exitMs.${f};vid.${p.video_id};pid.${z};cid.${W}`); if(!z)return MY("Unexpected failure to add to playback timeline",R,w,u()),null;R=R.slotId;w=w.layoutId;z?(C.L.has(z)&&MY("Unexpected remap of timeline playback"),C.L.set(z,{slotId:R,layoutId:w})):MY("Invalid timeline playback ID");r+G>f&&I.UO(z,f-r);return z}; oEY=function(R,w,p){const r=w.clientMetadata.FB("metadata_type_sodar_extension_data");if(r)try{xGD(p,r)}catch(f){MY("Unexpected error when loading Sodar",R,w,{error:f})}}; tdD=function(R,w,p,r,f,G,I){an(R,w,new g.ll(p,new g.Gf),r,f,I,!1,G)}; an=function(R,w,p,r,f,G,I=!0,C){N7(p)&&kc(f,0,null)&&(!FU(R,"impression")&&C&&C(),R.Nr("impression"));FU(R,"impression")&&(p.TE(4)&&!p.TE(2)&&R.Lv("pause"),cs(p,4)<0&&!(cs(p,2)<0)&&R.Lv("resume"),p.TE(16)&&f>=.5&&R.Lv("seek"),I&&p.TE(2)&&Xg(R,p.state,w,r,f,G))}; Xg=function(R,w,p,r,f,G,I,C,u){FU(R,"impression")&&(G?(G=f-r,G=G>=-1&&G<=2):G=Math.abs(r-f)<=1,nn(R,w,G?r:f,p,r,I,C&&G),G&&!u&&R.Nr("complete"))}; nn=function(R,w,p,r,f,G,I){Yc(R,p*1E3,I);f<=0||p<=0||w?.L(16)||w?.L(32)||(kc(p,f*.25,r)&&(G&&!FU(R,"first_quartile")&&G("first"),R.Nr("first_quartile")),kc(p,f*.5,r)&&(G&&!FU(R,"midpoint")&&G("second"),R.Nr("midpoint")),kc(p,f*.75,r)&&(G&&!FU(R,"third_quartile")&&G("third"),R.Nr("third_quartile")))}; Oex=function(R,w){FU(R,"impression")&&R.Lv(w?"fullscreen":"end_fullscreen")}; KJH=function(R){FU(R,"impression")&&R.Lv("clickthrough")}; EE6=function(R){R.Lv("active_view_measurable")}; DLr=function(R){FU(R,"impression")&&!FU(R,"seek")&&R.Lv("active_view_fully_viewable_audible_half_duration")}; e9d=function(R){FU(R,"impression")&&!FU(R,"seek")&&R.Lv("active_view_viewable")}; MdD=function(R){FU(R,"impression")&&!FU(R,"seek")&&R.Lv("audio_audible")}; ckD=function(R){FU(R,"impression")&&!FU(R,"seek")&&R.Lv("audio_measurable")}; PFW=function(R,w){Po(R.D$.get(),"ads_imp",`cpn.${R.layout.clientMetadata.FB("metadata_type_content_cpn")};acpn.${Ut(R.dN.get(),2)?.clientPlaybackNonce};clr.${w};skp.${!!g.F(R.layout.clientMetadata.FB("metadata_type_instream_ad_player_overlay_renderer")?.skipOrPreviewRenderer,dS)}`)}; aJI=function(R,w,p){Po(R.D$.get(),"ads_qua",`cpn.${R.layout.clientMetadata.FB("metadata_type_content_cpn")};acpn.${Ut(R.dN.get(),2)?.clientPlaybackNonce};qt.${w};clr.${p}`)}; Z3=function(R){return{enterMs:R.clientMetadata.FB("metadata_type_layout_enter_ms"),exitMs:R.clientMetadata.FB("metadata_type_layout_exit_ms")}}; $Ll=function(R,w){Po(R.D$.get(),"ads_imp",`acpn.${Ut(R.dN.get(),2)?.clientPlaybackNonce};clr.${w}`)}; XI6=function(R,w,p){Po(R.D$.get(),"ads_qua",`cpn.${R.layout.clientMetadata.FB("metadata_type_content_cpn")};acpn.${Ut(R.dN.get(),2)?.clientPlaybackNonce};qt.${w};clr.${p}`)}; Yj=function(R){return`${Math.round(R.width)}x${Math.round(R.height)}`}; jO=function(R,w,p=Fg){p.widthR.width*R.height*.2)return{Kz:3,v7:501,errorMessage:`ad(${Yj(p)}) to container(${Yj(R)}) ratio exceeds limit.`};if(p.height>R.height/3-w)return{Kz:3,v7:501,errorMessage:`ad(${Yj(p)}) covers container(${Yj(R)}) center.`}}; nEI=function(R,w){const p=R.clientMetadata.FB("metadata_type_ad_placement_config");return new Jn(R.Ig,w,p,R.layoutId)}; Tf=function(R){return R.clientMetadata.FB("metadata_type_invideo_overlay_ad_renderer")}; dLY=function(){const R=["metadata_type_invideo_overlay_ad_renderer"];XU().forEach(w=>{R.push(w)}); return{sy:R,Iq:["LAYOUT_TYPE_IN_VIDEO_TEXT_OVERLAY","LAYOUT_TYPE_IN_VIDEO_ENHANCED_TEXT_OVERLAY"]}}; ZeI=function(){const R=["metadata_type_invideo_overlay_ad_renderer"];for(const w of XU())R.push(w);return{sy:R,Iq:["LAYOUT_TYPE_IN_VIDEO_IMAGE_OVERLAY"]}}; YsP=function(R=null){return R!=null&&(R=R.thumbnail,R!=null&&R.thumbnails!=null&&R.thumbnails.length!=0&&R.thumbnails[0].width!=null&&R.thumbnails[0].height!=null)?new g.dg(R.thumbnails[0].width||0,R.thumbnails[0].height||0):new g.dg(0,0)}; FJI=function(){const R=wEP();R.sy.push("metadata_type_ad_info_ad_metadata");return R}; j26=function(R){switch(R){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 Q(`Invalid layout exit reason: ${R}`)}}; il=function(R){return R?.layoutId!=null&&R?.layoutType!=null}; Jkl=function(R){if(!il(R.adLayoutMetadata))return!1;R=R.renderingContent;return g.F(R,Qt)||g.F(R,hn)||g.F(R,gS)||g.F(R,Ho)||g.F(R,vo)||g.F(R,Nm)?!0:!1}; kj=function(R){return!!(R.rF&&R.slot&&R.layout)}; UU=function(R){const w=R.config?.adPlacementConfig;R=R.renderer;return!(!w||w.kind==null||!R)}; iex=function(R){if(!il(R.adLayoutMetadata))return!1;R=R.renderingContent;return g.F(R,gJ)||g.F(R,HS)||g.F(R,TDL)||g.F(R,Ql)||g.F(R,h6)?!0:!1}; h9b=function(R){return il(R.adLayoutMetadata)?g.F(R.renderingContent,SO)||g.F(R.renderingContent,Q2Y)?!0:!1:!1}; RE=function(R){return R.playerVars!==void 0&&R.pings!==void 0&&R.externalVideoId!==void 0}; IE=function(R){if(!il(R.adLayoutMetadata))return!1;R=R.renderingContent;var w=g.F(R,wn);return w?pt(w):(w=g.F(R,bl))?RE(w):(w=g.F(R,rn))?w.playerVars!==void 0:(w=g.F(R,gJ))?w.durationMilliseconds!==void 0:g.F(R,ft)||g.F(R,Gg)?!0:!1}; pt=function(R){R=(R.sequentialLayouts||[]).map(w=>g.F(w,Ct)); return R.length>0&&R.every(IE)}; s0=function(R){return il(R.adLayoutMetadata)?(R=g.F(R.renderingContent,u_))&&R.pings?!0:!1:!1}; khd=function(R){if(!il(R.adLayoutMetadata))return!1;if(g.F(R.renderingContent,gEI)||g.F(R.renderingContent,SO))return!0;const w=g.F(R.renderingContent,mA);return g.F(R.renderingContent,zg)||g.F(w?.sidePanel,He_)||g.F(w?.sidePanel,vEW)||g.F(w?.sidePanel,NDd)?!0:!1}; rjD=function(R){var w;(w=!R)||(w=R.adSlotMetadata,w=!(w?.slotId!==void 0&&w?.slotType!==void 0));if(w||!(ULb(R)||R.slotEntryTrigger&&R.slotFulfillmentTriggers&&R.slotExpirationTriggers))return!1;R=R.fulfillmentContent?.fulfilledLayout;return(w=g.F(R,Ct))?IE(w):(w=g.F(R,Bb))?khd(w):(w=g.F(R,Ss6))?iex(w):(w=g.F(R,Rv6))?Jkl(w):(w=g.F(R,we_))?il(w.adLayoutMetadata)?g.F(w.renderingContent,Qt)?!0:!1:!1:(w=g.F(R,Wb))?s0(w):(R=g.F(R,pe_))?h9b(R):!1}; ULb=function(R){return(R=g.F(R.fulfillmentContent?.fulfilledLayout,Bb))&&R.adLayoutMetadata?.layoutType==="LAYOUT_TYPE_PANEL_QR_CODE"&&R.layoutExitNormalTriggers===void 0}; fUr=function(R){for(const w of R||[]){R=g.F(w,xN);if(R===void 0||!rjD(R))break;if((R=g.F(R.fulfillmentContent?.fulfilledLayout,Wb))&&s0(R))return!0}return!1}; IUI=function(R,w=!1){if(!R.questions?.length||!R.playbackCommands||!w&&R.questions.length!==1)return!1;for(const p of R.questions)if(!GUL(g.F(p,l_)?.surveyAdQuestionCommon||g.F(p,Lt)?.surveyAdQuestionCommon))return!1;return!0}; CBd=function(R){({instreamSurveyAdRenderer:R}=R?.playerOverlay||{});return R?R.playbackCommands&&R.questions&&R.questions.length===1?GUL(g.F(R.questions[0],l_)?.surveyAdQuestionCommon||g.F(R.questions[0],Lt)?.surveyAdQuestionCommon):!1:!1}; GUL=function(R){if(!R)return!1;R=g.F(R.instreamAdPlayerOverlay,q2);const w=g.F(R?.skipOrPreviewRenderer,dS),p=g.F(R?.adInfoRenderer,AW);return(g.F(R?.skipOrPreviewRenderer,b_)||w)&&p?!0:!1}; u4r=function(R){return R.linearAds!=null&&il(R.adLayoutMetadata)}; sN6=function(R){return R.linearAd!=null&&R.adVideoStart!=null}; ByY=function(R,w,p){const r=(p.adSlots??[]).map(I=>g.F(I,xN)); if(p.aT)if(w.clientMetadata.FB("metadata_type_allow_pause_ad_break_request_slot_reschedule"))t6(R.L.get(),"OPPORTUNITY_TYPE_AD_BREAK_SERVICE_RESPONSE_RECEIVED",()=>[],w.slotId); else{if(R.BS.get().B.V().Y("h5_check_forecasting_renderer_for_throttled_midroll")){var f=p.YO.filter(I=>I.renderer?.clientForecastingAdRenderer!=null); f.length!==0?m0P(R.O,f,r,w.slotId,p.ssdaiAdsConfig):t6(R.L.get(),"OPPORTUNITY_TYPE_AD_BREAK_SERVICE_RESPONSE_RECEIVED",()=>[],w.slotId)}else t6(R.L.get(),"OPPORTUNITY_TYPE_AD_BREAK_SERVICE_RESPONSE_RECEIVED",()=>[],w.slotId); zvb(R.G,w)}else{f={cH:Math.round(w.clientMetadata.FB("metadata_type_ad_break_request_data")?.cH||0),F3:w.clientMetadata.FB("metadata_type_ad_break_request_data")?.F3};var G=w.clientMetadata.FB("metadata_type_cue_point");m0P(R.O,p.YO,r,w.slotId,p.ssdaiAdsConfig,f,G)}}; WHd=function(R,w){for(const p of w){if(p.slotType==="SLOT_TYPE_PLAYER_BYTES"&&p.fulfilledLayout)if(w=void 0,p.fulfilledLayout.renderingContent)w=p.fulfilledLayout.clientMetadata.FB("metadata_type_player_vars");else{if(p.fulfilledLayout.u9)for(const r of p.fulfilledLayout.u9)if(r.renderingContent&&(w=r.clientMetadata.FB("metadata_type_player_vars")))break}else w=void 0;if(w){R.vy.get().B.preloadVideoByPlayerVars(w,2,300);break}}}; lUd=function(R,w,p,r,f,G,I,C){const u=Ut(R.dN.get(),1);if(x0l(R.BS.get())){const m=yi(R.C.get(),p,r,f,u.clientPlaybackNonce,u.Zm,u.daiEnabled,u,G,I);WHd(R,m);t6(R.L.get(),"OPPORTUNITY_TYPE_AD_BREAK_SERVICE_RESPONSE_RECEIVED",()=>m,w)}else t6(R.L.get(),"OPPORTUNITY_TYPE_AD_BREAK_SERVICE_RESPONSE_RECEIVED",()=>yi(R.C.get(),p,r,f,u.clientPlaybackNonce,u.Zm,u.daiEnabled,u,G,I,C),w)}; qnY=function(R,w,p,r,f,G,I){w=LHd(w,G,Number(r.prefetchMilliseconds)||0,I);R=w instanceof Q?w:Vi(R,r,f,w,p);return R instanceof Q?R:[R]}; VN6=function(R,w,p,r,f){const G=Ot(R.C.get(),"SLOT_TYPE_AD_BREAK_REQUEST");r=[new AjP({getAdBreakUrl:r.getAdBreakUrl,cH:0,F3:0}),new bhL];R=w.pauseDurationMs?w.lactThresholdMs?{slotId:G,slotType:"SLOT_TYPE_AD_BREAK_REQUEST",slotPhysicalPosition:2,slotEntryTrigger:new oE(R.L,G),slotFulfillmentTriggers:[new yjD(R.L)],slotExpirationTriggers:[new tW(R.L,f),new O0(R.L,G)],R0:"core",clientMetadata:new dX(r),adSlotLoggingData:p}:new Q("AdPlacementConfig for Pause Ads is missing lact_threshold_ms"):new Q("AdPlacementConfig for Pause Ads is missing pause_duration_ms"); return R instanceof Q?R:[R]}; hW=function(R,w,p){if(R.beforeContentVideoIdStartedTrigger)R=R.beforeContentVideoIdStartedTrigger?new Kt(E0,w,R.id):new Q("Not able to create BeforeContentVideoIdStartedTrigger");else if(R.layoutIdExitedTrigger)R=R.layoutIdExitedTrigger?.triggeringLayoutId?new Dk(E0,R.layoutIdExitedTrigger.triggeringLayoutId,R.id):new Q("Not able to create LayoutIdExitedTrigger");else if(R.layoutExitedForReasonTrigger)R.layoutExitedForReasonTrigger?.triggeringLayoutId&&R.layoutExitedForReasonTrigger?.layoutExitReason? (w=j26(R.layoutExitedForReasonTrigger.layoutExitReason),R=w instanceof Q?w:new er(E0,R.layoutExitedForReasonTrigger.triggeringLayoutId,[w],R.id)):R=new Q("Not able to create LayoutIdExitedForReasonTrigger");else if(R.onLayoutSelfExitRequestedTrigger)R=R.onLayoutSelfExitRequestedTrigger?.triggeringLayoutId?new M2(E0,R.onLayoutSelfExitRequestedTrigger.triggeringLayoutId,R.id):new Q("Not able to create OnLayoutSelfExitRequestedTrigger");else if(R.onNewPlaybackAfterContentVideoIdTrigger)R=R.onNewPlaybackAfterContentVideoIdTrigger? new tW(E0,w,R.id):new Q("Not able to create OnNewPlaybackAfterContentVideoIdTrigger");else if(R.skipRequestedTrigger)R=R.skipRequestedTrigger?.triggeringLayoutId?new cb(E0,R.skipRequestedTrigger.triggeringLayoutId,R.id):new Q("Not able to create SkipRequestedTrigger");else if(R.slotIdEnteredTrigger)R=R.slotIdEnteredTrigger?.triggeringSlotId?new Pb(E0,R.slotIdEnteredTrigger.triggeringSlotId,R.id):new Q("Not able to create SlotIdEnteredTrigger");else if(R.slotIdExitedTrigger)R=R.slotIdExitedTrigger?.triggeringSlotId? new O0(E0,R.slotIdExitedTrigger.triggeringSlotId,R.id):new Q("Not able to create SkipRequestedTrigger");else if(R.surveySubmittedTrigger)R=R.surveySubmittedTrigger?.triggeringLayoutId?new aE(E0,R.surveySubmittedTrigger.triggeringLayoutId,R.id):new Q("Not able to create SurveySubmittedTrigger");else if(R.mediaResumedTrigger)R=R.mediaResumedTrigger&&R.id?new oBd(R.id):new Q("Not able to create MediaResumedTrigger");else if(R.closeRequestedTrigger)R=R.closeRequestedTrigger?.triggeringLayoutId?new $N(E0, R.closeRequestedTrigger.triggeringLayoutId,R.id):new Q("Not able to create CloseRequestedTrigger");else if(R.slotIdScheduledTrigger)R=R.slotIdScheduledTrigger?.triggeringSlotId?new oE(E0,R.slotIdScheduledTrigger.triggeringSlotId,R.id):new Q("Not able to create SlotIdScheduledTrigger");else if(R.mediaTimeRangeTrigger){var r=Number(R.mediaTimeRangeTrigger?.offsetStartMilliseconds),f=Number(R.mediaTimeRangeTrigger?.offsetEndMilliseconds);isFinite(r)&&isFinite(f)?(f===-1&&(f=p),p=r>f?new Q("AD_PLACEMENT_KIND_MILLISECONDS endMs needs to be >= startMs.", {offsetStartMs:r,offsetEndMs:f},"ADS_CLIENT_ERROR_MESSAGE_AD_PLACEMENT_END_SHOULD_GREATER_THAN_START",f===p&&r-500<=f):new Oc(r,f),R=p instanceof Q?p:new Xt(E0,w,p,!1,R.id)):R=new Q("Not able to create MediaTimeRangeTrigger")}else R=R.contentVideoIdEndedTrigger?R.contentVideoIdEndedTrigger?new nt(E0,w,!1,R.id):new Q("Not able to create ContentVideoIdEndedTrigger"):R.layoutIdEnteredTrigger?R.layoutIdEnteredTrigger?.triggeringLayoutId?new dn(E0,R.layoutIdEnteredTrigger.triggeringLayoutId,R.id):new Q("Not able to create LayoutIdEnteredTrigger"): R.timeRelativeToLayoutEnterTrigger?R.timeRelativeToLayoutEnterTrigger?.triggeringLayoutId?new Zk(E0,Number(R.timeRelativeToLayoutEnterTrigger.durationMs),R.timeRelativeToLayoutEnterTrigger.triggeringLayoutId,R.id):new Q("Not able to create TimeRelativeToLayoutEnterTrigger"):R.onDifferentLayoutIdEnteredTrigger?R.onDifferentLayoutIdEnteredTrigger?.triggeringLayoutId&&R.onDifferentLayoutIdEnteredTrigger.slotType&&R.onDifferentLayoutIdEnteredTrigger.layoutType?new YN(E0,R.onDifferentLayoutIdEnteredTrigger.triggeringLayoutId, R.onDifferentLayoutIdEnteredTrigger.slotType,R.onDifferentLayoutIdEnteredTrigger.layoutType,R.id):new Q("Not able to create CloseRequestedTrigger"):R.liveStreamBreakStartedTrigger?R.liveStreamBreakStartedTrigger&&R.id?new Ft(E0,R.id):new Q("Not able to create LiveStreamBreakStartedTrigger"):R.liveStreamBreakEndedTrigger?R.liveStreamBreakEndedTrigger&&R.id?new jr(E0,R.id):new Q("Not able to create LiveStreamBreakEndedTrigger"):R.liveStreamBreakScheduledDurationMatchedTrigger?R.liveStreamBreakScheduledDurationMatchedTrigger?.breakDurationMs? new JW(Number(R.liveStreamBreakScheduledDurationMatchedTrigger.breakDurationMs||"0")||0,R.id):new Q("Not able to create LiveStreamBreakScheduledDurationMatchedTrigger"):R.liveStreamBreakScheduledDurationNotMatchedTrigger?R.liveStreamBreakScheduledDurationNotMatchedTrigger?.breakDurationMs?new Tg(Number(R.liveStreamBreakScheduledDurationNotMatchedTrigger.breakDurationMs||"0")||0,R.id):new Q("Not able to create LiveStreamBreakScheduledDurationNotMatchedTrigger"):R.newSlotScheduledWithBreakDurationTrigger? R.newSlotScheduledWithBreakDurationTrigger?.breakDurationMs?new i_(Number(R.newSlotScheduledWithBreakDurationTrigger.breakDurationMs||"0")||0,R.id):new Q("Not able to create NewSlotScheduledWithBreakDurationTrigger"):R.prefetchCacheExpiredTrigger?new Qi(E0,R.id):new Q("Not able to convert an AdsControlflowTrigger.");return R}; gn=function(R,w){w.L>=2&&(R.slot_pos=w.adPodIndex);R.autoplay="1"}; KHd=function(R,w,p,r,f,G,I,C){return w===null?new Q("Invalid slot type when get discovery companion fromActionCompanionAdRenderer",{slotType:w,ActionCompanionAdRenderer:r}):[tND(R,w,I,G,u=>{var m=u.slotId;u=C(u);var z=r.adLayoutLoggingData;const B=new dX([new Ohd(r),new Hb(f)]);m=WS(p.C.get(),"LAYOUT_TYPE_COMPANION_WITH_ACTION_BUTTON",m);const W={layoutId:m,layoutType:"LAYOUT_TYPE_COMPANION_WITH_ACTION_BUTTON",R0:"core"};return{layoutId:m,layoutType:"LAYOUT_TYPE_COMPANION_WITH_ACTION_BUTTON",Ig:new Map, layoutExitNormalTriggers:[new tW(p.L,I)],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],R0:"core",clientMetadata:B,UQ:u(W),adLayoutLoggingData:z}})]}; D0d=function(R,w,p,r,f,G,I,C){return w===null?new Q("Invalid slot type when get discovery companion fromTopBannerImageTextIconButtonedLayoutViewModel",{slotType:w,TopBannerImageTextIconButtonedLayoutViewModel:r}):[tND(R,w,I,G,u=>{var m=u.slotId;u=C(u);var z=r.adLayoutLoggingData;const B=new dX([new EBl(r),new Hb(f)]);m=WS(p.C.get(),"LAYOUT_TYPE_COMPANION_WITH_ACTION_BUTTON",m);const W={layoutId:m,layoutType:"LAYOUT_TYPE_COMPANION_WITH_ACTION_BUTTON",R0:"core"};return{layoutId:m,layoutType:"LAYOUT_TYPE_COMPANION_WITH_ACTION_BUTTON", Ig:new Map,layoutExitNormalTriggers:[new tW(p.L,I)],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],R0:"core",clientMetadata:B,UQ:u(W),adLayoutLoggingData:z}})]}; PBd=function(R,w,p,r,f,G){if(!G)for(const I of w)vb(R,I.renderer,I.config.adPlacementConfig.kind);R=Array.from(R.values()).filter(I=>evd(I)); w=[];for(const I of R)for(const C of I.AB)G=u=>C.Dc(u,I.instreamVideoAdRenderer.elementId,C.He),C.isContentVideoCompanion?w.push(MNx(p,r,f,I.instreamVideoAdRenderer.elementId,C.associatedCompositePlayerBytesLayoutId,C.adSlotLoggingData,G)):R.length>1?w.push(cjH(p,r,f,I.instreamVideoAdRenderer.elementId,C.adSlotLoggingData,u=>C.Dc(u,I.instreamVideoAdRenderer.elementId,C.He,C.associatedCompositePlayerBytesLayoutId))):w.push(cjH(p,r,f,I.instreamVideoAdRenderer.elementId,C.adSlotLoggingData,G)); return w}; vb=function(R,w,p){if(w=aUP(w))for(const r of w)r&&r.externalVideoId?(w=N2(R,r.externalVideoId),w.instreamVideoAdRenderer||(w.instreamVideoAdRenderer=r,w.Gz=p)):MY("InstreamVideoAdRenderer without externalVideoId")}; aUP=function(R){const w=[],p=R.sandwichedLinearAdRenderer&&R.sandwichedLinearAdRenderer.linearAd&&g.F(R.sandwichedLinearAdRenderer.linearAd,bl);if(p)return w.push(p),w;if(R.instreamVideoAdRenderer)return w.push(R.instreamVideoAdRenderer),w;if(R.linearAdSequenceRenderer&&R.linearAdSequenceRenderer.linearAds){for(const r of R.linearAdSequenceRenderer.linearAds)g.F(r,bl)&&w.push(g.F(r,bl));return w}return null}; evd=function(R){if(R.instreamVideoAdRenderer===void 0)return MY("AdPlacementSupportedRenderers without matching InstreamVideoAdRenderer"),!1;for(const w of R.AB){if(w.Dc===void 0)return!1;if(w.He===void 0)return MY("AdPlacementConfig for AdPlacementSupportedRenderers that matches an InstreamVideoAdRenderer is undefined"),!1;if(R.Gz===void 0||w.As===void 0||R.Gz!==w.As&&w.As!=="AD_PLACEMENT_KIND_SELF_START")return!1;if(R.instreamVideoAdRenderer.elementId===void 0)return MY("InstreamVideoAdRenderer has no elementId", void 0,void 0,{kind:R.Gz,"matching APSR kind":w.As}),!1}return!0}; N2=function(R,w){R.has(w)||R.set(w,{instreamVideoAdRenderer:void 0,Gz:void 0,adVideoId:w,AB:[]});return R.get(w)}; kN=function(R,w,p,r,f,G,I,C,u){f?N2(R,f).AB.push({A2N:w,As:p,isContentVideoCompanion:r,He:I,associatedCompositePlayerBytesLayoutId:G,adSlotLoggingData:C,Dc:u}):MY("Companion AdPlacementSupportedRenderer without adVideoId")}; U0=function(R){let w=0;for(const p of R.questions)(R=g.F(p,l_)||g.F(p,Lt))&&(w+=R.surveyAdQuestionCommon?.durationMilliseconds||0);return w}; Sr=function(R){var w=g.F(R.questions?.[0],l_)?.surveyAdQuestionCommon||g.F(R.questions?.[0],Lt)?.surveyAdQuestionCommon;w=[...(R.playbackCommands?.instreamAdCompleteCommands||[]),...(w?.timeoutCommands||[])];return{impressionCommands:R.playbackCommands?.impressionCommands,errorCommands:R.playbackCommands?.errorCommands,muteCommands:R.playbackCommands?.muteCommands,unmuteCommands:R.playbackCommands?.unmuteCommands,pauseCommands:R.playbackCommands?.pauseCommands,rewindCommands:R.playbackCommands?.rewindCommands, resumeCommands:R.playbackCommands?.resumeCommands,skipCommands:R.playbackCommands?.skipCommands,progressCommands:R.playbackCommands?.progressCommands,p10:R.playbackCommands?.clickthroughCommands,fullscreenCommands:R.playbackCommands?.fullscreenCommands,activeViewViewableCommands:R.playbackCommands?.activeViewViewableCommands,activeViewMeasurableCommands:R.playbackCommands?.activeViewMeasurableCommands,activeViewFullyViewableAudibleHalfDurationCommands:R.playbackCommands?.activeViewFullyViewableAudibleHalfDurationCommands, activeViewAudioAudibleCommands:R.playbackCommands?.activeViewTracking?.activeViewAudioAudibleCommands,activeViewAudioMeasurableCommands:R.playbackCommands?.activeViewTracking?.activeViewAudioMeasurableCommands,endFullscreenCommands:R.playbackCommands?.endFullscreenCommands,abandonCommands:R.playbackCommands?.abandonCommands,completeCommands:w}}; nBl=function(R,w,p,r,f,G,I){return(C,u)=>$0r(R,u.slotId,C,G,(m,z)=>{var B=u.layoutId;m=I(m);return RI(w,B,z,f,m,"LAYOUT_TYPE_SURVEY",[new XeD(p),r],p.adLayoutLoggingData)})}; FHI=function(R,w,p,r,f,G,I){if(!d0r(R))return new Q("Invalid InstreamVideoAdRenderer for SlidingText.",{instreamVideoAdRenderer:R});const C=R.additionalPlayerOverlay.slidingTextPlayerOverlayRenderer;return[Zhd(G,w,p,r,u=>{var m=u.slotId;u=I(u);m=WS(f.C.get(),"LAYOUT_TYPE_SLIDING_TEXT_PLAYER_OVERLAY",m);const z={layoutId:m,layoutType:"LAYOUT_TYPE_SLIDING_TEXT_PLAYER_OVERLAY",R0:"core"},B=new Dk(f.L,r);return{layoutId:m,layoutType:"LAYOUT_TYPE_SLIDING_TEXT_PLAYER_OVERLAY",Ig:new Map,layoutExitNormalTriggers:[B], layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],R0:"core",clientMetadata:new dX([new YnP(C)]),UQ:u(z)}})]}; d0r=function(R){R=g.F(R?.additionalPlayerOverlay,jND);if(!R)return!1;const w=R.slidingMessages;return R.title&&w&&w.length!==0?!0:!1}; QNl=function(R,w,p,r,f){if(!R.playerOverlay?.instreamSurveyAdRenderer)return()=>[]; if(!CBd(R))return()=>new Q("Received invalid InstreamVideoAdRenderer for DAI survey.",{instreamVideoAdRenderer:R}); const G=R.playerOverlay.instreamSurveyAdRenderer,I=U0(G);return I<=0?()=>new Q("InstreamSurveyAdRenderer should have valid duration.",{instreamSurveyAdRenderer:G}):(C,u)=>{const m=Jjb(C,p,r,z=>{var B=z.slotId; z=u(z);var W=Sr(G);B=WS(f.C.get(),"LAYOUT_TYPE_SURVEY",B);const x={layoutId:B,layoutType:"LAYOUT_TYPE_SURVEY",R0:"core"},q=new Dk(f.L,r),O=new cb(f.L,B),e=new aE(f.L,B),P=new TyI(f.L);return{layoutId:B,layoutType:"LAYOUT_TYPE_SURVEY",Ig:new Map,layoutExitNormalTriggers:[q,P],layoutExitSkipTriggers:[O],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[e],layoutExitUserCancelledTriggers:[],R0:"core",clientMetadata:new dX([new ihl(G),new Hb(w),new wZ(I/1E3),new pz(W)]),UQ:z(x),adLayoutLoggingData:G.adLayoutLoggingData}}); C=FHI(R,p,m.slotId,r,f,C,u);return C instanceof Q?C:[m,...C]}}; U06=function(R,w,p,r,f,G,I){const C=[];try{let u,m=[];if(p.renderer.linearAdSequenceRenderer)u=B=>{B=hvd(B.slotId,p,w,f(B),r,G);m=B.E7;return B.cI}; else if(p.renderer.instreamVideoAdRenderer)u=B=>{var W=B.slotId;B=f(B);const x=p.config.adPlacementConfig,{S6:q,xb:O}=gBd(x);var e=p.renderer.instreamVideoAdRenderer;if(e?.playerOverlay?.instreamSurveyAdRenderer)throw new TypeError("Survey overlay should not be set on single video.");var P=rZ(e);const c=Math.min(q+P.videoLengthSeconds*1E3,O),X=new fz(0,[P.videoLengthSeconds]);var Z=P.videoLengthSeconds,Gr=P.playerVars,Il=P.instreamAdPlayerOverlayRenderer,FW=P.playerOverlayLayoutRenderer,tY=P.adVideoId, j_=HhI(p),hY=P.Ig;P=P.I7;var aK=e?.adLayoutLoggingData;e=e?.sodarExtensionData;W=WS(w.C.get(),"LAYOUT_TYPE_MEDIA",W);const JY={layoutId:W,layoutType:"LAYOUT_TYPE_MEDIA",R0:"core"};return{layoutId:W,layoutType:"LAYOUT_TYPE_MEDIA",Ig:hY,layoutExitNormalTriggers:[new jr(w.L)],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],R0:"core",clientMetadata:new dX([new GR(r),new II(Z),new Cz(Gr),new u7(q),new sE(c),Il&&new mv(Il),FW&& new zR(FW),new Hb(x),new BL(tY),new WL(X),new l7(j_),e&&new Lz(e),new qM({current:null}),new AR,new b7(P)].filter(vBb)),UQ:B(JY),adLayoutLoggingData:aK}}; else throw new TypeError("Expected valid AdPlacementRenderer for DAI");const z=NyL(R,r,p.adSlotLoggingData,u,I);C.push(z);for(const B of m){const W=B(R,f);if(W instanceof Q)return W;C.push(...W)}}catch(u){return new Q(u,{errorMessage:u.message,AdPlacementRenderer:p,numberOfSurveyRenderers:kUY(p)})}return C}; kUY=function(R){({linearAds:R}=R.renderer.linearAdSequenceRenderer||{});return R?.length?R.filter(w=>g.F(w,bl)?.playerOverlay?.instreamSurveyAdRenderer!=null).length:0}; hvd=function(R,w,p,r,f,G){const I=w.config.adPlacementConfig,{S6:C,xb:u}=gBd(I);var {linearAds:m}=w.renderer.linearAdSequenceRenderer||{};if(!m?.length)throw new TypeError("Expected linear ads");const z=[],B={EO:C,Lg:0,JL:z};m=m.map(x=>SnD(R,x,B,p,r,I,f,u)).map((x,q)=>{q=new fz(q,z); return x(q)}); const W=m.map(x=>x.D9); return{cI:R7_(p,R,C,W,I,HhI(w),r,u,G),E7:m.map(x=>x.s7)}}; SnD=function(R,w,p,r,f,G,I,C){const u=rZ(g.F(w,bl)),m=p.EO,z=p.Lg,B=Math.min(m+u.videoLengthSeconds*1E3,C);p.EO=B;p.Lg++;p.JL.push(u.videoLengthSeconds);const W=g.F(w,bl)?.playerOverlay?.instreamSurveyAdRenderer;if(u.adVideoId==="nPpU29QrbiU"&&W==null)throw new TypeError("Survey slate media has no survey overlay");return x=>{gn(u.playerVars,x);var q=u.videoLengthSeconds,O=u.playerVars,e=u.Ig,P=u.I7,c=u.instreamAdPlayerOverlayRenderer,X=u.playerOverlayLayoutRenderer,Z=u.adVideoId,Gr=g.F(w,bl)?.adLayoutLoggingData, Il=g.F(w,bl)?.sodarExtensionData;const FW=WS(r.C.get(),"LAYOUT_TYPE_MEDIA",R),tY={layoutId:FW,layoutType:"LAYOUT_TYPE_MEDIA",R0:"adapter"};x={layoutId:FW,layoutType:"LAYOUT_TYPE_MEDIA",Ig:e,layoutExitNormalTriggers:[],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],R0:"adapter",clientMetadata:new dX([new GR(I),new II(q),new Cz(O),new u7(m),new sE(B),new yC(z),new qM({current:null}),c&&new mv(c),X&&new zR(X),new Hb(G),new BL(Z), new WL(x),Il&&new Lz(Il),W&&new wPL(W),new AR,new b7(P)].filter(vBb)),UQ:f(tY),adLayoutLoggingData:Gr};q=QNl(g.F(w,bl),G,I,x.layoutId,r);return{D9:x,s7:q}}}; rZ=function(R){if(!R)throw new TypeError("Expected instream video ad renderer");if(!R.playerVars)throw new TypeError("Expected player vars in url encoded string");const w=lF(R.playerVars);var p=Number(w.length_seconds);if(isNaN(p))throw new TypeError("Expected valid length seconds in player vars");var r=Number(R.trimmedMaxNonSkippableAdDurationMs);p=isNaN(r)?p:Math.min(p,r/1E3);({instreamAdPlayerOverlayRenderer:r=null}=R.playerOverlay||{});const {playerOverlayLayoutRenderer:f=null}=R.playerOverlay|| {};var G=w.video_id;G||(G=(G=R.externalVideoId)?G:void 0);if(!G)throw new TypeError("Expected valid video id in IVAR");return{playerVars:w,videoLengthSeconds:p,instreamAdPlayerOverlayRenderer:r,playerOverlayLayoutRenderer:f,adVideoId:G,Ig:R.pings?$c(R.pings):new Map,I7:a1(R.pings)}}; HhI=function(R){R=Number(R.driftRecoveryMs);return isNaN(R)||R<=0?null:R}; gBd=function(R){const {offsetStartMilliseconds:w,offsetEndMilliseconds:p}=R.adTimeOffset||{};R=Number(w);if(isNaN(R))throw new TypeError("Expected valid start offset");const r=Number(p);if(isNaN(r))throw new TypeError("Expected valid end offset");return{S6:R,xb:r}}; pPD=function(R){const w=R.clientMetadata.FB("metadata_type_player_bytes_callback_ref")?.current;if(!w)return null;const p=R.clientMetadata.FB("metadata_type_ad_pod_skip_target_callback_ref");var r=R.layoutId,f=R.clientMetadata.FB("metadata_type_content_cpn"),G=R.clientMetadata.FB("metadata_type_instream_ad_player_overlay_renderer"),I=R.clientMetadata.FB("metadata_type_player_underlay_renderer"),C=R.clientMetadata.FB("metadata_type_ad_placement_config"),u=R.clientMetadata.FB("metadata_type_video_length_seconds"); var m=ey(R.clientMetadata,"metadata_type_layout_enter_ms")&&ey(R.clientMetadata,"metadata_type_layout_exit_ms")?(R.clientMetadata.FB("metadata_type_layout_exit_ms")-R.clientMetadata.FB("metadata_type_layout_enter_ms"))/1E3:void 0;return{pg:r,contentCpn:f,M_:w,Np:p,instreamAdPlayerOverlayRenderer:G,instreamAdPlayerUnderlayRenderer:I,adPlacementConfig:C,videoLengthSeconds:u,Pd:m,inPlayerLayoutId:R.clientMetadata.FB("metadata_type_linked_in_player_layout_id"),inPlayerSlotId:R.clientMetadata.FB("metadata_type_linked_in_player_slot_id")}}; GDr=function(R,w,p,r,f,G,I,C,u,m,z,B,W,x,q){r=Ot(r,"SLOT_TYPE_PLAYER_BYTES");R=rxb(f,R,I,p,r,u,m);if(R instanceof Q)return R;m=R.clientMetadata.FB("metadata_type_fulfilled_layout")?.layoutId;if(!m)return new Q("Invalid adNotify layout");w=fZr(m,f,G,p,C,w,u,z,B,W,x,q,I);return w instanceof Q?w:[R,...w]}; fZr=function(R,w,p,r,f,G,I,C,u,m,z,B,W){p=IZr(w,p,r,G,I,C,u,m,z,B,W);if(p instanceof Q)return p;R=CqW(w,R,I,f,p);return R instanceof Q?R:[...R.Yy,R.wA]}; sdY=function(R,w,p,r,f,G,I,C,u,m,z,B,W,x){w=IZr(R,w,p,f,G,C,u,m,z,B,W,x);if(w instanceof Q)return w;R=uo6(R,p,G,I,r,C.PB,w);return R instanceof Q?R:R.Yy.concat(R.wA)}; IZr=function(R,w,p,r,f,G,I,C,u,m,z,B){const W=VC(r);return W instanceof wJ?new Q(W):m.B.V().experiments.XB("html5_refactor_in_player_slot_generation")?x=>{var q=new fz(0,[W.Ll]);x=mAd(w,W.layoutId,W.VV,p,oI(W.playerVars,W.fD,G,u,q),W.Ll,f,q,I(x),C.get(W.VV.externalVideoId),B);q=[];if(W.VV.playerOverlay.instreamAdPlayerOverlayRenderer){const O=pPD(x);if(!O)return MY("Expected MediaLayout to carry valid data to create InPlayerSlot and PlayerOverlayForMediaLayout",void 0,x),{layout:x,Yy:[]};q=[z7_(R, O.contentCpn,O.pg,e=>tR(w,e.slotId,"core",O,nH(z,e)),O.inPlayerSlotId), ...q];if(O.instreamAdPlayerUnderlayRenderer&&OE(m)){const e=O.instreamAdPlayerUnderlayRenderer;q=[Bx_(R,O.contentCpn,O.pg,P=>WLd(w,P.slotId,e,O.adPlacementConfig,O.pg,nH(z,P))), ...q]}}return{layout:x,Yy:q}}:x=>{const q=new fz(0,[W.Ll]); return{layout:mAd(w,W.layoutId,W.VV,p,oI(W.playerVars,W.fD,G,u,q),W.Ll,f,q,I(x),C.get(W.VV.externalVideoId),B),Yy:[]}}}; VC=function(R){if(!R.playerVars)return new wJ("No playerVars available in InstreamVideoAdRenderer.");if(R.elementId==null||R.playerVars==null||R.playerOverlay==null||R.playerOverlay?.instreamAdPlayerOverlayRenderer==null&&R.playerOverlay?.playerOverlayLayoutRenderer==null||R.pings==null||R.externalVideoId==null)return new wJ("Received invalid VOD InstreamVideoAdRenderer",{instreamVideoAdRenderer:R});const w=lF(R.playerVars);let p=Number(w.length_seconds);isNaN(p)&&(p=0,MY("Expected valid length seconds in player vars but got NaN")); return{layoutId:R.elementId,VV:R,playerVars:w,fD:R.playerVars,Ll:p}}; oI=function(R,w,p,r,f){R.iv_load_policy=r;w=lF(w);if(w.cta_conversion_urls)try{R.cta_conversion_urls=JSON.parse(w.cta_conversion_urls)}catch(G){MY(G)}p.rS&&(R.ctrl=p.rS);p.Vf&&(R.ytr=p.Vf);p.AP&&(R.ytrcc=p.AP);p.isMdxPlayback&&(R.mdx="1");R.vvt&&(R.vss_credentials_token=R.vvt,p.u8&&(R.vss_credentials_token_type=p.u8),p.mdxEnvironment&&(R.mdx_environment=p.mdxEnvironment));gn(R,f);return R}; xAY=function(R){const w=new Map;for(const p of R)(R=p.renderer.remoteSlotsRenderer)&&R.hostElementId&&w.set(R.hostElementId,R);return w}; Kz=function(R){return R.adSlotMetadata.slotType==="SLOT_TYPE_PLAYER_BYTES"}; lZY=function(R){return R!=null}; OXb=function(R,w,p,r,f,G,I,C,u,m,z,B,W,x,q){const O=[];for(const Z of R){if(ULb(Z))continue;if(Z?.adSlotMetadata?.slotType==="SLOT_TYPE_IN_PLAYER")continue;var e=LLb(Z,r,p.Zm);if(e instanceof Q)return e;var P={slotId:Z.adSlotMetadata.slotId,slotType:Z.adSlotMetadata.slotType,slotPhysicalPosition:Z.adSlotMetadata.slotPhysicalPosition??1,R0:"core",slotEntryTrigger:e.slotEntryTrigger,slotFulfillmentTriggers:e.slotFulfillmentTriggers,slotExpirationTriggers:e.slotExpirationTriggers},c=g.F(Z.fulfillmentContent.fulfilledLayout, Ct);if(c){if(!IE(c))return new Q("Invalid PlayerBytesAdLayoutRenderer");var X=B&&!(Kz(Z)&&Z.slotEntryTrigger.beforeContentVideoIdStartedTrigger);e=e.slotFulfillmentTriggers.some(Gr=>Gr instanceof JW); c=X?qPx(P,Z.adSlotMetadata.triggerEvent,c,p,r,G,R,W,e,u,x):Ax_(P,Z.adSlotMetadata.triggerEvent,c,w,p,r,f,G,I,C,u,m,R,z,Z.adSlotMetadata.triggeringSourceLayoutId);if(c instanceof Q)return c;e=[];q?e.push(new EE({current:q})):e.push(new EE({current:null}));Kz(Z)&&e.push(new Dg({hQ:Kz(Z)&&!!Z.slotEntryTrigger.beforeContentVideoIdStartedTrigger}));X&&e.push(new AR);p.PB&&e.push(new bXd({}));P={...P,clientMetadata:new dX(e),fulfilledLayout:c.layout,adSlotLoggingData:Z.adSlotMetadata.adSlotLoggingData}; O.push(...c.Yy);O.push(P);continue}if(X=g.F(Z.fulfillmentContent.fulfilledLayout,Bb)){if(!khd(X))return new Q("Invalid PlayerUnderlayAdLayoutRenderer");X=yxW(X,r,p.Zm,G,P,Z.adSlotMetadata.triggerEvent,Z.adSlotMetadata.triggeringSourceLayoutId);if(X instanceof Q)return X;P={...P,clientMetadata:new dX([]),fulfilledLayout:X,adSlotLoggingData:Z.adSlotMetadata.adSlotLoggingData};O.push(P);continue}if(X=g.F(Z.fulfillmentContent.fulfilledLayout,pe_)){if(!h9b(X))return new Q("Invalid InPlayerOrganicOverlayAdLayoutRenderer"); X=VQ6(X,r,p.Zm,G,P);if(X instanceof Q)return X;P={...P,clientMetadata:new dX([]),fulfilledLayout:X,adSlotLoggingData:Z.adSlotMetadata.adSlotLoggingData};O.push(P);continue}if(X=g.F(Z.fulfillmentContent.fulfilledLayout,Rv6)){if(!Jkl(X))return new Q("Invalid AboveFeedAdLayoutRenderer");X=ovd(X,r,p.Zm,G,P,Z.adSlotMetadata.triggerEvent,Z.adSlotMetadata.triggeringSourceLayoutId);if(X instanceof Q)return X;P={...P,clientMetadata:new dX([]),fulfilledLayout:X,adSlotLoggingData:Z.adSlotMetadata.adSlotLoggingData}; O.push(P);continue}if(X=g.F(Z.fulfillmentContent.fulfilledLayout,we_)){if(!il(X.adLayoutMetadata)||!g.F(X.renderingContent,Qt))return new Q("Invalid BelowPlayerAdLayoutRenderer");X=ovd(X,r,p.Zm,G,P,Z.adSlotMetadata.triggerEvent,Z.adSlotMetadata.triggeringSourceLayoutId);if(X instanceof Q)return X;P={...P,clientMetadata:new dX([]),fulfilledLayout:X,adSlotLoggingData:Z.adSlotMetadata.adSlotLoggingData};O.push(P);continue}if(X=g.F(Z.fulfillmentContent.fulfilledLayout,Wb)){if(!s0(X))return new Q("Invalid PlayerBytesSequenceItemAdLayoutRenderer"); X=tQY(X,r,p.Zm,G,P,Z.adSlotMetadata.triggerEvent);if(X instanceof Q)return X;P={...P,clientMetadata:new dX([]),fulfilledLayout:X,adSlotLoggingData:Z.adSlotMetadata.adSlotLoggingData};O.push(P)}else return new Q(`Unable to retrieve a client slot [${P.slotType}] from a given AdSlotRenderer`)}return O}; tQY=function(R,w,p,r,f,G){const I={layoutId:R.adLayoutMetadata.layoutId,layoutType:R.adLayoutMetadata.layoutType,R0:"core"};w=eS(R,w,p);return w instanceof Q?w:(p=g.F(R.renderingContent,u_))&&p.pings?{...I,renderingContent:R.renderingContent,Ig:$c(p.pings),...w,UQ:nH(r,f)(I),clientMetadata:new dX([new Hb(MM(G)),new pz({progressCommands:p.progressCommands})]),adLayoutLoggingData:R.adLayoutMetadata.adLayoutLoggingData}:new Q("VideoAdTracking is missing from PlayerBytesSequenceItemAdLayoutRenderer")}; ovd=function(R,w,p,r,f,G,I){const C={layoutId:R.adLayoutMetadata.layoutId,layoutType:R.adLayoutMetadata.layoutType,R0:"core"};w=eS(R,w,p);if(w instanceof Q)return w;p=[];p.push(new Hb(MM(G)));G==="SLOT_TRIGGER_EVENT_LAYOUT_ID_ENTERED"&&I!==void 0&&p.push(new cL(I));return{...C,renderingContent:R.renderingContent,Ig:new Map([["impression",g.F(R.renderingContent,gS)?g.F(R.renderingContent,gS)?.impressionPings||[]:g.F(R.renderingContent,Qt)?g.F(R.renderingContent,Qt)?.impressionPings||[]:g.F(R.renderingContent, hn)?g.F(R.renderingContent,hn)?.impressionPings||[]:[]]]),...w,UQ:nH(r,f)(C),clientMetadata:new dX(p),adLayoutLoggingData:R.adLayoutMetadata.adLayoutLoggingData}}; yxW=function(R,w,p,r,f,G,I){if(R.adLayoutMetadata.layoutType==="LAYOUT_TYPE_DISMISSABLE_PANEL_TEXT_PORTRAIT_IMAGE")a:{var C=g.F(R.renderingContent,mA);const u=g.F(R.renderingContent,SO);I=new Map;if(C){I=g.F(C.sidePanel,vEW);if(!I){R=new Q("DismissablePanelTextPortraitImageRenderer is missing");break a}I=new Map([["impression",I.impressionPings||[]],["resume",I.resumePings||[]]])}else if(!u){R=new Q("AdsEngagementPanelSectionListViewModel is missing");break a}C={layoutId:R.adLayoutMetadata.layoutId, layoutType:R.adLayoutMetadata.layoutType,R0:"core"};w=eS(R,w,p);R=w instanceof Q?w:{...C,renderingContent:R.renderingContent,Ig:I,...w,UQ:nH(r,f)(C),clientMetadata:new dX([new Hb(MM(G))]),adLayoutLoggingData:R.adLayoutMetadata.adLayoutLoggingData}}else R.adLayoutMetadata.layoutType==="LAYOUT_TYPE_DISPLAY_TRACKING"?g.F(R.renderingContent,gEI)?(I={layoutId:R.adLayoutMetadata.layoutId,layoutType:R.adLayoutMetadata.layoutType,R0:"core"},w=eS(R,w,p),R=w instanceof Q?w:{...I,renderingContent:R.renderingContent, Ig:new Map,...w,UQ:nH(r,f)(I),clientMetadata:new dX([new Hb(MM(G))]),adLayoutLoggingData:R.adLayoutMetadata.adLayoutLoggingData}):R=new Q("CounterfactualRenderer is missing"):R.adLayoutMetadata.layoutType==="LAYOUT_TYPE_PANEL_QR_CODE"?R=new Q("PlayerUnderlaySlot cannot be created because adUxReadyApiProvider is null"):R.adLayoutMetadata.layoutType==="LAYOUT_TYPE_PANEL_QR_CODE_CAROUSEL"?R=new Q("PlayerUnderlaySlot cannot be created because adUxReadyApiProvider is null"):R.adLayoutMetadata.layoutType=== "LAYOUT_TYPE_DISPLAY_UNDERLAY_TEXT_GRID_CARDS"?g.F(R.renderingContent,zg)?(G={layoutId:R.adLayoutMetadata.layoutId,layoutType:R.adLayoutMetadata.layoutType,R0:"core"},w=eS(R,w,p),R=w instanceof Q?w:I?{...G,renderingContent:R.renderingContent,Ig:new Map,...w,UQ:nH(r,f)(G),clientMetadata:new dX([new cL(I)]),adLayoutLoggingData:R.adLayoutMetadata.adLayoutLoggingData}:new Q("Not able to parse an SDF PlayerUnderlay layout because the triggeringMediaLayoutId in AdSlotMetadata is missing")):R=new Q("DisplayUnderlayTextGridCardsLayoutViewModel is missing"): R.adLayoutMetadata.layoutType==="LAYOUT_TYPE_VIDEO_AD_INFO"?g.F(R.renderingContent,SO)?(G={layoutId:R.adLayoutMetadata.layoutId,layoutType:R.adLayoutMetadata.layoutType,R0:"core"},w=eS(R,w,p),R=w instanceof Q?w:{...G,renderingContent:R.renderingContent,Ig:new Map([]),...w,UQ:nH(r,f)(G),adLayoutLoggingData:R.adLayoutMetadata.adLayoutLoggingData,clientMetadata:new dX([])}):R=new Q("AdsEngagementPanelSectionListViewModel is missing"):(R.adLayoutMetadata.layoutType==="LAYOUT_TYPE_PANEL_IMAGE_QR_CODE"? C=new Q("PlayerUnderlaySlot cannot be created because adUxReadyApiProvider is null"):C=new Q(`LayoutType [${R.adLayoutMetadata.layoutType}] is invalid for PlayerUnderlaySlot`),R=C);return R}; VQ6=function(R,w,p,r,f){if(R.adLayoutMetadata.layoutType==="LAYOUT_TYPE_PLAYER_ORGANIC_BANNER_OVERLAY")if(g.F(R.renderingContent,SO)){var G={layoutId:R.adLayoutMetadata.layoutId,layoutType:R.adLayoutMetadata.layoutType,R0:"core"};w=eS(R,w,p);R=w instanceof Q?w:{...G,renderingContent:R.renderingContent,Ig:new Map([]),...w,UQ:nH(r,f)(G),adLayoutLoggingData:R.adLayoutMetadata.adLayoutLoggingData,clientMetadata:new dX([])}}else R=new Q("AdsEngagementPanelSectionListViewModel is missing");else R.adLayoutMetadata.layoutType=== "LAYOUT_TYPE_PLAYER_ORGANIC_TRANSITION_OVERLAY"?g.F(R.renderingContent,Q2Y)?(G={layoutId:R.adLayoutMetadata.layoutId,layoutType:R.adLayoutMetadata.layoutType,R0:"core"},w=eS(R,w,p),R=w instanceof Q?w:{...G,renderingContent:R.renderingContent,Ig:new Map,...w,UQ:nH(r,f)(G),adLayoutLoggingData:R.adLayoutMetadata.adLayoutLoggingData,clientMetadata:new dX([])}):R=new Q("PlayerOrganicTransitionOverlayRenderer is missing"):R=new Q(`LayoutType [${R.adLayoutMetadata.layoutType}] is invalid for InPlayerOrganicOverlaySlot`); return R}; qPx=function(R,w,p,r,f,G,I,C,u,m,z){if(z?.cH===void 0||z?.F3===void 0)return new Q("Cached ad break range from cue point is missing");var B=eS(p,f,r.Zm);if(B instanceof Q)return B;B={layoutExitMuteTriggers:[],layoutExitNormalTriggers:B.layoutExitNormalTriggers,layoutExitSkipTriggers:[],layoutExitUserCancelledTriggers:[],layoutExitUserInputSubmittedTriggers:[]};if(g.F(p.renderingContent,bl))return R=KL6(R,w,p,B,f,G,I,r.Zm,z.cH,z.F3,m),R instanceof Q?R:R.ob===void 0?new Q("Expecting associatedInPlayerSlot for single DAI media layout"): {layout:R.layout,Yy:[R.ob]};var W=g.F(p.renderingContent,wn);if(W){if(!il(p.adLayoutMetadata))return new Q("Invalid ad layout metadata");if(!pt(W))return new Q("Invalid sequential layout");W=W.sequentialLayouts.map(x=>x.playerBytesAdLayoutRenderer); R=Evl(R,w,p,B,W,f,r,G,I,C,z.cH,z.F3,u,m);return R instanceof Q?R:{layout:R.gC,Yy:R.Yy}}return new Q("Not able to convert a sequential layout")}; Evl=function(R,w,p,r,f,G,I,C,u,m,z,B,W,x){var q=DAL(f,z,B);if(q instanceof Q)return q;const O=[],e=[];for(const tY of q){a:{var P=R,c=f[tY.Lg],X=tY,Z=w;q=G;var Gr=I,Il=C,FW=u;const j_=PL(c);if(j_ instanceof Q){q=j_;break a}const hY={layoutId:c.adLayoutMetadata.layoutId,layoutType:c.adLayoutMetadata.layoutType,R0:"adapter"};X=e7r(Z,c,X,q,void 0,x);if(X instanceof Q){q=X;break a}P={...hY,...aI,Ig:j_,renderingContent:c.renderingContent,clientMetadata:new dX(X),UQ:nH(Il,P)(hY),adLayoutLoggingData:c.adLayoutMetadata.adLayoutLoggingData}; q=(q=$y(FW,P,q,Gr.Zm,Il,void 0,!0))?q instanceof Q?q:{layout:P,ob:q}:new Q("Expecting associatedInPlayerSlot")}if(q instanceof Q)return q;O.push(q.layout);e.push(q.ob)}f={layoutId:p.adLayoutMetadata.layoutId,layoutType:p.adLayoutMetadata.layoutType,R0:"core"};w=[new l7(Number(p.driftRecoveryMs)),new u7(z),new sE(B),new Hb(MM(w)),new MQI(m),new AR];W&&w.push(new cxP);return{gC:{...f,...r,u9:O,Ig:new Map,clientMetadata:new dX(w),UQ:nH(C,R)(f)},Yy:e}}; KL6=function(R,w,p,r,f,G,I,C,u,m,z){if(!IE(p))return new Q("Invalid PlayerBytesAdLayoutRenderer");const B=PL(p);if(B instanceof Q)return B;const W={layoutId:p.adLayoutMetadata.layoutId,layoutType:p.adLayoutMetadata.layoutType,R0:"core"};var x=g.F(p.renderingContent,bl);if(!x)return new Q("Invalid rendering content for DAI media layout");x=rZ(x);u={Ua:x,Lg:0,EO:u,w$:Math.min(u+x.videoLengthSeconds*1E3,m),wL:new fz(0,[x.videoLengthSeconds])};w=e7r(w,p,u,f,Number(p.driftRecoveryMs)??void 0,z);if(w instanceof Q)return w;R={...W,...r,Ig:B,renderingContent:p.renderingContent,clientMetadata:new dX(w),UQ:nH(G,R)(W),adLayoutLoggingData:p.adLayoutMetadata.adLayoutLoggingData};return(f=$y(I,R,f,C,G,void 0,!0))?f instanceof Q?f:{layout:R,ob:f}:new Q("Expecting associatedInPlayerSlot")}; Ax_=function(R,w,p,r,f,G,I,C,u,m,z,B,W,x,q){const O=eS(p,G,f.Zm);if(O instanceof Q)return O;if(g.F(p.renderingContent,bl)){u=PqW([p],f,u);if(u instanceof Q)return u;if(u.length!==1)return new Q("Only expected one media layout.");R=aZH(R,w,p,O,u[0],void 0,"core",r,G,I,C,m,W,x,f.Zm,void 0,q);return R instanceof Q?R:{layout:R.layout,Yy:R.ob?[R.ob]:[]}}var e=g.F(p.renderingContent,wn);if(e){if(!il(p.adLayoutMetadata))return new Q("Invalid ad layout metadata");if(!pt(e))return new Q("Invalid sequential layout"); e=e.sequentialLayouts.map(P=>P.playerBytesAdLayoutRenderer); R=$Ad(R,w,p.adLayoutMetadata,O,e,r,G,f,u,I,C,m,z,B,W,x,q);return R instanceof Q?R:{layout:R.gC,Yy:R.Yy}}return new Q("Not able to convert a sequential layout")}; $Ad=function(R,w,p,r,f,G,I,C,u,m,z,B,W,x,q,O,e){const P=new XP({current:null}),c=PqW(f,C,u);if(c instanceof Q)return c;u=[];const X=[];var Z=void 0;for(let j_=0;j_0&&(c.push(O),c.push(new JR(Il.adPodSkipTarget)));(G=m.get(Il.externalVideoId))&&c.push(new TR(G));G=c}else G=new Q("Invalid vod media renderer")}if(G instanceof Q)return G;R={...I,...r,Ig:P,renderingContent:p.renderingContent,clientMetadata:new dX(G),UQ:nH(z,R)(I),adLayoutLoggingData:p.adLayoutMetadata.adLayoutLoggingData};p=g.F(p.renderingContent, bl);if(!p||!RE(p))return new Q("Invalid meida renderer");B=N2(B,p.externalVideoId);B.instreamVideoAdRenderer=p;B.Gz="AD_PLACEMENT_KIND_START";return x?(u=$y(W,R,u,q,z,O,!1),u instanceof Q?u:YPP(R.layoutId,W)&&u?{layout:{...R,clientMetadata:new dX(G.concat(new Txd(u)))}}:{layout:R,ob:u}):{layout:R}}; nvb=function(R,w,p,r,f){if(!IE(w))return new Q("Invalid PlayerBytesAdLayoutRenderer");const G=g.F(w.renderingContent,gJ);if(!G||G.durationMilliseconds===void 0)return new Q("Invalid endcap renderer");const I={layoutId:w.adLayoutMetadata.layoutId,layoutType:w.adLayoutMetadata.layoutType,R0:"adapter"};r=[new i7(G.durationMilliseconds),new pz({impressionCommands:void 0,abandonCommands:G.abandonCommands?[{commandExecutorCommand:G.abandonCommands}]:void 0,completeCommands:G.completionCommands}),new Hb(r), new QC("LAYOUT_TYPE_ENDCAP")];f&&(r.push(new Yy(f.wL.adPodIndex-1)),r.push(new yC(f.wL.adPodIndex)),r.push(new JR(f.adPodSkipTarget??-1)));return{...I,...aI,renderingContent:w.renderingContent,clientMetadata:new dX(r),Ig:G.skipPings?new Map([["skip",G.skipPings]]):new Map,UQ:nH(p,R)(I),adLayoutLoggingData:w.adLayoutMetadata.adLayoutLoggingData}}; $y=function(R,w,p,r,f,G,I){R=R.filter(B=>B.adSlotMetadata.slotType==="SLOT_TYPE_IN_PLAYER"&&B.adSlotMetadata.triggeringSourceLayoutId===w.layoutId); if(R.length!==0){if(R.length!==1)return new Q("Invalid InPlayer slot association for the given PlayerBytes layout");var C=R[0];R=LLb(C,p,r);if(R instanceof Q)return R;R={slotId:C.adSlotMetadata.slotId,slotType:C.adSlotMetadata.slotType,slotPhysicalPosition:C.adSlotMetadata.slotPhysicalPosition??1,R0:"core",slotEntryTrigger:R.slotEntryTrigger,slotFulfillmentTriggers:R.slotFulfillmentTriggers,slotExpirationTriggers:R.slotExpirationTriggers};var u=g.F(C.fulfillmentContent.fulfilledLayout,Ss6);if(!u|| !iex(u))return new Q("Invalid InPlayerAdLayoutRenderer");var m={layoutId:u.adLayoutMetadata.layoutId,layoutType:u.adLayoutMetadata.layoutType,R0:"core"};p=eS(u,p,r);if(p instanceof Q)return p;r=[];var z=u.adLayoutMetadata.layoutType;I&&r.push(new AR);if(z==="LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY")r.push(...iXd(C.adSlotMetadata.triggerEvent,w)),(G=Qdd(p,w.layoutId))&&r.push(new h7b(G));else if(z==="LAYOUT_TYPE_ENDCAP"||z==="LAYOUT_TYPE_VIDEO_INTERSTITIAL_CENTERED"){r.push(new Hb(MM(C.adSlotMetadata.triggerEvent))); if(z==="LAYOUT_TYPE_VIDEO_INTERSTITIAL_CENTERED")return new Q("Cannot parse endcap layout since AdUxReadyApi is not provided");G&&r.push(G)}else return new Q("Not able to parse an SDF InPlayer layout");f={...m,...p,renderingContent:u.renderingContent,Ig:new Map,UQ:nH(f,R)(m),clientMetadata:new dX(r),adLayoutLoggingData:u.adLayoutMetadata.adLayoutLoggingData};return{...R,fulfilledLayout:f,clientMetadata:new dX([])}}}; iXd=function(R,w){const p=[];p.push(new Hb(MM(R)));p.push(new cL(w.layoutId));(R=w.clientMetadata.FB("metadata_type_player_bytes_callback_ref"))&&p.push(new qM(R));(R=w.clientMetadata.FB("metadata_type_ad_pod_skip_target_callback_ref"))&&p.push(new XP(R));(R=w.clientMetadata.FB("metadata_type_remote_slots_data"))&&p.push(new TR(R));(R=w.clientMetadata.FB("metadata_type_ad_next_params"))&&p.push(new FP(R));(R=w.clientMetadata.FB("metadata_type_ad_video_clickthrough_endpoint"))&&p.push(new jS(R));(R= w.clientMetadata.FB("metadata_type_ad_pod_info"))&&p.push(new WL(R));(w=w.clientMetadata.FB("metadata_type_ad_video_id"))&&p.push(new BL(w));return p}; dAW=function(R,w,p,r,f,G){const I=r.Hp.inPlayerSlotId,C=m=>hR(w,m),u={layoutId:r.Hp.inPlayerLayoutId, layoutType:"LAYOUT_TYPE_ENDCAP",R0:"core"};p={slotId:I,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,R0:"core",slotEntryTrigger:new dn(C,R),slotFulfillmentTriggers:[new Pb(C,I)],slotExpirationTriggers:[new O0(C,I),new tW(C,p)]};R={...u,layoutExitNormalTriggers:[new Dk(C,R)],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],Ig:new Map,clientMetadata:new dX([new gvI(r.Hp),new Hb(r.adPlacementConfig),f]),UQ:nH(G,p)(u), adLayoutLoggingData:r.Hp.adLayoutLoggingData};return{...p,clientMetadata:new dX([new gZ(R)])}}; YPP=function(R,w){for(const p of w)if(p.adSlotMetadata.slotType==="SLOT_TYPE_PLAYER_UNDERLAY"){w=g.F(p.fulfillmentContent.fulfilledLayout,Bb);if(!w)continue;if((w=g.F(w.renderingContent,mA))&&w.associatedPlayerBytesLayoutId===R)return p}}; LLb=function(R,w,p){const r=hW(R.slotEntryTrigger,w,p);if(r instanceof Q)return r;const f=[];for(var G of R.slotFulfillmentTriggers){const I=hW(G,w,p);if(I instanceof Q)return I;f.push(I)}G=[];for(const I of R.slotExpirationTriggers){R=hW(I,w,p);if(R instanceof Q)return R;G.push(R)}return{slotEntryTrigger:r,slotFulfillmentTriggers:f,slotExpirationTriggers:G}}; eS=function(R,w,p){const r=[];for(var f of R.layoutExitNormalTriggers||[]){var G=hW(f,w,p);if(G instanceof Q)return G;r.push(G)}f=[];for(var I of R.layoutExitSkipTriggers||[]){G=hW(I,w,p);if(G instanceof Q)return G;f.push(G)}I=[];if("layoutExitMuteTriggers"in R)for(var C of R.layoutExitMuteTriggers||[]){G=hW(C,w,p);if(G instanceof Q)return G;I.push(G)}C=[];if("layoutExitUserInputSubmittedTriggers"in R)for(var u of R.layoutExitUserInputSubmittedTriggers||[]){G=hW(u,w,p);if(G instanceof Q)return G; C.push(G)}u=[];if("layoutExitUserCancelledTriggers"in R)for(const m of R.layoutExitUserCancelledTriggers||[]){R=hW(m,w,p);if(R instanceof Q)return R;u.push(R)}return{layoutExitNormalTriggers:r,layoutExitSkipTriggers:f,layoutExitMuteTriggers:I,layoutExitUserInputSubmittedTriggers:C,layoutExitUserCancelledTriggers:u}}; PL=function(R){const w=g.F(R.renderingContent,bl);if(w?.pings)return $c(w.pings);R=g.F(R.renderingContent,gJ);return R?.skipPings?new Map([["skip",R.skipPings]]):new Map}; e7r=function(R,w,p,r,f,G){w=g.F(w.renderingContent,bl);if(!w)return new Q("Invalid rendering content for DAI media layout");R=[new GR(r),new II(p.Ua.videoLengthSeconds),...(HL(G)?[new pz({impressionCommands:w.impressionCommands,abandonCommands:w.onAbandonCommands,completeCommands:w.completeCommands,progressCommands:w.adVideoProgressCommands})]:[]),new Cz(p.Ua.playerVars),new u7(p.EO),new sE(p.w$),new yC(p.Lg),new Hb(MM(R)),new BL(p.Ua.adVideoId),new WL(p.wL),w.sodarExtensionData&&new Lz(w.sodarExtensionData), new qM({current:null}),new AR,new b7(a1(w.pings))].filter(lZY);f!==void 0&&R.push(new l7(f));return R}; DAL=function(R,w,p){R=R.map(u=>rZ(g.F(u.renderingContent,bl))); const r=R.map(u=>u.videoLengthSeconds),f=r.map((u,m)=>new fz(m,r)); let G=w,I=p;const C=[];R.forEach((u,m)=>{I=Math.min(G+u.videoLengthSeconds*1E3,p);gn(u.playerVars,f[m]);C.push({Ua:u,EO:G,w$:I,Lg:m,wL:f[m]});G=I}); return C}; PqW=function(R,w,p){const r=[];for(var f of R){var G=g.F(f.renderingContent,bl);if(G){if(!RE(G))return new Q("Invalid vod media renderer");r.push(HXb(G))}}f=r.map(C=>C.Ll); G=[];let I=0;for(let C=0;Cp instanceof Dk&&p?.triggeringLayoutId!==w)?.triggeringLayoutId}; kDx=function(R,w,p,r,f,G,I,C,u){const m=p.pings;return m?[vvY(R,G,C,f,z=>{var B=z.slotId;z=u(z);var W=p.adLayoutLoggingData,x=p.progressCommands;B=WS(w.C.get(),"LAYOUT_TYPE_DISCOVERY_PLAYBACK_TRACKER",B);const q={layoutId:B,layoutType:"LAYOUT_TYPE_DISCOVERY_PLAYBACK_TRACKER",R0:"core"};return{layoutId:B,layoutType:"LAYOUT_TYPE_DISCOVERY_PLAYBACK_TRACKER",Ig:$c(m),layoutExitNormalTriggers:[new tW(w.L,G)],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[], R0:"core",clientMetadata:new dX([new Hb(r),new b7(a1(m)),new NxH(m?.activeViewTracking?.identifier),new II(I/1E3),new pz({progressCommands:x}),new wZ(I/1E3)]),UQ:z(q),adLayoutLoggingData:W}})]:new Q("VideoAdTrackingRenderer without VideoAdTracking pings filled.",{videoAdTrackingRenderer:p})}; Rod=function(R,w,p,r,f,G,I,C){R=UAW(R,p,G,I,r,u=>{var m=u.slotId;u=C(u);m=WS(w.C.get(),"LAYOUT_TYPE_FORECASTING",m);const z={layoutId:m,layoutType:"LAYOUT_TYPE_FORECASTING",R0:"core"},B=new Map,W=f.impressionUrls;W&&B.set("impression",W);return{layoutId:m,layoutType:"LAYOUT_TYPE_FORECASTING",Ig:B,layoutExitNormalTriggers:[new M2(w.L,m)],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],R0:"core",clientMetadata:new dX([new SPP(f), new Hb(p)]),UQ:u(z)}}); return R instanceof Q?R:[R]}; pY6=function(R,w,p,r,f,G,I){return[wY6(R,G,r,C=>{var u=C.slotId;C=I(C);u=WS(w.C.get(),"LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY",u);const m={layoutId:u,layoutType:"LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY",R0:"core"};return{layoutId:u,layoutType:"LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY",Ig:new Map,layoutExitNormalTriggers:[new tW(w.L,G)],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],R0:"core",clientMetadata:new dX([new mv(f), new Hb(p)]),UQ:C(m),adLayoutLoggingData:f.adLayoutLoggingData}})]}; fWP=function(R,w,p,r,f,G,I,C){R=rTD(R,p,G,I,r,(u,m)=>{var z=u.slotId;u=C(u);var B=f.contentSupportedRenderer;B?B.textOverlayAdContentRenderer?(B=WS(w.C.get(),"LAYOUT_TYPE_IN_VIDEO_TEXT_OVERLAY",z),m=vL(w,B,"LAYOUT_TYPE_IN_VIDEO_TEXT_OVERLAY",f,p,u,NM(w,m,z))):B.enhancedTextOverlayAdContentRenderer?(B=WS(w.C.get(),"LAYOUT_TYPE_IN_VIDEO_ENHANCED_TEXT_OVERLAY",z),m=vL(w,B,"LAYOUT_TYPE_IN_VIDEO_ENHANCED_TEXT_OVERLAY",f,p,u,NM(w,m,z))):B.imageOverlayAdContentRenderer?(B=WS(w.C.get(),"LAYOUT_TYPE_IN_VIDEO_IMAGE_OVERLAY", z),m=NM(w,m,z),m.push(new Zk(w.L,45E3,B)),m=vL(w,B,"LAYOUT_TYPE_IN_VIDEO_IMAGE_OVERLAY",f,p,u,m)):m=new wJ("InvideoOverlayAdRenderer without appropriate sub renderer"):m=new wJ("InvideoOverlayAdRenderer without contentSupportedRenderer");return m}); return R instanceof Q?R:[R]}; Cjb=function(R,w,p,r,f,G,I,C,u){const m=Number(r.durationMilliseconds);return isNaN(m)?new Q("Expected valid duration for AdActionInterstitialRenderer."):z=>G9I(w,z.slotId,p,m,{impressionCommands:void 0,abandonCommands:r.abandonCommands?[{commandExecutorCommand:r.abandonCommands}]:void 0,completeCommands:r.completionCommands},r.skipPings?new Map([["skip",r.skipPings]]):new Map,I(z),B=>IWL(R,B,f,(W,x)=>{var q=W.slotId;W=I(W);q=WS(w.C.get(),"LAYOUT_TYPE_ENDCAP",q);return RI(w,q,x,p,W,"LAYOUT_TYPE_ENDCAP", [new gvI(r),C],r.adLayoutLoggingData)}),u,G-1,r.adLayoutLoggingData,G)}; uGr=function(R,w,p,r){if(!p.playerVars)return new Q("No playerVars available in AdIntroRenderer.");const f=lF(p.playerVars);f.autoplay="1";return G=>{var I=G.slotId;G=r(G);I=WS(R.C.get(),"LAYOUT_TYPE_MEDIA",I);const C={layoutId:I,layoutType:"LAYOUT_TYPE_MEDIA",R0:"adapter"};return{eW:{layoutId:I,layoutType:"LAYOUT_TYPE_MEDIA",Ig:new Map,layoutExitNormalTriggers:[],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],R0:"adapter", clientMetadata:new dX([new XPY,new Hb(w),new qM({current:null}),new Cz(f)]),UQ:G(C)},Oq:[new er(R.L,I,["error"])],M4:[],Ys:[],PJ:[]}}}; mTl=function(R,w,p,r,f,G,I,C,u,m=!1){const z=U0(f);if(!IUI(f,m))return new Q("Received invalid InstreamSurveyAdRenderer for VOD composite survey.",{InstreamSurveyAdRenderer:f});if(z<=0)return new Q("InstreamSurveyAdRenderer should have valid duration.",{instreamSurveyAdRenderer:f});const B=nBl(R,w,f,G,p,r,I);return B instanceof Q?B:W=>sAL(w,W.slotId,p,z,Sr(f),I(W),B,C,u)}; BzY=function(R,w,p,r,f,G,I,C){if(!(!isNaN(Number(f.timeoutSeconds))&&f.text&&f.ctaButton&&g.F(f.ctaButton,ky)&&f.brandImage&&f.backgroundImage&&g.F(f.backgroundImage,UE)&&g.F(f.backgroundImage,UE)?.landscape))return new Q("Received invalid SurveyTextInterstitialRenderer.",{SurveyTextInterstitialRenderer:f});const u=f.timeoutSeconds*1E3,m=(B,W)=>{var x=B.slotId;B=I(B);x=WS(w.C.get(),"LAYOUT_TYPE_VIDEO_INTERSTITIAL_BUTTONED_LEFT",x);return RI(w,x,W,p,B,"LAYOUT_TYPE_VIDEO_INTERSTITIAL_BUTTONED_LEFT", [new zo_(f),G],f.adLayoutLoggingData)},z=B=>IWL(R,B,r,m); return B=>{var W=B.slotId,x={impressionCommands:f.impressionCommands,completeCommands:f.timeoutCommands,skipCommands:f.dismissCommands};B=I(B);W=SS(w,W,p,u,x,new Map,B,z);x=new Zg(W.zF);B=new Yy(C);return{eW:{layoutId:W.layoutId,layoutType:W.layoutType,Ig:W.Ig,layoutExitNormalTriggers:[],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],R0:W.R0,clientMetadata:new dX([...W.Ei,x,B]),UQ:W.UQ,adLayoutLoggingData:W.adLayoutLoggingData}, Oq:[],M4:W.layoutExitMuteTriggers,Ys:W.layoutExitUserInputSubmittedTriggers,PJ:W.layoutExitUserCancelledTriggers,ob:W.ob}}}; xTd=function(R,w,p,r,f,G,I,C,u,m,z,B,W,x,q,O){R=Ot(R,"SLOT_TYPE_PLAYER_BYTES");r=rxb(w,I,r,f,R,m,z);if(r instanceof Q)return r;I=r.clientMetadata.FB("metadata_type_fulfilled_layout")?.layoutId;if(!I)return new Q("Invalid adNotify layout");w=WCL(I,w,p,f,G,u,C,m,B,W,x,q,O);return w instanceof Q?w:[r,...w]}; WCL=function(R,w,p,r,f,G,I,C,u,m,z,B,W){p=lWd(w,p,r,G,I,C,u,m,z,B,W);LCI(G)?(r=qOx(w,R),R=Ot(w.C.get(),"SLOT_TYPE_IN_PLAYER"),G=WS(w.C.get(),"LAYOUT_TYPE_SURVEY",R),C=Rq(w,r,C),w=[...C.slotExpirationTriggers,new $N(w.L,G)],R=p({slotId:C.slotId,slotType:C.slotType,slotPhysicalPosition:C.slotPhysicalPosition,slotEntryTrigger:C.slotEntryTrigger,slotFulfillmentTriggers:C.slotFulfillmentTriggers,slotExpirationTriggers:w,R0:C.R0},{slotId:R,layoutId:G}),f=R instanceof Q?R:{wA:{...C,slotExpirationTriggers:w, clientMetadata:new dX([new gZ(R.layout)]),adSlotLoggingData:f},Yy:R.Yy}):f=CqW(w,R,C,f,p);return f instanceof Q?f:[...f.Yy,f.wA]}; bi_=function(R,w,p,r,f,G,I,C,u,m,z,B,W,x){w=lWd(R,w,p,f,G,I,u,m,z,B,W,x);LCI(f)?(I=AT6(R,p,I,C),I instanceof Q?R=I:(C=Ot(R.C.get(),"SLOT_TYPE_IN_PLAYER"),u=WS(R.C.get(),"LAYOUT_TYPE_SURVEY",C),f=[...I.slotExpirationTriggers,new $N(R.L,u)],C=w({slotId:I.slotId,slotType:I.slotType,slotPhysicalPosition:I.slotPhysicalPosition,R0:I.R0,slotEntryTrigger:I.slotEntryTrigger,slotFulfillmentTriggers:I.slotFulfillmentTriggers,slotExpirationTriggers:f},{slotId:C,layoutId:u}),R=C instanceof Q?C:{wA:{slotId:I.slotId, slotType:I.slotType,slotPhysicalPosition:I.slotPhysicalPosition,slotEntryTrigger:I.slotEntryTrigger,slotFulfillmentTriggers:I.slotFulfillmentTriggers,slotExpirationTriggers:f,R0:I.R0,clientMetadata:new dX([new gZ(C.layout),new Dg({hQ:R.hQ(p)})]),adSlotLoggingData:r},Yy:C.Yy})):R=uo6(R,p,I,C,r,u.PB,w);return R instanceof Q?R:R.Yy.concat(R.wA)}; LCI=function(R){for(const w of R)if(g.F(w,ft))return!0;return!1}; lWd=function(R,w,p,r,f,G,I,C,u,m,z,B){return(W,x)=>{if(nz(z)&&dZ(z))a:{var q=yTb(r);if(q instanceof Q)x=q;else{var O=0,e=[],P=[],c=[],X=[],Z=[],Gr=[],Il=new w$,FW=new XP({current:null}),tY=!1,j_=[],hY=0,aK=[];for(var JY=0;JY0?q:-1;continue}if(Df=g.F(JY,gJ)){JY=Cjb(R,w,p,Df,G,O,C,FW,q);if(JY instanceof Q){x= JY;break a}JY=JY(W);e.push(JY.eW);P=[...JY.Oq,...P];c=[...JY.M4,...c];JY.ob&&(j_=[JY.ob,...j_]);continue}if(Df=g.F(JY,ft)){if(x===void 0){x=new Q("Composite Survey must already have a Survey Bundle with required metadata.",{instreamSurveyAdRenderer:Df});break a}JY=mTl(R,w,p,G,Df,Il,C,x,O,BS(z,"supports_multi_step_on_desktop"));if(JY instanceof Q){x=JY;break a}JY=JY(W);e.push(JY.eW);JY.ob&&j_.push(JY.ob);P=[...JY.Oq,...P];c=[...JY.M4,...c];X=[...JY.Ys,...X];Z=[...JY.PJ,...Z];Gr=[Il,...Gr];continue}if(JY= g.F(JY,Gg)){JY=BzY(R,w,p,G,JY,Il,C,O);if(JY instanceof Q){x=JY;break a}JY=JY(W);e.push(JY.eW);JY.ob&&j_.push(JY.ob);c=[...JY.M4,...c]}else{x=new Q("Unsupported linearAd found in LinearAdSequenceRenderer.");break a}}x={u9:e,layoutExitSkipTriggers:P,layoutExitUserInputSubmittedTriggers:X,layoutExitUserCancelledTriggers:Z,layoutExitMuteTriggers:c,Ei:Gr,Yy:j_}}}else a:if(aK=yTb(r),aK instanceof Q)x=aK;else{Dv=0;e=[];P=[];c=[];X=[];Z=[];Gr=[];Il=new w$;FW=new XP({current:null});tY=!1;j_=[];hY=-1;for(O of r)if(g.F(O, rn)){q=uGr(w,p,g.F(O,rn),C);if(q instanceof Q){x=q;break a}q=q(W);e.push(q.eW);P=[...q.Oq,...P];c=[...q.M4,...c];q.ob&&(j_=[q.ob,...j_])}else if(g.F(O,bl)){hY=VC(g.F(O,bl));if(hY instanceof wJ){x=new Q(hY);break a}q=new fz(Dv,aK);q=Vh_(w,hY.layoutId,hY.VV,p,oI(hY.playerVars,hY.fD,I,m,q),hY.Ll,G,q,C(W),FW,u.get(hY.VV.externalVideoId),void 0,B);Dv++;e.push(q.eW);P=[...q.Oq,...P];c=[...q.M4,...c];tY||(Gr.push(FW),tY=!0);hY=(hY=hY.VV.adPodSkipTarget)&&hY>0?hY:-1}else if(g.F(O,gJ)){q=Cjb(R,w,p,g.F(O,gJ), G,Dv,C,FW,hY);if(q instanceof Q){x=q;break a}q=q(W);e.push(q.eW);P=[...q.Oq,...P];c=[...q.M4,...c];q.ob&&(j_=[q.ob,...j_])}else if(g.F(O,ft)){if(x===void 0){x=new Q("Composite Survey must already have a Survey Bundle with required metadata.",{instreamSurveyAdRenderer:g.F(O,ft)});break a}q=mTl(R,w,p,G,g.F(O,ft),Il,C,x,Dv,BS(z,"supports_multi_step_on_desktop"));if(q instanceof Q){x=q;break a}q=q(W);e.push(q.eW);q.ob&&j_.push(q.ob);P=[...q.Oq,...P];c=[...q.M4,...c];X=[...q.Ys,...X];Z=[...q.PJ,...Z]; Gr=[Il,...Gr]}else if(g.F(O,Gg)){q=BzY(R,w,p,G,g.F(O,Gg),Il,C,Dv);if(q instanceof Q){x=q;break a}q=q(W);e.push(q.eW);q.ob&&j_.push(q.ob);c=[...q.M4,...c]}else{x=new Q("Unsupported linearAd found in LinearAdSequenceRenderer.");break a}x={u9:e,layoutExitSkipTriggers:P,layoutExitUserInputSubmittedTriggers:X,layoutExitUserCancelledTriggers:Z,layoutExitMuteTriggers:c,Ei:Gr,Yy:j_}}x instanceof Q?W=x:(Z=W.slotId,Dv=x.u9,O=x.layoutExitSkipTriggers,e=x.layoutExitMuteTriggers,P=x.layoutExitUserInputSubmittedTriggers, c=x.Ei,W=C(W),X=f?f.layoutType:"LAYOUT_TYPE_COMPOSITE_PLAYER_BYTES",Z=f?f.layoutId:WS(w.C.get(),X,Z),Gr={layoutId:Z,layoutType:X,R0:"core"},W={layout:{layoutId:Z,layoutType:X,Ig:new Map,layoutExitNormalTriggers:[new M2(w.L,Z)],layoutExitSkipTriggers:O,layoutExitMuteTriggers:e,layoutExitUserInputSubmittedTriggers:P,layoutExitUserCancelledTriggers:[],R0:"core",clientMetadata:new dX([new o0Y(Dv),...c]),UQ:W(Gr)},Yy:x.Yy});return W}}; yTb=function(R){const w=[];for(const p of R){if(!g.F(p,bl))continue;R=VC(g.F(p,bl));if(R instanceof wJ)return new Q(R);w.push(R.Ll)}return w}; OiH=function(R,w,p,r,f,G,I,C=!1){if(!IUI(p,C))return new Q("Received invalid InstreamSurveyAdRenderer for VOD single survey.",{InstreamSurveyAdRenderer:p});const u=U0(p);if(u<=0)return new Q("InstreamSurveyAdRenderer should have valid duration.",{instreamSurveyAdRenderer:p});const m=new w$,z=nBl(R,w,p,m,r,G,I);return thP(R,r,G,u,f,(B,W)=>{var x=B.slotId,q=Sr(p);B=I(B);x=WS(w.C.get(),"LAYOUT_TYPE_MEDIA_BREAK",x);const O={layoutId:x,layoutType:"LAYOUT_TYPE_MEDIA_BREAK",R0:"core"},e=z(x,W),P=e.clientMetadata.FB("metadata_type_fulfilled_layout"); P||MY("Could not retrieve overlay layout ID during VodMediaBreakLayout for survey creation. This should never happen.");q=[new Hb(r),new i7(u),new pz(q),m];P&&q.push(new QC(P.layoutType));return{A0:{layoutId:x,layoutType:"LAYOUT_TYPE_MEDIA_BREAK",Ig:new Map,layoutExitNormalTriggers:[new M2(w.L,x)],layoutExitSkipTriggers:[new cb(w.L,W.layoutId)],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[new aE(w.L,W.layoutId)],layoutExitUserCancelledTriggers:[],R0:"core",clientMetadata:new dX(q), UQ:B(O)},TU:e}})}; KCL=function(R){if(!sN6(R))return!1;const w=g.F(R.adVideoStart,pl);return w?g.F(R.linearAd,bl)&&kj(w)?!0:(MY("Invalid Sandwich with notify"),!1):!1}; E0W=function(R){if(R.linearAds==null)return!1;R=g.F(R.adStart,pl);return R?kj(R)?!0:(MY("Invalid LASR with notify"),!1):!1}; DTb=function(R){if(!u4r(R))return!1;R=g.F(R.adStart,pl);return R?kj(R)?!0:(MY("Invalid LASR with notify"),!1):!1}; yi=function(R,w,p,r,f,G,I,C,u,m,z){const B=[];if(w.length===0&&r.length===0&&p.length===0)return B;w=w.filter(UU);const W=p.filter(rjD),x=r.filter(UU),q=new Map,O=xAY(w),e=p.some(Gr=>Gr?.adSlotMetadata?.slotType==="SLOT_TYPE_PLAYER_BYTES"),P=p.some(Gr=>Gr?.adSlotMetadata?.slotType==="SLOT_TYPE_PLAYER_UNDERLAY"),c=p.some(Gr=>Gr?.adSlotMetadata?.slotType==="SLOT_TYPE_IN_PLAYER"),X=p.some(Gr=>Gr?.adSlotMetadata?.slotType==="SLOT_TYPE_BELOW_PLAYER"||Gr?.adSlotMetadata?.slotType==="SLOT_TYPE_ABOVE_FEED"), Z=p.some(Gr=>Gr?.adSlotMetadata?.slotType==="SLOT_TYPE_PLAYER_BYTES_SEQUENCE_ITEM"); p=p.some(Gr=>Gr?.adSlotMetadata?.slotType==="SLOT_TYPE_IN_PLAYER_ORGANIC_OVERLAY"); if(e||P||c||X||Z||p)m=OXb(W,w,C,f,O,R.L3.get(),R.loadPolicy,q,R.BS.get(),R.G.get(),c,I,u,m,z),m instanceof Q?MY(m,void 0,void 0,{contentCpn:f}):B.push(...m);for(const Gr of w)m=eoL(R,q,Gr,f,G,I,e,C,O,u,W,R.BS.get().B.V().experiments.XB("html5_enable_triggering_cuepoint_for_slot")?z:void 0),m instanceof Q?MY(m,void 0,void 0,{renderer:Gr.renderer,config:Gr.config.adPlacementConfig,kind:Gr.config.adPlacementConfig.kind,contentCpn:f,daiEnabled:I}):B.push(...m);Mhl(R.BS.get())||(G=cTb(R,x,f,C,O,q),B.push(...G)); if(R.O===null||I&&!C.uY)return R=C.PB&&w.length===1&&w[0].config?.adPlacementConfig?.kind==="AD_PLACEMENT_KIND_CUE_POINT_TRIGGERED"&&w[0].renderer?.adBreakServiceRenderer,B.length||R||MY("Expected slots parsed from AdPlacementRenderers for DAI",void 0,void 0,{"AdPlacementRenderer count":w.length,contentCpn:f,"first APR kind":w[0]?.config?.adPlacementConfig?.kind,renderer:w[0]?.renderer}),B;r=r.filter(UU);B.push(...PBd(q,r,R.C.get(),R.O,f,e));B.length||MY("Expected slots parsed from AdPlacementRenderers", void 0,void 0,{"AdPlacementRenderer count":w.length,contentCpn:f,daiEnabled:I.toString(),"first APR kind":w[0]?.config?.adPlacementConfig?.kind,renderer:w[0]?.renderer});return B}; eoL=function(R,w,p,r,f,G,I,C,u,m,z,B){const W=p.renderer,x=p.config.adPlacementConfig,q=x.kind,O=p.adSlotLoggingData,e=c=>nH(R.L3.get(),c); var P=C.uY&&q==="AD_PLACEMENT_KIND_START";P=G&&!P;if(W.adsEngagementPanelRenderer!=null)return kN(w,p.elementId,q,W.adsEngagementPanelRenderer.isContentVideoEngagementPanel,W.adsEngagementPanelRenderer.adVideoId,W.adsEngagementPanelRenderer.associatedCompositePlayerBytesLayoutId,x,O,(c,X,Z,Gr)=>{var Il=R.L.get(),FW=c.slotId,tY=W.adsEngagementPanelRenderer;c=nH(R.L3.get(),c);return r$(Il,FW,"LAYOUT_TYPE_PANEL_TEXT_ICON_IMAGE_TILES_BUTTON",new Pj_(tY),X,Z,tY.impressionPings,c,W.adsEngagementPanelRenderer.adLayoutLoggingData, Gr)}),[]; if(W.adsEngagementPanelLayoutViewModel)return kN(w,p.elementId,q,W.adsEngagementPanelLayoutViewModel.isContentVideoEngagementPanel,W.adsEngagementPanelLayoutViewModel.adVideoId,W.adsEngagementPanelLayoutViewModel.associatedCompositePlayerBytesLayoutId,x,O,(c,X,Z,Gr)=>{var Il=R.L.get(),FW=c.slotId,tY=W.adsEngagementPanelLayoutViewModel;c=nH(R.L3.get(),c);return fl(Il,FW,"LAYOUT_TYPE_PANEL",new aWd(tY),X,Z,c,W.adsEngagementPanelLayoutViewModel.adLayoutLoggingData,Gr)}),[]; if(W.actionCompanionAdRenderer!=null){if(W.actionCompanionAdRenderer.showWithoutLinkedMediaLayout)return KHd(R.C.get(),R.O,R.L.get(),W.actionCompanionAdRenderer,x,O,r,e);kN(w,p.elementId,q,W.actionCompanionAdRenderer.isContentVideoCompanion,W.actionCompanionAdRenderer.adVideoId,W.actionCompanionAdRenderer.associatedCompositePlayerBytesLayoutId,x,O,(c,X,Z,Gr)=>{var Il=R.L.get(),FW=c.slotId,tY=W.actionCompanionAdRenderer;c=nH(R.L3.get(),c);return r$(Il,FW,"LAYOUT_TYPE_COMPANION_WITH_ACTION_BUTTON", new Ohd(tY),X,Z,tY.impressionPings,c,W.actionCompanionAdRenderer.adLayoutLoggingData,Gr)})}else if(W.topBannerImageTextIconButtonedLayoutViewModel!==void 0){if(W.topBannerImageTextIconButtonedLayoutViewModel.showWithoutLinkedMediaLayout)return D0d(R.C.get(),R.O,R.L.get(),W.topBannerImageTextIconButtonedLayoutViewModel,x,O,r,e); kN(w,p.elementId,q,W.topBannerImageTextIconButtonedLayoutViewModel.isContentVideoCompanion,W.topBannerImageTextIconButtonedLayoutViewModel.adVideoId,W.topBannerImageTextIconButtonedLayoutViewModel.associatedCompositePlayerBytesLayoutId,x,O,(c,X,Z,Gr)=>{var Il=R.L.get(),FW=c.slotId,tY=W.topBannerImageTextIconButtonedLayoutViewModel;c=nH(R.L3.get(),c);return fl(Il,FW,"LAYOUT_TYPE_COMPANION_WITH_ACTION_BUTTON",new EBl(tY),X,Z,c,W.topBannerImageTextIconButtonedLayoutViewModel.adLayoutLoggingData,Gr)})}else if(W.imageCompanionAdRenderer)kN(w, p.elementId,q,W.imageCompanionAdRenderer.isContentVideoCompanion,W.imageCompanionAdRenderer.adVideoId,W.imageCompanionAdRenderer.associatedCompositePlayerBytesLayoutId,x,O,(c,X,Z,Gr)=>{var Il=R.L.get(),FW=c.slotId,tY=W.imageCompanionAdRenderer; c=nH(R.L3.get(),c);return r$(Il,FW,"LAYOUT_TYPE_COMPANION_WITH_IMAGE",new $Tr(tY),X,Z,tY.impressionPings,c,W.imageCompanionAdRenderer.adLayoutLoggingData,Gr)}); else if(W.bannerImageLayoutViewModel)kN(w,p.elementId,q,W.bannerImageLayoutViewModel.isContentVideoCompanion,W.bannerImageLayoutViewModel.adVideoId,W.bannerImageLayoutViewModel.associatedCompositePlayerBytesLayoutId,x,O,(c,X,Z,Gr)=>{var Il=R.L.get(),FW=c.slotId,tY=W.bannerImageLayoutViewModel;c=nH(R.L3.get(),c);return fl(Il,FW,"LAYOUT_TYPE_COMPANION_WITH_IMAGE",new XYW(tY),X,Z,c,W.bannerImageLayoutViewModel.adLayoutLoggingData,Gr)}); else if(W.shoppingCompanionCarouselRenderer)kN(w,p.elementId,q,W.shoppingCompanionCarouselRenderer.isContentVideoCompanion,W.shoppingCompanionCarouselRenderer.adVideoId,W.shoppingCompanionCarouselRenderer.associatedCompositePlayerBytesLayoutId,x,O,(c,X,Z,Gr)=>{var Il=R.L.get(),FW=c.slotId,tY=W.shoppingCompanionCarouselRenderer;c=nH(R.L3.get(),c);return r$(Il,FW,"LAYOUT_TYPE_COMPANION_WITH_SHOPPING",new n0H(tY),X,Z,tY.impressionPings,c,W.shoppingCompanionCarouselRenderer.adLayoutLoggingData,Gr)}); else if(W.adBreakServiceRenderer){if(p.renderer?.adBreakServiceRenderer?.getAdBreakUrl===void 0)return[];if(q==="AD_PLACEMENT_KIND_PAUSE")return VN6(R.C.get(),x,O,p.renderer.adBreakServiceRenderer,r);if(q!=="AD_PLACEMENT_KIND_CUE_POINT_TRIGGERED"&&q!=="AD_PLACEMENT_KIND_PREFETCH_TRIGGERED")return qnY(R.C.get(),x,O,p.renderer.adBreakServiceRenderer,r,f,G);C.PB||MY("Received non-live cue point triggered AdBreakServiceRenderer",void 0,void 0,{kind:q,adPlacementConfig:x,daiEnabledForContentVideo:String(G), isServedFromLiveInfra:String(C.PB),clientPlaybackNonce:C.clientPlaybackNonce});if(q==="AD_PLACEMENT_KIND_PREFETCH_TRIGGERED"){if(!R.s0)return new Q("Received AD_PLACEMENT_KIND_PREFETCH_TRIGGERED with no playerControlsApiProvider set for interface");if(!R.ZZ)return new Q("Received AD_PLACEMENT_KIND_PREFETCH_TRIGGERED with no PrefetchTriggerAdapter set for interface");R.ZZ.Yx({adPlacementRenderer:p,contentCpn:r,Zm:f});f=R.s0.get().getCurrentTimeSec(1,!1);return dTH(R.C.get(),p.renderer.adBreakServiceRenderer, x,f,r,O,G)}if(!R.PK)return new Q("Received AD_PLACEMENT_KIND_CUE_POINT_TRIGGERED with no CuePointOpportunityAdapter set for interface");R.PK.Yx({adPlacementRenderer:p,contentCpn:r,Zm:f})}else{if(W.clientForecastingAdRenderer)return Rod(R.C.get(),R.L.get(),x,O,W.clientForecastingAdRenderer,r,f,e);if(W.invideoOverlayAdRenderer)return fWP(R.C.get(),R.L.get(),x,O,W.invideoOverlayAdRenderer,r,f,e);if(W.instreamAdPlayerOverlayRenderer)return pY6(R.C.get(),R.L.get(),x,O,W.instreamAdPlayerOverlayRenderer, r,e);if((W.linearAdSequenceRenderer||W.instreamVideoAdRenderer)&&P)return U06(R.C.get(),R.L.get(),p,r,e,m,B);if(W.linearAdSequenceRenderer&&!P){if(I)return[];vb(w,W,q);if(W.linearAdSequenceRenderer.adLayoutMetadata){if(!u4r(W.linearAdSequenceRenderer))return new Q("Received invalid LinearAdSequenceRenderer.")}else if(W.linearAdSequenceRenderer.linearAds==null)return new Q("Received invalid LinearAdSequenceRenderer.");if(g.F(W.linearAdSequenceRenderer.adStart,pl)){MY("Found AdNotify in LinearAdSequenceRenderer"); p=g.F(W.linearAdSequenceRenderer.adStart,pl);if(!(p?.durationMs!=null&&p?.durationMs>0))return new Q("Invalid AdMessageRenderer.");G=W.linearAdSequenceRenderer.linearAds;return xTd(R.G.get(),R.C.get(),R.L.get(),R.L3.get(),x,O,p,il(W.linearAdSequenceRenderer.adLayoutMetadata)?W.linearAdSequenceRenderer.adLayoutMetadata:void 0,G,r,f,C,e,u,R.loadPolicy,R.BS.get())}return bi_(R.C.get(),R.L.get(),x,O,W.linearAdSequenceRenderer.linearAds,il(W.linearAdSequenceRenderer.adLayoutMetadata)?W.linearAdSequenceRenderer.adLayoutMetadata: void 0,r,f,C,e,u,R.loadPolicy,R.BS.get(),z)}if(!W.remoteSlotsRenderer||G){if(W.instreamVideoAdRenderer&&!P){if(I)return[];vb(w,W,q);return sdY(R.C.get(),R.L.get(),x,O,W.instreamVideoAdRenderer,r,f,C,e,u,R.loadPolicy,R.BS.get(),R.L3.get(),z)}if(W.instreamSurveyAdRenderer)return OiH(R.C.get(),R.L.get(),W.instreamSurveyAdRenderer,x,O,r,e,BS(R.BS.get(),"supports_multi_step_on_desktop"));if(W.sandwichedLinearAdRenderer!=null)return sN6(W.sandwichedLinearAdRenderer)?g.F(W.sandwichedLinearAdRenderer.adVideoStart, pl)?(MY("Found AdNotify in SandwichedLinearAdRenderer"),p=g.F(W.sandwichedLinearAdRenderer.adVideoStart,pl),p?.durationMs!=null&&p?.durationMs>0?(G=g.F(W.sandwichedLinearAdRenderer.linearAd,bl))?GDr(p,G,x,R.G.get(),R.C.get(),R.L.get(),R.L3.get(),O,r,f,C,e,u,R.loadPolicy,R.BS.get()):new Q("Missing IVAR from Sandwich"):new Q("Invalid AdMessageRenderer.")):bi_(R.C.get(),R.L.get(),x,O,[W.sandwichedLinearAdRenderer.adVideoStart,W.sandwichedLinearAdRenderer.linearAd],void 0,r,f,C,e,u,R.loadPolicy,R.BS.get()): new Q("Received invalid SandwichedLinearAdRenderer.");if(W.videoAdTrackingRenderer!=null)return kDx(R.C.get(),R.L.get(),W.videoAdTrackingRenderer,x,O,r,f,C.uB,e)}}return[]}; cTb=function(R,w,p,r,f,G){const I=z=>nH(R.L3.get(),z),C=[]; for(const z of w){w=z.renderer;var u=w.sandwichedLinearAdRenderer,m=w.linearAdSequenceRenderer;u&&KCL(u)?(MY("Found AdNotify with SandwichedLinearAdRenderer"),m=g.F(u.adVideoStart,pl),u=g.F(u.linearAd,bl),vb(G,w,z.config.adPlacementConfig.kind),w=fZr(m?.layout.layoutId,R.C.get(),R.L.get(),z.config.adPlacementConfig,z.adSlotLoggingData,u,p,r,I,f,R.loadPolicy,R.BS.get(),R.L3.get()),w instanceof Q?MY(w):C.push(...w)):m&&(!m.adLayoutMetadata&&E0W(m)||m.adLayoutMetadata&&DTb(m))&&(MY("Found AdNotify with LinearAdSequenceRenderer"), vb(G,w,z.config.adPlacementConfig.kind),w=WCL(g.F(m.adStart,pl)?.layout.layoutId,R.C.get(),R.L.get(),z.config.adPlacementConfig,z.adSlotLoggingData,m.linearAds,il(m.adLayoutMetadata)?m.adLayoutMetadata:void 0,p,r,I,f,R.loadPolicy,R.BS.get()),w instanceof Q?MY(w):C.push(...w))}return C}; uP=function(R,w,p){const r=R.s0.get().getCurrentTimeSec(1,!1);R.BS.get().B.V().dn()&&Po(R.D$.get(),"sdai",`onopp.1;evt.${p.event};start.${p.startSecs.toFixed(3)};d.${p.W1.toFixed(3)}`);t6(R.C.get(),"OPPORTUNITY_TYPE_LIVE_STREAM_BREAK_SIGNAL",()=>{var f=R.O.get(),G=w.adPlacementRenderer.renderer.adBreakServiceRenderer,I=w.contentCpn,C=w.adPlacementRenderer.adSlotLoggingData;GA(R.BS.get());var u=R.D$;var m=f.BS.get();m=g.Iq(m.B.V().experiments,"max_prefetch_window_sec_for_livestream_optimization"); var z=f.BS.get();var B=g.Iq(z.B.V().experiments,"min_prefetch_offset_sec_for_livestream_optimization");{z=p.startSecs*1E3;z={D0:new Oc(z,z+p.W1*1E3),PP:!1,cueProcessedMs:r*1E3};const x=p.startSecs+p.W1;if(r===0)z.jQ=new Oc(0,x*1E3);else{B=p.startSecs-B;var W=B-r;z.jQ=W<=0?new Oc(B*1E3,x*1E3):new Oc(Math.floor(r+Math.random()*Math.min(W,m))*1E3,x*1E3)}m=z}G=Vi(f,G,I,m,C,[new ZiH(p)]);Cl(f.BS.get())&&Po(u.get(),"abrsm",`cpi.${p.identifier};cps.${p.startSecs};cpd.${p.W1};cts.${r};rbf.${m.jQ.start}`); u.get().B.QS(p.startSecs-r,m.jQ.start/1E3-r);return[G]})}; s9=function(R){const w=R.clientMetadata.FB("metadata_type_player_bytes_callback_ref")?.current;if(!w)return null;const p=R.clientMetadata.FB("metadata_type_ad_pod_skip_target_callback_ref");var r=R.layoutId,f=R.clientMetadata.FB("metadata_type_content_cpn"),G=R.clientMetadata.FB("metadata_type_instream_ad_player_overlay_renderer"),I=R.clientMetadata.FB("metadata_type_player_overlay_layout_renderer"),C=R.clientMetadata.FB("metadata_type_player_underlay_renderer"),u=R.clientMetadata.FB("metadata_type_ad_placement_config"), m=R.clientMetadata.FB("metadata_type_video_length_seconds");var z=ey(R.clientMetadata,"METADATA_TYPE_MEDIA_LAYOUT_DURATION_seconds")?R.clientMetadata.FB("METADATA_TYPE_MEDIA_LAYOUT_DURATION_seconds"):ey(R.clientMetadata,"metadata_type_layout_enter_ms")&&ey(R.clientMetadata,"metadata_type_layout_exit_ms")?(R.clientMetadata.FB("metadata_type_layout_exit_ms")-R.clientMetadata.FB("metadata_type_layout_enter_ms"))/1E3:void 0;return{pg:r,contentCpn:f,M_:w,Np:p,instreamAdPlayerOverlayRenderer:G,playerOverlayLayoutRenderer:I, instreamAdPlayerUnderlayRenderer:C,adPlacementConfig:u,videoLengthSeconds:m,Pd:z,inPlayerLayoutId:R.clientMetadata.FB("metadata_type_linked_in_player_layout_id"),inPlayerSlotId:R.clientMetadata.FB("metadata_type_linked_in_player_slot_id")}}; FCx=function(R,w){return YOH(R,w)}; jAd=function(R,w){w=YOH(R,w);if(!w)return null;w.Pd=R.clientMetadata.FB("metadata_type_ad_pod_info")?.adBreakRemainingLengthSeconds;return w}; YOH=function(R,w){const p=R.clientMetadata.FB("metadata_type_player_bytes_callback_ref")?.current;if(!p)return null;const r=S4l(R,w);return{Z7:UGl(R,w),adPlacementConfig:R.clientMetadata.FB("metadata_type_ad_placement_config"),U3:r,contentCpn:R.clientMetadata.FB("metadata_type_content_cpn"),inPlayerLayoutId:R.clientMetadata.FB("metadata_type_linked_in_player_layout_id"),inPlayerSlotId:R.clientMetadata.FB("metadata_type_linked_in_player_slot_id"),instreamAdPlayerOverlayRenderer:R.clientMetadata.FB("metadata_type_instream_ad_player_overlay_renderer"), playerOverlayLayoutRenderer:void 0,instreamAdPlayerUnderlayRenderer:void 0,Pd:void 0,M_:p,pg:R.layoutId,videoLengthSeconds:R.clientMetadata.FB("metadata_type_video_length_seconds")}}; JTH=function(R,w,p){return Bx_(R.L.get(),w.contentCpn,w.pg,r=>WLd(R.C.get(),r.slotId,p,w.adPlacementConfig,w.pg,nH(R.L3.get(),r)))}; t6=function(R,w,p,r){R.L().Rh(w,r);p=p();R=R.L();R.qr.L("ADS_CLIENT_EVENT_TYPE_OPPORTUNITY_PROCESSED",w,r,p);for(const C of p)a:{w=R;T7(w.qr,"ADS_CLIENT_EVENT_TYPE_SLOT_RECEIVED",C);T7(w.qr,"ADS_CLIENT_EVENT_TYPE_SCHEDULE_SLOT_REQUESTED",C);try{var f=w.L;if(g.fj(C.slotId))throw new Q("Slot ID was empty",void 0,"ADS_CLIENT_ERROR_MESSAGE_INVALID_SLOT");if(jy(f,C))throw new Q("Duplicate registration for slot.",{slotId:C.slotId,slotEntryTriggerType:C.slotEntryTrigger.triggerType},"ADS_CLIENT_ERROR_MESSAGE_DUPLICATE_SLOT"); if(!f.Eu.kq.has(C.slotType))throw new Q("No fulfillment adapter factory registered for slot of type: "+C.slotType,void 0,"ADS_CLIENT_ERROR_MESSAGE_NO_FULFILLMENT_ADAPTER_REGISTERED");if(!f.Eu.NV.has(C.slotType))throw new Q("No SlotAdapterFactory registered for slot of type: "+C.slotType,void 0,"ADS_CLIENT_ERROR_MESSAGE_NO_SLOT_ADAPTER_REGISTERED");C2(f,"TRIGGER_CATEGORY_SLOT_ENTRY",C.slotEntryTrigger?[C.slotEntryTrigger]:[]);C2(f,"TRIGGER_CATEGORY_SLOT_FULFILLMENT",C.slotFulfillmentTriggers);C2(f, "TRIGGER_CATEGORY_SLOT_EXPIRATION",C.slotExpirationTriggers);var G=w.L;const u=`${C.slotType}_${C.slotPhysicalPosition}`,m=hB(G,u);if(jy(G,C))throw new Q("Duplicate slots not supported",void 0,"ADS_CLIENT_ERROR_MESSAGE_DUPLICATE_SLOT");m.set(C.slotId,new Tzd(C));G.L.set(u,m)}catch(u){u instanceof Q&&u.zw?(Sy(w.qr,"ADS_CLIENT_ERROR_TYPE_REGISTER_SLOT_FAILED",u.zw,C),MY(u,C,void 0,void 0,u.FS)):(Sy(w.qr,"ADS_CLIENT_ERROR_TYPE_REGISTER_SLOT_FAILED","ADS_CLIENT_ERROR_MESSAGE_UNEXPECTED_ERROR",C),MY(u, C));break a}jy(w.L,C).J=!0;try{var I=w.L;const u=jy(I,C),m=C.slotEntryTrigger,z=I.Eu.aG.get(m.triggerType);z&&(z.vu("TRIGGER_CATEGORY_SLOT_ENTRY",m,C,null),u.xY.set(m.triggerId,z));for(const x of C.slotFulfillmentTriggers){const q=I.Eu.aG.get(x.triggerType);q&&(q.vu("TRIGGER_CATEGORY_SLOT_FULFILLMENT",x,C,null),u.pB.set(x.triggerId,q))}for(const x of C.slotExpirationTriggers){const q=I.Eu.aG.get(x.triggerType);q&&(q.vu("TRIGGER_CATEGORY_SLOT_EXPIRATION",x,C,null),u.X.set(x.triggerId,q))}const B=I.Eu.kq.get(C.slotType).get().build(I.O, C);u.D=B;const W=I.Eu.NV.get(C.slotType).get().build(I.K,C);W.init();u.C=W}catch(u){u instanceof Q&&u.zw?(Sy(w.qr,"ADS_CLIENT_ERROR_TYPE_SCHEDULE_SLOT_FAILED",u.zw,C),MY(u,C,void 0,void 0,u.FS)):(Sy(w.qr,"ADS_CLIENT_ERROR_TYPE_SCHEDULE_SLOT_FAILED","ADS_CLIENT_ERROR_MESSAGE_UNEXPECTED_ERROR",C),MY(u,C));gX(w,C,!0);break a}T7(w.qr,"ADS_CLIENT_EVENT_TYPE_SLOT_SCHEDULED",C);w.L.VB(C);for(const u of w.C)u.VB(C);vz(w,C)}}; zvb=function(R,w){var p=0x8000000000000;let r=0,f=0x8000000000000;for(const u of w.slotFulfillmentTriggers){if(!(u instanceof Xt)){MY("Found unexpected fulfillment trigger for throttled slot.",w,null,{fulfillmentTrigger:u});continue}const m=u.L.start;p=Math.min(p,m);r=Math.max(r,u.L.end);u.visible&&(f=Math.min(f,m))}const {startMs:G,endMs:I,IC:C}={startMs:p,endMs:r,IC:f<0x8000000000000&&p0&&Hz(R.J(),G)}; g0W=function(R,w){w=(w.W1+1)*1E3;let p=void 0;for(const {trigger:r,slot:f}of R.n_.values())r instanceof JW&&r.breakDurationMs<=w&&(!p||r.breakDurationMs>p.trigger.breakDurationMs)&&(p={slot:f,trigger:r});return p}; HiI=function(R){const w=[];for(const {trigger:p}of R.n_.values())p instanceof JW&&w.push(p.breakDurationMs);return w}; Ll=function(R){R.L=null;R.n_.clear();R.C&&R.C.stop();R.K&&R.K.stop();R.O?.stop();delete R.O}; Nzd=function(R){Po(R.D$.get(),"ads_ce",`bdc.${HiI(R).length};fi.${!!R.L};fet.${!!R.C}`);R.L&&(R.G=!0,R.C&&(R.C.stop(),R.C.start()),v0L(R,"TRIGGER_TYPE_PREFETCH_CACHE_EXPIRED"))}; k9Y=function(R){R=R.adPlacementRenderer.config.adPlacementConfig;if(R.prefetchModeConfig&&R.prefetchModeConfig.cacheFetchRefreshDurationMs&&(R=Number(R.prefetchModeConfig.cacheFetchRefreshDurationMs),!(isNaN(R)||R<=0)))return R}; v0L=function(R,w){const p=[];for(const r of R.n_.values())r.trigger.triggerType===w&&p.push(r);p.length>0&&Hz(R.J(),p)}; UTI=function(R){R=R.adPlacementRenderer.config.adPlacementConfig;if(!R.prefetchModeConfig||!R.prefetchModeConfig.cacheFetchSmearingDurationMs)return 0;R=Number(R.prefetchModeConfig.cacheFetchSmearingDurationMs);return isNaN(R)||R<=0?0:Math.floor(Math.random()*R)}; SOb=function(R,w){const p=[];if(w=R.L.get(w.layoutId))for(const r of w)(w=R.C.get(r.triggerId))&&p.push(w);return p}; Ln=function(R){switch(R){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"}}; R_P=function(R){switch(R){case "LAYOUT_TYPE_ENDCAP":return"adVideoEnd";case "LAYOUT_TYPE_SURVEY":return"surveyAd";case "LAYOUT_TYPE_VIDEO_INTERSTITIAL_BUTTONED_LEFT":return"surveyInterstitialAd";default:return"unknown"}}; wNb=function(R,w){const p={slotId:Ot(w,"SLOT_TYPE_IN_PLAYER"),slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,slotEntryTrigger:void 0,slotFulfillmentTriggers:[],slotExpirationTriggers:[],R0:"surface",clientMetadata:new dX([])};w=WS(w,"LAYOUT_TYPE_TEXT_BANNER_OVERLAY",p.slotId);w={layoutId:w,layoutType:"LAYOUT_TYPE_TEXT_BANNER_OVERLAY",Ig:new Map,layoutExitNormalTriggers:[],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[], R0:"surface",clientMetadata:new dX([]),UQ:QQY(!1,p.slotId,p.slotType,p.slotPhysicalPosition,p.R0,p.slotEntryTrigger,p.slotFulfillmentTriggers,p.slotExpirationTriggers,w,"LAYOUT_TYPE_TEXT_BANNER_OVERLAY","surface")};return{...R,rF:!0,slot:p,layout:w}}; LHd=function(R,w,p,r){var f=R.kind;r=r?!1:!R.hideCueRangeMarker;switch(f){case "AD_PLACEMENT_KIND_START":return r={D0:new Oc(-0x8000000000000,-0x8000000000000),PP:r},p!=null&&(r.jQ=new Oc(-0x8000000000000,-0x8000000000000)),r;case "AD_PLACEMENT_KIND_END":return r={D0:new Oc(0x7ffffffffffff,0x8000000000000),PP:r},p!=null&&(r.jQ=new Oc(Math.max(0,w-p),0x8000000000000)),r;case "AD_PLACEMENT_KIND_MILLISECONDS":f=R.adTimeOffset;f.offsetStartMilliseconds||MY("AD_PLACEMENT_KIND_MILLISECONDS missing start milliseconds."); f.offsetEndMilliseconds||MY("AD_PLACEMENT_KIND_MILLISECONDS missing end milliseconds.");R=Number(f.offsetStartMilliseconds);f=Number(f.offsetEndMilliseconds);f===-1&&(f=w);if(Number.isNaN(R)||Number.isNaN(f)||R>f)return new Q("AD_PLACEMENT_KIND_MILLISECONDS endMs needs to be >= startMs.",{offsetStartMs:R,offsetEndMs:f},"ADS_CLIENT_ERROR_MESSAGE_AD_PLACEMENT_END_SHOULD_GREATER_THAN_START",f===w&&R-500<=f);r={D0:new Oc(R,f),PP:r};if(p!=null){R=Math.max(0,R-p);if(R===f)return r;r.jQ=new Oc(R,f)}return r; default:return new Q("AdPlacementKind not supported in convertToRange.",{kind:f,adPlacementConfig:R})}}; pNd=function(R){if(!R||!R.adPlacements&&!R.adSlots)return!1;for(const w of R.adPlacements||[]){if(!w)continue;const p=w.adPlacementRenderer;if(p!=null&&(p.config&&p.config.adPlacementConfig&&p.config.adPlacementConfig.kind)==="AD_PLACEMENT_KIND_START")return!0}for(const w of R.adSlots||[])if(g.F(w,xN)?.adSlotMetadata?.triggerEvent==="SLOT_TRIGGER_EVENT_BEFORE_CONTENT")return!0;return!1}; Ot=function(R,w){if(qz(R.BS.get())){let p=R.C.get(w)||0;p++;R.C.set(w,p);return`${w}_${p}`}return g.k0(16)}; hR=function(R,w){if(qz(R.BS.get())){let p=R.O.get(w)||0;p++;R.O.set(w,p);return`${w}_${p}`}return g.k0(16)}; WS=function(R,w,p){if(qz(R.BS.get())){let r=R.L.get(w)||0;r++;R.L.set(w,r);return`${p}_${w}_${r}`}return g.k0(16)}; f5H=function(R){const w=[new cL(R.pg),new r9d(R.M_),new Hb(R.adPlacementConfig),new II(R.videoLengthSeconds),new wZ(R.Pd)];R.instreamAdPlayerOverlayRenderer&&w.push(new mv(R.instreamAdPlayerOverlayRenderer));R.playerOverlayLayoutRenderer&&w.push(new zR(R.playerOverlayLayoutRenderer));R.Np&&w.push(new XP(R.Np));return w}; G4d=function(R,w,p,r,f,G){R=p.inPlayerLayoutId?p.inPlayerLayoutId:WS(G,"LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY",R);const I=p.instreamAdPlayerOverlayRenderer?p.instreamAdPlayerOverlayRenderer?.adLayoutLoggingData:p.playerOverlayLayoutRenderer?.adLayoutLoggingData,C={layoutId:R,layoutType:"LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY",R0:w};return{layoutId:R,layoutType:"LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY",Ig:new Map,layoutExitNormalTriggers:[new Dk(u=>hR(G,u),p.pg)], layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],R0:w,clientMetadata:r,UQ:f(C),adLayoutLoggingData:I}}; R7_=function(R,w,p,r,f,G,I,C,u){r.every(z=>MH(z,[],["LAYOUT_TYPE_MEDIA"]))||MY("Unexpect subLayout type for DAI composite layout"); w=WS(R.C.get(),"LAYOUT_TYPE_COMPOSITE_PLAYER_BYTES",w);const m={layoutId:w,layoutType:"LAYOUT_TYPE_COMPOSITE_PLAYER_BYTES",R0:"core"};return{layoutId:w,layoutType:"LAYOUT_TYPE_COMPOSITE_PLAYER_BYTES",Ig:new Map,layoutExitNormalTriggers:[new jr(R.L)],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],R0:"core",clientMetadata:new dX([new u7(p),new sE(C),new o0Y(r),new Hb(f),new l7(G),new AR,new MQI(u)]),UQ:I(m)}}; mAd=function(R,w,p,r,f,G,I,C,u,m,z){R=I5b(R,w,"core",p,r,f,G,I,C,u,m,void 0,z);return{layoutId:R.layoutId,layoutType:R.layoutType,Ig:R.Ig,layoutExitNormalTriggers:R.layoutExitNormalTriggers,layoutExitSkipTriggers:R.layoutExitSkipTriggers,layoutExitMuteTriggers:R.layoutExitMuteTriggers,layoutExitUserInputSubmittedTriggers:R.layoutExitUserInputSubmittedTriggers,layoutExitUserCancelledTriggers:R.layoutExitUserCancelledTriggers,R0:R.R0,clientMetadata:new dX(R.lY),UQ:R.UQ,adLayoutLoggingData:R.adLayoutLoggingData}}; tR=function(R,w,p,r,f){const G=f5H(r);return G4d(w,p,r,new dX(G),f,R.C.get())}; WLd=function(R,w,p,r,f,G){p=new dX([new Ce_(p),new Hb(r)]);w=WS(R.C.get(),"LAYOUT_TYPE_UNDERLAY_TEXT_ICON_BUTTON",w);r={layoutId:w,layoutType:"LAYOUT_TYPE_UNDERLAY_TEXT_ICON_BUTTON",R0:"core"};return{layoutId:w,layoutType:"LAYOUT_TYPE_UNDERLAY_TEXT_ICON_BUTTON",Ig:new Map,layoutExitNormalTriggers:[new Dk(I=>hR(R.C.get(),I),f)], layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],R0:"core",clientMetadata:p,UQ:G(r),adLayoutLoggingData:void 0}}; G9I=function(R,w,p,r,f,G,I,C,u,m,z,B){R=SS(R,w,p,r,f,G,I,C,z,B);w=R.Ei;p=new Zg(R.zF);r=R.layoutExitSkipTriggers;u>0&&(w.push(p),w.push(new JR(u)),r=[]);w.push(new Yy(m));return{eW:{layoutId:R.layoutId,layoutType:R.layoutType,Ig:R.Ig,layoutExitNormalTriggers:[],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],R0:R.R0,clientMetadata:new dX(w),UQ:R.UQ,adLayoutLoggingData:R.adLayoutLoggingData},Oq:r,M4:R.layoutExitMuteTriggers, Ys:R.layoutExitUserInputSubmittedTriggers,PJ:R.layoutExitUserCancelledTriggers,ob:R.ob}}; sAL=function(R,w,p,r,f,G,I,C,u){w=SS(R,w,p,r,f,new Map,G,m=>I(m,C)); R=new aE(R.L,w.zF);p=new Zg(w.zF);u=new Yy(u);return{eW:{layoutId:w.layoutId,layoutType:w.layoutType,Ig:w.Ig,layoutExitNormalTriggers:[],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],R0:w.R0,clientMetadata:new dX([...w.Ei,p,u]),UQ:w.UQ,adLayoutLoggingData:w.adLayoutLoggingData},Oq:w.layoutExitSkipTriggers,M4:w.layoutExitMuteTriggers,Ys:[...w.layoutExitUserInputSubmittedTriggers,R],PJ:w.layoutExitUserCancelledTriggers, ob:w.ob}}; Vh_=function(R,w,p,r,f,G,I,C,u,m,z,B,W){w=I5b(R,w,"adapter",p,r,f,G,I,C,u,z,B,W);r=w.layoutExitSkipTriggers;f=w.lY;p.adPodSkipTarget&&p.adPodSkipTarget>0&&(f.push(m),f.push(new JR(p.adPodSkipTarget)),r=[]);f.push(new Yy(C.adPodIndex));p.isCritical&&(r=[new er(R.L,w.layoutId,["error"]),...r]);return{eW:{layoutId:w.layoutId,layoutType:w.layoutType,Ig:w.Ig,layoutExitNormalTriggers:[],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[], R0:w.R0,clientMetadata:new dX(f),UQ:w.UQ,adLayoutLoggingData:w.adLayoutLoggingData},Oq:r,M4:w.layoutExitMuteTriggers,Ys:w.layoutExitUserInputSubmittedTriggers,PJ:w.layoutExitUserCancelledTriggers}}; mQd=function(R,w,p,r,f){const G=f5H(r);G.push(new uDH(r.Z7));G.push(new sOP(r.U3));return G4d(w,p,r,new dX(G),f,R.C.get())}; r$=function(R,w,p,r,f,G,I,C,u,m){w=WS(R.C.get(),p,w);const z={layoutId:w,layoutType:p,R0:"core"},B=new Map;I&&B.set("impression",I);I=[new YN(R.L,f,"SLOT_TYPE_PLAYER_BYTES","LAYOUT_TYPE_MEDIA")];m&&I.push(new er(R.L,m,["normal"]));return{layoutId:w,layoutType:p,Ig:B,layoutExitNormalTriggers:I,layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],R0:"core",clientMetadata:new dX([r,new Hb(G),new cL(f)]),UQ:C(z),adLayoutLoggingData:u}}; fl=function(R,w,p,r,f,G,I,C,u){w=WS(R.C.get(),p,w);const m={layoutId:w,layoutType:p,R0:"core"},z=[new YN(R.L,f,"SLOT_TYPE_PLAYER_BYTES","LAYOUT_TYPE_MEDIA")];u&&z.push(new er(R.L,u,["normal"]));return{layoutId:w,layoutType:p,Ig:new Map,layoutExitNormalTriggers:z,layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],R0:"core",clientMetadata:new dX([r,new Hb(G),new cL(f)]),UQ:I(m),adLayoutLoggingData:C}}; NM=function(R,w,p){const r=[];r.push(new Ay(R.L,p));w&&r.push(w);return r}; vL=function(R,w,p,r,f,G,I){const C={layoutId:w,layoutType:p,R0:"core"};return{layoutId:w,layoutType:p,Ig:new Map,layoutExitNormalTriggers:I,layoutExitSkipTriggers:[new $N(R.L,w)],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],R0:"core",clientMetadata:new dX([new z_d(r),new Hb(f)]),UQ:G(C),adLayoutLoggingData:r.adLayoutLoggingData}}; RI=function(R,w,p,r,f,G,I,C){const u={layoutId:w,layoutType:G,R0:"core"};return{layoutId:w,layoutType:G,Ig:new Map,layoutExitNormalTriggers:[new Dk(R.L,p)],layoutExitSkipTriggers:[],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],R0:"core",clientMetadata:new dX([new Hb(r),...I]),UQ:f(u),adLayoutLoggingData:C}}; SS=function(R,w,p,r,f,G,I,C,u,m){w=WS(R.C.get(),"LAYOUT_TYPE_MEDIA_BREAK",w);const z={layoutId:w,layoutType:"LAYOUT_TYPE_MEDIA_BREAK",R0:"adapter"};C=C(w);const B=C.clientMetadata.FB("metadata_type_fulfilled_layout");B||MY("Could not retrieve overlay layout ID during VodSkippableMediaBreakLayout creation. This should never happen.");const W=B?B.layoutId:"";p=[new Hb(p),new i7(r),new pz(f)];B&&p.push(new QC(B.layoutType));m&&p.push(new yC(m));return{layoutId:w,layoutType:"LAYOUT_TYPE_MEDIA_BREAK", Ig:G,layoutExitNormalTriggers:[],layoutExitSkipTriggers:[new cb(R.L,W)],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],R0:"adapter",Ei:p,UQ:I(z),adLayoutLoggingData:u,ob:C,zF:W}}; I5b=function(R,w,p,r,f,G,I,C,u,m,z,B,W){const x={layoutId:w,layoutType:"LAYOUT_TYPE_MEDIA",R0:p};f=[new Hb(f),new WL(u),new BL(r.externalVideoId),new GR(C),new pz({impressionCommands:r.impressionCommands,abandonCommands:r.onAbandonCommands,completeCommands:r.completeCommands,progressCommands:r.adVideoProgressCommands}),new Cz(G),new qM({current:null}),new II(I)];(G=r.playerOverlay.instreamAdPlayerOverlayRenderer)&&f.push(new mv(G));(I=r.playerOverlay.playerOverlayLayoutRenderer)&&f.push(new zR(I)); B&&f.push(new jdH(B));(B=r.playerUnderlay)&&f.push(new Ce_(B));C=Ot(R.C.get(),"SLOT_TYPE_IN_PLAYER");B=(B=G?G.elementId:I?.layoutId)?B:WS(R.C.get(),"LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY",C);f.push(new Zg(B));f.push(new ZXW(C));f.push(new yC(u.adPodIndex));r.adNextParams&&f.push(new FP(r.adNextParams));r.shrunkenPlayerBytesConfig&&f.push(new B1b(r.shrunkenPlayerBytesConfig));r.clickthroughEndpoint&&f.push(new jS(r.clickthroughEndpoint));r.legacyInfoCardVastExtension&&f.push(new Jxr(r.legacyInfoCardVastExtension)); r.sodarExtensionData&&f.push(new Lz(r.sodarExtensionData));z&&f.push(new TR(z));f.push(new b7(a1(r.pings)));u=$c(r.pings);if(W){a:{for(q of W)if(q.adSlotMetadata.slotType==="SLOT_TYPE_PLAYER_UNDERLAY"){W=g.F(q.fulfillmentContent.fulfilledLayout,Bb);if(!W)continue;if((W=g.F(W.renderingContent,mA))&&W.associatedPlayerBytesLayoutId===w)break a}var q=void 0}q&&f.push(new FL_(q))}return{layoutId:w,layoutType:"LAYOUT_TYPE_MEDIA",Ig:u,layoutExitNormalTriggers:[new M2(R.L,w)],layoutExitSkipTriggers:r.skipOffsetMilliseconds? [new cb(R.L,B)]:[],layoutExitMuteTriggers:[new cb(R.L,B)],layoutExitUserInputSubmittedTriggers:[],layoutExitUserCancelledTriggers:[],R0:p,lY:f,UQ:m(x),adLayoutLoggingData:r.adLayoutLoggingData}}; vBb=function(R){return R!=null}; tND=function(R,w,p,r,f){const G=Ot(R.C.get(),w);return bP(R,G,w,new Kt(R.L,p),[new tW(R.L,p),new O0(R.L,G)],r,f)}; MNx=function(R,w,p,r,f,G,I){const C=Ot(R.C.get(),w);return bP(R,C,w,new er(R.L,f,["normal"]),[new tW(R.L,p),new O0(R.L,C),new er(R.L,r,["error"])],G,I)}; cjH=function(R,w,p,r,f,G){const I=Ot(R.C.get(),w);return bP(R,I,w,new dn(R.L,r),[new tW(R.L,p),new O0(R.L,I),new er(R.L,r,["error"])],f,G)}; $0r=function(R,w,p,r,f){return WEx(R,w,p,r,f)}; Zhd=function(R,w,p,r,f){const G=Ot(R.C.get(),"SLOT_TYPE_IN_PLAYER");p=new y_(R.L,r,p);r=[new Pb(R.L,G)];R=[new tW(R.L,w)];return{slotId:G,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,slotEntryTrigger:p,slotFulfillmentTriggers:r,slotExpirationTriggers:R,R0:"core",clientMetadata:new dX([new gZ(f({slotId:G,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,R0:"core",slotEntryTrigger:p,slotFulfillmentTriggers:r,slotExpirationTriggers:R}))])}}; Jjb=function(R,w,p,r){const f=Ot(R.C.get(),"SLOT_TYPE_IN_PLAYER");p=new dn(R.L,p);var G=[new Pb(R.L,f)];const I=[new O0(R.L,f),new tW(R.L,w)];G={slotId:f,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,R0:"core",slotEntryTrigger:p,slotFulfillmentTriggers:G,slotExpirationTriggers:I};return{slotId:f,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,slotEntryTrigger:p,slotFulfillmentTriggers:[new Pb(R.L,f)],slotExpirationTriggers:[new tW(R.L,w),new O0(R.L,f)],R0:"core",clientMetadata:new dX([new gZ(r(G))])}}; NyL=function(R,w,p,r,f){const G=Ot(R.C.get(),"SLOT_TYPE_PLAYER_BYTES"),I=new Ft(R.L),C=[new oE(R.L,G)];R=[new tW(R.L,w)];w=[];w.push(new gZ(r({slotId:G,slotType:"SLOT_TYPE_PLAYER_BYTES",slotPhysicalPosition:1,R0:"core",slotEntryTrigger:I,slotFulfillmentTriggers:C,slotExpirationTriggers:R})));w.push(new AR);f&&w.push(new EE({current:f}));return{slotId:G,slotType:"SLOT_TYPE_PLAYER_BYTES",slotPhysicalPosition:1,slotEntryTrigger:I,slotFulfillmentTriggers:C,slotExpirationTriggers:R,R0:"core",clientMetadata:new dX(w), adSlotLoggingData:p}}; rxb=function(R,w,p,r,f,G,I){const C=Ot(R.C.get(),"SLOT_TYPE_IN_PLAYER"),u=WS(R.C.get(),"LAYOUT_TYPE_TEXT_BANNER_OVERLAY",C);r=xQI(R,r,G,I,u);if(r instanceof Q)return r;I=[new Pb(R.L,C)];f=[new tW(R.L,G),new Pb(R.L,f),new V_(R.L,f)];p=nH(p,{slotId:C,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,R0:"core",slotEntryTrigger:r,slotFulfillmentTriggers:I,slotExpirationTriggers:f});R=R.O.get();G={layoutId:u,layoutType:"LAYOUT_TYPE_TEXT_BANNER_OVERLAY",R0:"core"};w={layoutId:u,layoutType:"LAYOUT_TYPE_TEXT_BANNER_OVERLAY", Ig:new Map,layoutExitNormalTriggers:[new l5_(R.L,u,w.durationMs)],layoutExitSkipTriggers:[new LEd(R.L,u,w.durationMs)],layoutExitUserCancelledTriggers:[new qYd(R.L,u)],layoutExitMuteTriggers:[],layoutExitUserInputSubmittedTriggers:[],R0:"core",clientMetadata:new dX([new A9d(w)]),UQ:p(G)};return{slotId:C,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,R0:"core",slotEntryTrigger:r,slotFulfillmentTriggers:I,slotExpirationTriggers:f,clientMetadata:new dX([new gZ(w)])}}; CqW=function(R,w,p,r,f){w=qOx(R,w);R=Rq(R,w,p);f=f({slotId:R.slotId,slotType:R.slotType,slotPhysicalPosition:R.slotPhysicalPosition,slotEntryTrigger:R.slotEntryTrigger,slotFulfillmentTriggers:R.slotFulfillmentTriggers,slotExpirationTriggers:R.slotExpirationTriggers,R0:R.R0});return f instanceof Q?f:{wA:{...R,clientMetadata:new dX([new gZ(f.layout)]),adSlotLoggingData:r},Yy:f.Yy}}; uo6=function(R,w,p,r,f,G,I){p=AT6(R,w,p,r);if(p instanceof Q)return p;I=I({slotId:p.slotId,slotType:p.slotType,slotPhysicalPosition:p.slotPhysicalPosition,slotEntryTrigger:p.slotEntryTrigger,slotFulfillmentTriggers:p.slotFulfillmentTriggers,slotExpirationTriggers:p.slotExpirationTriggers,R0:p.R0});if(I instanceof Q)return I;R=[new gZ(I.layout),new Dg({hQ:R.hQ(w)})];G&&R.push(new bXd({}));return{wA:{slotId:p.slotId,slotType:p.slotType,slotPhysicalPosition:p.slotPhysicalPosition,slotEntryTrigger:p.slotEntryTrigger, slotFulfillmentTriggers:p.slotFulfillmentTriggers,slotExpirationTriggers:p.slotExpirationTriggers,R0:p.R0,clientMetadata:new dX(R),adSlotLoggingData:f},Yy:I.Yy}}; z7_=function(R,w,p,r,f){f=f?f:Ot(R.C.get(),"SLOT_TYPE_IN_PLAYER");p=new dn(R.L,p);const G=[new Pb(R.L,f)];R=[new tW(R.L,w),new O0(R.L,f)];return{slotId:f,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,slotEntryTrigger:p,slotFulfillmentTriggers:G,slotExpirationTriggers:R,R0:"core",clientMetadata:new dX([new gZ(r({slotId:f,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,R0:"core",slotEntryTrigger:p,slotFulfillmentTriggers:G,slotExpirationTriggers:R}))])}}; Bx_=function(R,w,p,r){const f=Ot(R.C.get(),"SLOT_TYPE_PLAYER_UNDERLAY");p=new dn(R.L,p);const G=[new Pb(R.L,f)];R=[new tW(R.L,w),new O0(R.L,f)];return{slotId:f,slotType:"SLOT_TYPE_PLAYER_UNDERLAY",slotPhysicalPosition:1,slotEntryTrigger:p,slotFulfillmentTriggers:G,slotExpirationTriggers:R,R0:"core",clientMetadata:new dX([new gZ(r({slotId:f,slotType:"SLOT_TYPE_PLAYER_UNDERLAY",slotPhysicalPosition:1,R0:"core",slotEntryTrigger:p,slotFulfillmentTriggers:G,slotExpirationTriggers:R}))])}}; vvY=function(R,w,p,r,f){p=p?"SLOT_TYPE_PLAYER_BYTES_SEQUENCE_ITEM":"SLOT_TYPE_PLAYBACK_TRACKING";const G=Ot(R.C.get(),p);w=new Kt(R.L,w);const I=[new Pb(R.L,G)];R=[new O0(R.L,G)];return{slotId:G,slotType:p,slotPhysicalPosition:1,slotEntryTrigger:w,slotFulfillmentTriggers:I,slotExpirationTriggers:R,R0:"core",clientMetadata:new dX([new gZ(f({slotId:G,slotType:p,slotPhysicalPosition:1,R0:"core",slotEntryTrigger:w,slotFulfillmentTriggers:I,slotExpirationTriggers:R}))]),adSlotLoggingData:r}}; UAW=function(R,w,p,r,f,G){const I=Ot(R.C.get(),"SLOT_TYPE_FORECASTING");w=oq(R,w,p,r);if(w instanceof Q)return w;r=[new Pb(R.L,I)];R=[new O0(R.L,I),new tW(R.L,p)];return{slotId:I,slotType:"SLOT_TYPE_FORECASTING",slotPhysicalPosition:1,slotEntryTrigger:w,slotFulfillmentTriggers:r,slotExpirationTriggers:R,R0:"core",clientMetadata:new dX([new gZ(G({slotId:I,slotType:"SLOT_TYPE_FORECASTING",slotPhysicalPosition:1,R0:"core",slotEntryTrigger:w,slotFulfillmentTriggers:r,slotExpirationTriggers:R}))]),adSlotLoggingData:f}}; wY6=function(R,w,p,r){const f=Ot(R.C.get(),"SLOT_TYPE_IN_PLAYER"),G=new Kt(R.L,w),I=[new oE(R.L,f)];R=[new tW(R.L,w),new O0(R.L,f)];return{slotId:f,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,slotEntryTrigger:G,slotFulfillmentTriggers:I,slotExpirationTriggers:R,R0:"core",clientMetadata:new dX([new gZ(r({slotId:f,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,R0:"core",slotEntryTrigger:G,slotFulfillmentTriggers:I,slotExpirationTriggers:R}))]),adSlotLoggingData:p}}; rTD=function(R,w,p,r,f,G){w=oq(R,w,p,r);if(w instanceof Q)return w;const I=w instanceof Xt?new bvD(R.L,p,w.L):null;r=Ot(R.C.get(),"SLOT_TYPE_IN_PLAYER");const C=[new Pb(R.L,r)];R=[new tW(R.L,p),new O0(R.L,r)];G=G({slotId:r,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,R0:"core",slotEntryTrigger:w,slotFulfillmentTriggers:C,slotExpirationTriggers:R},I);return G instanceof wJ?new Q(G):{slotId:r,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,slotEntryTrigger:w,slotFulfillmentTriggers:C, slotExpirationTriggers:R,R0:"core",clientMetadata:new dX([new gZ(G)]),adSlotLoggingData:f}}; IWL=function(R,w,p,r){const f=Ot(R.C.get(),"SLOT_TYPE_IN_PLAYER");return WEx(R,f,w,p,r)}; thP=function(R,w,p,r,f,G){const I=Ot(R.C.get(),"SLOT_TYPE_PLAYER_BYTES"),C=Ot(R.C.get(),"SLOT_TYPE_IN_PLAYER"),u=WS(R.C.get(),"LAYOUT_TYPE_SURVEY",C);r=oq(R,w,p,r);const m=[new Pb(R.L,I)];p=[new O0(R.L,I),new tW(R.L,p),new $N(R.L,u)];if(r instanceof Q)return r;const {A0:z,TU:B}=G({slotId:I,slotType:"SLOT_TYPE_PLAYER_BYTES",slotPhysicalPosition:1,R0:"core",slotEntryTrigger:r,slotFulfillmentTriggers:m,slotExpirationTriggers:p},{slotId:C,layoutId:u});return[{slotId:I,slotType:"SLOT_TYPE_PLAYER_BYTES", slotPhysicalPosition:1,slotEntryTrigger:r,slotFulfillmentTriggers:m,slotExpirationTriggers:p,R0:"core",clientMetadata:new dX([new gZ(z),new Dg({hQ:R.hQ(w)})]),adSlotLoggingData:f},B]}; dTH=function(R,w,p,r,f,G,I){if(!p.prefetchModeConfig)return new Q("AdPlacementConfig for Live Prefetch is missing prefetch_config");p=p.prefetchModeConfig;r*=1E3;const C=[];if(!p.breakLengthMs)return new Q("AdPlacementConfig for Live Prefetch is missing break_length_ms");for(const z of p.breakLengthMs)if(Number(z)>0){var u=r+Number(p.startTimeOffsetMs),m=u+Number(p.cacheFetchSmearingDurationMs);u={D0:new Oc(m,m+Number(z)),PP:!1,jQ:new Oc(Math.floor(u+Math.random()*Number(p.cacheFetchSmearingDurationMs)), m),cueProcessedMs:r?r:u};m=[];m.push(new cxP);const B=[];B.push(new Qi(R.L));B.push(new y9d(R.L));I&&m.push(new AR);C.push(Vi(R,w,f,u,G,m,B))}return C}; Vi=function(R,w,p,r,f,G=[],I){const C=Ot(R.C.get(),"SLOT_TYPE_AD_BREAK_REQUEST");I||(I=[],r.jQ&&r.jQ.start!==r.D0.start&&I.push(new Xt(R.L,p,new Oc(r.jQ.start,r.D0.start),!1)),I.push(new Xt(R.L,p,new Oc(r.D0.start,r.D0.end),r.PP)));r={getAdBreakUrl:w.getAdBreakUrl,cH:r.D0.start,F3:r.D0.end,cueProcessedMs:r.cueProcessedMs};w=new ty(R.L,C);G=[new AjP(r),...G];return{slotId:C,slotType:"SLOT_TYPE_AD_BREAK_REQUEST",slotPhysicalPosition:1,slotEntryTrigger:w,slotFulfillmentTriggers:I,slotExpirationTriggers:[new tW(R.L, p),new O0(R.L,C),new O9(R.L,C)],R0:"core",clientMetadata:new dX(G),adSlotLoggingData:f}}; VVW=function(R,w,p){const r=[];for(const f of p)r.push(f.triggeringSlotId!=null&&f.triggeringSlotId===R?f.clone(w):f);return r}; WEx=function(R,w,p,r,f){const G=new dn(R.L,p),I=[new Pb(R.L,w)];R=[new O0(R.L,w),new tW(R.L,r)];return{slotId:w,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,slotEntryTrigger:G,slotFulfillmentTriggers:I,slotExpirationTriggers:R,R0:"core",clientMetadata:new dX([new gZ(f({slotId:w,slotType:"SLOT_TYPE_IN_PLAYER",slotPhysicalPosition:1,R0:"core",slotEntryTrigger:G,slotFulfillmentTriggers:I,slotExpirationTriggers:R},p))]),adSlotLoggingData:void 0}}; oq=function(R,w,p,r){return o8H(R,w,p,r,(f,G)=>new Xt(R.L,p,f,G))}; xQI=function(R,w,p,r,f){return o8H(R,w,p,r,(G,I)=>new tVP(R.L,p,G,I,f))}; bP=function(R,w,p,r,f,G,I){R=[new oE(R.L,w)];return{slotId:w,slotType:p,slotPhysicalPosition:1,slotEntryTrigger:r,slotFulfillmentTriggers:R,slotExpirationTriggers:f,R0:"core",clientMetadata:new dX([new gZ(I({slotId:w,slotType:p,slotPhysicalPosition:1,R0:"core",slotEntryTrigger:r,slotFulfillmentTriggers:R,slotExpirationTriggers:f}))]),adSlotLoggingData:G}}; qOx=function(R,w){return Mhl(R.BS.get())?new er(R.L,w,["normal","error","skipped"]):new er(R.L,w,["normal"])}; Rq=function(R,w,p){const r=Ot(R.C.get(),"SLOT_TYPE_PLAYER_BYTES"),f=[new Pb(R.L,r)];R=[new O0(R.L,r),new tW(R.L,p)];return{slotId:r,slotType:"SLOT_TYPE_PLAYER_BYTES",slotPhysicalPosition:1,slotEntryTrigger:w,slotFulfillmentTriggers:f,slotExpirationTriggers:R,R0:"core"}}; AT6=function(R,w,p,r){w=oq(R,w,p,r);return w instanceof Q?w:Rq(R,w,p)}; o8H=function(R,w,p,r,f){const G=!w.hideCueRangeMarker;switch(w.kind){case "AD_PLACEMENT_KIND_START":return new Kt(R.L,p);case "AD_PLACEMENT_KIND_MILLISECONDS":return R=LHd(w,r),R instanceof Q?R:f(R.D0,G);case "AD_PLACEMENT_KIND_END":return new nt(R.L,p,G);default:return new Q("Cannot construct entry trigger",{kind:w.kind})}}; T7=function(R,w,p){R.L(w,void 0,void 0,void 0,p,void 0,void 0,void 0,p.adSlotLoggingData)}; Sy=function(R,w,p,r,f){R.L("ADS_CLIENT_EVENT_TYPE_ERROR",void 0,void 0,void 0,r,f,void 0,void 0,r.adSlotLoggingData,f?f.adLayoutLoggingData:void 0,{errorType:w,errorMessage:p})}; kV=function(R,w,p,r){R.L(w,void 0,void 0,void 0,p,r?r:void 0,void 0,void 0,p.adSlotLoggingData,r?r.adLayoutLoggingData:void 0);w=mE().resolve(G4(RA))?.ox();p=w?.adsHotConfig;w?.adsSeenHotConfig?.logOnAdsSeen&&p?.webEnablePremiumAdsSeenLogging&&OvD(R,r?r:void 0)}; RAd=function(R,w,p,r){BS(R.BS.get(),"h5_enable_pacf_debug_logs")&&console.log("[PACF]: ADS_CLIENT_EVENT_TYPE_TRIGGER_ACTIVATED","trigger:",p,"slot:",w,"layout:",r);Xe(R.C.get())&&R.L("ADS_CLIENT_EVENT_TYPE_TRIGGER_ACTIVATED",void 0,void 0,void 0,w,r?r:void 0,void 0,p,w.adSlotLoggingData,r?r.adLayoutLoggingData:void 0)}; OvD=function(R,w){if(w){var p=w.adLayoutLoggingData;g.uq(g.mL(),()=>{R.O?.L(p)},0)}}; Kl=function(R,w){return R.L.get(w)||null}; KEW=function(){let R,w;return{Ox:new E9((p,r)=>{R=p;w=r}), resolve:R,reject:w}}; e3=function(R){return Do(R)?R:Lv(R)?new E9((w,p)=>{R.then(w,p)}):new E9(w=>{w(R)})}; Mz=function(R){return new E9((w,p)=>{p(R)})}; cQ=function(R){try{return e3(R())}catch(w){return Mz(w)}}; E8r=function(R){return new Promise((w,p)=>{PQ(R,w,p)})}; DQP=async function(R){return E8r(R)}; aq=function(R){if(R.L==="fulfilled"){var w=R.C;R.C=[];R.O=[];for(var p of w)p(R.result)}else if(R.L==="rejected"){p=R.O;R.C=[];R.O=[];for(w of p)w(R.error)}}; PQ=function(R,w,p){const {Ox:r,resolve:f,reject:G}=KEW();R.C.push(I=>{if(w)try{const C=w(I);f(C)}catch(C){G(C)}else f(I)}); R.O.push(I=>{if(p)try{const C=p(I);f(C)}catch(C){G(C)}else G(I)}); aq(R);return r}; $3=function(R,w){return PQ(R,void 0,w)}; e_I=function(R,w){PQ(R,p=>PQ(e3(w()),()=>p),p=>PQ(e3(w()),()=>Mz(p)))}; Xm=function(R,w){return MVW(w.call(R))}; nl=function(R){return function*(){return yield{Ox:e3(R)}}()}; MVW=function(R){return cQ(()=>d$(R,R.next()))}; d$=function(R,w){return w.done?e3(w.value):$3(PQ(w.value.Ox,p=>d$(R,R.next(p))),p=>d$(R,R.throw(p)))}; a5d=function(R){const w=c9P(R);return PQ(PeP(w),()=>w.map(p=>p.state()))}; PeP=function(R){if(R.length===0)return e3(NaN);const {Ox:w,resolve:p}=KEW();let r=R.length;for(const [f,G]of R.entries()){const I=f;e_I(G,()=>{w.L==="pending"&&($QH(void 0)&&(void 0)(I)&&w.L==="pending"?p(I):(--r,r===0&&p(NaN)))})}return w}; c9P=function(R){return R.map(w=>e3(w))}; Y3=function(R){var w=R.hours||0;var p=R.minutes||0,r=R.seconds||0;w=r+p*60+w*3600+(R.days||0)*86400+(R.weeks||0)*604800+(R.months||0)*2629800+(R.years||0)*31557600;w<=0?w={hours:0,minutes:0,seconds:0}:(R=w,w=Math.floor(R/3600),R%=3600,p=Math.floor(R/60),r=Math.floor(R%60),w={hours:w,minutes:p,seconds:r});const {hours:f=0,minutes:G=0,seconds:I=0}=w;p=f>0;w=[];if(p){R=(new Intl.NumberFormat("en-u-nu-latn")).format(f);r=["fr"];const C="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(" "); R="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(Zo)?R.replace(",","\u00a0"):r.includes(Zo)?R.replace(",","\u202f"):C.includes(Zo)?R.replace(",","."):R;w.push(R)}p=XNY(G,p);w.push(p);p=n8b().format(I);w.push(p);p=":";"da fi id si sr sr-Latn".split(" ").includes(Zo)&&(p=".");return w.join(p)}; n8b=function(){return new Intl.NumberFormat("en-u-nu-latn",{minimumIntegerDigits:2})}; XNY=function(R,w=!1){return(["af","be","lt"].includes(Zo)||w)&&R<10?n8b().format(R):(new Intl.NumberFormat("en-u-nu-latn")).format(R)}; dQ6=function(R,w){R=R.watchEndpointSupportedAuthorizationTokenConfig?.videoAuthorizationToken?.credentialTransferTokens||[];for(let p=0;p{ZvW.includes(w)||(g.AO(new g.Id("createClientScreen() called with a non-page VE",w)),w=83769);if(!r.isHistoryNavigation)if(g.Y("enable_screen_manager_layer_separation")){const f=r.layer||0;R.I0.set(f,[]);hy(R,f).push({rootVe:w,key:r.key||""})}else R.L.push({rootVe:w,key:r.key||""});R.X=[];R.pB=[];r.Wz?YYd(R,w,p,r):FE6(R,w,p,r)})()}; hy=function(R,w){R.D.has(w)||R.D.set(w,[]);return R.D.get(w)}; YYd=function(R,w,p,r={}){R.C.add(r.layer||0);R.K=()=>{FE6(R,w,p,r);const f=g.GP(r.layer);if(f){for(const G of R.X)HQ(R,G[0],G[1]||f,r.layer);for(const G of R.pB)jOY(R,G[0],G[1])}}; p||g.ut(r.layer)||R.K();if(r.Wz)for(const f of r.Wz)J9r(R,f,r.layer);else g.LF(Error("Delayed screen needs a data promise."))}; FE6=function(R,w,p,r={}){var f=void 0;r.layer||(r.layer=0);f=r.parentLayer!==void 0?r.parentLayer:r.layer;const G=g.ut(f);f=g.GP(f);const I=p||f;let C;I&&(r.parentCsn!==void 0?C={clientScreenNonce:r.parentCsn,visualElement:I}:G&&G!=="UNDEFINED_CSN"&&(C={clientScreenNonce:G,visualElement:I}));let u;const m=g.n("EVENT_ID");G==="UNDEFINED_CSN"&&m&&(u={servletData:{serializedServletEventId:m}});g.Y("combine_ve_grafts")&&G&&vQ(R,G);g.Y("no_client_ve_attach_unless_shown")&&I&&G&&Xn(I,G);let z;try{z=jfI(R.client, w,C,r.Zh,r.cttAuthInfo,u,r.implicitGestureType,r.loggingExpectations,r.automatedLogEventSource)}catch(W){ov(W,{Ro:w,rootVe:f,VWn:p,MCy:G,RiI:C,Zh:r.Zh});g.LF(W);return}zSb(z,w,r.layer,r.cttAuthInfo);G&&G!=="UNDEFINED_CSN"&&f&&!uSd(G)&&TGW(R.client,G,f,!0);g.Y("enable_screen_manager_layer_separation")?(w=hy(R,r.layer||0),w.length>0&&!w[w.length-1].csn&&(w[w.length-1].csn=z||"")):R.L[R.L.length-1]&&!R.L[R.L.length-1].csn&&(R.L[R.L.length-1].csn=z||"");g.sT({clientScreenNonce:z});Nz.instance||(Nz.instance= new Nz);g.mJ(TA().L).bind(TA())();const B=g.GP(r.layer);G&&G!=="UNDEFINED_CSN"&&B&&g.Y("music_web_mark_root_visible")&&g.ju(z,B);R.C.delete(r.layer||0);R.K=void 0;R.M0.get(r.layer)?.forEach((W,x)=>{W?HQ(R,x,W,r.layer):B&&HQ(R,x,B,r.layer)}); T16(R)}; J9r=function(R,w,p=0){g.mJ(()=>{w.then(r=>{R.C.has(p)&&R.K&&R.K();const f=g.ut(p),G=g.GP(p);if(f&&G){var I={automatedLogEventSource:3};r?.response?.trackingParams&&g.av(R.client,f,G,g.pF(r.response.trackingParams),!1,I);r?.playerResponse?.trackingParams&&g.av(R.client,f,G,g.pF(r.playerResponse.trackingParams),!1,I)}})})()}; HQ=function(R,w,p,r=0){return g.mJ(()=>{if(R.C.has(r))return R.X.push([w,p]),!0;const f=g.ut(r),G=p||g.GP(r);if(f&&G){if(g.Y("combine_ve_grafts")){const I=R.G.get(G.toString());I?I.push(w):(R.U.set(G.toString(),G),R.G.set(G.toString(),[w]));R.xY||(R.xY=g.uq(0,()=>{vQ(R,f)},1200))}else g.av(R.client,f,G,w); return!0}return!1})()}; k3=function(R){var w=Q_();g.mJ(()=>{const p=g.pF(R);HQ(w,p);return p})()}; ivL=function(R){var w={veType:253246};return g.mJ(()=>{if(!w.veType)return qb(new g.Id("Error: Trying to graft a client VE without a veType.")),null;if(w.visibilityTypes){var p=w.visibilityTypes.reduce((r,f)=>r|f); p={visibility:{types:String(p)}}}p=rw(w.veType,w.visualElement,w.elementIndex,w.clientYouTubeData,void 0,p);return HQ(R,p)?p:null})()}; vQ=function(R,w){if(w===void 0){const p=IIr();for(let r=0;r{(r=R.U.get(r))&&g.PC(R.client,w,r,p)}),R.G.clear(),R.U.clear(),R.xY=void 0}; QOH=function(R,w){const p=g.ut(0);p&&Zl(R.client,p,w,void 0)}; h_H=function(R,w,p,r=0){if(!w)return!1;r=g.ut(r);if(!r)return!1;Zl(R.client,r,g.pF(w),p);return!0}; jOY=function(R,w,p,r=0){const f=g.ut(r);w=w||g.GP(r);f&&w&&(R=R.client,r=Dl({cttAuthInfo:sk(f)||void 0},f),p={csn:f,ve:w.getAsJson(),clientData:p},f==="UNDEFINED_CSN"?nF("visualElementStateChanged",r,p):R?UY("visualElementStateChanged",p,R,r):g.Rv("visualElementStateChanged",p,r))}; T16=function(R){for(var w=0;w{p.Nu(r,f)}); r.open(w.method??"GET",R,!0);r.responseType="text";r.withCredentials=!0;if(w.headers)for(const [f,G]of Object.entries(w.headers))r.setRequestHeader(f,G);return r}; v86=function(){const R=navigator;return new Promise((w,p)=>{R.webkitTemporaryStorage?.queryUsageAndQuota?R.webkitTemporaryStorage.queryUsageAndQuota((r,f)=>{w({usage:r,quota:f})},r=>{p(r)}):p(Error("webkitTemporaryStorage is not supported."))})}; k4b=function(R,w){S3.getInstance().estimate().then(p=>{R.L("idbQuotaExceeded",{...w,isSw:self.document===void 0,isIframe:self!==self.top,deviceStorageUsageMbytes:N1r(p?.usage),deviceStorageQuotaMbytes:N1r(p?.quota)})})}; N1r=function(R){return typeof R==="undefined"?"-1":String(Math.ceil(R/1048576))}; SYI=function(){const R=g.SN();return R.vS(192)?R.vS(190):!(g.Y("web_watch_cinematics_disabled_by_default")||g.Y("web_watch_cinematics_preferred_reduced_motion_default_disabled")&&UQx())}; wCY=function(R,w){RQ_(R.program,w.Dl)&&(Wx("bg_i",void 0,"player_att"),g.RT.initialize(R,()=>{Wx("bg_l",void 0,"player_att");wm=(0,g.T)()},w.cspNonce,w.ZI))}; pCr=function(R={}){return g.RT.invoke(R)}; RQ_=function(R,w){if(R){var p;g.RT.isLoading()?p=!1:p=!wm||(0,g.T)()-wm>w;R=p}else R=!1;return R}; rOW=function(R,w){if(w.partnerId===38&&R.playerStyle==="books")return R=w.videoId.indexOf(":"),g.bu(`//play.google.com/books/volumes/${w.videoId.slice(0,R)}/content/media`,{aid:w.videoId.slice(R+1),sig:w.Be});if(w.partnerId===30&&R.playerStyle==="docs")return g.bu("https://docs.google.com/get_video_info",{docid:w.videoId,authuser:w.Ry,authkey:w.pj,eurl:R.GE});if(w.partnerId===33&&R.playerStyle==="google-live")return g.bu("//google-liveplayer.appspot.com/get_video_info",{key:w.videoId});throw Error("getVideoInfoUrl for invalid namespace: "+ R.pB);}; g.pJ=function(R,w){return R.ZI+"timedtext_video?ref=player&v="+w.videoId}; flD=function(R){const w={};R.HE&&(w.ytrext=R.HE);return g.Jt(w)?void 0:w}; g.rm=function(R,w){wCY(R,{Dl:g.Iq(w.experiments,"bg_vm_reinit_threshold"),cspNonce:w.cspNonce,ZI:w.ZI||""})}; g.GPP=function(R){if(R.videoData&&R.videoData.Ek){const w=[R.videoData.Ek];for(const p of Object.keys(R.L))if(R.VQ[p]&&R.L[p]){const r=R.L[p](R.VQ);r&&w.push(r)}return w.join("&")}return null}; IlD=function(){const R=XMLHttpRequest.prototype.fetch;return!!R&&R.length===3}; un_=function(R){CtD=2592E3*(R||1)}; svb=function(R){g.Qp("yt-player-bandwidth",R,2592E3)}; fJ=function(R=CtD){if(R>0&&!(p$_()>(0,g.T)()-R*1E3))return 0;R=g.hj("yt-player-quality");if(typeof R==="string"){if(R=g.tC[R],R>0)return R}else if(R instanceof Object)return R.quality;return 0}; G0=function(){const R=g.hj("yt-player-proxima-pref");return R==null?null:R}; mbP=function(){const R=g.hj("yt-player-quality");if(R instanceof Object&&R.quality&&R.previousQuality){if(R.quality>R.previousQuality)return 1;if(R.qualityw.startsWith("1")),g.Qp("yt-player-performance-cap-active-set",R,2592E3)):g.Qp("yt-player-performance-cap-active-set",[],2592E3)}; xbD=function(R){g.Qp("yt-player-watch-later-pending",R)}; lld=function(){return!!g.hj("yt-player-headers-readable")}; g.uk=function(){const R=g.hj("yt-player-caption-language-preferences");return R?R:[]}; sz=function(){const R=g.hj("yt-player-user-settings"),w=new Map;if(R)for(const [p,r]of Object.entries(R))w.set(p,r);return w}; LVW=function(){return g.hj("yt-player-voice-boost")??void 0}; qkd=function(){return g.hj("yt-player-audio-quality-setting")??2}; z0=function(){try{const R=window.navigator;if(R.getAutoplayPolicy&&typeof R.getAutoplayPolicy==="function"){const w=document.getElementsByClassName(g.mq.bG);let p;p=w.length>0&&w[0]?R.getAutoplayPolicy(w[0]):R.getAutoplayPolicy("mediaelement");if(AOP[p])return AOP[p]}}catch(R){}return"AUTOPLAY_BROWSER_POLICY_UNSPECIFIED"}; Bn=function(R){return R.Af||R.Ho||R.mutedAutoplay}; bFD=function(R,w){return Bn(R)?w!==1&&w!==2&&w!==0?"AUTOPLAY_STATUS_UNAVAILABLE":R.jR?"AUTOPLAY_STATUS_BLOCKED":"AUTOPLAY_STATUS_OCCURRED":"AUTOPLAY_STATUS_NOT_ATTEMPTED"}; yO6=function(R,w,p){const r=w.V();R.thirdParty||(R.thirdParty={});R.thirdParty={...R.thirdParty,embedUrl:r.loaderUrl};r.ancestorOrigins&&(R.thirdParty.embeddedPlayerContext={...R.thirdParty.embeddedPlayerContext,ancestorOrigins:r.ancestorOrigins});r.mj!=null&&(R.thirdParty.embeddedPlayerContext={...R.thirdParty.embeddedPlayerContext,visibilityFraction:Number(r.mj)});r.Sk&&(R.thirdParty.embeddedPlayerContext={...R.thirdParty.embeddedPlayerContext,visibilityFractionSource:r.Sk});R.thirdParty.embeddedPlayerContext= {...R.thirdParty.embeddedPlayerContext,autoplayBrowserPolicy:z0(),autoplayIntended:Bn(w),autoplayStatus:bFD(w,p)}}; Vur=function(R){const w=[];for(let p of R.split(",")){if(!p)continue;(R=p.startsWith("!"))&&(p=p.substring(1));const r=p.split("-");r.length<3||w.push({d$:r[0],platform:r[1],deviceVersion:r[2],Ln:R})}return w}; OFl=function(R){return Vur(R).map(({d$:w,deviceVersion:p,Ln:r})=>({deviceInterface:ogb[tuL[w]]||0,deviceVersion:p||"",isSleeping:r}))}; g.Wn=function(R){const w=[];if(R.displayName)w.push(R.displayName);else{const p=R.languageName||"";w.push(p);R.kind==="asr"&&p.indexOf("(")===-1&&w.push(" (Automatic Captions)");R.name&&w.push(` - ${R.name}`)}R.translationLanguage&&w.push(` >> ${R.translationLanguage.languageName}`);return w.join("")}; g.xO=function(R){const w={languageCode:R.languageCode,languageName:R.languageName,displayName:g.Wn(R),kind:R.kind,name:R.name,id:R.id,is_servable:R.L,is_default:R.isDefault,is_translateable:R.isTranslateable,vss_id:R.vssId};R.xtags&&(w.xtags=R.xtags);R.captionId&&(w.captionId=R.captionId);R.translationLanguage&&(w.translationLanguage=R.translationLanguage);return w}; g.lk=function(R){return R.translationLanguage?R.translationLanguage.languageCode:R.languageCode}; g.KVD=function(R){let w=R.vssId;R.translationLanguage&&w&&(w=`t${w}.${g.lk(R)}`);return w}; g.qJ=function(R,w,p,r){return new LJ(g.tC[R]||0,g.tC[w]||0,p,r)}; bk=function(R){if(Ai&&R.hf)return!1;const w=g.tC.auto;return R.C===w&&R.L===w}; Vy=function(R){return yy[R.L||R.C]||"auto"}; Egr=function(R,w){w=g.tC[w];return R.C<=w&&(!R.L||R.L>=w)}; Ptd=function(R,w,p,r,f,G,I){if(R.C)return R.C;const C={},u=new Set,m={};if(oT(r)){for(var z in r.L){if(!r.L.hasOwnProperty(z))continue;R=r.L[z];m[R.info.wN]=[R.info]}return m}z=DbD(w,r,C);G&&f({aftsrt:ti(z)});const B={};for(const W of Object.keys(z)){const x=W;for(const q of z[x]){const O=q.itag,e=eQD(x,q,w);if(B.hasOwnProperty(e)){B[e]===!0?m[x].push(q):C[O]=B[e];continue}const P=Oz(w,q,p,r.isLive,u);P!==!0?(I.add(x),C[O]=P,P==="disablevp9hfr"&&(B[e]="disablevp9hfr")):(m[x]=m[x]||[],m[x].push(q), B[e]=!0)}}G&&f({bfflt:ti(m)});for(const W in m){if(!m.hasOwnProperty(W))continue;r=W;m[r]&&m[r][0].Ih()&&(m[r]=m[r],m[r]=Mul(w,m[r],C),m[r]=cOI(m[r],C))}G&&Object.keys(C).length>0&&f({rjr:Ro(C)});for(const W of u.values())(w=p.O.get(W))&&--w.Ms;G&&f({aftflt:ti(m)});R.C=g.eP(m,W=>!!W.length); return R.C}; iF_=function(R,w,p,r,f,G,I){var C=w.L||!!f;const u=C&&w.ag?G:void 0;var m=new Set;let z=Ptd(R,w,p,r,G,C,m);r.K()&&(z=alH(p,z,f,C,G,w),C&&G({enflt:ti(z)}));w.N0=$b6(z,w);f=Gr=>!!z[Gr]; var B=XCd(w);p=[];for(var W of Object.values(z))W?.length&&W[0].i4()&&p.push(...W);if(oT(r))return G=g.S_(Object.values(z),Gr=>!!Gr.length&&!!Gr[0].audio),C=g.S_(Object.values(z),Gr=>!!Gr.length&&!!Gr[0].video),G&&C||hk(),gD(new KJ(C,G,u,p)); W=z.a;var x=!1;w.q4&&B[0]!=="a"&&ngW(W)&&(B.unshift("a"),x=!0);C&&(G({audioPrefOrder:B.join("_")}),G({preferHighQualityAudio:w.q4}),G({forcedAacForHqa:x}));W=[];if(w.cB){B=g.QD(B,f);x=new Set;for(var q of B){var O=z[q];const Gr=new Set;for(var e of O)if(O=e.DT?.id)x.has(O)?Gr.has(O)&&W.push(e):(Gr.add(O),x.add(O),W.push(e))}if(W.length===0){if(B.length===0)return C&&G({noaudio:1}),hk();W=z[B[0]]}}else{W=g.S_(B,f);if(!W)return C&&G({noaudio:1}),hk();W=z[W]}z["9"]&&z.h&&r.PB&&!w.YY&&(C&&G({dltvp9:1}), delete z["9"]);if(I){C&&G({bfsflt:ti(z),bfsflta:Ez(R)});w.jI?R.L=dbd(m,R.L):R.L.clear();C&&G({bfsfltb:Ez(R)});for(var P in z){if(!z.hasOwnProperty(P))continue;I=P;if(!(I==="f"||w.W7===0&&ZFd.has(I)))for(var c of z[I])w.jI?Ykd(I,c,R.L):FV_(R,I,c)}C&&G({aftsflt:Ez(R)})}P=z["1h"]?"1h":"1";R=z["9h"]?"9h":"9";I=z[P];m=z["2"];q=z[R];I&&I.length&&(w.C.highestAv1Resolution=I[I.length-1].video.qualityOrdinal);q&&q.length&&(w.C.highestVp9Resolution=q[q.length-1].video.qualityOrdinal);c=[];e=[];if(w.MH&&m)c= m,e=["2"];else if(w.Df&&I)c=I,e=[P],G({forceAv1:P});else if(w.U&&!w.cN){e=jvP(r)?z["1h"]||z["9h"]?["1h","9h"]:["9","h"]:["1","9","h"];C&&G({newhybpref:e.join(".")});for(var X of e)c=c.concat(z[X]).filter(Gr=>Gr)}else w.DI>0&&q&&I&&(e=[P, R],c=I.concat(q).filter(Gr=>Gr)); if(c.length&&!w.cN){DH(c,e);if(C){C=[];for(var Z of c)C.push(Z.itag);G({hbdfmt:C.join(".")})}return gD(new KJ(c,W,u,p))}Z=JOI(w);Z=g.S_(Z,f);if(!Z){if(z[P])return G=z[P],DH(G),gD(new KJ(G,W,u,p));C&&G({novideo:1});return hk()}Z!=="1"&&Z!=="1h"||!z[R]||(X=eK(z[Z]),f=eK(z[R]),f>X?Z=R:f===X&&Twx(z[R])&&(Z=R));Z==="9"&&z.h&&eK(z.h)>eK(z["9"])&&(Z="h");w.eI&&r.isLive&&Z==="("&&z.H&&eK(z["("])<1440&&(Z="H");C&&G({vfmly:MJ(Z)});w=z[Z];if(!w.length)return C&&G({novfmly:MJ(Z)}),hk();DH(w);return gD(new KJ(w, W,u,p))}; QvY=function(R,w,p,r,f,G,I,C=!1){if(w.WB&&I&&I.length>1&&!(w.DI>0||w.U)){const B=w.L||!!f,W=B&&w.ag?G:void 0,x=DbD(w,r),q=[],O=[],e={};for(let P=0;P=p.video?.height)||(C=p.itag,w=I?I:{itag:C,wN:w,i4:G},G?w.numChannels=p.audio.numChannels:(G=p.video,w.maxWidth=G?.width,w.maxHeight=G?.height,w.maxFramerate=r,w.maxBitrateBps=p.hf*8,w.Kt=G?.isHdr()),R.L.set(f,w))}; $b6=function(R,w){const p=!(!R.m&&!R.M),r=!(!R.mac3&&!R.MAC3),f=!(!R.meac3&&!R.MEAC3);R=!(!R.i&&!R.I);w.Af=R;return p||r||f||R}; ggL=function(R,w,p,r){const f=[];for(const C of p){if(!C.url)continue;p=new g.uh(C.url,!0);if(C.s){var G=p,I=C.sp;const u=rg(7,6777,KA(19,5416,C.s));G[l[15]](I,SD(49,2713,u))}for(const u of Object.keys(r))p.set(u,r[u]);G=ao(C.type,C.quality,C.itag,C.width,C.height);f.push(new hQH(G,p))}return cn(R.K,f,Pn(R,w),!1)}; Twx=function(R){for(const w of R)if(w.itag&&HF6.has(w.itag))return!0;return!1}; ngW=function(R){for(const w of R)if(w.audio.audioQuality==="AUDIO_QUALITY_HIGH")return!0;return!1}; MJ=function(R){switch(R){case "*":return"v8e";case "(":return"v9e";case "(h":return"v9he";default:return R}}; eQD=function(R,w,p){return p.O0?`${R}_${Number(w.video?.fps||0)}_${!!w.audio?.C}_${!!w.video?.G}`:`${R}_${Number(w.video?.fps||0)}_${!!w.audio?.C}`}; ti=function(R){const w=[];for(const p in R){if(!R.hasOwnProperty(p))continue;const r=p;w.push(MJ(r));for(const f of R[r])w.push(f.itag)}return w.join(".")}; alH=function(R,w,p,r,f,G){const I={},C={};g.DS(w,(u,m)=>{u=u.filter(z=>{const B=z.itag;if(!z.contentProtection)return C[B]="noenc",!1;if(G.p_&&z.wN==="(h"&&G.xY)return C[B]="lichdr",!1;if(!R.G&&z.wN==="1e")return C[B]="noav1enc",!1;if(z.wN==="("||z.wN==="(h"){if(R.C&&p&&p.flavor==="widevine"){var W=z.mimeType+"; experimental=allowed";(W=!!z.contentProtection[p.flavor]&&!!p.C[W])||(C[B]=z.contentProtection[p.flavor]?"unspt":"noflv");return W}if(!aT(R,du.CRYPTOBLOCKFORMAT)&&!R.O0||R.S)return C[B]=R.S? "disvp":"vpsub",!1}return p&&z.contentProtection[p.flavor]&&p.C[z.mimeType]?!0:(C[B]=p?z.contentProtection[p.flavor]?"unspt":"noflv":"nosys",!1)}); u.length&&(I[m]=u)}); r&&Object.entries(C).length&&f({rjr:Ro(C)});return I}; cOI=function(R,w){const p=v6(R,(r,f)=>f.video.C()?Math.min(r,f.video.width):r,Infinity); p{if(r.video.C()||r.video.width{if(r.itag!=="299")return!0;w[r.itag]="ps3hfr1080";return!1})); return R}; Mul=function(R,w,p){return w=w.filter(r=>{if(r.video.qualityOrdinal<=R.Mr)return!0;p[r.itag]="maxquality";return!1})}; DbD=function(R,w,p){const r={};for(const f in w.L){if(!w.L.hasOwnProperty(f))continue;const G=w.L[f].info;if(R.D&&G.video&&G.video.qualityOrdinalMath.max(w,p.video.qualityOrdinal),0)}; Oz=function(R,w,p,r=!1,f=new Set){if(w.wN==="")return"unkn";if((w.itag==="304"||w.itag==="266")&&R.S)return"blk2khfr";if(R.J&&w.video&&w.video.qualityOrdinal>R.J)return`max${R.J}`;if(R.q0&&w.wN==="h"&&w.video&&w.video.qualityOrdinal>1080)return"blkhigh264";if(w.wN==="(h"&&!p.J)return"enchdr";if(r&&ECH(w)&&!R.PS)return"blk51live";if((w.wN==="MAC3"||w.wN==="mac3")&&!R.G)return"blkac3";if((w.wN==="MEAC3"||w.wN==="meac3")&&!R.K)return"blkeac3";if(w.wN==="M"||w.wN==="m")return"blkaac51";if((w.wN==="so"|| w.wN==="sa")&&!R.pB)return"blkamb";if(!R.p_&&Kel(w)&&(!p.G||w.wN!=="1e"))return"cbc";if(!p.G&&Kel(w)&&w.wN==="1e")return"cbcav1";if((w.wN==="i"||w.wN==="I")&&!R.f_)return"blkiamf";if(R.mq&&w.audio?.C===!0)return"blkvbcabr";if(R.O0&&w.video?.G===!1)return"blkmtvcabr";if(R.U0&&(w.wN==="1"||w.wN==="1h"||p.G&&w.wN==="1e")&&w.video?.qualityOrdinal&&w.video?.qualityOrdinal>R.U0)return"av1cap";r=p.O.get(w.wN);if(!R.SI&&r&&r.Ms>0)return f.add(w.wN),"byerr";if(w.video?.C()){if(!p.xY&&!aT(p,du.FRAMERATE))return"capHfr"; if(R.Qk&&w.video.qualityOrdinal>=4320)return"blk8khfr";if(w.G()&&R.Ml&&w.contentProtection&&w.video.qualityOrdinal>=1440)return"disablevp9hfr"}if(R.hf&&w.hf>R.hf)return"ratecap";if(R.I0>0&&w.Ih()&&w.video.height>R.I0)return"mvhcap";R=vgI(p,w);return R!==!0?R:!0}; DH=function(R,w=[]){g.tt(R,(p,r)=>{const f=r.hf-p.hf;if(!p.Ih()||!r.Ih())return f;let G=r.video.height*r.video.width-p.video.height*p.video.width;!G&&w&&w.length>0&&(p=w.indexOf(p.wN)+1,r=w.indexOf(r.wN)+1,G=p===0||r===0?r||-1:p-r);G||(G=f);return G})}; NwD=function(R,w){if(w>R.ea())R.segments=[];else{var p=UI(R.segments,r=>r.yk>=w,R); p>0&&R.segments.splice(0,p)}}; $O=function(R){const w=R.data.getUint8(R.offset+R.L);R.L+=1;return w}; Xc=function(R){const w=R.data.getUint16(R.offset+R.L);R.L+=2;return w}; nJ=function(R){const w=R.data.getInt32(R.offset+R.L);R.L+=4;return w}; dm=function(R){const w=R.data.getUint32(R.offset+R.L);R.L+=4;return w}; ZH=function(R){var w=R.data;var p=R.offset+R.L;w=w.getUint32(p)*4294967296+w.getUint32(p+4);R.L+=8;return w}; YO=function(R,w=NaN){let p;if(isNaN(w))p=R.size;else for(p=R.L;p1?Math.ceil(f*w):Math.floor(f*w))}R.skip(1);p=$O(R)<<16|Xc(R);if(p&256){r=p&1;f=p&4;var G=p&512,I=p&1024,C=p&2048;p=dm(R);r&&R.skip(4);f&&R.skip(4);r=(G?4:0)+(I?4:0)+(C?4:0);for(f=0;f1?Math.ceil(I*w):Math.floor(I*w)),R.skip(r)}}}; ik=function(R,w){if(R.byteLength-w<8)return!1;var p=R.getUint32(w);if(p<8||R.byteLength-w122)return!1}return!0}; Qy=function(R,w){const p=R.getUint32(w),r=R.getUint32(w+4);return new fYW(R,w,p,r)}; g.vn=function(R){const w=R.data.getUint8(R.dataOffset)?20:12;return R.data.getUint32(R.dataOffset+w)}; NJ=function(R){R=new DataView(R.buffer,R.byteOffset,R.byteLength);return(R=g.Hn(R,0,1836476516))?g.vn(R):NaN}; gm=function(R){return R===1701082227||R===1836019558||R===1836019574||R===1835297121||R===1835626086||R===1937007212||R===1953653094||R===1953653099||R===1836475768}; IYY=function(R){var w=g.Hn(R,0,1937011556);if(!w)return null;w=hi(R,w.dataOffset+8,1635148593)||hi(R,w.dataOffset+8,1635135537);if(!w)return null;var p=hi(R,w.dataOffset+78,1936995172),r=hi(R,w.dataOffset+78,1937126244);if(!r)return null;w=null;if(p)switch(p.skip(4),$O(p)){default:w=0;break;case 1:w=2;break;case 2:w=1;break;case 3:w=255}let f=p=null,G=null;if(r=hi(R,r.dataOffset,1886547818)){const I=hi(R,r.dataOffset,1886546020);let C=hi(R,r.dataOffset,2037673328);if(!C&&(C=hi(R,r.dataOffset,1836279920), !C))return null;I&&(I.skip(4),p=nJ(I)/65536,G=nJ(I)/65536,f=nJ(I)/65536);R=kPd(C);R=new DataView(R.buffer,R.byteOffset+8,R.byteLength-8);return new GiP(w,p,G,f,R)}return null}; var ycb=function(R,w,p,r,f){return rg[l[5]](this,64,2139,R,w,p,r,f)}; g.kO=function(R){if(R.data.getUint8(R.dataOffset)){var w=R.data;R=R.dataOffset+4;w=w.getUint32(R)*4294967296+w.getUint32(R+4)}else w=R.data.getUint32(R.dataOffset+4);return w}; CEP=function(R){R=new fYW(R.data,R.offset,R.size,R.type,R.C);var w=$O(R);R.skip(7);const p=dm(R);let r;w===0?(w=dm(R),r=dm(R)):(w=ZH(R),r=ZH(R));R.skip(2);const f=Xc(R),G=[],I=[];for(let C=0;C=2)return null;const f=new DataView(w.buffer,w.byteOffset,w.length),G=g.Hn(f,0,1937011556);if(!G)return null;w=f.getUint32(G.dataOffset+8);r=f.getUint32(G.dataOffset+12);if(r!==1701733217&&r!==1701733238)return null;r=new z0x(R.byteLength+w);Fc(r,R,0,p.offset+12);r.data.setInt32(r.offset,2);r.offset+=4;Fc(r,R,p.offset+16,p.size-16);Fc(r,f,f.byteOffset+G.dataOffset+8,w);Fc(r,R,p.offset+p.size,R.byteLength- (p.offset+p.size));p=[1836019574,1953653099,1835297121,1835626086,1937007212,1937011556];for(const I of p)p=g.Hn(R,0,I),r.data.setUint32(p.offset,p.size+w);R=g.Hn(r.data,0,1953654136);r.data.setUint32(R.offset+16,2);return r.data}; Wj6=function(R){var w=g.Hn(R,0,1937011556);if(!w)return null;var p=R.getUint32(w.dataOffset+12);if(p!==1701733217&&p!==1701733238)return null;w=hi(R,w.offset+24+(p===1701733217?28:78),1936289382);if(!w)return null;p=hi(R,w.offset+8,1935894637);if(!p||R.getUint32(p.offset+12)!==1667392371)return null;w=hi(R,w.offset+8,1935894633);if(!w)return null;w=hi(R,w.offset+8,1952804451);if(!w)return null;p=new Uint8Array(16);for(let r=0;r<16;r++)p[r]=R.getInt8(w.offset+16+r);return p}; GV=function(R,w,p){var r=new RH(p);if(!w5(r,R))return!1;r=pL(r);if(!r5(r,w))return!1;for(R=0;w;)w>>>=8,R++;w=r.start+r.pos;const f=fL(r,!0);r=R+(r.start+r.pos-w)+f;r=r>9?xYr(r-9,8):xYr(r-2,1);R=w-R;p.setUint8(R++,236);for(w=0;wp;f++)p=p*256+zV(R),r*=128;return w?p-r:p}; IH=function(R){return R.pos>=R.L.byteLength}; CL=function(R){const w=fL(R,!0);let p=zV(R);for(let r=1;r=2&&p[l[8]](p[l[2]],0,r);if(!(R<<1&3)){rg(f^6133,f^6965,p);let I=p[l[f^6101]]+(p[l[f^6101]]?l[f^6046]:l[f^6115])+p[l[4]]+p[l[f^6080]];if(XJ(f^6082,f^1113,p)){const C=[];g.DS(p[l[f^6127]],(u,m)=>{u!==null&&C[l[f^6083]](`${m}=${u}`)}); I+=`?${C[l[f^6105]](l[f^6029])}`}var G=I}return G}; um=function(R){const w=fL(R,!0);R.pos+=w}; sD=function(R){const w=fL(R,!0);let p=0;w===4?p=R.L.getFloat32(R.pos):w===8&&(p=R.L.getFloat64(R.pos));R.pos+=w;return p}; m_=function(R,w){const p=new Uint8Array(R.L.buffer,R.L.byteOffset+R.pos,w);R.pos+=w;return p}; qfd=function(R){const w=fL(R,!0);return Lm(m_(R,w))}; zV=function(R){return R.L.getUint8(R.pos++)}; AVr=function(R){if(!r5(R,440786851,!0))return null;const w=R.pos;fL(R,!1);const p=fL(R,!0)+R.pos-w;R.pos=w+p;if(!r5(R,408125543,!1))return null;fL(R,!0);if(!r5(R,357149030,!0))return null;const r=R.pos;fL(R,!1);const f=fL(R,!0)+R.pos-r;R.pos=r+f;if(!r5(R,374648427,!0))return null;const G=R.pos;fL(R,!1);const I=fL(R,!0)+R.pos-G,C=new Uint8Array(p+12+f+I),u=new DataView(C.buffer);C.set(new Uint8Array(R.L.buffer,R.L.byteOffset+w,p));u.setUint32(p,408125543);u.setUint32(p+4,33554431);u.setUint32(p+8, 4294967295);C.set(new Uint8Array(R.L.buffer,R.L.byteOffset+r,f),p+12);C.set(new Uint8Array(R.L.buffer,R.L.byteOffset+G,I),p+12+f);return C}; B2=function(R){const w=R.pos;R.pos=0;let p=1E6;w5(R,[408125543,357149030,2807729])&&(p=CL(R));R.pos=w;return p}; W2=function(R){if(!bQx(R)||!r5(R,524531317))return!1;fL(R,!0);return!0}; yVd=function(R,w){const p=R.pos;R.pos=0;if(R.L.getUint8(R.pos)!==160&&!W2(R)||!r5(R,160))return R.pos=p,NaN;fL(R,!0);var r=R.pos;if(!r5(R,161))return R.pos=p,NaN;fL(R,!0);zV(R);const f=zV(R)<<8|zV(R);R.pos=r;if(!r5(R,155))return R.pos=p,NaN;r=CL(R);R.pos=p;return(f+r)*w/1E9}; bQx=function(R){if(R.MM()){if(!r5(R,408125543))return!1;fL(R,!0)}return!0}; V5W=function(R,w){const p=w.indexOf("?");if(p>0){const r=XJ(7,3639,w.substring(p+1));g.DS(r,function(f,G){this.set(G,f)},R); w=w.substring(0,p)}w=XJ(24,2117,w);g.DS(w,function(r,f){this.set(f,r)},R)}; otd=function(R){const w=R.Ld.qk(),p=[];g.DS(R.L,(f,G)=>{p.push(`${G}=${f}`)}); if(!p.length)return w;const r=p.join("&");R=XJ(3,5016,R.Ld)?"&":"?";return w+R+r}; xY=function(R,w){R[w]||(R[w]=new t5x);return R[w]}; lm=function(R){R.G=(0,g.T)();R.started=0;R.timedOut=0;R.L=0}; LL=function(R,w){let p=R.started+R.L*4;w&&(p+=R.C);p=Math.max(0,p-3);return 1.6**p}; OQl=function(R,w,p){if(AQ(89,8669,R.L))return!1;var r=xY(p,AQ(67,8307,R.L));if(r.timedOut<1&&r.L<1)return!1;r=r.timedOut+r.L;R=q9(R,w);p=xY(p,AQ(67,8307,R));return p.timedOut+p.L+00))return R}; ED=function(R,w){return new OD(R,R+w-1)}; Dy=function(R){if(!R)return new OD(0,0);var w=Number(R.start);R=Number(R.end);if(!isNaN(w)&&!isNaN(R)&&(w=new OD(w,R),w.length>0))return w}; EtD=function(R){R.length===1||g.kb(R,p=>!!p.range); for(var w=1;w=w.range.start+w.L&&R.range.start+R.L+R.C<=w.range.start+w.L+w.C:R.yk===w.yk&&R.L>=w.L&&(R.L+R.C<=w.L+w.C||w.O)}; ZQd=function(R,w){return R.rN!==w.rN?!1:R.X()&&w.type===3&&R.rN.L()?(R=R.rN.M0(R),Nx(R,p=>ZQd(p,w))):R.yk===w.yk&&!!w.C&&w.L+w.C>R.L&&w.L+w.C<=R.L+R.C}; Xh=function(R,w){var p=w.yk;R.D="updateWithSegmentInfo";R.yk=p;if(R.startTime!==w.startTime||R.duration!==w.duration)R.startTime=w.startTime,R.duration=w.duration,M5x(R)}; nL=function(R){return!M9(R.C_[R.C_.length-1])}; d5=function(R){return R.C_[R.C_.length-1].X()}; g.Zy=function(R,w,p){let r;p=R.pS===null?R.EQ.pS(w,p,R.C_[0].type):R.pS;R.L?(w=p?Ag(R.L,w.Od):R.L,r=new bm(w),r.get("alr")||r.set("alr","yes"),R.C&&V5W(r,R.C)):/http[s]?:\/\//.test(R.C)?r=new bm(new g.uh(R.C)):(r=y6(R.EQ,p,w),R.C&&V5W(r,R.C));(w=R.range)?r.set("range",w.toString()):R.C_[0].rN.U()&&R.C_.length===1&&R.C_[0].L&&r.set("range",`${R.C_[0].L}-`);R.requestId&&r.set("req_id",R.requestId);isNaN(R.Ou)||r.set("headm",R.Ou.toString());isNaN(R.K)||r.set("mffa",`${R.K}ms`);R.urlParams&&g.DS(R.urlParams, (f,G)=>{r.set(G,f)}); return r}; YfY=function(R){if(R.range)return R.O;R=R.C_[0];return Math.round(R.U*R.rN.info.hf)}; FjD=function(R,w){return Math.max(0,R.C_[0].G-w)}; j$H=function(R,w){for(const p of R.C_)if(p.type===3&&w>=p.G&&w<=p.K)return!0;return!1}; YY=function(R,w,p){for(;R;R=R.parentNode){if(!R.attributes||p&&R.nodeName!==p)continue;const r=R.getAttribute(w);if(r)return r}return""}; Fh=function(R,w){for(;R;R=R.parentNode){const p=R.getElementsByTagName(w);if(p.length>0)return p[0]}return null}; JVI=function(R){if(!R)return 0;const w=R.match(/PT(([0-9]*)H)?(([0-9]*)M)?(([0-9.]*)S)?/);return w?(Number(w[2])|0)*3600+(Number(w[4])|0)*60+(Number(w[6])|0):Number(R)|0}; TQP=function(R){return R.match(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})\.(\d{3})$/)?`${R}Z`:R}; iQb=function(R){const w=R.O;R.O=[];return w}; Q$b=function(R){R.L||(R.L=new jM);return R.L}; h06=function(R,w){R.C[w]||(R.C[w]=new jM);return R.C[w]}; gtD=function(R,w){R.O[w]||(R.O[w]=new jM);return R.O[w]}; HQI=function(R,w){const p=[];w=Array.from(w.getElementsByTagName("SegmentTimeline"));for(const r of w){w=r.parentNode.parentNode;let f=null;w.nodeName==="Period"?f=Q$b(R):w.nodeName==="AdaptationSet"?(w=w.getAttribute("id")||w.getAttribute("mimetype")||"",f=h06(R,w)):w.nodeName==="Representation"&&(w=w.getAttribute("id")||"",f=gtD(R,w));if(f==null)return;f.update(r);g.Bk(p,iQb(f))}g.Bk(R.G,p);zP_(R.G,r=>r.startSecs*1E3+r.L)}; vtl=function(R){R.L&&(R.L.L=[]);g.DS(R.C,w=>{w.L=[]}); g.DS(R.O,w=>{w.L=[]})}; Jg=function(R,w){return oM(R.segments,p=>w-p.yk)}; NQY=function(R,w,p){const r=R.index.U(w),f=R.index.getStartTime(w);let G=R.index.getDuration(w);p?G=p=0:p=R.info.hf*G;return new TV([new $Y(3,R,void 0,"otfCreateRequestInfoForSegment",w,f,G,0,p)],r)}; kiI=function(R,w){if(!R.index.isLoaded()){var p=[],r=w.K;w=w.D.split(",").filter(m=>m.length>0); var f=0,G=0,I=0,C=/^(\d+)/,u=/r=(\d+)/;for(let m=0;m0&&(R.L=Math.min(R.L+p,10),R.C=f),R.L>0?(R.L--, R=!0):R=!1,R?(typeof r==="function"&&(r=r()),console.log(`plyr.${w}`,r)):(r=(pxx.get(w)??0)+1,pxx.set(w,r),r%100===1&&console.warn("plyr",`plyr.${w} is chatty, dropping logs.`)))}; H2=function(R){if(!R.D){if(g.nq(R.info.rN.info)){var w=g.g5(R);var p=hi(w,0,1836019574);if(p){p=p.offset+p.size;var r=new Uint8Array(p);r.set(new Uint8Array(w.buffer,w.byteOffset,p));w=r}else w=null}else w=AVr(new RH(g.g5(R)));w&&(R.info.rN.C=w,R.D=!0)}}; g.g5=function(R){return owD(R.C)}; r1d=function(R,w){w=Math.min(w,R.info.C);const {wf:p,eY:r}=R.C.split(w),f=new v2(new $Y(R.info.type,R.info.rN,R.info.range,R.info.D,R.info.yk,R.info.startTime,R.info.duration,R.info.L,w,!1,R.info.CS,R.info.clipId),p);f.G=R.G;f.O=R.O;w=new v2(new $Y(R.info.type,R.info.rN,R.info.range,R.info.D,R.info.yk,R.info.startTime,R.info.duration,R.info.L+w,R.info.C-w,R.info.O,R.info.CS,R.info.clipId),r);w.G=R.G;w.O=R.O;return[f,w]}; g.N9=function(R){g.nq(R.info.rN.info)||R.info.rN.info.G3();if(R.O!==-1)return R.O;if(R.L&&R0x(R.L))return R.O=R0x(R.L),R.O;if(g.nq(R.info.rN.info)){var w=g.g5(R);var p=R.info.rN.C,r=NaN;let f=NaN,G=0;for(;ik(w,G);){const I=Qy(w,G);I.type===1936286840?f=I.data.getUint32(I.dataOffset+8):I.type===1836476516?f=g.vn(I):I.type===1952867444&&isNaN(r)&&(r=g.kO(I));G=gm(I.type)?G+8:G+I.size}!f&&p&&(f=NJ(p));w=r/f}else w=new RH(g.g5(R)),p=R.K?w:new RH(new DataView(R.info.rN.C.buffer)),r=B2(p),p=w.pos,w.pos= 0,W2(w)?r5(w,231)?(r=CL(w)*r/1E9,w.pos=p,w=r):(w.pos=p,w=NaN):(w.pos=p,w=NaN);R.O=w||R.info.G;return R.O}; f6W=function(R,w){g.nq(R.info.rN.info)||R.info.rN.info.G3();R.O=w;if(g.nq(R.info.rN.info)){var p=g.g5(R);R=R.info.rN.C;var r=NaN,f=NaN;let u=0;for(;ik(p,u);){const m=Qy(p,u);isNaN(r)&&(m.type===1936286840?r=m.data.getUint32(m.dataOffset+8):m.type===1836476516&&(r=g.vn(m)));if(m.type===1952867444){!r&&R&&(r=NJ(R));var G=g.kO(m);isNaN(f)&&(f=Math.round(w*r)-G);var I=m;G+=f;if(I.data.getUint8(I.dataOffset)){var C=I.data;I=I.dataOffset+4;C.setUint32(I,Math.floor(G/4294967296));C.setUint32(I+4,G&4294967295)}else I.data.setUint32(I.dataOffset+ 4,G)}u=gm(m.type)?u+8:u+m.size}return!0}p=new RH(g.g5(R));R=R.K?p:new RH(new DataView(R.info.rN.C.buffer));r=B2(R);R=p.pos;p.pos=0;if(W2(p)&&r5(p,231))if(f=fL(p,!0),w=Math.floor(w*1E9/r),Math.ceil(Math.log(w)/Math.log(2)/8)>f)w=!1;else{for(r=f-1;r>=0;r--)p.L.setUint8(p.pos+r,w&255),w>>>=8;p.pos=R;w=!0}else w=!1;return w}; G3l=function(R,w){R.timestampOffset>0&&(w-=R.timestampOffset);var p=g.N9(R)+w;f6W(R,p);R.timestampOffset=w}; kY=function(R){g.nq(R.info.rN.info)||R.info.rN.info.G3();if(R.L&&R.info.type===6)return R.L.N4;if(g.nq(R.info.rN.info)){var w=g.g5(R);var p=0;w=g.Uz(w,1936286840);for(var r of w)w=CEP(r),p+=w.Yz[0]/w.timescale;p=p||NaN;if(!(p>=0))a:{p=g.g5(R);r=R.info.rN.C;let B=w=0;for(var f=0;ik(p,w);){const W=Qy(p,w);if(W.type===1836476516)B=g.vn(W);else if(W.type===1836019558){!B&&r&&(B=NJ(r));if(!B){p=NaN;break a}var G=hi(W.data,W.dataOffset,1953653094),I=G;G=B;var C=hi(I.data,I.dataOffset,1952868452);I=hi(I.data, I.dataOffset,1953658222);var u=nJ(C);nJ(C);u&2&&nJ(C);C=u&8?nJ(C):0;var m=nJ(I),z=m&1;u=m&4;const x=m&256,q=m&512,O=m&1024;m&=2048;const e=dm(I);z&&nJ(I);u&&nJ(I);z=0;for(let P=0;Pg.iF(w,p,4,1E3),R,{format:"RAW", method:"GET",withCredentials:!0})}; g.xRd=function(R){let w;R.responseType&&R.responseType!=="text"?R.responseType==="arraybuffer"&&(w=Lm(new Uint8Array(R.response))):w=R.responseText;return!w||w.length>2048?"":w.indexOf("https://")===0?w:""}; R0=function(R,w,p){w.match(l6l);return R(w,p).then(r=>{const f=g.xRd(r.xhr);return f?R0(R,f,p):r.xhr})}; LpD=function(R){return Nx(R,w=>"FORMAT_STREAM_TYPE_OTF"===w.type)?"FORMAT_STREAM_TYPE_OTF":"FORMAT_STREAM_TYPE_UNKNOWN"}; qTd=function(R,w,p=0,r){r=new g.w3("",r,!1);r.duration=p||0;for(const f of R){R=p_(f,w,r.duration);const {RK:G,s:I,zS:C}=o3(8,4474,f);(p=r3(G||f.url||"",C,I))&&(R.streamType==="FORMAT_STREAM_TYPE_OTF"?f_(r,new Gn(p,R)):f_(r,new I0(p,R,Dy(f.initRange),Dy(f.indexRange))))}r.isOtf=!0;return r}; A1L=function(R,w,p=0,r){r=new g.w3("",r.experiments,!1);r.duration=p||0;for(const f of R){R=p_(f,w,r.duration);p=Dy(f.initRange);const G=Dy(f.indexRange),{RK:I,s:C,zS:u}=o3(1,4467,f),m=r3(I||f.url||"",u,C);m&&f_(r,new I0(m,R,p,G))}return r}; p_=function(R,w,p=0){let r=R.mimeType||"";var f=R.itag;var G=R.xtags;f=f?f.toString():"";G&&(f+=`;${G}`);G=f;if(ei(r)){var I=R.width||640;f=R.height||360;var C=R.fps,u=R.qualityLabel;const O=R.qualityOrdinal,e=R.colorInfo,P=R.projectionType;var m;R.stereoLayout&&(m=bVx[R.stereoLayout]);const c=BCL(R)||void 0;var z;e?.primaries&&(z=y1W[e.primaries]||void 0);I=new c1(I,f,C,P,m,void 0,u,O&&Vod[O],c,z,(R.videoTrack?.associatedAudioTrackId?.length??0)===0);r=C_(r,I,uI[R.itag||""]);sq&&(r+="; enableflushduringseek=true"); mr&&(r+="; enableresetaudiodecoder=true")}let B;if(DK(r)){var W=R.audioSampleRate;m=R.audioTrack;W=new MF(W?+W:void 0,R.audioChannels,R.spatialAudioType,R.isDrc,R.loudnessDb,R.trackAbsoluteLoudnessLkfs,R.audioQuality||"AUDIO_QUALITY_UNKNOWN",R.isVb);m&&(z=m.displayName,f=m.id,C=m.audioIsDefault,m=m.isAutoDubbed,z&&(B=new g.zn(z,f||"",!!C,!!m)))}let x;R.captionTrack&&(m=R.captionTrack.displayName,z=R.captionTrack.vssId,f=R.captionTrack.languageCode,C=R.captionTrack.kind,u=R.captionTrack.id,m&&z&&f&& (x=new oJ_(m,z,f,C,R.xtags,u)));m=Number(R.bitrate)/8;z=Number(R.contentLength);f=Number(R.lastModified);u=R.drmFamilies;C=R.type;R=Number(R.approxDurationMs);let q;if(w&&u){q={};for(const O of u)(u=BK[O])&&(q[u]=w[u])}return new P1(G,r,{audio:W,video:I,DT:B,contentProtection:q,hf:m,zA:p&&z?z/p:0,contentLength:z,lastModified:f,captionTrack:x,streamType:C,approxDurationMs:R})}; to6=function(R){return Nx(R,w=>"FORMAT_STREAM_TYPE_OTF"===w.stream_type)?"FORMAT_STREAM_TYPE_OTF":"FORMAT_STREAM_TYPE_UNKNOWN"}; OVH=function(R,w,p=0,r){r=new g.w3("",r,!1);r.duration=p||0;for(const f of R)if(R=WK(f,w,r.duration),p=r3(f.url,f.sp,f.s))if(R.streamType==="FORMAT_STREAM_TYPE_OTF")f_(r,new Gn(p,R));else{const G=KL(f.init),I=KL(f.index);f_(r,new I0(p,R,G,I))}r.isOtf=!0;return r}; KpY=function(R,w,p=0,r){r=new g.w3("",r?.experiments,!1);r.duration=p||0;for(const f of R){R=WK(f,w,r.duration);p=KL(f.init);const G=KL(f.index),I=r3(f.url,f.sp,f.s);I&&f_(r,new I0(I,R,p,G))}return r}; WK=function(R,w,p=0){let r=R.type;var f=R.itag;var G=R.xtags;G&&(f=R.itag+";"+G);if(ei(r)){var I=(R.size||"640x360").split("x");I=new c1(+I[0],+I[1],+R.fps,R.projection_type,+R.stereo_layout,void 0,R.quality_label,+R.quality_ordinal,R.eotf,R.primaries,!R.video_track_associated_audio_track_id);r=C_(r,I,uI[R.itag]);sq&&(r+="; enableflushduringseek=true");mr&&(r+="; enableresetaudiodecoder=true")}let C,u;DK(r)&&(C=new MF(+R.audio_sample_rate||void 0,+R.audio_channels||0,R.spatial_audio_type,!!R.drc), R.name&&(u=new g.zn(R.name,R.audio_track_id,R.isDefault==="1",R.isAutoDubbed==="1")));let m;R.caption_display_name&&R.caption_vss_id&&R.caption_language_code&&(m=new oJ_(R.caption_display_name,R.caption_vss_id,R.caption_language_code,R.caption_kind,R.xtags,R.caption_id));G=Number(R.bitrate)/8;const z=Number(R.clen),B=Number(R.lmt);p=p&&z?z/p:0;let W;if(w&&R.drm_families){W={};for(const x of R.drm_families.split(","))W[x]=w[x]}return new P1(f,r,{audio:C,video:I,DT:u,contentProtection:W,hf:G,zA:p,contentLength:z, lastModified:B,captionTrack:m,streamType:R.stream_type,approxDurationMs:Number(R.approx_duration_ms)})}; EJP=function(R){switch(R){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"}}; DR6=function(R){switch(R){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"}}; a6I=function(R,w,p){return P$l(new g.w3(R,w,p),R)}; oT=function(R){return g.ck(R.L,w=>AQ(88,8668,w.EQ.L))}; jvP=function(R){return g.ck(R.L,w=>!!w.info.video&&w.info.video.isHdr())}; f_=function(R,w){R.L[w.info.id]=w;R.G.set(tg(w,R.PB),w)}; P$l=function(R,w=""){R.state=1;R.jI=(0,g.T)();return WpH(w||R.sourceUrl).then(p=>{if(!R.cS()){R.Po=p.status;p=p.responseText;const f=new DOMParser;p=us(f,R2(p),"text/xml").getElementsByTagName("MPD")[0];R.xY=JVI(YY(p,"minimumUpdatePeriod"))*1E3||Infinity;b:{if(p.attributes)for(r of p.attributes)if(r.value==="http://youtube.com/yt/2012/10/10"){var r=r.name.split(":")[1];break b}r=""}R.D=r;R.isLive=R.xY{let r; p instanceof Jk&&(r=p.xhr,R.Po=r.status);R.state=3;R.publish("loaderror");return jZ(r)})}; g.Xxd=function(R){return g.ck(R.L,w=>Ew(w.info.mimeType))}; nJY=function(R){return g.ck(R.L,w=>w.info.video?w.info.video.projectionType==="EQUIRECTANGULAR":!1)}; dRD=function(R){return g.ck(R.L,w=>w.info.video?w.info.video.projectionType==="EQUIRECTANGULAR_THREED_TOP_BOTTOM":!1)}; Ag=function(R,w=!1){rg(49,3313,R);if(R[l[13]]!==l[43]){var p=R[l[53]]();p[l[15]](l[72],l[37]);return p}var r=R[l[73]]();p=new g.Qd(r);var f=R[l[57]](l[58]);const G=KA(11,5424,R[l[57]](l[61])||l[1])[l[12]](l[25]);if(f&&G&&G[l[2]]>1&&G[1])return r=p.L,R=r[l[26]](/^[^.]*/,l[1]),g.g4(p,`${r[l[7]](l[44])===0?l[44]:l[65]}${f}---${G[1]}${R}`),p=new g.uh(p[l[19]]()),p[l[15]](l[62],l[37]),p;if(w)return p=R[l[53]](),p[l[15]](l[62],l[37]),p;f=p.L[l[36]](l[80]);p.L[l[36]](l[39])?(g.g4(p,l[22]),r=p[l[19]]()): p.L[l[36]](l[32])?(g.g4(p,l[74]),r=p[l[19]]()):(p=M6_(r),xr(p)&&(r=p));p=new g.uh(r);p[l[15]](l[9],l[37]);f&&p[l[15]](l[50],l[76]);return p}; ZVY=function(R){return g.ck(R.L,w=>w.info.video?w.info.video.projectionType==="MESH":!1)}; YT_=function(R){return g.ck(R.L,w=>w.info.video?w.info.video.stereoLayout===1:!1)}; FpW=function(R){return Pk(R.L,w=>w.info.video?w.YY():!0)}; J16=function(R,w){let p=YY(w,"id");p=p.replace(":",";");let r=YY(w,"mimeType");var f=YY(w,"codecs");r=f?`${r}; codecs="${f}"`:r;f=Number(YY(w,"bandwidth"))/8;const G=Number(Fh(w,"BaseURL").getAttribute(R.D+":contentLength")),I=R.duration&&G?G/R.duration:0;if(ei(r)){var C=Number(YY(w,"width")),u=Number(YY(w,"height")),m=Number(YY(w,"frameRate"));const q=EJP(YY(w,R.D+":projectionType"));a:switch(YY(w,R.D+":stereoLayout")){case "layout_left_right":var z=1;break a;case "layout_top_bottom":z=2;break a; default:z=0}z=new c1(C,u,m,q,z)}if(DK(r)){var B=Number(YY(w,"audioSamplingRate"));var W=Number(YY(w.getElementsByTagName("AudioChannelConfiguration")[0],"value"));C=DR6(YY(w,R.D+":spatialAudioType"));B=new MF(B,W,C);a:{u=YY(w,"lang")||"und";if(W=Fh(w,"Role"))if(m=YY(W,"value")||"",g.da(jwD,m)){W=`${u}.${jwD[m]}`;C=m==="main";R=YY(w,R.D+":langName")||`${u} - ${m}`;W=new g.zn(R,W,C);break a}W=void 0}}if(w=Fh(w,"ContentProtection"))if(w.getAttribute("schemeIdUri")==="http://youtube.com/drm/2012/10/10"){var x= {};for(w=w.firstChild;w!=null;w=w.nextSibling){if(!(w instanceof Element))continue;if(!/SystemURL/.test(w.nodeName))continue;R=w.getAttribute("type");C=w.textContent;R&&C&&(x[R]=C.trim())}}else x=void 0;return new P1(p,r,{audio:B,video:z,DT:W,contentProtection:x,hf:f,zA:I,contentLength:G})}; $RY=function(R){var w=R.xY;isFinite(w)&&(xX(R)?R.refresh():(w=Math.max(0,R.jI+w-(0,g.T)()),R.J||(R.J=new g.vZ(R.refresh,w,R),g.K(R,R.J)),R.J.start(w)))}; xX=function(R){return R.isLive&&(0,g.T)()-R.jI>=R.xY}; TCd=function(R){R=R.L;for(const w in R){const p=R[w].index;if(p.isLoaded())return p.ea()+1}return 0}; lI=function(R){return R.gL?R.gL-(R.X||R.timestampOffset):0}; L_=function(R){return R.Vm?R.Vm-(R.X||R.timestampOffset):0}; qC=function(R){if(!isNaN(R.Jl))return R.Jl;var w=R.L;for(var p in w){var r=w[p].index;if(r.isLoaded()&&!Ew(w[p].info.mimeType)){w=0;for(p=r.b9();p<=r.ea();p++)w+=r.getDuration(p);w/=r.eM();w=Math.round(w/.5)*.5;r.eM()>10&&(R.Jl=w);return w}if(R.isLive&&(r=w[p],r.N4))return r.N4}return NaN}; iVb=function(R,w){R=jP(R.L,r=>r.index.isLoaded()); if(!R)return NaN;R=R.index;const p=R.I3(w);return R.getStartTime(p)===w?w:p49?"p60":w>32?"p48":""}`;w=IT()[R];if(w!=null&&w>0)return w;w=ez.get(R);if(w!=null&&w>0)return w;p=p?.get(R);return p!=null&&p>0?p:8192}; NCd=function(R,w=!1){Bwl(w);WVd(w);if(w){for(const p of ez.keys())p.startsWith("1")||ez.delete(p);for(const p of cK.values())p.startsWith("1")||cK.delete(p);for(const p of R.keys())p.startsWith("1")||R.delete(p)}else ez.clear(),cK.clear(),R.clear()}; STd=function(R,{isOtf:w,jq:p,t0:r,Fi:f,qd:G,q4:I,Mc:C,IM:u,W7:m,disableAv1:z,Mn:B}){const W=new k3d(R);if(R.dn()||R.Y("html5_logging_format_selection"))W.L=!0;W.nB=G;W.q4=I&&R.U;W.W7=m;g.fh("windows nt 5.1")&&!g.PK&&(W.cN=!0);if(G=p)G=g.a0(R)?UR6(R):!1;G&&(W.pB=!0);C&&(W.cN=!0,W.yh=!0);w&&!R.Y("html5_otf_prefer_vp9")&&(W.cN=!0);R.playerStyle==="picasaweb"&&(w&&(W.cN=!1),W.S=!1);f&&(W.cN=!0);aT(R.K,du.CHANNELS)&&(R.Y("html5_enable_ac3")&&(W.G=!0),R.Y("html5_enable_eac3")&&(W.K=!0),R.Y("html5_enable_ac3_gapless")&& (W.Jl=!0));R.Y("html5_block_8k_hfr")&&(W.Qk=!0);W.J=g.Iq(R.experiments,"html5_max_selectable_quality_ordinal");W.D=g.Iq(R.experiments,"html5_min_selectable_quality_ordinal");$X&&(W.Mr=480);if(r||p)W.S=!1;W.q0=!1;W.disableAv1=z;w=Xa(R,W.C,void 0,W.disableAv1);w>0&&w<2160&&(H1()||R.Y("html5_format_hybridization"))&&(W.C.supportsChangeType=+H1(),W.DI=w);w>=2160&&(W.M0=!0);W.IM=u;W.YY=g.gx||q0()&&!u?!1:!0;W.U=R.Y("html5_format_hybridization");W.eI=R.Y("html5_disable_encrypted_vp9_live_non_2k_4k");W.SI= B;return W}; Xa=function(R,w={},p,r=!1){if(r)return w.disabled=1,0;if(aT(R.K,du.AV1_CODECS)&&aT(R.K,du.HEIGHT)&&aT(R.K,du.BITRATE))return w.isCapabilityUsable=1,8192;r=1080;var f=navigator.hardwareConcurrency;f<=2&&(r=480);w.coreCount=f;if(f=g.Iq(R.experiments,"html5_default_av1_threshold"))r=w["default"]=f;if(R=R.K.pB)w.mcap=R,r=Math.max(r,R);if(p){if(R=p.videoInfos.find(G=>G.L())?.K?.powerEfficient)r=8192,w.isEfficient=1; p=p.videoInfos[0].video;f=Math.min(MC("1",p.fps),MC("1",30));w.perfCap=f;r=Math.min(r,f);p.isHdr()&&!R&&(w.hdr=1,r*=.75)}else p=MC("1",30),w.perfCap30=p,r=Math.min(r,p),p=MC("1",60),w.perfCap60=p,r=Math.min(r,p);return w.av1Threshold=r}; XCd=function(R){let w=["o","a","A"];R.W7===1&&(R.G&&(w=["mac3","MAC3"].concat(w)),R.K&&(w=["meac3","MEAC3"].concat(w)),R.f_&&(w=["i","I"].concat(w)));R.pB&&(w=["so","sa"].concat(w));!R.yh||R.Jl||R.O||R.pL||w.unshift("a");R.O&&(w=(RLd[R.O]||[R.O]).concat(w));return w}; JOI=function(R){if(R.nB)return["f"];if(g.fh("appletv5"))return"h 9h 9 8 H (h ( *".split(" ");let w=["9h","9","h","8"];R.ez&&w.push("1e");w=w.concat(["(h","(","H","*"]);R.M0&&(w.unshift("1"),w.unshift("1h"));R.cN&&w.unshift("h");R.X&&(w=(RLd[R.X]||[R.X]).concat(w));return w}; n_=function(){const R=window;let w=R.MSMediaKeys;sn()&&!w&&(w=R.WebKitMediaKeys);return w&&w.isTypeSupported?w:null}; d3=function(R){return navigator.requestMediaKeySystemAccess?g.Io&&!g.IN()?Ec("45"):g.gx||g.BE?R.XB("edge_nonprefixed_eme"):g.PK?Ec("47"):g.tx&&R.XB("html5_enable_safari_fairplay")?!1:!0:!1}; ZM=function(R){return R.G?!1:!R.keySystemAccess&&!!n_()&&R.keySystem==="com.microsoft.playready"}; YX=function(R){return R.keySystem==="com.microsoft.playready"}; Fa=function(R){return!R.keySystemAccess&&!!n_()&&R.keySystem==="com.apple.fps.1_0"}; h2=function(R){return R.keySystem==="com.youtube.fairplay"}; g.g3=function(R){return R.flavor==="fairplay"}; wXP=function(R,w,p,r){const f=Ch(),G=(p=f||p&&sn())?["com.youtube.fairplay"]:["com.widevine.alpha"];w&&G.unshift("com.youtube.widevine.l3");f&&r&&G.unshift("com.youtube.fairplay.sbdl");return p?G:R?[...G,...HK.playready]:[...HK.playready,...G]}; NC=function(R){if(!R.cS())if(R.C.length===0)R.callback(R.G);else{var w=R.C[0],p=R.O[w],r=pXd(R,p);vK&&vK.keySystem===w&&vK.kC===JSON.stringify(r)?(R.Ty("remksa",{re:!0}),rHY(R,p,vK.keySystemAccess)):(R.Ty("remksa",{re:!1,ok:vK?.keySystem??""}),vK=void 0,navigator.requestMediaKeySystemAccess(w,r).then(j3(f=>{rHY(R,p,f,r)}),j3(()=>{R.K=!R.K&&R.O[R.C[0]].flavor==="widevine"; R.K||R.C.shift();NC(R)})))}}; GQr=function(R){if(n_()&&(g.tx||Be))R.G.push(new kX("fairplay","com.apple.fps.1_0","",R.zy.experiments));else{var w=fCI(),p=g.S_(R.C,r=>{const f=R.O[r];let G=!1,I=!1;for(const C in R.L[f.flavor])w(C,r)&&(f.C[C]=!0,G=G||C.indexOf("audio/")===0,I=I||C.indexOf("video/")===0);return G&&I}); p&&R.G.push(R.O[p]);R.C=[]}R.callback(R.G)}; ICW=function(R,w){R.callback=w;R.G=[];d3(R.zy.experiments)?NC(R):GQr(R)}; pXd=function(R,w){const p={initDataTypes:["cenc","webm"],audioCapabilities:[],videoCapabilities:[]};if(R.Y("html5_enable_vp9_fairplay")&&h2(w))return p.audioCapabilities.push({contentType:'audio/mp4; codecs="mp4a.40.5"'}),p.videoCapabilities.push({contentType:'video/mp4; codecs="avc1.4d400b"'}),[p];YX(w)&&(p.initDataTypes=["keyids","cenc"]);for(const f of Object.keys(R.L[w.flavor])){var r=f.indexOf("audio/")===0;const G=r?p.audioCapabilities:p.videoCapabilities;w.flavor!=="widevine"||R.K?G.push({contentType:f}): r?G.push({contentType:f,robustness:"SW_SECURE_CRYPTO"}):(g.Io&&g.fh("windows nt")&&!R.Y("html5_drm_enable_moho")||G.push({contentType:f,robustness:"HW_SECURE_ALL"}),r=f,R.zy.K.C&&f.includes("vp09")&&(r=f+"; experimental=allowed"),G.push({contentType:r,robustness:"SW_SECURE_DECODE"}),Uq(R.zy)==="MWEB"&&(Lh()||GU())&&(R.Ty("swcrypto",{}),G.push({contentType:f,robustness:"SW_SECURE_CRYPTO"})))}return[p]}; rHY=function(R,w,p,r){if(!R.cS()){r&&(vK={keySystem:w.keySystem,keySystemAccess:p,kC:JSON.stringify(r)});w.keySystemAccess=p;if(YX(w)){var f=fq();for(var G of Object.keys(R.L[w.flavor]))w.C[G]=!!f.canPlayType(G)}else{G=w.keySystemAccess.getConfiguration();if(G.audioCapabilities)for(f of G.audioCapabilities)w.C[f.contentType]=!0;if(G.videoCapabilities)for(const I of G.videoCapabilities)w.C[I.contentType]=!0}R.G.push(w);R.useCobaltWidevine||R.Y("html5_enable_vp9_fairplay")&&w.L()?(R.C.shift(),NC(R)): R.callback(R.G)}}; fCI=function(){const R=n_();if(R){const p=R.isTypeSupported;return(r,f)=>p(f,r)}const w=fq(); return w&&(w.addKey||w.webkitAddKey)?(p,r)=>!!w.canPlayType(p,r):()=>!1}; mXr=function(R,w){switch(w.Xc){case "bool":return R.XB(w.o7);case "int":return R=CYY(R,w.o7),CW(R);case "double":return CYY(R,w.o7);case "string":return uXr(R,w.o7);case "int32_list":return sid(R,w.o7);case "int64_list":return sid(R,w.o7).map(p=>CW(p)); case "string_list":throw Error("String list flags are not supported in WPCC");default:throw Error("Unknown flag type");}}; CYY=function(R,w){R=R.flags.get(`${w}`);return Number(R)||0}; uXr=function(R,w){return(R=R.flags.get(`${w}`))?R.toString():""}; sid=function(R,w){if(R=R.flags.get(`${w}`))if(R=R.replace(/\[ *(.*?) *\]/,"$1"))return R.split(",").map(Number);return[]}; Sz=function(R,w){return(R=R.vS(w))?R.toString():""}; g.Iq=function(R,w,p=0){R=R.vS(w);JSON.stringify(R);return R===void 0?p:Number(R)}; zL6=function(R){if(R=R.vS("html5_web_po_experiment_ids"))if(R=R.replace(/\[ *(.*?) *\]/,"$1"))return R.split(",").map(Number);return[]}; BPd=function(R){if(R.L)return R.L;if(R.experimentIds.length<=1)return R.L=R.experimentIds,R.L;const w=[...R.experimentIds].map(p=>Number(p)); w.sort();for(let p=w.length-1;p>0;--p)w[p]-=w[p-1];R.L=w.map(p=>p.toString()); R.L.unshift("v1");return R.L}; dbd=function(R,w){const p=new Map;for(const r of w.keys()){const f=r.split("_")[0];R.has(f)||p.set(r,w.get(r))}return p}; Ykd=function(R,w,p){const r=w.video?.fps||0,f=`${R}_${r}`,G=!!w.audio,I={itag:w.itag,wN:R,i4:G};if(G)I.numChannels=w.audio.numChannels;else{var C=w.video;I.maxWidth=C?.width;I.maxHeight=C?.height;I.maxFramerate=r;I.maxBitrateBps=w.hf*8;I.Kt=C?.isHdr()}C=p.get(f);C?G||(w=Math.max(C.maxWidth||0,C.maxHeight||0)>Math.max(I.maxWidth||0,I.maxHeight||0)?C:I,R={itag:w.itag,wN:R,i4:G,maxWidth:Math.max(C.maxWidth||0,I.maxWidth||0),maxHeight:Math.max(C.maxHeight||0,I.maxHeight||0),maxFramerate:r,Kt:w.Kt},R.maxBitrateBps= w.maxBitrateBps,p.set(f,R)):p.set(f,I)}; vgI=function(R,w,p=1){const r=w.itag;if(r==="0")return!0;let f=w.mimeType;if(w.wN==="1e"&&!R.G)return"dav1enc";if(w.L()&&R.X)return"dav1";if(w.video&&(w.video.isHdr()||w.video.primaries==="bt2020")&&!(aT(R,du.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(r==="338"&&!(g.Io?Ec(53):g.PK&&Ec(64)))return"dopus";p=ekd(w,p);R.C&&w.G()&&(p[du.EXPERIMENTAL.name]= "allowed");for(const C of Object.keys(du)){const u=du[C];var G;if(G=p[u.name])if(G=!(u===du.EOTF&&w.mimeType.indexOf("vp09.02")>0)){G=u;var I=w;G=!(R.experiments.XB("html5_ignore_h264_framerate_cap")&&G===du.FRAMERATE&&(I.wN==="H"||I.wN==="h"))}if(G)if(aT(R,u))if(R.K){if(R.K[u.name]1080&&w.contentProtection&&(f+="; hdcp=2.2");return r==="227"?"hqcenc":r!=="585"&& r!=="588"&&r!=="583"&&r!=="586"&&r!=="584"&&r!=="587"&&r!=="591"&&r!=="592"||R.experiments.XB("html5_enable_new_hvc_enc")?Ch()&&ry()>=21&&g.fh("appletv5")&&(r==="410"||r==="845")?!0:R.isTypeSupported(f)?!0:"tpus":"newhvc"}; aT=function(R,w){w.name in R.D||(R.D[w.name]=W$D(R,w));return R.D[w.name]}; xXl=function(R){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(w=>{w.smooth&&w.powerEfficient&&(R.pB=2160)})}; Ra=function(){const R=GU()&&!Ec(29),w=g.fh("google tv")&&g.fh("chrome")&&!Ec(30);return R||w?!1:aN6()}; lC_=function(R,w,p){let r=480;for(const f of w)w=f.video.qualityOrdinal,w<=1080&&w>r&&vgI(R,f,p)===!0&&(r=w);return r}; g.wN=function(R,w=!1){return Ra()&&R.isTypeSupported('audio/mp4; codecs="mp4a.40.2"')||!w&&R.canPlayType(fq(),"application/x-mpegURL")?!0:!1}; qAd=function(R){L$b(()=>{for(const w of Object.keys(du))aT(R,du[w])})}; W$D=function(R,w){if(R.K)return!!R.K[w.name];if(w===du.BITRATE&&R.isTypeSupported('video/webm; codecs="vp9"; width=3840; height=2160; bitrate=2000000')&&!R.isTypeSupported('video/webm; codecs="vp9"; width=3840; height=2160; bitrate=20000000'))return!1;if(w===du.AV1_CODECS)return R.isTypeSupported(`video/mp4; codecs=${w.valid}`)&&!R.isTypeSupported(`video/mp4; codecs=${w.l8}`);let p;w.video?(p='video/webm; codecs="vp9"',R.isTypeSupported(p)||(p='video/mp4; codecs="avc1.4d401e"')):(p='audio/webm; codecs="opus"', R.isTypeSupported(p)||(p='audio/mp4; codecs="mp4a.40.2"'));return R.isTypeSupported(`${p}; ${w.name}=${w.valid}`)&&!R.isTypeSupported(`${p}; ${w.name}=${w.l8}`)}; AHd=function(R,w){let p=0;R.O.has(w)&&(p=R.O.get(w).zT);R.O.set(w,{zT:p+1,Ms:2**(p+1)});R.L=!0}; yHd=function(R,w,p,r,f){if(w&&typeof w==="object"){const G=I=>bmW(R,I,p,r,f); if(Lv(w))return w.then(G);if(Do(w))return PQ(w,G)}return bmW(R,w,p,r,f)}; ord=function(R,w,p,r=1){p>=0&&(w in R.L||(R.L[w]=new VWH),R.L[w].A3(p,r))}; bmW=function(R,w,p,r,f){const G=(0,g.T)();f=f?f(w):void 0;const I=f?.oB??1;I!==0&&ord(R,f?.profile??p,G-r,I);return w}; tWI=function(R){const w=window;w.ywc||(w.ywc={});var p=w.ywc[R];if(p)return p;p={};return w.ywc[R]=p}; Omb=function(R){const w=window;w.ywc&&delete w.ywc[R]}; K$D=function(R){const w=tWI(R);if(w.binP)return w.binP;w.binP=Promise.resolve().then(()=>fetch(R)).then(p=>{if(!p.ok)throw Error(`HTTP${p.statusText}`); return p.arrayBuffer()}); w.binP.then(p=>{w.bin=p},()=>{Omb(R)}); return w.binP}; eLW=function(R,w,p){return Xm(void 0,function(){return function*(){const r=pb.MX(),f=R&&rN;if(!f&&!w)return p?.("wasmns",{p:R?"1":"0",a:w?"1":"0",s:rN?"1":"0"}),Mz(Error("wasm.wm.ns"));const G=new ErY;if(f)try{const I=yield*nl(DXb(G,R)),C=new fb(I,G,!1,!0);pb.ub("winit",r);p?.("wasmsw",{});return C}catch(I){if(p?.("wasmerrw",{e:`${I}`}),!w)throw Error(`wasm.wm.iw: ${I}`);}if(!w)throw Error("wasm.wm.xx");try{const I=yield*nl(w(G)),C=new fb({exports:I},G,!0,!0);pb.ub("winitjs",r);p?.("wasmsa",{});return C}catch(I){throw p?.("wasmerra", {e:`${I}`}),Error(`wasm.wm.ia: ${I}`);}}()})}; DXb=function(R,w){return Xm(MWI,function(){const p=this;return function*(){if(!p.L)throw"wasm.ps.ns";const r=yield*nl(cHD(p,w));if(!r)throw"wasm.ps.um";return yield*nl(WebAssembly.instantiate(r,R))}()})}; cHD=function(R,w){return Xm(R,function(){const p=this;return function*(){const r=[],f=()=>"wasm.ps.c: ["+r.map(C=>`"${C}"`).join(", ")+"]",G=tWI(w); if(G.mod)return G.mod;if(G.modP)try{return yield*nl(G.modP)}catch(C){r.unshift("pcm")}let I=G.bin;if(!I&&G.binP)try{I=yield*nl(G.binP)}catch(C){r.unshift("pfb")}if(!I)try{I=yield*nl(K$D(w))}catch(C){throw p.L=!1,r.unshift(`fb: ${C}`),f();}try{return yield*nl(WebAssembly.compile(I))}catch(C){Omb(w),r.unshift(`ca: ${C}`)}throw f();}()})}; PY_=function(R,w,p,r){p=R.L.cJ(p);var f=R.C;f.L.exports.AES128CTRCipher_setCounter(f.cipher,p.byteOffset);w=R.L.cJ(w);R.C.encrypt(w);f=void 0;if(r){r=R.L;f=R.O;const G=new Uint8Array(r.exports.memory.buffer,r.malloc(32),32);r.exports.Sha256Hmac(f.byteOffset,f.byteLength,p.byteOffset,p.byteLength,w.byteOffset,w.byteLength,G.byteOffset);f=R.L.Ur(G)}R.L.free(p.byteOffset);return{vL:R.L.Ur(w),signature:f}}; aCD=function(R){R.G||(R.G=new GI(R.C));return R.G}; Ia=function(R){try{return X0(R)}catch(w){return null}}; $XL=function(R){var w=zQd();if(w.values){w=w.values;const I={};for(var p of Object.keys(R.values)){w[p]&&R.C[p]&&(R.values[p]+=w[p]-R.C[p]);var r=R,f=r;if(!f.values[p]){var G=zQd();f.values=G.values||{};f.Ar=G.halfLives||{};f.C=G.values?Object.assign({},G.values):{}}I[p]=r.values[p]&&r.Ar[p]?r.values[p]/2**(r.L/r.Ar[p]):0}R.C=I}p=R.Ar;w={};w.values=R.C;w.halfLives=p;g.Qp("yt-player-memory",w,2592E3)}; GE=function(R){return/web/i.test(Uq(R))}; g.Cb=function(R){return Uq(R)==="WEB_UNPLUGGED"}; g.dQ=function(R){return Uq(R)==="WEB_REMIX"}; g.u8=function(R){return R.Y("html5_local_playsinline")?Be&&!g.ew(602)&&!("playsInline"in fq()):Be&&!R.K2||g.fh("nintendo wiiu")?!0:!1}; g.zI=function(R){return R.G&&g.sg(R)&&!mf(R)&&!R.J}; XXW=function(R){return Uq(R)==="TVHTML5_SIMPLY_EMBEDDED_PLAYER"}; mf=function(R){return R.xY==="adunit"||R.playerStyle==="gvn"}; Ba=function(R){return R.xY==="detailpage"}; g.sg=function(R){return R.xY==="embedded"}; g.Wa=function(R){return R.xY==="profilepage"}; g.xW=function(R){if(!R.webPlayerContextConfig?.embedsHostFlags?.enableLiteUx||R.Mr||R.J||R.O||R.I0==="EMBEDDED_PLAYER_MODE_PFP")return"EMBEDDED_PLAYER_LITE_MODE_NONE";R=g.Iq(R.experiments,"embeds_web_lite_mode");return R===void 0?"EMBEDDED_PLAYER_LITE_MODE_UNKNOWN":R>=0&&R0&&R.Ky&&(r.sort(),g.AO(new g.Id("Player client parameters changed after startup",r)));R.userAge=Vp(R.userAge,w.user_age);R.sZ=oN(R.sZ,w.user_display_email);R.userDisplayImage=oN(R.userDisplayImage,w.user_display_image);g.L2(R.userDisplayImage)||(R.userDisplayImage="");R.userDisplayName=oN(R.userDisplayName, w.user_display_name);R.kF=oN(R.kF,w.user_gender);R.csiPageType=oN(R.csiPageType,w.csi_page_type);R.csiServiceName=oN(R.csiServiceName,w.csi_service_name);R.YU=bB(R.YU,w.enablecsi);R.pageId=oN(R.pageId,w.pageid);if(p=w.enabled_engage_types)R.enabledEngageTypes=new Set(p.split(","));w.living_room_session_po_token&&(R.wg=w.living_room_session_po_token.toString())}; Lb=function(R){return Uq(R)==="WEB_KIDS"}; Uq=function(R){return R.L.c}; Pn=function(R,w){return!R.J&&GU()&&Ec(55)&&R.controlsType==="3"&&!w}; g.qU=function(R){R=Iv(R.ZI);return R==="www.youtube-nocookie.com"?"www.youtube.com":R}; A5=function(R,w,p){return R.protocol+"://i1.ytimg.com/vi/"+w+"/"+(p||"hqdefault.jpg")}; b8=function(R){return Ba(R)&&!g.Cb(R)}; yk=function(R){return R.xY==="leanback"}; g.I1=function(R){return/^TVHTML5/.test(Uq(R))}; Vk=function(R){return Uq(R)==="TVHTML5"}; ZmW=function(R){return R.L.cmodel==="CHROMECAST ULTRA/STEAK"||R.L.cmodel==="CHROMECAST/STEAK"}; g.oa=function(){return window.devicePixelRatio>1?window.devicePixelRatio:1}; g.t5=function(R){return Uq(R).toUpperCase()==="WEB"}; Og=function(R){return Uq(R)==="TVHTML5_UNPLUGGED"}; g.f2=function(R){return g.Cb(R)||Uq(R)==="TV_UNPLUGGED_CAST"||Og(R)}; g.Kb=function(R){return Uq(R)==="WEB_MUSIC_INTEGRATIONS"}; g.Eg=function(R){return Uq(R)==="WEB_EMBEDDED_PLAYER"}; YAL=function(R,w=!1,p=!0){return!g.t5(R)||!w||!p}; g.a0=function(R){return(R.deviceIsAudioOnly||!g.Io||hx||R.controlsType==="3"?!1:g.lB?R.G&&g.ew(51):!0)||(R.deviceIsAudioOnly||!g.PK||hx||R.controlsType==="3"?!1:g.lB?R.G&&g.ew(48):g.ew(38))||(R.deviceIsAudioOnly||!g.DE||hx||R.controlsType==="3"?!1:g.lB?R.G&&g.ew(37):g.ew(27))||!R.deviceIsAudioOnly&&g.ef&&!MDD()&&g.ew(11)||!R.deviceIsAudioOnly&&g.tx&&g.ew("604.4")}; UR6=function(R){if(g.sg(R)&&MU)return!1;if(g.PK){if(!g.ew(47)||!g.ew(52)&&g.ew(51))return!1}else if(g.tx)return!1;return window.AudioContext||window.webkitAudioContext?!0:!1}; ji_=function(R,w){return R.enabledEngageTypes.has(w.toString())||F$H.includes(w)}; ca=function(R){if(!R.userDisplayImage)return"";const w=R.userDisplayImage.split("/");if(w.length===5)return R=w[w.length-1].split("="),R[1]="s20-c",w[w.length-1]=R.join("="),w.join("/");if(w.length===8)return w.splice(7,0,"s20-c"),w.join("/");if(w.length===9)return w[7]+="-s20-c",w.join("/");g.AO(new g.Id("Profile image not a FIFE URL.",R.userDisplayImage));return R.userDisplayImage}; g.Pa=function(R){let w=g.qU(R);JHd.includes(w)&&(w="www.youtube.com");return R.protocol+"://"+w}; g.$W=function(R,w=""){if(R.C2){const p=new aa;let r;const f=R.C2();f.signedOut?r="":f.token?r=f.token:f.pendingResult.then(G=>{f.signedOut?p.resolve(""):p.resolve(G.token)},G=>{g.AO(new g.Id("b189348328_oauth_callback_failed",{error:G})); p.resolve(w)}); return r!==void 0?gD(r):new Qj(p)}return gD(w)}; X7=function(R,w=""){return R.iD?e3(!0):$3(PQ(e3(g.$W(R,w)),p=>e3(!!p)),()=>e3(!1))}; TP_=function(R,w){R.q0=w;R.cB?.L?.J(w);w.L?R.PH.push("asmjs"):R.PH.push("wasm")}; Iv=function(R){const w=g.sH(R);return(R=Number(g.Cp(R)[4]||null)||null)?`${w}:${R}`:w}; nb=function(R,w=!1){const p=uI[R];let r=imd[p];const f=Qib[R];if(!f||!r)return null;w=new c1(w?f.height:f.width,w?f.width:f.height,f.fps);r=C_(r,w,p);return new P1(R,r,{video:w,hf:f.bitrate/8})}; grl=function(R){const w=imd[uI[R]],p=hL6[R];return p&&w?new P1(R,w,{audio:new MF(p.audioSampleRate,p.numChannels)}):null}; cn=function(R,w,p,r){if(p)return hk();p={};const f=fq();for(const G of w)if(R.canPlayType(f,G.getInfo().mimeType)||r)if(w=G.L.video.quality,!p[w]||p[w].getInfo().G3())p[w]=G;R=[];p.auto&&R.push(p.auto);for(const G of oo)(r=p[G])&&R.push(r);return R.length?gD(R):hk()}; vrd=function(R,w=!1,p=!0,r={}){const f={};for(const I of R){if(w&&MediaSource&&MediaSource.isTypeSupported&&(R=I.type,I.audio_channels&&(R=R+"; channels="+I.audio_channels),!MediaSource.isTypeSupported(R))){r[I.itag]="tpus";continue}if(!p&&I.drm_families&&(I.eotf==="smpte2084"||I.eotf==="arib-std-b67")){r[I.itag]="enchdr";continue}R=void 0;const C={bt709:"SDR",bt2020:"SDR",smpte2084:"PQ","arib-std-b67":"HLG"};var G=I.type.match(/codecs="([^"]*)"/);G=G?G[1]:"";I.audio_track_id&&(R=new g.zn(I.name, I.audio_track_id,!!I.is_default));const u=I.eotf;R=new Hmd({itag:I.itag,url:I.url,codecs:G,width:Number(I.width),height:Number(I.height),fps:Number(I.fps),bitrate:Number(I.bitrate),audioItag:I.audio_itag,Hf:u?C[u]:void 0,contentProtection:I.drm_families,DT:R,audioChannels:Number(I.audio_channels)});f[R.itag]=f[R.itag]||[];f[R.itag].push(R)}return f}; NPb=function(R,w){R.O.some(p=>p.DT?.getId()===w); R.L=w}; kQI=function(R){const w=[],p=[];for(const r of R.C)r.bitrate<=R.G?w.push(r):p.push(r);w.sort((r,f)=>f.bitrate-r.bitrate); p.sort((r,f)=>r.bitrate-f.bitrate); R.C=w.concat(p)}; dN=function(R,w,p){R.cpn&&(w=g.bu(w,{cpn:R.cpn}));p&&(w=g.bu(w,{paired:p}));return w}; UX6=function(R,w){R=R.itag.toString();w!==null&&(R+=w.itag.toString());return R}; SAL=function(R,w){if(!(hx||sn()||Ch()))return null;R=vrd(w,R.Y("html5_filter_fmp4_in_hls"));if(!R)return null;w=[];const p={};for(const r of Object.keys(R))for(const f of R[r])if(f.DT){const G=f.DT.getId();if(!p[G]){const I=new g.ZE(G,f.DT);p[G]=I;w.push(I)}}return w.length>0?w:null}; fjW=function(R,w,p,r,f,G,I){if(!(hx||sn()||Ch()))return hk();const C={},u=R$l(p),m=vrd(p,R.Y("html5_filter_fmp4_in_hls"),R.K.J,C);if(!m)return I({noplst:1}),hk();wzd(m);const z={fairplay:"https://youtube.com/api/drm/fps?ek=uninitialized"};let B;p=[];const W=[],x=[];var q=null;let O="";r=r&&r.match(/hls_timedtext_playlist/)?new Hmd({itag:"0",url:r,codecs:"vtt",width:0,height:0,fps:0,bitrate:0,DT:new g.zn("English","en",!1)}):null;for(const X of Object.keys(m))if(!R.Y("html5_disable_drm_hfr_1080")|| X!=="383"&&X!=="373")for(const Z of m[X])if(Z.width){for(const FW of Z.C)if(m[FW]){Z.L=FW;break}Z.L||(Z.L=pzW(m,Z));const Gr=m[Z.L];if(!Gr)continue;p.push(Z);Z.contentProtection==="fairplay"&&(B=z);let Il="";Z.Hf==="PQ"?Il="smpte2084":Z.Hf==="HLG"&&(Il="arib-std-b67");Il&&(O=Il);x.push(rBd(Gr,[Z],r,G,Z.itag,Z.width,Z.height,Z.fps,u,void 0,void 0,B,Il));if(!q||Z.width*Z.height*Z.fps>q.width*q.height*q.fps)q=Z}else W.push(Z);else C[X]="disdrmhfr";x.reduce((X,Z)=>Z.getInfo().isEncrypted()&&X,!0)&&(B= z); f=Math.max(f,0);const {fps:e=0,width:P=0,height:c=0}=q||{};q=R.Y("html5_native_audio_track_switching");x.push(rBd(W,p,r,G,"93",P,c,e,u,"auto",f,B,O,q));Object.entries(C).length&&I(C);return cn(R.K,x,Pn(R,w),!1)}; rBd=function(R,w,p,r,f,G,I,C,u,m,z,B,W,x){let q=0,O="";for(const e of R)O||(O=e.itag),e.audioChannels&&e.audioChannels>q&&(q=e.audioChannels,O=e.itag);f=new P1(f,"application/x-mpegURL",{audio:new MF(0,q),video:new c1(G,I,C,null,void 0,m,void 0,void 0,W),contentProtection:B,rQ:O});R=new G7_(R,w,p?[p]:[],r,!!x);R.G=z?z:1369843;return new IjY(f,R,u)}; R$l=function(R){for(const w of R)if(w.url&&(R=w.url.split("expire/"),!(R.length<=1)))return+R[1].split("/")[0];return NaN}; pzW=function(R,w){for(const p of Object.keys(R)){const r=R[p][0];if(!r.width&&r.contentProtection===w.contentProtection&&!r.audioChannels)return p}return""}; wzd=function(R){const w=new Set;for(var p of Object.values(R))if(p.length){var r=p[0];r.height&&r.codecs.startsWith("vp09")&&w.add(r.height)}p=[];if(w.size)for(const f of Object.keys(R))R[f].length&&(r=R[f][0],r.height&&w.has(r.height)&&!r.codecs.startsWith("vp09")&&p.push(f));for(const f of p)delete R[f]}; uel=function(R,w,p){const r=[];for(const f of p){if(!f||!f.url)continue;p=ao(f.type,"medium","0");r.push(new C6_(p,f.url))}return cn(R.K,r,Pn(R,w),!1)}; s3d=function(R,w){const p=[],r=ao(w.type,"auto",w.itag);p.push(new C6_(r,w.url));return cn(R.K,p,!1,!0)}; z$d=function(R){return R&&mHL[R]?mHL[R]:null}; BXd=function(R){switch(R){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 R;default:return"sabr.config"}}; xHP=function(R,w){if(w=w?.watchEndpointSupportedOnesieConfig?.html5PlaybackOnesieConfig)R.Kq=new WyD(w)}; ABr=function(R,w,p,r){R||(R=w&&ljW.hasOwnProperty(w)&&LyY.hasOwnProperty(w)?LyY[w]+"_"+ljW[w]:void 0);w=R;if(!w)return null;R=w.match(qa_);if(!R||R.length!==5)return null;{const G=w.match(qa_);if(G){R=Number(G[3]);var f=[7,8,10,5,6];R=!(Number(G[1])===1&&R===8)&&f.indexOf(R)>=0}else R=!1}return p||r||R?w:null}; YW=function(R,w){const p={};for(const f of Object.keys(bHY)){var r=w?w+f:f;r=R[r+"_webp"]||R[r];g.L2(r)&&(p[bHY[f]]=r)}return p}; F7=function(R){const w={};if(!R||!R.thumbnails)return w;R=R.thumbnails.filter(f=>!!f.url); R.sort((f,G)=>f.width-G.width||f.height-G.height); for(var p of Object.keys(yBD)){var r=Number(p);const f=yBD[r];for(const G of R)if(G.width>=r){r=Vy_(G.url);g.L2(r)&&(w[f]=r);break}}(p=R.pop())&&p.width>=1280&&(p=Vy_(p.url),g.L2(p)&&(w["maxresdefault.jpg"]=p));return w}; Vy_=function(R){return R.startsWith("//")?"https:"+R:R}; jf=function(R){return R&&R.baseUrl||""}; J5=function(R){R=g.Ak(R);for(const w of Object.keys(R)){const p=R[w];R[w]=Array.isArray(p)?p[0]:p}return R}; tyb=function(R,w){for(var p of w)if(w=p.playerAnnotationsUrlsRenderer){w.adsOnly&&(R.SD=!0);if(p=w.loadPolicy)R.annotationsLoadPolicy=oVb[p];if(p=w.invideoUrl)R.jB=q7(p);R.Qw=!0;break}}; OHI=function(R,w){R.botguardData=w.playerAttestationRenderer.botguardData;w=w.playerAttestationRenderer.challenge;w!=null&&(R.Ek=w)}; EVr=function(R,w){R.captionTracks=[];if(w.captionTracks)for(var p of w.captionTracks){var r=Kyd(p.baseUrl);if(!r)return;r={is_translateable:!!p.isTranslatable,languageCode:p.languageCode,languageName:p.name&&g.Su(p.name),url:r,vss_id:p.vssId,kind:p.kind};r.name=p.trackName;r.displayName=p.name&&g.Su(p.name);R.captionTracks.push(new g.TI(r))}R.IN=w.audioTracks||[];R.Bz=w.defaultAudioTrackIndex||0;R.Mh=[];if(w.translationLanguages)for(const f of w.translationLanguages){p={};p.languageCode=f.languageCode; p.languageName=g.Su(f.languageName);if(f.translationSourceTrackIndices){p.translationSourceTrackIndices=[];for(const G of f.translationSourceTrackIndices)p.translationSourceTrackIndices.push(G)}if(f.excludeAudioTrackIndices){p.excludeAudioTrackIndices=[];for(const G of f.excludeAudioTrackIndices)p.excludeAudioTrackIndices.push(G)}R.Mh.push(p)}R.K6=[];if(w.defaultTranslationSourceTrackIndices)for(const f of w.defaultTranslationSourceTrackIndices)R.K6.push(f);R.jh=!!w.contribute&&!!w.contribute.captionsMetadataRenderer}; DHd=function(R,w,p){var r=w.errorScreen;if(!(r&&(r.playerLegacyDesktopYpcOfferRenderer||r.playerLegacyDesktopYpcTrailerRenderer||r.ypcTrailerRenderer)||p&&p.isUpcoming||["OK","LIVE_STREAM_OFFLINE","FULLSCREEN_ONLY"].includes(w.status))){R.errorCode=z$d(w.errorCode)||"auth";if(p=r&&r.playerErrorMessageRenderer){R.playerErrorMessageRenderer=p;const f=p.reason;f&&(R.errorReason=g.Su(f));if(p=p.subreason)R.S_=g.Su(p),R.T8=p}else R.errorReason=w.reason||null;p=w.status;p==="LOGIN_REQUIRED"?R.errorDetail= "1":p==="CONTENT_CHECK_REQUIRED"?R.errorDetail="2":p==="AGE_CHECK_REQUIRED"?(w=(w=w.errorScreen)&&w.playerKavRenderer,R.errorDetail=w&&w.kavUrl?"4":"3"):(r=r?.playerErrorMessageRenderer?.proceedButton?.buttonRenderer?.command,R.errorDetail=w.isBlockedInRestrictedMode?"5":g.F(r,g.i8)?.signal==="RELOAD_PAGE"?"7":"0")}}; e$H=function(R,w){R.qo=!0;const p=w.heartbeatToken;p&&(R.drmSessionId=w.drmSessionId||"",R.heartbeatToken=p,R.uM=Number(w.intervalMilliseconds),R.eP=Number(w.maxRetries),R.Xs=!!w.softFailOnError,R.hk=!!w.useInnertubeHeartbeatsForDrm);R.heartbeatServerData=w.heartbeatServerData;R.KD=!!w.heartbeatAttestationConfig?.requiresAttestation}; P6d=function(R,w){for(const p of w){w=p.interstitials.map(r=>{const f=g.F(r,MyH);if(f)return{is_yto_interstitial:!0,raw_player_response:f};if(r=g.F(r,cBx))return Object.assign({is_yto_interstitial:!0},lF(r))}); for(const r of w)switch(p.podConfig.playbackPlacement){case "INTERSTITIAL_PLAYBACK_PLACEMENT_PRE":R.interstitials=R.interstitials.concat({time:0,playerVars:r,HN:5});break;case "INTERSTITIAL_PLAYBACK_PLACEMENT_POST":R.interstitials=R.interstitials.concat({time:0x7ffffffffffff,playerVars:r,HN:6});break;case "INTERSTITIAL_PLAYBACK_PLACEMENT_INSERT_AT_VIDEO_TIME":w=Number(p.podConfig.timeToInsertAtMillis),R.interstitials=R.interstitials.concat({time:w,playerVars:r,HN:w===0?5:7})}}}; ajP=function(R,w){if(w=w.find(p=>!(!p||!p.tooltipRenderer)))R.tooltipRenderer=w.tooltipRenderer}; $Hd=function(R,w){w.subscribeCommand&&(R.subscribeCommand=w.subscribeCommand);w.unsubscribeCommand&&(R.unsubscribeCommand=w.unsubscribeCommand);w.addToWatchLaterCommand&&(R.addToWatchLaterCommand=w.addToWatchLaterCommand);w.removeFromWatchLaterCommand&&(R.removeFromWatchLaterCommand=w.removeFromWatchLaterCommand);w.getSharePanelCommand&&(R.getSharePanelCommand=w.getSharePanelCommand)}; XzW=function(R,w){w!=null?(R.Kl=w,R.h$=!0):(R.Kl="",R.h$=!1)}; ZHr=function(R,w){if(w=w.playerControlsOverlayRenderer)XzW(R,w.controlBgHtml),w.mutedAutoplay?(w=g.F(w.mutedAutoplay,nVd))&&w.endScreen&&(w=g.F(w.endScreen,dHD))&&w.text&&(R.Kk=g.Su(w.text)):R.mutedAutoplay=!1}; Ya_=function(R,w){var p=w.backgroundability;p&&p.backgroundabilityRenderer.backgroundable&&(R.backgroundable=!0);w.offlineability?.offlineabilityRenderer?.offlineable&&(R.offlineable=!0);if(p=w.contextParams)R.contextParams=p;(p=w.pictureInPicture)&&p.pictureInPictureRenderer.playableInPip&&(R.pipable=!0);w.playableInEmbed&&(R.allowEmbed=!0);if(p=w.ypcClickwrap)w=p.playerLegacyDesktopYpcClickwrapRenderer,p=p.ypcRentalActivationRenderer,w?(R.Le=w.durationMessage||"",R.sF=!0):p&&(w=p.durationMessage, R.Le=w?g.Su(w):"",R.sF=!0)}; j3d=function(R,w,p){var r=jf(w.googleRemarketingUrl);r&&(R.googleRemarketingUrl=r);if(r=jf(w.youtubeRemarketingUrl))R.youtubeRemarketingUrl=r;if(r=w.heartbeatLoggingToken)R.heartbeatLoggingToken=r;r={};var f=jf(w.ptrackingUrl);if(f){f=J5(f);var G=f.oid;G&&(R.uZ=G);if(G=f.pltype)R.WU=G;if(G=f.ptchn)R.ai=G;if(G=f.ptk)R.JX=encodeURIComponent(G);if(f=f.m)R.VF=f}if(f=jf(w.qoeUrl)){f=g.Ak(f);for(I of Object.keys(f))G=f[I],f[I]=Array.isArray(G)?G.join(","):G;var I=f;R.G7=I;if(f=I.cat)R.Y("html5_enable_qoe_cat_list")? R.lR=R.lR.concat(f.split(",")):R.PH=f;if(f=I.live)R.XQ=f;if(I=I.drm_product)R.drmProduct=I}if(I=jf(w.videostatsPlaybackUrl)){I=J5(I);if(f=I.adformat)if(p.adformat=f,G=R.V(),G=ABr(f,R.b0,G.G,G.U))R.adFormat=G;if(G=I.aqi)p.ad_query_id=G;if(p=I.autoplay)R.Ho=p=="1",R.oA=p=="1";if(p=I.autonav)R.isAutonav=p=="1";if(p=I.delay)R.GC=ls(p);if(p=I.ei)R.eventId=p;if(p=Ia(I.adcontext))try{var C=FyW(p);C&&(R.RF=C)}catch(u){g.AO(Error("Malformed adContext"))}if(p||f)R.Ho=!0;if(C=I.feature)R.oo=C;if(C=I.list)R.playlistId= C;if(C=I.of)R.OA=C;if(C=I.osid)R.osid=C;if(C=I.referrer)R.referrer=C;if(C=I.sdetail)R.X8=C;if(C=I.sourceid)R.pKN=C;if(C=I.ssrt)R.OO=C=="1";if(C=I.subscribed)R.subscribed=C=="1";if(C=I.uga)R.userGenderAge=C;if(C=I.upt)R.V6=C;if(C=I.vm)R.videoMetadata=C;r.playback=I}if(C=jf(w.videostatsWatchtimeUrl)){C=J5(C);if(p=C.ald)R.qz=p;r.watchtime=C}if(C=jf(w.atrUrl))C=J5(C),r.atr=C;if(C=jf(w.engageUrl))C=J5(C),r.engage=C;R.Kc=r;w.promotedPlaybackTracking&&(r=w.promotedPlaybackTracking,r.startUrls&&(R.uS=r.startUrls), r.firstQuartileUrls&&(R.i6=r.firstQuartileUrls),r.secondQuartileUrls&&(R.PQ=r.secondQuartileUrls),r.thirdQuartileUrls&&(R.YX=r.thirdQuartileUrls),r.completeUrls&&(R.l6=r.completeUrls),r.engagedViewUrls&&(r.engagedViewUrls.length>1&&g.AO(new g.Id("There are more than one engaged_view_urls.")),R.Wl=r.engagedViewUrls[0]));R.Y("html5_send_serialized_one_time_qoe_context_data")&&w.serializedOneTimeQoeContextData&&(R.serializedOneTimeQoeContextData=w.serializedOneTimeQoeContextData)}; JBd=function(R,w,p){for(const r of w)if(r&&(w=r.playerLegacyDesktopWatchAdsRenderer)&&(w=w.playerAdParams)){w.autoplay=="1"&&(R.Ho=!0,R.oA=!0);R.Nz=w.encodedAdSafetyReason||null;w.showContentThumbnail!==void 0&&(R.cf=!!w.showContentThumbnail);p.enabled_engage_types=w.enabledEngageTypes;break}}; TXP=function(R,w){var p=w.manifestlessWindowedLiveConfig;if(p){var r=Number(p.minDvrSequence),f=Number(p.maxDvrSequence),G=Number(p.minDvrMediaTimeMs),I=Number(p.maxDvrMediaTimeMs);p=Number(p.startWalltimeMs);r&&(R.tj=r);G&&(R.Vm=G/1E3,R.Y("html5_sabr_parse_live_metadata_playback_boundaries")&&Qk(R)&&(R.VK=G/1E3));f&&(R.v0=f);I&&(R.gL=I/1E3,R.Y("html5_sabr_parse_live_metadata_playback_boundaries")&&Qk(R)&&(R.M7=I/1E3));p&&(R.SQ=p/1E3);(r||G)&&(f||I)&&(R.vF=!0,R.isLivePlayback=!0,R.allowLiveDvr=!0, R.yv=!1)}if(r=w.daiConfig){if(r.enableDai){R.b4=!0;if(f=r.enableServerStitchedDai)R.enableServerStitchedDai=f;if(f=r.enablePreroll)R.vp=f}if(r.daiType==="DAI_TYPE_SS_DISABLED"||r.debugInfo?.isDisabledUnpluggedChannel)R.N1=!0;r.daiType==="DAI_TYPE_CLIENT_STITCHED"&&(R.Kn=!0);r.allowUstreamerRequestAdconfig&&(R.nD=!0);r.sendSsdaiMissingAdBreakReasons&&(R.z9=!0)}if(r=w.audioConfig){f=r.loudnessDb;f!=null&&(R.fZ=f);f=r.trackAbsoluteLoudnessLkfs;f!=null&&(R.bj=f);f=r.loudnessTargetLkfs;f!=null&&(R.loudnessTargetLkfs= f);r.audioMuted&&(R.r7=!0);r.muteOnStart&&(R.LC=!0);if(f=r.loudnessNormalizationConfig)f.applyStatefulNormalization&&(R.applyStatefulNormalization=!0),f.preserveStatefulLoudnessTarget&&(R.preserveStatefulLoudnessTarget=!0),G=f.minimumLoudnessTargetLkfs,G!=null&&(R.minimumLoudnessTargetLkfs=G),f=f.maxStatefulTimeThresholdSec,f!=null&&(R.maxStatefulTimeThresholdSec=f);r.playAudioOnly&&(R.jE=!0)}if(f=w.playbackEndConfig)r=f.endSeconds,f=f.limitedPlaybackDurationInSeconds,R.mutedAutoplay&&(r&&(R.endSeconds= r),f&&(R.limitedPlaybackDurationInSeconds=f));if(r=w.fairPlayConfig){if(f=r.certificate)R.IG=Ia(f);f=Number(r.keyRotationPeriodMs);f>0&&(R.p7=f);r=Number(r.keyPrefetchMarginMs);r>0&&(R.bM=r)}if(r=w.playbackStartConfig){R.CD=Number(r.startSeconds);G=r.liveUtcStartSeconds;f=!!R.liveUtcStartSeconds&&R.liveUtcStartSeconds>0;G&&!f&&(R.liveUtcStartSeconds=Number(G));if(G=r.startPosition)if((I=G.utcTimeMillis)&&!f&&(R.liveUtcStartSeconds=Number(I)*.001),f=G.streamTimeMillis)R.Vx=Number(f)*.001;R.progressBarStartPosition= r.progressBarStartPosition;R.progressBarEndPosition=r.progressBarEndPosition}else if(r=w.skippableSegmentsConfig){if(f=r.introSkipDurationMs)R.KR=Number(f)/1E3;if(r=r.outroSkipDurationMs)R.p5=Number(r)/1E3}if(f=w.skippableIntroConfig)r=Number(f.startMs),f=Number(f.endMs),isNaN(r)||isNaN(f)||(R.Gn=r,R.C4=f);if(r=w.streamSelectionConfig)R.RJ=Number(r.maxBitrate);if(r=w.vrConfig)R.JK=r.partialSpherical=="1";if(r=w.webDrmConfig){r.skipWidevine&&(R.o2=!0);if(f=r.widevineServiceCert)R.N7=Ia(f);r.useCobaltWidevine&& (R.useCobaltWidevine=!0);r.startWithNoQualityConstraint&&(R.HX=!0)}if(r=w.mediaCommonConfig){if(f=r.dynamicReadaheadConfig){R.maxReadAheadMediaTimeMs=f.maxReadAheadMediaTimeMs||NaN;R.minReadAheadMediaTimeMs=f.minReadAheadMediaTimeMs||NaN;R.readAheadGrowthRateMs=f.readAheadGrowthRateMs||NaN;if(f=r?.mediaUstreamerRequestConfig?.videoPlaybackUstreamerConfig)R.A8=Ia(f);if((f=r?.sabrContextUpdates)&&f.length>0)for(var C of f)C.type&&C.value&&(f={type:C.type,scope:C.scope,value:Ia(C.value)||void 0,sendByDefault:C.sendByDefault}, R.sabrContextUpdates.set(C.type,f))}if(C=r.serverPlaybackStartConfig)R.serverPlaybackStartConfig=C;r.useServerDrivenAbr&&(R.Zk=!0);if(C=r.requestPipeliningConfig)R.requestPipeliningConfig=C}if(C=w.inlinePlaybackConfig)R.Ng=!!C.showAudioControls;if(C=w.embeddedPlayerConfig){R.embeddedPlayerConfig=C;if(f=C.embeddedPlayerMode)r=R.V(),r.I0=f,r.O=f==="EMBEDDED_PLAYER_MODE_PFL";if(C=C.permissions)R.allowImaMonetization=!!C.allowImaMonetization}if(C=w.webPlayerConfig)C.gatewayExperimentGroup&&(R.gatewayExperimentGroup= C.gatewayExperimentGroup),C.isProximaEligible&&(R.isProximaLatencyEligible=!0);w=w.playerControlsConfig;w?.isSeekable!==void 0&&(R.isSeekable=!!w.isSeekable)}; iHY=function(R,w,p){var r=w.formats;if(r){var f=[];for(var G of r)f.push(`${G.itag}/${G.width}x${G.height}`);R.mC=f.join(",");f=[];for(var I of r){r={itag:I.itag,type:I.mimeType,quality:I.quality};(G=I.url)&&(r.url=G);const {aH:W,RK:x,zS:q,s:O}=o3(9,4475,I);W&&(r.url=x,r.sp=q,r.s=O);f.push(g.A4(r))}R.IB=f.join(",")}if(I=w.hlsFormats){f={};if(p&&(p=p.audioPairingConfig)&&p.pairs)for(var C of p.pairs)p=C.videoItag,f[p]||(f[p]=[]),f[p].push(C.audioItag);C={};for(var u of I)C[u.itag]=u.bitrate;u=[];for(var m of I){p= {itag:m.itag,type:m.mimeType,url:m.url,bitrate:m.bitrate,width:m.width,height:m.height,fps:m.fps};if(I=m.audioTrack)if(r=I.displayName)p.name=r,p.audio_track_id=I.id,I.audioIsDefault&&(p.is_default="1");if(m.drmFamilies){I=[];for(var z of m.drmFamilies)I.push(BK[z]);p.drm_families=I.join(",")}(I=f[m.itag])&&I.length&&(p.audio_itag=I.join(","),(I=C[I[0]])&&(p.bitrate+=I));(I=BCL(m))&&(p.eotf=I);m.audioChannels&&(p.audio_channels=m.audioChannels);u.push(g.A4(p))}R.hlsFormats=u.join(",")}if((z=w.licenseInfos)&& z.length>0){m={};for(var B of z)z=B.drmFamily,f=B.url,z&&f&&(m[BK[z]]=f);R.contentProtection=m}if(B=w.drmParams)R.drmParams=B;if(B=w.dashManifestUrl)R.FY=g.bu(B,{cpn:R.clientPlaybackNonce});if(B=w.hlsManifestUrl)R.hlsvp=B;if(B=w.probeUrl)R.probeUrl=q7(g.bu(B,{cpn:R.clientPlaybackNonce}));if(w=w.serverAbrStreamingUrl)R.s2=new g.uh(w,!0)}; h$d=function(R,w,p){var r=w.videoId;r&&(R.videoId=r,p.video_id||(p.video_id=r));if(r=w.title)R.title=r,p.title||(p.title=r);if(r=w.lengthSeconds)R.lengthSeconds=Number(r),p.length_seconds||(p.length_seconds=r);if(r=w.keywords)R.keywords=Q3L(r);if(r=w.channelId)R.wy=r,p.ucid||(p.ucid=r);if(r=w.viewCount)R.rawViewCount=Number(r);if(r=w.author)R.author=r,p.author||(p.author=r);if(p=w.shortDescription)R.shortDescription=p;if(p=w.isCrawlable)R.isListed=p;if(p=w.musicVideoType)R.musicVideoType=p;p=w.isLive; p!=null&&(R.isLivePlayback=p);if(p||w.isUpcoming)R.isPremiere=!w.isLiveContent;if(p=w.thumbnail)R.w_=F7(p);if(p=w.isExternallyHostedPodcast)R.isExternallyHostedPodcast=p;(p=w.stationType)&&p!=="STATION_TYPE_UNKNOWN"&&(R.P_=!0);p=w.viewerLivestreamJoinPosition;p?.utcTimeMillis&&(R.pz=ls(p.utcTimeMillis));R.V().experiments.XB("enable_centered_caption_for_tvfilm_video")&&w.isTvfilmVideo!=null&&(R.isTvfilmVideo=w.isTvfilmVideo)}; vVb=function(R,w){if(w.playerLegacyDesktopYpcTrailerRenderer){var p=w.playerLegacyDesktopYpcTrailerRenderer;R.hs=p.trailerVideoId||"";var r=(r=w.playerLegacyDesktopYpcTrailerRenderer.ypcTrailer)&&r.ypcTrailerRenderer}else w.playerLegacyDesktopYpcOfferRenderer?p=w.playerLegacyDesktopYpcOfferRenderer:w.ypcTrailerRenderer&&(r=w.ypcTrailerRenderer,w=r.fullVideoMessage,R.Ce=w?g.Su(w):"",R.hs=g.F(r,gVW)?.videoDetails?.videoId||"");p&&(R.xk=p.itemTitle||"",p.itemUrl&&(R.fz=p.itemUrl),p.itemBuyUrl&&(R.hB= p.itemBuyUrl),R.Ow=p.itemThumbnail||"",R.I6=p.offerHeadline||"",R.b7=p.offerDescription||"",R.Xd=p.offerId||"",R.GN=p.offerButtonText||"",R.bJ=p.offerButtonFormattedText||null,R.Tl=p.overlayDurationMsec||NaN,R.Ce=p.fullVideoMessage||"",R.Ql=!0);r&&((p=g.F(r,gVW))?R.mT={raw_player_response:p}:(p=g.F(r,HHr),R.mT=p?lF(p):null),R.Ql=!0)}; k7d=function(R,w,p,r){w.isLiveDefaultBroadcast&&(R.isLiveDefaultBroadcast=!0);w.isUpcoming&&(R.isUpcoming=!0);if(w.isPostLiveDvr){R.yv=!0;if(r=w.latencyClass)R.latencyClass=NXW[r]||"UNKNOWN";w.isLowLatencyLiveStream&&(R.isLowLatencyLiveStream=!0)}else{let f=!1;R.Fi?(R.allowLiveDvr=Ra()?!0:We&&h5<5?!1:!0,R.isLivePlayback=!0):w.isLive?(r.livestream="1",R.allowLiveDvr=w.isLiveDvrEnabled?Ra()?!0:We&&h5<5?!1:!0:!1,R.partnerId=27,f=!0):w.isUpcoming&&(f=!0);if(w.isLive||R.Fi){w.isLowLatencyLiveStream&&(R.isLowLatencyLiveStream= !0);const G=w.latencyClass;G&&(R.latencyClass=NXW[G]||"UNKNOWN");if(w=w.liveChunkReadahead)R.liveChunkReadahead=w;if(w=p&&p.livePlayerConfig){w.hasSubfragmentedFmp4&&(R.hasSubfragmentedFmp4=!0);w.hasSubfragmentedWebm&&(R.Ux=!0);w.defraggedFromSubfragments&&(R.defraggedFromSubfragments=!0);if(p=w.liveExperimentalContentId)R.liveExperimentalContentId=Number(p);w=w.isLiveHeadPlayable;R.Y("html5_live_head_playable")&&w!=null&&(R.isLiveHeadPlayable=w)}}f&&(R.isLivePlayback=!0,r.adformat&&r.adformat.split("_")[1]!== "8"||R.XL.push("heartbeat"))}}; Ha=function(R){return new gN(R.substring(0,2),R.substring(2))}; va=function(R,w){return HX(R,"macroMarkersListEntity",w)}; UHP=function(R){const w=R.getWatchNextResponse()?.contents?.twoColumnWatchNextResults;(R=R.getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.endScreen?.watchNextEndScreenRenderer?.results)||(R=w?.endScreen?.endScreen?.results);return R}; g.kW=function(R){R=g.F(R.getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.decoratedPlayerBarRenderer,NU);return g.F(R?.playerBar,SaP)}; wS_=function(){if(Ug===void 0){try{window.localStorage.removeItem("yt-player-lv")}catch(w){}a:{try{var R=!!self.localStorage}catch{R=!1}if(R&&(R=g.Ju(`${g.fX()}::yt-player`))){Ug=new Rg_(R);break a}Ug=void 0}}return Ug}; g.Sf=function(){const R=wS_();if(!R)return{};try{const w=R.get("yt-player-lv");return JSON.parse(w||"{}")}catch(w){return{}}}; g.pSd=function(R){const w=wS_();w&&(R=JSON.stringify(R),w.set("yt-player-lv",R))}; g.Ru=function(R){return g.Sf()[R]||0}; g.ws=function(R,w){const p=g.Sf();w!==p[R]&&(w!==0?p[R]=w:delete p[R],g.pSd(p))}; g.pa=async function(R){return g.TD(r6I(),R)}; fa=async function(R,w,p,r,f,G,I,C){if(g.Ru(R)===4)return 4;const u=await g.kv();if(!u)throw g.EP("wiac");C&&I!==void 0&&(I=await fTd(C,I));const m=p.lastModified||"0";C=await g.pa(u);try{return rs++,await g.$v(C,["index","media"],{mode:"readwrite",tag:"IDB_TRANSACTION_TAG_WIAC",ZT:!0},z=>{if(G!==void 0&&I!==void 0){var B=`${R}|${w.id}|${m}|${String(G).padStart(10,"0")}`;B=z.objectStore("media").put(I,B)}else B=g.DZ.resolve(void 0);var W=GEb(R,w.Ih());const x=GEb(R,!w.Ih());var q={fmts:xE({dlt:r.downloadedEndTime.toString(), mket:r.maxKnownEndTime.toString(),avbr:r.averageByteRate.toString()}),format:p||{}};W=z.objectStore("index").put(q,W);const O=r.downloadedEndTime===-1;q=O?z.objectStore("index").get(x):g.DZ.resolve(void 0);const e={fmts:"music",format:{}};z=O&&f&&!w.Ih()?z.objectStore("index").put(e,x):g.DZ.resolve(void 0);return g.DZ.all([z,q,B,W]).then(([,P])=>{rs--;let c=g.Ru(R);if(c!==4&&O&&f||P!==void 0&&g.ITd(P.fmts))c=1,g.ws(R,c);return c})})}catch(z){rs--; C=g.Ru(R);if(C===4)return C;g.ws(R,4);throw z;}}; g.CpP=async function(R){const w=await g.kv();if(!w)throw g.EP("ri");return g.$v(await g.pa(w),["index"],{mode:"readonly",tag:"IDB_TRANSACTION_TAG_LMRI"},p=>{const r=IDBKeyRange.bound(R+"|",R+"~");return p.objectStore("index").getAll(r).then(f=>f.map(G=>G?G.format:{}))})}; s1d=async function(R,w,p,r,f){var G=await g.kv();if(!G)throw g.EP("rc");G=g.$v(await g.pa(G),["media"],{mode:"readonly",tag:"IDB_TRANSACTION_TAG_LMRM"},I=>{const C=`${R}|${w}|${p}|${String(r).padStart(10,"0")}`;return I.objectStore("media").get(C)}); return f?G.then(I=>{if(I===void 0)throw Error("No data from indexDb");return uUx(f,I)}).catch(I=>{throw new g.Id(`Error while reading chunk: ${I.name}, ${I.message}`); }):G}; g.ITd=function(R){return R?R==="music"?!0:R.includes("dlt=-1")||!R.includes("dlt="):!1}; GEb=function(R,w){return`${R}|${w?"v":"a"}`}; zgb=function(R){const w={},p={};for(const G of R){var r=G.split("|");if(!G.match(g.m7l)){p[G]="?";continue}R=Number(r.pop());if(isNaN(R)){p[G]="?";continue}var f=r.join("|");(r=w[f])?(f=r[r.length-1],R===f.end+1?f.end=R:r.push({start:R,end:R})):w[f]=[{start:R,end:R}]}for(const G of Object.keys(w))p[G]=w[G].map(I=>`${I.start}-${I.end}`).join(","); return p}; BJd=function(R,w,p){for(p=Gq(R,p);p>=0;){var r=R.levels[p];if(r.isLoaded(Iu(r,w))&&(r=g.Ca(r,w)))return r;p--}return g.Ca(R.levels[0],w)}; x7d=function(R){if(!R.L&&!R.O.isEmpty()){var w=R.O.remove();R.L=W7_(R,w)}}; lTD=function(R,w,p){p=Gq(R,p);for(let I,C;p>=0;p--)if(I=R.levels[p],C=Iu(I,w),!I.isLoaded(C)){var r=R,f=p,G=C;const u=`${f}-${G}`;r.J.has(u)||(r.J.add(u),r.O.enqueue(f,{Qr:f,Ii:G}))}x7d(R)}; W7_=function(R,w){const p=document.createElement("img");R.crossOrigin&&(p.crossOrigin=R.crossOrigin);p.src=R.levels[w.Qr].qk(w.Ii);p.onload=()=>{var r=w.Qr,f=w.Ii;R.L!==null&&(R.L.onload=null,R.L=null);r=R.levels[r];r.loaded.add(f);x7d(R);const G=r.columns*r.rows;f*=G;r=Math.min(f+G-1,r.K()-1);f=[f,r];R.publish("l",f[0],f[1])}; return p}; g.Ca=function(R,w){w>=R.J()&&R.C();const p=Iu(R,w);var r=R.columns*R.rows,f=w%r;w=f%R.columns;f=Math.floor(f/R.columns);let G;const I=R.C()+1-r*p;I=w)return R.G.set(w,r),r;R.G.set(w,p-1);return p-1}; L7Y=function(R,w,p){return(R=R.levels[w])?R.G(p):-1}; qtr=function(R,w,p){w={cpn:w};R.indexOf("/ibw/")===-1&&(w.ibw=p?String(p):"1369843");return{url:g.bu(R,w),type:"application/x-mpegURL",quality:"auto",itag:"93"}}; A6D=function(R){try{const w=(new g.uh(R,!0)).get("n");if(w){const p=R.match(/\/n\/([^/]+)/);if(p&&p[1]&&p[1]!==w)return R.replace(`/n/${p[1]}`,`/n/${w}`)}}catch(w){g.AO(w)}return R}; uX=function(R){if(R.isAd()&&(R.Qk?R.videoId!==R.zy.eI:R.videoId!=R.zy.eI))return R.zy.eI}; Kyd=function(R){if(R){if(eA6(R))return R;R=M6_(R);if(eA6(R,!0))return R}return""}; Qk=function(R){var w=R.Y("html5_enable_sabr_on_drive")&&R.zy.pB==="gd";if(R.mG)return R.Zk&&R.Ty("fds",{fds:!0},!0),!1;if(R.zy.pB!=="yt"&&!w)return R.Zk&&R.Ty("dsvn",{ns:R.zy.pB},!0),!1;if(R.cotn||!R.L||R.L.isOtf&&!R.Y("html5_enable_sabr_otf_in_client")||R.O&&!R.O.L()||R.Kn&&!R.Y("html5_enable_sabr_csdai"))return!1;if(R.Y("html5_use_sabr_requests_for_debugging"))return!0;R.Zk&&R.Ty("esfw",{usbc:R.Zk,hsu:!!R.s2},!0);if(R.Zk&&R.s2)return!0;if(R.Y("html5_remove_client_sabr_determination"))return!1;var p= !R.L.PB&&!R.ph();w=p&&s_&&R.Y("html5_enable_sabr_vod_streaming_xhr");p=p&&!s_&&R.Y("html5_enable_sabr_vod_non_streaming_xhr");const r=mF(R),f=R.Y("html5_enable_sabr_drm_vod_streaming_xhr")&&s_&&R.ph()&&!R.L.PB&&(R.drmProduct==="1"?!1:!0);(w=w||p||r||f)&&!R.s2&&R.Ty("sabr",{loc:"m"},!0);return w&&!!R.s2}; Q3L=function(R){const w={};for(const p of R)R=p.split("="),R.length===2?w[R[0]]=R[1]:w[p]=!0;return w}; B4=function(R){if(R.Y("html5_onesie")&&R.errorCode)return!1;let w=g.ra(R.XL,"ypc");R.ypcPreview&&(w=!1);return R.n$()&&!R.loading&&(g.zq(R)||g.ra(R.XL,"heartbeat")||w)}; D7x=function(R,w){var p=w.raw_embedded_player_response;if(!p){var r=w.embedded_player_response;r&&(p=JSON.parse(r))}p&&(R.o3=p);if(R.o3){R.embeddedPlayerConfig=R.o3.embeddedPlayerConfig||null;if(p=R.o3.videoFlags)p.playableInEmbed&&(R.allowEmbed=!0),p.isPrivate&&(R.isPrivate=!0),p.userDisplayName&&(w.user_display_name=p.userDisplayName),p.userDisplayImage&&(w.user_display_image=p.userDisplayImage);if((p=R.o3.embedPreview)&&p.thumbnailPreviewRenderer){p=p.thumbnailPreviewRenderer;XzW(R,p.controlBgHtml); if(r=p.defaultThumbnail)R.w_=F7(r);R.Y("embeds_web_enable_search_button")&&p.searchButton&&(r=g.F(p.searchButton,ky))&&(R.Ew=g.F(r.navigationEndpoint,g.W4));(r=g.F(p?.videoDetails,b2Y))&&y66(R,w,r);r=g.F(p?.videoDetails,Vvd);R.ez=!!p.addToWatchLaterButton;oc_(R,p.shareButton);r?.musicVideoType&&(R.musicVideoType=r.musicVideoType);if(r=g.F(R.getEmbeddedPlayerResponse()?.embedPreview?.thumbnailPreviewRenderer?.playButton?.buttonRenderer?.navigationEndpoint,g.xo))xHP(R,r),R.videoId=r.videoId||R.videoId; p.videoDurationSeconds&&(R.lengthSeconds=ls(p.videoDurationSeconds));p.webPlayerActionsPorting&&$Hd(R,p.webPlayerActionsPorting);if(p=g.F(p?.playlist,tvY)){R.xu=!0;r=[];var f=Number(p.currentIndex);if(p.contents)for(let G=0,I=p.contents.length;G=0?f.countDownSecsForFullscreen*1E3:-1)}if(f=UHP(R))f=f?.[0]?.endScreenVideoRenderer?.navigationEndpoint?.clickTrackingParams,x=R.X(),f&&x&&(x.sessionData={itct:f});R.O0.currentVideoThumbnail&&(R.w_=F7(R.O0.currentVideoThumbnail));(f=R.O0?.contents?.twoColumnWatchNextResults?.results?.results?.contents)&&f[0]&&(x=f[0].videoPrimaryInfoRenderer)&&x&&x.subtitle&&(R.XU=g.Su(x.subtitle)); f&&f[1]&&(f=f[1].videoSecondaryInfoRenderer?.owner?.videoOwnerRenderer?.thumbnail?.thumbnails)&&f.length&&(R.profilePicture=f[f.length-1].url);w=On(w);if(f=R.getWatchNextResponse()?.onResponseReceivedEndpoints)for(var q of f)g.F(q,AN)&&(R.pV=g.F(q,AN)),f=g.F(q,aTb),f?.entityKeys&&(R.C2=f.entityKeys||[],f.visibleOnLoadKeys&&(R.visibleOnLoadKeys=f.visibleOnLoadKeys));R.Y("web_key_moments_markers")&&(q=g.bX.getState().entities,f=g.Qx("visibility_override","markersVisibilityOverrideEntity"),q=HX(q,"markersVisibilityOverrideEntity", f),R.Jl=q?.videoId===(R.videoId||w)&&q?.visibilityOverrideMarkersKey?q.visibilityOverrideMarkersKey:R.visibleOnLoadKeys,R.visibleOnLoadKeys=[...R.Jl])}}; $7x=function(R,w){if(w=w.raw_reel_item_watch_response)R.reelItemWatchResponse=w}; d7H=function(R,w){R.fflags=oN(R.fflags,w.fflags);var p=w.iv_invideo_url;p&&(R.jB=q7(p));R.SD=bB(R.SD,w.iv_ads_only);if(p=w.cta_conversion_urls)R.xe=p;R.isPharma=bB(R.isPharma,w.is_pharma);R.author=oN(R.author,w.author);R.Mr=Kyd(w.ttsurl)||R.Mr;R.sZ=bB(R.sZ,w.cc_asr);R.PS=oN(R.PS,w.channel_path);if(p=w.profile_picture)R.profilePicture=oN(R.profilePicture,p);R.videoCountText=oN(R.videoCountText,w.video_count_text);R.autonavState=yp(R.autonavState,w.autonav_state,XSW);R.clientPlaybackNonce=oN(R.clientPlaybackNonce, w.cpn);R.subscribed=bB(R.subscribed,w.subscribed);R.rawViewCount=Vp(R.rawViewCount,w.view_count);R.shortViewCount=oN(R.shortViewCount,w.short_view_count_text);R.publishedTimeText=oN(R.publishedTimeText||"",w.publishedTimeText);R.lengthText=oN(R.lengthText||"",w.lengthText);R.FM=oN(R.FM||"",w.FM);R.Mj=oN(R.Mj||"",w.Mj);R.title=oN(R.title,w.title);R.subtitle=oN(R.subtitle,w.subtitle);R.expandedTitle=oN(R.expandedTitle,w.expanded_title);R.expandedSubtitle=oN(R.expandedSubtitle,w.expanded_subtitle);R.ypcPreview= oN(R.ypcPreview,w.ypc_preview);R.bb=oN(R.bb,w.ypc_origin);R.wB=bB(R.wB,w.ypc_is_premiere_trailer);R.Le=oN(R.Le,w.ypc_clickwrap_message);R.paygated=bB(R.paygated,w.paygated);R.aj=bB(R.aj,w.requires_purchase);R.showShareButton=!bB(!R.showShareButton,w.ss);R.ez=bB(R.ez,w.showwatchlater);R.Ww=bB(R.Ww,w.shownotifybutton);R.PF=bB(R.PF,w.copy_share);if(p=w.el)R.eventLabel=p;if(p=w.keywords)R.keywords=Q3L(p.split(","));if(p=w.rvs)R.suggestions=qL(p).map(r=>r.playlist||r.list||r.api?new qr(R.zy,r):new La(R.zy, r)); R.contentCheckOk=bB(R.contentCheckOk,w.cco);R.racyCheckOk=bB(R.racyCheckOk,w.rco);R.isLivingRoomDeeplink=bB(R.isLivingRoomDeeplink,w.is_living_room_deeplink);R.oauthToken=oN(R.oauthToken,w.oauth_token);R.N0=oN(R.N0,w.kpt);R.visitorData=oN(R.visitorData,w.visitor_data);if(p=w.session_data)R.sessionData=WI(p,"&");R.nN=oN(R.nN,w.endscreen_ad_tracking_data);R.zq=bB(R.zq,w.wait_for_vast_info_cards_xml);R.mx=bB(R.mx,w.suppress_creator_endscreen);R.LV=bB(R.LV,w.is_trueview_action);R.bX=oN(R.bX,w.tracking_list); ncD(R,w)}; g.V0=function(R,w,p){w&&w.cpn&&g.AO(new g.Id("CPN provided in VideoData update",{oFS:w.cpn,Rq:R.clientPlaybackNonce,bh$:p}));p?(On(w),R.setData(w),B4(R)&&R.H9()):(w=w||{},D7x(R,w),y0(R,w),$7x(R,w),d7H(R,w),R.publish("dataupdated"))}; ncD=function(R,w){w.inlineMetricEnabled&&(R.inlineMetricEnabled=!0);w.playback_progress_0s_url&&(R.Oj=new Z2I(w));if(w=w.video_masthead_ad_quartile_urls)R.Vl=w.quartile_0_url,R.E_=w.quartile_25_url,R.l7=w.quartile_50_url,R.i7=w.quartile_75_url,R.s_=w.quartile_100_url,R.uS=w.quartile_0_urls,R.i6=w.quartile_25_urls,R.PQ=w.quartile_50_urls,R.YX=w.quartile_75_urls,R.l6=w.quartile_100_urls}; g.lX=function(R,w){for(const p of w)p.cueRangeSetIdentifier&&R.f2.set(p.cueRangeSetIdentifier,p.playerCueRanges??[])}; Ytd=function(R){if(!R)return null;for(const w of R)if(R=w.adPlacementRenderer?.renderer?.videoAdTrackingRenderer)return R;return null}; F7x=function(R){const w=R.playerResponse?.playerConfig?.compositeVideoConfig?.sourceConfigs;R=R.playerResponse?.playerConfig?.compositeVideoConfig?.defaultActiveSourceVideoId;if(!w||!w.length)return"";R||(R=w[0].videoId||"");for(const p of w)if(p.videoId===R&&p.audioTracks)for(const r of p.audioTracks)if(r.isDefaultForSource)return r.id||"";return""}; j1Y=function(R,w,p){switch(w){case "EMBEDDED_PLAYER_LITE_MODE_FIXED_PLAYBACK_LIMIT":p>30?R.limitedPlaybackDurationInSeconds=30:p<30&&p>10&&(R.limitedPlaybackDurationInSeconds=10);break;case "EMBEDDED_PLAYER_LITE_MODE_DYNAMIC_PLAYBACK_LIMIT":R.limitedPlaybackDurationInSeconds=p*.2}}; J6d=function(R,w){return w!=null?bB(R.D,w):R.D?R.D:R.zy.preferGapless&&R.zy.supportsGaplessShorts()}; TJr=function(R){return!!R&&isFinite(R)&&R>1E9}; i2W=function(R){return Ch()&&ou(R)?!1:tN(R)&&(g.f2(R.zy)?!R.isLivePlayback:R.hlsvp)||!Ra()||R.f4?!0:!1}; Q1I=function(R){R=g.Ak(R);return Number(R.expire)||0}; O_=function(R){const w=R.V();return R.zy.pB==="hm"||R.zy.pB==="gd"||w.experiments.Tk().L.vS(hgd)&&R.zy.J?!0:!1}; oc_=function(R,w){R.showShareButton=!!w;if(w=g.F(w,ky)?.navigationEndpoint||g.F(w,ky)?.command)R.PF=!!g.F(w,gcd)}; y66=function(R,w,p){var r=p.channelThumbnail;r&&(r=r.thumbnails)&&(r=r[0])&&(w.profile_picture=r.url);if(r=g.F(g.F(p?.channelThumbnailEndpoint,H2d)?.urlEndpoint,g.y$))w.channel_path=r.url;if(r=p.collapsedRenderer)if(r=g.F(r,vcd)){const f=r.title;f&&(w.title=g.Su(f));if(r=r.subtitle)w.subtitle=g.Su(r)}if(p=p.expandedRenderer)if(p=g.F(p,NJY)){if(r=p.title)w.expanded_title=g.Su(r);if(r=p.subtitle)w.expanded_subtitle=g.Su(r);if(p=p.subscribeButton)R.subscribeButtonRenderer=g.F(p,g.Ka),R.subscribeButtonRenderer&& (w.ucid=R.subscribeButtonRenderer.channelId,w.subscribed=R.subscribeButtonRenderer.subscribed,R.Ww=!!R.subscribeButtonRenderer.notificationPreferenceToggleButton,R.subscribeButtonRenderer.notificationPreferenceToggleButton&&R.subscribeButtonRenderer.notificationPreferenceToggleButton.toggleButtonRenderer&&(w=R.subscribeButtonRenderer.notificationPreferenceToggleButton.toggleButtonRenderer,w.isToggled?(R.wK=w.toggledServiceEndpoint||null,R.Sm=w.defaultServiceEndpoint||null):(R.wK=w.defaultServiceEndpoint|| null,R.Sm=w.toggledServiceEndpoint||null)))}}; kEY=function(R){return!!R.Wl||!!R.Vl||!!R.uS||!!R.Oj||R.wh}; E_=function(R){return!!(R.O&&R.O.videoInfos&&R.O.videoInfos.length)}; Dr=function(R){return R.uB()&&R.V().supportsGaplessShorts()}; eG=function(R){var w=["MUSIC_VIDEO_TYPE_ATV","MUSIC_VIDEO_TYPE_PRIVATELY_OWNED_TRACK"],p=Uq(R.zy)==="TVHTML5_SIMPLY"&&R.zy.L.ctheme==="MUSIC";!R.jE&&(g.dQ(R.zy)||g.Kb(R.zy)||p)&&(w.includes(R.musicVideoType)||R.isExternallyHostedPodcast)&&(R.jE=!0);if(w=g.IN())w=/Starboard\/([0-9]+)/.exec(g.s3()),w=(w?parseInt(w[1],10):NaN)<10;p=R.zy;p=(Uq(p)==="TVHTML5_CAST"||Uq(p)==="TVHTML5"&&(p.L.cver.startsWith("6.20130725")||p.L.cver.startsWith("6.20130726")))&&R.zy.L.ctheme==="MUSIC";var r;if(r=!R.jE)p||(p= R.zy,p=Uq(p)==="TVHTML5"&&p.L.cver.startsWith("7")),r=p;r&&!w&&(w=R.musicVideoType==="MUSIC_VIDEO_TYPE_PRIVATELY_OWNED_TRACK",p=(R.Y("cast_prefer_audio_only_for_atv_and_uploads")||R.Y("kabuki_pangea_prefer_audio_only_for_atv_and_uploads"))&&R.musicVideoType==="MUSIC_VIDEO_TYPE_ATV",w||p||R.isExternallyHostedPodcast)&&(R.jE=!0);return R.zy.deviceIsAudioOnly||R.jE&&R.zy.U}; Mr=function(R){return R.zy.Y("html5_disable_av1")?!0:!1}; c4=function(R){return R.playerResponse?.playerConfig?.compositeVideoConfig?.compositeBroadcastType==="COMPOSITE_BROADCAST_TYPE_COMPRESSED_DOMAIN_COMPOSITE"}; g.P4=function(R){var w=R.D;R.Y("html5_gapless_unlimit_format_selection")&&Dr(R)&&(w=!1);const p=!!R.L&&R.L.PB;w=STd(R.zy,{jq:R.jq(),t0:p,qd:eG(R),q4:R.q4,Mc:w,isOtf:R.isOtf(),IM:R.IM(),Fi:R.Fi,W7:R.getUserAudio51Preference(),disableAv1:Mr(R),Mn:c4(R)});Qk(R)&&(w.cB=!0);Ch()&&R.playerResponse&&R.playerResponse.playerConfig&&R.playerResponse.playerConfig.webPlayerConfig&&R.playerResponse.playerConfig.webPlayerConfig.useCobaltTvosDogfoodFeatures&&(w.G=!0,w.K=!0);R.D&&R.isAd()&&(R.FL&&(w.X=R.FL),R.YU&& (w.O=R.YU));R.uB()&&(w.I0=g.Iq(R.zy.experiments,"html5_hard_cap_max_vertical_resolution_for_shorts"));w.PS=R.isLivePlayback&&R.ph()&&R.zy.Y("html5_drm_live_audio_51");w.xY=R.GJ;R.Y("html5_disable_vp9_hdr_fairplay")&&Ch()&&(w.xY=!0);w.mq=!Qk(R);w.O0=!Qk(R)&&R.zy.experiments.Tk().L.vS(U7d);return R.q0=w}; R8l=function(R){u$("drm_pb_s",void 0,R.pB);R.IG||R.L&&R.L.K();var w={};R.L&&(w=Ptd(R.kF,g.P4(R),R.zy.K,R.L,p=>R.publish("ctmp","fmtflt",p),!0,new Set)); w=new StP(w,R.zy,R.o2,R.useCobaltWidevine?Ch()?ou(R):!1:!1,(p,r)=>{R.Ty(p,r)}); g.K(R,w);R.zv=!1;R.loading=!0;ICW(w,p=>{u$("drm_pb_f",void 0,R.pB);for(var r of p)switch(r.flavor){case "fairplay":r.IG=R.IG;r.p7=R.p7;r.bM=R.bM;break;case "widevine":r.N7=R.N7}R.gS=p;if(R.gS.length>0&&(R.K=R.gS[0],R.zy.dn())){p={};for(const [f,G]of Object.entries(R.K.C)){r=G;let I="unk";const C=f.match(/(.*)codecs="(.*)"/);C&&(I=C[2]);p[I]=r}R.Ty("drmProbe",p)}R.H9()})}; w1d=function(R){var w;if(w=!!R.cotn)w=R.videoId,w=!!w&&g.Ru(w)===1;return w&&!R.Sk}; fKx=function(R){var w=R.playerResponse?.streamingData?.adaptiveFormats||[],p=null;if(w.length>0)p=p1x(R,w);else if(!R.Y("html5_deprecate_adaptive_formats_string")){R.Ty("pafmtstr",{s:R.adaptiveFormats.substring(0,50)});if((w=R.adaptiveFormats)&&!tN(R)){R.zy.K.C&&(DM=!0);w=au(w);p=R.contentProtection;var r=R.lengthSeconds,f=R.isLivePlayback,G=R.yv,I=R.zy,C=to6(w);if(f||G){r=I?.experiments;f=new g.w3("",r,!0);f.PB=!0;f.isManifestless=!0;f.C=!G;f.isLive=!G;f.yv=G;for(m of w){I=WK(m,p);C=r3(m.url,m.sp, m.s);var u=C.get("id");u&&u.includes("%7E")&&(f.S=!0);u=r?.XB("html5_max_known_end_time_rebase");const z=Number(m.target_duration_sec)||5,B=Number(m.max_dvr_duration_sec)||14400,W=Number(C.get("mindsq")||C.get("min_sq")||"0"),x=Number(C.get("maxdsq")||C.get("max_sq")||"0")||Infinity;f.tj=f.tj||W;f.v0=f.v0||x;const q=!Ew(I.mimeType);C&&f_(f,new rCd(C,I,{N4:z,Cl:q,y8:B,tj:W,v0:x,nt:300,yv:G,mf:u}))}var m=f}else m=C==="FORMAT_STREAM_TYPE_OTF"?OVH(w,p,r,I?.experiments):KpY(w,p,r,I);w.length>0&&(w=w[0], O_(R)&&w.url&&(R.Nl=R.Nl||Q1I(w.url)));w=R.isLivePlayback&&!R.yv&&!R.vF&&!R.isPremiere;R.Y("html5_live_head_playable")&&(!$o(R)&&w&&R.Ty("missingLiveHeadPlayable",{}),R.zy.pB==="yt"&&(m.PS=!0));p=m}else p=null;R.Ty("pafmts",{isManifestFilled:!!p})}if(!p)return!1;XE(R,p);return!0}; na=function(R){return!(!R.L||!R.L.isManifestless)}; $o=function(R){return R.Y("html5_live_head_playable")&&na(R)&&R.zy.pB==="yt"?R.isLiveHeadPlayable:R.isLivePlayback}; p1x=function(R,w){if(w.length===0||tN(R))return null;R.zy.K.C&&(DM=!0);var p=R.contentProtection;var r=R.lengthSeconds,f=R.isLivePlayback,G=R.yv,I=R.zy,C=LpD(w);if(f||G){r=I.experiments;f=new g.w3("",r,!0);f.C=!G;f.PB=!0;f.isManifestless=!0;f.isLive=!G;f.yv=G;for(const m of w){I=p_(m,p);const {RK:z,s:B,zS:W}=o3(32,4434,m);C=r3(z||m.url||"",W,B);var u=C.get("id");u&&u.includes("%7E")&&(f.S=!0);u=r?.XB("html5_max_known_end_time_rebase");const x=Number(m.targetDurationSec||5),q=Number(m.maxDvrDurationSec|| 14400),O=Number(C.get("mindsq")||C.get("min_sq")||"0"),e=Number(C.get("maxdsq")||C.get("max_sq")||"0")||Infinity;f.tj=f.tj||O;f.v0=f.v0||e;const P=!Ew(I.mimeType);C&&f_(f,new rCd(C,I,{N4:x,Cl:P,y8:q,tj:O,v0:e,nt:300,yv:G,mf:u}))}p=f}else p=C==="FORMAT_STREAM_TYPE_OTF"?qTd(w,p,r,I.experiments):A1L(w,p,r,I);w.length>0&&(w=w[0],O_(R)&&w.url&&(R.Nl=R.Nl||Q1I(w.url)));w=R.isLivePlayback&&!R.yv&&!R.vF&&!R.isPremiere;R.Y("html5_live_head_playable")&&(!$o(R)&&w&&R.Ty("missingLiveHeadPlayable",{}),R.zy.pB=== "yt"&&(p.PS=!0));return p}; au=function(R,w){R=qL(R);const p={};if(w)for(var r of w.split(","))(w=r.match(/^([0-9]+)\/([0-9]+)x([0-9]+)(\/|$)/))&&(p[w[1]]={width:w[2],height:w[3]});for(const f of R)if(r=p[f.itag])f.width=r.width,f.height=r.height;return R}; XE=function(R,w,p=!1){R.mj=void 0;R.L=w;g.K(R,w);w.tj=R.tj;w.v0=R.v0;w.Vm=R.Vm;w.gL=R.gL;w.SQ=R.SQ;R.s2&&(w.pB=new GOr(R.s2));(R.jq()||g.ds(R))&&R.XL.push("webgl");R.L.isLive||(R.isLivePlayback=!1);const r=w.sourceUrl.split("/");if(R.Qk?r.indexOf("manifest_duration")!==-1:r.indexOf("manifest_duration")!=-1)R.wm=Number(r[r.indexOf("manifest_duration")+1]);if(w.C||w.isManifestless)w.subscribe("clienttemp",R.Ty,R),p?w.subscribe("refresh",R.Os,R):w.subscribe("cuepointsadded",R.JE,R);w.K()?R.zv=!0:vK= void 0;R.vF&&(w.O=R.vF,w.isLive=!0,R.isLivePlayback=!0);w.isPremiere=R.isPremiere;w.isLiveHeadPlayable=R.isLiveHeadPlayable}; ou=function(R){return R.Y("html5_tvos_skip_dash_audio_check")||MediaSource.isTypeSupported('audio/webm; codecs="opus"')}; tN=function(R){return Ch()?!ou(R):sn()?!(!R.IG||!R.Y("html5_enable_safari_fairplay")&&Ra()):!1}; Zr=function(R){return R.Qk?R.isLowLatencyLiveStream&&R.L!=null&&qC(R.L)>=5:R.isLowLatencyLiveStream&&R.L!=void 0&&qC(R.L)>=5}; IKb=function(R){R.loading=!0;R.Ml=!1;if(w1d(R))g.CpP(R.videoId).then(r=>{if(R.playerResponse?.streamingData){var f=[];for(const G of r)r=Object.assign({},G),r.signatureCipher="",f.push(r);f.length<2&&R.Ty("offmlf",{len:f.length});f=p1x(R,f);eG(R)&&Qwx(f,!1);XE(R,f);R.Ty("dlr",{})}else R.Ty("offsdm",{cotn:R.aO?R.aO.cotn:"0",cpn:R.clientPlaybackNonce})}).then(()=>{R.H9()}); else{xr(R.FY)||g.AO(new g.Id("DASH MPD Origin invalid: ",R.FY));var w=R.FY,p=g.Iq(R.zy.experiments,"dash_manifest_version")||4;w=g.bu(w,{mpd_version:p});R.isLowLatencyLiveStream&&R.latencyClass!=="NORMAL"||(w=g.bu(w,{pacing:0}));a6I(w,R.zy.experiments,R.isLivePlayback).then(r=>{R.cS()||(XE(R,r,!0),u$("mrc",void 0,R.pB),R.H9())},r=>{R.cS()||(R.loading=!1,R.publish("dataloaderror",new g.pq("manifest.net.retryexhausted",{backend:"manifest", rc:r.status},1)))}); u$("mrs",void 0,R.pB)}}; Yo=function(R){if(!R.isProximaLatencyEligible)return 0;const w=G0();return R.zy.getWebPlayerContextConfig()?.enableProximaLowLatency?2:w===1?1:R.Y("html5_enable_proxima")?2:0}; FE=function(R,w){return R.Y(w)?!0:(R.fflags||"").includes(w+"=true")}; CV6=function(R,w){const p=w||i2W(R)||R.isExternallyHostedPodcast;if(!R.L||p)return R.Ty("skipDash",{dm:!!R.L,air:w,dd:R.f4,mss:Ra(),"3pp":R.isExternallyHostedPodcast}),hk();eG(R)&&Qwx(R.L,R.isLivePlayback);return gD().then(()=>QvY(R.kF,g.P4(R),R.zy.K,R.L,R.K,r=>R.publish("ctmp","fmtflt",r),R.u_,jG(R)).then(r=>{R.JT(r); R.kF.C=null;/^av/.test(R.clientPlaybackNonce)&&R.q0&&R.Ty("av1",R.q0.C)}))}; sor=function(R,w){if(w&&R.hlsvp)return hk();if(R.hlsFormats){if(w=au(R.hlsFormats)){const r=[];for(var p of w)p.url&&(p.url=A6D(p.url)),R.q0?.L&&r.push(p.itag);R.q0?.L&&r.length>0&&R.Ty("hlsfmt",{itags:r.join(".")})}R.Df=SAL(R.zy,w);R.Df&&usd(R,R.Df);p=R.clientPlaybackNonce;return fjW(R.zy,R.isAd(),w,R.playerResponse?.captions?.playerCaptionsRenderer?.baseUrl??null,R.RJ,p,r=>R.publish("ctmp","hlsflt",r)).then(r=>{let f=0; const G=[];for(const I of r)G.push(I.getInfo()?.itag),I.getInfo()?.U()?.numChannels>f&&(f=I.getInfo().audio.numChannels);f>2&&R.Ty("hlschl",{mn:f});R.q0?.L&&R.Ty("hlsfmtaf",{itags:G.join(".")});if(R.Y("html5_enable_vp9_fairplay")&&R.K?.L()){R.Ty("drm",{sbdlfbk:1});for(const I of R.gS)if(h2(I)){R.K=I;break}}JN(R,r)})}return hk()}; mFd=function(R){if(R.isExternallyHostedPodcast&&R.IB){const w=au(R.IB);if(!w[0])return hk();R.Pe=w[0];return s3d(R.zy,w[0]).then(p=>{JN(R,p)})}return R.Hw&&R.CV?uel(R.zy,R.isAd(),R.Hw).then(w=>{JN(R,w)}):hk()}; BuD=function(R){if(R.isExternallyHostedPodcast)return hk();const w=au(R.IB,R.mC);if(R.hlsvp){const p=qtr(R.hlsvp,R.clientPlaybackNonce,R.RJ);w.push(p)}return ggL(R.zy,R.isAd(),w,z8b(R)).then(p=>{JN(R,p)})}; jG=function(R){const w=R.Y("html5_enable_server_format_filter")&&!R.ph(),p=R.Y("html5_enable_server_format_filter_for_drm")&&R.ph();return Qk(R)&&(w||p)}; usd=function(R,w){w.sort((p,r)=>p.toString().localeCompare(r.toString(),R.zy.hostLanguage))}; JN=function(R,w){R.SI=w;R.JT(new KJ(g.gd(R.SI,p=>p.getInfo())))}; z8b=function(R){const w={cpn:R.clientPlaybackNonce,c:R.zy.L.c,cver:R.zy.L.cver};R.JX&&(w.ptk=R.JX,w.oid=R.uZ,w.ptchn=R.ai,w.pltype=R.WU,R.VF&&(w.m=R.VF));return w}; g.Tq=function(R){return tN(R)&&R.IG?{fairplay:"https://youtube.com/api/drm/fps?ek=uninitialized"}:R.C&&R.C.contentProtection||null}; iX=function(R){return R.playerResponse&&R.playerResponse.paidContentOverlay&&R.playerResponse.paidContentOverlay.paidContentOverlayRenderer||g.F(R.O0?.playerOverlays?.playerOverlayRenderer?.playerDisclosure,WBD)||null}; xFH=function(R){const w=iX(R);return w&&w.text?g.Su(w.text):R.paidContentOverlayText}; lKd=function(R){const w=iX(R);return w&&w.durationMs?ls(w.durationMs):R.paidContentOverlayDurationMs}; Q0=function(R){let w="";if(R.XQ)return R.XQ;R.isLivePlayback&&(w=R.allowLiveDvr?"dvr":R.isPremiere?"lp":R.vF?"window":"live");R.yv&&(w="post");return w}; g.hN=function(R,w){return typeof R.keywords[w]!=="string"?null:R.keywords[w]}; g.zq=function(R){return!!(R.FY||R.IB||R.Hw||R.hlsvp||R.bq())}; K7x=function(R){return(R=R.MO)&&R.showError?R.showError:!1}; g.gs=function(R){return $o(R)&&!R.allowLiveDvr}; H4=function(R){return $o(R)&&R.allowLiveDvr}; g.v4=function(R){return!!R.L&&nJY(R.L)}; g.Nr=function(R){return!!R.L&&dRD(R.L)}; g.ds=function(R){return!!R.L&&YT_(R.L)}; g.ko=function(R){return!!R.L&&ZVY(R.L)}; g.LB_=function(R){if(R.mx)return null;let w=R.bl;w||(w=R.playerResponse&&R.playerResponse.endscreen&&R.playerResponse.endscreen.endscreenUrlRenderer&&R.playerResponse.endscreen.endscreenUrlRenderer.url);return w||null}; g.qwd=function(R){return R.mx?null:R.playerResponse&&R.playerResponse.endscreen&&R.playerResponse.endscreen.endscreenRenderer||null}; g.U_=function(R){if(!R.playerResponse||!R.playerResponse.annotations)return null;for(const w of R.playerResponse.annotations)if(w.playerAnnotationsExpandedRenderer&&w.playerAnnotationsExpandedRenderer.featuredChannel)return w.playerAnnotationsExpandedRenderer;return null}; SG=function(R){return R.adFormat&&(R.Qk?R.adFormat!=="1_5":R.adFormat!="1_5")?"adunit":R.eventLabel||R.zy.xY}; g.Rr=function(R){return SG(R)==="shortspage"}; wH=function(R){return R.Ho||SG(R)==="detailpage"||SG(R)==="shortspage"||R.mutedAutoplay}; AC_=function(R){const w=SG(R)==="adunit"?R.oA:wH(R)?SG(R)==="detailpage"||SG(R)==="shortspage"?R.isAutonav||R.U0>0:R.WB?!1:R.zy.Ww||R.zy.Hw||!g.zI(R.zy)?!0:!1:(R.WB?0:R.Af)&&g.zI(R.zy)?!0:!1;R.Y("html5_log_detailpage_autoplay")&&SG(R)==="detailpage"&&R.Ty("autoplay_info",{autoplay:R.Ho,autonav:R.isAutonav,wasDompaused:R.WB,result:w});return w}; bq_=function(R){let w=1;var p=g.Iq(R.zy.experiments,"html5_default_ad_gain");p&&R.isAd()&&(w=p);p=R.G?.audio.O!=null?R.G?.audio.O:R.fZ;isNaN(p)||(R.Jp=4);return Math.min(1,10**(-p/20))||w}; yCW=function(R){if(R.Y("html5_stateful_audio_normalization")){{let r=1;var w=g.Iq(R.zy.experiments,"html5_default_ad_gain");w&&R.isAd()&&(r=w);const f=R.G?.audio.G??R.bj;if(f==null||isNaN(f))R=bq_(R);else{w=(0,g.T)();R.Jp=1;var p=w-R.zy.hM<=R.maxStatefulTimeThresholdSec*1E3;R.applyStatefulNormalization&&p?R.Jp=2:p||(R.zy.PF=Infinity,R.zy.hM=NaN);p=(R.Jp===2?g.MN(R.zy.PF,R.minimumLoudnessTargetLkfs,R.loudnessTargetLkfs):R.loudnessTargetLkfs)-f;R.Jp!==2&&(p+=R.playerResponse?.playerConfig?.audioConfig?.loudnessNormalizationConfig?.statelessLoudnessAdjustmentGain|| 0);p=Math.min(p,0);R.preserveStatefulLoudnessTarget&&(R.zy.PF=f+p,R.zy.hM=w);R=Math.min(1,10**(p/20))||r}}}else R=bq_(R);return R}; g.Vir=function(R){return R.PB()&&Qk(R)}; pg=function(R){return!!R.playerResponse?.playerConfig?.mediaCommonConfig?.splitScreenEligible}; oiH=function(R){return isNaN(R)?0:Math.max((Date.now()-R)/1E3-30,0)}; rH=function(R){return!(!R.Sk||!R.zy.U)&&R.bq()}; fg=function(R){return R.vp&&R.enableServerStitchedDai}; tid=function(R){return R.Zk&&!R.s2}; mF=function(R){var w;if(!(w=s_&&R.PB()&&R.ph()&&(R.drmProduct==="1"?!1:!0)&&R.Y("html5_sabr_live_drm_streaming_xhr"))){w=R.PB()&&!R.ph()&&s_;var p=R.PB()&&R.latencyClass!=="ULTRALOW"&&!R.isLowLatencyLiveStream&&R.Y("html5_sabr_live_normal_latency_streaming_xhr"),r=R.isLowLatencyLiveStream&&R.Y("html5_sabr_live_low_latency_streaming_xhr");const f=R.latencyClass==="ULTRALOW"&&R.Y("html5_sabr_live_ultra_low_latency_streaming_xhr");w=w&&(p||r||f)}p=w;w=R.enableServerStitchedDai&&p&&R.Y("html5_enable_sabr_ssdai_streaming_xhr"); p=!R.enableServerStitchedDai&&p;r=R.PB()&&!s_&&R.Y("html5_enable_sabr_live_non_streaming_xhr");R=s_&&(R.L$()||pg(R)&&R.Y("html5_enable_sabr_for_lifa_eligible_streams"));return w||p||r||R}; GZ=function(R){return R.Tw?["OK","LIVE_STREAM_OFFLINE"].includes(R.Tw.status):!0}; g.OqH=function(R){return R.captionsLanguagePreference||R.zy.captionsLanguagePreference||g.hN(R,"yt:cc_default_lang")||R.zy.pL}; Ei6=function(R){return R.zy.experiments.Tk().L.vS(KBP)&&R.uB()}; g.Ir=function(R){return!!R.embeddedPlayerConfig?.embeddedPlayerFlags?.enableMusicUx}; Cg=function(R){return R.zy.G&&R.isPrivate}; DFH=function(R){return R.playerResponse?.playerConfig?.daiConfig?R.N1?1:R.S$?2:0:3}; g.sm=function(R){var w=R.V();const p=g.uK(w);var r=w.GE;g.sg(w)&&(r&&(p.thirdParty={...p.thirdParty,embedUrl:r}),yO6(p,R));(r=R.S)?p.clickTracking={clickTrackingParams:r}:g.sg(R.V())&&g.n("EVENT_ID")?p.clickTracking={clickTrackingParams:g.n("EVENT_ID")}:w.Y("html5_log_missing_itct")&&(r=new g.Id("Missing ITCT in InnerTubeContext",{isAd:R.isAd(),jbY:w.getWebPlayerContextConfig()?.contextId}),g.LF(r));r=p.client||{};var f="EMBED",G=SG(R);G==="leanback"?f="WATCH":w.Y("gvi_channel_client_screen")&&G=== "profilepage"?f="CHANNEL":R.Fi?f="LIVE_MONITOR":G==="detailpage"?f="WATCH_FULL_SCREEN":G==="adunit"?f="ADUNIT":G==="sponsorshipsoffer"&&(f="UNKNOWN");r.clientScreen=f;if(f=R.kidsAppInfo)r.kidsAppInfo=JSON.parse(f);(G=R.CU)&&!f&&(r.kidsAppInfo={contentSettings:{ageUpMode:e8I[G]}});if(f=R.C0)r.unpluggedAppInfo={enableFilterMode:!0};(G=R.unpluggedFilterModeType)&&!f&&(r.unpluggedAppInfo={filterModeType:Mix[G]});if(f=R.f_)r.unpluggedLocationInfo=f;p.client=r;r=p.request||{};R.a9&&(r.isPrefetch=!0);if(f= R.mdxEnvironment)r.mdxEnvironment=f;if(f=R.mdxControlMode)r.mdxControlMode=cCd[f];p.request=r;r=p.user||{};if(f=R.xY)r.credentialTransferTokens=[{token:f,scope:"VIDEO"}];if(f=R.N0)r.delegatePurchases={oauthToken:f},r.kidsParent={oauthToken:f};if(w=w.getWebPlayerContextConfig()?.userContentRating)r.serializedUserContentRating=w;p.user=r;if(w=R.contextParams)p.activePlayers=[{playerContextParams:w}];if(R=R.clientScreenNonce)p.clientScreenNonce=R;return p}; g.uK=function(R){const w=g.CF(),p=w.client||{};if(R.forcedExperiments){var r=R.forcedExperiments.split(",");const f=[];for(const G of r)f.push(Number(G));p.experimentIds=f}if(r=R.homeGroupInfo)p.homeGroupInfo=JSON.parse(r);if(r=R.getPlayerType())p.playerType=r;if(r=R.L.ctheme)p.theme=r;if(r=R.livingRoomAppMode)p.tvAppInfo={...p.tvAppInfo,livingRoomAppMode:r};r=R.deviceYear;R.Y("html5_propagate_device_year")&&r&&(p.tvAppInfo={...p.tvAppInfo,deviceYear:r});if(r=R.livingRoomPoTokenId)p.tvAppInfo={...p.tvAppInfo, livingRoomPoTokenId:r};w.client=p;r=w.user||{};R.enableSafetyMode&&(r={...r,enableSafetyMode:!0});!p.tvAppInfo?.usePageidAsHeader&&R.pageId&&(r={...r,onBehalfOfUser:R.pageId});w.user=r;return w}; PVI=function(R){const w=!R?.IM()&&R?.PB()&&q0();return{supportsVp9Encoding:!(!R?.jw()||w),supportXhr:s_}}; $Fb=async function(R,w){R={context:g.uK(R.V()),engagementType:"ENGAGEMENT_TYPE_PLAYBACK",ids:[{playbackId:{videoId:R.videoId,cpn:R.clientPlaybackNonce}}]};const p=g.cx(aK_);return await g.$J(w,R,p)}; X1x=function(R,w,p){const r=g.Iq(w.experiments,"bg_vm_reinit_threshold");(!wm||(0,g.T)()-wm>r)&&$Fb(R,p).then(f=>{f&&(f=f.botguardData)&&g.rm(f,w)},f=>{R.cS()||(f=ru(f),R.Ty("attf",f.details))})}; g.m1=function(R,w,...p){R.state.O.publish(w,...p);R.state.C.publish(w,...p)}; N=function(R,w,p){R.state.L[w]=(...r)=>p.apply(R,r)}; zZ=function(R,w,p){R.state.L.hasOwnProperty(w)||N(R,w,p);R.state.K[w]=(...r)=>p.apply(R,r); R.state.D.add(w)}; B7=function(R,w,p){R.state.L.hasOwnProperty(w)||N(R,w,p);R.app.V().U&&(R.state.J[w]=(...r)=>p.apply(R,r),R.state.D.add(w))}; g.W7=function(R,w,p){return R.state.L[w](...p)}; g.xs=function(R,w,...p){R.state.O.publish(w,...p);R.state.C.publish(w,...p);R.state.G.publish(w,...p)}; g.lK=function(R,w,...p){R.state.O.publish(w,...p);R.state.C.publish(w,...p);R.state.G.publish(w,...p);R.state.U.publish(w,...p)}; nid=function(R,w,p){typeof R==="string"&&(R={mediaContentUrl:R,startSeconds:w,suggestedQuality:p});a:{if((w=R.mediaContentUrl)&&(w=/\/([ve]|embed)\/([^#?]+)/.exec(w))&&w[2]){w=w[2];break a}w=null}R.videoId=w;return Lg(R)}; Lg=function(R,w,p){if(typeof R==="string")return{videoId:R,startSeconds:w,suggestedQuality:p};w={};for(const r of dFD)R[r]&&(w[r]=R[r]);(R=R.embedConfig||R.embed_config)&&(w.embed_config=Zqd(R));return w}; Ywx=function(R,w,p,r){if(g.Kd(R)&&!Array.isArray(R)){w="playlist list listType index startSeconds suggestedQuality".split(" ");p={};for(r=0;rR.getPlaybackQuality(1)); zZ(R,"setPlaybackQuality",R.kF);zZ(R,"getAvailableQualityLevels",R.Jl);zZ(R,"getCurrentTime",R.PS);zZ(R,"getDuration",R.nB);zZ(R,"addEventListener",R.pB);zZ(R,"removeEventListener",R.Nk);zZ(R,"getDebugText",R.YY);zZ(R,"getVideoData",()=>FB_(R)); zZ(R,"addCueRange",R.U);zZ(R,"removeCueRange",R.removeCueRange);zZ(R,"setSize",R.setSize);zZ(R,"getApiInterface",R.getApiInterface);zZ(R,"destroy",R.destroy);zZ(R,"mutedAutoplay",R.mutedAutoplay);const w=R.app.V();w.J||(zZ(R,"getVideoEmbedCode",R.getVideoEmbedCode),zZ(R,"getVideoUrl",R.cB));zZ(R,"getMediaReferenceTime",R.Qk);zZ(R,"getSize",R.getSize);zZ(R,"setFauxFullscreen",R.sZ);w.Y("embeds_enable_move_set_center_crop_to_public")&&zZ(R,"setCenterCrop",R.setCenterCrop);w.J||zZ(R,"logImaAdEvent", R.logImaAdEvent);zZ(R,"preloadVideoById",R.Nl);zZ(R,"wakeUpControls",R.wakeUpControls)}; g.qS=function(R){return(R=JCW(R.app.tf()))?R.kU():null}; bK=function(R){const w=g.xW(R.app.V()),p=R.app.getVideoData()?.xu;R=Aa(R.app);return g.En(w)&&!p||R?!1:!0}; TuL=function(R,w,p){return typeof R==="number"?{playerType:R,Lo:w,cpn:p}:R||{}}; iqd=function(R){let w=R.raw_player_response;if(!w){var p=R.player_response;p&&(w=JSON.parse(p))}delete R.player_response;delete R.raw_player_response;w&&(R.raw_player_response={streamingData:w.streamingData,playerConfig:w.playerConfig},w.playbackTracking?.qoeUrl&&(R.raw_player_response={...R.raw_player_response,playbackTracking:{qoeUrl:w.playbackTracking.qoeUrl}}),w.captions&&(R.raw_player_response={...R.raw_player_response,captions:w.captions}),w.videoDetails&&(w.videoDetails.videoId||w.videoDetails.lengthSeconds)&& (p={},w.videoDetails.videoId&&(p.videoId=w.videoDetails.videoId),w.videoDetails.lengthSeconds&&(p.lengthSeconds=w.videoDetails.lengthSeconds),R.raw_player_response={...R.raw_player_response,videoDetails:p}))}; y9=function(R,w){const p={};if(R.app.V().S){for(const r of QoP)w.hasOwnProperty(r)&&(p[r]=w[r]);if(R=p.qoe_cat)w="",typeof R==="string"&&R.length>0&&(w=R.split(",").filter(r=>h8P.includes(r)).join(",")),p.qoe_cat=w; iqd(p)}else for(const r of gid)w.hasOwnProperty(r)&&(p[r]=w[r]);return p}; vid=function(R){return R?HqW[R]||5:5}; Nul=function(R){N(R,"getInternalApiInterface",R.getInternalApiInterface);N(R,"getTrustedApi",R.getTrustedApi);N(R,"addEventListener",R.X);N(R,"removeEventListener",R.B1);N(R,"cueVideoByPlayerVars",R.xY);N(R,"loadVideoByPlayerVars",R.Af);N(R,"preloadVideoByPlayerVars",R.wB);N(R,"getAdState",R.getAdState);N(R,"sendAbandonmentPing",R.sendAbandonmentPing);N(R,"setLoopRange",R.setLoopRange);N(R,"getLoopRange",R.getLoopRange);N(R,"setAutonavState",R.setAutonavState);N(R,"seekTo",R.Pw);N(R,"seekBy",R.wg); N(R,"seekToLiveHead",R.seekToLiveHead);N(R,"requestSeekToWallTimeSeconds",R.requestSeekToWallTimeSeconds);N(R,"seekToStreamTime",R.seekToStreamTime);N(R,"prefetchKeyPlay",R.prefetchKeyPlay);N(R,"startSeekCsiAction",R.startSeekCsiAction);N(R,"getStreamTimeOffset",R.getStreamTimeOffset);N(R,"isOrchestrationLeader",R.isOrchestrationLeader);N(R,"getVideoData",R.ag);N(R,"setInlinePreview",R.setInlinePreview);N(R,"getAppState",R.getAppState);N(R,"updateLastActiveTime",R.updateLastActiveTime);N(R,"setBlackout", R.setBlackout);N(R,"setUserEngagement",R.setUserEngagement);N(R,"updateSubtitlesUserSettings",R.updateSubtitlesUserSettings);N(R,"getPresentingPlayerType",R.O);N(R,"canPlayType",R.canPlayType);N(R,"updatePlaylist",R.updatePlaylist);N(R,"updateVideoData",R.updateVideoData);N(R,"updateEnvironmentData",R.updateEnvironmentData);N(R,"sendVideoStatsEngageEvent",R.Hw);N(R,"productsInVideoVisibilityUpdated",R.productsInVideoVisibilityUpdated);N(R,"setSafetyMode",R.setSafetyMode);N(R,"isAtLiveHead",w=>R.isAtLiveHead(void 0, w)); N(R,"getVideoAspectRatio",R.getVideoAspectRatio);N(R,"getPreferredQuality",R.getPreferredQuality);N(R,"getPlaybackQualityLabel",R.getPlaybackQualityLabel);N(R,"setPlaybackQualityRange",R.qH);N(R,"onAdUxClicked",R.onAdUxClicked);N(R,"getFeedbackProductData",R.getFeedbackProductData);N(R,"getStoryboardFrame",R.getStoryboardFrame);N(R,"getStoryboardFrameIndex",R.getStoryboardFrameIndex);N(R,"getStoryboardLevel",R.getStoryboardLevel);N(R,"getNumberOfStoryboardLevels",R.getNumberOfStoryboardLevels);N(R, "getCaptionWindowContainerId",R.getCaptionWindowContainerId);N(R,"getAvailableQualityLabels",R.getAvailableQualityLabels);N(R,"addCueRange",R.addCueRange);N(R,"addUtcCueRange",R.addUtcCueRange);N(R,"showAirplayPicker",R.showAirplayPicker);N(R,"dispatchReduxAction",R.dispatchReduxAction);N(R,"getPlayerResponse",R.N0);N(R,"getWatchNextResponse",R.yh);N(R,"getHeartbeatResponse",R.U0);N(R,"getCurrentTime",R.jI);N(R,"getDuration",R.BD);N(R,"getPlayerState",R.getPlayerState);N(R,"getPlayerStateObject", R.eI);N(R,"getVideoLoadedFraction",R.getVideoLoadedFraction);N(R,"getProgressState",R.getProgressState);N(R,"getVolume",R.getVolume);N(R,"setVolume",R.Em);N(R,"isMuted",R.isMuted);N(R,"mute",R.Wd);N(R,"unMute",R.RW);N(R,"loadModule",R.loadModule);N(R,"unloadModule",R.unloadModule);N(R,"getOption",R.PD);N(R,"getOptions",R.getOptions);N(R,"setOption",R.setOption);N(R,"loadVideoById",R.qx);N(R,"loadVideoByUrl",R.v2);N(R,"playVideo",R.zW);N(R,"loadPlaylist",R.loadPlaylist);N(R,"nextVideo",R.nextVideo); N(R,"previousVideo",R.previousVideo);N(R,"playVideoAt",R.playVideoAt);N(R,"getDebugText",R.getDebugText);N(R,"getWebPlayerContextConfig",R.getWebPlayerContextConfig);N(R,"notifyShortsAdSwipeEvent",R.notifyShortsAdSwipeEvent);N(R,"getVideoContentRect",R.getVideoContentRect);N(R,"setSqueezeback",R.setSqueezeback);N(R,"toggleSubtitlesOn",R.toggleSubtitlesOn);N(R,"isSubtitlesOn",R.isSubtitlesOn);N(R,"getAudioTrack",R.I0);N(R,"setAudioTrack",R.xu);N(R,"getAvailableAudioTracks",R.M0);N(R,"reportPlaybackIssue", R.reportPlaybackIssue);N(R,"setAutonav",R.setAutonav);N(R,"isNotServable",R.isNotServable);N(R,"channelSubscribed",R.channelSubscribed);N(R,"channelUnsubscribed",R.channelUnsubscribed);N(R,"togglePictureInPicture",R.togglePictureInPicture);N(R,"supportsGaplessAudio",R.supportsGaplessAudio);N(R,"supportsGaplessShorts",R.supportsGaplessShorts);N(R,"isGaplessTransitionReady",R.isGaplessTransitionReady);N(R,"enqueueVideoByPlayerVars",w=>void R.enqueueVideoByPlayerVars(w)); N(R,"clearQueue",R.clearQueue);N(R,"getMaxPlaybackQuality",R.getMaxPlaybackQuality);N(R,"getUserPlaybackQualityPreference",R.getUserPlaybackQualityPreference);N(R,"getSubtitlesUserSettings",R.getSubtitlesUserSettings);N(R,"resetSubtitlesUserSettings",R.resetSubtitlesUserSettings);N(R,"setMinimized",R.setMinimized);N(R,"setOverlayVisibility",R.setOverlayVisibility);N(R,"confirmYpcRental",R.confirmYpcRental);N(R,"queueNextVideo",R.queueNextVideo);N(R,"handleExternalCall",R.handleExternalCall);N(R,"logApiCall", R.logApiCall);N(R,"isExternalMethodAvailable",R.isExternalMethodAvailable);N(R,"setScreenLayer",R.setScreenLayer);N(R,"getCurrentPlaylistSequence",R.getCurrentPlaylistSequence);N(R,"getPlaylistSequenceForTime",R.getPlaylistSequenceForTime);N(R,"shouldSendVisibilityState",R.shouldSendVisibilityState);N(R,"syncVolume",R.syncVolume);N(R,"highlightSettingsMenuItem",R.highlightSettingsMenuItem);N(R,"openSettingsMenuItem",R.openSettingsMenuItem);N(R,"getEmbeddedPlayerResponse",R.getEmbeddedPlayerResponse); N(R,"getVisibilityState",R.getVisibilityState);N(R,"isMutedByMutedAutoplay",R.isMutedByMutedAutoplay);N(R,"isMutedByEmbedsMutedAutoplay",R.isMutedByEmbedsMutedAutoplay);N(R,"setGlobalCrop",R.setGlobalCrop);N(R,"setInternalSize",R.setInternalSize);N(R,"setFauxFullscreen",R.setFauxFullscreen);N(R,"setAppFullscreen",R.setAppFullscreen);N(R,"isKeyboardDisabled",R.isKeyboardDisabled)}; or=function(R,w,p){R=g.V9(R.dg(),w);return p?(p.addOnDisposeCallback(R),null):R}; g.ta=function(R,w,p){return R.app.V().mq?w:g.K2("$DESCRIPTION ($SHORTCUT)",{DESCRIPTION:w,SHORTCUT:p})}; kOx=function(R){R.dg().element.setAttribute("aria-live","polite")}; g.Om=function(R,w){R.getPresentingPlayerType()===3?R.publish("mdxautoplaycancel"):g.m1(R,"onAutonavCancelled",w)}; g.Kg=function(R){R=R.tf();const w=R.sK.get("endscreen");return w&&w.HM()?!0:R.pN()}; g.Dw=function(R){const w=Em(R.tf());return R.app.UR&&!R.isFullscreen()||R.getPresentingPlayerType()===3&&w&&w.hasNext()&&w.hasPrevious()||!!R.getPlaylist()}; g.ee=function(R,w){g.W7(R,"addEmbedsConversionTrackingParams",[w])}; g.c7=function(R){return(R=g.MS(R.tf()))?R.Pq():{}}; g.UFW=function(R){R=(R=R.getVideoData())&&R.C;return!!R&&!(!R.audio||!R.video)&&R.mimeType!=="application/x-mpegURL"}; g.P7=function(R,w,p){R=R.L_().element;let r=oM(R.children,f=>{f=Number(f.getAttribute("data-layer"));return p-f||1}); r<0&&(r=-(r+1));Wc(R,w,r);w.setAttribute("data-layer",String(p))}; g.ar=function(R){const w=R.V();if(!w.Ml)return!1;const p=R.getVideoData();if(!p||R.getPresentingPlayerType()===3)return!1;var r=(!p.isLiveDefaultBroadcast||w.Y("allow_poltergust_autoplay"))&&!p.I0();r=p.isLivePlayback&&(!w.Y("allow_live_autoplay")||!r);const f=p.isLivePlayback&&w.Y("allow_live_autoplay_on_mweb");R=R.getPlaylist();R=!!R&&R.hasNext();var G=p.O0&&p.O0.playerOverlays||null;G=!!(G&&G.playerOverlayRenderer&&G.playerOverlayRenderer.autoplay);G=p.h$&&G;return!p.ypcPreview&&(!r||f)&&!g.ra(p.XL, "ypc")&&!R&&(!g.zI(w)||G)}; R3r=function(R,w){R=SwW(R.app.UZ().J);for(const p of R){R=p.getAvailableAudioTracks();let r=null;for(const f of R)if(f.getLanguageInfo().getId()===w){r=f;break}r&&p.yl(r,!0)}}; XV=function(){$s||($s=new wod);return $s}; ng=function(R,w){w?R.requestHeaders.Authorization=`Bearer ${w}`:delete R.requestHeaders.Authorization}; dH=function(R){const w=R.B.getRootNode();return R.B.Y("web_watch_pip")||R.B.Y("web_shorts_pip")?is(w):document}; pox=function(R){R.sourceElement&&(document.activeElement&&g.lA(R.element,document.activeElement)&&R.sourceElement.focus(),R.sourceElement.setAttribute("aria-expanded","false"),R.sourceElement=void 0);R.K.C();R.J=void 0}; Zw=function(R,w,p){R.Pu()?R.Qh():R.R9(w,p)}; g.Ys=function(R={},w=[],p=!1,r=!1){w.push("ytp-menuitem");"role"in R||(R.role="menuitem");p||"tabindex"in R||(R.tabindex="0");R={j:p?"a":"div",E0:w,A:R,N:[{j:"div",Z:"ytp-menuitem-icon",fB:"{{icon}}"},{j:"div",Z:"ytp-menuitem-label",fB:"{{label}}"},{j:"div",Z:"ytp-menuitem-content",fB:"{{content}}"}]};r&&R.N.push({j:"div",Z:"ytp-menuitem-secondary-icon",fB:"{{secondaryIcon}}"});return R}; g.FV=function(R,w){R.updateValue("label",w)}; je=function(R){return R?g.Su(R):""}; TZ=function(R,w,p,r){w in R.L||(p=new g.Ja(p,r,{id:w,priority:2,namespace:"appad"}),R.api.C3([p],1),R.L[w]=p)}; iK=function(R,w){rnI(R,w).then(p=>{g.Ki(w,void 0,void 0,p)})}; Q9=function(R,w){w.forEach(p=>{iK(R,p)})}; ClL=function(R,w,p){if(!(p in w))return!1;w=w[p];Array.isArray(w)||(w=[w]);for(const r of w)w={CPN:R.api.getVideoData().clientPlaybackNonce},w=g.MG(r,w),g.Ki(w,void 0,xc(lp(w,f3I),w,!1,"Active View 3rd Party Integration URL")||xc(lp(w,Gf_),w,!1,"Google/YouTube Brand Lift URL")||xc(lp(w,I3d),w,!1,"Nielsen OCR URL"));return!0}; rnI=function(R,w){return g.I1(R.api.V())&&Ke(w)&&tk(w)?g.$W(R.api.V(),R.api.getVideoData().J()).then(p=>{let r;p&&(r={Authorization:`Bearer ${p}`});return r},void 0):gD()}; ugP=function(R){const w=!R.V().Jp&&R.getPresentingPlayerType()!==3;return R.isFullscreen()||w}; g.ha=function(R,w,p=!1,r){const f=R.currentTarget;if(!p&&g.$t(R))return R.preventDefault(),!0;w.pauseVideo();R=f.getAttribute("href");g.A1(R,r,!0);return!1}; g.gH=function(R,w,p){if(b8(w.V())&&w.getPresentingPlayerType()!==2){if(g.$t(p))return w.isFullscreen()&&!w.V().externalFullscreen&&w.toggleFullscreen(),p.preventDefault(),!0}else{const r=g.$t(p);r&&w.pauseVideo();g.A1(R,void 0,!0);r&&(g.b$(R),p.preventDefault())}return!1}; snl=function(R){R=H7.includes("en")?R.Y("delhi_modern_web_player_icons")?Gi():{j:"svg",A:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},N:[{j:"path",FI:!0,A:{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"}}]}:R.Y("delhi_modern_web_player_icons")?V1_():{j:"svg",A:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},N:[{j:"path",FI:!0,A:{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"}}]};R.Z="ytp-subtitles-button-icon"; return R}; mm_=function(R){return H7.includes("en")?R?Gi():{j:"svg",A:{height:"24",viewBox:"0 0 24 24",width:"24"},N:[{j:"path",A:{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"}}]}:R?{j:"svg",A:{fill:"none",height:"24",viewBox:"0 0 24 24", width:"24"},N:[{j:"path",A:{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",A:{height:"24",viewBox:"0 0 24 24",width:"24"},N:[{j:"path",A:{d:"M5,11h2v2H5V11z M15,15H5v2h10V15z M19,15h-2v2h2V15z M19,11H9v2h10V11z M22,6H2v14h20V6z M3,7h18v12H3V7z",fill:"white"}}]}}; v7=function(){return{j:"div",Z:"ytp-spinner-container",N:[{j:"div",Z:"ytp-spinner-rotator",N:[{j:"div",Z:"ytp-spinner-left",N:[{j:"div",Z:"ytp-spinner-circle"}]},{j:"div",Z:"ytp-spinner-right",N:[{j:"div",Z:"ytp-spinner-circle"}]}]}]}}; NS=function(R){if(document.createRange){const w=document.createRange();w&&(w.selectNodeContents(R),R=window.getSelection())&&(R.removeAllRanges(),R.addRange(w))}}; z3d=function(R,w){const p=w.getAudioTrack();return p.id!=="und"?g.QD(R,r=>r.DT?.name===p.getLanguageInfo().name):R}; BSL=function(R,w){return w.getUserAudio51Preference()?g.QD(R,ks):R}; WN_=function(R){return R.map(w=>new P1(w.id,"application/x-mpegURL",{DT:w.DT}))}; xmb=function(R){return g.hj("yt-player-drc-pref")?g.QD(R,Um):R}; l3b=function(R){return LVW()===2?g.QD(R,Se):R}; LNl=function(R){return qkd()===1?g.QD(R,R8):R}; R8=function(R){return R.audio?.audioQuality==="AUDIO_QUALITY_HIGH"&&!ks(R)}; Um=function(R){return R.audio?.L===!0}; ks=function(R){return R.J()}; qUH=function(R){return R.DT!==void 0}; Se=function(R){return R.audio?.C===!0}; wK=function(R,w){if(R.length<2)return!1;const p=w(R[0]);return R.some(r=>w(r)!==p)}; AnD=function(R,w){R=new Set(R.map(w));R.delete(void 0);return R.size>=2}; bnb=function(R){return R.B.V().Y("web_player_autonav_use_server_provided_state")&&R.Ib().JW()}; ynd=function(R){R.isChecked=R.isChecked;R.KB("ytp-autonav-toggle-button").setAttribute("aria-checked",String(R.isChecked));const w=R.isChecked?"Autoplay is on":"Autoplay is off";R.B.V().Y("player_tooltip_data_title_killswitch")?R.update({title:w,label:w}):R.update({"data-tooltip-title":w,label:w});R.B.wl()}; ojI=function(R){R.menuItem||(R.menuItem=new VOd(R.api),g.K(R,R.menuItem),R.menuItem.WS(R.L))}; tO6=function(R){var w=R.api.Y("delhi_modern_web_player_compact_controls"),p=g.Iq(R.api.V().experiments,"delhi_modern_web_player_responsive_compact_controls_threshold"),r=w||p>0&&R.api.getPlayerSize().width<=p;w=R.api.getRootNode();w.classList.toggle("ytp-delhi-modern-compact-controls",r);p=r?"40px":"48px";const f=r?"8px":"12px",G=r?"56px":"72px",I=r?"56px":"64px";let C=r?"48px":"56px",u=r?"12px":"20px";r=r?"72px":"96px";R.api.Y("delhi_modern_web_player_big_mode_consistent_pill_height")&&(C="56px", u="12px",r="80px");w.style.setProperty("--yt-delhi-pill-height",p);w.style.setProperty("--yt-delhi-pill-top-height",f);w.style.setProperty("--yt-delhi-bottom-controls-height",G);w.style.setProperty("--yt-delhi-bottom-controls-height-xsmall-width-mode",I);w.style.setProperty("--yt-delhi-big-mode-pill-height",C);w.style.setProperty("--yt-delhi-big-mode-pill-top-height",u);w.style.setProperty("--yt-delhi-big-mode-bottom-controls-height",r)}; Ond=function(R,w){for(const p of w){w=Number(p.playbackPosition?.utcTimeMillis)/1E3;const r=`embargo_${w}`;R.api.addUtcCueRange(r,w,w+Number(p.duration?.seconds),"embargo",!1);p.onEnter&&(R.L[r]=p.onEnter.filter(R.C))}}; Ej6=function(R){var w=R.api.getRootNode();w=R.api.getWebPlayerContextConfig().embedsEnableEmc3ds?w.parentElement?.parentElement||w:w;R.L=new KNd(w,p=>{p!=null&&(R.api.V().mj=p,R.api.V().Sk="EMBEDDED_PLAYER_VISIBILITY_FRACTION_SOURCE_INTERSECTION_OBSERVER")}); g.K(R,R.L);R.events.W(R.api,"videoStatsPingCreated",p=>{var r=R.L;r=r.L==null?null:Math.round(r.L*100)/100;p.inview=r!=null?r:void 0;r=R.api.getPlayerSize();if(r.height>0&&r.width>0){r=[Math.round(r.width),Math.round(r.height)];const f=g.oa();f>1&&r.push(f);r=r.join(":")}else r=void 0;p.size=r})}; Dml=function(R){return(R?.messageRenderers||[]).find(w=>!!w.timeCounterRenderer)?.timeCounterRenderer||null}; e3d=function(R){var w=Math,p=w.round;const r=Math.min((0,g.T)()-R.O,R.C);w=p.call(w,(R.C-r)/1E3);R.updateValue("duration",Y3({seconds:w}));w<=0&&R.L?R.stopTimer():R.L&&R.L.start()}; MOx=function(R,w){R.L||(R.C=w,R.O=(0,g.T)(),R.L=new g.hf(()=>{e3d(R)},null),e3d(R))}; Plr=function(R,w){let p=0;for(p=0;p{const I=g.F(G?.onTap,tO);I&&g.m1(R.api,"innertubeCommand",I)}); R.L[p]=r}for(;p0&&f&&(p=Math.max(p,R.policy.iD));return Xor(R,p,w)}; C7=function(R){return f7(R)/R.playbackRate}; uJ=function(R,w,p){const r=R.policy.playbackStartPolicy.resumeMinReadaheadPolicy||[],f=R.policy.playbackStartPolicy.startMinReadaheadPolicy||[];R=Infinity;w=w&&r.length>0?r:f;for(const G of w)w=G.minReadaheadMs||0,p<(G.minBandwidthBytesPerSec||0)||R>w&&(R=w);return R=0?w[f]:null;var z;if(z=p){z=r;var B=f,W=p.startTimeMs+p.durationMs,x=z.startTimeMs+z.durationMs;if(z.startTimeMs-W>R.L)z=!1;else if(dmW(R,p.formatId, z.formatId))p.durationMs=Math.max(W,x)-p.startTimeMs,p.wb=Math.max(p.wb,z.wb),z=!0;else if(Math.abs(p.startTimeMs-z.startTimeMs)<=R.L)if(p.durationMs>z.durationMs+R.L){B=p.formatId;var q=p.BF,O=p.wb;p.formatId=z.formatId;p.durationMs=z.durationMs;p.BF=z.BF;p.wb=z.wb;z.formatId=B;z.startTimeMs=x;z.durationMs=W-x;z.BF=q;z.wb=O;z=!1}else p.formatId=z.formatId,z=!0;else W>z.startTimeMs&&(W>x&&(w.splice(B+1,0,{formatId:p.formatId,startTimeMs:x,durationMs:W-x,BF:z.wb+1,wb:p.wb}),R.logger&&R.logger({splitOldStart:p.startTimeMs?.toFixed(3), splitOldEnd:W?.toFixed(3),splitNewStart:z.startTimeMs?.toFixed(3),splitNewEnd:x?.toFixed(3)})),p.durationMs=z.startTimeMs-p.startTimeMs,p.wb=z.BF-1),z=!1}z?r=p:(f+=1,w.splice(f,0,r));p=0;for(z=f+1;z=q+W.L?W=!0:O+W.Lp.startTimeMs-r.startTimeMs); return R>=0?R:-R-2}; YUD=function(R,w,p){if(R.logger){var r=[];for(let f=0;f0&&(0,g.T)()-R.U<5E3&&(R.logger&&R.logger({dend:r.info.EC()}),p=csd(p,f,f+.01))}R.policy.Ta&&R.logger&&R.logger({cbri:`${R.C}`});r=[];for(var G=f=0;f=I){const x={...R.nL[G]};var u=R.Z$.G.get(oH(R.nL[G].formatId)),m=Math.max(C,I);I=u.index.I3(m+ R.L/1E3);C=u.index.getStartTime(I);var z=I+ +(Math.abs(C-m)>R.L/1E3);m=z+R.G;z=u.index.getStartTime(z)*1E3;G!==R.C||w?(x.BF=m,x.startTimeMs=z):(R.logger&&R.logger({pEvict:"1",og:x.startTimeMs,adj:C*1E3}),x.BF=I+R.G,x.startTimeMs=C*1E3);I=R.O?.info.duration||11;G===R.C&&BR.L/1E3);I=C+R.G;u=u.index.Jv(C)*1E3;x.wb=I;x.durationMs=u-x.startTimeMs;x.BF<=x.wb&&r.push(x)}W{w.push({...G})}); const r=R.M0.Yb();let f=R.C;for(const G of r)f=Znx(R,w,p,G,f);w.forEach(G=>{G.startTimeMs&&(G.startTimeMs+=R.timestampOffset*1E3)}); return{nL:w,Db:p}}; dmW=function(R,w,p){return w.itag!==p.itag||w.xtags!==p.xtags?!1:R.Z$.PB||w.lmt===p.lmt}; inI=function(R,w,p,r,f){if(!w.rN.L()){if(!(f=p===0||!!w.C.length&&w.C[0]instanceof sR))a:{if(w.C.length&&(f=w.C[0],f instanceof ml&&f.St&&f.A8)){f=!0;break a}f=!1}f||R.policy.L||zl(w);return p}const G=BW(w,p);if(!isNaN(G))return G;if(R.loader.iF(p*1E3))return p;f.iq?R.policy.jR&&(R=WW(R.loader,w),Jnd(w.O,p+R,!0)):(w.xU(),R.loader.A9(!1,`sta_${+w.rN.info.i4()}`));return r&&(R=TO(r.f3(),p),!isNaN(R))?(xQ(w,R+TSI,f),p):xQ(w,p,f)}; QnW=function(R,w,p){if(!R.policy.J){R=w.rN.index;var r=w.L.yk;R.IA(r)||p&&p.yk===r?(w.G=!R.IA(r),w.S=!R.IA(r)):(w.G=!0,w.S=!0)}}; gjL=function(R){const w=Math.max(R.videoTrack.O.O||0,R.audioTrack.O.O||0);h3D(R.videoTrack);h3D(R.audioTrack);R.policy.J||hEd(R.Z$);R.Z$.isManifestless&&!R.policy.J&&(R.L=!0,R.C=0);var p=R.loader;if(!p.policy.pB||p.policy.q0)p.currentTime=w;R.G=!0;R.O=new aa;return R.O}; qw=function(R){var w=R.videoTrack.K!==-1,p=R.audioTrack.K!==-1;if(!w||!p)if(w=!w&&lJ(R.videoTrack),p=!p&&lJ(R.audioTrack),w||p)if(p=w?R.videoTrack:R.audioTrack,w=w?R.audioTrack:R.videoTrack,p.K=lJ(p).info.yk,R.policy.J&&(w.K=lJ(w)?.info.xY()||w.K),w.K!==-1){let r=Math.max(w.rN.index.getStartTime(w.K),p.rN.index.getStartTime(p.K));L_(R.Z$)&&Math.abs(r-L_(R.Z$))>432E3&&HVH(R.Z$);R.C&&(r=R.C,R.C=0);g.TF(()=>{R.policy.J||L7(R,r,102)}); R.loader.Ty("initManifestlessSync",{st:r,ost:r+R.loader.vB(),a:R.audioTrack.K,v:R.videoTrack.K});R.O&&(R.O.resolve(r+.1),R.O=null);R.policy.J&&L7(R,r,102)}}; Hnd=function(R,w,p){if(!R.isSeeking())return-1;p=(p?R.videoTrack:R.audioTrack).rN.index;const r=p.I3(R.targetTime);return(p.IA(R.Z$.tj)||w.yk===R.Z$.tj)&&r{qw(R)}); else{if(R.isSeeking()&&R.targetTime){const G=Hnd(R,w,p);if(G!==-1){R.videoTrack.G=!1;R.audioTrack.G=!1;R.L=!0;R.C=0;g.TF(()=>{R.loader.Ty("seekreason",{reason:"behindMinSq",tgt:G});L7(R,G)}); return}}p?R.videoTrack.S=!1:R.audioTrack.S=!1;var f=!R.L;BW(R.videoTrack,R.targetTime)>=0&&BW(R.audioTrack,R.targetTime)>=0&&f?((R.videoTrack.G||R.audioTrack.G)&&R.loader.Ty("iterativeSeeking",{status:"done",count:R.seekCount}),R.videoTrack.G=!1,R.audioTrack.G=!1):r&&g.TF(()=>{if(R.L||!R.policy.eI)qw(R);else{var G=w.startTime,I=w.duration;if(!R.policy.J){var C=R.videoTrack.K!==-1&&R.audioTrack.K!==-1,u=!R.videoTrack.S&&!R.audioTrack.S;(p?R.videoTrack.G:R.audioTrack.G)&&C&&u&&(R.targetTime>=G&&R.targetTime< G+I+.1?((p?R.videoTrack:R.audioTrack).G=!1,R.videoTrack.G||R.audioTrack.G||(R.loader.Ty("iterativeSeeking",{status:"done",target:G,originalTime:G+R.loader.vB(),count:R.seekCount}),R.seekCount=0)):R.seekCount<8?(R.seekCount++,R.loader.Ty("iterativeSeeking",{status:"inprogress",count:R.seekCount,target:R.targetTime,actual:G,duration:I,isVideo:p}),R.seek(R.targetTime,{})):(R.loader.Ty("iterativeSeeking",{status:"incomplete",count:R.seekCount,target:R.targetTime,actual:G}),R.seekCount=0,R.videoTrack.G= !1,R.audioTrack.G=!1,A3(R.loader,G+.1,{hK:!0,dB:"chunkSelectorSynchronizeMedia",gE:!0})))}}})}}; bJ=function(R,w,p){NSP(R.BB,w);R.YY&&(R.YY.add(Math.ceil(w)-Math.ceil(R.D)),R.YY.add(Math.max(0,Math.ceil(p/1024)-Math.ceil(R.G/1024))));const r=w-R.D,f=p-R.G;R.a9=f;R.p_=Math.max(R.p_,f/(r+.01)*1E3);R.D=w;R.G=p;R.PS&&p>R.PS&&kfI(R)}; kfI=function(R){R.nB=Math.max(R.nB,R.G-R.h8);R.Jl=Math.max(R.Jl,R.D-R.wB);R.PS=0}; UmH=function(R,w){R.url=w;window.performance&&!performance.onresourcetimingbufferfull&&(performance.onresourcetimingbufferfull=()=>{performance.clearResourceTimings()})}; SUl=function(R){R.jI=R.L+R.snapshot.delay*1E3;R.WB=!1}; VW=function(R,w,p){if(!R.Il){w=Math.max(w,.01);var r=R.oe?Math.max(w,p/R.oe):w,f=R.BB.C.O;f&&(r=w,R.oe&&(r=Math.max(w,p/R.oe*f)));yW(R.BB,w,p,r)}}; Rdr=function(R){const w=R.U0||R.Qk;return w?R.snapshot.delay+Math.min(R.zH,(R.S-R.xY)/1E3)+w:R.MH}; wbd=function(R){return(R.U-R.L)/1E3}; o8=function(R,w){if(R.n2&&R.yk!==void 0&&R.Ou!==void 0){var p=Math,r=p.min,f=R.J;var G=R.n2;var I=R.L;if(pbP(G,R.yk))G=w;else{var C=0;G.Tm&&(C=.2);G=I+(G.zH+C)*1E3}R.J=r.call(p,f,G);p=Math;r=p.min;f=R.pB;G=R.n2;I=R.L;C=rWd(G,R.yk,R.Ou);C!==2&&(w=C?w:I+G.zH*1E3,G.Tm&&(w+=G.zH*1E3));R.pB=r.call(p,f,w);R.J<=R.L?SUl(R):(R.jI=R.J,R.WB=!0)}}; fkI=function(R,w){if(w+1<=R.totalLength){var p=WX(R,w);p=p<128?1:p<192?2:p<224?3:p<240?4:5}else p=0;if(p<1||!(w+p<=R.totalLength))return[-1,w];if(p===1)R=WX(R,w++);else if(p===2)p=WX(R,w++),R=WX(R,w++),R=(p&63)+64*R;else if(p===3){p=WX(R,w++);var r=WX(R,w++);R=WX(R,w++);R=(p&31)+32*(r+256*R)}else if(p===4){p=WX(R,w++);r=WX(R,w++);const f=WX(R,w++);R=WX(R,w++);R=(p&15)+16*(r+256*(f+256*R))}else p=w+1,R.focus(p),m$(R,p,4)?R=VbW(R).getUint32(p-R.O,!0):(r=WX(R,p+2)+256*WX(R,p+3),R=WX(R,p)+256*(WX(R,p+ 1)+256*r)),w+=5;return[R,w]}; GgP=function(R){return g.kb(R.info.C_,w=>w.type===3)}; fTd=async function(R,w){return w?(new GI(R.C)).encrypt(w,R.L):w}; uUx=async function(R,w){return w?await (new GI(R.C)).decrypt(w,R.L):w}; Ikb=function(R){R.O.read().then(R.D,R.onError).then(void 0,qb)}; t3=function(R,w,p,r,f){if(AQ(93,8665,R.Ld))return new C_L(R,p);R=R.qk();return r?IlD()?new utb(R,w,p,f):new sE6(R,w,p,f):new m2x(R,p,f)}; OR=function(R,w,p){R.L&&(uY(R.L,w),w=R.L,R.L=null);let r=0,f=0;for(const u of R.C_){if(u.range&&r+u.C<=R.C){r+=u.C;continue}if(M9(u)&&!p&&R.C+w.totalLength-f=400?(R.lastError="net.badstatus",!0):f?(R.lastError="ump.spsrejectfailure",!0):p||r?!1:(R.lastError=w===204?"net.nocontent":"net.connect",!0)}; e$=function(R,w){if(R.policy.D8)return!1;const p=w.getResponseHeader("content-type"),r=w.Pj();R=!r||r<=R.policy.Ac;return(!w.w3()||!p||p.indexOf("text/plain")!==-1)&&R}; WAr=function(R,w){let p="";w=w.gP();w.totalLength<=R.policy.Ac&&(R=zQ(w),R=Lm(R),p=xr(R)?R:"");return p}; x2I=function(R){const w=R.timing.X();w.shost=AQ(78,8318,R.Uy.Ld);R.policy.GE&&R.policy.Ie&&(w.csrc=1);return w}; lkb=function(R,w){return R?.maxWidth>w?.maxWidth||R?.maxHeight>w?.maxHeight}; LA6=function(R,w){for(const p of w.keys()){const r=w.get(p);if(r.length===0)continue;g.tt(r,(I,C)=>C.maxFramerate-I.maxFramerate); const f=[r[0]];let G=0;for(let I=1;IR.L||p.push(r);return p}; Mw=function(R,w,p){let r=btd[R]||[];p.Y("html5_shorts_onesie_mismatched_fix")&&(r=yWP[R]||[]);w.push(...r);p.Y("html5_early_media_for_drm")&&w.push(...(Vrd[R]||[]))}; D26=function(R,w){const p=g.P4(R);var r=R.V();const f=r.K;r=r.Y("html5_shorts_onesie_mismatched_fix");const G=R.uB();if(r){if(!f.L){if(G&&cW)return cW;if(PW)return PW}}else if(PW&&!f.L)return PW;const I=[],C=[],u={};var m=a8.concat(oNx);r&&(m=a8.concat(trl));R.Y("html5_early_media_for_drm")&&(m=m.concat(Otx),R.Y("allow_vp9_1080p_mq_enc")&&m.push(KAx));const z=[...ENH];R.Y("html5_iamf_audio_onesie_fmt")&&z.push(["773"]);for(var B of m){m=!1;for(const x of B){var W=nb(x,G&&r);if(!W||!W.video)continue; if(W.L()&&!p.M0&&W.video.qualityOrdinal>p.DI)continue;const q=g.Iq(R.V().experiments,"html5_drm_byterate_soft_cap");if(q>0&&DKD(W)&&W.hf>q)continue;if(m){I.push(x);Mw(x,I,R);continue}W=Oz(p,W,f);W===!0?(m=!0,I.push(x),Mw(x,I,R)):u[x]=W}}for(const x of z)for(const q of x){B=grl(q);if(!B||!B.audio||!R.Y("html5_onesie_51_audio")&&B.J())continue;B=Oz(p,B,f);if(B===!0){C.push(q);Mw(q,C,R);break}else u[q]=B}if(!R.Y("html5_enable_audio_quality_setting")){R=["141","774"];for(const x of R)C.includes(x)&&(g.CR(C, x),u[x]="blkhqa")}p.L&&w("orfmts",u);if(r)return f.L&&(f.L=!1,cW=PW=void 0),G?cW={video:I,audio:C}:PW={video:I,audio:C};PW={video:I,audio:C};f.L=!1;return PW}; g.cWD=function(R,w,p){const r=p.K,f=[],G=[];var I=p.Y("html5_shorts_onesie_mismatched_fix");R=R.uB();var C=a8.concat(oNx);I&&(C=a8.concat(trl));p.Y("html5_early_media_for_drm")&&(C=C.concat(Otx),p.Y("allow_vp9_1080p_mq_enc")&&C.push(KAx));const u=[...ENH];p.Y("html5_iamf_audio_onesie_fmt")&&u.push(["773"]);for(const m of C)for(const z of m){C=nb(z,R&&I);if(!C||!C.video)continue;const B=g.Iq(p.experiments,"html5_drm_byterate_soft_cap");if(!(B>0&&DKD(C)&&C.hf>B)&&Oz(w,C,r)===!0){f.push({videoCodec:edd[uI[z]], maxWidth:C.video.width,maxHeight:C.video.height,maxFramerate:C.video.fps});break}}for(const m of u)for(const z of m)if((I=grl(z))&&I.audio&&(p.Y("html5_onesie_51_audio")||!I.J())&&Oz(w,I,r)===!0){G.push({audioCodec:Mrx[uI[z]],numChannels:I.audio.numChannels});break}return{videoFormatCapabilities:f,audioFormatCapabilities:G}}; nNb=function(R){const w={};var p=R.CB;const r=R.zy,f=R.BB,G=p.getVideoData();var I=fJ(0);var C=p.getVisibilityState();r.Y("html5_enable_audio_quality_setting")&&(w.lc=r.lc);I&&(w.yd=I,w.lastManualDirection=mbP(),I=p$_()||0,I>0&&(I=(r.Y("html5_use_date_now_for_local_storage")?Date.now():(0,g.T)())-I,r.Y("html5_use_date_now_for_local_storage")?I>0&&(w.timeSinceLastManualFormatSelectionMs=I):w.timeSinceLastManualFormatSelectionMs=I));if(f.pB||r.Y("html5_sabr_ugc_vod_web_embedded_client_default_bandwidth_on_iphone")&& Be)I=r.Y("html5_disable_bandwidth_cofactors_for_sabr_live")?!!R.Ey?.PF:!1,w.Ve=rK(f,!I);var u=g.tC.medium,m=Math.floor(u*16/9);(I=G.uB())||(G.L&&G.O&&G.O.videoInfos.length!==0?(I=G.O.videoInfos[0],I=!!I.video&&I.video.width0&&(w.UL===0||w.UL>I)&&(w.UL=I,p.Ty("lsl",{q:I})),I=r.Tk().L.vS(akd)??0,I>0&&!w.UL&&(C=(C?.uQ||$Q).compose(new LJ(0,I,!1,"p")),w.x5.defaultPolicy=C.L,p.Ty("lsl",{qc:I}));C=(r.Y("html5_fix_drm_license_constraint_for_tv_and_onesie")? R.B9:G.fetchType==="onesie")||G.HX?[{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}];w.Un=R.authorizedFormats&&R.authorizedFormats.length>0?{authorizedFormats:R.authorizedFormats}:{authorizedFormats:C};R.sabrLicenseConstraint&&(w.Un.sabrLicenseConstraint=R.sabrLicenseConstraint); if(r.Y("html5_onesie_media_capabilities")||jG(G))w.rf=3;r.Y("html5_onesie_audio_only_playback")&&eG(G)&&(w.rf=1);R.Ey?.pL&&R.j7&&(w.rf=w.rf===void 0?7:w.rf|4);C=G.q0?G.q0:g.P4(G);r.Y("html5_onesie_media_capabilities")&&(w.mediaCapabilities=g.cWD(G,C,r));if(R.Ey?.YY()){m=R.Pt;z=R.q3;var B=R.Ey?.hf;I=[];u=[];const e=new Map;var W=G.kF.L;for(var x of W.values())if(x.i4)u.push({audioCodec:Mrx[x.wN],numChannels:x.numChannels,spatialCapabilityBitmask:$2Y[x.wN]});else{W=edd[x.wN];var q=x.maxBitrateBps|| 0,O=B?B*8:0;q={videoCodec:W,maxWidth:z?854:x.maxWidth||0,maxHeight:z?480:x.maxHeight||0,maxFramerate:x.maxFramerate||0,is10BitSupported:x.Kt||!1,maxBitrateBps:O&&q?Math.min(O,q):O||q,efficient:!0};W=`${W}_${x.Kt}`;O=e.get(W)||[];O.push(q);e.set(W,O)}I=LA6(I,e);x=m?[...m]:[];G.Y("html5_ssff_denylist_opus_low")&&x.push(249,350);g.P4(G);w.mediaCapabilities={videoFormatCapabilities:I,audioFormatCapabilities:u,hdrModeBitmask:3,perPlaybackAttributes:x.length?{itagDenylist:x}:{}}}R.Ey?.L&&(w.cN=C.cN,w.DI= R.Ey?.DI);r.Nk&&(w.kf=r.Nk);w.MW=R.Zo;w.yA=R.yA;w.Zd=R.Zd;w.Zb=R.Zb;R.Gq&&(w.yN=(0,g.T)()-R.Gq);R.Wu&&(w.Wu=R.Wu);s_||(w.CG=!0);x=Gl(f)*1E3;x>0&&(w.In=x);R.Ey?.JE&&R.Uh&&R.Uh0?p:f.interruptions[0]||0;R.Ey?.p_&&(w.Qs=R.Qs);r.U0&&(w.audioTrackId= r.U0);G.t8()&&!w.audioTrackId&&(r.Y("html5_fill_default_mosaic_audio_track_id")||(R=F7x(G),w.audioTrackId=R),G?.Ty("misstrkchg",{"default":w.audioTrackId}));if(R=navigator.connection?.type||"")w.detailedNetworkType=XbW[R]||XbW.other;!r.Y("html5_enable_voice_boost")||G.uB()||G.isAd()||(w.Kr=r.t6);return w}; XZ=function(R,w,p,r,f,G,I){const C={};w&&(C.rr=w);if(!R)return C;C.playbackCookie=p?.playbackCookie;f&&(C.sN=f);C.dW=[];C.Jc=[];if(I?.size)for(const u of I.values())C.Jc.push(u);if(R.sabrContextUpdates.size>0)for(const u of R.sabrContextUpdates.values())d2W(C,u,r);Qk(R)&&G&&d2W(C,G,r);w=R.V().L;C.clientInfo={clientName:Zt6[w.c.toUpperCase()]||0};w.cbrand&&(C.clientInfo.deviceMake=w.cbrand);w.cmodel&&(C.clientInfo.deviceModel=w.cmodel);w.cver&&(C.clientInfo.clientVersion=w.cver);w.cos&&(C.clientInfo.osName= w.cos);w.cosver&&(C.clientInfo.osVersion=w.cosver);w=R.V();w.Y("html5_sabr_enable_server_xtag_selection")&&w.pL&&(C.clientInfo.hl=w.pL);R.AU&&(C.AU=R.AU);return C}; d2W=function(R,w,p){const r=w.type||0;p?.has(r)?R.Jc.push(w):R.dW.push(r)}; Y0_=function(R){if(!(d5(R.info)&&R.info.HC()&&R.policy.h8&&R.ES)||R.info.EQ.C>=2||fJ()>0||!lld())return!1;var w=R.Uy.get("aitags");if(!w)return!1;w=zj(w).split(",");const p=[];for(const r of R.ES)g.ra(w,r)&&p.push(r);if(!p.length)return!1;R.Uy.set("altitags",g.m3(p.join(",")));return!0}; FAI=function(R,w,p=!1){g.LF(w);R.Yp.lastError="player.exception";R.errorMessage=`${w.name}_${w.message}`;p?g.TF(()=>{ER(R.Yp)}):ER(R.Yp)}; jEd=function(R){R.nU&&(R.xhr.status=R.nU,R.Po=R.nU)}; JWx=function(R,w){R.timing.O0=!0;R.xhr.w3()&&R.timing.I0();R.policy.WB&&R.sV?.stop();OR(R.OZ,w,!1)}; Tnx=function(R,w,p){let r=R.oe?Math.max(w,p/R.oe):w;const f=R.BB.C.O;f&&(r=w,R.oe&&(r=Math.max(w,p/R.oe*f)));yW(R.BB,w,p,r)}; itH=function(R,w,p,r,f,G){R.pB&&(R.pB.add(Math.round(w)),R.pB.add(Math.round(p)),R.pB.add(Math.round(r)),R.pB.add(Math.round(f)),R.pB.add(Math.round(G)),R.pB.add(Math.round(R.WB)))}; QEI=function(R,w,p){switch(w){case 68:R.AK(p);break;case 35:R.UP(p);break;case 44:R.Xq(p);break;case 43:R.ey(p);break;case 53:R.At(p);break;case 56:R.NZ();break;case 57:R.NR(p);break;case 42:R.De(p);break;case 45:R.al(p);break;case 59:R.e5(p);break;case 51:R.w0(p);break;case 49:R.Cc(p);break;case 50:R.H$(p);break;case 47:R.m2(p);break;case 58:R.Dz(p);break;case 61:R.eq(p);break;case 66:R.j$(p);break;case 46:R.AE(p);break;case 67:R.onSnackbarMessage(p);break;case 71:w=OA(p,qV6),R.kY.eG(w)}}; hdL=function(R){n7=R}; kgr=function(R,w,p){var r=R.videoId,f=g.sm(R),G=R.V(),I={html5Preference:"HTML5_PREF_WANTS",lactMilliseconds:String(r1()),referer:document.location.toString(),signatureTimestamp:20529},C=g.SN();R.isAutonav&&(I.autonav=!0);C.vS(141)&&(I.autonavState=C.vS(140)?"STATE_OFF":"STATE_ON");I.autoCaptionsDefaultOn=C.vS(66);AC_(R)&&(I.autoplay=!0);G.U&&R.cycToken&&(I.cycToken=R.cycToken);G.enablePrivacyFilter&&(I.enablePrivacyFilter=!0);R.isFling&&(I.fling=!0);var u=R.forceAdsUrl;if(u){C={};var m=[];u=u.split(","); for(var z of u){var B=z.split("|");B.length!==3||z.includes("=")||(B[0]=`breaktype=${B[0]}`,B[1]=`offset=${B[1]}`,B[2]=`url=${B[2]}`);u={adtype:"video_ad"};for(var W of B){const [X,...Z]=W.split("=");u[X]=Z.join("=")}B=u.url;const O=u.presetad,e=u.viralresponseurl,P=Number(u.campaignid),c=u.bibliotecaadid;if(u.adtype==="in_display_ad")B&&(C.url=B),O&&(C.presetAd=O),e&&(C.viralAdResponseUrl=e),P&&(C.viralCampaignId=String(P)),c&&(C.bibliotecaAdId=c);else if(u.adtype==="video_ad"){const X={offset:{kind:"OFFSET_MILLISECONDS", value:String(Number(u.offset)||0)}};if(u=gNd[u.breaktype])X.breakType=u;B&&(X.url=B);O&&(X.presetAd=O);e&&(X.viralAdResponseUrl=e);P&&(X.viralCampaignId=String(P));c&&(X.bibliotecaAdId=c);m.push(X)}}I.forceAdParameters={videoAds:m,inDisplayAd:C}}R.isInlinePlaybackNoAd&&(I.isInlinePlaybackNoAd=!0);R.isLivingRoomDeeplink&&(I.isLivingRoomDeeplink=!0);z=R.Mp;if(z!=null){z={startWalltime:String(z)};if(W=R.wm)z.manifestDuration=String(W||14400);I.liveContext=z}R.mutedAutoplay&&(I.mutedAutoplay=!0,z=G.getWebPlayerContextConfig(), z?.embedsHostFlags?.allowMutedAutoplayDurationMode&&z?.embedsHostFlags?.allowMutedAutoplayDurationMode.includes(Ht_[R.mutedAutoplayDurationMode])&&(I.mutedAutoplayDurationMode=Ht_[R.mutedAutoplayDurationMode]));if(R.WB?0:R.Af)I.splay=!0;z=R.vnd;z===5&&(I.vnd=z);z={};if(W=R.isMdxPlayback)z.triggeredByMdx=W;if(W=R.AP)z.skippableAdsSupported=W.split(",").includes("ska");if(m=R.Vf){W=R.HE;C=[];for(var x of Vur(m)){m=x.platform;m={applicationState:x.Ln?"INACTIVE":"ACTIVE",clientFormFactor:vNd[m]||"UNKNOWN_FORM_FACTOR", clientName:tuL[x.d$]||"UNKNOWN_INTERFACE",clientVersion:x.deviceVersion||"",platform:NnY[m]||"UNKNOWN_PLATFORM"};u={};if(W){var q=void 0;try{q=JSON.parse(W)}catch(O){g.AO(O)}q&&(u={params:[{key:"ms",value:q.ms}]},q.advertising_id&&(u.advertisingId=q.advertising_id),q.limit_ad_tracking!==void 0&&q.limit_ad_tracking!==null&&(u.limitAdTracking=q.limit_ad_tracking),m.osName=q.os_name,m.userAgent=q.user_agent,m.windowHeightPoints=q.window_height_points,m.windowWidthPoints=q.window_width_points)}C.push({adSignalsInfo:u, remoteClient:m})}z.remoteContexts=C}x=R.sourceContainerPlaylistId;q=R.serializedMdxMetadata;if(x||q)W={},x&&(W.mdxPlaybackContainerInfo={sourceContainerPlaylistId:x}),q&&(W.serializedMdxMetadata=q),z.mdxPlaybackSourceContext=W;I.mdxContext=z;x=w.width;x>0&&(I.playerWidthPixels=Math.round(x));if(w=w.height)I.playerHeightPixels=Math.round(w);p!==0&&(I.vis=p);if(p=G.widgetReferrer)I.widgetReferrer=p.substring(0,128);g.zI(G)&&I&&(I.ancestorOrigins=G.ancestorOrigins);R.defaultActiveSourceVideoId&&(I.compositeVideoContext= {defaultActiveSourceVideoId:R.defaultActiveSourceVideoId});if(G=G.getWebPlayerContextConfig())I.encryptedHostFlags=G.encryptedHostFlags;r={videoId:r,context:f,playbackContext:{contentPlaybackContext:I}};R.lD&&(r.playbackContext.reloadPlaybackContext={reloadPlaybackParams:R.lD?.reloadPlaybackParams});R.contentCheckOk&&(r.contentCheckOk=!0);if(f=R.clientPlaybackNonce)r.cpn=f;if(f=R.playerParams)r.params=f;if(f=R.playlistId)r.playlistId=f;R.racyCheckOk&&(r.racyCheckOk=!0);f=R.V();I=f.embedConfig;R.B1&& f.Y("embeds_enable_per_video_embed_config")?r.serializedThirdPartyEmbedConfig=R.B1:I&&(r.serializedThirdPartyEmbedConfig=I);r.captionParams={};I=g.SN().vS(65);R.deviceCaptionsOn!=null?r.captionParams.deviceCaptionsOn=R.deviceCaptionsOn:g.t5(f)&&(r.captionParams.deviceCaptionsOn=I!=null?!I:!1);R.EN&&(r.captionParams.deviceCaptionsLangPref=R.EN);R.xs.length?r.captionParams.viewerSelectedCaptionLangs=R.xs:g.t5(f)&&(I=g.uk(),I?.length&&(r.captionParams.viewerSelectedCaptionLangs=I));I=R.fetchType==="onesie"&& R.Y("html5_onesie_attach_po_token");G=R.fetchType!=="onesie"&&R.Y("html5_non_onesie_attach_po_token");if(I||G)I=R.V(),I.wg&&(r.serviceIntegrityDimensions={},r.serviceIntegrityDimensions.poToken=I.wg);f.Y("fetch_att_independently")&&(r.attestationRequest={omitBotguardData:!0});r.playbackContext||(r.playbackContext={});r.playbackContext.devicePlaybackCapabilities=PVI(R);r.playbackContext.devicePlaybackCapabilities.supportsVp9Encoding===!1&&R.Ty("noVp9",{});return r}; U2x=function(R,w,p){R.Sa.get(w).onProgress=p}; dK=function(R,w){R.QR(w)&&(n7?R.Sa.get(w).RD.clear():R.Sa.get(w).QL=new oi,R.C(w),R.G=!0)}; S0I=function(R){for(const [w,p]of R.Sa){const r=w;p.vn||dK(R,r)}}; R5D=function(R,w){R=R.Sa.get(w);if(!R)return 0;w=0;if(R.C_.length>0){for(const p of R.C_)w+=p.range?.length||0;return w}if(R.U8.length>0)for(const p of R.U8)w+=p.o5||0;return w+R.xw}; Z7=function(R,w){if(n7){let p=0;R=R.Sa.get(w);if(!R?.RD)return 0;for(const r of R.RD.values())p+=r.data.totalLength;return p}return R.Sa.get(w)?.QL.K()||0}; YQ=function(R,w){R=R.Sa.get(w);if(n7){if(!R?.vn)return!1;w=R.RD.size>0;return R.QP.length>0||w}return!!R?.vn&&!!R?.QL.K()}; wL_=function(R,w){const p=R.Sa.get(w),r=R5D(R,w),f=!r&&!!p.bytesReceived;if(n7){if(R.Z$?.PB){for(var G of p.RD.values())if(!G.MR)return!1;return f}}else if(G=R.IS(w),f&&R.O&&G!==void 0)return G;return(f||p.bytesReceived===r)&&p.JG+Z7(R,w)===p.bytesReceived}; FZ=function(R,w,p,r){w=pLD(R,w,p);p=p.KX;r.C_.push(...w);if(n7)r.rh.has(p)||r.rh.set(p,[]),r.rh.get(p).push(...w);else if(r.OZ)for(const f of w)r.OZ.C_.push(f);else r.OZ=new rRY(R.Ey,[...r.C_]),R.Ey?.wm&&g.K(R,r.OZ);return w}; pLD=function(R,w,p){const r=R.Z$?.G.get(w);if(!r)return[];if(p.MM)return r.D(0,p.clipId)?.C_||[];if(r.O()){var f=p.startMs,G=p.durationMs,I=1E3;R.Ey?.L&&p.timeRange&&(f=p.timeRange.startTicks??-1,G=p.timeRange.Da??-1,I=p.timeRange.timescale??-1);if(p.Bf<0||p.XD<0||G<0||f<0||p.o5<0||I<0)return dK(R,w),[];R=ED(p.Bf,p.o5);w=p.Ae||0;return[new $Y(3,r,R,"makeSliceInfosMediaBytes",p.XD-1,f/I,G/I,w,R.length-w,void 0,p.CS,p.clipId)]}if(p.XD<0)return dK(R,w),[];if(R.Z$?.PB)return G=r.N4,I=G*r.info.hf,w=p.Ae, R.Ey?.L&&R.J.Yn()!=="ONESIE"&&p.timeRange&&!w&&(f=p.timeRange.startTicks/p.timeRange.timescale),[new $Y(3,r,void 0,"makeSliceInfosMediaBytes",p.XD,f,G,w,I,!0,p.CS,p.clipId)];if(R.Ey?.MO&&r instanceof Gn){if(!r.L())return R.Sa.get(w).IW.set(p.KX,p),[];p=p.XD-1;R=r.index.getStartTime(p);f=r.index.getDuration(p);return[new $Y(3,r,void 0,"makeSliceInfosMediaBytes",p,R,f,0,f*r.info.hf)]}return[]}; fg6=function(R,w,p){R.Z$=w;R.Ey=p;for(const [r,f]of R.Sa){w=r;p=f;for(const G of p.XR)FZ(R,w,G,p)}}; GRl=function(R){return R.lF()&&!R.E$}; IgL=function(R){R.policy.mG&&R.hT&&!R.X2?R.X2=!0:R.Hy.I0()}; C7P=function(R,w){let p=-1,r=-1,f=-1;if(R.ZY?.items)for(const G of R.ZY.items)w=C,u=R.Z$.isManifestless,I?(R.L?.rg.event==="predictStart"&&R.L.ykR.K&&(R.K=NaN,R.J=NaN);if(R.L&&R.L.yk===w){if(r=R.L,!R.policy.K||!R.policy.C)if(f&&r){var G=r.rg,I=f.Pc(G);G.event==="predictStart"&&(R.S=w);R.Ty("sdai",{onqevt:G.event,sq:w,mt:p,gab:I,cst:G.startSecs,cueid:R.policy.Fr&&(I||G.event==="start")?G.identifier:void 0},!0);I?G.event!=="predictStart"?(G.event==="start"&&R.S===w-1&&R.Ty("sdai",{gabonstart:w}),r.pw?Tl(R, 4,"cue"):(R.K=w,R.J=p,R.Ty("sdai",{joinad:R.C,sg:R.K,st:R.J.toFixed(3)}),R.U=Date.now(),Tl(R,2,R.C===3?"staftpred":"join"),Wvd(f,r.rg))):(I=xM_(R),w+=Math.max(Math.ceil(-G.L/I),1),G=Math.floor(p-G.L/1E3),R.policy.C?R.O=G:R.G=w,R.Ty("sdai",{onpred:p,estsq:w,estmt:G.toFixed(3)}),QW(R.loader,G,G,w,I),R.U=Date.now(),Tl(R,3,"predict"),Wvd(f,r.rg)):R.C===1?R.u3?.Ug(p)?(QW(R.loader,p,p,w),Tl(R,4,"sk2head")):Tl(R,5,"nogab"):G.event==="predictStart"&&(R.policy.C&&R.O>0?(p=Math.floor(p-G.L/1E3),R.O!==p&&R.Ty("sdai", {updateSt:p,old:R.O}),R.O=p):R.G>0&&(p=w+Math.max(Math.ceil(-G.L/xM_(R)),1),R.G!==p&&(R.Ty("sdai",{updateSt:p,old:R.G}),R.G=p)))}else R.Ty("sdai",{nulldec:1,sq:w,mt:p.toFixed(3),evt:r?.rg?.event||"none"})}else R.C===1&&Tl(R,5,"noad")}; var q8l=function(){return hV[l[5]](this,16,9011)}; var h3=function(R,w,p){return(p<0||p===R.K)&&!isNaN(R.J)?R.J:w},iJ=function(R,w,p){w.startSecs+=isNaN(R.D)?0:R.D; gJL(R.Z$,w,p)},z5b=function(R,w){if(R.L){var p=R.L.rg.W1-(w.startTime+R.D-R.L.rg.startSecs); p<=0||(p=new Ji(R.L.rg.startSecs-(isNaN(R.D)?0:R.D),p,R.L.rg.context,R.L.rg.identifier,"stop",R.L.rg.L+w.duration*1E3),R.Ty("cuepointdiscontinuity",{segNum:w.yk}),iJ(R,p,w.yk))}},xM_=function(R){switch(R.policy.latencyClass){case "LOW":return 2E3; case "ULTRALOW":return 1E3;default:return 5E3}},gK=function(R,w,p,r=!1){r?Tl(R,1,"seek"):w>0&&Math.abs(w-p)>=5&&R.C===4&&Tl(R,5,"sk2t")},LvP=function(R){if(!R)return"unknown"; switch(R){case 5:return"predictStart";case 1:return"start";case 2:return"continue";case 3:return"stop";case 6:return"prefetch";default:return"unknown"}},HW=function(R,w){return w?R.policy.Tw&&w.tileContext?`${w.identifier};${w.tileContext}`:w.identifier:""},qEH=function(R,w){let p=-(w.rg?.Aq||0); w.timeRange&&(p+=(w.timeRange.startTicks||0)/(w.timeRange.timescale||1));return new Ji(p,w.rg?.QN||0,w.rg?.Ft||"",w.rg?.identifier||"",LvP(w.rg?.event),(w.rg?.Aq||0)*1E3,R.policy.Tw?w.tileContext:void 0)},ARP=function(R,w){let p=""; const r=[];for(const [f,G]of R.L.entries()){const I=f,C=G;C?.startTimeSecs<=w&&w<=C?.startTimeSecs+C?.W1&&r.push(I);p+=`${I}:${C?.startTimeSecs.toFixed(3)}:${C?.W1.toFixed(3)};`}r.length===0&&R.Ty("clsdai",{no_cid:1,mt:w.toFixed(3),adConfigMap:p.substring(0,1024)});return r},bzd=function(R,w,p=!1){p&&(R.J=!0); ++R.K;p=6E4*2**R.K;p=(0,g.T)()+p;R.G.set(w.info.id,p)},vW=function(R){for(const [w, p]of R.G.entries()){const r=w;p<(0,g.T)()&&R.G.delete(r)}return R.G},Nw=function(R,w){R.L!==w&&(R.L=w,R.O=!0)},yRL=function(R,w){let p=null; if(R.policy.Qz){let r=[];if(w){const f=g.S_(R.C.C,G=>G.id===w); if(f&&f.DT){const G=f.DT.id;r=g.QD(R.C.C,I=>I.DT?.id===G)}}r.length===0&&(r=g.QD(R.C.C,f=>!!f.DT?.isDefault),w&&R.Ty("iaf",{id:w, sid:r[0]?.id}));r.length>0&&(p=g.S_(r,f=>f.audio.L===R.policy.gz)||r[0])}else w&&(p=g.S_(R.C.C,r=>r.id===w)),p||(p=g.S_(R.C.C,r=>!!r.DT?.isDefault),w&&R.Ty("iaf",{id:w, sid:p?.id}));return p},kQ=function(R){if(!R.C||!R.policy.G&&!R.C.info.DT){var w=R.J.C; R.C&&(w=w.filter(r=>r.audio.L===R.C.info.audio.L),w.length||(w=R.J.C)); R.C=R.Z$.L[w[0].id];if(w.length>1&&!R.policy.q4){if(!R.policy.hW){var p=g.S_(w,r=>r.audio.audioQuality!=="AUDIO_QUALITY_HIGH"); p&&(R.C=R.Z$.L[p.id])}p=!1;if(p=R.policy.Af?!0:R.L.isLocked()?R.L.L<240:VSW(R,R.C))R.C=R.Z$.L[g.Tr(w).id]}}},S$=function(R,w){R.L=w; var p=R.J.videoInfos;if(!R.L.isLocked()){const G=(0,g.T)();p=g.QD(p,function(I){if(I.hf>this.policy.hf)return!1;const C=this.Z$.L[I.id];return vW(this.K).get(I.id)>G||C.EQ.C>4||C.nB>4?!1:this.I0.has(+I.itag)?!1:!0},R); R.K.q3()&&(p=g.QD(p,I=>I.video.width<=854&&I.video.height<=480))}p.length||(p=R.J.videoInfos); let r=p;R.policy.wR&&(r=oyW(R,r,w));r=g.QD(r,w.G,w);if(R.L.isLocked()&&R.K.L){var f=g.S_(p,G=>G.id===R.K.L); f?r=[f]:Nw(R.K,"")}R.policy.wR||(r=oyW(R,r,w));r.length||(r=[p[0]]);r.sort((G,I)=>UR(R,G)-UR(R,I)); for(w=1;wf.video.width?(g.IM(r,w),w--):UR(R,p)*R.policy.U>UR(R,f)&&(g.IM(r,w-1),w--);w=r[r.length-1];R.U0=!!R.O&&!!R.O.info&&R.O.info.wN!==w.wN;R.G=r;R.YY.clear();p=!1;for(f=0;f=1080&&(p=!0);tSb(R.policy,w,R.Z$.PB)},OzY=function(R){var w=R.policy.S; const p=C7(R.xY)/w-UR(R,R.C.info);w=g.wa(R.G,function(r){return UR(this,r)0&&!(UR(R,R.G[w])<=f);w--);for(p=p/R.policy.U-r;w=p);w++);R.nextVideo=R.Z$.L[R.G[w].id];R.U=w}},cRr=function(R,w){if(MSP(R,w))return null; if(w.reason==="m"&&w.isLocked())return S$(R,w),R.U=R.G.length-1,kQ(R),wk(R),R.S=R.S||R.O!==R.nextVideo,R.O=R.nextVideo,new RV(R.C,R.O,w.reason);w.reason==="r"&&(R.X=-1);S$(R,w);wk(R);if(w.reason==="r"&&R.nextVideo===R.O)return new RV(R.C,R.nextVideo,w.reason);R.O&&R.nextVideo&&UR(R,R.O.info)1.5&&R.loader.Ty("overshoot",{sq:w.yk,br:p,max:r}))}},p6=function(R,w,p=!1){bzd(R.K,w,p); R.X=-1;S$(R,R.L)},$Mr=function(R,w){return new RV(R.D,R.O,w||R.L.reason)},UR=function(R,w){if(!R.M0[w.id]){var p=R.Z$.L[w.id].index.td(R.O0,15); p=w.zA&&R.O&&R.O.index.isLoaded()?p||w.zA:p||w.hf;R.M0[w.id]=p}p=R.M0[w.id];R.YY.has(w.itag)&&(p*=1.5);return p*=Math.max(1,R.Qk.QB()||0)},XLd=function(R,w){const p={}; for(const r of w){if(!r||!r.video)continue;w=r.video.qualityOrdinal;const f=p[w],G=f&&f.L()&&f.video.qualityOrdinal>R.policy.DI,I=w<=R.policy.DI?r.L():r.G();if(!f||G||I)p[w]=r}return p},oyW=function(R,w,p){const r=p.reason==="m"||p.reason==="s"; R.policy.bX&&rk&&g.tx&&(!r||p.L<1080)&&(w=w.filter(f=>f.video&&(!f.K||f.K.powerEfficient))); if(w.length>0)if(H1()){const f=XLd(R,w);w=w.filter(G=>!!G&&!!G.video&&G.wN===f[G.video.qualityOrdinal].wN)}else{const f=w[0]?.video?.qualityOrdinal; if(f){p=w.filter(I=>!!I&&!!I.video&&I.video.qualityOrdinal===f); const G=XLd(R,p)[f].wN;w=w.filter(I=>!!I&&!!I.video&&I.wN===G)}}return w},Eyb=function(R){const w=g.S_(R.J.C,r=>r.audio.L),p=g.S_(R.J.C,r=>!r.audio.L); return w?R.policy.gz?w:p:null},VSW=function(R,w){let p=0; for(;p+1r},DMd=function(R,w,p){if(w.info.wN==="f"||R.Jl.includes(tg(w,R.Z$.PB)))return w; for(let r=0;rp.info.itag===w); if(!R)throw Error("Itag "+w+" from server not known.");return R},dMd=function(R){const w=[]; if(R.L.reason==="m"||R.L.reason==="s")return w;if(FpW(R.Z$)){for(let p=Math.max(0,R.U-2);pG?f=0:r[I]>R.buffered[I]&&(I===G-1?f=2:I===G-2&&r[I+1]>R.buffered[I+1]&&(f=3))}R.L.add(w<<3|(p&&4)|f);w=Math.ceil(R.track.Ja()*1E3);R.L.add(w-R.K);R.K=w;if(f===1)for(R.L.add(G),w=0,I=0;I=2&&R.L.add(r[G-1]-R.buffered[G- 1]);p&&R.L.add(p);R.buffered=r},jID=function(R){if(R.policy.wg&&R.policy.U_)for(const w of R.policy.wg){const p=g.Ak(w),r=+p.clen,f=+p.csz; if(r>0&&f>0&&R.policy.G===p.docid&&R.L.info.id===p.fmtid&&R.L.info.lastModified===+p.lmt)return{clen:r,csz:f,ck:p.ck,civ:p.civ}}},IV=function(R){return{downloadedEndTime:Math.round(R.Nw?R.Nw.K:0), maxKnownEndTime:Math.round(R.L.index.kZ()),averageByteRate:Math.round(R.L.info.zA)}},sh=function(R,w=!1){!w||R.indexRange&&R.initRange&&R.Nw||C6(R,new uU("Woffle: Expect isFinal to always have indexRange and initRange and lastSlice")); w={lmt:R.L.info.lastModified,docid:R.policy.G,fmtid:R.L.info.id,type:R.L.info.mimeType.split(";")[0],csz:R.chunkSize,clen:R.G*R.chunkSize+R.C};R.crypto&&(w.ck=R.D,w.civ=R.J);w="local://localhost/videoplayback?"+xE(w);w={itag:+R.L.info.itag,mimeType:R.L.info.mimeType,bitrate:R.L.info.hf*8,lastModified:String(R.L.info.lastModified),initRange:R.initRange?.L(),indexRange:R.indexRange?.L(),url:w};var p=R.L.info.C;p&&(w.xtags=p);if(p=R.L.info.video)if(w.quality=p.quality,w.qualityLabel=p.qualityLabel,w.width= p.width,w.height=p.height,p=p.fps)w.fps=p;if(R=R.L.info.audio){if(p=R.sampleRate)w.audioSampleRate=String(p);if(R=R.numChannels)w.audioChannels=R}return w},mQ=function(R,w,p=!1){w.then(r=>{R.pB.delete(w); (p||r===4)&&R.U.resolve(r)},r=>{R.U.reject(r)})},z6=function(R){return!!R.Nw&&R.Nw.J()},C6=function(R,w){g.Ru(R.policy.G)!==4&&(g.ws(R.policy.G,4),g.AO(w),R.U.reject(new uU(w.message)))},JRL=function(R,w){let p=0; const r=zQ(w.C);if(R.G=r.length)return;if(p<0)throw Error("Missing data");R.G=R.O;R.C=0}for(;p{const f=fa(r,R.Nw.rN.info,sh(R,!0),p,R.policy.Qk,R.G,w,R.crypto);mQ(R,f,!0)})}else C6(R,new uU("Woffle: Expect always re-mark currentChunkOffset at EOS")); else C6(R,new uU("Woffle: Expect at EOS to always have lastSlice or indexRange"))},QId=function(R,w){if(!z6(R)&&!R.cS()){if(!(R.xY||(R.xY=!0,R.O>0))){var p=IV(R); p=fa(R.policy.G,R.L.info,sh(R),p,R.policy.Qk);mQ(R,p)}if(w.info.type===1){if(R.Nw){C6(R,Error("Woffle: Expect INIT slices to always start us off"));return}R.initRange=ED(0,w.C.totalLength)}else if(w.info.type===2)R.Nw&&R.Nw.type===1||C6(R,Error("Woffle: Index before init")),R.indexRange=ED(R.initRange.end+1,w.C.totalLength);else if(w.info.type===3){if(!R.Nw){C6(R,Error("Woffle: Expect MEDIA slices to always have lastSlice"));return}if(R.Nw.type===3&&!eM(R.Nw,w.info)&&(R.X=[],w.info.yk!==P2(R.Nw)|| w.info.L!==0))return;if(w.info.O){for(const r of R.X)JRL(R,r);R.X=[]}else{R.X.push(w);R.Nw=w.info;return}}else{C6(R,Error("Woffle: Unexpected slice type"));return}R.Nw=w.info;JRL(R,w);izd(R)}},TZD=function(R){return{downloadedEndTime:-1, maxKnownEndTime:Math.round(R.L.index.kZ()),averageByteRate:Math.round(R.L.info.zA)}},h5D=function(R){R=g.Uz(R,1886614376); for(const w of R);return g.gd(R,w=>kPd(w))},gyL=function(R){var w=v6(R,(r,f)=>r+f.length,0); w=new Uint8Array(w);let p=0;for(const r of R)w.set(r,p),p+=r.length;return w},vyP=function(R){a:{var w=R.initData; try{var p=0;const f=new DataView(w.buffer);for(;p0){const u=f.getUint32(p+28);I+=u*16+4}const C=f.getUint32(p+I-4);try{const u=HzY(w.subarray(p+I,p+I+C));if(u!==null){var r=u;break a}}catch(u){}p+=G}r=null;break a}catch(f){r=null;break a}r=void 0}if(r!=null){w=eD(b4(r,7,void 0,GG));w==null||R.G3||(R.cryptoPeriodIndex=w);w=eD(b4(r,10,void 0,GG));w!=null&&w>0&&!R.G3&&(R.L= w);for(const f of DQ(r,2,Mq,void 0===hZ?2:4))r=R.O,w=r.push,p=Qh(f),p=g.c8(p,4),w.call(r,p)}},NZY=function(R){return isNaN(R.cryptoPeriodIndex)?g.c8(R.initData):`${R.cryptoPeriodIndex}`},Bj=function(R){if(R.offset>=R.C.totalLength)throw Error(); return WX(R.C,R.offset++)},kRd=function(R,w=!1){var p=Bj(R); if(p===1){w=-1;for(p=0;p<7;p++){var r=Bj(R);w===-1&&r!==255&&(w=0);w>-1&&(w=w*256+r)}return w}r=128;for(let f=0;f<6&&r>p;f++)p=p*256+Bj(R),r*=128;return w?p:p-r},UMI=function(R){try{const w=kRd(R,!0),p=kRd(R,!1); return{id:w,size:p}}catch(w){return{id:-1,size:-1}}},RlY=function(R){var w=new SEI(R),p=-1,r=0; let f=0;for(;!r||!f;){const {id:G,size:I}=UMI(w);if(G<0)return;if(G===176){if(I!==2)return;r=w.L()}else if(G===186){if(I!==2)return;f=w.L()}G===374648427?p=w.L()+I:G!==408125543&&G!==174&&G!==224&&w.skip(I)}w=BX(R,0,p);p=new DataView(w.buffer);p.setUint16(r,3840);p.setUint16(f,2160);r=new oi([w]);uY(r,R);return r},Wj=function(R){R.J?.dispose(); R.J=null},wQd=function(R){return R.C.length?R.C[0]:null},pQD=function(R,w){return R.C.some(p=>p.info.yk===w)},xf=function(R,w){w={rst4disc:w, cd:R.D.toFixed(3),sq:R.I0?R.I0.yk:-1};R.O=NaN;R.D=0;R.YY=-1;R.I0=null;R.nB=NaN;R.PS=NaN;R.jI=null;R.loader.Ty("mdstm",w)},lU=function(R){R.L=null; R.S=-1;R.U=0;R.K=null;R.O0=NaN;R.X=0;R.pB=null},L6=function(R,w){if(w.info.O){R.U0=w.info; if(R.K){var p=R.K,r=ryl(R,!1);p=foY(p);R.loader.bS(R.rN,r,p);R.pB||R.policy.Nk||GAd(R);R.pB=null}lU(R)}R.J&&QId(R.J,w);if(r=R.uC())if(r=r.J(w,R.policy.l7,R.policy.Nl)){R.C.pop();R.C.push(r);return}R.C.push(w)},mzr=function(R,w,p,r=0){if(R.G){var f=R.G.L+R.G.C; if(p.info.L>0)if(p.info.yk===R.G.yk&&p.info.L=0&&R.G.yk>=0&&!eM(R.G,p.info))throw new g.Id("improper_continuation",R.G.EC(),p.info.EC());aYH(R.G,p.info)||xf(R,"d")}else if(p.info.L>0)throw new g.Id("continuation_of_null",p.info.EC());R.G=p.info;R.rN=p.info.rN;if(p.info.L===0){if(R.L)if(!R.loader.isOffline()||R.policy.Ov)R.loader.Ty("slice_not_fully_processed",{buffered:R.L.info.EC(),push:p.info.EC()});else throw new g.Id("slice_not_fully_processed", R.L.info.EC(),p.info.EC());lU(R);R.M0=r}else{if(R.M0&&r&&R.M0!==r)throw R=new g.Id("lmt_mismatch",p.info.yk,R.M0,r),R.level="WARNING",R;!p.info.rN.O()&&R.K&&(r=p.info,f=R.K.segmentNumber,r.D="updateWithEmsg",r.yk=f)}if(R.L){r=R.L.J(p);if(!r)throw new g.Id("failed_to_merge",R.L.info.EC(),p.info.EC());R.L=r}else R.L=p;a:{p=g.nq(R.L.info.rN.info);if(R.L.info.type!==3){if(!R.L.info.O)break a;R.L.info.type===6?Ior(R,w,R.L):CPI(R,R.L);R.L=null}for(;R.L;){r=R.L.C.totalLength;if(R.S<=0&&R.U===0){var G=R.L.C; let m=f=-1;if(p){for(var I=0;I+80))break;if(W!==408125543)if(W===524531317)I=!0,x>=0&&(m=G.L()+x,C=!0);else{if(I&&(W===160||W===163)&&(f<0&&(f=u),C))break;W===163&&(f=Math.max(0,f),m=G.L()+x);if(W===160){f<0&&(m=f=G.L()+x);break}G.skip(x)}}f<0&&(m=-1)}const {mF:z,y$:B}={mF:f,y$:m};if(z<0)break;R.S=z;R.U= B-z}if(R.S>r)break;R.S?(r=umd(R,R.S),r.K&&sq_(R,r),Ior(R,w,r),L6(R,r),R.S=0):R.U&&(r=umd(R,R.U<0?Infinity:R.U),R.U-=r.C.totalLength,L6(R,r))}}R.L&&R.L.info.O&&(L6(R,R.L),R.L=null)},sq_=function(R,w){var p=g.g5(w); if($i(w.info.rN.info)&&w.info.rN.info.video.primaries==="bt2020"){var r=new RH(p);w5(r,[408125543,374648427,174,224,21936,21937])&&(r=r.start+r.pos,p.getUint8(r)===129&&p.getUint8(r+1)===1&&p.setUint8(r+1,9))}r=w.info.rN.info;r.G()&&!$i(r)&&(r=g.g5(w),(new RH(r)).MM(),GV([408125543,374648427,174,224],21936,r));w.info.rN.info.Ih()&&(r=w.info.rN,r.info&&r.info.video&&r.info.video.projectionType==="MESH"&&!r.X&&(g.nq(r.info)?r.X=IYY(p):r.info.G3()&&(r.X=lYW(p))));w.info.rN.info.G3()&&w.info.Ih()&&(p= g.g5(w),(new RH(p)).MM(),GV([408125543,374648427,174,224],30320,p)&&GV([408125543,374648427,174,224],21432,p));if(R.policy.Lf&&w.info.rN.info.G3()){r=g.g5(w);var f=new RH(r);if(w5(f,[408125543,374648427,174,29637])){p=fL(f,!0);f=f.start+f.pos;for(var G=0;Gr.info.Gp+r.C.totalLength,0); R.L&&(w+=R.L.C.totalLength);return w},umd=function(R,w){var p=R.L; w=Math.min(w,p.C.totalLength);if(w===p.C.totalLength)return R.L=null,p;p=r1d(p,w);R.L=p[1];return p[0]},Ior=function(R,w,p){if(p.info.rN.O()){if(R.Qk&&xzd(p)){w=g.g5(p); var r=g.Hn(w,0,1953658222);if(r){r.skip(1);var f=$O(r)<<16|Xc(r),G=f&1,I=f&4;if(f&256){w=f&512;var C=f&1024;f&=2048;var u=dm(r);u<2||(G&&r.skip(4),I&&r.skip(4),G=dm(r),r.skip((u-1)*(4+(w?4:0)+(C?4:0)+(f?4:0))-4),r.data.setUint32(r.offset+r.L,G))}}}if(w=R.xY&&!!R.xY.rN.xY)if(w=p.info.Ih())w=C$I(p),C=R.xY,A7?(r=1/w,w=bU(R,w)>=bU(C)+r):w=R.getDuration()>=C.getDuration(),w=!w;w&&xzd(p)&&(w=R.xY,A7?(r=C$I(p),C=1/r,r=bU(R,r),w=bU(w)+C-r):w=w.getDuration()-R.getDuration(),w=1+w/p.info.duration,rVI(g.g5(p), w))}else{r=!1;R.K||(swx(p),p.L&&(R.K=p.L,r=!0,G=p.info,I=p.L.segmentNumber,G.D="updateWithEmsg",G.yk=I,G=p.L,G.J&&(I=R.rN.index,I.K=!G.J,I.J="emsg"),G=p.info.rN.info,I=g.g5(p),g.nq(G)?SK(I,1701671783):G.G3()&&GV([408125543],307544935,I)));a:if((G=UD(p,R.policy.ag))&&uFb(p))I=loD(R,p),R.D+=I,G-=I,R.X+=G,R.O=R.policy.Sk?R.O+G:NaN;else{if(R.policy.O_){if(I=u=R.loader.gE(g.N9(p),1),R.O>=0&&p.info.type!==6){if(R.policy.Sk&&isNaN(R.PS)){g.AO(new g.Id("Missing duration while processing previous chunk",p.info.EC())); R.loader.isOffline()&&!R.policy.Ov||LTr(R,p,I);xf(R,"m");break a}f=u-R.O;var m=f-R.D;const z=p.info.yk,B=R.I0?R.I0.yk:-1,W=R.nB,x=R.PS,q=R.policy.u_&&f>R.policy.u_,O=Math.abs(m)>10,e=Math.abs(R.O-I)<1E-7;if(Math.abs(m)>1E-4){R.Jl+=1;const P=R.K?.O();m={audio:`${+R.i4()}`,sq:z.toFixed(),sliceStart:u,lastSq:B.toFixed(),lastSliceStart:W,lastSliceDuration:x,totalDrift:(f*1E3).toFixed(),segDrift:(m*1E3).toFixed(),skipRewrite:`${+(q||O)}`};P?.length&&(m.adCpn=P[0]);R.loader.handleError("qoe.avsync",m); R.YY=z}q||O||e||(I=R.O);u=loD(R,p,u);G-=u;R.D=f+u}}else I=isNaN(R.O)?p.info.startTime:R.O;LTr(R,p,I)&&(R.X+=G,R.O=I+G,R.policy.aO&&R.Jl>=R.policy.aO&&(R.Jl=0,R.loader.nX({resetForRewrites:"count"})))}R.I0=p.info;R.PS=kY(p);p.O>=0&&(R.nB=p.O);if(r&&R.K){r=ryl(R,!0);Xh(p.info,r);R.L&&Xh(R.L.info,r);for(C of w)R.policy.J&&C.yk!==R.K?.segmentNumber||Xh(C,r);(p.info.O||R.L&&R.L.info.O)&&p.info.type!==6||(R.pB=r,R.policy.C?(w=foY(R.K),R.loader.bS(R.rN,r,w)):(w=R.loader,w.Z$.isManifestless&&q9L(w,r,null, !!R.rN.info.video)),R.policy.Nk||GAd(R))}}B$H(R,p);R.timestampOffset&&G3l(p,R.timestampOffset)},ryl=function(R,w){let p; const r=R.K;if(p=Skd(r))p.startSecs+=R.O0;const f=R.O0;let G=0;R.rN instanceof V5&&(G=R.rN.N4);return new im(r.segmentNumber,f,w?G:R.X,r.ingestionTime,`sq/${r.segmentNumber}`,void 0,void 0,w,p)},foY=function(R){if(R.pw()){var w=R.data["Stitched-Video-Id"]?R.data["Stitched-Video-Id"].split(",").slice(0,-1):[],p=R.O(); var r=[];if(R.data["Stitched-Video-Duration-Us"])for(var f of R.data["Stitched-Video-Duration-Us"].split(",").slice(0,-1))r.push((Number(f)||0)/1E6);f=[];if(R.data["Stitched-Video-Start-Frame-Index"])for(var G of R.data["Stitched-Video-Start-Frame-Index"].split(",").slice(0,-1))f.push(Number(G)||0);G=[];if(R.data["Stitched-Video-Start-Time-Within-Ad-Us"])for(const I of R.data["Stitched-Video-Start-Time-Within-Ad-Us"].split(",").slice(0,-1))G.push((Number(I)||0)/1E6);R=new Ay6(w,p,r,G,g.wsY(R),g.psd(R))}else R= null;return R},GAd=function(R){const w=R.K,p=Skd(w); p&&(p.startSecs+=R.O0,R.loader.uN(R.rN,p,w.segmentNumber,w.pw()))},loD=function(R,w,p){var r=0; if(w.info.rN.info.G3()&&!uFb(w))return 0;if(R.xY&&!R.i4()){let m=0;p&&g.nq(w.info.rN.info)?m=p-R.O:w.info.rN.info.G3()&&(m=R.D);var f=w.info.yk;p=UD(w,R.policy.ag);var G=R.xY;const {nW:z,uw:B}={nW:G.YY,uw:G.D};G=Math.abs(B-m)>.02;if((f===z||f>z&&f>R.YY)&&G){r=Math.max(.95,Math.min(1.05,(p-(B-m))/p));if(g.nq(w.info.rN.info))rVI(g.g5(w),r);else if(w.info.rN.info.G3()&&(G=m-B,!g.nq(w.info.rN.info)&&(w.info.rN.info.G3(),r=new RH(g.g5(w)),f=w.K?r:new RH(new DataView(w.info.rN.C.buffer)),UD(w,!0)))){var I= G*1E3,C=B2(f);f=r.pos;r.pos=0;if(r.L.getUint8(r.pos)===160||W2(r))if(r5(r,160))if(fL(r,!0),r5(r,155)){G=r.pos;var u=fL(r,!0);r.pos=G;I=I*1E9/C;C=CL(r);I=C+Math.max(-C*.7,Math.min(C,I));I=Math.sign(I)*Math.floor(Math.abs(I));if(!(Math.ceil(Math.log(I)/Math.log(2)/8)>u)){r.pos=G+1;for(G=u-1;G>=0;G--)r.L.setUint8(r.pos+G,I&255),I>>>=8;r.pos=f}}else r.pos=f;else r.pos=f;else r.pos=f}r=UD(w,R.policy.ag);r=p-r}r&&w.info.rN.info.G3()&&R.loader.Ty("webmDurationAdjustment",{durationAdjustment:r,videoDrift:m+ r,audioDrift:B})}return r},LTr=function(R,w,p){if(!f6W(w,p))return w=aH(w.info),w.smst="1",R.loader.handleError("fmt.unparseable",w||{},1),!1; isNaN(R.O0)&&(R.O0=p);return!0},xzd=function(R){return R.info.rN.O()&&R.info.yk===R.info.rN.index.ea()},bU=function(R,w=0){w=w?Math.round(R.timestampOffset*w)/w:R.timestampOffset; R.rN.xY&&w&&(w+=R.rN.xY.L);return w+R.getDuration()},bl6=function(R,w){w<0||(R.C.forEach(p=>{G3l(p,w)}),R.timestampOffset=w)},oV=function(R,w=!1){var p=R.loader.getCurrentTime(); if(R.policy.hP){var r=R.loader.N8();isNaN(r)||(p=r-R.loader.vB())}var f=R.O.uC();let G=f?.info.K||0;if(R.policy.C2&&!isFinite(p))return 0;f?.info.rN.O0()&&!f.info.O&&(R.policy.hM?G=f.info.G:R.policy.X3&&(r=f.info,G=r.range?r.K:Math.min(r.startTime+Math.min(r.duration*r.L/r.rN.info.hf,r.duration)+(r.range?r.U:Math.min(r.duration,r.duration*r.C/r.rN.info.hf)),r.startTime+r.duration)));if(!R.Vh){if((R.policy.L||R.policy.M6)&&w&&!isNaN(p)){if(f)return G-p;if(R.policy.M6&&R.rN.info.wN==="f")return Infinity}return 0}if((r= yL(R))&&VL(r))return r.K;var I=R.Vh.f3(!0);if(w&&f)return r=0,R.policy.L&&(r=hC(I,G+.02)),r+G-p;w=hC(I,p);R.policy.Yk&&r&&(f=ji(I,p),I=ji(I,r.G-.02),f===I&&(p=r.K-p,R.policy.O&&p>w+.02&&R.Ty("abh",{bh:w,bhtls:p}),w=Math.max(w,p)));return w},h3D=function(R){R.J=!0; R.G=!0;R.K=-1;xQ(R,Infinity)},zl=function(R){for(const w of R.C)t7(R,w); R.C=[];R.L=null},BW=function(R,w,p=!1){if(R.Vh){const r=R.Vh.f3(),f=TO(r,w); let G=NaN;const I=yL(R);I&&(G=TO(r,I.rN.index.getStartTime(I.yk)));if(f===G&&R.L&&R.L.C&&yyH(Oh(R),0))return w}R=K6(R,w,p);return R>=0?R:NaN},xQ=function(R,w,p){R.rN.L(); var r=K6(R,w);if(r>=0)return r;R.D?.S(w,p);r=Math;var f=r.min,G=R.O;if(G.J)if(G=G.J,G.Nw&&G.Nw.type===3)G=G.Nw.startTime;else if(G.O>0){var I=G.L.index;I=g.VU(I.offsets.subarray(0,I.count),G.O*G.chunkSize);G=G.L.index.getStartTime(I>=0?I:Math.max(0,-I-2))}else G=0;else G=Infinity;w=f.call(r,w,G);R.L=R.policy.xY?null:R.rN.J(w).C_[0];Eh(R)&&(R.policy.Sp&&p?.seekSource===60||R.Vh&&R.Vh.abort(),R.policy.iE&&R.D?.D());R.M0=0;return R.L?R.L.startTime:w},lJ=function(R){return wQd(R.O)},V3D=function(R,w){return!!R.D?.pB(w)|| pQD(R.O,w)},Dd=function(R,w,p=!1){w&&A7&&bl6(R.O,w.QO()); p||R.D?.J();R.Vh=w;R.D?.xY(R.Vh)},yL=function(R){return R.policy.Gw?R.D?.I0()||null:R.Vh&&R.Vh.sx()},o3r=function(R){const w={}; for(let p=0;p4&&R.xY.shift()},t3l=function(R,w){if(w.nJ()){const p=w.VI(); for(const r of p)R.policy.O&&w instanceof sR&&R.Ty("omblss",{s:r.info.EC()}),Mk(R,w.info.C_,r,w.nx())}},Mk=function(R,w,p,r=0){isNaN(R.pB)||(R.Ty("aswm",{sq:w[0].yk, id:w[0].rN.info.itag,xtag:w[0].rN.info.C,ep:Date.now()-R.pB}),R.pB=NaN);switch(p.info.type){case 1:case 2:OlP(R,p);break;case 4:var f=p.info.rN;const G=f.U0(p);R.L?.X()&&dYP(p.info,R.L)&&(R.L=f.M0(R.L).pop());for(const I of G)Mk(R,w,I,r);break;case 3:p.info.rN.info.video?(f=R.timing,f.I0||(f.I0=(0,g.T)(),g.qm("fvb_r",f.I0,f.L))):(f=R.timing,f.J||(f.J=(0,g.T)(),g.qm("fab_r",f.J,f.L)));mzr(R.O,w,p,r);R.policy.L&&KTx(R);break;case 6:mzr(R.O,w,p,r),R.L=p.info}},OlP=function(R,w){if(w.info.type===1)if(w.info.rN.info.video){var p= R.timing; p.Jl||(p.Jl=(0,g.T)(),g.qm("vis_r",p.Jl,p.L))}else p=R.timing,p.U||(p.U=(0,g.T)(),g.qm("ais_r",p.U,p.L));CPI(R.O,w);R=R.loader;R.videoTrack.rN.L()&&R.audioTrack.rN.L()&&R.policy.L&&!R.Z$.PB&&(w=R.audioTrack.getDuration(),p=R.videoTrack.getDuration(),Math.abs(w-p)>1&&R.Ty("trBug",{af:`${g.ZK(R.audioTrack.rN.info,!1)}`,vf:`${g.ZK(R.videoTrack.rN.info,!1)}`,a:`${w}`,v:`${p}`}))},KTx=function(R){R.C.length?R.L=g.Tr(g.Tr(R.C).info.C_):R.O.C.length?R.L=R.O.uC().info:R.L=yL(R)},cj=function(R,w){const p= {nL:[], k7:[]};return R.D?.X(w)??p},K6=function(R,w,p=!1){if(!R.L||!R.L.C)return NaN; R=Oh(R);w=E3d(R,w+.02,p);return w<0?NaN:yyH(R,p?w:0)?R[w].startTime:NaN},Eh=function(R){var w; !(w=R.rN.info.wN==="f")&&(w=R.policy.G)&&(w=R.O,w=!!w.J&&z6(w.J));if(w)return!0;w=yL(R);if(!w)return!1;const p=VL(w)&&w.O;return R.isManifestless&&R.O0>0?p||w.yk>=R.O0:p},Pj=function(R){let w=0; for(const p of R.C)w+=YfY(p.info);return w+=WTW(R.O)},VL=function(R){return R?R.J():!1},DzL=function(R){const w=yL(R); return w?w.K-R.loader.getCurrentTime():0},aV=function(R,w,p,r){if(!R.rN.index.IA(w,!0))return!1; try{zl(R);var f=R.O;let G=null;for(let I=f.C.length-1;I>=0;I--){const C=f.C[I];C.info.yk>=w&&(f.C.pop(),f.O-=UD(C,f.policy.ag),G=C.info)}G&&(f.G=f.C.length>0?f.C[f.C.length-1].info:f.jI,f.C.length!==0||f.G||xf(f,"r"));f.loader.Ty("mdstm",{rollbk:1,itag:G?G.rN.info.itag:"",popped:G?G.yk:-1,sq:w,lastslc:f.G?f.G.yk:-1,lastfraget:f.O.toFixed(3)});if(R.policy.L)return R.L=null,!0;r>p?xQ(R,r):R.L=R.rN.K(w-1,!1).C_[0]}catch(G){return w=ru(G),w.details.reason="rollbkerr",R.loader.handleError(w.errorCode, w.details,w.severity),!1}return!0},t7=function(R,w,p=!1){elD(R,w,p); w.dispose()},$f=function(R){const w=R.O.uC(); return w?w.info:yL(R)},Xy=function(R,w){let p; for(p=0;pZQd(f,r))?(R.L=r,R.policy.O&&R.Ty("cer",{lsr:"lsp", lsp:r.EC()})):(c2(w.info.C_[0])?(R.L=w.OZ&&w.OZ.O?Xsx(w.OZ.O):$YD(w.info.C_[0]),R.policy.O&&R.Ty("cer",{lsr:R.L.EC(),lsp:r?.EC()})):(R.L=null,R.policy.O&&R.Ty("cer",{lsr:"null",lsp:r?.EC()})),R.loader.isOffline()&&!R.policy.Ov||t7(R,w,!0))}},n6=function(R){return Eh(R)||VL(R.O.uC()?.info)},Oh=function(R){let w=[]; const p=yL(R);p&&w.push(p);w=g.si(w,R.O.O5());for(const r of R.C)for(const f of r.info.C_)r.SJ&&(w=g.QD(w,G=>!dYP(G,f))),(c2(f)||f.X())&&w.push(f); R.L&&!cVd(R.L,g.Tr(w),R.L.rN.O())&&w.push(R.L);return w},yyH=function(R,w){if(!R.length)return!1; for(w+=1;w=w)return f}return r},dk=function(R){return!(!R.L||R.L.rN===R.rN)},M3H=function(R,w,p){return R.policy.L?oV(R,!0)w&&R.Kw.wH)},$zb=function(R,w){const p=lJ(R); return p&&p.info.type!==6?!w.pB(R,p.info.yk):!1},XQH=function(R,w){for(const p of R.X)if(p.segmentNumber===w)return p.jj?2:1; return 0},dzY=function({hasSubfragmentedFmp4:R=!1, Ux:w=!1}={}){const p=new n3b;p.Tm=R||w;return p},Yf=function(R){return R.L&&R.t8&&R.playbackStartPolicy},tSb=function(R,w,p=!1){w.video.qualityOrdinal>1080&&!R.C0&&(R.jI=36700160,R.N0=5242880,R.PS=Math.max(4194304,R.PS),R.C0=!0); w.video.qualityOrdinal>2160&&!R.xs&&(R.jI=104857600,R.hf=13107200,R.xs=!0);g.Iq(R.zy.experiments,"html5_samsung_kant_limit_max_bitrate")!==0?w.isEncrypted()&&g.IN()&&g.fh("samsung")&&(g.fh("kant")||g.fh("muse"))&&(R.hf=g.Iq(R.zy.experiments,"html5_samsung_kant_limit_max_bitrate")):w.isEncrypted()&&g.IN()&&g.fh("kant")&&(R.hf=1310720);R.GJ!==0&&w.isEncrypted()&&(R.hf=R.GJ);R.K4!==0&&w.isEncrypted()&&p&&(R.hf=R.K4);w.hf&&(R.QA=Math.max(R.mj,Math.min(R.PS,5*w.hf)))},Fy=function(R,w,p=0){return g.Iq(R.zy.experiments, w)||p},jk=function(R,w,p,r){R.t8&&(R.playbackStartPolicy=w,R.IQ=p,R.hh=r)},pbP=function(R,w){if(w<0)return!0; const p=R.ea();return w0)return 2;if(w<0)return 1;p=R.ea();return w(0,g.T)()?0:1},T6=function(R,w,p){if(R.policy.Pw)return!1; var r=R.L;var f=w.L?.xY()||-1;r.C===3&&f+1>=r.G?(r.Ty("sdai",{haltrq:f+1,est:r.G}),r=!1):r=r.C!==2;if(!r||!(w.L?w.L.rN.EQ:w.rN.EQ).D(R.policy,R.O,R.loader.XO)||R.loader.isSuspended&&(!J7(R.schedule)||R.loader.kE))return!1;if(R.policy.G&&rs>=5)return R.loader.DF.ql(),!1;if(R.Z$.isManifestless){if(w.C.length>0&&w.L&&w.L.yk===-1||w.C.length>=R.policy.kL||!R.policy.Li&&w.C.length>0&&!R.policy.D.Tm)return!1;if(w.J)return!R.Z$.isLive||!isNaN(R.Ou)}if(ao_(w))return!1;if(!w.L){if(!w.rN.L())return!1;xQ(w, R.loader.getCurrentTime())}if(lJ(w)&&(w.uC()!==lJ(w)||R.loader.isSuspended))return!1;f=(r=R.policy.i7)&&!w.C.length&&oV(w,!0)=R.policy.HE)return!1;r=w.L;if(!r)return!0;r.X()&&r.rN.L()&&(w.L=g.Tr(r.rN.M0(r)),r=w.L);if(!r.J()&&!r.rN.G(r))return!1;G=R.Z$.yv||R.Z$.O;if(R.Z$.isManifestless&&G){G=w.rN.index.ea();var I=p.rN.index.ea();G=Math.min(G,I);if(w.rN.index.cj()> 0&&G>0&&r.yk>=G)return w.O0=G,p.O0=G,!1}if(r.rN.info.audio&&r.X()||r.J())return!1;G=!w.G&&!p.G;if(f=!f)f=r.K,f=!!(p.L&&!VL(p.L)&&p.L.KFTd(R,w)?(FTd(R,w),!1):(R=w.Vh)&&R.isLocked()?!1:!0},kf=function(R,w){R.loader.nu(w); var p=YfY(w),r=R.loader.lM();p={BB:R.schedule,aM:p,TW:$mL(R.G,p),HC:M9(w.C_[0]),Il:AQ(88,8668,w.EQ.L),qh:R.policy.O,Wc:(f,G)=>{R.loader.yK(f,G)}}; R.schedule.C.J&&(p.oe=(R.videoTrack.rN?.info.hf||0)+(R.audioTrack.rN?.info.hf||0));R.n2&&(p.yk=w.C_[0].yk,p.Ou=w.Ou,p.n2=R.n2);r={M8:FjD(w,R.loader.getCurrentTime()),ES:R.policy.h8&&d5(w)&&w.C_[0].rN.info.video?dMd(R.C):void 0,ZO:R.policy.M0,poToken:R.loader.hU(),mP:R.loader.Xb(),RY:R.RY,St:isNaN(R.St)?null:R.St,A8:R.A8,fA:R.fA,rr:r};return new ml(R.policy,w,p,R.O,(f,G)=>{try{a:{const Gr=f.info.C_[0].rN,Il=Gr.info.video?R.videoTrack:R.audioTrack;if(!(f.state>=2)||f.isComplete()||f.aJ()||!(!R.loader.un|| R.loader.isSuspended||oV(Il)>3)){const FW=ZlY(f,R.policy,R.O);FW===1&&(R.S=!0);jq6(R,f,FW);if(f.isComplete()||f.cS()&&G<3){if(R.policy.O){const tY=f.timing.X();tY.rst=f.state;tY.strm=f.xhr.w3();tY.cncl=f.xhr&&f.Yp.K?1:0;R.loader.Ty("rqs",tY)}f.Y5&&R.loader.Ty("sbwe3",{},!0)}if(!R.cS()&&f.state>=2){mMY(R.timing,f,Gr);var I=R.loader;R.St&&f.If&&I&&(R.St=NaN,R.loader.pP(f.If),R.loader.Vi(),R.loader.Ty("cabrUtcSeek",{mediaTimeSeconds:f.If}));f.jp&&R.St&&f.jp&&!f.jp.action&&(R.loader.jx(R.St),R.St=NaN, R.loader.Ty("cabrUtcSeekFallback",{targetUtcTimeSeconds:R.St}));f.w9&&R.loader.Dz(f.w9);R.policy.WB&&(R.fA=f.fA);if(f.state===3){Xy(Il,f);d5(f.info)&&iU(R,Il,Gr,!0);if(R.u3){const tY=f.info.z8();tY&&R.u3.gw(f.info.C_[0].yk,Gr.info.id,tY)}R.loader.Fo()}else if(f.isComplete()&&f.info.C_[0].type===5){if(f.state!==4)f.Y7()&&R.loader.handleError(f.Tg(),f.J9());else{var C=(f.info.C_[0].rN.info.video?R.videoTrack:R.audioTrack).C[0]||null;C&&C instanceof ml&&C.aJ()&&C.py()}f.dispose()}else{if(!f.Y7()&&f.wH&& f.state>=2&&f.state!==3){var u=f.xhr.getResponseHeader("X-Response-Itag");if(u){var m=nyI(R.C,u),z=f.info.O;if(z){var B=z-m.jI();m.pB=!0;f.info.C_[0].rN.pB=!1;var W=m.D(B);f.info=W;if(f.OZ){var x=f.OZ,q=W.C_;(q.length!==x.C_.length||q.length=R.policy.LV&&R.u3&&f.info.isDecorated()&&j_==="net.badstatus"&&Hj(R.u3,aK,hY))){var P=(tY.info.video&&tY.EQ.C>1||f.Po===410||f.Po===500||f.Po===503)&&!(vW(R.C.K).size>0)&&!AQ(91,8671,tY.EQ.L),c=f.J9(),X=tY.info.video?R.videoTrack:R.audioTrack;P&&(c.stun="1");R.loader.handleError(j_,c);R.cS()||(P&&p6(R.C,tY),Xy(X,f),R.loader.Fo())}}else m=1,R.u3&&f.info.isDecorated()&& j_==="net.badstatus"&&Hj(R.u3,aK,hY)&&(m=0),R.Z$.isLive&&f.Tg()==="net.badstatus"&&R.K<=R.policy.gS*2?(hEd(R.Z$),R.Z$.yv||R.Z$.isPremiere?A3(R.loader,0,{dB:"badStatusWorkaround"}):R.Z$.O?A3(R.loader,R.Z$.Vm,{dB:"badStatusWorkaround",gE:!0}):vj(R.loader)):R.loader.handleError(j_,f.J9(),m);isNaN(R.St)||(R.loader.jx(R.St),R.St=NaN)}R.policy.Mr&&!f.isComplete()?Nk(R.loader):R.loader.Fo();var Z=Y9d(f,R.policy,R.O);jq6(R,f,Z)}}}}}catch(Gr){Z=R.pB?1:0,R.pB=!0,f=wu(Z),Z=ru(Gr,Z),R.loader.handleError(Z.errorCode, Z.details,Z.severity),f||R.loader.xU()}},r)},T$r=function(R,w,p){if(T6(R,w,p)){p=R.J(w,p); if(R.u3){var r=p.C_[0].rN.info.id;var f=R.L;var G=p.C_[0].yk;f=G<0&&!isNaN(f.K)?f.K:G;G=h3(R.L,p.C_[0].G,f);const u=w===R.audioTrack?1:2,m=p.C_[0].rN.info.wN,z=r.split(";")[0];a:{var I=R.L;if(I.L){var C=I.L.rg.event;if(I.L.yk===f){I=C==="predictStart"?void 0:I.L.rg.event;break a}if(I.L.yk===f-1){I=C==="start"||C==="continue"?C:void 0;break a}}I=void 0}if(R.policy.Jl&&R.L.C!==0)r=g.Jyx(R.u3,G,f,r,u,m,I),f<0&&u===2&&gK(R.L,0,0,!0),r&&(R.loader.Ty("sdai",{ssdaiinfo:"1",ds:r.AM?.RB||"",skipsq:r.AM?.y9|| -1,itag:z,f:m,sg:f,st:G.toFixed(3)}),p.G=r);else if(r=R.u3.z8(G,f,r,u,m,I),f<0&&u===2&&gK(R.L,0,0,!0),r){G={dec_sq:f,itag:z,st:G.toFixed(3)};if(R.policy.Z9&&w.isRequestPending(f-1)){R.loader.Ty("sdai",{wt_daistate_on_sg:f-1});return}R.loader.Ty("sdai",G);r&&(p.L=new g.uh(r));R.policy.O&&(f=p.EQ.Ex("id")||"",r=p.L?.get("id")||"",f!==r&&R.loader.Ty("stmidmismatch",{cid:f,aid:r}))}else R.L.C!==5&&R.loader.Ty("sdai",{nodec_sq:f,itag:z,st:G.toFixed(3)})}R.policy.Tf&&p.C_[0].yk!==-1&&p.C_[0].yk0&&(p=((0,g.T)()-R.loader.Vw)/1E3,w=Math.min(w,R.policy.mq+R.policy.qH*p));w=R.loader.getCurrentTime()+w;return R.policy.bb&&(p=ilY(R.loader)+R.policy.bb,p=0||w.EQ.Ex("defrag")==="1"||w.EQ.Ex("otf")==="1"){w=null;break a}f=ED(0,4096)}f=new TV([new $Y(5,r.rN,f,"createProbeRequestInfo"+r.D,r.yk)],w.C);f.pS=p;f.L=w.L;w=f}w&&kf(R,w)}},iU=function(R,w,p,r){if(!(p.L()||p.I0()||p.pB||!p.EQ.D(R.policy,R.O,R.loader.XO)||p.info.wN==="f"||R.policy.L)){if(r){r=R.G; var f=p.info;r=Xor(r,f.video?r.policy.JP:r.policy.t6,f.hf)}else r=0;r=p.D(r);R=kf(R,r);nL(r)&&ek(w,R);p.pB=!0}},h7=function(R,w){if(R.policy.useUmp&&w.cS())return!1; try{var p=w.info.C_[0].rN;const I=p.info.video?R.videoTrack:R.audioTrack;var r=I;if(R.Z$.isManifestless&&r){R.K=0;r.J&&(w.cS(),w.isComplete()||w.nJ(),r.J=!1);w.O9()&&R.loader.HL.wY(1,w.O9());var f=w.cj(),G=w.Jd();Oq(R.Z$,f,G)}if(w.info.HC()&&!nL(w.info))for(const u of w.VI())OlP(I,u);r=I;for(R.loader.getCurrentTime();r.C.length&&r.C[0].state===4;){const u=r.C.shift();t3l(r,u);r.Jl=u.Mo()}r.C.length&&t3l(r,r.C[0]);const C=!!lJ(I);C&&w instanceof sR&&(p.info.i4()?sIP(R.timing):uPd(R.timing));return C}catch(I){w= w.J9();w.origin="hrhs";a:{R=R.loader;p=I;if(p instanceof Error){w.msg||(w.msg=`${p.message}`);w.name||(w.name=`${p.name}`);if(p instanceof g.Id&&p.args)for(const [C,u]of Object.entries(p.args))w[`arg${C}`]=`${u}`;g.AO(p);if(p.level==="WARNING"){R.CB.nX(w);break a}}R.handleError("fmt.unplayable",w,1)}return!1}},hlY=function(R){const w=R.videoTrack.rN.index; R.n2=new QqP({e_:R.policy.e_,Tm:R.policy.D.Tm,zH:w.vj(),ea:()=>w.ea(), SE:()=>w.SE()})},g3_=function(R,w,p=0,r){w!==R.G&&(R.G&&(R.O0=!0),R.G=w,R.w2(w,R.videoTrack,p,r))},r3=function(R,w="",p=""){R=new g.uh(R,!0); R.set("alr","yes");p&&(p=rg(11,6773,KA(23,5420,p)),R[l[15]](w,SD(48,2712,p)));return R},Hll=function(R){if(R.C?.isLocked())return R.videoInfos; const w=vW(R.L);let p=g.QD(R.videoInfos,r=>r.hf>R.Ey.hf?!1:!w.has(r.id)); R.L.q3()&&(p=g.QD(p,r=>r.video.width<=854&&r.video.height<=480)); return p},v3Y=function(R,w){const p=[]; for(const r of w)p.push(g.ZK(r,R.Z$.PB));return p},N$I=function(R,w,p=0,r){if(R.D&&w!==R.K)return!0; R.D=!1;w!==R.K&&(R.K=w,R.w2(w,R.audioTrack,p,r));return!1},kAd=function(R,w){return R.Ey.Sl&&w.reason==="l"||R.Ey.il?!1:R.Ey.E_?!0:w.reason==="l"||w.reason==="b"||w.reason==="o"},UzH=function(R,w){const p=R.L.L; if(p){R.videoInfos=R.J;var r=g.S_(R.videoInfos,f=>f.id===p); r&&r.video.qualityOrdinal===w?R.videoInfos=[r]:(r=R.videoInfos.map(f=>f.id),R.loader.Ty("sabrpf",{pfid:`${p}`, vfids:`${r.join(".")}`}),Sk(R,w,w),Nw(R.L,""))}else Sk(R,w,w)},Sk=function(R,w,p){R.videoInfos=R.J; R.videoInfos=g.QD(R.videoInfos,r=>r.video.qualityOrdinal>=w&&r.video.qualityOrdinal<=p)},S9r=function(R,w){R.Ey.YY()&&(R.xY=w.reason==="m"||w.reason==="l"?!0:!1); w.reason==="m"?w.isLocked()&&UzH(R,w.L):kAd(R,w)?Sk(R,w.C,w.L):R.videoInfos=R.J;R.X=!0;R.C=w},Rb=function(R,w){return R.map(p=>oH(g.ZK(p,w)))},RRd=function(R,w,p){if(R.U){var r=g.QD(R.O,f=>f.id===R.U); return Rb(r,p).includes(w)}r=g.QD(R.O,f=>!!f.DT?.isDefault); return r.length>0?Rb(r,p).includes(w):Rb(R.O,p).includes(w)},w9=function(R,w,p=!1){bzd(R.L,w,p)},pnH=function(R,w,p,r){const f=R.Z$; var G=R.CB.getVideoData(),I=R.NW;const C=nNb({BB:R.BB,zy:G.V(),CB:R.CB,Zo:R.Zo,Ey:R.Ey,Gq:R.Gq,Uh:R.Uh,ys:R.ys,FU:R.FU,Vb:R.Vb,Wu:R.Wu,iY:R.iY,sabrLicenseConstraint:G.sabrLicenseConstraint,Zb:R.Zb,Qs:R.Qs,yA:R.yA,Zd:R.Zd,j7:!!I,authorizedFormats:G.authorizedFormats,Pt:R.Pt,q3:R.q3,zn:R.zn,s$:R.s$}),u=XZ(G,R.rr,R.nextRequestPolicy,R.fb,R.sN,R.Q3,R.JD);p&&w&&(p=u.Jc?u.Jc.map(B=>B.type):[],w("sabr",{stmctxt:p.join("_"), unsntctxt:u.dW?u.dW.join("_"):""}));w=R.Aw;p=R.e2;p===void 0&&w===void 0&&(p=wnb(f.PB,R.eV?.video),w=wnb(f.PB,R.eV?.audio));let m;G.A8&&(m=G.A8);let z;(G=R.Ey?.nN)&&G>0&&(R.zn||R.qV)&&(z=new Uint8Array(G));I={jk:C,k7:R.k7,Aw:w,e2:p,NW:I,videoPlaybackUstreamerConfig:m,gh:u,ej:z};r&&R.vc?R.vc.length>0&&(I.vc=R.vc):R.AM&&(I.AM=R.AM);R.Ey?.YY()&&!H1()&&(R.Id&&(I.Id=R.Id),R.Or&&(I.Or=R.Or));I.nL=R.nL;I.Gu=f.q0;return I},wnb=function(R,w){return w?[g.ZK(w.info,R)]:[]}; var WGY=function(R,w){return AQ[l[5]](this,16,4665,R,w)}; fHr=function(R,w,p){w=y6(R.EQ,rir(R,w,p),w);R.XY()&&w.set("probe","1");return w}; px=function(R){const w={},p=[],r=[];if(!R.data)return w;for(var f=0;f{w=Number(p);return`${w===1?2:w-1}---`})}; lHW=function(R,w=!1,p){var r=Sz(R.LB.experiments,"debug_bandaid_hostname");return r?(w=g.Iq(R.LB.experiments,"debug_bandaid_port"),r=w>0?`${r}:${w}`:r,w=R.LB.experiments.XB("debug_bandaid_insecure_scheme"),Ib(R,r,w)):w&&p?.url&&!R.C?(r=AQ(71,8311,new g.uh(p.url)),Ib(R,r)):R.L.get(0)?.location.clone()}; ux=async function(R,w){var p=Ib(R,"redirector.googlevideo.com");p.set("alr","yes");p.set("id",`${Math.round(Math.random()*1E5)}`);if(w===1||w===2)p.set("cmo=sensitive_content","yes"),p.set("sc","yes");w===2&&p.set("cmo=td","c.youtube.com");var r=await Th(p.qk(),{format:"RAW",timeout:5E3});if(r.xhr.status!==200||!r.xhr.responseText)return Promise.reject(new g.Id("b204258371_no_host",p.qk(),r.xhr.status));var f=new g.uh(r.xhr.responseText);p=AQ(75,8315,f);r=f.get("ms");R=Ib(R,p);f=f.get("mm");R.set("ms", r);R.set("mm",f);return p&&Lql(p)?w!==2||Cx(p)?R:Promise.reject(new g.Id("b204258371_untrusted",p,r)):Promise.reject(new g.Id("b204258371_invalid",p,r))}; qzW=function(R,w){R=`https://${w.L()}/initplayback?c=${Uq(R.LB)}`+"&owc=1";p7(R,"pw",p=>{p.ht=w.C})}; s5=function(R,w,p,r){p7(`https://${w}/videoplayback?probe=1`,p,f=>{!r.Y("html5_onesie_host_racing")||r.videoData.isLivePlayback||r.Y("html5_onesie_probe_ec_hosts")||r.Xe||r.XF();R.O.push(f)},f=>{R.O.push(f.details)})}; Lql=function(R){return/.*(\.c\.youtube\.com|.*\.googlevideo\.com)/.test(R)}; Cx=function(R){const w=/sn-[^.]*-/;return/.*\.c\.youtube\.com/.test(R)&&!w.test(R)}; mt=function(R){for(;R.L.length&&!R.L[0].isEncrypted;){const {videoId:p,KX:r,formatId:f,buffer:G,E1:I}=R.L.shift();if(G)R.cC.kY.SC?.get(p)?.L(r,f,G);else if(I)R.cC.kY.Qb(p,r,f);else{var w=R.cC;w.L[f].uj=!0;w=w.kY.SC?.get(p);w?.QR(f)&&w?.C(f)}}}; g.VKd=function(R){for(;!R.G&&!R.error;){var w=R;w.G=!!zk(w,1);switch(zk(w,2)){case 2:var p=void 0,r=[],f=[];f.length=19;f.fill(0);var G=zk(w,5)+257;p=zk(w,5)+1;var I=zk(w,4)+4;for(var C=0;C0;u--)r.push(C)}r.length!==I?w.error=!0:(p=r.slice(-p),r.length=G,yid(w,r,p));break;case 1:yid(w,W_,xU);break; case 0:lx(w,w.L&7);r=zk(w,16);G=zk(w,16);(r^G)!==65535&&(w.error=!0);w.output.set(w.data.subarray(w.C,w.C+r),w.O);w.C+=r;w.O+=r;break;default:w.error=!0}R.O>R.output.length&&(R.output=new Uint8Array(R.O*2),R.O=0,R.C=0,R.G=!1,R.L=0,R.register=0)}R.output.length!==R.O&&(R.output=R.output.subarray(0,R.O));return R.error?new Uint8Array(0):R.output}; zk=function(R,w){for(;R.L=R.data.length)return R.error=!0,0;R.register|=R.data[R.C++]<>=w;R.L-=w;return p}; yid=function(R,w,p){w=B_(w);p=B_(p);const r=R.data,f=R.output;let G=R.O;for(var I=R.register,C=R.L,u=R.C;;){if(C<15){if(u>r.length){R.error=!0;break}I|=(r[u+1]<<8)+r[u]<>=7;m<0;)m=w[(I&1)-m],I>>=1;else I>>=m&15;C-=m&15;m>>=4;if(m<256)f[G++]=m;else if(R.register=I,R.L=C,R.C=u,m>256){I=Lx[m];I+=zk(R,qs[m]);u=bJD(R,p);C=Ar[u];C+=zk(R,bx[u]);if(oOH&&Ip.length&&(R.error=!0);R.register|=(p[r+1]<<8)+p[r]<=0)return lx(R,p&15),p>>4;for(lx(R,7);p<0;)p=w[zk(R,1)-p];return p>>4}; lx=function(R,w){R.L-=w;R.register>>=w}; B_=function(R){var w=[];for(var p of R)w[p]||(w[p]=0),w[p]++;var r=w[0]=0;p=[];var f=0,G=0;for(var I=1;I7&&(f+=w[I]);for(r=1;r>u&1;C=f<<4|I;if(I<=7)for(u=1<<7-I;u--;)G[u<>=7;I--;){G[u]||(G[u]=-w,w+=2);const m=r&1;r>>=1;u=m-G[u]}G[u]=C}}return G}; yY=function(R,w){R.C(`dcmprs_${R.context}_${R.L}_gz_${w}`)}; tKP=function(R,w){return Xm(R,function(){const p=this;return function*(){let r;const f=Date.now();try{yY(p,"s");var G=yield*nl(w());if(!G)throw Error("no result");yY(p,"e");return G}catch(I){throw yY(p,"f"),r=I,p.qP(r,"gz"),I;}finally{G=Date.now(),p.l3("gz",G-f,r)}}()})}; eR6=function(R,w,p,r){return Xm(void 0,function(){return function*(){const f=(G,I)=>tKP(new OJb(G,p,r),()=>e3(I(R))); if(VY)try{return yield*nl(f("n",Kqd))}catch(G){}if(w)try{return yield*nl(f(w.L?"a":"w",G=>EOW(G,w)))}catch(G){}return yield*nl(f("p",DJI))}()})}; Kqd=async function(R){if(!VY)throw Error("DecompressionStream is not supported");const w=pb.MX();var p=new DecompressionStream("gzip");const r=p.writable.getWriter();r.write(R);r.close();R=p.readable.getReader();for(p=new oi([]);;){const {value:f,done:G}=await R.read();if(G)break;p.append(f)}R=zQ(p);pb.ub("gznb",w,Math.ceil(R.byteLength/16));return R}; DJI=function(R){const w=pb.MX();R=g.VKd(new g.MKD(R));pb.ub("gzjb",w,Math.ceil(R.byteLength/16));return R}; EOW=function(R,w){const p=pb.MX();R=w.cJ(R);let r;try{const f=R.byteOffset,G=R.byteLength,I=w.exports.getInflatedSize(f,G);if(I===0)throw Error("wasm_gz: bad input");const C=w.malloc(I),u=w.exports.inflateGzip(f,G,C);if(u)throw w.free(C),Error(`wasm_gz: fail${u}`);r=new Uint8Array(w.exports.memory.buffer,C,I)}finally{w.free(R.byteOffset)}w=w.Ur(r);pb.ub("gzwb",p,Math.ceil(w.byteLength/16));return w}; ob=function(R){var w=R.queue;w.L.length&&w.L[0].isEncrypted&&!w.C&&(w.L.length=0);for(const p of Object.keys(R.L)){const r=R.L[p];r.uj||(w=R.queue,w.L.push({videoId:r.videoId,formatId:p,isEncrypted:!1}),w.C||mt(w))}}; ci_=function(R,w){const p=w.totalLength;let r=!1;switch(R.O){case 0:R.VU(w,R.G).then(f=>{var G=R.kY;G.KL("oprr");G.playerResponse=f;G.Tc||(G.qW=!1);tr(G)},f=>{R.kY.fail(f)}); break;case 2:R.KL("ormk");w=zQ(w);R.queue.decrypt(w);break;default:r=!0}R.kY.iA&&R.kY.Ty("ombup",`id.11;pt.${R.O};len.${p}${r?";ignored.1":""}`);R.O=null}; Pkl=function(R,w){R.kY.KL("oprgz2_s");w=eR6(w,R.kY.V().q0,R.kY.iA?R.kY.Ty.bind(R.kY):()=>{},p=>{R.kY.KL(p)}); PQ(w,()=>{R.kY.KL("oprgz2_e")},()=>{R.kY.KL("oprgz2_f")}); return w}; aH_=async function(R,w){R.kY.KL("oprgz_s");if(VY)try{var p=await Kqd(w);R.kY.KL("oprgz_n");R.kY.Ty("oprsgz",{i:"n"});return p}catch(r){R.kY.Ty("gzerr",{impl:"native",err:`${r}`})}if(p=R.kY.V().q0)try{const r=EOW(w,p);R.kY.KL("oprgz_w");R.kY.Ty("oprsgz",{i:"w"});return r}catch(r){R.kY.Ty("gzerr",{impl:"wasm",err:`${r}`})}w=DJI(w);R.kY.KL("oprgz_p");R.kY.Ty("oprsgz",{i:"j"});return w}; $JY=function(R){return new Promise(w=>{setTimeout(w,R)})}; Xnl=function(R,w){var p=R.V();p=R.a9&&p.Y("html5_onesie_preload_use_content_owner");if((w=lHW(w,p,R.Kq))&&R.videoId){R=Ia(R.videoId);p=[];if(R)for(const r of R)p.push(r.toString(16).padStart(2,"0"));w.set("id",p.join(""));return w}}; nOP=async function(R,w,p=0){const r=[];r.push(w.load());p>0&&r.push($JY(p));await Promise.race(r);return Xnl(R,w)}; dJ_=function(R,w,p,r=!1){R.set("cpn",w.clientPlaybackNonce);R.set("opr","1");const f=w.V();R.set("por","1");fH()||R.set("onem","1");w.startSeconds>0&&R.set("osts",`${w.startSeconds}`);r||(f.Y("html5_onesie_disable_partial_segments")&&R.set("oses","1"),w=f.Y("html5_gapless_onesie_no_media_bytes")&&Dr(w)&&w.a9,p&&!w?(w=p.audio,R.set("pvi",p.video.join(",")),f.Y("html5_onesie_disable_audio_bytes")||R.set("pai",w.join(",")),s_||R.set("osh","1")):(R.set("oad","0"),R.set("ovd","0"),R.set("oaad","0"),R.set("oavd", "0")))}; ZJx=function(R,w,p,r,f=!1){const G=`https://youtubei.googleapis.com/youtubei/${w.lD.innertubeApiVersion}/player`,I=[{name:"Content-Type",value:"application/json"}];r&&I.push({name:"Authorization",value:`Bearer ${r}`});I.push({name:"User-Agent",value:g.s3()});g.n("EOM_VISITOR_DATA")?I.push({name:"X-Goog-EOM-Visitor-Id",value:g.n("EOM_VISITOR_DATA")}):(p=p.visitorData||g.n("VISITOR_DATA"))&&I.push({name:"X-Goog-Visitor-Id",value:p});(p=g.n("SERIALIZED_LAVA_DEVICE_CONTEXT"))&&I.push({name:"X-YouTube-Lava-Device-Context", value:p});(w=Sz(w.experiments,"debug_sherlog_username"))&&I.push({name:"X-Youtube-Sherlog-Username",value:w});R=Vx(JSON.stringify(R));return{url:G,Th:I,postBody:R,ED:f,i_:f}}; O5=function(R,w,p,r,f,G,I,C,u){const m=R.RN,z=R.Lt;R=R.AL;var B=m!==void 0&&z!==void 0;const W=r.getVideoData();var x=w.L.encryptedClientKey;w=B?w.iv:void 0;B=rK(G,!0);f=f||!!fH()&&B>1572864;return{innertubeRequest:{HY:R,Nv:m,Lt:z,encryptedClientKey:x,iv:w,XK:!0,HI:!0,Ao:"DecompressionStream"in window||!f,wv:p.experiments.XB("html5_use_jsonformatter_to_parse_player_response")},jk:nNb({BB:G,zy:p,CB:r,Zo:W.startSeconds*1E3,B9:!0}),onesieUstreamerConfig:I,AU:C,gh:XZ(W),reloadPlaybackParams:W.lD?.reloadPlaybackParams, x6:u}}; Yzx=function(R,w,p,r,f,G,I,C){const u=g.nm(R,qF);let m;var z;R.i_||((z=ucl(w,u))?(m=z.vL,z=z.signature):(z=m=w.encrypt(u),(0,g.T)(),z=JoL(new hNd(w.L.O),z,w.iv)));return O5(m&&z?{RN:m,Lt:z}:{AL:u},w,p,r,!!R.i_,f,G,I,C)}; FqP=async function(R,w,p,r,f,G,I,C){var u=g.nm(R,qF);u=await CkH(w,u);const m=await mJr(w,u);return O5({RN:u,Lt:m},w,p,r,!!R.i_,f,G,I,C)}; jTd=function(R,w,p,r,f,G,I,C){var u=g.nm(R,qF);if(u=ucl(w,u))return O5({RN:u.vL,Lt:u.signature},w,p,r,!!R.i_,f,G,I,C)}; Tmd=async function(R,w,p){R.KL("oprd_s");w=Ji6(R)?await zRb(R.x_,w,p):R.x_.decrypt(w,p);R.KL("oprd_c");return w}; Kx=function(R){if(!R.Hy)return{};const w=R.Hy.X();w.d=R.Hy.YY?.AF();w.shost=R.KE;w.ty="o";return w}; Ji6=function(R,w){return R.Y("html5_onesie_sync_request_encryption")||w?.i_?!1:!!fH()}; iJl=function(R){return R.Y("html5_onesie_host_probing")||R.iA?s_:!1}; tr=function(R){if(!R.playerResponse)return!1;if(R.rH)return!0;var w=R.videoData.Y("html5_onesie_audio_only_playback")&&eG(R.videoData);if(R.SC&&R.qW){if(!R.SC.has(R.Zz))return!1;const r=R.SC.get(R.Zz);var p;if(p=r){p=!1;for(const f of r.Sa.keys()){const G=r.Sa.get(f);if(G)for(const I of G.U8)I.o5>0&&(G.i4?p=!0:w=!0)}p=!(w&&p)}if(p)return!1}R.KL("ofr");R.Cg.resolve(R.playerResponse);R.aR||(R.IY?.start(),R.bR.start());return R.rH=!0}; hRD=function(R){if(R.SC&&!R.Y("html5_onesie_media_capabilities")){R.KL("ogsf_s");var w=D26(R.CB.getVideoData(),(r,f)=>{R.Ty(r,f)}),p=QTW(R.CB); w.video=AWW(p,w.video);R.KL("ogsf_c");if(w.video.length)return w;R.Ty("ombspf",`l.${p.C};u.${p.L};o.${p.O};r.${p.reason}`)}}; Ms=function(R,w){if(w.cS()||R.cS())R.policy.m5||(R.policy.J?E5(R.loader):R.loader.Fo());else{if(R.policy.O&&w.isComplete()&&w instanceof J3){var p=R.loader,r=p.Ty;var f=Object.assign(w.Hy.X(),{rst:w.state,strm:w.xhr.w3(),d:w.Hy.YY?.AF(),cncl:w.xhr&&w.Yp.K?1:0,rqb:w.fM,cwt:w.Yp.O,swt:w.hT?.w5});f=Object.assign(px(w.info),f);r.call(p,"rqs",f)}if(w.isComplete()&&w.XY()&&w instanceof J3)R.policy.cB?w.j0()?(w.dispose(),R.L.length===0?R.loader.Fo():(R=R.L[0],R instanceof J3&&R.aJ()&&R.py())):w.Y7()&&R.loader.handleError(w.Tg(), w.J9()):(w.dispose(),R.loader.Fo());else{if(w.FQ())R.qV=!0,w instanceof J3&&mMY(R.timing,w),gOl(R),D0(R);else if(w.Y7())p=R.CB.qj(),w instanceof J3&&w.info.L?.jk?.Zb&&p&&R.loader.jx(p),w instanceof J3&&GRl(w)?R.loader.rL?.O():w instanceof eU?R.L.pop():(p=1,w.canRetry()&&gk(R.loader)&&(HJ6(R,w),p=0),R.loader.handleError(w.Tg(),w.J9(),p));else{if(R.loader.isSuspended&&!w.isComplete())return;D0(R)}w.cS()||w instanceof eU||(w.isComplete()?p=Y9d(w,R.policy,R.G):(p=ZlY(w,R.policy,R.G),p===1&&(R.SI=!0)), p!==0&&(r=new vOb(1,w.info.EQ),r.pS=p===2,Nmd(R,r)));w.isComplete()&&(R.zn=!1,w.FQ()||(R.qV=!1));R.policy.Mr&&!w.isComplete()?Nk(R.loader):R.loader.Fo()}}}; k0D=function(R){R.policy.yh&&(R.jI=void 0,R.Vb=0)}; w2b=function(R){if(!UJx(R,R.S))return c_(R,"ratelimited"),!1;if(n6(R.audioTrack)&&n6(R.videoTrack))return c_(R,"endofstream"),!1;if(R.policy.C)if(R.policy.K){if(R.D?.xY())return c_(R,"ssdaiblocked"),!1}else{var w=!1;if(R.xY.C===2)w=!0;else if(R.xY.C===3){P_(R);R.loader.vB();var p=cj(R.audioTrack,R.loader.isSeeking()).nL;var r=cj(R.videoTrack,R.loader.isSeeking()).nL;var f=R.loader.getCurrentTime()||0;p=ab(R,p,f);r=ab(R,r,f);r=Math.min(p,r);f=R.xY;r>=f.O?(f.Ty("sdai",{haltrq:r,est:f.O}),r=!0):r=!1; r&&(w=!0)}if(w)return c_(R,"waitingforads"),!1}R.policy.B1&&(R.I0=$U(R,R.audioTrack),R.M0=$U(R,R.videoTrack));if(!R.O)return XQ(R,{nopolicy:1}),!0;if(R.CB.qj())return XQ(R,{utc:1}),!0;if(R.C.D)return XQ(R,{audio:1}),!0;if(R.policy.tW&&R.C.X)return XQ(R,{constraint:1}),!0;if(!R.O.targetAudioReadaheadMs||!R.O.targetVideoReadaheadMs)return XQ(R,{noreadahead:1}),!0;if(R.policy.J&&R.loader.j5())return XQ(R,{seekToHead:1}),!0;w=Math.min(WW(R.loader,R.audioTrack)*1E3,R.O.targetAudioReadaheadMs);r=Math.min(WW(R.loader, R.videoTrack)*1E3,R.O.targetVideoReadaheadMs);f=Math.min(w,r);var G=R.CB.getCurrentTime()*1E3;const {Qc:I,aX:C,pm:u,x8:m}=SzP(R,G);let z;p=I0&&R.S.yV++)}; Nmd=function(R,w,p){var r={BB:R.BB,Wc:(G,I)=>{R.CB.yK(G,I)}, HC:R.policy.f4,qh:R.policy.O,DC:R.policy.DC};R.BB.C.J&&(r.oe=(R.videoTrack.rN.info.hf||0)+(R.audioTrack.rN.info.hf||0));R.policy.L2&&(r.zH=R.audioTrack.rN.index.vj(),r.HC=!1);var f=rir(w,R.policy,R.G)?2:1;f!==R.pB&&(R.pB=f,gOl(R));p=R.Tj(p);if(R.policy.X&&R.policy.O&&p.fb){let G=f="";for(const I of p.fb)R.videoData.sabrContextUpdates.has(I)||R.policy.X&&p.Q3&&p.Q3.type===I?f+=`_${I}`:G+=`_${I}`;R.loader.Ty("sabrbldrqs",{ctxts:f,misctxts:G})}!w.setData(p,R.policy,R.G)&&R.policy.X&&R.loader.handleError("player.exception", {reason:"buildsabrrequestdatafailed"},1);r=new J3(R.policy,w,R.Z$,R.G,R,r,R.loader.Xb());j$(R.timing);R.policy.a9&&R.loader.Ty("sabrcrqinfo",{rn:r.WF(),probe:w.XY()});return R.U0=r}; $U=function(R,w){P_(R);R.loader.vB();return cj(w,R.loader.isSeeking())}; nx=function(R){return R.policy.pL&&!!R.J}; ab=function(R,w,p){R=R.loader.vB()||0;return d9(w,(p+R)*1E3)/1E3+p}; P_=function(R){const w=R.policy.J&&R.loader?.j5();var p=R.loader.getCurrentTime()||0;p=fy_(R,p);a:if(R.policy.m1&&R.loader.isSeeking()){var r=K6(R.videoTrack,p);R.loader.Ty("asmtfnctv",{b:p,a:r});if(!isNaN(r)){p=r;break a}}r=R.loader.vB()||0;p+=r;r=H4(R.videoData)||g.gs(R.videoData);let f=0;w?(r&&(f=Number.MAX_SAFE_INTEGER),R.videoData.vF&&(f=Math.ceil(R.videoData.Vm*1E3))):f=Math.ceil(p*1E3);return Math.min(Number.MAX_SAFE_INTEGER,f)}; fy_=function(R,w){if(R.loader.isSeeking())return w;var p=R.CB.XI();if(!p)return w;p=p.po();if(p.length===0||JC(p,w))return w;if(!R.videoTrack.N9(w)&&!R.audioTrack.N9(w))return R.loader.Ty("sundrn",{b:0,lt:w}),w;let r=w,f=Infinity;for(let G=0;Gw)continue;const I=w-p.end(G);I=20)?(R.loader.handleError("player.exception",{reason:"bufferunderrunexceedslimit"}),w):r}; d9=function(R,w){let p=0,r=-1;for(const f of R)if(!(f.startTimeMs+f.durationMsw||r>=0&&f.BF>r+1)break;p=Math.max(p,f.startTimeMs+f.durationMs);r=Math.max(r,f.wb)}return Math.max(0,p-w)}; UJx=function(R,w){a:{if(R.X>0){var p=Math.floor((0,g.T)()/1E4);if(p===w.UB){if(w.yV>=R.X){if(w.yV===R.X){p={reason:"toomanyrequests"};p.limit=w.yV;if(R.policy.jw&&R.U0){const r=px(R.U0.info);p.lr_ptime=r.ptime;p.lr_rtype=r.rtype;p.lr_brl=r.brl;p.lr_ps=r.ps}R.loader.handleError("player.exception",p);w.yV+=1}w=!1;break a}}else w.UB=p,w.yV=0}w=!0}return!w||R.loader.isSuspended&&R.loader.kE?!1:R.U&&(0,g.T)()0&&(!R.policy.X||R.L.length!==1||!R.L[0].f6())||!R.Z$.pB?.D(R.policy, R.G,R.loader.XO)||R.nB?!1:!0}; c_=function(R,w){R.Qk=w;R.policy.a9&&R.loader.Ty("sabrcrb",{reason:w})}; XQ=function(R,w){R.Qk=void 0;R.f_=(0,g.T)();R.policy.a9&&R.loader.Ty("sabrcrq",w)}; SzP=function(R,w){const {pm:p,x8:r}=GVx(R);let f;R.policy.B1?(f=d9(R.I0.nL,w),R=d9(R.M0.nL,w)):(f=p,R=r);return{Qc:f,aX:R,pm:p,x8:r}}; gOl=function(R){R.videoData.jI.clear();if(R.videoData.sabrContextUpdates.size>0)for(var w of R.videoData.sabrContextUpdates.keys())R.videoData.sabrContextUpdates.get(w)?.sendByDefault&&R.videoData.jI.add(w);if(R.policy.X&&R.L.length)for(const p of R.L)(w=p.DL())&&w.type&&w.sendByDefault&&R.videoData.jI.add(w.type)}; D0=function(R){for(;R.L.length&&R.L[0].HD(R.Mw());){const w=R.L.shift();IyI(R,w)}R.L.length&&IyI(R,R.L[0])}; IyI=function(R,w){w instanceof J3&&(R.PS=w);var p=new Set(w.uH(R.Mw()));for(const I of p){if(p=w instanceof eU){p=R.C;var r=p.Z$.PB,f=Rb(p.videoInfos,r);r=RRd(p,I,r);var G=f.includes(I);!p.Ey.Mp||r||G||p.loader.Ty("sabrcpf",{fid:`${I}`,vfids:`${f.join(".")}`,said:p.U||""});p=!(r||f.includes(I))}if(p)continue;p=w.O5(I,R.Mw());f=R.policy.pL&&Ew(p[0].rN.info.mimeType);if(!w.nJ(I,R.Mw()))continue;r=w.VI(I,R.Mw());for(const C of r){R.policy.O&&w instanceof eU&&R.loader.Ty("omblss",{s:C.info.EC()});if(f){r= R.timing;r.pB||(r.pB=(0,g.T)(),g.qm("fcb_r",r.pB,r.L));r=R;r.videoData.PB()&&r.J&&oH(r.J)===oH(g.ZK(C.info.rN.info,r.Z$.PB))&&r.CB.publish("sabrCaptionsDataLoaded",C,r.LP.bind(r));continue}r=C.info.rN.info.i4();G=C.info.rN;const u=w instanceof eU?1:2;if(r){if(N$I(R.C,G,u,w.P3(R.Mw())?.token))continue}else g3_(R.C,G,u,w.P3(R.Mw())?.token);G=r?R.audioTrack:R.videoTrack;w instanceof eU&&(G.J=!1,w instanceof eU&&(r?sIP(R.timing):uPd(R.timing)));try{Mk(G,p,C)}catch(m){r=ru(m),R.loader.handleError(r.errorCode, r.details,r.severity),G.xU(),R.A9(!1,"pushSlice"),E5(R.loader)}}}}; HJ6=function(R,w){R.policy.X?R.L.splice(R.L.indexOf(w)).forEach(p=>{p.dispose()}):(R.L.pop(),w?.dispose())}; Cmx=function(R,w,p){const r=[];for(let f=0;f=7E3&&f>=7E3}return w}; m9H=function(R,w){R.delay?.dispose();R.delay=null;const p=Array.from(R.L.values()).sort((r,f)=>r.mediaTime-f.mediaTime); p.length!==0&&(w=(p[0].mediaTime-w)*1E3/R.CB.getPlaybackRate(),R.delay=new g.vZ(()=>{Z0(R)},w>500?w-500:w),R.delay.start())}; Z0=function(R,w){if(fn(R.CB.getPlayerState())&&R.L.size!==0){w=w??Array.from(R.L.values()).sort((f,G)=>f.mediaTime-G.mediaTime); var p=R.getCurrentTime(),r=(w[0].mediaTime-p)*1E3/R.CB.getPlaybackRate();if(r<500){p=r>0?R.CB.XI()?.getCurrentTime()??R.CB.getCurrentTime():p;for(const f of w)if(p>=f.mediaTime)f.resolve([f.mediaTime,f.id]),R.L.delete(f.id);else break}m9H(R,p)}}; zD6=function(R,w,p){R.L.delete(p);return new Promise(r=>{R.L.set(p,{id:p,mediaTime:w,resolve:r});r=Array.from(R.L.values()).sort((f,G)=>f.mediaTime-G.mediaTime); p===r[0].id&&Z0(R,r)})}; W_l=function(R){const w=R.CB.XI()?.getCurrentTime()??R.CB.getCurrentTime(),p=R.G.I3(w);B5d(R,p,w);R.isSeeking=!1;var r=Array.from(R.L.keys()).filter(f=>f>=p).sort((f,G)=>f-G); for(const f of r)r=f===p?w-R.G.getStartTime(p):0,R.D(f,R.L.get(f),r)}; x9D=function(R,w,p,r=!1){w!==R.Rq&&(R.Rq=w,R.CB.publish("playbackstarted",w,p+R.CB.vB(),r))}; B5d=function(R,w,p){const r=R.L.get(w),f=R.G.getStartTime(w),G=R.G.getDuration(w);let I=f;(r?.L??[R.cpn]).forEach((C,u)=>{const m=r?.C[u]??G;p>=I&&p{R.K.L.delete(p)}); R.O.delete(w)}; L_x=function(R,w,p,r){R.C=p;p=`${w}.${p}`;R.O.has(w)?R.O.get(w).push(p):R.O.set(w,[p]);zD6(R.K,r,p).then(([f,G])=>{const [I,C]=G.split(".");[,G]=[Number(I),C];x9D(R,G,f)})}; Agl=function(R,w,p,r,f,G){return w.zv&&w.SI&&p===3?new qDd(R,w,r,f,G):null}; bLd=function(R,w){if(R.policy.wF){var p=w.info.hf,r=rK(R.schedule);w=w.index.vj();p=Math.max(1,r/p);R.U=Math.round(Math.max(((p-1)*w+R.policy.ez)/p,w-R.policy.f2)*1E3)}}; oYP=function(R,w){var p=Date.now()/1E3,r=p-R.startTimeSecs;const f=p-R.J;var G=f>=R.policy.bl,I=!1;if(G){let C=0;!isNaN(w)&&w>R.K&&(C=w-R.K,R.K=w);C/f=R.policy.f2&&!R.O;if(!G&&!p&&ygI(R,w))return NaN;p&&(R.O=!0);a:{r=I;p=(0,g.T)()/1E3-(R.ib.QB()||0)-R.D.L-R.policy.ez;G=R.C.startTime;p=G+p;if(r){if(isNaN(w)){YU(R,NaN,"n",w);G=NaN;break a}r=w-R.policy.Oj;r0&&(I.headers=C);G&&(I.onFinish=G);return Object.keys(I).length>1?I:null}; jU=function(R,w,p,r,f,G,I,C){tk()&&p.token&&(R=yj(R,{ctt:p.token,cttype:p.Zj,mdx_environment:p.mdxEnvironment}));r.Y("net_pings_low_priority")&&(w||(w={}),w.priority="low");G||C&&r.Y("nwl_skip_retry")?(w==null?w={}:D9I(R,r.Y("html5_assert_cpn_with_regex")),I?aA().sendAndWrite(R,w):aA().sendThenWrite(R,w,C)):w?(D9I(R,r.Y("html5_assert_cpn_with_regex")),Wzr(R,w)):g.Ki(R,f)}; eDr=function(R){const w=[];for(let p=0;p0&&p>0&&!R.C&&R.O<1E7)try{R.G=R.K({sampleInterval:w,maxBufferSize:p}),R.G?.addEventListener("samplebufferfull",async()=>{await R.stop();Pm_(R)})}catch(r){R.C=cgW(r.message)}}; Jr=function(R,w){R=window.h5vcc?.settings?.set(R,w);return Lv(R)?PQ(e3(R),()=>!0,()=>!1):e3(!!R)}; ay6=function(R){return Jr("MediaSource.EnableUsingMediaSourceBufferedRange",R?1:0)}; $9D=function(R){return Jr("HTTP3",R?1:0)}; X2d=function(R){return Jr("MediaSource.EnableUsingMediaSourceAttachmentMethods",R?1:0)}; nYl=function(R){return Jr("QUIC",R?1:0)}; d9d=function(R){return Jr("Media.AudioWriteDurationLocal",R)}; ZLd=function(R){return Jr("Media.PlayerConfiguration.DecodeToTexturePreferred",R?1:0)}; YD6=function(R){return Jr("Media.VideoDecoderInitialPrerollCount",R)}; F__=function(R){return Jr("Media.VideoRendererMinInputBuffers",R)}; jHY=function(R){return Jr("Media.VideoRendererMinDecodedFrames",R)}; JgI=function(R){return Jr("Media.VideoBufferSizeClampMb",R)}; T5D=function(R){return Jr("Media.AppendFirstSegmentSynchronously",R?1:0)}; iLH=function(R){return Jr("Media.IncrementalParseLookAhead",R?1:0)}; QHW=function(R){return Jr("Media.EnableResetAudioDecoder",R?1:0)}; hDL=function(R){return Jr("Media.EnableFlushDuringSeek",R?1:0)}; gY6=function(R){return Jr("DecoderBuffer.EnableInPlaceReuseAllocatorBase",R?1:0)}; HLI=function(R){return Jr("Media.ExperimentalMaxPendingBytesPerParse",R)}; vYD=function(R){return Jr("Media.MaxSamplesPerWrite",R)}; N5l=function(R){return Jr("Media.MediaCodecResetDelayMs",R)}; U9d=function(){var R=window.h5vcc?.settings?.getPersistentSettingAsString?.("cpu_usage_tracker_intervals");if(R!=null){R=JSON.parse(R)??[];var w=R.filter(p=>p.type==="total").map(p=>p.seconds); for(const p of kVW)w.indexOf(p)===-1&&R.push({type:"total",seconds:p});window.h5vcc?.settings?.set("cpu_usage_tracker_intervals_enabled",1);window.h5vcc?.settings?.set("cpu_usage_tracker_intervals",JSON.stringify(R))}}; SDd=function(){var R=window.H5vccPlatformService;let w="";if(R&&R.has("dev.cobalt.coat.clientloginfo")&&(R=R.open("dev.cobalt.coat.clientloginfo",()=>{}))){const p=R.send(new ArrayBuffer(0)); p&&(w=String.fromCharCode(...(new Uint8Array(p))));R.close()}return w}; RcY=function(R){var w=window.H5vccPlatformService;w?.has("com.google.android.youtube.tv.prodlogger")&&(w=w.open("com.google.android.youtube.tv.prodlogger",()=>{}))&&(w.send(Vx(`cpn: ${R}`).buffer),w.close())}; g.ix=function(R,w,p,r){Tk(R,p,`${w.toFixed(3)}:${r.join(":")}`)}; QY=function(R,w){var p=R.provider.getCurrentTime();g.ix(R,w,"cmt",[p.toFixed(3)]);var r=p=R.provider.Lh();if((!R.C||Dr(R.provider.videoData)?0:r*1E3>R.C.Jq+100)&&R.C){r=R.C.isAd;p=p*1E3-R.C.Jq;R.ix=w*1E3-R.C.Vt-p-R.C.Zl;var f=(0,g.T)()-p;w=R.ix;p=R.provider.videoData;var G=p.isAd();if(r||G){G=`${r?"ad":"video"}_to_${G?"ad":"video"}`;var I={};p.iI&&(I.cttAuthInfo={token:p.iI,videoId:p.videoId});I.startTime=f-w;mp(G,I);g.sT({targetVideoId:p.videoId,targetCpn:p.clientPlaybackNonce},G);u$("pbs",f,G)}else f= R.provider.CB.FD(),f.J!==p.clientPlaybackNonce?(f.K=p.clientPlaybackNonce,f.C=w):p.uB()||g.AO(new g.Id("CSI timing logged before gllat",{cpn:p.clientPlaybackNonce}));R.Ty("gllat",{l:R.ix.toFixed(),prev_ad:+r});delete R.C}}; Tk=function(R,w,p){const r=R.L.get(w);r?r.push(p):R.L.set(w,[p])}; hr=function(R,w,p){if(!isNaN(p.M8)){let r=p.M8;p.C=0?w:g.g9(R.provider);const p=R.provider.CB.qC();var r=p.N3-(R.jI||0);r>0&&g.ix(R,w,"bwm",[r,(p.xO-(R.ag||0)).toFixed(3)]);isNaN(R.jI)&&p.N3&&R.isOffline&&R.cP(!1);R.jI=p.N3;R.ag=p.xO;isNaN(p.bandwidthEstimate)||g.ix(R,w,"bwe",[p.bandwidthEstimate.toFixed(0)]);R.provider.LB.dn()&&Object.keys(p.L).length!==0&&R.Ty("bwinfo",p.L);if(R.provider.LB.dn()||R.provider.LB.Y("html5_log_meminfo"))r=tMW(),Object.values(r).some(f=>f!==void 0)&&R.Ty("meminfo",r); R.provider.LB.dn()&&(r=R.nB?.G())&&Object.values(r).some(f=>f!=null)&&R.Ty("cpuinfo",r); R.PS&&R.Ty("jsprof",R.PS.flush());R.U&&g.ix(R,w,"bat",[R.U.level,R.U.charging?"1":"0"]);r=R.provider.CB.getVisibilityState();R.yh!==r&&(g.ix(R,w,"vis",[r]),R.yh=r);QY(R,w);(r=wKD(R.provider))&&r!==R.f_&&(g.ix(R,w,"conn",[r]),R.f_=r);hr(R,w,p)}; r2H=function(R,w,p){const r=g.g9(R.provider);pKd(R,r,w,0,p);H_(R,r);v_(R)}; Ns=function(R,w){Tk(R,"cat",w)}; fML=function(R){var w=R.provider.CB.qC();const p=g.g9(R.provider);hr(R,p,w);const r=w.O;w=w.G;isNaN(r)||(R.provider.LB.Y("html5_unified_live_latency_reporting")&&!isNaN(w)&&w?g.ix(R,p,"e2el",[r.toFixed(3),w.toFixed(3)]):g.ix(R,p,"e2el",[r.toFixed(3)]))}; GnI=function(R,w){w={cpn:R.provider.videoData.clientPlaybackNonce,sequenceNumber:w,serializedWatchEndpointLoggingContext:R.provider.videoData.l0};R.serializedHouseBrandPlayerServiceLoggingContext&&(w.serializedHouseBrandPlayerServiceLoggingContext=X0(R.serializedHouseBrandPlayerServiceLoggingContext)||void 0);R.provider.videoData.playerResponseCpn&&(w.playerResponseCpn=R.provider.videoData.playerResponseCpn);kU.length&&(w.decoderInfo=kU);R.remoteControlMode&&(w.remoteControlMode=R.remoteControlMode); R.remoteConnectedDevices.length&&(w.remoteConnectedDevices=R.remoteConnectedDevices);if(R.iR?.length){w.serializedQoeContextData=[];for(var p of R.iR){const r=Ia(p);r&&w.serializedQoeContextData.push(r)}}R.provider.Y("html5_send_serialized_one_time_qoe_context_data")&&!R.U0&&R.provider.videoData.serializedOneTimeQoeContextData&&(w.serializedOneTimeQoeContextData=[],p=Ia(R.provider.videoData.serializedOneTimeQoeContextData))&&(w.serializedOneTimeQoeContextData.push(p),R.U0=!0);return w}; IMb=function(R,w,p){g.$W(R.provider.LB,R.provider.videoData.J()).then(r=>{var f=!1;w.includes("&dt=")||w.includes("&cotn=")?f=!0:R.provider.LB.Y("qoe_with_networkless")&&(f=!0);const G=R.provider.LB.Y("qoe_send_and_write");var I=R.provider.LB;r=FQ(w,I,R.provider.LB.pageId,R.provider.LB.sendVisitorIdHeader?R.provider.videoData.visitorData:void 0,r);I.Y("html5_simplify_pings")&&(r=r||{});r?(r.method="POST",r.postBody=p,jU(w,r,{token:R.provider.videoData.iI,Zj:R.provider.videoData.u8,mdxEnvironment:R.provider.videoData.mdxEnvironment}, I,void 0,f,G&&R.O0)):f?(f=R.provider.LB.Y("networkless_ajax"),I={method:"POST",postBody:p},G&&R.O0?aA().sendAndWrite(w,I):f?g.Ff(w,{method:"POST",postBody:p}):aA().sendThenWrite(w,I)):sjd(w,p)})}; v_=function(R){if(!R.provider.LB.Y("html5_qoe_no_len_check")){var w=0;for(const [p,r]of R.L.entries())w+=p.length+Number(v6(r,(f,G)=>f+G.length,0)); w>96E3&&(new g.vZ(R.reportStats,0,R)).start()}}; CI6=function(R){R.provider.videoData.a9&&Ns(R,"prefetch");R.provider.videoData.U0&&R.Ty("reload",{r:R.provider.videoData.reloadReason,ct:R.provider.videoData.U0});R.provider.videoData.Fi&&Ns(R,"monitor");R.provider.videoData.isLivePlayback&&Ns(R,"live");s_&&Ns(R,"streaming");R.provider.videoData.rS&&R.Ty("ctrl",{mode:R.provider.videoData.rS},!0);if(R.provider.videoData.Vf){var w=R.provider.videoData.Vf.replace(/,/g,"_");R.Ty("ytp",{type:w},!0)}R.provider.videoData.Qj&&(w=R.provider.videoData.Qj.replace(/,/g, "."),R.Ty("ytrexp",{ids:w},!0));R.provider.LB.dn()&&R.Ty("now",{wt:(0,g.T)()});w=R.provider.videoData;var p=R.provider.LB.Y("enable_white_noise")||R.provider.LB.Y("enable_webgl_noop");const r=g.ds(w)||g.v4(w)||g.Nr(w)||g.ko(w);(p||r)&&(p=(0,g.U5)())&&R.L.set("gpu",[p]);rH(R.provider.videoData)&&g.ix(R,g.g9(R.provider),"dt",["1"]);w.cotn&&!rH(w)&&R.cP(!0);R.provider.LB.dn()&&(w=(0,g.T)()-R.provider.LB.B1,R.Ty("playerage",{secs:(1.6**Math.round(Math.log(w/1E3)/Math.log(1.6))).toFixed()}));R.K=!0;R.pB= g.PI(()=>{R.reportStats()},1E4)}; pKd=function(R,w,p,r,f){var G=R.provider.LB.L.cbrver;R.provider.LB.L.cbr==="Chrome"&&/^96[.]/.test(G)&&p==="net.badstatus"&&/rc\.500/.test(f)&&SU(R,3);R.provider.LB.Y("html5_use_ump")&&/b248180278/.test(f)&&SU(R,4);G=R.provider.getCurrentTime();r=r===1?"fatal":"";p=[p,r,G.toFixed(3)];r&&(f+=`;a6s.${Ri()}`);f&&p.push(ua_(f));g.ix(R,w,"error",p);R.K=!0}; SU=function(R,w){R.Qk||(Tk(R,"fcnz",`${w}`),R.Qk=!0)}; s0d=function(R){R.G>=0||(R.provider.LB.Nl||R.provider.CB.getVisibilityState()!==3?R.G=g.g9(R.provider):R.YY=!0)}; mCx=function(R,w){let p;R.provider.videoData.cB()?(R=4,p=1):R=w.source??0;R=`sms.${R}`;p!==void 0&&(R+=`_${p}`);return R}; RZ=function(R,w,p,r,f){const G=g.g9(R.provider);w!==1&&w!==3&&w!==5||g.ix(R,G,"vps",[R.Rb]);Tk(R,"xvt",`t.${G.toFixed(3)};m.${f.toFixed(3)};g.2;tt.${w};np.0;c.${p};d.${r}`)}; ua_=function(R){/[^a-zA-Z0-9;.!_-]/.test(R)&&(R=R.replace(/[+]/g,"-").replace(/[^a-zA-Z0-9;.!_-]/g,"_"));return R}; WW=function(R,w){if(R.YY&&!R.m_)return 3;if(R.isSuspended)return 1;if(R.un?.M0())return 4;let p=(w.rN.info.audio?R.policy.N0:R.policy.jI)/(w.hf*R.policy.pU);if(R.policy.XU>0&&R.un&&NF(R.un)&&(w=w.rN.info.video?R.un.C:R.un.L)&&!w.cM()){w=w.f3();const r=ji(w,R.getCurrentTime());r>=0&&(w=R.getCurrentTime()-w.start(r),p+=Math.max(0,Math.min(w-R.policy.XU,R.policy.l0)))}R.policy.I0>0&&(p=Math.min(p,R.policy.I0));return p}; A3=function(R,w,p){zcP(R,p.dB||"unknown");R.CB.seekTo(w,p)}; QW=function(R,w,p,r,f){R.CB.getVideoData().L$()?f&&R.C.Jl+f/1E3>p&&(R.Ty("sdai",{seg:r,rbt:p.toFixed(3),end:R.C.Jl.toFixed(3),sd:f.toFixed(3)}),R.A9(!1,"rollback")):R.policy.C&&R.A9(!1,"rollback");if(R.Z$.isManifestless){f=aV(R.audioTrack,r,p,w);var G=aV(R.videoTrack,r,p,w);R.policy.Df||(G&&t2(R.Z$,r,!0),f&&t2(R.Z$,r,!1));G&&(R.videoTrack.X=[]);f&&(R.audioTrack.X=[]);R.Ty("sdai",{rollbk2_seg:r,rbt:p.toFixed(3),lt:w.toFixed(3),a:f,v:G});(f||G)&&R.policy.C&&E5(R)}}; ilY=function(R){const w=R.D5().filter(p=>p.namespace==="ad"); for(const p of w)if(p.start/1E3>R.getCurrentTime())return p.start/1E3;return Infinity}; Uh=function(R){var w=(0,g.T)();R.Vw=w}; Nk=function(R){R.policy.Mr&&R.policy.fg&&Math.min(DzL(R.videoTrack),DzL(R.audioTrack))*1E3>R.policy.m$?R.ag.ql():R.n3()}; QL=function(R,w,p,r=!1){if(r&&!w.jI||R.policy.Jh)H1()||(r=w.Vh)&&!r.Eh(p.info)&&R.CB.yG(),w.jI=!0;w.rN!==p&&(w.rN=p)}; gk=function(R){return R.XO=w-.01}else w=!1;return w}; E5=function(R){R.Mr.ql()}; fG=function(R,w){w&&pG(R.CB,new ri(w.video,w.reason));R.L.nB&&(w=$Mr(R.L,"a"),R.CB.HT(new ri(w.audio,w.reason)))}; GK=function(R,w,p,r){const f=yL(w);!f||f.O||eM(f,r)||(p.abort(),R.policy.Gw&&w.D?.D(),w.U?.D());if(!p.DA()||H1())try{R.policy.Cs?p.WP(r.rN.info.containerType,r.rN.info.wN)&&p.Ag(r.rN.info.containerType,r.rN.info.wN,r.rN.info.mimeType):p.Ht(r.rN.info.containerType,r.rN.info.mimeType)}catch(G){return g.AO(G),R.Ty("ctexp",{name:G.name,msg:G.message}),!1}else r.rN.info.containerType!==p.DA()&&R.Ty("ctu",{ct:H1(),prev_c:p.DA(),curr_c:r.rN.info.containerType});r=r.rN.xY;R.policy.Ky&&r&&(w=0+r.duration, r=-r.L,0===p.EE()&&w===p.Iu()||p.wD(0,w),r!==p.vB()&&(p.QV(r),A7&&bl6(R.audioTrack.E9(),p.QO())));return!0}; WrW=function(R,w,p){if(!(R.videoTrack.rN.L()&&R.audioTrack.rN.L()&&R.un&&R.un.C&&R.un.L))return!1;if(p&&R.Z$.isManifestless&&(R.videoTrack.K===-1||R.audioTrack.K===-1))return!0;const r=BW(R.videoTrack,w,p);if(isNaN(r))return!1;R=BW(R.audioTrack,R.policy.SI?w:r,p);return isNaN(R)?!1:!0}; xCH=function(R){R.O?.YJ?.itagDenylist&&R.Lq(R.O?.YJ.itagDenylist);R.O?.playbackStartPolicy&&jk(R.policy,R.O?.playbackStartPolicy,3,R.O?.WF());if(R.policy.Pa){var w=R.Mw();(w=w?R.O?.BU.get(w):void 0)&&R.C.UP(w,-1)}R.Z$.S||(w=R.O?.W2,w?.SR&&w?.xJ&&R.Z$.PB&&Oq(R.Z$,w.SR,w.xJ));if(R.O?.wC){w=R.O.wC.get(R.Mw()||"");if(!w)return;if(R.Z$&&w.formatId){const p=R.Z$.G.get(oH(w.formatId));p&&(p.info.debugInfo=w.debugInfo)}}R.policy.O0&&(R.O?.cW().forEach(p=>{R.Uj(p)}),R.O?.zb())}; LrL=function(R){if(!R.Z$.PB)return!0;var w=R.CB.getVideoData();if(R.CB.jf())return R.Ty("ombpa",{}),!1;if(!!R.O?.W2?.ji!==R.Z$.yv)return R.Ty("ombplmm",{}),!1;var p=w.nB||w.liveUtcStartSeconds||w.Vx;if(R.Z$.yv&&p)return R.Ty("ombplst",{}),!1;if(R.Z$.S)return R.Ty("ombab",{}),!1;p=Date.now();return K_(R.Z$)&&!isNaN(R.I0)&&p-R.I0>R.policy.XG*1E3?(R.Ty("ombttl",{}),!1):Yo(w)!==0&&!R.policy.L||w.Y("html5_disable_onesie_media_for_mosaic")&&w.t8()||w.Y("html5_disable_onesie_media_for_lifa_eligible")&&pg(w)? !1:R.CB.V().Tk().L.vS(lM_)&&(w=R.O?.ya()??0,w>=0&&R.Z$.O&&(wR.Z$.gL*1E3))?(R.Ty("ombwnd",{st:w}),!1):R.Z$.tj&&R.Z$.O?(R.Ty("ombminsq",{}),!1):!0}; IZ=function(R,w){const p=tg(w.rN,R.Z$.PB);var r=R.pB?.O5(p)||[];if(r.length===0)return R.Ty("ombmsi",{}),!1;r=new TV(r);if((!R.policy.xY||isFinite(R.getCurrentTime())||R.CB.qj())&&!j$H(r,R.getCurrentTime()))return R.Ty("ostmf",{ct:R.getCurrentTime(),a:w.rN.info.i4()}),!1;R.pB?.dX(p);return!0}; qq6=function(R,w){const p=w.rN;var r=R.Z$.PB;if(LrL(R))if(R.pB&&R.pB.QR(tg(p,r))){if(r=tg(p,r),IZ(R,w)){var f=new TV(R.pB.O5(r)),G=I=>{try{I.Y7()?(R.handleError(I.Tg(),I.J9()),Xy(w,I),d5(I.info)&&iU(R.J,w,p,!0),R.n3()):h7(R.J,I)&&(R.G?.M0(I.info,R.u3),R.n3())}catch(C){I=ru(C),R.handleError(I.errorCode,I.details,I.severity),R.xU()}}; p.pB=!0;nL(f)&&(ek(w,new sR(R.policy,r,f,R.pB,G)),j$(R.timing))}}else R.Ty("ombfmt",{})}; A2d=function(R){R.policy.K&&R.O&&(R.O.nm.forEach(w=>{R.KA(w,-1)}),R.O.nm=[])}; CG=function(R,w){w=w||R.videoTrack&&R.videoTrack.L&&R.videoTrack.L.startTime||R.getCurrentTime();var p=QL,r=R.videoTrack,f=R.L;w=f.nextVideo&&f.nextVideo.index.I3(w)||0;f.O0!==w&&(f.M0={},f.O0=w,S$(f,f.L));w=!f.L.isLocked()&&f.X>-1&&(0,g.T)()-f.X=w&&oV(p,!0)>=w}else p.C.length||r.C.length?(f=p.rN.info.hf+r.rN.info.hf,f=10*(1-C7(w)/f),w=Math.max(f,w.policy.FL),p=oV(r,!0)>=w&&oV(p, !0)>=w):p=!0;if(!p)return"abr";p=R.videoTrack;if(p.C.length>0&&p.O.C.length===1&&wQd(p.O).info.U360);if(!R.m_||p)return"";p=R.policy.YU;Yf(R.policy)&&(p=uJ(R.X,R.m_,C7(R.X)));p=M3H(R.videoTrack,R.getCurrentTime(),p)||M3H(R.audioTrack,R.getCurrentTime(),p);return Yf(R.policy)?p?"mbnm":"":(R.videoTrack.C.length> 0||R.audioTrack.C.length>0||T6(R.J,R.videoTrack,R.audioTrack)||T6(R.J,R.audioTrack,R.videoTrack))&&p?"nord":""}; zK=function(R,w,p,r){r.info.rN.L();var f=r.info.rN.C;if(!f||!p.rG()||p.m4()===f)return!1;let G=f;var I=p.JR();if(R.policy.Y_&&I&&p.isView()&&g.nq(r.info.rN.info)){const u=new DataView(f.buffer,f.byteOffset,f.byteLength);(I=BQI(u,I))?G=new Uint8Array(I.buffer,I.byteOffset,I.byteLength):R.Ty("fenc",{})}R.policy.wW&&(I=ecD(R,r,new oi([G])))&&(G=zQ(I));let C;(I=r.info.rN.D(0,r.info.clipId))&&(C=I.C_[0]);if(r===R.yh){if(R.M0+=1,R.CB.getVideoData().Y("html5_shorts_gapless_restart_on_init_seg_retries")&& R.M0>5)return R.M0=0,R.CB.nX({initSegStuck:1,as:r.info.EC()}),!0}else R.M0=0,R.yh=r;R.policy.s_&&(p.abort(),w.U?.D());f=MzY(R,p,G,C,f);w.U?.X(f,C);if(f!==0)return R.policy.Hd&&Dr(R.CB.getVideoData())?(R.CB.Pr()||mO(R,"sepInit",f,r.info),c2_(R.CB,"sie")):mO(R,"sepInit",f,r.info),!0;r.info.Ih()?(w=R.timing,w.M0||(w.M0=(0,g.T)(),g.qm("vis_a",w.M0,w.L))):(w=R.timing,w.D||(w.D=(0,g.T)(),g.qm("ais_a",w.D,w.L)));(r=r.info.rN.fH)&&R.CB.Y4(new qk(r.key,r.type));return p.cM()}; PIl=function(R,w,p){if(R.policy.nB&&lJ(w)?.isLocked)return!1;if(p.J1())return!0;if(!p.rG())return!1;const r=lJ(w);if(!r||r.info.type===6)return!1;if(R.policy.Qi||R.G?.pB(w,r.info.yk))R.jI=0;else return R.Bo.isSeeking()&&E5(R),R.jI=R.jI||(0,g.T)(),!1;if(!GK(R,w,p,r.info))return!1;if(R.Z$.C&&r.info.L===0){var f;if(p.m4()==null){var G=yL(w);if(!(f=!G||G.rN!==r.info.rN)){b:if(f=G.pB,G=r.info.pB,f.length!==G.length)f=!1;else{for(var I=0;IG)return R.policy.L&&(w===R.videoTrack?R.PS=R.PS||(0,g.T)():R.Jl=R.Jl||(0,g.T)()),R.policy.mO&&Jnd(w.O,G,!1),!1;w===R.videoTrack?R.PS=0:R.Jl=0;R.policy.MH&&p===R.un?.L&&R.N0&&(p.yR()===0?(R.N0=!1,R.policy.MH=!1):R.eI=p.yR());a:{G=R.policy.f_?(0,g.T)():0;I=r.K&&r.info.rN.C||void 0;var C=r.C;r.K&&(C=ecD(R,r,C)||C);const u=zQ(C);C=R.policy.f_?(0,g.T)():0;p=MzY(R,p,u,r.info,I);w.U?.U(r.info,p,C-G,(0,g.T)()-C);R.M0=0;if(p===0)R.YY&&(R.YY=!1,R.f_=!1),R.SI=0,p=!0;else{if(p=== 2||p===5)mO(R,"checked",p,r.info);else{if(p===1){if(!R.YY){R.YY=!0;p=!1;break a}if(!R.f_){R.f_=!0;R.CB.seekTo(R.getCurrentTime(),{dB:"quotaExceeded",gE:!0});p=!1;break a}r.info.Ih()?(G=R.policy,G.jI=Math.floor(G.jI*.8),G.I0=Math.floor(G.I0*.8)):(G=R.policy,G.N0=Math.floor(G.N0*.8),G.I0=Math.floor(G.I0*.8));R.policy.L?w9(R.K,r.info.rN):p6(R.L,r.info.rN)}R.CB.nX({reattachOnAppend:p})}p=!1}}if(!p)return!1;R.policy.nB&&r.info.J()?(R.CB.V().dn()&&R.Ty("eosl",{ls:r.info.EC()}),r.isLocked=!0):(w.WH(r),agb(R.L, r.info));f&&(w=r.info.rN.fH)&&R.CB.Y4(new qk(w.key,w.type));return!0}; ecD=function(R,w,p){var r;if(r=R.policy.wW&&R.un&&!R.un.S&&!R.CB.Rf())w=w.info.rN.info,r=w.G3()&&w.G()&&w.video&&w.video.width<3840&&w.video.width>w.video.height;if(r&&(R.un.S=!0,Cq('video/webm; codecs="vp09.00.50.08.01.01.01.01.00"; width=3840; height=2160')))return p=RlY(p),R.policy.O&&R.Ty("sp4k",{s:!!p}),p}; MzY=function(R,w,p,r,f){try{const G=w===R.un?.L?R.audioTrack:R.videoTrack;if(R.policy.nB&&r?.J()){if(r?.S>1)return 6;G.I0=new g.vZ(()=>{const I=lJ(G);R.cS()||!I?.isLocked?R.CB.V().dn()&&R.Ty("eosl",{delayA:I?.info.EC()}):Krr(G)?(R.CB.V().dn()&&R.Ty("eosl",{dunlock:I?.info.EC()}),sr(R,G===R.audioTrack)):(R.Ty("nue",{ls:I.info.EC()}),I.info.S+=1,R.un&&R.b$())},1E4,R); R.CB.V().dn()&&R.Ty("eosl",{delayS:r.EC()});G.I0.start()}R.policy.Os&&r?.rN instanceof V5&&r.J()&&R.Ty("poseos",{itag:r.rN.info.itag,seg:r.yk,lseg:r.rN.index.ea(),es:r.rN.index.J});w.appendBuffer(p,r,f)}catch(G){if(G instanceof DOMException){if(G.code===11)return 2;if(G.code===12)return 5;if(G.code===22||G.message.indexOf("Not enough storage")===0)return w=Object.assign({name:"QuotaExceededError",buffered:Fs(w.f3()).replace(/,/g,"_"),vheap:Pj(R.videoTrack),aheap:Pj(R.audioTrack),message:g.P8(G.message, 3),track:R.un?w===R.un.C?"v":"a":"u"},tMW()),R.handleError("player.exception",w),1;g.LF(G)}return 4}return R.un.u4()?3:0}; mO=function(R,w,p,r){let f="fmt.unplayable",G=1;p===5||p===3?(f="fmt.unparseable",R.policy.L?!r.rN.info.video||vW(R.K.L).size>0||w9(R.K,r.rN):!r.rN.info.video||vW(R.L.K).size>0||p6(R.L,r.rN)):p===2&&(R.SI<15?(R.SI++,f="html5.invalidstate",G=0):f="fmt.unplayable");r=aH(r);r.mrs=R.un?.O();r.origin=w;r.reason=p;r.trg="appenderr";R.handleError(f,r,G)}; q9L=function(R,w,p,r,f){var G=R.Z$;var I=R.policy.L,C=!1;let u=-1;for(const B in G.L){var m=Ew(G.L[B].info.mimeType)||G.L[B].info.Ih();if(r===m)if(m=G.L[B].index,m.IA(w.yk)){{C=m;var z=w;const W=C.O(z.yk);W&&W.startTime!==z.startTime?(C.segments=[],C.D(z),C=!0):C=!1}C?u=w.yk:!w.pending&&I&&(z=m.getDuration(w.yk),z!==w.duration&&(G.publish("clienttemp","mfldurUpdate",{itag:G.L[B].info.itag,seg:w.yk,od:z,nd:w.duration},!1),m.D(w),C=!0))}else m.D(w),C=!0}u>=0&&G.publish("clienttemp","resetMflIndex", {[r?"v":"a"]:u},!1);G=C;vjI(R.Bo,w,r,G);R.policy.O0||R.G.bS(w,p,r,f);w.yk===R.Z$.tj&&G&&L_(R.Z$)&&w.startTime>L_(R.Z$)&&(R.Z$.Vm=w.startTime+(isNaN(R.timestampOffset)?0:R.timestampOffset),R.Bo.isSeeking()&&R.Bo.targetTime{R.policy.O&&R.Ty("pathprobe",p)},p=>{R.CB.handleError(p)})}; aM_=function(R,w){R.u3=w;R.G&&(R.G.u3=w);w=R.u3;var p=R.videoTrack.rN.info.G3();w.yh=p;w.l3({swebm:p});R.J.u3=R.u3;R.policy.C&&(R.C.u3=R.u3,A2d(R))}; $CY=function(R,w){if(R.un&&R.un.C){w-=isNaN(R.timestampOffset)?0:R.timestampOffset;R.getCurrentTime()!==w&&R.resume();if(R.Bo.isSeeking()&&R.un&&!R.un.u4()){const p=R.getCurrentTime()<=w&&wr.startTime>=w&&WrW(R,r.startTime,!1)); return p&&p.startTime0)p=!0;else{for(const r of R.O.values())if(r.cryptoPeriodIndex===p){p=!0;break a}p=!1}}R.publish("log_qoe",{wvagt:"reqnews",canskip:p});p||R.publish("rotated_need_key_info_ready",w)}; FrP=function(R){switch(R){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}}; T3W=function(R,w=!1){var p=R.status==="LICENSE_STATUS_OK"?0:9999,r=null;if(R.license)try{r=X0(R.license)}catch(f){g.LF(f)}if(p===0&&!r)return null;r=new j0H(p,r);p!==0&&R.reason&&(r.errorMessage=R.reason);if(R.authorizedFormats){p={};const f=[],G={};for(const I of R.authorizedFormats){if(!I.trackType||!I.keyId)continue;w&&r.C.push({trackType:FrP(I.trackType),isHdr:!!I.isHdr});let C=J2I[I.trackType];if(C){C==="HD"&&R.isHd720&&(C="HD720");I.isHdr&&(C+="HDR");p[C]||(f.push(C),p[C]=!0);let u=null;try{u= X0(I.keyId)}catch(m){g.LF(m)}u&&(G[g.c8(u,4)]=C)}}r.O=f;r.L=G}R.nextFairplayKeyId&&(r.nextFairplayKeyId=R.nextFairplayKeyId);R.sabrLicenseConstraint&&(r.sabrLicenseConstraint=X0(R.sabrLicenseConstraint));return r}; i_r=function(R,w,p){R.onSuccess=w;R.onError=p}; Q0d=function(R,w,p,r){const f={timeout:3E4,onSuccess:G=>{if(!R.cS())if(u$("drm_net_r",void 0,R.timer),G=T3W(G,R.C))R.onSuccess(G,R.requestNumber);else R.onError(R,"drm.net","t.p;p.i")}, onError:G=>{if(!R.cS())if(G&&G.error)G=G.error,R.onError(R,"drm.net.badstatus",`t.r;p.i;c.${G.code};s.${G.status}`,G.code);else R.onError(R,"drm.net.badstatus","t.r;p.i;c.n")}, onTimeout:()=>{R.onError(R,"drm.net",`rt.req.${R.requestNumber}`)}}; r&&(f.CC=`Bearer ${r}`);g.XG(p,"player/get_drm_license",w,f)}; lb=function(R,w,p=!1){Ro(w);(p||R.LB.dn())&&R.publish("ctmp","drmlog",w)}; hcr=function(R){let w=R.baseUrl;EMP(w)||R.error("drm.net",2,"t.x");if(!t4(w,"fexp")){const p=["23898307","23914062","23916106","23883098"].filter(r=>R.LB.experiments.experiments[r]); p.length>0&&(R.K.fexp=p.join())}for(const p of Object.keys(R.K))w=TaH(w,p,R.K[p]);return w}; H__=function(R,w,p,r){gX_(w,(f,G)=>{if(R.LB.Tk().L.vS(LG)&&R.C.flavor==="widevine")a:{let I=!1;try{I=OA(f,FkD).type===4}catch(C){}if(I){if(lb(R,{cert_cache_hit:!!R.F9?.certificate},!0),r){R.O.length===0&&lb(R,{md_gap:1},!0);w?.update(r);break a}}else if(p){p.L=w??null;p.licenseRequest=f;break a}qd(R,f,G,I)}else qd(R,f,G)},(f,G,I)=>{if(!R.cS()){G=void 0; var C=1;g.g3(R.C)&&g.Cb(R.LB)&&R.LB.Y("html5_enable_safari_fairplay")&&I===1212433232&&(G="ERROR_HDCP",C=R.LB.Y("html5_safari_fairplay_ignore_hdcp")?0:C);R.error("drm.keyerror",C,f,G)}},()=>{R.cS()||(lb(R,{onkyadd:1}),R.S||(R.publish("sessionready"),R.S=!0))},f=>{R.ol(f)})}; qd=function(R,w,p,r=!1){if(!R.cS())if(w){lb(R,{onkmtyp:p});R.status="km";switch(p){case "license-renewal":case "license-request":case "license-release":break;case "individualization-request":vXD(R,w);return;default:R.publish("ctmp","message_type",{t:p,l:w.byteLength})}R.xY||(u$("drm_gk_f",void 0,R.videoData.pB),R.xY=!0,R.publish("newsession",R));if(YX(R.C)&&(w=N3l(w),!w))return;w=new knd(w,++R.requestNumber,R.videoData.pB,R.LB.Y("html5_enable_vp9_fairplay"));i_r(w,f=>{UCd(R,f,r)},(f,G,I)=>{if(!R.cS()){var C= 0; f.L.C>=3&&(C=1,G="drm.net.retryexhausted");lb(R,{onlcsrqerr:G,info:I});R.error(G,C,I);R.shouldRetry(wu(C),f)&&SqP(R,f)}}); g.K(R,w);RmD(R,w)}else R.error("drm.unavailable",1,"km.empty")}; wad=function(R,w,p=null,r){let f=null;try{f=w.createSession(R.U,G=>{lb(R,{m:G})}),H__(R,f,r,p)}catch(G){w="t.g",G instanceof DOMException&&(w+=`;c.${G.code}`),R.publish("licenseerror","drm.unavailable",1,w,"HTML5_NO_AVAILABLE_FORMATS_FALLBACK")}return f}; vXD=function(R,w){lb(R,{sdpvrq:1});R.J=Date.now();if(R.C.flavor!=="widevine")R.error("drm.provision",1,`e.flavor;f.${R.C.flavor};l.${w.byteLength}`);else{var p={cpn:R.videoData.clientPlaybackNonce};Object.assign(p,R.LB.L);p=g.bu("https://www.googleapis.com/certificateprovisioning/v1/devicecertificates/create?key=AIzaSyB-5OLKTx2iU5mko18DfdwK5611JIjbUhE",p);w={format:"RAW",headers:{"content-type":"application/json"},method:"POST",postBody:JSON.stringify({signedRequest:String.fromCharCode.apply(null, w)}),responseType:"arraybuffer"};g.iF(p,w,3,500).then(j3(r=>{r=r.xhr;if(!R.cS()){r=new Uint8Array(r.response);var f=String.fromCharCode.apply(null,r);try{var G=JSON.parse(f)}catch(I){}G&&G.signedResponse?(R.publish("ctmp","drminfo",{provisioning:1}),G=(Date.now()-R.J)/1E3,R.J=NaN,R.publish("ctmp","provs",{et:G.toFixed(3)}),R.G&&R.G.update(r)):(G=G&&G.error&&G.error.message,r="e.parse",G&&(r+=`;m.${G}`),R.error("drm.provision",1,r))}}),j3(r=>{R.cS()||R.error("drm.provision",1,`e.${r.errorCode};c.${r.xhr&& r.xhr.status}`)}))}}; UCd=function(R,w,p){if(!R.cS())if(lb(R,{onlcsrsp:1}),R.status="rr",w.statusCode!==0)R.error("drm.auth",1,`t.f;c.${w.statusCode}`,w.errorMessage||void 0);else{u$("drm_kr_s",void 0,R.videoData.pB);if(w.heartbeatParams&&w.heartbeatParams.url&&R.videoData.Y("outertube_streaming_data_always_use_staging_license_service")){var r=R.C.O.match(/(.*)youtube.com/g);r&&(w.heartbeatParams.url=r[0]+w.heartbeatParams.url)}w.heartbeatParams&&R.publish("newlicense",w.heartbeatParams);w.O&&(R.O=w.O,R.videoData.M6|| R.publish("newlicense",new paP),R.videoData.M6=!0,R.D=Nx(R.O,f=>f.includes("HDR"))); w.C&&(R.X=w.C);w.L&&(R.LB.Y("html5_enable_vp9_fairplay")&&R.C.L()?(r=g.c8(EZ(R.fairplayKeyId),4),R.L[r]={type:w.L[r],status:"unknown"}):R.L=M6(w.L,f=>({type:f,status:"unknown"}))); h2(R.C)&&(w.message=Owd(g.c8(w.message)));R.G&&(lb(R,{updtks:1}),R.status="ku",p&&R.F9&&R.LB.Tk().L.vS(LG)&&(R.F9.certificate=w.message),R.G.update(w.message).then(()=>{u$("drm_kr_f",void 0,R.videoData.pB);Av(R)||(lb(R,{ksApiUnsup:1}),R.publish("keystatuseschange",R));!p&&R.F9&&R.LB.Tk().L.vS(r5H)&&(R.F9.L=wad(R,R.F9.mediaKeys,R.F9?.certificate,R.F9))},f=>{f=`msuf.req.${R.requestNumber};msg.${g.P8(f.message,3)}`; R.error("drm.keyerror",1,f)})); g.g3(R.C)&&R.publish("fairplay_next_need_key_info",R.baseUrl,w.nextFairplayKeyId);R.LB.Y("html5_enable_vp9_fairplay")&&R.C.L()&&R.publish("qualitychange",fEd(R.O));w.sabrLicenseConstraint&&R.publish("sabrlicenseconstraint",w.sabrLicenseConstraint)}}; RmD=function(R,w){R.status="km";u$("drm_net_s",void 0,R.videoData.pB);const p=new g.SV(R.LB.lD),r={context:g.uj(p.config_||g.Ci())};r.drmSystem=GIl[R.C.flavor];r.videoId=R.videoData.videoId;r.cpn=R.videoData.clientPlaybackNonce;r.sessionId=R.sessionId;r.licenseRequest=g.c8(w.message);r.drmParams=R.videoData.drmParams;isNaN(R.cryptoPeriodIndex)||(r.isKeyRotated=!0,r.cryptoPeriodIndex=R.cryptoPeriodIndex);var f=!!R.videoData.C?.D()?.isHdr();r.drmVideoFeature=f?"DRM_VIDEO_FEATURE_PREFER_HDR":"DRM_VIDEO_FEATURE_SDR"; R.LB.experiments.Tk().L.vS(IEP)&&(r.context=g.sm(R.videoData));if(r.context&&r.context.client){if(f=R.LB.L)r.context.client.deviceMake=f.cbrand,r.context.client.deviceModel=f.cmodel,r.context.client.browserName=f.cbr,r.context.client.browserVersion=f.cbrver,r.context.client.osName=f.cos,r.context.client.osVersion=f.cosver;R.LB.experiments.Tk().L.vS(IEP)||(r.context.user=r.context.user||{},R.videoData.xY&&(r.context.user.credentialTransferTokens=[{token:R.videoData.xY,scope:"VIDEO"}]),R.videoData.N0&& (r.context.user.kidsParent={oauthToken:R.videoData.N0}));r.context.request=r.context.request||{};r.context.request.mdxEnvironment=R.videoData.mdxEnvironment||r.context.request.mdxEnvironment;g.g3(R.C)&&(r.fairplayKeyId=g.c8(EZ(R.fairplayKeyId)));g.$W(R.LB,R.videoData.J()).then(G=>{Q0d(w,r,p,G);R.status="rs"})}else R.error("drm.net",2,"t.r;ic.0")}; C8r=function(R,w,p){const r={};r.isHdr=w.includes("HDR");switch(w.replace("HDR","").replace("720","")){case "AUDIO":r.trackType=1;break;case "SD":r.trackType=2;break;case "HD":r.trackType=3;break;case "UHD1":r.trackType=4;break;case "UHD2":r.trackType=5;break;default:r.trackType=0}!r.trackType||p[w]||Av(R)&&!bb(R,w)||(R.authorizedFormats.push(r),p[w]=!0)}; u7d=function(R,w){const p=[];for(const r of Object.keys(R.L))p.push(`${r}_${R.L[r].type}_${R.L[r].status}`);return p.join(w)}; Av=function(R){var w;if(w=R.pB&&R.G!=null)R=R.G,w=!(!R.L||!R.L.keyStatuses);return w}; SqP=function(R,w){var p=w.L.getValue();p=new g.vZ(()=>{RmD(R,w)},p); g.K(R,p);p.start();g.we(w.L);lb(R,{rtyrq:1})}; yN=function(R){const w={};w[R.status]=Av(R)?u7d(R,"."):R.O.join(".");return w}; bb=function(R,w){for(const p in R.L)if(R.L[p].status==="usable"&&R.L[p].type===w)return!0;return!1}; saY=function(R,w){for(const p in R.L)if(R.L[p].type===w)return R.L[p].status}; mUI=function(R){let w;w=R[0];R[0]=R[3];R[3]=w;w=R[1];R[1]=R[2];R[2]=w;w=R[4];R[4]=R[5];R[5]=w;w=R[6];R[6]=R[7];R[7]=w}; fEd=function(R){return g.ra(R,"UHD2")||g.ra(R,"UHD2HDR")?"highres":g.ra(R,"UHD1")||g.ra(R,"UHD1HDR")?"hd2160":g.ra(R,"HD")||g.ra(R,"HDHDR")?"hd1080":g.ra(R,"HD720")||g.ra(R,"HD720HDR")?"hd720":"large"}; N3l=function(R){var w="";for(let p=0;p{R.onClosed()}),null)):R.C&&(TU(R.G,R.C,["mskeymessage", "webkitkeymessage"],R.S),TU(R.G,R.C,["mskeyerror","webkitkeyerror"],R.pB),TU(R.G,R.C,["mskeyadded","webkitkeyadded"],R.X))}; BNr=function(R,w,p){g.LF(p);R.O&&(p instanceof DOMException&&(w+=`;n.${p.name};m.${p.message}`),R.O(w))}; Wfd=function(R){TU(R.G,R.element,["keymessage","webkitkeymessage"],R.pB);TU(R.G,R.element,["keyerror","webkitkeyerror"],R.X);TU(R.G,R.element,["keyadded","webkitkeyadded"],R.U)}; xUD=function(R,w=null){if(R.L.keySystemAccess)return R.D=R.D.then(()=>R.mediaKeys?Promise.resolve():w?.mediaKeys&&w.kY?.lB()?(R.mediaKeys=w?.mediaKeys,Promise.resolve()):R.L.keySystemAccess.createMediaKeys().then(p=>{R.cS()||(R.mediaKeys=p,w?.kY?.lB()&&(w.mediaKeys=p))})).then(()=>{const p=w?.zk(); return R.element&&R.element!==p&&R.element.mediaKeys?R.element.setMediaKeys(null):Promise.resolve()}).then(()=>{R.element=w?.zk(); return R.element&&R.element.mediaKeys!==R.mediaKeys?R.element.setMediaKeys(R.mediaKeys):Promise.resolve()}),R.D; ZM(R.L)?R.C=new (n_())(R.L.keySystem):Fa(R.L)?(R.C=new (n_())(R.L.keySystem),R.element?.webkitSetMediaKeys(R.C)):Wfd(R);return null}; lEr=function(R,w){const p=new Uint8Array(270);for(let r=0;r<135;r++)p[r*2]=''.charCodeAt(r);R=R.C.createSession("video/mp4",w,p);return new VN(null,null,null,null,R)}; qgI=function(R,w){w=LfH(w,R.L.IG);w=R.C.createSession("video/mp4",w);return new VN(null,null,null,null,w,R.J)}; oZ=function(R,w){let p=R.K[w.sessionId];!p&&R.O&&(p=R.O,R.O=null,p.sessionId=w.sessionId,R.K[w.sessionId]=p);return p}; LfH=function(R,w){var p=R.subarray(4);p=new Uint16Array(p.buffer,p.byteOffset,p.byteLength/2);p=String.fromCharCode.apply(null,p).match(/ek=([0-9a-f]+)/)[1];var r="";for(var f=0;f{A5H(R)}),j3(p=>{if(!R.cS()){g.LF(p); var r="t.a";p instanceof DOMException&&(r+=";n."+p.name+";m."+p.message);R.publish("licenseerror","drm.unavailable",1,r,"HTML5_NO_AVAILABLE_FORMATS_FALLBACK")}})):(R.C({mdkrdy:1}),R.pB=!0); R.S&&(w=xUD(R.S,R.mediaElement))}; A5H=function(R){if(!R.cS())if(R.LB.Y("html5_drm_set_server_cert")||R.L.L()){const w=R.mediaKeys.setServerCertificate();w?w.then(j3(p=>{R.LB.dn()&&R.publish("ctmp","ssc",{success:p})}),j3(p=>{R.publish("ctmp","ssce",{n:p.name, m:p.message})})).then(j3(()=>{tv(R)})):tv(R)}else tv(R)}; VfY=function(R,w,p){R.N0=!0;p=new qk(w,p);R.LB.Y("html5_eme_loader_sync")&&(R.J.get(w)||R.J.set(w,p));y5d(R,p)}; y5d=function(R,w){if(!R.cS()){R.C({onInitData:1});if(R.LB.Y("html5_eme_loader_sync")&&R.videoData.O&&R.videoData.O.L()){var p=R.U.get(w.initData);w=R.J.get(w.initData);if(!p||!w)return;w=p;p=w.initData;R.J.remove(p);R.U.remove(p)}R.C({initd:w.initData.length,ct:w.contentType});if(R.L.flavor==="widevine")if(R.Jl&&!R.videoData.isLivePlayback)Or(R);else{if(!(R.LB.Y("vp9_drm_live")&&R.videoData.isLivePlayback&&w.G3)){R.Jl=!0;p=w.cryptoPeriodIndex;var r=w.L;vyP(w);w.G3||(r&&w.L!==r?R.publish("ctmp","cpsmm", {emsg:r,pssh:w.L}):p&&w.cryptoPeriodIndex!==p&&R.publish("ctmp","cpimm",{emsg:p,pssh:w.cryptoPeriodIndex}));R.publish("widevine_set_need_key_info",w)}}else R.M0(w)}}; Or=function(R){if(R.N0&&R.pB&&!R.O0){for(;R.G.length;){const w=R.G[0],p=oWb(R)?NZY(w):g.c8(w.initData);if(R.L.L()&&!w.C)R.G.shift();else{if(R.O.get(p))if(R.L.flavor!=="fairplay"||R.L.L()){R.G.shift();continue}else R.O.delete(p);vyP(w);break}}R.G.length&&R.createSession(R.G[0])}}; tv=function(R){R.cS()||(R.pB=!0,R.C({onmdkrdy:1}),Or(R))}; oWb=function(R){return R.L.flavor==="widevine"&&R.videoData.Y("html5_drm_cpi_license_key")}; tfx=async function(R){if(g.IN()&&R.mediaKeys.mediaKeys?.getMetrics){var w=await R.mediaKeys.getMetrics();w&&(Ge(w)||(w=g.AH(w)),/^[A-Za-z0-9_-]+={0,3}$/.test(w)||(w=g.P8(w,void 0,!0)),R.publish("ctmp","drm",{metrics:w}))}}; o3=function(R,w,p,r){var f=w^R;if((R&105)==R)a:{var G=g.F(p,ObL)||p[l[f^4430]];const C={aH:!1,RK:l[1],zS:l[1],s:l[1]};if(!G){var I=C;break a}G=lF(G);C[l[f^4413]]=!0;C[l[f^4422]]=G[l[f^4460]];C[l[f^4473]]=G[l[f^4390]];C[l[f^4455]]=G[l[f^4455]];I=C}R-5>>4<3&&(R>>2&5)>=3&&(r=(r%p[l[2]]+p[l[2]])%p[l[2]],p[l[f^1481]](r,1));return I}; KfP=function(R,w){if(R.videoData.U)return!1;R.zy.SI+=1;if(R.zy.SI<=10)return!1;w.exiled=`${R.zy.SI}`;R.K$("qoe.start15s",w);R.CB.publish("playbackstalledatstart");return!0}; EW6=function(R){return R.C?!0:R.zy.pB==="yt"?Qk(R.videoData)?R.CB.loader?.a9():R.videoData.U?R.videoData.U0<25:!R.videoData.U0:!1}; DUY=function(R){if(!R.C){R.C=!0;var w=R.CB.getPlayerState();w=w.isPaused()||w.isSuspended();R.CB.Ra();w&&!rH(R.videoData)||R.CB.publish("signatureexpired")}}; KG=function(R,w,p){const r=R.videoData.C;var f=R.videoData.G,G=R.zy.Y("html5_disable_codec_fallback_for_drm")&&R.videoData.ph();Dr(R.CB.getVideoData())&&c2_(R.CB,"pe");R.zy.Tk().L.vS(emd)&&(p.bkg=R.CB.Z5().isBackground()?"1":"0");if((w==="progressive.net.retryexhausted"||w==="fmt.unplayable"||w==="fmt.decode")&&!R.CB.Gv.K&&r&&r.itag==="22")return R.CB.Gv.K=!0,R.K$("qoe.restart",{reason:"fmt.unplayable.22"}),R.CB.RA(),!0;var I=!1;if(R.videoData.isExternallyHostedPodcast){if(I=R.videoData.Pe)p.mimeType= I.type,R.Ty("3pp",{url:I.url});p.ns="3pp";R.CB.A$(w,1,"VIDEO_UNAVAILABLE",Ro((new g.pq(w,p,1)).details));return!0}var C=R.E8+3E4<(0,g.T)()||R.L.isActive();if(R.zy.Y("html5_empty_src")&&R.videoData.isAd()&&w==="fmt.unplayable"&&/Empty src/.test(`${p.msg}`))return p.origin="emptysrc",R.K$("auth",p),!0;C||Mfx(R.CB.Z5())||(p.nonfg="paused",C=!0,R.CB.pauseVideo());w!=="fmt.decode"&&w!=="fmt.unplayable"||!f?.J()||(AHd(R.zy.K,f.wN),p.acfallexp=f.wN,I=C=!0);!C&&R.O>0&&(R.L.start(),C=!0,p.delayed="1",--R.O); f=R.CB.loader;C||!r?.L()&&!r?.G()||G||(AHd(R.zy.K,r.wN),I=C=!0,p.cfallexp=r.wN);if(!C)return KfP(R,p);G=!1;R.K?R.E8=(0,g.T)():G=R.K=!0;C=R.videoData;if(C.M0){C=C.M0.K();var u=Date.now()/1E3+1800;C=C6048E5&&Er(R,"signature",!0);return!1}; Xad=function(R){if(R.videoData.errorDetail==="7"&&g.I1(R.zy)){const w=!R.videoData.isInlinePlaybackNoAd;w&&R.zy.J8++;Er(R,"innertube_player_reload_required",w&&R.zy.J8>1);return!0}return!1}; Du=function(R,w="fmt.noneavailable"){var p=R.zy.K;p.J=!1;p.L=!0;R.K$("qoe.restart",{e:w,detail:"hdr"});R.CB.yG(!0)}; nWb=function(R){if(R.CB.Z5().isInline())return $Q;R=yy[fJ()];return g.qJ("auto",R,!1,"s")}; dUd=function(R,w){var p;a:if((p=w.L)&&p.videoInfos.length){for(var r of p.videoInfos)if(r.K?.smooth){p=r.video.qualityOrdinal;break a}p=p.videoInfos[0].video.qualityOrdinal}else p=0;(g.fh("armv7")||g.fh("aarch64")||g.fh("android"))&&!g.I1(R.LB)&&w.L.videoInfos[0].G()&&(p=Math.min(p,g.tC.large));r=g.Iq(R.LB.experiments,"html5_chipset_soft_cap");r>0&&(p=Math.min(p,r));r=g.Iq(R.LB.experiments,"html5_sabr_non_streaming_xhr_soft_cap");!s_&&r>0&&(p=Math.min(p,r));if(r=g.Iq(R.LB.experiments,"html5_max_vertical_resolution")){let I= 4320;for(var f=0;fr&&(I=Math.min(I,G.video.qualityOrdinal))}if(I<4320){f=0;for(G=0;G60&&!g.I1(R.LB)?new LJ(0,360,!1,"v"):$Q}; Md=function(R,w,p){if(R.LB.experiments.XB("html5_disable_client_autonav_cap_for_onesie")&&w.B9()||g.I1(R.LB)&&(fJ(-1)>=1080||w.osid))return $Q;let r=g.Iq(R.LB.experiments,"html5_autonav_quality_cap");const f=g.Iq(R.LB.experiments,"html5_autonav_cap_idle_secs");return r&&w.isAutonav&&r1()/1E3>f?(p&&(r=ZbW(R,p,r)),new LJ(0,r,!1,"e")):$Q}; cF=function(R,w){if(!w.L.L())return R.K?new LJ(0,360,!1,"b"):$Q;var p=!1,r=!1;for(var f of w.L.videoInfos)f.L()?p=!0:r=!0;p=p&&r;r=0;f=g.Iq(R.LB.experiments,"html5_performance_cap_floor");f=R.LB.C?240:f;for(const G of w.L.videoInfos){if(p&&G.L())continue;w=MC(G.wN,G.video.fps,R.O);const I=G.video.qualityOrdinal;if(Math.max(w,f)>=I){r=I;break}}return new LJ(0,r,!1,"b")}; aZ=function(R,w){const p=PF(R,w.L?.videoInfos),r=R.CB.getPlaybackRate();return r>1&&p?(R=lC_(R.LB.K,w.L.videoInfos,r),new LJ(0,R,!0,"o")):new LJ(0,0,!1,"o")}; Ffl=function(R,w){if(R.Y("html5_disable_ustreamer_constraint_for_sabr")&&Qk(w.videoData))return $Q;const p=R.CB.M1();R.Y("html5_use_video_quality_cap_for_ustreamer_constraint")&&p&&p.mY>0&&bk(w.videoData.m1)&&(R=p.mY,w.videoData.m1=new LJ(0,R,!1,"u"));return w.videoData.m1}; $n=function(R,w,p){g.I1(R.LB)&&(p=p.compose(R.Hj(w)));return p}; PF=function(R,w){return w&&g.I1(R.LB)?w.some(p=>p.video.C()):!1}; ZbW=function(R,w,p){if(R.Y("html5_optimality_defaults_chooses_next_higher")&&p)for(R=w.L.videoInfos,w=1;w49?"p60":r>32?"p48":""}`;p=MC(p,r,G);f>0&&(p=Math.min(p,f));!cK.has(w)&&CJ().includes(w)?(r=IT(),+r[w]>0&&(p=Math.min(+r[w],p)),r[w]!==p&&(r[w]=p,g.Qp("yt-player-performance-cap",r,2592E3))):cK.has(w)||G==null?(r=CJ().slice(),r.includes(w)||(r.push(w),g.Qp("yt-player-performance-cap-active-set",r,2592E3)),ez.set(w,p)):(cK.add(w),G?.set(w,p));R.CB.vN()}; TNl=function(){return M6(IT(),R=>`${R}`)}; ib_=function(R,w,p,r){if(!w||!p||!w.videoData.C)return!1;const f=g.Iq(R.LB.experiments,"html5_df_downgrade_thresh"),G=R.Y("html5_log_media_perf_info");if(!((0,g.T)()-R.G<5E3?0:G||f>0))return!1;const I=((0,g.T)()-R.G)/1E3;R.G=(0,g.T)();p=p.getVideoPlaybackQuality();if(!p)return!1;const C=p.droppedVideoFrames-R.J,u=p.totalVideoFrames-R.U;R.J=p.droppedVideoFrames;R.U=p.totalVideoFrames;const m=p.displayCompositedVideoFrames===0?0:p.displayCompositedVideoFrames||-1;G&&R.LB.dn()&&R.CB.Ty("ddf",{dr:p.droppedVideoFrames, de:p.totalVideoFrames,comp:m});if(r)return R.L=0,!1;if((u-C)/I>R.X||!f||g.I1(R.LB))return!1;R.L=(u>60?C/u:0)>f?R.L+1:0;if(R.L!==3)return!1;J5r(R,w.videoData.C);R.CB.Ty("dfd",Object.assign({dr:p.droppedVideoFrames,de:p.totalVideoFrames},TNl()));return!0}; QaH=function(R,w){R.Y("html5_log_media_perf_info")&&(R.CB.Ty("perfdb",TNl()),R.CB.Ty("sessionperfdb",Object.fromEntries(ez.entries())),R.CB.Ty("playbackperfdb",Object.fromEntries(R.O.entries())),R.CB.Ty("hwc",{nch:navigator.hardwareConcurrency},!0),w&&R.CB.Ty("mcdb",{itags:w.L.videoInfos.filter(p=>p.K?.smooth===!1).map(p=>p.itag).join("-")}))}; hmd=function(R){switch(R.LB.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"}}; gWd=function(R){R.L>=0||(R.provider.CB.getVisibilityState()===3?R.K=!0:(R.L=g.g9(R.provider),R.delay.start()))}; Hbd=function(R){if(!(R.C<0)){var w=g.g9(R.provider),p=w-R.G;R.G=w;R.playerState.C()?R.playTimeSecs+=p:R.playerState.isBuffering()&&!R.playerState.L(16)&&(R.rebufferTimeSecs+=p)}}; nG=function(R,w=!1){R.L.G=w;R.L.startTime=R.O;R.L.endTime=R.C;R.jN?.length&&(R.L.jN=R.jN);R.qS?.length&&(R.L.qS=R.qS);w=!1;const p=g.Tr(R.segments);R.segments.length&&!p?.G&&p?.isEmpty()?(R.segments[R.segments.length-1].previouslyEnded&&(R.L.previouslyEnded=!0),R.segments[R.segments.length-1]=R.L,w=!0):R.segments.length&&R.L.isEmpty()&&!R.L.G||(R.segments.push(R.L),w=!0);w?R.L.endTime===0&&(R.previouslyEnded=!1):R.L.previouslyEnded&&(R.previouslyEnded=!0);R.J+=R.C-R.O;R.L=Xw(R.provider);R.L.previouslyEnded= R.previouslyEnded;R.provider.LB.Tk().L.vS(vWL)&&(R.K+=JSON.stringify(R.L).length);R.previouslyEnded=!1;R.O=R.C}; NNI=function(R){g.$E(R.D);R.D=NaN}; kId=function(R){NNI(R);R.D=g.PI(()=>{R.update()},100); R.Fv=g.g9(R.provider);R.L=Xw(R.provider)}; UUr=function(R,w,p){p-=R.Fv;return w===R.C&&p>.5}; di=function(R,w){const p=R.sendVisitorIdHeader?R.visitorData:void 0;return g.$W(R.LB,R.accessToken).then(r=>FQ(R.uri,R.LB,R.pageId,p,r,w))}; Sgb=function(R){R.indexOf("watchtime")!==-1&&g.Rv("gelDebuggingEvent",{vss3debuggingEvent:{vss2Ping:R}})}; R2I=function(R,w){R.attestationResponse&&di(R).then(p=>{p=p||{};p.method="POST";p.postParams={atr:R.attestationResponse};R.I0?R.M0?aA().sendAndWrite(w,p):aA().sendThenWrite(w,p):g.Ff(w,p)})}; w4d=function(R){const w={TN:[]};if(Nx(R.segments,p=>!!p.jN||!!p.qS)){for(const p of R.segments)w.TN.push({jN:p.jN||[], qS:p.qS||[]});R=g.nm({hN:w},icd);return g.c8(R,4)}}; p4Y=function(R,w){return()=>{R.LB.Y("html5_simplify_pings")?(R.L=R.Jl,R.WB=w(),R.pL=0,R.send()):di(R).then(p=>{var r=Sh(R);r.cmt=r.len;r.lact="0";const f=w().toFixed(3);r.rt=Number(f).toString();r=g.bu(R.uri,r);R.LB.Y("vss_through_gel_double")&&Sgb(r);R.I0?(p==null&&(p={}),R.M0?aA().sendAndWrite(r,p):aA().sendThenWrite(r,p)):p?g.Ff(r,p):g.Ki(r)})}}; UO=function(R,w){return g.gd(w,R.C).join(",")}; PTH=function(R,w){if(w&&R.G){var p=new Set(["q","feature","mos"]),r=new Set("autoplay cl len fexp delay el ns adformat".split(" ")),f=new Set(["aqi","autonav","list","ssrt","upt"]);R.G.ns==="3pp"&&(w.ns="3pp");for(const G of Object.keys(R.G))r.has(G)||p.has(G)||f.has(G)&&!R.G[G]||(w[G]=R.G[G])}}; Zu=function(R,w){var p=rNH(R.provider);Object.assign(p,{state:R.X});w=new frl(R.provider.videoData,R.provider.LB,w,p);w.L=R.provider.CB.Lh();p=R.provider.videoData.clientPlaybackNonce;w.L=R.provider.CB.z5(p);R.provider.videoData.isLivePlayback||(w.Jl=R.provider.CB.getDuration(p));R.provider.videoData.L&&(p=R.provider.videoData.L.gg(w.L))&&(w.pB=p-w.L,c4(R.provider.videoData)&&(w.L+=R.provider.CB.vB(),w.pB-=R.provider.CB.vB()));w.WB=g.g9(R.provider);w.segments=[Xw(R.provider)];return w}; GqP=function(R){var w=R.provider.videoData.M9;const p=R.provider.videoData.Bk,r=[10+w,10,10,40+p-w,40];var f=R.provider.videoData.getPlayerResponse()?.playbackTracking;const G=f?.videostatsScheduledFlushWalltimeSeconds;f=f?.videostatsDefaultFlushIntervalSeconds;if(!(G&&G.length>0&&f))return r;w=[G[0]+w,...G.slice(1).map((I,C)=>I-G[C]), f+p-w,f];return w.some(I=>I<0)?(g.hg(R.logger,347111855,`Neg vss scheduled pings ${G} ${f}`),r):w}; Yn=function(R,w=NaN){const p=g.g9(R.provider);w=isNaN(w)?p:w;w=Math.ceil(w);const r=R.O0[R.pB];R.pB+1{if(!R.cS()){R.K=NaN;var G=R.S(),I=Irr(R,G);I.X=f;var C=R.I0>1E3;!(G.length>1)&&G[0].isEmpty()||C||(I.D=Yn(R,f));I.send();R.I0++}},(f-p)*1E3); return R.C=f}; Fw=function(R,w){const p=R.provider.LB;g.$W(R.provider.LB,R.provider.videoData.J()).then(r=>{const f=R.provider.LB.pageId,G=R.provider.LB.sendVisitorIdHeader?R.provider.videoData.visitorData:void 0,I=R.provider.LB.Y("vss_pings_using_networkless")||R.provider.LB.Y("kevlar_woffle"),C=R.provider.LB.Y("allow_skip_networkless");r=FQ(w,p,f,G,r);jU(w,r,{token:R.provider.videoData.iI,Zj:R.provider.videoData.u8,mdxEnvironment:R.provider.videoData.mdxEnvironment},p,void 0,I&&!C,!1,!0)})}; Irr=function(R,w){const p=Zu(R,"watchtime");CXW(R)&&(p.delayThresholdMet=!0,R.jI=!0);if(R.O>0){for(const r of w)r.startTime-=R.O,r.endTime-=R.O;p.L-=R.O}else p.L=R.L.C;p.segments=w;return p}; CXW=function(R){var w;if(w=R.provider.videoData.isLoaded()&&R.provider.videoData.GC&&R.G&&!R.jI)w=R.L,w=w.J+w.Lh()-w.O>=R.provider.videoData.GC;return!!w}; jl=function(R,w){const p=R.U(!isNaN(R.C));w&&(R.C=NaN);return p}; uEI=function(R){R.provider.videoData.youtubeRemarketingUrl&&!R.PS&&(Fw(R,R.provider.videoData.youtubeRemarketingUrl),R.PS=!0)}; sul=function(R){R.provider.videoData.googleRemarketingUrl&&!R.Jl&&(Fw(R,R.provider.videoData.googleRemarketingUrl),R.Jl=!0)}; Jv=function(R){if(!R.cS()&&R.G){R.X="paused";var w=jl(R);w.isFinal=!0;w.send();R.dispose()}}; mrD=function(R,w,p){if(!R.M0){p||(p=Zu(R,"atr"));p.attestationResponse=w;try{p.send()}catch(r){if(r.message!=="Unknown Error")throw r;}R.M0=!0}}; g.g9=function(R){return z2P(R)()}; wKD=function(R){const w=navigator.connection?.type||"";if(w)return Bsd[w]||Bsd.other;if(g.I1(R.LB)){R=navigator.userAgent;if(/[Ww]ireless[)]/.test(R))return 3;if(/[Ww]ired[)]/.test(R))return 30}return 0}; Xw=function(R){const w=new WFd;w.O=rNH(R).cc?.toString()||"-";w.playbackRate=R.CB.getPlaybackRate();var p=R.CB.getVisibilityState();p!==0&&(w.visibilityState=p);R.LB.Qk&&(w.C=1);w.K=R.videoData.jb;w.compositeLiveStatusToken=R.videoData.compositeLiveStatusToken;w.heartbeatLoggingToken=R.videoData.heartbeatLoggingToken;p=R.CB.getAudioTrack();p.DT&&p.DT.id&&p.DT.id!=="und"&&(w.audioId=p.DT.id);w.connectionType=wKD(R);w.volume=R.CB.getVolume();w.muted=R.CB.isMuted();w.clipId=R.CB.vJ()||"-";w.L=R.videoData.tP|| "-";return w}; rNH=function(R){const w=R.CB.uc()||{};w.fs=R.CB.Pi();w.volume=R.CB.getVolume();w.muted=R.CB.isMuted()?1:0;w.mos=w.muted;w.clipid=R.CB.vJ();w.playerheight=R.CB.getPlayerSize()?.height||0;w.playerwidth=R.CB.getPlayerSize()?.width||0;R=R.videoData;const p={};R.C&&(p.fmt=R.C.itag,R.G&&(R.Qk?R.G.itag!==R.C.itag:R.G.itag!=R.C.itag)&&(p.afmt=R.G.itag));p.ei=R.eventId;p.list=R.playlistId;p.cpn=R.clientPlaybackNonce;R.videoId&&(p.v=R.videoId);R.r7&&(p.infringe=1);(R.WB?0:R.Af)&&(p.splay=1);const r=Q0(R);r&& (p.live=r);R.oA&&(p.sautoplay=1);R.Ho&&(p.autoplay=1);R.X8&&(p.sdetail=R.X8);R.partnerId&&(p.partnerid=R.partnerId);R.osid&&(p.osid=R.osid);R.Pa&&(p.cc=g.KVD(R.Pa));return Object.assign(w,p)}; z2P=function(R){if(!R.L){const w=g.Mx(r=>{let f=(0,g.T)();r&&f<=631152E6&&(R.CB.Ty("ytnerror",{issue:28799967,value:`${f}`}),f=(new Date).getTime()+2);return f},R.LB.Y("html5_validate_yt_now")),p=w(); R.L=()=>Math.round(w()-p)/1E3; R.CB.Ni()}return R.L}; TK=function(R){R.C&&gWd(R.C);R.qoe&&s0d(R.qoe)}; LFx=function(R,w,p,r){p.adFormat=p.mq;const f=w.CB;w=new xrd(new lrb(p,w.LB,{getDuration:()=>p.lengthSeconds, getCurrentTime:()=>f.getCurrentTime(), Lh:()=>f.Lh(), z5:()=>f.z5(), qC:()=>f.qC(), getPlayerSize:()=>f.getPlayerSize(), getAudioTrack:()=>p.getAudioTrack(), getPlaybackRate:()=>f.getPlaybackRate(), Vp:()=>f.Vp(), getVisibilityState:()=>f.getVisibilityState(), FD:()=>f.FD(), uc:()=>f.uc(), getVolume:()=>f.getVolume(), isMuted:()=>f.isMuted(), Pi:()=>f.Pi(), vJ:()=>f.vJ(), getProximaLatencyPreference:()=>f.getProximaLatencyPreference(), Ni(){f.Ni()},Ty(G,I){f.Ty(G,I)},T5:()=>f.T5(), vB:()=>f.vB()})); w.O=r;g.K(R,w);return w}; q_b=function(R){R.C&&R.C.send();if(R.qoe){var w=R.qoe;if(w.K){w.Rb==="PL"&&(w.Rb="N");var p=g.g9(w.provider);g.ix(w,p,"vps",[w.Rb]);w.J||(w.G>=0&&w.L.set("user_intent",[w.G.toString()]),w.J=!0);w.provider.LB.dn()&&w.Ty("finalized",{});w.O0=!0;w.reportStats(p)}}if(R.provider.videoData.enableServerStitchedDai)for(const r of R.O.values())Jv(r);else R.L&&Jv(R.L);R.dispose()}; ANl=function(R,w){R.L&&mrD(R.L,w)}; bad=function(R){if(!R.L)return null;const w=Zu(R.L,"atr");return p=>{R.L&&mrD(R.L,p,w)}}; yN_=function(R,w){R=oM(R.array,p=>w-p.start||1); return R<0?-(R+1):R}; VGW=function(R,w,p){const r=[];for(w=yN_(R,w);wp)break}return r}; ib=function(R,w){const p=[];for(const r of R.array)if(r.contains(w)&&p.push(r),r.start>w)break;return p}; ooH=function(R){return R.array.slice(yN_(R,0x7ffffffffffff),R.array.length)}; tGd=function(R,w){let p=NaN;for(const r of R.array)if(r.contains(w)&&(isNaN(p)||r.endw&&(isNaN(p)||r.start!w.has(p))}; KFd=function(R){return R.CB.getPlayerState().L(2)?0x8000000000000:R.CB.getCurrentTime()*1E3}; QN=function(R,w){const p=[];if(!w.length)return p;for(let r=0;rC.end<0x8000000000000),I=ooH(R.L)):w=R.O<=p&&fn(w)?VGW(R.L,R.O,p):ib(R.L,p); f=f.concat(QN(R,w));G&&(f=f.concat(gi(R,G)));I&&(f=f.concat(QN(R,I)));R.O=p;hv(R,f)}}; HF=function(R,w){return w>R.mediaTime+R.K&&w1)R.G=!0;if(f||isNaN(R.C))R.C=w;if(R.L)w!==R.mediaTime&&(R.L=!1);else if(w>0&&R.mediaTime===w){f=1500;if(R.LB.Y("html5_buffer_underrun_transition_fix")){f=g.Iq(R.LB.experiments,"html5_min_playback_advance_for_steady_state_secs");const G=g.Iq(R.LB.experiments,"html5_min_underrun_buffered_pre_steady_state_ms");f=f>0&&G>0&&Math.abs(w-R.C)(r||!R.G?f:400)}R.mediaTime=w;R.O=p;return!1}; e2H=function(R,w,p){return w.Oa(p).then(()=>gD(new Dr6(w,w.O)),r=>{r instanceof Error&&g.AO(r); var f=GO('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),G=Cq('audio/mp4; codecs="mp4a.40.2"'),I=f||G;const C=w.isLivePlayback&&!g.wN(R.K,!0);r="fmt.noneavailable";C?r="html5.unsupportedlive":I||(r="html5.missingapi");I=C||!I?2:1;f={buildRej:"1",a:w.bq(),d:!!w.FY,drm:w.ph(),f18:w.IB.indexOf("itag=18")>=0,c18:f};w.L&&(w.ph()?(f.f142=!!w.L.L["142"],f.f149=!!w.L.L["149"],f.f279=!!w.L.L["279"]):(f.f133=!!w.L.L["133"],f.f140=!!w.L.L["140"],f.f242=!!w.L.L["242"]),f.cAAC=G,f.cAVC=Cq('video/mp4; codecs="avc1.42001E"'), f.cVP9=Cq('video/webm; codecs="vp9"'));w.K&&(f.drmsys=w.K.keySystem,G=0,w.K.C&&(G=Object.keys(w.K.C).length),f.drmst=G);return new g.pq(r,f,I)})}; Nd=function(R,w){w=Math.max(Math.max(1,Math.ceil(R.policy.G/vF(R))),w);return Math.min(Math.min(8,Math.floor(R.policy.X/vF(R))),w)}; vF=function(R){return R.videoData.L?qC(R.videoData.L)||5:5}; cNr=function(R,w){if(w)return w=R.videoData,w=MGd(R,isNaN(w.liveChunkReadahead)?3:w.liveChunkReadahead,w),Nd(R,w);if(R.C.length){if(Math.min.apply(null,R.C)>1)return Nd(R,R.L-1);if(R.policy.U)return Nd(R,R.L+1)}return R.L}; PXI=function(R,w=!1){if(!R.C.length)return!1;const p=R.L;R.L=cNr(R,w);if(w=p!==R.L)R.C=[],R.BJ=0;return w}; kn=function(R){let w=R.policy.L;R.G||(w=Math.max(w-1,0));return w*vF(R)}; Ur=function(R,w){return w>=R.aD()-kn(R)}; arH=function(R,w,p=!0){const r=Ur(R,w);p||r?r&&(R.O=!0):R.O=!1;R.D=R.policy.O===2||R.policy.O===3&&R.O;w=Ur(R,w);R.G!==w&&R.publish("livestatusshift",w);R.G=w}; MGd=function(R,w,p){p.Fi&&w--;Zr(p)&&(w=1);Yo(p)!==0&&(R=g.Iq(R.experiments,"html5_live_chunk_readahead_proxima_override"))&&(w=R,p.L?.U0()&&w++);return w}; RY=function(R,w,p=null){return new Sl(g.Iq(R.LB.experiments,w)||0,p?R.LB.Y(p):!1)}; $rP=function(R,w){R.L=w}; wo=function(R,w,p,r,f,G,I,C){w?w.test(p)?(R.K$(f,w,I),w.J||G()):(!w.C||w.G?p=!1:(p=(0,g.T)(),r?w.L||(w.L=p):w.L=0,G=!r&&p-w.C>3E4,p=w.L&&p-w.L>1E3||G?w.G=!0:!1),p&&(C={...R.TK(w),...C},C.wn=I,C.we=f,C.wsuc=r,R.CB.Ty("workaroundReport",C),r&&(w.reset(),R.O[f]=!1))):R.CB.A$("auth",2,"BROWSER_OR_EXTENSION_ERROR",Ro({source:"watchdog",name:I}))}; X46=function(R,w){if(R.L){var p=R.L;var r=R.getCurrentTime(),f=p.aD();var G=p.policy.C;p.G||(G=Math.max(G-1,0));G*=vF(p);r>=f-G||!p.YK()?p=r0&&Rn(R.mediaElement)>0&&(R.C=pD(R,R.C,!1)),w=R.Y("html5_pseudogapless_shorts_seek_to_next_start")&&w?.seekSource===60,!R.mediaElement||!nod(R,w))R.p_.start(750);else if(!isNaN(R.C)&&isFinite(R.C)&&(w=R.PS-(R.C-R.timestampOffset),!(w===0||Math.abs(w)<.005)))if(w=R.mediaElement.getCurrentTime()-R.C,Math.abs(w)<=R.YY||Math.abs(w)<.005)drP(R);else{if(R.videoData.K4)R.videoData.K4= !1;else if(!$o(R.videoData)&&R.C>=R.p$()-.1){R.C=R.p$();R.G.resolve(R.p$());R.LB.dn()&&R.CB.Ty("setEndedInSeek",{tgt:`${R.C}`,maxst:`${R.p$()}`});R.CB.Rz();return}try{const p=R.C-R.timestampOffset;R.mediaElement.seekTo(p);R.pB.L=p;R.PS=p;R.O=R.C;R.S=!1}catch(p){}}}; Y_d=function(R,w){R.I0=!0;R.Y("html5_use_centralized_player_time")&&(R.C=R.J,R.O=R.C,R.J=NaN);Zad(R,w)}; FFx=function(R){let w=0,p=NaN,r="";if(!R.X)return{startSeconds:w,So:p,source:r};R.videoData.vF?w=R.videoData.Vm:$o(R.videoData)&&(w=Infinity);if(g.gs(R.videoData))return{startSeconds:w,So:p,source:r};R.videoData.startSeconds?(r="ss",w=R.videoData.startSeconds):R.videoData.Vx&&(r="stss",w=R.videoData.Vx);R.videoData.liveUtcStartSeconds&&(p=R.videoData.liveUtcStartSeconds);if(isFinite(w)&&(w>R.p$()||w1E9}; Tsd=function(R,w){R.playbackData=w;R.videoData.isLivePlayback&&(R.U=new jud(()=>{a:{if(R.playbackData&&R.playbackData.L.L()){if(na(R.videoData)&&R.loader){var p=R.loader.HL.QB()||0;break a}if(R.videoData.L){p=R.videoData.L.M0;break a}}p=0}return p}),R.L=new JNH(R.videoData,R.LB.experiments,()=>R.p$(!0))); Gd(R.CB)?(R.videoData.lD?.Uc||(w=FFx(R),w.So?(Qk(R.videoData)&&R.yx(w.So,w.startSeconds),R.O=w.startSeconds):w.startSeconds>0&&R.seekTo(w.startSeconds,{dB:"seektimeline_startPlayback",seekSource:15})),R.X=!1):fD(R)||(R.O=R.O||R.videoData.startSeconds||0,R.videoData.isLivePlayback||(w=R.CB.videoData.p$(),R.O>w&&(R.Y("html5_sabr_log_invalid_sabr_current_time")&&R.CB.Ty("invalidSabrCmtStart",{rt:R.O,mst:w}),R.Y("html5_sabr_vod_invalid_start_time_fallback")&&(R.O=0))))}; IY=function(R,w){if(R.L&&R.loader){var p=!1;w?p=!0:R.videoData.isLowLatencyLiveStream||R.videoData.latencyClass==="LOW"||R.videoData.latencyClass==="ULTRALOW"?p=PXI(R.L):R.q0&&(R.q0=!1,p=PXI(R.L,!0));p&&(w=R.CB.HB,p=R.L,p=vF(p)*p.L,w.qoe&&(w=w.qoe,g.ix(w,g.g9(w.provider),"lra",[p]),w.Ty("live-readahead-seconds",{v:p})));w=R.loader;p=R.L.L;R=R.L;R=(R.L-1+R.policy.L)*vF(R);var r=NaN;var f=w.ez;f===2||f===-1?(f=p,Zr(w.CB.getVideoData())&&(r=w.policy.Ry)):f=p-1;f=Math.max(f,0);p=w.J;p.Ou=f;p.U=r;w.U&& (w.U.pB=R)}}; uR=function(R,w){(R.loader=w)?IY(R,!0):CD(R)}; nod=function(R,w=!1){if(!R.mediaElement||R.mediaElement.O()===0||R.mediaElement.hasError())return!1;const p=R.mediaElement.getCurrentTime()>0;return R.videoData.O&&R.videoData.O.L()||R.videoData.isLivePlayback||!R.videoData.ph()?R.C>=0&&!w&&(w=R.mediaElement.U(),w.length||!p)?JC(w,R.C-R.timestampOffset):p:p}; sJ=function(R){return R.mediaElement?wS(R.mediaElement):0}; iad=function(R,w){var p=R.getCurrentTime();const r=R.isAtLiveHead(p);if(R.U&&r){var f=R.U;if(f.L&&!(p>=f.C&&p50&&f.C.shift())),arH(R.L,p,w),w&&X46(R,!0));r!==R.f_&&(w=R.getCurrentTime()-R.eI<=500,p=R.mq>=1E3,w||p||(w=R.CB.HB,w.qoe&&(w=w.qoe,p=g.g9(w.provider),g.ix(w,p,"lh", [r?"1":"0"])),R.f_=r,R.mq++,R.eI=R.getCurrentTime()))}; m4=function(R,w){let p=R.G;p||(R.G=new aa,p=R.G,ro(R,w));return p}; pD=function(R,w,p){if(isNaN(w))return NaN;const r=R.xN();p=R.p$(p);return R.Y("html5_clamp_invalid_seek_to_min_seekable_time")&&!R.videoData.isLivePlayback&&w>p+1&&w0)||R.mediaElement&&R.mediaElement.getCurrentTime()>0||(w={dB:"seektimeline_resumeTime",iq:w},R.videoData.U||(w.seekSource=15),R.seekTo(R.O,w))}; Zad=function(R,w){goW(R,w).then(void 0,()=>{CD(R)}); m4(R,w).then(p=>{zd(R,p)},()=>{CD(R)}); R.CB.S5(w);if(R.LB.dn()||HaH(R))w=R.TK(),w["native"]=`${+R.S}`,w.tgt=`${R.C}`,w.otgt=`${R.C+R.timestampOffset}`,w.maxst=`${R.p$()}`,R.L&&R.Y("html5_high_res_seek_logging")&&(w.tht=`${R.L.K()}`,w.ht=`${R.L.aD()}`,w.adft=`${kn(R.L)}`),R.Y("html5_sabr_parse_live_metadata_playback_boundaries")&&R.videoData.L&&Qk(R.videoData)&&(w.minst=`${R.videoData.L.VK}`,w.cminst=`${R.videoData.L.xN()+R.timestampOffset}`,w.maxst=`${R.videoData.L.M7}`,w.hts=`${R.videoData.L.O0}`,w.cmaxst=`${R.videoData.L.p$()+R.timestampOffset}`), R.CB.Ty("startSeek",w)}; goW=function(R,w){R.xY||(R.loader?isFinite(R.C)?R.xY=R.loader.seek(R.C-R.timestampOffset,w):($o(R.videoData),R.Y("html5_unified_live_latency_reporting")&&(R.CB.vr=0),R.xY=vj(R.loader),mF(R.videoData)||(R.C=R.loader.getCurrentTime()+R.timestampOffset)):R.xY=g.FB(R.C-R.timestampOffset));return R.xY}; zd=function(R,w){R.K&&(R.K.resolve(w),R.CB.Xw(),R.LB.dn()||HaH(R))&&(w=R.TK(),w["native"]=`${+R.S}`,w.otgt=`${R.C+R.timestampOffset}`,R.CB.Ty("seekEnd",w));CD(R)}; HaH=function(R){return R.videoData.uB()&&R.Y("html5_enable_shorts_seek_details_logging")}; drP=function(R){R.G&&(R.G.resolve(R.mediaElement.getCurrentTime()),R.pB.C=null)}; CD=function(R){R.C=NaN;R.J=NaN;R.PS=NaN;R.G=null;R.xY=null;R.K=null;R.I0=!1;R.S=!1;R.YY=0;R.M0.stop();R.nB.stop()}; Nsr=function(R){if(R.X)if(R.videoData.lD?.Uc)R.X=!1;else if(g.gs(R.videoData))R.X=!1;else{var w="ss",p=0;R.videoData.L?.isManifestless&&R.videoData.nB&&!fD(R)&&(w="mss",p=R.videoData.nB);(R.videoData.vF?R.Y("html5_prioritize_windowed_st_start_seconds"):R.Y("html5_prioritize_st_start_seconds"))&&!p&&R.videoData.Vx&&(w="stss",p=R.videoData.Vx);!p&&voD(R)&&(p=R.videoData.liveUtcStartSeconds||R.videoData.nB,w="utc",p=R.p$()-R.gg(R.p$())+p);!p&&R.videoData.PB()&&R.videoData.Vx&&(w="stss",p=R.videoData.Vx); var r={};if(p){if(p>R.p$()||p{zd(R,G)},()=>{CD(R)}),R.videoData.isAd()&&HBI({adCpn:R.videoData.clientPlaybackNonce, contentCpn:R.videoData.gz??""},w.L),R.PS=f,$rP(R.pB,p.getCurrentTime()),R.seekTo(f,{seekSource:104,dB:"seektimeline_mediaElementEvent"}),R.S=!0;break;case "seeked":drP(R);break;case "loadedmetadata":Gd(R.CB)||Nsr(R);ro(R);break;case "progress":ro(R);break;case "pause":R.D=R.getCurrentTime()}R.D&&((r==="play"||r==="playing"||r==="timeupdate"||r==="progress")&&R.getCurrentTime()-R.D>10&&(R.Y("html5_sky_skip_pause_jump")?R.CB.Ty("skipPauseJump",{evt:r,cmt:R.getCurrentTime(),lpt:R.D}):R.seekTo(R.D,{dB:"pauseJump"})), r!=="pause"&&r!=="play"&&r!=="playing"&&r!=="progress"&&(R.D=0))}; voD=function(R){return(H4(R.videoData)||!!R.videoData.liveUtcStartSeconds)&&(!!R.videoData.liveUtcStartSeconds||fD(R))&&!!R.videoData.L}; UrI=function(R,w){R.CB.Ty("sdai",{adj4t:w.toFixed(3)});R.Jl=w;w+=1;R.C=w;R.O=w;m4(R).then(p=>{zd(R,p)},()=>{CD(R)})}; Bd=function(R,w){return R.L.get(w)?.buffer.G()||[]}; Wd=function(R,w){return R.L.get(w)?.buffer.O()||0}; GZH=function(R,w){function p(G){return r.pB!=="yt"&&(f.partnerId===38&&r.playerStyle==="books"||f.partnerId===30&&r.playerStyle==="docs"||f.partnerId===33&&r.playerStyle==="google-live")?S_6(R,f,G):RBr(R,f).then(()=>{r.Y("embeds_enable_shorts")&&R.V().Pa&&f.isEmbedsShortsMode(new g.dg(0,0),!!f.playlistId)?w7d(R,f):x_(R,f)},I=>{x_(R,f,!0); throw I;})} const r=R.V(),f=R.getVideoData();f.cS();f.loading=!0;return p7b(R)?ra_(R,f,w).then(()=>{x_(R,f)},G=>{G=ru(G); if(wu(G.severity))return x_(R,f,!0),Promise.reject(G);G.errorCode==="onesie.response.badproxystatus"&&`${G.details.st}`==="3"&&(fwD=!0);R.handleError(G);return p("onesie")}):p("gvi")}; p7b=function(R){var w=R.V();if(w.Y("html5_disable_onesie")||!w.Y("html5_onesie")||!w.Y("html5_onesie_inline")&&R.getVisibilityState()===5||w.pB!=="yt")return!1;var p=w.cB;if(!p||!p.L)return R.handleError(new g.pq("onesie.unavailable.hotconfig",{key:"0"})),!1;p.L.D<(0,g.T)()&&(R.Ty("okexp","1"),(p=R.Xb())&&w.Y("html5_prefer_trusted_host_on_key_expiration")&&(p.C=!0,(w=p.L.get(0)?.L())&&!Cx(w)&&p.L.delete(0)));if(fwD)return R.Ty("ost3","1"),!1;w={};return Object.keys(w).length>0?(w.onesie="0",R.handleError(new g.pq("html5.missingapi", w)),!1):!0}; lR=function(R,w){const p=XV();ng(p,w);return g.J1(p,g8_(),{r9:R.r9(),clientInterface:Uq(R)})}; IwH=function(R,w){return`${R.getPlayerType()}_${w.videoId}_${w.iU}_${+w.isAutonav}${+w.oA}`}; ra_=async function(R,w,p){w.fetchType="onesie";var r=void 0;if(Ei6(w))if(r=R.zx){var f=IwH(R,w);r=r.get(f)}else r=void 0;f=R.Wy.JQ;if(r){if(w.loading=!1,g.V0(w,{player_response:r},!0),w.loading||B4(w))return R.Ty("prr","1"),Promise.resolve()}else{r=kgr(w,R.getPlayerSize(),R.getVisibilityState());p=new eU(R,r,p);r=await p.fetch();const I={player_response:r};w.loading=!1;if(p.SC){for(const [C,u]of p.SC.entries()){var G=C;const m=u;f.L.set(G,m,180);G===w.videoId&&(G=m.uH(),w.u_=G)}f.eE=p}for(const [C, u]of p.Ku.entries())f.C.set(C,u,180);g.V0(w,I,!0);if(w.loading||B4(w))return Ei6(w)&&(w=IwH(R,w),R.zx?.put(w,r)),Promise.resolve()}f.L.removeAll();f.C.removeAll();w.u_=[];R={};f="onesie.response";p=0;w.errorCode?(f="auth",R.ec=w.errorCode,R.ed=w.errorDetail,R.es=w.S_||"",p=2):(R.successButUnplayable="1",R.disposed=`${+w.cS()}`,R.afmts=`${+/adaptiveFormats/.test(r)}`,R.cpn=w.clientPlaybackNonce);return Promise.reject(new g.pq(f,R,p))}; RBr=async function(R,w){const p=w.isAd();let r=!p,f=p?1:3;for(let I=0;I0){await fw(5E3);var G=new g.Id("Retrying OnePlatform request",{attempt:I});g.AO(G)}try{await CK_(R,w);return}catch(C){const u=ru(C);G=u.errorCode;const m=R.V().Y("html5_use_network_error_code_enums")?401:"401";r&&G==="manifest.net.badstatus"&&u.details.rc===m&&(r=!1,I===f-1&&(f+=1));if(I===f-1)return R=uVd(p,u.details),R.details.backend="op",R.details.originec=G,Promise.reject(R);if(G==="auth"||G==="manifest.net.retryexhausted"|| g.sg(R.V()))return Promise.reject(u);R.handleError(u);if(wu(u.severity))break}}return Promise.reject(uVd(p,{backend:"op"}))}; CK_=async function(R,w){w.fetchType="gp";var p=R.V(),r=g.$W(p,w.J());r=r.L?await r.L:r.getValue();var f=lR(p,r);const G=kgr(w,R.getPlayerSize(),R.getVisibilityState()),I=g.cx(srb),C=w.J();var u=(0,g.T)(),m=!1;let z="empty";r=0;R.KL("psns");const B={Nu:function(W){W.readyState===2&&R.KL("ps_c")}}; p.r9()&&(B.Jz={nE:wy("player",{videoId:String(w.videoId)})});f=await g.$J(f,G,I,void 0,B);R.KL("psnr");if(!w.cS()){f?"error"in f&&f.error?(m=!0,z=`esf:${f.error.message}`,r=f.error.code):f.errorMetadata&&(m=!0,z="its",r=f.errorMetadata.status):m=!0;if(m)return m=0,f=((0,g.T)()-u).toFixed(),u={},u=p.Y("html5_use_network_error_code_enums")?{backend:"op",rc:r,rt:f,reason:z,has_kpt:w.N0?"1":"0",has_mdx_env:w.mdxEnvironment?"1":"0",has_omit_key_flag:g.n("INNERTUBE_OMIT_API_KEY_WHEN_AUTH_HEADER_IS_PRESENT")? "1":"0",has_page_id:p.pageId?"1":"0",has_token:C?"1":"0",has_vvt:w.xY?"1":"0",is_mdx:w.isMdxPlayback?"1":"0",mdx_ctrl:w.rS||"",token_eq:C===w.J()?"1":"0"}:{backend:"op",rc:`${r}`,rt:f,reason:z,has_kpt:w.N0?"1":"0",has_mdx_env:w.mdxEnvironment?"1":"0",has_omit_key_flag:g.n("INNERTUBE_OMIT_API_KEY_WHEN_AUTH_HEADER_IS_PRESENT")?"1":"0",has_page_id:p.pageId?"1":"0",has_token:C?"1":"0",has_vvt:w.xY?"1":"0",is_mdx:w.isMdxPlayback?"1":"0",mdx_ctrl:w.rS||"",token_eq:C===w.J()?"1":"0"},w="manifest.net.connect", r===429?(w="auth",m=2):r>200&&(w="manifest.net.badstatus",r===400&&(m=2)),Promise.reject(new g.pq(w,u,m));w.loading=!1;g.V0(w,{raw_player_response:f},!0);g.sg(w.V())&&f&&f.trackingParams&&k3(f.trackingParams);if(w.errorCode)return p={ec:w.errorCode,ed:w.errorDetail,es:w.S_||""},r="auth",g.sg(w.V())&&w.errorCode&&(r=w.errorCode),Promise.reject(new g.pq(r,p,2));if(!w.loading&&!B4(w))return p=w.isAd()?"auth":"manifest.net.retryexhausted",r=w.isAd()?2:1,Promise.reject(new g.pq(p,{successButUnplayable:"1", hasMedia:g.zq(w)?"1":"0"},r))}}; S_6=async function(R,w,p){function r(){return!0} function f(m){m=ru(m);if(wu(m.severity))return Promise.reject(m);R.handleError(m);return!1} const G=rOW(R.V(),w,R.getPlayerSize(),R.getVisibilityState(),R.isFullscreen()),I=w.isAd(),C=I?1:3;for(let m=0;m0&&(await fw(5E3),u={playerretry:m,playerretrysrc:p},I||(u.recover="embedded"),u=Vj(G,u));if(await mSx(w,u).then(r,f))return}w=I?"auth":"manifest.net.retryexhausted";p=I?2:1;if(!I&&Math.random()<1E-4)try{g.AO(new g.Id("b/152131571",btoa(G)))}catch{}return Promise.reject(new g.pq(w,{backend:"gvi"},p))}; mSx=async function(R,w){function p(u){if(!R.cS()){u=u?u.status:-1;var m=0,z=((0,g.T)()-C).toFixed();z=r.Y("html5_use_network_error_code_enums")?{backend:"gvi",rc:u,rt:z}:{backend:"gvi",rc:`${u}`,rt:z};var B="manifest.net.connect";u===429?(B="auth",m=2):u>200&&(B="manifest.net.badstatus",u===400&&(m=2));return Promise.reject(new g.pq(B,z,m))}} R.fetchType="gvi";const r=R.V();var f;(f=flD(R))?(f={format:"RAW",method:"POST",withCredentials:!0,timeout:3E4,postParams:f},w=Vj(w,{action_display_post:1})):f={format:"RAW",method:"GET",withCredentials:!0,timeout:3E4};const G={};r.sendVisitorIdHeader&&R.visitorData&&(G["X-Goog-Visitor-Id"]=R.visitorData);const I=Sz(r.experiments,"debug_sherlog_username");I&&(G["X-Youtube-Sherlog-Username"]=I);Object.keys(G).length>0&&(f.headers=G);const C=(0,g.T)();f=await R0(Th,w,f).then(void 0,function(u){return p(u.xhr)}); if(!f||!f.responseText)return p(f);R.loading=!1;f=lF(f.responseText);g.V0(R,f,!0);if(R.errorCode)return Promise.reject(new g.pq("auth",{ec:R.errorCode,ed:R.errorDetail,es:R.S_||""},2));if(!R.loading&&!B4(R))return f=R.isAd()?"auth":"manifest.net.retryexhausted",w=R.isAd()?2:1,Promise.reject(new g.pq(f,{successButUnplayable:"1"},w))}; uVd=function(R,w){return new g.pq(R?"auth":"manifest.net.retryexhausted",w,R?2:1)}; x_=async function(R,w,p=!1){const r=R.V();p&&(!g.Eg(r)||SG(w)!=="embedded")||w.hW||SG(w)!=="adunit"&&(g.I1(r)||Lb(r)||g.dQ(r)||g.Kb(r)||g.Cb(r)||Uq(r)==="WEB_CREATOR")||(p=g.$W(r,w.J()),p=p.L?await p.L:p.getValue(),zBd(R,w,p))}; zBd=async function(R,w,p){try{const G=R.V(),I=lR(G,p);var r=w.V();const C=g.SN(),u={context:g.sm(w),videoId:w.videoId,racyCheckOk:w.racyCheckOk,contentCheckOk:w.contentCheckOk,autonavState:"STATE_NONE"};SG(w)==="adunit"&&(u.isAdPlayback=!0);r.embedConfig&&(u.serializedThirdPartyEmbedConfig=r.embedConfig);r.wR&&(u.showContentOwnerOnly=!0);w.f7&&(u.showShortsOnly=!0);C.vS(141)&&(u.autonavState=C.vS(140)?"STATE_OFF":"STATE_ON");if(g.t5(r)){const W=C.vS(65);p=W!=null?!W:!1;const x=!!g.hj("yt-player-sticky-caption"); u.captionsRequested=p&&x}const m=r.getWebPlayerContextConfig()?.encryptedHostFlags;m&&(u.playbackContext={encryptedHostFlags:m});var f=u;const z=g.cx(BHW);R.KL("wn_s");r={};G.r9()&&(r.Jz={nE:wy("next",{videoId:String(w.videoId)})});const B=await g.$J(I,f,z,void 0,r);R.KL("wn_r");!B||"error"in B&&B.error||(g.sg(w.V())&&B.trackingParams&&k3(B.trackingParams),g.V0(w,{raw_watch_next_response:B},!1))}catch(G){}}; w7d=async function(R,w){var p=g.$W(R.V(),w.J());p=p.L?await p.L:p.getValue();W1Y(R,w,p)}; W1Y=async function(R,w,p){R=R.V();try{const f=lR(R,p);var r={context:g.sm(w),playerRequest:{videoId:w.videoId},disablePlayerResponse:!0};const G=g.cx(xS_);p={};R.r9()&&(p.Jz={nE:wy("reel_item_watch",{videoId:String(w.videoId)})});const I=await g.$J(f,r,G,void 0,p);!I||"error"in I&&I.error||g.V0(w,{raw_reel_item_watch_response:I})}catch(f){}}; lw6=function(R,w){R.KL("vir");R.KL("ps_s");Wx("vir",void 0,"video_to_ad");w=GZH(R,w);w.then(function(){R.KL("virc");Wx("virc",void 0,"video_to_ad");R.KL("ps_r");Wx("ps_r",void 0,"video_to_ad")},function(){R.KL("virc"); Wx("virc",void 0,"video_to_ad")}); return w}; LD=function(){const R=htY();return!(!R||R==="visible")}; qmD=function(R){const w=L1r();w&&document.addEventListener(w,R,!1)}; Aab=function(R){const w=L1r();w&&document.removeEventListener(w,R,!1)}; L1r=function(){let R;if(document.visibilityState)R="visibilitychange";else{if(!document[M0+"VisibilityState"])return"";R=M0+"visibilitychange"}return R}; yaD=function(R){bgx=R}; VeI=function(R){qf=R}; QTW=function(R){var w=R.Gv;R=R.videoData;const p=el(w,R);w.Y("html5_disable_client_autonav_cap_for_onesie")||p.compose(Md(w,R));return p}; pG=function(R,w){Ad(R,w.reason,w.L.info,w.source,w.token)}; c2_=function(R,w){R.Wy.Uu()||(R.Ty("sgap",{f:w}),R.Wy.clearQueue(!1,w==="pe"))}; te6=function(R){R.mediaElement&&(R.un?(bR(R),R.qL(),osY(R,!1)):(R.videoData.M0&&R.videoData.M0.G(),R.mediaElement.stopVideo()),R.playVideo())}; Gd=function(R){return R.Y("html5_disable_video_player_initiated_seeks")&&Qk(R.videoData)}; Vn=function(R,w){R.y7&&yn(R);R.y7=new g.Ja(w*1E3,0x7ffffffffffff);R.y7.namespace="endcr";R.addCueRange(R.y7)}; yn=function(R){R.removeCueRange(R.y7);R.y7=null}; td=function(R){if(R.videoData.O&&R.videoData.O.L()){var w=oY(R);if(R.loader&&(R=R.loader,!R.cS()))if(R.policy.L){var p=R.K;if(w.isLocked()&&p.L.O||p.C===void 0||!w.equals(p.C)){p=R.K.C;S9r(R.K,w);var r;if(r=w.isLocked()&&w.reason==="m"){r=R.K;var f=r.G?.info.D().qualityOrdinal;r=r.O0?!0:r.G?w.L!==f?!0:!r.L.O||r.Ey.lD&&r.L.L===r.G.info.itag?!1:!0:!1}f=R.policy.Hw&&w.reason==="l";p=p.L>w.L&&w.reason==="b";r||f||p?(R.CB.nX({reattachOnConstraint:r?"u":f?"drm":"perf",lo:w.C,up:w.L}),R.policy.lD||(R.K.L.O= !1)):(R.policy.lD&&(R.K.L.O=!1),E5(R))}}else!MSP(R.L,w)&&R.videoTrack&&(f=R.L.L,fG(R,cRr(R.L,w)),CG(R),p=w.isLocked()&&w.reason==="m"&&R.L.S,r=R.policy.Hw&&w.reason==="l"&&dk(R.videoTrack),w=f.L>w.L&&w.reason==="b",f=R.L.U0&&!H1(),p||r||w||f?R.CB.nX({reattachOnConstraint:p?"u":r?"drm":f?"codec":"perf"}):E5(R))}}; KD=function(R,w=!0){R.LB.GJ&&!R.videoData.backgroundable&&R.mediaElement&&!R.Ko()&&(R.isBackground()&&R.mediaElement.Jl()?(R.Ty("bgmobile",{suspend:1}),R.Ra(!0,!0)):!R.isBackground()&&w&&OJ(R)&&R.Ty("bgmobile",{resume:1}))}; EJ=function(R){if(!$o(R.videoData))return NaN;let w=0;R.loader&&R.videoData.L&&(w=na(R.videoData)?R.loader.HL.QB()||0:R.videoData.L.M0);return(0,g.T)()/1E3-R.gg()-w}; Ogb=function(R,w){if(R.playerType===2||R.LB.hW)w.CV=!0;var p=ABr(w.mq,w.b0,R.LB.G,R.LB.U);p&&(w.adFormat=p);R.playerType===2&&(w.Ho=!0);if(R.isFullscreen()||R.LB.G)p=g.hj("yt-player-autonavstate"),w.autonavState=p||(R.LB.G?2:R.videoData.autonavState);w.endSeconds&&w.endSeconds>w.startSeconds&&Vn(R,w.endSeconds)}; D$=function(R){R.loader&&(R.loader.dispose(),R.loader=null,uR(R.Py,null));R.lB()?K1_(R):R.qL()}; eBd=function(R){if(!R.playerState.L(128))if(R.videoData.isLoaded(),R.Ji=g.zp(R.videoData.XL),g.zq(R.videoData)){R.Jf.tick("bpd_s");eX(R).then(()=>{R.Jf.tick("bpd_c");if(!R.cS()){R.TJ&&(R.I9(ul(ul(R.playerState,512),1)),OJ(R));var p=R.videoData;p.endSeconds&&p.endSeconds>p.startSeconds&&Vn(R,p.endSeconds);R.sI.finished=!0;Mf(R,"dataloaded");R.gR.OV()&&cd(R);QaH(R.Gv,R.rb)}}); R.Y("html5_log_media_perf_info")&&R.Ty("loudness",{v:R.videoData.fZ.toFixed(3)},!0);var w=R.mediaElement?.zk();if(w&&"disablePictureInPicture"in w&&R.LB.Ie)try{w.disablePictureInPicture=R.LB.a9&&!R.videoData.backgroundable}catch(p){g.AO(p)}Es6(R);R.nV=new DSx(R.videoData)}else Mf(R,"dataloaded")}; Me_=function(R){const w=R.videoData;lw6(R,R.BB).then(void 0,p=>{R.videoData!==w||w.cS()||(p=ru(p),p.errorCode==="auth"&&R.videoData.errorDetail&&R.videoData.errorDetail!=="7"?R.A$(p.errorCode,2,unescape(R.videoData.errorReason),Ro(p.details),R.videoData.errorDetail,R.videoData.S_||void 0):R.handleError(p))})}; Pd=function(R){return g.I1(R.LB)&&R.videoData.isLivePlayback&&(!R.LB.Y("html5_allow_multiview_tile_preload")||!R.videoData.yh)}; eX=function(R){D$(R);R.rb=null;const w=e2H(R.LB,R.videoData,R.Ko());R.hw=w;R.hw.then(p=>{cad(R,p)},p=>{R.cS()||(p=ru(p),R.visibility.isBackground()?(aY(R,"vp_none_avail"),R.hw=null,R.sI.reset()):(R.sI.finished=!0,R.A$(p.errorCode,p.severity,"HTML5_NO_AVAILABLE_FORMATS_FALLBACK",Ro(p.details))))}); return w}; Es6=function(R){FE(R.videoData,"html5_set_debugging_opt_in")&&(R=g.SN(),R.vS(183)||(wx(183,!0),R.save()))}; Mf=function(R,w="dataupdated"){R.publish("internalvideodatachange",w,R.videoData)}; cad=function(R,w){if(!R.cS()&&!w.videoData.cS()){R.rb=w;Tsd(R.Py,R.rb);if(R.videoData.isLivePlayback){var p=PKb(R.Wy.JQ,R.videoData.videoId)||R.loader&&!isNaN(R.loader.I0);p=R.Y("html5_onesie_live")&&p;Gd(R)||R.videoData.nB>0&&!na(R.videoData)||p||R.seekTo(R.p$(),{dB:"videoplayer_playbackData",seekSource:18})}if(R.videoData.O.L()){if(tid(R.videoData)){R.A$("fmt.missing",2,"BROWSER_OR_EXTENSION_ERROR",Ro({missabrurl:1}));return}R.loader?g.AO(Error("Duplicated Loader")):(p=g.Iq(R.LB.experiments,"html5_onesie_defer_content_loader_ms"))&& R.jf()&&PKb(R.Wy.JQ,R.videoData.tB)?g.cI(()=>{R.cS()||R.loader||$_(R)},p):$_(R)}else!R.videoData.O.L()&&rH(R.videoData)&&R.Ax(new XI(R.videoData.videoId||"",4)); R.TL();jaL(w).then(()=>{const r={};R.vN(r);R.LB.dn()&&R.Y("html5_log_media_perf_info")&&R.Ty("av1Info",r);td(R)})}}; OJ=function(R,w=!1){if(!R.mediaElement||!R.videoData.O)return!1;var p=awd(R,w),r=R.mediaElement.Jl();let f=!1;r&&r.equals(p)||($Sl(R,p),f=!0);R.playerState.L(2)||h2d(R.Py,w);a:{w=f;if(Qk(R.videoData)){if(!R.videoData.ph())break a}else if(!g.Tq(R.videoData))break a;if(R.mediaElement)if((p=R.videoData.K)&&R.mediaElement.J()){r=R.mediaElement.zk();if(R.X9)if(r!==R.X9.element)bR(R);else if(w&&p.flavor==="fairplay"&&!Ch())bR(R);else break a;if(R.Y("html5_report_error_for_unsupported_tvos_widevine")&&Ch()&& p.flavor==="widevine")R.A$("fmt.unplayable",1,"HTML5_NO_AVAILABLE_FORMATS_FALLBACK","trg.unspttvoswidevine");else{R.X9=new X7d(r,R.videoData,R.LB,R.mediaElement,R.F9);R.X9.subscribe("licenseerror",R.Cq,R);R.X9.subscribe("qualitychange",R.FX,R);R.X9.subscribe("heartbeatparams",R.yU,R);R.X9.subscribe("keystatuseschange",R.ol,R);R.X9.subscribe("ctmp",R.Ty,R);for(const G of R.LD.keys)w=R.LD.get(G),R.X9.Y4(w);R.Y("html5_eme_loader_sync")||R.LD.removeAll()}}else R.A$("fmt.unplayable",1,"HTML5_NO_AVAILABLE_FORMATS_FALLBACK", "trg.updatedrm")}return f}; $_=function(R){var w=R.videoData.L,p={cpn:R.videoData.clientPlaybackNonce,c:R.LB.L.c,cver:R.LB.L.cver};for(const [C,u]of Object.entries(p)){p=C;var r=u;for(var f of Object.values(w.L))f.EQ.S(p,r);w.pB?.S(p,r)}f=R.LB;p=R.videoData;r=R.BB;w=new g.nsr(f);var G=dzY({hasSubfragmentedFmp4:p.hasSubfragmentedFmp4,Ux:p.Ux});w.D=G;w.I0=p.maxReadAheadMediaTimeMs/1E3||w.I0;r.G.QB()===r.policy.L?w.mq=10:w.mq=p.minReadAheadMediaTimeMs/1E3||w.mq;w.qH=p.readAheadGrowthRateMs/1E3||w.qH;p.nD&&(w.K=!0,w.K2=!0,f.experiments.Tk().L.vS(dSd)&& DFH(p)===3&&(w.kF=!0));w.Gf=!v1();g.I1(f)||!v1()?(w.jI=8388608,w.N0=524288,w.t6=5,w.PS=1048576,w.EN=1.5,w.hf=4587520,uB()&&(w.hf=786432),w.U*=1.1,w.S*=1.1,w.Ww=!0):f.C&&(w.U*=1.3,w.S*=1.3);g.Io&&g.fh("crkey")&&(G=f.L.cmodel==="CHROMECAST/ANCHOVY",w.jI=20971520,w.N0=1572864,G&&(w.hf=812500,w.wB=1E3,w.JP=5,w.PS=2097152));g.PK&&(w.Ww=!0);f.supportsGaplessAudio()||(w.Ky=!1);$X&&(w.Af=!0);w.h8=f.Y("html5_peak_shave");p.B9()&&f.Y("html5_disable_peak_shave_for_onesie")&&(w.h8=!1);G=p.L?.K();if(na(p)){w.Nk= !0;w.L2||(w.PF=!0);w.ag=!0;w.Sk=!0;w.O_=!0;if(p.latencyClass==="ULTRALOW"||p.latencyClass==="LOW"&&!f.Y("html5_disable_low_pipeline"))w.kL=2,w.HE=4;w.e_=p.defraggedFromSubfragments;g.gs(p)&&(w.eI=!1);w.Tf=g.f2(f)}p.isAd()&&(w.YU=0,w.iD=0);w.zv=f.Y("html5_ultra_low_latency_subsegment_readahead")&&p.latencyClass==="ULTRALOW";w.O=f.dn();r.C.G=na(p)?.5:0;p.isLivePlayback&&(w.FL=g.Iq(f.experiments,"html5_min_startup_buffered_media_duration_for_live_secs")||.25,w.nB=!1);p.ph()&&(w.nB=!1);r=!f.Y("html5_sabr_keep_all_quality_constraints")&& !p.ph();const I=f.Y("html5_sabr_remove_all_quality_constraints_for_drm_traffic")&&p.ph();w.il=r||I;w.J8=jG(p);Zr(p)&&(w.zv=!0,p.latencyClass==="LOW"?w.ez=g.Iq(f.experiments,"html5_jumbo_mobile_subsegment_readahead_target"):p.latencyClass==="ULTRALOW"&&(w.ez=g.Iq(f.experiments,"html5_jumbo_ull_subsegment_readahead_target")),w.mx=!0);p.PB()&&(w.pU=1.3);w.Af=w.Af||p.J6;w.q4=(w.q4||p.q4)&&f.U;w.Ml=p.D;f.dn()&&(w.f_=!0);p.D&&!G&&(w.Y_=!0);p.D&&p.isAd()&&(w.U*=1.6,w.S*=1.6);rH(p)&&(w.G=p.videoId,w.M9=!0, w.pV=100,p.hM&&p.hM.length>0&&(w.wg=p.hM));w.Hw=p.HX;w.DI=Xa(f,{},p.O||void 0,Mr(p));w.Qk=eG(p)&&(g.dQ(f)||g.Kb(f));Qk(p)&&(w.J=!0,w.C2=f.Y("html5_seek_refactor_bh_fix"),w.hP=f.Y("html5_use_loader_cmt_for_bh"),w.X3=f.Y("html5_estimate_live_partial_slice_duration"),g.I1(f)&&!g.IN()&&f.Y("html5_force_audio_to_cover_video_keyframe")?w.SI=!1:w.SI=!0,w.fg||p.isLivePlayback||!f.Y("html5_sabr_non_streaming_xhr_vod_client_request_cancellation")||(w.Ie=!0,w.hO=g.Iq(f.experiments,"html5_sabr_non_streaming_xhr_vod_request_cancellation_timeout_ms")), f.Y("html5_sabr_report_partial_segment_estimated_duration")&&(w.B$=!0),w.L=!0,w.CV=f.Y("html5_trigger_loader_when_idle_network"),w.L0=f.Y("html5_sabr_parse_live_metadata_playback_boundaries"),w.Pa=f.Y("html5_consume_onesie_next_request_policy_for_sabr"),w.JE=f.Y("html5_sabr_report_next_ad_break_time"),w.CU=f.Y("html5_log_high_res_buffer_timeline")&&f.dn(),w.mO=f.Y("html5_remove_stuck_slices_beyond_max_buffer_limits"),w.Gw=f.Y("html5_gapless_sabr_btl_last_slice")&&Dr(p),w.iE=f.Y("html5_reset_last_appended_slice_on_seek")&& Dr(p),na(p)?(w.jR=!0,w.f4=f.Y("html5_disable_variability_tracker_for_live"),w.U0=!0,f.Y("html5_simplified_backup_timeout_sabr_live")&&(w.GE=!0,w.wB=w.LU)):w.cB=f.Y("html5_probe_request_on_sabr_request_progress"),w.Es=f.Y("html5_serve_start_seconds_seek_for_post_live_sabr"),w.Df=f.Y("html5_flush_index_on_updated_timestamp_offset"),w.X=Qk(p),w.hM=f.Y("html5_ignore_partial_segment_from_live_readahead"),f.Y("html5_include_partial_segment_for_jumbo_ll")&&Zr(p)&&(w.hM=!1),w.Os=f.Y("html5_use_non_active_broadcast_for_post_live"), w.pB=f.Y("html5_use_centralized_player_time"),w.q0=f.Y("html5_log_centralized_player_time"),w.xu=f.Y("html5_consume_onesie_sabr_seek"),w.xY=f.Y("html5_enable_sabr_seek_loader_refactor"),p.enableServerStitchedDai&&(w.C=!0,w.wh=f.Y("html5_reset_server_stitch_state_for_non_sabr_seek"),w.Qi=f.Y("html5_remove_ssdai_append_pause")&&!p.L$(),w.uo=f.Y("html5_ssdai_log_ssevt_in_loader_timers")),w.gM=f.dn(),w.latencyClass=p.latencyClass,w.tP=!p.PB()&&f.Y("html5_prebuffer_instream_media_vod"));w.pL=g.Vir(p); w.MO=f.Y("html5_enable_sabr_otf_in_client");aT(f.K,du.BITRATE)&&(w.hf=NaN);if(r=g.Iq(f.experiments,"html5_request_size_max_kb"))w.PS=r*1024;if(f.K.C)w.Jp="; "+du.EXPERIMENTAL.name+"=allowed";else if(f.Y("html5_enable_cobalt_tunnel_mode")&&g.IN()){const {name:C,valid:u}=du.TUNNELMODE;w.Jp=`; ${C}=${u}`}f=p.serverPlaybackStartConfig;f?.enable&&f?.playbackStartPolicy&&(w.t8=!0,jk(w,f.playbackStartPolicy,2));f=ZgP(R);R.LD.removeAll();a:{p=R.Wy.JQ;if(r=R.videoData.videoId)if(G=p.L.get(r)){p.L.remove(r); p=G;break a}p=void 0}R.loader=new Yml(R,R.BB,w,R.videoData.L,R.videoData.O,oY(R),f,R.videoData.enableServerStitchedDai,p,R.videoData.pB);w=R.videoData.Y("html5_disable_preload_for_ssdai_with_preroll")&&R.videoData.isLivePlayback&&R.jf()?!0:R.TJ&&Pd(R);R.loader.initialize(R.getCurrentTime(),oY(R),w);R.videoData.probeUrl&&(R.loader.q0=R.videoData.probeUrl);!R.Ji.length&&!R.TJ||R.videoData.cotn||R.loader?.O0(!1);uR(R.Py,R.loader);R.u3&&(aM_(R.loader,R.u3),R.Ty("sdai",{sdl:1}));R.videoData.cB()&&(R=R.loader, R.policy.gS=R.policy.W8)}; cd=function(R){R.cS();if(!R.gR.finished&&R.sI.finished&&!R.playerState.L(128)&&!R.Ji.length){if(!R.Co.started){var w=R.Co;w.started=!0;w.sync()}if(!R.PM()){R.loader&&(R.Tk().L.vS(nD)?w=R.loader.nB(!0)>0:(w=R.loader.timing,w=!!w.C&&!!w.O),R.VX=w);R.gR.finished||(R.gR.finished=!0);w=R.Y("html5_onesie_live")&&R.loader&&!isNaN(R.loader.I0);!R.videoData.isLivePlayback||R.videoData.nB>0&&!na(R.videoData)||w||Gd(R)||(R.seekTo(Infinity,{dB:"videoplayer_readying",seekSource:18}),R.isBackground()&&(R.eg=!0)); w=R.HB;if(w.qoe){w=w.qoe;const r=w.provider.videoData,f=w.provider.LB;for(var p of f.PH)Ns(w,p);if(w.provider.Y("html5_enable_qoe_cat_list"))for(const G of r.lR)Ns(w,G);else r.PH&&Ns(w,w.provider.videoData.PH);r.PB()&&(p=r.L,na(r)&&Ns(w,"manifestless"),p&&qC(p)&&Ns(w,`live-segment-${qC(p).toFixed(1)}`));Qk(r)?Ns(w,"sabr"):w.hc(Yo(r));if(pg(r)||r.L$())r.L$()&&Ns(w,"ssa"),Ns(w,"lifa");c4(r)&&Ns(w,"cdm");r.gatewayExperimentGroup&&(p=r.gatewayExperimentGroup,p==="EXPERIMENT_GROUP_SPIKY_AD_BREAK_EXPERIMENT"? p="spkadtrt":p==="EXPERIMENT_GROUP_SPIKY_AD_BREAK_CONTROL"&&(p="spkadctrl"),Ns(w,p));f.pB!=="yt"&&w.L.set("len",[r.lengthSeconds.toFixed(2)]);r.cotn&&!rH(r)&&w.cP(!0);f.dn()&&(p=SDd())&&w.Ty("cblt",{m:p});f.Y("html5_log_screen_diagonal")&&w.Ty("cbltdiag",{v:window.H5vccScreen?.GetDiagonal?window.H5vccScreen.GetDiagonal():0})}R.publish("playbackready");z3("pl_c",R.Jf.timerName)||(R.Jf.tick("pl_c"),Wx("pl_c",void 0,"video_to_ad"));z3("pbr",R.Jf.timerName)||(R.Jf.tick("pbr"),Wx("pbr",void 0,"video_to_ad"))}}}; aY=function(R,w){R.playerState.L(128)||(R.I9(mN(R.playerState,1028,9)),R.Ty("dompaused",{r:w}),R.publish("onAutoplayBlocked"))}; g.Z$=function(R){const w=oY(R);return bk(w)||!R.rb?null:g.S_(R.rb.L.videoInfos,p=>w.G(p))}; Ad=function(R,w,p,r,f){var G=R.HB;const I=R.videoData;I.C=p;var C=g.Z$(R);p=new F1I(p,w,C?C.itag:"",r,f);if(G.qoe){G=G.qoe;r=f=g.g9(G.provider);C=[p.L.id,p.C,G.cB,p.reason];G.provider.LB.Tk().L.vS(nD)&&!G.xY&&C.push(mCx(G,p));p.token&&C.push(p.token);g.ix(G,r,"vfs",C);G.cB=p.L.id;C=G.provider.CB.getPlayerSize();if(C.width>0&&C.height>0){C=[Math.round(C.width),Math.round(C.height)];const u=g.oa();u>1&&C.push(u);g.ix(G,r,"view",C)}G.xY||(G.provider.LB.dn()&&Ns(G,"rqs2"),G.provider.videoData.L&&oT(G.provider.videoData.L)&& G.L.set("preload",["1"]));G.xY=!0;G.K=!0;p.reason==="m"&&++G.uo===100&&SU(G,2);g.ix(G,f,"vps",[G.Rb]);G.S||G.reportStats(f)}p=R.Gv;p.C=0;p.L=0;R.publish("internalvideoformatchange",I,w==="m")}; oY=function(R){if(R.rb){var w=R.Gv;var p=R.rb;R=R.wM();let r=nWb(w);if(bk(r)){if(r=w.Hj(p).compose(dUd(w,p)).compose(YgD(w,p)).compose(el(w,p.videoData)).compose(Md(w,p.videoData,p)).compose(cF(w,p)).compose(aZ(w,p)),bk(R)||w.Y("html5_apply_pbr_cap_for_drm"))r=r.compose(Ffl(w,p))}else w.Y("html5_perf_cap_override_sticky")&&(r=r.compose(cF(w,p))),w.Y("html5_ustreamer_cap_override_sticky")&&(r=r.compose(Ffl(w,p)));r=r.compose(aZ(w,p));w=p.videoData.K2.compose(r).compose(p.videoData.B$).compose(R)}else w= $Q;return w}; jrb=function(R){const w="loadstart loadedmetadata play playing progress pause ended suspend seeking seeked timeupdate durationchange ratechange error waiting resize".split(" ");for(const p of w)R.RR.W(R.mediaElement,p,R.nk,R);R.LB.m1&&R.mediaElement.J()&&(R.RR.W(R.mediaElement,"webkitplaybacktargetavailabilitychanged",R.fG,R),R.RR.W(R.mediaElement,"webkitcurrentplaybacktargetiswirelesschanged",R.Gs,R))}; K1_=function(R){if(R.un)if(R.Zq(),R.un.D)try{R.LB.dn()&&R.Ty("rms",{l:"vprms",sr:R.lB(),rs:R.un.O()}),R.un.clear(),R.mediaElement?.cB(R.un),R.un=null}catch(p){var w=new g.Id(`Error while clearing Media Source in VideoPlayer: ${p.name}, ${p.message}`);w=ru(w);R.handleError(w);R.qL()}else R.qL()}; bR=function(R){R.X9&&(R.X9.dispose(),R.X9=null)}; JaY=function(R){R.mediaElement&&R.mediaElement.Ko()&&(R.Tq=(0,g.T)());R.LB.mR?g.cI(()=>{Y_(R)},0):Y_(R)}; Y_=function(R){if(!R.un?.i8()){if(R.mediaElement)try{R.lS=R.mediaElement.playVideo()}catch(w){aY(R,`err.${w}`)}if(R.lS){const w=R.lS;w.then(void 0,p=>{if(!(R.playerState.L(4)||R.playerState.L(256)||R.lS!==w||p&&p.name==="AbortError"&&p.message&&p.message.includes("load"))){let r="promise";p&&p.name&&(r+=`;m.${p.name}`);aY(R,r);R.T7=!0;R.videoData.WB=!0}})}}}; osY=function(R,w=!1){if(R.un)return R.un.G;THL(R,w);return R.j_()?.I0()||null}; awd=function(R,w=!1){let p=null;R.videoData.O?.L()?(p=osY(R,w),R.loader?.resume()):(D$(R),R.videoData.M0&&(p=R.videoData.M0.C()));return p}; igd=function(R,w){if(w.L.video.quality==="auto"&&w.getInfo().O()&&R.videoData.SI)for(const p of R.videoData.SI)if(p.getHeight()===R.dO&&p.L.video.quality!=="auto")return p.getInfo();return w.getInfo()}; QrW=function(R){return!!(R.Y("html5_native_audio_track_switching")&&g.tx&&R.videoData.C?.O())}; hBd=function(R){if(!QrW(R))return!1;R=R.mediaElement?.audioTracks();return!!(R&&R.length>1)}; Hg6=function(R){const w=gsd(R);if(w){var p=FI[w]||w;return R.videoData.getAvailableAudioTracks().find(r=>r.DT.getName()===p)}}; gsd=function(R){if(R=R.mediaElement?.audioTracks())for(let w=0;wf.getLanguageInfo().id===r)); if(R.LB.experiments.XB("enable_audio_description_setting")&&g.SN().vS(198))for(const f of p)if(f.K){w=f;break}R.Tk().L.vS(NHl)&&R.videoData.cotn&&(w=p.find(f=>!!f.J)); w||(R=R.getAudioTrack(),w=R.DT.isDefault?void 0:R);return w}; THL=function(R,w=!1){let p;try{g.IN()&&R.videoData.jq()&&JsD(R.mediaElement),p=R.mediaElement.j_(R.Bi(),R.Kx())}catch(r){if(KG(R.MS,"html5.missingapi",{updateMs:"1"}))return;console.error("window.URL object overwritten by external code",r);R.A$("html5.missingapi",2,"HTML5_NO_AVAILABLE_FORMATS_FALLBACK","updateMs.1");return}R.sL(p,!1,!1,w)}; kZD=function(R,w=!1){if(R.loader){R.videoData.enableServerStitchedDai&&dCl(R.loader);const p=R.getCurrentTime()-R.vB();R.loader.seek(p,{iq:w}).bA(()=>{})}else $_(R)}; USW=function(R,w,p=!1,r=!1){!R.un||w&&R.un!==w||(w=R.getDuration(),!w&&na(R.videoData)&&(w=25200,R.Y("html5_use_centralized_player_time")&&(w=46800)),R.un.isView?w>R.un.getDuration()&&R.un&&(R.un.vM(w),R.loader?.WB(w)):R.un&&(R.un.vM(w),R.loader?.WB(w)),oXW(R.loader,R.un,p,r),R.publish("mediasourceattached"))}; SmP=function(R,w){if(R.LB.dn()&&R.mediaElement){const p=R.mediaElement.TK();p.omt=(R.mediaElement.getCurrentTime()+R.vB()).toFixed(3);p.ps=R.playerState.state.toString(16);p.rt=(g.g9(R.HB.provider)*1E3).toFixed();p.e=w;R.Pl[R.Ri++%5]=p}}; RHY=function(R){if(g.fh("cobalt")&&g.fh("nintendo switch")){var w=!window.matchMedia("screen and (max-height: 720px) and (min-resolution: 200dpi)").matches;R.Ty("nxdock",{d:w})}}; wWD=function(R){g.$E(R.iS);jX(R)||(R.iS=g.PI(()=>jX(R),100))}; jX=function(R){var w=R.mediaElement;w&&R.q$&&!R.videoData.U&&!z3("vfp",R.Jf.timerName)&&w.O()>=2&&!w.isEnded()&&QG(w.po())&&R.Jf.tick("vfp");return(w=R.mediaElement)&&!R.videoData.U&&w.getDuration()>0&&(w.isPaused()&&w.O()>=2&&QG(w.po())&&(z3("pbp",R.Jf.timerName)||R.Jf.tick("pbp"),!R.videoData.eI||R.vU||w.isSeeking()||(R.vU=!0,R.publish("onPlaybackPauseAtStart"))),w=w.getCurrentTime(),HF(R.aK,w))?(R.v$(),!0):!1}; Jd=function(R,w){R.LB.Y("html5_log_rebuffer_reason")&&(w={r:w,lact:r1()},R.mediaElement&&(w.bh=wS(R.mediaElement)),R.Ty("bufreason",w))}; pWP=function(R){R.HB.onProgress();if($o(R.videoData)&&Date.now()>R.vr+6283){if(R.Y("html5_unified_live_latency_reporting")){var w=R.HB;w.qoe&&fML(w.qoe)}else!R.isAtLiveHead()||R.videoData.L&&xX(R.videoData.L)||(w=R.HB,w.qoe&&fML(w.qoe));w=g.f2(R.LB);const p=R.Y("html5_always_log_rawlat");(w||p)&&R.Ty("rawlat",{l:Wd(R.sJ,"rawlivelatency").toFixed(3)});R.vr=Date.now()}R.videoData.C&&R.videoData.C.O()&&(w=R.Ha())&&w.videoHeight!==R.dO&&(R.dO=w.videoHeight,Ad(R,"a",igd(R,R.videoData.M0)))}; r36=function(R){if(R.LB.dn()){R.Pl.sort((w,p)=>+w.rt-+p.rt); for(const w of R.Pl)R.Ty("vpe",Object.assign({t:w.rt},w));R.Pl=[];R.Ri=0}}; $Sl=function(R,w){R.Jf.tick("vta");Wx("vta",void 0,"video_to_ad");R.getCurrentTime()>0&&QuD(R.Py,R.getCurrentTime());R.mediaElement.activate(w);R.un&&BP(4);!R.videoData.U&&R.playerState.isOrWillBePlaying()&&R.D1.start();QrW(R)&&(w=R.mediaElement?.audioTracks())&&(w.onaddtrack=()=>{vsD(R)},w.onremovetrack=()=>{vsD(R)},w.onchange=()=>{R.publish("internalaudioformatchange",R.videoData,!0)})}; Td=function(R,w,p){const r=R.api.getCurrentTime()*1E3{R.api.playVideo();Qn(R)}); iR("pause",()=>{R.api.pauseVideo();Qn(R)}); iR("seekbackward",()=>{R.api.seekBy(-5*R.api.getPlaybackRate());Qn(R)}); iR("seekforward",()=>{R.api.seekBy(5*R.api.getPlaybackRate());Qn(R)}); iR("seekto",w=>{w=w.seekTime;w!=null&&R.api.seekTo(w);Qn(R)})}; Qn=function(R){R.api.Y("web_reset_lact_on_media_actions")&&R.api.updateLastActiveTime()}; s8d=function(R,w){for(const p of w){w=Number(p.playbackRelativePosition?.utcTimeMs)/1E3;const r=w+Number(p.duration?.seconds),f=`composite_embargo_${w}`;if(p.onEnter){const G=p.onEnter.filter(R.G);G.length&&(R.C.set(f,G),R.api.addUtcCueRange(f,w,r,"compositeembargo",!1))}}}; mwd=function(R,w){R.L?.id!==w?.id&&(R.L&&(R.C.delete(R.L.id),R.api.LS([R.L],1)),R.L=w)}; zHY=function(R){R=R?.qualityDetails||[];return g.Kd(R)&&!Array.isArray(R)?R:R.reduce((w,{key:p,value:r})=>{p&&r&&(w[p]=r);return w},{})}; BKl=function(R,w,p){const r=[],f=w?156595:151874;for(const I of R){var G=I.video;R={formatId:I.id,qualityLabel:G.qualityLabel,quality:G.quality,isPlayable:w};if(G=p[G.qualityLabel])R.paygatedQualityDetails={paygatedIndicatorText:G.paygatedIndicatorText,endpoint:G.endpoint,veType:f,trackingParams:G.trackingParams};r.push(R)}return r}; xwb=function(R){hd()&&(R.Jf=R.api.FD(),R.L=new aa,R.O=2,R.Jf.Xl("pt_pish"),window.requestIdleCallback?window.requestIdleCallback(()=>{Wld(R)}):Wld(R))}; hd=function(){return window.android&&window.android.webview&&window.android.webview.getExperimentalMediaIntegrityTokenProvider}; Wld=function(R){if(hd()){R.Jf=R.api.FD();R.Jf.Xl("pt_pis");try{window.android.webview.getExperimentalMediaIntegrityTokenProvider({cloudProjectNumber:868618676952}).then(w=>{R.C=w;R.L?.resolve();R.Jf.Xl("pt_pif")}).catch(w=>{go(w,"player_start"); R.Jf.Xl("pt_pie");R.L?.reject(w)})}catch(w){go(w,"player_start_catch"),R.api.Ty("pfes",{}),R.L?.reject(w)}}}; go=function(R,w){R.message&&g.AO(Error(`${w}_${R.message}`))}; l7d=function(R,w){if(R.C){var p=w.videoId;R.O=3;R.Jf.Xl("pt_ms");try{R.C.requestToken(p).then(r=>{R.Jf.Xl("pt_mf");if(r=Ia(r))w.Gf={OD:r}}).catch(r=>{R.Jf.Xl("pt_me"); go(r,"player_generate");R.handleError(r,w)})}catch(r){go(r,"player_generate_catch"),R.handleError(r,w)}}}; Llb=function(R){const w=R.api.getVideoData();R.button.Rg(w.xv)}; qRd=function(R,w){Vk(R.api.V())&&(w?R.K.show():R.K.hide())}; b7x=function(R){R.GI.videoId)),f=w.filter(I=>!r.has(I.videoId)); f.sort((I,C)=>Number(C.lastUpdatedClientTimestampMs)-Number(I.lastUpdatedClientTimestampMs)); const G=Date.now()-864E5;w=[];for(p=0;p=R.O||Number(I.lastUpdatedClientTimestampMs)0&&r>0&&(f.width+=r,g.Z2(w.element,"width",`${f.width}px`)));R.size=f}}; M$6=function(R){R.O&&g.NG(R.O);R.G&&g.NG(R.G)}; UJ=function(R,w,p,r){M$6(R);w&&(w.unsubscribe("size-change",R.q7,R),w.unsubscribe("back",R.ID,R));p.subscribe("size-change",R.q7,R);p.subscribe("back",R.ID,R);if(R.K_){g.pc(p.element,r?"ytp-panel-animate-back":"ytp-panel-animate-forward");p.gN(R.content);p.focus();R.element.scrollLeft=0;R.element.scrollTop=0;var f=R.size;eHW(R);g.SE(R.element,f);R.O=new g.vZ(()=>{c3W(R,w,p,r)},20,R); R.O.start()}else p.gN(R.content),w&&w.detach()}; g.Rk=function(R,w){const p=R.L[R.L.length-1];p!==w&&(R.L.push(w),UJ(R,p,w))}; c3W=function(R,w,p,r){R.O.dispose();R.O=null;g.pc(R.element,"ytp-popup-animating");r?(g.pc(w.element,"ytp-panel-animate-forward"),g.fc(p.element,"ytp-panel-animate-back")):(g.pc(w.element,"ytp-panel-animate-back"),g.fc(p.element,"ytp-panel-animate-forward"));g.SE(R.element,R.size);R.G=new g.vZ(()=>{g.fc(R.element,"ytp-popup-animating");w.detach();g.GX(w.element,["ytp-panel-animate-back","ytp-panel-animate-forward"]);R.G.dispose();R.G=null},250,R); R.G.start()}; a7d=function(R,w,p){const r=w?.text?.simpleText;r&&(p=PJP(R,p,r,w?.icon,w?.secondaryIcon),w.navigationEndpoint&&p.listen("click",()=>{g.m1(R.B,"innertubeCommand",w.navigationEndpoint);R.hide()},R))}; $wD=function(R,w,p){const r=w?.text?.simpleText;r&&PJP(R,p,r,w?.icon).listen("click",()=>{w?.icon?.iconType==="HIDE"?R.B.publish("featuredproductdismissed"):w.serviceEndpoint&&g.m1(R.B,"innertubeCommand",w.serviceEndpoint);R.hide()},R)}; PJP=function(R,w,p,r,f){w=new g.wv(g.Ys({},[],!1,!!f),w,p);f&&w.updateValue("secondaryIcon",XWD(f));w.setIcon(XWD(r));g.K(R,w);R.bI.CL(w,!0);return w}; XWD=function(R){if(!R)return null;switch(R.iconType){case "ACCOUNT_CIRCLE":return{j:"svg",A:{height:"24",viewBox:"0 0 24 24",width:"24"},N:[{j:"path",A:{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",A:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},N:[{j:"path",A:{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 I$();case "HIDE":return{j:"svg",A:{"enable-background":"new 0 0 24 24",fill:"#fff",height:"24",viewBox:"0 0 24 24",width:"24"},N:[{j:"g",N:[{j:"path",A:{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 sf()}}; p8=function(R){R.isInitialized&&(R.enabled=R.isVisible,R.Jl=R.isVisible,vd(R),R.C(),R.thumbnailImage.Rg(R.isVisible),R.shouldHideDismissButton||R.dismissButton.Rg(R.isVisible),R.shouldShowOverflowButton&&R.overflowButton.Rg(R.isVisible))}; FlH=function(R,w,p){if(p){var r="";nQI(R,w)&&(r=w,R.api.V().U0=w);r&&dwd(R,r)&&(R3r(R.api,r),PQ(X7(R.api.V(),R.api.getVideoData()?.J()),f=>{var G=r;Z7_(f)!==G&&YRI(R,rv(f),{stringValue:G})}))}}; f8=function(R){sz()?.size&&PQ(X7(R.api.V(),R.api.getVideoData()?.J()),w=>{(w=Z7_(w))&&dwd(R,w)&&(R.api.V().U0=w)})}; J3Y=function(R,w){$3(PQ(PQ(R.QC(),p=>o5I(p,[rv(w)])),p=>{if(p)for(const {key:r, value:f}of p)r&&f&&(j8b([{settingItemId:r,settingOptionValue:f}]),f8(R))}),()=>{R.L=!0})}; nQI=function(R,w){R=R.api.getAvailableAudioTracks();for(const p of R)if(p.getLanguageInfo().getId()===w)return p;return null}; dwd=function(R,w){return w.split(".")[0]!==""&&R.api.getVideoData()?.LU()}; Z7_=function(R){{R=rv(R);const w=sz();R=w?w.get(R):void 0}return R&&R.stringValue?R.stringValue:""}; YRI=function(R,w,p){j8b([{settingItemId:w,settingOptionValue:p}]);PQ(R.QC(),r=>{O4l(r,w,p)})}; rv=function(R){let w=(484).toString();R&&(w=(483).toString());return w}; j8b=function(R){let w=sz();w||(w=new Map);for(const p of R)w.set(p.settingItemId,p.settingOptionValue);R=JSON.stringify(Object.fromEntries(w));g.Qp("yt-player-user-settings",R,2592E3)}; TKI=function(R){if(R.U){const w=R.options[R.U];w.element.getAttribute("aria-checked");w.element.setAttribute("aria-checked","false");R.U=null}}; Q8H=function(R,w){g.k_(R.UC);const p={};let r=!1;for(let G=0;G1?2:1,R.O.height=R.heightPx* p,R.O.style.height=`${R.heightPx}px`,R.C.scale(1,p)));for(var f of w){w=R;var G=R.index;for(p=0;p+2{r.setAttribute("d",G6b(G,I,C))},200)}; uyx=function(R,w){return R.O===void 0?!1:w.seekDirection==="TIMELY_ACTION_TRIGGER_DIRECTION_FORWARD"&&Number(w.seekLengthMilliseconds)===5E3?R.O===72:w.seekDirection==="TIMELY_ACTION_TRIGGER_DIRECTION_FORWARD"&&Number(w.seekLengthMilliseconds)===1E4?R.O===74:w.seekDirection==="TIMELY_ACTION_TRIGGER_DIRECTION_BACKWARD"&&Number(w.seekLengthMilliseconds)===5E3?R.O===71:w.seekDirection==="TIMELY_ACTION_TRIGGER_DIRECTION_BACKWARD"&&Number(w.seekLengthMilliseconds)===1E4?R.O===73:!1}; sV6=function(R){R.timelyActions&&(R.K=R.timelyActions.reduce((w,p)=>{if(p.cueRangeId===void 0)return w;w[p.cueRangeId]=0;return w},{}))}; Wt=function(R){R.xY&&clearTimeout(R.xY);R.xY=void 0;R.pB=!1}; xe=function(R,w){if(R.timelyActions)for(const p of R.timelyActions)if(p.cueRangeId===w)return p}; mkW=function(R,w){if((R=xe(R,w))&&R.onCueRangeExit)return KF(R.onCueRangeExit)}; zuH=function(R,w){const p=Number(w?.maxVisibleDurationMilliseconds);p&&(Wt(R),R.xY=setTimeout(()=>{if(R.L!==void 0&&w?.cueRangeId===R.L){R.pB=!1;var r=mkW(R,R.L);r&&g.m1(R.api,"innertubeCommand",r)}},p))}; xkd=function(R){if(R=R.getWatchNextResponse())if(R=g.F(R.playerOverlays?.playerOverlayRenderer?.timelyActionsOverlayViewModel,BkI),R?.timelyActions)return R?.timelyActions.map(w=>g.F(w,WQL)).filter(w=>!!w)}; LQb=function(R){R.menuItem||(R.menuItem=new ldr(R.api,w=>{R.setVoiceBoostUserPreference(w)},()=>R.getVoiceBoostUserPreference(),()=>R.getVoiceBoostState()),g.K(R,R.menuItem))}; qhd=function(R){R=R.qk();if(!R)return!1;R=g.Ak(R).exp||"";return R.includes("xpv")||R.includes("xpe")}; A7H=function(R){for(const w of g.lN(R,!0))if(qhd(w))return!0;return!1}; b66=function(R,w){for(const r of g.lN(R,!0))if(qhd(r)){R=r;var p={potc:"1",pot:w};R.url&&(R.url=yj(R.url,p))}}; y7Y=async function(R){try{await R}catch(w){}}; VkI=function(R){const w=new E4,p={["X-Goog-Api-Key"]:"AIzaSyDyT5W0Jh49F30Pqqtyfdf7pDLFKLJoAnw"};return new p4(w,R,()=>p)}; ofd=function(R){return new oQ(R)}; tkL=function(R){R.C&&(R.G=new aa,R.K.promise.then(()=>{R.Jf.Xl("pot_if");L8(R)}))}; EfI=function(R){const w=(R.Y("html5_generate_session_po_token")||R.Y("html5_generate_content_po_token"))&&!R.useLivingRoomPoToken;try{if(R.Y("html5_use_shared_owl_instance")||R.api.V().Tk().L.vS(O6H))KQb(R);else if(w){R.Jf.Xl("pot_isc");const p=g.Iq(R.api.V().experiments,"html5_webpo_kaios_defer_timeout_ms");p?(qZ(R),g.cI(()=>{Am(R)},p)):R.Y("html5_webpo_idle_priority_job")?(qZ(R),g.uq(g.mL(),()=>{Am(R)})):Am(R)}}catch(p){p instanceof Error&&g.AO(p)}}; KQb=async function(R){bN(R,"swpo_i");qZ(R);L8(R);var w=await bg(i$());bN(R,"swpo_co");w=await b0H(w);R.Y("html5_web_po_token_disable_caching")||w.cV(150);R.C=w;bN(R,"swpo_cc");y7Y(w.eS()).then(()=>{R.L=!0;R.K.resolve();bN(R,"swpo_re")}); g.cI(()=>{Am(R);bN(R,"swpo_si")},0)}; qZ=function(R){R.O||(R.O=Ph())}; Am=function(R){var w=R.api.V();R.Jf.Xl("pot_ist");R.C||Dk6(R);R.Y("html5_bandaid_attach_content_po_token")||(R.Y("html5_generate_session_po_token")&&(L8(R),tkL(R)),w=g.Iq(w.experiments,"html5_session_po_token_interval_time_ms")||0,w>0&&(R.U=g.PI(()=>{L8(R)},w)),R.D=!0)}; eub=function(R){const w=Sz(R.experiments,"html5_web_po_request_key");return w?w:g.I1(R)?"Z1elNkAKLpSR3oPOUMSN":"O43z0dpjhgX20SCx4KAo"}; bN=function(R,w){R.Y("html5_webpo_bge_ctmp")&&R.api.Ty(w,{hwpo:!!R.C,hwpor:R.L})}; L8=async function(R){if(R.Y("html5_generate_session_po_token")&&!R.useLivingRoomPoToken){var w=R.api.V(),p=g.n("EOM_VISITOR_DATA")||g.n("VISITOR_DATA");p=w.iD?w.datasyncId:p;p=Sz(w.experiments,"html5_mock_content_binding_for_session_token")||w.livingRoomPoTokenId||p;w.wg=y1(R,p)}}; Dk6=function(R){const w=R.api.V();var p=eub(w);p=VkI(p);const r=p.N2.bind(p);p.N2=async G=>{G=await r(G);R.api.Ty("itr",{});return G}; let f;try{f=ofd({eE:p,D4:{maxAttempts:5},UX:{z_:"CLEn",disable:w.experiments.XB("html5_web_po_disable_remote_logging"),GT:zL6(w.experiments),kc:I=>{var C=MkP.get(I);C||(C=new c7d(I),C=new jb(C),MkP.set(I,C));return C}, LG:R.Y("wpo_dis_lfdms")?0:1E3},Ep:g.AO});const G=new PUY({z3:f,eE:p,onError:g.AO});y7Y(G.eS()).then(()=>{R.L=!0;R.K.resolve()}); R.Y("html5_web_po_token_disable_caching")||G.cV(150);g.K(R,f);g.K(R,G);R.C=G}catch(G){g.AO(G),f?.dispose()}}; y1=function(R,w){if(!R.C){if(R.O)try{return R.O(w)}catch(p){g.AO(p)}return""}try{R.Jf.Xl(R.L?"pot_cms":"pot_csms");const p={fk:!0,GQ:!0,OP:w};R.Y("html5_web_po_token_disable_caching")||(p.JO={hC:w,Sv:!0,XC:!0});const r=R.C.uK(p);R.Jf.Xl(R.L?"pot_cmf":"pot_csmf");R.L&&(R.G?.resolve(),R.G=null,R.J&&(R.J=!1,R.api.app.HS().nw(!1)));return r}catch(p){return g.AO(p),""}}; adL=function(R,w){let p;switch(w){case 2:w="Hide videos";p="Hide recommendations grid";break;default:w="More videos",p="Show recommendations grid"}R.updateValue("title",w);R.element.ariaLabel=p;R.G.textContent=w}; g.V1=function(R,w,p){g.M(R.element,"ytp-suggestion-set",!!w.videoId);var r=w.playlistId;p=w.EZ(p?p:"mqdefault.jpg");let f=null,G=null;w instanceof La&&(w.lengthText?(f=w.lengthText||null,G=w.FM||null):w.lengthSeconds&&(f=g.a$(w.lengthSeconds),G=g.a$(w.lengthSeconds,!0)));const I=!!r;r=I&&Ha(r).type==="RD";const C=w instanceof La?w.isLivePlayback:null,u=w instanceof La?w.isUpcoming:null,m=w.author,z=w.shortViewCount,B=w.publishedTimeText,W=[],x=[];m&&W.push(m);z&&(W.push(z),x.push(z));B&&x.push(B); p={title:w.title,author:m,author_and_views:W.join(" \u2022 "),aria_label:w.ariaLabel||g.K2("Watch $TITLE",{TITLE:w.title}),duration:f,timestamp:G,url:w.dS(),is_live:C,is_upcoming:u,is_list:I,is_mix:r,background:p?`background-image: url(${p})`:"",views_and_publish_time:x.join(" \u2022 "),autoplayAlternativeHeader:w.Mj};w instanceof qr&&(p.playlist_length=w.playlistLength);R.update(p)}; g.$kr=function(R,w){if(R.suggestion!==w){R.suggestion=w;var p=R.api.V(),r="hqdefault.jpg";w.EZ("sddefault.jpg")&&(r="sddefault.jpg");g.V1(R,w,r);g.zI(p)&&!R.api.Y("web_player_log_click_before_generating_ve_conversion_params")&&(p=w.dS(),r={},g.W7(R.api,"addEmbedsConversionTrackingParams",[r]),p=g.bu(p,r),R.updateValue("url",p));(w=(w=w.sessionData)&&w.itct)&&R.api.setTrackingParams(R.element,w)}}; XjH=function(R,w){let p="";const r=g.ta(R.player,"More videos","v");w===2?p="Hide videos":w===1&&(p="More videos");R.element.setAttribute("title",r);R.element.setAttribute("data-title-no-tooltip",p);R.element.setAttribute("aria-label",p);if(w=R.KB("ytp-fullscreen-grid-hover-overlay"))w.setAttribute("title",r),w.setAttribute("data-title-no-tooltip",p),w.setAttribute("aria-label",p);!R.J&&(w=R.KB("ytp-fullscreen-grid-expand-button"))&&(w.setAttribute("title",r),w.setAttribute("data-title-no-tooltip", p),w.setAttribute("aria-label",p));R.player.wl()}; OS=function(R){const w=ok(R);g.M(R.api.getRootNode(),"ytp-full-bleed-player",w);R.xY&&g.wO(R.xY,w);R.playerOverlayVideoDetailsRenderer&&g.wO(R.playerOverlayVideoDetailsRenderer,w);R.G&&tm(R)}; ES=function(R,w,p){R.O=w;R.C?.kp(w,p);R.X?.kp(w);R.L=0;K8(R);nfH(R,w)}; jVL=function(R,w,p){w.W(p,"keyboardserviceglobalkeydown",(r,f)=>{R.G&&r.keyCode===86&&!r.repeat&&R.O!==0&&(f&&(f.oy=!0),R.S("INTERACTION_LOGGING_GESTURE_TYPE_KEY_PRESS"))}); w.W(R.api.getRootNode(),"wheel",r=>{if(!R.pB&&R.G&&R.C?.element&&!R.api.getPlayerStateObject().L(2)&&R.O!==0&&ok(R))if(g.pc(R.api.getRootNode(),"ytp-grid-scrolling"),R.K===0&&(R.K=window.innerHeight),R.O===1)R.K!==0&&(R.L+=r.deltaY/R.K,R.L=g.MN(R.L,0,.7),K8(R),dkd(R,R.D/R.K+R.L>=.7,2));else if(R.O===2){const f=r.deltaY<0,G=R.C?.G?.scrollTop===0,I=R.L!==0;f&&G||I&&!f?R.K!==0&&(R.L=Math.max(0,R.L-r.deltaY/R.K),K8(R),dkd(R,R.D/R.K+Math.abs(R.L)>=.7,1)):R.L!==0&&(R.L=0,K8(R))}},R,!0); w.W(p,"standardControlsInitialized",()=>{if(!R.C){R.C=new Z6D(R.api,R.PS.bind(R));R.M0&&(R.X=new Yhx(R.api),g.K(R,R.X),R.X.element.setAttribute("data-overlay-order","12"),R.api.Dm(R.X.element,4),R.X.listen("click",R.S,R));g.K(R,R.C);var r=R.api.getRootNode().querySelector(".ytp-chrome-bottom");r&&r.parentNode&&r.parentNode.insertBefore(R.C.element,r.nextSibling);FQr(R)}}); w.W(p,"presentingplayerstatechange",()=>{tm(R)}); w.W(p,"autonavvisibility",()=>{tm(R)}); R.api.Z5().subscribe("visibilitystatechange",()=>{tm(R)}); nfH(R,R.O)}; tm=function(R){if(R.G)if(g.fc(R.api.getRootNode(),"ytp-grid-scrolling"),R.api.getPresentingPlayerType()===2||R.api.Jj()||R.api.isMinimized())ES(R,0);else{var w=R.api.getPlayerStateObject().L(2);if(w)ES(R,2,"INTERACTION_LOGGING_GESTURE_TYPE_AUTOMATED");else if(R.isEnded&&!w){const p=ok(R)?1:0;R.isEnded=w;ES(R,p)}else ok(R)?R.O!==2&&ES(R,1):ES(R,0);R.isEnded=w}}; nfH=function(R,w){const p=R.api.getRootNode();g.M(p,"ytp-fullscreen-grid-peeking",w===1);g.M(p,"ytp-fullscreen-grid-active",w===2);w===1&&FQr(R)}; FQr=function(R){const w=R.api.getRootNode();var p=R.api.getPlayerStateObject().L(256)||R.api.getPlayerStateObject().L(32)||R.api.getPlayerStateObject().L(16)?R.D:R.Jl&&R.api.getPlayerStateObject().isPaused()?(R.C?.element.clientWidth||0)*.5625/3*R.jI||R.O0:R.O0;R.D=p;w.style.setProperty("--ytp-grid-peek-height",`${R.D}px`);g.M(w,"ytp-disable-bottom-gradient",R.D<=12&&R.J===0)}; ok=function(R){return R.api.isFullscreen()||R.YY&&R.api.dY()}; K8=function(R){R.L===0&&R.api.getRootNode().style.setProperty("--ytp-grid-scroll-percentage","0");requestAnimationFrame(()=>{const w=R.L-R.J;let p=w;R.L!==0&&(p=g.MN(w,-.01,.01));R.J+=p;R.api.getRootNode().style.setProperty("--ytp-grid-scroll-percentage",`${R.J.toString()}`);R.J!==R.L&&K8(R)})}; dkd=function(R,w,p){R.U&&clearTimeout(R.U);R.L===0&&g.fc(R.api.getRootNode(),"ytp-grid-scrolling");w?J7x(R,p):R.L<.1&&(R.U=window.setTimeout(()=>{J7x(R)},1E3))}; J7x=function(R,w){R.U&&(clearTimeout(R.U),R.U=null);R.K=0;R.G&&R.O!==0&&(w?ES(R,w):Math.abs(R.L)>=.15&&R.S("INTERACTION_LOGGING_GESTURE_TYPE_SCROLL_BEGAN_DRAGGING"),R.L=0,K8(R),g.fc(R.api.getRootNode(),"ytp-grid-scrolling"))}; Dq=function(R,w,p){u$("pbs",w??(0,g.T)(),p??R.timerName)}; TkI=function(R,w,p){var r=g.sg(w.zy)&&!w.zy.J;if(w.zy.YU&&(Ba(w.zy)||w.zy.xY==="shortspage"||yk(w.zy)||r)&&!R.O){R.O=!0;R.J=w.clientPlaybackNonce;g.n("TIMING_ACTION")||Gh("TIMING_ACTION",R.LB.csiPageType);R.LB.csiServiceName&&Gh("CSI_SERVICE_NAME",R.LB.csiServiceName);if(R.L){r=R.L.FD();for(var f of Object.keys(r))u$(f,r[f],R.timerName);f=g.mJ(Zud)(R.L.Do);g.sT(f,R.timerName);f=R.L;f.C={};f.Do={}}g.sT({playerInfo:{visibilityState:g.mJ(dPH)()},playerType:"LATENCY_PLAYER_HTML5"},R.timerName);R.K!== w.clientPlaybackNonce||Number.isNaN(R.C)||(z3("_start",R.timerName)?p=g.mJ(wC)("_start",R.timerName)+R.C:g.AO(new g.Id("attempted to log gapless pbs before CSI timeline started",{cpn:w.clientPlaybackNonce})));!p||z3("pbs",R.timerName)||w.Y_||Dq(R,p)}}; e2=function(R){vIr();Hur();R.timerName=""}; i6W=function(R){if(R.L){var w=R.L;w.C={};w.Do={}}R.O=!1;R.K=void 0;R.C=NaN}; MZ=function(R){return!!(R.playlist||R.list||R.api)}; g.Pt=function(R,w,p,r){w=w!==void 0?w:R.index;w=R.items&&w in R.items?R.items[R.order[w]]:null;let f=null;w&&(p&&(w.autoplay="1"),r&&(w.autonav="1"),f=new g.ct(R.zy,w),g.K(R,f),f.xu=!0,f.startSeconds=R.startSeconds||f.clipStart||0,R.listId&&(f.playlistId=R.listId.toString()));return f}; QVW=function(R,w){if(w.video&&w.video.length){R.title=w.title||"";R.description=w.description;R.views=w.views;R.likes=w.likes;R.dislikes=w.dislikes;R.author=w.author||"";var p=w.loop;p&&(R.loop=p);p=g.Pt(R);R.items=[];for(const r of w.video)r&&(r.video_id=r.encrypted_id,R.items.push(r));R.length=R.items.length;(w=w.index)?R.index=w:R.findIndex(p);R.setShuffle(!1);R.loaded=!0;R.C++;R.L&&R.L()}}; huI=function(R){const w=R.index+1;return w>=R.length?0:w}; gf6=function(R){const w=R.index-1;return w<0?R.length-1:w}; ak=function(R,w){R.index=g.MN(w,0,R.length-1);R.startSeconds=0}; Nkd=async function(R,w){const p=g.J1();var r=R.V();const f={context:g.sm(R),playbackContext:{contentPlaybackContext:{ancestorOrigins:r.ancestorOrigins}}};var G=r.getWebPlayerContextConfig();G?.encryptedHostFlags&&(f.playbackContext.contentPlaybackContext.encryptedHostFlags=G.encryptedHostFlags);G?.hideInfo&&(f.playerParams={showinfo:!1});G=r.embedConfig;const I=R.B1;var C=w.docid||w.video_id||w.videoId||w.id;if(!C){C=w.raw_embedded_player_response;if(!C){var u=w.embedded_player_response;u&&(C=JSON.parse(u))}C= C?g.F(C?.embedPreview?.thumbnailPreviewRenderer?.playButton?.buttonRenderer?.navigationEndpoint,g.xo)?.videoId||null:null}C=C?C:void 0;u=R.playlistId?R.playlistId:w.list;const m=w.listType;if(u){var z;m==="user_uploads"?z={username:u}:z={playlistId:u};H6d(G,I,C,w,z,r.experiments);f.playlistRequest=z}else w.playlist?(z={templistVideoIds:w.playlist.toString().split(",")},H6d(G,I,C,w,z,r.experiments),f.playlistRequest=z):C&&(z={videoId:C},I&&r.Y("embeds_enable_per_video_embed_config")?z.serializedThirdPartyEmbedConfig= I:G&&(z.serializedThirdPartyEmbedConfig=G),f.singleVideoRequest=z);r=g.cx(vfd);try{const B=await g.$J(p,f,r),W=R.V();w.raw_embedded_player_response=B;W.I0=Kh(w,g.zI(W));W.O=W.I0==="EMBEDDED_PLAYER_MODE_PFL";B&&B.trackingParams&&k3(B.trackingParams);return new g.ct(W,w)}catch(B){return B instanceof Error||(B=Error("b259802748")),g.LF(B),R}}; H6d=function(R,w,p,r,f,G){r.index&&(f.playlistIndex=String(Number(r.index)+1));f.videoId=p?p:"";w&&G.XB("embeds_enable_per_video_embed_config")?f.serializedThirdPartyEmbedConfig=w:R&&(f.serializedThirdPartyEmbedConfig=R)}; g.XA=function(R,w){$e.get(R);$e.set(R,w)}; g.lN=function(R,w){return w?R.L.concat(R.C):R.L}; k6I=function(R,w){g.S_(w,p=>R.equals(p))||w.push(R)}; g.n8=function(R,w){switch(w.kind){case "asr":k6I(w,R.C);break;default:k6I(w,R.L)}}; g.Ukd=function(R,w){return w.V().Y("html5_use_hls_native_captions")&&g.tx&&R.PB()&&!!R.C?.O()}; g.dv=function(R,w){return R.V().Y("safari_live_drm_captions_fix")&&R.getVideoData()?.ph()?!1:g.f2(R.V())&&!w.isManifestless}; g.Zq=function(R,w){return Ew(R.info.mimeType)?w?R.info.itag===w:!0:!1}; g.Sh_=function(R,w){if(R.L!=null&&g.dv(w,R.L)&&R.L.L.rawcc!=null)return!0;if(!R.PB())return!1;w=!!R.L&&R.L.isManifestless&&Object.values(R.L.L).some(p=>g.Zq(p,"386")); R=!!R.L&&!R.L.isManifestless&&g.Xxd(R.L);return w||R}; JCW=function(R){if(R.B.V().nB)return R.sK.get("ux")}; Ye=function(R){return R.sK.get("ad")}; g.FA=function(R){return R.sK.get("captions")}; g.j2=function(R){return R.sK.get("annotations_module")}; Em=function(R){if(R.B.V().zv)return R.sK.get("remote")}; Jm=function(R){return R.sK.get("creatorendscreen")}; var l_6=function(R){return zU[l[5]](this,32,1605,R)}; Tx=function(R){if(Lb(R.B.V()))return R.sK.get("kids")}; g.MS=function(R){return R.sK.get("webgl")}; iN=function(R){if(R.B.V().qH)return R.sK.get("offline")}; RzI=function(R){if(R.B.V().showMiniplayerUiWhenMinimized)return R.sK.get("miniplayer")}; w_P=function(R,w){R.O=w}; p_d=function(R){const w=R.B.getVideoData();return g.Ukd(w,R.B)||!!w.Mr||!!w.captionTracks.length||g.Sh_(w,R.B)}; Q1=function(R,w,p=!1,r=!1,f){var G;let I=R.sK.get(w);if(!I||r)if(f||(f=()=>{Q1(R,w,p,r)}),G||(G=()=>{hm(R,w)}),I=I||rr6(R,w,f0P(R,w),f,G))R.sK.set(w,I),I.create(),R.B.publish("modulecreated",w),p&&g.lK(R.B,"onApiChange")}; gv=function(R){if(R.B.V().O)return!1;if(R=R.B.getVideoData({playerType:1}).getPlayerResponse()){const w=R.adPlacements;if(w)for(let p=0;p{R.J.add(f);p.call(R)},r)}}; Wtd=async function(R){var w=R.sK.get("asmjs");if(w)return w;w=$e.get("asmjs")??await new Promise((p,r)=>{ms6(R,"asmjs",()=>{const f=$e.get("asmjs");f?p(f):r("cannot load module asmjs")},r)}); if(!w)return Promise.reject("cannot load module asmjs");w=new w(R.B);R.sK.set("asmjs",w);w.create();return w}; vt=function(R){var w=R.B.getVideoData();if(R=w.Y("web_player_defer_ad")){if(g.ra(w.XL,"ad")||kEY(w)||w.enableServerStitchedDai)var p=!1;else{R=w.startSeconds;var r=w.playerResponse?.adPlacements;if(w=r){w=Number.MAX_VALUE;for(p of r)if(r=p.adPlacementRenderer){const f=r.config?.adPlacementConfig;f?.kind==="AD_PLACEMENT_KIND_MILLISECONDS"&&(r=(Number(f?.adTimeOffset?.offsetStartMilliseconds)||0)-Number(r.renderer?.adBreakServiceRenderer?.prefetchMilliseconds||0),rR.sK.get("asmjs")??xsW(R))}; B9r=function(R,w,p,r){var f=g.vD("SCRIPT");let G=!1,I;for(let x=0;x{R.cS()||p.call(R)},u=()=>{R.cS()||r.call(R)},m=I.onload; I.onload=x=>{cv(C);m&&m.apply(window,[x])}; const z=I.onerror;I.onerror=x=>{if(Math.random()<.01){const q=new g.Id("Unable to load player module",w,document.location&&document.location.origin);g.LF(q)}cv(u);z&&z(x)}; const B=I,W=B.onreadystatechange;B.onreadystatechange=x=>{switch(B.readyState){case "loaded":case "complete":cv(C)}W&&W(x)}; G&&((f=R.B.V().cspNonce)&&I.setAttribute("nonce",f),g.Sa(I,g.wD(w)),f=g.vD("HEAD")[0]||document.body,f.insertBefore(I,f.firstChild),R.addOnDisposeCallback(()=>{I.parentNode&&I.parentNode.removeChild(I)}))}; S2=function(R,w,p){R.cS();const r=US(R);p?(R.C|=w,w&1&&R.X.start(),w&2&&R.pB.start(),w&2048&&R.S.start()):(R.C&=~w,w&1&&R.X.stop(),w&2&&R.pB.stop(),w&2048&&R.S.stop(),w&512&&R.xY.stop());R.C&512&&!(R.C&128)&&R.xY.ql(R.Jl);w=US(R);r!==w&&R.publish("autohideupdate",w)}; Arr=function(R){S2(R,4,!1);R.D&&(R.L.o9(R.D),R.D=null,R.O=R.L.W(R.target,"mouseover",R.oS));R.O&&(R.L.o9(R.O),R.O=R.L.W(R.target,"mouseover",R.oS))}; US=function(R){let w=R.C;R.api.Y("allow_autohide_on_paused_videos")&&(w&=-129);R.api.Y("web_player_default_autohide")&&(w&=-513);return!w}; bxd=function(R,...w){var p=R.api.V();for(const G of w){if(!G||G instanceof g.ct&&!G.videoId)continue;var r=R.api.L_().getPlayerSize();var f=g.oa();w=r.width*f;f*=r.height;if(w>1280||f>720)if(r=G.EZ("maxresdefault.jpg"))break;if(w>640||f>480)if(r=G.EZ("maxresdefault.jpg"))break;if(w>320||f>180)if(r=G.EZ("sddefault.jpg")||G.EZ("hqdefault.jpg")||G.EZ("mqdefault.jpg"))break;if(r=G.EZ("default.jpg"))break}g.Eg(p)&&(p=new Image,p.addEventListener("load",()=>{pvx()}),p.src=r?r:"",R.api.FD().tick("ftr")); R.K.style.backgroundImage=r?`url(${r})`:""}; yrW=function(R){for(let w=0;w=67&&!R.api.V().D;R=R.api.V().disableOrganicUi;return!g.fh("tizen")&&!$X&&!w&&!R}; ezI=function(R,w){if(!w)return!1;var p=R.api.XI();if(p.J()&&(p=p.zk())&&g.lA(p,w))return p.controls;for(p=0;p=11;R=R.api.V().D&&fE;return!(!w&&!R)}; Ix=function(R,w){R.uI.bc();if(R.dJ&&R.Fc)R.Fc=!1;else if(!R.api.V().jI&&!R.ZC()){const p=R.api.getPlayerStateObject();p.L(2)&&g.Kg(R.api)||R.fN(p);w&&GN(R,w)?crW(R):!R.api.V().N0||p.isCued()||p.L(1024)?R.Ai():R.aW.isActive()?(R.xl(),R.aW.stop()):R.aW.start()}}; CE=function(R,w){return!R.api.isInline()&&!ezI(R,jN(w))&&g.$t(w)}; un=function(R,w){return R.api.getVideoData()?.mutedAutoplay&&w.target?.className?.includes("ytp-info-panel")?!1:g.$t(w)&&R.api.isMutedByMutedAutoplay()?(R.api.unMute(),R.api.getPresentingPlayerType()===2&&R.api.playVideo(),w=R.api.getPlayerStateObject(),!w.L(4)||w.L(8)||w.L(2)||R.Ai(),!0):!1}; GN=function(R,w){if(!R.api.V().Y("web_player_invisible_fullscreen_button"))return!1;var p=R.api.getRootNode().getBoundingClientRect();let r,f;w.targetTouches&&w.targetTouches.length?(r=w.targetTouches[0].clientX,f=w.targetTouches[0].clientY):w.clientX!==void 0&&(r=w.clientX,f=w.clientY);return r!==void 0&&f!==void 0&&(w=r-p.left,p=f-p.top,R=R.api.getPlayerSize(),p>=R.height-40&&w>=R.width-40)?!0:!1}; crW=function(R){if(R.api.V().N0&&R.api.getPresentingPlayerType()!==3)try{R.api.toggleFullscreen().catch(w=>{R.eR(w)}),R.api.Y("web_player_fullscreen_double_click_ve")&&R.api.logClick(R.api.L_().element)}catch(w){R.eR(w)}}; Pxd=function(R,w,p){R.api.isFullscreen()?p<1-w&&R.api.toggleFullscreen():p>1+w&&R.api.toggleFullscreen()}; so=function(R,w,p="",r=""){R.updateValue("label",p);R.updateValue("icon",w);R.L.bv();R.C.start();R.updateValue("title",r);g.M(R.element,"ytp-bezel-text-hide",!r)}; mD=function(R,w,p){let r;w<=0?(p=LQ(),w="muted",r=0):(p=p?{j:"svg",A:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},N:[{j:"path",FI:!0,A:{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",A:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},N:[{j:"path",FI:!0,A:{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"}}]},r=Math.floor(w),w=r+"volume");so(R,p,w,`${r}%`)}; a0I=function(R,w){w=w?{j:"svg",A:{fill:"currentColor",height:"100%",viewBox:"0 0 36 36",width:"100%"},N:[{j:"path",A:{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"}}]}:rIL();const p=R.B.getPlaybackRate(),r=g.K2("Speed is $RATE",{RATE:String(p)});so(R,w,r,p+"x")}; $sl=function(R,w){w=w?"Subtitles/closed captions on":"Subtitles/closed captions off";so(R,snl(R.B),w)}; X_d=function(R,w){R.L=w;R.element.classList.toggle(zN.NOTIFICATIONS_ENABLED,R.L);const p=R.api.getVideoData();p?(w=w?p.wK:p.Sm)?(R=R.api.QC())?aw(R,w):g.LF(Error("No innertube service available when updating notification preferences.")):g.LF(Error("No update preferences command available.")):g.LF(Error("No video data when updating notification preferences."))}; BB=function(R,w,p){const r=document.location.protocol;R=jMW(`${r}//${R}/signin?context=popup`,"feature",w,"next",`${r}//${location.hostname}/post_login`);nUI(R,p)}; nUI=function(R,w){if(R=g.g2(window,R,"loginPopup","width=800,height=600,resizable=yes,scrollbars=yes"))y0W(()=>{w()}),R.moveTo((screen.width-800)/2,(screen.height-600)/2)}; FtW=function(R){const w=R.api.V();dsD(R);R.updateValue("flyoutUnfocusable","true");R.updateValue("channelTitleFocusable","-1");R.updateValue("shouldHideExpandedTitleForA11y","true");R.updateValue("shouldHideExpandedSubtitleForA11y","true");w.C||w.PS||(R.W(R.channel,"mouseenter",R.J),R.W(R.channel,"mouseleave",R.K),R.W(R.channel,"focusin",R.J),R.W(R.channel,"focusout",p=>{R.channel.contains(p.relatedTarget)||R.K()})); R.O=new g.vZ(()=>{R.isExpanded()&&(R.api.logVisibility(R.channelName,!1),R.subscribeButton&&(R.subscribeButton.hide(),R.api.logVisibility(R.subscribeButton.element,!1)),R.L&&(R.L.hide(),R.api.logVisibility(R.L.element,!1)),R.channel.classList.remove("ytp-title-expanded"),R.channel.classList.add("ytp-title-show-collapsed"))},500); g.K(R,R.O);R.W(R.channel,ZxD,()=>{Y56(R)}); R.W(R.api,"onHideControls",R.D);R.W(R.api,"appresize",R.D);R.W(R.api,"fullscreentoggled",R.D)}; WB=function(R){var w=R.api.V();const p=R.api.getVideoData();let r=g.Pa(w)+p.PS;g.Ir(p)&&(r="https://music.youtube.com"+p.PS);if(!g.zI(w))return r;w={};g.W7(R.api,"addEmbedsConversionTrackingParams",[w]);return g.bu(r,w)}; jbb=function(R){const w=R.api.getPlayerSize();return g.zI(R.api.V())&&w.width>=524}; dsD=function(R){if(!R.api.V().f_){var w=R.api.getVideoData(),p=new g.xH("Subscribe",null,"Subscribed",null,!0,!1,w.wy,w.subscribed,"channel_avatar",null,R.api,!0);R.api.createServerVe(p.element,R);R.api.setTrackingParams(p.element,w.subscribeButtonRenderer?.trackingParams||null);R.W(p.element,"click",()=>{R.api.logClick(p.element)}); R.subscribeButton=p;g.K(R,R.subscribeButton);R.subscribeButton.gN(R.U);R.subscribeButton.hide();var r=new JrI(R.api);R.L=r;g.K(R,r);r.gN(R.U);r.hide();R.W(R.api,"SUBSCRIBE",()=>{w.Ww&&(r.show(),R.api.logVisibility(r.element,!0))}); R.W(R.api,"UNSUBSCRIBE",()=>{w.Ww&&(r.hide(),R.api.logVisibility(r.element,!1),X_d(r,!1))})}}; Y56=function(R){R.channel.classList.remove("ytp-title-show-collapsed");R.channel.classList.remove("ytp-title-show-expanded")}; T9I=function(R,w="",p=""){R.G?(R.X!==w&&(R.C.style.backgroundImage=`url(${w})`,R.X=w),R.updateValue("channelLink",WB(R)),R.updateValue("channelLogoLabel",g.K2("Photo image of $CHANNEL_NAME",{CHANNEL_NAME:p})),g.pc(R.api.getRootNode(),"ytp-title-enable-channel-logo")):g.fc(R.api.getRootNode(),"ytp-title-enable-channel-logo");R.api.logVisibility(R.C,R.G&&R.pB)}; ln=function(R,w){R.element.setAttribute("aria-haspopup",String(w))}; ixd=function(){let R=document.queryCommandSupported&&document.queryCommandSupported("copy");O3("Chromium")>=43&&(R=!0);O3("Firefox")<=40&&(R=!1);return R}; LE=function(R){R.OI?.Rg(!R.B.isFullscreen()&&!R.B.isMinimized()&&R.B.getPresentingPlayerType()!==2&&R.B.V().showMiniplayerButton)}; QbI=function(R){const w=!!R.wc;g.FV(R.TK,w?"Copy debug info":"Get debug info");ln(R.TK,!w);g.FV(R.xi,w?"Copy embed code":"Get embed code");ln(R.xi,!w);g.FV(R.getVideoUrl,w?"Copy video URL":"Get video URL");ln(R.getVideoUrl,!w);g.FV(R.fX,w?"Copy video URL at current time":"Get video URL at current time");ln(R.fX,!w);R.xi.setIcon(w?wMd():null);R.getVideoUrl.setIcon(w?CQ():null);R.fX.setIcon(w?CQ():null)}; hzD=function(R,w){var p=R.B.V();const r=R.B.getPresentingPlayerType()===2;var f=!r||w.isListed;f=!p.S&&!!w.videoId&&f;p.playerStyle!=="play"?p="https://support.google.com/youtube/?p=report_playback":(p={contact_type:"playbackissue",html5:1,ei:w.eventId,v:w.videoId,p:"movies_playback"},w.C&&(p.fmt=w.C.itag),w.clientPlaybackNonce&&(p.cpn=w.clientPlaybackNonce),w.partnerId&&(p.partnerid=w.partnerId),p=g.bu("//support.google.com/googleplay/",p));R.xi.Rg(f&&w.allowEmbed);R.getVideoUrl.Rg(f);R.fX.Rg(f&& !w.isLivePlayback);R.ao.setContent(p,"href");R.yI?.Rg(!w.isLivePlayback&&!r);LE(R);R.Aa?.Rg(!r)}; q8=function(R,w){let p=!1;if(R.wc){const r=R.wc.element;r.value=w;r.select();try{p=document.execCommand("copy")}catch(f){}}p?R.OQ.Qh():(R.Dq.setContent(w,"text"),g.Rk(R.OQ,R.nC),NS(R.Dq.element),R.wc&&(R.wc=null,QbI(R)));return p}; gUd=function(R){return g.zI(R.B.V())?R.Aa:R.yI}; Hxd=function(R){R.C.C();var w=R.B.V();w.playerStyle==="gvn"||w.C||w.PS||(w=R.B.L_(),R.C.W(w,"contextmenu",R.Jl),R.C.W(w,"touchstart",R.onTouchStart,null,!0),R.C.W(w,"touchmove",R.S,null,!0),R.C.W(w,"touchend",R.S,null,!0))}; vUL=function(R){R.B.isFullscreen()?g.P7(R.B,R.element,10):R.gN(dH(R).body)}; N9l=async function(R,w){try{return await navigator.clipboard.writeText(w),!0}catch{let p=!1;const r=g.sW("TEXTAREA");r.value=w;r.setAttribute("readonly","");R=R.api.getRootNode();R.appendChild(r);if(hx){const f=window.getSelection();f.removeAllRanges();const G=document.createRange();G.selectNodeContents(r);f.addRange(G);r.setSelectionRange(0,w.length)}else r.select();try{p=document.execCommand("copy")}catch(f){}R.removeChild(r);return p}}; kkI=function(R){R.updateValue("icon",wQ());if(R.api.V().C)R.tooltip.IR(R.element,"Link copied to clipboard");else{R.updateValue("title-attr","Link copied to clipboard");R.updateValue("tooltip-title","Link copied to clipboard");R.tooltip.wl();R.tooltip.IR(R.element);const w=R.listen("mouseleave",()=>{R.o9(w);R.WS();R.tooltip.h4()})}}; Usd=function(R){var w=R.api.V();const p=R.api.getVideoData(),r=R.api.L_().getPlayerSize().width;w=w.O;return!!p.videoId&&r>=240&&p.PF&&!p.h$&&!R.api.isEmbedsShortsMode()&&!w}; S5b=function(R,w){w=g.K2("$TOTAL_SEEK_TIME seconds",{TOTAL_SEEK_TIME:w.toString()});R.updateValue("seekTime",w)}; RKI=function(R,w){R.B.Y("web_enable_shopping_timely_shelf_client")&&!R.B.Y("web_force_featured_product_banner_with_timely_shelf")&&w&&!w.isPremiere&&w.getPlayerResponse()?.videoDetails?.isLiveContent===!1?R.badge.element.classList.add("ytp-timely-shelf-present"):R.badge.element.classList.remove("ytp-timely-shelf-present")}; AM=function(R){R.U0=[];R.nB();R.B.P1("featured_product")}; yR=function(R){R.wB?.stop();R.xY.hide();R.S.hide();bn(R)}; bn=function(R){if(R.trendingOfferEntityKey){var w=g.bX.getState().entities;(w=HX(w,"trendingOfferEntity",R.trendingOfferEntityKey))?w.encodedSkuId!==R.L?.bannerData?.itemData?.encodedOfferSkuId?VR(R):(R.G.update({trendingOffer:`${w.shortLabel} \u2022 ${w.countLabel}`}),R.G.show(),R.banner.update({vendor:ox(R)})):VR(R)}else VR(R)}; wF6=function(R){const w=R.L?.bannerData?.itemData;return w?.priceReplacementText||R.B.Y("web_player_enable_featured_product_banner_promotion_text_on_desktop")||!w?.dealsData?.sales?.originalPrice?null:w?.dealsData?.sales?.originalPrice}; pFY=function(R){const w=R.L?.bannerData?.itemData;return w?.priceReplacementText||R.B.Y("web_player_enable_featured_product_banner_promotion_text_on_desktop")||w?.dealsData?.sales?.originalPrice||!w?.dealsData?.priceDrop?.referencePrice?null:w?.dealsData?.priceDrop?.referencePrice}; rvW=function(R){const w=R.L?.bannerData?.itemData;return R.B.Y("web_player_enable_featured_product_banner_promotion_text_on_desktop")&&!w?.priceReplacementText&&w?.promotionText?w?.promotionText.content:null}; fub=function(R){const w=R.L?.bannerData?.itemData;return w?.priceReplacementText?w?.priceReplacementText:w?.promotionText&&R.B.Y("web_player_enable_featured_product_banner_promotion_text_on_desktop")?`${w?.price} ${w?.promotionText?.content}`:w?.dealsData?.sales?.originalPrice?w?.dealsData?.sales?.salesPriceAccessibilityLabel:w?.dealsData?.priceDrop?.referencePrice?`${w?.price} ${w?.dealsData?.priceDrop?.referencePrice}`:w?.price}; ox=function(R){return R.B.Y("web_player_enable_featured_product_banner_promotion_text_on_desktop")?R.G.K_?null:R.L?.bannerData?.itemData?.vendorName:R.G.K_||R.S.K_||R.L?.bannerData?.itemData?.affiliateDisclaimer?null:R.L?.bannerData?.itemData?.vendorName}; GKd=function(R){const w=(Number(R.L?.bannerData?.itemData?.hiddenProductOptions?.dropTimestampMs)-Date.now())/1E3;R.countdownTimer.setContent(Y3({seconds:w}));w>0&&R.Mr?.start()}; Iul=function(R){R=R.L?.bannerData?.itemData;return!R?.affiliateDisclaimer&&R?.exclusivesData?.exclusiveOfferLabelText&&R?.exclusivesData?.expirationTimestampMs&&R?.exclusivesData?.exclusiveOfferCountdownText?!0:!1}; Cbd=function(R){var w=(Number(R.L?.bannerData?.itemData?.exclusivesData?.expirationTimestampMs)-Date.now())/1E3;if(w>0){if(w<604800){var p=R.L?.bannerData?.itemData?.exclusivesData?.exclusiveOfferCountdownText;if(p!==void 0){var r=Date.now();for(const f of p){if(f===void 0||f.text===void 0)continue;p=Number(f.textDisplayStartTimestampMs);if(!isNaN(p)&&r>=p){f.insertCountdown?(w=f.text.replace(/\$0/,String(Y3({seconds:w}))),R.xY.setContent(w)):R.xY.setContent(f.text);R.xY.show();break}}}}R.S.update({exclusive:R.L?.bannerData?.itemData?.exclusivesData?.exclusiveOfferLabelText}); R.S.show();VR(R);R.wB?.start()}else yR(R)}; VR=function(R){R.G.hide();R.banner.update({vendor:ox(R)})}; uwP=function(R){if(R!==void 0&&R.trim()!==""&&(R=Math.trunc(Number(R.trim())),!(isNaN(R)||R<0)))return R}; sZH=function(R,w){AM(R);if(w){var p=g.bX.getState().entities;p=HX(p,"featuredProductsEntity",w);if(p?.productsData){w=[];for(const r of p.productsData)if(r?.identifier&&r.featuredSegments){R.U0.push(r);for(const f of r?.featuredSegments){p=uwP(f.startTimeSec);if(p===void 0)continue;const G=uwP(f.endTimeSec);w.push(new g.Ja(p*1E3,G===void 0?0x7ffffffffffff:G*1E3,{id:r.identifier,namespace:"featured_product"}))}}R.B.C3(w)}}}; mdI=function(R){switch(R){case "OPEN_IN_NEW":return sf();case "NOT_INTERESTED":return{j:"svg",A:{fill:"#fff",height:"24",viewBox:"0 0 24 24",width:"24"},N:[{j:"path",A:{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 I$();default:return sf()}}; tM=function(R,w){if(!w.sF||!R.B.PM()){var p=w.X3||1E4,r=!!w.YY?.title?.content||!!w.YY?.bodyText?.content;R.L?w.videoId&&w.videoId!==R.videoId&&(R.L.bv(),R.videoId=w.videoId,r?(zKr(R,p,w),R.R9()):(R.Qh(),R.L.dispose(),R.L=null)):r&&(w.videoId&&(R.videoId=w.videoId),zKr(R,p,w),R.R9())}}; Bid=function(R,w){R.L&&(w.L(8)?(R.C=!0,R.R9(),R.L.start()):(w.L(2)||w.L(64))&&R.videoId&&(R.videoId=null))}; zKr=function(R,w,p){R.L&&R.L.dispose();R.L=new g.vZ(R.U,w,R);g.K(R,R.L);R.B.setTrackingParams(R.element,p.YY?.trackingParams||null);p?.YY?.title?.content?(w=p.YY?.title?.content,p.YY?.bodyText?.content&&(w+=" \u2022 ")):w="";R.update({text:w+(p.YY?.bodyText?.content||""),chevron:g.rQ()})}; Oo=function(R){let w=null;try{w=R.toLocaleString("en",{style:"percent"})}catch(p){w=R.toLocaleString(void 0,{style:"percent"})}return w}; KE=function(R,w){let p=0;for(const r of R){if(r.startTime>w)break;p++}return p===0?p:p-1}; WOP=function(R,w){let p=0;for(const r of R){if(w=r.timeRangeStartMillis&&w2**31-1?"0":String(R)}; cB=function(R,w){R.actionButtons.includes(w)||(R.actionButtons.push(w),R.updateValue("buttons",R.actionButtons))}; yvd=function(R){var w=document.querySelectorAll(`[data-tooltip-target-id="${R.tooltipRenderer.targetId}"]`);w=w.length>0?w[0]:null;const p=g.Up("ytp-ad-module");R.O=!!g.Up("ytp-chrome-bottom")?.contains(w);R.D=!!p?.contains(w);R.U=!!w?.hasAttribute("data-tooltip-target-fixed");return w}; PB=function(R){var w;if(!(w=!R.L)){w=R.L;var p=window.getComputedStyle(w);w=p.display==="none"||p.visibility==="hidden"||w.getAttribute("aria-hidden")==="true"}if(w||R.B.isMinimized())R.Rg(!1);else if(w=g.RL(R.L),w.width&&w.height){R.B.CZ(R.element,R.L);var r=R.B.L_().getPlayerSize().height;p=g.RL(R.KB("ytp-promotooltip-container")).height;R.O?R.element.style.top=`${r-p-w.height-12}px`:R.U||(r=R.B.gy().height-p-w.height-12,R.element.style.top=`${r}px`);r=R.KB("ytp-promotooltip-pointer");const f=g.UW(R.L, R.B.getRootNode()),G=Number(R.element.style.left.replace(/[^\d\.]/g,""));R=R.B.isFullscreen()?18:12;r.style.left=`${f.x-G+w.width/2-R}px`;r.style.top=`${p}px`}else R.Rg(!1)}; ax=function(R){R.Rg(!1);R.C&&R.B.logVisibility(R.element,R.K_)}; Vl_=function(R){const w=g.F(R.dismissButton,ky)?.text?.runs?.length&&!!g.F(R.dismissButton,ky).text.runs[0].text;return g.F(R.acceptButton,ky)?.text?.runs?.length&&!!g.F(R.acceptButton,ky).text.runs[0].text||w}; tlL=function(R,w=1,p=!0){R.O=R.G.animate([{offset:0,opacity:w},{offset:1,opacity:0}],{duration:200,fill:"forwards",easing:"cubic-bezier(0.20, 0.00, 0.60, 1.00)"});p&&(R.O.addEventListener("finish",()=>{R.O=void 0;ond(R);R.hide()}),R.L="fading-out")}; OGH=function(R,w){R.O=R.G.animate([{offset:0,easing:"cubic-bezier(0.20, 0.00, 0.60, 1.00)",opacity:w},{offset:1,opacity:1}],{duration:200,fill:"forwards"});R.O.addEventListener("finish",()=>{R.O=void 0;R.J.start();R.L="lingering"})}; KO6=function(R,w,p=!1,r=!1){var f=[];f.push({offset:0,transform:`translateX(${R.C===-1?20:-20}px)`,opacity:p?"0":"1"});p&&f.push({offset:.5,opacity:"1"});f.push({offset:1,transform:"translateX(0)",opacity:"1"});p=w.animate(f,{duration:400,easing:"cubic-bezier(0.05, 0.00, 0.00, 1.00)"});w=w.querySelector("path");f=[];const G={offset:0,d:R.C===-1?'path("M 18 4 L 18 16 L 18 28")':'path("M 4 4 L 4 16 L 4 28")'};r&&(G.filter="drop-shadow(0 0 0.5px rgba(0, 0, 0, 0.8))");f.push(G);r&&f.push({offset:.8,filter:"drop-shadow(0 0 0.5px rgba(0, 0, 0, 0.8))"}); R={offset:1,d:R.C===-1?'path("M 18 4 L 6 16 L 18 28")':'path("M 4 4 L 16 16 L 4 28")'};r&&(R.filter="drop-shadow(0 0 0.5px rgba(0, 0, 0, 0))");f.push(R);w.animate(f,{duration:333,easing:"cubic-bezier(0.05, 0.00, 0.00, 1.00)",fill:"forwards"});return p}; Enb=function(R){const w=R.G.querySelector(".ytp-seek-overlay-arrow-persistent").cloneNode(!0);w.classList.add("ytp-seek-overlay-arrow-additional");w.classList.remove("ytp-seek-overlay-arrow-persistent");R.G.appendChild(w);KO6(R,w,!0,!0).addEventListener("finish",()=>{w.remove()})}; eKP=function(R){const w=R.getVideoData();var p=R.XI(),r=p.zk(),f=R.V();const G=R.w7();var I=G.P2*8/1024,C=G.yr/1024,u=G.Yw;const m=G.fH;var z=G.HU,B=p.getCurrentTime().toFixed(2),W=Fs(p.po(),",",3);var x="";if(w.isDaiEnabled()){w.enableServerStitchedDai&&(x+=w.N1?"DS":"SS");x=w.L$()?x+"LIFA, ":x+"DAI, ";var q=G.fF;q&&(x+=q)}pg(w)&&!w.L$()&&(x+="LIFAE, ");Qk(w)&&(x+="SABR, ");if(w.fetchType){switch(w.fetchType){case "onesie":q="o";break;case "gp":q="gp";break;default:q="gvi"}x+=`vd:${q}, `}(q=f.q0)&& (x=q.L?x+"wa, ":x+"w, ");x+=`s:${z} t:${B} b:${W} `;p.isSeeking()&&(x+="S");p.isPaused()&&(x+="P");p.isEnded()&&(x+="E");R.isOrchestrationLeader()&&(x+=" L");(p=G.ix)&&(x+=` l:${p.toFixed()}`);p=G.currentTime;z=w.pU;p&&p>z.start&&p>=5;e+=X}W=`${e.substr(0,4)} ${e.substr(4,4)} ${e.substr(8,4)} ${e.substr(12,4)} ${e.substr(16,4)}`}else W="";I={video_id_and_cpn:String(w.videoId)+" / "+W,codecs:"",dims_and_frames:"",bandwidth_kbps:`${I.toFixed(0)} Kbps`,buffer_health_seconds:`${u.toFixed(2)} s`, date:`${(new Date).toString()}`,drm_style:m?"":"display:none",drm:m,debug_info:x,extra_debug_info:"",bandwidth_style:B,network_activity_style:B,network_activity_bytes:`${C.toFixed(0)} KB`,shader_info:z,shader_info_style:z?"":"display:none",playback_categories:""};C=`${r.clientWidth}x${r.clientHeight}`+(p>1?`*${p.toFixed(2)}`:"");u="-";G.totalVideoFrames&&(u=`${G.droppedVideoFrames||0} dropped of ${G.totalVideoFrames}`);I.dims_and_frames=`${C} / ${u}`;R=R.getVolume();C=yCW(w);R=`${Math.round(R)}% / ${w.G?.audio.C? "VB":w.G?.audio.L?"DRC":`${Math.round(R*C)}%`}`;C=w.fZ.toFixed(1);isFinite(Number(C))&&(R+=` (content loudness ${C}dB)`);I.volume=R;I.resolution=`${r.videoWidth}x${r.videoHeight}`;if(r=w.C){if(R=r.video)C=R.fps,C>1&&(I.resolution+=`@${C}`),(C=G.Ut)&&C.video&&(I.resolution+=` / ${C.video.width}x${C.video.height}`,C.video.fps>1&&(I.resolution+=`@${C.video.fps}`)),I.codecs=Rud(r),!w.G||r.audio&&r.video?r.rQ&&(I.codecs+=` / ${r.rQ}A`):I.codecs+=` / ${Rud(w.G)}`,R.L||R.primaries?(C=R.L||"unknown",C=== "smpte2084"?C=`${C} (PQ)`:C==="arib-std-b67"&&(C=`${C} (HLG)`),I.color=`${C} / ${R.primaries||"unknown"}`,I.color_style=""):I.color_style="display:none";if(r.debugInfo){I.fmt_debug_info="";for(var P of r.debugInfo)I.fmt_debug_info+=`${P.label}:${P.text} `}I.fmt_debug_info_style=I.fmt_debug_info&&I.fmt_debug_info.length>0?"":"display:none"}P=w.isLivePlayback;r=w.yv;I.live_mode_style=P||r?"":"display:none";I.live_latency_style=P?"":"display:none";if(r)I.live_mode="Post-Live"+(na(w)?" Manifestless": "");else if(P){r=G.D_;I.live_latency_secs=`${r.toFixed(2)}s`;P=na(w)?"Manifestless, ":"";w.vF&&(P+="Windowed, ");R="Uncertain";if(r>=0&&r<120)if(w.latencyClass&&w.latencyClass!=="UNKNOWN")switch(w.latencyClass){case "NORMAL":R="Optimized for Normal Latency";break;case "LOW":R="Optimized for Low Latency";break;case "ULTRALOW":R="Optimized for Ultra Low Latency";break;default:R="Unknown Latency Setting"}else R=w.isLowLatencyLiveStream?"Optimized for Low Latency":"Optimized for Smooth Streaming";P+= R;(r=G.Nb)&&(P+=`, seq ${r.sequence}`);I.live_mode=P}f.experiments.Tk().L.vS(Ddd)?G.isGapless&&!G.Uu&&(I.playback_categories=G.qJ?I.playback_categories+"Gapless ":I.playback_categories+"Queued "):!G.isGapless||Dr(w)&&G.Uu||(I.playback_categories+="Gapless ");I.playback_categories_style=I.playback_categories?"":"display:none";I.bandwidth_samples=G.fC;I.network_activity_samples=G.jA;I.live_latency_samples=G.uy;I.buffer_health_samples=G.BJ;f=w.cB();if(w.cotn||f)I.cotn_and_local_media=`${w.cotn?w.cotn: "null"} / ${f}`;I.cotn_and_local_media_style=I.cotn_and_local_media?"":"display:none";FE(w,"web_player_release_debug")?(I.release_name=l[82],I.release_style=""):I.release_style="display:none";I.debug_info&&O.length>0&&I.debug_info.length+O.length<=60?I.debug_info+=" "+O:I.extra_debug_info=O;I.extra_debug_info_style=I.extra_debug_info&&I.extra_debug_info.length>0?"":"display:none";return I}; ond=function(R){R.K=0;R.L="hidden";R.C=void 0;R.G=void 0;R.J.stop();R.O=void 0}; MlW=function(R){const w=Number(getComputedStyle(R.G).opacity);R.O?.cancel();R.O=void 0;return w}; cvW=function(R,w,p){R.updateValue("text",w);if(p){a:{switch(p){case "PREMIUM_STANDALONE":w=l9x();break a;case "PREMIUM_STANDALONE_CAIRO":w=LK_();break a}w=void 0}R.updateValue("icon",w)}for(const r of R.X.getAnimations())r.cancel();R.X.animate([{offset:0,opacity:0},{offset:.3,opacity:1},{offset:.7,opacity:1},{offset:1,opacity:0}],{duration:1400}).addEventListener("finish",()=>{R.updateValue("text","");R.updateValue("icon","")})}; Pb_=function(R,w){w.name!=="InvalidStateError"&&w.name!=="AbortError"&&(w.name==="NotAllowedError"?(R.L.ZC(),Zw(R.C,R.element,!1)):g.LF(w))}; $H=function(R){var w=R.api.V();const p=R.api.getVideoData(),r=g.zI(w)&&g.Dw(R.api)&&R.api.getPlayerStateObject().L(128);w=w.O||w.disableSharing&&R.api.getPresentingPlayerType()!==2||!p.showShareButton||p.PF||r||p.h$||!1;R=R.api.L_().getPlayerSize().width;return!!p.videoId&&R>=240&&!w}; nnL=function(R,w){au_(R);const p=w.links||w.shareTargets;let r=0;for(let C=0;C{var W=u.url;if(g.$t(B)){var x={};x.target=x.target||"YouTube";x.width=x.width||"600";x.height=x.height||"600";{var q=x;q||(q={});x=window;var O=W instanceof Pw?W:g.Zp(typeof W.href!="undefined"?W.href:String(W));var e=self.crossOriginIsolated!==void 0,P="strict-origin-when-cross-origin"; window.Request&&(P=(new Request("/")).referrerPolicy);var c=q.noreferrer;if(e&&c&&P==="unsafe-url")throw Error("Cannot use the noreferrer option on a page that sets a referrer-policy of `unsafe-url` in modern browsers!");P=c&&!e;W=q.target||W.target;c=[];let Z=[],Gr=!1;for(var X in q){const Il=q[X];switch(X){case "width":case "height":case "top":case "left":c.push(X+"="+Il);break;case "target":break;case "noopener":case "noreferrer":Il?Z.push(X):(Gr=!0,Z.push(X+"=false"));break;case "attributionsrc":c.push(X+ (Il?"="+Il:""));break;default:c.push(X+"="+(Il?1:0))}}X=W!==void 0&&!["_blank","_self","_top","_parent",""].includes(W);X=yq()&&X;$db&&e&&c.length===0&&Z.length>0&&!X&&!Gr?(Z.length===2&&(Z=["noreferrer"]),g.g2(x,O,W,Z[0]),x=hu()):(e=c.join(","),VP()&&x.navigator&&x.navigator.standalone&&W&&W!="_self"?(e=g.sW("A"),g.J$(e,O),e.target=W,P&&(e.rel="noreferrer"),((q=q.attributionsrc)||q==="")&&e.setAttribute("attributionsrc",q),q=document.createEvent("MouseEvent"),q.initMouseEvent("click",!0,!0,x,1), e.dispatchEvent(q),x=hu()):P?(x=g.g2(x,"",W,e),q=g.$k(O),x&&(x.opener=null,q===""&&(q="javascript:''"),q='',q=Qq(q),(O=x.document)&&O.write&&(O.write(h$(q)),O.close()))):((x=g.g2(x,O,W,e))&&q.noopener&&(x.opener=null),x&&q.noreferrer&&(x.opener=null)))}x&&(x.opener||(x.opener=window),x.focus());B.preventDefault()}}); z.addOnDisposeCallback(g.V9(R.tooltip,z.element));m==="Facebook"?R.api.createClientVe(z.element,z,164504):m==="Twitter"&&R.api.createClientVe(z.element,z,164505);R.W(z.element,"click",()=>{R.api.logClick(z.element)}); R.api.logVisibility(z.element,!0);R.C.push(z);r++}const G=w.more||w.moreLink,I=new g.k({j:"a",E0:["ytp-share-panel-service-button","ytp-button"],N:[{j:"span",Z:"ytp-share-panel-service-button-more",N:[{j:"svg",A:{height:"100%",version:"1.1",viewBox:"0 0 38 38",width:"100%"},N:[{j:"rect",A:{fill:"#fff",height:"34",width:"34",x:"2",y:"2"}},{j:"path",A:{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"}}]}]}],A:{href:G,target:"_blank",title:"More"}});I.listen("click",C=>{var u=G;R.api.logClick(R.moreButton.element);u=XFd(R,u);g.gH(u,R.api,C)&&g.m1(R.api,"SHARE_CLICKED")}); I.addOnDisposeCallback(g.V9(R.tooltip,I.element));R.api.createClientVe(I.element,I,164506);R.W(I.element,"click",()=>{R.api.logClick(I.element)}); R.api.logVisibility(I.element,!0);R.C.push(I);R.moreButton=I;R.updateValue("buttons",R.C)}; au_=function(R){for(const w of R.C)w.detach(),g.p5(w);R.C=[]}; XFd=function(R,w){const p={};g.zI(R.api.V())&&(g.W7(R.api,"addEmbedsConversionTrackingParams",[p]),w=g.bu(w,p));return w}; Xz=function(R){return R===void 0||R.startSec===void 0||R.endSec===void 0?!1:!0}; nE=function(R,w){R.startSec+=w;R.endSec+=w}; dI=function(R){R.B.P1("shopping_overlay_visible");R.B.P1("shopping_overlay_preview_collapsed");R.B.P1("shopping_overlay_preview_expanded");R.B.P1("shopping_overlay_expanded")}; ddd=function(R,w){R.isContentForward=w;g.M(R.badge.element,"ytp-suggested-action-badge-content-forward",w)}; Zx=function(R){const w=R.isContentForward&&!R.SI();g.M(R.badge.element,"ytp-suggested-action-badge-preview-collapsed",w&&R.L);g.M(R.badge.element,"ytp-suggested-action-badge-preview-expanded",w&&R.G)}; ZG6=function(R){R.S&&R.jI.element.removeChild(R.S.element);R.S=void 0}; FOd=function(R,w){return w.map(p=>{if((p=g.F(p,Yrd)?.thumbnail?.thumbnails)&&p.length!==0)return p[0].url}).filter(p=>p!==void 0).map(p=>{p=new g.k({j:"img", Z:"ytp-suggested-action-product-thumbnail",A:{alt:"",src:p}});g.K(R,p);return p})}; YH=function(R,w,p){return new g.Ja(R*1E3,w*1E3,{priority:9,namespace:p})}; jZD=function(R){R.W(R.B,g.bp("shopping_overlay_visible"),()=>{R.gb(!0)}); R.W(R.B,g.yl("shopping_overlay_visible"),()=>{R.gb(!1)}); R.W(R.B,g.bp("shopping_overlay_expanded"),()=>{R.Jl=!0;vd(R)}); R.W(R.B,g.yl("shopping_overlay_expanded"),()=>{R.Jl=!1;vd(R)}); R.W(R.B,g.bp("shopping_overlay_preview_collapsed"),()=>{R.L=!0;Zx(R)}); R.W(R.B,g.yl("shopping_overlay_preview_collapsed"),()=>{R.L=!1;Zx(R)}); R.W(R.B,g.bp("shopping_overlay_preview_expanded"),()=>{R.G=!0;Zx(R)}); R.W(R.B,g.yl("shopping_overlay_preview_expanded"),()=>{R.G=!1;Zx(R)})}; Jv6=function(R){var w=R.api.V(),p=R.api.getVideoData();p=g.Pa(w)+p.PS;if(!g.zI(w))return p;w={};g.W7(R.api,"addEmbedsConversionTrackingParams",[w]);return g.bu(p,w)}; Tib=function(R){if(!R.api.V().f_){var w=R.api.getVideoData(),p=new g.xH("Subscribe",null,"Subscribed",null,!0,!1,w.wy,w.subscribed,"channel_avatar",null,R.api,!0);R.api.createServerVe(p.element,R);R.api.setTrackingParams(p.element,w.subscribeButtonRenderer?.trackingParams||null);R.W(p.element,"click",()=>{R.api.logClick(p.element)}); R.subscribeButton=p;g.K(R,R.subscribeButton);R.subscribeButton.gN(R.element)}}; iGD=function(R,w,p="",r=""){w?(R.C!==p&&(R.L.style.backgroundImage=`url(${p})`,R.C=p),R.updateValue("channelLogoLabel",g.K2("Photo image of $CHANNEL_NAME",{CHANNEL_NAME:r})),g.pc(R.api.getRootNode(),"ytp-title-enable-channel-logo")):g.fc(R.api.getRootNode(),"ytp-title-enable-channel-logo");R.api.logVisibility(R.L,w&&R.pB);R.api.logVisibility(R.channelName,w&&R.pB)}; QZW=function(R,w){if(R.L){w=Math.floor(w*.4);w=Math.max(w,47);var p=w+2;if(R.O!==p){R.O=p;R.C.height=p;R.L.clearRect(0,0,1,p);var r=R.L.createLinearGradient(0,2,0,2+w),f=w-42;r.addColorStop(0,"rgba(0, 0, 0, 0)");r.addColorStop(f/w,"rgba(0, 0, 0, 0.3)");r.addColorStop(1,"rgba(0, 0, 0, 0.68)");R.L.fillStyle=r;R.L.fillRect(0,2,1,w);R.element.style.height=`${p}px`;try{R.element.style.backgroundImage=`url(${R.C.toDataURL()})`}catch(G){}}}}; hKd=function(R,w){w!==R.J&&(R.update({chapterTitle:w,ariaLabel:w}),R.J=w);w?R.show():R.hide()}; gn6=function(R){R.L.disabled=R.C==null;g.M(R.L,"ytp-chapter-container-disabled",R.L.disabled);R.Q2()}; HGd=function(R,w,p,r,f){const G=w.Z1/w.rows;let I=Math.min(p/(w.W$/w.columns),r/G),C=w.W$*I,u=w.Z1*I;C=Math.floor(C/w.columns)*w.columns;u=Math.floor(u/w.rows)*w.rows;let m=C/w.columns,z=u/w.rows;const B=-w.column*m,W=-w.row*z;f&&G<=45&&(z-=1/I);m-=2/I;R=R.style;R.width=`${m}px`;R.height=`${z}px`;f||(r=(r-z)/2,p=(p-m)/2,R.marginTop=Math.floor(r)+"px",R.marginBottom=Math.ceil(r)+"px",R.marginLeft=Math.floor(p)+"px",R.marginRight=Math.ceil(p)+"px");R.background=`url(${w.url}) ${B}px ${W}px/${C}px ${u}px`}; Fz=function(R,w){const p=!!R.L;R.L=w;R.L?(p||(R.events.W(R.api,"videodatachange",()=>{Fz(R,R.api.kG())}),R.events.W(R.api,"progresssync",R.onProgress),R.events.W(R.api,"appresize",R.G)),R.frameIndex=NaN,jn(R),R.fade.show(200)):(p&&R.events.C(),R.fade.hide(),R.fade.stop())}; jn=function(R){var w=R.L;const p=R.api.getCurrentTime(),r=R.api.L_().getPlayerSize();var f=Gq(w,r.width);f=L7Y(w,f,p);R.update({timestamp:g.a$(p)});f!==R.frameIndex&&(R.frameIndex=f,lTD(w,f,r.width),w=BJd(w,f,r.width),HGd(R.C,w,r.width,r.height))}; vnP=function(R,w){return R.B.Y("delhi_modern_web_player_icons")?w?{j:"svg",A:{height:"24",viewBox:"0 0 24 24",width:"24"},N:[{j:"path",A:{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",A:{height:"24",viewBox:"0 0 24 24",width:"24"},N:[{j:"path",A:{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"}}]}:w?{j:"svg",A:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},N:[{j:"g",Z:"ytp-fullscreen-button-corner-2",N:[{j:"path",FI:!0,Z:"ytp-svg-fill",A:{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",N:[{j:"path",FI:!0,Z:"ytp-svg-fill",A:{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",N:[{j:"path",FI:!0,Z:"ytp-svg-fill",A:{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", N:[{j:"path",FI:!0,Z:"ytp-svg-fill",A:{d:"m 10,22 4,0 0,4 2,0 0,-6 -6,0 0,2 0,0 z"}}]}]}:{j:"svg",A:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},N:[{j:"g",Z:"ytp-fullscreen-button-corner-0",N:[{j:"path",FI:!0,Z:"ytp-svg-fill",A:{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",N:[{j:"path",FI:!0,Z:"ytp-svg-fill",A:{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",N:[{j:"path",FI:!0,Z:"ytp-svg-fill", A:{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",N:[{j:"path",FI:!0,Z:"ytp-svg-fill",A:{d:"M 12,20 10,20 10,26 l 6,0 0,-2 -4,0 0,-4 0,0 z"}}]}]}}; Nid=function(R,w){w?R.element.classList.add("ytp-jump-button-enabled"):R.element.classList.remove("ytp-jump-button-enabled");R.B.logVisibility(R.element,w);R.B.wl()}; kKH=function(R){var w=R.B.getVideoData()?.Jl;if(w){R=R.G.U0;for(const p of w)if((w=R[p])&&w.onTap?.innertubeCommand?.changeEngagementPanelVisibilityAction?.targetId!=="engagement-panel-macro-markers-problem-walkthroughs")return w}}; Udl=function(R){return R.B.Y("delhi_modern_web_player_icons")?ud6():mj()}; Srd=function(R,w){R.C.style.setProperty("--yt-slider-shape-gradient-percent",`${(w-R.O)/(R.J-R.O)*100}%`)}; JM=function(R,w,p=!1){R.G&&(cancelAnimationFrame(R.G),R.G=0);p?RG_(R,R.L,w):wdL(R,w)}; RG_=function(R,w,p){const r=performance.now(),f=p-w;if(f!==0){var G=I=>{I=(I-r)/400;I>1&&(I=1);wdL(R,w+f*o4(pdI,tu(pdI,I)));R.G=I<1?requestAnimationFrame(G):0}; R.G=requestAnimationFrame(G)}}; wdL=function(R,w){R.L=w;R.update({slidervalue:R.L,ariaValueNow:R.L,ariaValueText:`${R.L.toFixed(2)}`});R.C.valueAsNumber=R.L;Srd(R,w)}; rdd=function(R,w){R.element.classList.toggle("ytp-volume-popover-hovering",w);R.isVisible=w;(R=R.element.closest(".ytp-chrome-bottom"))&&R.classList.toggle("ytp-volume-popover-showing",w)}; f$d=function(R){var w=null;const p="Your browser doesn't support changing the volume. $BEGIN_LINKLearn More$END_LINK".split(/\$(BEGIN|END)_LINK/);w=new TN(R.B,{j:"span",E0:["ytp-popup","ytp-generic-popup"],A:{tabindex:"0"},N:[p[0],{j:"a",A:{href:"https://support.google.com/youtube/?p=noaudio",target:R.B.V().X},fB:p[2]},p[4]]},100,!0);g.K(R,w);w.hide();w.subscribe("show",r=>{R.B.KH(w,r)}); g.P7(R.B,w.element,4)}; CRY=function(R,w){R.U=w;let p=R.PS;R.B.Y("delhi_modern_web_player_icons")?R.C.KB("ytp-svg-volume-animation-big-ripple").setAttribute("transform",`translate(${QR}, ${hM}) scale(${w}) translate(-${QR},-${hM})`):w&&(p+=G6b(Gd6,I$I,w));R.S.setAttribute("d",p)}; mfd=function(R,w){let p;w===1?p=R.B.Y("delhi_modern_web_player_icons")?{j:"svg",A:{height:"24",viewBox:"0 0 24 24",width:"24"},N:[{j:"path",A:{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"}}]}:LQ():p=R.C;R.Jl=w;if(R.B.Y("delhi_modern_web_player_icons"))R.C.KB("ytp-svg-volume-animation-small-ripple").setAttribute("transform",`translate(${uIW}, ${sY_}) scale(${1-w}) translate(-${uIW},-${sY_})`),R.C.KB("ytp-svg-volume-animation-big-ripple").setAttribute("transform",`translate(${QR}, ${hM}) scale(${R.U-w}) translate(-${QR}, -${hM})`);else{var r=20*w;for(var f=0;f=3&&R.B.getPresentingPlayerType()!==2}; Bod=function(R){const w=Em(R.B.tf());return w?R.L?w.hasNext():w.hasPrevious():!1}; l$_=function(R,w){return R?w?s7d():uE():w?{j:"svg",A:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},N:[{j:"path",A:{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"}}]}:q$b()}; vB=function(R,w){const p=g.a$(w),r=g.K2("Seek to $PROGRESS",{PROGRESS:g.a$(w,!0)});R.update({ariamin:0,ariamax:Math.floor(R.api.getDuration()),arianow:Math.floor(w),arianowtext:r,seekTime:p})}; N8=function(R){R.X=NaN;R.U=0;R.D=R.O}; kH=function(R,w){R.S&&(R.S.Tu=!0);R.update({seekTime:g.a$(w)});const p=R.J*R.scale;w=w-p?-w/p*R.interval*.5:-(w+p/2)/p*R.interval}; L46=function(R){return-((R.K.offsetWidth||(R.frameCount-1)*R.J*R.scale)-R.L/2)}; ydr=function(R){var w=R.api.kG();if(w){var p=90*R.scale,r=Gq(w,160*R.scale);if(w=w.levels[r]){R.J=w.width;if(!R.G.length){r=[];var f=Iu(w,w.C()),G=w.columns*w.rows,I=w.frameCount;for(var C=0;C<=f;C++){var u=I R.G.length;)R.thumbnails.pop()?.dispose();for(;R.thumbnails.lengthp.length;)R.C.pop()?.dispose();for(;R.C.length0&&(R.C=w,R.D.style.height=`${R.C}px`)}; o_W=function(R,w,p,r,f=!1){VXb(R,r);p=l8d(w,p,R.C,r,f);w=w.length===0?"":WRH(p);R.api.Y("delhi_modern_web_player")?R.O.setAttribute("d",w):R.K.setAttribute("d",w);R.n$=w!=="";g.M(R.api.getRootNode(),"ytp-heat-map",R.n$);g.M(R.api.getRootNode(),"ytp-heat-map-played_bar",R.api.Y("web_player_heat_map_played_bar")&&w!=="");R.api.Y("delhi_modern_web_player")?(R.G.style.display="none",R.L.style.display="none"):R.O.style.display="none"}; tX_=function(R,w,p,r,f=!1){VXb(R,r);p=LRb(w,p,R.C,r,f);w=w.length===0?"":WRH(p);R.api.Y("delhi_modern_web_player")?R.O.setAttribute("d",w):R.K.setAttribute("d",w);R.n$=w!=="";g.M(R.api.getRootNode(),"ytp-heat-map",R.n$);R.api.Y("delhi_modern_web_player")?(R.G.style.display="none",R.L.style.display="none"):R.O.style.display="none"}; Uo=function(R,w){g.Z2(R.L,"width",w)}; Sn=function(R,w){g.Z2(R.L,"margin-right",`${w}px`)}; K4Y=function(R){if(R.L.length===0){const w=new ODH;R.L.push(w);g.K(R,w);w.gN(R.q0,0)}for(;R.L.length>1;)R.L.pop().dispose();Uo(R.L[0],"100%");R.L[0].startTime=0;R.L[0].title=""}; Rc=function(R){const w=g.t5(R.api.V())&&(R.api.Y("web_shorts_pip")||R.api.Y("web_watch_pip"));return!R.api.getVideoData()?.isLivePlayback&&!R.api.isMinimized()&&!R.api.isInline()&&(!R.api.W0()||!w)}; Dfd=function(R){const w=new E__(R.api);R.G.push(w);g.K(R,w);w.gN(R.xY)}; wr=function(R){for(;R.U.length;)R.U.pop().dispose()}; MXd=function(R){return g.F(g.F(R.getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.decoratedPlayerBarRenderer,NU)?.playerBar,eGH)?.chapters}; PRr=function(R,w){let p=0,r=!1;for(const I of w){if(g.F(I,cdH)){w=g.F(I,cdH);var f={startTime:NaN,title:null,onActiveCommand:void 0},G=w.title;f.title=G?g.Su(G):"";G=w.timeRangeStartMillis;G!=null&&(f.startTime=G);f.onActiveCommand=w.onActiveCommand;w=f;p===0&&w.startTime!==0&&(R.L[p].startTime=0,R.L[p].title="",R.L[p].onActiveCommand=w.onActiveCommand,p++,r=!0);R.L.length<=p&&(f=new ODH,R.L.push(f),g.K(R,f),f.gN(R.q0,R.q0.children.length));R.L[p].startTime=w.startTime;R.L[p].title=w.title?w.title: "";R.L[p].onActiveCommand=w.onActiveCommand;R.L[p].index=r?p-1:p}p++}for(;p=m&&W<=z&&B.push(C)}f>0&&(R.xY.style.height=`${f}px`);o_W(R.G[u],B,p,f,u===0);B.length>0&&(I=B[B.length-1])}g.py(R); w=w.heatMarkersDecorations||[];C=[];for(const u of w)if(w=g.F(u,ZDP))r=w.label,C.push({visibleTimeRangeStartMillis:w.visibleTimeRangeStartMillis??-1,visibleTimeRangeEndMillis:w.visibleTimeRangeEndMillis??-1,decorationTimeMillis:w.decorationTimeMillis??NaN,label:r?g.Su(r):""});R.heatMarkersDecorations=C}}; g.py=function(R){R.jI=R.L.length-1;R.mq=0;YJr(R,!0)&&YJr(R,!1);var w=0;for(var p=0;p=0;r--)if(R.L[r].width>0){Sn(R.L[r],0);const f=Math.floor(R.L[r].width);R.L[r].width=f;Uo(R.L[r],`${f}px`);break}R.L[p].width=0;Uo(R.L[p],"0")}else p===R.L.length-1?(r=Math.floor(R.L[p].width+w),R.L[p].width=r,Uo(R.L[p],`${r}px`)):(w=R.L[p].width+w,r=Math.round(w),w-=r,R.L[p].width=r,Uo(R.L[p],`${r}px`));p=0;if(R.G.length===R.L.length)for(w= 0;w0&&R.api.getPlayerSize().width<=r;R.api.Y("delhi_modern_web_player")?w=R.api.getPlayerSize().width<=528?r?56:64:R.J?r?72:96:r?56:72:R.J?w=54:g.zI(p)&&!p.C&&(w=40);R.O0=w}}}; fy=function(R,w){for(const p of w){w=s6(R,p.timeRangeStartMillis/(R.O.L*1E3),mZ(R));const r=R.api.Y("delhi_modern_web_player")?.667:.6;g.Z2(p.element,"transform",`translateX(${w}px) scaleX(${r})`)}}; ToY=function(R,w){w=g.F(w.getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.decoratedPlayerBarRenderer,NU);if(w?.progressColor)for(let p=0;pf.startTime&&f.width>0&&r++;r=r<0?0:r;f=p.L-Ic(R)*R.jI;return w*f+Ic(R)*r+p.G}; mZ=function(R){let w=R.eI.x;w=g.MN(w,0,R.D);R.zv.update(w,R.D);return R.zv}; YJr=function(R,w){let p=0,r=!1;const f=R.L.length;let G=R.O.L*1E3;G===0&&(G=R.api.getProgressState().seekableEnd*1E3);if(G>0&&R.D>0){const u=R.D-Ic(R)*R.jI,m=R.mq===0?3:u*R.mq;for(var I of R.L)I.width=0;for(;p1);const B=(G===0?0:z/G*u)+R.L[p].width;if(B>m)R.L[p].width=B;else{R.L[p].width=0;I=R;var C=p;const W=I.L[C-1];W!==void 0&&W.width>0?W.width+= B:CR.mq&&(R.mq=z/G),r=!0)}p++}}return r}; Ic=function(R){return R.api.Y("delhi_modern_web_player")?4:R.J?3:2}; Cy=function(R,w,p){return zo(R)?new By(Math.max(w,R.sQ.startTimeMs/1E3),Math.min(p,R.sQ.endTimeMs/1E3)):new By(w,p)}; uW=function(R,w,p){R.S=w;R.SI=p;const r=mZ(R);var f=R.O.L,G=R4x(R.O,R.S),I=g.K2("$PLAY_PROGRESS of $DURATION",{PLAY_PROGRESS:g.a$(G,!0),DURATION:g.a$(f,!0)}),C=KE(R.L,G*1E3);C=R.L[C].title;R.update({ariamin:Math.floor(R.O.C),ariamax:Math.floor(f),arianow:Math.floor(G),arianowtext:C?C+" "+I:I});f=R.clipStart;G=R.clipEnd;R.sQ&&R.api.getPresentingPlayerType()!==2&&(f=R.sQ.startTimeMs/1E3,G=R.sQ.endTimeMs/1E3);f=nQ(R.O,f,0);C=nQ(R.O,G,1);I=R.api.getVideoData();G=g.MN(w,f,C);p=I?.cB()?1:g.MN(p,f,C);w= s6(R,w,r);g.Z2(R.FL,"transform",`translateX(${w}px)`);R.api.Y("delhi_modern_web_player")&&R.api.Y("delhi_modern_web_player_cutout")&&Wy(R,w);xu(R,r,f,G,"PLAY_PROGRESS");I?.I0()?(w=R.api.getProgressState().seekableEnd)&&xu(R,r,G,nQ(R.O,w),"LIVE_BUFFER"):xu(R,r,f,p,"LOAD_PROGRESS");R.api.Y("web_player_heat_map_played_bar")&&R.G[0]?.X(G)}; F4r=function(R){R.Hw.style.removeProperty("height");for(const w of Object.keys(R.nB))iDd(R,w);lW(R);uW(R,R.S,R.SI)}; jYL=function(R){if(!R.api.getVideoData()?.I0()){var w=mZ(R);xu(R,w,R.S,Math.max(w.C,R.S),"HOVER_PROGRESS");var p=Ly(R,w.L*R.S,!0),r=Ly(R,w.O,!0);for(let f=p;f<=r;f++)g.M(R.L[f].O,"ytp-hover-progress-light",w.C>R.S);g.M(R.Hw,"ytp-scrubber-button-hover",p===r&&R.L.length>1);R.api.Y("web_player_heat_map_played_bar")&&R.G[0]?.U(w.C)}}; zo=function(R){return!!R.sQ?.postId&&R.api.getPresentingPlayerType()!==2}; qa=function(R,w,p,r,f){w=QYP(R,w);p=QYP(R,p);R=R.progressBar.visualElement;r={seekData:{startMediaTimeMs:w,endMediaTimeMs:p,seekSource:r}};(w=g.ut())&&hO(w,R,f,r)}; bW=function(R,w){w?R.X||(R.element.removeAttribute("aria-disabled"),R.X=new g.Aq(R.progressBar,!0),R.api.Y("enable_smart_skip_player_controls_shown_on_web_increased_triggering_sensitivity")&&R.X.subscribe("hoverstart",R.Sk,R),R.X.subscribe("hovermove",R.L2,R),R.X.subscribe("hoverend",R.wm,R),R.X.subscribe("dragstart",R.mj,R),R.X.subscribe("dragmove",R.Tw,R),R.X.subscribe("dragend",R.C2,R),R.api&&R.api.Y("delhi_modern_web_player")&&R.api.Y("delhi_modern_web_player_cutout")&&(R.B1=new g.Aq(R.progressBar, !0),R.B1.subscribe("hoverstart",()=>{R.wg=!0;Wy(R)},R),R.B1.subscribe("hoverend",()=>{R.wg=!1; Wy(R)},R)),R.gS=R.listen("keydown",R.R3)):R.X&&(R.element.setAttribute("aria-disabled","true"),R.o9(R.gS),R.X.cancel(),R.X.dispose(),R.X=null)}; yT=function(R){R.C&&(R.C.disable(),R.Qk=0,R.xY.style.removeProperty("transform"),R.progressBar.style.removeProperty("transform"),R.N0.style.removeProperty("height"),R.element.parentElement&&R.element.parentElement.style.removeProperty("height"))}; hGI=function(R,w){if(R.sQ?.type==="repeatChapter"||w?.type==="repeatChapter")w&&(w=R.L[KE(R.L,w.startTimeMs)],g.M(w.L,"ytp-repeating-chapter",!1)),R.sQ&&(w=R.L[KE(R.L,R.sQ.startTimeMs)],g.M(w.L,"ytp-repeating-chapter",!0)),R.L.forEach(p=>{g.M(p.L,"ytp-exp-chapter-hover-container",!R.sQ)})}; lW=function(R){var w=!!R.sQ&&R.api.getPresentingPlayerType()!==2;let p=R.clipStart;var r=R.clipEnd;let f=!0,G=!0;w&&R.sQ?(p=R.sQ.startTimeMs/1E3,r=R.sQ.endTimeMs/1E3):(f=p>R.O.C,G=R.O.L>0&&r1){p=Ly(R,w.O,!0);let r=0;for(let f=0;f0&&(r+=R.L[f].width,r+=Ic(R));p=(R.L[p].startTime+(w.O-r)/R.L[p].width*((p===R.L.length-1?R.O.L*1E3:R.L[p+1].startTime)-R.L[p].startTime))/1E3||0}return p}; Ly=function(R,w,p=!1){let r=0;p&&(w-=g_W(R,w)*Ic(R));for(const f of R.L){if(w>f.width)w-=f.width;else break;r++}return r===R.L.length?r-1:r}; HDW=function(R,w){const p=w/((R.J?135:90)-R.O0)*R.O0;g.Z2(R.progressBar,"transform",`translateY(${-w}px)`);g.Z2(R.xY,"transform",`translateY(${-w}px)`);g.Z2(R.N0,"transform",`translateY(${p}px)`);R.N0.style.height=`${w+p}px`;R.element.parentElement&&(R.element.parentElement.style.height=`${R.O0-p}px`)}; QYP=function(R,w){if(w<0)return"0";R=Math.floor(Math.min(w,R.api.getDuration())*1E3);return R>2**31-1?"0":String(R)}; v_L=function(R,w,p){if(p>=R.L.length)return!1;const r=R.D-Ic(R)*R.jI;return Math.abs(w-R.L[p].startTime/1E3)/R.O.L*r<4}; iDd=function(R,w){var p=R.nB[w];w=R.yh[w];const r=mZ(R);let f=nQ(R.O,p.start/1E3,0),G;const I=POd(p,R.J)/r.width;G=nQ(R.O,p.end/1E3,1);I!==Number.POSITIVE_INFINITY&&(f=g.MN(f,0,G-I));G=Math.min(G,f+I);p.color&&(w.style.background=p.color);p=f;w.style.left=`${Math.max(p*r.L+r.G,0)}px`;oc(R,w,g.MN((G-p)*r.L+r.G,0,r.width),r.width,!0)}; Wy=function(R,w){R.api.getPresentingPlayerType()!==1?R.q0.style.removeProperty("clip-path"):(w||(w=s6(R,R.S,mZ(R))),R.q0.style.clipPath='path("'+(R.wg?Nol(R,8,w,R.J?50:36,0,6):Nol(R,4,w,R.J?34:24,2,3))+'")')}; xu=function(R,w,p,r,f){var G=R.L.length,I=w.L-R.jI*Ic(R),C=p*I;p=Ly(R,C);var u=r*I;I=Ly(R,u);f==="HOVER_PROGRESS"&&(I=Ly(R,w.L*r,!0),u=w.L*r-g_W(R,w.L*r)*Ic(R));r=Math.max(C-kd_(R,p),0);for(C=p;Cf.width)w-=f.width,w-=Ic(R),r++;else break;return r===p?p-1:r}; kd_=function(R,w){if(w>=R.L.length)return R.D;let p=0,r=0;for(;r0||R.Ml.clientWidth>0?(G=w.clientWidth/p,R=-1*R.a9.clientWidth/p):(G/=p,R=-1*R.L[f].element.offsetLeft/p),g.Z2(w,"background-size",`${G}px`),g.Z2(w,"background-position-x",`${R}px`))}; SJ6=function(R,w,p){p=R.L[w].zk(p);oc(R,p,0,R.L[w].width)}; g.RrY=function(R,w,p,r){const f=R.D!==p,G=R.J!==r;R.hM=w;R.D=p;R.J=r;Rc(R)&&R.C?.N0(r);F4r(R);R.L.length===1&&(R.L[0].width=p||0);f&&g.py(R);R.C&&G&&Rc(R)&&(R.C.isEnabled&&(w=R.J?135:90,p=w-R.O0,R.N0.style.height=`${w}px`,g.Z2(R.xY,"transform",`translateY(${-p}px)`),g.Z2(R.progressBar,"transform",`translateY(${-p}px)`)),ydr(R.C))}; wtr=function(R,w){const p=w.getId();R.nB[p]===w&&(g.x7(R.yh[p]),delete R.nB[p],delete R.yh[p])}; tq=function(R,w){R.C=!!w;R.L(R.B.L_().getPlayerSize())}; ptb=function(R,w,p,r){w={j:"span",E0:r,N:[w]};let f;r="ytp-swatch-color";if(R.S||R.K)r="ytp-swatch-color-white";p==="highres"?f="8K":p==="hd2880"?f="5K":p==="hd2160"?f="4K":p.indexOf("hd")===0&&p!=="hd720"&&(f="HD");f&&(w.N.push(" "),w.N.push({j:"sup",Z:r,fB:f}));return w}; rmP=function(R,w,p){const r=R.YY[w],f=g.tC[w];return ptb(R,r?r.qualityLabel:f?`${f}p`:"Auto",w,p)}; O6=function(R,w,p,r,f){const G=(w=R.K?R.J[w]:R.O0[w])&&w.quality;var I=w&&w.qualityLabel;I=I?I:"Auto";r&&(I=`(${I}`);R=ptb(R,I,G||"",f);r&&R.N.push(")");(r=(r=w&&w.paygatedQualityDetails)&&r.paygatedIndicatorText)&&p&&R.N.push({j:"div",Z:"ytp-premium-label",fB:r});return R}; Ky=function(R,w){R=Number(g.MN(w,R.O,R.G).toFixed(2));w=Math.floor((R+.001)*100%5+2E-15);let p=R;w!==0&&(p=R-w*.01);return Number(p.toFixed(2))}; fqI=function(R,w){const p=E6(w);R.K&&(R.xY||w===R.O0)?(R.C(R.K),R.setContent(w.toString())):R.C(p)}; IqD=function(R){var w=R.S.map(E6);R.J&&w.push(R.J);R.G(w);R.K=null;R.O0=null;w=R.B.getPlaybackRate();DV(R.B)&&Gxd(R,w);!R.S.includes(w)||R.xY?R.C(R.K):R.C(E6(w))}; Gxd=function(R,w){R.O0=w;R.K=g.K2("Custom ($CURRENT_CUSTOM_SPEED)",{CURRENT_CUSTOM_SPEED:w.toString()});w=R.S.map(E6);w.unshift(R.K);R.J&&w.push(R.J);R.G(w)}; CNH=function(R,w,p,r){p=new g.wv({j:"div",E0:["ytp-menuitem"],A:{tabindex:"0",role:"menuitemradio","aria-checked":r?"true":"false"},N:[{j:"div",E0:["ytp-menuitem-label"],N:[{j:"div",E0:["ytp-menuitem-container-with-badge"],N:[{j:"div",fB:"{{label}}"},R.I0]}]}]},p,R.O(w));p.listen("click",()=>{R.Jl(w)}); return p}; E6=function(R){return R.toString()}; DV=function(R){return R.Y("web_settings_menu_surface_custom_playback")}; uAd=function(R,w){return!!w&&R.getAvailablePlaybackRates()[R.getAvailablePlaybackRates().length-1]<=2}; eL=function(R){return R.Y("web_settings_menu_surface_custom_playback")&&R.Y("web_settings_use_input_slider")}; skI=function(R,w){R.publish("settingChange",R.setting+"Override",!w);R.OQ.ID()}; mZr=function(R,w){R.languages=g.Ei(w,R.K,R);R.G(g.gd(w,R.K))}; zrW=function(R,w){R.B.setOption("captions","sampleSubtitles",w)}; Ma=function(R){return Object.values(R.tracks).find(w=>w.languageCode==="en"&&w.kind==="asr")}; cy=function(R,w){R.B.setOption("captions","track",w)}; Bvd=function(R,w){R.settingsButton=w;R.element.id=w.element.getAttribute("aria-controls")}; Wgb=function(R){if(R.B.Y("delhi_modern_web_player_icons"))return R=H7.includes("en")?Py(R)&&R.isEnabled()?{j:"svg",A:{height:"24",viewBox:"0 0 24 24",width:"24"},N:[{j:"path",A:{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"}}]}:Gi():Py(R)&&R.isEnabled()?{j:"svg",A:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},N:[{j:"path",A:{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"}}]}:V1_()}; Py=function(R){return g.FA(R.B.tf())!=null?g.FA(R.B.tf()).fP()?!!R.B.getOption("captions","tracklist",{includeAsr:!0}).length:!0:!1}; xZD=function(R,w){const p=R.liveBadge.element,r=R.api.isLifaAdPlaying();p.disabled=r||w;!ac(R)||R.U===w&&R.D===R.liveIndicatorText&&R.J===R.isPremiere||(R.U=w,R.D=R.liveIndicatorText,R.J=R.isPremiere,R.Q2(),w?p.classList.add("ytp-live-badge-is-livehead"):p.classList.remove("ytp-live-badge-is-livehead"),R.liveIndicatorText?R.liveBadge.setContent(R.liveIndicatorText):R.liveBadge.setContent(R.isPremiere?"Premiere":"Live"),w?R.L&&(R.L(),R.L=null,p.removeAttribute("data-tooltip-title")):(p.setAttribute("data-tooltip-title", "Skip ahead to live broadcast."),R.L=g.V9(R.tooltip,R.liveBadge.element)))}; lqd=function(R,w){const p=R.sQ!==w;R.sQ=w;p&&$u(R)}; Xl=function(R){return!!R.sQ&&!!R.sQ.postId&&R.api.getPresentingPlayerType()!==2&&(!R.sQ.type||R.sQ.type==="clips")}; var B8x=function(R,w){return Lj_[l[5]](this,1,1926,R,w)}; ac=function(R){const w=R.api.V().Y("enable_linear_program_progress"),p=R.api.getPresentingPlayerType()===2;return R.r0&&!Xl(R)&&(!w||!R.C)&&!p}; $u=function(R){R.updateValue("clipicon",{j:"svg",A:{height:"100%",version:"1.1",viewBox:"0 0 24 24",width:"100%"},N:[{j:"path",A:{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"}}]}); R.r0&&!R.C?R.updateValue("watchfullvideo","Watch live stream"):R.updateValue("watchfullvideo","Watch full video");g.M(R.element,"ytp-clip",Xl(R));g.M(R.element,"ytp-live",ac(R))}; LgI=function(R,w){R.Rg(w.width>=350)}; ny=function(R,w,p){var r=Math.floor(w),f=`${r}% volume`+(p?" muted":"");p=p?0:w/100;R.updateValue("valuenow",r);R.updateValue("valuetext",f);r=R.O?78:52;f=!R.api.Y("delhi_modern_web_player")&&R.O?18:12;R.Jl.style.left=`${(r-f)*p}px`;R.volume=w}; qSI=function(R){const w=R.api.r_();R.O!==w&&(R.O=w,ny(R,R.api.getVolume(),R.api.isMuted()))}; dr=function(R,w,p,r,f){const G=R.L||R.isDragging||R.C||R.YI;R.L=w;R.isDragging=p;R.C=r;R.YI=f;w=R.L||R.isDragging||R.C||R.YI;G!==w&&(w?R.K=R.W(R.element,"wheel",R.O0):(R.o9(R.K),R.K=null),g.M(R.J,"ytp-volume-slider-active",w))}; ZV=function(R,w,p,r,f){w.gN(p,f);R.B.Y("frosted_glass_controls_opacity_animation")&&(R=w.element,r&&(R=w.KB(r)),R.classList.add("ytp-autohide-fade-transition"))}; Fl=function(R,w,p){R.B.Y("delhi_modern_web_player")?w.gN(R.G.KB(Yu[p])):w.gN(R.G.element)}; Amd=function(R){R.L.element.classList.toggle("ytp-xsmall-width-right-controls-expanded",R.U.isExpanded())}; b8r=function(R,w){R.B.getPlayerStateObject().isCued()||w?w&&(R.I0.hide(),R.M0.hide(),R.muteButton&&R.muteButton.GK(!1),R.J&&R.J.GK(!1),R.K&&R.K.GK(!1),R.B.h4(R.zk())):w||(R.I0.show(),R.M0.show(),R.muteButton&&R.muteButton.GK(!0),R.J&&R.J.GK(!0),R.K&&R.K.GK(!0),R.R_())}; jL=function(R){if(R.B.Y("web_player_rtr_ctrls")&&R.B.L_().Z0)return 0;const w=R.B.r_(),p=R.B.getVideoData().h$;let r=0;R.B.r_()&&R.B.isEmbedsShortsMode()&&(r=(R.B.L_().getPlayerSize().width-R.B.getVideoContentRect().width)/2);return 12*(p?0:w?2:1)+r}; ymx=function(R){const w=R.B.L_().getPlayerSize().width;return Math.max(w-jL(R)*2,100)}; Jq=function(R){var w=R.B.r_()?72:50;const p=R.B.V();g.t5(p)&&(p.Y("delhi_modern_web_player")?(w=g.Iq(p.experiments,"delhi_modern_web_player_responsive_compact_controls_threshold"),w=R.B.Y("delhi_modern_web_player_compact_controls")||w>0&&R.B.getPlayerSize().width<=w,w=R.B.r_()?p.Y("delhi_modern_web_player_big_mode_consistent_pill_height")?100:112:w?70:78,R.B.getRootNode().classList.contains("ytp-fullscreen-grid-peeking")&&(R=getComputedStyle(R.B.getRootNode()).getPropertyValue("--ytp-grid-peek-height")|| "36px",w+=Number(R.replace("px","")))):w=62,g.sg(p)&&(w=54));return w}; V2H=function(R,w){const p=R.suggestedActions[w];R.text=w;p?.icon&&(R.Nl=p.icon,KlY(R,!0));O7L(R);R.onClickCommand=p?.tapCommand}; oed=function(R){R.suggestedActions={};R.B.P1("suggested_action_button_visible");R.L=null;R.B.setTrackingParams(R.badge.element,null);R.O=!1;R.G=!1;KlY(R,!1);R.J.updateValue("icon","");g.M(R.J.element,"ytp-suggested-action-badge-icon-custom-icon",!1)}; t2W=function(R){R.updateValue("channelLink","");R.updateValue("channelName","");g.sg(R.api.V())||R.api.Y("enable_channel_title_always_focusable")?R.updateValue("channelTitleFocusable","0"):R.updateValue("channelTitleFocusable","-1")}; g.V9=function(R,w){if(R.I0)return()=>{}; w.addEventListener("mouseover",R.J);w.addEventListener("focus",R.J);const p=R.env.Y("player_tooltip_data_title_killswitch")?w.getAttribute("title"):w.getAttribute("data-tooltip-title");p&&!w.hasAttribute("aria-label")&&w.setAttribute("aria-label",p);return()=>{R.L===w&&R.K();w.removeEventListener("mouseover",R.J);w.removeEventListener("focus",R.J)}}; To=function(R){let w;if(R.L){w=R.L.getAttribute("data-tooltip-text");if(R.O&&R.L.getAttribute("aria-label")!==R.O)var p=R.O;var r=R.L.getAttribute("aria-keyshortcuts"),f=R.L.getAttribute("data-title-no-tooltip");r&&f&&(p=g.K2("$BUTTON_TITLE keyboard shortcut $SHORTCUT_KEY",{BUTTON_TITLE:f,SHORTCUT_KEY:r}));p&&R.L.setAttribute("aria-label",p);if(w&&!R.U){O8P(R,!0);var G=R.L;R.updateValue("text",w);p=G.getAttribute("data-duration");R.update({title:R.O,duration:p});G=G.getAttribute("data-preview");R.env.Y("delhi_modern_web_player")? (R.updateValue("title",f),R.updateValue("keyBoardShortcutTitle",r.toUpperCase())):O8P(R,!1);r=243*R.scale;f=141*R.scale;R.bg.style.width=`${r}px`;R.bg.style.height=`${f}px`;R.bg.style.backgroundImage=G?`url(${G})`:"";R.bg.style.backgroundSize=`${r}px ${f}px`;R.wrapper.style.width=`${r}px`;g.rF(R.element,["ytp-text-detail","ytp-preview"]);g.M(R.element,"ytp-has-duration",!!p)}else f&&r&&R.env.Y("delhi_modern_web_player")?(R.updateValue("text",f),R.updateValue("keyBoardShortcut",r.toUpperCase())):R.updateValue("text", R.O),g.GX(R.element,["ytp-text-detail","ytp-preview","ytp-has-duration"]);p=R.L;p.hasAttribute("data-tooltip-offset-y")?(p=Number(p.getAttribute("data-tooltip-offset-y")),p=isNaN(p)?0:p):p=0;KgH(R,!!w,void 0,p)}}; O8P=function(R,w){R.env.Y("delhi_modern_web_player")&&R.scale!==.6&&(R.scale=w?.8:1)}; EeY=function(R,w){g.M(R.element,"ytp-preview",w>=0);if(!(w<0||w===R.G)){R.G=w;w=243*R.scale;var p=141*R.scale,r=BJd(R.C,R.G,w);HGd(R.bg,r,w,p,!0);R.xY.start()}}; KgH=function(R,w,p,r){const f=Math.min(R.T6,300*R.scale);R.element.style.maxWidth=w?"":`${f}px`;R.PS.CZ(R.element,R.L,p,R.type===1,r);R.element.style.top?g.pc(R.element,"ytp-bottom"):R.element.style.bottom&&g.pc(R.element,"ytp-top");R.type===3&&R.O0.start()}; DZl=function(R,w,p,r){if(w&&!w.hasAttribute)R=new g.Id("showElementTooltip called with non-element.",w.toString()),g.LF(R);else{isNaN(R.G)||(R.G=NaN,R.bg.style.background="");g.fc(R.element,"ytp-tooltip-progress-bar-style");R.L=w;R.U=!!r;r?R.O=r:(R.env.Y("player_tooltip_data_title_killswitch")?R.O=w.getAttribute("title"):R.O=w.getAttribute("data-tooltip-title"),R.env.Y("player_tooltip_data_title_killswitch")?w.removeAttribute("title"):w.removeAttribute("data-tooltip-title"));g.R4(R.element,"ytp-tooltip"); R.api.Y("frosted_glass_controls_opacity_animation")&&g.pc(R.element,"ytp-frosted-glass-fade-transition");var f=w.getAttribute("data-tooltip-image");f&&(R.image.style.backgroundImage=`url(${f})`);r?R.update({ariaHidden:"false"}):R.update({ariaHidden:"true"});g.M(R.element,"ytp-tooltip-image-enabled",!!f);w=w.getAttribute("data-tooltip-opaque");g.M(R.element,"ytp-tooltip-opaque",!!w);R.type=p;R.api.addEventListener("appresize",R.S);R.D&&(To(R),R.fade.show(0))}}; erL=function(R){const w=R.L;R.type===3&&R.O0.stop();R.api.removeEventListener("appresize",R.S);R.U||(R.env.Y("player_tooltip_data_title_killswitch")?w.setAttribute("title",R.O):w.setAttribute("data-tooltip-title",R.O));R.O="";R.L=null;R.update({keyBoardShortcut:"",keyBoardShortcutTitle:""});R.wrapper.style.width=""}; M2d=function(R){if(!R.isRequestPending){R.isRequestPending=!0;R.WS(3);var w=R.B.getVideoData();w=R.L?w.removeFromWatchLaterCommand:w.addToWatchLaterCommand;const p=R.B.QC(),r=R.L?()=>{R.L=!1;R.isRequestPending=!1;R.WS(2);R.B.V().U&&g.m1(R.B,"WATCH_LATER_VIDEO_REMOVED")}:()=>{R.L=!0; R.isRequestPending=!1;R.WS(1);R.B.V().C&&R.B.IR(R.element);R.B.V().U&&g.m1(R.B,"WATCH_LATER_VIDEO_ADDED")}; aw(p,w).then(r,()=>{R.isRequestPending=!1;R.WS(4,"An error occurred. Please try again later.");R.B.V().U&&g.m1(R.B,"WATCH_LATER_ERROR","An error occurred. Please try again later.")})}}; cmr=function(R){const w=R.B.getPlayerSize(),p=R.B.V(),r=R.B.getVideoData(),f=g.zI(p)&&g.Dw(R.B)&&R.B.getPlayerStateObject().L(128),G=p.O;return p.ez&&w.width>=240&&!r.isAd()&&r.ez&&!f&&!r.h$&&!R.B.isEmbedsShortsMode()&&!G}; PN_=function(R,w){if(w!==R.icon){let p;switch(w){case 3:p=v7();break;case 1:p=wQ();break;case 2:p={j:"svg",A:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},N:[{j:"path",FI:!0,Z:"ytp-svg-fill",A:{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:p={j:"svg",A:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},N:[{j:"path", FI:!0,A:{d:"M7,27.5h22L18,8.5L7,27.5z M19,24.5h-2v-2h2V24.5z M19,20.5h-2V16.5h2V20.5z",fill:"#fff"}}]}}R.updateValue("icon",p);R.icon=w}}; aqb=function(R,w){BB(g.qU(R.B.V()),"wl_button",()=>{xbD({videoId:w});window.location.reload()})}; $ZP=function(R){const w=R.api.V(),p=R.api.getPlayerStateObject().L(128);return w.G&&p&&!R.api.isFullscreen()}; iW=function(R){if(R.dl()&&!R.api.isEmbedsShortsMode()&&R.B0){var w=R.api.Y("web_player_hide_overflow_button_if_empty_menu");!R.ef||w&&!cmr(R.ef)||cB(R.B0,R.ef);!R.shareButton||w&&!$H(R.shareButton)||cB(R.B0,R.shareButton);!R.copyLinkButton||w&&!Usd(R.copyLinkButton)||cB(R.B0,R.copyLinkButton)}else{const p=R.api.V().getWebPlayerContextConfig();if(R.B0){w=R.B0;for(const r of w.actionButtons)r.detach();w.actionButtons=[]}R.searchButton&&!g.lA(R.jW.element,R.searchButton.element)&&R.searchButton.gN(R.jW.element); !R.ef||p?.hideTopWatchNextButton||g.lA(R.jW.element,R.ef.element)||R.ef.gN(R.jW.element);!R.shareButton||p?.hideTopShareButton||g.lA(R.jW.element,R.shareButton.element)||R.shareButton.gN(R.jW.element);R.copyLinkButton&&!g.lA(R.jW.element,R.copyLinkButton.element)&&R.copyLinkButton.gN(R.jW.element)}}; QT=function(R,w,p){w=p?w.lastElementChild:w.firstElementChild;let r=null;for(;w;){if(TM(w,"display")!=="none"&&w.getAttribute("aria-hidden")!=="true"){let f;w.tabIndex>=0?f=w:f=QT(R,w,p);f&&(r?p?f.tabIndex>r.tabIndex&&(r=f):f.tabIndex{for(let R=gr.length;R<4;R++){const w=g.sW("VIDEO");w.load();gr.push(new g.Hy(w))}},{capture:!0, passive:!0}),dZL=!0)}; vy=function(R,w,p,r){var f=p.getVideoData();const G=w.getVideoData();if(p.getPlayerState().isError())return{msg:"player-error"};var I=G.O;if(w.Lh()>r/1E3+1)return{msg:"in-the-past"};if(G.isLivePlayback&&!isFinite(r))return{msg:"live-infinite"};r=w.XI();var C=null;r&&(C=r.isView()?r.mediaElement.K():r.K());if(C&&C.length>12&&g.Tq(f))return{msg:"played-ranges"};if(!f.O)return null;if(!I)return{msg:"no-pvd-formats"};if(!f.O.L()||!I.L())return{msg:"non-dash"};r=I.videoInfos[0];C=f.O.videoInfos[0];R.pB&& Dr(G)&&(r=w.Bi(),C=p.Bi());if(!r||!C)return{msg:"no-video-info"};if(R.J&&(r.L()||C.L()))return{msg:"av1"};w=R.G&&G.uB()&&H1();if(C.containerType!==r.containerType)if(w)G.Ty("sgap",{ierr:"container"});else return{msg:"container"};if(R.K&&!w&&(C.wN!==r.wN||C.wN===""||r.wN===""))return{msg:"codec"};if(R.D&&C.video&&r.video&&Math.abs(C.video.width/C.video.height-r.video.width/r.video.height)>.01)return{msg:"ratio"};if(g.Tq(G)&&g.Tq(f))return{msg:"content-protection"};I=I.C[0];f=f.O.C[0];p=I.audio;const u= f.audio;if(p.sampleRate!==u.sampleRate&&!g.Io)if(w)G.Ty("sgap",{ierr:"srate"});else return{msg:"sample-rate",ci:I.itag,cr:p.sampleRate,ni:f.itag,nr:u.sampleRate};return(p.numChannels||2)!==(u.numChannels||2)?{msg:"channel-count"}:R.U&&G.uB()&&r.video.fps!==C.video.fps?{msg:"fps"}:null}; YSr=function(R,w,p){const r=R.getVideoData(),f=w.getVideoData();if(!r.V().supportsGaplessShorts())return{nq:"env"};if((!p.X||r.Ho&&!r.isAd()||f.Ho&&!f.isAd())&&(!p.C||r.Ho&&!r.isAd()||f.Ho)&&(!p.O||f.Ho&&!f.isAd()||r.Ho)&&(r.Ho||f.Ho))return{nq:"autoplay"};if(r.endSeconds>0)return{nq:"endcr"};if(!r.D)return{nq:"client"};if(!R.Uu())return{nq:"no-empty"};R=vy(p,R,w,Infinity);return R!=null?{nq:R.msg}:null}; jkW=function(R){const w=new Fgr;w.G=R.Y("h5_gapless_support_types_diff");w.U=!1;w.pB=R.Y("html5_gapless_use_format_info_fix");w.J=R.Y("html5_gapless_disable_on_av1")&&!R.Y("html5_gapless_enable_on_av1");w.K=R.Y("html5_gapless_check_codec_diff_strictly");w.X=R.Y("html5_gapless_on_ad_autoplay");w.D=R.Y("html5_gapless_disable_diff_aspect_radio");w.C=R.Y("html5_gapless_ad_autoplay_on_ad_to_video_only")&&!R.Y("html5_disable_loop_range_for_shorts_ads");w.L=R.Y("html5_pseudogapless_shorts_seek_to_next_start"); w.O=R.Y("html5_gapless_ad_autoplay_on_video_to_ad_only");return w}; Na=function(R,w){w<=R.status.status||(R.status={status:w,error:null},w===5&&R.Cg.resolve())}; JmH=function(R,w,p,r){R=R.isView()?R.mediaElement:R;return new g.ku(R,w,p,r)}; TvH=async function(R){if(R.cS())return Promise.reject(Error(R.status.error||"disposed"));R.timeout.start();await R.Cg;var w=R.L.XI();if(w.isEnded())return R.NH("ended_in_finishTransition"),Promise.reject(Error(R.status.error||""));if(!R.K||!NF(R.K))return R.NH("next_mse_closed"),Promise.reject(Error(R.status.error||""));if(R.C.j_()!==R.K)return R.NH("next_mse_mismatch"),Promise.reject(Error(R.status.error||""));const {d2:p,U6:r,Mb:f}=R.U();R.L.gY(!1,!0);const G=JmH(w,p,f,!R.C.getVideoData().isAd()); R.C.setMediaElement(G);const I=R.L.R7();I&&R.C.Hc(I.T0,I.hA);R.I0&&(R.policy.L||R.C.seekTo(R.C.getCurrentTime()+.001,{hK:!0,zr:3,dB:"gapless_pseudo"}),G.play());w=w.TK();w.cpn=R.L.getVideoData().clientPlaybackNonce;w.st=`${p}`;w.et=`${f}`;R.C.Ty("gapless",w);R.L.Ty("gaplessTo",{cpn:R.C.getVideoData().clientPlaybackNonce});w=R.L.getPlayerType()===R.C.getPlayerType();R.L.Fz(r,!0,!1,w,R.C.getVideoData().clientPlaybackNonce);R.C.Fz(R.C.getCurrentTime(),!0,!0,w,R.L.getVideoData().clientPlaybackNonce); R.C.fq();g.TF(()=>{!R.C.getVideoData().U&&R.C.getPlayerState().isOrWillBePlaying()&&R.C.v$()}); Na(R,6);R.dispose();return Promise.resolve()}; Qkr=function(R){if(R.C.getVideoData().O){var w=R.Wy.V().Y("html5_gapless_suspend_next_loader")&&R.J===1;R.C.sL(R.K,w,R.J===1&&Qk(R.L.getVideoData()));Na(R,3);i8_(R);var {TO:p,yu:r}=U6(R);p.subscribe("updateend",R.D,R);r.subscribe("updateend",R.D,R);R.D(p);R.D(r)}}; i8_=function(R){R.L.unsubscribe("internalvideodatachange",R.O,R);R.C.unsubscribe("internalvideodatachange",R.O,R);R.Wy.V().Y("html5_gapless_use_format_info_fix")&&(R.L.unsubscribe("internalvideoformatchange",R.O,R),R.C.unsubscribe("internalvideoformatchange",R.O,R));R.L.unsubscribe("mediasourceattached",R.O,R);R.C.unsubscribe("statechange",R.S,R)}; U6=function(R){return{TO:R.G.L.f$,yu:R.G.C.f$}}; geW=async function(R){if(!R.cS()&&R.G&&R.L){R.pB&&R.app.HS().Rz(!0,!1);var w=null;if(R.O)try{await TvH(R.O)}catch(r){w=r}if(R.L&&(hrb.cQ("vqsp",()=>{R.app.a5(R.L)}),R.L)){var p=R.L.XI(); R.app.V().Y("html5_gapless_seek_on_negative_time")&&p&&p.getCurrentTime()<-.01&&R.L.seekTo(0);hrb.cQ("vqpv",()=>{R.app.playVideo()}); w&&(R.L?(w=w?w.message:"forced",R.C?.Ty("gapfulfbk",{r:w}),R.L.Zy(w)):R.C?.Ty("gapsp",{}));w=R.G;SL(R);w&&w.resolve();Promise.resolve()}}}; R5=function(R){R.X&&R.J&&R.X.removeEventListener("timeupdate",R.J);R.J=null;R.X=null}; SL=function(R,w=!1){if(R.C){if(R.D){var p=R.C;R.app.o0.removeEventListener(g.bp("vqueued"),R.U);p.removeCueRange(R.D)}R.C=null;R.D=null}R.O&&(R.O.status.status!==6&&(p=R.O,p.status.status!==Infinity&&p.J!==1&&p.NH("Canceled")),R.O=null);R.G=null;R.L&&!w&&R.L!==R.app.Gk()&&R.L!==R.app.HS()&&R.L.dispose();R.L&&w&&R.L.qL();R.L=null;R.pB=!1}; H8d=function(R,w,p=!0){const r=R.app.HS(),f=r.getVideoData().isLivePlayback?Infinity:r.Ev(!0)*1E3;w>f&&(w=f-200,R.pB=!0);p&&r.getCurrentTime()>=w/1E3?R.U():(R.C=r,p&&(p=w,w=R.C,R.app.o0.addEventListener(g.bp("vqueued"),R.U),p=isFinite(p)||p/1E3>w.getDuration()?p:0x8000000000000,R.D=new g.Ja(p,0x8000000000000,{namespace:"vqueued"}),w.addCueRange(R.D)))}; NvL=function(R,w,p,r=0,f=0){R.Uu()||(R5(R),SL(R));R.G=new aa;R.L=w;H8d(R,p,f===0);var G=r/=1E3,I=w.getVideoData().L;if(r&&I&&R.C){let C=r,u=0;w.getVideoData().isLivePlayback&&(G=Math.min(p/1E3,R.C.Ev(!0)),u=Math.max(0,G-R.C.getCurrentTime()),C=Math.min(r,w.Ev()+u));G=iVb(I,C)||r;G!==r&&R.L.Ty("qvaln",{st:r,at:G,rm:u,ct:C})}w=G;r=R.L;r.getVideoData().a9=!0;r.getVideoData().D=!0;r.R5(!0);I={};R.C&&(I=R.C.Ja(),G=R.C.getVideoData().clientPlaybackNonce,I={crt:(I*1E3).toFixed(),cpn:G});r.Ty("queued",I); w!==0&&r.seekTo(w+.01,{hK:!0,zr:3,dB:"videoqueuer_queued"});R.O=new vex(R.K,R.app.HS(),R.L,p,R.app,f);p=R.O;p.status.status!==Infinity&&(Na(p,1),p.L.subscribe("internalvideodatachange",p.O,p),p.C.subscribe("internalvideodatachange",p.O,p),p.Wy.V().Y("html5_gapless_use_format_info_fix")&&(p.L.subscribe("internalvideoformatchange",p.O,p),p.C.subscribe("internalvideoformatchange",p.O,p)),p.L.subscribe("mediasourceattached",p.O,p),p.C.subscribe("statechange",p.S,p),p.L.subscribe("newelementrequired", p.O0,p),p.O());return R.G}; SSW=function(R,w){if(R.app.V().Tk().L.vS(kxW)){var p=R.app.V().Tk().L.vS(UZl);if(!(p<=0)){R5(R);var r=R.app.HS()?.XI();r&&R.L&&(R.L.getVideoData().Y_=!0,R.J=()=>{var f=r.getCurrentTime();f>=w+p/1E3&&(f=Date.now()-(f-w)*1E3,R.app.FD().tick("pbs",f),R5(R))},R.X=r,r.addEventListener("timeupdate",R.J))}}}; R6H=function(R,w,p){if(R.Uu())return"qie";if(R.L==null||R.L.cS()||R.L.getVideoData()==null)return"qpd";if(w.videoId!==R.L.Mw())return"vinm";if((R.O?.pB()||-1)<=0)return"ivd";if(p!==1)return"upt";R=R.O?.M0();return R!=null?R:null}; Mfx=function(R){return!(R.isMinimized()||R.isInline()||R.isBackground()||R.W0()||R.Mu()||R.lx()||R.dY())}; pN=function(R){const w=(0,g.T)();R.data.forEach(p=>{p.expire!(p.expirew.value)}; w6=function(R,w,p){p&&R.C&&R.C(w.value)}; wBH=function(R){const w=R.L?[R.L]:[];for(const p of Object.values(R.G))p.dispose(),delete R.K[p.m6()];R.G={};R.L=null;R.D=null;R.U.clear();fN(R,[],w)}; fN=function(R,w,p){const r=[R.C];R.L&&r.push(R.L);R.api.publish("playbackChange",{active:r.filter(f=>f.getPlayerType()!==0).map(f=>({cpn:f.m6()})), started:w.filter(f=>f.getPlayerType()!==0).map(f=>({cpn:f.m6()})), ended:p.filter(f=>f.getPlayerType()!==0).map(f=>({cpn:f.m6()}))})}; GB=function(R,w,p){const r=[w],f=R.L?[R.L]:[];R.G[w.m6()]=w;R.K[w.m6()]=w;R.L=w;p&&(R.D=w);R.U.set("",w);fN(R,r,f)}; fxW=function(R){const w=R.experiments,p=w.XB.bind(w);I5=p("html5_use_async_stopVideo");pBH=p("html5_pause_for_async_stopVideo");CN=p("html5_not_reset_media_source")||p("html5_not_reset_media_source_non_drm_vod");p("html5_listen_for_audio_output_changed")&&(QU6=!0);ki=p("html5_not_reset_media_source")||p("html5_not_reset_media_source_non_drm_vod");rML=p("html5_not_reset_media_source")||p("html5_not_reset_media_source_non_drm_vod");u2=p("html5_retain_source_buffer_appends_for_debugging");NKH(p("web_watch_pip")|| p("web_shorts_pip"));yaD(p("log_foreground_not_focused_as_background"));VeI(p("web_player_pip_logging_fix"));p("html5_mediastream_applies_timestamp_offset")&&(A7=!0);R.dn()&&U9d();Error.stackTraceLimit=50;const r=g.Iq(w,"html5_idle_rate_limit_ms");r&&Object.defineProperty(window,"requestIdleCallback",{value:f=>window.setTimeout(f,r)}); qAd(R.K);hdL(p("html5_use_ump_request_slicer"));p("html5_disable_streaming_xhr")&&(s_=!1);p("html5_byterate_constraints")&&(Ai=!0);p("html5_use_non_active_broadcast_for_post_live")&&(sl=!0);p("html5_enable_encrypted_av1")&&(Xs=!0);un_(g.Iq(R.experiments,"html5_sticky_duration_mos"))}; tnd=function(R){const w={};var p=R.experiments.aL();const r=[];R=(G,I,C)=>{r.push(PQ(I(C),u=>{w[G]=u}))}; var f=p.L.vS(GNW);f&&R("MediaSource.EnableUsingMediaSourceBufferedRange",ay6,f===1);(f=p.L.vS(Ixb))&&R("HTTP3",$9D,f===1);(f=p.L.vS(Cnx))&&R("MediaSource.EnableUsingMediaSourceAttachmentMethods",X2d,f===1);(f=p.L.vS(uzH))&&R("QUIC",nYl,f===1);(f=p.L.vS(sxd))&&R("Media.PlayerConfiguration.DecodeToTexturePreferred",ZLd,f===1);(f=p.L.vS(m8d))&&R("Media.AudioWriteDurationLocal",d9d,Number(f));(f=p.L.vS(z6I))&&R("Media.AppendFirstSegmentSynchronously",T5D,Number(f)===1);(f=p.L.vS(BID))&&R("Media.ExperimentalMaxPendingBytesPerParse", HLI,Number(f));(f=p.L.vS(WDl))&&R("Media.EnableFlushDuringSeek",hDL,Number(f)===1);(f=p.L.vS(x8D))&&R("DecoderBuffer.EnableInPlaceReuseAllocatorBase",gY6,Number(f)===1);(f=p.L.vS(lxD))&&R("Media.EnableResetAudioDecoder",QHW,Number(f)===1);(f=p.L.vS(LD6))&&R("Media.IncrementalParseLookAhead",iLH,Number(f)===1);(f=p.L.vS(qob))&&R("Media.MaxSamplesPerWrite",vYD,Number(f));(f=p.L.vS(AMH))&&R("Media.VideoDecoderInitialPrerollCount",YD6,f);(f=p.L.vS(bEL))&&R("Media.MediaCodecResetDelayMs",N5l,f);(f=p.L.vS(yMd))&& R("Media.VideoRendererMinInputBuffers",F__,f);(f=p.L.vS(Vnx))&&R("Media.VideoRendererMinDecodedFrames",jHY,f);(p=p.L.vS(oH6))&&R("Media.VideoBufferSizeClampMb",JgI,p);return PQ(a5d(r),()=>w)}; rK=function(R,w=!1,p=1048576){let r=mh(R);r=1/((R.D.QB()||0)*R.policy.X+1/r);let f=R.M0.QB();f=f>0?f:1;var G=Math.max(r,f);R.policy.G>0&&f1E3){const r=R.interruptions;r.push(Math.ceil(p));r.sort((f,G)=>G-f); r.length>16&&r.pop()}R.O0+=p}}R.K=w}; BV=function(R,w,p){isNaN(p)||(R.xY+=p);isNaN(w)||(R.YY+=w)}; yW=function(R,w,p,r=w){R.G.wY(r,p/w);R.J=(0,g.T)()}; WV=function(R,w,p){w=Math.max(w,R.C.L);R.D.wY(1,p/w)}; x$=function(R,w,p,r,f,G=!1){R.M0.wY(w,p/w);R.J=(0,g.T)();f||R.X.wY(1,w-r);G||(R.K=0);R.S>-1&&(0,g.T)()-R.S>3E4&&(svb(zB(R)),R.S=(0,g.T)(),R.pB=!0)}; J7=function(R){return(0,g.T)()-R.J>=4E3}; mh=function(R){R=R.G.QB();return R>0?R:1}; KDL=function(R,w,p=!1){w.N3=R.xY;w.xO=R.YY;w.bandwidthEstimate=rK(R);if(p){p=(R.U.QB()*1E3).toFixed();var r=(R.I0.QB()*1E3).toFixed(),f=Gl(R).toFixed(2),G=((R.D.QB()||0)*1E9).toFixed(2),I=R.G.QB().toFixed(0),C=R.M0.QB().toFixed(0),u=R.X.percentile(.5).toFixed(2),m=R.X.percentile(.92).toFixed(2),z=R.X.percentile(.96).toFixed(2),B=R.X.percentile(.98).toFixed(2);R.L?R.L.reset():R.L=new l2;R.L.add(R.O0);R.L.add(R.interruptions.length);let q=0;for(var W=R.interruptions.length-1;W>=0;W--){var x=R.interruptions[W]; R.L.add(x-q);q=x}q=0;for(W=R.O.length-1;W>=0;W--){x=R.O[W];const O=x.stamp/36E5;R.L.add(O-q);q=O;R.L.add(x.net/1E3);R.L.add(x.max)}R=R.L.AF();w.L={ttr:p,ttm:r,d:f,st:G,bw:I,abw:C,v50:u,v92:m,v96:z,v98:B,"int":R}}}; D8b=function(R,w,p){const r=new EHW(p);R&&(r.O=!0,r.K=.1);p.XB("html5_media_time_weight")&&(r.O=!1);w&&(r.L=w/8);r.C=fJ()>=480;return r}; e6x=function(R,w,p=!0){R.L=0;R.startTimeSecs=w;R.O=p;R.C=!0}; MnW=function(R,w,p){R=R.C;var r=g.VU(R,{J2:w},(f,G)=>f.J2-G.J2); r=r<0?(r+2)*-1:r;if(r>=0)for(let f=r;f<=r+1&&f=G.J2-p&&w<=G.lU+p)return G}}; cML=function(R,w,p){const r=R.L.get(w);r?(r.push(p),g.tt(r,(f,G)=>f.J2-G.J2)):R.L.set(w,[p])}; PnL=function(R,w){g.KR(R.C,w,(p,r)=>p.J2===r.J2?p.durationMs-r.durationMs:p.J2-r.J2); R.O.set(w.cpn,w);w.fS&&cML(R,w.fS,w)}; axD=function(R,w){const p=[];for(const r of R.C)w(r)||p.push(r);if(R.LB.Y("html5_sstm_fixes"))for(const r of R.C)w(r)&&R.O.delete(r.cpn);R.C=p}; $8H=function(R,w){w=g.VU(R.C,{lU:w},(p,r)=>p.lU-r.lU); return w>=0?R.C[w]:null}; XBI=function(R,w){const p=R.C.indexOf(w);p>=0&&R.C.splice(p,1);R.O.delete(w.cpn)}; Wvd=function(R,w){if(R.Xj||w.identifier&&R.a9.has(w.identifier))R.l3({startnoad:w.identifier}),LN(R);else if(Nx(R.U,p=>p.identifier===w.identifier))R.l3({timedoutcp:1}),R.J.start(0); else if(Nx(R.jI,p=>p.identifier===w.identifier))R.l3({fetchedcp:1}),LN(R); else if(R.J.isActive())R.l3({racingcp:`${R.K?.identifier}_${w.identifier}`});else{R.ez=(new Date).getTime()/1E3;R.l3({adf:1});let p=5E3;p&&w.event==="predictStart"&&(p-=w.L);R.Qk=Math.max(p,15E3);R.D=!1;R.J.start(R.Qk);R.K=w;R.pB.clearAll();R.nB=[]}}; g.Jyx=function(R,w,p,r,f,G,I){var C=f===3,u=nHH(R,w,p,f,r,I);if(!u)return qc(R,p,C),u=g.A_(R,p)?"undec":"ncp",R.l3({gvprp:u,mt:w,seg:p,tt:f,itag:r,ce:I}),null;C||R.NB.set(p,u);I=u.fS;f=R.SM(p-1,f,G)?.RB||"";f===""&&R.l3({eds:1});G=d8Y(R,u.ssdaiAdsConfig);C=R.playback.getVideoData();C=C.Od[C.C?.containerType||0];u=u.aA&&p>=u.aA?u.aA:void 0;u={Sf:I?b2(R,I):[],adsConfig:G,RB:f,y9:u,uL:ls(C.split(";")[0]),WO:C.split(";")[1]||""};f={AM:u};R.U0&&R.l3({gvprpro:"v",sq:p,mt:w.toFixed(3),itag:r,acpns:u.Sf?.join("_")|| "none",abid:I});return f}; Hj=function(R,w,p,r,f){r=r||{reason:"disablessdai"};if(w&&p){if(!ya(R,w,p))return!1;r.sq=p}if(R.Xj)return!1;R.Xj=!0;R.dM>0&&(R.dM=0,R.G_="",R.eB(R.playback.m6(),0),R.api.publish("serverstitchedvideochange"));R.playback.uh(r,f);return!0}; ZEL=function(R,w,p){const r=R.eI||R.app.HS().getPlayerState();Va(R,!0);R.playback.seekTo(w,p);R=R.app.HS();w=R.getPlayerState();r.isOrWillBePlaying()&&!w.isOrWillBePlaying()?R.playVideo():r.isPaused()&&!w.isPaused()&&R.pauseVideo()}; o5=function(R){R.U0&&R.l3({adf:`0_${(new Date).getTime()/1E3-R.ez}_isTimeout_${R.D}`})}; Yol=function(R,w,p){if(R.U.length)for(const r of R.U){const f=r.startSecs*1E3,G=r.W1*1E3+f;if(w>f&&wf&&pI.identifier===r.identifier)||(R.l3({adskip:w}),R.pL.push(r)),r}}; t_=function(R,w,p){R.playback.NQ(w,p)}; LN=function(R){R.D=!1;R.J.isActive()&&o5(R);R.J.stop();R.AO(!1)}; jxd=function(R,w){return w?R.LB.Tk().L.vS(FDr)&&w?.tileContext?`${w?.fJ};${w?.tileContext}`:w?.fJ:""}; TIW=function(R,w,p){(R.app.UZ().G[w.clientPlaybackNonce]||null)?.dispose();w=new JMb(w,R.playback,p/1E3);R.xY.set(w.m6(),w);R=R.app.UZ();R.G[w.m6()]=w;R.K[w.m6()]=w}; Ol=function(R,w,p){return{ssvc:w,cpn:p?.cpn||"",vid:p?.videoData.videoId||"",ct:(R.playback.getCurrentTime()||0).toFixed(3),cmt:(R.playback.Lh()||0).toFixed(3)}}; iEl=function(R,w,p){return new g.Ja(R,w,{id:p,namespace:"serverstitchedcuerange",priority:9})}; KN=function(R,w,p,r){R.LB.Y("html5_ssdai_log_ssevt_in_loader_timers")&&(r=R.X?0:Math.round((r-p)*1E3),R.playback.Ty("ssevt",{tag:"sstme",ad:w!==R.playback.m6(),cpn:w,st:(p-R.playback.g9()).toFixed(3),late:r}))}; DB=function(R,w){R.O||R.X||El(R,R.G_);const p=w.wG,r=w.eh;if(r.cpn===R.G_)R.l3({igtranssame:1,enter:r.cpn,exit:p.cpn});else{var f=R.X,G=!!R.O;R.O="";var I=w.Xh,C=p.playerType===2?p.J2/1E3+p.videoData.ag:R.CX().videoData.ag;R.api.Y("html5_ssdai_enable_media_end_cue_range")&&(G||f||p.playerType!==2?(f||G)&&R.l3({mecr:0,seek:f,skip:G}):R.api.bT(p.cpn));if(p.playerType===2&&r.playerType===2)G?R.l3({igtransskip:1,enter:r.cpn,exit:p.cpn,seek:f,skip:R.O}):QxP(R,p,r,C,I,f,G);else{R.G_=r.cpn;R.eB(r.cpn,r.startTimeSecs|| I);w=w.O7;if(p.playerType===1&&r.playerType===2){R.O0=0;h6H(R,r);var u=Ol(R,"c2a",r);R.l3(u);R.dM++}else if(p.playerType===2&&r.playerType===1){R.api.publish("serverstitchedvideochange");u=Ol(R,"a2c");R.l3(u);R.dM=0;R.O0=C;u=p.cpn;var m=R.O0;if(u!==R.playback.m6()){const z=R.xY.get(u);z?z.L=m:R.l3({nop_e:u})}R.Lm(p.fS)}u=gHd(R);R.playback.Zp(p,r,C,I,f,G,w,u)}HED(R)}}; h6H=function(R,w){var p=R.app;fg(p.Ib())&&p.Oy.O[2]&&g.hg(R.logger,360717806,"SSTM lingering playback");R.api.gG();R.api.publish("serverstitchedvideochange",w.cpn,w.b8)}; eT=function(R,w,p=0){return{TC:MnW(R.L,w*1E3,p*1E3),v9:w}}; El=function(R,w){var p=w||R.G_;const r=R.L.Ff(p);r?(w=r.videoData,p=r.b8||(R.C.get(p)?.start??0)/1E3,R=R.playback.getCurrentTime()-p,w.ag=R>0?R:0):R.CX().videoData.ag=R.playback.getCurrentTime()}; vHr=function(R,w,p){R.playback.yG();R.playback.seekTo(w,p);R.playback.playVideo()}; Va=function(R,w){R.f_=NaN;R.p_=null;R.SI.stop();R.M0&&w&&R.M0.WJ();R.eI=null;R.M0=null}; cV=function(R){NID(R);for(var w of R.C.values())w.start>=-1&&w.end<=Infinity&&(R.playback.removeCueRange(w),R.C.delete(w.getId()),R.l3({rmAdCR:1}));const {TC:p,v9:r}=eT(R,-.001);p&&(w=r*1E3-p.J2,Mc(R,p,w,p.J2+w),w=R.C.get(p.cpn))&&(w.start=p.J2,w.end=p.J2+p.durationMs);({TC:w}=eT(R,Infinity));w&&R.qP(`Invalid_clearEndTimeMs_${Infinity}_that_falls_during_${`playback_cpn_${w.cpn}_video_id_${w.videoData?.videoId}_durationMs_${w.durationMs}_enterTimeMs_${w.J2}_parentReturnTimeMs_${w.lU}`}._`+"Child_playbacks_can_only_have_duration_updated_not_their_start.")}; kND=function(R){R.pB.clearAll();R.C.clear();R.L.clear();R.NB.clear();R.nB=[];R.K=null;R.a9.clear();R.PS.clear();R.U=[];R.jI=[];R.pL=[];R.WB=[];R.Af.clear();R.Df.clear();R.Ml.clear();R.N0.clear();R.D=!1;R.O0=0;R.X=!1;R.YY=!1;R.dM=0;R.ez=0;R.yh=!1;R.Xj=!1;R.O="";wBH(R.app.UZ());GB(R.app.UZ(),R.playback,!1);R.xY.clear();R.J.isActive()&&LN(R)}; NID=function(R){axD(R.L,w=>w.J2>=-1&&w.lU<=Infinity)}; Mc=function(R,w,p,r){w.durationMs=p;w.lU=r;(r=R.xY.get(w.cpn))?r.vM(p/1E3):R.l3({nop_d:w.cpn})}; g.A_=function(R,w){for(const p of R.nB)if(w>=p.start&&w<=p.end)return!0;return!1}; ya=function(R,w,p,r,f){let G=R.NB.get(p);if(!G){if(G=PV(R,w))return G;w=R.SM(p-1,r??2);if(f)return R.l3({misscue:f,sq:p,type:r,prevsstate:w?.Yo,prevrecord:R.NB.has(p-1)}),R.NB.get(p-1);if(w?.Yo===2)return R.l3({adnf:1,sq:p,type:r,prevrecord:R.NB.has(p-1)}),R.NB.get(p-1)}return G}; nHH=function(R,w,p,r,f,G){if(!R.Xj)if(g.A_(R,p))R.l3({gdu:"undec",seg:p,itag:f});else if(w=ya(R,w,p,r,G),!R.playback.getVideoData().L$()||!w?.zX)return w}; PV=function(R,w){w+=R.g9();if(R.playback.getVideoData().L$()){a:{var p=R.L;R=w*1E3;for(r of p.C)if(p=r.b8?r.b8*1E3:r.J2,R>=r.J2-1E3&&R<=p+r.durationMs+1E3)break a;var r=void 0}r={TC:r,v9:w}}else r=eT(R,w),r?.TC||(r=eT(R,w,1));return r?.TC}; qc=function(R,w,p=!1){if(!p){for(const r of R.nB){if(w>=r.start&&w<=r.end)return;if(w===r.end+1){r.end+=1;return}}R.nB.push(new U86(w))}}; d8Y=function(R,w=""){const p=Ia(w)||void 0;w&&p||R.l3({adcfg:w?.length,dcfg:p?.length});return p}; b2=function(R,w){const p=[];R=R.L.L.get(w);if(!R)return[];for(const r of R)r.cpn&&p.push(r.cpn);return p}; Sod=function(R,w,p){let r=!1;if(p=R.L.L.get(p))for(const f of p)f.durationMs!==0&&f.lU!==f.J2&&(p=f.cpn,w===p&&(r=!0),r&&!R.Df.has(p)&&(R.l3({decoratedAd:p}),R.Df.add(p)))}; Rfl=function(R,w,p){let r=0;R=R.L.L.get(p);if(!R)return-1;for(const f of R){if(f.cpn===w)return r;r++}return-1}; wyW=function(R,w){let p=0;R=R.L.L.get(w);if(!R)return 0;for(const r of R)r.durationMs!==0&&r.lU!==r.J2&&p++;return p}; pyd=function(R){for(const w of R.C.values())R.playback.removeCueRange(w);R.C.clear();R.pB.clearAll()}; gHd=function(R){if(R.q0||R.cB){var w=Array.from(R.app.UZ().U.values()),p=[],r=[],f=[],G=[],I=[],C=[];for(var u of w)if(w=R.L.Ff(u.m6()))w.jN&&p.push(w.jN),w.PA&&r.push(w.PA),w.iO&&r.push(w.iO),G.push(w.cpn),I.push(w.videoData.videoId||""),C.push(w.videoData.adFormat||w.videoData.mq),w.serializedQoeContextData!=null&&f.push(w.serializedQoeContextData);w=u=void 0;R.q0&&(w={jN:p,qS:r});R.cB&&(u={Sf:G,Vz:I,adFormats:C,serializedQoeContextData:f});return{vO:w,CM:u}}}; QxP=function(R,w,p,r,f,G,I){if(w&&p){R.G_=p.cpn;R.eB(p.cpn,p.startTimeSecs||f);h6H(R,p);var C=Ol(R,"a2a",p);R.l3(C);R.dM++;C=gHd(R);R.playback.Zp(w,p,r||0,f||0,!!G,!!I,void 0,C)}else R.l3({misspbkonadtrans:1,enter:p?.cpn||"",exit:w?.cpn||"",seek:G,skip:I})}; HED=function(R){R.N0.add(R.O);R.O="";R.X=!1}; rq6=function(R,w,p){var r;if(r=R.playback.getVideoData().L$())r=(r=R.L.Ff(w))&&r.fS?(R=R.L.L.get(r?.fS))&&R.slice(-1)[0].cpn===w:!1;return r&&p===2?1E3:0}; fVP=function(R,w,p,r){w={wG:w,eh:p,Xh:R.playback.getCurrentTime(),O7:r};DB(R,w)}; IVI=function(R,w,p={}){const r=R.J||R.app.HS().getPlayerState();a5(R,!0);w=isFinite(w)?w:R.L.aD();const {TC:f,v9:G}=$$(R,w);w=f&&!nN(R,f)||!f&&R.L!==R.app.HS();var I=G*1E3;I=R.O&&R.O.start<=I&&I<=R.O.end;!w&&I||d6(R);f?GoP(R,f,G,p,r):ZB(R,G,p,r,"_execute")}; Y$=function(R,w,p,r){R.L.Ty("timelineerror",{e:w,cpn:p?p:void 0,videoId:r?r:void 0})}; FR=function(R,w){return new g.Ja(Math.max(0,R-5E3),w?0x8000000000000:R-1,{namespace:"childplayback",priority:9})}; CWY=function(R,w,p){const r=w.Za;w.Za=p;nN(R,w)&&(p=R.app.HS(),r.bD===R.O&&d6(R),p.removeCueRange(r.bD),p.addCueRange(w.Za.bD))}; GoP=function(R,w,p,r,f){const G=nN(R,w);if(!G){w.playerVars.prefer_gapless=!0;var I=new g.ct(R.LB,w.playerVars);I.iU=w.iU;R.api.r3(I,w.playerType)}I=R.app.HS();G||I.addCueRange(w.Za.bD);I.seekTo(p,{dB:"application_timelinemanager",...r});ull(R,f)}; ma_=function(R,w,p,r,f,G){var I=w.cpn,C=w.docid||w.video_id||w.videoId||w.id,u=R.L;G=G===void 0?f+r:G;if(f>G)return Y$(R,`enterAfterReturn enterTimeMs=${f} is greater than parentReturnTimeMs=${G.toFixed(3)}`,I,C),"";var m=u.xN()*1E3;if(fm)return u=`returnAfterDuration parentReturnTimeMs=${G.toFixed(3)} is greater than parentDurationMs=${m}. And timestampOffset in seconds is ${u.vB()}`, Y$(R,u,I,C),"";m=null;for(const B of R.C){if(f>=B.J2&&fB.J2)return Y$(R,"overlappingReturn",I,C),"";if(G===B.J2)return Y$(R,"outOfOrder",I,C),"";f===B.lU&&(m=B)}I=`cs_childplayback_${scD++}`;C={bD:FR(r,!0),kH:Infinity,target:null};const z={iU:I,playerVars:w,playerType:p,durationMs:r,J2:f,lU:G,Za:C};R.C=R.C.concat(z).sort((B,W)=>B.J2-W.J2); m?CWY(R,m,{bD:FR(m.durationMs,!0),kH:m.Za.kH,target:z}):(w={bD:FR(f,!1),kH:f,target:z},R.K.set(w.bD,w),u.addCueRange(w.bD));w=!0;if(R.L===R.app.HS()&&(u=u.getCurrentTime()*1E3,u>=z.J2&&u{GoP(R,z,W/1E3,{},B)}); w=!1}w&&(R.S.unshift(z),R.xY.ql(0));return I}; zfY=function(R,w,p,r){R.O=r;r=w.iU;const f=w.playerVars,G=w.playerType;R.D=w;f&&R.api.enqueueVideoByPlayerVars(f,G,p,r)}; BrW=function(R,w,p,r){R.O=r;R.api.Au(R.L,p,w)}; d6=function(R){R.D=null;R.O=null;R.api.Uu()||R.api.clearQueue()}; nN=function(R,w){R=R.app.HS();return!!R&&R.getVideoData().iU===w.iU}; WZP=function(R,w){nN(R,w)||Y$(R,"childPlaybackIsNotPresenting");return w.lU===w.J2+w.durationMs?w.J2+R.app.HS().getCurrentTime()*1E3:w.lU}; $$=function(R,w){let p=0;for(const r of R.C){R=r.J2/1E3+p;const f=R+r.durationMs/1E3;if(R>w)break;if(f>w)return{TC:r,v9:w-R};p=f-r.lU/1E3}return{TC:null,v9:w-p}}; a5=function(R,w){R.pB=NaN;R.X=null;R.U.stop();R.G&&w&&R.G.WJ();R.J=null;R.G=null}; ZB=function(R,w,p,r,f){const G=R.L;G!==R.app.HS()&&R.app.KZ();R.LB.Y("html5_sabr_csdai_seek_log")||(f="");G.seekTo(w,{dB:"application_timelinemanager"+(f??""),...p});ull(R,r)}; ull=function(R,w){R=R.app.HS();const p=R.getPlayerState();w.isOrWillBePlaying()&&!p.isOrWillBePlaying()?R.playVideo():w.isPaused()&&!p.isPaused()&&R.pauseVideo()}; xaY=function(R){var w=R.C.find(p=>nN(R,p)); if(w){const p=R.app.HS();d6(R);const r=new g.Gf(8);w=WZP(R,w)/1E3;ZB(R,w,{},r,"_force");p.Ty("forceParentTransition",{childPlayback:1});R.L.Ty("forceParentTransition",{parentPlayback:1})}}; jT=function(R,w=-1,p=Infinity){for(const [C,u]of R.K){var r=C,f=u;f.kH>=w&&f.target&&f.target.lU<=p&&(R.L.removeCueRange(r),R.K.delete(r))}r=[];for(const C of R.C)C.J2>=w&&C.lU<=p?(f=R,f.D===C&&d6(f),nN(f,C)&&f.app.KZ()):r.push(C);R.C=r;const {TC:G,v9:I}=$$(R,w/1E3);G&&(w=I*1E3,lVI(R,G,w,G.lU===G.J2+G.durationMs?G.J2+w:G.lU));({TC:w}=$$(R,p/1E3));w&&Y$(R,`Invalid clearEndTimeMs=${p} that falls during ${`playback={timelinePlaybackId=${w.iU} video_id=${w.playerVars.video_id} durationMs=${w.durationMs} enterTimeMs=${w.J2} parentReturnTimeMs=${w.lU}}`}.`+ "Child playbacks can only have duration updated not their start.")}; lVI=function(R,w,p,r){w.durationMs=p;w.lU=r;r={bD:FR(p,!0),kH:p,target:null};CWY(R,w,r);nN(R,w)&&R.app.HS().getCurrentTime()*1E3>p&&(w=WZP(R,w)/1E3,p=R.app.HS().getPlayerState(),ZB(R,w,{},p,"_update"))}; q6H=function(R){R&&R!=="web"&&LZr.includes(R)}; PKb=function(R,w){return w?!!R.L.get(w):!1}; AqL=function(R,w){R.dataset.version=w}; by6=function(R){R.Z0=!R.Z0;R.WQ=!0;R.element.classList.toggle("ytp-retro-player",R.Z0);R.resize();R.WQ=!1;g.m1(R.app.o0,"onRetroModeChanged",R.Z0)}; yqL=function(R){const w=R.app.o0,p=()=>{R.Q1=new g.X8(0,0,0,0);R.pD=new g.X8(0,0,0,0)},r=I=>{I.getVideoData()&&R.updateVideoData(I.getVideoData())},f=(I,C)=>{R.Ej(I,C)},G=I=>{R.OC&&J_(R); TB(R)!==R.oP&&R.resize();R.app.V().Y("web_enable_smart_zoom")&&R.oN&&(I.state.isPaused()?R.oN.pause():I.TE(8)&&R.oN.playState==="paused"&&R.oN.play())}; w.addEventListener("initializingmode",p);w.addEventListener("videoplayerreset",r);w.addEventListener("videodatachange",f);w.addEventListener("presentingplayerstatechange",G);R.addOnDisposeCallback(()=>{w.removeEventListener("initializingmode",p);w.removeEventListener("videoplayerreset",r);w.removeEventListener("videodatachange",f);w.removeEventListener("presentingplayerstatechange",G)})}; tLH=function(R){var w=R.lA();let p=1;var r=!1;const f=VLP(R,w,R.getVideoAspectRatio()),G=R.app.V(),I=G.Y("enable_desktop_player_underlay"),C=MDD();var u=g.Iq(G.experiments,"player_underlay_min_player_width");u=I&&R.JV&&R.getPlayerSize().width>u;if(TB(R)){var m=oub(R);var z=isNaN(m)||g.gx||rk&&g.tx||u;hx&&!g.ew(601)?m=f.aspectRatio:z=z||G.controlsType==="3";z?u?(z=G.Y("place_shrunken_video_on_left_of_player")?16:R.getPlayerSize().width-w.width-16,m=Math.max((R.getPlayerSize().height-w.height)/2,0), z=new g.X8(z,m,w.width,w.height),R.OC.style.setProperty("border-radius","12px")):z=new g.X8(0,0,w.width,w.height):(p=f.aspectRatio/m,z=new g.X8((w.width-f.width/p)/2,(w.height-f.height)/2,f.width/p,f.height),p===1&&g.tx&&(m=z.width-w.height*m,m>0&&(z.width+=m,z.height+=m)));g.M(R.element,"ytp-fit-cover-video",Math.max(z.width-f.width,z.height-f.height)<1);if(C||R.nM)R.OC.style.display="";R.oP=!0}else{z=-w.height;hx?z*=window.devicePixelRatio:g.ef&&(z-=window.screen.height);z=new g.X8(0,z,w.width, w.height);if(C||R.nM)R.OC.style.display="none";R.oP=!1}n$(R.Q1,z)||(R.Q1=z,g.Cb(G)?(R.OC.style.setProperty("width",z.width+"px","important"),R.OC.style.setProperty("height",z.height+"px","important")):g.SE(R.OC,z.getSize()),r=new g.Xx(z.left,z.top),g.hG(R.OC,Math.round(r.x),Math.round(r.y)),r=!0);w=new g.X8((w.width-f.width)/2,(w.height-f.height)/2,f.width,f.height);n$(R.pD,w)||(R.pD=w,r=!0);g.Z2(R.OC,"transform",p===1?"":`scaleX(${p})`);I&&u!==R.F8&&(u&&(R.OC.addEventListener(i2,R.GF),R.OC.addEventListener("transitioncancel", R.GF),R.OC.classList.add(g.mq.VIDEO_CONTAINER_TRANSITIONING)),R.F8=u,R.app.o0.publish("playerUnderlayVisibilityChange",R.F8?"transitioning":"hidden"));return r}; J_=function(R){var w=R.app.V().controlsType==="3"&&!R.Wq&&TB(R)&&!R.app.ux||!1;R.OC.controls=w;R.OC.tabIndex=w?0:-1;R.app.V().G&&(R.OC.ariaHidden="true");w?R.OC.removeEventListener("focus",R.cg):R.OC.addEventListener("focus",R.cg)}; oub=function(R){var w=R.app.HS();if(w=w?w.getVideoData():null){if(g.v4(w)||g.Nr(w)||g.ko(w))return 16/9;if(E_(w)&&w.O.L())return R=w.O.videoInfos[0].video,Qa(R.width,R.height)}return(R=R.OC)?Qa(R.videoWidth,R.videoHeight):16/9}; Qa=function(R,w){return Math.abs(h_*w-R)<1||Math.abs(h_/R-w)<1?h_:R/w}; VLP=function(R,w,p,r){let f=p;const G=Qa(w.width,w.height);R.E6?f=pG?{width:w.width,height:w.width/f,aspectRatio:f}:ff?R.width=R.height*p:p{p.reject("timeout")},1E4); R.nh.onerror=()=>{p.reject("error")}; R.nh.onmessage=()=>{p.resolve();clearTimeout(w)}; await p.promise;R.nh.onmessage=null;R.nh.onerror=null;R.nh.addEventListener("message",r=>void R.receive(r)); R.Ty("workerCtor",{})}catch(p){clearTimeout(w),R.nh?.terminate(),R.nh.onmessage=null,R.nh.onerror=null,R.nh=void 0,R.Ty("workerErr",{e:`${p}`})}}}; Dad=function(R,w){if(R.L&&R.L.byteLength===w)return R.L;const p=new Uint8Array(w);let r=0;for(;w>0;){const f=new Uint8Array(Math.min(w,65536));crypto.getRandomValues(f);p.set(f,r);w-=f.length;r+=f.length}return R.L=p}; efY=function(R,w){R.nh&&(w=Dad(R,w),w.length>0&&w[0]++,w={[0]:0,[1]:performance.now(),[2]:w},R.request(w))}; MLr=async function(R){R.C!==void 0||R.O||(R.O=!0,await Eud(R),R.O=!1,R.nh&&(efY(R,R.X),R.C=setInterval(()=>{R.sendRequest()},R.intervalMs)))}; cqH=function(R,w){const p=R.Oy.d_;return p?Bo(p.getPlayerState()):R.getVideoData().enableServerStitchedDai&&w===2?(R.LB.Tk().L.vS(g6)?R.Oy.L?.isAd()??!1:R.H1?.mq(R.getCurrentTime()))?R.C7:-1:w!==2||R.b4()?R.C7:R.HV}; Aa=function(R){return R.ux&&R.getVideoData().mutedAutoplay}; HV=function(R,w,p){w&&(w=R.Ff({playerType:p}),w===R.Gk()&&(w.getVideoData().Af=!0))}; vV=function(R,w,p=!0,r,f,G){const I=R.Ff({playerType:f});var C=I.getVideoData();I.getPlayerType()===2&&!R.b4(I)&&!C.isSeekable||g.gs(C)||((C=R.Oy.d_)?C.seekTo(w,{Z4:!p,PO:r,dB:"application",seekSource:G}):(I&&I===R.Gk()&&R.sQ&&!PWL(R,w)&&R.setLoopRange(null),R.seekTo(w,p,r,f,G,"_request")))}; Ul=function(R,w){w=R.Ff({playerType:w});w=Nc(R,w);return k$(R,w.Ev(),w)}; SD=function(R,w,p,r){var f;(R&93)==R&&(f=p!==null);(R|48)==R&&(f=encodeURIComponent(p));((R^56)&8)<4&&R+8>>3>=2&&p[l[2]]!=0&&(r=(r%p[l[2]]+p[l[2]])%p[l[2]],p[l[8]](0,1,p[l[8]](r,1,p[0])[0]));return f}; wc=function(R,w,p){R.LB.M0&&(R.NP=w,w.muted||ST(R,!1),p&&R.LB.storeUserVolume&&!R.LB.yh&&(p={volume:Math.floor(w.volume),muted:w.muted},p.unstorable||(g.Qp("yt-player-volume",p),g.Qp("yt-player-volume",p,2592E3))),RW(R),p=g.Io&&R.mediaElement&&!R.mediaElement.Kv(),R.LB.yh&&!p||g.lK(R.o0,"onVolumeChange",{muted:w.muted,volume:w.volume,unstorable:!R.LB.storeUserVolume}))}; pU=function(R,w,p,r,f,G,I){w={id:w,namespace:I??"appapi"};G==="chapter"?(w.style=Vl.CHAPTER_MARKER,w.visible=!0):isNaN(f)||(G==="ad"?w.style=Vl.AD_MARKER:(w.style=Vl.TIME_MARKER,w.color=f),w.visible=!0);R.zf([new g.Ja(p*1E3,r*1E3,w)],1);return!0}; aVP=function(R,w,p=!0,r,f){const G=R.Ff({playerType:1});let I=0;G.getStreamTimeOffset()&&!G.vB()&&(I=G.getStreamTimeOffset());vV(R,w-I,p,r,1,f)}; $ad=function(R){if(R.LB.storeUserVolume){R=g.hj("yt-player-volume")||{};const w=R.volume;R={volume:isNaN(w)?100:g.MN(Math.floor(w),0,100),muted:!!R.muted}}else R={volume:100,muted:R.LB.mute};return R}; Xy_=function(R,w,p,r,f,G=!0){const I=R.gg();if(!I)return G&&R.getVideoData().isLivePlayback&&R.z0.push({id:w,xr:p,Cr:r}),!1;G=I-R.getCurrentTime();return pU(R,w,p-G,r-G,void 0,void 0,f)}; nuL=function(R,w){R.Ib().autonavState=w;g.Qp("yt-player-autonavstate",w);R.o0.publish("autonavchange",w)}; rc=function(R,w){R.playlist&&(g.p5(R.playlist),R.playlist=null);w&&(R.UR&&(w.fetch=0),R.playlist=new dad(R.LB,w))}; GT=function(R,w,p){w=R.Ff({playerType:p}).P1(w);p&&R.getPresentingPlayerType()!==p||fU(R,"cuerangesremoved",w)}; ui=function(R,w,p,r=Infinity,f=0){var G=R.HS();p=p||G.getPlayerType();(G=IW(R,p,w,!0))||(G=CU(R,p,w,!0));w=R.Gk();p===2&&w&&(p=G.getVideoData(),w.DM(p.clientPlaybackNonce,p.mq||"",p.breakType||0,p.fZ,p.videoId||""));R.Au(G,r,0,f)}; Zyd=function(R){const w=R.webPlayerContextConfig.trustedJsUrl;return w?UV(w).toString():R.webPlayerContextConfig.jsUrl}; FZL=function(R){var w="";let p="";var r=Zyd(R),f=t4(r,"cb");f&&/^[\w-]+$/.test(f)&&(p=f);r.indexOf("//")===0&&(r=R.LB.protocol+":"+r);f=r.lastIndexOf("/base.js");f!==-1&&(w=r.substring(0,f+1));if(r=Error().stack)if(r=r.match(/\((.*?\/(debug-)?player-.*?):\d+:\d+\)/))r=r[1],r.includes(w)||g.AO(Error("Player module URL mismatch: "+`${r} vs ${w}.`));w=new Y6b(R.o0,w,p);w_P(w,{destroyed:()=>{R.onApiChange()}}); return w}; jcY=function(R){Xm(R,function(){const w=this;return function*(){w.Jf.tick("wasm_s");const p=Ht(w.Vv)?r=>PQ(q5L(w.Vv),f=>f.GU(r)):void 0; try{const r=eLW(w.webPlayerContextConfig.wasmModuleUrl,p,w.y3.bind(w)),f=yield*nl(r);w.Jf.tick(f.L?"wasm_fa":"wasm_fw");TP_(w.LB,f)}catch(r){w.Jf.tick("wasm_ferr")}}()})}; Jq6=function(R){const w=new g.ct(R.LB,R.VR);R.o0.publish("initialvideodatacreated",w);return CU(R,1,w,!1)}; iyx=function(R){const w=R.Gk();w.setPlaybackRate(R.LB.G?1:TrI(R,Number(g.hj("yt-player-playback-rate"))||1));w.Uq(R.Sw,R);w.Yc()}; hfl=function(R){R.aN();var w=R.VR;sC(R);R.events.W(window,"resize",R.F7);const p=R.Ib();g.lK(R.o0,"onVolumeChange",R.NP);if(w&&MZ(w)){const r=b8(R.LB);r&&!R.UR&&(w.fetch=0);const f=g.zI(R.LB);f&&!R.UR&&(w.fetch=0);rc(R,w);g.zI(R.LB)&&R.Jf.tick("ep_pr_s");if(!r||R.UR)if(f&&!R.UR)m5(R);else if(!p.n$())R.playlist.onReady(()=>{zT(R)})}R.a5(R.Gk(),!1,!0); R.Gk().getPlayerState().L(128)||(w=zCI(!R.LB.deviceIsAudioOnly),w==="fmt.noneavailable"?R.NH("html5.missingapi",2,"HTML5_NO_AVAILABLE_FORMATS_FALLBACK","nocodecs.1"):w==="html5.missingapi"?R.NH(w,2,"UNSUPPORTED_DEVICE","nocanplaymedia.1"):p&&p.n$()&&BJ(R)&&(R.LB.Ww||R.LB.Hw)?WJ(R):p.Na?R.o0.mutedAutoplay({durationMode:p.mutedAutoplayDurationMode}):g.hj("yt-player-playback-on-reload")?(g.Rv("embedsItpPlayedOnReload",{playedOnReload:!0,isLoggedIn:!!R.LB.O0}),g.Qp("yt-player-playback-on-reload",!1), WJ(R)):yk(R.LB)||Qcr(R),g.t5(R.LB)||Uq(R.LB)==="MWEB"?(g.uq(g.mL(),()=>{xz(R)}),g.uq(g.mL(),()=>{IFI()})):(xz(R),IFI()))}; gul=function(R){const w=p=>{p.stack&&p.stack.indexOf("player")!==-1&&R.HS().m3(p)}; Vs.subscribe("handleError",w);Ce.push(w);return()=>{Vs.unsubscribe("handleError",w);const p=Ce.indexOf(w);p!==-1&&Ce.splice(p,1)}}; CU=function(R,w,p,r,f){R=g.Hy_(R,w,p,f);R=new g.li(R);r&&R.Yc();return R}; TrI=function(R,w){var p=R.o0.getAvailablePlaybackRates();w=Number(w.toFixed(2));R=p[0];p=p[p.length-1];w<=R?w=R:w>=p?w=p:(R=Math.floor(w*100+.001)%5,R!==0&&(w-=R*.01,w=Math.floor(w*100+.001)/100));return w}; qp=function(R){LU(R);R.setLoopVideo(!1);R.setLoopRange(null);R.o0.publish("legacyadtrackingpingreset");R.kR={};R.z0=[];i6W(R.Jf);if(R.H1){var w=R.H1,p=R.Gk();p.getPlayerType();Va(w,!1);cV(w);kND(w);w.playback=p}w=R.u3;R=R.Gk();R.getPlayerType()!==1&&Y$(w,"invalidParentVideoPlayerType");a5(w,!1);jT(w);w.L=R}; vuP=function(R){const w=R.mediaElement;uV()?R.Bc.W(w,"webkitpresentationmodechanged",R.qY):window.document.pictureInPictureEnabled&&(R.Bc.W(w,"enterpictureinpicture",()=>{R.VS(!0)}),R.Bc.W(w,"leavepictureinpicture",()=>{R.VS(!1)})); Be&&(R.Bc.W(w,"webkitbeginfullscreen",()=>{R.Re(3)}),R.Bc.W(w,"webkitendfullscreen",()=>{R.Re(0)}))}; sC=function(R){R.mediaElement=R.LB.deviceIsAudioOnly?new g.Hy(g.sW("AUDIO")):gr.pop()||new g.Hy(g.sW("VIDEO"));g.K(R,R.mediaElement);R.HS().setMediaElement(R.mediaElement);try{R.LB.yh?(R.AA&&R.events.o9(R.AA),R.AA=R.events.W(R.mediaElement,"volumechange",R.nG)):(R.mediaElement.X(R.NP.muted),R.mediaElement.setVolume(R.NP.volume/100))}catch(f){R.NH("html5.missingapi",2,"UNSUPPORTED_DEVICE",`setvolume.1;emsg.${f&&typeof f==="object"&&"message"in f&&typeof f.message==="string"&&f.message.replace(/[;:,]/g, "_")}`);return}R.Bc.C();vuP(R);var w=R.template,p=R.mediaElement.zk();w.OC=p;w.Wq=!1;w.OC.parentNode||Wc(w.uT,w.OC,0);w.Q1=new g.X8(0,0,0,0);tLH(w);J_(w);p=w.OC;g.pc(p,"video-stream");g.pc(p,g.mq.MAIN_VIDEO);const r=w.app.V();r.Jp&&p.setAttribute("data-no-fullscreen","true");r.Y("html5_local_playsinline")?"playsInline"in fq()&&(p.playsInline=!0):r.K2&&(p.setAttribute("webkit-playsinline",""),p.setAttribute("playsinline",""));r.X3&&w.OC&&w.W(p,"click",p.play,p);try{R.mediaElement.activate()}catch(f){R.NH("html5.missingapi", 2,"UNSUPPORTED_DEVICE",`activate.1;emsg.${f&&typeof f==="object"&&"message"in f&&typeof f.message==="string"&&f.message.replace(/[;:,]/g,"_")}`)}}; fU=function(R,w,p){R.o0.publish(w,p);const r=g.I1(R.LB)||g.Cb(R.LB)||g.dQ(R.LB);if(p&&r){let f;switch(w){case "cuerangemarkersupdated":f="onCueRangeMarkersUpdated";break;case "cuerangesadded":f="onCueRangesAdded";break;case "cuerangesremoved":f="onCueRangesRemoved"}f&&g.m1(R.o0,f,p.map(G=>({getId(){return this.id},end:G.end,id:G.getId(),namespace:G.namespace==="ad"?"ad":"",start:G.start,style:G.style,visible:G.visible,markerPositionMs:G.markerPositionMs})))}}; NrW=function(R,w=!0){var p;if(p=R.kN){p=R.kN;var r=R.mediaElement;p=!!r&&r===p.mediaElement}p&&(R.gY(),sC(R));p=R.HS();p.gY(!w);p.OF(R.SA,R);p.getPlayerType()!==1&&p.dispose();R=R.Oy;w=[R.C];R.C=R.X;fN(R,[],w)}; bi=function(R,w,p,r){p&&(R.gY(),sC(R));p=R.HS();p.eF(w);const f=R.getVideoData(),G={};G.video_id=f.videoId;G.adformat=f.adFormat;f.isLivePlayback||(G.start=p.getCurrentTime(),G.resume="1");f.isLivePlayback&&na(f)&&g.f2(R.LB)&&(G.live_utc_start=p.gg(),G.resume="1");f.xY&&(G.vvt=f.xY);f.iI&&(G.vss_credentials_token=f.iI,G.vss_credentials_token_type=f.u8);f.oauthToken&&(G.oauth_token=f.oauthToken);G.autoplay=1;G.reload_count=f.U0+1;G.reload_reason=w;f.t6&&(G.unplugged_partner_opt_out=f.t6);f.wB&&(G.ypc_is_premiere_trailer= f.wB);f.playerParams&&(G.player_params=f.playerParams);f.S&&(G.itct=f.S);R.loadVideoByPlayerVars(G,void 0,!0,void 0,void 0,r);w==="signature"&&R.H1&&Az(R)}; UaW=function(R){if(!kod(R)){var w=R.Gk().XI();w&&(w=w.S(),w instanceof Promise&&w.catch(()=>{})); yz(R,Bo(R.getPlayerStateObject()))}}; kod=function(R){if(R.playlist&&(g.sg(R.LB)||R.LB.xY==="background_audio_playback")&&R.iz()){const w=R.LB.Y("html5_player_autonav_logging");R.nextVideo(!1,w);return!0}return!1}; yz=function(R,w){const p=R.HS(),r=p.getPlayerType();if(r!==2||R.b4()){if(r===2&&R.b4()||r===5||r===6||r===7)if(w===-1||w===0||w===5)return;if(w===0){if(R.sQ)return;if(p.pX()&&g.I1(R.LB)){R.playVideo();return}}R.C7!==w&&(R.C7=w,g.lK(R.o0,"onStateChange",w))}else R.HV!==w&&(R.HV=w,g.lK(R.o0,"onAdStateChange",w))}; Vz=function(R,w){return R.Oy.Ff(w)}; g.Hy_=function(R,w,p,r){let f=R.Jf;w===2&&(f=new S6_(R.LB));w=new g.oW(R.LB,w,f,R.template,(G,I,C)=>{R.o0.publish(G,I,C)},()=>R.o0.getVisibilityState(),R.visibility,R,R.BB,p,r,R.F9,R.zx); R.LB.Tk().L.vS(ROL)&&R.wO(p.clientPlaybackNonce);return w}; Nc=function(R,w){return R.b4(w)?R.Gk():w}; tz=function(R,w){const p=R.HS();return w===R.Gk()&&R.b4(w)&&R.b4(p)?p:w}; OC=function(R){R=Em(R.Vv);return!!R&&R.loaded}; wV6=function(R){const w=R.getVideoData();var p=R.Vv;vt(p)||p.K();!rN&&Ht(p)&&xsW(p);Q1(p,"embed");Q1(p,"kids");Q1(p,"remote");Q1(p,"miniplayer");Q1(p,"offline");Q1(p,"unplugged");Q1(p,"ypc",!1,!0);Q1(p,"webgl",!1,!0);l0W(p)||(Q1(p,"captions",!0),Q1(p,"endscreen"),p.L(),Q1(p,"creatorendscreen",!0));p.X();p.B.publish("modulesCreated");R.o0.publish("videoready",w)}; Az=function(R){if(!OC(R)){const w=Ye(R.Vv);w&&!w.created&&gv(R.Vv)&&w.create()}}; RW=function(R){var w=R.getVideoData();if(!w.r7){w=R.LB.yh?1:yCW(w);const p=R.mediaElement;p.X(R.NP.muted);try{p.setVolume(R.NP.volume*w/100)}catch{g.AO(new g.Id("b183742307",`multiplier: ${w}, volume: ${R.NP.volume}`))}}}; BJ=function(R){R=R.Ib();R.n$();return wH(R)}; m5=function(R,w){const p=(w?w:R.Ib()).iE;R.Jf.tick("ep_pr_r");if(p!=null&&(QVW(R.playlist,p),R.OJ))R.playlist.onReady(()=>{zT(R,w)})}; zT=function(R,w){const p=g.zI(R.LB)&&!R.LB.S;var r=p&&w?w:g.Pt(R.playlist);w=p&&w?w:R.getVideoData();r&&(w.Ho&&(R.LB.Ww||R.LB.Hw)||!R.Jx?(w=w.Af,r=R.r3(r,1),w&&HV(R,r)):KU(R,r,1));g.zI(R.LB)&&R.Jf.tick("ep_p_l");R.OJ=!1;g.xs(R.o0,"onPlaylistUpdate")}; WJ=function(R){var w=R.Gk();if(w.getPlayerState().L(128))return!1;w=w.getVideoData();BJ(R)&&R.LB.Hw&&(gr.length&&R.ux?(wc(R,{muted:!1,volume:R.NP.volume},!1),ST(R,!1)):gr.length||R.NP.muted||(wc(R,{muted:!0,volume:R.NP.volume},!1),ST(R,!0)));BJ(R)&&g.zI(R.LB)&&w.mutedAutoplay&&(wc(R,{muted:!0,volume:R.NP.volume},!1),ST(R,!0));w.LC&&wc(R,{muted:!0,volume:R.NP.volume},!1);IW(R,1,w,!1);const p=R.Gk();R.o0.publish("initializingmode");R.a5(p);R.NL(3);var r;if(!(r=!R.LB.M9)){if(r=R.kN){r=R.kN;var f=R.mediaElement; r=!!f&&f===r.mediaElement}r=r&&R.pn}r&&(R.gY(),sC(R),p.setMediaElement(R.mediaElement));p.ZQ();if(p.getPlayerState().L(128))return!1;w.eI||yz(R,3);return R.pn=!0}; Qcr=function(R){R.o0.publish("initializingmode");R.NL(2);Q1(R.Vv,"remote");Q1(R.Vv,"miniplayer")}; xz=function(R){if(!R.Y("use_rta_for_player"))if(R.Y("fetch_att_independently"))R.wX.ql();else{var w=R.getVideoData().botguardData;w&&g.rm(w,R.LB,R.getVideoData().Ek||"")}}; ST=function(R,w){w!==R.ux&&(R.ux=w,g.xs(R.o0,"onMutedAutoplayChange",w))}; IW=function(R,w,p,r){const f=EC(w,p),G=R.Oy.J.get(f)||null;if(!G)return null;R.Oy.J.remove(f);if(G.cS())return null;if(G.getPlayerState().L(128))return G.dispose(),null;if(G===Vz(R,{playerType:w}))return R.Jf.infoGel({isCacheHit:!0}),G;if((G.getVideoData().oauthToken||p.oauthToken)&&G.getVideoData().oauthToken!==p.oauthToken)return null;w===1&&(w=R.HS().getVideoData(),Dr(w)&&w.isAd()&&r||LU(R));r||R.a5(G,!0);R.Jf.infoGel({isCacheHit:!0});return G}; pVP=function(R){const w=(0,g.T)();var p=R.getCurrentTime();R=R.getVideoData();p=1E3*(p-R.startSeconds);R.isLivePlayback&&(p=0);return w-Math.max(p,0)}; PWL=function(R,w){if(!R.sQ)return!1;const p=R.sQ.startTimeMs*.001-1;let r=R.sQ.endTimeMs*.001;R.sQ.type==="repeatChapter"&&r--;return Math.abs(w-p)<=1E-6||Math.abs(w-r)<=1E-6||w>=p&&w<=r}; r_D=function(R){var w=R.HS();if(R.Y("html5_disable_loop_range_for_shorts_ads")&&w.getVideoData().isAd()?0:Dr(w.getVideoData())&&!w.rA())w=Ul(R)*1E3-R.getVideoData().u7,R.Y("html5_gapless_new_slr")?(R=R.Cz,GT(R.app,"gaplessshortslooprange"),w=new g.Ja(0,w,{id:"gaplesslooprange",namespace:"gaplessshortslooprange"}),(R=R.app.HS())&&R.addCueRange(w)):R.setLoopRange({startTimeMs:0,endTimeMs:w,type:"shortsLoop"})}; fB_=function(R){const w=R.Gk();if(!(w.getPlayerState().L(64)&&R.Ib().isLivePlayback&&R.sQ.startTimeMs<5E3)){if(R.sQ.type==="repeatChapter"){var p=JCW(R.tf())?.kU(),r=R.getVideoData()?.pL;p instanceof g.DD&&r&&(r=r[KE(r,R.sQ.startTimeMs)],p.renderChapterSeekingAnimation(0,r.title));isNaN(Number(R.sQ.loopCount))?R.sQ.loopCount=0:R.sQ.loopCount++;R.sQ.loopCount===1&&g.m1(R.o0,"innertubeCommand",R.getVideoData().gU)}p={dB:"application_loopRangeStart"};if(R.sQ.type==="clips"||R.sQ.type==="shortsLoop")p.seekSource= 58;w.seekTo(R.sQ.startTimeMs*.001,p)}}; k$=function(R,w,p){if(R.b4(p)&&(p=p.getVideoData(),!et(R))){R=R.u3;for(var r of R.C)if(p.iU===r.iU){w+=r.J2/1E3;break}r=w;for(const f of R.C){if(p.iU===f.iU)break;R=f.J2/1E3;if(R{R.OJ=!0;m5(R,G)}); else R.playlist.onReady(()=>{zT(R)}); g.zI(R.LB)&&R.Jf.tick("ep_a_pr_r")}; Mp=function(R){const w=$B(!0);return w&&(w===R.template.element||R.mediaElement&&w===R.mediaElement.zk())?w:null}; s5_=function(R,w){var p=window.screen?.orientation;if(R.LB.D&&p&&p.lock&&(!g.Io||!uRd))if(w){w=p.type.indexOf("portrait")===0;const r=R.template.getVideoAspectRatio();let f=w;r<1?f=!0:r>1&&(f=!1);R.Tx&&f===w||(p=p.lock(f?"portrait":"landscape"),p!=null&&p.catch(()=>{}),R.Tx=!0)}else R.Tx&&(R.Tx=!1,p.unlock())}; mcd=function(R,w){w.bounds=R.getBoundingClientRect();const p=["display","opacity","visibility","zIndex"];for(const r of p)w[r]=TM(R,r);w.hidden=!!R.hidden}; zOI=function(R,w){const p=Vz(R,{playerType:1});if(p){if(p.getVideoData().clientPlaybackNonce===w)return p;if((R=R.xG.L)&&R.getVideoData().clientPlaybackNonce===w)return R}return null}; B6W=function(R){return R.name==="TypeError"&&R.stack.includes("/s/player/")&&ph()<=105}; Wh6=function(R){return R.isTimeout?"NO_BID":"ERR_BID"}; xcr=function(){let R=null;jpY().then(w=>R=w,w=>R=Wh6(w)); return R}; lBd=function(){const R=fw(1E3,"NO_BID");return g.ge(g2D([jpY(),R]).bA(Wh6),()=>{R.cancel()})}; SHx=function(R){return R.Ml?g.SN().vS(140)?"STATE_OFF":"STATE_ON":"STATE_NONE"}; cJ=function(R,w,{n6:p,bD:r,cueProcessedMs:f}={},G=""){const I=R.player.getVideoData({playerType:1}),C=R.player.V().hO;var u=0;if(f&&r&&!p){const W=r.end-r.start;W>0&&(u=Math.floor(W/1E3))}u=p?p.W1:u;const m={AD_BLOCK:R.L++,AD_BREAK_LENGTH:u,AUTONAV_STATE:SHx(R.player.V()),CA_TYPE:"image",CPN:I.clientPlaybackNonce,DRIFT_FROM_HEAD_MS:R.player.t9()*1E3,LACT:r1(),LIVE_INDEX:p?R.C++:1,LIVE_TARGETING_CONTEXT:p&&p.context?p.context:"",MIDROLL_POS:r?Math.round(r.start/1E3):0,MIDROLL_POS_MS:r?Math.round(r.start): 0,VIS:R.player.getVisibilityState(),P_H:R.player.L_().lA().height,P_W:R.player.L_().lA().width,YT_REMOTE:C?C.join(","):""},z=rUH(fvY);Object.keys(z).forEach(W=>{z[W]!=null&&(m[W.toUpperCase()]=z[W].toString())}); G!==""&&(m.BISCOTTI_ID=G);r={};Ke(w)&&(r.sts="20529",(G=R.player.V().forcedExperiments)&&(r.forced_experiments=G));const B=Vj(g.MG(w,m),r);return B.split("?").length!==2?jZ(Error("Invalid AdBreakInfo URL")):g.$W(R.player.V(),I?.oauthToken).then(W=>{if(W&&tk()){var x=XV();ng(x,W)}W=R.player.QC(x);x=p&&R.player.V().Y("html5_send_cuepoint_id_in_ad_break_request")?p.identifier:void 0;x=fId(R,B,m,I.isMdxPlayback,f,x);return g.$J(W,x,"/youtubei/v1/player/ad_break").then(q=>q)})}; Lhd=function(R,w){R=R.player.V();if(Vk(R)||Og(R))R=g.n("INNERTUBE_CONTEXT"),R?.adSignalsInfo?.advertisingId&&typeof R?.adSignalsInfo?.limitAdTracking!=="undefined"&&(w.advertisingId=R.adSignalsInfo.advertisingId,w.advertisingIdSignalType="DEVICE_ID_TYPE_CONNECTED_TV_IFA",w.limitAdTracking=R.adSignalsInfo.limitAdTracking)}; UDb=function(R,w,p,r,f,G){w.client||(w.client={});R.player.V().Y("h5_remove_url_for_get_ad_break")||(w.client.originalUrl=p);const I=o2(p);let C=g.sH(p)?!1:!0;(I||C)&&typeof Intl!=="undefined"&&(w.client.timeZone=(new Intl.DateTimeFormat).resolvedOptions().timeZone);C=g.sH(p)?!1:!0;if(I||C||r!==""){const u={};p=xE(DJ(r)).split("&");const m=new Map;p.forEach(z=>{z=z.split("=");z.length>1&&m.set(z[0].toString(),decodeURIComponent(z[1].toString()))}); m.has("bid")&&(u.bid=m.get("bid"));u.params=[];qlW.forEach(z=>{m.has(z)&&(z={key:z,value:m.get(z)},u.params.push(z))}); Lhd(R,u);w.adSignalsInfo=u}w.client.unpluggedAppInfo||(w.client.unpluggedAppInfo={});w.client.unpluggedAppInfo.enableFilterMode=!1;p=f.L.cosver;p!=null&&p!=="cosver"&&(w.client.osVersion=p);p=f.L.cplatform;p!=null&&p!=="cplatform"&&p!==""&&(w.client.platform=p);p=f.L.cmodel;p!=null&&p!=="cmodel"&&(w.client.deviceModel=p);p=f.L.cplayer;p!=null&&p!=="cplayer"&&(w.client.playerType=p);p=f.L.cbrand;p!=null&&p!=="cbrand"&&(w.client.deviceMake=p);w.user||(w.user={});w.user.lockedSafetyMode=!1;g.sg(f)&& yO6(w,G,R.player.getPlayerState(1));if(R=f.livingRoomPoTokenId)w.client.tvAppInfo={...w.client.tvAppInfo,livingRoomPoTokenId:R}}; RSl=function(R,w){let p=!1;if(w==="")return p;w.split(",").forEach(r=>{const f={},G={clientName:"UNKNOWN_INTERFACE",platform:"UNKNOWN_PLATFORM",clientVersion:""};let I="ACTIVE";r[0]==="!"&&(r=r.substring(1),I="INACTIVE");r=r.split("-");r.length<3||(r[0]in A_d&&(G.clientName=A_d[r[0]]),r[1]in bN_&&(G.platform=bN_[r[1]]),G.applicationState=I,G.clientVersion=r.length>2?r[2]:"",f.remoteClient=G,R.remoteContexts?R.remoteContexts.push(f):R.remoteContexts=[f],p=!0)}); return p}; MTH=function(R){const w=new y_d(R.L.C$);g.K(R,w);R=[new VTl(R.L.D$),new o$_(R.L.B),new tTI(R.L.D$),new ON_(R.L.Dx,R.L.l9),new Khb,new E$P(R.L.uv,R.L.Qm,R.L.D$),new DcL,new eOd(R.L.Qm)];for(const p of R)n5D(w,p);for(const p of["adInfoDialogEndpoint","adFeedbackEndpoint"])KH(w,p,()=>{}); return w}; PJ=function(R){const w=R.dN,p=R.BS;R=R.L3;const r={J$I:new c_6(w.get(),p),BS:p};return{qr:new P2d(p,R,w),context:r}}; D3=function(R){R.C=!1;const w={};R.L&&R.videoId&&(w.cttAuthInfo={token:R.L,videoId:R.videoId});mp("ad_to_video",w);aBd(R)}; $cH=function(R){if(R.B.getVideoData({playerType:1})?.U){R.C=!1;var w={};R.L&&R.videoId&&(w.cttAuthInfo={token:R.L,videoId:R.videoId});mp("video_to_ad",w)}}; XVL=function(R,w){for(const p of w)if((R=p.renderer)&&(R.instreamVideoAdRenderer||R.linearAdSequenceRenderer||R.sandwichedLinearAdRenderer||R.instreamSurveyAdRenderer)){u$("ad_i");g.sT({isMonetized:!0});break}}; aBd=function(R){if(R.O)if(R.G==="AD_PLACEMENT_KIND_START"&&R.actionType==="video_to_ad")G3("video_to_ad");else{var w={adBreakType:Ln(R.G),playerType:"LATENCY_PLAYER_HTML5",playerInfo:{preloadType:"LATENCY_PLAYER_PRELOAD_TYPE_PREBUFFER"},videoStreamType:R.videoStreamType};R.actionType==="ad_to_video"?(R.contentCpn&&(w.targetCpn=R.contentCpn),R.videoId&&(w.targetVideoId=R.videoId)):(R.adCpn&&(w.targetCpn=R.adCpn),R.adVideoId&&(w.targetVideoId=R.adVideoId));R.adFormat&&(w.adType=R.adFormat);R.contentCpn&& (w.clientPlaybackNonce=R.contentCpn);R.videoId&&(w.videoId=R.videoId);R.adCpn&&(w.adClientPlaybackNonce=R.adCpn);R.adVideoId&&(w.adVideoId=R.adVideoId);g.sT(w,R.actionType);R.B.V().experiments.XB("html5_ads_csi_qoes")&&(w=R.B.Ja(R.actionType==="ad_to_video"?1:2),w=(0,g.T)()-1E3*w,Bx("qoes",w,R.actionType))}}; n$P=function(R){R.contentCpn=null;R.adCpn=null;R.videoId=null;R.adVideoId=null;R.adFormat=null;R.G="AD_PLACEMENT_KIND_UNKNOWN";R.actionType="unknown_type";R.O=!1;R.C=!1}; aW=function(R,w){R.B.cueVideoByPlayerVars(w,2)}; Dj=function(R,w,...p){w==="onAdStart"||w==="onAdEnd"?g.lK(R.B,w,...p):g.m1(R.B,w,...p)}; BS=function(R,w){return R.B.V().Y(w)}; dcd=function(R){return R.B.V().experiments.XB("enable_desktop_discovery_video_abandon_pings")||Vk(R.B.V())}; ZN_=function(R){return R.B.V().experiments.XB("enable_progres_commands_lr_feeds")}; YlI=function(R){return R.B.V().experiments.XB("enable_progress_commands_lr_shorts")}; nz=function(R,w){return R.B.V().Y("html5_cue_video_for_preroll")&&w?.kind==="AD_PLACEMENT_KIND_START"?!1:R.B.V().experiments.XB("html5_load_ads_instead_of_cue")}; dZ=function(R){return R.B.V().experiments.XB("html5_preload_ads")}; Fhx=function(R){return R.B.V().experiments.XB("html5_load_empty_player_in_media_break_sub_lra")}; $z=function(R){return R.B.V().experiments.XB("html5_ssdai_enable_media_end_cue_range")}; XN=function(R){return R.B.V().Y("substitute_ad_cpn_macro_in_ssdai")}; GA=function(R){return R.B.getVideoData({playerType:1}).getPlayerResponse()?.playerConfig?.daiConfig?.enableServerStitchedDai||!1}; HL=function(R){return R.B.V().experiments.XB("enable_progress_commands_el_dai")}; x0l=function(R){R=R.B.getVideoData({playerType:1});return!!R&&R.Y("html5_preload_first_vod_video_ad")&&!R.isDaiEnabled()&&!R.isLivePlayback}; OE=function(R){return R.B.V().experiments.XB("enable_desktop_player_underlay")}; Mhl=function(R){return R.B.V().Y("html5_enable_vod_slar_with_notify_pacf")}; qz=function(R){return R.B.V().experiments.XB("enable_ads_control_flow_deterministic_id_generation")}; Cl=function(R){return R.B.V().experiments.XB("html5_cuepoint_identifier_logging")}; j5x=function(R){return R.B.V().Y("html5_recognize_predict_start_cue_point")}; J_b=function(R){return R.B.V().experiments.XB("should_ignore_cuepoints_during_lifa_preroll")}; T6L=function(R){switch(R){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}}; dc=function(){if(nU===null){nU=new iNH;Vh(mG).C="b";var R=Vh(mG);let w=dq(R)=="h"||dq(R)=="b",p=!(Ub(),!1);w&&p&&(R.Jl=!0,R.PS=new Q5d)}return nU}; hOd=function(R,w,p){R.L[w]=p}; g$d=function(R){switch(R){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}}; Yz=function(R,w,p){const r=p.I7,f=p.V0,G=p.listener;p=p.FW;if(R.L.has(w))MY("Unexpected registration of layout in LidarApi");else{if(p){if(R.C.has(p))return;R.C.add(p)}R.L.set(w,G);Ui(Ub().gB,"fmd",1);lg(Vh(mG),r);hOd(dc(),w,{tv:()=>{if(!f)return{};const I=R.B.getPresentingPlayerType(!0);return R.B.getVideoData({playerType:I})?.isAd()?{currentTime:R.s0.get().getCurrentTimeSec(I,!1,void 0),duration:f,isPlaying:ZD(R.s0.get(),I).isPlaying(),isVpaid:!1,isYouTube:!0,volume:R.s0.get().isMuted()?0:R.s0.get().getVolume()/ 100}:{}}})}}; FN=function(R,w){R.L.has(w)?(R.L.delete(w),delete dc().L[w]):MY("Unexpected unregistration of layout in LidarApi")}; HN6=function(R,w){if(R.B.isLifaAdPlaying()){var p=R.B.gy(!0,!0);R.D(w,p.width*.5*1.1,p.height*.25*1.1,p.width*.5*.9,p.height*.5*.9)}}; kBW=function(R,w){const p={};v$W(R,p,w);N6I(p);p.LACT=jt(()=>r1().toString()); p.VIS=jt(()=>R.getVisibilityState().toString()); p.SDKV="h.3.0";p.VOL=jt(()=>R.isMuted()?"0":Math.round(R.getVolume()).toString()); p.VED="";return p}; UcY=function(R,w){const p={};if(w||!R||!R.kind)return p;if(R.kind==="AD_PLACEMENT_KIND_MILLISECONDS"||R.kind==="AD_PLACEMENT_KIND_CUE_POINT_TRIGGERED"){if(!R.adTimeOffset||!R.adTimeOffset.offsetStartMilliseconds)return g.LF(Error("malformed AdPlacementConfig")),p;p.MIDROLL_POS=jt(K$(Math.round(ls(R.adTimeOffset.offsetStartMilliseconds)/1E3).toString()))}else p.MIDROLL_POS=jt(K$("0"));return p}; jt=function(R){return{toString(){return R()}}}; SlP=function(R,w,p){if(!p||g.Jt(p))return R;const r=Object.assign({},R),f=w?encodeURIComponent:G=>G; R=(G,I)=>{(I=p[I])&&(r[G]=f(I))}; R("DV_VIEWABILITY","doubleVerifyViewability");R("IAS_VIEWABILITY","integralAdsViewability");R("MOAT_INIT","moatInit");R("MOAT_VIEWABILITY","moatViewability");R=(G,I)=>{(I=p[I])&&(r[G]=I)}; R("GOOGLE_VIEWABILITY","googleViewability");R("VIEWABILITY","viewability");return r}; v$W=function(R,w,p){w.CPN=jt(()=>{var r;(r=R.getVideoData({playerType:1}))?r=r.clientPlaybackNonce:(g.AO(Error("Video data is null.")),r=null);return r}); w.AD_MT=jt(()=>{if(p!=null)var r=p;else R.V().Y("enable_h5_shorts_ad_fill_ad_mt_macro")||R.V().Y("enable_desktop_discovery_pings_ad_mt_macro")||Vk(R.V())?(r=R.getPresentingPlayerType(!0),r=R.getVideoData({playerType:r})?.isAd()?R.getCurrentTime({playerType:r,Lo:!1}):0):r=R.getCurrentTime({playerType:2,Lo:!1});return RnY(r)}); w.MT=jt(()=>RnY(R.getCurrentTime({playerType:1,Lo:!1}))); w.P_H=jt(()=>R.L_().lA().height.toString()); w.P_W=jt(()=>R.L_().lA().width.toString()); w.PV_H=jt(()=>R.L_().getVideoContentRect().height.toString()); w.PV_W=jt(()=>R.L_().getVideoContentRect().width.toString())}; RnY=function(R){return Math.round(Math.max(0,R*1E3)).toString()}; N6I=function(R){R.CONN=jt(K$("0"));R.WT=jt(()=>Date.now().toString())}; wJH=async function(R,w,p,r,f){const G=!!w.scrubReferrer;p=g.MG(w.baseUrl,SlP(p,G,r));r={};if(w.headers){var I=R.G();I=I.L?await I.L:I.getValue();for(const C of w.headers)switch(C.headerType){case "VISITOR_ID":g.n("VISITOR_DATA")&&(r["X-Goog-Visitor-Id"]=g.n("VISITOR_DATA"));break;case "EOM_VISITOR_ID":g.n("EOM_VISITOR_DATA")&&(r["X-Goog-EOM-Visitor-Id"]=g.n("EOM_VISITOR_DATA"));break;case "USER_AUTH":I&&(r.Authorization=`Bearer ${I}`);break;case "PLUS_PAGE_ID":(w=R.K())&&(r["X-Goog-PageId"]=w);break; case "AUTH_USER":w=R.L();!I&&w&&(r["X-Goog-AuthUser"]=w);break;case "DATASYNC_ID":R.O()?.XB("enable_datasync_id_header_in_web_vss_pings")&&(w=R.C(),o2(p)&&g.n("LOGGED_IN")&&w&&(r["X-YouTube-DataSync-Id"]=w))}"X-Goog-EOM-Visitor-Id"in r&&"X-Goog-Visitor-Id"in r&&delete r["X-Goog-Visitor-Id"]}g.Ki(p,void 0,G,Object.keys(r).length!==0?r:void 0,"",!0,f)}; Po=function(R,w,p){typeof p==="string"?R.B.getVideoData({playerType:1}).DY(w,p):R.B.getVideoData({playerType:1}).Ty(w,p)}; M7=function(R,w){R.B.sendVideoStatsEngageEvent(w,void 0,2)}; Y4l=function(R,w,p,r=[],f,G){const I=zA(R.C.get(),w);if(I){var C=R.kB.get().Lv(w,p),u=n2(R,Jz(I),I,f,G);r.forEach((m,z)=>{m.baseUrl&&(R.O.send(m.baseUrl,u,C,m.attributionSrcMode),m.serializedAdPingMetadata&&R.qr.L("ADS_CLIENT_EVENT_TYPE_PING_DISPATCHED",void 0,void 0,void 0,void 0,I,new pJr(m,z),void 0,void 0,I.adLayoutLoggingData))})}else MY("Trying to track from an unknown layout.",void 0,void 0,{layoutId:w, trackingType:p})}; TT=function(R,w){R.L.has(w.nH())?MY("Trying to register an existing AdErrorInfoSupplier."):R.L.set(w.nH(),w)}; ii=function(R,w){R.L.delete(w.nH())||MY("Trying to unregister a AdErrorInfoSupplier that has not been registered yet.")}; Mm=function(R,w){g.Rv("adsClientStateChange",w)}; rzI=function(R,w,p,r,f){const G=zA(R.C.get(),p);G?(p=n2(R,Jz(G),G,void 0,void 0,r),w.hasOwnProperty("baseUrl")?R.G.send(w,p):R.O.send(w,p,{},f)):MY("Trying to ping from an unknown layout",void 0,void 0,{layoutId:p})}; n2=function(R,w,p,r,f,G){const I=p?fDI(R):{},C=p?GTd(R,p.layoutId):{},u=IDW(R),m=f??Ut(R.dN.get(),2)?.clientPlaybackNonce;R={...kBW(R.B,r),...UcY(w.adPlacementConfig,p?.renderingContent!==void 0),...C,...I,...u,FINAL:jt(()=>"1"), AD_CPN:jt(()=>m||"")}; p?.renderingContent!==void 0||(R.SLOT_POS=jt(()=>(w.x9||0).toString())); p={};G=Object.assign({},R,G);for(const z of Object.values(Cir))R=G[z],R!=null&&R.toString()!=null&&(p[z]=R.toString());return p}; Jz=function(R){const w=R.clientMetadata.FB("metadata_type_ad_placement_config");R=R.clientMetadata.FB("metadata_type_media_sub_layout_index");return{adPlacementConfig:w,x9:R}}; fDI=function(R){const w={},p=R.oW?.PW();p!=null&&(w.SURVEY_ELAPSED_MS=jt(()=>Math.round(p*1E3).toString())); w.SURVEY_LOCAL_TIME_EPOCH_S=jt(()=>Math.round(Date.now()/1E3).toString()); return w}; GTd=function(R,w){R=R.L.get(w);return R?(R=R.xn())?{YT_ERROR_CODE:R.Kz.toString(),ERRORCODE:R.v7.toString(),ERROR_MSG:R.errorMessage}:{}:{}}; IDW=function(R){const w={},p=R.B.getVideoData({playerType:1});w.ASR=jt(()=>p?.Nz??null); w.EI=jt(()=>p?.eventId??null); return w}; Ut=function(R,w){const p=R.B.getVideoData({playerType:w});return p?R.Oa(p,w||R.B.getPresentingPlayerType(!0)):null}; Qz=function(R,w,p){const r=R.Oa(w,p);R.q6=r;R.listeners.forEach(f=>{f.Hg(r)})}; uNr=function(R,w){R.Xx=R.Xx.filter(p=>p!==w)}; hz=function(R,w){g.pc(R.B.getRootNode(),w)}; HJ=function(R,w){g.fc(R.B.getRootNode(),w)}; ZD=function(R,w){return R.B.getPlayerStateObject(w)}; vJ=function(R){R.B.cueVideoByPlayerVars({videoId:"empty_video"},2)}; sWr=function(R,w){const p=R.B.V();g.u8(p)||p.controlsType!=="3"||R.B.L_().Mt(w)}; Np=function(R,w,p){return R.getCurrentTimeSec(w,p)}; kz=function(R,w){w=R.dN.get().eD.get(w)??null;if(w===null)return MY("Expected ad video start time on playback timeline"),0;R=R.B.getCurrentTime({playerType:2,Lo:!0});return Rf.adPlacementRenderer).filter(f=>!(!f||!f.renderer)); if(!r.length&&!p.length)return{YO:[],adSlots:p,aT:!1,ssdaiAdsConfig:void 0};if(w.end>0){const f=w.end.toString();r.forEach(G=>{(G=G.config&&G.config.adPlacementConfig)&&G.kind==="AD_PLACEMENT_KIND_MILLISECONDS"&&G.adTimeOffset&&G.adTimeOffset.offsetEndMilliseconds==="-1"&&G.adTimeOffset.offsetEndMilliseconds!==f&&(G.adTimeOffset.offsetEndMilliseconds=f)}); p.map(G=>g.F(G,xN)).forEach(G=>{(G=G?.slotEntryTrigger?.mediaTimeRangeTrigger)&&G.offsetEndMilliseconds==="-1"&&(G.offsetEndMilliseconds=f)})}return{YO:r, adSlots:p,aT:!1,ssdaiAdsConfig:R.ssdaiAdsConfig}}; W5L=function(R,w,p){w=g.gd(w,r=>new BcL(r,p,r.id)); g.m1(R.B,"onAdUxUpdate",w)}; UC=function(R,w){for(const p of R.listeners)w(p)}; xpI=function(R,w){var p=R.startSecs+R.W1;p=p<=0?null:p;if(p===null)return null;switch(R.event){case "start":case "continue":case "stop":break;case "predictStart":if(w)break;return null;default:return null}w=Math.max(R.startSecs,0);return{Eg:new Oc(w,p),KW:new Ji(w,p-w,R.context,R.identifier,R.event,R.L)}}; qs_=function(R,w,p){const r=g.VU(R.L,w);if(r>=0)return w;w=-r-1;return w>=R.L.length||R.L[w]>p?null:R.L[w]}; lDH=function(R,w){R.Wf.push(w);let p=!1;for(const r of R.listeners)p=r.Rr(w)||p;R.G=p;Cl(R.BS.get())&&Po(R.D$.get(),"onci",`cpi.${w.identifier};cpe.${w.event};cps.${w.startSecs};cbi.${p}`)}; qCd=function(R,w){Mm(R.D$.get(),{cuepointTrigger:{event:L5d(w.event),cuepointId:w.identifier,totalCueDurationMs:w.W1*1E3,playheadTimeMs:w.L,cueStartTimeMs:w.startSecs*1E3,cuepointReceivedTimeMs:Date.now(),contentCpn:R.B.getVideoData({playerType:1}).clientPlaybackNonce}})}; L5d=function(R){switch(R){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 T1(R,"Unexpected cuepoint event")}}; Azd=function(R){switch(R){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:T1(R,"unknown transitionReason")}}; K5_=function(R,w,p,r,f){try{{const I=w.V();if(g.t5(I))var G=new bU_(R,w,p,r,f);else if(g.Eg(I))G=new yzr(R,w,p,r,f);else if(Lb(I))G=new Vtx(R,w,p,r,f);else if(g.dQ(I))G=new ozP(R,w,p,r,f);else if(g.Cb(I))G=new ttI(R,w,p,r,f);else throw new TypeError("Unknown web interface");}return G}catch{return r=w.V(),MY("Unexpected interface not supported in Ads Control Flow",void 0,void 0,{platform:r.L.cplatform,interface:r.L.c,rFB:r.L.cver,KLS:r.L.ctheme,IU0:r.L.cplayer,AFS:r.playerStyle}),new OUW(R,w,p,f)}}; St=function(R){return R.L.Fg}; EzY=function(R){R=R.V();return GE(R)&&!g.f2(R)&&R.playerStyle==="desktop-polymer"}; Dpr=function(R){const w=g.Up("html5-video-player");w&&g.M(w,"ytp-ad-display-override",R)}; enY=function(R){const w=new g.RX({j:"div",Z:"ytp-ad-text-overlay",N:[{j:"div",Z:"ytp-ad-overlay-ad-info-button-container"},{j:"div",Z:"ytp-ad-overlay-close-container",N:[{j:"button",Z:"ytp-ad-overlay-close-button",N:[qY(wj)]}]},{j:"div",Z:"ytp-ad-overlay-title",fB:"{{title}}"},{j:"div",Z:"ytp-ad-overlay-desc",fB:"{{description}}"},{j:"div",E0:["ytp-ad-overlay-link-inline-block","ytp-ad-overlay-link"],fB:"{{displayUrl}}"}]});R.W(w.KB("ytp-ad-overlay-title"),"click",p=>{pT(R,w.element,p)}); R.W(w.KB("ytp-ad-overlay-link"),"click",p=>{pT(R,w.element,p)}); R.W(w.KB("ytp-ad-overlay-close-container"),"click",R.jI);w.hide();return w}; var Ac6=function(R){return Oud[l[5]](this,10,8047,R)}; MtL=function(R){const w=new g.RX({j:"div",E0:["ytp-ad-text-overlay","ytp-ad-enhanced-overlay"],N:[{j:"div",Z:"ytp-ad-overlay-ad-info-button-container"},{j:"div",Z:"ytp-ad-overlay-close-container",N:[{j:"button",Z:"ytp-ad-overlay-close-button",N:[qY(wj)]}]},{j:"div",Z:"ytp-ad-overlay-text-image",N:[{j:"img",A:{src:"{{imageUrl}}"}}]},{j:"div",Z:"ytp-ad-overlay-title",fB:"{{title}}"},{j:"div",Z:"ytp-ad-overlay-desc",fB:"{{description}}"},{j:"div",E0:["ytp-ad-overlay-link-inline-block","ytp-ad-overlay-link"], fB:"{{displayUrl}}"}]});R.W(w.KB("ytp-ad-overlay-title"),"click",p=>{pT(R,w.element,p)}); R.W(w.KB("ytp-ad-overlay-link"),"click",p=>{pT(R,w.element,p)}); R.W(w.KB("ytp-ad-overlay-close-container"),"click",R.jI);R.W(w.KB("ytp-ad-overlay-text-image"),"click",R.cB);w.hide();return w}; czH=function(R){const w=new g.RX({j:"div",Z:"ytp-ad-image-overlay",N:[{j:"div",Z:"ytp-ad-overlay-ad-info-button-container"},{j:"div",Z:"ytp-ad-overlay-close-container",N:[{j:"button",Z:"ytp-ad-overlay-close-button",N:[qY(wj)]}]},{j:"div",Z:"ytp-ad-overlay-image",N:[{j:"img",A:{src:"{{imageUrl}}",width:"{{width}}",height:"{{height}}"}}]}]});R.W(w.KB("ytp-ad-overlay-image"),"click",p=>{pT(R,w.element,p)}); R.W(w.KB("ytp-ad-overlay-close-container"),"click",R.jI);w.hide();return w}; pT=function(R,w,p){const r=g.ht(R.macros),f=g.RL(w);r.AW={toString:()=>f.width.toString()}; r.AH={toString:()=>f.height.toString()}; const G=g.UW(p,w).floor();r.I_X={toString:()=>G.x.toString()}; r.NX={toString:()=>G.x.toString()}; r.I_Y={toString:()=>G.y.toString()}; r.NY={toString:()=>G.y.toString()}; r.NM={toString:()=>R.D.toString()}; for(const I of R.J)R.layoutId?zE(R.Vk,I,R.layoutId,r):g.LF(Error("Missing layoutId for invideo_overlay_ad."));R.api.pauseVideo()}; PiL=function(R,w){R=R.api.getRootNode();g.M(R,"ytp-ad-overlay-open",w);g.M(R,"ytp-ad-overlay-closed",!w)}; fT=function(R,w){if(w){var p=g.F(w,AW)||null;p==null?g.LF(Error("AdInfoRenderer did not contain an AdHoverTextButtonRenderer.")):(w=g.Up("video-ads ytp-ad-module")||null,w==null?g.LF(Error("Could not locate the root ads container element to attach the ad info dialog.")):(R.S=new g.RX({j:"div",Z:"ytp-ad-overlay-ad-info-dialog-container"}),g.K(R,R.S),R.S.gN(w),w=new rj(R.api,R.layoutId,R.interactionLoggingClientData,R.Vk,R.S.element,!1),g.K(R,w),w.init(gw("ad-info-hover-text-button"),p,R.macros),R.K? (w.gN(R.K,0),w.subscribe("f",R.mq,R),w.subscribe("e",R.dk,R),R.W(R.K,"click",R.Mr),R.W(g.Up("ytp-ad-button",w.element),"click",()=>{if(g.F(g.F(p.button,ky)?.serviceEndpoint,FKl))R.nB=R.api.getPlayerState(1)===2,R.api.pauseVideo();else R.api.onAdUxClicked("ad-info-hover-text-button",R.layoutId)}),R.q0=w):g.LF(Error("Ad info button container within overlay ad was not present."))))}else g.AO(Error("AdInfoRenderer was not present within InvideoOverlayAdRenderer."))}; aD_=function(R,w){if(Gc(R,IX)||R.api.isMinimized())return!1;const p=Uk(w.title),r=Uk(w.description);if(g.fj(p)||g.fj(r))return!1;R.createServerVe(R.O.element,w.trackingParams||null);R.O.updateValue("title",Uk(w.title));R.O.updateValue("description",Uk(w.description));R.O.updateValue("displayUrl",Uk(w.displayUrl));w.navigationEndpoint&&g.Bk(R.J,w.navigationEndpoint);R.O.show();R.O0.start();R.logVisibility(R.O.element,!0);R.W(R.O.element,"mouseover",()=>{R.D++}); return!0}; $pH=function(R,w){if(Gc(R,IX)||R.api.isMinimized())return!1;const p=Uk(w.title),r=Uk(w.description);if(g.fj(p)||g.fj(r))return!1;R.createServerVe(R.C.element,w.trackingParams||null);R.C.updateValue("title",Uk(w.title));R.C.updateValue("description",Uk(w.description));R.C.updateValue("displayUrl",Uk(w.displayUrl));R.C.updateValue("imageUrl",H5H(w.image));w.navigationEndpoint&&g.Bk(R.J,w.navigationEndpoint);R.Qk=w.imageNavigationEndpoint||null;R.C.show();R.O0.start();R.logVisibility(R.C.element,!0); R.W(R.C.element,"mouseover",()=>{R.D++}); return!0}; XJY=function(R,w){if(R.api.isMinimized())return!1;const p=vdr(w.image);let r=p;p.width {R.D++;R.api.gk("invideo-overlay",R.layoutId)}); R.W(R.L.element,"mouseout",()=>{R.api.sf("invideo-overlay",R.layoutId)}); return!0}; nzr=function(R){return R.G&&R.G.closeButton&&R.G.closeButton.buttonRenderer&&(R=R.G.closeButton.buttonRenderer,R.serviceEndpoint)?[R.serviceEndpoint]:[]}; Gc=function(R,w){var p=R.api.L_().lA();const r=R.api.gy(!0,!1);return(w=jO(p,p.height-(r.height+r.top),w))?(R.YY&&w&&(p=g.ht(R.macros),p.ERRORCODE=w.v7.toString(),p.ERROR_MSG=w.errorMessage,R.layoutId?zE(R.Vk,R.YY,R.layoutId,p):g.LF(Error("Missing layoutId for invideo_overlay_ad."))),!0):!1}; dpD=function(R,w){R=R.api.getRootNode();g.M(R,"ytp-ad-overlay-open",w);g.M(R,"ytp-ad-overlay-closed",!w)}; ZUd=function(R){const w=g.Up("html5-video-player");w&&g.M(w,"ytp-ad-display-override",R)}; uw=function(R,w,p=!1){R.L&&(w?R.L.hide():R.L.show(),p&&R.L instanceof CT&&!R.L.J&&U56(R.L,!1));R.C&&(w?R.C.show():R.C.hide())}; YCI=function(R){function w(p){return{toString:()=>p()}} R.macros.SURVEY_LOCAL_TIME_EPOCH_S=w(()=>{const p=new Date;return(Math.round(p.valueOf()/1E3)+-1*p.getTimezoneOffset()*60).toString()}); R.macros.SURVEY_ELAPSED_MS=w(()=>(Date.now()-R.G).toString())}; F5Y=function(R,w){w=g.Su(w);g.L$(R.questionText,w);R.J&&R.questionText.setAttribute("id",gw("survey-question-text"))}; Jzl=function(R,w,p,r){r=new jWd(R.api,R.layoutId,R.interactionLoggingClientData,R.Vk,r,R.O0);r.gN(R.answers);r.init(gw("survey-answer"),w,p);R.J&&(w=R.questionText.getAttribute("id"),w!=null&&(r.L!==null?r.L.C.setAttribute("aria-describedby",w):r.answer.getElementsByTagName("button")[0].setAttribute("aria-describedby",w)));R.C.push(r)}; QWP=function(R,w){if(w){var p=w.background;p&&g.F(p,TcY)&&(p=(p=g.F(p,TcY).image)&&V$(p)||"",g.fj(p)?g.AO(Error("Found ThumbnailDetails without valid image URL")):g.Z2(R.YY,"backgroundImage",`url(${p})`));if(w.durationMilliseconds==null||w.durationMilliseconds===void 0||w.durationMilliseconds===0)R=Error("durationMilliseconds unset or 0 for SurveyAdQuestionCommon: "+`${JSON.stringify(w)}`),g.LF(R);else{R.G=g.c6();R.L=new sB(R.api,w.durationMilliseconds);g.K(R,R.L);if(R.L&&w.instreamAdPlayerOverlay&& g.F(w.instreamAdPlayerOverlay,q2))try{var r=new iUd(R.api,R.layoutId,R.interactionLoggingClientData,R.Vk,R.L);r.gN(R.playerOverlay);r.init(gw("survey-player-overlay"),g.F(w.instreamAdPlayerOverlay,q2),R.macros);R.O=r;g.K(R,r);R.D()}catch(f){r=Error("ISAPOR had an error when initializing. Error: "+`${f} SurveyAdQuestionCommon: ${JSON.stringify(w)}`),g.LF(r)}else r=Error("ISAPOR was not present in renderer. SurveyAdQuestionCommon: "+`${JSON.stringify(w)}`),g.LF(r);R.L&&w.durationMilliseconds&&w.durationMilliseconds> 0?(w=new mY(R.api,R.L),w.gN(R.playerOverlay),g.K(R,w)):(R=Error("Survey progress bar was not added. SurveyAdQuestionCommon: "+`${JSON.stringify(w)}`),g.LF(R))}}else g.LF(Error("addCommonComponents() needs to be called before starting countdown."))}; gzP=function(R,w,p){R.noneOfTheAbove=new hn_(R.api,R.layoutId,R.interactionLoggingClientData,R.Vk);R.noneOfTheAbove.gN(R.answers);R.noneOfTheAbove.init(gw("survey-none-of-the-above"),w,p)}; HUY=function(R){R.C.forEach(w=>{w.L.toggleButton(!1)}); uw(R.O,zc(R),!0)}; zc=function(R){return R.C.some(w=>w.L.isToggled())||R.noneOfTheAbove.button.isToggled()}; kTr=function(R,w){const p=R.C[w];R.O?.dispose();g.F(p,Lt)?vzH(R,g.F(p,Lt),R.macros):g.F(p,l_)&&NcP(R,g.F(p,l_),R.macros);R.L=w}; vzH=function(R,w,p){const r=new Up6(R.api,R.layoutId,R.interactionLoggingClientData,R.Vk,R.G.bind(R));r.gN(R.K);r.init(gw("survey-question-single-select"),w,p);R.api.V().Y("supports_multi_step_on_desktop")?R.O=r:R.questions.push(r);g.K(R,r)}; NcP=function(R,w,p){const r=new SC_(R.api,R.layoutId,R.interactionLoggingClientData,R.Vk,R.G.bind(R));r.gN(R.K);r.init(gw("survey-question-multi-select"),w,p);R.api.V().Y("supports_multi_step_on_desktop")?R.O=r:R.questions.push(r);g.K(R,r)}; RbH=function(R,w){w=w&&V$(w)||"";if(g.fj(w))g.AO(Error("Found ThumbnailDetails without valid image URL"));else{var p=R.style;R=R.style.cssText;const r=document.implementation.createHTMLDocument("").createElement("DIV");r.style.cssText=R;R=X8b(r.style);p.cssText=[R,`background-image:url("${w}");`].join("")}}; wuH=function(R){const w=g.Up("html5-video-player");w&&g.M(w,"ytp-ad-display-override",R)}; puD=function(R){switch(R.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}}; rPW=function(R){const w=g.Up("html5-video-player");w&&g.M(w,"ytp-ad-display-override",R)}; fPP=function(R){const w=g.Up("html5-video-player");w&&g.M(w,"ytp-ad-display-override",R)}; Gcl=function(R){if(!R.adAvatar||!g.F(R.adAvatar,Bu))return g.LF(Error("VideoInterstitialButtonedCenteredLayoutRenderer has no avatar.")),!1;if(!R.headline)return g.LF(Error("VideoInterstitialButtonedCenteredLayoutRenderer has no headline.")),!1;if(!R.adBadge||!g.F(R.adBadge,Wu))return g.LF(Error("VideoInterstitialButtonedCenteredLayoutRenderer has no ad badge.")),!1;if(!R.adButton||!g.F(R.adButton,xG))return g.LF(Error("VideoInterstitialButtonedCenteredLayoutRenderer has no action button.")),!1;if(!R.adInfoRenderer|| !g.F(R.adInfoRenderer,AW))return g.LF(Error("VideoInterstitialButtonedCenteredLayoutRenderer has no ad info button.")),!1;R=R.durationMilliseconds||0;return typeof R!=="number"||R<=0?(g.LF(Error("durationMilliseconds was specified incorrectly in "+`VideoInterstitialButtonedCenteredLayoutRenderer with a value of: ${R}`)),!1):!0}; LYb=function(R,w,p,r,f={},G=!1,I=!1){switch(R){case "invideo-overlay":R=new IPb(w,r,f,p);break;case "player-overlay":R=new Cw_(w,r,f,p,new lw(w),I);break;case "player-overlay-layout":R=new u6d(w,r,f,p,new lw(w));break;case "survey":R=new sXI(w,r,f,p);break;case "ad-action-interstitial":R=new me_(w,r,f,p,G,I);break;case "video-interstitial-buttoned-centered":R=new zbd(w,r,f,p);break;case "survey-interstitial":R=new Bj_(w,r,f,p);break;case "ad-message":R=new WYW(w,r,f,p,new lw(w,1));break;case "player-underlay":R= new xed(w,r,f,p);break;case "display-underlay-text-grid-cards":R=new lPl(w,r,f,p,new lw(w));break;default:return null}return R}; qBY=function(R,w){R=g.ia(R.components,w.id,null);R==null&&g.AO(Error("Component not found for element id: "+w.id));return R||null}; LT=function(R,w){w===R.fU&&(R.fU=void 0)}; m0P=function(R,w,p=[],r="",f="",G,I){const C=St(R.L).Qm,u=R.player.getVideoData({playerType:1});u&&u.getPlayerResponse();u&&u.PB();p=APb(w,p,C,St(R.L).Tn);lUd(St(R.L).J$,r,p.Bl,p.ND,w,f,G,I)}; bTI=function(R){var w=St(R.L).Mk,p=w.G().yO("SLOT_TYPE_PLAYER_BYTES",1);w=Ut(w.dN.get(),1).clientPlaybackNonce;let r=!1;for(const f of p)p=f.slotType==="SLOT_TYPE_PLAYER_BYTES"&&f.slotEntryTrigger instanceof Kt?f.slotEntryTrigger.TV:void 0,p&&p===w&&(r&&MY("More than 1 preroll playerBytes slot detected",f),r=!0);r||St(R.L).xc.TB()}; yPD=function(R){R=St(R.L).Dx;let w="";for(const p of R.MJ.keys()){if(p.slotType==="SLOT_TYPE_PLAYER_BYTES"&&p.R0==="core")return!0;w+=p.slotType+" "}Math.random()<.01&&MY("Ads Playback Not Managed By Controlflow",void 0,null,{slotTypes:w});return!1}; qe=function(R){R=St(R.L).Dx;for(const w of R.MJ.values())if(w.layoutType==="LAYOUT_TYPE_MEDIA_BREAK")return!0;return!1}; VFd=function(R){R.created!==R.loaded&&MY("Created and loaded are out of sync")}; APb=function(R,w,p,r){w={Bl:[],ND:w};for(const G of R){if(!G)continue;if(G.renderer==null)continue;R=G.renderer;if(!p.B.V().Y("html5_enable_vod_lasr_with_notify_pacf")){var f=r;g.F(R.sandwichedLinearAdRenderer?.adVideoStart,pl)?(f=wNb(g.F(R.sandwichedLinearAdRenderer?.adVideoStart,pl),f),g.Ek(R.sandwichedLinearAdRenderer.adVideoStart,pl,f)):g.F(R.linearAdSequenceRenderer?.adStart,pl)&&(f=wNb(g.F(R.linearAdSequenceRenderer?.adStart,pl),f),g.Ek(R.linearAdSequenceRenderer.adStart,pl,f))}w.Bl.push(G)}return w}; g.AP=function(R){if(typeof DOMParser!="undefined")return us(new DOMParser,R2(R),"application/xml");throw Error("Your browser does not support loading xml documents");}; g.oGI=function(R){const w=R.V();return w.WB&&!w.O&&g.zI(w)?R.isEmbedsShortsMode()?(R=R.gy(),Math.min(R.width,R.height)>=315):!R.dl():!1}; tFH=function(R){for(let w=0;w<16;++w){const p=new g.k({j:"a",Z:"ytp-suggestion-link",A:{href:"{{link}}",target:R.api.V().X,"aria-label":"{{aria_label}}"},N:[{j:"div",Z:"ytp-suggestion-image"},{j:"div",Z:"ytp-suggestion-overlay",A:{style:"{{blink_rendering_hack}}","aria-hidden":"{{aria_hidden}}"},N:[{j:"div",Z:"ytp-suggestion-title",fB:"{{title}}"},{j:"div",Z:"ytp-suggestion-author",fB:"{{author_and_views}}"},{j:"div",A:{"data-is-live":"{{is_live}}"},Z:"ytp-suggestion-duration",fB:"{{duration}}"}]}]}); g.K(R,p);const r=p.KB("ytp-suggestion-link");g.Z2(r,"transitionDelay",`${w/20}s`);R.O.W(r,"click",f=>{var G=w;if(R.C){var I=R.suggestionData[G],C=I.sessionData;R.K&&R.api.Y("web_player_log_click_before_generating_ve_conversion_params")?(R.api.logClick(R.L[G].element),G=I.dS(),I={},g.ee(R.api,I),G=g.bu(G,I),g.gH(G,R.api,f)):g.ha(f,R.api,R.K,C||void 0)&&R.api.WC(I.videoId,C,I.playlistId)}else f.preventDefault(),document.activeElement.blur()}); p.gN(R.suggestions.element);R.L.push(p);R.api.createServerVe(p.element,p)}}; OTr=function(R){if(R.api.V().Y("web_player_log_click_before_generating_ve_conversion_params")){var w=Math.floor(-R.scrollPosition/(R.G+8));const p=Math.min(w+R.columns,R.suggestionData.length)-1;for(;w<=p;w++)R.api.logVisibility(R.L[w].element,!0)}}; g.bw=function(R){var w=R.api.r_()?32:16;w=R.D/2+w;R.next.element.style.bottom=`${w}px`;R.previous.element.style.bottom=`${w}px`;w=R.scrollPosition;const p=R.containerWidth-R.suggestionData.length*(R.G+8);g.M(R.element,"ytp-scroll-min",w>=0);g.M(R.element,"ytp-scroll-max",w<=p)}; EGl=function(R){var w=R.suggestionData.length;for(let G=0;G>>0);GrL=0;g.$b(ZL,Error);ZL.prototype.name="CustomError";var QP;var Der={NONE:0,dV:1},ebd={jU:0,q0y:1,d0y:2,vYk:3},y4={S1:"a",ZD:"d",VIDEO:"v"};var MFH=class{constructor(){this.DH=0;this.L=!1;this.C=-1;this.jG=!1;this.Hu=0}isVisible(){return this.jG?this.DH>=.3:this.DH>=.5}};var V4={rV:0,TM:1},cPr={NONE:0,f1:1,zM:2};var vk="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");var oX=class{constructor(){this.C=null;this.L=!1}getValue(){return this.C}},LdH=class extends oX{constructor(R){super();this.G=R}O(R){this.C===null&&g.Ym(this.G,R)&&(this.C=R)}},PwH=class extends oX{O(R){this.C===null&&typeof R==="number"&&(this.C=R)}},qII=class extends oX{O(R){this.C===null&&typeof R==="string"&&(this.C=R)}};var aPY=class{constructor(){this.L={};this.C=!0;this.O={}}disable(){this.C=!1}enable(){this.C=!0}isEnabled(){return this.C}reset(){this.L={};this.C=!0;this.O={}}};var $e_=R=>{km(R,"od",Der);km(R,"opac",V4).L=!0;km(R,"sbeos",V4).L=!0;km(R,"prf",V4).L=!0;km(R,"mwt",V4).L=!0;km(R,"iogeo",V4)};var Q7=document,V8=window;var XuD=VD(1,!0),mu=VD(610401301,!1);VD(899588437,!1);VD(772657768,!0);VD(513659523,!1);VD(568333945,!0);var $db=VD(1331761403,!1);VD(651175828,!1);VD(722764542,!1);VD(748402145,!1);VD(748402146,!1);var mU=VD(748402147,!0);VD(824648567,!0);VD(824656860,!0);VD(333098724,!1);VD(861377723,!1);VD(861377724,!1);VD(869336903,!1);VD(882674507,!1);VD(2147483644,!1);VD(2147483645,!1);VD(2147483646,XuD);VD(2147483647,!0);var z1=!!g.yD("yt.config_.EXPERIMENTS_FLAGS.html5_enable_client_hints_override");var cYx=/&/g,PHD=//g,$xW=/"/g,X6P=/'/g,nbH=/\x00/g,M_I=/[\x00&<>"']/;var Ww,nGd=g.qx.navigator;Ww=nGd?nGd.userAgentData||null:null;var Kj=globalThis.trustedTypes,E3;var ea=class{constructor(R){this.L=R}toString(){return this.L+""}};var Pw=class{constructor(R){this.L=R}toString(){return this.L}},OdL=new Pw("about:invalid#zClosurez");var Xr=class{constructor(R){this.n$=R}},deH=nj("tel"),ZT_=nj("sms"),d2=[nj("data"),nj("http"),nj("https"),nj("mailto"),nj("ftp"),new Xr(R=>/^[^:]*([/?#]|$)/.test(R))],Kdb=/^\s*(?!javascript:)(?:[\w+.-]+:|[^:/?#]*(?:[/?#]|$))/i;var ic=class{constructor(R){this.L=R}toString(){return this.L+""}};var vw=class{constructor(R){this.L=R}toString(){return this.L+""}};var RB=class{constructor(R){this.L=R}toString(){return this.L}};var IB={};Op[" "]=function(){};var jE,rk,uRd,YBx,FYl,jXl,hq,$X,tP;g.DE=qi();g.BE=A$();g.gx=lc("Edge");g.ef=g.gx||g.BE;jE=lc("Gecko")&&!(IK(g.s3(),"WebKit")&&!lc("Edge"))&&!(lc("Trident")||lc("MSIE"))&&!lc("Edge");g.f$=IK(g.s3(),"WebKit")&&!lc("Edge");rk=oB();uRd=tJ();g.lB=bs();YBx=yP();FYl=lc("iPad");jXl=lc("iPod");hq=VP();$X=IK(g.s3(),"KaiOS"); a:{let R="";const w=function(){const p=g.s3();if(jE)return/rv:([^\);]+)(\)|;)/.exec(p);if(g.gx)return/Edge\/([\d\.]+)/.exec(p);if(g.BE)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(p);if(g.f$)return/WebKit\/(\S+)/.exec(p);if(g.DE)return/(?:Version)[ \/]?(\S+)/.exec(p)}(); w&&(R=w?w[1]:"");if(g.BE){var OB;const p=g.qx.document;OB=p?p.documentMode:void 0;if(OB!=null&&OB>parseFloat(R)){tP=String(OB);break a}}tP=R}var Ep=tP,YIL={};var Be,We;g.PK=yq();Be=yP()||lc("iPod");We=lc("iPad");g.KT=t$();g.Io=Vq();g.tx=oK()&&!VP();var CcW=!g.BE&&!oK();g.t=g.Xx.prototype;g.t.clone=function(){return new g.Xx(this.x,this.y)}; g.t.equals=function(R){return R instanceof g.Xx&&n0(this,R)}; 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(R,w){this.x*=R;this.y*=typeof w==="number"?w:R;return this};g.t=g.dg.prototype;g.t.clone=function(){return new g.dg(this.width,this.height)}; g.t.aspectRatio=function(){return this.width/this.height}; g.t.isEmpty=function(){return!Y2(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(R,w){this.width*=R;this.height*=typeof w==="number"?w:R;return this};var bt=class{constructor(R,w){this.L=R===ys&&w||""}toString(){return this.L}},ys={};new bt(ys,"");var jw=/^[a-z][a-z\d-]*$/i,TdD="APPLET BASE EMBED IFRAME LINK MATH META OBJECT SCRIPT STYLE SVG TEMPLATE".split(" "),QlI="AREA BR COL COMMAND HR IMG INPUT KEYGEN PARAM SOURCE TRACK WBR".split(" "),gb_=["action","formaction","href"];var Sw={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=Tj.prototype;g.t.zk=function(R){return HD(this.L,R)}; g.t.getElementsByTagName=function(R,w){return(w||this.L).getElementsByTagName(String(R))}; g.t.KB=function(R){return g.Up(R,this.L)}; g.t.setProperties=Rm;g.t.createElement=function(R){return Im(this.L,R)}; g.t.appendChild=g.zM;g.t.append=function(R,w){C$(is(R),R,arguments,1)}; g.t.canHaveChildren=function(R){if(R.nodeType!=1)return!1;switch(R.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.x7;g.t.getChildren=function(R){return R.children}; g.t.contains=g.lA;g.t.isFocusable=AG;var JPP=class{constructor(){this.L=this.zJ=null}};var Tjl=class{now(){return 0}C(){return 0}O(){return 0}L(){return 0}};var iTH=class extends Tjl{constructor(){super();if(!om())throw Error();}now(){return om()&&V8.performance.now?V8.performance.now():super.now()}C(){return om()&&V8.performance.memory?V8.performance.memory.totalJSHeapSize||0:super.C()}O(){return om()&&V8.performance.memory?V8.performance.memory.usedJSHeapSize||0:super.O()}L(){return om()&&V8.performance.memory?V8.performance.memory.jsHeapSizeLimit||0:super.L()}};var Ip=tG(R=>typeof R==="number"),Ge=tG(R=>typeof R==="string"),Lv=tG(R=>R!=null&&typeof R==="object"&&typeof R.then==="function"),$QH=tG(R=>typeof R==="function"),QXd=tG(R=>!!R&&(typeof R==="object"||typeof R==="function"));var ZxD=OW("AnimationEnd"),i2=OW("TransitionEnd");g.t=cc.prototype;g.t.getHeight=function(){return this.bottom-this.top}; g.t.clone=function(){return new cc(this.top,this.right,this.bottom,this.left)}; g.t.contains=function(R){return this&&R?R instanceof cc?R.left>=this.left&&R.right<=this.right&&R.top>=this.top&&R.bottom<=this.bottom:R.x>=this.left&&R.x<=this.right&&R.y>=this.top&&R.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(R,w){w=typeof w==="number"?w:R;this.left*=R;this.right*=R;this.top*=w;this.bottom*=w;return this};g.t=g.X8.prototype;g.t.clone=function(){return new g.X8(this.left,this.top,this.width,this.height)}; g.t.contains=function(R){return R instanceof g.Xx?R.x>=this.left&&R.x<=this.left+this.width&&R.y>=this.top&&R.y<=this.top+this.height:this.left<=R.left&&this.left+this.width>=R.left+R.width&&this.top<=R.top&&this.top+this.height>=R.top+R.height}; g.t.getSize=function(){return new g.dg(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(R,w){w=typeof w==="number"?w:R;this.left*=R;this.width*=R;this.top*=w;this.height*=w;return this};var vbY=/^--.+/,F8={};var UxD=D2(()=>{let R=!1;try{const w=Object.defineProperty({},"passive",{get(){R=!0}});g.qx.addEventListener("test",null,w)}catch(w){}return R});var hbD=class{isVisible(){return fA(Q7)===1}};var SI6=RegExp("^https?://(\\w|-)+\\.cdn\\.ampproject\\.(net|org)(\\?|/|$)"),RVd=class{constructor(R,w,p){this.L=R;this.C=w;this.O=p}},sZ=class{constructor(R,w){this.url=R;this.L=!!w;this.depth=null}};var Sg=class{constructor(){this.O="&";this.C={};this.G=0;this.L=[]}qk(R,w,p){R=R+"//"+w+p;var r=rt_(this)-p.length;if(r<0)return"";this.L.sort((f,G)=>f-G); p=null;w="";for(let f=0;f=u.length){r-=u.length;R+=u;w=this.O;break}p=p==null?G:p}}}r="";p!=null&&(r=`${w}trn=${p}`);return R+r}};var EB=class{constructor(R,w){this.L=R;this.depth=w}},Gpr=()=>{var R=mn();const w=Math.max(R.length-1,0);var p=zY(R);R=p.L;var r=p.C;const f=p.O,G=[];p=(C,u)=>C==null?u:C; f&&G.push(new EB([f.url,f.L?2:0],p(f.depth,1)));r&&r!=f&&G.push(new EB([r.url,2],0));R.url&&R!=f&&G.push(new EB([R.url,0],p(R.depth,w)));const I=g.gd(G,(C,u)=>G.slice(0,G.length-u)); !R.url||(f||r)&&R!=f||(r=/https?:\/\/[^\/]+/.exec(R.url)?.[0]??"")&&I.push([new EB([r,1],p(R.depth,w))]);I.push([]);return g.gd(I,C=>fSL(w,C))};var wkd={ue:"allow-forms",Wb:"allow-modals",d8:"allow-orientation-lock",qU:"allow-pointer-lock",RC:"allow-popups",VZ:"allow-popups-to-escape-sandbox",Hb:"allow-presentation",AN:"allow-same-origin",NU:"allow-scripts",eX:"allow-top-navigation",Xm:"allow-top-navigation-by-user-activation"},Ca_=D2(()=>pkW());var Vh=R=>{const w="Gg";if(R.Gg&&R.hasOwnProperty(w))return R.Gg;const p=new R;R.Gg=p;R.hasOwnProperty(w);return p};var zVx=class{constructor(){this.C=new hbD;this.L=om()?new iTH:new Tjl}setInterval(R,w){return V8.setInterval(R,w)}clearInterval(R){V8.clearInterval(R)}setTimeout(R,w){return V8.setTimeout(R,w)}clearTimeout(R){V8.clearTimeout(R)}};var m6I=class{};var cr=!0,My,oL;var MI={},nA=null;var dO=/[-_.]/g,WbP={"-":"+",_:"/",".":"="},j4={};var F0=class{isEmpty(){return this.L==null}sizeBytes(){const R=iv(this);return R?R.length:0}constructor(R,w){TY(w);this.L=R;if(R!=null&&R.length===0)throw Error("ByteString should be constructed with non-empty values");}},YS;var H8=void 0;var UZ=NI("jas",!0),jj=NI(),vT=NI(),gGd=NI(),ytW=NI(),ZRH=NI(),D6H=NI(),QS=NI("m_m",!0),tP_=NI(),HT6=NI();[...Object.values({n1:1,yn:2,DR:4,o4:8,e_0:16,lG:32,GZ:64,n8:128,GM:256,EB0:512,K8:1024,ZK:2048,iG:4096,Qn:8192})];var tZ,vG_=[];vG_[UZ]=7;tZ=Object.freeze(vG_);var hU={},kS={},hZ=Object.freeze({}),PZ={},rl={};var pk=tG(R=>R>=Njd&&R<=kcW),Njd=BigInt(Number.MIN_SAFE_INTEGER),kcW=BigInt(Number.MAX_SAFE_INTEGER);var uo=0,sy=0,XK;var cT=typeof BigInt==="function"?BigInt.asIntN:void 0,qiH=typeof BigInt==="function"?BigInt.asUintN:void 0,Xq=Number.isSafeInteger,op=Number.isFinite,$9=Math.trunc,lSY=/^-?([1-9][0-9]*|0)(\.[0-9]+)?$/;var OR_={};var Uy=class{},UeD={vG:!0};var RD;var ID,Ck;var MPI=CW(0),GG={};var zG=class{constructor(R,w,p){this.buffer=R;if(p&&!w)throw Error();this.L=w}};var SBb=class{constructor(R,w,p,r){this.C=null;this.J=!1;this.K=null;this.L=this.O=this.G=0;this.init(R,w,p,r)}init(R,w,p,{mE:r=!1,q5:f=!1}={}){this.mE=r;this.q5=f;R&&(R=Br(R,this.q5),this.C=R.buffer,this.J=R.L,this.K=null,this.G=w||0,this.O=p!==void 0?this.G+p:this.C.length,this.L=this.G)}free(){this.clear();DP.length<100&&DP.push(this)}clear(){this.C=null;this.J=!1;this.K=null;this.L=this.O=this.G=0;this.mE=!1}reset(){this.L=this.G}},DP=[];var PaH=class{constructor(R,w,p,r){if(DP.length){const f=DP.pop();f.init(R,w,p,r);R=f}else R=new SBb(R,w,p,r);this.L=R;this.G=this.L.L;this.C=this.O=-1;Oj(this,r)}free(){this.L.clear();this.C=this.O=-1;tK.length<100&&tK.push(this)}reset(){this.L.reset();this.G=this.L.L;this.C=this.O=-1}},tK=[];var Rqb=class{constructor(){if(PZ!==PZ)throw Error();}};var Ze=class{constructor(R,w){this.C=R>>>0;this.L=w>>>0}},F3,QO=class{constructor(R,w){this.C=R>>>0;this.L=w>>>0}},TG;var wUP=class{constructor(){this.L=[]}length(){return this.L.length}end(){const R=this.L;this.L=[];return R}};var pUD=class{constructor(){this.O=[];this.C=0;this.L=new wUP}};var sb=Ij(),rwl=Ij(),eF=Ij(),Me=Ij(),fiH=Ij(),GWr=Ij(),Iir=Ij(),cu=Ij(),C5d=Ij(),Pu=Ij(),upb=Ij(),aX=Ij(),sgI=Ij(),mlx=Ij();var qW=class{constructor(R,w,p){this.jC=u4(R,w,p,2048)}toJSON(){return GJ(this)}AF(R){return JSON.stringify(GJ(this,R))}clone(){const R=this.jC,w=R[UZ]|0;return B$(this,R,w)?W$(this,R,!0):new this.constructor(zJ(R,w,!1))}};qW.prototype[QS]=hU;qW.prototype.toString=function(){return this.jC.toString()};var uT=class{constructor(R,w,p){this.rU=R;this.zN=w;R=al(sb);this.L=!!R&&p===R||!1}},aSP=mc(function(R,w,p,r,f){if(R.C!==2)return!1;ec(R,JZ(w,r,p),f);return!0},BR),$6W=mc(function(R,w,p,r,f){if(R.C!==2)return!1; ec(R,JZ(w,r,p),f);return!0},BR),Ko=Symbol(),bT=Symbol(),oj=Symbol(),eg=Symbol(),t0=Symbol(),WR,xA;var zqI=CW(0),QQ=(R,w)=>{const p=new pUD;MW(R.jC,p,lT(Ko,Ob,Eb,w));kK(p,p.L.end());R=new Uint8Array(p.C);w=p.O;const r=w.length;let f=0;for(let G=0;G>31)*2+1;const f=r>>>23&255;r&=8388607;$A(w,p,f==255?r?NaN:R*Infinity:f==0?R*1.401298464324817E-45*r:R*Math.pow(2,f-150)*(r+8388608));return!0},function(R,w,p){w=bo(w); w!=null&&(Uj(R,p,5),R=R.L,p=XK||(XK=new DataView(new ArrayBuffer(8))),p.setFloat32(0,+w,!0),sy=0,uo=p.getUint32(0,!0),Hr(R,uo))},upb),nT=PR(function(R,w,p){R.C!==0?R=!1:($A(w,p,xK(R.L,lo)),R=!0); return R},dM,cu),WSl=PR(function(R,w,p,r){R.C!==0?R=!1:(YL(w,p,r,xK(R.L,lo)),R=!0); return R},dM,cu),xlP=PR(function(R,w,p){R.C!==0?R=!1:($A(w,p,xK(R.L,x9)),R=!0); return R},function(R,w,p){w=Fq(w); if(w!=null&&(wM(w),w!=null))switch(Uj(R,p,0),typeof w){case "number":R=R.L;ze(w);gU(R,uo,sy);break;case "bigint":p=YK(w);gU(R.L,p.C,p.L);break;default:p=jc(w),gU(R.L,p.C,p.L)}},C5d),dj=PR(function(R,w,p){if(R.C!==0)return!1; $A(w,p,LP(R.L));return!0},Za,Me),li6=PR(function(R,w,p,r){if(R.C!==0)return!1; YL(w,p,r,LP(R.L));return!0},Za,Me),LSL=PR(function(R,w,p){return Tb(R,w,p)},function(R,w,p){w=Fq(w); if(w!=null)switch(Gb(w),Uj(R,p,1),R=R.L,Gb(w),typeof w){case "number":w<0?(p=-w,w=JK(new Ze(p&4294967295,p/4294967296)),p=w.L,Hr(R,w.C),Hr(R,p)):(mz(w),Hr(R,uo),Hr(R,sy));break;case "bigint":w=w>>0);return!0},function(R,w,p){w=eD(w); w!=null&&w!=null&&(Uj(R,p,0),vr(R.L,w))},fiH),Q4=PR(function(R,w,p){if(R.C!==0)return!1; $A(w,p,LP(R.L));return!0},function(R,w,p){rM(R,p,Ey(w))},mlx),t8W=aj(function(R,w,p){if(R.C!==0&&R.C!==2)return!1; w=$L(w,w[UZ]|0,p);R.C==2?dU(R,ct6,w):w.push(LP(R.L));return!0},function(R,w,p){w=cR(Ey,w,!0); if(w!=null)for(let r=0;r>>0&255),R.L.push(w>>>8&255),R.L.push(w>>>16&255),R.L.push(w>>>24&255))},Iir);var KSL=new Map,EFr=class extends Rqb{constructor(R,w){super();this.typeName=R;this.L=w;if(PZ!==PZ)throw Error();KSL.set(R,this)}};var eqL=class{constructor(R){var w=Dl_;this.L=R;this.isRepeated=0;this.C=i4;this.defaultValue=void 0;this.O=w.messageId!=null?rl:void 0}register(){Op(this)}};var zL=class extends qW{constructor(R){super(R)}};zL.prototype.C=vR([0,PR(function(R,w,p){if(R.C!==1)return!1;R=yO(R.L);$A(w,p,R===0?void 0:R);return!0},no,aX), PR(function(R,w,p){R.C!==0?w=!1:(R=xK(R.L,lo),$A(w,p,R===zqI?void 0:R),w=!0);return w},dM,cu), -2,PR(function(R,w,p){if(R.C!==0)return!1;R=LP(R.L);$A(w,p,R===0?void 0:R);return!0},Za,Me)]);var M8I=class{constructor(R){this.O=R;this.L=-1;this.C=this.G=0}};var cw6=class{constructor(R,w){this.C=R;this.O=w;this.L=new M8I(R)}};var P5H=class{constructor(){this.L={}}vS(R){const w=this.L[R.key];if(R.valueType==="proto"){try{const p=JSON.parse(w);if(Array.isArray(p))return p}catch(p){}return R.defaultValue}return typeof w===typeof R.defaultValue?w:R.defaultValue}};var aiP={bBn:1,Md:2,MA:3,1:"POSITION",2:"VISIBILITY",3:"MONITOR_VISIBILITY"};var YiD=class{constructor(){this.O=void 0;this.C=this.J=0;this.K=-1;this.gB=new aPY;km(this.gB,"mv",cPr).L=!0;km(this.gB,"omid",V4);km(this.gB,"epoh",V4).L=!0;km(this.gB,"epph",V4).L=!0;km(this.gB,"umt",V4).L=!0;km(this.gB,"phel",V4).L=!0;km(this.gB,"phell",V4).L=!0;km(this.gB,"oseid",aiP).L=!0;var R=this.gB;R.L.sloi||(R.L.sloi=new PwH);R.L.sloi.L=!0;km(this.gB,"mm",y4);km(this.gB,"ovms",ebd).L=!0;km(this.gB,"xdi",V4).L=!0;km(this.gB,"amp",V4).L=!0;km(this.gB,"prf",V4).L=!0;km(this.gB,"gtx",V4).L= !0;km(this.gB,"mvp_lv",V4).L=!0;km(this.gB,"ssmol",V4).L=!0;km(this.gB,"fmd",V4).L=!0;km(this.gB,"gen204simple",V4);this.L=new cw6(bv(),this.gB);this.G=!1;this.flags=new P5H}tV(R){if(typeof R==="string"&&R.length!=0){var w=this.gB;if(w.C){R=R.split("&");for(let f=R.length-1;f>=0;f--){var p=R[f].split("="),r=decodeURIComponent(p[0]);p.length>1?(p=decodeURIComponent(p[1]),p=/^[0-9]+$/g.exec(p)?parseInt(p,10):p):p=1;(r=w.L[r])&&r.O(p)}}}}};var $lD=class{constructor(){let R="https:";V8&&V8.location&&V8.location.protocol==="http:"&&(R="http:");this.C=R;this.L=.01}};var XUd=class{constructor(R,w){this.error=R;this.meta={};this.context=w.context;this.msg=w.message||"";this.id=w.id||"jserror"}};var hP=null;var nFd=class{constructor(R,w,p){this.label=R;this.type=w;this.value=p;this.duration=0;this.taskId=this.slotId=void 0;this.uniqueId=Math.random()}};var rA=g.qx.performance,dl6=!!(rA&&rA.mark&&rA.measure&&rA.clearMarks),fp=D2(()=>{var R;if(R=dl6){var w;R=window;if(hP===null){hP="";try{let p="";try{p=R.top.location.hash}catch(r){p=R.location.hash}p&&(hP=(w=p.match(/\bdeid=([\d,]+)/))?w[1]:"")}catch(p){}}w=hP;R=!!w.indexOf&&w.indexOf("1337")>=0}return R});var Fbr=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$"),ot=/#|$/,JtD=/[?&]($|#)/;var Z1D=class{constructor(R=null){this.L=mK;this.Lu="jserror";this.r5=!0;this.X4=null;this.C=this.CA;this.A2=R}CA(R,w,p,r,f){f=f||this.Lu;let G;try{const W=new Sg;var I=W;I.L.push(1);I.C[1]=xS("context",R);w.error&&w.meta&&w.id||(w=new EH(Kp(w)));I=w;if(I.msg){w=W;var C=I.msg.substring(0,512);w.L.push(2);w.C[2]=xS("msg",C)}var u=I.meta||{};C=u;if(this.X4)try{this.X4(C)}catch(x){}if(r)try{r(C)}catch(x){}r=W;u=[u];r.L.push(3);r.C[3]=u;G=zY();if(G.C){u=W;var m=G.C.url||"";u.L.push(4);u.C[4]=xS("top", m)}var z={url:G.L.url||""};if(G.L.url){const x=g.Cp(G.L.url);var B=It(x[1],null,x[3],x[4])}else B="";m=W;z=[z,{url:B}];m.L.push(5);m.C[5]=z;Rt(this.L,f,W,p)}catch(W){try{Rt(this.L,f,{context:"ecmserr",rctx:R,msg:Kp(W),url:G&&G.L.url},p)}catch(x){}}return this.r5}},EH=class extends XUd{constructor(R){super(Error(R),{message:R})}};var mK,eI,gj=new class{constructor(R,w){this.events=[];this.C=w||g.qx;let p=null;w&&(w.google_js_reporting_queue=w.google_js_reporting_queue||[],this.events=w.google_js_reporting_queue,p=w.google_measure_js_timing);this.L=fp()||(p!=null?p:Math.random()2048||this.events.push(R)}}}(1,window),YLD=()=>{V8&&typeof V8.google_measure_js_timing!="undefined"&&(V8.google_measure_js_timing||gj.disable())}; mK=new $lD;eI=new Z1D(gj);V8&&V8.document&&(V8.document.readyState=="complete"?YLD():gj.L&&rO(V8,"load",()=>{YLD()})); var Y3l=R=>{eI.X4=w=>{g.iH(R,p=>{p(w)})}},bD=(R,w)=>DX(eI,R,w),tI=(R,w)=>MD(R,w),gkP=(R,w)=>{eI.CA(538,R,.01,w)};var PO=Date.now(),$P=-1,cO=-1,jm,X_=-1,at=!1;var bz=class{constructor(R,w,p){var r=new cc(0,0,0,0);this.time=R;this.volume=null;this.O=w;this.L=r;this.C=p}equals(R,w=!1){return!!R&&(!w||this.volume==R.volume)&&this.O==R.O&&am(this.L,R.L)&&!0}};var FSb=class{constructor(R,w,p,r,f,G,I,C){this.G=R;this.D=w;this.O=p;this.J=r;this.L=f;this.K=G;this.C=I;this.U=C}zk(){return this.D}equals(R,w=!1){return this.G.equals(R.G,w)&&this.D==R.D&&am(this.O,R.O)&&am(this.J,R.J)&&this.L==R.L&&this.K==R.K&&this.C==R.C&&this.U==R.U}};var jgW={currentTime:1,duration:2,isVpaid:4,volume:8,isYouTube:16,isPlaying:32},Tw={T1:"start",JI:"firstquartile",RU:"midpoint",O3:"thirdquartile",COMPLETE:"complete",ERROR:"error",v8:"metric",PAUSE:"pause",Ci:"resume",b2:"skip",jV:"viewable_impression",H8:"mute",Ki:"unmute",tI:"fullscreen",B8:"exitfullscreen",fp:"bufferstart",OT:"bufferfinish",sT:"fully_viewable_audible_half_duration_impression",qy:"measurable_impression",Xp:"abandon",My:"engagedview",gs:"impression",Kp:"creativeview",LOADED:"loaded", OBY:"progress",CLOSE:"close",h7:"collapse",qA:"overlay_resize",R4:"overlay_unmeasurable_impression",Vy:"overlay_unviewable_impression",AZ:"overlay_viewable_immediate_impression",Hh:"overlay_viewable_end_of_session_impression",zd:"custom_metric_viewable",wi:"audio_audible",Cp:"audio_measurable",Lp:"audio_impression"},sBH="start firstquartile midpoint thirdquartile resume loaded".split(" "),xI=["start","firstquartile","midpoint","thirdquartile"],A$x=["abandon"],TL={UNKNOWN:-1,T1:0,JI:1,RU:2,O3:3,COMPLETE:4, v8:5,PAUSE:6,Ci:7,b2:8,jV:9,H8:10,Ki:11,tI:12,B8:13,sT:14,qy:15,Xp:16,My:17,gs:18,Kp:19,LOADED:20,zd:21,fp:22,OT:23,Lp:27,Cp:28,wi:29};var QM_={le:"addEventListener",MF:"getMaxSize",B6:"getScreenSize",Jn:"getState",EM:"getVersion",U0S:"removeEventListener",ZR:"isViewable"};var fpY=()=>{const R=window.document;return R&&typeof R.elementFromPoint==="function"};var cg=(R,w)=>{w=Math.pow(10,w);return Math.floor(R*w)/w};var HRd=class{constructor(){this.O=!GY(V8.top);this.isMobileDevice=CA()||uv();const R=mn();this.domain=R.length>0&&R[R.length-1]!=null&&R[R.length-1].url!=null?g.sH(R[R.length-1].url)||"":"";this.L=new cc(0,0,0,0);this.G=new g.dg(0,0);this.K=new g.dg(0,0);this.D=new cc(0,0,0,0);this.frameOffset=new g.Xx(0,0);this.J=0;this.U=!1;this.C=!(!V8||!np(V8).E5);this.update(V8)}update(R){R&&R.document&&(this.D=ZX(!1,R,this.isMobileDevice),this.L=ZX(!0,R,this.isMobileDevice),iu(this,R),TH(this,R))}};var Jwx=class{constructor(R){this.O=R;this.C=0;this.L=null}cancel(){bv().clearTimeout(this.L);this.L=null}schedule(){const R=bv(),w=Ub().L.L;this.L=R.setTimeout(kA(w,tI(143,()=>{this.C++;this.O.sample()})),iR6())}};var Hu=class{constructor(R,w,p="na"){this.O=R;this.SI=p;this.K=[];this.isInitialized=!1;this.G=new bz(-1,!0,this);this.L=this;this.S=w;this.M0=this.xY=!1;this.U0="uk";this.PS=!1;this.D=!0}O0(){return!1}initialize(){return this.isInitialized=!0}X(){return this.L.U0}I0(){return this.L.M0}fail(R,w=!1){if(!this.M0||w)this.M0=!0,this.U0=R,this.S=0,this.L!=this||HO(this)}getName(){return this.L.SI}Wa(){return this.L.Qk()}Qk(){return{}}Wk(){return this.L.S}YY(){var R=J4();R.L=ZX(!0,this.O,R.isMobileDevice)}nB(){TH(J4(), this.O)}q0(){return this.G.L}sample(){}isActive(){return this.L.D}pB(R){const w=this.L;this.L=R.Wk()>=this.S?R:this;w!==this.L?(this.D=this.L.D,HO(this)):this.D!==this.L.D&&(this.D=this.L.D,HO(this))}J(R){if(R.C===this.L){const w=!this.G.equals(R,this.xY);this.G=R;w&&gA(this)}}Hi(){return this.xY}dispose(){this.PS=!0}cS(){return this.PS}};var TtY=class{constructor(R,w,p,r){this.element=R;this.L=new cc(0,0,0,0);this.O=null;this.S=new cc(0,0,0,0);this.C=w;this.gB=p;this.q0=r;this.YY=!1;this.timestamp=-1;this.Jl=new FSb(w.G,this.element,this.L,new cc(0,0,0,0),0,0,Date.now()-PO,0);this.U=void 0}observe(){return!0}unobserve(){}D(R){this.U=R}dispose(){if(!this.cS()){var R=this.C;g.CR(R.K,this);R.xY&&this.Hi()&&ND(R);this.unobserve();this.YY=!0}}cS(){return this.YY}Wa(){return this.C.Wa()}Wk(){return this.C.Wk()}X(){return this.C.X()}I0(){return this.C.I0()}pB(){}J(){this.K()}Hi(){return this.q0}};var vu=class{constructor(R){this.U=!1;this.L=R;this.D=()=>{}}Wk(){return this.L.Wk()}X(){return this.L.X()}I0(){return this.L.I0()}create(R,w,p){let r=null; this.L&&(r=this.G(R,w,p),vO(this.L,r));return r}S(){return this.O()}O(){return!1}init(R){return this.L.initialize()?(vO(this.L,this),this.D=R,!0):!1}pB(R){R.Wk()==0&&this.D(R.X(),this)}J(){}Hi(){return!1}dispose(){this.U=!0}cS(){return this.U}Wa(){return{}}};var i1Y=class{constructor(R,w,p=0){this.O=p;this.C=R;this.L=w==null?"":w}};var Gw=class{constructor(){this.O=0;this.L=[];this.C=!1}add(R,w,p){++this.O;R=new i1Y(R,w,p);this.L.push(new i1Y(R.C,R.L,R.O+this.O/4096));this.C=!0;return this}};var kpx=R=>{const w=R.C;R=R.L;return R===""?w:typeof R==="boolean"?R?w:"":Array.isArray(R)?R.length===0?w:`${w}=${R.join()}`:`${w}=${g.ra(["mtos","tos","p"],w)?R:encodeURIComponent(R)}`};var SiW=class{constructor(R){this.L=new Gw;R!==void 0&&Nar(this.L,R);this.L.add("v","unreleased",-16)}toString(){let R="//pagead2.googlesyndication.com//pagead/gen_204";const w=wG(this.L);w.length>0&&(R+="?"+w);return R}};var uxl=R=>{const w=[],p=[];g.DS(R,(r,f)=>{if(!(f in Object.prototype)&&typeof r!="undefined")switch(Array.isArray(r)&&(r=r.join(",")),r=[f,"=",r].join(""),f){case "adk":case "r":case "tt":case "error":case "mtos":case "tos":case "p":case "bs":w.unshift(r);break;case "req":case "url":case "referrer":case "iframe_loc":p.push(r);break;default:w.push(r)}}); return w.concat(p)},If=R=>{R=R.toString(); bv();Ab(R)};var U6l=class{constructor(){this.L=0}};g.f5.prototype.h8=!1;g.f5.prototype.cS=function(){return this.h8}; g.f5.prototype.dispose=function(){this.h8||(this.h8=!0,this.Gy())}; g.f5.prototype[Symbol.dispose]=function(){this.dispose()}; g.f5.prototype.addOnDisposeCallback=function(R,w){this.h8?w!==void 0?R.call(w):R():(this.MH||(this.MH=[]),w&&(R=R.bind(w)),this.MH.push(R))}; g.f5.prototype.Gy=function(){if(this.MH)for(;this.MH.length;)this.MH.shift()()};var Qgx=[0,nT,b1r,-1];var Ne=class{constructor(){this.C=this.O=this.G=this.L=0}update(R,w,p=!R){R&&(this.L+=w,this.C+=w,this.G+=w,this.O=Math.max(this.O,this.G));p&&(this.G=0)}};var hqW=[1,.75,.5,.3,0],kG=class{constructor(R=hqW){this.C=R;this.L=g.gd(this.C,()=>new Ne)}update(R,w,p,r,f,G=!0){w=f?Math.min(R,w):w; for(f=0;f0&&w>=I;I=!(R>0&&R>=I)||p;this.L[f].update(G&&C,r,!G||I)}}};var gFL=class{constructor(){this.C=new kG;this.jI=this.Jl=0;this.YY=new Ne;this.S=this.D=-1;this.Qk=1E3;this.q0=new kG([1,.9,.8,.7,.6,.5,.4,.3,.2,.1,0]);this.I0=this.xY=-1}update(R,w,p,r){this.D=this.D!=-1?Math.min(this.D,w.DH):w.DH;this.S=Math.max(this.S,w.DH);this.xY=this.xY!=-1?Math.min(this.xY,w.Hu):w.Hu;this.I0=Math.max(this.I0,w.Hu);this.q0.update(w.Hu,p.Hu,w.L,R,r);this.Jl+=R;w.DH===0&&(this.jI+=R);this.C.update(w.DH,p.DH,w.L,R,r);p=r||p.jG!=w.jG?p.isVisible()&&w.isVisible():p.isVisible(); w=!w.isVisible()||w.L;this.YY.update(p,R,w)}LA(){return this.YY.O>=this.Qk}};if(Q7&&Q7.URL){var H1l=Q7.URL,UB;a:{if(H1l){var vFP=RegExp(".*[&#?]google_debug(=[^&]*)?(&.*)?$");try{const R=vFP.exec(decodeURIComponent(H1l));if(R){UB=R[1]&&R[1].length>1?R[1].substring(1):"true";break a}}catch{}}UB=""}eI.r5=!(UB.length>0)}var Qe=(R,w,p,r)=>{p=MD(r,p);rO(R,w,p,{capture:!1})};var NtP=new cc(0,0,0,0);var kWL=new cc(0,0,0,0),Ull=class extends g.f5{constructor(R,w){super();this.position=kWL.clone();this.iX=this.g4();this.m0=-2;this.timeCreated=Date.now();this.KF=-1;this.Fv=w;this.fO=null;this.GB=!1;this.N$=null;this.opacity=-1;this.requestSource=7;this.U7=!1;this.xx=()=>{}; this.yD=()=>{}; this.Bu=new JPP;this.Bu.zJ=R;this.Bu.L=R;this.x4=!1;this.WX={Mi:null,jy:null};this.Zg=!0;this.sO=null;this.OX=this.Ez=!1;Ub().J++;this.rY=this.l1();this.pF=-1;this.ZH=null;this.hasCompleted=this.J0=!1;this.gB=new aPY;$e_(this.gB);urD(this);this.requestSource==1?Ui(this.gB,"od",1):Ui(this.gB,"od",0)}Gy(){if(this.Bu.L){if(this.WX.Mi){var R=this.Bu.L;typeof R.removeEventListener==="function"&&R.removeEventListener("mouseover",this.WX.Mi,pA());this.WX.Mi=null}this.WX.jy&&(R=this.Bu.L,typeof R.removeEventListener=== "function"&&R.removeEventListener("mouseout",this.WX.jy,pA()),this.WX.jy=null)}this.sO&&this.sO.dispose();this.ZH&&this.ZH.dispose();delete this.iX;delete this.xx;delete this.yD;delete this.Bu.zJ;delete this.Bu.L;delete this.WX;delete this.sO;delete this.ZH;delete this.gB;super.Gy()}va(){return this.ZH?this.ZH.L:this.position}tV(R){Ub().tV(R)}Hi(){return!1}g4(){return new gFL}uD(){return this.iX}El(R){return of(this,R,1E4)}WS(R,w,p,r,f,G,I){this.x4||(this.GB&&(R=this.p6(R,p,f,I),r=r&&this.rY.DH>= (this.jG()?.3:.5),this.N5(G,R,r),this.Fv=w,R.DH>0&&-1===this.pF&&(this.pF=w),this.KF==-1&&this.LA()&&(this.KF=w),this.m0==-2&&(this.m0=L5(this.va())?R.DH:-1),this.rY=R),this.xx(this))}N5(R,w,p){this.uD().update(R,w,this.rY,p)}l1(){return new MFH}p6(R,w,p,r){p=this.l1();p.L=w;w=bv().C;w=fA(Q7)===0?-1:w.isVisible()?0:1;p.C=w;p.DH=this.EB(R);p.jG=this.jG();p.Hu=r;return p}EB(R){return this.opacity===0&&SP(this.gB,"opac")===1?0:R}jG(){return!1}Fa(){return this.J0||this.Ez}oS(){Date.now()}a_(){Date.now()}Yn(){return this.requestSource}EP(){return 0}LA(){return this.iX.LA()}DW(){var R= this.GB;R=(this.hasCompleted||this.cS())&&!R;const w=Ub().C!==2||this.U7;return this.x4||w&&R?2:this.LA()?4:3}K7(){return 0}};g.tQ.prototype.next=function(){return g.SF}; g.SF={done:!0,value:void 0};g.tQ.prototype.xH=function(){return this};var SLD=class{constructor(){this.G=this.L=this.O=this.C=this.K=0}};var Rj_=class extends MFH{constructor(){super();this.fullscreen=!1;this.volume=void 0;this.paused=!1;this.mediaTime=-1}};var Rg=(R,w,p=!0,r=()=>!0)=>f=>{const G=f[R]; if(Array.isArray(G)&&r(f))return wlP(G,w,p)},wt=(R,w)=>p=>w(p)?p[R]:void 0,plx=R=>w=>{for(let p=0;pp?g.QD(R,(r,f)=>g.ra(w,f)):g.gd(w,(r,f,G)=>R.slice(f>0?G[f-1]+1:0,r+1).reduce((I,C)=>I+C,0));var p1=plx([void 0,1,2,3,4,8,16]),rt=plx([void 0,4,8,16]),rhP={sv:"sv",v:"v",cb:"cb",e:"e",nas:"nas",msg:"msg","if":"if",sdk:"sdk",p:"p",p0:wt("p0",rt),p1:wt("p1",rt),p2:wt("p2",rt),p3:wt("p3",rt),cp:"cp",tos:"tos",mtos:"mtos",amtos:"amtos",mtos1:Rg("mtos1",[0,2,4],!1,rt),mtos2:Rg("mtos2",[0,2,4],!1,rt),mtos3:Rg("mtos3",[0,2,4],!1,rt),mcvt:"mcvt",ps:"ps",scs:"scs",bs:"bs",vht:"vht",mut:"mut",a:"a",a0:wt("a0",rt),a1:wt("a1",rt),a2:wt("a2",rt),a3:wt("a3",rt),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:wt("c0",rt),c1:wt("c1",rt),c2:wt("c2",rt),c3:wt("c3",rt),mc:"mc",nc:"nc",mv:"mv",nv:"nv",qmt:wt("qmtos",p1),qnc:wt("qnc",p1),qmv:wt("qmv",p1),qnv:wt("qnv",p1), 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:wt("ss0",rt),ss1:wt("ss1",rt),ss2:wt("ss2",rt),ss3:wt("ss3",rt),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"},fh6=Object.assign({},rhP,{avid:K$("audio"),avas:"avas",vs:"vs"}),G$D={atos:"atos",avt:Rg("atos",[2]),davs:"davs",dafvs:"dafvs",dav:"dav",ss:((R,w)=>p=>p[R]===void 0&&w!==void 0?w:p[R])("ss",0), t:"t"};var Ihd=class{constructor(){this.C=this.L=""}};var Crr=class{};var uCd=class{constructor(){this.C={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.L={};for(const R in this.C)this.C[R][1]>0&&(this.L[R]=0);this.O=0}};var f1=class{constructor(){this.L=this.C=0}getValue(){return this.C}update(R,w){R>=32||(this.L&1<=.5;jI(w.volume)&&(this.G=this.G!=-1?Math.min(this.G,w.volume):w.volume,this.J=Math.max(this.J,w.volume));G&&(this.O0+=R,this.X+=f?R:0);this.L.update(w.DH,p.DH,w.L,R,r,f); this.O.update(!0,R);this.K.update(f,R);this.pB.update(p.fullscreen,R);this.N0.update(f&&!G,R);R=Math.floor(w.mediaTime/1E3);this.M0.update(R,w.isVisible());this.U0.update(R,w.DH>=1);this.nB.update(R,K5(w))}}};var mOd=class{constructor(){this.K=!1}C(R){this.K||(this.L(R)?(R=Z9(this.X,this.O,R),this.G|=R,R=R==0):R=!1,this.K=R)}};var GW=class extends mOd{constructor(R,w){super();this.O=R;this.X=w;this.G=0}L(){return!0}J(){return!1}getId(){const R=Fb(Tw,w=>w==this.O); return TL[R].toString()}toString(){let R="";this.J()&&(R+="c");this.K&&(R+="s");this.G>0&&(R+=`:${this.G}`);return this.getId()+R}};var zjL=class extends GW{constructor(R,w){super(R,w);this.D=[]}C(R,w=null){w!=null&&this.D.push(w);super.C(R)}};var BL6=class{};var Ig=class extends BL6{C(){return null}O(){return[]}};var C1=class extends TtY{M0(){if(this.element){var R=this.element,w=this.C.L.O;try{try{var p=YP(R.getBoundingClientRect())}catch(m){p=new cc(0,0,0,0)}const f=p.right-p.left,G=p.bottom-p.top,I=N1(R,w),C=I.x,u=I.y;var r=new cc(Math.round(u),Math.round(C+f),Math.round(u+G),Math.round(C))}catch(f){r=NtP.clone()}this.O=r;this.L=UH(this,this.O)}}nB(){this.S=this.C.G.L}Qk(R){const w=SP(this.gB,"od")==1;return Ipl(R,this.S,this.element,w)}U0(){this.timestamp=Date.now()-PO}K(){this.U0();this.M0();if(this.element&& typeof this.element.videoWidth==="number"&&typeof this.element.videoHeight==="number"){var R=this.element;var w=new g.dg(R.videoWidth,R.videoHeight);R=this.L;var p=Pc(R),r=R.getHeight(),f=w.width;w=w.height;f<=0||w<=0||p<=0||r<=0||(f/=w,w=p/r,R=R.clone(),f>w?(p/=f,r=(r-p)/2,r>0&&(r=R.top+r,R.top=Math.round(r),R.bottom=Math.round(r+p))):(r*=f,p=Math.round((p-r)/2),p>0&&(p=R.left+p,R.left=Math.round(p),R.right=Math.round(p+r))));this.L=R}this.nB();R=this.L;p=this.S;R=R.left<=p.right&&p.left<=R.right&& R.top<=p.bottom&&p.top<=R.bottom?new cc(Math.max(R.top,p.top),Math.min(R.right,p.right),Math.min(R.bottom,p.bottom),Math.max(R.left,p.left)):new cc(0,0,0,0);p=R.top>=R.bottom||R.left>=R.right?new cc(0,0,0,0):R;R=this.C.G;w=f=r=0;(this.L.bottom-this.L.top)*(this.L.right-this.L.left)>0&&(this.Qk(p)?p=new cc(0,0,0,0):(r=J4().G,w=new cc(0,r.height,r.width,0),r=qV(p,this.U??this.L),f=qV(p,J4().L),w=qV(p,w)));p=p.top>=p.bottom||p.left>=p.right?new cc(0,0,0,0):$7(p,-this.L.left,-this.L.top);h4()||(f=r=0); this.Jl=new FSb(R,this.element,this.L,p,r,f,this.timestamp,w)}getName(){return this.C.getName()}};var WWd=new cc(0,0,0,0),xOY=class extends C1{constructor(R,w,p){super(null,R,w,p);this.O0=R.isActive();this.xY=0}observe(){this.G();return!0}J(){super.K()}U0(){}M0(){}K(){this.G();super.K()}pB(R){R=R.isActive();R!==this.O0&&(R?this.G():(J4().L=new cc(0,0,0,0),this.L=new cc(0,0,0,0),this.S=new cc(0,0,0,0),this.timestamp=-1));this.O0=R}};var VaH={firstquartile:0,midpoint:1,thirdquartile:2,complete:3},lhd=class extends Ull{constructor(R,w,p,r=new Ig){super(R,w);this.rD=p;this.WV=0;this.Ee={};this.ZU=new uCd;this.di={};this.Kd="";this.U0=null;this.mq=!1;this.L=[];this.xT=r.C();this.J=r.O();this.G=null;this.O=-1;this.PS=this.pB=void 0;this.xY=this.S=0;this.M0=-1;this.q0=this.Qk=!1;this.I0=this.X=this.C=this.V9=this.SI=0;new kG;this.Jl=this.YY=0;this.nB=-1;this.Zx=0;this.U=g.EW;this.O0=[this.g4()];this.f_=2;this.oO={};this.oO.pause="p"; this.oO.resume="r";this.oO.skip="s";this.oO.mute="m";this.oO.unmute="um";this.oO.exitfullscreen="ef";this.K=null;this.N0=this.eI=!1;this.p_=Math.floor(Date.now()/1E3-1704067200);this.jI=0}Hi(){return!0}BN(){return this.Zx==2}El(R){return of(this,R,Math.max(1E4,this.O/3))}WS(R,w,p,r,f,G,I){const C=this.U(this)||{};g.N6(C,f);this.O=C.duration||this.O;this.pB=C.isVpaid||this.pB;this.PS=C.isYouTube||this.PS;bv();this.N0=!1;f=lpb(this,w);n5(this)===1&&(G=f);super.WS(R,w,p,r,C,G,I);this.xT&&this.xT.K&& g.iH(this.J,u=>{u.C(this)})}N5(R,w,p){super.N5(R,w,p); dG(this).update(R,w,this.rY,p);this.q0=K5(this.rY)&&K5(w);this.M0==-1&&this.Qk&&(this.M0=this.uD().O.L);this.ZU.O=0;R=this.LA();w.isVisible()&&DI(this.ZU,"vs");R&&DI(this.ZU,"vw");jI(w.volume)&&DI(this.ZU,"am");K5(w)?DI(this.ZU,"a"):DI(this.ZU,"mut");this.OX&&DI(this.ZU,"f");w.C!=-1&&(DI(this.ZU,"bm"),w.C==1&&(DI(this.ZU,"b"),K5(w)&&DI(this.ZU,"umutb")));K5(w)&&w.isVisible()&&DI(this.ZU,"avs");this.q0&&R&&DI(this.ZU,"avw");w.DH>0&&DI(this.ZU,"pv");ZI(this,this.uD().O.L,!0)&&DI(this.ZU,"gdr");Bg(this.uD().C, 1)>=2E3&&DI(this.ZU,"pmx");this.N0&&DI(this.ZU,"tvoff")}g4(){return new sFP}uD(){return this.iX}l1(){return new Rj_}p6(R,w,p,r=-1){R=super.p6(R,w,p,r);R.fullscreen=this.OX;R.paused=this.BN();R.volume=p.volume;jI(R.volume)||(this.SI++,w=this.rY,jI(w.volume)&&(R.volume=w.volume));p=p.currentTime;R.mediaTime=p!==void 0&&p>=0?p:-1;return R}EB(R){return J4(),this.OX?1:super.EB(R)}EP(){return 1}getDuration(){return this.O}DW(){return this.x4?2:Yd(this)?5:this.LA()?4:3}K7(){return this.eI?this.uD().K.O>= 2E3?4:3:2}D(R){this.ZH&&this.ZH.D(R)}};var LWb=g.c6(),Q5d=class{constructor(){this.L={};const R=GM();hQ(this,R,document);const w=DiH();try{if("1"==w){for(let p=R.parent;p!=R.top;p=p.parent)hQ(this,p,p.document);hQ(this,R.top,R.top.document)}}catch(p){}}};var qMP=class{constructor(){this.L=[];this.C=[]}reset(){this.L=[];this.C=[]}},vg=Vh(qMP);var CB=class{constructor(){this.L=this.C=null}};var rJr=class extends vu{constructor(R){R=apH(R);super(R.length?R[R.length-1]:new Hu(V8,0));this.K=R;this.C=null}getName(){return(this.C?this.C:this.L).getName()}Wa(){return(this.C?this.C:this.L).Wa()}Wk(){return(this.C?this.C:this.L).Wk()}init(R){let w=!1;g.iH(this.K,p=>{p.initialize()&&(w=!0)}); w&&(this.D=R,vO(this.L,this));return w}dispose(){g.iH(this.K,R=>{R.dispose()}); super.dispose()}S(){return Nx(this.K,R=>R.O0())}O(){return Nx(this.K,R=>R.O0())}G(R,w,p){return new C1(R,this.L,w,p)}J(R){this.C=R.C}};var $iH={threshold:[0,.3,.5,.75,1]},AhD=class extends C1{constructor(R,w,p,r){super(R,w,p,r);this.PS=this.jI=this.xY=this.O0=this.G=null}observe(){this.PS||(this.PS=Date.now()-PO);if(bD(298,()=>Xw_(this)))return!0; this.C.fail("msf");return!1}unobserve(){if(this.G&&this.element)try{this.G.unobserve(this.element),this.O0?(this.O0.unobserve(this.element),this.O0=null):this.xY&&(this.xY.disconnect(),this.xY=null)}catch(R){}}K(){const R=R7(this);R.length>0&&Sm(this,R);super.K()}M0(){}Qk(){return!1}nB(){}Wa(){return Object.assign(this.C.Wa(),{niot_obs:this.PS,niot_cbk:this.jI})}getName(){return"nio"}};var PM=class extends vu{constructor(R=V8){super(new Hu(R,2))}getName(){return"nio"}O(){return!J4().C&&this.L.L.O.IntersectionObserver!=null}G(R,w,p){return new AhD(R,this.L,w,p)}};var R16=class extends Hu{constructor(){const R=wq();super(V8.top,R,"geo")}q0(){return J4().L}O0(){const R=wq();this.S!==R&&(this.L!=this&&R>this.L.S&&(this.L=this,HO(this)),this.S=R);return R==2}};var uz=class{};var bfH=class{constructor(){this.done=!1;this.L={ye:0,qD:0,GgY:0,vz:0,IP:-1,Mv:0,jn:0,BI:0,MG:0};this.G=null;this.K=!1;this.O=null;this.J=0;this.C=new Jwx(this)}sample(){rq(this,NV(),!1)}},GL=Vh(bfH);var BM=null,nB="",Xd=!1;var yhY=()=>"av.default_js".includes("ima_html5_sdk")?{h9:"ima",fl:null}:"av.default_js".includes("ima_native_sdk")?{h9:"nima",fl:null}:"av.default_js".includes("admob-native-video-javascript")?{h9:"an",fl:null}:"youtube.player.web_20260317_10_RC00".includes("cast_js_sdk")?{h9:"cast",fl:WM()}:"youtube.player.web_20260317_10_RC00".includes("youtube.player.web")?{h9:"yw",fl:WM()}:"youtube.player.web_20260317_10_RC00".includes("outstream_web_client")?{h9:"out",fl:WM()}:"youtube.player.web_20260317_10_RC00".includes("drx_rewarded_web")? {h9:"r",fl:WM()}:"youtube.player.web_20260317_10_RC00".includes("gam_native_web_video")?{h9:"n",fl:WM()}:"youtube.player.web_20260317_10_RC00".includes("admob_interstitial_video")?{h9:"int",fl:WM()}:{h9:"j",fl:null},j1=yhY().h9,E$=yhY().fl;var BA=(R,w)=>{const p={sv:"968"};E$!==null&&(p.v=E$);p.cb=j1;p.nas=vg.L.length;p.msg=R;w!==void 0&&(R=WA(w))&&(p.e=TL[R]);return p},WA=R=>{const w=pj(R,"custom_metric_viewable")?"custom_metric_viewable":R.toLowerCase(); return Fb(Tw,p=>p==w)};var J$_={hn:"visible",gj:"audible",P3$:"time",YQk:"timetype"},xp={visible:R=>/^(100|[0-9]{1,2})$/.test(R), audible:R=>R=="0"||R=="1", timetype:R=>R=="mtos"||R=="tos", time:R=>/^(100|[0-9]{1,2})%$/.test(R)||/^([0-9])+ms$/.test(R)},k1Y=class{constructor(){this.L=void 0; this.C=!1;this.O=0;this.G=-1;this.K="tos"}setTime(R,w,p="tos"){w=="ms"?(this.O=R,this.G=-1):(this.O=-1,this.G=R);this.K=p;return this}};var UiI=class extends GW{constructor(R,w,p,r){super(w,r);this.D=R;this.U=p}getId(){return this.D}J(){return!0}L(R){const w=R.uD(),p=R.getDuration();return Nx(this.U,r=>{if(r.L!=void 0)var f=ijl(r,w);else b:{switch(r.K){case "mtos":f=r.C?w.K.O:w.O.L;break b;case "tos":f=r.C?w.K.L:w.O.L;break b}f=0}f==0?r=!1:(r=r.O!=-1?r.O:p!==void 0&&p>0?r.G*p:-1,r=r!=-1&&f>=r);return r})}};var V0_=class extends Crr{L(R){const w=new Ihd;w.L=EN(R,rhP);w.C=EN(R,G$D);return w}};var olI=class extends GW{constructor(R){super("fully_viewable_audible_half_duration_impression",R)}L(R){return Yd(R)}};var t0d=class extends BL6{constructor(R){super();this.L=R}};var Ofd=class extends GW{constructor(R){super("viewable_impression",R)}L(R){return R.uD().LA()}};var KW_=class extends zjL{constructor(R){super("measurable_impression",R)}L(R){const w=g.ra(this.D,SP(Ub().gB,"ovms"));return!R.x4&&(R.Zx!=0||w)}};var ElY=class extends t0d{C(){return new KW_(this.L)}O(){return[new Ofd(this.L),new olI(this.L)]}};var DOx=class extends xOY{G(){const R=g.yD("ima.admob.getViewability"),w=SP(this.gB,"queryid");typeof R==="function"&&w&&R(w)}getName(){return"gsv"}};var wDx=class extends vu{constructor(){super(new Hu(V8,2))}getName(){return"gsv"}O(){const R=J4();Ub();return R.C&&!1}G(R,w,p){return new DOx(this.L,w,p)}};var ejI=class extends xOY{G(){const R=g.yD("ima.bridge.getNativeViewability"),w=SP(this.gB,"queryid");typeof R==="function"&&w&&R(w,p=>{g.Jt(p)&&this.xY++;const r=p.opt_nativeViewVisibleBounds||{},f=p.opt_nativeViewHidden;this.L=F_(p.opt_nativeViewBounds||{});const G=this.C.G;G.L=f?WWd.clone():F_(r);this.timestamp=p.opt_nativeTime||-1;J4().L=G.L;p=p.opt_nativeVolume;p!==void 0&&(G.volume=p)})}getName(){return"nis"}};var pDD=class extends vu{constructor(){super(new Hu(V8,2))}getName(){return"nis"}O(){const R=J4();Ub();return R.C&&!1}G(R,w,p){return new ejI(this.L,w,p)}};var lz=class extends Hu{constructor(){super(V8,2,"mraid");this.N0=0;this.Jl=this.jI=!1;this.U=null;this.C=np(this.O);this.G.L=new cc(0,0,0,0);this.eI=!1}O0(){return this.C.E5!=null}Qk(){const R={};this.N0&&(R.mraid=this.N0);this.jI&&(R.mlc=1);R.mtop=this.C.hL;this.U&&(R.mse=this.U);this.eI&&(R.msc=1);R.mcp=this.C.compatibility;return R}initialize(){if(this.isInitialized)return!this.I0();this.isInitialized=!0;if(this.C.compatibility===2)return this.U="ng",this.fail("w"),!1;if(this.C.compatibility=== 1)return this.U="mm",this.fail("w"),!1;J4().U=!0;this.O.document.readyState&&this.O.document.readyState=="complete"?o7(this):Qe(this.O,"load",()=>{bv().setTimeout(tI(292,()=>o7(this)),100)},292); return!0}YY(){const R=J4(),w=KB(this,"getMaxSize");R.L=new cc(0,w.width,w.height,0)}nB(){J4().G=KB(this,"getScreenSize")}dispose(){O$(this);super.dispose()}};var M0L=new class{constructor(R,w=!1){this.key=R;this.defaultValue=w;this.valueType="boolean"}}("45378663");var chY=class{constructor(){this.isInitialized=!1;this.L=this.C=null;this.q0={start:this.ez,firstquartile:this.f_,midpoint:this.Mr,thirdquartile:this.WB,complete:this.SI,error:this.mq,pause:this.jI,resume:this.eI,skip:this.yh,viewable_impression:this.O,mute:this.G,unmute:this.G,fullscreen:this.ag,exitfullscreen:this.p_,fully_viewable_audible_half_duration_impression:this.O,measurable_impression:this.O,abandon:this.jI,engagedview:this.O,impression:this.O,creativeview:this.O,progress:this.G,custom_metric_viewable:this.O, bufferstart:this.jI,bufferfinish:this.eI,audio_measurable:this.O,audio_audible:this.O};this.Af={overlay_resize:this.cB,abandon:this.M0,close:this.M0,collapse:this.M0,overlay_unmeasurable_impression:R=>iD(R,"overlay_unmeasurable_impression",h4()), overlay_viewable_immediate_impression:R=>iD(R,"overlay_viewable_immediate_impression",h4()), overlay_unviewable_impression:R=>iD(R,"overlay_unviewable_impression",h4()), overlay_viewable_end_of_session_impression:R=>iD(R,"overlay_viewable_end_of_session_impression",h4())}; Ub().C=3;vkI(this);this.K=null}U(R){ye(R,!1);MaI(R)}X(){}S(R,w,p,r){R=new lhd(R,p?w:-1,this.O0(),this.U0());R.Kd=r;AYH(R.gB);Ui(R.gB,"queryid",R.Kd);R.tV("");zZD(R,(...f)=>this.Qk(...f),(...f)=>N2d(this,...f)); (r=Vh(CB).L)&&Ve(R,r);this.K&&(R.D(this.K),this.K=null);R.Bu.zJ&&Vh(uz);return R}pB(R){switch(R.Wk()){case 0:if(R=Vh(CB).L)R=R.L,g.CR(R.K,this),R.xY&&this.Hi()&&ND(R);$p();break;case 2:I7()}}J(){}Hi(){return!1}ez(R){var w=R.U(R);w&&(w=w.volume,R.eI=jI(w)&&w>0);FS(R,0);return iD(R,"start",h4())}G(R,w,p){rq(GL,[R],!h4());return this.O(R,w,p)}O(R,w,p){return iD(R,p,h4())}f_(R){return Fd(R,"firstquartile",1)}Mr(R){R.Qk=!0;return Fd(R,"midpoint",2)}WB(R){return Fd(R,"thirdquartile",3)}SI(R){const w=Fd(R, "complete",4);XS(R);return w}mq(R){R.Zx=3;return iD(R,"error",h4())}eI(R,w,p){w=h4();if(R.BN()&&!w){var r=R.uD(),f=Date.now()-PO;r.U=f}rq(GL,[R],!w);R.BN()&&(R.Zx=1);return iD(R,p,w)}yh(R,w){w=this.G(R,w||{},"skip");XS(R);return w}ag(R,w){ye(R,!0);return this.G(R,w||{},"fullscreen")}p_(R,w){ye(R,!1);return this.G(R,w||{},"exitfullscreen")}jI(R,w,p){w=R.uD();var r=Date.now()-PO;w.PS=em(w,r,R.Zx!=1);rq(GL,[R],!h4());R.Zx==1&&(R.Zx=2);return iD(R,p,h4())}cB(R){rq(GL,[R],!h4());return R.C()}M0(R){rq(GL, [R],!h4());this.N0(R);XS(R);return R.C()}Qk(){}YY(){}N0(){}nB(){}I0(){}U0(){this.L||(this.L=this.I0());return this.L==null?new Ig:new ElY(this.L)}O0(){return new V0_}};var PrY=class extends GW{constructor(R){super("audio_audible",R)}L(R){return R.K7()==4}};var ahb=class extends zjL{constructor(R){super("audio_measurable",R)}L(R){R=R.K7();return R==3||R==4}};var $O6=class extends t0d{C(){return new ahb(this.L)}O(){return[new PrY(this.L)]}};var XlI=class extends Crr{L(R){R&&(R.e===28&&(R=Object.assign({},R,{avas:3})),R.vs===4||R.vs===5)&&(R=Object.assign({},R,{vs:3}));const w=new Ihd;w.L=EN(R,fh6);w.C=EN(R,G$D);return w}};var nlL=class{constructor(R){this.L=R}C(){return g.yD(this.L)}};var mG=class extends chY{constructor(){super();this.PS=null;this.Jl=!1;this.xY="ACTIVE_VIEW_TRAFFIC_TYPE_UNSPECIFIED"}X(R,w){let p;const r=Vh(CB);if(r.L!=null)switch(r.L.getName()){case "nis":p=mNd(this,R,w);break;case "gsv":p=z1d(this,R,w);break;case "exc":p=Bgd(this,R)}p||(w.opt_overlayAdElement?p=void 0:w.opt_adElement&&(p=If_(this,R,w.opt_adElement,w.opt_osdId)));p&&p.EP()==1&&(p.U==g.EW&&(p.U=f=>this.nB(f)),W36(this,p,w)); return p}nB(R){R.C=0;R.I0=0;let w;if(R.G=="h"||R.G=="n"){Ub();R.U0&&(Ub(),dq(this)!="h"&&dq(this));var p=g.yD("ima.common.getVideoMetadata");if(typeof p==="function")try{w=p(R.Kd)}catch(r){R.C|=4}else R.C|=2}else if(R.G=="b")if(p=g.yD("ytads.bulleit.getVideoMetadata"),typeof p==="function")try{w=p(R.Kd)}catch(r){R.C|=4}else R.C|=2;else if(R.G=="ml")if(p=g.yD("ima.common.getVideoMetadata"),typeof p==="function")try{w=p(R.Kd)}catch(r){R.C|=4}else R.C|=2;else R.C|=1;R.C||(w===void 0?R.C|=8:w===null? R.C|=16:g.Jt(w)?R.C|=32:w.errorCode!=null&&(R.I0=w.errorCode,R.C|=64));w==null&&(w={});p=w;R.X=0;for(const r in jgW)p[r]==null&&(R.X|=jgW[r]);e1(p,"currentTime");e1(p,"duration");jI(w.volume)&&jI()&&(w.volume*=NaN);return w}I0(){Ub();dq(this)!="h"&&dq(this);const R=xNd(this);return R!=null?new nlL(R):null}YY(R){!R.L&&R.x4&&Yp(this,R,"overlay_unmeasurable_impression")&&(R.L=!0)}N0(R){R.Zg&&(R.LA()?Yp(this,R,"overlay_viewable_end_of_session_impression"):Yp(this,R,"overlay_unviewable_impression"),R.Zg= !1)}Qk(){}S(R,w,p,r){if(Ub().flags.vS(M0L)){var f=SP(Ub().gB,"mm");(f={[y4.S1]:"ACTIVE_VIEW_TRAFFIC_TYPE_AUDIO",[y4.VIDEO]:"ACTIVE_VIEW_TRAFFIC_TYPE_VIDEO"}[f])&&lg(this,f);this.xY==="ACTIVE_VIEW_TRAFFIC_TYPE_UNSPECIFIED"&&eI.CA(1044,Error(),void 0,void 0)}R=super.S(R,w,p,r);this.Jl&&(w=this.PS,R.K==null&&(R.K=new SLD),w.L[R.Kd]=R.K,R.K.K=LWb);return R}U(R){R&&R.EP()==1&&this.Jl&&delete this.PS.L[R.Kd];return super.U(R)}U0(){this.L||(this.L=this.I0());return this.L==null?new Ig:this.xY==="ACTIVE_VIEW_TRAFFIC_TYPE_AUDIO"? new $O6(this.L):new ElY(this.L)}O0(){return this.xY==="ACTIVE_VIEW_TRAFFIC_TYPE_AUDIO"?new XlI:new V0_}D(R,w,p,r,f){w=new cc(p,w+r,p+f,w);(R=gG(vg,R))?R.D(w):this.K=w}},dOD=MD(193,z8,void 0,D9);g.AY("Goog_AdSense_Lidar_sendVastEvent",dOD);var ZfI;ZfI=MD(194,function(R,w={}){R=s8(Vh(mG),R,w);return ug(R)}); g.AY("Goog_AdSense_Lidar_getViewability",ZfI);var YMH=MD(195,function(){return yh()}); g.AY("Goog_AdSense_Lidar_getUrlSignalsArray",YMH);var FW6;FW6=MD(196,function(){return JSON.stringify(yh())}); g.AY("Goog_AdSense_Lidar_getUrlSignalsList",FW6);var CTI=class{constructor({url:R,vuY:w}){this.C=R;this.G=w;this.O=(new Date).getTime()-17040672E5;this.L={};const p=/[?&]([^&=]+)=([^&]*)/g;for(;w=p.exec(R);)this.L[w[1]]=w[2]}};var VK=class extends Error{constructor(R,w,p=Error()){super();this.code=R;w+=":";p instanceof Error?(this.message=w+p.message,this.stack=p.stack||""):(this.message=w+String(p),this.stack="");Object.setPrototypeOf(this,new.target.prototype)}};var AJY=class extends g.f5{constructor(R){super();this.wpc=R}eS(){return this.wpc.f()}cV(R){this.wpc.c(R)}O(R){return this.wpc.m(yK(R))}uK(R){return this.wpc.mws(yK(R))}},Ac=class extends g.f5{constructor(R){super();this.z3=R;this.O="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.C=void 0;this.bE=this.z3.p;this.G=this.tX.bind(this);this.addOnDisposeCallback(()=>void qpl(this))}snapshot(R){return this.z3.s({...(R.OP&&{c:R.OP}), ...(R.KP&&{s:R.KP}),...(R.zO!==void 0&&{p:R.zO})})}tX(R){this.z3.e(R)}PZ(){return this.z3.l()}};var jFP=class extends g.f5{constructor(){super(...arguments);this.xY=1}share(){if(this.cS())throw Error("E:AD");this.xY++;return this}dispose(){--this.xY||super.dispose()}};var Jhd=class{constructor(R){this.L=R;Ih(R,"/client_streamz/bg/frs",g.E8("mk"))}A3(R,w){this.L.A3("/client_streamz/bg/frs",R,w)}},TLI=class{constructor(R){this.L=R;Ih(R,"/client_streamz/bg/wrl",g.E8("mn"),Ku("ac"),Ku("sc"),g.E8("rk"),g.E8("mk"))}A3(R,w,p,r,f,G){this.L.A3("/client_streamz/bg/wrl",R,w,p,r,f,G)}},ifl=class{constructor(R){this.C=R;g.u0(R,"/client_streamz/bg/ec",g.E8("en"),g.E8("mk"))}L(R,w){g.B5(this.C,"/client_streamz/bg/ec",R,w)}},QFI=class{constructor(R){this.L=R;Ih(R,"/client_streamz/bg/el", g.E8("en"),g.E8("mk"))}A3(R,w,p){this.L.A3("/client_streamz/bg/el",R,w,p)}},hjd=class{constructor(R){this.C=R;g.u0(R,"/client_streamz/bg/cec",Ku("ec"),g.E8("mk"))}L(R,w){g.B5(this.C,"/client_streamz/bg/cec",R,w)}},glW=class{constructor(R){this.C=R;g.u0(R,"/client_streamz/bg/po/csc",Ku("cs"),g.E8("mk"))}L(R,w){g.B5(this.C,"/client_streamz/bg/po/csc",R,w)}},HfH=class{constructor(R){this.C=R;g.u0(R,"/client_streamz/bg/po/ctav",g.E8("av"),g.E8("mk"))}L(R,w){g.B5(this.C,"/client_streamz/bg/po/ctav",R, w)}},vld=class{constructor(R){this.C=R;g.u0(R,"/client_streamz/bg/po/cwsc",g.E8("su"),g.E8("mk"))}L(R,w){g.B5(this.C,"/client_streamz/bg/po/cwsc",R,w)}},NLd=class{constructor(R){this.L=R;Ih(R,"/client_streamz/bg/od/p",g.E8("mk"))}A3(R,w){this.L.A3("/client_streamz/bg/od/p",R,w)}},k$r=class{constructor(R){this.L=R;Ih(R,"/client_streamz/bg/od/n",g.E8("et"),g.E8("mk"))}A3(R,w,p){this.L.A3("/client_streamz/bg/od/n",R,w,p)}};var pcd=class extends qW{constructor(R){super(R)}};var ae=class extends qW{constructor(R){super(R)}},$I=[1,2,3];var MP=class extends qW{constructor(R){super(R)}},cA=[1,2,3];var PA=class extends qW{constructor(R){super(R)}};var UOY=class extends qW{constructor(R){super(R)}};var SMd=class extends qW{constructor(R){super(R)}},RYI=[1,2,3];var D_=class extends qW{constructor(R){super(R)}Uk(){var R=DQ(this,3,Te,3,!0);wl(R);return R[void 0]}};D_.prototype.C=vR([0,YG,[0,RYI,jF,[0,YG,-1,ZP],jF,[0,YG,-1,dj,ZP],jF,[0,YG]],V8d,F6,[0,F6,[0,$I,oF6,li6,ywd],[0,cA,WSl,Btx,jF,[0,F6,[0,$G,nT]]]],qLI,Aw_]);var w3x=class extends qW{constructor(R){super(R)}};g.t=YI.prototype;g.t.isEnabled=function(){if(!g.qx.navigator.cookieEnabled)return!1;if(!this.isEmpty())return!0;this.set("TESTCOOKIESENABLED","1",{Je:60});if(this.get("TESTCOOKIESENABLED")!=="1")return!1;this.remove("TESTCOOKIESENABLED");return!0}; g.t.set=function(R,w,p){let r;var f=!1;let G;if(typeof p==="object"){G=p.sameSite;f=p.secure||!1;r=p.domain||void 0;var I=p.path||void 0;var C=p.Je}if(/[;=\s]/.test(R))throw Error('Invalid cookie name "'+R+'"');if(/[;\r\n]/.test(w))throw Error('Invalid cookie value "'+w+'"');C===void 0&&(C=-1);p=r?";domain="+r:"";I=I?";path="+I:"";f=f?";secure":"";C=C<0?"":C==0?";expires="+(new Date(1970,1,1)).toUTCString():";expires="+(new Date(Date.now()+C*1E3)).toUTCString();this.L.cookie=R+"="+w+p+I+C+f+(G!=null? ";samesite="+G:"")}; g.t.get=function(R,w){const p=R+"=",r=(this.L.cookie||"").split(";");for(let f=0,G;f=0;w--)this.remove(R[w])}; var vI=new YI(typeof document=="undefined"?null:document);var p3P=class{async compress(R){var w=new CompressionStream("gzip");const p=(new Response(w.readable)).arrayBuffer();w=w.writable.getWriter();await w.write((new TextEncoder).encode(R));await w.close();return new Uint8Array(await p)}isSupported(R){return R<1024?!1:typeof CompressionStream!=="undefined"}};var u5=class extends qW{constructor(R){super(R)}};var rpd=class{constructor(R,w){this.intervalMs=R;this.callback=w;this.enabled=!1;this.L=()=>g.c6(); this.C=this.L()}setInterval(R){this.intervalMs=R;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.C=this.L())}stop(){this.enabled=!1; this.timer&&(clearTimeout(this.timer),this.timer=void 0)}tick(){if(this.enabled){const R=Math.max(this.L()-this.C,0);R{this.tick()},this.intervalMs-R):(this.timer&&(clearTimeout(this.timer),this.timer=void 0),this.callback(),this.enabled&&(this.stop(),this.start()))}else this.timer=void 0}};var fbI=class extends qW{constructor(R){super(R)}};var Gu6=class extends qW{constructor(R){super(R)}};g.sL=class extends qW{constructor(R){super(R)}cq(){return fP(this,1)}};g.sL.prototype.mp=pd(1);var QK=class extends qW{constructor(R){super(R)}};var kI=class extends qW{constructor(R){super(R)}},MwW=NW(kI);var SC=class extends qW{constructor(R){super(R)}};var hc=["platform","platformVersion","architecture","model","uaFullVersion"],ig=new kI,g8=null;var vA=class extends qW{constructor(R){super(R)}};var Ibd=class extends qW{constructor(R){super(R)}};var CLx=class extends qW{constructor(R){super(R,4)}};var mS=class extends qW{constructor(R){super(R,37)}Y(){const R=this.jC;return TJ(R,R[UZ]|0,Ibd,7)!==void 0}HJ(){return i4(this,u5,16)}};var u26=class extends qW{constructor(R){super(R,19)}S2(R){return mw(this,2,R)}};var sPb=class{constructor(R,w=!1){this.Sb=w;this.uach=this.locale=null;this.C=0;this.isFinal=!1;this.L=new u26;Number.isInteger(R)&&this.L.S2(R);w||(this.locale=document.documentElement.getAttribute("lang"));U8(this,new vA)}S2(R){this.L.S2(R);return this}build(R,w=0,p=0,r=null,f=0,G=0){if(!this.Sb){var I=NP(this);var C=new g.sL;C=mw(C,1,this.C);C=VF(C,2,VS(this.isFinal));p=VF(C,3,KW(p>0?p:void 0));f=VF(p,4,KW(f>0?f:void 0));G=VF(f,5,KW(G>0?G:void 0));f=G.jC;p=f[UZ]|0;G=S4(G,p)?G:B$(G,f,p)?W$(G,f): new G.constructor(zJ(f,p,!0));kL(I,g.sL,10,G)}I=this.L.clone();G=Date.now().toString();I=VF(I,4,ap(G));R=Sj(I,mS,3,R.slice());r&&(I=new fbI,r=VF(I,13,KW(r)),I=new Gu6,r=kL(I,fbI,2,r),I=new CLx,r=kL(I,Gu6,1,r),r=mw(r,2,9),kL(R,CLx,18,r));w&&CP(R,14,w);return R}};g.RR.prototype.C=0;g.RR.prototype.reset=function(){this.L=this.O=this.G;this.C=0}; g.RR.prototype.getValue=function(){return this.O};var Dl_=class extends qW{constructor(R){super(R,8)}},mjd=NW(Dl_);var zW;zW=new eqL(class extends qW{constructor(R){super(R)}});var zYY=class extends g.f5{constructor(R){super();this.componentId="";this.L=[];this.Jl="";this.pageId=null;this.jI=this.xY=-1;this.D=this.experimentIds=null;this.pB=this.S=this.J=this.G=0;this.PS=1;this.timeoutMillis=0;this.O0=!1;this.logSource=R.logSource;this.q8=R.q8||(()=>{}); this.O=new sPb(R.logSource,R.Sb);this.network=R.network||null;this.xL=R.xL||null;this.U=R.X5||null;this.sessionIndex=R.sessionIndex||null;this.bz=R.bz||!1;this.logger=null;this.withCredentials=!R.q2;this.Sb=R.Sb||!1;this.X=!this.Sb&&!!GM()&&!!GM().navigator&&GM().navigator.sendBeacon!==void 0;this.M0=typeof URLSearchParams!=="undefined"&&!!(new URL(p9())).searchParams&&!!(new URL(p9())).searchParams.set;const w=HA(new vA);U8(this.O,w);this.K=new g.RR(1E4,3E5,.1);R=PsP(this,R.O6);this.C=new rpd(this.K.getValue(), R);this.I0=new rpd(6E5,R);this.bz||this.I0.start();this.Sb||(document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&re(this)}),document.addEventListener("pagehide",()=>{re(this)}))}Gy(){re(this); this.C.stop();this.I0.stop();super.Gy()}dispatch(R){if(R instanceof mS)this.log(R);else try{var w=new mS,p=R.AF();var r=uf(w,8,p);this.log(r)}catch{}}log(R){if(this.M0){R=R.clone();var w=this.PS++;R=CP(R,21,w);this.componentId&&uf(R,26,this.componentId);w=R;{var p=b4(w,1);const r=typeof p;p=p==null?p:r==="bigint"?String(cT(64,p)):tU(p)?r==="string"?Zv(p):dl(p):void 0}p==null&&(p=Date.now(),p=Number.isFinite(p)?p.toString():"0",VF(w,1,ap(p)));p=b4(w,15,void 0,void 0,Y9);p!=null&&(typeof p==="bigint"? pk(p)?p=Number(p):(p=cT(64,p),p=pk(p)?Number(p):String(p)):p=tU(p)?typeof p==="number"?dl(p):Zv(p):void 0);p!=null||CP(w,15,(new Date).getTimezoneOffset()*60);this.experimentIds&&(p=this.experimentIds.clone(),kL(w,u5,16,p));w=this.L.length-1E3+1;w>0&&(this.L.splice(0,w),this.G+=w);this.L.push(R);this.bz||this.C.enabled||this.C.start()}}flush(R,w){if(this.L.length===0)R&&R();else if(this.O0&&this.X)this.O.C=3,$ND(this);else{var p=Date.now();if(this.jI>p&&this.xY{this.K.reset();this.C.setInterval(this.K.getValue());if(z){var B=null;try{var W=JSON.stringify(JSON.parse(z.replace(")]}'\n","")));B=mjd(W)}catch(x){}if(B){z= Number(pP(B,1,CW("-1")));z>0&&(this.xY=Date.now(),this.jI=this.xY+z);(z=al(vT))&&B.jC[z]?.[175237375]!=null&&v8(gGd,3);if(al(HT6)&&al(vT)&&void 0===HT6&&(z=B.jC,W=z[vT])&&(W=W.vQ))try{W(z,175237375,UeD)}catch(x){OZ(x)}B=zW.L?zW.C(B,zW.L,175237375,zW.O):zW.C(B,175237375,null,zW.O);if(B=B===null?void 0:B)B=g.wU(B,1,-1),B!==-1&&(this.K=new g.RR(B<1?1:B,3E5,.1),this.C.setInterval(this.K.getValue()))}}R&&R();this.J=0},u=(z,B)=>{var W=v$(r,mS,3); var x=Number(pP(r,14));g.we(this.K);this.C.setInterval(this.K.getValue());z===401&&f&&(this.Jl=f);x&&(this.G+=x);B===void 0&&(B=this.isRetryable(z));B&&(this.L=W.concat(this.L),this.bz||this.C.enabled||this.C.start());w&&w("net-send-failed",z);++this.J},m=()=>{this.network&&this.network.send(I,C,u)}; G?G.then(z=>{I.requestHeaders["Content-Encoding"]="gzip";I.requestHeaders["Content-Type"]="application/binary";I.body=z;I.Nd=2;m()},()=>{m()}):m()}}}}isRetryable(R){return 500<=R&&R<600||R===401||R===0}};var B_l=class{constructor(){this.Px=typeof AbortController!=="undefined"}async send(R,w,p){const r=this.Px?new AbortController:void 0,f=r?setTimeout(()=>{r.abort()},R.timeoutMillis):void 0; try{const G=await fetch(R.url,{method:R.requestType,headers:{...R.requestHeaders},...(R.body&&{body:R.body}),...(R.withCredentials&&{credentials:"include"}),signal:R.timeoutMillis&&r?r.signal:null});G.status===200?w?.(await G.text()):p?.(G.status)}catch(G){switch(G?.name){case "AbortError":p?.(408);break;default:p?.(400)}}finally{clearTimeout(f)}}cq(){return 4}};var FM=class extends g.f5{constructor(){super();this.logSource=1828;this.sessionIndex="0";this.Vs="https://play.google.com/log?format=json&hasfast=true";this.network=this.buildLabel=null;this.componentId="";this.L=this.xL=null;this.C=!1;this.logger=this.pageId=null}q2(){this.O=!0;return this}build(){this.network||(this.network=new B_l);const R=new zYY({logSource:this.logSource,q8:this.q8?this.q8:T8,sessionIndex:this.sessionIndex,X5:this.Vs,Sb:!1,bz:!1,q2:this.O,O6:this.O6,network:this.network});g.K(this, R);if(this.buildLabel){var w=this.buildLabel,p=NP(R.O);uf(p,7,w)}R.D=new p3P;this.componentId&&(R.componentId=this.componentId);this.xL&&(R.xL=this.xL);this.pageId&&(R.pageId=this.pageId);this.L&&((p=this.L)?(R.experimentIds||(R.experimentIds=new u5),w=R.experimentIds,p=p.AF(),uf(w,4,p)):R.experimentIds&&VF(R.experimentIds,4));this.C&&(R.O0=R.X);cJ6(R.O);this.network.S2&&this.network.S2(this.logSource);this.network.Si&&this.network.Si(R);return R}};var rGb=class extends g.f5{constructor(R){super();this.logSource=1828;this.componentId="";R||(R=new FM,R.componentId="",g.K(this,R),R=R.build());this.L=R}flush(R){R=R||[];if(R.length){const w=new w3x,p=[];for(let r=0;r-1?(w=R[I],p||(w.Km=!1)):(w=new JJL(w,this.src,G,!!r,f),w.Km=p,R.push(w));return w}; g.t.remove=function(R,w,p,r){R=R.toString();if(!(R in this.listeners))return!1;const f=this.listeners[R];w=Wv(f,w,p,r);return w>-1?(ms(f[w]),g.IM(f,w),f.length==0&&(delete this.listeners[R],this.L--),!0):!1}; g.t.removeAll=function(R){R=R&&R.toString();let w=0;for(const p in this.listeners)if(!R||p==R){const r=this.listeners[p];for(let f=0;f-1?R[f]:null}; g.t.hasListener=function(R,w){const p=R!==void 0,r=p?R.toString():"",f=w!==void 0;return g.ck(this.listeners,function(G){for(let I=0;I>>0);g.$b(g.E1,g.f5);g.E1.prototype[u9]=!0;g.t=g.E1.prototype;g.t.addEventListener=function(R,w,p,r){g.l9(this,R,w,p,r)}; g.t.removeEventListener=function(R,w,p,r){oR(this,R,w,p,r)}; g.t.dispatchEvent=function(R){var w=this.GW;if(w){var p=[];for(var r=1;w;w=w.GW)p.push(w),++r}w=this.D7;r=R.type||R;if(typeof R==="string")R=new g.IR(R,w);else if(R instanceof g.IR)R.target=R.target||w;else{var f=R;R=new g.IR(r,w);g.N6(R,f)}f=!0;let G,I;if(p)for(I=p.length-1;!R.C&&I>=0;I--)G=R.currentTarget=p[I],f=D1(G,r,!0,R)&&f;R.C||(G=R.currentTarget=w,f=D1(G,r,!0,R)&&f,R.C||(f=D1(G,r,!1,R)&&f));if(p)for(I=0;!R.C&&IR&&AsyncContext.Snapshot.wrap(R):R=>R;var xjD=class{constructor(R,w){this.O=R;this.G=w;this.C=0;this.L=null}get(){let R;this.C>0?(this.C--,R=this.L,this.L=R.next,R.next=null):R=this.O();return R}put(R){this.G(R);this.C<100&&(this.C++,R.next=this.L,this.L=R)}};var M3;var lbd=class{constructor(){this.C=this.L=null}add(R,w){const p=aR.get();p.set(R,w);this.C?this.C.next=p:this.L=p;this.C=p}remove(){let R=null;this.L&&(R=this.L,this.L=this.L.next,this.L||(this.C=null),R.next=null);return R}},aR=new xjD(()=>new LIl,R=>R.reset()),LIl=class{constructor(){this.next=this.scope=this.L=null}set(R,w){this.L=R; this.scope=w;this.next=null}reset(){this.next=this.scope=this.L=null}};var BU,$Z,Pv,qxW;$Z=!1;Pv=new lbd;g.TF=(R,w)=>{BU||qxW();$Z||(BU(),$Z=!0);Pv.add(R,w)}; qxW=()=>{const R=Promise.resolve(void 0);BU=()=>{R.then(h1H)}};de.prototype.reset=function(){this.context=this.C=this.O=this.L=null;this.G=!1}; var Z1=new xjD(function(){return new de},function(R){R.reset()}); g.n9.prototype.then=function(R,w,p){return SZ(this,eZ(typeof R==="function"?R:null),eZ(typeof w==="function"?w:null),p)}; g.n9.prototype.$goog_Thenable=!0;g.t=g.n9.prototype;g.t.finally=function(R){R=eZ(R);return new g.n9((w,p)=>{h8(this,r=>{R();w(r)},r=>{R(); p(r)})})}; g.t.bA=function(R,w){return SZ(this,null,eZ(R),w)}; g.t.catch=g.n9.prototype.bA;g.t.cancel=function(R){if(this.L==0){const w=new U1(R);g.TF(function(){Hv(this,w)},this)}}; g.t.RE=function(R){this.L=0;XB(this,2,R)}; g.t.VN=function(R){this.L=0;XB(this,3,R)}; g.t.fI=function(){let R;for(;R=vv(this);)N3(this,R,this.L,this.D);this.J=!1}; var wW=OZ;g.$b(U1,ZL);U1.prototype.name="cancel";g.$b(g.pw,g.E1);g.t=g.pw.prototype;g.t.enabled=!1;g.t.A2=null;g.t.setInterval=function(R){this.Tv=R;this.A2&&this.enabled?(this.stop(),this.start()):this.A2&&this.stop()}; g.t.cY=function(){if(this.enabled){const R=g.c6()-this.iy;R>0&&Rw.L.size); R.length&&this.U.flush(R,this.J);NgI(R);this.K=0;this.L.enabled&&this.L.stop()}A3(R,w,...p){(R=xw(this,R))&&R instanceof GS&&(R.A3(w,p),W5(this))}};var O2=class extends Error{constructor(R,w,p={}){super(w);this.code=R;this.metadata=p;this.name="RpcError";Object.setPrototypeOf(this,new.target.prototype)}toString(){let R=`RpcError(${kjP(this.code)||String(this.code)})`;this.message&&(R+=": "+this.message);return R}};qn.prototype.AF=function(R){const w=[];b0(this,R,w);return w.join("")}; var VX={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\u000b"},UNW=/\uffff/.test("\uffff")?/[\\"\x00-\x1f\x7f-\uffff]/g:/[\\"\x00-\x1f\x7f-\xff]/g;var ApD;g.$b(to,oh);to.prototype.L=function(){return new XMLHttpRequest}; ApD=new to;g.$b(g.OF,g.E1);var wcl=/^https?$/i,bI_=["POST","PUT"],Kw=[];g.t=g.OF.prototype;g.t.TP=function(){this.dispose();g.CR(Kw,this)}; g.t.send=function(R,w,p,r){if(this.L)throw Error("[goog.net.XhrIo] Object is active with another request="+this.U+"; newUri="+R);w=w?w.toUpperCase():"GET";this.U=R;this.G="";this.C=0;this.S=!1;this.O=!0;this.L=this.I0?this.I0.L():ApD.L();this.L.onreadystatechange=eZ((0,g.e_)(this.cU,this));try{this.getStatus(),this.xY=!0,this.L.open(w,String(R),!0),this.xY=!1}catch(G){this.getStatus();eb(this,G);return}R=p||"";p=new Map(this.headers);if(r)if(Object.getPrototypeOf(r)===Object.prototype)for(var f in r)p.set(f, r[f]);else if(typeof r.keys==="function"&&typeof r.get==="function")for(const G of r.keys())p.set(G,r.get(G));else throw Error("Unknown input type for opt_headers: "+String(r));r=Array.from(p.keys()).find(G=>"content-type"==G.toLowerCase()); f=g.qx.FormData&&R instanceof g.qx.FormData;!g.ra(bI_,w)||r||f||p.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");for(const [G,I]of p)this.L.setRequestHeader(G,I);this.O0&&(this.L.responseType=this.O0);"withCredentials"in this.L&&this.L.withCredentials!==this.D&&(this.L.withCredentials=this.D);try{this.J&&(clearTimeout(this.J),this.J=null),this.pB>0&&(this.getStatus(),this.J=setTimeout(this.UT.bind(this),this.pB)),this.getStatus(),this.X=!0,this.L.send(R),this.X=!1}catch(G){this.getStatus(), eb(this,G)}}; g.t.UT=function(){typeof Mn!="undefined"&&this.L&&(this.G="Timed out after "+this.pB+"ms, aborting",this.C=8,this.getStatus(),this.dispatchEvent("timeout"),this.abort(8))}; g.t.abort=function(R){this.L&&this.O&&(this.getStatus(),this.O=!1,this.K=!0,this.L.abort(),this.K=!1,this.C=R||7,this.dispatchEvent("complete"),this.dispatchEvent("abort"),DF(this))}; g.t.Gy=function(){this.L&&(this.O&&(this.O=!1,this.K=!0,this.L.abort(),this.K=!1),DF(this,!0));g.OF.Su.Gy.call(this)}; g.t.cU=function(){this.cS()||(this.xY||this.X||this.K?ah(this):this.Jy())}; g.t.Jy=function(){ah(this)}; g.t.isActive=function(){return!!this.L}; g.t.isComplete=function(){return g.c5(this)==4}; g.t.getStatus=function(){try{return g.c5(this)>2?this.L.status:-1}catch(R){return-1}}; g.t.getResponseHeader=function(R){if(this.L&&this.isComplete())return R=this.L.getResponseHeader(R),R===null?void 0:R}; g.t.getLastError=function(){return typeof this.G==="string"?this.G:String(this.G)};var dNW=class{send(R,w=()=>{},p=()=>{}){RWd(R.url,r=>{r=r.target; P5(r)?w(g.$w(r)):p(r.getStatus())},R.requestType,R.body,R.requestHeaders,R.timeoutMillis,R.withCredentials)}cq(){return 1}};var WU=class{constructor(R,w){this.logger=R;this.event=w;this.startTime=ZF()}done(){this.logger.O(this.event,ZF()-this.startTime)}},xF=class extends jFP{constructor(){super(...arguments);this.Xf={HJ:()=>[]}}},Jo=class extends xF{G(){}L(){}O(){}qP(){}U(){}D(){}C(){}K(R,w,p,r){return r}pB(){}J(){}X(){}},ypr=class extends xF{constructor(R){super(); this.logger=R;this.Xf={hQn:()=>this.logger, HJ:()=>this.logger.Xf.HJ()}; this.addOnDisposeCallback(()=>void this.logger.dispose())}update(R){this.logger.dispose(); this.logger=R}L(R){this.logger.L(R)}O(R,w){this.logger.O(R,w)}qP(R){this.logger.qP(R)}U(R){this.logger.U(R)}D(R,w){this.logger.D(R,w)}C(){this.logger.C()}K(R,w,p,r){return this.logger.K(R,w,p,r)}pB(R){this.logger.pB(R)}J(R){this.logger.J(R)}X(R){this.logger.X(R)}G(R){this.logger.G(R)}},VBD=class extends g.f5{constructor(R,w){super();this.callback=R;this.C=w;this.L=-w;this.addOnDisposeCallback(()=>void clearTimeout(this.timer))}},oad=class extends xF{constructor(R,w){super(); this.metrics=R;this.z_=w}G(R){this.metrics.IE.A3(R,this.z_)}L(R){this.metrics.eventCount.L(R,this.z_)}O(R,w){this.metrics.O1.A3(w,R,this.z_)}qP(R){this.metrics.errorCount.L(R,this.z_)}K(R,w,p,r){const f=ZF(),G=I=>{if(!this.cS()){var C=ZF()-f;this.metrics.r8.A3(C,R,p,I,w,this.z_)}}; r.then(()=>void G(0),I=>void G(I instanceof O2?I.code:-1)); return r}pB(R){this.metrics.jX.L(R,this.z_)}J(R){this.metrics.XW.L(R,this.z_)}X(R){this.metrics.z$.L(R,this.z_)}U(R){this.metrics.payloadSize.A3(R,this.z_)}D(R,w){this.metrics.hm.A3(w,R,this.z_)}},I26=class extends oad{constructor(R,w=[]){const p={z_:R.z_||"_",L7:R.L7||[],Sc:R.Sc|0,Vs:R.Vs,Se:R.Se||(()=>{}), kc:R.kc||((f,G)=>f2D(f,G,p.Se,p.Vs))},r=p.kc("53",p.L7.concat(w)); super({IE:new Jhd(r),errorCount:new hjd(r),eventCount:new ifl(r),O1:new QFI(r),r8:new TLI(r),jX:new glW(r),XW:new HfH(r),z$:new vld(r),payloadSize:new NLd(r),hm:new k$r(r)},p.z_);this.Xf={HJ:()=>this.options.L7.concat(this.I0).sort((f,G)=>f-G)}; this.options=p;this.service=r;this.O0=!R.kc;this.S=new VBD(()=>void this.service.G(),p.Sc); this.addOnDisposeCallback(()=>{this.S.dispose();this.O0&&this.service.dispose()}); g.tt(this.I0=w.slice())}C(){GMd(this.S)}};var gW=class extends qW{constructor(R){super(R)}};var H5=class extends qW{constructor(R){super(R)}};var kw=class extends qW{constructor(R){super(R,0,kw.messageId)}},l2D=NW(kw),tBd=function(R){return tG(w=>w instanceof R&&!S4(w))}(kw); kw.messageId="bfkj";var oe=class extends qW{constructor(R){super(R)}};var OID=class extends qW{constructor(R){super(R)}},KIL=NW(OID);g.mR=class{constructor(){this.promise=new Promise((R,w)=>{this.resolve=R;this.reject=w})}};var IQ=class extends g.f5{constructor(R){super();this.C=Math.floor(Math.random()*200);this.L=new OID;let w;if("challenge"in R&&tBd(R.challenge)){w=rU(R.challenge,4,void 0,rl);var p=rU(R.challenge,5,void 0,rl);rU(R.challenge,7,void 0,rl)&&(this.L=KIL(rU(R.challenge,7,void 0,rl)))}else({program:w,globalName:p}=R);this.addOnDisposeCallback(async()=>{const {T9:z}=await this.O;z?.()}); this.logger=TS(R.UX||{},this.L);g.K(this,this.logger);const r=new g.mR;this.O=r.promise;this.logger.L("t");const f=this.logger.share(),G=new WU(f,"t"),I=(z,B,W,x)=>{if(!this.logger.cS()){var q="k";B?q="h":W&&(q="u");q!=="k"?x!==0&&(this.logger.L(q),this.logger.O(q,z)):this.C<=0?(this.logger.L(q),this.logger.O(q,z),this.C=Math.floor(Math.random()*200)):this.C--}},C=(z,B,W,x)=>{Promise.resolve().then(()=>{G.done(); f.C();f.dispose();r.resolve({u2:z,T9:B,To:W,xkB:x})})},u=[(z,B)=>{this.logger.O(z,B)}, z=>{this.logger.qP(z)}, z=>{this.logger.U(z)}, (z,B)=>{this.logger.D(z,B)}]; if(!g.qx[p])throw this.logger.qP(25),Error("EGOU");if(!g.qx[p].a)throw this.logger.qP(26),Error("ELIU");try{const z=g.qx[p].a;p=[];const B=[];var m=tc(this.L);for(let q=0;q{})}catch(z){throw this.logger.qP(28),z; }}snapshot(R){if(this.cS())throw Error("Already disposed");this.logger.L("n");const w=this.logger.share();return this.O.then(({u2:p})=>new Promise(r=>{const f=new WU(w,"n");p(G=>{f.done();w.G(G.length);w.C();w.dispose();r(G)},[R.OP, R.KP,R.VD,R.zO])}))}WA(R){if(this.cS())throw Error("Already disposed"); this.logger.L("n");const w=Yw(this.logger,()=>this.G([R.OP,R.KP,R.VD,R.zO]),"n"); this.logger.G(w.length);this.logger.C();return w}tX(R){this.O.then(({To:w})=>{w?.(R)})}PZ(){return this.logger.share()}};var i0=class{constructor(){this.C={};this.L=null}};var Nn=class extends qW{constructor(R){super(R)}};var Sb=class extends qW{constructor(R){super(R)}};var p4=class{constructor(R,w,p){this.client=R;this.requestKey=w;this.L=p}N2(R){return w4(this,R,new Jo,0)}};var oQ=class extends g.f5{constructor(R){super();this.options=R;this.J=new g.mR;this.bE=this.J.promise;this.K=new g.mR;this.U=1;this.C=new g.mR;this.G=[];this.isPaused=!1;this.hX=R.hX||(()=>{}); this.logger=new ypr(TS(R.UX||{}));yGl(this,R.eE,R.fUy,R.f5n,R.Fgy,{...Ead,...(R.D4||{})});this.addOnDisposeCallback(()=>void VEb(this))}async snapshot(R){if(this.cS())throw Error("Already disposed"); this.O||this.D||await this.K.promise;if(this.O)return await this.O.snapshot(R);throw this.D;}pause(){this.cS()||this.isPaused||(this.isPaused=!0,this.L&&this.L.pause())}resume(){!this.cS()&&this.isPaused&&(this.isPaused=!1,this.L&&this.L.resume())}async checkForRefresh(){if(this.cS())throw Error("Already disposed");if(this.L){var R=this.L;R.isExpired()?(z_(R),R.Ma(0),R=!0):R=!1;R&&await this.C.promise}else await this.C.promise}tX(R){this.O?.tX?.(R)}handleError(R){this.cS()||(this.D=R,this.K.resolve(), this.options.Ep?.(R))}PZ(){return this.logger.share()}},Ead={cG:432E5,kQ:3E5,I8:10,zP:1E4,MI:3E4,Uz:3E4,Ls:6E4,bP:1E3,xS:6E4,pI:6E5,TT:.25,CI:2,maxAttempts:10},G_=class{constructor(R,w,p){this.endTimeMs=0;this.L=null;this.isPaused=!1;this.tick=()=>{if(!this.isPaused){var r=this.endTimeMs-Date.now();r<=this.O?(this.L=null,this.Ma(0)):this.L=setTimeout(this.tick,Math.min(r,this.kQ))}}; this.kQ=w;this.O=p;this.promise=new Promise(r=>{this.Ma=r}); O$x(this,R)}pause(){this.isPaused||(this.isPaused=!0,z_(this))}resume(){this.isPaused&&(this.isPaused=!1,this.tick())}C(){z_(this);this.endTimeMs=0;this.isPaused=!1;this.Ma(1)}isExpired(){return Date.now()>this.endTimeMs}};var K9d=Math.imul??((R,w)=>R*w|0),x5=[196, 200,224,18],q_=class{constructor(R,w=0,p=[]){this.maxItems=R;this.L=w;this.C=p}AF(){return String(this.L)+","+this.C.join()}QG(R,w){let p=void 0;if(this.C[this.L]!==R){const r=this.C.indexOf(R);r!==-1?(this.C.splice(r,1),rE7l(this.index,lh(R),w,p,r),"W"):"u"; this.logger.X(f)}C(R,w){const [p,r]=this.index?Yw(this.logger,()=>D1d(lh(R),w),"R"):["u"]; this.logger.J(p);return r}};var cGP={toString:function(R){let w=[],p=0;R-=-2147483648;w[p++]="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(R%52);for(R=Math.floor(R/52);R>0;)w[p++]="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".charAt(R%62),R=Math.floor(R/62);return w.join("")}};var l5=class extends g.f5{constructor(R){super();this.logger=R;this.G=new g.mR}uK(R,w){const p=this.O(R);w?.(p);return Yw(this.logger,()=>g.c8(p,2),this.C)}Zi(R,w,p){return Yw(this.logger,()=>w?this.uK(R,p):this.O(R,p),this.L)}},E2=class extends l5{constructor(R,w,p,r){super(R); this.K=w;this.D=p;this.L="m";this.C="x";this.J=0;bh(this,r)}O(R,w){this.logger.L(this.L);++this.J>=this.D&&this.G.resolve();const p=R();R=Yw(this.logger,()=>this.K(p),"C"); if(R===void 0)throw new VK(17,"YNJ:Undefined");if(!(R instanceof Uint8Array))throw new VK(18,"ODM:Invalid");w?.(R);return R}},d1b=class extends l5{constructor(R,w,p){super(R);this.K=w;this.L="f";this.C="z";bh(this,p)}O(){return this.K}},n7d=class extends l5{constructor(R,w,p){super(R);this.K=w;this.L="w";this.C="z";bh(this,p)}O(){return Yw(this.logger,()=>X0(this.K),"d")}uK(){return this.K}},JGH=class extends l5{constructor(R,w){super(R); this.error=w;this.L="e";this.C="y"}O(){if(this.K)return this.K;this.K=Vd(this,R=>"_"+PAP(R)); return Vd(this,R=>R)}},ch=class extends l5{constructor(R,w,p){super(R); this.K=w;this.clientState=p;this.L="S";this.C="q"}O(){var R=Math.floor(Date.now()/1E3),w=[Math.random()*255,Math.random()*255],p=w.concat([this.K&255,this.clientState],[R>>24&255,R>>16&255,R>>8&255,R&255]);R=new Uint8Array(2+p.length);R[0]=34;R[1]=p.length;R.set(p,2);p=R.subarray(2);w=w.length;for(let r=w;r{}); this.e1=R.e1||!1;if(MBI(R)){const r=this.z3;this.J=()=>o7W(r).catch(f=>{this.C=f=this.reportError(new VK(this.L?20:32,"TRG:Disposed",f));this.L?.dispose();this.L=void 0;this.G.reject(f)}); tEH(r,()=>void K4(this)); r.U===2&&K4(this)}else this.J=R.ul0,K4(this);const w=this.logger.share();w.L("o");const p=new WU(w,"o");this.G.promise.then(()=>{p.done();w.C();w.dispose()},()=>void w.dispose()); this.addOnDisposeCallback(()=>{this.L?(this.L.dispose(),this.L=void 0):this.C?this.logger.C():(this.C=this.reportError(new VK(32,"TNP:Disposed")),this.logger.C(),this.G.reject(this.C))}); g.K(this,this.logger)}eS(){return this.G.promise}O(R){return es(this,{...R},!1)}uK(R){return es(this,{...R},!0)}cV(R){if(!(R>150))try{this.cache=new Djb(R,this.logger)}catch(w){this.reportError(new VK(22,"GBJ:init",w))}}reportError(R){this.logger.qP(R.code);this.onError(R);return R}},MBI=function(R){return tG(w=>{if(!QXd(w))return!1;for(const [p,r]of Object.entries(R)){const f=p,G=r;if(!(f in w)){if(G.MW0===!0)continue;return!1}if(!G(w[f]))return!1}return!0})}({z3:function(R){return tG(w=>w instanceof R)}(oQ)},"");var cpd=class{constructor(){var R=g.l$();this.C=R;g.u0(R,"/client_streamz/youtube/aba/gac",Ku("type"),Ku("sequence"))}L(R,w){g.B5(this.C,"/client_streamz/youtube/aba/gac",R,w)}};var pTW=(new Date).getTime();var PLd=class extends qW{constructor(R){super(R)}};var abd=class{constructor(R,w,p){this.I2=R;this.TQ=w;this.metadata=p}getMetadata(){return this.metadata}};var Tpr=class{constructor(R,w={}){this.ut=R;this.metadata=w;this.status=null}getMetadata(){return this.metadata}getStatus(){return this.status}};var $j6=class{constructor(R,w,p,r,f){this.name=R;this.methodType="unary";this.requestType=w;this.responseType=p;this.L=r;this.C=f}J(R,w={}){return new abd(R,this,w)}getName(){return this.name}};var X3d=new $j6("/google.internal.waa.v1.Waa/Create",Nn,PLd,R=>R.AF(),NW(PLd));var naD=class extends qW{constructor(R){super(R)}};var L9H=new $j6("/google.internal.waa.v1.Waa/GenerateIT",Sb,naD,R=>R.AF(),NW(naD));var u0d=new Set(["SAPISIDHASH","APISIDHASH"]);var g7H=class extends qW{constructor(R){super(R)}getValue(){const R=b4(this,2);if(Array.isArray(R)||R instanceof qW)throw Error("Cannot access the Any.value field on Any protos encoded using the jspb format, call unpackJspb instead");return c$(this,2)}};var hWr=NW(class extends qW{constructor(R){super(R)}getMessage(){return rU(this,2)}});var zyL=class{constructor(R,w){this.C=[];this.G=[];this.K=[];this.O=[];this.L=[];this.J=R.Ts;this.D=w;this.xhr=R.xhr;this.J&&QmP(this)}lf(R,w){R==="data"?this.C.push(w):R==="metadata"?this.G.push(w):R==="status"?this.K.push(w):R==="end"?this.O.push(w):R==="error"&&this.L.push(w)}removeListener(R,w){R==="data"?Y5(this.C,w):R==="metadata"?Y5(this.G,w):R==="status"?Y5(this.K,w):R==="end"?Y5(this.O,w):R==="error"&&Y5(this.L,w);return this}cancel(){this.xhr.abort()}},H$W=class extends Error{constructor(){super(); this.name="AsyncStack";Object.setPrototypeOf(this,new.target.prototype)}};g.$b(g.FO,oh);g.FO.prototype.L=function(){const R=new js(this.G,this.O);this.C&&R.setCredentialsMode(this.C);return R}; g.FO.prototype.setCredentialsMode=function(R){this.C=R}; g.$b(js,g.E1);g.t=js.prototype;g.t.open=function(R,w){if(this.readyState!=0)throw this.abort(),Error("Error reopening a connection");this.S=R;this.pB=w;this.readyState=1;T_(this)}; g.t.send=function(R){if(this.readyState!=1)throw this.abort(),Error("need to call open() first. ");if(this.U.signal.aborted)throw this.abort(),Error("Request was aborted.");this.L=!0;const w={headers:this.X,method:this.S,credentials:this.K,cache:void 0,signal:this.U.signal};R&&(w.body=R);(this.xY||g.qx).fetch(new Request(this.pB,w)).then(this.NI.bind(this),this.ou.bind(this))}; g.t.abort=function(){this.response=this.responseText="";this.X=new Headers;this.status=0;this.U.abort("Request was aborted.");this.O&&this.O.cancel("Request was aborted.").catch(()=>{}); this.readyState>=1&&this.L&&this.readyState!=4&&(this.L=!1,ih(this));this.readyState=0}; g.t.NI=function(R){if(this.L&&(this.G=R,this.C||(this.status=this.G.status,this.statusText=this.G.statusText,this.C=R.headers,this.readyState=2,T_(this)),this.L&&(this.readyState=3,T_(this),this.L)))if(this.responseType==="arraybuffer")R.arrayBuffer().then(this.HW.bind(this),this.ou.bind(this));else if(typeof g.qx.ReadableStream!=="undefined"&&"body"in R){this.O=R.body.getReader();if(this.J){if(this.responseType)throw Error('responseType must be empty for "streamBinaryChunks" mode responses.');this.response= []}else this.response=this.responseText="",this.D=new TextDecoder;JD(this)}else R.text().then(this.A5.bind(this),this.ou.bind(this))}; g.t.vW=function(R){if(this.L){if(this.J&&R.value)this.response.push(R.value);else if(!this.J){var w=R.value?R.value:new Uint8Array(0);if(w=this.D.decode(w,{stream:!R.done}))this.response=this.responseText+=w}R.done?ih(this):T_(this);this.readyState==3&&JD(this)}}; g.t.A5=function(R){this.L&&(this.response=this.responseText=R,ih(this))}; g.t.HW=function(R){this.L&&(this.response=R,ih(this))}; g.t.ou=function(){this.L&&ih(this)}; g.t.setRequestHeader=function(R,w){this.X.append(R,w)}; g.t.getResponseHeader=function(R){return this.C?this.C.get(R.toLowerCase())||"":""}; g.t.getAllResponseHeaders=function(){if(!this.C)return"";const R=[],w=this.C.entries();for(var p=w.next();!p.done;)p=p.value,R.push(p[0]+": "+p[1]),p=w.next();return R.join("\r\n")}; g.t.setCredentialsMode=function(R){this.K=R}; Object.defineProperty(js.prototype,"withCredentials",{get:function(){return this.K==="include"}, set:function(R){this.setCredentialsMode(R?"include":"same-origin")}});g.Qd.prototype.toString=function(){const R=[];var w=this.K;w&&R.push(Ss(w,djd,!0),":");var p=this.L;if(p||w=="file")R.push("//"),(w=this.U)&&R.push(Ss(w,djd,!0),"@"),R.push(g.m3(p).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),p=this.O,p!=null&&R.push(":",String(p));if(p=this.C)this.L&&p.charAt(0)!="/"&&R.push("/"),R.push(Ss(p,p.charAt(0)=="/"?ZI6:Yxd,!0));(p=this.G.toString())&&R.push("?",p);(p=this.J)&&R.push("#",Ss(p,FIL));return R.join("")}; g.Qd.prototype.resolve=function(R){const w=this.clone();let p=!!R.K;p?g.hD(w,R.K):p=!!R.U;p?w.U=R.U:p=!!R.L;p?g.g4(w,R.L):p=R.O!=null;var r=R.C;if(p)g.Hh(w,R.O);else if(p=!!R.C){if(r.charAt(0)!="/")if(this.L&&!this.C)r="/"+r;else{var f=w.C.lastIndexOf("/");f!=-1&&(r=w.C.slice(0,f+1)+r)}f=r;if(f==".."||f==".")r="";else if(g.G1(f,"./")||g.G1(f,"/.")){r=pj(f,"/");f=f.split("/");const G=[];for(let I=0;I1||G.length==1&&G[0]!= "")&&G.pop(),r&&I==f.length&&G.push("")):(G.push(C),r=!0)}r=G.join("/")}else r=f}p?w.C=r:p=R.G.toString()!=="";p?vh(w,R.G.clone()):p=!!R.J;p&&(w.J=R.J);return w}; g.Qd.prototype.clone=function(){return new g.Qd(this)}; var djd=/[#\/\?@]/g,Yxd=/[#\?:]/g,ZI6=/[#\?]/g,RyY=/[#\?@]/g,FIL=/#/g;g.t=U2.prototype;g.t.add=function(R,w){pK(this);this.O=null;R=rf(this,R);let p=this.L.get(R);p||this.L.set(R,p=[]);p.push(w);this.C=this.C+1;return this}; g.t.remove=function(R){pK(this);R=rf(this,R);return this.L.has(R)?(this.O=null,this.C=this.C-this.L.get(R).length,this.L.delete(R)):!1}; g.t.clear=function(){this.L=this.O=null;this.C=0}; g.t.isEmpty=function(){pK(this);return this.C==0}; g.t.forEach=function(R,w){pK(this);this.L.forEach(function(p,r){p.forEach(function(f){R.call(w,f,r,this)},this)},this)}; g.t.zD=function(){pK(this);const R=Array.from(this.L.values()),w=Array.from(this.L.keys()),p=[];for(let r=0;r0?String(R[0]):w}; g.t.toString=function(){if(this.O)return this.O;if(!this.L)return"";const R=[],w=Array.from(this.L.keys());for(let r=0;r>>3;G.O!=1&&G.O!=2&&G.O!=15&&BZ(G,I,C,"unexpected tag");G.L=1;G.C=0;G.G=0} function p(u){G.G++;G.G==5&&u&240&&BZ(G,I,C,"message length too long");G.C|=(u&127)<<(G.G-1)*7;u&128||(G.L=2,G.U=0,typeof Uint8Array!=="undefined"?G.K=new Uint8Array(G.C):G.K=Array(G.C),G.C==0&&f())} function r(u){G.K[G.U++]=u;G.U==G.C&&f()} function f(){if(G.O<15){const u={};u[G.O]=G.K;G.D.push(u)}G.L=0} const G=this,I=R instanceof Array?R:new Uint8Array(R);let C=0;for(;C0?R:null};WZ.prototype.isInputValid=function(){return this.L===null}; WZ.prototype.Ch=function(){return this.L}; WZ.prototype.Wn=function(){return!1}; WZ.prototype.parse=function(R){this.L!==null&&xM(this,R,"stream already broken");let w=null;try{{var p=this.O;p.O||mP(p,R,"stream already broken");p.L+=R;const G=Math.floor(p.L.length/4);if(G==0)var r=null;else{try{var f=$S(p.L.slice(0,G*4))}catch(I){mP(p,p.L,I.message)}p.C+=G*4;p.L=p.L.slice(G*4);r=f}}w=r===null?null:this.G.parse(r)}catch(G){xM(this,R,G.message)}this.C+=R.length;return w};g.t=LK.prototype;g.t.isInputValid=function(){return this.K!=3}; g.t.Ch=function(){return this.X}; g.t.done=function(){return this.K===2}; g.t.Wn=function(){return!1}; g.t.parse=function(R){function w(){for(;B0;)if(x=R[B++],G.U===4?G.U=0:G.U++,!x)break a;if(x==='"'&&!G.D){G.L=r();break}if(x==="\\"&&!G.D&&(G.D=!0,x=R[B++], !x))break;if(G.D)if(G.D=!1,x==="u"&&(G.U=1),x=R[B++])continue;else break;C.lastIndex=B;x=C.exec(R);if(!x){B=R.length+1;break}B=x.index+1;x=R[x.index];if(!x)break}G.O+=B-q;continue;case 9:if(!x)continue;x==="r"?G.L=10:qG(G,R,B);continue;case 10:if(!x)continue;x==="u"?G.L=11:qG(G,R,B);continue;case 11:if(!x)continue;x==="e"?G.L=r():qG(G,R,B);continue;case 12:if(!x)continue;x==="a"?G.L=13:qG(G,R,B);continue;case 13:if(!x)continue;x==="l"?G.L=14:qG(G,R,B);continue;case 14:if(!x)continue;x==="s"?G.L=15: qG(G,R,B);continue;case 15:if(!x)continue;x==="e"?G.L=r():qG(G,R,B);continue;case 16:if(!x)continue;x==="u"?G.L=17:qG(G,R,B);continue;case 17:if(!x)continue;x==="l"?G.L=18:qG(G,R,B);continue;case 18:if(!x)continue;x==="l"?G.L=r():qG(G,R,B);continue;case 19:x==="."?G.L=20:qG(G,R,B);continue;case 20:if("0123456789.eE+-".indexOf(x)!==-1)continue;else B--,G.O--,G.L=r();continue;default:qG(G,R,B)}}} function r(){const x=I.pop();return x!=null?x:1} function f(x){G.C>1||(x||(x=z===-1?G.G+R.substring(m,B):R.substring(z,B)),G.pB?G.J.push(x):G.J.push(JSON.parse(x)),z=B)} const G=this,I=G.S,C=G.xY,u=R.length;let m=0,z=-1,B=0;for(;B0?(W=G.J,G.J=[],W):null}return null};Af.prototype.isInputValid=function(){return this.K===null}; Af.prototype.Ch=function(){return this.K}; Af.prototype.Wn=function(){return!1}; Af.prototype.parse=function(R){function w(u){G.C=6;G.K="The stream is broken @"+G.L+"/"+I+". Error: "+u+". With input:\n";throw Error(G.K);} function p(){G.O=new LK({ml0:!0,nf:!0})} function r(u){if(u)for(let m=0;m1)&&w("extra status: "+u);G.J=!0;const m={};m[2]=u[0];G.G.push(m)}} const G=this;let I=0;for(;I0?(R=G.G,G.G=[],R):null};var sLr=class{constructor(R){this.L=R;this.C=null;this.K=this.O=0;this.X=!1;this.G=this.D=this.J=null;this.U=new g.uO(this);this.U.listen(this.L,"readystatechange",this.pB)}W3(){return this.L}getStatus(){return this.K}pB(R){R=R.target;try{if(R==this.L)a:{const G=g.c5(this.L);var w=this.L.C,p=this.L.getStatus();const I=g.$w(this.L);R=[];if(g.XM(this.L)instanceof Array){const C=g.XM(this.L);C.length>0&&C[0]instanceof Uint8Array&&(this.X=!0,R=C)}if(!(G<3||G==3&&!I&&R.length==0))if(p=p==200||p==206,G== 4&&(w==8?bO(this,7):w==7?bO(this,8):p||bO(this,3)),this.C||(this.C=rbx(this.L),this.C==null&&bO(this,5)),this.K>2)yA(this);else{if(R.length>this.O){const C=R.length;w=[];try{if(this.C.Wn())for(var r=0;rthis.O){r=I.slice(this.O);this.O=I.length;try{const C=this.C.parse(r);C!=null&&this.G&&this.G(C)}catch(C){bO(this,5);yA(this);break a}}G==4?(I.length!=0||this.X?bO(this,2):bO(this,4),yA(this)):bO(this,1)}}}catch(G){bO(this,6),yA(this)}}};var mIr=class{constructor(R){R=this.O=R;var w=(0,g.e_)(this.G,this);R.G=w;R=this.O;w=(0,g.e_)(this.K,this);R.D=w;this.C={};this.L={}}lf(R,w){let p=this.C[R];p||(p=[],this.C[R]=p);p.push(w)}addListener(R,w){this.lf(R,w);return this}removeListener(R,w){const p=this.C[R];p&&g.CR(p,w);(R=this.L[R])&&g.CR(R,w);return this}once(R,w){let p=this.L[R];p||(p=[],this.L[R]=p);p.push(w);return this}G(R){var w=this.C.data;w&&VA(R,w);(w=this.L.data)&&VA(R,w);this.L.data=[]}K(){switch(this.O.getStatus()){case 1:oy(this, "readable");break;case 5:case 6:case 4:case 7:case 3:oy(this,"error");break;case 8:oy(this,"close");break;case 2:oy(this,"end")}}};var BOd=class{constructor(){var R={format:"jspb"};this.LF=R.LF||g.yD("suppressCorsPreflight",R)||!1;this.withCredentials=R.withCredentials||g.yD("withCredentials",R)||!1;this.Sd=R.Sd||[];this.Fp=R.Fp||[];this.Lj=R.Lj;this.L=R.RWN||!1}serverStreaming(R,w,p,r){const f=R.substring(0,R.length-r.name.length);return fAd(G=>{const I=G.TQ;var C=G.getMetadata();const u=tf(this,!1);C=O4(this,C,u,f+I.getName());const m=KK(u,I.C,!0);G=I.L(G.I2);u.send(C,"POST",G);return m},this.Sd).call(this,r.J(w,p))}};E4.prototype.create=function(R,w,p){return RQ(this.L,this.C+"/$rpc/google.internal.waa.v1.Waa/Create",R,w||{},X3d,p)};var L1=class{constructor(R,w){this.lQ=3;this.o7=R;this.defaultValue=w;this.Xc="bool"}},ql=class{constructor(R,w){this.lQ=3;this.o7=R;this.defaultValue=w;this.Xc="int"}},Aw=class{constructor(R,w){this.lQ=3;this.o7=R;this.defaultValue=w;this.Xc="double"}};var emd,Jp_,LG,r5H,iId,dSd,QPd,vWL,hY6,gab,HId,U7d,vab,N_W,kuH,Sxx,RJl,wqH,pqd,NHl,nD,rEd,Oy6,kxW,UZl,f4b,G5W,I4d,C16,IEP,uur,WnI,ROL,s9l,mol,zJr,BBd,hgd,WxW,xod,l4D,Lxx,qG_,AEx,bsd,yEb,KBP,VYH,o1D,lM_,g6,FDr,Ddd,tYY,OsY,Kx_,P_Y,akd,E1D,O6H,Gkx,eJW,klr;emd=new L1(45759580,!1);Jp_=new L1(45766273,!1);g.T_l=new L1(45757878,!1);LG=new L1(45749396,!1);r5H=new L1(45751227,!1);iId=new L1(45751228,!1);dSd=new L1(45745123,!1);QPd=new L1(45742118,!1);vWL=new L1(45742119,!1);hY6=new L1(45754339,!1); gab=new L1(45757087,!1);HId=new L1(45756446,!1);U7d=new L1(45760018,!1);vab=new L1(45739196,!1);N_W=new L1(45739198,!1);kuH=new L1(45739197,!1);g.UjI=new ql(45750947,CW("0"));Sxx=new Aw(45746966,0);RJl=new Aw(45746967,0);wqH=new Aw(45737488,0);pqd=new Aw(45737489,0);NHl=new L1(45732791,!0);nD=new L1(45728572,!1);rEd=new L1(45781111,!1);Oy6=new L1(45769119,!1);kxW=new L1(45737482,!1);UZl=new Aw(45741773,0);f4b=new L1(45763496,!1);G5W=new L1(45763411,!1);I4d=new L1(45769999,!1); C16=new L1(45731083,!1);IEP=new L1(45728553,!1);uur=new L1(45734191,!1);WnI=new L1(45745610,!1);ROL=new L1(45756619,!1);s9l=new L1(45758290,!1);mol=new L1(45762920,!1);zJr=new L1(45767289,!1);BBd=new L1(45768391,!1);hgd=new L1(45735523,!1);WxW=new Aw(45735428,4E3);xod=new L1(45748009,!1);l4D=new L1(45752604,!1);Lxx=new L1(45755066,!1);qG_=new L1(45735462,!1);AEx=new L1(45751943,!1);bsd=new L1(45751944,!1);yEb=new L1(45751945,!1);KBP=new L1(45764592,!1);VYH=new Aw(45764593,0);o1D=new L1(45756939,!1); lM_=new L1(45766511,!1);g6=new L1(45728181,!1);FDr=new L1(45746180,!1);Ddd=new L1(45756543,!1);tYY=new L1(45756620,!1);OsY=new ql(45761760,CW("200"));Kx_=new L1(45740357,!1);P_Y=new ql(45762838,CW("0"));akd=new Aw(45768430,0);E1D=new L1(45768318,!1);g.Dob=new L1(45755760,!1);O6H=new L1(45760017,!1);Gkx=new L1(45732775,!1);eJW=new L1(45765818,!1);g.MYP=new L1(45734776,!1);klr=new L1(45755924,!1);var z6I=new Aw(45756872,0),m8d=new Aw(45725542,0),sxd=new Aw(45725543,0),WDl=new Aw(45757426,0),Ixb=new Aw(45725539,0),x8D=new Aw(45764252,0),uzH=new Aw(45725541,0),lxD=new Aw(45757427,0),Cnx=new Aw(45725540,0),GNW=new Aw(45725538,0),BID=new Aw(45764523,0),LD6=new Aw(45764217,0),qob=new Aw(45764524,0),bEL=new Aw(45765602,0),oH6=new Aw(45741339,0),AMH=new Aw(45767763,0),Vnx=new Aw(45770002,0),yMd=new Aw(45770001,0);var cEd=class{constructor(R){this.L=R}};var P1H=class{constructor(R){this.L=R}};var e6="://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(" "),xI6=/\bocr\b/;var Lnx=/(?:\[|%5B)([a-zA-Z0-9_]+)(?:\]|%5D)/g;var a4D=class extends qW{constructor(R){super(R,500)}};var $od=class extends qW{constructor(R){super(R,500)}};var qZd=class extends qW{constructor(R){super(R)}getName(){return rU(this,1)}getOptions(){return i4(this,$od,3)}clearOptions(){return VF(this,3)}};var bAl=function(R){return w=>{w=JSON.parse(w);if(!Array.isArray(w))throw Error("Expected jspb data to be an array, got "+ol(w)+": "+w);w[UZ]|=34;return new R(w)}}(class extends qW{constructor(R){super(R)}getName(){return rU(this,1)}getOptions(){return i4(this,a4D,3)}clearOptions(){return VF(this,3)}Z5(){return fP(this,6)}Rg(R){mw(this,6,R)}});var cZ=Symbol();var ay=Symbol();var $M=!1,OAD=1,nK=Symbol("SIGNAL");var oSW={version:0,tW0:0,oM:!1,producers:void 0,xOl:void 0,Dh:void 0,r$n:void 0,boB:!1,GEY:!1,IHl:!1,kind:"unknown",Lg0:()=>!1, CBq:()=>{}, Kf:()=>{}, K6B:()=>{}, w1:function(R,w){return Object.is(R,w)}, value:void 0,kind:"signal"};var FL=class extends g.E1{constructor(R){super();this.K=this.C=0;this.JU=R??{SL:(w,p)=>setTimeout(w,p), zm:w=>{clearTimeout(w)}}; this.L=window.navigator?.onLine??!0;this.O=async()=>{await j6(this)}; window.addEventListener("offline",this.O);window.addEventListener("online",this.O);this.K||this.n3()}dispose(){window.removeEventListener("offline",this.O);window.removeEventListener("online",this.O);this.JU.zm(this.K);delete FL.instance}zg(){return this.L}n3(){this.K=this.JU.SL(async()=>{this.L?window.navigator?.onLine||await j6(this):await j6(this);this.n3()},3E4)}};var Xqb=class extends qW{constructor(R){super(R)}};var n16=[0,O1Y,-1];var b5=[0,LSL,-1];var dor=class extends qW{constructor(R){super(R)}};var Zsd=function(R){return w=>QQ(w,R)}([0, Q4,-1,nT,YG,n16,-1,X6,dj,Q4,b5,YG,Q4,-1,[0,n16,-1],dj,xlP,b5,X6,[0,1,dj,-4,$G,[0,X6,-1,dj],YG,X6,F6,[0,Q4,dj],dj,-1,Q4,-2,X6,-1,Q4,X6,Q4,dj,[0,3,dj,-1,4,Tc],$G,iw,[0,Q4,-1,YG],ZP],YG,t8W,F6,[0,b5,F6,[0,YG,Q4],X6,Q4,-1],1,F6,[0,xlP,-1,iw],Q4,b5]);var FyW=iT(class extends qW{constructor(R){super(R)}C(){return fP(this,5)}},[0,Q4,Qgx,dj,Q4,-2,dj,nT]);var Geb=class{constructor(){this.data=[];this.L=-1}set(R,w=!0){0<=R&&R<52&&Number.isInteger(R)&&this.data[R]!==w&&(this.data[R]=w,this.L=-1)}get(R){return!!this.data[R]}};var Ta;g.$b(g.hf,g.f5);g.t=g.hf.prototype;g.t.start=function(){this.stop();this.G=!1;const R=gf(this),w=HZ(this);R&&!w&&this.C.mozRequestAnimationFrame?(this.L=g.l9(this.C,"MozBeforePaint",this.O),this.C.mozRequestAnimationFrame(null),this.G=!0):this.L=R&&w?R.call(this.C,this.O):this.C.setTimeout(HdH(this.O),20)}; g.t.stop=function(){if(this.isActive()){const R=gf(this),w=HZ(this);R&&!w&&this.C.mozRequestAnimationFrame?t8(this.L):R&&w?w.call(this.C,this.L):this.C.clearTimeout(this.L)}this.L=null}; g.t.isActive=function(){return this.L!=null}; g.t.aU=function(){this.G&&this.L&&t8(this.L);this.L=null;this.J.call(this.K,g.c6())}; g.t.Gy=function(){this.stop();g.hf.Su.Gy.call(this)};g.$b(g.vZ,g.f5);g.t=g.vZ.prototype;g.t.BL=0;g.t.Gy=function(){g.vZ.Su.Gy.call(this);this.stop();delete this.L;delete this.C}; g.t.start=function(R){this.stop();this.BL=g.rW(this.O,R!==void 0?R:this.Tv)}; g.t.ql=function(R){this.isActive()||this.start(R)}; g.t.stop=function(){this.isActive()&&g.qx.clearTimeout(this.BL);this.BL=0}; g.t.bv=function(){this.isActive()&&g.NG(this)}; g.t.isActive=function(){return this.BL!=0}; g.t.oF=function(){this.BL=0;this.L&&this.L.call(this.C)};g.yV=class extends g.f5{constructor(R,w,p){super();this.K=p!=null?R.bind(p):R;this.Tv=w;this.O=null;this.L=!1;this.C=0;this.A2=null}G(R){this.O=arguments;this.A2||this.C?this.L=!0:kM(this)}stop(){this.A2&&(g.qx.clearTimeout(this.A2),this.A2=null,this.L=!1,this.O=null)}pause(){this.C++}resume(){this.C--;this.C||!this.L||this.A2||(this.L=!1,kM(this))}Gy(){super.Gy();this.stop()}};g.YGb=class{constructor(R,w){this.L=R[g.qx.Symbol.iterator]();this.C=w}[Symbol.iterator](){return this}next(){const R=this.L.next();return{value:R.done?void 0:this.C.call(void 0,R.value),done:R.done}}};g.$b(g.Cc,g.E1);g.t=g.Cc.prototype;g.t.isPlaying=function(){return this.L==1}; g.t.isPaused=function(){return this.L==-1}; g.t.XN=function(){this.mA("begin")}; g.t.rR=function(){this.mA("end")}; g.t.onFinish=function(){this.mA("finish")}; g.t.onStop=function(){this.mA("stop")}; g.t.mA=function(R){this.dispatchEvent(R)};var FxL=D2(function(){const R=g.sW("DIV");var w=g.f$?"-webkit":jE?"-moz":null;let p="transition:opacity 1s linear;";w&&(p+=w+"-transition:opacity 1s linear;");w=hPD({style:p});if(R.nodeType===1&&/^(script|style)$/i.test(R.tagName))throw Error("");R.innerHTML=h$(w);return g.JG(R.firstChild,"transition")!=""});g.$b(uG,g.Cc);g.t=uG.prototype;g.t.play=function(){if(this.isPlaying())return!1;this.XN();this.mA("play");this.startTime=g.c6();this.L=1;if(FxL())return g.Z2(this.C,this.J),this.O=g.rW(this.fT,void 0,this),!0;this.lk(!1);return!1}; g.t.fT=function(){g.RL(this.C);DIL(this.C,this.D);g.Z2(this.C,this.G);this.O=g.rW((0,g.e_)(this.lk,this,!1),this.K*1E3)}; g.t.stop=function(){this.isPlaying()&&this.lk(!0)}; g.t.lk=function(R){g.Z2(this.C,"transition","");g.qx.clearTimeout(this.O);g.Z2(this.C,this.G);this.endTime=g.c6();this.L=0;if(R)this.onStop();else this.onFinish();this.rR()}; g.t.Gy=function(){this.stop();uG.Su.Gy.call(this)}; g.t.pause=function(){};var eyD={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};mk("Element","attributes")||mk("Node","attributes");mk("Element","innerHTML")||mk("HTMLElement","innerHTML");mk("Node","nodeName");mk("Node","nodeType");mk("Node","parentNode");mk("Node","childNodes");mk("HTMLElement","style")||mk("Element","style");mk("HTMLStyleElement","sheet");var aAI=zX("getPropertyValue"),$IP=zX("setProperty");mk("Element","namespaceURI")||mk("Node","namespaceURI");var PvP={"-webkit-border-horizontal-spacing":!0,"-webkit-border-vertical-spacing":!0};var ZAW,KYH,dIH,nSd,YZL;ZAW=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]");KYH=RegExp("^[\u0591-\u06ef\u06fa-\u08ff\u200f\ud802-\ud803\ud83a-\ud83b\ufb1d-\ufdff\ufe70-\ufefc]");g.j9l=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.xD=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]");dIH=/^http:\/\/.*/;g.JEr=RegExp("^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)","i");nSd=/\s+/;YZL=/[\d\u06f0-\u06f9]/;Intl.NumberFormat.supportedLocalesOf(["en".replace("_","-")]);var Lc=class{constructor(R){this.C=R}xH(){return new qg(this.C())}[Symbol.iterator](){return new Au(this.C())}L(){return new Au(this.C())}},qg=class extends g.tQ{constructor(R){super();this.C=R}next(){return this.C.next()}[Symbol.iterator](){return new Au(this.C)}L(){return new Au(this.C)}},Au=class extends Lc{constructor(R){super(()=>R); this.O=R}next(){return this.O.next()}};yB.prototype.clone=function(){return new yB(this.L,this.D,this.O,this.K,this.G,this.J,this.C,this.U)}; yB.prototype.equals=function(R){return this.L==R.L&&this.D==R.D&&this.O==R.O&&this.K==R.K&&this.G==R.G&&this.J==R.J&&this.C==R.C&&this.U==R.U};Oc.prototype.clone=function(){return new Oc(this.start,this.end)};(function(){if(uRd){var R=/Windows NT ([0-9.]+)/;return(R=R.exec(g.s3()))?R[1]:"0"}return rk?(R=/1[0|1][_.][0-9_.]+/,(R=R.exec(g.s3()))?R[0].replace(/_/g,"."):"10"):g.lB?(R=/Android\s+([^\);]+)(\)|;)/,(R=R.exec(g.s3()))?R[1]:""):YBx||FYl||jXl?(R=/(?:iPhone|CPU)\s+OS\s+(\S+)/,(R=R.exec(g.s3()))?R[1].replace(/_/g,"."):""):""})();var Fn6=function(){if(g.PK)return Kc(/Firefox\/([0-9.]+)/);if(g.BE||g.gx||g.DE)return Ep;if(g.Io){if(VP()||oB()){var R=Kc(/CriOS\/([0-9.]+)/);if(R)return R}return Kc(/Chrome\/([0-9.]+)/)}if(g.tx&&!VP())return Kc(/Version\/([0-9.]+)/);if(Be||We){if(R=/Version\/(\S+).*Mobile\/(\S+)/.exec(g.s3()))return R[1]+"."+R[2]}else if(g.KT)return(R=Kc(/Android\s+([0-9.]+)/))?R:Kc(/Version\/([0-9.]+)/);return""}();g.$b(g.DG,g.f5);g.t=g.DG.prototype;g.t.subscribe=function(R,w,p){let r=this.C[R];r||(r=this.C[R]=[]);const f=this.J;this.L[f]=R;this.L[f+1]=w;this.L[f+2]=p;this.J=f+3;r.push(f);return f}; g.t.unsubscribe=function(R,w,p){if(R=this.C[R]){const r=this.L;if(R=R.find(function(f){return r[f+1]==w&&r[f+2]==p}))return this.Cv(R)}return!1}; g.t.Cv=function(R){const w=this.L[R];if(w){const p=this.C[w];this.G!=0?(this.O.push(R),this.L[R+1]=()=>{}):(p&&g.CR(p,R),delete this.L[R],delete this.L[R+1],delete this.L[R+2])}return!!w}; g.t.publish=function(R,w){var p=this.C[R];if(p){const f=Array(arguments.length-1);var r=arguments.length;let G;for(G=1;G0&&this.G==0)for(;p=this.O.pop();)this.Cv(p)}}return G!=0}return!1}; g.t.clear=function(R){if(R){const w=this.C[R];w&&(w.forEach(this.Cv,this),delete this.C[R])}else this.L.length=0,this.C={}}; g.t.Gy=function(){g.DG.Su.Gy.call(this);this.clear();this.O.length=0};g.ex.prototype.set=function(R,w){w===void 0?this.MV.remove(R):this.MV.set(R,g.Ao(w))}; g.ex.prototype.get=function(R){let w;try{w=this.MV.get(R)}catch(p){return}if(w!==null)try{return JSON.parse(w)}catch(p){throw"Storage: Invalid value was encountered";}}; g.ex.prototype.remove=function(R){this.MV.remove(R)};g.$b(Mg,g.ex);Mg.prototype.set=function(R,w){Mg.Su.set.call(this,R,PE(w))}; Mg.prototype.LR=function(R){R=Mg.Su.get.call(this,R);if(R===void 0||R instanceof Object)return R;throw"Storage: Invalid value was encountered";}; Mg.prototype.get=function(R){if(R=this.LR(R)){if(R=R.data,R===void 0)throw"Storage: Invalid value was encountered";}else R=void 0;return R};g.$b(a4,Mg);a4.prototype.set=function(R,w,p){if(w=PE(w)){if(p){if(p=p.length)return g.SF;var f=p.key(w++);if(R)return g.ON(f);f=p.getItem(f);if(typeof f!=="string")throw"Storage mechanism: Invalid value was encountered";return g.ON(f)}; return r}; g.t.clear=function(){ZG(this);this.L.clear()}; g.t.key=function(R){ZG(this);return this.L.key(R)};g.$b(YD,dF);g.$b(FH,dF);g.$b(jx,nc);jx.prototype.set=function(R,w){this.C.set(this.L+R,w)}; jx.prototype.get=function(R){return this.C.get(this.L+R)}; jx.prototype.remove=function(R){this.C.remove(this.L+R)}; jx.prototype.xH=function(R){const w=this.C[Symbol.iterator](),p=this,r=new g.tQ;r.next=function(){var f=w.next();if(f.done)return f;for(f=f.value;f.slice(0,p.L.length)!=p.L;){f=w.next();if(f.done)return f;f=f.value}return g.ON(R?f.slice(p.L.length):p.C.get(f))}; return r};TX.prototype.getValue=function(){return this.C}; TX.prototype.clone=function(){return new TX(this.L,this.C)};var VV=class{constructor(R){this.L=[];if(R)a:{let p;if(R instanceof VV){if(p=R.zD(),R=R.BC(),this.L.length<=0){var w=this.L;for(let r=0;r0;){const r=R-1>>1;if(w[r].L>p.L)w[R]=w[r],R=r;else break}w[R]=p}remove(){var R=this.L,w=R.length;const p=R[0];if(!(w<=0)){if(w==1)R.length=0;else{R[0]=R.pop();R=0;w=this.L; const f=w.length,G=w[R];for(;R>1;){var r=R*2+1;const I=R*2+2;r=IG.L)break;w[R]=w[r];R=r}w[R]=G}return p.getValue()}}BC(){const R=this.L,w=[],p=R.length;for(let r=0;r>>16&65535|0;for(var G;p!==0;){G=p>2E3?2E3:p;p-=G;do f=f+w[r++]|0,R=R+f|0;while(--G);f%=65521;R%=65521}return f|R<<16|0};for(var Pf={},og,HsW=[],tw=0;tw<256;tw++){og=tw;for(var v1d=0;v1d<8;v1d++)og=og&1?3988292384^og>>>1:og>>>1;HsW[tw]=og}Pf=function(R,w,p,r){p=r+p;for(R^=-1;r>>8^HsW[(R^w[r])&255];return R^-1};var bM={};bM={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 sV=[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],Bf=[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],HAd=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ts=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],OV=Array(576);vE(OV);var KM=Array(60);vE(KM);var zv=Array(512);vE(zv);var uM=Array(256);vE(uM);var me=Array(29);vE(me);var Wf=Array(30);vE(Wf);var jR,Js,Tv,Fj=!1;var db;db=[new nM(0,0,0,0,function(R,w){var p=65535;for(p>R.yQ-5&&(p=R.yQ-5);;){if(R.Sz<=1){aU(R);if(R.Sz===0&&w===0)return 1;if(R.Sz===0)break}R.jz+=R.Sz;R.Sz=0;var r=R.jY+p;if(R.jz===0||R.jz>=r)if(R.Sz=R.jz-r,R.jz=r,EV(R,!1),R.Qv.eC===0)return 1;if(R.jz-R.jY>=R.ER-262&&(EV(R,!1),R.Qv.eC===0))return 1}R.QG=0;if(w===4)return EV(R,!0),R.Qv.eC===0?3:4;R.jz>R.jY&&EV(R,!1);return 1}), new nM(4,4,8,4,$C),new nM(4,5,16,8,$C),new nM(4,6,32,32,$C),new nM(4,4,16,16,Xj),new nM(8,16,32,32,Xj),new nM(8,16,128,128,Xj),new nM(8,32,128,256,Xj),new nM(32,128,258,1024,Xj),new nM(32,258,258,4096,Xj)];var YC={};YC=function(){this.input=null;this.Dk=this.ym=this.kP=0;this.output=null;this.UJ=this.eC=this.W9=0;this.msg="";this.state=null;this.kD=2;this.t$=0};var iM=Object.prototype.toString; ZN.prototype.push=function(R,w){var p=this.Qv,r=this.options.chunkSize;if(this.ended)return!1;var f=w===~~w?w:w===!0?4:0;typeof R==="string"?p.input=HE(R):iM.call(R)==="[object ArrayBuffer]"?p.input=new Uint8Array(R):p.input=R;p.kP=0;p.ym=p.input.length;do{p.eC===0&&(p.output=new gF.U2(r),p.W9=0,p.eC=r);R=gSI(p,f);if(R!==1&&R!==0)return this.rR(R),this.ended=!0,!1;if(p.eC===0||p.ym===0&&(f===4||f===2))if(this.options.to==="string"){var G=gF.Iy(p.output,p.W9);w=G;G=G.length;if(G<65537&&(w.subarray&& g1L||!w.subarray))w=String.fromCharCode.apply(null,gF.Iy(w,G));else{for(var I="",C=0;C0||p.eC===0)&&R!==1);if(f===4)return(p=this.Qv)&&p.state?(r=p.state.status,r!==42&&r!==69&&r!==73&&r!==91&&r!==103&&r!==113&&r!==666?R=yr(p,-2):(p.state=null,R=r===113?yr(p,-3):0)):R=-2,this.rR(R),this.ended=!0,R===0;f===2&&(this.rR(0),p.eC=0);return!0}; ZN.prototype.rR=function(R){R===0&&(this.result=this.options.to==="string"?this.chunks.join(""):gF.hd(this.chunks));this.chunks=[];this.err=R;this.msg=this.Qv.msg};var Hf=()=>Math.random().toString(36).substring(7).split("").join("."),gb=`@@redux/INIT${Hf()}`,kYD=`@@redux/REPLACE${Hf()}`;var NK=typeof Symbol==="function"&&Symbol.observable||"@@observable";var HzY=iT(class extends qW{constructor(R){super(R)}},[0,Q4,Tc,YG,JP,YG,-1,iw,JP,iw,-1,Q4,iw,Tc,F6,[0,JP,-3,iw],YG,-1,iw]);var tCW=-812091741;var NBW=function(R,w){return(()=>{const p=new EFr(R,w);return()=>p})()}("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.U=class{constructor(R){this.name=R}};var FKl=new g.U("adInfoDialogEndpoint");var $_P=new g.U("adPingingEndpoint");var kvP=new g.U("crossDeviceProgressCommand");var Qt=new g.U("actionCompanionAdRenderer");var gJ=new g.U("adActionInterstitialRenderer");var k56=new g.U("adDurationRemainingRenderer");var AW=new g.U("adHoverTextButtonRenderer");var iBd=new g.U("adInfoDialogRenderer");var pl=new g.U("adMessageRenderer");var b_=new g.U("adPreviewRenderer");var gS=new g.U("adsEngagementPanelRenderer");var vEW=new g.U("dismissablePanelTextPortraitImageRenderer");var SO=new g.U("adsEngagementPanelSectionListViewModel");var Uox=new g.U("flyoutCtaRenderer");var hn=new g.U("imageCompanionAdRenderer");var Ql=new g.U("instreamAdPlayerOverlayRenderer");var TcY=new g.U("instreamSurveyAdBackgroundImageRenderer");var q2=new g.U("instreamSurveyAdPlayerOverlayRenderer");var ft=new g.U("instreamSurveyAdRenderer"),Lt=new g.U("instreamSurveyAdSingleSelectQuestionRenderer"),l_=new g.U("instreamSurveyAdMultiSelectQuestionRenderer"),OL=new g.U("instreamSurveyAdAnswerRenderer"),SGL=new g.U("instreamSurveyAdAnswerNoneOfTheAboveRenderer");var bl=new g.U("instreamVideoAdRenderer");var Rad=new g.U("textOverlayAdContentRenderer"),w0r=new g.U("enhancedTextOverlayAdContentRenderer"),p0r=new g.U("imageOverlayAdContentRenderer");var h6=new g.U("playerOverlayLayoutRenderer");var HS=new g.U("videoInterstitialButtonedCenteredLayoutRenderer");var Rv6=new g.U("aboveFeedAdLayoutRenderer");var we_=new g.U("belowPlayerAdLayoutRenderer");var Ss6=new g.U("inPlayerAdLayoutRenderer");var pe_=new g.U("inPlayerOrganicOverlayAdLayoutRenderer");var Ct=new g.U("playerBytesAdLayoutRenderer");var Wb=new g.U("playerBytesSequenceItemAdLayoutRenderer");var Bb=new g.U("playerUnderlayAdLayoutRenderer");var rn=new g.U("adIntroRenderer");var wn=new g.U("playerBytesSequentialLayoutRenderer");var jND=new g.U("slidingTextPlayerOverlayRenderer");var Gg=new g.U("surveyTextInterstitialRenderer");var u_=new g.U("videoAdTrackingRenderer");var TDL=new g.U("videoInterstitialCenteredLayoutViewModel");var Q2Y=new g.U("playerOrganicTransitionOverlayRenderer");var rAr=new g.U("simpleAdBadgeRenderer");var dS=new g.U("skipAdRenderer"),fmH=new g.U("skipButtonRenderer");var xN=new g.U("adSlotRenderer");var mA=new g.U("squeezebackPlayerSidePanelRenderer");var GmD=new g.U("timedPieCountdownRenderer");var Bu=new g.U("adAvatarViewModel");var Wu=new g.U("adBadgeViewModel");var xG=new g.U("adButtonViewModel");var Imx=new g.U("adDetailsLineViewModel");var CSD=new g.U("adDisclosureBannerViewModel");var u5d=new g.U("adPodIndexViewModel");var ssl=new g.U("imageBackgroundViewModel");var mtH=new g.U("adGridCardCollectionViewModel");var zaY=new g.U("adGridCardTextViewModel");var B7r=new g.U("adPreviewViewModel");var W0L=new g.U("playerAdAvatarLockupCardButtonedViewModel");var xtP=new g.U("skipAdButtonViewModel");var lm_=new g.U("skipAdViewModel");var L0Y=new g.U("timedPieCountdownViewModel");var qvl=new g.U("visitAdvertiserLinkViewModel");var Ho=new g.U("bannerImageLayoutViewModel");var vo=new g.U("topBannerImageTextIconButtonedLayoutViewModel");var Nm=new g.U("adsEngagementPanelLayoutViewModel");var zg=new g.U("displayUnderlayTextGridCardsLayoutViewModel");g.W4=new g.U("browseEndpoint");var AAd=new g.U("confirmDialogEndpoint");var K1=class{constructor(R){this.L=R}},EL=class extends K1{get entityMetadata(){return this.L.entityMetadata}set entityMetadata(R){this.L.entityMetadata=R}};var bZI=class extends EL{C(){return[]}};var yAL=new g.U("commandContext");var Vpl=class extends EL{C(){return[]}};var o4d=class extends EL{C(){return[]}};var XOr=new g.U("rawColdConfigGroup");var $DL=new g.U("rawHotConfigGroup");g.Ps=new g.U("commandExecutorCommand");var tpr=class extends qW{constructor(R){super(R)}};var OZD={XB0:0,ffI:1,s90:32,YC0:61,opI:67,DlI:103,c2I:86,ta0:42,gp0:60,IfI:62,PoB:73,lfY:76,y2y:88,npY:90,Q9y:99,BBB:98,ZLN:100,iLn:102,Ul0:41,kKn:69,afB:70,uIB:71,AI:2,Ph:27,ANDROID:3,LY:54,CY:14,rj:91,xM:55,pY:24,TR:20,hY:18,fY:21,GR:104,j9:30,JY:29,tY:28,bLq:101,sU:34,zR:36,OU:38,IOS:5,IZ:15,gI:92,K1:40,z4:25,jK:17,ME:19,B4:64,JH:66,tH:26,lm:22,im:33,P4:68,Yg:35,sb:53,Eb:37,rI:39,Ur0:7,kk0:57,aTY:43,WZY:59,ufY:93,Bm:74,drY:75,qQk:85,vBY:65,Vzq:80,H_I:8,oBN:10,Nnl:58,Afq:63,R_Y:72,Mq:23,qCN:11, vpk:13,x0:12,Qg0:16,J20:56,FUk:31,g6:77,P6:84,EpY:87,FJ:89,Yt:94,hZ:95};var z9=class extends qW{constructor(R){super(R)}lP(){return rU(this,3)}FP(){return rU(this,5)}UI(R){return uf(this,5,R)}};var sO=class extends qW{constructor(R){super(R)}};var K0d=class extends qW{constructor(R){super(R)}};var Kab=class extends qW{constructor(R){super(R)}getDeviceId(){return rU(this,6)}HJ(R){var w=DQ(this,9,Ey,3,!0);wl(w,R);return w[R]}getPlayerType(){return fP(this,36)}setHomeGroupInfo(R){return kL(this,K0d,81,R)}clearLocationPlayabilityToken(){return VF(this,89)}};var DD6=class extends qW{constructor(R){super(R)}getValue(){return rU(this,F1(this,eel,2))}},eel=[2,3,4,5,6];var E4r=class extends qW{constructor(R){super(R)}setTrackingParams(R){return VF(this,1,Rp(R,!1))}};var EPl=class extends qW{constructor(R){super(R)}};var mC=class extends qW{constructor(R){super(R)}HJ(R){var w=DQ(this,5,eD,3,!0);wl(w,R);return w[R]}};var MIH=class extends qW{constructor(R){super(R)}getToken(){return Iz(this,2)}setToken(R){return uf(this,2,R)}};var h9=class extends qW{constructor(R){super(R)}setSafetyMode(R){return mw(this,5,R)}};var QE=class extends qW{constructor(R){super(R)}O(R){return kL(this,Kab,1,R)}};var UE=new g.U("thumbnailLandscapePortraitRenderer");g.Dtl=new g.U("changeEngagementPanelVisibilityAction");var b9b=new g.U("continuationCommand");var ea_=new g.U("openPopupAction");g.i8=new g.U("signalAction");g.Di=new g.U("webCommandMetadata");var PpL=new g.U("metadataBadgeRenderer");var A8_=new g.U("signalServiceEndpoint");var tO=new g.U("innertubeCommand");var Mpl=new g.U("loggingDirectives");var av6={Hv:"EMBEDDED_PLAYER_MODE_UNKNOWN",vv:"EMBEDDED_PLAYER_MODE_DEFAULT",V5:"EMBEDDED_PLAYER_MODE_PFP",Rt:"EMBEDDED_PLAYER_MODE_PFL"};var H2d=new g.U("channelThumbnailEndpoint");var EcP=new g.U("embeddedPlayerErrorMessageRenderer");var b2Y=new g.U("embeddedPlayerOverlayVideoDetailsRenderer"),vcd=new g.U("embeddedPlayerOverlayVideoDetailsCollapsedRenderer"),NJY=new g.U("embeddedPlayerOverlayVideoDetailsExpandedRenderer");var O2d=new g.U("embedsInfoPanelRenderer");var cA_=class extends EL{C(){return[]}};var PSb=class extends EL{C(){return[]}};var amd=class extends EL{C(){const R=[];this.L.alternateChannel&&R.push(this.L.alternateChannel);this.L.alternateChannelList&&R.push(...this.L.alternateChannelList);this.L.oneofChannelEntity&&R.push(this.L.oneofChannelEntity);return[...(new Set(R))]}};var $tP=class extends EL{C(){const R=[];this.L.entryCollection&&R.push(this.L.entryCollection);return[...(new Set(R))]}},n4d=class extends EL{C(){const R=[];this.L.parentPlaylist&&R.push(this.L.parentPlaylist);if(this.L.entries)for(const w of this.L.entries)R.push(...(new X0d(w)).C());return[...(new Set(R))]}},X0d=class extends K1{C(){const R=[];this.L.video&&R.push(this.L.video);return[...(new Set(R))]}};var dtL=class extends EL{C(){const R=[];this.L.descriptionEntity&&R.push(this.L.descriptionEntity);this.L.creators&&R.push(...this.L.creators);this.L.theBiggestFan&&R.push(this.L.theBiggestFan);return[...(new Set(R))]}},ZZd=class extends EL{C(){return[]}};var e8=new g.U("feedbackEndpoint");var Yvd=class extends EL{C(){return[]}};var F0P=class extends EL{C(){return[]}};var js6=class extends EL{C(){return[]}};var JAI=new g.U("youtubeIconSource");var T7r=new g.U("callToActionButtonViewModel");var iZH=class extends EL{C(){return[]}};var Qsd=class extends EL{C(){return[]}};var haI=new g.U("interactionLoggingCommandMetadata");var EKl={Ma0:"WEB_DISPLAY_MODE_UNKNOWN",KU0:"WEB_DISPLAY_MODE_BROWSER",zEy:"WEB_DISPLAY_MODE_MINIMAL_UI",j90:"WEB_DISPLAY_MODE_STANDALONE",r2n:"WEB_DISPLAY_MODE_FULLSCREEN"};var g4D=class extends qW{constructor(R){super(R)}getPlayerType(){return fP(this,7)}Mw(){return rU(this,19)}setVideoId(R){return uf(this,19,R)}};var EII=class extends qW{constructor(R){super(R)}};var KGd=class extends qW{constructor(R){super(R)}};var vN=class extends qW{constructor(R){super(R,500)}},HZW=[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,548];var v4H=new g.U("loggingContext");var Pul=class extends qW{constructor(R){super(R)}};var WaI=class extends qW{constructor(R){super(R)}Mw(){return Iz(this,F1(this,Z5,1))}setVideoId(R){return ZQ(this,1,Z5,JU(R))}getPlaylistId(){return Iz(this,F1(this,Z5,2))}},Z5=[1,2];g.ie=class extends qW{constructor(R){super(R)}};g.ie.prototype.mp=pd(0);var N7d=new g.U("dismissPlayerOverlayCommand");var kmD=class extends EL{C(){return[]}};var UtP=class extends EL{C(){return[]}};var Sv6=class extends EL{C(){return[]}};var RFP=class extends EL{C(){const R=[];this.L.downloadsList&&R.push(this.L.downloadsList);this.L.smartDownloadsList&&R.push(this.L.smartDownloadsList);this.L.recommendedDownloadsList&&R.push(this.L.recommendedDownloadsList);this.L.refresh&&R.push(this.L.refresh);return[...(new Set(R))]}};var p9H=class extends EL{C(){const R=[];this.L.refresh&&R.push(this.L.refresh);if(this.L.downloads)for(const w of this.L.downloads)R.push(...(new w9D(w)).C());return[...(new Set(R))]}},w9D=class extends K1{C(){const R=[];this.L.video&&R.push(this.L.video);this.L.playlist&&R.push(this.L.playlist);this.L.videoItem&&R.push(this.L.videoItem);this.L.playlistItem&&R.push(this.L.playlistItem);return[...(new Set(R))]}};var rSW=class extends EL{C(){const R=[];this.L.localImageEntities&&R.push(...this.L.localImageEntities);return[...(new Set(R))]}};var fOb=class extends EL{C(){const R=[];this.L.playbackData&&R.push(this.L.playbackData);this.L.localImageEntities&&R.push(...this.L.localImageEntities);this.L.videoDownloadContextEntity&&R.push(this.L.videoDownloadContextEntity);return[...(new Set(R))]}};var Gyd=class extends EL{C(){return[]}};var IOI=class extends EL{C(){const R=[];this.L.fakeChildren&&R.push(...this.L.fakeChildren);return[...(new Set(R))]}};var CZW=class extends EL{C(){const R=[];this.L.video&&R.push(this.L.video);this.L.playbackData&&R.push(this.L.playbackData);this.L.offlineVideoPolicy&&R.push(this.L.offlineVideoPolicy);return[...(new Set(R))]}};var ukW=class extends EL{C(){return[]}};var sJW=class extends EL{C(){const R=[];this.L.channelOwner&&R.push(this.L.channelOwner);this.L.videos&&R.push(...this.L.videos);this.L.collaboratorChannels&&R.push(...this.L.collaboratorChannels);this.L.downloadState&&R.push(this.L.downloadState);this.L.refresh&&R.push(this.L.refresh);return[...(new Set(R))]}};var mBr=class extends EL{C(){const R=[];this.L.video&&R.push(this.L.video);this.L.channelContributor&&R.push(this.L.channelContributor);return[...(new Set(R))]}};var B0D=class extends K1{C(){const R=[];this.L.recommendedVideoMetadata&&R.push(...(new zFY(this.L.recommendedVideoMetadata)).C());return[...(new Set(R))]}},zFY=class extends K1{C(){const R=[];this.L.localImageEntities&&R.push(...this.L.localImageEntities);this.L.videoDownloadContextEntity&&R.push(this.L.videoDownloadContextEntity);return[...(new Set(R))]}};var WM6=class extends K1{C(){const R=[];this.L.playbackPosition&&R.push(this.L.playbackPosition);return[...(new Set(R))]}};var xBW=class extends EL{C(){const R=[];this.L.owner&&R.push(this.L.owner);this.L.downloadState&&R.push(this.L.downloadState);this.L.userState&&R.push(...(new WM6(this.L.userState)).C());this.L.additionalMetadata&&R.push(...(new B0D(this.L.additionalMetadata)).C());return[...(new Set(R))]}};var lOP=class extends EL{C(){const R=[];this.L.userChannelDetails&&R.push(this.L.userChannelDetails);return[...(new Set(R))]}};var LMI=class extends EL{C(){const R=[];this.L.channelOwner&&R.push(this.L.channelOwner);this.L.playbackPosition&&R.push(this.L.playbackPosition);this.L.localImageEntities&&R.push(...this.L.localImageEntities);this.L.downloadStatus&&R.push(this.L.downloadStatus);return[...(new Set(R))]}};var qdl=class extends EL{C(){return[]}};var ASH=class extends EL{C(){return[]}};var bCx=class extends EL{C(){return[]}};var ySW=class extends EL{C(){return[]}};var VHH=class extends EL{C(){return[]}};var oqL=class extends EL{C(){return[]}};var tHW=class extends EL{C(){return[]}};var OCP=class extends EL{C(){return[]}};var KMI=class extends EL{C(){return[]}};var AN=new g.U("changeKeyedMarkersVisibilityCommand");var EqW=new g.U("changeMarkersVisibilityCommand");var aTb=new g.U("loadMarkersCommand");var DBx=new g.U("suggestedActionDataViewModel");var WQL=new g.U("timelyActionViewModel");var BkI=new g.U("timelyActionsOverlayViewModel");var eF_=class extends EL{C(){return[]}};var MH6=class extends EL{C(){return[]}};var cSb=class extends EL{C(){return[]}};var Yrd=new g.U("productListItemRenderer");var PZW=new g.U("shoppingOverlayRenderer");var aOL=class extends EL{C(){return[]}};var $BY=class extends EL{C(){const R=[];this.L.compositeSourceKeys&&R.push(...this.L.compositeSourceKeys);return[...(new Set(R))]}};var X9_=class extends EL{C(){const R=[];this.L.trackDownloadMetadatas&&R.push(...this.L.trackDownloadMetadatas);return[...(new Set(R))]}};var nqP=class extends EL{C(){const R=[];this.L.downloadedTracks&&R.push(...this.L.downloadedTracks);this.L.smartDownloadedTracks&&R.push(...this.L.smartDownloadedTracks);this.L.downloadedEpisodes&&R.push(...this.L.downloadedEpisodes);this.L.downloadedAlbumReleases&&R.push(...this.L.downloadedAlbumReleases);this.L.smartDownloadedAlbumReleases&&R.push(...this.L.smartDownloadedAlbumReleases);this.L.downloadedPlaylists&&R.push(...this.L.downloadedPlaylists);this.L.smartDownloadedPlaylists&&R.push(...this.L.smartDownloadedPlaylists); this.L.metadataOnlyTracks&&R.push(...this.L.metadataOnlyTracks);return[...(new Set(R))]}};var dBW=class extends EL{C(){const R=[];this.L.trackDownloadMetadatas&&R.push(...this.L.trackDownloadMetadatas);return[...(new Set(R))]}};var ZCI=class extends EL{C(){const R=[];this.L.playbackData&&R.push(this.L.playbackData);this.L.localImageEntities&&R.push(...this.L.localImageEntities);this.L.videoDownloadContextEntity&&R.push(this.L.videoDownloadContextEntity);return[...(new Set(R))]}};var YdI=class extends EL{C(){const R=[];this.L.musicLibraryStatusEntity&&R.push(this.L.musicLibraryStatusEntity);this.L.primaryArtists&&R.push(...this.L.primaryArtists);this.L.details&&R.push(this.L.details);this.L.userDetails&&R.push(this.L.userDetails);this.L.tracks&&R.push(...this.L.tracks);this.L.share&&R.push(this.L.share);this.L.downloadMetadata&&R.push(this.L.downloadMetadata);this.L.refresh&&R.push(this.L.refresh);return[...(new Set(R))]}},FMI=class extends EL{C(){const R=[];this.L.albumRelease&& R.push(this.L.albumRelease);this.L.tracks&&R.push(...this.L.tracks);return[...(new Set(R))]}},jJ6=class extends EL{C(){const R=[];this.L.albumRelease&&R.push(this.L.albumRelease);return[...(new Set(R))]}};var JSd=class extends EL{C(){const R=[];this.L.details&&R.push(this.L.details);this.L.userDetails&&R.push(this.L.userDetails);return[...(new Set(R))]}},T0_=class extends EL{C(){const R=[];this.L.parentArtist&&R.push(this.L.parentArtist);return[...(new Set(R))]}},iCd=class extends EL{C(){const R=[];this.L.parentArtist&&R.push(this.L.parentArtist);return[...(new Set(R))]}};var QJI=class extends EL{C(){return[]}};var hFD=class extends EL{C(){return[]}};var HCb=class extends EL{C(){const R=[];this.L.tracks&&R.push(...this.L.tracks);this.L.refresh&&R.push(this.L.refresh);this.L.musicLibraryStatusEntity&&R.push(this.L.musicLibraryStatusEntity);this.L.details&&R.push(this.L.details);this.L.downloadMetadata&&R.push(this.L.downloadMetadata);this.L.sideloadMetadata&&R.push(this.L.sideloadMetadata);this.L.userDetails&&R.push(this.L.userDetails);this.L.entryCollection&&R.push(this.L.entryCollection);this.L.share&&R.push(this.L.share);this.L.podcastShowAdditionalMetadata&& R.push(...(new gq6(this.L.podcastShowAdditionalMetadata)).C());return[...(new Set(R))]}},gq6=class extends K1{C(){const R=[];this.L.creatorEntity&&R.push(this.L.creatorEntity);return[...(new Set(R))]}};var vqd=class extends EL{C(){return[]}};var N0d=class extends EL{C(){const R=[];this.L.musicLibraryStatusEntity&&R.push(this.L.musicLibraryStatusEntity);this.L.artists&&R.push(...this.L.artists);this.L.audioModeVersion&&R.push(this.L.audioModeVersion);this.L.videoModeVersion&&R.push(this.L.videoModeVersion);this.L.userDetails&&R.push(this.L.userDetails);this.L.details&&R.push(this.L.details);this.L.albumRelease&&R.push(this.L.albumRelease);this.L.share&&R.push(this.L.share);this.L.libraryEdit&&R.push(this.L.libraryEdit);this.L.downloadMetadata&& R.push(this.L.downloadMetadata);this.L.playbackPosition&&R.push(this.L.playbackPosition);this.L.lyrics&&R.push(this.L.lyrics);return[...(new Set(R))]}},ky_=class extends EL{C(){const R=[];this.L.parentTrack&&R.push(this.L.parentTrack);return[...(new Set(R))]}},UBr=class extends EL{C(){const R=[];this.L.parentTrack&&R.push(this.L.parentTrack);return[...(new Set(R))]}};var Vvd=new g.U("musicEmbeddedPlayerOverlayVideoDetailsRenderer");var Sdd=new g.U("adFeedbackEndpoint");var RTW=new g.U("menuEndpoint");var wGL=new g.U("phoneDialerEndpoint");var pGL=new g.U("sendSmsEndpoint");var gcd=new g.U("copyTextEndpoint");var rlb=new g.U("shareEndpoint"),fRb=new g.U("shareEntityEndpoint"),Gtx=new g.U("shareEntityServiceEndpoint"),IRL=new g.U("webPlayerShareEntityServiceEndpoint");g.y$=new g.U("urlEndpoint");g.xo=new g.U("watchEndpoint");var Cy6=new g.U("watchPlaylistEndpoint");var u9_=class extends EL{C(){return[]}};var s_b=class extends EL{C(){return[]}};var m$d=class extends EL{C(){return[]}};var zTD=class extends EL{C(){return[]}};var BYx=class extends EL{C(){const R=[];this.L.transfer&&R.push(this.L.transfer);this.L.adsPlaybackData&&R.push(...this.L.adsPlaybackData);this.L.drmLicense&&R.push(this.L.drmLicense);this.L.offlineVideoPolicy&&R.push(this.L.offlineVideoPolicy);this.L.videoDownloadContextEntity&&R.push(this.L.videoDownloadContextEntity);return[...(new Set(R))]}};var W2I=class extends EL{C(){return[]}};var x$6=class extends EL{C(){const R=[];this.L.offlineVideoStreams&&R.push(...this.L.offlineVideoStreams);this.L.captionTrack&&R.push(...this.L.captionTrack);return[...(new Set(R))]}};var lRl=class extends EL{C(){return[]}};var L2P=class extends EL{C(){return[]}};var qQD=class extends EL{C(){return[]}};var Al6=new g.U("compositeVideoOverlayRenderer");var b3P=new g.U("miniplayerRenderer");var WBD=new g.U("paidContentOverlayRenderer");var nVd=new g.U("playerMutedAutoplayOverlayRenderer"),dHD=new g.U("playerMutedAutoplayEndScreenRenderer");var MyH=new g.U("unserializedPlayerResponse"),gVW=new g.U("unserializedPlayerResponse");var ylY=new g.U("playlistEditEndpoint");var V9Y=class extends EL{C(){return[]}};var ky=new g.U("buttonRenderer"),Ml=new g.U("toggleButtonRenderer");var gEI=new g.U("counterfactualRenderer");var ohr=new g.U("resolveUrlCommandMetadata");var t9W=class extends EL{C(){return[]}};var O3P=new g.U("modifyChannelNotificationPreferenceEndpoint");var a8b=new g.U("pingingEndpoint");var K2_=new g.U("unsubscribeEndpoint");var EhP=class extends EL{C(){return[]}};g.Ka=new g.U("subscribeButtonRenderer");var D$d=new g.U("subscribeEndpoint");var eTW=class extends EL{C(){return[]}};var M9r=class extends EL{C(){return[]}};var clD=class extends EL{C(){return[]}};var cnb=new g.U("buttonViewModel");var Pyl=class extends EL{C(){return[]}};var aRd=class extends EL{C(){return[]}};var $$b=class extends EL{C(){return[]}};var XG_=class extends EL{C(){return[]}};var nh_=class extends EL{C(){return[]}};var d$d=class extends EL{C(){return[]}};var He_=new g.U("qrCodeRenderer");var Z3Y={X0:"LIVING_ROOM_APP_MODE_UNSPECIFIED",H4:"LIVING_ROOM_APP_MODE_MAIN",Vn:"LIVING_ROOM_APP_MODE_KIDS",NE:"LIVING_ROOM_APP_MODE_MUSIC",eK:"LIVING_ROOM_APP_MODE_UNPLUGGED",RZ:"LIVING_ROOM_APP_MODE_GAMING"};var YQD=class extends EL{C(){return[]}};var F26=class extends EL{C(){return[]}};var egL=new g.U("autoplaySwitchButtonRenderer");var NU,eGH,SaP,cdH;NU=new g.U("decoratedPlayerBarRenderer");eGH=new g.U("chapteredPlayerBarRenderer");SaP=new g.U("multiMarkersPlayerBarRenderer");cdH=new g.U("chapterRenderer");g.Xdb=new g.U("markerRenderer");var Jdr=new g.U("decoratedPlayheadRenderer");var c66=new g.U("desktopOverlayConfigRenderer");var NDd=new g.U("engagementPanelSectionListRenderer");var Mvd=new g.U("gatedActionsOverlayViewModel");var x_l=new g.U("heatMarkerRenderer");var dfb=new g.U("heatmapRenderer");var tvY=new g.U("playlistPanelRenderer");var j__=new g.U("productUpsellSuggestedActionViewModel");var cU=new g.U("suggestedActionTimeRangeTrigger"),Jll=new g.U("suggestedActionsRenderer"),TYY=new g.U("suggestedActionRenderer");var ZDP=new g.U("timedMarkerDecorationRenderer");var i36=class extends EL{C(){return[]}};var Q_L=class extends EL{C(){return[]}};var hTd=class extends EL{C(){return[]}};var gh6=class extends EL{C(){return[]}};var H3l=class extends EL{C(){return[]}};var vhr=class extends EL{C(){return[]}};var NYb=class extends EL{C(){return[]}};var ObL=new g.U("cipher");var cBx=new g.U("playerVars");var HHr=new g.U("playerVars");var kt_=g.qx.window,fe=kt_?.yt?.config_||kt_?.ytcfg?.data_||{};g.AY("yt.config_",fe);var Ce=[];var wTH=/^[\w.]*$/,RtW={q:!0,search_query:!0},SZI=String(WI);var fvY=new class{constructor(R,w){this.L=R;this.C=w}}(window,window.document);g.AY("yt.ads_.signals_.getAdSignalsString",function(R){return xE(DJ(R))});g.c6();var IvW="XMLHttpRequest"in g.qx?()=>new XMLHttpRequest:null;var U$_="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(" "),SQP=[...U$_,"client_dev_set_cookie"];var m46={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"},VDP=["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",...U$_],qyD=!1,x4D=YE;var Jk=class extends ZL{constructor(R,w,p){super(`${R}, errorCode=${w}`);this.errorCode=w;this.xhr=p;this.name="PromiseAjaxError"}},o9D=class{constructor(R){this.xhr=R}};var Qj=class{constructor(R=null){this.L=R;this.O=0;this.C=null}then(R,w,p){return this.L?this.L.then(R,w,p):this.O===1&&R?(R=R.call(p,this.C))&&typeof R.then==="function"?R:gD(R):this.O===2&&w?(R=w.call(p,this.C))&&typeof R.then==="function"?R:hk(R):this}getValue(){return this.C}};Qj.prototype.$goog_Thenable=!0;var HI=!1;var hx=Be||We;var cUr=/^([0-9\.]+):([0-9\.]+)$/;var Fzd=class extends ZL{constructor(R){super(R.message||R.description||R.name);this.isMissing=R instanceof eN;this.isTimeout=R instanceof Jk&&R.errorCode=="net.timeout";this.isCanceled=R instanceof U1}};Fzd.prototype.name="BiscottiError";var eN=class extends ZL{constructor(){super("Biscotti ID is missing from server")}};eN.prototype.name="BiscottiMissingError";var XTb={format:"RAW",method:"GET",timeout:5E3,withCredentials:!0},DU=null;var Qp_={};var Ri_=0,M0=g.f$?"webkit":jE?"moz":g.BE?"ms":g.DE?"o":"",wmd=g.yD("ytDomDomGetNextId")||(()=>++Ri_); g.AY("ytDomDomGetNextId",wmd);var pmW={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},U4H=class{constructor(R){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(R=R||window.event){this.event=R;for(let r in R)r in pmW||(this[r]=R[r]);this.scale=R.scale;this.rotation=R.rotation;var w=R.target||R.srcElement;w&&w.nodeType==3&&(w=w.parentNode);this.target=w;var p=R.relatedTarget;if(p)try{p=p.nodeName?p:null}catch(r){p=null}else this.type=="mouseover"?p=R.fromElement:this.type=="mouseout"&&(p=R.toElement);this.relatedTarget=p;this.clientX=R.clientX!=void 0?R.clientX:R.pageX;this.clientY=R.clientY!=void 0?R.clientY:R.pageY;this.keyCode=R.keyCode?R.keyCode: R.which;this.charCode=R.charCode||(this.type=="keypress"?this.keyCode:0);this.altKey=R.altKey;this.ctrlKey=R.ctrlKey;this.shiftKey=R.shiftKey;this.metaKey=R.metaKey;this.L=R.pageX;this.C=R.pageY}}catch(r){}}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 dy=g.qx.ytEventsEventsListeners||{};g.AY("ytEventsEventsListeners",dy);var keH=g.qx.ytEventsEventsCounter||{count:0};g.AY("ytEventsEventsCounter",keH);var rXl=D2(function(){let R=!1;try{const w=Object.defineProperty({},"passive",{get:function(){R=!0}}); window.addEventListener("test",null,w)}catch(w){}return R}),Syd=D2(function(){let R=!1; try{const w=Object.defineProperty({},"capture",{get:function(){R=!0}}); window.addEventListener("test",null,w)}catch(w){}return R});var PU;PU=window;g.T=PU.ytcsi&&PU.ytcsi.now?PU.ytcsi.now:PU.performance&&PU.performance.timing&&PU.performance.now&&PU.performance.timing.navigationStart?()=>PU.performance.timing.navigationStart+PU.performance.now():()=>(new Date).getTime();g.$b(Jj,g.f5);Jj.prototype.X=function(R){R.L===void 0&&v9b(R);var w=R.L;R.C===void 0&&v9b(R);this.L=new g.Xx(w,R.C)}; Jj.prototype.va=function(){return this.L||new g.Xx}; Jj.prototype.pB=function(){if(this.L){var R=(0,g.T)();if(this.G!=0){var w=this.J,p=this.L,r=w.x-p.x;w=w.y-p.y;r=Math.sqrt(r*r+w*w)/(R-this.G);this.C[this.O]=Math.abs((r-this.K)/this.K)>.5?1:0;w=0;for(p=0;p<4;p++)w+=this.C[p]||0;w>=3&&this.D();this.K=r}this.G=R;this.J=this.L;this.O=(this.O+1)%4}}; Jj.prototype.Gy=function(){g.$E(this.U);g.YB(this.S)};var ag=class extends g.f5{constructor(R){super();this.D=[];this.f_=R||this}W(R,w,p,r,f){p=g.mJ((0,g.e_)(p,r||this.f_));p={target:R,name:w,callback:p};let G;f&&rXl()&&(G={passive:!0});R.addEventListener(w,p.callback,G);this.D.push(p);return p}o9(R){for(let w=0;w{w.preventDefault();this.C=w}); R.addEventListener("appinstalled",()=>{this.L=!0},{once:!0})}};var N0=class{constructor(){this.CF=!0}lz(R,w){R={};var p=[];"USER_SESSION_ID"in fe&&p.push({key:"u",value:g.n("USER_SESSION_ID")});if(p=T8(p))R.Authorization=p,p=w=w?.sessionIndex,p===void 0&&(p=Number(g.n("SESSION_INDEX",0)),p=isNaN(p)?0:p),g.Y("voice_search_auth_header_removal")||(R["X-Goog-AuthUser"]=p.toString()),"INNERTUBE_HOST_OVERRIDE"in fe||(R["X-Origin"]=window.location.origin),w===void 0&&"DELEGATED_SESSION_ID"in fe&&(R["X-Goog-PageId"]=g.n("DELEGATED_SESSION_ID"));return R}};var BY={identityType:"UNAUTHENTICATED_IDENTITY_TYPE_UNKNOWN"};var Rd=g.yD("ytglobal.prefsUserPrefsPrefs_")||{};g.AY("ytglobal.prefsUserPrefsPrefs_",Rd); var GJx=class{constructor(){this.L=g.n("ALT_PREF_COOKIE_NAME","PREF");this.C=g.n("ALT_PREF_COOKIE_DOMAIN","youtube.com");const R=g.kE(this.L);R&&this.parse(R)}get(R,w){rx(R);pX(R);R=Rd[R]!==void 0?Rd[R].toString():null;return R!=null?R:w?w:""}set(R,w){rx(R);pX(R);if(w==null)throw Error("ExpectedNotNull");Rd[R]=w.toString()}vS(R){return!!((IQL(`f${Math.floor(R/31)+1}`)||0)&1<{let R;return()=>{R||(R=new eh("ytidb"));return R}})();var qA=[],LX,lq=!1;var BhW,W8d,xEI,lzr,OP,WU6; BhW={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"}; W8d={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"}; xEI={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.od=class extends g.Id{constructor(R,w={},p=BhW[R],r=W8d[R],f=xEI[R]){super(p,{name:"YtIdbKnownError",isSw:self.document===void 0,isIframe:self!==self.top,type:R,...w});this.type=R;this.message=p;this.level=r;this.L=f;Object.setPrototypeOf(this,g.od.prototype)}};lzr=class extends g.od{constructor(R,w){super("MISSING_OBJECT_STORES",{expectedObjectStores:w,foundObjectStores:R},BhW.MISSING_OBJECT_STORES);Object.setPrototypeOf(this,lzr.prototype)}}; OP=class extends Error{constructor(R,w){super();this.index=R;this.objectStore=w;Object.setPrototypeOf(this,OP.prototype)}};WU6=["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 MA;MA=class{constructor(R){this.L=R}};g.DZ=class{constructor(R){this.state={status:"PENDING"};this.L=[];this.C=[];R=R.L;const w=r=>{if(this.state.status==="PENDING"){this.state={status:"FULFILLED",value:r};for(const f of this.L)f()}},p=r=>{if(this.state.status==="PENDING"){this.state={status:"REJECTED", reason:r};for(const f of this.C)f()}}; try{R(w,p)}catch(r){p(r)}}static all(R){return new g.DZ(new MA((w,p)=>{const r=[];let f=R.length;f===0&&w(r);for(let G=0;G{r[G]=I;f--;f===0&&w(r)}).catch(I=>{p(I)})}))}static resolve(R){return new g.DZ(new MA((w,p)=>{R instanceof g.DZ?R.then(w,p):w(R)}))}static reject(R){return new g.DZ(new MA((w,p)=>{p(R)}))}then(R,w){const p=R??lQW,r=w??xqY; return new g.DZ(new MA((f,G)=>{this.state.status==="PENDING"?(this.L.push(()=>{LUd(this,this,p,f,G)}),this.C.push(()=>{qXd(this,this,r,f,G)})):this.state.status==="FULFILLED"?LUd(this,this,p,f,G):this.state.status==="REJECTED"&&qXd(this,this,r,f,G)}))}catch(R){return this.then(void 0,R)}};var yZW=class{constructor(R,w){this.request=R;this.cursor=w}};var dqd=class{constructor(R,w){this.L=R;this.options=w;this.transactionCount=0;this.O=Math.round((0,g.T)());this.C=!1}add(R,w,p){return g.$v(this,[R],{mode:"readwrite",ZT:!0,commit:ad()},r=>r.objectStore(R).add(w,p))}clear(R){return g.$v(this,[R],{mode:"readwrite", ZT:!0},w=>w.objectStore(R).clear())}close(){this.L.close(); this.options?.closed&&this.options.closed()}count(R,w){return g.$v(this,[R],{mode:"readonly",ZT:!0,commit:ad()},p=>p.objectStore(R).count(w))}delete(R,w){return g.$v(this,[R],{mode:"readwrite", ZT:!0,commit:ad()&&!(w instanceof IDBKeyRange)},p=>p.objectStore(R).delete(w))}get(R,w){return g.$v(this,[R],{mode:"readonly", ZT:!0,commit:ad()},p=>p.objectStore(R).get(w))}getAll(R,w,p){return g.$v(this,[R],{mode:"readonly", ZT:!0},r=>r.objectStore(R).getAll(w,p))}put(R,w,p){return g.$v(this,[R],{mode:"readwrite", ZT:!0,commit:ad()},r=>r.objectStore(R).put(w,p))}objectStoreNames(){return Array.from(this.L.objectStoreNames)}getName(){return this.L.name}},Dql=class{constructor(R){this.L=R}add(R,w){return cP(this.L.add(R,w))}autoIncrement(){return this.L.autoIncrement}clear(){return cP(this.L.clear()).then(()=>{})}count(R){return cP(this.L.count(R))}delete(R){return R instanceof IDBKeyRange?Mj6(this,R):cP(this.L.delete(R))}get(R){return cP(this.L.get(R))}getAll(R,w){return"getAll"in IDBObjectStore.prototype?cP(this.L.getAll(R, w)):cZd(this,R,w)}index(R){try{return new L8b(this.L.index(R))}catch(w){if(w instanceof Error&&w.name==="NotFoundError")throw new OP(R,this.L.name); throw w;}}getName(){return this.L.name}keyPath(){return this.L.keyPath}put(R,w){return cP(this.L.put(R,w))}},tj_=class{constructor(R){this.L=R;this.C=new Map;this.aborted=!1;this.done=new Promise((w,p)=>{this.L.addEventListener("complete",()=>{w()}); this.L.addEventListener("error",r=>{r.currentTarget===r.target&&p(this.L.error)}); this.L.addEventListener("abort",()=>{var r=this.L.error;if(r)p(r);else if(!this.aborted){r=g.od;var f=this.L.objectStoreNames;const G=[];for(let I=0;Iw.delete().then(()=>g.Fo(w)))}get(R){return cP(this.L.get(R))}getAll(R,w){return"getAll"in IDBIndex.prototype?cP(this.L.getAll(R,w)):X$b(this,R,w)}keyPath(){return this.L.keyPath}unique(){return this.L.unique}}, nLY=class{constructor(R,w){this.request=R; this.cursor=w}delete(){return cP(this.cursor.delete()).then(()=>{})}getValue(){return this.cursor.value}update(R){return cP(this.cursor.update(R))}};var q7r=class{constructor(R,w){this.name=R;this.options=w;this.O=!0;this.K=this.G=0}C(R,w,p={}){return YXP(R,w,p)}delete(R={}){return Jx(this.name,R)}open(){if(!this.O)throw FUD(this);if(this.L)return this.L;let R;const w=()=>{this.L===R&&(this.L=void 0)},p={blocking:f=>{f.close()}, closed:w,iW:w,upgrade:this.options.upgrade},r=async()=>{var f=Error().stack??"";try{const C=await this.C(this.name,this.options.version,p);var G=C,I=this.options;const u=[];for(const m of Object.keys(I.I5)){const {vC:z,T_0:B=Number.MAX_VALUE}=I.I5[m];!(G.L.version>=z)||G.L.version>=B||G.L.objectStoreNames.contains(m)||u.push(m)}if(u.length!==0){const m=Object.keys(this.options.I5),z=C.objectStoreNames();if(this.Kthis.options.version+1)throw f.close(),this.O=!1,FUD(this,G);return f}w();C instanceof Error&&!g.Y("ytidb_async_stack_killswitch")&&(C.stack=`${C.stack}\n${f.substring(f.indexOf("\n")+1)}`);throw KX(C,this.name,"",this.options.version??-1);}}; return this.L=R=r()}};var iq=new q7r("YtIdbMeta",{I5:{databases:{vC:1}},upgrade(R,w){w(1)&&Xo(R,"databases",{keyPath:"actualName"})}});var vP,HP=new class{constructor(){}}(new class{constructor(){}});new g.mR;var RIP=class extends q7r{constructor(R,w){super(R,w);this.options=w;yM(R)}C(R,w,p={}){return(this.options.shared?vLd:Hkl)(R,w,{...p})}delete(R={}){return(this.options.shared?SXI:NEd)(this.name,R)}};var pr_=UP("ytGcfConfig",{I5:{coldConfigStore:{vC:1},hotConfigStore:{vC:1}},shared:!1,upgrade(R,w){w(1)&&(dx(Xo(R,"hotConfigStore",{keyPath:"key",autoIncrement:!0}),"hotTimestampIndex","timestamp"),dx(Xo(R,"coldConfigStore",{keyPath:"key",autoIncrement:!0}),"coldTimestampIndex","timestamp"))},version:1});var AXH=class extends g.f5{constructor(){super();this.C=[];this.L=[];const R=g.yD("yt.gcf.config.hotUpdateCallbacks");R?(this.C=[...R],this.L=R):(this.L=[],g.AY("yt.gcf.config.hotUpdateCallbacks",this.L))}Gy(){for(const w of this.C){var R=this.L;const p=R.indexOf(w);p>=0&&R.splice(p,1)}this.C.length=0;super.Gy()}};var RA=class{constructor(){this.K=!1;this.O=this.G=0;this.J=new AXH;this.Xf={GHB:()=>{this.K=!0}, CIS:()=>this.L, gu0:R=>{wz(this,R)}, UI:R=>{this.UI(R)}, jkB:R=>{pi(this,R)}, lP:()=>this.coldHashData, FP:()=>this.hotHashData, sqI:()=>this.C, Ktn:()=>rz(), zQq:()=>fi(), rjk:()=>g.yD("yt.gcf.config.coldHashData"), jqS:()=>g.yD("yt.gcf.config.hotHashData"), dOk:()=>{zIx(this)}, hWy:()=>{this.UI(void 0);G9(this);delete RA.instance}, J3l:R=>{this.O=R}, fZy:()=>this.O}}ox(){return fi()??g.n("RAW_HOT_CONFIG_GROUP")}UI(R){this.hotHashData=R; g.AY("yt.gcf.config.hotHashData",this.hotHashData||null)}};var bYd=typeof TextEncoder!=="undefined"?new TextEncoder:null,Fw_=bYd?R=>bYd.encode(R):R=>{R=g.DA(R); const w=new Uint8Array(R.length);for(let p=0;p{}; this.CR=()=>{}; this.now=Date.now;this.pH=!1;this.Xf={B_0:w=>{this.VL=w}, quk:()=>{this.O()}, wd:()=>{this.G()}, bK:async w=>{await this.bK(w)}, xQ:(w,p)=>this.xQ(w,p), TY:()=>{this.TY()}}; this.bL=R.bL??100;this.J_=R.J_??1;this.OY=R.OY??2592E6;this.pM=R.pM??12E4;this.BA=R.BA??5E3;this.VL=R.VL??void 0;this.dG=!!R.dG;this.Ju=R.Ju??.1;this.Dw=R.Dw??10;R.handleError&&(this.handleError=R.handleError);R.CR&&(this.CR=R.CR);R.pH&&(this.pH=R.pH);R.fm&&(this.fm=R.fm);this.XB=R.XB;this.JU=R.JU;this.WK=R.WK;this.jt=R.jt;this.Qx=R.Qx;this.b6=R.b6;this.Jt=R.Jt;VI(this)&&(!this.XB||this.XB("networkless_logging"))&&TU_(this)}writeThenSend(R,w={}){if(VI(this)&&this.L){const p={url:R,options:w,timestamp:this.now(), status:"NEW",sendCount:0};this.WK.set(p,this.VL).then(r=>{p.id=r;this.jt.zg()&&this.bK(p)}).catch(r=>{this.bK(p); oA(this,r)})}else this.Qx(R,w)}sendThenWrite(R,w={},p){if(VI(this)&&this.L){const r={url:R, options:w,timestamp:this.now(),status:"NEW",sendCount:0};this.XB&&this.XB("nwl_skip_retry")&&(r.skipRetry=p);if(this.jt.zg()||this.XB&&this.XB("nwl_aggressive_send_then_write")&&!r.skipRetry){if(!r.skipRetry){const f=w.onError?w.onError:()=>{}; w.onError=async(G,I)=>{await this.WK.set(r,this.VL).catch(C=>{oA(this,C)}); f(G,I)}}this.Qx(R,w,r.skipRetry)}else this.WK.set(r,this.VL).catch(f=>{this.Qx(R,w,r.skipRetry); oA(this,f)})}else p=this.XB&&this.XB("nwl_skip_retry")&&p,this.Qx(R,w,p)}sendAndWrite(R,w={}){if(VI(this)&&this.L){const p={url:R, options:w,timestamp:this.now(),status:"NEW",sendCount:0};let r=!1;const f=w.onSuccess?w.onSuccess:()=>{}; p.options.onSuccess=(G,I)=>{p.id!==void 0?this.WK.n0(p.id,this.VL):r=!0;this.jt.Qg&&this.XB&&this.XB("vss_network_hint")&&this.jt.Qg(!0);f(G,I)}; this.Qx(p.url,p.options,void 0,!0);this.WK.set(p,this.VL).then(G=>{p.id=G;r&&this.WK.n0(p.id,this.VL)}).catch(G=>{oA(this,G)})}else this.Qx(R,w,void 0,!0)}O(){if(!VI(this))throw Error("IndexedDB is not supported: throttleSend"); this.C||(this.C=this.JU.SL(async()=>{const R=await this.WK.lj("NEW",this.VL);R?(await this.bK(R),this.C&&(this.C=0,this.O())):this.G()},this.bL))}G(){this.JU.zm(this.C); this.C=0}async bK(R){if(!VI(this))throw Error("IndexedDB is not supported: immediateSend");R.id!==void 0&&(await this.WK.us(R.id,this.VL)||this.CR(Error("The request cannot be found in the database.")));this.xQ(R,this.OY)?(R.skipRetry||(R=hIH(this,R)),R&&(R.skipRetry&&R.id!==void 0&&await this.WK.n0(R.id,this.VL),this.Qx(R.url,R.options,!!R.skipRetry))):(this.CR(Error("Networkless Logging: Stored logs request expired age limit")),R.id!==void 0&&await this.WK.n0(R.id,this.VL))}xQ(R,w){R=R.timestamp; return this.now()-R>=w?!1:!0}TY(){if(!VI(this))throw Error("IndexedDB is not supported: retryQueuedRequests");this.WK.lj("QUEUED",this.VL).then(R=>{R&&!this.xQ(R,this.pM)?this.JU.SL(async()=>{R.id!==void 0&&await this.WK.kX(R.id,this.VL);this.TY()}):this.jt.zg()&&this.O()})}};var tT;var YHx={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,biometricAuthenticationEvent:548};var pRd=UP("ServiceWorkerLogsDatabase",{I5:{SWHealthLog:{vC:1}},shared:!0,upgrade:(R,w)=>{w(1)&&dx(Xo(R,"SWHealthLog",{keyPath:"id",autoIncrement:!0}),"swHealthNewRequest",["interface","timestamp"])}, version:1});var EO={},mWD=0;var DW;var cY=class{constructor(){this.L=new Map;this.C=!1}requestComplete(R,w){w&&(this.C=!0);R=this.removeParams(R);this.L.get(R)||this.L.set(R,w)}isEndpointCFR(R){R=this.removeParams(R);return(R=this.L.get(R))?!1:R===!1&&this.C?!0:null}removeParams(R){return R.split("?")[0]}};cY.prototype.removeParams=cY.prototype.removeParams;cY.prototype.isEndpointCFR=cY.prototype.isEndpointCFR;cY.prototype.requestComplete=cY.prototype.requestComplete;cY.getInstance=Wcd;var PY=class extends g.E1{constructor(){super();this.C=!1;this.L=Knd();this.L.listen("networkstatus-online",()=>{if(this.C&&g.Y("offline_error_handling")){var R=MT().get("errors",!0);if(R){for(const w in R)if(R[w]){const p=new g.Id(w,"sent via offline_errors");p.name=R[w].name;p.stack=R[w].stack;p.level=R[w].level;g.uF(p)}MT().set("errors",{},2592E3,!0)}}})}zg(){return this.L.zg()}Qg(R){this.L.L=R}kS(){const R=window.navigator.onLine; return R===void 0?!0:R}AD(){this.C=!0}listen(R,w){return this.L.listen(R,w)}zY(R){return j6(this.L,R)}};PY.prototype.sendNetworkCheckRequest=PY.prototype.zY;PY.prototype.listen=PY.prototype.listen;PY.prototype.enableErrorFlushing=PY.prototype.AD;PY.prototype.getWindowStatus=PY.prototype.kS;PY.prototype.networkStatusHint=PY.prototype.Qg;PY.prototype.isNetworkAvailable=PY.prototype.zg;PY.getInstance=xWx;g.Xp=class extends g.E1{constructor(R={}){super();this.L=this.G=0;this.C=xWx();const w=g.yD("yt.networkStatusManager.instance.listen").bind(this.C);w&&(R.rateLimit?(this.rateLimit=R.rateLimit,w("networkstatus-online",()=>{lad(this,"publicytnetworkstatus-online")}),w("networkstatus-offline",()=>{lad(this,"publicytnetworkstatus-offline")})):(w("networkstatus-online",()=>{this.dispatchEvent("publicytnetworkstatus-online")}),w("networkstatus-offline",()=>{this.dispatchEvent("publicytnetworkstatus-offline")})))}zg(){const R= g.yD("yt.networkStatusManager.instance.isNetworkAvailable"); return R?R.bind(this.C)():!0}Qg(R){const w=g.yD("yt.networkStatusManager.instance.networkStatusHint").bind(this.C);w&&w(R)}async zY(R){const w=g.yD("yt.networkStatusManager.instance.sendNetworkCheckRequest").bind(this.C);return g.Y("skip_network_check_if_cfr")&&Wcd().isEndpointCFR("generate_204")?new Promise(p=>{this.Qg(window.navigator?.onLine||!0);p(this.zg())}):w?w(R):!0}};var n1,Lcd=class extends V7d{constructor(){n1||(n1=new g.Xp({gF$:!0,sbN:!0}));super({WK:{pf:RsH,n0:Sj_,lj:NU_,us:kGW,kX:Uyr,set:vKr},jt:n1,handleError:(R,w,p)=>{const r=p?.error?.code;r===400||r===415?(R=new g.Id(R.message,w,p?.error?.code),zh(R,void 0,void 0,void 0,!0)):g.uF(R)}, CR:zh,Qx:A0D,now:g.T,Nm:BM6,JU:g.mL(),b6:"publicytnetworkstatus-online",Jt:"publicytnetworkstatus-offline",dG:!0,Ju:.1,Dw:ne("potential_esf_error_limit",10),XB:g.Y,pH:!(GD()&&g.sH(document.location.toString())!=="www.youtube-nocookie.com")});this.K=new g.mR;g.Y("networkless_immediately_drop_all_requests")&&wRP();SXI("LogsDatabaseV2")}writeThenSend(R,w){w||(w={});w=$0(R,w);GD()||(this.L=!1);super.writeThenSend(R,w)}sendThenWrite(R,w,p){w||(w={});w=$0(R,w);GD()||(this.L=!1);super.sendThenWrite(R,w, p)}sendAndWrite(R,w){w||(w={});w=$0(R,w);GD()||(this.L=!1);super.sendAndWrite(R,w)}awaitInitialization(){return this.K.promise}};var boW=g.qx.ytNetworklessLoggingInitializationOptions||{isNwlInitialized:!1};g.AY("ytNetworklessLoggingInitializationOptions",boW);g.SV=class{constructor(R){this.config_=null;R?this.config_=R:bPd()&&(this.config_=g.Ci())}isReady(){!this.config_&&bPd()&&(this.config_=g.Ci());return!!this.config_}};var oxW,dz,Y0;oxW=g.qx.ytPubsubPubsubInstance||new g.DG;dz=g.qx.ytPubsubPubsubSubscribedKeys||{};Y0=g.qx.ytPubsubPubsubTopicToKeys||{};g.ZW=g.qx.ytPubsubPubsubIsSynchronous||{};g.DG.prototype.subscribe=g.DG.prototype.subscribe;g.DG.prototype.unsubscribeByKey=g.DG.prototype.Cv;g.DG.prototype.publish=g.DG.prototype.publish;g.DG.prototype.clear=g.DG.prototype.clear;g.AY("ytPubsubPubsubInstance",oxW);g.AY("ytPubsubPubsubTopicToKeys",Y0);g.AY("ytPubsubPubsubIsSynchronous",g.ZW); g.AY("ytPubsubPubsubSubscribedKeys",dz);var KcW={};var t7d=class extends g.f5{append(R){R=R.zk();this.zk().appendChild(R)}},dt=class extends t7d{constructor(R){super();this.L=R}zk(){return this.L}};var OYD=class extends g.f5{constructor(R,w){super();this.O=[];this.D=!1;this.C=0;this.K=this.J=this.G=!1;this.pB=null;const p=(0,g.e_)(R,w);this.L=new g.vZ(()=>p(this.pB),300); g.K(this,this.L);this.X=this.U=Infinity}onTouchStart(R){this.D=!0;this.C=R.touches.length;this.L.isActive()&&(this.L.stop(),this.K=!0);R=R.touches;this.J=esD(this,R)||R.length!=1;var w=R.item(0);this.J||!w?this.X=this.U=Infinity:(this.U=w.clientX,this.X=w.clientY);this.O.length=0;for(w=0;w=0)}if(w||R&&(R.clientX-this.U)**2+(R.clientY-this.X)**2>25)this.G=!0}onTouchEnd(R){var w= R.changedTouches;w&&this.D&&this.C==1&&!this.G&&!this.K&&!this.J&&esD(this,w)&&(this.pB=R,this.L.start());this.C=R.touches.length;this.C===0&&(this.G=this.D=!1,this.O.length=0);this.K=!1}};var vY=Date.now().toString();var pv={};var Cv=Symbol("injectionDeps"),Zi=class{constructor(R){this.name=R}toString(){return`InjectionToken(${this.name})`}},fv=class{constructor(R){this.key=R}},dWP=class{constructor(){this.C=new Map;this.O=new Map;this.L=new Map;this.Xf={EyY:()=>new Map(this.C), qZB:R=>{const w=this.C.get(R.VC),p=this.L.get(R.VC);this.L.delete(R.VC);IO(this,R);return()=>{this.C.delete(R.VC);this.L.delete(R.VC);w&&IO(this,w);p&&this.L.set(R.VC,p)}}}}resolve(R){return R instanceof fv?ue(this,R.key,[],!0):ue(this,R,[])}};var sY;var z4=window;var A9=g.Y("web_enable_lifecycle_monitoring")&&BN()!==0,J0l=g.Y("web_enable_lifecycle_monitoring");var Hod=class{constructor(R){this.scheduler=g.mL();this.C=new g.mR;this.L=R;for(let w=0;w{p.U$();this.L[w].US=!0;this.L.every(f=>f.US===!0)&&this.C.resolve()}; const r=CX(R,p.priority??0);this.L[w]={...p,U$:R,jobId:r}}}cancel(){for(const R of this.L)R.jobId===void 0||R.US||this.scheduler.zm(R.jobId),R.US=!0;this.C.resolve()}};var K8I=class{constructor(){this.state="none";this.plugins=[];this.C=void 0;this.G={};A9&&WN(this.state)}get currentState(){return this.state}install(R){this.plugins.push(R);return this}uninstall(...R){R.forEach(w=>{w=this.plugins.indexOf(w);w>-1&&this.plugins.splice(w,1)})}transition(R,w){A9&&Fcr(this.state); var p=this.transitions.find(r=>Array.isArray(r.from)?r.from.find(f=>f===this.state&&r.to===R):r.from===this.state&&r.to===R); if(p){this.O&&(jjH(this.O),this.O=void 0);TMl(this,R,w);this.state=R;A9&&WN(this.state);p=p.action.bind(this);const r=this.plugins.filter(f=>f[R]).map(f=>f[R]); p(gAx(this,r),w)}else throw Error(`no transition specified from ${this.state} to ${R}`);}};var vAD=class extends K8I{constructor(){super();this.L=null;this.C=10;this.transitions=[{from:"none",to:"application_navigating",action:this.K},{from:"application_navigating",to:"none",action:this.J},{from:"application_navigating",to:"application_navigating",action:()=>{}}, {from:"none",to:"none",action:()=>{}}]}K(R,w){this.L=g.uq(0,()=>{this.currentState==="application_navigating"&&this.transition("none")},5E3); R(w?.event)}J(R,w){this.L&&(g.YM.zm(this.L),this.L=null);R(w?.event)}},be;var NQ=[];g.AY("yt.logging.transport.getScrapedGelPayloads",function(){return NQ});var VE=void 0,yE=void 0;var Kv=class{constructor(){this.store={};this.L=0;this.C={};this.Xf={G30:()=>this.L}}storePayload(R,w){R=oO(R); this.store[R]?this.store[R].push(w):(this.C={},this.store[R]=[w]);this.L++;g.Y("more_accurate_gel_parser")&&(w=new CustomEvent("TRANSPORTING_NEW_EVENT"),window.dispatchEvent(w));return R}smartExtractMatchingEntries(R){if(!R.keys.length)return[];const w=OY(this,R.keys.splice(0,1)[0]),p=[];for(let r=0;r`Cannot read property '${R.key}'`, sS:{Error:[{wS:/(Permission denied) to access property "([^']+)"/,groups:["reason","key"]}],TypeError:[{wS:/Cannot read property '([^']+)' of (null|undefined)/,groups:["key","value"]},{wS:/\u65e0\u6cd5\u83b7\u53d6\u672a\u5b9a\u4e49\u6216 (null|undefined) \u5f15\u7528\u7684\u5c5e\u6027\u201c([^\u201d]+)\u201d/,groups:["value","key"]},{wS:/\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"]},{wS:/No se puede obtener la propiedad '([^']+)' de referencia nula o sin definir/,groups:["key"]},{wS:/Unable to get property '([^']+)' of (undefined or null) reference/,groups:["key","value"]},{wS:/(null) is not an object \(evaluating '(?:([^.]+)\.)?([^']+)'\)/,groups:["value","base","key"]}]}},{Gc:R=>`Cannot call '${R.key}'`, sS:{TypeError:[{wS:/(?:([^ ]+)?\.)?([^ ]+) is not a function/,groups:["base","key"]},{wS:/([^ ]+) called on (null or undefined)/,groups:["key","value"]},{wS:/Object (.*) has no method '([^ ]+)'/,groups:["base","key"]},{wS:/Object doesn't support property or method '([^ ]+)'/,groups:["key"]},{wS:/\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"]}, {wS:/\uac1c\uccb4\uac00 '([^']+)' \uc18d\uc131\uc774\ub098 \uba54\uc11c\ub4dc\ub97c \uc9c0\uc6d0\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4./,groups:["key"]}]}},{Gc:R=>`${R.key} is not defined`, sS:{ReferenceError:[{wS:/(.*) is not defined/,groups:["key"]},{wS:/Can't find variable: (.*)/,groups:["key"]}]}}];var b5d={pA:[],YZ:[{callback:lIr,weight:500},{callback:Lod,weight:500}]};var qN6=class{constructor(){this.YZ=[];this.pA=[]}},zP;var Vs=new g.DG;var DVx=new Set,tmP=0,cQW=0,Mml=0,Ko_=[],O5d=[],PDx=["PhantomJS","Googlebot","TO STOP THIS SECURITY SCAN go/scan"];var $VP=new g.U("parallelCommand");var dVd=new g.U("performOnceCommand");var ndP=new g.U("serialCommand");var Ok=void 0;Zc({},"sgPmTd");Zc(null,"jypsq");Zc(null,"mWiOof");Date.now();var FoH=class extends WY{constructor(R){super(arguments);this.csn=R}},cKP=new x0("screen-created",FoH),Yg=[],YN6=QfL,Fn=0,eu=new Map,Mb=new Map,cC=new Map;var j8=class{constructor(R,w=null,p={},r,f,G){this.componentType=R;this.renderer=w;this.macros=p;this.layoutId=r;this.interactionLoggingClientData=f;this.L=G;this.id=gw(R)}};g.$b(g.HC,g.f5);g.t=g.HC.prototype;g.t.subscribe=function(R,w,p){return this.cS()?0:this.uo.subscribe(R,w,p)}; g.t.unsubscribe=function(R,w,p){return this.cS()?!1:this.uo.unsubscribe(R,w,p)}; g.t.Cv=function(R){return this.cS()?!1:this.uo.Cv(R)}; g.t.publish=function(R,w){return this.cS()?!1:this.uo.publish.apply(this.uo,arguments)}; g.t.Uq=function(R,w){for(let p in R)this.subscribe(p,R[p],w)}; g.t.OF=function(R,w){for(let p in R)this.unsubscribe(p,R[p],w)};var h_=16/9,ExY=[.25,.5,.75,1,1.25,1.5,1.75,2],DEH=ExY.concat([3,4,5,6,7,8,9,10,15]),eid=ExY.concat([2.5,3,3.5,4]);var hSL=1;g.Jw=class extends g.f5{constructor(R){super();this.ag={};this.xu={};this.element=this.createElement(R)}createElement(R,w){w=w||R.j==="svg";let p;var r=R.Z,f=R.E0;w?(p=document.createElementNS("http://www.w3.org/2000/svg",R.j),g.ef&&(R.A||(R.A={}),R.A.focusable="false")):p=g.sW(R.j);if(r){if(r=Nb(this,p,"class",r))kg(this,p,"class",r),this.ag[r]=p}else if(f){for(var G of f)this.ag[G]=p;kg(this,p,"class",f.join(" "))}r=R.fB;f=R.N;if(r)w=Nb(this,p,"child",r),w!==void 0&&p.appendChild(g.m9(w));else if(f){r= 0;for(var I of f)I&&(typeof I==="string"?(f=Nb(this,p,"child",I),f!=null&&p.appendChild(g.m9(f))):I.element?p.appendChild(I.element):(G=I,f=this.createElement(G,w),p.appendChild(f),G.FI&&(G=vC(),f.id=G,f=document.createElementNS("http://www.w3.org/2000/svg","use"),f.setAttribute("class","ytp-svg-shadow"),f.setAttributeNS("http://www.w3.org/1999/xlink","href",`#${G}`),Wc(p,f,r++))))}if(R=R.A){w=p;for(const C of Object.keys(R))I=R[C],kg(this,w,C,typeof I==="string"?Nb(this,w,C,I):I)}return p}KB(R){return this.ag[R]}gN(R, w){typeof w==="number"?Wc(R,this.element,w):R.appendChild(this.element)}detach(){g.x7(this.element)}update(R){for(const w of Object.keys(R))this.updateValue(w,R[w])}updateValue(R,w){(R=this.xu[`{{${R}}}`])&&kg(this,R[0],R[1],w)}Gy(){this.ag={};this.xu={};this.detach();super.Gy()}};g.k=class extends g.Jw{constructor(R){super(R);this.K_=!0;this.pB=!1;this.listeners=[]}setContent(R,w){this.updateValue(w||"content",R)}show(){this.K_||(g.Z2(this.element,"display",""),this.K_=!0)}hide(){this.K_&&(g.Z2(this.element,"display","none"),this.K_=!1)}Rg(R){R?this.show():this.hide()}GK(R){this.pB=R}Jp(){return this.K_}listen(R,w,p){return this.W(this.element,R,w,p)}W(R,w,p,r){p=(0,g.e_)(p,r||this);r={target:R,type:w,listener:p};this.listeners.push(r);R.addEventListener(w,p);return r}o9(R){this.listeners.forEach((w, p)=>{w===R&&(w=this.listeners.splice(p,1)[0],w.target.removeEventListener(w.type,w.listener))})}focus(){this.element.focus()}Gy(){for(;this.listeners.length;){const R=this.listeners.pop(); R&&R.target.removeEventListener(R.type,R.listener)}super.Gy()}};g.RX=class extends g.k{constructor(R){super(R);this.f_=new g.HC;g.K(this,this.f_)}subscribe(R,w,p){return this.f_.subscribe(R,w,p)}unsubscribe(R,w,p){return this.f_.unsubscribe(R,w,p)}Cv(R){return this.f_.Cv(R)}publish(R,...w){return this.f_.publish(R,...w)}};var M7d=new WeakSet,TW=class extends g.RX{constructor(R,w,p,r,f,G,I=null){super(w);this.api=R;this.macros={};this.componentType=p;this.U=this.X=null;this.eI=I;this.layoutId=r;this.interactionLoggingClientData=f;this.Vk=G;this.U0=null;this.Rw=new dt(this.element);g.K(this,this.Rw);this.N0=this.W(this.element,"click",this.onClick);this.Jl=[];this.M0=new OYD(this.onClick,this);g.K(this,this.M0);this.p_=!1;this.PS=this.xY=null}bind(R){this.U0||R.renderer&&this.init(R.id,R.renderer,{},R);return Promise.resolve()}init(R, w,p){this.U0=R;this.element.setAttribute("id",this.U0);this.eI&&g.pc(this.element,this.eI);this.xY=w&&w.adRendererCommands;this.PS=w.interaction;this.PS?.onTap&&g.pc(this.element,"ytp-ad-component--clickable");this.macros=p;this.X=w.trackingParams||null;this.U=g.F(w.rendererContext,v4H)?.loggingDirectives??w.loggingDirectives;this.X!=null?this.createServerVe(this.element,this.X):this.U&&(R=this.element,w=this.U,this.api.createServerVe(R,this,!0),this.api.setTrackingParams(R,w.trackingParams||null))}clear(){}hide(){super.hide(); (this.X!=null||this.U)&&this.logVisibility(this.element,!1)}show(){super.show();if(!this.p_){this.p_=!0;var R=this.xY&&this.xY.impressionCommand;const w=this.PS?.onFirstVisible;R?this.I0(R):w&&(R=KF(w))&&this.I0(R)}(this.X!=null||this.U)&&this.logVisibility(this.element,!0)}onClick(R){if((this.X||this.U)&&!M7d.has(R)){var w=this.element;this.api.hasVe(w)&&this.K_&&this.api.logClick(w,this.interactionLoggingClientData);M7d.add(R)}var p=this.xY&&this.xY.clickCommand;w=this.PS?.onTap;if(p){var r=this.SI(p); this.I0(r)}else{if(p=w)a:{p=this.element;R=R.composedPath();for(r of R){if(r===p)break;if(r.className.indexOf("ytp-ad-component--clickable")>=0){p=!1;break a}}p=!0}p&&(r=KF(w))&&this.I0(r)}}SI(R){return R}onTouchStart(R){this.M0.onTouchStart(R)}onTouchMove(R){this.M0.onTouchMove(R)}onTouchEnd(R){if(this.M0)this.M0.onTouchEnd(R)}I0(R){this.layoutId?this.Vk.executeCommand(R,this.layoutId):(R=new g.Id("There is undefined layoutId when calling the runCommand method.",{componentType:this.componentType}), g.LF(R))}createServerVe(R,w){this.api.createServerVe(R,this);this.api.setTrackingParams(R,w)}logVisibility(R,w){this.api.hasVe(R)&&this.api.logVisibility(R,w,this.interactionLoggingClientData)}Gy(){this.clear(null);this.o9(this.N0);for(const R of this.Jl)this.o9(R);super.Gy()}};var tV=class extends TW{constructor(R,w,p,r,f=[],G="button",I=!1,C,u=!1){f={j:"button",E0:["ytp-ad-button"].concat(f)};C!=null&&(f.A={tabindex:C});super(R,f,G,w,p,r);this.L=this.C=this.O=null;this.K=I;this.G=u;this.hide()}init(R,w,p){super.init(R,w,p);this.L=w;if(w.text==null&&w.icon==null)g.AO(Error("ButtonRenderer did not have text or an icon set."));else{switch(w.style||null){case "STYLE_UNKNOWN":R="ytp-ad-button-link";break;default:R=null}R!=null&&g.pc(this.element,R);w.text!=null&&(R=g.Su(w.text), g.fj(R)||(this.element.setAttribute("aria-label",R),this.O=new g.RX({j:"span",Z:"ytp-ad-button-text",fB:R}),g.K(this,this.O),this.O.gN(this.element)));w.accessibilityData&&w.accessibilityData.accessibilityData&&w.accessibilityData.accessibilityData.label&&!g.fj(w.accessibilityData.accessibilityData.label)&&this.element.setAttribute("aria-label",w.accessibilityData.accessibilityData.label);w.icon!=null&&(w=qY(w.icon,this.G),w!=null&&(this.C=new g.RX({j:"span",Z:"ytp-ad-button-icon",N:[w]}),g.K(this, this.C)),this.K?Wc(this.element,this.C.element,0):this.C.gN(this.element))}}clear(){this.hide()}onClick(R){super.onClick(R);for(const w of op_(this))this.layoutId?this.Vk.executeCommand(w,this.layoutId):g.LF(Error("Missing layoutId for button."));this.api.onAdUxClicked(this.componentType,this.layoutId)}};var t1_=class extends g.f5{constructor(){super();this.L=new Map;this.C=w$r(R=>{if(R.target&&(R=this.L.get(R.target))&&R)for(let w=0;w0&&(this.toggleButton(!this.isToggled()),this.D());super.onClick(R)}D(){g.M(this.G,"ytp-ad-toggle-button-toggled",this.isToggled());for(const R of ewd(this,this.isToggled()))this.layoutId? this.Vk.executeCommand(R,this.layoutId):g.LF(Error("Missing layoutId for toggle button."));if(this.isToggled())this.api.onAdUxClicked("toggle-button",this.layoutId);o$(this)}clear(){this.hide()}toggleButton(R){g.M(this.G,"ytp-ad-toggle-button-toggled",R);this.L.checked=R;o$(this)}isToggled(){return this.L.checked}};var BcL=class{constructor(R,w,p){this.actionType=w;this.id=p;this.content=R}};var azl=class extends ag{constructor(R){super();this.L=R;this.W(this.L,"onAdUxUpdate",this.J)}J(R){if(Array.isArray(R))for(const w of R)w instanceof BcL&&this.G(w)}};var npb=class extends TW{constructor(R,w,p,r){super(R,{j:"div",Z:"ytp-ad-feedback-dialog-background",N:[{j:"div",Z:"ytp-ad-feedback-dialog-container",N:[{j:"div",Z:"ytp-ad-feedback-dialog-form",A:{role:"dialog",tabindex:"-1"},N:[{j:"div",Z:"ytp-ad-feedback-dialog-title",N:[{j:"span",fB:"{{title}}"}]},{j:"span",Z:"ytp-ad-info-dialog-feedback-options-title",fB:"{{reasonsTitle}}"},{j:"div",Z:"ytp-ad-info-dialog-feedback-options"},{j:"div",Z:"ytp-ad-feedback-dialog-confirm-container",N:[{j:"button",Z:"ytp-ad-feedback-dialog-cancel-button", fB:"{{cancelLabel}}"},{j:"button",Z:"ytp-ad-feedback-dialog-confirm-button",fB:"{{confirmLabel}}"}]}]}]}]},"ad-info-dialog",w,p,r);this.G=[];this.L=null;this.K=this.KB("ytp-ad-feedback-dialog-cancel-button");this.J=this.KB("ytp-ad-feedback-dialog-confirm-button");this.S=this.KB("ytp-ad-info-dialog-feedback-options");this.O0=this.KB("ytp-ad-feedback-dialog-title");this.O=this.C=null;this.hide()}init(R,w,p){super.init(R,w,p);w.reasons?w.confirmLabel==null?g.LF(Error("AdFeedbackRenderer.confirmLabel was not set.")): (w.cancelLabel==null&&g.AO(Error("AdFeedbackRenderer.cancelLabel was not set.")),w.title==null&&g.AO(Error("AdFeedbackRenderer.title was not set.")),a9d(this,w)):g.LF(Error("AdFeedbackRenderer.reasons were not set."))}clear(){F4(this.K);F4(this.J);this.G.length=0;this.hide()}hide(){this.L&&this.L.hide();this.C&&this.C.hide();super.hide();this.O&&this.O.focus()}show(){this.L&&this.L.show();this.C&&this.C.show();this.O=document.activeElement;super.show();this.K.focus()}D(){this.api.onAdUxClicked("ad-feedback-dialog-close-button", this.layoutId);this.publish("a");this.hide()}jI(){this.hide()}},$5d=class{constructor(R,w){this.C=w;this.L=new g.RX({j:"label",Z:"ytp-ad-feedback-dialog-reason-label",N:[{j:"input",Z:"ytp-ad-feedback-dialog-reason-input",A:{type:"radio",name:"feedback-reason-group"}},{j:"span",Z:"ytp-ad-feedback-dialog-reason-text",fB:g.Su(R)}]});this.O=this.L.KB("ytp-ad-feedback-dialog-reason-input")}zk(){return this.L.element}getCommand(){return this.C}isChecked(){return this.O.checked}};var ZBD=class extends PQd{K(R){super.K(R);this.api.onAdUxClicked("ad-mute-confirm-dialog-close-button")}G(R){super.G(R);this.api.onAdUxClicked("ad-mute-confirm-dialog-close-button")}J(R){super.J(R);this.api.onAdUxClicked("ad-mute-confirm-dialog-confirm-button");this.publish("b")}};var Q7b=class extends TW{constructor(R,w,p,r,f){super(R,{j:"div",Z:"ytp-ad-info-dialog-background",N:[{j:"div",Z:"ytp-ad-info-dialog-container",N:[{j:"div",Z:"ytp-ad-info-dialog-form",A:{role:"dialog",tabindex:"-1"},N:[{j:"div",Z:"ytp-ad-info-dialog-title",fB:"{{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",N:[{j:"button",Z:"ytp-ad-info-dialog-confirm-button", fB:"{{confirmLabel}}"}]}]}]}]},"ad-info-dialog",w,p,r);this.L=this.C=null;this.J=this.KB("ytp-ad-info-dialog-confirm-button");this.Qk=this.KB("ytp-ad-info-dialog-mute-container");this.nB=this.KB("ytp-ad-info-dialog-message");this.jI=this.KB("ytp-ad-info-dialog-ad-reasons");this.G=this.O=null;this.S=f;this.K=null;this.YY=!1;this.D=null;this.hide()}init(R,w,p){super.init(R,w,p);this.K=w;if(w.dialogMessage==null&&w.title==null)g.LF(Error("Neither AdInfoDialogRenderer.dialogMessage nor AdInfoDialogRenderer.title was set.")); else{w.confirmLabel==null&&g.AO(Error("AdInfoDialogRenderer.confirmLabel was not set."));if(R=w.closeOverlayRenderer&&g.F(w.closeOverlayRenderer,ky)||null)this.L=new tV(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk,["ytp-ad-info-dialog-close-button"],"ad-info-dialog-close-button"),g.K(this,this.L),this.L.init(gw("button"),R,this.macros),this.L.gN(this.element);w.title&&(R=g.Su(w.title),this.updateValue("title",R));if(w.adReasons)for(R=w.adReasons,p=0;pthis.hide()); g.K(this,this.O0);this.YY=0;this.Qk=!1;this.mq=G;this.hide()}init(R,w,p){super.init(R,w,p);R=w.durationMilliseconds;typeof R==="number"&&R<0&&g.LF(Error("durationMilliseconds was specified incorrectly in AdPreviewRenderer with a value of: "+R));this.mq&&(this.J?g.pc(this.C.element,"modern-countdown-next-to-thumbnail"):g.pc(this.C.element,"countdown-next-to-thumbnail"));R=w.durationMilliseconds;this.YY=R==null||R===0?this.L.jO():R;if(w.templatedCountdown)var r=w.templatedCountdown.templatedAdText; else w.staticPreview&&(r=w.staticPreview);this.G.init(gw("ad-text"),r,p);(r=this.api.getVideoData({playerType:1}))&&r.cf&&w.thumbnail?this.D.init(gw("ad-image"),w.thumbnail,p):(this.jI.hide(),this.J&&this.mq&&g.pc(this.G.element,"ytp-ad-preview-text-modern-postroll"))}clear(){this.hide()}hide(){this.C.hide();this.G.hide();this.D.hide();Ef(this);super.hide()}show(){KQ(this);this.C.show();this.G.show();this.D.show();super.show()}K(){this.hide()}O(){if(this.L!=null){var R=this.L.getProgressState();R!= null&&R.current!=null&&(R=1E3*R.current,!this.Qk&&R>=this.YY?(this.O0.hide(),this.Qk=!0,this.publish("i")):this.G&&this.G.isTemplated()&&(R=Math.max(0,Math.ceil((this.YY-R)/1E3)),R!=this.q0&&(Of(this.G,{TIME_REMAINING:String(R)}),this.q0=R)))}}};var Xmd=class extends gt{constructor(R,w,p,r,f,G){super(R,{j:"div",E0:["ytp-flyout-cta","ytp-flyout-cta-inactive"],N:[{j:"div",Z:"ytp-flyout-cta-icon-container"},{j:"div",Z:"ytp-flyout-cta-body",N:[{j:"div",Z:"ytp-flyout-cta-text-container",N:[{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",w,p,r,f);this.G=new i5(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk, "ytp-flyout-cta-icon");g.K(this,this.G);this.G.gN(this.KB("ytp-flyout-cta-icon-container"));this.G.element.classList.add("ytp-flyout-cta-icon-rounded");this.D=new hw(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk,"ytp-flyout-cta-headline");g.K(this,this.D);this.D.gN(this.KB("ytp-flyout-cta-headline-container"));this.J=new hw(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk,"ytp-flyout-cta-description");g.K(this,this.J);this.J.gN(this.KB("ytp-flyout-cta-description-container")); this.C=new tV(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk,["ytp-flyout-cta-action-button","ytp-flyout-cta-action-button-rounded"]);g.K(this,this.C);this.C.gN(this.KB("ytp-flyout-cta-action-button-container"));this.C.element.setAttribute("tabIndex","-1");Jf(this.C.element);this.O0=null;this.YY=0;this.Qk=G;this.hide()}init(R,w,p){super.init(R,w,p);if(w.image&&w.image.thumbnail)if(w.headline)if(w.description)if((R=w.actionButton&&g.F(w.actionButton,ky))&&R.navigationEndpoint){const f= this.api.getVideoData({playerType:2});if(f!=null)if(w.image&&w.image.thumbnail){var r=w.image.thumbnail.thumbnails;r!=null&&r.length>0&&g.fj(g.WD(r[0].url))&&(r[0].url=f.profilePicture)}else g.AO(Error("FlyoutCtaRenderer does not have image.thumbnail."));this.G.init(gw("ad-image"),w.image,p);this.D.init(gw("ad-text"),w.headline,p);this.J.init(gw("ad-text"),w.description,p);this.C.init(gw("button"),R,p);p=QA(this.C.element);iO(this.C.element,p+" This link opens in new tab");this.O0=R.navigationEndpoint; this.api.gH()||this.show();this.api.addEventListener("playerUnderlayVisibilityChange",this.jI.bind(this));this.YY=w.startMs||0;KQ(this)}else g.LF(Error("FlyoutCtaRenderer has no valid action button."));else g.LF(Error("FlyoutCtaRenderer has no description AdText."));else g.LF(Error("FlyoutCtaRenderer has no headline AdText."));else g.AO(Error("FlyoutCtaRenderer has no image."))}onClick(R){super.onClick(R);this.api.pauseVideo();!g.lA(this.C.element,R.target)&&this.O0&&(this.layoutId?this.Vk.executeCommand(this.O0, this.layoutId):g.LF(Error("Missing layoutId for flyout cta.")))}O(){if(this.L){var R=this.L.getProgressState();(R&&R.current||this.Qk)&&1E3*R.current>=this.YY&&(Ef(this),g.fc(this.element,"ytp-flyout-cta-inactive"),this.C.element.removeAttribute("tabIndex"))}}K(){this.clear()}clear(){this.hide();this.api.removeEventListener("playerUnderlayVisibilityChange",this.jI.bind(this))}show(){this.C&&this.C.show();super.show()}hide(){this.C&&this.C.hide();super.hide()}jI(R){R=="hidden"?this.show():this.hide()}};var nxx=class extends TW{constructor(R,w,p,r){super(R,{j:"div",Z:"ytp-ad-instream-user-sentiment-container"},"instream-user-sentiment",w,p,r,null);this.L=null;this.O=new QV(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk,["ytp-ad-instream-user-sentiment-like-button"]);g.K(this,this.O);this.O.gN(this.element);this.C=new QV(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk,["ytp-ad-instream-user-sentiment-dislike-button"]);g.K(this,this.C);this.C.gN(this.element);this.G= new g.HU(this,400,!1,500,()=>this.hide()); g.K(this,this.G);this.hide()}init(R,w,p){super.init(R,w,p);this.L=w;if(this.L.rectangle){R=this.L.likeButton&&g.F(this.L.likeButton,Ml);w=this.L.dislikeButton&&g.F(this.L.dislikeButton,Ml);this.O.init(gw("toggle-button"),R,p);this.C.init(gw("toggle-button"),w,p);this.W(this.element,"change",this.K);this.G.show(100);this.show();for(const r of this.L&&this.L.impressionCommands||[])this.layoutId?this.Vk.executeCommand(r,this.layoutId):g.LF(Error("Missing layoutId for instream user sentiment."))}}clear(){this.hide()}hide(){this.O.hide(); this.C.hide();super.hide()}show(){this.O.show();this.C.show();super.show()}K(){I4(this.element,"ytp-ad-instream-user-sentiment-selected");this.L.postMessageAction&&g.m1(this.api,"onYtShowToast",this.L.postMessageAction);this.G.hide()}onClick(R){this.Jl.length>0&&this.K();super.onClick(R)}};var Nl=class extends g.f5{constructor(R,w,p,r,f=0,G=!1){super();this.C=R;this.O=!1;this.xY=r;this.O0=G;this.J=!1;this.L=null;w>0&&(this.L=new g.vZ(this.pB,w,this),g.K(this,this.L));this.K=new g.vZ(this.pB,p,this);g.K(this,this.K);this.S=sc(this.C,f,1,r);g.K(this,this.S);this.D=sc(this.C,0,r,1);g.K(this,this.D);this.G=new ag;g.K(this,this.G)}Gy(){this.reset();super.Gy()}reset(){this.G.C();this.J=!1;this.L&&this.L.stop();this.K.stop();this.O&&(this.O=!1,this.D.play())}start(){this.reset();this.G.W(this.C, "mouseover",this.X,this);this.G.W(this.C,"mouseout",this.U,this);this.O0&&(this.G.W(this.C,"focusin",this.X,this),this.G.W(this.C,"focusout",this.U,this));this.L?this.L.start():(this.J=this.O=!0,g.Z2(this.C,{opacity:this.xY}))}X(){this.O&&(this.O=!1,this.D.play());this.K.stop();this.L&&this.L.stop()}U(){this.J?this.K.start():this.L&&this.L.start()}pB(){this.O||(this.O=!0,this.S.play(),this.J=!0)}};var kF=class{constructor(R,w){this.C=R;this.L=w}},vpD=[new kF("b.f_",0),new kF("j.s_",2),new kF("r.s_",4),new kF("e.h_",6),new kF("i.s_",8),new kF("s.t_",10),new kF("p.h_",12),new kF("s.i_",14),new kF("f.i_",16),new kF("a.b_",18),new kF("a.o_"),new kF("g.o_",22),new kF("p.i_",24),new kF("p.m_"),new kF("n.k_",20),new kF("i.f_"),new kF("a.s_"),new kF("m.c_"),new kF("n.h_",26),new kF("o.p_"),new kF("m.p_",28),new kF("o.a_"),new kF("d.p_"),new kF("e.i_")].reduce((R,w)=>{R[w.C]=w;return R},{});g.ll=class{constructor(R,w){this.state=R;this.oldState=w}TE(R){return cs(this,R)>0}};var dEb=class extends gt{constructor(R,w,p,r,f,G){super(R,{j:"div",Z:"ytp-ad-skip-button-slot"},"skip-button",w,p,r,f);this.O0=null;this.jI=!1;this.Qk=G;this.D=this.api.V().experiments.XB("enable_modern_skip_button_on_web");this.q0=!1;this.J=new g.RX({j:"span",E0:["ytp-ad-skip-button-container"]});this.D&&this.J.element.classList.add("ytp-ad-skip-button-container-detached");g.K(this,this.J);this.J.gN(this.element);this.C=this.G=null;this.mq=new g.HU(this.J,500,!1,100,()=>this.hide()); g.K(this,this.mq);this.YY=new Nl(this.J.element,15E3,5E3,.5,.5,this.D);g.K(this,this.YY);this.hide()}init(R,w,p){super.init(R,w,p);this.O0=w;(this.jI=kLl(this))&&g.AO(Error("hasAdControlInClickCommands_ is true."));if(!w||g.Jt(w))g.LF(Error("SkipButtonRenderer was not specified or empty."));else if(!w.message||g.Jt(w.message))g.LF(Error("SkipButtonRenderer.message was not specified or empty."));else{R=this.D?{iconType:"SKIP_NEXT_NEW"}:{iconType:"SKIP_NEXT"};w=this.api.V().Y("delhi_modern_web_player_icons"); const r=qY(R,!1,!1,w);r==null?g.LF(Error("Icon for SkipButton was unable to be retrieved. Icon.IconType: "+R.iconType+".")):(this.api.V().Y("disable_touch_events_on_skip_button")&&(r.A={...r.A,"aria-hidden":"true",focusable:"false"}),this.G=new g.RX({j:"button",E0:[this.D?"ytp-ad-skip-button-modern":"ytp-ad-skip-button","ytp-button",w?"ytp-ad-skip-button-icon-delhi":""],N:[{j:"span",Z:this.D?"ytp-ad-skip-button-icon-modern":"ytp-ad-skip-button-icon",N:[r]}]}),g.K(this,this.G),this.G.gN(this.J.element), this.C=new hw(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk,"ytp-ad-skip-button-text"),this.D&&this.C.element.classList.add("ytp-ad-skip-button-text-centered"),this.C.init(gw("ad-text"),this.O0.message,p),g.K(this,this.C),Wc(this.G.element,this.C.element,0));this.api.V().Y("disable_touch_events_on_skip_button")||(p=this.api.V(),!(this.Jl.length>0)&&p.C&&($X?0:"ontouchstart"in document.documentElement&&(uv()||CA()))&&(this.o9(this.N0),this.Jl=[this.W(this.element,"touchstart",this.onTouchStart, this),this.W(this.element,"touchmove",this.onTouchMove,this),this.W(this.element,"touchend",this.onTouchEnd,this)]))}}clear(){this.YY.reset();this.hide()}hide(){this.J.hide();this.C&&this.C.hide();Ef(this);super.hide()}onClick(R){if(this.G!=null){if(R){var w=R||window.event;w.returnValue=!1;w.preventDefault&&w.preventDefault()}if(gpI(R,{contentCpn:this.api.getVideoData({playerType:1})?.clientPlaybackNonce||""})===0)g.m1(this.api,"onAbnormalityDetected");else if(super.onClick(R),this.publish("j"), g.m1(this.api,"onAdSkip"),this.Qk||!this.jI)this.api.onAdUxClicked(this.componentType,this.layoutId)}}SI(R){if(!this.Qk)return this.jI&&MY("SkipButton click commands not pruned while ALC exist"),R;const w=g.F(R,g.Ps)?.commands;if(!w)return R;R=[];for(let p=0;p=this.D&&U56(this,!0)}};var ZYl=class extends tV{constructor(R,w,p,r){super(R,w,p,r,["ytp-ad-visit-advertiser-button"],"visit-advertiser")}init(R,w,p){super.init(R,w,p);R=!1;w.text!=null&&(R=g.Su(w.text),R=!g.fj(R));R?w.navigationEndpoint==null?g.AO(Error("No visit advertiser clickthrough provided in renderer,")):w.style!=="STYLE_UNKNOWN"?g.AO(Error("Button style was not a link-style type in renderer,")):this.show():g.AO(Error("No visit advertiser text was present in the renderer."))}};var UL=class extends TW{constructor(R,w,p,r,f=!1,G=!1){super(R,{j:"span",Z:"ytp-ad-simple-ad-badge"},"simple-ad-badge",w,p,r);this.L=this.KB("ytp-ad-simple-ad-badge");(this.C=f)&&this.L.classList.add("ytp-ad-simple-ad-badge--clean-player");G&&this.L.classList.add("ytp-ad-simple-ad-badge--survey");this.hide()}init(R,w,p){super.init(R,w,p);R=w.text;g.fj(Uk(R))?g.AO(Error("SimpleAdBadgeRenderer has invalid or empty text")):(R&&R.text&&(w=R.text,this.C||(w=this.api.V(),w=R.text+" "+(w&&w.C?"\u2022":"\u00b7")), w={text:w,isTemplated:R.isTemplated},R.style&&(w.style=R.style),R.targetId&&(w.targetId=R.targetId),R=new hw(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk),R.init(gw("simple-ad-badge"),w,p),R.gN(this.element),g.K(this,R)),this.show())}clear(){this.hide()}};var S8=class extends j8{constructor(R,w,p,r,f=!1){super("player-overlay",R,{},w,r);this.videoAdDurationSeconds=p;this.interactionLoggingClientData=r;this.YQ=f}};var sB=class extends g.HC{constructor(R,w){super();this.api=R;this.durationMs=w;this.L=null;this.handler=new ag(this);g.K(this,this.handler);this.C=$Ed;this.handler.W(this.api,"presentingplayerstatechange",this.O);this.L=this.handler.W(this.api,"onAdPlaybackProgress",this.Q2)}jO(){return this.durationMs}stop(){this.L&&this.handler.o9(this.L)}Q2(R){this.C={seekableStart:0,seekableEnd:this.durationMs/1E3,current:R.current};this.publish("h")}getProgressState(){return this.C}O(R){R.TE(2)&&this.publish("g")}};var RF=class extends g.HC{constructor(R){super();this.L=!1;this.tp=0;this.handler=new ag(this);g.K(this,this.handler);this.durationMs=R;this.timer=new g.pw(100);g.K(this,this.timer);this.handler.W(this.timer,"tick",this.Q2);this.C={seekableStart:0,seekableEnd:R/1E3,current:0};this.start()}jO(){return this.durationMs}start(){this.L||(this.L=!0,this.timer.start())}stop(){this.L&&(this.L=!1,this.timer.stop())}Q2(){this.tp+=100;let R=!1;this.tp>this.durationMs&&(this.tp=this.durationMs,this.timer.stop(), R=!0);this.C={seekableStart:0,seekableEnd:this.durationMs/1E3,current:this.tp/1E3};this.publish("h");R&&this.publish("g")}getProgressState(){return this.C}};var wL=class extends gt{constructor(R,w,p,r,f,G,I){super(R,{j:"span",Z:I?"ytp-ad-duration-remaining--clean-player":"ytp-ad-duration-remaining"},"ad-duration-remaining",w,p,r,f);this.videoAdDurationSeconds=G;this.C=null;I&&this.api.V().C&&(this.element.classList.add("ytp-ad-duration-remaining--mweb"),hx&&this.element.classList.add("ytp-ad-duration-remaining--mweb-ios"));this.hide()}init(R,w,p){super.init(R,w,p);if(w?.templatedCountdown?.templatedAdText){R=w.templatedCountdown.templatedAdText;if(!R.isTemplated){g.AO(Error("AdDurationRemainingRenderer has no templated ad text.")); return}this.C=new hw(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk);this.C.init(gw("ad-text"),R,{});this.C.gN(this.element);g.K(this,this.C)}this.show()}clear(){this.hide()}hide(){Ef(this);super.hide()}K(){this.hide()}O(){if(this.L!=null){var R=this.L.getProgressState();if(R!=null&&R.current!=null&&this.C){var w=this.L instanceof sB?this.videoAdDurationSeconds!==void 0?this.videoAdDurationSeconds:R.seekableEnd:this.videoAdDurationSeconds!==void 0?this.videoAdDurationSeconds:this.L instanceof RF?R.seekableEnd:this.api.getDuration({playerType:2,Lo:!1});R=R.current;w=this.api.getVideoData()?.L$?.()?Math.max(w-R,0):w-R;Of(this.C,{FORMATTED_AD_DURATION_REMAINING:String(g.a$(w)),TIME_REMAINING:String(Math.ceil(w))})}}}show(){KQ(this);super.show()}};var Y7x=class extends hw{constructor(R,w,p,r){super(R,w,p,r,"ytp-video-ad-top-bar-title","ad-title")}onClick(R){super.onClick(R);this.api.onAdUxClicked(this.componentType)}};var pf=class{constructor(R){this.content=R.content;if(R.commandRuns)for(const w of R.commandRuns)this.loggingDirectives=g.F(w,Mpl),w.onTap&&(this.interaction={onTap:w.onTap})}},rL=class extends TW{constructor(R,w,p,r){super(R,{j:"div",Z:"ad-simple-attributed-string"},"ad-simple-attributed-string",w,p,r);this.hide()}init(R,w){super.init(R,w,{});(R=w.content)?(g.L$(this.element,R),this.element.setAttribute("aria-label",w.interaction?.accessibility?.label||R)):g.LF(Error("AdSimpleAttributedString does not have text content"))}clear(){this.hide()}onClick(R){super.onClick(R)}};var ff=class extends TW{constructor(R,w,p,r,f){super(R,{j:"span",Z:f?"ytp-ad-badge--clean-player":"ytp-ad-badge"},"ad-badge",w,p,r);this.C=f;this.adBadgeText=new rL(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk);this.adBadgeText.gN(this.element);g.K(this,this.adBadgeText);f?(this.adBadgeText.element.classList.add("ytp-ad-badge__text--clean-player"),hx&&this.adBadgeText.element.classList.add("ytp-ad-badge--stark-clean-player-ios")):this.adBadgeText.element.classList.add("ytp-ad-badge__text"); this.hide()}init(R,w){super.init(R,w,{});(R=w.label)&&R.content&&!g.fj(R.content)?(this.adBadgeText.init(gw("ad-simple-attributed-string"),new pf(R)),(w=w.adPodIndex)&&w.content&&!g.fj(w.content)&&(this.L=new rL(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk),this.L.gN(this.element),g.K(this,this.L),this.L.element.classList.add("ytp-ad-badge__pod-index"),this.L.init(gw("ad-simple-attributed-string"),new pf(w))),this.element.classList.add(this.C?"ytp-ad-badge--stark-clean-player": "ytp-ad-badge--stark"),this.show()):g.LF(Error("No label is returned in AdBadgeViewModel."))}show(){this.adBadgeText.show();this.L?.show();super.show()}hide(){this.adBadgeText.hide();this.L?.hide();super.hide()}};var F8_=class extends TW{constructor(R,w,p,r){super(R,{j:"span",Z:"ytp-ad-pod-index"},"ad-pod-index",w,p,r);this.api.V().C&&(this.element.classList.add("ytp-ad-pod-index--mweb"),hx&&this.element.classList.add("ytp-ad-pod-index--mweb-ios"));this.hide()}init(R,w){super.init(R,w,{});(R=w.adPodIndex)&&R.content&&!g.fj(R.content)&&(this.L=new rL(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk),this.L.gN(this.element),g.K(this,this.L),this.L.init(gw("ad-simple-attributed-string"),new pf(R)), w.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.L?.show();super.show()}hide(){this.L?.hide();super.hide()}};var jG6=class extends TW{constructor(R,w,p,r){super(R,{j:"div",Z:"ytp-ad-disclosure-banner"},"ad-disclosure-banner",w,p,r);this.hide()}init(R,w){super.init(R,w,{});w?.text?w.text?.content&&!g.fj(w.text.content)&&(this.L=new g.RX({j:"div",Z:"ytp-ad-disclosure-banner__text",fB:w.text.content}),g.K(this,this.L),this.L.gN(this.element),this.api.V().Y("enable_ad_disclosure_banner_a11y_fix")?((R=w.interaction?.accessibility?.label)||(R=`${w.text.content} This link opens in new tab`),iO(this.element,R)): this.element.setAttribute("aria-label",w.interaction?.accessibility?.label||w.text.content),w.interaction?.onTap&&(this.api.V().Y("remove_chevron_from_ad_disclosure_banner_h5")||(this.C=new g.RX({j:"div",Z:"ytp-ad-disclosure-banner__chevron",N:[g.rQ()]}),g.K(this,this.C),this.C.gN(this.element)),this.api.V().Y("enable_ad_disclosure_banner_a11y_fix")&&(Jf(this.element),this.element.setAttribute("tabindex","0"),this.listen("keydown",this.R3))),this.show()):g.LF(Error("No banner text found in AdDisclosureBanner."))}R3(R){if(R.key=== "Enter"||R.key===" ")R.preventDefault(),this.element.click()}clear(){this.hide()}};var By=class{constructor(R,w){this.C=R;this.L=w}};var mY=class extends g.RX{constructor(R,w,p,r=!1){super({j:"div",Z:"ytp-ad-persistent-progress-bar-container",N:[{j:"div",Z:"ytp-ad-persistent-progress-bar"}]});this.api=R;this.C=w;this.O=p;r&&this.element.classList.add("ytp-ad-persistent-progress-bar-container--clean-player");g.K(this,this.C);this.progressBar=this.KB("ytp-ad-persistent-progress-bar");this.L=-1;this.W(R,"presentingplayerstatechange",this.onStateChange);this.hide();this.onStateChange()}Q2(){const R=this.C.getProgressState();let w= R.seekableEnd;this.api.getPresentingPlayerType()===2&&(w=this.O?this.O/1E3:R.seekableEnd);this.progressBar.style.width=nQ(new By(R.seekableStart,w),R.current,0)*100+"%"}onStateChange(){g.Cb(this.api.V())||(this.api.getPresentingPlayerType()===2?this.L===-1&&(this.show(),this.L=this.C.subscribe("h",this.Q2,this),this.Q2()):this.L!==-1&&(this.hide(),this.C.Cv(this.L),this.L=-1))}};var Cw_=class extends TW{constructor(R,w,p,r,f,G){super(R,{j:"div",Z:"ytp-ad-player-overlay",N:[{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",w,p,r);this.J=G;this.K=this.KB("ytp-ad-player-overlay-flyout-cta");this.K.classList.add("ytp-ad-player-overlay-flyout-cta-rounded"); this.L=this.KB("ytp-ad-player-overlay-instream-info");this.G=null;wAx(this)&&(R=uA("div"),g.pc(R,"ytp-ad-player-overlay-top-bar-gradients"),w=R,p=this.L,p.parentNode&&p.parentNode.insertBefore(w,p),(w=this.api.getVideoData({playerType:2}))&&w.isListed&&w.title&&(p=new Y7x(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk),p.gN(R),p.init(gw("ad-title"),{text:w.title},this.macros),g.K(this,p)),this.G=R);this.O=null;this.jI=this.KB("ytp-ad-player-overlay-skip-or-preview");this.O0=this.KB("ytp-ad-player-overlay-progress-bar"); this.S=this.KB("ytp-ad-player-overlay-instream-user-sentiment");this.D=this.KB("ytp-ad-player-overlay-ad-disclosure-banner");this.C=f;g.K(this,this.C);this.hide()}init(R,w,p,r){super.init(R,w,p);if(w.skipOrPreviewRenderer){if(R=g.F(w.skipOrPreviewRenderer,dS))p=new CT(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk,this.C,this.J),p.gN(this.jI),p.init(gw("skip-button"),R,this.macros),g.K(this,p);if(R=g.F(w.skipOrPreviewRenderer,dS))var f=R.skipOffsetMilliseconds}w.brandInteractionRenderer&& (R=w.brandInteractionRenderer.brandInteractionRenderer,p=new nxx(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk),p.gN(this.S),p.init(gw("instream-user-sentiment"),R,this.macros),g.K(this,p));if(R=g.F(w,Uox))if(p=g.F(R,Uox))R=new Xmd(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk,this.C,!!w.showWithoutLinkedMediaLayout),g.K(this,R),R.gN(this.K),R.init(gw("flyout-cta"),p,this.macros);r=r&&r.videoAdDurationSeconds;w.adBadgeRenderer&&(p=w.adBadgeRenderer,R=g.F(p,Wu), R!=null?(p=new ff(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk,!1),g.K(this,p),p.gN(this.L),p.init(gw("ad-badge"),R,this.macros),this.O=p.element):(R=p.simpleAdBadgeRenderer,R==null&&(R={text:{text:"Ad",isTemplated:!1}}),p=new UL(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk),g.K(this,p),p.gN(this.L),p.init(gw("simple-ad-badge"),R,this.macros)));w.adPodIndex&&(R=g.F(w.adPodIndex,u5d),R!=null&&(p=new F8_(this.api,this.layoutId,this.interactionLoggingClientData, this.Vk),g.K(this,p),p.gN(this.L),p.init(gw("ad-pod-index"),R)));w.adDurationRemaining&&!w.showWithoutLinkedMediaLayout&&(R=w.adDurationRemaining.adDurationRemainingRenderer,R==null&&(R={templatedCountdown:{templatedAdText:{text:"{FORMATTED_AD_DURATION_REMAINING}",isTemplated:!0}}}),r=new wL(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk,this.C,r,!1),g.K(this,r),r.gN(this.L),r.init(gw("ad-duration-remaining"),R,this.macros));w.adInfoRenderer&&(r=g.F(w.adInfoRenderer,AW))&&(R=new rj(this.api, this.layoutId,this.interactionLoggingClientData,this.Vk,this.element,void 0,!1),g.K(this,R),this.O!==null?this.L.insertBefore(R.element,this.O.nextSibling):R.gN(this.L),R.init(gw("ad-info-hover-text-button"),r,this.macros));w.visitAdvertiserRenderer&&(R=g.F(w.visitAdvertiserRenderer,ky))&&(p=wAx(this)&&this.G?this.G:this.L)&&(r=new ZYl(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk),g.K(this,r),r.gN(p),r.init(gw("visit-advertiser"),R,this.macros),Jf(r.element),R=QA(r.element),iO(r.element, R+" This link opens in new tab"));!(r=this.api.V())||g.u8(r)||g.zI(r)||r.controlsType!="3"&&!r.disableOrganicUi||(f=new mY(this.api,this.C,f,!1),f.gN(this.O0),g.K(this,f));w.adDisclosureBannerRenderer&&(f=g.F(w.adDisclosureBannerRenderer,CSD))&&(w=new jG6(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk),w.gN(this.D),w.init(gw("ad-disclosure-banner"),f),g.K(this,w));this.api.V().Y("enable_updated_html5_player_focus_style")&&g.pc(this.element,"ytp-ad-player-overlay-updated-focus-style"); this.show()}clear(){this.hide()}};ZY([/^https:\/\/([\w-]*\.)*youtube\.com.*/,/^https:\/\/([\w-]*\.)*gstatic\.com.*/]);ZY([/\.css$/,/\.js$/,/\.webm$/,/\.png$/]);ZY([/\.css$/,/\.js$/,/\.ico$/,/\/ytmweb\/_\/js\//,/\/ytmweb\/_\/ss\//,/\/kabuki\/_\/js\//,/\/kabuki\/_\/ss\//,/\/ytmainappweb\/_\/js\//,/\/ytmainappweb\/_\/ss\//,/\/ytmusicweb\/_\/js\//,/\/ytmusicweb\/_\/ss\//,/\/music_integrations\/_\/js\//,/\/music_integrations\/_\/ss\//]);ZY([/purge_shell=1/]); (function(R=[]){const w=[];for(const p of SQP)w.push({key:p});for(const p of R)w.push(p);return w})();var Cgd=ne("ytcsi_debug_max_size",100);var z4I={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(z4I,{"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 Qex=class extends WY{constructor(R,w){super(arguments);this.timer=w}},iur=new x0("aft-recorded",Qex);var DPL=g.qx.ytLoggingGelSequenceIdObj_||{};g.AY("ytLoggingGelSequenceIdObj_",DPL);var vs=g.qx.ytLoggingLatencyUsageStats_||{};g.AY("ytLoggingLatencyUsageStats_",vs); var gQ=class{constructor(){this.L=0}tick(R,w,p,r){NY(this,`tick_${R}_${w}`)||g.Rv("latencyActionTicked",{tickName:R,clientActionNonce:w},{timestamp:p,cttAuthInfo:r})}info(R,w,p){const r=Object.keys(R).join("");NY(this,`info_${r}_${w}`)||(R=Object.assign({},R),R.clientActionNonce=w,g.Rv("latencyActionInfo",R,{cttAuthInfo:p}))}jspbInfo(R,w,p){let r="";for(let f=0;f{}; this.webkitClearResourceTimings=()=>{}; this.mozClearResourceTimings=()=>{}; this.msClearResourceTimings=()=>{}; this.oClearResourceTimings=()=>{}}},kt=G$.performance||G$.mozPerformance||G$.msPerformance||G$.webkitPerformance||new JXd;var T8W=!1,$Pd=!1,Iw={'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"},gIb=(0,g.e_)(kt.clearResourceTimings||kt.webkitClearResourceTimings||kt.mozClearResourceTimings||kt.msClearResourceTimings||kt.oClearResourceTimings||g.EW,kt);var IF=window;IF.ytcsi&&(IF.ytcsi.infoGel=g.sT,IF.ytcsi.tick=u$);var ThY=class{flush(R=[],w=!1){if(g.Y("enable_client_streamz_web"))for(const p of R)R=Xi(p),this.L&&kL(R,SMd,2,this.L),R={serializedIncrementBatch:g.c8(R.C())},g.Rv("streamzIncremented",R,{sendIsolatedPayload:w})}},f1d=class extends ThY{constructor(){super()}},c7d=class extends ThY{constructor(R){super();var w=new SMd;var p=new UOY;p=uf(p,1,"botguard");R=uf(p,2,R);this.L=UX(w,UOY,1,RYI,R)}};var xJ,MkP=new Map;var Rg_=class{constructor(R){this.L=new a4(R)}set(R,w,p){p=p!==void 0?Date.now()+p:void 0;this.L.set(R,w,p)}get(R){return this.L.get(R)}remove(R){this.L.remove(R)}};var I1Y=null;var y2=null,V2=null,ow=null,zMb=null;g.AY("yt.www.ads.eventcache.getLastCompanionData",function(){return y2}); g.AY("yt.www.ads.eventcache.getLastPlaShelfData",function(){return null}); g.AY("yt.www.ads.eventcache.getLastUpdateEngagementPanelAction",function(){return V2}); g.AY("yt.www.ads.eventcache.getLastChangeEngagementPanelVisibilityAction",function(){return ow}); g.AY("yt.www.ads.eventcache.getLastScrollToEngagementPanelCommand",function(){return zMb});var x3r=new Map([["dark","USER_INTERFACE_THEME_DARK"],["light","USER_INTERFACE_THEME_LIGHT"]]);var OT=class{constructor(){this.L={};if(this.C=Kzl()){const R=g.kE("CONSISTENCY");R&&LsW(this,{encryptedTokenJarContents:R})}}handleResponse(R,w){if(!w)throw Error("request needs to be passed into ConsistencyService");w=w.I_.context?.request?.consistencyTokenJars||[];(R=R.responseContext?.consistencyTokenJar)&&this.replace(w,R)}replace(R,w){for(const p of R)delete this.L[p.encryptedTokenJarContents];LsW(this,w)}};var iY6=window.location.hostname.split(".").slice(-2).join("."),KV=class{constructor(){this.O=-1;let R=g.n("LOCATION_PLAYABILITY_TOKEN");g.n("INNERTUBE_CLIENT_NAME")==="TVHTML5"&&(this.localStorage=t1(this))&&(R=this.localStorage.get("yt-location-playability-token"));R&&(this.locationPlayabilityToken=R,this.C=this.L=void 0)}static getInstance(){Cf=g.yD("yt.clientLocationService.instance");Cf||(Cf=new KV,g.AY("yt.clientLocationService.instance",Cf));return Cf}setLocationOnInnerTubeContext(R){R.client|| (R.client={});if(this.L)R.client.locationInfo||(R.client.locationInfo={}),R.client.locationInfo.latitudeE7=Math.floor(this.L.coords.latitude*1E7),R.client.locationInfo.longitudeE7=Math.floor(this.L.coords.longitude*1E7),R.client.locationInfo.horizontalAccuracyMeters=Math.round(this.L.coords.accuracy),R.client.locationInfo.forceLocationPlayabilityTokenRefresh=!0;else if(this.G||this.locationPlayabilityToken)R.client.locationPlayabilityToken=this.G||this.locationPlayabilityToken}getXGeoHeader(){if(this.C){var R= this.C;var w=Math.floor(R.coords.longitude*1E7);var p=Math.floor(R.coords.latitude*1E7);var r=new Xqb;p=VF(r,1,KW(p));w=VF(p,2,KW(w));p=new dor;p=mw(p,1,1);p=mw(p,2,12);p=mw(p,9,8);p=CP(p,3,R.timestamp*1E3);R=VF(p,7,AU(R.coords.accuracy*1E3));R=mw(R,25,2);R=kL(R,Xqb,5,w);R=`w ${g.c8(Zsd(R),4)}`}else R=null;return R}handleResponse(R){R=R.responseContext?.locationPlayabilityToken;R!==void 0&&(this.locationPlayabilityToken=R,this.C=this.L=void 0,g.n("INNERTUBE_CLIENT_NAME")==="TVHTML5"?(this.localStorage= t1(this))&&this.localStorage.set("yt-location-playability-token",R,15552E3):g.NL("YT_CL",JSON.stringify({loctok:R}),15552E3,iY6,!0))}clearLocationPlayabilityToken(R){R==="TVHTML5"?(this.localStorage=t1(this))&&this.localStorage.remove("yt-location-playability-token"):g.Us("YT_CL");this.G=void 0;this.O!==-1&&(clearTimeout(this.O),this.O=-1)}clearCurrentPosition(){this.C=this.L=void 0}getCurrentPositionFromGeolocation(R){if(!(navigator&&navigator.geolocation&&navigator.geolocation.getCurrentPosition))return Promise.reject(Error("Geolocation unsupported")); let w=!1,p=1E4;g.n("INNERTUBE_CLIENT_NAME")==="MWEB"&&(w=!0,p=15E3);return new Promise((r,f)=>{navigator.geolocation.getCurrentPosition(G=>{this.C=R?.addToHeaders?G:void 0;this.L=G;r(G)},G=>{f(G)},{enableHighAccuracy:w, maximumAge:0,timeout:p})})}createUnpluggedLocationInfo(R){const w={}; R=R.coords;R?.latitude&&(w.latitudeE7=Math.floor(R.latitude*1E7));R?.longitude&&(w.longitudeE7=Math.floor(R.longitude*1E7));R?.accuracy&&(w.locationRadiusMeters=Math.round(R.accuracy));return w}createLocationInfo(R){const w={};R=R.coords;R?.latitude&&(w.latitudeE7=Math.floor(R.latitude*1E7));R?.longitude&&(w.longitudeE7=Math.floor(R.longitude*1E7));return w}},Cf;var QG6=class{constructor(){this.L={}}contains(R){return Object.prototype.hasOwnProperty.call(this.L,R)}get(R){if(this.contains(R))return this.L[R]}set(R,w){this.L[R]=w}zD(){return Object.keys(this.L)}remove(R){delete this.L[R]}};new class{constructor(){this.mappings=new QG6}get(R){a:{var w=this.mappings.get(R.toString());switch(w.type){case "mapping":R=w.value;break a;case "factory":w=w.value();this.mappings.set(R.toString(),{type:"mapping",value:w});R=w;break a;default:R=T1(w,void 0)}}return R}registerService(R,w){this.mappings.set(R.toString(),{type:"mapping",value:w});return R}};var oZW={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 hid=class{K(R,w={},p=BY){var r={context:g.CF(R.clickTrackingParams,!1,this.G)};var f=this.C(R);if(f){this.L(r,f,w);f=g.cx(this.O());const G=g.F(R.commandMetadata,g.Di)?.apiUrl;G&&(f=G);f=E9r(Sd(f));R={command:R,...(void 0)};r={input:f,nA:RN(f),I_:r,config:R};r.config.cX?r.config.cX.identity=p:r.config.cX={identity:p};w.abortSignal&&(r.nA.signal=w.abortSignal);return r}w=new g.Id("Error: Failed to create Request from Command.",R);g.LF(w)}get G(){return!1}},ur=class extends hid{};var gxd={GET_DATASYNC_IDS:MR(class extends ur{K(){return{input:"/getDatasyncIdsEndpoint",nA:RN("/getDatasyncIdsEndpoint","GET"),I_:{}}}O(){return[]}C(){}L(){}})};var XvP="tokens consistency service_params mss client_location entities adblock_detection response_received_commands store manifest player_preload shorts_prefetch".split(" "),a1_=["type.googleapis.com/youtube.api.pfiinnertube.YoutubeApiInnertube.BrowseResponse","type.googleapis.com/youtube.api.pfiinnertube.YoutubeApiInnertube.PlayerResponse","type.googleapis.com/youtube.api.pfiinnertube.YoutubeApiInnertube.PanelResponse"],Px=class{constructor(R,w,p,r,f){this.G=R;this.jt=w;this.L=p;this.K=r;this.O= f;this.C=new Map;R.l_||(R.l_={});R.l_={...gxd,...R.l_}}Ad(R){return y8I(R,this.G)}};var RNr=new Zi("INNERTUBE_TRANSPORT_TOKEN");var kFI=class extends ur{O(){return sGY}get G(){return!0}C(R){return g.F(R,D$d)||void 0}L(R,w,p={}){w.channelIds&&(R.channelIds=w.channelIds);w.siloName&&(R.siloName=w.siloName);w.params&&(R.params=w.params);p.botguardResponse&&(R.botguardResponse=p.botguardResponse);p.feature&&(R.clientFeature=p.feature)}};var U3d=class extends ur{O(){return mEI}get G(){return!0}C(R){return g.F(R,K2_)||void 0}L(R,w){w.channelIds&&(R.channelIds=w.channelIds);w.siloName&&(R.siloName=w.siloName);w.params&&(R.params=w.params)}};var Neb=class extends ur{constructor(R){super();this.J=R}O(){return fzl}C(R){return g.F(R,fRb)||g.F(R,Gtx)||g.F(R,rlb)}L(R,w){w.serializedShareEntity&&(R.serializedSharedEntity=w.serializedShareEntity);w.clientParamIdentifier&&this.J?.L(w.clientParamIdentifier)&&(R.clientParams=this.J.C(w.clientParamIdentifier))}};Neb[Cv]=[new Zi("SHARE_CLIENT_PARAMS_PROVIDER_TOKEN")];var gZd=class extends ur{O(){return Izr}get G(){return!0}C(R){return g.F(R,e8)||void 0}L(R,w,p){R.feedbackTokens=[];w.feedbackToken&&R.feedbackTokens.push(w.feedbackToken);if(w=w.cpn||p.cpn)R.feedbackContext={cpn:w};R.isFeedbackTokenUnencrypted=!!p.is_feedback_token_unencrypted;R.shouldMerge=!1;p.extra_feedback_tokens&&(R.shouldMerge=!0,R.feedbackTokens=R.feedbackTokens.concat(p.extra_feedback_tokens))}};var H9l=class extends ur{O(){return CQl}C(R){return g.F(R,O3P)||void 0}L(R,w){w.params&&(R.params=w.params);w.secondaryParams&&(R.secondaryParams=w.secondaryParams)}};var vZP=class extends ur{O(){return uvP}C(R){return g.F(R,ylY)||void 0}L(R,w){w.actions&&(R.actions=w.actions);w.params&&(R.params=w.params);w.playlistId&&(R.playlistId=w.playlistId)}};var S1P=class extends ur{O(){return GCb}C(R){return g.F(R,IRL)}L(R,w,p={}){w.serializedShareEntity&&(R.serializedSharedEntity=w.serializedShareEntity);p.includeListId&&(R.includeListId=!0)}};var Z6=new Zi("CLIENT_NAME_TOKEN");var YJ=new Zi("DEFAULT_STORE_EXPIRATION_TOKEN");var HYH=class{constructor(R,w){this.clientName=R;this.C=w}async put(R,w){w={...w.data};w.key=R;w.clientName=this.clientName;w.expireTimestampMs===void 0&&(w.expireTimestampMs=(Math.round((0,g.T)())+this.C).toString());return nZW(this,R,w)}};HYH[Cv]=[Z6,YJ];var d3D=class{constructor(R){this.data={...R};delete this.data.innertubeResponse?.frameworkUpdates}isExpired(){return Number(this.data.expireTimestampMs||0)<(0,g.T)()}isProcessed(){return!!this.data.isProcessed}};var QRP=class extends HYH{constructor(){super(...arguments);this.L=new Map}async get(R){return Z9d(this,R)}async remove(R){Y1_(this,R)}async removeAll(){this.L.forEach(R=>{clearTimeout(R.timer)}); this.L.clear()}has(R){return!!this.L.get(R)}zD(){return this.L.keys()}};var FF=new Zi("EPHEMERAL_STORE_TOKEN");var FsW=class{constructor(R){this.L=R.responseContext?.stateTags}};var hMx=class{constructor(R){this.L=R}handleResponse(R,w){if(!w)throw Error("request needs to be passed into StoreResponseProcessorService");XF(this,R,w.config?.Jz?.nE)}};hMx[Cv]=[FF];var jo=new Zi("STORE_RESPONSE_PROCESSOR_TOKEN");g.nV=class extends g.Id{constructor(R,...w){super(R,w);this.errorType=1;Object.setPrototypeOf(this,new.target.prototype)}};var i9H=class{constructor(R){this.L=R}async fetch(R,w,p,r){R=jR6(this,R,w);try{const f=await fetch(R);if(g.Y("web_unified_fetch")&&r&&f.ok&&f.body&&typeof f.body.getReader==="function"){const G=f.clone().body.getReader(),{value:I}=await G.read();G.cancel().catch(()=>{}); if(I&&I[0]===91){const C=f.body.pipeThrough(new TextDecoderStream).getReader();return J8D(this,C,new LK,[],r)}}return await this.handleResponse(f,p)}catch(f){if(g.AO(f),p?.oJ&&f instanceof g.nV&&f.errorType===1)throw f;}}handleResponse(R,w){let p;p=R.text().then(r=>{if(w?.Fu&&R.ok)return Co(w.Fu,r);r=r.replace(")]}'","");let f;if(w?.oJ&&r)try{f=JSON.parse(r)}catch(G){throw new g.nV("JSON parsing failed after fetch");}return f??JSON.parse(r)}); R.redirected||R.ok?this.L&&this.L.success():(this.L&&this.L.oN0(),p=p.then(r=>{g.AO(new g.Id("Error: API fetch failed",R.status,R.url,r));return{...r,errorMetadata:{status:R.status}}})); return p}};i9H[Cv]=[G4(new Zi("NETWORK_SLI_TOKEN"))];var Ter=new Zi("NETWORK_MANAGER_TOKEN");var dC;var p5I=class{constructor(R){this.L=R}bindInnertubeChallengeFetcher(R){this.L.bicf(R)}registerChallengeFetchedCallback(R){this.L.bcr(R)}getLatestChallengeResponse(){return this.L.blc()}};var GSI=[],fFx=(0,g.JJ)`https://static.doubleclick.net/instream/ad_status.js`,So=!1;var GQ=class{constructor(R,w,p){this.network=R;this.options=w;this.G=p;this.O=0;this.L=null;this.C=new cpd;w.mz?wP(this,C0H(this)):w.preload&&wP(this,new Promise(r=>{g.uq(0,()=>{r(fm(this))},0)}))}async J(){return!!await Promise.race([this.L, null])}async K(R,w,p){this.L===null&&wP(this,fm(this));let r=!1;const f={};return Promise.race([(async()=>{this.options.i$q&&this.options.mz&&await (await w5d())?.checkForRefresh();var G=await this.L;f.challenge=G.challenge;if(G.z3){var I={c:G.challenge,e:R,...w};try{r=!0;let C;(C=await G.z3.snapshot({OP:I}))?f.webResponse=C:f.error="ATTESTATION_ERROR_VM_NO_RESPONSE"}catch{f.error="ATTESTATION_ERROR_VM_INTERNAL_ERROR"}}else"c1a"in G.VQ&&(f.error="ATTESTATION_ERROR_VM_NOT_INITIALIZED");R==="ENGAGEMENT_TYPE_PLAYBACK"&& (G=G.VQ,I={},G.c6a&&(I.reportingStatus=String(Number(G.c)^Ri())),G.c6b&&(I.broadSpectrumDetectionResult=String(Number(G.c)^Number(g.n("CATSTAT",0)))),f.adblockReporting=I);return f})(), W6d(p,()=>{const G=Object.assign({},f);r&&(G.error="ATTESTATION_ERROR_VM_TIMEOUT");return G})])}};var Aod=["APP_STATE","PI"];var ZvW=[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 NhL=class{constructor(){var R=vxH;const w=hs(vSd());this.store=vf(R,void 0,w)}getState(){return this.store.getState()}dispatch(R){return this.store.dispatch(R)}subscribe(R){return this.store.subscribe(R)}replaceReducer(R){return this.store.replaceReducer(R)}[Symbol.observable](){return this.store[Symbol.observable]()}};var oi=class{constructor(R=[]){this.L=[];this.O=this.C=0;this.G=void 0;this.totalLength=0;R.forEach(w=>{this.append(w)})}K(){return this.totalLength}append(R){if(yod(this,R)){const w=this.L[this.L.length-1]; this.L[this.L.length-1]=new Uint8Array(w.buffer,w.byteOffset,w.length+R.length);Cm(this)}else this.L.push(R);this.totalLength+=R.length}split(R){const w=new oi,p=new oi;for(const r of this.L)R>=r.length?(w.append(r),R-=r.length):R?(w.append(new Uint8Array(r.buffer,r.byteOffset,R)),p.append(new Uint8Array(r.buffer,r.byteOffset+R,r.length-R)),R=0):p.append(r);return{wf:w,eY:p}}isFocused(R){return R>=this.O&&R{const R=r=>new Uint8Array(r),w=r=>{const f=new Uint8Array(r.length); for(let G=0;G>7&&283);wX=new Uint8Array(256);kr=NX(256);UA=NX(256);SW=NX(256);R3=NX(256);for(let I=0;I<256;I++){f=I?r[255^p[I]]:0;f^=f<<1^f<<2^f<<3^f<<4;f=f&255^f>>>8^99;wX[I]=f;w=f<<1^(f>>7&&283);var G=w^f;kr[I]=w<<24|f<<16|f<<8|G;UA[I]=G<<24|kr[I]>>>8;SW[I]=f<<24|UA[I]>>> 8;R3[I]=f<<24|SW[I]>>>8}kCH=!0}f=NX(44);for(p=0;p<4;p++)f[p]=R[4*p]<<24|R[4*p+1]<<16|R[4*p+2]<<8|R[4*p+3];for(r=1;p<44;p++)R=f[p-1],p%4||(R=(wX[R>>16&255]^r)<<24|wX[R>>8&255]<<16|wX[R&255]<<8|wX[R>>>24],r=r<<1^(r>>7&&283)),f[p]=f[p-4]^R;this.key=f}encrypt(R){const w=R.length;R=new Uint8Array(R.buffer.slice(R.byteOffset,R.byteOffset+w));const p=this.C;let r=0;for(;r{const R=r=>new Uint8Array(r),w=r=>{const f=new Uint8Array(r.length); for(let G=0;G=64&&(this.J.set(R.subarray(0,64-this.C),this.C),w=64-this.C,this.C=0,YF_(this,this.J,0));for(;w+64<=p;w+=64)YF_(this,R,w);w{const w=this.observers.indexOf(R);w>=0&&this.observers.splice(w,1)}}C(R){I8D(this,R.data)}Gy(){this.channel.close()}},yc;g.Qx("","downloadsPageViewConfigurationEntity");g.Qx("DOWNLOADS_LIST_ENTITY_ID_MANUAL_DOWNLOADS","mainDownloadsListEntity");g.sM=g.Qx("DOWNLOADS_LIST_ENTITY_ID_SMART_DOWNLOADS","mainDownloadsListEntity");g.Qx("DOWNLOADS_LIST_ENTITY_ID_SMART_DOWNLOADS","refresh");g.Qx("SMART_DOWNLOADS_ENABLED","settingEntity");var q2l=class{constructor(R,w){this.C=this.L=0;this.L=w.x-R.x;this.C=w.y-R.y}};var fnD=class{constructor(){this.L=new Map}};var E5_=new Zi("POSTMESSAGE_TUNNEL_TOKEN");var cDI=["www.youtube-nocookie.com","www.youtubeeducation.com","youtube.googleapis.com"],Gs_=class{constructor(){this.state=1;this.z3=null;this.ZI=void 0}initialize(R,w,p,r){this.ZI=r;if(R.program){var f;r=R.interpreterUrl??null;R.interpreterSafeScript?f=kC(R.interpreterSafeScript):f=R.interpreterScript??null;R.interpreterSafeUrl&&(r=UV(R.interpreterSafeUrl).toString());Msl(this,f,r,R.program,w,p)}else g.AO(Error("BL:CIP"))}isInitialized(){return this.C()}getState(){return this.state}isLoading(){return this.state=== 2}invoke(R={}){return this.C()?this.O({OP:R}):null}dispose(){this.L(null);this.kp(8)}C(){return!!this.z3}O(R){return this.z3.WA(R)}L(R){g.p5(this.z3);this.z3=R}kp(R){this.state=R}};var Inl=class extends Gs_{L(R){Oa()?.bgvma();if(R){const w={bgvma:R.dispose.bind(R),bgvmb:R.snapshot.bind(R),bgvmc:R.WA.bind(R)};g.AY("yt.abuse.playerAttLoader",w);P6(p=>R.snapshot(p))}else g.AY("yt.abuse.playerAttLoader",null),g.AY("yt.abuse.playerAttLoaderRun",null)}C(){return!!Oa()}O(R){return Oa().bgvmc(R)}};var eOd=class{constructor(R){this.Qm=R}Uk(){return"crossDeviceProgressCommand"}Nj(R){if(R.crossDevicePings){const w=[];for(const p of R.crossDevicePings)w.push({baseUrl:p.baseUrl});R={crossDevicePings:w,enableBatchedCrossDevicePings:!0};this.Qm.B.V().experiments.XB("relax_bg_notification_throttling")&&(R.relaxBgNotificationThrottling=!0);this.Qm.B.V().experiments.XB("relax_bg_notification_throttling_counterfactual")&&(R.relaxBgNotificationThrottlingCounterfactual=!0);g.Rv("crossDeviceNotificationTransfer", R)}}};var ON_=class{constructor(R,w){this.Dx=R;this.l9=w}Uk(){return"muteAdEndpoint"}Nj(R,w){switch(R.type){case "SKIP":PhD(this.Dx,this.l9,w)}}};var DcL=class{Uk(){return"openPopupAction"}Nj(){}};var Khb=class{Uk(){return"pingingEndpoint"}Nj(){}};var Z4H={clickTrackingParams:!0,commandMetadata:!0,loggingUrls:!0},y_d=class extends g.f5{constructor(R){super();this.C$=R;this.L=new Map;KH(this,"commandExecutorCommand",(w,p,r)=>{Xhd(this,w.commands,p,r)}); KH(this,"clickTrackingParams",()=>{})}};var Cir={Bb:"FINAL",Yr:"AD_BREAK_LENGTH",Fm:"AD_CPN",yZ:"AH",ZV:"AD_MT",QZ:"ASR",aC:"AW",wj:"NM",LQ:"NX",CQ:"NY",OH:"CONN",j3:"CPN",k0:"DV_VIEWABILITY",Xy:"ERRORCODE",C8:"ERROR_MSG",bd:"EI",c6:"GOOGLE_VIEWABILITY",ST:"IAS_VIEWABILITY",aZ:"LACT",v4:"LIVE_TARGETING_CONTEXT",C9:"I_X",xd:"I_Y",OG:"MT",I4:"MIDROLL_POS",K9:"MIDROLL_POS_MS",r6:"MOAT_INIT",ze:"MOAT_VIEWABILITY",md:"P_H",SZ:"PV_H",w6:"PV_W",Lq0:"P_W",x00:"TRIGGER_TYPE",eY0:"SDKV",rfn:"SLOT_POS",i_y:"SURVEY_LOCAL_TIME_EPOCH_S",lTk:"SURVEY_ELAPSED_MS", Md:"VIS",xlY:"VIEWABILITY",pyB:"VED",TBn:"VOL",OLB:"WT",REl:"YT_ERROR_CODE"};var E$P=class{constructor(R,w,p){this.uv=R;this.L=w;this.D$=p;IO(mE(),{VC:E5_,RT:fnD})}Uk(){return"urlEndpoint"}Nj(R,w,p){{var r=this.D$.get();const f=zA(r.C.get(),w);f?w=n2(r,Jz(f),f,void 0,void 0,p):(MY("Trying to ping from an unknown layout",void 0,void 0,{layoutId:w}),w={})}w={...w};BS(this.L,"h5_inplayer_enable_adcpn_macro_substitution_for_click_pings")&&(p=Ut(this.uv,2))&&(w.AD_CPN=p.clientPlaybackNonce);w=g.MG(R.url,w);R=g.b$(w,void 0,void 0,void 0,R.attributionSrcMode==="ATTRIBUTION_SRC_MODE_LABEL_CHROME"); D_I(R,w)}};var mW=class{constructor(R){this.value=R}get(){return this.value}},Ohd=class extends mW{L(){return"metadata_type_action_companion_ad_renderer"}},EBl=class extends mW{L(){return"metadata_type_top_banner_image_text_icon_buttoned_layout_view_model"}},Pj_=class extends mW{L(){return"metadata_type_ads_engagement_panel_renderer"}},aWd=class extends mW{L(){return"metadata_type_ads_engagement_panel_layout_view_model"}},FP=class extends mW{L(){return"metadata_type_ad_next_params"}},jS=class extends mW{L(){return"metadata_type_ad_video_clickthrough_endpoint"}}, z_d=class extends mW{L(){return"metadata_type_invideo_overlay_ad_renderer"}},$Tr=class extends mW{L(){return"metadata_type_image_companion_ad_renderer"}},XYW=class extends mW{L(){return"metadata_type_banner_image_layout_view_model"}},n0H=class extends mW{L(){return"metadata_type_shopping_companion_carousel_renderer"}},uDH=class extends mW{L(){return"metadata_type_ad_info_ad_metadata"}},sOP=class extends mW{L(){return"metadata_ad_video_is_listed"}},Hb=class extends mW{L(){return"metadata_type_ad_placement_config"}}, WL=class extends mW{L(){return"metadata_type_ad_pod_info"}},Yy=class extends mW{L(){return"metadata_type_ad_pod_skip_index"}},JR=class extends mW{L(){return"metadata_type_ad_pod_skip_target"}},XP=class extends mW{L(){return"metadata_type_ad_pod_skip_target_callback_ref"}},BL=class extends mW{L(){return"metadata_type_ad_video_id"}},GR=class extends mW{L(){return"metadata_type_content_cpn"}},mv=class extends mW{L(){return"metadata_type_instream_ad_player_overlay_renderer"}},zR=class extends mW{L(){return"metadata_type_player_overlay_layout_renderer"}}, Ce_=class extends mW{L(){return"metadata_type_player_underlay_renderer"}},FL_=class extends mW{L(){return"metadata_type_player_underlay_ad_slot_renderer"}},Txd=class extends mW{L(){return"metadata_type_media_associated_in_player_slot"}},B1b=class extends mW{L(){return"metadata_type_shrunken_player_bytes_config"}},gvI=class extends mW{L(){return"metadata_type_ad_action_interstitial_renderer"}},zo_=class extends mW{L(){return"metadata_type_valid_survey_text_interstitial_renderer"}},ihl=class extends mW{L(){return"METADATA_TYPE_VALID_INSTREAM_SURVEY_AD_RENDERER_FOR_DAI"}}, XeD=class extends mW{L(){return"METADATA_TYPE_VALID_INSTREAM_SURVEY_AD_RENDERER_FOR_VOD"}},YnP=class extends mW{L(){return"metadata_type_sliding_text_player_overlay_renderer"}},cL=class extends mW{L(){return"metadata_type_linked_player_bytes_layout_id"}},h7b=class extends mW{L(){return"metadata_type_linked_second_player_bytes_layout_id"}},Zg=class extends mW{L(){return"metadata_type_linked_in_player_layout_id"}},QC=class extends mW{L(){return"metadata_type_linked_in_player_layout_type"}},ZXW=class extends mW{L(){return"metadata_type_linked_in_player_slot_id"}}, r9d=class extends mW{L(){return"metadata_type_player_bytes_callback"}},qM=class extends mW{L(){return"metadata_type_player_bytes_callback_ref"}},w$=class extends mW{constructor(){super({current:null})}L(){return"metadata_type_player_bytes_layout_controls_callback_ref"}},o0Y=class extends mW{L(){return"metadata_type_sub_layouts"}},ZiH=class extends mW{L(){return"metadata_type_cue_point"}},EE=class extends mW{L(){return"metadata_type_triggering_cue_point"}},II=class extends mW{L(){return"metadata_type_video_length_seconds"}}, Cz=class extends mW{L(){return"metadata_type_player_vars"}},jdH=class extends mW{L(){return"metadata_type_preload_player_vars"}},Lz=class extends mW{L(){return"metadata_type_sodar_extension_data"}},u7=class extends mW{L(){return"metadata_type_layout_enter_ms"}},sE=class extends mW{L(){return"metadata_type_layout_exit_ms"}},yC=class extends mW{L(){return"metadata_type_media_sub_layout_index"}},AR=class extends mW{constructor(){super({})}L(){return"metadata_type_dai"}},XPY=class extends mW{constructor(){super({})}L(){return"metadata_type_ad_intro"}}, SPP=class extends mW{L(){return"metadata_type_client_forecasting_ad_renderer"}},l7=class extends mW{L(){return"metadata_type_drift_recovery_ms"}},gZ=class extends mW{L(){return"metadata_type_fulfilled_layout"}},AjP=class extends mW{L(){return"metadata_type_ad_break_request_data"}},LP6=class extends mW{L(){return"metadata_type_ad_break_response_data"}},TR=class extends mW{L(){return"metadata_type_remote_slots_data"}},wZ=class extends mW{L(){return"METADATA_TYPE_MEDIA_LAYOUT_DURATION_seconds"}},i7= class extends mW{L(){return"METADATA_TYPE_MEDIA_BREAK_LAYOUT_DURATION_MILLISECONDS"}},Jxr=class extends mW{L(){return"metadata_type_legacy_info_card_vast_extension"}},A9d=class extends mW{L(){return"metadata_type_valid_ad_message_renderer"}},pz=class extends mW{L(){return"METADATA_TYPE_INTERACTIONS_AND_PROGRESS_LAYOUT_COMMANDS"}},bXd=class extends mW{L(){return"metadata_type_served_from_live_infra"}},wPL=class extends mW{L(){return"metadata_type_survey_overlay"}},b7=class extends mW{L(){return"metadata_type_active_view_traffic_type"}}, NxH=class extends mW{L(){return"metadata_type_active_view_identifier"}},MQI=class extends mW{L(){return"metadata_type_ssdai_ads_config"}},bhL=class extends mW{constructor(){super(!0)}L(){return"metadata_type_allow_pause_ad_break_request_slot_reschedule"}},Dg=class extends mW{L(){return"metadata_type_player_bytes_slot_metadata"}},cxP=class extends mW{constructor(){super({})}L(){return"metadata_type_prefetch_metadata"}};var wZl=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 E0=()=>"",COD=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 wJ=class extends ZL{constructor(R,w,p,r=!1){super(R);this.zw=p;this.FS=r;this.args=[];w&&this.args.push(w)}};var Q=class extends ZL{constructor(R,w,p,r=!1){super(R);this.zw=p;this.FS=r;this.args=[];w&&this.args.push(w)}};var dX=class{constructor(R){const w=new Map;R.forEach(p=>{w.set(p.L(),p)}); this.L=w}FB(R){R=this.L.get(R);if(R!==void 0)return R.get()}};new Promise(()=>{});var JD_=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"]]),FRx=new Map([["normal",{jm:"ADS_CLIENT_EVENT_TYPE_NORMAL_EXIT_LAYOUT_REQUESTED",YL:"ADS_CLIENT_EVENT_TYPE_LAYOUT_EXITED_NORMALLY"}],["skipped",{jm:"ADS_CLIENT_EVENT_TYPE_SKIP_EXIT_LAYOUT_REQUESTED",YL:"ADS_CLIENT_EVENT_TYPE_LAYOUT_EXITED_SKIP"}], ["muted",{jm:"ADS_CLIENT_EVENT_TYPE_MUTE_EXIT_LAYOUT_REQUESTED",YL:"ADS_CLIENT_EVENT_TYPE_LAYOUT_EXITED_MUTE"}],["abandoned",{jm:"ADS_CLIENT_EVENT_TYPE_ABANDON_EXIT_LAYOUT_REQUESTED",YL:"ADS_CLIENT_EVENT_TYPE_LAYOUT_EXITED_ABANDON"}],["user_input_submitted",{jm:"ADS_CLIENT_EVENT_TYPE_USER_INPUT_SUBMITTED_EXIT_LAYOUT_REQUESTED",YL:"ADS_CLIENT_EVENT_TYPE_LAYOUT_EXITED_USER_INPUT_SUBMITTED"}],["user_cancelled",{jm:"ADS_CLIENT_EVENT_TYPE_USER_CANCELLED_EXIT_LAYOUT_REQUESTED",YL:"ADS_CLIENT_EVENT_TYPE_LAYOUT_EXITED_USER_CANCELLED"}], ["error",{jm:"ADS_CLIENT_EVENT_TYPE_ABORTED_EXIT_LAYOUT_REQUESTED",YL:"ADS_CLIENT_EVENT_TYPE_LAYOUT_EXITED_ABORTED"}]]),z$=class{constructor(R){this.BS=R;R=Math.random();var w=this.BS.get();w=g.Iq(w.B.V().experiments,"html5_debug_data_log_probability");w=Number.isFinite(w)&&w>=0&&w<=1?w:0;this.L=R{g.p5(this.instance);this.instance=null})}get(){Math.random()<.001&&this.cS()&&MY("Tried to retrieve object during dispose",void 0,void 0,{type:typeof this.instance}); this.instance||(this.instance=this.L());return this.instance}};var CdD=class extends g.f5{constructor(R){super();this.L=R;this.C=WPl(this)}O(){return this.C}};var Bl=class{constructor(R){this.L=R}executeCommand(R,w){Ea(this.L(),R,w)}};var uTY=class{constructor(){this.listeners=new Set}addListener(R){this.listeners.add(R)}removeListener(R){this.listeners.delete(R)}};var Wl=class{constructor(R){this.BS=R}};var sSI=class{constructor(R,w,p,r,f){this.callback=R;this.slot=w;this.C=p;this.L3=r;this.BS=f;this.L=null}};var Vl={AD_MARKER:"ytp-ad-progress",CHAPTER_MARKER:"ytp-chapter-marker",TIME_MARKER:"ytp-time-marker"};var f3I=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/)"),bK6=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]+)?/)"), Gf_=RegExp("^https?://(www\\.google\\.com/pagead/xsul|www\\.youtube\\.com/pagead/slav)"),DGd=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)|$))"), KPI=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)|$))"),oMW=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/)"), I3d=RegExp("^https?.*#ocr$|^https?://(aksecure\\.imrworldwide\\.com/|cdn\\.imrworldwide\\.com/|secure\\-..\\.imrworldwide\\.com/)"),t6l=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)"),V6d=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/.*$)"), mhI=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)"), zUW=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)"), BTd=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 WXW;g.Ja=class{constructor(R,w,p={}){this.start=R;this.end=w;this.active=!0;this.color="";this.C=WXW++;this.id=p.id||"";this.priority=p.priority||9;this.visible=p.visible||!1;this.style=p.style||Vl.AD_MARKER;this.namespace=p.namespace||"";if(R=p.color)R=R.toString(16),this.color=`#${Array(7-R.length).join("0")}${R}`;this.tooltip=p.tooltip;this.icons=p.icons?p.icons.filter(r=>g.kb(r.thumbnails,f=>g.L2(f.url))):null; this.associatedClipId=p.associatedClipId;this.markerPositionMs=p.markerPositionMs;this.visible=this.visible;this.style=this.style;this.start=this.start}getId(){return this.id}toString(){return"CueRange{"+this.namespace+":"+this.id+"}["+cfl(this.start)+", "+cfl(this.end)+"]"}contains(R,w){return R>=this.start&&(R{const w=this.slot.clientMetadata.FB("metadata_type_ad_break_request_data");R=Date.now();Po(this.D$.get(),"abrs",`ct.${R};cmt.${this.s0.get().getCurrentTimeSec(1,!1)};sid.${this.slot.slotId};`);return this.C.get().fetch({XZ:w.getAdBreakUrl,Zc:new g.Ja(w.cH,w.F3),n6:this.slot.clientMetadata.FB("metadata_type_cue_point"),cueProcessedMs:w.cueProcessedMs})}, ()=>{acl(this)},w=>{var p=Date.now()-R; Po(this.D$.get(),"abrr",`ct.${(new Date).getTime()};cmt.${this.s0.get().getCurrentTimeSec(1,!1)};l.${p.toString()};sid.${this.slot.slotId};`);p=w.YO;p.length>=2&&w.ssdaiAdsConfig&&MY("Unexpected ad placement renderers length",this.slot,null,{length:p.length});w.adSlots?.some(r=>g.F(r,xN)?.adSlotMetadata?.slotType==="SLOT_TYPE_PLAYER_BYTES")||p.some(r=>!!r.renderer?.linearAdSequenceRenderer?.linearAds?.length||!!r.renderer?.instreamVideoAdRenderer)||acl(this)})}Gj(){Afd(this.L)}};var lnd=class{constructor(R,w,p,r,f,G){this.slot=w;this.L=p;this.C=new sSI(R,w,r,f,G)}MC(){q4d(this.C,()=>{const R=this.slot.clientMetadata.FB("metadata_type_ad_break_request_data");return R.cueProcessedMs?this.L.get().fetch({XZ:R.getAdBreakUrl,Zc:new g.Ja(R.cH,R.F3),cueProcessedMs:R.cueProcessedMs}):this.L.get().fetch({XZ:R.getAdBreakUrl,Zc:new g.Ja(R.cH,R.F3)})})}Gj(){Afd(this.C)}};var LXd=class{constructor(R,w){this.callback=R;this.slot=w}MC(){var R=this.slot.clientMetadata;R=this.slot.fulfilledLayout??R.FB("metadata_type_fulfilled_layout");H4d(this.callback,this.slot,R)}Gj(){R1(this.callback,this.slot,new Q(`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 qex=class{build(R,w){return w.fulfilledLayout||o1(w,{sy:["metadata_type_fulfilled_layout"]})?new LXd(R,w):this.O(R,w)}};var xl=class extends qex{constructor(R,w,p,r,f,G,I){super();this.L=R;this.C=w;this.L3=p;this.BS=r;this.D$=f;this.s0=G;this.V2=I}O(R,w){if(o1(w,{sy:["metadata_type_ad_break_request_data","metadata_type_cue_point"],slotType:"SLOT_TYPE_AD_BREAK_REQUEST"}))return new xhr(R,w,this.L,this.C,this.L3,this.BS,this.D$,this.s0,this.V2);if(o1(w,{sy:["metadata_type_ad_break_request_data"],slotType:"SLOT_TYPE_AD_BREAK_REQUEST"}))return new lnd(R,w,this.L,this.C,this.L3,this.BS);throw new Q(`Unsupported slot with type: ${w.slotType} and client metadata: ${cz(w.clientMetadata)} in `+ "AdBreakRequestSlotFulfillmentAdapterFactory.");}};var lr=class extends qex{O(R,w){throw new Q(`Unsupported slot with type: ${w.slotType} and client metadata: ${cz(w.clientMetadata)} in `+"DefaultFulfillmentAdapterFactory.");}};var Aed=class{constructor(R,w,p,r,f,G){this.callback=R;this.slot=w;this.layout=p;this.O=r;this.L=f;this.C=G}h2(){return this.slot}xB(){return this.layout}init(){}release(){}startRendering(R){if(R.layoutId!==this.layout.layoutId)this.callback.qO(this.slot,R,new wJ("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 w=R.clientMetadata.FB("metadata_type_ad_break_response_data");this.slot.slotType==="SLOT_TYPE_AD_BREAK_REQUEST"?(this.callback.zK(this.slot,R),ByY(this.O,this.slot,w)):MY("Unexpected slot type in AdBreakResponseLayoutRenderingAdapter - this should never happen",this.slot,R)}}Fn(R,w){R.layoutId!==this.layout.layoutId?this.callback.qO(this.slot,R,new wJ("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.mU(this.slot,R,w),XZH(this),nMI(this))}};var brP=class{constructor(R,w,p){this.L=R;this.slot=w;this.layout=p}};var Lf=class extends g.HC{constructor(R,w,p,r){super();this.callback=R;this.O=r;this.L=[];this.C=new brP(R,w,p)}h2(){return this.C.slot}xB(){return this.C.layout}get slot(){return this.C.slot}get layout(){return this.C.layout}init(){this.O.get().addListener(this)}release(){this.O.get().removeListener(this);this.dispose()}H3(){}R1(){}v3(){}n7(){}startRendering(R){Et(this.C,R,()=>void this.cZ())}cZ(){this.O.get().cZ(this.L)}Fn(R,w){Et(this.C,R,()=>{var p=this.O.get(); W5L(p,this.L,3);this.L=[];this.callback.mU(this.slot,R,w)})}Gy(){this.O.cS()||this.O.get().removeListener(this); super.Gy()}};var Jn=class{constructor(R,w,p,r,f=null){this.O=R;this.D$=w;this.layoutId=r;this.G=0;this.J=null;this.K=void 0;this.L=new Set;this.C=Array.from(this.O.get("progress")||[]);this.C.sort((G,I)=>(G.offsetMilliseconds||0)-(I.offsetMilliseconds||0)); this.D={adPlacementConfig:p,x9:f}}Lv(R,w=!1){const p=(this.O.get(R)||[]).concat();if(w=w&&ZK6(R)){const r=this.O.get(w);r&&p.push(...r)}dJ(this,R,p);this.L.add(R);w&&this.L.add(w)}Nr(R,w=!1){if(!this.L.has(R)){var p=w&&ZK6(R);p&&(w=!this.L.has(p));this.Lv(R,w)}}};var yeY=class extends j8{constructor(R,w,p,r,f){super("ads-engagement-panel-layout",R,w,p,r,f)}};var VJx=class extends Lf{constructor(R,w,p,r,f,G,I){super(R,w,p,r);this.D$=f;this.sC=G;this.J=I;this.Ik=!0;this.G=null;this.K=p.clientMetadata.FB("metadata_type_linked_player_bytes_layout_id");Zj(this.sC(),this);R=p.clientMetadata.FB("metadata_type_ad_placement_config");this.Al=new Jn(p.Ig,this.D$,R,p.layoutId)}xF(R,w){cS("ads-engagement-panel-layout",R,this.J.get().MJ,this.D$.get(),this.G,this.K,this.h2(),this.xB(),w)}startRendering(R){ev(this.Al,this.h2(),this.xB(),g.F(this.xB().renderingContent, Nm),this.callback,"metadata_type_ads_engagement_panel_layout_view_model",(w,p,r,f,G)=>new yeY(w,p,r,f,G),this.L); super.startRendering(R)}zK(R,w){this.K===w.layoutId&&(this.G===null?this.G=this.D$.get().h3():MY("OnLayoutEntered should set engagePingCallback, but it was not null",this.slot,this.layout))}mU(){}VB(){}HK(){}vK(){}DZ(){}yL(){}Rk(){}VG(){}BK(){}hF(){}Rh(){}Gy(){YV(this.sC(),this);super.Gy()}};var oRd=class extends j8{constructor(R,w,p,r,f){super("banner-image",R,w,p,r,f)}};var tJd=class extends Lf{constructor(R,w,p,r,f,G,I){super(R,w,p,r);this.D$=f;this.sC=G;this.J=I;this.Ik=!0;this.G=null;this.K=p.clientMetadata.FB("metadata_type_linked_player_bytes_layout_id");Zj(this.sC(),this);this.adPlacementConfig=p.clientMetadata.FB("metadata_type_ad_placement_config");this.Al=new Jn(p.Ig,this.D$,this.adPlacementConfig,p.layoutId)}xF(R,w){cS("banner-image",R,this.J.get().MJ,this.D$.get(),this.G,this.K,this.h2(),this.xB(),w)}startRendering(R){ev(this.Al,this.h2(),this.xB(),g.F(this.xB().renderingContent, Ho),this.callback,"metadata_type_banner_image_layout_view_model",(w,p,r,f,G)=>new oRd(w,p,r,f,G),this.L); super.startRendering(R)}zK(R,w){this.K===w.layoutId&&(this.G===null?this.G=this.D$.get().h3():MY("OnLayoutEntered should set engagePingCallback, but it was not null",this.slot,this.layout))}mU(){}VB(){}HK(){}vK(){}DZ(){}yL(){}Rk(){}VG(){}BK(){}hF(){}Rh(){}Gy(){YV(this.sC(),this);super.Gy()}};var OrH=class extends j8{constructor(R,w,p,r,f){super("action-companion",R,w,p,r,f)}};var KX6=class extends Lf{constructor(R,w,p,r,f,G,I){super(R,w,p,r);this.D$=f;this.sC=G;this.J=I;this.Ik=!0;this.G=null;this.K=p.clientMetadata.FB("metadata_type_linked_player_bytes_layout_id");Zj(this.sC(),this);R=p.clientMetadata.FB("metadata_type_ad_placement_config");this.Al=new Jn(p.Ig,this.D$,R,p.layoutId)}xF(R,w){cS("action-companion",R,this.J.get().MJ,this.D$.get(),this.G,this.K,this.h2(),this.xB(),w)}startRendering(R){ev(this.Al,this.h2(),this.xB(),g.F(this.xB().renderingContent,Qt),this.callback, "metadata_type_action_companion_ad_renderer",(w,p,r,f,G)=>new OrH(w,p,r,f,G),this.L); super.startRendering(R)}zK(R,w){w.layoutId===this.layout.layoutId?this.Al.Nr("impression"):this.K===w.layoutId&&(this.G===null?this.G=this.D$.get().h3():MY("OnLayoutEntered should set engagePingCallback, but it was not null",this.slot,this.layout))}mU(){}VB(){}HK(){}vK(){}DZ(){}yL(){}Rk(){}VG(){}BK(){}hF(){}Rh(){}Gy(){YV(this.sC(),this);super.Gy()}};var ERd=class extends j8{constructor(R,w,p,r,f){super("image-companion",R,w,p,r,f)}};var DhH=class extends Lf{constructor(R,w,p,r,f,G,I){super(R,w,p,r);this.D$=f;this.sC=G;this.J=I;this.Ik=!0;this.G=null;this.K=p.clientMetadata.FB("metadata_type_linked_player_bytes_layout_id");Zj(this.sC(),this);R=p.clientMetadata.FB("metadata_type_ad_placement_config");this.Al=new Jn(p.Ig,this.D$,R,p.layoutId)}xF(R,w){cS("image-companion",R,this.J.get().MJ,this.D$.get(),this.G,this.K,this.h2(),this.xB(),w)}startRendering(R){ev(this.Al,this.h2(),this.xB(),g.F(this.xB().renderingContent,hn),this.callback, "metadata_type_image_companion_ad_renderer",(w,p,r,f,G)=>new ERd(w,p,r,f,G),this.L); super.startRendering(R)}zK(R,w){w.layoutId===this.layout.layoutId?this.Al.Nr("impression"):this.K===w.layoutId&&(this.G===null?this.G=this.D$.get().h3():MY("OnLayoutEntered should set engagePingCallback, but it was not null",this.slot,this.layout))}mU(){}VB(){}HK(){}vK(){}DZ(){}yL(){}Rk(){}VG(){}BK(){}hF(){}Rh(){}Gy(){YV(this.sC(),this);super.Gy()}};var eU_=class extends j8{constructor(R,w,p,r,f){super("shopping-companion",R,w,p,r,f)}};var MJx=class extends Lf{constructor(R,w,p,r,f,G,I){super(R,w,p,r);this.D$=f;this.sC=G;this.J=I;this.Ik=!0;this.G=null;this.K=p.clientMetadata.FB("metadata_type_linked_player_bytes_layout_id");Zj(this.sC(),this);R=p.clientMetadata.FB("metadata_type_ad_placement_config");this.Al=new Jn(p.Ig,this.D$,R,p.layoutId)}xF(R,w){cS("shopping-companion",R,this.J.get().MJ,this.D$.get(),this.G,this.K,this.h2(),this.xB(),w)}startRendering(R){ev(this.Al,this.h2(),this.xB(),void 0,this.callback,"metadata_type_shopping_companion_carousel_renderer", (w,p,r,f,G)=>new eU_(w,p,r,f,G),this.L); super.startRendering(R)}zK(R,w){w.layoutId===this.layout.layoutId?this.Al.Nr("impression"):this.K===w.layoutId&&(this.G===null?this.G=this.D$.get().h3():MY("OnLayoutEntered should set engagePingCallback, but it was not null",this.slot,this.layout))}mU(){}VB(){}HK(){}vK(){}DZ(){}yL(){}Rk(){}VG(){}BK(){}hF(){}Rh(){}Gy(){YV(this.sC(),this);super.Gy()}};var qO=class{constructor(R,w,p,r){this.YB=R;this.layoutId=p;this.K=r;this.C=[];this.L=[];this.O=this.G=0;for(const f of w)switch(f.adVideoOffset?.kind){case "AD_VIDEO_PROGRESS_KIND_PERCENT":(f.adVideoOffset?.kind!=="AD_VIDEO_PROGRESS_KIND_PERCENT"?0:f.adVideoOffset?.percent!=null)?this.C.push(f):MY("Invalid AdVideoProgressPercentCommand");break;case "AD_VIDEO_PROGRESS_KIND_MILLISECONDS":(f.adVideoOffset?.kind!=="AD_VIDEO_PROGRESS_KIND_MILLISECONDS"?0:f.adVideoOffset?.milliseconds!=null&&!isNaN(Number(f.adVideoOffset.milliseconds)))? this.L.push(f):MY("Invalid AdVideoProgressMillisecondsCommand");break;default:MY("Unknown or invalid AdVideoProgressOffSet kind")}this.C.sort((f,G)=>f.adVideoOffset.percent-G.adVideoOffset.percent); this.L.sort((f,G)=>Number(f.adVideoOffset.milliseconds)-Number(G.adVideoOffset.milliseconds))}};var cer=class extends Lf{constructor(R,w,p,r,f,G){super(R,w,p,r);this.D$=f;this.sC=G;this.Ik=!0;Zj(this.sC(),this);R=p.clientMetadata.FB("metadata_type_ad_placement_config");this.Al=new Jn(p.Ig,this.D$,R,p.layoutId)}startRendering(R){ev(this.Al,this.h2(),this.xB(),void 0,this.callback,"metadata_type_action_companion_ad_renderer",(w,p,r,f,G)=>new OrH(w,p,r,f,G),this.L); super.startRendering(R)}zK(){}mU(){}VB(){}HK(){}vK(){}DZ(){}yL(){}Rk(){}VG(){}BK(){}hF(){}Rh(){}Gy(){YV(this.sC(),this);super.Gy()}xF(){}};var Pd6=class{constructor(R,w,p,r,f,G,I,C){this.callback=R;this.slot=w;this.layout=p;this.s0=r;this.D$=f;this.BS=I;this.kB=C;this.L=!1;R=p.clientMetadata.FB("metadata_type_ad_placement_config");this.Al=new Jn(p.Ig,this.D$,R,p.layoutId);R=this.layout.clientMetadata.FB("METADATA_TYPE_INTERACTIONS_AND_PROGRESS_LAYOUT_COMMANDS")?.progressCommands||[];const u=p.clientMetadata.FB("METADATA_TYPE_MEDIA_LAYOUT_DURATION_seconds");this.C=new qO(G,R,p.layoutId,()=>u*1E3)}h2(){return this.slot}xB(){return this.layout}init(){this.s0.get().addListener(this); this.s0.get().Xx.push(this);const R=this.layout.clientMetadata.FB("metadata_type_video_length_seconds"),w=this.layout.clientMetadata.FB("metadata_type_active_view_traffic_type");PS(this.layout.Ig)&&Yz(this.kB.get(),this.layout.layoutId,{I7:w,V0:R,listener:this})}release(){this.s0.get().removeListener(this);uNr(this.s0.get(),this);PS(this.layout.Ig)&&FN(this.kB.get(),this.layout.layoutId)}startRendering(R){this.callback.zK(this.slot,R)}Fn(R,w){dcd(this.BS.get())&&!this.L&&(this.Al.Nr("abandon"),this.L= !0);this.callback.mU(this.slot,R,w)}yf(R){switch(R.id){case "part2viewed":this.Al.Nr("start");this.Al.Nr("impression");break;case "videoplaytime25":this.Al.Nr("first_quartile");break;case "videoplaytime50":this.Al.Nr("midpoint");break;case "videoplaytime75":this.Al.Nr("third_quartile");break;case "videoplaytime100":dcd(this.BS.get())?this.L||(this.Al.Nr("complete"),this.L=!0):this.Al.Nr("complete");jv(this.Al)&&Yc(this.Al,Infinity,!0);ZN_(this.BS.get())&&J6(this.C,Infinity,!0);break;case "engagedview":jv(this.Al)|| this.Al.Nr("progress");break;case "conversionview":case "videoplaybackstart":case "videoplayback2s":case "videoplayback10s":break;default:MY("Cue Range ID unknown in DiscoveryLayoutRenderingAdapter",this.slot,this.layout)}}onVolumeChange(){}DJ(){}jL(){}nS(){}onFullscreenToggled(){}OR(){}HF(){}iN(R){ZN_(this.BS.get())&&J6(this.C,R*1E3,!1);jv(this.Al)&&Yc(this.Al,R*1E3,!1)}oa(){}qR(){this.Al.Nr("active_view_measurable")}vT(){this.Al.Nr("active_view_viewable")}dA(){this.Al.Nr("active_view_fully_viewable_audible_half_duration")}uq(){this.Al.Nr("audio_measurable")}aS(){this.Al.Nr("audio_audible")}};var CGr=class extends Lf{constructor(R,w,p,r,f,G){super(R,w,p,r);this.s0=f;this.K=G;this.G=!1}init(){super.init();const R=this.layout.clientMetadata.FB("metadata_type_instream_ad_player_overlay_renderer"),w={adsClientData:this.layout.UQ};this.L.push(new S8(R,this.layout.layoutId,this.layout.clientMetadata.FB("METADATA_TYPE_MEDIA_LAYOUT_DURATION_seconds"),w,!0))}Z6(){this.G||this.s0.get().resumeVideo(1)}startRendering(R){super.startRendering(R);hz(this.s0.get(),"ad-showing");this.callback.zK(this.slot, R);this.K.fU=this}Fn(R,w){super.Fn(R,w);HJ(this.s0.get(),"ad-showing");LT(this.K,this)}xF(R){switch(R){case "ad-info-icon-button":(this.G=this.s0.get().BN(1))||this.s0.get().pauseVideo();break;case "visit-advertiser":this.s0.get().pauseVideo()}}Gy(){super.Gy()}};var anx=class extends j8{constructor(R,w,p,r,f){super("top-banner-image-text-icon-buttoned",R,w,p,r,f)}};var $hW=class extends Lf{constructor(R,w,p,r,f,G){super(R,w,p,r);this.D$=f;this.sC=G;this.Ik=!0;Zj(this.sC(),this);R=p.clientMetadata.FB("metadata_type_ad_placement_config");this.Al=new Jn(p.Ig,this.D$,R,p.layoutId)}startRendering(R){ev(this.Al,this.h2(),this.xB(),void 0,this.callback,"metadata_type_top_banner_image_text_icon_buttoned_layout_view_model",(w,p,r,f,G)=>new anx(w,p,r,f,G),this.L); super.startRendering(R)}zK(){}mU(){}VB(){}HK(){}vK(){}DZ(){}yL(){}Rk(){}VG(){}BK(){}hF(){}Rh(){}Gy(){YV(this.sC(),this);super.Gy()}xF(){}};var XHI=class extends j8{constructor(R,w,p){super("display-underlay-text-grid-cards",R,{},w,p);this.interactionLoggingClientData=p}};var nRd=class extends Lf{constructor(R,w,p,r,f,G){super(R,w,p,r);this.D$=f;this.G=G;this.K=this.layout.clientMetadata.FB("metadata_type_linked_player_bytes_layout_id")}init(){super.init();this.L.push(new XHI(g.F(this.layout.renderingContent,zg),this.layout.layoutId,{adsClientData:this.layout.UQ}))}xF(){mT(this.G.get(),this.K)&&M7(this.D$.get(),3)}startRendering(R){super.startRendering(R);this.callback.zK(this.slot,R)}Gy(){super.Gy()}};var Ah=class extends j8{constructor(R,w,p,r){super("ad-action-interstitial",R,w,p,r);this.interactionLoggingClientData=r;this.YQ=this.GO=!0}};var GX_=class extends Lf{constructor(R,w,p,r,f){super(R,w,p,r);R=p.clientMetadata.FB("metadata_type_ad_placement_config");this.Al=new Jn(p.Ig,f,R,p.layoutId)}init(){super.init();const R=g.F(this.layout.renderingContent,gJ)||this.layout.clientMetadata.FB("metadata_type_ad_action_interstitial_renderer"),w=DT(this.Al);this.L.push(new Ah(R,w,this.layout.layoutId,{adsClientData:this.layout.UQ}))}startRendering(R){super.startRendering(R);this.callback.zK(this.slot,R)}xF(R,w){if(w===this.layout.layoutId)switch(R){case "skip-button":(R= this.layout.clientMetadata.FB("metadata_type_ad_pod_skip_target_callback_ref")?.current)&&OU(R,this.h2(),this.layout)}}Gy(){super.Gy()}};var br=class{constructor(R,w,p){this.C=R;this.O=w;this.L=p}build(R,w,p,r){if(TE(r,{sy:["metadata_type_ad_break_response_data"],Iq:["LAYOUT_TYPE_AD_BREAK_RESPONSE","LAYOUT_TYPE_THROTTLED_AD_BREAK_RESPONSE"]}))return new Aed(R,p,r,this.C,this.O,this.L);throw new wJ(`Unsupported layout with type: ${r.layoutType} and client metadata: ${cz(r.clientMetadata)} in `+"AdBreakRequestLayoutRenderingAdapterFactory.");}};var dh6=class extends j8{constructor(R,w,p,r,f){super("ads-engagement-panel",R,w,p,r,f)}};var Zrd=class extends Lf{constructor(R,w,p,r,f,G,I){super(R,w,p,r);this.D$=f;this.sC=G;this.J=I;this.Ik=!0;this.G=null;this.K=p.clientMetadata.FB("metadata_type_linked_player_bytes_layout_id");Zj(this.sC(),this);R=p.clientMetadata.FB("metadata_type_ad_placement_config");this.Al=new Jn(p.Ig,this.D$,R,p.layoutId)}xF(R,w){cS("ads-engagement-panel",R,this.J.get().MJ,this.D$.get(),this.G,this.K,this.h2(),this.xB(),w)}startRendering(R){ev(this.Al,this.h2(),this.xB(),g.F(this.xB().renderingContent,gS),this.callback, "metadata_type_ads_engagement_panel_renderer",(w,p,r,f,G)=>new dh6(w,p,r,f,G),this.L); super.startRendering(R)}zK(R,w){w.layoutId===this.layout.layoutId?this.Al.Nr("impression"):this.K===w.layoutId&&(this.G===null?this.G=this.D$.get().h3():MY("OnLayoutEntered should set engagePingCallback, but it was not null",this.slot,this.layout))}mU(){}VB(){}HK(){}vK(){}DZ(){}yL(){}Rk(){}VG(){}BK(){}hF(){}Rh(){}Gy(){YV(this.sC(),this);super.Gy()}};var YeY=class extends Lf{constructor(R,w,p,r,f,G,I){super(R,w,p,r);this.D$=f;this.sC=G;this.J=I;this.Ik=!0;this.G=null;this.K=p.clientMetadata.FB("metadata_type_linked_player_bytes_layout_id");Zj(this.sC(),this);this.adPlacementConfig=p.clientMetadata.FB("metadata_type_ad_placement_config");this.Al=new Jn(p.Ig,this.D$,this.adPlacementConfig,p.layoutId)}xF(R,w){cS("top-banner-image-text-icon-buttoned",R,this.J.get().MJ,this.D$.get(),this.G,this.K,this.h2(),this.xB(),w)}startRendering(R){ev(this.Al, this.h2(),this.xB(),g.F(this.xB().renderingContent,vo),this.callback,"metadata_type_top_banner_image_text_icon_buttoned_layout_view_model",(w,p,r,f,G)=>new anx(w,p,r,f,G),this.L); super.startRendering(R)}zK(R,w){this.K===w.layoutId&&(this.G===null?this.G=this.D$.get().h3():MY("OnLayoutEntered should set engagePingCallback, but it was not null",this.slot,this.layout))}mU(){}VB(){}HK(){}vK(){}DZ(){}yL(){}Rk(){}VG(){}BK(){}hF(){}Rh(){}Gy(){YV(this.sC(),this);super.Gy()}};var FXb=class{constructor(R,w,p,r,f){this.rB=R;this.D$=w;this.sC=p;this.L=r;this.kB=f}build(R,w,p,r){if(TE(r,vMd())||g.F(r.renderingContent,gS)!==void 0)return new Zrd(R,p,r,this.rB,this.D$,this.sC,this.L);if(TE(r,Tfl())||g.F(r.renderingContent,Qt)!==void 0)return new KX6(R,p,r,this.rB,this.D$,this.sC,this.L);if(TE(r,iK_())||g.F(r.renderingContent,hn)!==void 0)return new DhH(R,p,r,this.rB,this.D$,this.sC,this.L);if(TE(r,Qy_()))return new MJx(R,p,r,this.rB,this.D$,this.sC,this.L);if(TE(r,hAx()))return new cer(R, p,r,this.rB,this.D$,this.sC);if(TE(r,Jfr())||g.F(r.renderingContent,Ho)!==void 0)return new tJd(R,p,r,this.rB,this.D$,this.sC,this.L);if(TE(r,NfY())||g.F(r.renderingContent,vo)!==void 0)return new YeY(R,p,r,this.rB,this.D$,this.sC,this.L);if(TE(r,gMH()))return new $hW(R,p,r,this.rB,this.D$,this.sC);if(TE(r,jyr())||g.F(r.renderingContent,Nm)!==void 0)return new VJx(R,p,r,this.rB,this.D$,this.sC,this.L);throw new wJ(`Unsupported layout with type: ${r.layoutType} and client metadata: ${cz(r.clientMetadata)} in `+ "DesktopAboveFeedLayoutRenderingAdapterFactory.");}};var jS6=class{constructor(R,w,p){this.rB=R;this.D$=w;this.L=p}build(R,w,p,r){if(TE(r,{sy:["metadata_type_linked_player_bytes_layout_id"],Iq:["LAYOUT_TYPE_DISPLAY_UNDERLAY_TEXT_GRID_CARDS"]}))return new nRd(R,p,r,this.rB,this.D$,this.L);throw new wJ(`Unsupported layout with type: ${r.layoutType} and client metadata: ${cz(r.clientMetadata)} in `+"DesktopPlayerUnderlayLayoutRenderingAdapterFactory.");}};var JeL=class{constructor(R,w,p,r,f){this.callback=R;this.slot=w;this.layout=p;this.D$=r;this.PN=f;R=this.layout.clientMetadata.FB("metadata_type_ad_placement_config");this.Al=new Jn(p.Ig,this.D$,R,p.layoutId)}h2(){return this.slot}xB(){return this.layout}init(){}release(){}startRendering(R){R.layoutId!==this.layout.layoutId?this.callback.qO(this.slot,R,new wJ("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.zK(this.slot,R),this.Al.Nr("impression"),eO(this.PN,R))}Fn(R,w){R.layoutId!==this.layout.layoutId?this.callback.qO(this.slot,R,new wJ("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.mU(this.slot, R,w)}};var yo=class{constructor(R,w,p,r){this.BS=R;this.D$=w;this.PN=p;this.kB=r}build(R,w,p,r){this.BS.get();if(TE(r,kaY()))return new JeL(R,p,r,this.D$,this.PN);throw new wJ(`Unsupported layout with type: ${r.layoutType} and client metadata: ${cz(r.clientMetadata)} in `+"ForecastingLayoutRenderingAdapterFactory.");}};var TTd=class extends j8{constructor(R,w,p,r){super("player-overlay-layout",R,{},p,r);this.videoAdDurationSeconds=w;this.interactionLoggingClientData=r}};var fGd=class extends Lf{constructor(R,w,p,r,f,G,I,C,u){super(R,w,p,r);this.s0=f;this.D$=G;this.J=I;this.K=C;this.BS=u;this.G=!1;this.D=this.layout.clientMetadata.FB("metadata_type_linked_player_bytes_layout_id")}init(){super.init();const R=g.F(this.layout.renderingContent,h6)||this.layout.clientMetadata.FB("metadata_type_player_overlay_layout_renderer"),w={adsClientData:this.layout.UQ};this.L.push(new TTd(R,this.layout.clientMetadata.FB("METADATA_TYPE_MEDIA_LAYOUT_DURATION_seconds"),this.layout.layoutId, w))}Z6(){this.G||this.s0.get().resumeVideo(2)}startRendering(R){super.startRendering(R);this.callback.zK(this.slot,R);this.K.fU=this}Fn(R,w){super.Fn(R,w);LT(this.K,this)}xF(R,w){if(!BS(this.BS.get(),"stop_handling_click_for_non_rendering_overlay_layout")||w===this.layout.layoutId){if(mT(this.J.get(),this.D))switch(R){case "visit-advertiser-link":M7(this.D$.get(),3)}switch(R){case "ad-mute-confirm-dialog-close-button":case "ad-feedback-undo-mute-button":case "ad-info-dialog-close-button":this.G|| this.s0.get().resumeVideo(2);break;case "ad-info-icon-button":case "ad-player-overflow-button":(this.G=this.s0.get().BN(2))||this.s0.get().pauseVideo();break;case "visit-advertiser-link":this.s0.get().pauseVideo();RC_(this).wP();break;case "skip-button":R=RC_(this),this.layout.renderingContent&&!ey(this.layout.clientMetadata,"metadata_type_dai")||!R||!R.SO?(R=this.layout.clientMetadata.FB("metadata_type_ad_pod_skip_target_callback_ref")?.current)&&OU(R,this.h2(),this.layout):(MY("Requesting to skip by LegacyPlayerBytes when components enabled"), R.Lc(this.h2(),this.layout))}}}Gy(){super.Gy()}};var rux=class extends Lf{constructor(R,w,p,r,f,G,I,C,u){super(R,w,p,r);this.s0=f;this.D$=G;this.J=I;this.K=C;this.BS=u;this.G=!1;this.D=this.layout.clientMetadata.FB("metadata_type_linked_player_bytes_layout_id")}init(){super.init();const R=g.F(this.layout.renderingContent,Ql)||this.layout.clientMetadata.FB("metadata_type_instream_ad_player_overlay_renderer"),w={adsClientData:this.layout.UQ};var p;(p=!!this.layout.renderingContent)||(p=ip(this),p=!(p&&p.SO));this.L.push(new S8(R,this.layout.layoutId, this.layout.clientMetadata.FB("METADATA_TYPE_MEDIA_LAYOUT_DURATION_seconds"),w,p))}Z6(){this.G||this.s0.get().resumeVideo(2)}startRendering(R){super.startRendering(R);this.callback.zK(this.slot,R);this.K.fU=this}Fn(R,w){super.Fn(R,w);LT(this.K,this)}xF(R,w){if(!this.BS||!BS(this.BS.get(),"stop_handling_click_for_non_rendering_overlay_layout")||w===this.layout.layoutId){if(mT(this.J.get(),this.D))switch(R){case "visit-advertiser":M7(this.D$.get(),3)}switch(R){case "ad-mute-confirm-dialog-close-button":case "ad-feedback-undo-mute-button":case "ad-info-dialog-close-button":this.G|| this.s0.get().resumeVideo(2);break;case "ad-info-icon-button":case "ad-player-overflow-button":(this.G=this.s0.get().BN(2))||this.s0.get().pauseVideo();break;case "visit-advertiser":this.s0.get().pauseVideo();ip(this).wP();break;case "skip-button":R=ip(this),this.layout.renderingContent&&!ey(this.layout.clientMetadata,"metadata_type_dai")||!R||!R.SO?(R=this.layout.clientMetadata.FB("metadata_type_ad_pod_skip_target_callback_ref")?.current)&&OU(R,this.h2(),this.layout):(MY("Requesting to skip by LegacyPlayerBytes"), R.Lc(this.h2(),this.layout))}}}Gy(){super.Gy()}};var ir_=class extends j8{constructor(R,w,p){super("ad-message",R,void 0,w,p)}};var IGI=class extends Lf{constructor(R,w,p,r,f,G){super(p,R,w,r);this.s0=f;this.BS=G}startRendering(R){Et(this.C,R,()=>{this.L.push(new ir_(this.layout.clientMetadata.FB("metadata_type_valid_ad_message_renderer"),R.layoutId,R.UQ));this.cZ();this.callback.zK(this.slot,R);ZD(this.s0.get(),1).L(512)&&this.callback.qO(this.h2(),this.xB(),new wJ("player is stuck during adNotify",void 0,"ADS_CLIENT_ERROR_MESSAGE_PLAYER_STUCK_DURING_ADNOTIFY"),"ADS_CLIENT_ERROR_TYPE_ENTER_LAYOUT_FAILED")})}HF(){}OR(R){R.state.isError()&& this.callback.qO(this.h2(),this.xB(),new wJ("A player error happened during adNotify",{playerErrorCode:R.state.Yu?.errorCode},"ADS_CLIENT_ERROR_MESSAGE_PLAYER_ERROR_DURING_ADNOTIFY"),"ADS_CLIENT_ERROR_TYPE_ENTER_LAYOUT_FAILED")}onFullscreenToggled(){}jL(){}nS(){}DJ(){}onVolumeChange(){}yf(){}oa(){}xF(){}};var QSH=class extends j8{constructor(R,w,p,r){super("video-interstitial-buttoned-centered",R,w,p,r);this.interactionLoggingClientData=r}};var uHP=class extends Lf{constructor(R,w,p,r,f){super(R,w,p,r);R=p.clientMetadata.FB("metadata_type_ad_placement_config");this.Al=new Jn(p.Ig,f,R,p.layoutId)}init(){super.init();const R=g.F(this.layout.renderingContent,HS),w=DT(this.Al);this.L.push(new QSH(R,w,this.layout.layoutId,{adsClientData:this.layout.UQ}))}startRendering(R){super.startRendering(R);this.callback.zK(this.slot,R)}xF(R,w){if(w===this.layout.layoutId)switch(R){case "skip-button":(R=this.layout.clientMetadata.FB("metadata_type_ad_pod_skip_target_callback_ref")?.current)&& OU(R,this.h2(),this.layout)}}Gy(){super.Gy()}};var hUx=class{constructor(R,w,p,r,f,G){this.rB=R;this.s0=w;this.D$=p;this.C=r;this.L=f;this.BS=G}build(R,w,p,r){if(R=vS(R,p,r,this.rB,this.s0,this.D$,this.C,this.L,this.BS))return R;throw new wJ(`Unsupported layout with type: ${r.layoutType} and client metadata: ${cz(r.clientMetadata)} in `+"OtherWebInPlayerLayoutRenderingAdapterFactory.");}};var gRr=class{constructor(R,w,p,r,f,G,I,C,u){this.callback=R;this.slot=w;this.layout=p;this.s0=r;this.D$=f;this.BS=I;this.kB=C;this.dN=u;this.L=!1;R=p.clientMetadata.FB("metadata_type_ad_placement_config");this.Al=new Jn(p.Ig,this.D$,R,p.layoutId);R=this.layout.clientMetadata.FB("METADATA_TYPE_INTERACTIONS_AND_PROGRESS_LAYOUT_COMMANDS")?.progressCommands||[];this.C=new qO(G,R,p.layoutId,()=>s4d(this)*1E3)}h2(){return this.slot}xB(){return this.layout}init(){this.s0.get().addListener(this); this.s0.get().Xx.push(this);const R=s4d(this);var w=g.F(this.layout.renderingContent,u_);const p=w?a1(w.pings):this.layout.clientMetadata.FB("metadata_type_active_view_traffic_type");w=w?w.pings?.activeViewTracking?.identifier:this.layout.clientMetadata.FB("metadata_type_active_view_identifier");PS(this.layout.Ig)&&Yz(this.kB.get(),this.layout.layoutId,{I7:p,V0:R,listener:this,FW:w})}release(){this.s0.get().removeListener(this);uNr(this.s0.get(),this);PS(this.layout.Ig)&&FN(this.kB.get(),this.layout.layoutId)}startRendering(R){this.callback.zK(this.slot, R)}Fn(R,w){Sv(this,"abandon");this.callback.mU(this.slot,R,w)}yf(R){switch(R.id){case "part2viewed":this.Al.Nr("start");this.Al.Nr("impression");break;case "videoplaytime25":this.Al.Nr("first_quartile");break;case "videoplaytime50":this.Al.Nr("midpoint");break;case "videoplaytime75":this.Al.Nr("third_quartile");break;case "videoplaytime100":Sv(this,"complete");jv(this.Al)&&Yc(this.Al,Infinity,!0);YlI(this.BS.get())&&J6(this.C,Infinity,!0);break;case "engagedview":jv(this.Al)||this.Al.Nr("progress"); break;case "conversionview":case "videoplaybackstart":case "videoplayback2s":case "videoplayback10s":break;default:MY("Cue Range ID unknown in ShortsPlaybackTrackingLayoutRenderingAdapter",this.slot,this.layout)}}onVolumeChange(){}DJ(){}jL(){}nS(){}onFullscreenToggled(){}OR(R){this.L||(R.TE(4)&&!R.TE(2)?ZT(this.Al,"pause"):cs(R,4)<0&&!(cs(R,2)<0)&&ZT(this.Al,"resume"))}HF(){}iN(R){YlI(this.BS.get())&&J6(this.C,R*1E3,!1);jv(this.Al)&&Yc(this.Al,R*1E3,!1)}oa(){Sv(this,"swipe")}qR(){this.Al.Nr("active_view_measurable")}vT(){this.Al.Nr("active_view_viewable")}dA(){this.Al.Nr("active_view_fully_viewable_audible_half_duration")}uq(){this.Al.Nr("audio_measurable")}aS(){this.Al.Nr("audio_audible")}};var HrD=class{constructor(R,w,p,r,f,G){this.s0=R;this.D$=w;this.YB=p;this.BS=r;this.kB=f;this.dN=G}build(R,w,p,r){if(p.slotType==="SLOT_TYPE_PLAYER_BYTES_SEQUENCE_ITEM"&&g.F(r.renderingContent,u_)!==void 0)return new gRr(R,p,r,this.s0,this.D$,this.YB,this.BS,this.kB,this.dN);w=["metadata_type_ad_placement_config"];for(const f of XU())w.push(f);if(TE(r,{sy:w,Iq:["LAYOUT_TYPE_DISCOVERY_PLAYBACK_TRACKER"]}))return p.slotType==="SLOT_TYPE_PLAYER_BYTES_SEQUENCE_ITEM"?new gRr(R,p,r,this.s0,this.D$,this.YB, this.BS,this.kB,this.dN):new Pd6(R,p,r,this.s0,this.D$,this.YB,this.BS,this.kB);throw new wJ(`Unsupported layout with type: ${r.layoutType} and client metadata: ${cz(r.clientMetadata)} in `+"PlaybackTrackingLayoutRenderingAdapterFactory.");}};g.pq=class{constructor(R,w={},p=0){this.errorCode=R;this.details=w;this.severity=p}};var vRI; vRI={SX:"ALREADY_PINNED_ON_A_DEVICE",AUTHENTICATION_EXPIRED:"AUTHENTICATION_EXPIRED",ip:"AUTHENTICATION_MALFORMED",Pm:"AUTHENTICATION_MISSING",yM:"BAD_REQUEST",dj:"CAST_SESSION_DEVICE_MISMATCHED",qq:"CAST_SESSION_VIDEO_MISMATCHED",Rv:"CAST_TOKEN_EXPIRED",VM:"CAST_TOKEN_FAILED",Hm:"CAST_TOKEN_MALFORMED",AY:"CGI_PARAMS_MALFORMED",Nq:"CGI_PARAMS_MISSING",EH:"DEVICE_FALLBACK",S3:"GENERIC_WITH_LINK_AND_CPN",wV:"ERROR_HDCP",L8:"LICENSE",xt:"VIDEO_UNAVAILABLE",f8:"FORMAT_UNAVAILABLE",jT:"GEO_FAILURE",H6:"HTML5_AUDIO_RENDERER_ERROR", An:"GENERIC_WITHOUT_LINK",NF:"HTML5_NO_AVAILABLE_FORMATS_FALLBACK",eT:"HTML5_NO_AVAILABLE_FORMATS_FALLBACK_WITH_LINK",XJ:"HTML5_NO_AVAILABLE_FORMATS_FALLBACK_WITH_LINK_SHORT",mH:"HTML5_SPS_UMP_STATUS_REJECTED",G4:"INVALID_DRM_MESSAGE",I$0:"PURCHASE_NOT_FOUND",KqN:"PURCHASE_REFUNDED",kyI:"RENTAL_EXPIRED",RY0:"RETRYABLE_ERROR",S00:"SERVER_ERROR",fTB:"SIGNATURE_EXPIRED",BnY:"STOPPED_BY_ANOTHER_PLAYBACK",Jfy:"STREAMING_DEVICES_QUOTA_PER_24H_EXCEEDED",tzB:"STREAMING_NOT_ALLOWED",sg0:"STREAM_LICENSE_NOT_FOUND", DrS:"TOO_MANY_REQUESTS",yfB:"TOO_MANY_REQUESTS_WITH_LINK",nB0:"TOO_MANY_STREAMS_PER_ENTITLEMENT",Z_0:"TOO_MANY_STREAMS_PER_USER",UNSUPPORTED_DEVICE:"UNSUPPORTED_DEVICE",LUN:"VIDEO_FORBIDDEN",Col:"VIDEO_NOT_FOUND",UU:"BROWSER_OR_EXTENSION_ERROR"}; g.Rx={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 Vo;{var NTd=g.s3();const R=NTd.match(/\((iPad|iPhone|iPod)( Simulator)?;/);if(!R||R.length<2)Vo=void 0;else{var oF=NTd.match(/\((iPad|iPhone|iPod)( Simulator)?; (U; )?CPU (iPhone )?OS (\d+_\d)[_ ]/);Vo=oF&&oF.length===6?Number(oF[5].replace("_",".")):0}}var h5=Vo,fE=h5>=0;g.th=class extends ag{W(R,w,p,r,f){return super.W(R,w,p,r,f)}};var BK={FAIRPLAY:"fairplay",PLAYREADY:"playready",WIDEVINE:"widevine",CLEARKEY:null,FLASHACCESS:null,UNKNOWN:null,WIDEVINE_CLASSIC:null};var MF=class{constructor(R=0,w=0,p="SPATIAL_AUDIO_TYPE_NONE",r=!1,f,G,I="AUDIO_QUALITY_UNKNOWN",C=!1){this.sampleRate=R;this.numChannels=w;this.spatialAudioType=p;this.L=r;this.O=f;this.G=G;this.audioQuality=I;this.C=C}isMultiChannelAudio(){return this.numChannels>2}};var du={WIDTH:{name:"width",video:!0,valid:640,l8:99999},HEIGHT:{name:"height",video:!0,valid:360,l8:99999},FRAMERATE:{name:"framerate",video:!0,valid:30,l8:9999},BITRATE:{name:"bitrate",video:!0,valid:3E5,l8:2E9},EOTF:{name:"eotf",video:!0,valid:"bt709",l8:"catavision"},CHANNELS:{name:"channels",video:!1,valid:2,l8:99},CRYPTOBLOCKFORMAT:{name:"cryptoblockformat",video:!0,valid:"subsample",l8:"invalidformat"},DECODETOTEXTURE:{name:"decode-to-texture",video:!0,valid:"false",l8:"nope"},AV1_CODECS:{name:"codecs", video:!0,valid:"av01.0.05M.08",l8:"av99.0.05M.08"},EXPERIMENTAL:{name:"experimental",video:!0,valid:"allowed",l8:"invalid"},TUNNELMODE:{name:"tunnelmode",video:!0,valid:"true",l8:"false"}};var oJ_=class{constructor(R,w,p,r="",f="",G=""){this.displayName=R;this.vssId=w;this.languageCode=p;this.kind=r;this.xtags=f;this.id=G}};var ksx=["h","H"],UhD=["9","("],SeL=["9h","(h"],RXd=["8","*"],wpL=["a","A"],ppd=["o","O"],rLI=["m","M"],ft6=["mac3","MAC3"],GzW=["meac3","MEAC3"],RLd={h:ksx,H:ksx,["9"]:UhD,["("]:UhD,["9h"]:SeL,["(h"]:SeL,["8"]:RXd,["*"]:RXd,a:wpL,A:wpL,o:ppd,O:ppd,m:rLI,M:rLI,mac3:ft6,MAC3:ft6,meac3:GzW,MEAC3:GzW},Itx=new Set("o O a ah A m M mac3 MAC3 meac3 MEAC3 so sa".split(" ")),ZFd=new Set("m M mac3 MAC3 meac3 MEAC3".split(" "));var uI={["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.zn=class{constructor(R,w,p,r=!1){this.name=R;this.id=w;this.isDefault=p;this.isAutoDubbed=r}getName(){return this.name}getId(){return this.id}getIsDefault(){return this.isDefault}getIsAutoDubbed(){return this.isAutoDubbed}toString(){return this.name}};g.zn.prototype.getName=g.zn.prototype.getName;g.zn.prototype.getId=g.zn.prototype.getId;g.zn.prototype.getIsDefault=g.zn.prototype.getIsDefault;g.zn.prototype.getIsAutoDubbed=g.zn.prototype.getIsAutoDubbed;var bVx={STEREO_LAYOUT_UNKNOWN:0,STEREO_LAYOUT_LEFT_RIGHT:1,STEREO_LAYOUT_TOP_BOTTOM:2};var tRr={yll:0,Jl0:124,BNy:144,gYS:220,s0N:240,l$I:340,EY$:360,iBq:480,Y0I:588,Pn$:608,FqY:720,clk:740,zYl:1080,j0n:1100,MIn:1440,tIB:2160,D0N: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.C3d={bV:"auto",FZ$:"tiny",dI:"light",z_B:"small",f9:"medium",um:"large",W6:"hd720",QT:"hd1080",UM:"hd1440",kt:"hd2160",ud:"hd2880",VT:"highres",UNKNOWN:"unknown"};var yy,Vod;g.tC={auto:0,tiny:144,light:144,small:240,medium:360,large:480,hd720:720,hd1080:1080,hd1440:1440,hd2160:2160,hd2880:2880,highres:4320};yy={0:"auto",144:"tiny",240:"small",360:"medium",480:"large",720:"hd720",1080:"hd1080",1440:"hd1440",2160:"hd2160",2880:"hd2880",4320:"highres"}; Vod={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 oo="highres hd2880 hd2160 hd1440 hd1080 hd720 large medium small tiny".split(" ");var c1=class{constructor(R,w,p,r,f,G,I,C,u,m,z){this.width=R;this.height=w;this.O=C;this.quality=G||Ow(R,w);this.qualityOrdinal=g.tC[this.quality];this.fps=p||0;this.stereoLayout=!f||r!=null&&r!=="UNKNOWN"&&r!=="RECTANGULAR"?0:f;this.projectionType=r?r==="EQUIRECTANGULAR"&&f===2?"EQUIRECTANGULAR_THREED_TOP_BOTTOM":r:"UNKNOWN";(R=I)||(p=g.tC[this.quality],p===0?R="Auto":(R=this.projectionType,w=this.fps,R=p.toString()+(R==="EQUIRECTANGULAR"||R==="EQUIRECTANGULAR_THREED_TOP_BOTTOM"||R==="MESH"?"s": "p")+(w>55?"60":w>49?"50":w>39?"48":"")));this.qualityLabel=R;this.L=u||"";this.primaries=m||"";this.G=z??!0}C(){return this.fps>32}isHdr(){return this.L==="smpte2084"||this.L==="arib-std-b67"}};var P1=class{constructor(R,w,p={}){this.id=R;this.mimeType=w;p.hf>0||(p.hf=16E3);Object.assign(this,p);[this.itag,this.C]=this.id.split(";");this.containerType=Kq(w);this.wN=uI[this.itag]||""}D(){return this.video}U(){return this.audio}G3(){return this.containerType===2}G(){return this.wN==="9"||this.wN==="("||this.wN==="9h"||this.wN==="(h"}L(){return this.wN==="1"||this.wN==="1h"||Xs&&this.wN==="1e"}J(){return this.wN==="mac3"||this.wN==="meac3"||this.wN==="m"||this.wN==="i"||ECH(this)}isEncrypted(){return!!this.contentProtection}i4(){return!!this.audio}Ih(){return!!this.video}O(){return this.mimeType=== "application/x-mpegURL"}},Xs=!1;var ZMD=class extends g.HC{constructor(R,w,p,r){super();this.f$=R;this.start=w;this.end=p;this.isActive=r;this.appendWindowStart=0;this.appendWindowEnd=Infinity;this.timestampOffset=0;this.QX={error:()=>{!this.cS()&&this.isActive&&this.publish("error",this)}, updateend:()=>{!this.cS()&&this.isActive&&this.publish("updateend",this)}}; this.f$.Uq(this.QX);this.XV=this.isActive}appendBuffer(R,w,p){if(this.f$.EE()!==this.appendWindowStart+this.start||this.f$.Iu()!==this.appendWindowEnd+this.start||this.f$.vB()!==this.timestampOffset+this.start)this.f$.supports(1),this.f$.wD(this.appendWindowStart+this.start,this.appendWindowEnd+this.start),this.f$.QV(this.timestampOffset+this.start);this.f$.appendBuffer(R,w,p)}abort(){this.f$.abort()}remove(R,w){this.f$.remove(R+this.start,w+this.start)}removeAll(){this.remove(this.appendWindowStart, this.appendWindowEnd)}clear(){this.f$.clear()}wD(R,w){this.appendWindowStart=R;this.appendWindowEnd=w}QO(){return this.timestampOffset+this.start}EE(){return this.appendWindowStart}Iu(){return this.appendWindowEnd}QV(R){this.timestampOffset=R}vB(){return this.timestampOffset}f3(R=!1){R=this.f$.f3(R);return gu(R,this.start,this.end)}cM(){return this.f$.cM()}yR(){return this.f$.yR()}i8(){return this.f$.i8()}J1(){return this.f$.J1()}g7(){this.f$.g7()}Eh(R){return this.f$.Eh(R)}m4(){return this.f$.m4()}JR(){return this.f$.JR()}Ht(R, w,p){this.f$.Ht(R,w,p)}Ag(R,w,p){this.f$.Ag(R,w,p)}WP(R,w){return this.f$.WP(R,w)}supports(R){return this.f$.supports(R)}sx(){return this.f$.sx()}isView(){return!0}rG(){return this.f$.rG()?this.isActive:!1}isLocked(){return this.XV&&!this.isActive}TK(R){R=this.f$.TK(R);R.vw=`${this.start}-${this.end}`;return R}tR(){return this.f$.tR()}DA(){return this.f$.DA()}FF(){return this.f$.FF()}Gy(){this.f$.OF(this.QX);super.Gy()}};var A7=!1;var nCI=class extends g.HC{constructor(R,w,p,r,f,G){super();this.Vh=R;this.J3=w;this.id=p;this.containerType=r;this.wN=f;this.Ih=G;this.qN=this.s8=this.Nw=null;this.Ea=!1;this.appendWindowStart=this.timestampOffset=0;this.OB=Yi([],[]);this.WL=!1;this.tE=[];this.rW=u2?[]:void 0;this.handler=I=>this.publish(I.type,this); this.Vh?.addEventListener&&(this.Vh.addEventListener("updateend",this.handler),this.Vh.addEventListener("error",this.handler))}appendBuffer(R,w,p){this.WL=!1;p&&(this.s8=p);R.length&&(this.Vh?.appendBuffer?this.Vh.appendBuffer(R):this.Vh?this.Vh.append(R):this.J3&&this.J3.webkitSourceAppend(this.id,R));w&&(w.isEncrypted()&&(this.qN=this.s8),w.type===3&&(this.Nw=w),this.tE.push(w.EC()),this.tE.length>4&&this.tE.shift());this.rW&&(this.rW.length>=2||R.length>1048576?delete this.rW:this.rW.push(R))}abort(){try{this.Vh? this.Vh.abort():this.J3&&this.J3.webkitSourceAbort(this.id)}catch(R){rML&&g.AO(new g.Id(`Error while abort the source buffer: ${R.name}, ${R.message}`))}this.s8=this.Nw=null}remove(R,w,p){this.WL=!1;this.Vh?.remove&&(p&&p({b:Fs(this.f3()),s:R,e:w}),this.Vh.remove(R,w))}removeAll(){this.remove(this.EE(),this.Iu())}clear(){this.i8()||(this.abort(),this.removeAll(),this.qN=this.s8=this.Nw=null,this.appendWindowStart=this.timestampOffset=0,this.OB=Yi([],[]),this.WL=!1,this.rW=u2?[]:void 0,this.Ea=!0)}EE(){return A7&& this.Ih?this.appendWindowStart:this.Vh?.appendWindowStart||0}Iu(){return this.Vh?.appendWindowEnd||0}wD(R,w){this.Vh&&(A7&&this.Ih?(this.appendWindowStart=R,this.Vh.appendWindowEnd=w):R>this.EE()?(this.Vh.appendWindowEnd=w,this.Vh.appendWindowStart=R):(this.Vh.appendWindowStart=R,this.Vh.appendWindowEnd=w))}QO(){return this.timestampOffset}QV(R){A7?this.timestampOffset=R:this.supports(1)&&(this.Vh.timestampOffset=R)}vB(){return A7?this.timestampOffset:this.supports(1)?this.Vh.timestampOffset:0}f3(R= !1){if(R)return this.WL||this.cM()||(this.OB=this.f3(!1),this.WL=!0),this.OB;try{return this.Vh?this.Vh.buffered:this.J3?this.J3.webkitSourceBuffered(this.id):Yi([0],[Infinity])}catch(w){return Yi([],[])}}cM(){return this.Vh?.updating||!1}i8(){return this.Ea}J1(){return!this.Ea&&this.cM()}g7(){this.Ea=!1}Eh(R){const w=R?.wN;R=R?.containerType;return!w&&!R||w===this.wN&&R===this.containerType}m4(){return this.s8}JR(){return this.qN}WP(R,w){return this.containerType!==R||this.wN!==w}Ht(R,w,p){if(this.containerType!== R||p&&this.WP(R,p))this.supports(4),H1()&&this.Vh.changeType(w),p&&(this.wN=p);this.containerType=R}Ag(R,w,p){this.containerType&&this.WP(R,w)&&H1()&&this.Vh.changeType(p);this.containerType=R;this.wN=w}sx(){return this.Nw}isView(){return!1}supports(R){switch(R){case 1:return this.Vh?.timestampOffset!==void 0;case 0:return!!this.Vh?.appendBuffer;case 2:return!!this.Vh?.remove;case 3:return!(!this.Vh?.addEventListener||!this.Vh?.removeEventListener);case 4:return!(!this.Vh||!this.Vh.changeType);default:return!1}}rG(){return!this.cM()}isLocked(){return!1}TK(R){R.to= this.vB();R.up=this.cM();R.aw=`${(this.Vh?.appendWindowStart||0).toFixed(3)}-${(this.Vh?.appendWindowEnd||Infinity).toFixed(3)}`;return R}yR(){return this.Vh?.writeHead||0}tR(){const R={};for(let w=0;w{}); this.L?.clear();this.C?.clear()}pB(){this.L?.g7();this.C?.g7();this.D=!1}i8(){return this.C?.i8()||this.L?.i8()}Eh(R,w){return!!this.L&&!!this.C&&this.L.Eh(w)&&this.C.Eh(R)}M0(){return!!this.un&&this.un.streaming===!1}},ki=!1;var aa=class{constructor(){this.n5=this.Ma=CHW;this.promise=new g.n9((R,w)=>{this.Ma=R;this.n5=w})}then(R,w){return this.promise.then(R,w)}resolve(R){this.Ma(R)}reject(R){this.n5(R)}};var u$d=class extends g.f5{constructor(){super();this.d4=!1;this.EQ=null;this.p_=this.q0=!1;this.M0=new g.E1;this.mediaKeys=this.kY=null;g.K(this,this.M0)}Jl(){return this.EQ}activate(R){let w="";R&&(FeH(this,R),w=R.EQ);if(!this.Kv()||w)w&&this.Kv()!==w&&(this.Qk(w),delete this.C,this.G&&(this.G.reject(),delete this.G),!window.MediaSource&&window.ManagedMediaSource&&this.ag(!!R?.O())),R&&R.L||this.load(),this.p_||(this.addEventListener("volumechange",this.Mr),this.p_=!0)}j_(R,w){if(this.C)if(CN&& this.C.J()&&!this.C.Eh(R,w))Uw(this,{l:"megms",sr:this.kY?.lB()}),JsD(this),this.stopVideo();else return this.un=this.C,this.C=void 0,this.un;R=window.MediaSource?new Si(this,new window.MediaSource,!1):window.ManagedMediaSource?new Si(this,new window.ManagedMediaSource,!1):window.WebKitMediaSource?new Si(this,new window.WebKitMediaSource,!1):new Si(this,void 0,!1);this.activate(R.G);this.un=R;this.d4=!1;return R}cB(R){this.C=R}playVideo(){this.isEnded()&&this.seekTo(0);!this.Kv()&&this.EQ&&(g.LF(Error("playVideo without src")), this.Qk(this.EQ.EQ),this.EQ.L||this.load());const R=this.play();this.kY?.x3()||fE&&(h5||0)>=7&&(!R||this.kY?.Y("mweb_ios_allow_playback_workaround_when_ready"))&&mgW(this,()=>{g.cI(()=>{Tbx(this,this.getCurrentTime(),0)},500)}); return R}seekTo(R){this.O()>0&&(fE&&h5<4&&(R=Math.max(.1,R)),this.setCurrentTime(R))}Ra(){if(!this.C&&this.un)if(this.un.D)try{Uw(this,{l:"mer",sr:this.kY?.lB(),rs:this.un.O()}),this.un.clear(),this.cB(this.un),this.un=void 0}catch(R){const w=new g.Id(`Error while clearing Media Source in MediaElement: ${R.name}, ${R.message}`);g.LF(w);this.stopVideo()}else this.stopVideo()}stopVideo(){if(!this.C)if(this.un?.pB(),I5){if(!this.G){var R=new aa;R.then(void 0,()=>{}); this.G=R;pBH&&this.pause();g.cI(()=>{this.G===R&&(pn(this),R.resolve())},200)}}else pn(this)}BM(){const R=this.po(); return QG(R)&&this.getDuration()?TO(R,this.getCurrentTime()):0}Lw(){const R=this.getDuration();return R===Infinity?1:R?this.BM()/R:0}TK(){try{const R=this.getSize();return{vct:this.getCurrentTime().toFixed(3),vd:this.getDuration().toFixed(3),vpl:Fs(this.K(),",",3),vbu:Fs(this.po()),vbs:Fs(this.U()),vpa:`${+this.isPaused()}`,vsk:`${+this.isSeeking()}`,ven:`${+this.isEnded()}`,vpr:`${this.getPlaybackRate()}`,vrs:`${this.O()}`,vns:`${this.YY()}`,vec:`${this.Tg()}`,vemsg:this.Ch(),vvol:`${this.getVolume()}`, vdom:`${+this.mq()}`,vsrc:`${+!!this.Kv()}`,vw:`${R.width}`,vh:`${R.height}`}}catch{return{}}}hasError(){return this.Tg()>0}addEventListener(R,w){this.M0.listen(R,w,!1,this);this.SI(R)}removeEventListener(R,w){this.M0.o9(R,w,!1,this)}dispatchEvent(R){if(this.G&&R.type==="pause")return!1;if(CN){var w=R.L?.timeStamp||Infinity;w=w>performance.now()?w-Date.now()+performance.now():w;const p=this.C||this.un;if(p?.i8()||w<=(p?.U||0))return Uw(this,{l:"mede",sr:this.kY?.lB(),et:R.type}),!1;if(this.d4)return Uw(this, {l:"medes",et:R.type}),p&&R.type==="seeking"&&(p.U=performance.now(),this.d4=!1),!1}return this.M0.dispatchEvent(R)}eI(){this.q0=!1}N0(){this.q0=!0;this.X(!0)}Mr(){this.q0&&!this.PS()&&this.X(!0)}equals(R){return!!R&&R.zk()===this.zk()}Gy(){this.p_&&this.removeEventListener("volumechange",this.Mr);I5&&pn(this);super.Gy()}},I5=!1,pBH=!1,CN=!1,QU6=!1;var Kf; g.Gf=class{constructor(R,w=null,p=null,r=null){this.Yu=w;this.seekSource=p;this.stoppageReason=r;this.state=R||64}L(R){return!!(this.state&R)}isPaused(){return this.L(4)}isPlaying(){return this.L(8)&&!this.L(512)&&!this.L(64)&&!this.L(2)}isOrWillBePlaying(){return this.L(8)&&!this.L(2)&&!this.L(1024)}C(){return this.state===8}isCued(){return this.L(64)&&!this.L(8)&&!this.L(4)}isBuffering(){return this.L(1)&&!this.L(2)}isError(){return this.L(128)}isSuspended(){return this.L(512)}bf(){return this.L(64)&&this.L(4)}toString(){return`PSt.${this.state.toString(16)}`}}; Kf={BUFFERING:"buffering-mode",CUED:"cued-mode",ENDED:"ended-mode",PAUSED:"paused-mode",PLAYING:"playing-mode",SEEKING:"seeking-mode",UNSTARTED:"unstarted-mode"};var sCW=class extends g.f5{constructor(R,w,p,r,f,G,I,C,u,m,z,B,W,x,q){super();this.xZ=R;this.slot=w;this.layout=p;this.D$=r;this.kB=f;this.dN=G;this.s0=I;this.Zf=C;this.YB=u;this.d9=m;this.position=z;this.G=B;this.BS=W;this.CO=x;this.context=q;this.Ik=!0;this.O=!1;this.fL="not_rendering";this.L=!1;R=this.layout.clientMetadata.FB("metadata_type_ad_placement_config");this.Al=new Jn(p.Ig,this.D$,R,p.layoutId);R=Wo(this)?.progressCommands||[];this.C=new qO(u,R,p.layoutId,()=>this.AG())}h2(){return this.slot}xB(){return this.layout}init(){const R= this.layout.clientMetadata.FB("metadata_type_video_length_seconds"),w=this.layout.clientMetadata.FB("metadata_type_active_view_traffic_type"); PS(this.layout.Ig)&&Yz(this.kB.get(),this.layout.layoutId,{I7:w,V0:R,listener:this});TT(this.D$.get(),this);this.q1()}fR(){}release(){PS(this.layout.Ig)&&FN(this.kB.get(),this.layout.layoutId);ii(this.D$.get(),this);this.GG()}mX(){}BE(){}startRendering(R){if(R.layoutId!==this.layout.layoutId){this.xZ.qO(this.slot,R,new wJ("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 w=!1}else w=!0;w&&(this.fL="rendering_start_requested",this.d9(-1),this.B7(R),this.Tt(!1))}zK(R,w){w.layoutId===this.layout.layoutId&&(this.fL="rendering",this.L=this.s0.get().isMuted()||this.s0.get().getVolume()===0,this.Nr("impression"),this.Nr("start"),this.s0.get().isMuted()&&(xj(this,"mute"),R=Wo(this)?.muteCommands||[],m7(this.YB.get(),R,this.layout.layoutId)),this.s0.get().isFullscreen()&&(this.Lv("fullscreen"),R=Wo(this)?.fullscreenCommands|| [],m7(this.YB.get(),R,this.layout.layoutId)),R=this.Zf.get(),R.O&&!R.C&&(R.K=!1,R.C=!0,R.actionType!=="ad_to_video"&&(Wx("pbs",void 0,R.actionType),g.Y("finalize_all_timelines")&&N86(R.actionType))),this.d9(1),this.iZ(w),w=Wo(this)?.impressionCommands||[],m7(this.YB.get(),w,this.layout.layoutId))}VE(R,w,p){this.K={Kz:3,v7:R==="load_timeout"?402:400,errorMessage:w.message};this.Nr("error");R=Wo(this)?.errorCommands||[];m7(this.YB.get(),R,this.layout.layoutId);this.xZ.qO(this.slot,this.layout,w,p)}qM(R, w=!1){if(this.fL==="rendering"){Yc(this.Al,R*1E3,w);Nbr(this,R*1E3,w);var p=this.AG();p&&(p/=1E3,(R>=p*.25||w)&&this.Nr("first_quartile"),(R>=p*.5||w)&&this.Nr("midpoint"),(R>=p*.75||w)&&this.Nr("third_quartile"),this.BS.get().B.V().experiments.XB("enable_progress_command_flush_on_kabuki")?J6(this.C,R*1E3,w):J6(this.C,R*1E3,UKH(this)?w:!1))}}G5(){return Ut(this.dN.get(),1)?.clientPlaybackNonce||""}wJ(R,w){R.layoutId!==this.layout.layoutId?this.xZ.qO(this.slot,R,new wJ("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"):w()}mU(R,w,p){if(w.layoutId===this.layout.layoutId)switch(this.fL="not_rendering",this.layoutExitReason=void 0,(R=p!=="normal"||this.position+1===this.G)&&this.Tt(R),this.tb(p),this.d9(0),p){case "abandoned":FU(this.Al,"impression")&&(p=Wo(this)?.abandonCommands||[],m7(this.YB.get(),p,this.layout.layoutId));break;case "normal":p= Wo(this)?.completeCommands||[];m7(this.YB.get(),p,this.layout.layoutId);break;case "skipped":p=Wo(this)?.skipCommands||[],m7(this.YB.get(),p,this.layout.layoutId)}}nH(){return this.layout.layoutId}xn(){return this.K}qR(){if(this.fL==="rendering"){this.Al.Nr("active_view_measurable");var R=Wo(this)?.activeViewMeasurableCommands||[];m7(this.YB.get(),R,this.layout.layoutId)}}dA(){if(this.fL==="rendering"){this.Al.Nr("active_view_fully_viewable_audible_half_duration");var R=Wo(this)?.activeViewFullyViewableAudibleHalfDurationCommands|| [];m7(this.YB.get(),R,this.layout.layoutId)}}vT(){if(this.fL==="rendering"){this.Al.Nr("active_view_viewable");var R=Wo(this)?.activeViewViewableCommands||[];m7(this.YB.get(),R,this.layout.layoutId)}}aS(){if(this.fL==="rendering"){this.Al.Nr("audio_audible");var R=Wo(this)?.activeViewAudioAudibleCommands||[];m7(this.YB.get(),R,this.layout.layoutId)}}uq(){if(this.fL==="rendering"){this.Al.Nr("audio_measurable");var R=Wo(this)?.activeViewAudioMeasurableCommands||[];m7(this.YB.get(),R,this.layout.layoutId)}}Tt(R){this.Zf.get().Tt(this.layout.clientMetadata.FB("metadata_type_ad_placement_config").kind, R,this.position,this.G,!1)}onFullscreenToggled(R){this.fL==="rendering"&&(R?(this.Lv("fullscreen"),R=Wo(this)?.fullscreenCommands||[],m7(this.YB.get(),R,this.layout.layoutId)):(this.Lv("end_fullscreen"),R=Wo(this)?.endFullscreenCommands||[],m7(this.YB.get(),R,this.layout.layoutId)))}onVolumeChange(){if(this.fL==="rendering")if(this.s0.get().isMuted()){xj(this,"mute");var R=Wo(this)?.muteCommands||[];m7(this.YB.get(),R,this.layout.layoutId)}else xj(this,"unmute"),R=Wo(this)?.unmuteCommands||[],m7(this.YB.get(), R,this.layout.layoutId)}jL(){}nS(){}DJ(){}yf(){}oa(){}Lv(R){this.Al.Lv(R,!this.L)}Nr(R){this.Al.Nr(R,!this.L)}};var fJ_=class extends sCW{constructor(R){super(R.xZ,R.slot,R.eW,R.D$,R.kB,R.dN,R.s0,R.Zf,R.YB,R.d9,R.Lg,R.Q_,R.BS,R.CO,R.context);this.SO=!0;this.A1=this.tp=0;this.Fh=eE(()=>{this.xZ.zK(this.slot,this.layout)}); this.C$=R.C$;this.Oh=R.Oh;this.Nf=eE(()=>{this.fL!=="rendering_stop_requested"&&this.Oh(this);this.YE()}); this.timer=new g.pw(200);this.timer.listen("tick",()=>{this.Q2()}); g.K(this,this.timer)}YE(){this.layoutExitReason?this.xZ.mU(this.slot,this.layout,this.layoutExitReason):gCY(this)}q1(){}GG(){var R=this.D$.get();R.oW===this&&(R.oW=null);this.timer.stop()}mX(){this.timer.stop();HMd(this)}BE(){rkD(this);vCd(this)}AG(){return this.xB().clientMetadata.FB("METADATA_TYPE_MEDIA_BREAK_LAYOUT_DURATION_MILLISECONDS")}PW(){return this.tp/1E3}Fn(R,w){this.wJ(R,()=>{this.fL!=="rendering_stop_requested"&&(this.fL="rendering_stop_requested",this.layoutExitReason=w,SVL(this,w), this.timer.stop())})}Q2(){const R=Date.now(),w=R-this.A1; this.A1=R;this.tp+=w;this.tp>=this.AG()?(this.tp=this.AG(),this.qM(this.tp/1E3,!0),An(this,this.tp),this.Nf()):(this.qM(this.tp/1E3),An(this,this.tp))}OR(R){if(this.fL!=="not_rendering"){R=R9d(this,R);var w=this.s0.get().getPresentingPlayerType()===2;this.fL==="rendering_start_requested"?w&&N7(R)&&this.Fh():w?R.TE(2)?MY("Receive player ended event during MediaBreak",this.h2(),this.xB()):wIL(this,R):this.NC()}}B7(){pIb(this);vJ(this.s0.get());this.D$.get().oW=this;z3("pbp")||z3("pbs")||Wx("pbp");z3("pbp", "watch")||z3("pbs","watch")||Wx("pbp",void 0,"watch");this.Fh()}iZ(R){this.Zf.get();var w=R.clientMetadata.FB("metadata_type_ad_placement_config").kind,p=this.position===0;R=R.clientMetadata.FB("metadata_type_linked_in_player_layout_type");R={adBreakType:Ln(w),adType:R_P(R)};let r=void 0;p?w!=="AD_PLACEMENT_KIND_START"&&(r="video_to_ad"):r="ad_to_ad";u$("ad_mbs",void 0,r);g.sT(R,r);rkD(this)}NC(){this.Nf()}tb(){}HF(){}};var IJ_=class extends sCW{YE(){this.fL!=="rendering_stop_requested"&&this.Oh(this);this.layoutExitReason?this.xZ.mU(this.slot,this.layout,this.layoutExitReason):gCY(this)}constructor(R){super(R.callback,R.slot,R.eW,R.D$,R.kB,R.dN,R.s0,R.Zf,R.YB,R.d9,R.Lg,R.Q_,R.BS,R.CO,R.context);this.adCpn="";this.Jk=this.AJ=0;this.Fh=eE(()=>{this.xZ.zK(this.slot,this.layout)}); this.Nf=eE(()=>{this.YE()}); this.Ck=R.dN;this.UK=R.UK;this.vy=R.vy;this.By=R.By;this.C$=R.C$;this.YF=R.YF;this.Oh=R.Oh;BS(this.BS.get(),"html5_disable_media_load_timeout")||(this.Yv=new g.vZ(()=>{this.VE("load_timeout",new wJ("Media layout load timeout.",{},"ADS_CLIENT_ERROR_MESSAGE_MEDIA_LAYOUT_LOAD_TIMEOUT",!0),"ADS_CLIENT_ERROR_TYPE_ENTER_LAYOUT_FAILED")},1E4)); R=nz(this.BS.get());const w=dZ(this.BS.get());R&&w&&(this.o_=new g.vZ(()=>{const p=this.layout.clientMetadata.FB("metadata_type_preload_player_vars");p&&this.vy.get().B.preloadVideoByPlayerVars(p,2,300)}))}NC(){this.Nf()}OR(R){this.Av(R)}q1(){this.xB().clientMetadata.FB("metadata_type_player_bytes_callback_ref").current=this; this.shrunkenPlayerBytesConfig=this.xB().clientMetadata.FB("metadata_type_shrunken_player_bytes_config")}GG(){this.xB().clientMetadata.FB("metadata_type_player_bytes_callback_ref").current=null;this.fv&&this.By.get().removeCueRange(this.fv);this.fv=void 0;this.Yv?.dispose();this.o_&&this.o_.dispose()}B7(R){var w=R.clientMetadata.FB("metadata_type_ad_placement_config");w=nz(this.BS.get(),w);var p=dZ(this.BS.get());if(w&&p){p=R.clientMetadata.FB("metadata_type_preload_player_vars");var r=this.BS.get(); r=g.Iq(r.B.V().experiments,"html5_preload_wait_time_secs");p&&this.o_&&this.o_.start(r*1E3)}p=R.clientMetadata.FB("metadata_type_ad_video_id");r=R.clientMetadata.FB("metadata_type_legacy_info_card_vast_extension");p&&r&&this.YF.get().B.V().Jl.add(p,{Bp:r});(p=R.clientMetadata.FB("metadata_type_sodar_extension_data"))&&xGD(this.UK.get(),p);sWr(this.s0.get(),!1);pIb(this);w?(p=this.vy.get(),R=R.clientMetadata.FB("metadata_type_player_vars"),p.B.loadVideoByPlayerVars(R,!1,2)):aW(this.vy.get(),R.clientMetadata.FB("metadata_type_player_vars")); this.Yv?.start();w||this.vy.get().B.playVideo(2)}iZ(){this.Yv?.stop();this.NN();(this.adCpn=Ut(this.dN.get(),2)?.clientPlaybackNonce||"")||MY("Media layout confirmed started, but ad CPN not set.");Dj(this.C$.get(),"onAdStart",this.adCpn);this.AJ=Date.now()}AG(){return Ut(this.dN.get(),2)?.qb}wP(){this.Al.Lv("clickthrough")}Fn(R,w){this.wJ(R,()=>{this.fL!=="rendering_stop_requested"&&(this.fL="rendering_stop_requested",this.layoutExitReason=w,SVL(this,w),this.Yv?.stop(),this.o_&&this.o_.stop(),sWr(this.s0.get(), !0),this.shrunkenPlayerBytesConfig?.shouldRequestShrunkenPlayerBytes&&this.s0.get().eQ(!1))})}onCueRangeEnter(R){R!==this.fv?MY("Received CueRangeEnter signal for unknown layout.",this.h2(),this.xB(),{cueRangeId:R}):(this.By.get().removeCueRange(this.fv),this.fv=void 0,R=this.xB().clientMetadata.FB("metadata_type_video_length_seconds"),(!Vt(this)||(this.Ck.get().getAccumulatedWatchTime()?.accumulatedWatchTimeMillis||-1)>=R*1E3-500)&&this.qM(R,!0),this.Nr("complete"))}tb(R){R!=="abandoned"&&Dj(this.C$.get(), "onAdComplete"); Dj(this.C$.get(),"onAdEnd",this.adCpn)}NN(){this.fv=`adcompletioncuerange:${this.xB().layoutId}`;this.By.get().addCueRange(this.fv,0x7ffffffffffff,0x8000000000000,!1,this,2,2)}onCueRangeExit(){}HF(R){this.fL==="rendering"&&(this.shrunkenPlayerBytesConfig&&this.shrunkenPlayerBytesConfig.shouldRequestShrunkenPlayerBytes&&R>=(this.shrunkenPlayerBytesConfig.playerProgressOffsetSeconds||0)&&this.s0.get().eQ(!0),Vt(this)?(R=this.Ck.get().getAccumulatedWatchTime()?.accumulatedWatchTimeMillis||-1,R>0&&this.qM(R/ 1E3)):this.qM(R))}qM(R,w=!1){super.qM(R,w);w=Date.now()-this.AJ;const p=R*1E3,r={contentCpn:this.G5(),adCpn:Ut(this.dN.get(),2)?.clientPlaybackNonce||""};if(R-this.Jk>=5){const f=w{this.callback.mU(this.slot,this.layout,w)}); this.s0.get().B.KZ();aW(this.vy.get(),{});R=ZD(this.s0.get(),1);R.isPaused()&&!R.L(2)&&this.s0.get().playVideo();this.s0.get().removeListener(this);this.hx&&BDD(this)}OR(R){if(R.state.isError())this.VO(R.state.Yu?.errorCode,new wJ("There was a player error during this media layout.",{playerErrorCode:R.state.Yu?.errorCode},"ADS_CLIENT_ERROR_MESSAGE_PLAYER_ERROR"),"ADS_CLIENT_ERROR_TYPE_ENTER_LAYOUT_FAILED");else{var w=on(this);w&&w.OR(R)}}nS(){}VB(){}HK(){}vK(){}DZ(){}yL(){}Rk(){}VG(){}BK(){}hF(){}Rh(){}yf(){}oa(){}e4(R, w,p){EU(this,R,w,p)}Ay(R,w){EU(this,R,w,"error")}};var lJb=class extends g.f5{constructor(R,w,p,r,f,G,I){super();this.callback=R;this.vy=w;this.s0=p;this.Zf=r;this.YG=f;this.sC=G;this.BS=I;this.Ik=!0;this.hx=!1}h2(){return this.YG.h2()}xB(){return this.YG.xB()}init(){const R=this.xB().clientMetadata.FB("metadata_type_player_bytes_layout_controls_callback_ref");R&&(R.current=this);this.q1()}q1(){this.YG.init()}release(){const R=this.xB().clientMetadata.FB("metadata_type_player_bytes_layout_controls_callback_ref");R&&(R.current=null);this.GG()}GG(){this.YG.release()}mX(){this.YG.mX()}BE(){this.YG.BE()}Lc(R, w){MY("Unexpected onSkipRequested from PlayerBytesVodSingleLayoutRenderingAdapter. Skip should be handled by Triggers",this.h2(),this.xB(),{requestingSlot:R,requestingLayout:w})}startRendering(R){R.layoutId!==this.xB().layoutId?this.callback.qO(this.h2(),R,new wJ("Tried to start rendering an unknown layout, this adapter "+`requires LayoutId: ${this.xB().layoutId}`+`and LayoutType: ${this.xB().layoutType}`,void 0,"ADS_CLIENT_ERROR_MESSAGE_UNKNOWN_LAYOUT"),"ADS_CLIENT_ERROR_TYPE_ENTER_LAYOUT_FAILED"): (this.s0.get().addListener(this),Zj(this.sC(),this),$cH(this.Zf.get()),Fhx(this.BS.get())||vJ(this.s0.get()),this.YG.startRendering(R))}Fn(R,w){this.hx=!0;this.YG.Fn(R,w);this.s0.get().B.KZ();aW(this.vy.get(),{});R=ZD(this.s0.get(),1);R.isPaused()&&!R.L(2)&&this.s0.get().playVideo();this.s0.get().removeListener(this);this.hx&&this.YG.NC()}zK(R,w){this.YG.zK(R,w)}mU(R,w,p){w.layoutId===this.xB().layoutId&&(this.hx=!1,YV(this.sC(),this));this.YG.mU(R,w,p);w.layoutId===this.xB().layoutId&&D3(this.Zf.get())}HF(R){this.YG.HF(R)}OR(R){R.state.isError()? this.VO(R.state.Yu?.errorCode,new wJ("There was a player error during this media layout.",{playerErrorCode:R.state.Yu?.errorCode},"ADS_CLIENT_ERROR_MESSAGE_PLAYER_ERROR"),"ADS_CLIENT_ERROR_TYPE_ENTER_LAYOUT_FAILED"):this.YG.OR(R)}VO(R,w,p){this.YG.VE(R,w,p)}onFullscreenToggled(R){this.YG.onFullscreenToggled(R)}jL(R){this.YG.jL(R)}DJ(R){this.YG.DJ(R)}onVolumeChange(){this.YG.onVolumeChange()}nS(){}VB(){}HK(){}vK(){}DZ(){}yL(){}Rk(){}VG(){}BK(){}hF(){}Rh(){}yf(){}oa(){}};var mvD=class{constructor(R,w,p,r,f,G,I,C,u,m){this.callback=R;this.slot=w;this.layout=p;this.dN=r;this.V2=f;this.uU=G;this.s0=I;this.Al=C;this.D$=u;this.D=m;this.driftRecoveryMs=this.layout.clientMetadata.FB("metadata_type_drift_recovery_ms")||null;this.G=this.layout.clientMetadata.FB("metadata_type_prefetch_metadata")!==void 0}h2(){return this.slot}xB(){return this.layout}init(){this.uU.get().addListener(this);this.s0.get().addListener(this);var R=this.layout.clientMetadata.FB("metadata_type_layout_enter_ms"); var w=this.layout.clientMetadata.FB("metadata_type_layout_exit_ms");if(this.G){var p=this.uU.get().Wf.slice(-1)[0];p!==void 0&&(R=p.startSecs*1E3,w=(p.startSecs+p.W1)*1E3)}this.fR(R,w);p=this.dN.get().q6?.clientPlaybackNonce;const r=this.layout.UQ.adClientDataEntry;Mm(this.D$.get(),{daiStateTrigger:{filledAdsDurationMs:w-R,contentCpn:p,adClientData:r}});var f=this.uU.get();f=qs_(f.O,R,w);f!==null&&(Mm(this.D$.get(),{daiStateTrigger:{filledAdsDurationMs:f-R,contentCpn:p,cueDurationChange:"DAI_CUE_DURATION_CHANGE_SHORTER", adClientData:r}}),this.V2.get().tG(f,w))}release(){this.GG();this.uU.get().removeListener(this);this.s0.get().removeListener(this)}startRendering(){this.B7();this.callback.zK(this.slot,this.layout)}Fn(R,w){this.J(w);this.driftRecoveryMs!==null&&(co(this,{driftRecoveryMs:this.driftRecoveryMs.toString(),breakDurationMs:Math.round(AkP(this)-this.layout.clientMetadata.FB("metadata_type_layout_enter_ms")).toString(),driftFromHeadMs:Math.round(this.s0.get().B.t9()*1E3).toString()}),this.driftRecoveryMs= null);this.callback.mU(this.slot,this.layout,w)}Rr(){return!1}Pg(R){const w=this.layout.clientMetadata.FB("metadata_type_layout_enter_ms"),p=this.layout.clientMetadata.FB("metadata_type_layout_exit_ms");R*=1E3;w<=R&&RG.xB().clientMetadata.FB("metadata_type_media_sub_layout_index")-I.xB().clientMetadata.FB("metadata_type_media_sub_layout_index")); R.forEach(G=>{const I=p,C=G.xB().clientMetadata.FB("metadata_type_video_length_seconds"),u=Math.min(I+C*1E3,w);p=u;r++;f.push(C);G.fR(I,u)})}else this.O.forEach(G=>{G.init()}); this.C!=null&&Po(this.D$.get(),"ads_ssmplra_init",`lid.${this.layout.layoutId};smlid.${this.C}`)}GG(){this.dN.get().removeListener(this);this.L=null;this.O.forEach(R=>{R.release()})}B7(){if(this.L)MY("Failed to restart rendering",this.slot,this.layout,{hasSurveyMediaSubLayout:String(!!this.C)}); else{var R=this.dN.get().q6?.layoutId;ykd(this,R)}}J(R){this.L?.qB?.Fn(this.L?.qB?.xB(),R);this.L=null}Hg({videoId:R,layoutId:w}){R==="nPpU29QrbiU"&&Po(this.D$.get(),"ads_ssmplra_opdcs",`vid.${R};lid.${this.layout.layoutId};smlid.${this.C};slrs.${!!this.L};slrslid.${this.L?.qB?.xB().layoutId}`);this.L&&(this.L.qB?.xB().layoutId===w?MY("Unexpected transition into the same layout ID",this.slot,this.layout,{layoutId:w}):(this.L.qB?.Fn(this.L.qB?.xB(),"normal"),ykd(this,w)))}K(){}OR(){}onFullscreenToggled(){}};var BRx=class{constructor(R,w,p,r,f,G,I,C,u,m,z,B,W,x){this.callback=R;this.slot=w;this.layout=p;this.V2=r;this.Al=f;this.s0=G;this.WN=I;this.kB=C;this.UK=u;this.BS=m;this.D$=z;this.dN=B;this.By=W;this.YB=x;this.SO=!0;this.iU=this.fL=null;this.adCpn=void 0;this.L=!1;R=this.layout.clientMetadata.FB("METADATA_TYPE_INTERACTIONS_AND_PROGRESS_LAYOUT_COMMANDS")?.progressCommands||[];this.C=new qO(x,R,p.layoutId,()=>this.layout.clientMetadata.FB("metadata_type_video_length_seconds")*1E3)}h2(){return this.slot}xB(){return this.layout}fR(R, w){this.layout.clientMetadata.FB("metadata_type_player_bytes_callback_ref").current=this; this.iU=Vdd(this.slot,this.layout,this.layout.clientMetadata.FB("metadata_type_player_vars"),R,w,this.layout.clientMetadata.FB("metadata_type_video_length_seconds")*1E3,this.V2.get(),this.WN.get(),()=>{var p={...Z3(this.layout)};var r=this.slot.clientMetadata.FB("metadata_type_fulfilled_layout")||this.slot.fulfilledLayout;const f=r.clientMetadata.FB("metadata_type_sub_layouts")||r.u9;r={...Z3(r),adPlacementConfig:r.clientMetadata.FB("metadata_type_ad_placement_config"),subLayouts:(f||[]).map(Z3)}; return{layoutType:"LAYOUT_TYPE_COMPOSITE_PLAYER_BYTES",...p,compositeLayout:r,hasSurveyOverlay:ey(this.layout.clientMetadata,"metadata_type_survey_overlay"),surveyOverlay:this.layout.clientMetadata.FB("metadata_type_survey_overlay")}},this.D$.get()); this.s0.get().addListener(this);R=this.layout.clientMetadata.FB("metadata_type_video_length_seconds");w=this.layout.clientMetadata.FB("metadata_type_active_view_traffic_type");PS(this.layout.Ig)&&Yz(this.kB.get(),this.layout.layoutId,{I7:w,V0:R,listener:this});v5x(this.callback,this.slot,this.layout);N4W(this.callback,this.slot,this.layout)}init(){const R=this.layout.clientMetadata.FB("metadata_type_layout_enter_ms"),w=this.layout.clientMetadata.FB("metadata_type_layout_exit_ms");this.fR(R,w)}release(){this.s0.get().removeListener(this); PS(this.layout.Ig)&&FN(this.kB.get(),this.layout.layoutId);this.BS.get();var R=this.callback,w=this.slot,p=this.layout;for(const r of R.C)r.hF(w,p);$z(this.BS.get())&&(this.fv&&(Po(this.D$.get(),"ads_ccru",`acpn.${Ut(this.dN.get(),2)?.clientPlaybackNonce};cr.${this.fv}`),this.By.get().removeCueRange(this.fv)),this.fv=void 0)}startRendering(){ey(this.layout.clientMetadata,"metadata_type_survey_overlay")&&Po(this.D$.get(),"ads_ssmlra_srs",`lid.${this.layout.layoutId}`);if(this.fL)MY("Expected the layout not to be entered before start rendering", this.slot,this.layout,{hasSurveyOverlay:ey(this.layout.clientMetadata,"metadata_type_survey_overlay"),surveyOverlay:this.layout.clientMetadata.FB("metadata_type_survey_overlay")});else{this.fL={tU:null,HP:!1};this.L=!1;XN(this.BS.get())&&(this.adCpn=Ut(this.dN.get(),2)?.clientPlaybackNonce);this.BS.get().B.V().experiments.XB("html5_disable_sodar_for_tvhtml5")||oEY(this.slot,this.layout,this.UK.get());PS(this.layout.Ig)&&HN6(this.kB.get(),this.layout.layoutId);this.Al.Nr("start");if(GA(this.BS.get())){const R= ZD(this.s0.get()),w=this.layout.clientMetadata.FB("metadata_type_video_length_seconds"),p=Np(this.s0.get(),2,!1);tdD(this.Al,this.fL.tU,R,w,p,()=>void PFW(this,"teois"),Ut(this.dN.get(),1).L$)}k_Y(this.callback,this.slot,this.layout); $z(this.BS.get())&&(this.adCpn||MY("Media layout confirmed started, but ad CPN not set."),this.NN());ey(this.layout.clientMetadata,"metadata_type_survey_overlay")&&Po(this.D$.get(),"ads_ssmlra_sre",`lid.${this.layout.layoutId}`)}}Fn(R,w){if(this.fL){if(GA(this.BS.get()))if(this.iU===null)MY("Unexpected media sub layout exited without a timeline playback ID");else{R=this.layout.clientMetadata.FB("metadata_type_video_length_seconds");const p=kz(this.s0.get(),this.iU);XN(this.BS.get())&&this.adCpn=== void 0&&MY("Expected ad CPN in SSDAI macro data",this.slot,this.layout,{contentCpn:this.layout.clientMetadata.FB("metadata_type_content_cpn")});FP6(this.Al,p,this.adCpn);Xg(this.Al,null,this.fL.tU,R,p,Ut(this.dN.get(),1).L$,r=>void aJI(this,r,"fue"),XN(this.BS.get()),$z(this.BS.get())); HL(this.BS.get())&&this.qM(p,!0)}this.fL=null;S2r(this.callback,this.slot,this.layout,this.L&&this.BS.get().B.V().Y("dai_layout_log_skip_exit_reason")?"skipped":w)}else MY("Expected the layout to be entered before stop rendering",this.slot,this.layout)}onCueRangeEnter(R){if(R!==this.fv)MY("Received CueRangeEnter signal for unknown layout.",this.h2(),this.xB(),{cueRangeId:R});else if(this.adCpn===void 0&&MY("Expected ad CPN in SSDAI macro data",this.slot,this.layout,{contentCpn:this.layout.clientMetadata.FB("metadata_type_content_cpn")}), FU(this.Al,"impression")&&GA(this.BS.get()))if(this.iU===null)MY("Unexpected cue range enter without a timeline playback ID");else{const w=kz(this.s0.get(),this.iU);Po(this.D$.get(),"ads_ccre",`cpn.${this.layout.clientMetadata.FB("metadata_type_content_cpn")};acpn.${Ut(this.dN.get(),2)?.clientPlaybackNonce};cr.${R};cts.${w}`);this.By.get().removeCueRange(this.fv);this.fv=void 0;HL(this.BS.get())&&this.qM(w,!0);this.Al.Nr("complete")}}onCueRangeExit(){}VE(){}NC(){}HF(R){if(this.fL){if(FU(this.Al,"impression")){const w= ZD(this.s0.get()),p=this.layout.clientMetadata.FB("metadata_type_video_length_seconds");nn(this.Al,w,R,this.fL.tU,p,r=>void aJI(this,r,"tpaqe")); HL(this.BS.get())&&this.qM(R)}this.fL.tU=R}}qM(R,w=!1){this.fL&&J6(this.C,R*1E3,w)}OR(R){if(this.fL){GA(this.BS.get())||this.fL.HP||(this.fL.HP=!0,R=new g.ll(R.state,new g.Gf));var w=this.layout.clientMetadata.FB("metadata_type_video_length_seconds"),p=Np(this.s0.get(),2,!1);an(this.Al,this.fL.tU,R,w,p,Ut(this.dN.get(),1).L$,!GA(this.BS.get()),()=>void PFW(this,"teosc"))}}onFullscreenToggled(R){Oex(this.Al,R)}jL(){}nS(){}DJ(){}Lc(R,w){R=this.D$.get(); var p=FU(this.Al,"impression"),r=FU(this.Al,"skip");var f=!!this.Al.O.get("skip")?.length;Po(R,"ads_dsr",`ti.${p};ts.${r};hp.${f};cpn.${this.layout.clientMetadata.FB("metadata_type_content_cpn")};acpn.${Ut(this.dN.get(),2)?.clientPlaybackNonce};sl.${w.clientMetadata.FB("metadata_type_linked_player_bytes_layout_id")===this.layout.layoutId}`);FU(this.Al,"impression")&&this.Al.Nr("skip");w=Ut(this.dN.get(),1).L$;this.L=!0;this.V2.get().oG(w)||(this.L=!1,MY("Unexpected failure to skip a server stitched ad", this.slot,this.layout))}onVolumeChange(){}zK(){}mU(){}mX(){}BE(){}wP(){KJH(this.Al)}qR(){EE6(this.Al)}dA(){DLr(this.Al)}vT(){e9d(this.Al)}aS(){MdD(this.Al)}uq(){ckD(this.Al)}yf(){}oa(){}NN(){this.fv||(this.fv=`adcompletioncuerange:${this.xB().layoutId}`,this.By.get().addCueRange(this.fv,0x7ffffffffffff,0x8000000000000,!1,this,2,2,this.adCpn),Po(this.D$.get(),"ads_ccr",`acpn.${Ut(this.dN.get(),2)?.clientPlaybackNonce};cr.${this.fv}`))}};var Wmd=class extends mvD{constructor(R,w,p,r,f,G,I,C,u,m,z,B,W,x){super(R,w,p,r,f,I,C,u,m,B);this.WN=G;this.UK=z;this.kB=W;this.BS=x;this.iU=this.fL=null}fR(){this.layout.clientMetadata.FB("metadata_type_player_bytes_callback_ref").current=this;const R=this.layout.clientMetadata.FB("metadata_type_layout_enter_ms"),w=this.layout.clientMetadata.FB("metadata_type_layout_exit_ms");this.iU=Vdd(this.slot,this.layout,this.layout.clientMetadata.FB("metadata_type_player_vars"),R,w,this.layout.clientMetadata.FB("metadata_type_video_length_seconds")* 1E3,this.V2.get(),this.WN.get(),()=>({layoutType:"LAYOUT_TYPE_MEDIA",enterMs:R,exitMs:w,adPlacementConfig:this.layout.clientMetadata.FB("metadata_type_ad_placement_config")}),this.D$.get()); const p=this.layout.clientMetadata.FB("metadata_type_video_length_seconds"),r=this.layout.clientMetadata.FB("metadata_type_active_view_traffic_type");PS(this.layout.Ig)&&Yz(this.kB.get(),this.layout.layoutId,{I7:r,V0:p,listener:this})}GG(){PS(this.layout.Ig)&&FN(this.kB.get(),this.layout.layoutId)}B7(){if(this.fL)MY("Expected the layout not to be entered before start rendering",this.slot,this.layout);else if(this.fL={tU:null,HP:!1},oEY(this.slot,this.layout,this.UK.get()),this.Al.Nr("start"),GA(this.BS.get())){const R= ZD(this.s0.get()),w=this.layout.clientMetadata.FB("metadata_type_video_length_seconds"),p=Np(this.s0.get(),2,!1);tdD(this.Al,this.fL.tU,R,w,p,()=>void $Ll(this,"teois"),!1)}}J(){if(this.fL){if(GA(this.BS.get()))if(this.iU===null)MY("Unexpected single media layout exited without a timeline playback ID"); else{const R=this.layout.clientMetadata.FB("metadata_type_video_length_seconds"),w=kz(this.s0.get(),this.iU);FP6(this.Al,w);Xg(this.Al,null,this.fL.tU,R,w,!1,p=>void XI6(this,p,"fue"))}this.fL=null}else MY("Expected the layout to be entered before stop rendering",this.slot,this.layout)}K(R){if(this.fL){if(FU(this.Al,"impression")){const w=ZD(this.s0.get()),p=this.layout.clientMetadata.FB("metadata_type_video_length_seconds"); nn(this.Al,w,R,this.fL.tU,p,r=>void XI6(this,r,"tpaqe"))}this.fL.tU=R}}OR(R){if(this.fL){GA(this.BS.get())||this.fL.HP||(this.fL.HP=!0,R=new g.ll(R.state,new g.Gf)); var w=this.layout.clientMetadata.FB("metadata_type_video_length_seconds"),p=Np(this.s0.get(),2,!1);an(this.Al,this.fL.tU,R,w,p,!1,!GA(this.BS.get()),()=>void $Ll(this,"teosc"))}}onFullscreenToggled(R){Oex(this.Al,R)}wP(){KJH(this.Al)}qR(){EE6(this.Al)}dA(){DLr(this.Al)}vT(){e9d(this.Al)}aS(){MdD(this.Al)}uq(){ckD(this.Al)}};var xv_=class{constructor(R,w,p,r,f,G,I,C,u,m,z,B,W,x,q,O,e,P,c,X,Z){this.sC=R;this.lI=w;this.PN=p;this.dN=r;this.V2=f;this.s0=G;this.rl=I;this.D$=C;this.WN=u;this.uU=m;this.kB=z;this.UK=B;this.vy=W;this.By=x;this.Zf=q;this.C$=O;this.YB=e;this.YF=P;this.BS=c;this.L=X;this.context=Z}build(R,w,p,r){if(ey(p.clientMetadata,"metadata_type_dai")){var f=r.clientMetadata.FB("metadata_type_ad_placement_config");TE(r,{sy:"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(" "), Iq:["LAYOUT_TYPE_MEDIA"]})&&f!==void 0?(f=new Jn(r.Ig,this.D$,f,r.layoutId,null),f=new Wmd(R,p,r,this.dN,this.V2,this.WN,this.uU,this.s0,f,this.D$,this.UK,this.L,this.kB,this.BS)):f=null;if(f)return f;a:{var G=r.u9??r.clientMetadata.FB("metadata_type_sub_layouts");const I=r.clientMetadata.FB("metadata_type_ad_placement_config");if(TE(r,{sy:["metadata_type_layout_enter_ms","metadata_type_drift_recovery_ms","metadata_type_layout_exit_ms"],Iq:["LAYOUT_TYPE_COMPOSITE_PLAYER_BYTES"]})&&G!==void 0&&I!== void 0){f=[];for(const C of G){G=C.clientMetadata.FB("metadata_type_media_sub_layout_index");if(!TE(C,{sy:"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(" "),Iq:["LAYOUT_TYPE_MEDIA"]})||G===void 0){R=null;break a}G=new Jn(C.Ig,this.D$,I,C.layoutId,G);f.push(new BRx(w,p,C,this.V2,G,this.s0,this.WN,this.kB,this.UK,this.BS,this.D$,this.dN,this.By,this.YB))}w= new Jn(r.Ig,this.D$,I,r.layoutId);R=new zXW(R,p,r,this.dN,this.V2,this.uU,this.s0,w,this.D$,this.L,f)}else R=null}if(R)return R}else if(R=LJP(R,w,p,r,this.sC,this.lI,this.PN,this.D$,this.kB,this.UK,this.vy,this.dN,this.s0,this.rl,this.By,this.Zf,this.C$,this.YB,this.YF,this.BS,this.V2,this.context))return R;throw new wJ(`Unsupported layout with type: ${r.layoutType} and client metadata: ${cz(r.clientMetadata)} in `+"PlayerBytesLayoutRenderingAdapterFactory.");}};var EM=class{constructor(R,w,p,r,f,G,I,C,u,m,z,B,W,x,q,O,e,P){this.sC=R;this.lI=w;this.PN=p;this.D$=r;this.kB=f;this.UK=G;this.vy=I;this.dN=C;this.s0=u;this.rl=m;this.By=z;this.Zf=B;this.C$=W;this.YB=x;this.YF=q;this.BS=O;this.V2=e;this.context=P}build(R,w,p,r){if(R=LJP(R,w,p,r,this.sC,this.lI,this.PN,this.D$,this.kB,this.UK,this.vy,this.dN,this.s0,this.rl,this.By,this.Zf,this.C$,this.YB,this.YF,this.BS,this.V2,this.context))return R;throw new wJ(`Unsupported layout with type: ${r.layoutType} and client metadata: ${cz(r.clientMetadata)} in `+ "PlayerBytesVodOnlyLayoutRenderingAdapterFactory.");}};var ltr=class extends j8{constructor(R,w,p,r){super("survey-interstitial",R,w,p,r)}};var LmP=class extends Lf{constructor(R,w,p,r,f){super(p,R,w,r);this.D$=f;R=w.clientMetadata.FB("metadata_type_ad_placement_config");this.Al=new Jn(w.Ig,f,R,w.layoutId)}startRendering(R){const w=DT(this.Al),p={adsClientData:this.layout.UQ};this.L.push(new ltr(this.layout.clientMetadata.FB("metadata_type_valid_survey_text_interstitial_renderer"),w,this.xB().layoutId,p));super.startRendering(R);this.callback.zK(this.slot,R)}xF(R,w){w!==this.layout.layoutId||R!=="survey-interstitial"&&R!=="button"||((R= this.layout.clientMetadata.FB("metadata_type_player_bytes_layout_controls_callback_ref").current)?R.Lc(this.slot,this.layout):MY("Tried to skip SurveyInterstitial but PlayerBytes callback is null"))}Gy(){super.Gy()}};var Fg=new g.dg(320,63);var qKI=class extends j8{constructor(R,w,p,r){super("invideo-overlay",R,w,p,r);this.interactionLoggingClientData=r}};var ALl=class extends Lf{constructor(R,w,p,r,f,G,I,C,u,m,z){super(f,R,w,r);this.D$=p;this.G=G;this.s0=I;this.YB=C;this.BS=u;this.J=m;this.K=z;this.Al=nEI(w,p)}HF(){}OR(){}onFullscreenToggled(){}jL(R){R&&WQ(this.G,this.layout)}nS(){}DJ(R){const w=Tf(this.layout);if(this.D=jO(R,mpD(this.s0.get())))w.onErrorCommand&&this.YB.get().executeCommand(w.onErrorCommand,this.layout.layoutId),WQ(this.G,this.layout)}onVolumeChange(){}nH(){return this.xB().layoutId}xn(){return this.D}xF(R){this.K.xF(R);R==="in_video_overlay_close_button"&& WQ(this.G,this.layout)}n7(R){R==="invideo-overlay"&&WQ(this.G,this.layout)}Z6(){this.K.Z6()}startRendering(R){super.startRendering(R);this.callback.zK(this.slot,R);this.J.fU=this}Fn(R,w){super.Fn(R,w);LT(this.J,this)}init(){super.init();TT(this.D$.get(),this);this.s0.get().addListener(this);this.L.push(new qKI(Tf(this.layout),DT(this.Al),this.layout.layoutId,{adsClientData:this.layout.UQ}))}release(){super.release();this.s0.get().removeListener(this);ii(this.D$.get(),this)}yf(){}oa(){}};var bOl=class extends Lf{constructor(R,w,p,r,f,G,I,C,u,m,z,B){super(f,R,w,r);this.D$=p;this.G=G;this.U=I;this.s0=C;this.YB=u;this.BS=m;this.J=z;this.K=B;this.Al=nEI(w,p)}init(){super.init();TT(this.D$.get(),this);this.s0.get().addListener(this);this.L.push(new qKI(Tf(this.layout),DT(this.Al),this.layout.layoutId,{adsClientData:this.layout.UQ}))}Z6(){this.K.Z6()}startRendering(R){super.startRendering(R);this.callback.zK(this.slot,R);this.J.fU=this}Fn(R,w){super.Fn(R,w);LT(this.J,this)}xF(R){this.K.xF(R); R==="in_video_overlay_close_button"&&WQ(this.G,this.layout)}R1(R){if(R==="invideo-overlay"){R=SOb(this.U,this.layout);for(const w of R)w.stop()}}n7(R){R==="invideo-overlay"&&WQ(this.G,this.layout)}v3(R){if(R==="invideo-overlay"){R=SOb(this.U,this.layout);for(const w of R)w.start()}}HF(){}OR(){}onFullscreenToggled(){}jL(R){R&&WQ(this.G,this.layout)}nS(){}DJ(R){const w=Tf(this.layout),p=w.contentSupportedRenderer.imageOverlayAdContentRenderer;if(this.D=jO(R,mpD(this.s0.get()),YsP(p.image)))w.onErrorCommand&& this.YB.get().executeCommand(w.onErrorCommand,this.layout.layoutId),WQ(this.G,this.layout)}onVolumeChange(){}nH(){return this.xB().layoutId}xn(){return this.D}release(){super.release();this.s0.get().removeListener(this);ii(this.D$.get(),this)}yf(){}oa(){}};var Dh=class{constructor(R){this.s0=R;this.L=!1}xF(R){R==="ad-info-hover-text-button"&&((this.L=this.s0.get().BN(1))||this.s0.get().pauseVideo())}Z6(){this.L||this.s0.get().resumeVideo(1)}};var yLL=class extends j8{constructor(R,w,p){super("survey",R,{},w,p)}};var VAd=class extends Lf{constructor(R,w,p,r,f,G,I){super(p,R,w,r);this.G=f;this.s0=G;this.BS=I}init(){super.init();this.s0.get().addListener(this)}startRendering(R){const w=this.layout.clientMetadata.FB("METADATA_TYPE_VALID_INSTREAM_SURVEY_AD_RENDERER_FOR_VOD");this.L.push(new yLL(w,this.layout.layoutId,{adsClientData:this.layout.UQ}));super.startRendering(R);this.callback.zK(this.slot,R)}zK(){}xF(R,w){w!==this.layout.layoutId||R!=="ad-info-icon-button"&&R!=="ad-info-dialog-close-button"||((w=this.layout.clientMetadata.FB("metadata_type_player_bytes_layout_controls_callback_ref").current)? R==="ad-info-icon-button"?w.mX(this.slot,this.layout):R==="ad-info-dialog-close-button"&&w.BE(this.slot,this.layout):MY("Tried to use LayoutControlsCallback on Survey but it is null",this.slot,this.layout,{ComponentType:R}))}DJ(R){R.width<450&&WQ(this.G,this.layout)}onVolumeChange(){}HF(){}onFullscreenToggled(){}jL(){}nS(){}OR(){}yf(){}oa(){}Gy(){super.Gy()}release(){super.release();this.s0.get().removeListener(this)}};var oTD=class{constructor(R,w,p,r,f,G,I,C,u,m){this.rB=R;this.s0=w;this.D$=p;this.G=r;this.kB=f;this.C=G;this.O=I;this.YB=C;this.BS=u;this.L=m}build(R,w,p,r){if(w=vS(R,p,r,this.rB,this.s0,this.D$,this.G,this.L,this.BS))return w;if(TE(r,ZeI()))return new bOl(p,r,this.D$,this.rB,R,this.C,this.O,this.s0,this.YB,this.BS,this.L,new Dh(this.s0));if(TE(r,dLY()))return new ALl(p,r,this.D$,this.rB,R,this.C,this.s0,this.YB,this.BS,this.L,new Dh(this.s0));if(TE(r,{sy:["METADATA_TYPE_VALID_INSTREAM_SURVEY_AD_RENDERER_FOR_VOD"], Iq:["LAYOUT_TYPE_SURVEY"]}))return new VAd(p,r,R,this.rB,this.C,this.s0,this.BS);if(TE(r,{sy:["metadata_type_player_bytes_layout_controls_callback_ref","metadata_type_valid_survey_text_interstitial_renderer","metadata_type_ad_placement_config"],Iq:["LAYOUT_TYPE_VIDEO_INTERSTITIAL_BUTTONED_LEFT"]}))return new LmP(p,r,R,this.rB,this.D$);if(TE(r,pEl()))return new IGI(p,r,R,this.rB,this.s0,this.BS);throw new wJ(`Unsupported layout with type: ${r.layoutType} and client metadata: ${cz(r.clientMetadata)} in `+ "WebDesktopMainInPlayerLayoutRenderingAdapterFactory.");}};var tAl=class{constructor(R,w,p,r,f,G,I,C,u,m){this.rB=R;this.s0=w;this.D$=p;this.G=r;this.kB=f;this.C=G;this.O=I;this.YB=C;this.BS=u;this.L=m}build(R,w,p,r){if(w=vS(R,p,r,this.rB,this.s0,this.D$,this.G,this.L,this.BS))return w;if(TE(r,ZeI()))return new bOl(p,r,this.D$,this.rB,R,this.C,this.O,this.s0,this.YB,this.BS,this.L,new Dh(this.s0));if(TE(r,dLY()))return new ALl(p,r,this.D$,this.rB,R,this.C,this.s0,this.YB,this.BS,this.L,new Dh(this.s0));throw new wJ(`Unsupported layout with type: ${r.layoutType} and client metadata: ${cz(r.clientMetadata)} in `+ "WebEmbeddedInPlayerLayoutRenderingAdapterFactory.");}};var OOd=class extends rux{constructor(R,w,p,r,f,G,I,C,u,m){super(R,w,p,r,f,G,I,u);this.dw=C;this.dN=m}startRendering(R){super.startRendering(R);if(R.renderingContent?S4l(R,Ut(this.dN.get(),2)||void 0):this.layout.clientMetadata.FB("metadata_ad_video_is_listed")){const w=R.renderingContent?UGl(R,Ut(this.dN.get(),2)||void 0):this.layout.clientMetadata.FB("metadata_type_ad_info_ad_metadata");R=this.dw.get();g.m1(R.B,"onAdMetadataAvailable",w)}}};var KmL=class{constructor(R,w,p,r,f,G,I){this.rB=R;this.s0=w;this.D$=p;this.C=r;this.dw=f;this.L=G;this.dN=I}build(R,w,p,r){if(TE(r,FJI())||r.layoutType==="LAYOUT_TYPE_MEDIA_LAYOUT_PLAYER_OVERLAY"&&g.F(r.renderingContent,Ql)!==void 0)return new OOd(R,p,r,this.rB,this.s0,this.D$,this.C,this.dw,this.L,this.dN);throw new wJ(`Unsupported layout with type: ${r.layoutType} and client metadata: ${cz(r.clientMetadata)} in `+"WebRemixInPlayerLayoutRenderingAdapterFactory.");}};var ETD=class{constructor(R,w,p,r,f,G,I,C){this.rB=R;this.s0=w;this.D$=p;this.C=r;this.dw=f;this.L=G;this.BS=I;this.dN=C}build(R,w,p,r){if(TE(r,FJI()))return new OOd(R,p,r,this.rB,this.s0,this.D$,this.C,this.dw,this.L,this.dN);if(R=vS(R,p,r,this.rB,this.s0,this.D$,this.C,this.L,this.BS))return R;throw new wJ(`Unsupported layout with type: ${r.layoutType} and client metadata: ${cz(r.clientMetadata)} in `+"WebUnpluggedInPlayerLayoutRenderingAdapterFactory.");}};var fz=class{constructor(R,w){this.adPodIndex=R;this.L=w.length;this.adBreakLengthSeconds=w.reduce((r,f)=>r+f,0); let p=0;for(R+=1;Rthis.triggerId,R)}};var O0=class{constructor(R,w,p){this.triggeringSlotId=w;this.triggerType="TRIGGER_TYPE_SLOT_ID_EXITED";this.triggerId=p||R(this.triggerType)}clone(R){return new O0(()=>this.triggerId,R)}};var O9=class{constructor(R,w){this.triggeringSlotId=w;this.triggerType="TRIGGER_TYPE_SLOT_ID_FULFILLED_EMPTY";this.triggerId=R(this.triggerType)}clone(R){return new O9(()=>this.triggerId,R)}};var ty=class{constructor(R,w){this.triggeringSlotId=w;this.triggerType="TRIGGER_TYPE_SLOT_ID_FULFILLED_NON_EMPTY";this.triggerId=R(this.triggerType)}clone(R){return new ty(()=>this.triggerId,R)}};var oE=class{constructor(R,w,p){this.triggeringSlotId=w;this.triggerType="TRIGGER_TYPE_SLOT_ID_SCHEDULED";this.triggerId=p||R(this.triggerType)}clone(R){return new oE(()=>this.triggerId,R)}};var V_=class{constructor(R,w){this.triggeringSlotId=w;this.triggerType="TRIGGER_TYPE_SLOT_ID_UNSCHEDULED";this.triggerId=R(this.triggerType)}clone(R){return new V_(()=>this.triggerId,R)}};var aE=class{constructor(R,w,p){this.triggeringLayoutId=w;this.triggerType="TRIGGER_TYPE_SURVEY_SUBMITTED";this.triggerId=p||R(this.triggerType)}};var Zk=class{constructor(R,w,p,r){this.durationMs=w;this.triggeringLayoutId=p;this.triggerType="TRIGGER_TYPE_TIME_RELATIVE_TO_LAYOUT_ENTER";this.triggerId=r||R(this.triggerType)}};var x3=class{constructor(R,w,p,r){this.category=R;this.trigger=w;this.slot=p;this.layout=r}};var e0=class extends g.f5{constructor(R,w,p,r,f,G,I){super();this.BS=R;this.L=w;this.C=p;this.dN=r;this.G=f;this.O=G;this.vy=I}};var aI={layoutExitMuteTriggers:[],layoutExitNormalTriggers:[],layoutExitSkipTriggers:[],layoutExitUserCancelledTriggers:[],layoutExitUserInputSubmittedTriggers:[]};var MO={mu:1,SK:2,wI:3,1:"LOAD_POLICY_ALWAYS",2:"LOAD_POLICY_BY_PREFERENCE",3:"LOAD_POLICY_BY_REQUEST"};var cl=class{constructor(R,w,p,r,f,G,I,C,u,m=1){this.G=R;this.C=w;this.L=p;this.BS=r;this.L3=f;this.O=G;this.s0=I;this.PK=C;this.ZZ=u;this.loadPolicy=m}};var Pl=class extends g.f5{constructor(R,w,p,r,f,G,I,C){super();this.C=R;this.O=w;this.uU=r;this.s0=f;this.BS=G;this.D$=I;this.V2=C;this.L=null;p.get().addListener(this);this.addOnDisposeCallback(()=>{p.cS()||p.get().removeListener(this)}); r.get().addListener(this);this.addOnDisposeCallback(()=>{r.cS()||r.get().removeListener(this)})}Yx(R){if(this.L)MY("Unexpected multiple fetch instructions for the current content"); else{this.L=R;for(const w of this.uU.get().Wf)uP(this,this.L,w)}}Rr(R){if(!this.L)return this.BS.get().B.V().Y("high_ccv_client_side_caching_h5")||this.V2?.get().FO(R.identifier),Po(this.D$.get(),"ads_nfi",`a.cpoa;cid.${R.identifier}`),!1;uP(this,this.L,R);return!0}Pg(){}Ap(R){this.L&&this.L.contentCpn!==R&&(MY("Fetch instructions carried over from previous content video",void 0,void 0,{contentCpn:R,fetchInstructionsCpn:this.L.contentCpn}),this.L=null)}Fj(R){this.L&&this.L.contentCpn!==R&&MY("Expected content video of the current fetch instructions to end", void 0,void 0,{contentCpn:R,fetchInstructionsCpn:this.L.contentCpn},!0);this.L=null}Gy(){super.Gy();this.L=null}};var DvY=["metadata_type_content_cpn","metadata_type_player_bytes_callback_ref","metadata_type_instream_ad_player_overlay_renderer","metadata_type_ad_placement_config"],eX6=["metadata_type_content_cpn","metadata_type_player_bytes_callback_ref","metadata_type_player_overlay_layout_renderer","metadata_type_ad_placement_config"];var aF=class extends g.f5{constructor(R,w,p,r,f,G,I,C){super();this.G=R;this.J=DvY;this.K=w;this.O=p;this.L=r;this.C=f;this.L3=G;this.BS=I;this.dN=C;this.Ik=!0}zK(R,w){if(w.layoutType==="LAYOUT_TYPE_MEDIA"&&(MH(w,this.J)||MH(w,eX6))){var p=Ut(this.dN.get(),2),r=this.G(w,p||void 0);r?t6(this.O.get(),"OPPORTUNITY_TYPE_PLAYER_BYTES_MEDIA_LAYOUT_ENTERED",()=>{const f=[z7_(this.L.get(),r.contentCpn,r.pg,G=>this.K(G.slotId,"core",r,nH(this.L3.get(),G)),r.inPlayerSlotId)]; r.instreamAdPlayerUnderlayRenderer&&OE(this.BS.get())&&f.push(JTH(this,r,r.instreamAdPlayerUnderlayRenderer));return f}):MY("Expected MediaLayout to carry valid opportunity on entered",R,w)}}VB(){}HK(){}DZ(){}vK(){}yL(){}Rk(){}VG(){}BK(){}hF(){}Rh(){}mU(){}};var $l=class extends g.f5{constructor(R,w,p,r,f,G,I){super();this.C=R;this.L=w;this.O=p;this.G=r;this.dN=f;this.s0=G;this.Zf=I}Ap(R,w,p,r,f,G,I){const C=Ut(this.dN.get(),1);C.ZP?this.s0.get().TB():(XVL(this.Zf.get(),r),t6(this.C.get(),"OPPORTUNITY_TYPE_PLAYER_RESPONSE_RECEIVED",()=>yi(this.L.get(),r,f,G,R,w,I,C,"")),bTI(this.O))}Fj(){}};var XC=class extends g.f5{constructor(R){super();this.L=R}};var nf=class extends g.f5{constructor(R,w,p,r,f){super();this.C=R;this.O=w;this.By=p;this.context=f;this.L=new Map;r.get().addListener(this);this.addOnDisposeCallback(()=>{r.cS()||r.get().removeListener(this)})}onCueRangeEnter(){}onCueRangeExit(R){const w=this.L.get(R); w&&(this.L.delete(R),this.By.get().removeCueRange(R),t6(this.C.get(),"OPPORTUNITY_TYPE_THROTTLED_AD_BREAK_REQUEST_SLOT_REENTRY",()=>{var p=this.O.get();p=Ot(p.C.get(),"SLOT_TYPE_AD_BREAK_REQUEST");if(w.slotEntryTrigger){var r=w.slotId;var f=w.slotEntryTrigger;r=f.triggeringSlotId!=null&&f.triggeringSlotId===r?f.clone(p):f}else r=void 0;return[{...w,slotId:p,slotEntryTrigger:r,slotFulfillmentTriggers:VVW(w.slotId,p,w.slotFulfillmentTriggers),slotExpirationTriggers:VVW(w.slotId,p,w.slotExpirationTriggers)}]}, w.slotId))}Ap(){for(const R of this.L.keys())this.By.get().removeCueRange(R); this.L.clear()}Fj(){}};var dL=class extends g.f5{constructor(){super(...arguments);this.Ik=!0;this.MJ=new Map;this.L=new Map}VB(){}HK(R){g.uq(g.mL(),()=>{const w=this.L.get(R);w&&MY("Expected layouts to be properly unscheduled",R,void 0,{slotType:R.slotType,layoutTypes:[...w].map(p=>p.layoutType)})},0)}DZ(){}vK(){}yL(){}Rk(){}VG(){}BK(R,w){this.L.has(R)||this.L.set(R,new Set); this.L.get(R).add(w)}hF(R,w){this.MJ.has(R)&&this.MJ.get(R)===w&&MY("Unscheduled a Layout that is currently entered.",R,w);if(this.L.has(R)){var p=this.L.get(R);p.has(w)?(p.delete(w),p.size===0&&this.L.delete(R)):MY("Trying to unscheduled a Layout that was not scheduled.",R,w)}else MY("Trying to unscheduled a Layout that was not scheduled.",R,w)}zK(R,w){this.MJ.set(R,w)}mU(R){this.MJ.delete(R)}Rh(){}};var MAP=class{constructor(R,w){this.callback=R;this.slot=w}init(){}h2(){return this.slot}Nh(){this.callback.DZ(this.slot)}Sh(){this.callback.yL(this.slot)}release(){}};var Zh=class{build(R,w){return new MAP(R,w)}};var cLx=class{constructor(R,w,p){this.callback=R;this.slot=w;this.s0=p}init(){}h2(){return this.slot}Nh(){hz(this.s0.get(),"ad-showing");this.callback.DZ(this.slot)}Sh(){this.callback.yL(this.slot);HJ(this.s0.get(),"ad-showing")}release(){}};var P3L=class{constructor(R,w,p){this.callback=R;this.slot=w;this.s0=p;this.C=!1;this.L=0}init(){}h2(){return this.slot}Nh(){hz(this.s0.get(),"ad-showing");hz(this.s0.get(),"ad-interrupting");this.C=this.s0.get().isAtLiveHead();this.L=Math.ceil(Date.now()/1E3);this.callback.DZ(this.slot)}Sh(){HJ(this.s0.get(),"ad-showing");HJ(this.s0.get(),"ad-interrupting");const R=this.C?Infinity:Np(this.s0.get(),1,!0)+Math.floor(Date.now()/1E3)-this.L;this.s0.get().B.seekTo(R,void 0,void 0,1);this.callback.yL(this.slot)}release(){}};var atd=class{constructor(R,w,p){this.callback=R;this.slot=w;this.s0=p}init(){}h2(){return this.slot}Nh(){hz(this.s0.get(),"ad-showing");hz(this.s0.get(),"ad-interrupting");this.callback.DZ(this.slot)}Sh(){this.s0.get().TB();HJ(this.s0.get(),"ad-showing");HJ(this.s0.get(),"ad-interrupting");this.callback.yL(this.slot)}release(){this.s0.get().TB()}};var Yl=class{constructor(R){this.s0=R}build(R,w){if(Pz(w,["metadata_type_dai"],"SLOT_TYPE_PLAYER_BYTES"))return new cLx(R,w,this.s0);if(w.slotEntryTrigger instanceof Xt&&Pz(w,["metadata_type_served_from_live_infra"],"SLOT_TYPE_PLAYER_BYTES"))return new P3L(R,w,this.s0);if(Pz(w,[],"SLOT_TYPE_PLAYER_BYTES"))return new atd(R,w,this.s0);throw new Q(`Unsupported slot with type ${w.slotType} and client metadata: ${cz(w.clientMetadata)} in PlayerBytesSlotAdapterFactory.`);}};var $vL=class extends g.f5{constructor(R){super();this.a6=R;this.n_=new Map}};var FC=class extends $vL{constructor(R,w,p){super(R);this.BS=p;w.get().addListener(this);this.addOnDisposeCallback(()=>{w.cS()||w.get().removeListener(this)})}xF(R,w){if(w)if(R==="skip-button"){R=[]; for(const p of this.n_.values()){const r=p.trigger;r instanceof cb&&p.category==="TRIGGER_CATEGORY_LAYOUT_EXIT_USER_SKIPPED"&&r.triggeringLayoutId===w&&R.push(p)}R.length&&Hz(this.a6(),R)}else BS(this.BS.get(),"supports_multi_step_on_desktop")?R==="ad-action-submit-survey"&&BQ(this,w):R==="survey-submit"?BQ(this,w):R==="survey-single-select-answer-button"&&BQ(this,w)}H3(R){const w=[];for(const p of this.n_.values()){const r=p.trigger;r instanceof cb&&p.category==="TRIGGER_CATEGORY_LAYOUT_EXIT_USER_MUTED"&& r.triggeringLayoutId===R&&w.push(p)}w.length?Hz(this.a6(),w):MY("Mute requested but no registered triggers can be activated.")}vu(R,w,p,r){if(this.n_.has(w.triggerId))throw new Q("Tried to register duplicate trigger for slot.");if(!(w instanceof aE||w instanceof cb))throw new Q("Incorrect TriggerType: Tried to register trigger of type "+w.triggerType+" in AdUxUpdateTriggerAdapter.");this.n_.set(w.triggerId,new x3(R,w,p,r))}ek(R){this.n_.delete(R.triggerId)}R1(){}v3(){}n7(){}};var Jh=class extends g.f5{constructor(R){super();this.L=R;this.Ik=!0;this.n_=new Map;this.K=new Set;this.O=new Set;this.G=new Set;this.J=new Set;this.C=new Set}vu(R,w,p,r){if(this.n_.has(w.triggerId))throw new Q("Tried to register duplicate trigger for slot.");if(!(w instanceof Pb||w instanceof O0||w instanceof O9||w instanceof ty||w instanceof oE||w instanceof V_||w instanceof Ay||w instanceof dn||w instanceof Dk||w instanceof er||w instanceof YN||w instanceof y_))throw new Q("Incorrect TriggerType: Tried to register trigger of type "+ w.triggerType+" in AdsControlFlowEventTriggerAdapter");R=new x3(R,w,p,r);this.n_.set(w.triggerId,R);w instanceof oE&&this.K.has(w.triggeringSlotId)&&Hz(this.L(),[R]);w instanceof Pb&&this.O.has(w.triggeringSlotId)&&Hz(this.L(),[R]);w instanceof dn&&this.C.has(w.triggeringLayoutId)&&Hz(this.L(),[R])}ek(R){this.n_.delete(R.triggerId)}VB(R){this.K.add(R.slotId);const w=[];for(const p of this.n_.values())p.trigger instanceof oE&&R.slotId===p.trigger.triggeringSlotId&&w.push(p);w.length>0&&Hz(this.L(), w)}HK(R){this.K.delete(R.slotId);const w=[];for(const p of this.n_.values()){const r=p.trigger;r instanceof V_&&r.triggeringSlotId===R.slotId&&w.push(p)}w.length>0&&Hz(this.L(),w)}vK(R){const w=[];for(const p of this.n_.values()){const r=p.trigger;r instanceof Ay&&r.slotType===R.slotType&&r.L!==R.slotId&&w.push(p)}w.length>0&&Hz(this.L(),w)}DZ(R){this.O.add(R.slotId);const w=[];for(const p of this.n_.values())p.trigger instanceof Pb&&R.slotId===p.trigger.triggeringSlotId&&w.push(p);w.length>0&&Hz(this.L(), w)}yL(R){this.O.delete(R.slotId);this.G.add(R.slotId);const w=[];for(const p of this.n_.values())if(p.trigger instanceof O0)R.slotId===p.trigger.triggeringSlotId&&w.push(p);else if(p.trigger instanceof y_){const r=p.trigger;R.slotId===r.slotId&&this.C.has(r.triggeringLayoutId)&&w.push(p)}w.length>0&&Hz(this.L(),w)}Rk(R){const w=[];for(const p of this.n_.values())p.trigger instanceof O9&&R.slotId===p.trigger.triggeringSlotId&&w.push(p);w.length>0&&Hz(this.L(),w)}VG(R){const w=[];for(const p of this.n_.values())p.trigger instanceof ty&&R.slotId===p.trigger.triggeringSlotId&&w.push(p);w.length>0&&Hz(this.L(),w)}BK(R,w){this.J.add(w.layoutId)}hF(R,w){this.J.delete(w.layoutId)}zK(R,w){this.C.add(w.layoutId);const p=[];for(const f of this.n_.values())if(f.trigger instanceof dn)w.layoutId===f.trigger.triggeringLayoutId&&p.push(f);else if(f.trigger instanceof YN){var r=f.trigger;R.slotType===r.slotType&&w.layoutType===r.layoutType&&w.layoutId!==r.L&&p.push(f)}else f.trigger instanceof y_&&(r=f.trigger,w.layoutId===r.triggeringLayoutId&& this.G.has(r.slotId)&&p.push(f));p.length>0&&Hz(this.L(),p)}mU(R,w,p){this.C.delete(w.layoutId);R=[];for(const r of this.n_.values())if(r.trigger instanceof Dk&&w.layoutId===r.trigger.triggeringLayoutId&&R.push(r),r.trigger instanceof er){const f=r.trigger;w.layoutId===f.triggeringLayoutId&&f.L.includes(p)&&R.push(r)}R.length>0&&Hz(this.L(),R)}Rh(){}Ap(){this.G.clear()}Fj(){}};var XpW=class extends g.f5{constructor(R){super();this.L=R;this.n_=new Map}vu(R,w,p,r){if(this.n_.has(w.triggerId))throw new Q("Tried to register duplicate trigger for slot.");if(!(w instanceof $N))throw new Q("Incorrect TriggerType: Tried to register trigger of type "+w.triggerType+" in CloseRequestedTriggerAdapter");this.n_.set(w.triggerId,new x3(R,w,p,r))}ek(R){this.n_.delete(R.triggerId)}};var T$=class extends g.f5{constructor(R,w,p){super();this.L=R;this.context=p;this.n_=new Map;w.get().addListener(this);this.addOnDisposeCallback(()=>{w.cS()||w.get().removeListener(this)})}vu(R,w,p,r){if(this.n_.has(w.triggerId))throw new Q("Tried to register duplicate trigger for slot."); if(!(w instanceof Kt||w instanceof tW))throw new Q("Incorrect TriggerType: Tried to register trigger of type "+w.triggerType+" in ContentPlaybackLifecycleTriggerAdapter");this.n_.set(w.triggerId,new x3(R,w,p,r))}ek(R){this.n_.delete(R.triggerId)}Ap(R){const w=[];var p=w.push,r=this.n_,f=[];for(const G of r.values())G.trigger instanceof Kt&&G.trigger.TV===R&&f.push(G);p.call(w,...f);p=w.push;r=this.n_;f=[];for(const G of r.values())G.trigger instanceof tW&&G.trigger.L!==R&&f.push(G);p.call(w,...f); w.length&&Hz(this.L(),w)}Fj(R){const w=[];var p=w.push,r=this.n_;const f=[];for(const G of r.values())r=G.trigger,r instanceof tW&&r.L===R&&f.push(G);p.call(w,...f);w.length&&Hz(this.L(),w)}};var ir=class extends g.f5{constructor(R,w,p,r){super();this.C=R;this.By=w;this.s0=p;this.dN=r;this.Ik=!0;this.n_=new Map;this.L=new Set;p.get().addListener(this);this.addOnDisposeCallback(()=>{p.cS()||p.get().removeListener(this)})}vu(R,w,p,r){if(this.n_.has(w.triggerId))throw new Q("Tried to register duplicate trigger for slot."); const f=`adtriggercuerange:${w.triggerId}`;if(w instanceof Xt)iiH(this,R,w,p,r,f,w.L.start,w.L.end,w.TV,w.visible);else if(w instanceof nt)iiH(this,R,w,p,r,f,0x7ffffffffffff,0x8000000000000,w.TV,w.visible);else throw new Q("Incorrect TriggerType: Tried to register trigger of type "+w.triggerType+" in CueRangeTriggerAdapter");}ek(R){const w=this.n_.get(R.triggerId);w&&this.By.get().removeCueRange(w.cueRangeId);this.n_.delete(R.triggerId)}onCueRangeEnter(R){if(R=QA_(this,R))if(R=this.n_.get(R))if(ZD(this.s0.get()).L(32))this.L.add(R.cueRangeId); else{var w=R?.z7.trigger;(w instanceof Xt||w instanceof nt)&&Hz(this.C(),[R.z7])}}onCueRangeExit(R){(R=QA_(this,R))&&(R=this.n_.get(R))&&this.L.delete(R.cueRangeId)}OR(R){if(cs(R,16)<0){for(const w of this.L)this.onCueRangeEnter(w,!0);this.L.clear()}}VB(){}HK(){}vK(){}DZ(){}yL(){}Rk(){}VG(){}BK(){}hF(){}zK(){}mU(){}Rh(){}HF(){}onFullscreenToggled(){}jL(){}nS(){}DJ(){}onVolumeChange(){}yf(){}oa(){}};var nTI=class extends g.f5{constructor(R,w){super();this.G=R;this.C=new Map;this.O=new Map;this.L=null;w.get().addListener(this);this.addOnDisposeCallback(()=>{w.cS()||w.get().removeListener(this)}); this.L=w.get().q6?.slotId||null}vu(R,w,p,r){if(this.C.has(w.triggerId)||this.O.has(w.triggerId))throw new Q("Tried to re-register the trigger.");R=new x3(R,w,p,r);if(R.trigger instanceof Ft)this.C.set(R.trigger.triggerId,R);else if(R.trigger instanceof jr)this.O.set(R.trigger.triggerId,R);else throw new Q("Incorrect TriggerType: Tried to register trigger of type "+R.trigger.triggerType+" in LiveStreamBreakTransitionTriggerAdapter");this.C.has(R.trigger.triggerId)&&R.slot.slotId===this.L&&Hz(this.G(), [R])}ek(R){this.C.delete(R.triggerId);this.O.delete(R.triggerId)}Hg({slotId:R}){if(this.L!==R){var w=[];this.L!=null&&w.push(...hor(this.O,this.L));R!=null&&w.push(...hor(this.C,R));this.L=R;w.length&&Hz(this.G(),w)}}};var Qo=class extends g.f5{constructor(R){super();this.L=R;this.Ik=!0;this.n_=new Map}vu(R,w,p,r){if(this.n_.has(w.triggerId))throw new Q("Tried to register duplicate trigger for slot.");if(!(w instanceof M2))throw new Q("Incorrect TriggerType: Tried to register trigger of type "+w.triggerType+" in OnLayoutSelfRequestedTriggerAdapter");this.n_.set(w.triggerId,new x3(R,w,p,r))}ek(R){this.n_.delete(R.triggerId)}zK(){}mU(){}VB(){}HK(){}vK(){}DZ(){}yL(){}Rk(){}VG(){}BK(){}hF(){}Rh(){}};var hh=class extends g.f5{constructor(R){super();this.L=R;this.Ik=!0;this.n_=new Map}Rh(R,w){const p=[];for(const r of this.n_.values()){const f=r.trigger;f.opportunityType===R&&(f.associatedSlotId&&f.associatedSlotId!==w||p.push(r))}p.length&&Hz(this.L(),p)}vu(R,w,p,r){if(this.n_.has(w.triggerId))throw new Q("Tried to register duplicate trigger for slot.");if(!(w instanceof lcd))throw new Q("Incorrect TriggerType: Tried to register trigger of type "+w.triggerType+" in OpportunityEventTriggerAdapter"); this.n_.set(w.triggerId,new x3(R,w,p,r))}ek(R){this.n_.delete(R.triggerId)}VB(){}HK(){}vK(){}DZ(){}yL(){}Rk(){}VG(){}BK(){}hF(){}zK(){}mU(){}};var gL=class extends g.f5{constructor(R,w,p,r,f,G){super();this.J=R;this.uU=w;this.s0=p;this.D$=r;this.PK=G;this.L=null;this.G=!1;this.Ik=!0;this.n_=new Map;w.get().addListener(this);this.addOnDisposeCallback(()=>{w.cS()||w.get().removeListener(this)}); f.get().addListener(this);this.addOnDisposeCallback(()=>{f.cS()||f.get().removeListener(this)})}vu(R,w,p,r){R=new x3(R,w,p,r); if(w instanceof JW||w instanceof i_||w instanceof Tg||w instanceof Qi||w instanceof y9d){if(this.n_.has(w.triggerId))throw new Q("Tried to register duplicate trigger for slot.");this.n_.set(w.triggerId,R)}else throw new Q("Incorrect TriggerType: Tried to register trigger of type "+w.triggerType+" in PrefetchTriggerAdapter");}ek(R){this.n_.delete(R.triggerId)}VB(R){const w=R.slotFulfillmentTriggers.find(p=>p instanceof JW); w&&(lP(this,"TRIGGER_TYPE_NEW_SLOT_SCHEDULED_WITH_BREAK_DURATION",w.breakDurationMs,new Set([R.slotId]),!0),Po(this.D$.get(),"ads_css",`sid.${R.slotId};bd.${w.breakDurationMs}`))}HK(){}vK(){}DZ(){}yL(){}Rk(){}VG(){}BK(){}hF(){}zK(){}mU(){}Rh(){}Rr(R){if(!this.L)return Po(this.D$.get(),"ads_nfi",`a.pta;cid.${R.identifier}`),!1;this.C&&this.C.stop();this.K&&this.K.ql();const w=g0W(this,R);if(!w){var p=HiI(this);const r=this.D!==void 0&&Date.now()<=this.D+1E4;Po(this.D$.get(),"ads_ncfs",`cid.${R.identifier};cd.${R.W1.toFixed(3)};ccs.${r};cfa.${this.G};bdc.${p.length};${p.slice(0, 6).map(f=>`;bd.${f}`).join("")}`); return r?(uP(this.PK,this.L,R),!0):!1}(p=w.slot.clientMetadata.FB("metadata_type_triggering_cue_point"))?p.current=R:MY("Expected triggering cue point ref to be available",w.slot);(new g.vZ(()=>{const r=w.trigger,f=w.slot;lP(this,"TRIGGER_TYPE_LIVE_STREAM_BREAK_SCHEDULED_DURATION_MATCHED",r.breakDurationMs,new Set,!0);lP(this,"TRIGGER_TYPE_LIVE_STREAM_BREAK_SCHEDULED_DURATION_NOT_MATCHED",r.breakDurationMs,new Set,!1);let G=0;for(const I of this.n_.values()){const C=I.trigger;I.slot.slotId===f.slotId&& (this.n_.delete(C.triggerId),G++)}Po(this.D$.get(),"ads_csf",`sid.${f.slotId};bd.${r.breakDurationMs};dt.${G}`)},10)).start(); return!0}Pg(){}Ap(R){this.G=!1;this.D=Date.now();this.L&&this.L.contentCpn!==R?(MY("Fetch instructions carried over from previous content video",void 0,void 0,{contentCpn:R,fetchInstructionsCpn:this.L.contentCpn}),Ll(this)):(this.O=new g.vZ(()=>{if(this.G)delete this.O;else{var w=this.s0.get().getGetAdBreakContext();Number(w?.livePlaybackPosition?.utcTimeMillis)>0?(delete this.O,Nzd(this)):this.O?.start()}},200),this.O?.start())}Fj(R){this.L&&this.L.contentCpn!==R&&MY("Expected content video of the current fetch instructions to end", void 0,void 0,{contentCpn:R, fetchInstructionsCpn:this.L.contentCpn},!0);Ll(this)}Yx(R){if(this.L)MY("Unexpected multiple fetch instructions for the current content");else{this.L=R;R=k9Y(R);this.C=new g.vZ(()=>{Nzd(this)},R?R:6E5); this.C.start();this.K=new g.vZ(()=>{this.L&&(this.C&&(this.C.stop(),this.C.start()),v0L(this,"TRIGGER_TYPE_CUE_BREAK_IDENTIFIED"))},UTI(this.L)); R=this.s0.get().getCurrentTimeSec(1,!1);for(const w of this.uU.get().Wf)Po(this.D$.get(),"nocache",`ct.${Date.now()};cmt.${R};d.${w.W1.toFixed(3)};tw.${w.startSecs-R};cid.${w.identifier};`)}}Gy(){super.Gy();Ll(this)}};var dvx=class extends g.f5{constructor(R){super();this.O=R;this.Ik=!0;this.n_=new Map;this.L=new Map;this.C=new Map}vu(R,w,p,r){if(this.n_.has(w.triggerId))throw new Q("Tried to register duplicate trigger for slot.");if(!(w instanceof Zk))throw new Q("Incorrect TriggerType: Tried to register trigger "+`of type ${w.triggerType}`+" in TimeRelativeToLayoutEnterTriggerAdapter");this.n_.set(w.triggerId,new x3(R,w,p,r));R=this.L.has(w.triggeringLayoutId)?this.L.get(w.triggeringLayoutId):new Set;R.add(w); this.L.set(w.triggeringLayoutId,R)}ek(R){this.n_.delete(R.triggerId);if(!(R instanceof Zk))throw new Q("Incorrect TriggerType: Tried to unregister trigger "+`of type ${R.triggerType}`+" in TimeRelativeToLayoutEnterTriggerAdapter");var w=this.C.get(R.triggerId);w&&(w.dispose(),this.C.delete(R.triggerId));if(w=this.L.get(R.triggeringLayoutId))w.delete(R),w.size===0&&this.L.delete(R.triggeringLayoutId)}VB(){}HK(){}vK(){}DZ(){}yL(){}Rk(){}VG(){}BK(){}hF(){}Rh(){}zK(R,w){if(this.L.has(w.layoutId)){R=this.L.get(w.layoutId); for(const p of R)R=new g.vZ(()=>{const r=this.n_.get(p.triggerId);Hz(this.O(),[r])},p.durationMs),R.start(),this.C.set(p.triggerId,R)}}mU(){}};var Hl=class extends g.f5{constructor(){super();this.n_=new Map}vu(R,w){if(this.n_.has(w.triggerId))throw new Q("Tried to register duplicate trigger for slot.");throw new Q("Incorrect TriggerType: Tried to register trigger of type "+w.triggerType+" in VideoTransitionTriggerAdapter.");}ek(R){this.n_.delete(R.triggerId)}};var vl=class{constructor(R){this.BS=R;this.C=new Map;this.L=new Map;this.O=new Map}};var NO=class{constructor(R){this.C=R;this.L=w=>hR(this.C.get(),w)}};var kl=class{constructor(R,w,p){this.C=R;this.O=w;this.BS=p;this.L=r=>hR(this.C.get(),r)}hQ(R){return R.kind==="AD_PLACEMENT_KIND_START"}};var ZoW=class{L(R){R&&g.Rv("adsSeenClientLogging",{serializedAdServingDataEntry:R.serializedAdServingDataEntry})}};var ZOL=class extends g.f5{constructor(R,w){super();this.BS=R;this.C=w;this.eventCount=0;this.O=Ybb()()}logEvent(R){this.L(R)}L(R,w,p,r,f,G,I,C,u,m,z,B=0){BS(this.BS.get(),"h5_enable_pacf_debug_logs")&&console.log(`[PACF]: ${R}`,"slot:",f,"layout:",G,"ping:",I,"Opportunity:",{opportunityType:w,associatedSlotId:p,Qky:r,WgY:C,adSlotLoggingData:u,adLayoutLoggingData:m});try{const W=()=>{if(!this.BS.get().B.V().Y("html5_disable_client_tmp_logs")&&R!=="ADS_CLIENT_EVENT_TYPE_UNSPECIFIED"){R||MY("Empty PACF event type", f,G);var x=Xe(this.C.get());const q={eventType:R,eventOrder:++this.eventCount},O={};f&&(O.slotData=$V(x,f));G&&(O.layoutData=T4b(x,G));I&&(O.pingData={pingDispatchStatus:"ADS_CLIENT_PING_DISPATCH_STATUS_SUCCESS",serializedAdPingMetadata:I.L.serializedAdPingMetadata,pingIndex:I.index});C&&(O.triggerData=a3(C.trigger,C.category));w&&(O.opportunityData=i4_(x,w,p,r));x={organicPlaybackContext:{contentCpn:Ut(this.dN.get(),1).clientPlaybackNonce}};x.organicPlaybackContext.isLivePlayback=Ut(this.dN.get(), 1).PB;x.organicPlaybackContext.isMdxPlayback=Ut(this.dN.get(),1)?.isMdxPlayback;Ut(this.dN.get(),1)?.daiEnabled&&(x.organicPlaybackContext.isDaiContent=!0);const e=Ut(this.dN.get(),2)?.clientPlaybackNonce;e&&(x.adVideoPlaybackContext={adVideoCpn:e});x&&(O.externalContext=x);q.adClientData=O;u&&(q.serializedSlotAdServingData=u.serializedSlotAdServingDataEntry);m&&(q.serializedAdServingData=m.serializedAdServingDataEntry);z&&(q.errorInfo=z);g.Rv("adsClientStateChange",{adsClientEvent:q})}}; B&&B>0?g.uq(g.mL(),()=>W(),B):W()}catch(W){BS(this.BS.get(),"html5_log_pacf_logging_errors")&&g.uq(g.mL(),()=>{MY(W instanceof Error?W:String(W),f,G,{pacf_message:"exception during pacf logging"})})}}};var P2d=class extends ZOL{constructor(R,w,p){super(R,w);this.BS=R;this.dN=p}L(R,w,p,r,f,G,I,C,u,m,z){var B=this.BS.get();g.I1(B.B.V())?(B=this.BS.get(),B=g.Iq(B.B.V().experiments,"H5_async_logging_delay_ms")):B=void 0;super.L(R,w,p,r,f,G,I,C,u,m,z,B)}};var UM=class{constructor(){this.L=new Map}clear(){this.L.clear()}};var E9=class{constructor(R){this.L="pending";this.C=[];this.O=[];try{R(this.G.bind(this),this.reject.bind(this))}catch(w){this.reject(w)}}state(){return this.L==="fulfilled"?{state:"fulfilled",value:this.result}:this.L==="rejected"?{state:"rejected",reason:this.error}:{state:"pending"}}G(R){Lv(R)||Do(R)?PQ(e3(R),this.G.bind(this),this.reject.bind(this)):(this.L="fulfilled",this.result=R,aq(this))}reject(R){this.L="rejected";this.error=R;aq(this)}},Do=tG(R=>QXd(R)?R instanceof E9:!1);var Zo=window.Van||"en";var Jy=class{constructor(){this.G=new Set;this.C=new Set;this.K=new Map;this.client=void 0;this.csn=null}O(R){this.client=R}L(){this.clear();this.csn=g.ut()}clear(){this.G.clear();this.C.clear();this.K.clear();this.csn=null}};var Nz=class{O(R){g.mJ(TA().O).bind(TA())(R)}clear(){g.mJ(TA().clear).bind(TA())()}};var iP=class{constructor(){this.X=[];this.pB=[];this.L=[];this.D=new Map;this.I0=new Map;this.J=[];this.S=[];this.G=new Map;this.U=new Map;this.C=new Set;this.M0=new Map}O(R){this.client=R}O0(R,w={}){g.mJ(()=>{const p=g.F(R?.commandMetadata,g.Di)?.rootVe||g.F(R?.commandMetadata,haI)?.screenVisualElement?.uiType;if(p){var r=g.F(R?.commandMetadata,ohr);if(r?.parentTrackingParams){var f=g.pF(r.parentTrackingParams);if(r.parentCsn)var G=r.parentCsn}else w.clickedVisualElement?f=w.clickedVisualElement: R.clickTrackingParams&&(f=g.pF(R.clickTrackingParams));a:{r=g.F(R,g.xo);var I=g.F(R,Cy6);if(r){if(I=dQ6(r,"VIDEO")){r={token:I,videoId:r.videoId};break a}}else if(I&&(r=dQ6(I,"PLAYLIST"))){r={token:r,playlistId:I.playlistId};break a}r=void 0}w={cttAuthInfo:r,parentCsn:G,...w};g.Y("expectation_logging")&&(w.loggingExpectations=g.F(R?.commandMetadata,haI)?.loggingExpectations||void 0);g$(this,p,f,w)}else g.AO(new g.Id("Error: Trying to create a new screen without a rootVeType",R))})()}clickCommand(R, w,p=0){return h_H(this,R.clickTrackingParams,w,p)}stateChanged(R,w,p=0){this.visualElementStateChanged(g.pF(R),w,p)}visualElementStateChanged(R,w,p=0){p===0&&this.C.has(p)?this.pB.push([R, w]):jOY(this,R,w,p)}wO(R){const w=R.cpn;if(g.Y("enable_screen_manager_layer_separation")){var p=hy(this,0);if(!p.length||p[p.length-2]?.cpn===w)return}else if(!this.L.length||this.L[this.L.length-2]?.cpn===w)return;p=g.ut();if(w&&p&&p!=="UNDEFINED_CSN"){var r;R.itct&&(r=g.pF(R.itct||""));const f={};g.Y("web_playback_associated_log_ctt")&&R.iI&&(f.cttAuthInfo={token:R.iI,videoId:R.videoId});R={cpn:w,csn:p};g.Y("web_playback_associated_ve")&&r&&(g.ju(p,r),R.playbackVe=r.getAsJson());g.Rv("playbackAssociated", R,f);g.Y("enable_screen_manager_layer_separation")?(r=hy(this,0),r[r.length-1].cpn=w):this.L[this.L.length-1].cpn=w}}};var U9=class{fetch(R,w,p){const r=HvL(R,w,p);return new Promise((f,G)=>{const I=()=>{if(p?.oJ)try{const C=this.handleResponse(R,r.status,r.response,p);f(C)}catch(C){G(C)}else f(this.handleResponse(R,r.status,r.response,p))}; r.onerror=I;r.onload=I;r.send(w.body??null)})}handleResponse(R,w,p,r){p=p.replace(")]}'",""); let f;try{f=JSON.parse(p)}catch(G){g.AO(new g.Id("JSON parsing failed after XHR fetch",R,w,p));if(r?.oJ&&p)throw new g.nV("JSON parsing failed after XHR fetch");f={}}w!==200&&(g.AO(new g.Id("XHR API fetch failed",R,w,p)),f={...f,errorMetadata:{status:w}});return f}};var S3=class{static getInstance(){let R=g.yD("ytglobal.storage_");R||(R=new S3,g.AY("ytglobal.storage_",R));return R}async estimate(){const R=navigator;if(R.storage?.estimate)return R.storage.estimate();if(R.webkitTemporaryStorage?.queryUsageAndQuota)return v86()}};g.AY("ytglobal.storageClass_",S3);var YKD=class{constructor(R,w){this.handleError=R;this.L=w;this.C=!1;self.document===void 0||self.addEventListener("beforeunload",()=>{this.C=!0}); this.O=Math.random()<=.2}qP(R){this.handleError(R)}logEvent(R,w){switch(R){case "IDB_DATA_CORRUPTED":g.Y("idb_data_corrupted_killswitch")||this.L("idbDataCorrupted",w);break;case "IDB_UNEXPECTEDLY_CLOSED":this.L("idbUnexpectedlyClosed",w);break;case "IS_SUPPORTED_COMPLETED":g.Y("idb_is_supported_completed_killswitch")||this.L("idbIsSupportedCompleted",w);break;case "QUOTA_EXCEEDED":k4b(this,w);break;case "TRANSACTION_ENDED":this.O&&Math.random()<=.1&&this.L("idbTransactionEnded",w);break;case "TRANSACTION_UNEXPECTEDLY_ABORTED":this.L("idbTransactionAborted", {...w,hasWindowUnloaded:this.C})}}};var r6I=UP("yt-player-local-media",{I5:{index:{vC:2},media:{vC:2},captions:{vC:5}},shared:!1,upgrade(R,w){w(2)&&(Xo(R,"index"),Xo(R,"media"));w(5)&&Xo(R,"captions");w(6)&&(nX(R,"metadata"),nX(R,"playerdata"))},version:5});var Fmd={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},S0;a:{var RP=g.s3();RP=RP.toLowerCase();if(g.G1(RP,"android")){var jCW=RP.match(/android\s*(\d+(\.\d+)?)[^;|)]*[;)]/);if(jCW){const R=parseFloat(jCW[1]);if(R<100){S0=R;break a}}var JLI=RP.match("("+Object.keys(Fmd).join("|")+")");S0=JLI?Fmd[JLI[0]]:0}else S0=void 0}var w_=S0,MU=w_>=0;var UQx=D2(()=>window.matchMedia?.("(prefers-reduced-motion: reduce)").matches);var wm;g.RT=new Inl;wm=0;g.TRd=class{constructor(R){this.videoData=R;this.L={c1a:()=>{const w=[];if(g.RT.isInitialized()){var p="";this.videoData&&this.videoData.Ek&&(p=this.videoData.Ek+`&r1b=${this.videoData.clientPlaybackNonce}`);p={atr_challenge:p};Wx("bg_v",void 0,"player_att");(p=pCr(p))?(Wx("bg_s",void 0,"player_att"),w.push(`r1a=${p}`)):(Wx("bg_e",void 0,"player_att"),w.push("r1c=2"))}else Wx("bg_e",void 0,"player_att"),window.trayride||window.botguard?w.push("r1c=1"):w.push("r1c=4");w.push(`r1d=${g.RT.getState()}`); return w.join("&")}, c6a:w=>"r6a="+(Number(w.c)^Ri()), c6b:w=>`r6b=${Number(w.c)^Number(g.n("CATSTAT",0))}`}; this.videoData&&this.videoData.Ek?this.VQ=lF(this.videoData.Ek):this.VQ={}}};var s_=IlD()?!0:typeof window.fetch==="function"&&window.ReadableStream&&window.AbortController&&!g.gx?!0:!1;var p0={GS:function(R){R[l[27]]()}, b3:function(R,w){var p=R[0];R[0]=R[w%R[l[2]]];R[w%R[l[2]]]=p}, cK:function(R,w){R[l[8]](0,w)}};var iOL={U4:"adunit",gV:"detailpage",Wv:"editpage",qe:"embedded",W4:"leanback",pSq:"previewpage",hYS:"profilepage",rd:"unplugged",Cn0:"playlistoverview",Mzl:"sponsorshipsoffer",pBn:"shortspage",DK:"handlesclaiming",wu:"immersivelivepage",Bv:"creatormusic",L1:"immersivelivepreviewpage",Pb:"admintoolyurt",b_0:"shortsaudiopivot",It:"consumption",F6:"background_audio_playback"};var CtD=2592E3;var Yu;g.mq={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"};Yu={RIGHT_CONTROLS_LEFT:"ytp-right-controls-left",RIGHT_CONTROLS_RIGHT:"ytp-right-controls-right"};var AOP={allowed:"AUTOPLAY_BROWSER_POLICY_ALLOWED","allowed-muted":"AUTOPLAY_BROWSER_POLICY_ALLOWED_MUTED",disallowed:"AUTOPLAY_BROWSER_POLICY_DISALLOWED"};var ogb={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},tuL={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"},QCx={"mdx-pair":1,"mdx-dial":2,"mdx-cast":3,"mdx-voice":4,"mdx-inappdial":5};var XSW={DISABLED:1,ENABLED:2,PAUSED:3,1:"DISABLED",2:"ENABLED",3:"PAUSED"};g.uh=class{constructor(R,w=!1){this[l[16]]=R;this[l[40]]=w;this[l[4]]=this[l[13]]=this[l[24]]=l[1];this[l[34]]={};this[l[30]]=l[1]}set(R,w){this[l[34]][R]!==w&&(this[l[34]][R]=w,this[l[30]]=l[1])}get(R){rg(52,3316,this);return this[l[34]][R]||null}qk(){this[l[30]]||(this[l[30]]=Lj_(2,6095,this));return this[l[30]]}clone(){const R=new g.uh(this[l[16]],this[l[40]]);R[l[24]]=this[l[24]];R[l[13]]=this[l[13]];R[l[4]]=this[l[4]];R[l[34]]=g.ht(this[l[34]]);R[l[30]]=this[l[30]];return R}};g.TI=class{constructor(R={}){this.languageCode=R.languageCode||"";this.languageName=R.languageName||null;this.kind=R.kind||"";this.name=R.name===void 0?null:R.name;this.displayName=R.displayName||null;this.id=R.id||null;this.L=R.is_servable||!1;this.isTranslateable=R.is_translateable||!1;this.url=R.url||null;this.vssId=R.vss_id||"";this.isDefault=R.is_default||!1;this.translationLanguage=R.translationLanguage||null;this.xtags=R.xtags||"";this.captionId=R.captionId||""}getId(){return this.id}getName(){return this.name}isServable(){return this.L}qk(){return this.url}getXtags(){return this.xtags}toString(){return this.languageCode+ ": "+g.Wn(this)+" - "+this.vssId+" - "+(this.captionId||"")}equals(R){return R?this.toString()===R.toString():!1}n$(){return!(!this.languageCode||this.translationLanguage&&!this.translationLanguage.languageCode)}};g.ZE=class{constructor(R,w){this.id=R;this.DT=w;this.captionTracks=[];this.O=this.G=null;this.xtags="";this.J=this.K=!1;this.L=null;this.C="UNKNOWN";this.captionsInitialState="CAPTIONS_INITIAL_STATE_UNKNOWN";R=this.DT.id.split(".");R.length>1&&(this.K=R[1]==="2",this.J=R[1]==="4")}getLanguageInfo(){return this.DT}getXtags(){if(!this.xtags){const R=this.id.split(";");R.length>1&&(this.xtags=R[1])}return this.xtags}toString(){return this.DT.name}isAutoDubbed(){return this.DT.getIsAutoDubbed()}}; g.ZE.prototype.getLanguageInfo=g.ZE.prototype.getLanguageInfo;g.ZE.prototype.isAutoDubbed=g.ZE.prototype.isAutoDubbed;var LJ=class{constructor(R,w,p,r,f=0){this.C=R;this.L=w;this.O=p;this.reason=r;this.hf=f}equals(R){return this.C===R.C&&this.L===R.L&&this.O===R.O&&this.reason===R.reason&&(!Ai||this.hf===R.hf)}isLocked(){return this.O&&!!this.C&&this.C===this.L}compose(R){if(R.O&&bk(R))return $Q;if(R.O||bk(this))return R;if(this.O||bk(R))return this;let w=this.C&&R.C?Math.max(this.C,R.C):this.C||R.C;const p=this.L&&R.L?Math.min(this.L,R.L):this.L||R.L;w=Math.min(w,p);let r=0;Ai&&(r=this.hf!==0&&R.hf!==0?Math.min(this.hf, R.hf):this.hf===0?R.hf:this.hf);return Ai&&w===this.C&&p===this.L&&r===this.hf||!Ai&&w===this.C&&p===this.L?this:Ai?new LJ(w,p,!1,p===this.L&&r===this.hf?this.reason:R.reason,r):new LJ(w,p,!1,p===this.L?this.reason:R.reason)}G(R){return!R.video||Ai&&this.hf!==0&&this.hfR.G(f)),p=[],r={}; for(let f=0;fR.G(w))}getAvailableAudioTracks(){return this.audioTracks}L(){return!!this.C}};var HF6=new Set(["356"]),gTl=class extends g.f5{constructor(){super(...arguments);this.C=null;this.L=new Map}Gy(){super.Gy()}};var im=class{constructor(R,w,p,r,f,G,I,C,u){this.yk=R;this.startTime=w;this.duration=p;this.ingestionTime=r;this.sourceURL=f;this.rg=u;this.endTime=w+p;this.L=I||0;this.range=G||null;this.pending=C||!1;this.rg=u||null}};g.r_=class{constructor(){this.segments=[];this.C=null;this.K=!0;this.J=""}D(R){this.segments.push(R)}IA(R){return!!this.O(R)}getDuration(R){return(R=this.O(R))?R.duration:0}X(R){return this.getDuration(R)}vj(){return 0}b9(){return this.segments.length?this.segments[0].yk:-1}gg(R){return(R=this.O(R))?R.ingestionTime:NaN}ea(){return this.segments.length?this.segments[this.segments.length-1].yk:-1}MZ(R){return this.ea()===R&&!this.K&&R>=0}kZ(){const R=this.segments[this.segments.length-1];return R?R.endTime: NaN}xN(){return this.segments[0].startTime}eM(){return this.segments.length}L(){return 0}I3(R){return(R=this.G(R))?R.yk:-1}U(R){return(R=this.O(R))?R.sourceURL:""}getStartTime(R){return(R=this.O(R))?R.startTime:0}Jv(R){return this.getStartTime(R)+this.getDuration(R)}isLoaded(){return this.segments.length>0}O(R){if(this.C&&this.C.yk===R)return this.C;R=g.VU(this.segments,new im(R,0,0,0,""),(w,p)=>w.yk-p.yk); return this.C=R>=0?this.segments[R]:null}G(R){if(this.C&&this.C.startTime<=R&&Rw.startTime-p.startTime); return this.C=R>=0?this.segments[R]:this.segments[Math.max(0,-R-2)]}append(R){if(R.length)if(R=g.zp(R),this.segments.length){var w=this.segments.length?g.Tr(this.segments).endTime:0,p=R[0].yk-this.ea();p>1&&Gp(this.segments);p=p>0?0:-p+1;for(let r=p;r1?R=R.Ya:(w=xY(w,V6(this,this.pS(R,w),R)),R=Math.max(this.K,w.timedOut)+R.l2*(this.C-this.K)+.25*this.U,R=R>3?1E3*1.6**(R-3):0);return R===0?!0:this.pB+R<(0,g.T)()}S(R,w){this.L.set(R,w);this.G.set(R,w);this.O&&this.O.set(R,w)}Ex(R){return this.G.get(R)}m6(){return this.G.get("cpn")||""}gw(R,w){R.Ld===this.L&&(this.L= s2(R,w));R.Ld===this.O&&(this.O=s2(R,w))}xY(){this.X=!0}Qs(){return this.L!==this.O&&!this.J}};var fI=class{constructor(R,w,p,r){this.initRange=p;this.indexRange=r;this.C=null;this.pB=!1;this.nB=0;this.xY=this.fH=this.X=null;this.info=w;this.EQ=new GOr(R)}L(){return!!this.C&&this.index.isLoaded()}I0(){return!1}U0(R){return[R]}M0(R){return[R]}};var OD=class{constructor(R,w){this.start=R;this.end=w;this.length=w-R+1}toString(){return this.start+"-"+(this.end==null?"":this.end)}L(){return this.end==null?{start:String(this.start)}:{start:String(this.start),end:String(this.end)}}};var $Y=class{constructor(R,w,p,r="",f,G,I,C,u,m,z,B=""){this.type=R;this.rN=w;this.range=p;this.source=r;this.CS=z;this.clipId=B;this.pB=[];this.D="";this.yk=-1;this.S=0;this.D=r;this.yk=f>=0?f:-1;this.startTime=G||0;this.duration=I||0;this.L=C||0;this.C=u>=0?u:this.range?this.range.length:NaN;this.O=this.range?this.L+this.C===this.range.length:m===void 0?!!this.C:m;this.range?(this.G=this.startTime+this.duration*this.L/this.range.length,this.U=this.duration*this.C/this.range.length,this.K=this.G+ this.U):M5x(this)}J(){return this.O&&this.rN.index.MZ(this.yk)}isEncrypted(){return this.rN.info.isEncrypted()}equals(R){return!(!R||R.rN!==this.rN||R.type!==this.type||(this.range&&R.range?R.range.start!==this.range.start||R.range.end!==this.range.end:R.range!==this.range)||R.yk!==this.yk||R.L!==this.L||R.C!==this.C)}X(){return this.type===4}Ih(){return!!this.rN.info.video}xY(){return this.yk}EC(){const R=aH(this);let w="";g.DS(R,(p,r)=>{w+=`${r}_${p}_`}); return w.slice(0,-1)}};var TV=class{constructor(R,w){this.C_=R;this.G=this.L=null;this.K=this.Ou=NaN;this.pS=this.requestId=null;this.Xf={unI:()=>this.range}; this.EQ=R[0].rN.EQ;this.C=w||"";this.C_[0].range&&this.C_[0].C>0&&(DYd(R)?(this.range=EtD(R),this.O=this.range.length):(this.range=this.C_[this.C_.length-1].range,this.O=e0l(R)))}z8(){return this.L?this.L.qk():""}isDecorated(){return!!(this.L||this.G&&this.G.AM)}HC(){return M9(this.C_[0])}gw(R,w){this.EQ.gw(R,w);if(this.L){this.L=s2(R,w);for(const p of["acpns","cpn","daistate","skipsq"])this.L["set"](p,null)}this.requestId=R.get("req_id")}};var V5=class extends fI{constructor(R,w,p,r,f,G=0){super(R,w,r);this.Qk=p;this.N4=G;this.index=f||new g.r_}O(){return!1}U(){return!0}O0(){return!1}I0(){return!this.Qk}D(){return new TV([new $Y(1,this,this.initRange,"getMetadataRequestInfo")],this.Qk)}S(){return null}Jl(R){this.G(R);return this.U()&&R.C&&!R.O?new TV([new $Y(R.type,R.rN,R.range,"liveGetNextRequestInfoBySegment",R.yk,R.startTime,R.duration,R.L+R.C,NaN,!0)],this.index.U(R.yk)):this.K(P2(R),!1)}J(R,w=!1){R=this.index.I3(R);w&&(R=Math.min(this.index.ea(), R+1));return this.K(R,!0)}PS(R){H2(R)}G(R){return R.C===0?!0:this.index.ea()>R.yk&&this.index.b9()<=R.yk+1}update(R,w,p){this.index.append(R);NwD(this.index,p);R=this.index;R.K=w;R.J="update"}L(){return this.I0()?!0:super.L()}K(R,w){const p=this.index.U(R),r=this.index.getStartTime(R);let f=this.index.getDuration(R),G;w?f=G=0:G=this.info.hf>0?this.info.hf*f:1E3;return new TV([new $Y(3,this,void 0,"liveCreateRequestInfoForSegment",R,r,f,0,G,!w)],p)}jI(){return this.I0()?0:this.initRange.length}YY(){return!1}};var NRL=class{constructor(R,w,p,r,f){this.yk=R;this.startSecs=w;this.W1=p;this.L=r||NaN;this.C=f||NaN}};var jM=class{constructor(){this.L=[];this.C=null;this.J=0;this.O=[];this.K=!1;this.D="";this.G=-1}update(R){var w=void 0;this.C&&(w=this.C);{const q=new jM;var p=Array.from(R.getElementsByTagName("S"));if(p.length){var r=+YY(R,"timescale")||1,f=(+p[0].getAttribute("t")||0)/r,G=+YY(R,"startNumber")||0;q.G=f;var I=w?w.startSecs+w.W1:0,C=Date.parse(TQP(YY(R,"yt:segmentIngestTime")))/1E3;q.K=R.parentElement.tagName==="SegmentTemplate";q.K&&(q.D=YY(R,"media"));R=w?G-w.yk:1;q.J=R>0?0:-R+1;for(x of p){R= +x.getAttribute("d")/r;p=(+x.getAttribute("yt:sid")||0)/r;const O=+x.getAttribute("r")||0;for(let e=0;e<=O;e++){if(w&&G<=w.yk){G++;continue}var u=new NRL(G,I,R,C+p,f);q.L.push(u);b:{var m=x;var z=r,B=u.startSecs;u=m.getAttribute("yt:cuepointTimeOffset");var W=m.getAttribute("yt:cuepointDuration");if(!u||!W){m=null;break b}u=Number(u);B=-u/z+B;z=Number(W)/z;W=m.getAttribute("yt:cuepointContext")||null;const P=m.getAttribute("yt:cuepointIdentifier")||"";m=m.getAttribute("yt:cuepointEvent")||"";m=new Ji(B, z,W,P,vT6[m]||"unknown",u)}m&&q.O.push(m);G++;I+=R;f+=R;C+=R+p}}q.L.length&&(q.C=g.Tr(q.L))}var x=q}this.J=x.J;this.C=x.C||this.C;g.Bk(this.L,x.L);g.Bk(this.O,x.O);this.K=x.K;this.D=x.D;this.G===-1&&(this.G=x.getStreamTimeOffset())}getStreamTimeOffset(){return this.G===-1?0:this.G}};var kzY=class{constructor(){this.G=[];this.L=null;this.C={};this.O={}}};var Uvb=class extends g.r_{constructor({N4:R=0,Cl:w=!1,y8:p=0,tj:r=0,v0:f=Infinity,nt:G=0,yv:I=!1,mf:C=!1}={}){super();this.Eq=this.iC=-1;this.zH=R;this.y8=p;this.Cl=w;this.tj=r;this.v0=f;this.nt=G;((this.yv=I)||isFinite(f)&&this.v0>0)&&w&&sl&&(this.K=!1,this.J="postLive");this.mf=C}vj(){return this.zH}IA(R,w){R=Jg(this,R);return R>=0&&(w||!this.segments[R].pending)}b9(){return this.Cl?this.segments.length?this.G(this.xN()).yk:-1:super.b9()}xN(){if(this.yv)return 0;if(!this.Cl)return super.xN();if(!this.segments.length)return 0; const R=Math.max(g.Tr(this.segments).endTime-this.y8,0);return this.tj>0&&this.G(R).yk0)return this.Eq/1E3;if(!this.segments.length)return super.kZ();var R=this.ea();if(!this.Cl||R<=this.segments[this.segments.length-1].yk)R=this.segments[this.segments.length-1];else{var w=this.segments[this.segments.length-1];R=new im(R,Math.max(0,w.startTime-(w.yk-R)*this.zH),this.zH,0,`sq/${R}`,void 0,void 0,!0)}return this.yv?Math.min(this.y8, R.endTime):R.endTime}eM(){return this.Cl?this.segments.length?this.ea()-this.b9()+1:0:super.eM()}ea(){let R=Math.min(this.v0,Math.max(super.ea(),this.iC));var w=this.y8*1E3;w=this.Eq>0&&this.Eq0&&this.iC>0&&!w&&(w=this.G(this.y8))&&(R=Math.min(w.yk-1,R));return R}SE(){return this.segments.length?this.segments[this.segments.length-1]:null}D(R){var w=Jg(this,R.yk);if(w>=0)this.segments[w]=R;else if(this.segments.splice(-(w+1),0,R),this.nt&&R.yk%(300/this.zH)===0){var p=this.segments[0].yk, r=Math.floor(this.nt/this.zH);R=R.yk-r;w=-(w+1)-r;w>0&&R>p&&(this.segments=this.segments.slice(w))}}pB(R){R=Jg(this,R);R>=0&&this.segments.splice(R,1)}cj(){return this.iC}MZ(R){return sl?!this.K&&R>=0&&this.ea()<=R:super.MZ(R)}G(R){if(!this.Cl)return super.G(R);if(!this.segments.length)return null;var w=this.segments[this.segments.length-1];if(R=w.endTime)w=w.yk+Math.floor((R- w.endTime)/this.zH+1);else{w=oM(this.segments,r=>R=r.endTime?1:0); if(w>=0)return this.segments[w];var p=-(w+1);w=this.segments[p-1];p=this.segments[p];w=Math.floor((R-w.endTime)/((p.startTime-w.endTime)/(p.yk-w.yk-1))+1)+w.yk}return this.O(w)}O(R){if(!this.Cl)return super.O(R);if(!this.segments.length)return null;var w=Jg(this,R);if(w>=0)return this.segments[w];const p=-(w+1);w=this.zH;if(p===0)var r=Math.max(0,this.segments[0].startTime-(this.segments[0].yk-R)*w);else p===this.segments.length?(r=this.segments[this.segments.length-1],r=r.endTime+(R-r.yk-1)*w):(r= this.segments[p-1],w=this.segments[p],w=(w.startTime-r.endTime)/(w.yk-r.yk-1),r=r.endTime+(R-r.yk-1)*w);return new im(R,r,w,0,`sq/${R}`,void 0,void 0,!0)}},sl=!1;var rCd=class extends V5{constructor(R,w,p={}){super(R,w,"",void 0,void 0,p.N4||0);this.index=new Uvb(p)}O0(){return!0}L(){return!0}G(R){return this.U()&&R.C&&!R.O||!R.rN.index.MZ(R.yk)}D(){}J(R,w=!1){return typeof R!=="number"||isFinite(R)?super.J(R,w):new TV([new $Y(3,this,void 0,"mlLiveGetReqInfoStubForTime",-1,void 0,this.N4,void 0,this.N4*this.info.hf)],"")}K(R,w){if(this.index.IA(R))return super.K(R,w);const p=this.index.getStartTime(R);let r=Math.round(this.N4*this.info.hf),f=this.N4;w&&(f= r=0);return new TV([new $Y(3,this,void 0,"mlLiveCreateReqInfoForSeg",R,p,f,void 0,r,!w)],R>=0?`sq/${R}`:"")}};var Gn=class extends fI{constructor(R,w){super(R,w);R=this.index=new g.r_;R.K=!1;R.J="d"}O(){return!1}U(){return!1}O0(){return!1}D(){return new TV([new $Y(1,this,void 0,"otfInit")],"sq/0")}S(){return null}Jl(R){this.G(R);return NQY(this,P2(R),!1)}J(R,w=!1){R=this.index.I3(R);w&&(R=Math.min(this.index.ea(),R+1));return NQY(this,R,!0)}PS(R){R.info.type===1&&(this.C||(this.C=BX(R.C)),R.L&&R.L.uri==="http://youtube.com/streaming/otf/durations/112015"&&kiI(this,R.L))}G(R){return R.C===0?!0:this.index.ea()> R.yk&&this.index.b9()<=R.yk+1}jI(){return 0}YY(){return!1}};var SfD,SKl,wx6,pxx,REY;g.Q6=class{constructor(R){this.tag=R}};SfD=new Map;SKl=class{constructor(){this.L=new Map;this.Xf={Ng0:()=>this.L}}}; wx6=class{constructor(){this.L=10;this.C=Date.now()}};pxx=new Map;REY=new SKl;var v2=class{constructor(R,w){this.info=R;this.C=w;this.L=null;this.G=this.O=-1;this.timestampOffset=0;this.isLocked=this.D=!1;this.K=this.info.rN.I0()&&!this.info.L}J(R,w=!1,p=0){if(this.isLocked||R.isLocked||!eM(this.info,R.info)||this.info.O)return null;if(p){if(this.C.totalLength+R.C.totalLength>p)return null}else if(w&&(w=this.C,p=R.C,w=!(p.L.length?yod(w,p.L[0]):1)),w)return null;w=new $Y(this.info.type,this.info.rN,this.info.range,this.info.D,this.info.yk,this.info.startTime,this.info.duration, this.info.L,this.info.C,this.info.O,this.info.CS,this.info.clipId);p=R.info;w.C+=p.C;w.range&&(w.U+=p.U);w.K=p.K;w.O=p.O;p=new oi;uY(p,this.C);uY(p,R.C);w=new v2(w,p);w.L!=null&&R.L!=null&&g.hg("dash",414627957,`merged slice emsg overridden; prev: ${w.L.pw()} next: ${R.L.pw()}`);w.L=R.L||this.L;w.O=this.O!==-1?this.O:R.O;w.G=this.G!==-1?this.G:R.G;return w}};g.Gu=class{constructor(){this.count=0;this.C=1;this.O=!1;this.offsets=new Float64Array(128);this.startTicks=new Float64Array(128)}IA(R){return R<=this.ea()}L(R){return this.offsets[R]}getStartTime(R){return this.startTicks[R]/this.C}Jv(R){return this.getStartTime(R)+this.getDuration(R)}gg(){return NaN}getDuration(R){R=this.X(R);return R>=0?R/this.C:-1}X(R){return R+1=0}kZ(){return this.O?this.startTicks[this.count]/this.C:NaN}xN(){return 0}eM(){return this.count}U(){return""}I3(R){R=g.VU(this.startTicks.subarray(0,this.count),R*this.C);return R>=0?R:Math.max(0,-R-2)}isLoaded(){return this.ea()>=0}td(R,w){if(R>=this.ea())return 0;let p=0;for(w=this.getStartTime(R)+w;Rthis.getStartTime(R);R++)p=Math.max(p,mRd(this,R)/this.getDuration(R));return p}resize(R){R+=2;const w=this.offsets;this.offsets=new Float64Array(R+1);const p=this.startTicks;this.startTicks= new Float64Array(R+1);for(R=0;Rthis.df(f,G,I)}; this.index=new g.Gu}D(R,w){var p=new $Y(2,this,this.indexRange,"indexInfo",void 0,void 0,void 0,void 0,void 0,void 0,void 0,w);const r=[new $Y(1,this,this.initRange,"initInfo",void 0,void 0,void 0,void 0,void 0,void 0,void 0,w),p];this.info.contentLength>0&&R&&(p=p.range.end+1,R=Math.min(R,this.info.contentLength-p),R>0&&r.push(new $Y(4,this,ED(p,R),"tbdRange",void 0,void 0,void 0,void 0,void 0,void 0,void 0,w)));return new TV(r)}PS(R){if(R.info.type===1){if(this.C)return;this.C=BX(R.C)}else if(R.info.type=== 2){if(this.K||this.index.ea()>=0)return;if(g.nq(this.info)){var w=this.index,p=g.g5(R);R=R.info.range.start;var r=g.Hn(p,0,1936286840);p=CEP(r);w.C=p.timescale;var f=p.qv;w.offsets[0]=p.t5+R+r.size;w.startTicks[0]=f;w.O=!0;var G=p.Yz.length;for(var I=0;I0&&p===G[0].ih)for(p=0;p=w+p)break}r.length||(R=new g.Id("b189619593",`${R}`,`${w}`,`${p}`),g.LF(R));return new TV(r)}U0(R){const w=this.M0(R.info),p=R.info.range.start+R.info.L,r=[];for(let f=0;f=this.index.L(p+1);)p++;return this.df(p,w,R.C).C_}G(R){R.J();return this.L()?!0:R.range.end+1this.info.contentLength&&(w=new OD(w.start,this.info.contentLength-1)),new TV([new $Y(4,R.rN,w,"getNextRequestInfoByLength",void 0,void 0,void 0,void 0,void 0,void 0,void 0,R.clipId)]);R.type===4&&(R=this.M0(R),R=R[R.length-1]);let p=0;const r=R.range.start+R.L+R.C;R.type===3&&(R.J(),p=R.yk,r===R.range.end+1&&(p+=1));return this.df(p,r,w)}Jl(){return null}J(R,w=!1){R=this.index.I3(R);w&&(R=Math.min(this.index.ea(),R+1));return this.df(R, this.index.L(R),0)}O(){return!0}U(){return!0}O0(){return!1}jI(){return this.indexRange.length+this.initRange.length}YY(){return this.indexRange&&this.initRange&&this.initRange.end+1===this.indexRange.start?!0:!1}};var y1W={COLOR_PRIMARIES_BT709:"bt709",COLOR_PRIMARIES_BT2020:"bt2020",COLOR_PRIMARIES_UNKNOWN:null,COLOR_PRIMARIES_UNSPECIFIED:null},zEr={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 l6l=/action_display_post/;g.w3=class extends g.HC{constructor(R="",w=null,p=!1){super();this.sourceUrl=R;this.isLivePlayback=p;this.YY=this.duration=0;this.isPremiere=this.yv=this.O=this.isLiveHeadPlayable=this.isLive=this.C=!1;this.v0=this.tj=0;this.isOtf=this.PB=!1;this.jI=(0,g.T)();this.xY=Infinity;this.L={};this.G=new Map;this.state=this.Po=0;this.U=null;this.isManifestless=!1;this.I0=[];this.J=null;this.M0=0;this.D="";this.Jl=NaN;this.Vm=this.gL=this.timestampOffset=this.X=0;this.M7=this.VK=NaN;this.SQ=0;this.PS=this.S= !1;this.q0=[];this.N0={};this.eI=this.O0=NaN;this.Xf={NBB:r=>{f_(this,r)}}; this.SI=w?.XB("html5_use_network_error_code_enums");vJl=!!w&&w.XB("html5_modern_vp9_mime_type");sq=!!w?.XB("html5_enable_flush_during_seek")&&g.IN();mr=!!w?.XB("html5_enable_reset_audio_decoder")&&g.IN()}isLoading(){return this.state===1}Y7(){return this.state===3}U0(){return g.ck(this.L,R=>!!R.info.video&&R.info.video.qualityOrdinal>=2160)}K(){return g.ck(this.L,R=>!!R.info.contentProtection)}mq(R){var w=R.getElementsByTagName("Representation"); if(R.getElementsByTagName("SegmentList").length>0||R.getElementsByTagName("SegmentTemplate").length>0){this.PB=this.C=!0;this.U||(this.U=new kzY);HQI(this.U,R);this.publish("refresh");for(R=0;R=0?B=KL(W):x=`${x}?range=${W}`}C.call(f,new im(u.yk,u.startSecs,u.W1,u.L,x,B,u.C))}r=m}p.update(r,this.isLive,this.YY)}vtl(this.U);return!0}this.duration=JVI(YY(R,"mediaPresentationDuration"));a:{for(I=0;I{})}}resume(){$RY(this)}p$(){if(this.isManifestless&&this.O&&lI(this))return lI(this); const R=this.L;let w=!1,p=NaN,r=NaN;for(const G in R){const I=R[G];var f=I.index;if(!f.isLoaded()||Ew(I.info.mimeType))continue;I.xY&&(w=!0);f=f.kZ();I.info.i4()&&(isNaN(p)||f0))return this.p$()-R}}R=this.L;for(const w in R){const p=R[w].index;if(p.isLoaded()&&!Ew(R[w].info.mimeType))return p.xN()}return 0}getStreamTimeOffset(){return this.X}gg(R){for(const w in this.L){const p= this.L[w].index;if(p.isLoaded()){const r=p.I3(R),f=p.gg(r);if(f)return f+R-p.getStartTime(r)}}return NaN}p_(){for(const R in this.L)this.L.hasOwnProperty(R)&&(this.L[R].C=null,this.L[R].pB=!1)}};g.w3.prototype.Qk=pd(4);var vJl,sq,mr,Eq=null,DM=!!navigator.mediaCapabilities?.decodingInfo,jwD={commentary:1,alternate:2,dub:3,main:4};var cK=new Set,ez=new Map;var k3d=class{constructor(R){this.zy=R;this.yh=this.cN=this.Jl=this.K=this.G=this.q4=this.nB=this.pB=!1;this.D=this.J=0;this.q0=!1;this.S=!0;this.Qk=!1;this.DI=0;this.YY=this.PS=this.IM=this.M0=!1;this.C={};this.SI=this.mq=this.cB=this.disableAv1=this.xY=this.Af=this.N0=this.eI=this.L=this.U=!1;this.I0=0;this.O0=!1;this.pL=this.zy.Y("html5_disable_aac_preference");this.Mr=Infinity;this.W7=0;this.ag=this.zy.dn();this.p_=this.zy.experiments.XB("html5_enable_vp9_fairplay");this.Df=this.zy.Y("html5_force_av1_for_testing"); this.MH=this.zy.Tk().L.vS(C16);this.U0=g.Iq(this.zy.experiments,"html5_av1_ordinal_cap");this.Ml=this.zy.Y("html5_disable_hfr_when_vp9_encrypted_2k4k_unsupported");this.WB=this.zy.Y("html5_account_onesie_format_selection_during_format_filter");this.hf=g.Iq(this.zy.experiments,"html5_max_byterate");this.f_=this.zy.Y("html5_enable_iamf_audio");this.jI=this.zy.experiments.XB("html5_allow_capability_merge");this.ez=this.zy.Y("html5_enable_encrypted_av1")}};var kX=class{constructor(R,w,p,r){this.flavor=R;this.keySystem=w;this.O=p;this.experiments=r;this.C={};this.IG=this.keySystemAccess=null;this.bM=this.p7=-1;this.N7=null;this.G=!!r&&r.XB("edge_nonprefixed_eme");r&&r.XB("html5_enable_vp9_fairplay")}clone(R){return new kX(this.flavor,R,this.O,this.experiments)}L(){return this.keySystem==="com.youtube.fairplay.sbdl"}TK(){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}}},HK={playready:["com.youtube.playready","com.microsoft.playready"],widevine:["com.youtube.widevine.l3","com.widevine.alpha"]},GIl={widevine:"DRM_SYSTEM_WIDEVINE",fairplay:"DRM_SYSTEM_FAIRPLAY",playready:"DRM_SYSTEM_PLAYREADY"},RhP={widevine:1,fairplay:2,playready:3};var StP=class extends g.f5{constructor(R,w,p,r=!1,f){super();this.zy=w;this.useCobaltWidevine=r;this.Ty=f;this.C=[];this.O={};this.L={};this.callback=null;this.K=!1;this.G=[];this.initialize(R,!p)}initialize(R,w){for(const r of Object.keys(R)){var p=r;for(const f of R[p])if(f.contentProtection)for(const G of Object.keys(f.contentProtection)){p=G;let I=HK[G];!I&&this.Y("html5_enable_vp9_fairplay")&&p==="fairplay"&&(I=["com.youtube.fairplay.sbdl"]);if(I)for(const C of I)this.O[C]=this.O[C]||new kX(p, C,f.contentProtection[p],this.zy.experiments),this.L[p]=this.L[p]||{},this.L[p][f.mimeType]=!0}}Ch()&&(this.O["com.youtube.fairplay"]=new kX("fairplay","com.youtube.fairplay","",this.zy.experiments),this.Y("html5_enable_vp9_fairplay")||(this.L.fairplay=this.L.fairplay||{},this.L.fairplay['video/mp4; codecs="avc1.4d400b"']=!0,this.L.fairplay['audio/mp4; codecs="mp4a.40.5"']=!0));this.C=wXP(w,this.useCobaltWidevine,this.Y("html5_enable_safari_fairplay")&&!0,this.Y("html5_enable_vp9_fairplay")).filter(r=> !!this.O[r])}Y(R){return this.zy.experiments.XB(R)}},vK;var wib={"":"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 pi6={OFF:"0",ON:"1",bV:"2",AI:"3"};var rFd={RED:"red",WUS:"white"};var fsI=class{constructor(R){R=WI(R.serializedClientExperimentFlags??"","&");this.flags=new Map(Object.entries(R).map(([w,p])=>typeof p==="string"?[w,p]:[w,p[0]]))}vS(R){if(R.lQ!==3)throw Error("WpccFlagRetriever only supports WPCC flags"); return mXr(this,R)}XB(R){return this.flags.get(`${R}`)==="true"}};var G2L=class{constructor(R,w,p){this.L=void 0;this.experimentIds=R?R.split(","):[];this.flags=WI(w||"","&");R={};for(const r of this.experimentIds)R[r]=!0;this.experiments=R;p=new fsI(p);this.O=new P1H(p);this.C=new cEd(p)}Tk(){return this.O}aL(){return this.C}XB(R){R=this.vS(R);JSON.stringify(R);return R==="true"}vS(R){return this.flags[R]}};var Isd=Promise.resolve(),CCP=R=>Isd.then(R),L$b=window.queueMicrotask?window.queueMicrotask.bind(window):CCP;var zhY=class{constructor(R,w,p=!1){this.experiments=R;this.xY=w;this.O0=p;this.U=!!g.yD("cast.receiver.platform.canDisplayType");this.D={};this.X=!1;this.O=new Map;this.J=!0;this.L=this.C=!1;this.pB=0;this.S=this.experiments.XB("html5_disable_vp9_encrypted");this.G=this.experiments.XB("html5_enable_encrypted_av1");R=g.yD("cast.receiver.platform.getValue");this.K=!this.U&&R&&R("max-video-resolution-vpx")||null;xXl(this);this.C=!!(Ch()&&ry()>=21)}canPlayType(R,w){R=R.canPlayType?R.canPlayType(w):!1; hx?R=R||uYH[w]:w_===2.2?R=R||s6b[w]:GU()&&(R=R||mul[w]);return!!R}isTypeSupported(R){return this.U?window.cast.receiver.platform.canDisplayType(R):Cq(R)}},s6b={'video/mp4; codecs="avc1.42001E, mp4a.40.2"':"maybe"},mul={"application/x-mpegURL":"maybe"},uYH={"application/x-mpegURL":"maybe"};var BV_=class extends g.HC{constructor(){super();this.items={}}add(R,w){if(!this.items[R]&&(w.Bp||w.CUY||w.BO)){var p=this.items;let r=w;Object.isFrozen&&!Object.isFrozen(w)&&(r=Object.create(w),Object.freeze(r));p[R]=r;this.publish("vast_info_card_add",R)}}remove(R){const w=this.get(R);delete this.items[R];return w}get(R){return this.items[R]||null}isEmpty(){return g.Jt(this.items)}};var Wi6=class{constructor(R,w){this.L=R;this.cipher=this.L.exports.AES128CTRCipher_create(w.byteOffset)}encrypt(R){this.L.exports.AES128CTRCipher_encrypt(this.cipher,R.byteOffset,R.byteLength);return R}cS(){return this.cipher===0}dispose(){this.L.exports.AES128CTRCipher_release(this.cipher);this.cipher=0}};var VWH=class{constructor(){this.C=this.oB=0;this.L=Array.from({length:CI.length}).fill(0)}A3(R,w=1){this.oB+=w;this.C+=R;R/=w;for(let p=0;pG.apply(C,[z].concat(I)))}}}}MX(){return new lsd}ub(R,w,p=1){w instanceof lsd&&(ord(this,R,(0,g.T)()-w.startTimeMs,p),w.L=!0)}cQ(R,w){const p=(0,g.T)(); w=w();yHd(this,w,R,p)}Ol(){const R={};for(const p in this.L){if(!this.L.hasOwnProperty(p))continue;a:{var w=this.L[p];if(w.oB===0){w=null;break a}let r=Math.ceil(w.oB).toFixed(0)+"."+w.C.toFixed(0);for(let f=0;f0)r+="."+CI[f].toFixed(0)+"_"+w.L[f].toFixed(0);else break;w=r}w&&(R[p]=w)}this.L=new xux;return R}toString(){return""}};var uL=new class{isActive(){return!1}GX(){}MX(){}ub(){}cQ(R,w){w()}Ol(){return{}}toString(){return""}},quD=!!+I2("html5_enable_profiler"),AF6=!!+I2("html5_onesie_enable_profiler"),sx=quD||AF6?new Li_:uL,hrb=quD?sx:uL,pb=AF6?sx:uL;var bSd=class{emscripten_notify_memory_growth(){}},yF6=class{constructor(){this.proc_exit=()=>{}; this.fd_write=(R,w,p)=>{if(!this.exports)return 1;R=new Uint32Array(this.exports.memory.buffer,w,p*2);w=[];for(let f=0;ff+G.length,0)}}},ErY=class{constructor(){this.env=new bSd; this.wasi_snapshot_preview1=new yF6}};var fb=class{constructor(R,w,p){this.instance=R;this.L=p;this.exports=this.instance.exports;w.wasi_snapshot_preview1.exports=this.exports;R=Math.floor(Math.random()*256);w=Math.floor(Math.random()*256);p=0;try{p=this.exports.malloc(16);(new Uint8Array(this.exports.memory.buffer,p,16)).fill(R);if(this.exports.sentinel(p,16,w)!==w*16%256)throw"wasm.wm.vi";const r=new Uint8Array(this.exports.memory.buffer,p,16);for(let f=0;f<16;f++)if(r[f]!==(R+w)%256)throw`wasm.wm.vi${f}`;}finally{p!==0&&this.exports.free(p)}}malloc(R){return this.exports.malloc(R)}free(R){this.exports.free(R)}realloc(R, w){return this.exports.realloc(R,w)}cJ(R){var w=this.malloc(R.byteLength);w=new Uint8Array(this.exports.memory.buffer,w,R.byteLength);w.set(R);return w}Ur(R){const w=R.slice();R.buffer===this.exports.memory.buffer&&this.free(R.byteOffset);return w}},MWI=new class{constructor(){this.L="WebAssembly"in window}},rN="WebAssembly"in window&&("instantiateStreaming"in window.WebAssembly||"instantiate"in window.WebAssembly);pb.GX(fb,{cJ:R=>({profile:"copyj2w",oB:R===void 0?0:Math.ceil(R.byteLength/16)}), Ur:R=>({profile:"copyw2j",oB:R===void 0?0:Math.ceil(R.byteLength/16)})});var VqP=class{constructor(R,w,p){this.L=R;this.G=!1;w=this.L.cJ(w);this.C=new Wi6(R,w);this.L.free(w.byteOffset);p&&(this.O=this.L.cJ(p))}encrypt(R,w){return PY_(this,R,w,!1).vL}cS(){return this.G}dispose(){this.cS()||(g.p5(this.C),this.O&&this.L.free(this.O.byteOffset),this.G=!0)}};var o6I=class{constructor(R,w,p){this.L=new VqP(R,w,p)}encrypt(R,w){try{return this.L.encrypt(R,w)}catch(p){ov(p,"wasm ocwce"),g.AO(p)}}C(R,w){try{const p=PY_(this.L,R,w,!0);return{vL:p.vL,signature:p.signature}}catch(p){ov(p,"wasm ocwceas"),g.AO(p)}}cS(){return this.L.cS()}dispose(){this.L.dispose()}};var tqd=class extends g.f5{constructor(R,w,p){super();this.encryptedClientKey=w;this.D=p;this.C=new Uint8Array(R.buffer,0,16);this.O=new Uint8Array(R.buffer,16)}J(R){this.L=new o6I(R,this.C,this.O);g.K(this,this.L)}};var OSI=class extends g.f5{constructor(R,w){super();if(!w&&R)try{w=JSON.parse(R)}catch{}if(w){R=w.clientKey?Ia(w.clientKey):null;var p=w.encryptedClientKey?Ia(w.encryptedClientKey):null,r=w.keyExpiresInSeconds?Number(w.keyExpiresInSeconds)*1E3+(0,g.T)():null;R&&p&&r&&(this.L=new tqd(R,p,r),g.K(this,this.L));w.onesieUstreamerConfig&&(this.onesieUstreamerConfig=Ia(w.onesieUstreamerConfig)||void 0);this.baseUrl=w.baseUrl}}};var KiD=class extends g.f5{constructor(){super();this.values={};this.Ar={};this.C={};this.O=this.L=0;this.G=new g.vZ(()=>{$XL(this)},1E4); g.K(this,this.G)}};var E6Y="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(" "),dXP={Iv:"caoe",KY:"capsv",ov:"cbrand",QM:"cbr",kM:"cbrver",X6:"cchip",pQ:"ccappver",TZ:"ccrv",OM:"cfrmver",xg:"c",Ob:"cver",hH:"ctheme",T4:"cplayer",jZ:"cmodel",eU:"cnetwork",d6:"cos",OS_VERSION:"cosver",XE:"cplatform",Wqn:"crqyear"},DuW=class extends g.f5{constructor(R,w,p,r){super();this.webPlayerContextConfig=w; this.C2=r;this.csiServiceName=this.csiPageType="";this.userAge=NaN;this.MO=this.eI=this.Df=this.kF=this.userDisplayName=this.userDisplayImage=this.sZ="";this.t8=null;this.L={};this.p_={};this.controlsType="0";this.RJ=NaN;this.Qk=!1;this.B1=(0,g.T)();this.J8=this.SI=0;this.Tw=this.pU=!1;this.FL=!0;this.preferGapless=this.wm=this.wB=this.O=this.Nl=!1;this.PH=[];this.Nk=!1;this.t6=0;R=R?g.ht(R):{};w&&w.csiPageType&&(this.csiPageType=w.csiPageType);w&&w.csiServiceName&&(this.csiServiceName=w.csiServiceName); w&&w.preferGapless&&(this.preferGapless=w.preferGapless);this.experiments=new G2L(w?w.serializedExperimentIds:R.fexp,w?w.serializedExperimentFlags:R.fflags,w??{});this.forcedExperiments=w?w.serializedForcedExperimentIds:oN("",R.forced_experiments)||void 0;this.cspNonce=w?.cspNonce?w.cspNonce:oN("",R.csp_nonce);this.Y("web_player_deprecated_uvr_killswitch");try{var f=document.location.toString()}catch(W){f=""}this.uo=f;this.ancestorOrigins=(r=window.location.ancestorOrigins)?Array.from(r):[];this.G= bB(!1,w?w.isEmbed:R.is_embed);if(w&&w.device){if(r=w.device,r.androidOsExperience&&(this.L.caoe=`${r.androidOsExperience}`),r.androidPlayServicesVersion&&(this.L.capsv=`${r.androidPlayServicesVersion}`),r.brand&&(this.L.cbrand=r.brand),r.browser&&(this.L.cbr=r.browser),r.browserVersion&&(this.L.cbrver=r.browserVersion),r.cobaltReleaseVehicle&&(this.L.ccrv=`${r.cobaltReleaseVehicle}`),this.L.c=r.interfaceName||"WEB",this.L.cver=r.interfaceVersion||"html5",r.interfaceTheme&&(this.L.ctheme=r.interfaceTheme), this.L.cplayer=r.interfacePlayerType||"UNIPLAYER",r.model&&(this.L.cmodel=r.model),r.network&&(this.L.cnetwork=r.network),r.os&&(this.L.cos=r.os),r.osVersion&&(this.L.cosver=r.osVersion),r.platform&&(this.L.cplatform=r.platform),f=Sz(this.experiments,"html5_log_vss_extra_lr_cparams_freq"),f==="all"||f==="once")r.chipset&&(this.p_.cchip=r.chipset),r.cobaltAppVersion&&(this.p_.ccappver=r.cobaltAppVersion),r.firmwareVersion&&(this.p_.cfrmver=r.firmwareVersion),r.deviceYear&&(this.p_.crqyear=r.deviceYear)}else this.L.c= R.c||"web",this.L.cver=R.cver||"html5",this.L.cplayer="UNIPLAYER";this.loaderUrl=w?this.G||XXW(this)&&w.loaderUrl?w.loaderUrl||"":this.uo:this.G||XXW(this)&&R.loaderUrl?oN("",R.loaderUrl):this.uo;this.G&&g.AY("yt.embedded_player.embed_url",this.loaderUrl);this.PS=xB()||Lh();this.U=lp(this.loaderUrl,zUW)||!1;r=this.loaderUrl;this.hW=xc(lp(r,mhI),r,!1,"Trusted Ad Domain URL");this.Mr=bB(!1,R.privembed);this.protocol=this.uo.indexOf("http:")===0?"http":"https";this.ZI=yfd((w?w.customBaseYoutubeUrl:R.BASE_YT_URL)|| "")||yfd(this.uo)||`${this.protocol}://www.youtube.com/`;r=w?w.eventLabel:R.el;f="detailpage";r==="adunit"?f=this.G?"embedded":"detailpage":r==="embedded"||this.U?f=yp(f,r,iOL):r&&(f="embedded");this.xY=f;XRd();r=null;f=w?w.playerStyle:R.ps;const G=g.ra(E6Y,f);!f||G&&!this.U||(r=f);this.playerStyle=r;this.J=g.ra(E6Y,this.playerStyle);this.houseBrandUserStatus=w?.houseBrandUserStatus;this.S=this.J&&this.playerStyle!=="play"&&this.playerStyle!=="jamboard";this.K4=!this.S;this.jI=bB(!1,R.disableplaybackui); this.disablePaidContentOverlay=bB(!1,w?.disablePaidContentOverlay);this.disableSeek=bB(!1,w?.disableSeek);this.enableSpeedOptions=w?.enableSpeedOptions||(fq().defaultPlaybackRate?hq||g.lB||$X?g.PK&&Ec("20")||g.Io&&Ec("4")||g.DE&&Ec("11")||mH():!(g.DE&&!g.fh("chrome")||hq||g.fh("android")||g.fh("silk")):!1);this.Od=bB(!1,R.enable_faster_speeds);this.supportsVarispeedExtendedFeatures=w?.supportsVarispeedExtendedFeatures??!1;this.C=bB(this.playerStyle==="blazer",R.is_html5_mobile_device||w&&w.isMobileDevice); this.GJ=this.Y("mweb_allow_background_playback")?!1:this.C&&!this.J;this.M0=mB();this.mR=g.KT;this.Oj=!!w?.embedsHostFlags?.optOutApiDeprecation;var I;w?w.hideInfo!==void 0&&(I=!w.hideInfo):I=R.showinfo;this.zL=g.zI(this)&&!this.Oj||bB(!mf(this)&&!Ba(this)&&!this.J,I);this.K2=w?!!w.mobileIphoneSupportsInlinePlayback:bB(!1,R.playsinline);I=this.C&&MU&&w_!=null&&w_>0&&w_<=2.3;r=w?w.useNativeControls:R.use_native_controls;this.D=this.C&&(g.zI(this)||this.playerStyle==="blogger"&&this.Tk().L.vS(G5W)); f=this.C&&!this.D;r=g.u8(this)||!I&&bB(f,r)?"3":"1";this.disableOrganicUi=!!w?.disableOrganicUi;f=w?w.controlsType:R.controls;this.controlsType=this.disableOrganicUi||f==="0"||f===0?"0":r;this.xu=this.C;this.controlsType==="1"&&(this.xu||yp("2",w?w.autohide:R.autohide,pi6));this.color=yp("red",w?w.progressBarColor:R.color,rFd);this.M6=this.controlsType==="3";this.ag=!this.G;this.jb=(r=!this.ag&&!Ba(this)&&!this.S&&!this.J&&!mf(this))&&!this.M6&&this.controlsType==="1";this.Af=g.sg(this)&&r&&this.controlsType=== "0"&&!this.jb&&!w?.embedsEnableEmc3ds;this.CU=this.X3=I;this.yh=(this.controlsType==="3"||this.C||bB(!1,R.use_media_volume))&&!this.D;this.M9=Be&&!g.ew(601)?!1:!0;this.f4=this.G||!1;this.GE=Ba(this)?"":(this.loaderUrl||R.post_message_origin||"").substring(0,128);this.widgetReferrer=oN("",w?w.widgetReferrer:R.widget_referrer);var C;w?w.disableCastApi&&(C=!1):C=R.enablecastapi;C=!this.U||bB(!0,C);I=!0;w&&w.disableMdxCast&&(I=!1);this.zv=this.Y("enable_cast_for_web_unplugged")&&g.Cb(this)&&I||g.dQ(this)&& I||C&&I&&this.controlsType==="1"&&!this.C&&(Ba(this)||g.sg(this)||g.Wa(this));this.LU=!!window.document.pictureInPictureEnabled||uV();C=w?!!w.supportsAutoplayOverride:bB(!1,R.autoplayoverride);this.Ww=!(this.C&&!g.zI(this))&&!g.fh("nintendo wiiu")||C;this.Hw=(w?!!w.enableMutedAutoplay:bB(!1,R.mutedautoplay))&&!1;C=(Ba(this)||mf(this))&&this.playerStyle==="blazer";this.Jp=w?!!w.disableFullscreen:!bB(!0,R.fs);I=g.En(g.xW(this))&&g.zI(this);this.N0=!this.Jp&&(C||g.aN())&&!I;this.tW=this.Y("html5_picture_in_picture_logging_onresize"); this.gM=g.Iq(this.experiments,"html5_picture_in_picture_logging_onresize_ratio")??.33;this.f2=this.Y("html5_picture_in_picture_blocking_onresize");this.Gw=this.Y("html5_picture_in_picture_blocking_ontimeupdate");this.JW=this.Y("html5_picture_in_picture_blocking_document_fullscreen");this.Ie=this.Y("html5_picture_in_picture_blocking_standard_api");C=GU()&&Ec(58)&&!Lh();I=hx||typeof MediaSource==="undefined";this.a9=this.Y("uniplayer_block_pip")&&(C||I)||this.f2||this.Gw||this.Ie;C=g.zI(this)&&!this.Oj; var u;w?w.disableRelatedVideos!==void 0&&(u=!w.disableRelatedVideos):u=R.rel;this.WB=C||bB(!this.J,u);this.wR=bB(!1,w?w.enableContentOwnerRelatedVideos:R.co_rel);this.X=Lh()&&w_>0&&w_<=4.4?"_top":"_blank";this.Pw=g.Wa(this);this.YU=bB(this.playerStyle==="blazer",w?w.enableCsiLogging:R.enablecsi);switch(this.playerStyle){case "blogger":u="bl";break;case "discover-ads":u="dd";break;case "gmail":u="gm";break;case "gac":u="ga";break;case "ads-preview":u="ap";break;case "ads-fe":u="adfe";break;case "books":u= "gb";break;case "docs":case "flix":u="gd";break;case "duo":u="gu";break;case "google-live":u="gl";break;case "google-one":u="go";break;case "play":case "play-ads":u="gp";break;case "chat":u="hc";break;case "hangouts-meet":u="hm";break;case "photos-edu":case "picasaweb":u="pw";break;default:u="yt"}this.pB=u;this.O0=oN("",w?w.authorizedUserIndex:R.authuser);this.f_=g.zI(this)&&(this.Mr||!Kzl()||this.PS);var m;w?w.disableWatchLater!==void 0&&(m=!w.disableWatchLater):m=R.showwatchlater;this.ez=((u=!this.f_)|| !!this.O0&&u)&&bB(!this.S,this.U?m:void 0);this.mq=w?w.isMobileDevice||!!w.disableKeyboardControls:bB(!1,R.disablekb);this.loop=bB(!1,R.loop);this.pageId=oN("",w?w.initialDelegatedSessionId:R.pageid);this.S$=bB(!0,R.canplaylive);this.lc=this.experiments.XB("html5_lr_overwrite_default_audio_quality_setting")?1:2;this.Fi=bB(!1,R.livemonitor);this.disableSharing=bB(this.J,w?w.disableSharing:R.ss);(m=w&&this.Y("fill_video_container_size_override_from_wpcc")?w.videoContainerOverride:R.video_container_override)? (u=m.split("x"),u.length!==2?m=null:(m=Number(u[0]),u=Number(u[1]),m=isNaN(m)||isNaN(u)||m*u<=0?null:new g.dg(m,u))):m=null;this.Bk=m;this.mute=w?!!w.startMuted:bB(!1,R.mute);this.storeUserVolume=!this.mute&&bB(this.controlsType!=="0",w?w.storeUserVolume:R.store_user_volume);m=w?w.annotationsLoadPolicy:R.iv_load_policy;this.annotationsLoadPolicy=this.controlsType==="3"?3:yp(void 0,m,MO);this.captionsLanguagePreference=w?w.captionsLanguagePreference||"":oN("",R.cc_lang_pref);m=yp(2,w?w.captionsLanguageLoadPolicy: R.cc_load_policy,MO);this.controlsType==="3"&&m===2&&(m=3);this.Ov=m;this.pL=w?w.hl||"en_US":oN("en_US",R.hl);this.region=w?w.contentRegion||"US":oN("US",R.cr);this.hostLanguage=w?w.hostLanguage||"en":oN("en",R.host_language);this.Tf=!this.Mr&&Math.random()'}supportsGaplessAudio(){return g.Io&& !hx&&ph()>=74||g.PK&&g.ew(68)?!0:!1}supportsGaplessShorts(){return!this.Y("html5_enable_short_gapless")||this.PS||g.tx?!1:!0}getPlayerType(){return this.L.cplayer}dn(){return this.wB}r9(){return this.G&&this.Y("embeds_enable_innertube_store")}},JHd=["www.youtube-nocookie.com","youtube.googleapis.com","www.youtubeeducation.com","youtubeeducation.com"],nrl=["EMBEDDED_PLAYER_LITE_MODE_UNKNOWN","EMBEDDED_PLAYER_LITE_MODE_NONE","EMBEDDED_PLAYER_LITE_MODE_FIXED_PLAYBACK_LIMIT","EMBEDDED_PLAYER_LITE_MODE_DYNAMIC_PLAYBACK_LIMIT"], F$H=[19];var hL6={["140"]:{numChannels:2},["141"]:{numChannels:2},["251"]:{audioSampleRate:48E3,numChannels:2},["774"]:{audioSampleRate:48E3,numChannels:2},["380"]:{numChannels:6},["328"]:{numChannels:6},["773"]:{}},imd={["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"'},Qib={["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 mI=class{constructor(R){this.L=R}getInfo(){return this.L}C(){return null}K(){var R=this.C();return R?(R=g.Ak(R.EQ),Number(R.expire)):NaN}G(){}getHeight(){return this.L.video.height}};var Hmd=class{constructor(R){this.itag=R.itag;this.url=R.url;this.codecs=R.codecs;this.width=R.width;this.height=R.height;this.fps=R.fps;this.bitrate=R.bitrate;this.C=R.audioItag?.split(",")||[];this.Hf=R.Hf;this.contentProtection=R.contentProtection||"";this.DT=R.DT;this.audioChannels=R.audioChannels;this.L=""}};var G7_=class{constructor(R,w,p,r,f){this.O=R;this.C=w;this.K=p;this.cpn=r;this.J=f;this.G=0;this.L=""}build(){kQI(this);const R=["#EXTM3U","#EXT-X-INDEPENDENT-SEGMENTS"],w={};a:if(this.L)var p=this.L;else{p="";for(var r of this.O)if(r.DT){if(r.DT.getIsDefault()){p=r.DT.getId();break a}p||(p=r.DT.getId())}}for(var f of this.O)if(this.J||!f.DT||f.DT.getId()===p)w[f.itag]||(w[f.itag]=[]),w[f.itag].push(f);for(var G of this.C)if(f=w[G.L])for(var I of f){f=R;p=f.push;r="#EXT-X-MEDIA:TYPE=AUDIO,";let z= "YES";var C="audio";if(I.DT){C=I.DT;var u=C.getId().split(".")[0];u&&(r+=`LANGUAGE="${u}",`);(this.L?this.L===C.getId():C.getIsDefault())||(z="NO");C=C.getName()}u="";G!==null&&(u=G.itag.toString());u=dN(this,I.url,u);r=r+`NAME="${C}",DEFAULT=${z},AUTOSELECT=YES,`+`GROUP-ID="${UX6(I,G)}",URI="${u}"`;p.call(f,r)}for(var m of this.K)G=ehx,G=(I=m.DT)?'#EXT-X-MEDIA:URI="'+dN(this,m.url)+'",TYPE=SUBTITLES,GROUP-ID="'+G+'",LANGUAGE="'+I.getId()+'",NAME="'+I.getName()+'",DEFAULT=NO,AUTOSELECT=YES':void 0, G&&R.push(G);m=this.K.length>0?ehx:void 0;for(const z of this.C)I=w[z.L],I?.length>0&&(G=z,I=I[0],I=`#EXT-X-STREAM-INF:BANDWIDTH=${G.bitrate+I.bitrate},CODECS="${G.codecs},${I.codecs}",RESOLUTION=${G.width}x${G.height},AUDIO="${UX6(I,G)}",`+(m?'SUBTITLES="'+m+'",':"")+"CLOSED-CAPTIONS=NONE",G.fps>1&&(I+=`,FRAME-RATE=${G.fps}`),G.Hf&&(I+=`,VIDEO-RANGE=${G.Hf}`),R.push(I),R.push(dN(this,z.url,"")));return R.join("\n")}},ehx="text";var IjY=class extends mI{constructor(R,w,p){super(R);this.O=w;this.expiration=p;this.EQ=null}K(){return this.expiration}C(){if(!this.EQ||this.EQ.cS()){var R=this.O.build();R="data:application/x-mpegurl;charset=utf-8,"+encodeURIComponent(R);this.EQ=new OM(R)}return this.EQ}};var hQH=class extends mI{constructor(R,w){super(R);this.O=w}C(){return new OM(this.O.qk())}G(){this.O=Ag(this.O)}};var C6_=class extends mI{constructor(R,w){super(R);this.O=w}C(){return new OM(this.O)}};var mHL={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 WyD=class{constructor(R){if(R=R.commonConfig)this.url=R.url,this.urlQueryOverride=R.urlQueryOverride,R.ustreamerConfig&&(this.AU=Ia(R.ustreamerConfig)||void 0)}};var ljW={"ad-trueview-indisplay-pv":6,"ad-trueview-insearch":7},LyY={"ad-trueview-indisplay-pv":2,"ad-trueview-insearch":2},qa_=/^(\d*)_((\d*)_?(\d*))$/;var bHY={iurl:"default.jpg",iurlmq:"mqdefault.jpg",iurlhq:"hqdefault.jpg",iurlsd:"sddefault.jpg",iurlpop1:"pop1.jpg",iurlpop2:"pop2.jpg",iurlhq720:"hq720.jpg",iurlmaxres:"maxresdefault.jpg"},yBD={120:"default.jpg",320:"mqdefault.jpg",480:"hqdefault.jpg",560:"pop1.jpg",640:"sddefault.jpg",854:"pop2.jpg",1280:"hq720.jpg"};var oVb={ALWAYS:1,BY_REQUEST:3,UNKNOWN:void 0},NXW={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 vxH; vxH=function(R){const w=Object.keys(R),p={};for(let G=0;G{const p={};w=[g.Yv(w.objectStore("index"),{},r=>{p[r.cursor.key]=r.getValue();return g.Fo(r)}), $q_(w.objectStore("media")),$q_(w.objectStore("captions"))];return g.DZ.all(w).then(([,r,f])=>({index:p,media:zgb(r||[]),captions:f}))})});var MqP=class extends g.HC{constructor(){super();this.L=null;this.O=new TBH;this.L=null;this.J=new Set;this.crossOrigin=""}Gy(){this.L&&(this.L=this.L.onload=null);super.Gy()}};g.zu=class{constructor(R,w,p,r){this.level=R;this.urlPattern=w;this.loaded=new Set;this.level=R;this.urlPattern=w;R=p.split("#");this.width=Math.floor(Number(R[0]));this.height=Math.floor(Number(R[1]));this.frameCount=Math.floor(Number(R[2]));this.columns=Math.floor(Number(R[3]));this.rows=Math.floor(Number(R[4]));this.L=Math.floor(Number(R[5]));this.U=R[6];this.signature=R[7];this.videoLength=r}getHeight(){return this.height}K(){return this.frameCount}isDefault(){return this.U.indexOf("default")!== -1}isLoaded(R){return this.loaded.has(R)}qk(R){let w=this.urlPattern;w=w.replace("$N",this.U);w=w.replace("$L",this.level.toString());w=w.replace("$M",R.toString());this.signature&&(w=g.bu(w,{sigh:this.signature}));return q7(w)}G(R){const w=this.K()-1;return g.MN(this.L===0?Math.round(R*this.frameCount/this.videoLength):Math.round(R*1E3/this.L),0,w)}C(){return this.frameCount-1}J(){return this.frameCount?0:-1}D(){}};g.zu.prototype.X=pd(5);var B3=class extends MqP{constructor(R,w,p=!1,r=!1){super();this.isLive=p;this.D=!!r;this.levels=this.C(R,w);this.G=new Map;this.levels.length>1&&this.levels[0].isDefault()&&this.levels.splice(0,1)}C(R,w){const p=[];R=R.split("|");const r=R[0];for(let f=1;fr-w?-1:R}C(){return this.O.ea()}J(){return this.O.b9()}D(R){this.O=R}};var PCb=class extends B3{constructor(R,w,p,r=!1){super(R,0,w,!!r);for(R=0;R{this.setData(p)}, H9:()=>{this.H9()}, JT:p=>{this.JT(p)}}; this.p_=this.Y("web_new_autonav_countdown");this.wg=this.Y("web_new_big_thumbnail_endscreen");this.zy.XT&&(this.S=this.zy.XT);this.setData(w);this.kF=new gTl;g.K(this,this.kF)}setData(R){R=R||{};var w=R.errordetail;w!=null&&(this.errorDetail=w);w=R.errorcode;w!=null?this.errorCode=w:R.status==="fail"&&(this.errorCode="auth");w=R.reason;w!=null&&(this.errorReason=w);w=R.subreason;w!=null&&(this.S_=w);this.clientPlaybackNonce||(this.clientPlaybackNonce=R.cpn??(this.zy.dn()?"r"+g.k0(15):g.k0(16)),this.Gw?.clear()); this.Fi=bB(this.zy.Fi,R.livemonitor);D7x(this,R);if(w=R.raw_player_response)this.aO=w;else{var p=R.player_response;p&&(w=JSON.parse(p))}w&&(this.playerResponse=w);if(this.playerResponse){(w=this.playerResponse.annotations)&&tyb(this,w);(w=this.playerResponse.attestation)&&OHI(this,w);if(w=this.playerResponse.cotn)this.cotn=w;(w=this.playerResponse.heartbeatParams)&&e$H(this,w);(w=this.playerResponse.messages)&&ajP(this,w);(w=this.playerResponse.overlay)&&ZHr(this,w);if(w=this.playerResponse.playabilityStatus)Ya_(this, w),(p=w.errorScreen)&&vVb(this,p);(p=this.playerResponse.playbackTracking)&&j3d(this,p,R);var r=this.playerResponse.playerCueRanges;r&&r.length>0&&(this.cueRanges=r);(r=this.playerResponse.playerCueRangeSet)&&g.lX(this,r);r=Ytd(this.playerResponse.adPlacements);p&&p.promotedPlaybackTracking&&r&&g.AO(new g.Id("Player Response with both promotedPlaybackTracking and videoAdTrackingRenderer"));if(r||fUr(this.playerResponse.adSlots))this.wh=!0;(p=this.playerResponse.playerAds)&&JBd(this,p,R);(p=this.playerResponse.playerConfig)&& TXP(this,p);(r=this.playerResponse.streamingData)&&iHY(this,r,p||null);if(r=this.playerResponse.trackingParams)this.S=r;if(r=this.playerResponse.videoDetails)h$d(this,r,R),k7d(this,r,p||null,R),p=r.isPrivate,p!==void 0&&(this.isPrivate=bB(this.isPrivate,p));w&&DHd(this,w,r||null);(w=this.playerResponse.interstitialPods)&&P6d(this,w);this.jB&&this.eventId&&(this.jB=Vj(this.jB,{ei:this.eventId}));(w=this.playerResponse.captions)&&w.playerCaptionsTracklistRenderer&&EVr(this,w.playerCaptionsTracklistRenderer); (this.clipConfig=this.playerResponse.clipConfig)&&this.clipConfig.startTimeMs!=null&&(this.CD=Number(this.clipConfig.startTimeMs)*.001);this.playerResponse&&this.playerResponse.playerConfig&&this.playerResponse.playerConfig.webPlayerConfig&&this.playerResponse.playerConfig.webPlayerConfig.webPlayerActionsPorting&&$Hd(this,this.playerResponse.playerConfig.webPlayerConfig.webPlayerActionsPorting);this.compositeLiveIngestionOffsetToken=this.playerResponse.playbackTracking?.compositeLiveIngestionOffsetToken; this.compositeLiveStatusToken=this.playerResponse.playbackTracking?.compositeLiveStatusToken;this.Y("html5_fill_default_mosaic_audio_track_id")&&this.t8()&&(this.zy.U0=F7x(this));w=this.playerResponse.playerConfig?.granularVariableSpeedConfig?.minimumPlaybackRate;p=this.playerResponse.playerConfig?.granularVariableSpeedConfig?.maximumPlaybackRate;w&&p&&(this.hP=w/100,this.Ta=p/100);this.Y("html5_web_po_on_demand_init")&&this.playerResponse.onResponseReceivedActions&&this.playerResponse.onResponseReceivedActions.forEach(f=> {g.F(f,g.i8)?.signal==="INIT_ATT_SERVICE"&&(this.Hd=!0)})}y0(this,R); $7x(this,R);R.queue_info&&(this.queueInfo=R.queue_info);w=R.hlsdvr;w!=null&&(this.allowLiveDvr=Number(w)===1?Ra()?!0:We&&h5<5?!1:!0:!1);this.adQueryId=R.ad_query_id||null;this.Nz||(this.Nz=R.encoded_ad_safety_reason||null);this.r7=bB(this.r7,R.infringe||R.muted);this.pj=R.authkey;this.Ry=R.authuser;this.mutedAutoplay=bB(this.mutedAutoplay,R&&R.playmuted);this.mutedAutoplayDurationMode=Vp(this.mutedAutoplayDurationMode,R&&R.muted_autoplay_duration_mode);this.Na=bB(this.Na,R&&R.mutedautoplay);if(w= R.length_seconds)this.lengthSeconds=typeof w==="string"?ls(w):w;this.isAd()||this.xu||!g.En(g.xW(this.zy))?this.endSeconds=Vp(this.endSeconds,this.p5||R.end||R.endSeconds):j1Y(this,g.xW(this.zy),this.lengthSeconds);this.S=oN(this.S,R.itct);this.wR=bB(this.wR,R.is_live_destination);this.isLivePlayback=bB(this.isLivePlayback,R.live_playback);this.enableServerStitchedDai=this.enableServerStitchedDai&&this.PB();R.isUpcoming&&(this.isUpcoming=bB(this.isUpcoming,R.isUpcoming));this.yv=bB(this.yv,R.post_live_playback); this.vF&&(this.yv=!1);this.isMdxPlayback=bB(this.isMdxPlayback,R.mdx);if(w=R.mdx_control_mode)this.mdxControlMode=typeof w==="number"?w:ls(w);this.isInlinePlaybackNoAd=bB(this.isInlinePlaybackNoAd,R.is_inline_playback_no_ad);this.U0=Vp(this.U0,R.reload_count);this.reloadReason=oN(this.reloadReason,R.reload_reason);this.cf=bB(this.cf,R.show_content_thumbnail);this.cycToken=R.cyc||null;w=YW(R);Object.keys(w).length>0&&(this.w_=w);this.xY=oN(this.xY,R.vvt);this.mdxEnvironment=oN(this.mdxEnvironment, R.mdx_environment);R.source_container_playlist_id&&(this.sourceContainerPlaylistId=R.source_container_playlist_id);R.serialized_mdx_metadata&&(this.serializedMdxMetadata=R.serialized_mdx_metadata);this.Be=R.osig;this.eventId||(this.eventId=R.eventid);this.osid||(this.osid=R.osid);this.playlistId=oN(this.playlistId,R.list);R.index&&(this.playlistIndex=this.playlistIndex===void 0?Vp(0,R.index):Vp(this.playlistIndex,R.index));this.Pn=R.pyv_view_beacon_url;this.cn=R.pyv_quartile25_beacon_url;this.D8= R.pyv_quartile50_beacon_url;this.yj=R.pyv_quartile75_beacon_url;this.Fr=R.pyv_quartile100_beacon_url;w=R.session_data;!this.Z8&&w&&(this.Z8=WI(w,"&").feature);this.isFling=Vp(this.isFling?1:0,R.is_fling)===1;this.vnd=Vp(this.vnd,R.vnd);this.forceAdsUrl=oN(this.forceAdsUrl,R.force_ads_url);this.rS=oN(this.rS,R.ctrl);this.Vf=oN(this.Vf,R.ytr);this.AP=R.ytrcc;this.Qj=R.ytrexp;this.HE=R.ytrext;this.mq=oN(this.mq,R.adformat);this.b0=oN(this.b0,R.attrib);this.slotPosition=Vp(this.slotPosition,R.slot_pos); this.breakType=R.break_type;this.OO=bB(this.OO,R.ssrt);this.videoId=On(R)||this.videoId;this.iI=oN(this.iI,R.vss_credentials_token);this.u8=oN(this.u8,R.vss_credentials_token_type);this.jE=bB(this.jE,R.audio_only);this.q4=bB(this.q4,R.aac_high);this.J6=bB(this.J6,R.prefer_low_quality_audio);this.L0=bB(this.L0,R.uncap_inline_quality);this.Y("html5_enable_qoe_cat_list")?R.qoe_cat&&(this.lR=this.lR.concat(R.qoe_cat.split(","))):this.PH=oN(this.PH,R.qoe_cat);this.Sk=bB(this.Sk,R.download_media);this.D= J6d(this,R.prefer_gapless);pNd(this.playerResponse)&&this.XL.push("ad");if(w=R.adaptive_fmts)this.adaptiveFormats=w,this.Ty("adpfmts",{},!0);if(w=R.allow_embed)this.allowEmbed=Number(w)===1;if(w=R.backgroundable)this.backgroundable=Number(w)===1;if(w=R.autonav)this.isAutonav=Number(w)===1;if(w=R.autoplay)this.Ho=this.oA=Number(w)===1;if(w=R.iv_load_policy)this.annotationsLoadPolicy=yp(this.annotationsLoadPolicy,w,MO);if(w=R.cc_lang_pref)this.captionsLanguagePreference=oN(w,this.captionsLanguagePreference); if(w=R.cc_load_policy)this.zL=yp(this.zL,w,MO);this.deviceCaptionsOn=R.device_captions_on??void 0;this.EN=R.device_captions_lang_pref??"";this.xs=R.viewer_selected_caption_langs??[];if(w=R.cached_load)this.ZP=bB(this.ZP,w);if(R.dash==="0"||R.dash===0||R.dash===!1)this.f4=!0;if(w=R.dashmpd)this.FY=g.bu(w,{cpn:this.clientPlaybackNonce});if(w=R.delay)this.GC=ls(w);w=this.p5||R.end;if(this.Qk?w!=null:w!=void 0)this.clipEnd=Vp(this.clipEnd,w);if(w=R.fmt_list)this.mC=w;R.heartbeat_preroll&&this.XL.push("heartbeat"); as6&&(this.M9=-Math.floor(Math.random()*10),this.Bk=-Math.floor(Math.random()*40));if(w=R.is_listed)this.isListed=bB(this.isListed,w);if(w=R.is_private)this.isPrivate=bB(this.isPrivate,w);if(w=R.is_dni)this.h$=bB(this.h$,w);if(w=R.dni_color)this.Kl=oN(this.Kl,w);if(w=R.pipable)this.pipable=bB(this.pipable,w);this.xv=(this.il=this.pipable&&this.zy.LU)&&!this.zy.showMiniplayerButton;if(w=R.paid_content_overlay_duration_ms)this.paidContentOverlayDurationMs=ls(w);if(w=R.paid_content_overlay_text)this.paidContentOverlayText= w;if(w=R.url_encoded_fmt_stream_map)this.IB=w;if(w=R.hls_formats)this.hlsFormats=w;if(w=R.hlsvp)this.hlsvp=w;if(w=R.live_start_walltime)this.Mp=typeof w==="number"?w:ls(w);if(w=R.live_manifest_duration)this.wm=typeof w==="number"?w:ls(w);if(w=R.player_params)this.playerParams=w;if(w=R.partnerid)this.partnerId=Vp(this.partnerId,w);if(w=R.probe_url)this.probeUrl=q7(g.bu(w,{cpn:this.clientPlaybackNonce}));(w=R.pyv_billable_url)&&OKd(w)&&(this.Wl=w);(w=R.pyv_conv_url)&&OKd(w)&&(this.Yk=w);ncD(this,R); this.startSeconds>0?this.Y("html5_log_start_seconds_inconsistency")&&this.startSeconds!==(this.CD||this.KR||R.start||R.startSeconds)&&this.Ty("lss",{css:this.startSeconds,pcss:this.CD,iss:this.KR,ps:R.start||void 0,pss:R.startSeconds||void 0}):(this.startSeconds=Vp(this.startSeconds,this.CD||this.KR||R.start||R.startSeconds),this.Y("html5_log_start_seconds_inconsistency")&&this.startSeconds>0&&this.Ty("lsss",{css:this.startSeconds,pcss:this.CD,iss:this.KR,ps:R.start||void 0,pss:R.startSeconds||void 0}), this.nB=this.startSeconds);this.liveUtcStartSeconds&&this.liveUtcStartSeconds>0||(w=R.live_utc_start,w!=null?this.liveUtcStartSeconds=Number(w):TJr(this.startSeconds)&&(this.liveUtcStartSeconds=this.startSeconds));this.liveUtcStartSeconds&&this.liveUtcStartSeconds>0||!(w=R.utc_start_millis)||(this.liveUtcStartSeconds=Number(w)*.001);if(w=R.stream_time_start_millis)this.Vx=Number(w)*.001;w=this.KR||R.start;(this.Qk?w==null||Number(R.resume)===1:w==void 0||R.resume=="1")||this.isLivePlayback||(this.clipStart= Vp(this.clipStart,w));if(w=R.url_encoded_third_party_media)this.Hw=qL(w);if(w=R.ypc_offer_button_formatted_text)p=JSON.parse(w),this.bJ=p!=null?p:null,this.dP=w;if(w=R.ypc_offer_button_text)this.GN=w;if(w=R.ypc_offer_description)this.b7=w;if(w=R.ypc_offer_headline)this.I6=w;if(w=R.ypc_full_video_message)this.Ce=w;if(w=R.ypc_offer_id)this.Xd=w;if(w=R.ypc_buy_url)this.hB=w;if(w=R.ypc_item_thumbnail)this.Ow=w;if(w=R.ypc_item_title)this.xk=w;if(w=R.ypc_item_url)this.fz=w;if(w=R.ypc_vid)this.hs=w;R.ypc_overlay_timeout&& (this.Tl=Number(R.ypc_overlay_timeout));if(w=R.ypc_trailer_player_vars)this.mT=lF(w);if(w=R.ypc_original_itct)this.u0=w;this.wy=oN(this.wy,R.ucid);this.Ie=R.storyboard_spec||null;this.L2=R.live_storyboard_spec||null;this.bl=R.iv_endscreen_url||null;this.Qw=bB(this.Qw,R.iv3_module);this.Ql=bB(this.Ql,R.ypc_module);this.sF=bB(this.sF,R.ypc_clickwrap_module);this.Ql&&this.XL.push("ypc");this.sF&&this.XL.push("ypcRentalActivation");this.JP={video_id:R.video_id,eventid:R.eventid,cbrand:R.cbrand,cbr:R.cbr, cbrver:R.cbrver,c:R.c,cver:R.cver,ctheme:R.ctheme,cplayer:R.cplayer,cmodel:R.cmodel,cnetwork:R.cnetwork,cos:R.cos,cosver:R.cosver,cplatform:R.cplatform,user_age:R.user_age,user_display_image:R.user_display_image,user_display_name:R.user_display_name,user_gender:R.user_gender,csi_page_type:R.csi_page_type,csi_service_name:R.csi_service_name,enablecsi:R.enablecsi,enabled_engage_types:R.enabled_engage_types};d7H(this,R);if(w=R.cotn)this.cotn=w;i2W(this)?tN(this)&&(this.isLivePlayback&&this.FY&&(this.Ml= !0),this.IG&&(this.zv=!0)):w1d(this)?this.Ml=!0:fKx(this)?this.enableServerStitchedDai=this.enableServerStitchedDai&&na(this):this.FY&&(this.zy.pB==="yt"&&this.PB()&&this.Y("drm_manifestless_unplugged")&&this.Y("html5_deprecate_manifestful_fallback")?this.Ty("deprecateMflFallback",{}):this.Ml=!0);if(w=R.adpings)this.Ov=w?lF(w):null;if(w=R.feature)this.oo=w;if(w=R.referrer)this.referrer=w;this.clientScreenNonce=oN(this.clientScreenNonce,R.csn);this.Ro=Vp(this.Ro,R.root_ve_type);this.CU=Vp(this.CU, R.kids_age_up_mode);this.Qk||R.kids_app_info==void 0||(this.kidsAppInfo=R.kids_app_info);this.Qk&&R.kids_app_info!=null&&(this.kidsAppInfo=R.kids_app_info);this.C0=bB(this.C0,R.upg_content_filter_mode);this.unpluggedFilterModeType=Vp(this.unpluggedFilterModeType,R.unplugged_filter_mode_type);if(w=R.unplugged_location_info)this.f_=w;if(w=R.unplugged_partner_opt_out)this.t6=oN("",w);this.hW=bB(this.hW,R.disable_watch_next);this.mR=oN(this.mR,R.internal_ip_override);this.Sp=!!R.is_yto_interstitial;this.interstitials.length&& this.XL.push("playableSequences");if(w=R.YH)this.YH=w;this.pB=oN(this.pB,R.csi_timer);R.watchUrl&&(this.watchUrl=R.watchUrl);w=R.watch_endpoint;this.Y("html5_attach_watch_endpoint_ustreamer_config")&&w&&xHP(this,w);w?.ustreamerConfig&&(this.AU=Ia(w.ustreamerConfig));if(w=w?.loggingContext?.qoeLoggingContext?.serializedContextData)this.l0=w;g.zI(this.zy)&&this.zy.wm&&(this.embedsRct=oN(this.embedsRct,R.rct),this.embedsRctn=oN(this.embedsRctn,R.rctn));R.embed_config&&(this.B1=R.embed_config);this.eI= this.eI||!!R.pause_at_start;R.default_active_source_video_id&&(this.defaultActiveSourceVideoId=R.default_active_source_video_id);this.yh=this.yh||!!R.live_preload}JW(){return this.autoplaySwitchButtonRenderer?.enabled!==void 0}V(){return this.zy}Y(R){return this.zy.Y(R)}Wo(){return!this.isLivePlayback||this.allowLiveDvr}hasSupportedAudio51Tracks(){return!!this.q0?.N0}getUserAudio51Preference(){let R=1;Og(this.zy)&&this.Y("html5_ytv_surround_toggle_default_off")?R=0:Vk(this.zy)&&this.isLivePlayback&& this.ph()&&(R=0);return g.hj("yt-player-audio51")??R}Ss(){return this.playerResponse?.playerConfig?.compositeVideoConfig?.sourceConfigs??[]}Os(){this.cS()||(this.L.C||this.L.unsubscribe("refresh",this.Os,this),this.JE(-1))}JE(R){if(!this.isLivePlayback||!this.K||this.K.flavor!=="fairplay"){var w=this.L.nB(this.kL);if(w.length>0){for(const p of w)p.startSecs=Math.max(p.startSecs,this.xN()),this.Y("html5_cuepoint_identifier_logging")&&p.event==="start"&&this.Ty("cuepoint",{pubCue:p.identifier,segNum:R}); this.publish("cuepointupdated",w,R);this.kL+=w.length;if(na(this)&&this.zy.dn())for(const p of w)this.Ty("cuepoint",{segNum:R,event:p.event,startSecs:p.startSecs,id:p.identifier.slice(-16)}),p.event==="start"&&(w=p.startSecs,this.pU.start=this.ag,this.pU.end=w+3)}}}H9(){this.cS()||(this.loading=!1,this.publish("dataloaded"))}ph(){return this.mj!==void 0?this.mj:this.mj=!!this.contentProtection||!!this.L&&this.L.K()}Oa(R){if(this.cS())return hk();this.SI=this.M0=this.O=null;FE(this,"html5_high_res_logging_always")&& (this.zy.wB=!0);return CV6(this,R).then(void 0,()=>sor(this,R)).then(void 0,()=>mFd(this)).then(void 0,()=>BuD(this))}JT(R){this.O=R; usd(this,this.O.getAvailableAudioTracks());if(this.O)for(var w of this.O.videoInfos)R=w.containerType,R!==0&&(this.Od[R]=w.id);w=this.getAvailableAudioTracks();w=w.concat(this.qH);for(R=0;R0)return this.O.getAvailableAudioTracks();if(this.Df)return this.Df;if(this.gM)return this.gM}return[]}getAudioTrack(){if(this.G&&!this.G.O()){var R=g.S_(this.getAvailableAudioTracks(),w=>w.id===this.G.id); if(!R&&this.G.DT?.id){const w=this.G.DT.id;R=g.S_(this.getAvailableAudioTracks(),p=>p.DT.id===w)}return R||this.qH}if(this.Df){if(!this.iD)for(R of this.Df)if(R.DT.getIsDefault()){this.iD=R; break}return this.iD||this.qH}return this.qH}getPlayerResponse(){return this.playerResponse}getWatchNextResponse(){return this.O0}getReelItemWatchResponse(){return this.reelItemWatchResponse}getHeartbeatResponse(){return this.tW}dS(){return this.watchUrl?this.watchUrl:this.zy.getVideoUrl(this.videoId)}jq(){return!!this.L&&(nJY(this.L)||dRD(this.L)||ZVY(this.L))}jw(){const R=g.P4(this),w=this.V().K,p=nb("243");return p?Oz(R,p,w,!0)===!0:!1}Pw(){return this.Y("enable_wn_infocards")}J8(){return(this.Pw()? this.O0?.cards?.cardCollectionRenderer:this.playerResponse?.cards?.cardCollectionRenderer)||null}getEmbeddedPlayerResponse(){return this.o3}uB(){return(this.eventLabel||this.zy.xY)==="shortspage"}isAd(){return this.wW||!!this.adFormat}J(){return this.oauthToken||this.zy.MO}isDaiEnabled(){return!!(this.playerResponse&&this.playerResponse.playerConfig&&this.playerResponse.playerConfig.daiConfig&&this.playerResponse.playerConfig.daiConfig.enableDai)}L$(){return this.isDaiEnabled()&&this.enableServerStitchedDai&& !!this.playerResponse?.playerConfig?.daiConfig?.ssaEnabledPlayback}t8(){return!!this.playerResponse?.compositePlayabilityStatus}LU(){return!this.t8()}Ac(){return this.qo}pN(){return this.Ql||this.wB}cB(){if(!this.L||!this.C||!this.G)return!1;var R=this.L.L;const w=!!R[this.C.id]&&AQ(92,8664,R[this.C.id].EQ.L);R=!!R[this.G.id]&&AQ(95,8667,R[this.G.id].EQ.L);return(this.C.itag==="0"||w)&&R}B9(){return this.fetchType==="onesie"}IM(){return FE(this,"html5_samsung_vp9_live")}Ty(R,w,p){this.publish("ctmp", R,w,p)}DY(R,w,p){this.publish("ctmpstr",R,w,p)}hasProgressBarBoundaries(){return!(!this.progressBarStartPosition||!this.progressBarEndPosition)}I0(){return!(!this.isLivePlayback||!this.hasProgressBarBoundaries())}X(){return this.XT||this.suggestions?.[0]||null}getGetAdBreakContext(R=NaN,w=NaN){const p={isSabr:Qk(this)};var r=this.getHeartbeatResponse()?.adBreakHeartbeatParams;r&&(p.adBreakHeartbeatParams=r);if(this.Y("enable_ltc_param_fetch_from_innertube")&&this.isLivePlayback&&this.L&&!isNaN(R)&& !isNaN(w)){w=R-w;for(var f in this.L.L){r=this.L.L[f];if(!r.info.Ih()&&!r.info.i4())continue;r=r.index;if(!r.isLoaded())continue;f=r.I3(w);r=r.gg(f)+w-r.getStartTime(f);this.Ty("gabc",{t:R.toFixed(3),mt:w.toFixed(3),sg:f,igt:r.toFixed(3)});p.livePlaybackPosition={utcTimeMillis:""+(r*1E3).toFixed(0)};break}}return p}isEmbedsShortsMode(R,w){return!g.zI(this.zy)||(this.zy.I0||"EMBEDDED_PLAYER_MODE_DEFAULT")!=="EMBEDDED_PLAYER_MODE_DEFAULT"||w?!1:this.Y("embeds_enable_shorts")?!!this.embeddedPlayerConfig?.embeddedPlayerFlags?.isShortsExperienceEligible: !!(this.embeddedPlayerConfig?.embeddedPlayerFlags?.isShortsExperienceEligible&&R.width<=R.height)}U_(){return this.D||this.Y("web_player_media_session_infinity")&&this.isLivePlayback}Gy(){super.Gy();this.Ov=null;delete this.xe;delete this.accountLinkingConfig;delete this.L;this.O=this.tW=this.playerResponse=this.O0=null;this.IB=this.adaptiveFormats="";delete this.botguardData;this.Jl=this.suggestions=this.XT=null;this.sabrContextUpdates.clear()}};as6=!0;var vNd={phone:"SMALL_FORM_FACTOR",tablet:"LARGE_FORM_FACTOR"},NnY={desktop:"DESKTOP",phone:"MOBILE",tablet:"TABLET"},gNd={preroll:"BREAK_PREROLL",midroll:"BREAK_MIDROLL",postroll:"BREAK_POSTROLL"},e8I={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"},cCd={0:"MDX_CONTROL_MODE_UNKNOWN",1:"MDX_CONTROL_MODE_REMOTE",2:"MDX_CONTROL_MODE_VOICE"},Mix={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"},Ht_={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 $uW=class extends g.f5{constructor(R,w){super();this.app=R;this.state=w}handleExternalCall(R,w,p){const r=this.state.K[R],f=this.state.J[R];let G=r;if(f)if(p&&lp(p,BTd))G=f;else if(!r)throw Error(`API call from an untrusted origin: "${p}"`);this.logApiCall(R,p);if(G){a:{for(const I of w)if(String(I).includes("javascript:")){p=!0;break a}p=!1}p&&g.AO(Error(`Dangerous call to "${R}" with [${w}].`));return G.apply(this,w)}throw Error(`Unknown API method: "${R}".`);}logApiCall(R,w,p){const r=this.app.V(); r.Tf&&!this.state.X.has(R)&&(this.state.X.add(R),g.Rv("webPlayerApiCalled",{callerUrl:r.loaderUrl,methodName:R,origin:w||void 0,playerStyle:r.playerStyle||void 0,embeddedPlayerMode:r.I0,errorCode:p}))}publish(R,...w){this.state.O.publish(R,...w);if(R==="videodatachange"||R==="resize"||R==="cardstatechange")this.state.C.publish(R,...w),this.state.G.publish(R,...w)}Y(R){return this.app.V().Y(R)}Gy(){if(this.state.element){var R=this.state.element,w;for(w in this.state.L)this.state.L.hasOwnProperty(w)&& (R[w]=null);this.state.element=null}super.Gy()}};var W3=class extends g.DG{constructor(){super();this.K=new Map}publish(R,...w){if(this.K.has(R))return this.K.get(R).push(w),!0;let p=!1;try{for(w=[w],this.K.set(R,w);w.length;)p=super.publish(R,...w.shift())}finally{this.K.delete(R)}return p}};var XiY=class extends g.f5{constructor(){super(...arguments);this.element=null;this.D=new Set;this.K={};this.J={};this.L={};this.X=new Set;this.O=new W3;this.C=new W3;this.G=new W3;this.U=new W3}Gy(){this.U.dispose();this.G.dispose();this.C.dispose();this.O.dispose();this.X=this.L=this.J=this.K=this.D=void 0}};var dFD=new Set("endSeconds startSeconds mediaContentUrl suggestedQuality videoId rct rctn playmuted muted_autoplay_duration_mode".split(" "));var n6W=class extends $uW{getApiInterface(){return Array.from(this.state.D)}pB(R,w){this.state.U.subscribe(R,w)}Nk(R,w){this.state.U.unsubscribe(R,w)}getPlayerState(R){return cqH(this.app,R)}SI(){return cqH(this.app)}Ww(R,w,p){bK(this)&&(HV(this.app,!0,1),vV(this.app,R,w,p,1))}getCurrentTime(R,w,p){R=TuL(R,w,p);w=R.playerType;p=this.getPlayerState(w);return this.app.getAppState()===2&&p===5?this.app.getVideoData()?.startSeconds||0:this.Y("web_player_max_seekable_on_ended")&&p===0?Ul(this.app,w):this.app.getCurrentTime(R)}PS(){return this.app.getCurrentTime({playerType:1})}Qk(){const R= this.app.gg(1);return isNaN(R)?this.getCurrentTime({playerType:1}):R}nB(){return this.app.getDuration({playerType:1})}Em(R,w){R=g.MN(Math.floor(R),0,100);isFinite(R)&&wc(this.app,{volume:R,muted:this.isMuted()},w)}MO(R){this.Em(R,!1)}Wd(R){wc(this.app,{muted:!0,volume:this.getVolume()},R)}Ml(){this.Wd(!1)}RW(R){wc(this.app,{muted:!1,volume:Math.max(5,this.getVolume())},R)}t8(){Aa(this.app)||this.RW(!1)}getPlayerMode(){const R={};this.app.getVideoData().h$&&(R.pfp={enableIma:this.app.Ib().allowImaMonetization, autoplay:wH(this.app.Ib()),mutedAutoplay:this.app.Ib().mutedAutoplay});return R}zW(){const R=this.app.getPresentingPlayerType();if(R===2&&!this.app.b4()){var w=Ye(this.app.tf());if(!(yPD(w)||g.zI(this.app.V())&&this.app.HS().getPlayerState().L(1024))||qe(w))return}(w=this.app.UZ().d_)?w.playVideo():this.app.playVideo(R)}uo(){HV(this.app,!0,1);this.zW()}pauseVideo(R){const w=this.app.getPresentingPlayerType();if(w!==2||this.app.b4()||yPD(Ye(this.app.tf()))){var p=this.app.UZ().d_;p?p.pauseVideo(): this.app.pauseVideo(w,R)}}J8(){var R=this.app;let w=!1;R.LB.ag&&(R.o0.publish("pageTransition"),w=!0);R.stopVideo(w)}clearVideo(){}getAvailablePlaybackRates(){var R=this.app.V();if(R.enableSpeedOptions){if(["https://admin.youtube.com","https://viacon.corp.google.com","https://yurt.corp.google.com"].includes(R.G?R.ancestorOrigins[0]:window.location.origin)||R.Od)return DEH;R=this.app.getVideoData();const w=R.hP,p=R.Ta;return eid.filter(r=>r>=w&&r<=p)}return[1]}getPlaybackQuality(R){return this.app.Ff({playerType:R}).getPlaybackQuality()}kF(){}getAvailableQualityLevels(R){R= this.app.Ff({playerType:R}); R=g.gd(R.LX(),w=>w.quality); R.length&&(R[0]==="auto"&&R.shift(),R=R.concat(["auto"]));return R}Jl(){return this.getAvailableQualityLevels(1)}p_(){return this.G()}f_(){return 1}getVideoLoadedFraction(R){return this.app.getVideoLoadedFraction(R)}G(){return this.getVideoLoadedFraction()}Mr(){return 0}getSize(){const R=this.app.L_().getPlayerSize();return{width:R.width,height:R.height}}setSize(){this.app.L_().resize()}loadVideoById(R,w,p,r){if(!R)return!1;R=Lg(R,w,p);return this.app.loadVideoByPlayerVars(R,r)}WB(R,w,p){R=this.loadVideoById(R, w,p,1);HV(this.app,R,1)}cueVideoById(R,w,p,r){R=Lg(R,w,p);this.app.cueVideoByPlayerVars(R,r)}S(R,w,p){this.cueVideoById(R,w,p,1)}loadVideoByUrl(R,w,p,r){R=nid(R,w,p);return this.app.loadVideoByPlayerVars(R,r)}pL(R,w,p){R=this.loadVideoByUrl(R,w,p,1);HV(this.app,R,1)}cueVideoByUrl(R,w,p,r){R=nid(R,w,p);this.app.cueVideoByPlayerVars(R,r)}O0(R,w,p){this.cueVideoByUrl(R,w,p,1)}cB(){const R=this.app.V();if(R.S)return"";const w=this.app.Ib();let p=void 0;w.isLivePlayback||(p=Math.floor(this.app.getCurrentTime({playerType:1}))); return R.getVideoUrl(w.videoId,this.getPlaylistId()||void 0,p)}YY(){return this.app.getDebugText()}getVideoEmbedCode(){const R=this.app.V();if(R.S)return"";const w=this.app.Ib();return R.getVideoEmbedCode(w.isPrivate?"":w.title,this.app.Ib().videoId,this.app.L_().getPlayerSize(),this.getPlaylistId()||void 0)}U(R,w,p){return pU(this.app,R,w,p)}removeCueRange(R){return this.app.h_(R)}loadPlaylist(R,w,p,r){this.app.loadPlaylist(R,w,p,r)}ez(R,w,p,r){this.loadPlaylist(R,w,p,r);HV(this.app,!0,1)}cuePlaylist(R, w,p,r){this.app.cuePlaylist(R,w,p,r)}nextVideo(R,w){this.app.nextVideo(R,w)}Df(){this.nextVideo();HV(this.app,!0,1)}previousVideo(R){this.app.previousVideo(R)}GE(){this.previousVideo();HV(this.app,!0,1)}playVideoAt(R){this.app.playVideoAt(R)}a9(R){this.playVideoAt(R);HV(this.app,!0,1)}setShuffle(R){const w=this.app.getPlaylist();w&&w.setShuffle(R)}setLoop(R){const w=this.app.getPlaylist();w&&(w.loop=R)}mq(){const R=this.app.getPlaylist();if(!R)return null;const w=[];for(let p=0;p{g.AO(p)}; var w=this.app.V();if(w.externalFullscreen){if(!g.Eg(w))return this.isFullscreen()?X4(window.document.documentElement):Pe(window.document.documentElement).catch(R)}else if(g.aN()||w.D)return this.isFullscreen()?X4($B()):w.controlsType!=="3"&&g.aN()?Pe(this.app.L_().element).catch(R):(w=this.app.XI().zk())?Pe(w).catch(R):Promise.reject(Error("Media element missing"));g.lK(this,"onFullscreenToggled",this.isFullscreen());return Promise.resolve(void 0)}isFullscreen(){return this.app.isFullscreen()}Pi(){return this.app.Pi()}cancelPlayback(){var R= Ye(this.app.tf());R&&R.created&&R.destroy();this.app.HS().stopVideo();(R=this.app.tf().sK.get("endscreen"))&&R.zU()&&g.Om(this.app.o0,!0)}getProgressState(R){if(this.O()===3)return Em(this.app.tf()).getProgressState();const w=this.app.getVideoData();var p=this.app.Ff({playerType:R}),r=p.getPlayerType();a:{var f=this.app.getVideoData();if(f.progressBarStartPosition?.utcTimeMillis&&(f=Number(f.progressBarStartPosition.utcTimeMillis)/1E3,!isNaN(f))){f=this.Tp(f,R);break a}f=0}a:{var G=this.app.getVideoData(); if(G.progressBarEndPosition?.utcTimeMillis&&(G=Number(G.progressBarEndPosition.utcTimeMillis)/1E3,!isNaN(G))){G=this.Tp(G,R);break a}G=0}const I=this.getCurrentTime({playerType:R});R=this.getDuration({playerType:R});const C=this.app.gg(r),u=this.app.isAtLiveHead(r),m=this.app.BM();var z=this.app;var B=z.Ff({playerType:r});B=Nc(z,B);z=k$(z,B.dc(),B);B=Ul(this.app,r);p=p.vB();const W=this.app.getVideoData().pz;r=!W||isNaN(W)?0:this.Tp(W,r);return{airingStart:f,airingEnd:G,allowSeeking:this.app.Wo(), clipEnd:w.clipEnd,clipStart:w.clipStart,current:I,displayedStart:-1,duration:R,ingestionTime:C,isAtLiveHead:u,loaded:m,seekableStart:z,seekableEnd:B,offset:p,viewerLivestreamJoinMediaTime:r}}Tp(R,w){const p=this.app.gg(w);if(!p)return 0;w=p-this.app.getCurrentTime({playerType:w});return R-w}isInline(){return this.app.isInline()}setInline(R){this.app.setInline(R)}U1(){return this.app.Gk().TK(!0)}toggleSubtitles(R){const w=g.FA(this.app.tf());w&&w.oE(R)}getPlayerSize(){const R=this.app.L_().getPlayerSize(); return{width:R.width,height:R.height}}setCenterCrop(R){this.app.L_().setCenterCrop(R)}getLoopVideo(){return this.app.getLoopVideo()}setLoopVideo(R){this.app.setLoopVideo(R)}},QoP="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(" "), gid="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 HqW={["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.xa=class extends duH{isExternalMethodAvailable(R,w){return this.state.K[R]?!0:!!(this.state.J[R]&&w&&lp(w,BTd))}getBandwidthEstimate(){return rK(this.app.BB)}reportPlaybackIssue(R=""){const w=this.app.HS();R={gpu:(0,g.U5)(),d:R};w.handleError(new g.pq("feedback",R))}getInternalApi(){return{...this.state.L}}getTrustedApi(){return{...this.state.K,...this.state.J}}getInternalApiInterface(){return g.nR(this.state.L)}queueNextVideo(R,w,p=NaN,r="",f=""){this.app.queueNextVideo(R,w,p,r,f)}eI(R){R=this.app.getPlayerStateObject(R); return{isBuffering:R.L(1),isCued:R.isCued(),isDomPaused:R.L(1024),isEnded:R.L(2),isError:R.L(128),isOrWillBePlaying:R.isOrWillBePlaying(),isPaused:R.isPaused(),isPlaying:R.isPlaying(),isSeeking:R.L(16),isUiSeeking:R.L(32),isUnstarted:R.L(64)}}createSubtitlesModuleIfNeeded(){return this.app.createSubtitlesModuleIfNeeded()}startSeekCsiAction(){this.app.FD().G.L=(0,g.T)()}jI(R=1,w,p){return this.getCurrentTime({playerType:R,Lo:w,cpn:p})}seekToStreamTime(R,w,p,r){aVP(this.app,R,w,p,r)}getStreamTimeOffset(){return this.app.Gk().getStreamTimeOffset()}seekToLiveHead(R, w){const p=this.app.Gk().getVideoData();p&&p.isLivePlayback&&vV(this.app,Infinity,R,w,1)}requestSeekToWallTimeSeconds(R,w,p){this.app.Gk().yx(R,w,p)}Pw(R,w,p,r=1,f){this.seekTo(R,w,p,r,f)}wg(R,w,p,r){this.seekBy(R,w,p,r,1)}prefetchKeyPlay(R,w){this.app.Gk().prefetchKeyPlay(R,w)}setVolume(R,w=!0){this.Em(R,w)}mute(R=!0){this.Wd(R)}unMute(R=!0){this.RW(R)}syncVolume(){const R=$ad(this.app);wc(this.app,{volume:R.volume,muted:R.muted},!1)}getAvailableQualityLabels(){return g.gd(this.app.Gk().LX(),R=> R.qualityLabel)}channelSubscribed(){g.m1(this,"SUBSCRIBE",this.app.Ib().wy)}channelUnsubscribed(){g.m1(this,"UNSUBSCRIBE",this.app.Ib().wy)}setScreenLayer(R){this.app.setScreenLayer(R)}getCurrentPlaylistSequence(){return this.app.HS().getPlaylistSequenceForTime(this.app.getCurrentTime())}getPlaylistSequenceForTime(R){return this.app.HS().getPlaylistSequenceForTime(R)}shouldSendVisibilityState(){return!0}confirmYpcRental(){this.app.Gk().lr("ypcRentalActivation")}setHomeGroupInfo(R){this.app.V().homeGroupInfo= R}setConnectedRemoteApps(R){this.app.V().hO=R}setLivingRoomAppMode(R){this.app.V().livingRoomAppMode=yp("LIVING_ROOM_APP_MODE_UNSPECIFIED",R,Z3Y)}setEnablePrivacyFilter(R=!1){this.app.V().enablePrivacyFilter=R}togglePictureInPicture(){this.app.togglePictureInPicture()}addUtcCueRange(R,w,p,r,f){return Xy_(this.app,R,w,p,r,f)}ag(R=1){const w=this.cD(R); R=this.app.Ff({playerType:R}).getVideoData();w.hasProgressBarBoundaries=R.hasProgressBarBoundaries();w.isPremiere=R.isPremiere;w.itct=R.S;w.playerResponseCpn=R.playerResponseCpn;w.progressBarStartPositionUtcTimeMillis=R.hasProgressBarBoundaries()&&R.progressBarStartPosition?.utcTimeMillis?ls(R.progressBarStartPosition.utcTimeMillis):null;w.progressBarEndPositionUtcTimeMillis=R.hasProgressBarBoundaries()&&R.progressBarEndPosition?.utcTimeMillis?ls(R.progressBarEndPosition.utcTimeMillis):null;w.ypcOriginalItct= R.u0;w.ypcPreview=R.ypcPreview;w.paidContentOverlayText=xFH(R);w.paidContentOverlayDurationMs=lKd(R);R.L&&oT(R.L)&&(w.usingLocalMedia="true");w.transitionEndpointAtEndOfStream=R.transitionEndpointAtEndOfStream;w.isSeekable=R.isSeekable;return w}getAdState(){return this.app.getAdState()}isNotServable(R){if(R!==this.app.VR.video_id)return!1;const w=(R=this.app.Gk().getPlayerState())?R.Yu:null;return!!(R&&w&&R.L(128)&&vid(w.errorCode)===5)}supportsGaplessAudio(){return this.app.V().supportsGaplessAudio()}supportsGaplessShorts(){return this.app.V().supportsGaplessShorts()}isGaplessTransitionReady(R){return this.app.qJ(R)}enqueueVideoByPlayerVars(R, w,p=Infinity,r=""){this.app.enqueueVideoByPlayerVars(R,w,p,r)}clearQueue(){this.app.clearQueue()}kU(){return g.qS(this)}sendAbandonmentPing(){this.app.HS().sendAbandonmentPing()}setAutonavState(R,w=!1){if(this.Y("web_player_autonav_use_server_provided_state")&&!w&&(w=this.app.Ib(),w?.JW()))if(R===3)w.autonavState!==3&&(w.Tf=w.autonavState);else if(w.Tf!==void 0)R=w.Tf,w.Tf=void 0;else return;nuL(this.app,R)}setAutonav(R,w=!1){this.setAutonavState(R?2:1,w)}setLoopRange(R){this.app.setLoopRange(R)}getLoopRange(){return this.app.getLoopRange()}hasSupportedAudio51Tracks(){return this.app.Gk().hasSupportedAudio51Tracks()}setUserAudio51Preference(R, w=!1){this.app.Gk().setUserAudio51Preference(R,w)}getUserAudio51Preference(){return this.app.Gk().getUserAudio51Preference()}setProximaLatencyPreference(R){this.app.Gk().setProximaLatencyPreference(R)}getProximaLatencyPreference(){return this.app.Gk().getProximaLatencyPreference()}isProximaLatencyEligible(){return this.app.Gk().isProximaLatencyEligible()}getAppState(){return this.app.getAppState()}updateLastActiveTime(){RO()}setBlackout(R){this.app.setBlackout(R)}setUserEngagement(R){this.app.V().Tw!== R&&(this.app.V().Tw=R,this.app.Gk().TL())}updateSubtitlesUserSettings(R,w=!0){g.FA(this.app.tf()).o8(R,w)}getCaptionWindowContainerId(){const R=g.FA(this.app.tf());return R?R.getCaptionWindowContainerId():""}toggleSubtitlesOn(){const R=g.FA(this.app.tf());R&&R.ri()}isSubtitlesOn(){const R=g.FA(this.app.tf());return R?R.isSubtitlesOn():!1}getPlayerResponse(R){return this.app.Ff({playerType:R}).getVideoData().getPlayerResponse()}N0(){return this.getPlayerResponse(1)}getEmbeddedPlayerResponse(){return this.app.Gk().getVideoData().getEmbeddedPlayerResponse()}getWatchNextResponse(R){return this.app.Ff({playerType:R}).getVideoData().getWatchNextResponse()}yh(){return this.getWatchNextResponse(1)}getHeartbeatResponse(R){return this.app.Ff({playerType:R}).getVideoData().getHeartbeatResponse()}U0(){return this.getHeartbeatResponse(1)}getStoryboardFrame(R, w){const p=this.app.kG();if(!p)return null;w=p.levels[w];return w?(R=g.Ca(w,R))?{column:R.column,columns:R.columns,height:R.Z1,row:R.row,rows:R.rows,url:R.url,width:R.W$}:null:null}getStoryboardFrameIndex(R,w){const p=this.app.kG();if(!p)return-1;w=p.levels[w];if(!w)return-1;R-=this.vB();return w.G(R)}getStoryboardLevel(R){var w=this.app.kG();return w?(w=w.levels[R])?{index:R,intervalMs:w.L,maxFrameIndex:w.C(),minFrameIndex:w.J()}:null:null}getNumberOfStoryboardLevels(){const R=this.app.kG();return R? R.levels.length:0}ww(R){return this.app.HS().ww(R)}bB(){this.app.HS().bB();this.publish("onFilterAudioFeatures")}I0(){return this.getAudioTrack(1)}getAudioTrack(R){return this.app.Ff({playerType:R}).getAudioTrack()}d7(){return this.app.Ff({playerType:void 0}).d7()}setAudioTrack(R,w,p){const r=this.app.UZ().d_;r&&r.yl(R);(R=this.app.Ff({playerType:p}).yl(R,w))&&this.bB();return R}xu(R,w){return this.setAudioTrack(R,w,1)}M0(){return this.getAvailableAudioTracks(1)}getAvailableAudioTracks(R){return this.app.Ff({playerType:R}).getAvailableAudioTracks()}getMaxPlaybackQuality(){const R= this.app.Gk();return R.getVideoData().C?Vy(R.Y1()):"unknown"}getUserPlaybackQualityPreference(){return this.app.Gk().getUserPlaybackQualityPreference()}getSubtitlesUserSettings(){const R=g.FA(this.app.tf());return R?R.oV():null}resetSubtitlesUserSettings(){g.FA(this.app.tf()).ac()}setMinimized(R){this.app.setMinimized(R)}setOverlayVisibility(R){this.publish("overlayvisibilitychange",R)}setInlinePreview(R){this.app.setInlinePreview(R)}setSqueezeback(R){this.app.setSqueezeback(R)}setGlobalCrop(R){this.app.L_().setGlobalCrop(R)}setAppFullscreen(R){this.app.Re(R? 4:0)}Z5(){return this.app.Z5()}getVisibilityState(){return this.Z5().getVisibilityState(this.Ko(),this.Pi()||g.u8(this.app.V()),this.isMinimized(),this.isInline(),this.app.W0(),this.app.Mu(),this.app.lx(),this.app.dY())}isMutedByMutedAutoplay(){return this.app.ux}isMutedByEmbedsMutedAutoplay(){return Aa(this.app)}setInternalSize(R,w){this.app.L_().setInternalSize(new g.dg(R,w))}vB(R){return this.app.Ff({playerType:R}).vB()}isMinimized(){return this.app.isMinimized()}W0(){return this.app.W0()}Ko(){return this.app.HS().Ko()}isOrchestrationLeader(){return this.app.isOrchestrationLeader()}setSafetyMode(R){this.app.V().enableSafetyMode= R}canPlayType(R){return this.app.canPlayType(R)}updatePlaylist(R){if(R){var w=this.getPlaylistId(),p=!1;w&&w!==R.list&&(p=!0);R.external_list!==void 0&&(this.app.UR=bB(!1,R.external_list));const r=R.video;(w=this.app.getPlaylist())&&!p?this.isFullscreen()&&((p=r[w.index])&&p.encrypted_id!==g.Pt(w).videoId||(R.index=w.index)):rc(this.app,{list:R.list,index:R.index,playlist_length:r.length});QVW(this.app.getPlaylist(),R);g.xs(this,"onPlaylistUpdate")}else this.app.updatePlaylist()}updateVideoData(R, w){g.V0(this.app.Gk().getVideoData(),R,w)}updateEnvironmentData(R){l8(this.app.V(),R,!1)}Hw(R){this.app.sendVideoStatsEngageEvent(R,1)}productsInVideoVisibilityUpdated(R){this.publish("changeProductsInVideoVisibility",R)}isAtLiveHead(R,w=!0){return this.app.isAtLiveHead(R,w)}getVideoAspectRatio(){return this.app.L_().getVideoAspectRatio()}getPreferredQuality(){return this.app.HS().getPreferredQuality()}getPlaybackQualityLabel(R){return this.app.Ff({playerType:R}).getVideoData().C?.D()?.qualityLabel|| ""}setPlaybackQualityRange(R,w,p,r){this.app.Ff({playerType:r}).CN(g.qJ(R,w||R,!0,"m"),!0,p)}qH(R,w,p){this.setPlaybackQualityRange(R,w,p,1)}onAdUxClicked(R,w){this.publish("aduxclicked",R,w)}showAirplayPicker(){this.app.showAirplayPicker()}dispatchReduxAction(R){g.bX.dispatch(R)}highlightSettingsMenuItem(R){this.publish("highlightSettingsMenu",R)}openSettingsMenuItem(R){this.publish("openSettingsMenuItem",R)}X(R,w){this.state.C.subscribe(R,w)}B1(R,w){this.state.C.unsubscribe(R,w)}xY(R,w=1){this.cueVideoByPlayerVars(R, w)}Af(R,w,p=1,r){this.loadVideoByPlayerVars(R,w,p,r)}wB(R,w=1,p,r){this.preloadVideoByPlayerVars(R,w,p,r)}getFeedbackProductData(){return this.app.getFeedbackProductData()}r_(){return g.qS(this).r_()}dl(){return g.qS(this).dl()}YI(){return g.qS(this).YI()}dg(){return this.kU().dg()}h4(...R){this.dg().h4(...R)}wl(){this.dg().wl()}bF(){this.dg().bF()}K(){this.dg().hide()}DO(R,w,p,r,f,G,I,C){this.dg().DO(R,w,p,r,f,G,I,C)}IR(R,w){this.dg().IR(R,w)}CZ(R,w,p,r,f){this.kU().CZ(R,w,p,r,f)}LN(R){this.dg().setEnabled(R)}GA(R, w){this.kU().GA(R,w)}KH(R,w){this.kU().KH(R,w)}Qo(R,w){this.kU().Qo(R,w)}ZC(){this.kU().ZC()}xz(R,w){this.kU().xz(R,w)}renderChapterSeekingAnimation(R,w,p){this.kU().renderChapterSeekingAnimation(R,w,p)}XS(){this.kU().XS()}getWebPlayerContextConfig(){return this.app.V().getWebPlayerContextConfig()}notifyShortsAdSwipeEvent(){this.publish("shortsadswipe")}hU(){return this.app.HS().hU()}Dm(R,w,p=!1){this.kU()?.Dm(R,w,p)}isKeyboardDisabled(){return this.app.V().mq}};g.xa.prototype.gW=pd(7);g.lL=class extends g.xa{constructor(R,w){super(R,w);Nul(this);B7(this,"addEventListener",this.k$);B7(this,"removeEventListener",this.Qt);B7(this,"cueVideoByPlayerVars",this.Yf);B7(this,"loadVideoByPlayerVars",this.a$);B7(this,"preloadVideoByPlayerVars",this.BG);B7(this,"loadVideoById",this.qx);B7(this,"loadVideoByUrl",this.v2);B7(this,"playVideo",this.zW);B7(this,"loadPlaylist",this.loadPlaylist);B7(this,"nextVideo",this.nextVideo);B7(this,"previousVideo",this.previousVideo);B7(this,"playVideoAt", this.playVideoAt);B7(this,"getVideoData",this.cD);B7(this,"seekBy",this.AS);B7(this,"seekTo",this.Nc);B7(this,"showControls",this.showControls);B7(this,"hideControls",this.hideControls);B7(this,"cancelPlayback",this.cancelPlayback);B7(this,"getProgressState",this.getProgressState);B7(this,"isInline",this.isInline);B7(this,"setInline",this.setInline);B7(this,"setLoopVideo",this.setLoopVideo);B7(this,"getLoopVideo",this.getLoopVideo);B7(this,"getVideoContentRect",this.getVideoContentRect);B7(this,"getVideoStats", this.U1);B7(this,"getCurrentTime",this.iP);B7(this,"getDuration",this.BD);B7(this,"getPlayerState",this.Dr);B7(this,"getVideoLoadedFraction",this.Qa);B7(this,"mute",this.Wd);B7(this,"unMute",this.RW);B7(this,"setVolume",this.Em);B7(this,"loadModule",this.loadModule);B7(this,"unloadModule",this.unloadModule);B7(this,"getOption",this.PD);B7(this,"getOptions",this.getOptions);B7(this,"setOption",this.setOption);B7(this,"addCueRange",this.addCueRange);B7(this,"getDebugText",this.getDebugText);B7(this, "getStoryboardFormat",this.getStoryboardFormat);B7(this,"toggleFullscreen",this.toggleFullscreen);B7(this,"isFullscreen",this.isFullscreen);B7(this,"getPlayerSize",this.getPlayerSize);B7(this,"toggleSubtitles",this.toggleSubtitles);B7(this,"setCenterCrop",this.setCenterCrop);B7(this,"setFauxFullscreen",this.setFauxFullscreen);B7(this,"setSizeStyle",this.setSizeStyle);B7(this,"handleGlobalKeyDown",this.handleGlobalKeyDown);B7(this,"handleGlobalKeyUp",this.handleGlobalKeyUp);joY(this)}WC(R,w,p,r,f, G,I){return this.app.WC(R,w,p,r,f,G,I)}iz(){return this.app.iz()}tf(){return this.app.tf()}Jj(){const R=this.tf().sK.get("endscreen");return!!R&&R.Jj()}getRootNode(){return this.L_().element}V(){return this.app.V()}Cw(){return this.app.iM()}QC(R){return this.app.QC(R)}Ue(){return g.qS(this)?.Ue()||null}getSourceConfigForActiveAudioTrack(){const R=this.getVideoData()?.Ss();if(R){const w=this.getAudioTrack().getLanguageInfo().getId();for(const p of R)for(const r of p.audioTracks??[])if(r.id===w)return p}}w7(){return this.app.HS().w7()}getStartTime(R){return this.app.Ff(R).getStartTime()}getPlayerStateObject(R){return this.app.getPlayerStateObject(R)}L_(){return this.app.L_()}getPlaylist(){return this.app.getPlaylist()}getVideoData(R= {}){const w=this.app.Ff(R).getVideoData();R.Lo===!1?R=w:w.enableServerStitchedDai&&R.playerType===2?(R=this.app,R=R.H1?R.Oy.L?.getVideoData()||R.getVideoData():R.getVideoData()):R=w;return R}Ha(){return this.app.HS().Ha()}kG(R){return this.app.kG(R)}dY(){return this.app.dY()}isHdr(){return this.app.HS().isHdr()}DE(){return this.app.DE()}isEmbedsShortsMode(){var R=g.qS(this);const w=this.getVideoData();R=R?R.Ru:this.getPlayerSize();const p=!!this.getPlaylist();return!(!w||!w.isEmbedsShortsMode(new g.dg(R.width, R.height),p))}EL(R,w){this.app.EL(R,1,w)}A$(R,w,p,r,f){this.app.NH(R,w,p,r,f)}playVideo(R,w){try{const p=this.app.UZ().d_;if(p){p.playVideo();return}if(!R&&this.getPresentingPlayerType()===2){const r=Ye(this.app.tf());if(r&&qe(r))return}}catch(p){g.LF(p)}this.app.playVideo(R,w)}stopVideo(R){this.app.Ff({playerType:R}).stopVideo()}Ra(R){this.app.Ff({playerType:R}).Ra()}addEventListener(R,w){this.state.O.subscribe(R,w)}removeEventListener(R,w){this.state.O.unsubscribe(R,w)}gr(R){this.app.gr(R)}setPlaybackQuality(R, w){this.setPlaybackQualityRange(R,R,w)}LX(){const R={},w=this.app.HS().LX();for(const p of w)R[p.quality]=p;return R}Q7(){return this.app.HS().Q7()}CE(R){this.app.CE(R);R&&nuL(this.app,R)}getVideoUrl(R,w,p,r){let f=this.getPresentingPlayerType(),G=f===2;if(r&&G||f===3)G=!1,f=1;r=this.getVideoData({playerType:f});if(!r)return"";let I;R||r.isLivePlayback||(I=Math.floor(this.getCurrentTime({playerType:f})));R=G?void 0:this.getPlaylistId()||void 0;w&&R==="WL"&&(R=void 0);return this.app.getVideoUrl(r.videoId, R,I,w,p)}SN(R){this.app.HS().SN(R)}c9(R,w){this.tf().c9(R,w)}KS(){const R=g.j2(this.tf());return!!R&&R.KS()}xK(){const R=g.j2(this.tf());return!!R&&R.xK()}tA(R,w,p){const r=g.j2(this.tf());r&&r.tA(R,w,p)}e$(){this.app.HS().vX()}Mt(R){g.xs(this,"onVideoAreaChange");g.xs(this,R?"onShowControls":"onHideControls")}gy(R,w){const p=g.qS(this);if(p)return p.gy(R,w);R=this.app.L_().lA();return new g.X8(0,0,R.width,R.height)}zz(){const R=this.tf().sK.get("heartbeat");return!!R&&R.zz()}Wo(){var R=this.V(); if(R.jI||R.disableSeek)return!1;const w=this.app.HS(),p=w.getVideoData();if(!p.n$()||g.gs(p)||this.getPresentingPlayerType()===2&&!this.app.b4()&&!p.isSeekable||p.L$()&&this.getPresentingPlayerType(!0)===2||w.PM()&&this.getPresentingPlayerType()!==3)return!1;R=g.xW(R);return g.En(R)&&!p.xu||Aa(this.app)?!1:!0}AR(){return this.app.HS().Bq()}isLifaAdPlaying(){const R=this.getVideoData()?.L$();return R?this.getPresentingPlayerType(R)===2:!1}U5(){this.app.HS().U5()}sendVideoStatsEngageEvent(R,w,p){this.app.sendVideoStatsEngageEvent(R, p,w)}C3(R,w,p){this.app.zf(R,w,p)}LS(R,w){this.app.rK(R,w)}P1(R,w){GT(this.app,R,w)}bT(R){return this.app.bT(R)}lr(R,w){this.app.Ff({playerType:w}).lr(R)}PM(){return this.app.Ff({playerType:void 0}).PM()}bq(){const R=this.getVideoData();return!!R&&(R.bq()||!!R.hlsFormats||!!R.FY)}getPlaybackRate(){return this.app.Gk().getPlaybackRate()}setPlaybackRate(R,w){this.app.setPlaybackRate(R,w)}XI(){return this.app.XI()}FD(){return this.app.FD()}h3(R){return this.app.h3(R)}createClientVe(R,w,p,r=!1){this.V().YY&& this.app.V7.createClientVe(R,w,p,r)}createServerVe(R,w,p=!1){this.V().YY&&this.app.V7.createServerVe(R,w,p)}setTrackingParams(R,w){this.V().YY&&this.app.V7.setTrackingParams(R,w)}logClick(R,w){this.V().YY&&(this.app.V7.click(R,w),this.publish("veClickLogged",R))}logVisibility(R,w,p){this.V().YY&&this.app.V7.Rg(R,w,p)}hasVe(R){return this.V().YY?this.app.V7.hasVe(R):!1}destroyVe(R){this.V().YY&&this.app.V7.destroyVe(R)}getPresentingPlayerType(R){return this.app.getPresentingPlayerType(R)}getPlayerType(R){return this.app.Ff({cpn:R}).getPlayerType()}KZ(){this.app.KZ()}NL(R){this.app.NL(R)}yP(){this.app.yP()}addPlayerResponseForAssociation(){}finishSegmentByCpn(R, w,p){return this.app.finishSegmentByCpn(R,w,p)}cL(R,w,p,r,f,G,I,C){return this.app.cL(R,w,p,r,f,G,I,C)}hE(R,w,p,r,f,G,I,C){this.app.hE(R,w,p,r,f,G,I,C)}w4(){return this.app.w4()}FO(R){this.app.FO(R)}tG(R=-1,w=Infinity){this.app.tG(R,w)}HZ(R){g.FA(this.tf())?.HZ(R)}UO(R,w,p){this.app.UO(R,w,p)}t9(){return this.app.t9()}Au(R,w,p=0){this.app.Au(R,w,p)}Uu(){return this.app.Uu()}b4(){return this.app.b4()}r3(R,w,p){return this.app.r3(R,w,p)}Ty(R,w,p=!1,r){this.app.Ff({playerType:r}).Ty(R,w,p)}gk(R,w){this.publish("aduxmouseover", R,w)}sf(R,w){this.publish("aduxmouseout",R,w)}dk(R,w){this.publish("muteadaccepted",R,w)}gH(){return this.app.L_().gH()}eQ(R){this.app.L_().eQ(R)}oG(R){return R?this.app.jH():this.app.HS().oG()}bk(R){this.app.bk(R)}RA(){this.app.HS().RA()}gG(){this.app.gG()}getGetAdBreakContext(){const R=this.app.Gk();return R.getVideoData().getGetAdBreakContext(R.getCurrentTime(),R.vB())}QS(R,w){this.app.HS().QS(R,w)}sX(){return this.app.HS().sX()}Ja(R){return this.app.Ff({playerType:R}).Ja()||0}};g.t=g.lL.prototype; g.t.QK=pd(46);g.t.wr=pd(44);g.t.mI=pd(42);g.t.lC=pd(40);g.t.JA=pd(36);g.t.NO=pd(35);g.t.g_=pd(29);g.t.hp=pd(23);g.t.UE=pd(17);g.t.sP=pd(15);g.t.Xv=pd(11);g.t.a7=pd(9);var wod=class extends N0{constructor(){super(...arguments);this.requestHeaders={}}lz(R,w){return{...super.lz(R,w),...this.requestHeaders}}},$s;var ZSr=class{constructor(R){this.experiments=R;this.L=2048;this.G=0;this.pB=(this.D=this.Y("html5_streaming_resilience"))?.5:.25;this.O=g.Iq(this.experiments,"html5_media_time_weight_prop")||0;this.X=(this.K=this.experiments.XB("html5_consider_end_stall"))&&s_;this.C=this.experiments.XB("html5_measure_max_progress_handling");this.U=this.Y("html5_treat_requests_pre_elbow_as_metadata");this.J=this.Y("html5_media_time_weight")||!!this.O;this.Y("html5_sabr_live_audio_early_return_fix")&&s_&&(this.L= 65536)}Y(R){return this.experiments.XB(R)}};g.li=class extends g.f5{constructor(R){super();this.CB=R;this.Xf={u1:()=>this.CB}}Gy(){this.G(); super.Gy()}G(){this.CB.dispose()}addCueRange(R){this.CB.addCueRange(R)}zf(R,w){this.CB.zf(R,w)}qf(){this.CB.qf()}kO(){return this.CB.kO()}yc(R){return this.CB===R}vX(){this.CB.e$()}uh(R,w){this.CB.uh(R,w)}zC(R,w){return this.CB.zC(R,w)}WJ(R){this.CB.WJ(R)}bB(){this.CB.bB()}ww(R){return this.CB.ww(R)}getAudioTrack(){return this.CB.getAudioTrack()}d7(){return this.CB.d7()}getAvailableAudioTracks(){return this.CB.getAvailableAudioTracks()}LX(){return this.CB.LX()}Q7(){return this.CB.Q7()}m6(){return this.getVideoData().clientPlaybackNonce}D5(){return this.CB.D5()}RM(){return this.CB.RM()}Lh(){return this.CB.Lh()}getCurrentTime(){return this.CB.getCurrentTime()}Vo(){return this.CB.Vo()}Bi(){return this.CB.Bi()}TK(R){return this.CB.TK(R)}getDuration(R){return this.CB.getDuration(R)}aD(){return this.CB.aD()}gg(){return this.CB.gg()}Bq(){return this.CB.Bq()}t9(){return this.CB.t9()}BM(){return this.CB.BM()}Cw(){return this.CB.Cw()}Ja(){return this.CB.Ja()}pX(){return this.CB.pX()}Ev(R){return this.CB.Ev(R)}XI(){return this.CB.XI()}j_(){return this.CB.j_()}xN(){return this.CB.xN()}dc(){return this.CB.dc()}yG(R, w,p){return this.CB.yG(R,w,p)}getPlaybackQuality(){return this.CB.getPlaybackQuality()}getPlaybackRate(){return this.CB.getPlaybackRate()}getPlayerState(){return this.CB.getPlayerState()}getPlayerType(){return this.CB.getPlayerType()}getPlaylistSequenceForTime(R){return this.CB.getPlaylistSequenceForTime(R)}h3(R){return this.CB.h3(R)}hU(){return this.CB.hU()}getPreferredQuality(){return this.CB.getPreferredQuality()}R7(){return this.CB.R7()}getProximaLatencyPreference(){return this.CB.getProximaLatencyPreference()}Y1(){return this.CB.Y1()}getStartTime(){return 0}kG(){return this.getVideoData().kG()}getStoryboardFormat(){return this.getVideoData().getStoryboardFormat()}getStreamTimeOffset(){return this.CB.getStreamTimeOffset()}g9(){return this.CB.g9()}vB(){return this.CB.vB()}w7(){return this.CB.w7()}getUserAudio51Preference(){return this.CB.getUserAudio51Preference()}getUserPlaybackQualityPreference(){return this.CB.getUserPlaybackQualityPreference()}getVideoData(){return this.CB.getVideoData()}Ha(){return this.CB.Ha()}Mw(){return this.CB.Mw()}getVideoLoadedFraction(){if(this.getVideoData().cB())return 1; const R=this.CB.XI();return R?R.Lw():0}u1(){return this.CB}AO(R){this.CB.AO(R)}handleError(R){this.CB.handleError(R)}xP(R){this.CB.xP(R)}Zy(R){this.CB.Zy(R)}PM(){return this.CB.PM()}hasSupportedAudio51Tracks(){return this.CB.hasSupportedAudio51Tracks()}isAd(){return this.getVideoData().isAd()}jf(){return this.CB.jf()}Ko(){return this.CB.Ko()}isAtLiveHead(R,w){return this.CB.isAtLiveHead(R,w)}rA(){return this.CB.rA()}isGapless(){return this.CB.isGapless()}qJ(){return this.CB.qJ()}isHdr(){return this.CB.isHdr()}bf(){return this.CB.bf()}tK(){return this.CB.tK()}sX(){return this.CB.sX()}isProximaLatencyEligible(){return this.CB.isProximaLatencyEligible()}Uu(){return this.CB.Uu()}EX(R){return!!this.CB.loader?.EX(R)}lq(){return this.CB.lq()}Bd(){this.CB.Bd()}nw(R){this.CB.nw(R)}Rd(){this.CB.Rd()}EV(){this.CB.EV()}v$(){this.CB.v$()}VA(){this.CB.VA()}m3(R){this.CB.m3(R)}fq(){this.CB.fq()}pauseVideo(R, w){this.CB.pauseVideo(R,w)}prefetchKeyPlay(R,w){this.CB.prefetchKeyPlay(R,w)}i$(R){this.CB.i$(R)}l$(R){this.CB.l$(R)}playVideo(R,w){return this.CB.playVideo(R,w)}DM(R,w,p,r,f){this.CB.DM(R,w,p,r,f)}Fz(R,w,p,r,f){this.CB.Fz(R,w,p,r,f)}Ty(R,w,p){this.CB.Ty(R,w,p)}SN(R){this.CB.SN(R)}QS(R,w){this.CB.HB.QS(R,w)}UV(R,w,p){this.CB.UV(R,w,p)}K$(R){this.CB.K$(R)}AX(R){this.CB.AX(R)}NQ(R,w){this.CB.NQ(R,w)}Zp(R,w,p,r,f,G,I,C){this.CB.Zp(R,w,p,r,f,G,I,C)}Tb(){TK(this.CB.HB)}eF(R){this.CB.eF(R)}Ra(R,w){this.CB.Ra(R, w)}removeCueRange(R){this.CB.removeCueRange(R)}rK(R){this.CB.rK(R)}P1(R){return this.CB.Co.P1(R)}qL(R){this.CB.qL(R)}gY(R,w,p){this.CB.gY(R,w,p)}G0(){this.CB.G0()}r$(){this.CB.Co.reset()}pE(){this.CB.pE()}yx(R,w,p){this.CB.yx(R,w,p)}seekTo(R,w){this.CB.seekTo(R,w)}sendAbandonmentPing(){this.CB.sendAbandonmentPing()}sendVideoStatsEngageEvent(R,w){this.CB.sendVideoStatsEngageEvent(R,w)}Rz(R,w,p){this.CB.Rz(R,w,p)}setLoop(R){this.CB.setLoop(R)}BZ(){this.CB.BZ()}setMediaElement(R){this.CB.setMediaElement(R)}sL(R, w,p,r){this.CB.sL(R,w,p,r)}setPlaybackRate(R){this.CB.setPlaybackRate(R)}A$(R,w,p,r,f,G){this.CB.A$(R,w,p,r,f,G)}Hc(R,w){this.CB.Hc(R,w)}lr(R){this.CB.lr(R)}setProximaLatencyPreference(R){this.CB.setProximaLatencyPreference(R)}mS(R,w,p){this.CB.mS(R,w,p)}d3(R){this.CB.d3(R)}Yc(){this.CB.Yc()}gJ(R){this.CB.gJ(R)}setUserAudio51Preference(R,w){this.CB.setUserAudio51Preference(R,w)}CN(R,w,p){this.CB.CN(R,w,p)}lB(){return this.CB.lB()}U5(){this.CB.U5()}oG(){return this.CB.oG()}R5(R){this.CB.R5(R)}ZQ(){this.CB.ZQ()}oT(R){this.CB.oT(R)}stopVideo(){this.CB.stopVideo()}subscribe(R, w,p){return this.CB.subscribe(R,w,p)}Uq(R,w){this.CB.Uq(R,w)}togglePictureInPicture(){this.CB.togglePictureInPicture()}bT(R){return this.CB.Co.bT(R)}UN(R){this.CB.Co.UN(R)}unsubscribe(R,w,p){return this.CB.unsubscribe(R,w,p)}OF(R,w){this.CB.OF(R,w)}yl(R,w){return this.CB.yl(R,w)}TL(){this.CB.TL()}Nt(R){this.CB.Nt(R)}RA(){this.CB.RA()}};g.t=g.li.prototype;g.t.QI=pd(51);g.t.lC=pd(39);g.t.NO=pd(34);g.t.g_=pd(28);g.t.hp=pd(22);g.t.sP=pd(14);var YuW=class{constructor(){this.licenseRequest=this.mediaKeys=this.L=this.certificate=null;this.C=!1}dispose(){this.certificate=null;this.L?.dispose();this.licenseRequest=this.L=null;this.mediaKeys?.dispose();this.mediaKeys=null;this.C=!0}cS(){return this.C}};var TN=class extends g.RX{constructor(R,w,p,r=!1){super(w);this.B=R;this.M0=r;this.K=new g.th(this);this.fade=new g.HU(this,p,!0,void 0,void 0,()=>{this.X()}); g.K(this,this.K);g.K(this,this.fade)}show(){const R=this.Pu();super.show();this.M0&&(this.K.W(window,"blur",this.Qh),this.K.W(dH(this),"click",this.I0));R||this.publish("show",!0)}hide(){const R=this.Pu();super.hide();pox(this);R&&this.publish("show",!1)}R9(R,w){this.sourceElement=R;this.fade.show();w?(this.J||(this.J=this.K.W(this.B,"appresize",this.U)),this.U()):this.J&&(this.K.o9(this.J),this.J=void 0)}X(){this.sourceElement&&this.element&&(this.sourceElement.getAttribute("aria-haspopup"),this.sourceElement.setAttribute("aria-expanded", "true"),this.focus())}U(){const R=g.qS(this.B);this.sourceElement&&R.CZ(this.element,this.sourceElement)}Qh(){const R=this.Pu();pox(this);this.fade.hide();R&&this.publish("show",!1)}I0(R){const w=jN(R);w&&(g.lA(this.element,w)||this.sourceElement&&g.lA(this.sourceElement,w)||!g.$t(R))||this.Qh()}Pu(){return this.K_&&this.fade.state!==4}};var FiD=class extends TN{constructor(R,w,p,r){r=new g.k({j:"div",E0:["ytp-linked-account-popup-button"],fB:r,A:{role:"button",tabindex:"0"}});w=new g.k({j:"div",Z:"ytp-linked-account-popup",A:{role:"dialog","aria-modal":"true",tabindex:"-1"},N:[{j:"div",Z:"ytp-linked-account-popup-title",fB:w},{j:"div",Z:"ytp-linked-account-popup-description",fB:p},{j:"div",Z:"ytp-linked-account-popup-buttons",N:[r]}]});super(R,{j:"div",Z:"ytp-linked-account-popup-container",N:[w]},100);this.dialog=w;g.K(this,this.dialog); r.listen("click",()=>{this.Qh()}); g.K(this,r);g.P7(this.B,this.element,4);this.hide()}R9(){super.R9();this.dialog.focus()}};g.wv=class extends g.RX{constructor(R,w,p,r){super(R);this.priority=w;p&&g.FV(this,p);r&&this.setContent(r)}setIcon(R){this.updateValue("icon",R)}updateValue(R,w){super.updateValue(R,w);this.publish("size-change")}};g.LI={uV:18,We:17,ke:16,Q0q:15,ITB:14,V4:13,G1:12,Td:11,IU:10,m8:9,AUDIO:8,SUBTITLES:7,SLEEP_TIMER:6,Uo:5,xm:4,ws:3,qE:2,REMOTE:1,KQ: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 j6H=class extends g.wv{constructor(R){super(g.Ys({"aria-haspopup":"true"},["ytp-linked-account-menuitem"]),2);this.B=R;this.C=this.L=!1;this.OQ=R.Ue();R.createServerVe(this.element,this,!0);this.W(this.B,"settingsMenuVisibilityChanged",w=>{this.GK(w)}); this.W(this.B,"videodatachange",this.G);this.listen("click",this.onClick);this.G()}GK(R){this.C&&this.B.logVisibility(this.element,this.L&&R)}G(){var R=this.B.getVideoData()?.accountLinkingConfig?.linked;R&&!this.L?(R=this.B.getVideoData()?.accountLinkingConfig,this.setIcon(CQ()),g.FV(this,je(R?.menuData?.connectedMenuLabel)),this.O=new FiD(this.B,je(R?.menuData?.connectedDialogTitle),je(R?.menuData?.connectedDialogMessage),je(R?.menuData?.confirmButtonText)),g.K(this,this.O),R=R?.menuData?.trackingParams|| null,(this.C=!!R)&&this.B.setTrackingParams(this.element,R),this.OQ.CL(this),this.L=!0):!R&&this.L&&(this.OQ.EK(this),this.L=!1)}onClick(){this.C&&this.B.logClick(this.element);this.OQ.Qh();this.O&&this.O.R9()}};var qj=class extends g.f5{constructor(R){super();this.api=R}Y(R){return this.api.Y(R)}};var JF6=class extends qj{constructor(R){super(R);N(R,"setAccountLinkState",w=>{this.setAccountLinkState(w)}); N(R,"updateAccountLinkingConfig",w=>{this.updateAccountLinkingConfig(w)}); R.addEventListener("videodatachange",(w,p)=>{this.onVideoDataChange(p)}); R.addEventListener("settingsMenuInitialized",()=>{this.menuItem=new j6H(this.api);g.K(this,this.menuItem)})}onVideoDataChange(R){if(!R.accountLinkingConfig){var w=R.getPlayerResponse()?.accountLinkingConfig; R.accountLinkingConfig=w}if(w=R.accountLinkingConfig?.alsParam)R.tP=w}setAccountLinkState(R){this.api.getVideoData().tP=R;this.api.e$()}updateAccountLinkingConfig(R){const w=this.api.getVideoData(),p=w.accountLinkingConfig;p&&(p.linked=R);this.api.publish("videodatachange","dataupdated",w,this.api.getPresentingPlayerType())}};var TVW=class extends qj{constructor(R){super(R);this.L=null;this.events=new g.th(R);g.K(this,this.events);this.events.W(R,"applicationvideodatachange",()=>{this.Ef()})}Ef(){const R=this.api.getPlaybackRate(); var w=this.api.getVideoData();if(w){var p=w.adFormat==="17_8";var r=w.RF?.C()===8;p=w.isAd()&&(p||r)}else p=!1;p||((w=this.api.getVideoData())?(p=w.adFormat==="15_6",r=w.RF?.C()===7,p=w.isAd()&&(p||r)):p=!1);p?(R!==1&&(this.L=R),this.api.setPlaybackRate(1)):this.L!==null&&(this.api.setPlaybackRate(this.L),this.L=null)}};var iSY=class{constructor(R){this.api=R;this.L={}}};var Q6d=class extends qj{constructor(R){super(R);this.events=new g.th(this);g.K(this,this.events);this.L=new iSY(this.api);this.events.W(this.api,"legacyadtrackingpingreset",()=>{this.L.L={}}); this.events.W(this.api,"legacyadtrackingpingchange",w=>{var p=this.L;TZ(p,"part2viewed",1,0x8000000000000);TZ(p,"engagedview",Math.max(1,w.GC*1E3),0x8000000000000);if(!w.isLivePlayback){var r=w.lengthSeconds*1E3;Dr(w)&&p.api.Y("html5_shorts_gapless_ads_duration_fix")&&(r=p.api.getProgressState().seekableEnd*1E3-w.u7);TZ(p,"videoplaytime25",r*.25,r);TZ(p,"videoplaytime50",r*.5,r);TZ(p,"videoplaytime75",r*.75,r);TZ(p,"videoplaytime100",r,0x8000000000000);TZ(p,"conversionview",r,0x8000000000000);TZ(p, "videoplaybackstart",1,r);TZ(p,"videoplayback2s",2E3,r);TZ(p,"videoplayback10s",1E4,r)}}); this.events.W(this.api,g.bp("appad"),this.C);this.events.W(this.api,g.yl("appad"),this.C)}C(R){var w=R.getId();const p=this.api.getVideoData({playerType:1}),r=!this.api.isInline();if(!p.inlineMetricEnabled||r){if(w==="part2viewed"){if(p.Pn&&g.Ki(p.Pn),p.Vl&&iK(this,p.Vl),p.uS){var f={CPN:this.api.getVideoData().clientPlaybackNonce};for(var G of p.uS)iK(this,g.MG(G,f))}}else w==="engagedview"&&p.Wl&&(f={CPN:this.api.getVideoData().clientPlaybackNonce},g.Ki(g.MG(p.Wl,f)));p.Yk&&(f=p.Yk,G=R.getId(), f=yj(f,{label:G}),g.Ki(f));switch(w){case "videoplaytime25":p.E_&&iK(this,p.E_);p.i6&&Q9(this,p.i6);p.cn&&g.Ki(p.cn);break;case "videoplaytime50":p.l7&&iK(this,p.l7);p.PQ&&Q9(this,p.PQ);p.D8&&g.Ki(p.D8);break;case "videoplaytime75":p.i7&&iK(this,p.i7);p.YX&&Q9(this,p.YX);p.yj&&g.Ki(p.yj);break;case "videoplaytime100":p.s_&&iK(this,p.s_),p.l6&&Q9(this,p.l6),p.Fr&&g.Ki(p.Fr)}(f=this.api.getVideoData().Ov)&&ClL(this,f,R.getId())&&ClL(this,f,`${R.getId()}gaia`)}if(p.inlineMetricEnabled&&!r)switch(w){case "videoplaybackstart":(w= p.Oj?.L)&&iK(this,w);break;case "videoplayback2s":(w=p.Oj?.O)&&iK(this,w);break;case "videoplayback10s":(w=p.Oj?.C)&&iK(this,w)}this.api.LS([R],1)}};var hhr=class extends qj{constructor(R){super(R);this.events=new g.th(R);g.K(this,this.events);this.events.W(R,"videoready",w=>{R.getPresentingPlayerType()===1&&(w={playerDebugData:{pmlSignal:!!w.getPlayerResponse()?.adPlacements?.some(p=>p?.adPlacementRenderer?.renderer), contentCpn:w.clientPlaybackNonce}},g.Rv("adsClientStateChange",w))})}};var g6_=class extends qj{constructor(R){super(R);this.accumulatedWatchTimeMillis=0;this.Rq=this.L=null;this.events=new g.th(R);g.K(this,this.events);N(this.api,"getAccumulatedWatchTime",()=>this.getAccumulatedWatchTime()); this.events.W(R,"progresssync",()=>{var w=this.api.getVideoData();if(w&&(w=w.clientPlaybackNonce)){this.Rq!==w&&(this.accumulatedWatchTimeMillis=0,this.L=null,this.Rq=w);var p=this.api.getPlayerStateObject();w=Math.round((this.api.getCurrentTime()||0)*1E3);p.L(8)&&this.L!==null&&(p=w-this.L,p>0&&p<1E3&&(this.accumulatedWatchTimeMillis+=p));this.L=w}})}getAccumulatedWatchTime(){return this.Rq?{cpn:this.Rq, accumulatedWatchTimeMillis:this.accumulatedWatchTimeMillis}:null}};var Ap=class extends g.wv{constructor(R,w){super(g.Ys({role:"menuitemcheckbox","aria-checked":"false"}),w,R,{j:"div",Z:"ytp-menuitem-toggle-checkbox"});this.checked=!1;this.enabled=!0;this.listen("click",this.onClick)}onClick(){this.enabled&&(this.L(!this.checked),this.publish("select",this.checked))}getValue(){return this.checked}L(R){this.checked=R;this.element.setAttribute("aria-checked",String(this.checked))}setEnabled(R){(this.enabled=R)?this.element.removeAttribute("aria-disabled"):this.element.setAttribute("aria-disabled", "true")}};var HSl={EU:2,ke:1,We:0,2:"AUDIO_TRACK",1:"VOICE_BOOST",0:"STABLE_VOLUME"};var H7=["en-CA","en","es-MX","fr-CA"];var v6d=class extends Ap{constructor(R,w){super(R.Y("web_fix_annotations")?"Annotated Overlays":"Annotations",g.LI.m8);this.B=R;this.OQ=w;this.C=!1;R.Y("web_settings_menu_icons")&&(w=R.Y("delhi_modern_web_player_icons")?{j:"svg",A:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},N:[{j:"path",A:{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",A:{height:"24",viewBox:"0 0 24 24",width:"24"},N:[{j:"path",A:{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(w));this.W(R,"videodatachange",this.WS);this.W(R,"onApiChange",this.WS);this.subscribe("select",this.onSelect,this);this.WS()}isLoaded(){const R=g.j2(this.B.tf());return R!==void 0&&R.loaded}WS(){!this.B.Y("web_fix_annotations")&&g.j2(this.B.tf())===void 0||this.B.getPresentingPlayerType()===3?this.C&&(this.OQ.EK(this),this.C=!1):this.C||(this.OQ.CL(this),this.C=!0);this.B.Y("web_fix_annotations")?this.L(this.B.Y("web_fix_annotations")&&!!this.B.getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.isAnnotationsEnabled): this.L(this.isLoaded())}onSelect(R){this.B.Y("web_fix_annotations")||this.isLoaded();R?this.B.loadModule("annotations_module"):this.B.unloadModule("annotations_module");this.B.publish("annotationvisibility",R)}Gy(){this.C&&this.OQ.EK(this);super.Gy()}};var NVL=class extends qj{constructor(R){super(R);this.events=new g.th(R);g.K(this,this.events);R.addEventListener("settingsMenuInitialized",()=>{const w=new v6d(this.api,this.api.Ue());g.K(this,w)})}};var k2I={[0]:R=>AnD(R,w=>w.DT?.id), [2]:R=>wK(R,ks), [3]:R=>wK(R,Um), [4]:R=>wK(R,R8), [1]:R=>wK(R,Se)},DSx=class{constructor(R){this.L={}; this.O={};this.Xf={A$0:()=>this.L}; this.videoData=R;const w=R.O?.O;w&&w.length>0?this.C=w:(R=R.getAvailableAudioTracks(),this.C=R.length>0?WN_(R):[]);for(const p of bL)this.L[p]=k2I[p](this.C);this.bB()}ww(R){return this.O[R]}bB(){let R=this.C;const w={};for(const p of bL)if(this.L[p]){R=yv[p].Bj(R,this.videoData);for(const r of bL)w[r]!==void 0||Nx(R,yv[r].qX)||(w[r]=yv[p].Tz);w[p]===void 0&&(w[p]=0)}else w[p]=1;this.O=w}},bL=[0,1,2,3,4],yv={[0]:{Tz:2,qX:qUH,Bj:z3d},[2]:{Tz:4,qX:ks,Bj:BSL},[3]:{Tz:5,qX:Um,Bj:xmb},[1]:{Tz:3,qX:Se, Bj:l3b},[4]:{Tz:6,qX:R8,Bj:LNl}};var UuW=class extends qj{constructor(R){super(R);this.events=new g.th(R);g.K(this,this.events);const w=this.api.Y("html5_enable_audio_quality_setting_feature");N(this.api,"getUserAudioQualitySetting",()=>w?this.getUserAudioQualitySetting():2); N(this.api,"setUserAudioQualitySetting",p=>{w&&this.setUserAudioQualitySetting(p)}); N(this.api,"hasHqaAudioTrack",()=>w?this.hasHqaAudioTrack():!1); N(this.api,"getAudioQualitySettingState",()=>w?this.api.ww(4):1); this.lc=qkd();this.updateEnvironmentData()}getUserAudioQualitySetting(){return this.lc}setUserAudioQualitySetting(R){this.api.Ty("aqs_set",{setting:R});g.Qp("yt-player-audio-quality-setting",R,3122064E3);R!==this.lc&&(this.lc=R,this.updateEnvironmentData(),this.hasHqaAudioTrack()&&this.api.RA(),this.api.bB())}hasHqaAudioTrack(){const R=this.api.getVideoData()?.O?.C;return R?Nx(R,w=>R8(w)):!1}updateEnvironmentData(){this.api.V().lc=this.lc}};var SuH=class extends qj{constructor(R){super(R);N(this.api,"getAudioTrackState",()=>this.api.ww(0))}};var RPt=class extends g.k{constructor(R){super({j:"button",E0:["ytp-button","ytp-autonav-toggle"],A:{title:R.Y("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"},N:[{j:"div",Z:"ytp-autonav-toggle-button-container",N:[{j:"div",Z:"ytp-autonav-toggle-button",A:{"aria-checked":"true"}}]}]});this.B=R;this.O=[];this.L=!1;this.isChecked=!0;R.createClientVe(this.element, this,113681);this.W(R,"presentingplayerstatechange",this.C);this.listen("click",this.onClick);this.O.push(this.W(this.B,"videodatachange",this.C));this.O.push(this.W(this.B,"videoplayerreset",this.C));this.O.push(this.W(this.B,"onPlaylistUpdate",this.C));this.O.push(this.W(this.B,"autonavchange",this.G));R.Y("delhi_fast_follow_autonav_toggle")&&this.element.classList.add("delhi-fast-follow-autonav-toggle");or(R,this.element,this);this.C()}C(){var R;if(R=this.B.getPresentingPlayerType()!==3&&g.ar(this.B)&& this.B.L_().getPlayerSize().width>=400)R=this.Ib(),R=this.B.V().Y("client_respect_autoplay_switch_button_renderer")?!!R.autoplaySwitchButtonRenderer:!!R.getWatchNextResponse()?.contents?.twoColumnWatchNextResults?.autoplay?.autoplay!==!1;R?this.L||(this.L=!0,this.Rg(this.L),R=this.Ib(),this.G(R.autonavState),this.B.logVisibility(this.element,this.L)):(this.L=!1,this.Rg(this.L))}G(R){bnb(this)?this.isChecked=R!==1:((R=R!==1)||(R=g.SN(),R=g.Y("web_autonav_allow_off_by_default")&&!R.vS(141)&&g.n("AUTONAV_OFF_BY_DEFAULT")? !1:!R.vS(140)),this.isChecked=R);ynd(this)}onClick(){this.isChecked=!this.isChecked;this.B.CE(this.isChecked?2:1);ynd(this);if(bnb(this)){const R=this.Ib().autoplaySwitchButtonRenderer;this.isChecked&&R?.onEnabledCommand?g.m1(this.B,"innertubeCommand",R.onEnabledCommand):!this.isChecked&&R?.onDisabledCommand&&g.m1(this.B,"innertubeCommand",R.onDisabledCommand)}this.B.logClick(this.element)}getValue(){return this.isChecked}Ib(){return this.B.getVideoData({playerType:1})}};var w6R=class extends qj{constructor(R){super(R);this.events=new g.th(R);g.K(this,this.events);this.events.W(R,"standardControlsInitialized",()=>{const w=new RPt(R);g.K(this,w);R.GA(w,"RIGHT_CONTROLS_LEFT")})}};var VOd=class extends Ap{constructor(R){super(R.Y("web_player_use_cinematic_label_2")?"Ambient mode":"Cinematic lighting",g.LI.IU);this.B=R;this.C=!1;this.O=new g.vZ(()=>{g.fc(this.element,"ytp-menuitem-highlighted")},0); this.OQ=R.Ue();R=R.Y("delhi_modern_web_player_icons")?{j:"svg",A:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},N:[{j:"path",A:{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",A:{height:"24",viewBox:"0 0 24 24",width:"24"},N:[{j:"path",A:{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(R);this.subscribe("select",this.G,this);this.listen(i2,this.K);g.K(this,this.O)}WS(R){R?this.C||(this.OQ.CL(this),this.C=!0):this.C&&(this.OQ.EK(this), this.C=!1);this.C&&this.L(SYI())}K(){g.fc(this.element,"ytp-menuitem-highlight-transition-enabled")}G(R){var w=SYI();R!==w&&(w=g.SN(),wx(190,R),wx(192,!0),w.save(),g.m1(this.B,"cinematicSettingsToggleChange",R))}Gy(){this.C&&this.OQ.EK(this);super.Gy()}};var p6V=class extends qj{constructor(R){super(R);this.L=!1;R.addEventListener("settingsMenuInitialized",()=>{ojI(this)}); R.addEventListener("highlightSettingsMenu",w=>{ojI(this);var p=this.menuItem;w==="menu_item_cinematic_lighting"&&(g.pc(p.element,"ytp-menuitem-highlighted"),g.pc(p.element,"ytp-menuitem-highlight-transition-enabled"),p.O.start())}); N(R,"updateCinematicSettings",w=>{this.updateCinematicSettings(w)})}updateCinematicSettings(R){this.L=R; this.menuItem?.WS(R);this.api.publish("onCinematicSettingsVisibilityChange",R)}};var rYa=class extends qj{constructor(R){super(R);this.events=new g.th(R);g.K(this,this.events);this.events.W(R,"applicationvideodatachange",(w,p)=>{p=p.clipConfig;w==="dataloaded"&&p&&p.startTimeMs!=null&&p.endTimeMs!=null&&this.api.setLoopRange({startTimeMs:Math.floor(Number(p.startTimeMs)),endTimeMs:Math.floor(Number(p.endTimeMs)),postId:p.postId,type:"clips"})})}};var fLV=class extends qj{constructor(R){super(R);this.events=new g.th(R);g.K(this,this.events);N(R,"setCreatorEndscreenVisibility",this.setCreatorEndscreenVisibility.bind(this));N(R,"setCreatorEndscreenHideButton",this.L.bind(this));this.Y("web_fix_annotations")&&this.events.W(R,"annotationvisibility",w=>{this.setCreatorEndscreenVisibility(!w);this.hideButton&&g.wO(this.hideButton,w)})}setCreatorEndscreenVisibility(R){Jm(this.api.tf())?.Rg(R)}L(R){this.hideButton=R; R=w=>{w==="creatorendscreen"&&(w=Jm(this.api.tf()))&&w.mM(this.hideButton)}; this.events.W(this.api,"modulecreated",R);R("creatorendscreen")}};var GrS=class extends qj{constructor(R){super(R);this.events=new g.th(R);g.K(this,this.events);this.events.W(R,"videodatachange",()=>{var w=this.api.getRootNode(),p=this.api.V();g.pc(w,"ytp-delhi-modern");p.Y("delhi_modern_web_player_icons")&&g.pc(w,"ytp-delhi-modern-icons");p.Y("delhi_modern_web_player_horizontal_volume_controls")&&g.pc(w,"ytp-delhi-horizontal-volume-controls");p.Y("delhi_modern_web_player_compact_controls")&&g.pc(w,"ytp-delhi-modern-compact-controls");p.Y("delhi_modern_web_player_big_mode_consistent_pill_height")&& g.pc(w,"ytp-big-mode-consistent-pill-height");switch(Sz(p.experiments,"delhi_modern_web_player_blending_mode")){case "luminosity":g.pc(w,"ytp-delhi-modern-with-luminosity");break;case "difference":g.pc(w,"ytp-delhi-modern-with-difference");break;case "exclusion":g.pc(w,"ytp-delhi-modern-with-exclusion")}w=this.api.isHdr()||this.api.Y("delhi_modern_web_player_disable_frosted_glass");p=g.Iq(this.api.V().experiments,"web_player_frosted_glass_blur_radius_float",16);w=w?"none":`blur(${p}px)`;this.api.getRootNode().style.setProperty("--yt-frosted-glass-backdrop-filter-override", w);tO6(this)}); this.events.W(R,"resize",()=>{tO6(this)})}};var IL6=class extends Ap{constructor(R,w,p,r,f){const G=R.Y("html5_enable_new_audio_settings_menu");super("Stable Volume",G?HSl.We:g.LI.We);this.B=R;this.K=w;this.O=p;this.hasDrcAudioTrack=r;this.getDrcState=f;this.G=this.enableNewAudioSettingsMenu=this.C=!1;g.pc(this.element,"ytp-drc-menu-item");this.OQ=(this.enableNewAudioSettingsMenu=G)?R.Ue().xE:R.Ue();R.Y("html5_enable_voice_boost")?(this.G=!0,this.W(R,"onFilterAudioFeatures",this.aq)):R.addEventListener("videodatachange",this.aq.bind(this)); R.Y("mta_drc_mutual_exclusion_removal")&&this.W(R,"onPlaybackAudioChange",this.aq);R.createClientVe(this.element,this,273317);this.listen("click",this.D);w=this.O()===1&&this.hasDrcAudioTrack();this.enableNewAudioSettingsMenu||(R=R.Y("delhi_modern_web_player_icons")?{j:"svg",A:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},N:[{j:"path",A:{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",A:{height:"24",viewBox:"0 0 24 24",width:"24"},N:[{j:"path",A:{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(R));this.subscribe("select",this.J,this);this.enableNewAudioSettingsMenu||this.G?this.aq():(this.setEnabled(this.hasDrcAudioTrack()),this.L(w),this.OQ.CL(this))}J(R){this.K(R?1:0)}aq(){if(this.enableNewAudioSettingsMenu|| this.G){var R=this.B.getPresentingPlayerType();R===2||R===3?this.C&&(this.C=!1,this.OQ.EK(this)):(R=this.getDrcState(),R!==1?(R===0?(this.L(this.O()===1),this.setEnabled(!0)):(this.L(!1),this.setEnabled(!1)),this.C||(this.OQ.CL(this),this.C=!0)):this.C&&(this.OQ.EK(this),this.C=!1))}else{R=this.hasDrcAudioTrack();const w=this.O()===1&&R;this.L(w);this.setEnabled(R)}}Gy(){this.OQ.EK(this);super.Gy()}D(){this.B.logClick(this.element)}};var CHb=class extends qj{constructor(R){super(R);this.events=new g.th(R);g.K(this,this.events);R.Y("html5_show_drc_toggle")&&R.addEventListener("settingsMenuInitialized",()=>{this.menuItem||(this.menuItem=new IL6(this.api,this.setDrcUserPreference.bind(this),this.getDrcUserPreference.bind(this),this.C.bind(this),this.getDrcState.bind(this)),g.K(this,this.menuItem))}); N(this.api,"setDrcUserPreference",w=>{this.setDrcUserPreference(w)}); N(this.api,"getDrcUserPreference",()=>this.getDrcUserPreference()); N(this.api,"hasDrcAudioTrack",()=>this.C()); N(this.api,"getDrcState",()=>this.getDrcState()); this.L=g.hj("yt-player-drc-pref")??1;this.updateEnvironmentData()}getDrcUserPreference(){return this.L}setDrcUserPreference(R){this.api.Ty("drc_set",{pref:R});g.Qp("yt-player-drc-pref",R,31536E3);R!==this.L&&(this.L=R,this.updateEnvironmentData(),this.C()&&this.api.RA(),this.api.bB())}updateEnvironmentData(){this.api.V().Nk=this.L===1}C(){const R=this.api.getVideoData()?.O?.C;if(!R)return!1;if(this.api.getAvailableAudioTracks().length>1&&this.api.Y("mta_drc_mutual_exclusion_removal")){const w=this.api.d7()?.DT?.id; return Nx(R,p=>p.audio.L&&p.DT?.id===w)}return Nx(R,w=>w.audio?.L===!0)}getDrcState(){return this.api.ww(3)}};var uWa=class extends qj{constructor(R){super(R);this.L={};this.events=new g.th(R);g.K(this,this.events);this.events.W(R,"videodatachange",()=>{this.onVideoDataChange()}); this.events.W(R,g.bp("embargo"),w=>{this.api.SN(!0);var p=this.L[w.id]??[];for(const r of p)this.api.hideControls(),this.api.A$("auth",2,"This video isn't available in your current playback area",Ro({embargoed:1,id:w.id,idx:w.C,start:w.start})),(p=r.embargo?.onTrigger)&&g.m1(this.api,"innertubeCommand",p)})}onVideoDataChange(){const R=this.api.getVideoData(); this.api.P1("embargo",1);const w=R?.f2.get("PLAYER_CUE_RANGE_SET_IDENTIFIER_EMBARGO");w?.length?Ond(this,w.filter(p=>p.onEnter?.some(this.C))):R?.cueRanges&&Ond(this,R.cueRanges.filter(p=>p.onEnter?.some(this.C)))}C(R){return R.embargo!==void 0}Gy(){super.Gy(); this.L={}}};var slm=class extends qj{constructor(R){super(R);this.L=[];this.events=new g.th(R);g.K(this,this.events);N(R,"addEmbedsConversionTrackingParams",w=>{this.addEmbedsConversionTrackingParams(w)}); this.events.W(R,"veClickLogged",w=>{this.api.hasVe(w)&&(w=w.visualElement.getAsJspb(),w=g.wU(w,2),this.L.push(w))})}addEmbedsConversionTrackingParams(R){var w=this.api.V(); const p=w.widgetReferrer,r=w.GE,f=this.L;let G="";const I=w.getWebPlayerContextConfig();I&&(G=I.embedsIframeOriginParam||"");p.length>0&&(R.embeds_widget_referrer=p);r.length>0&&(R.embeds_referring_euri=r);w.G&&G.length>0&&(R.embeds_referring_origin=G);I&&I.embedsFeature&&(R.feature=I.embedsFeature);f.length>0&&(w.Y("embeds_web_enable_lite_experiment_control_arm_logging")?f.unshift(28572):g.En(g.xW(w))&&f.unshift(159628),w=f.join(","),w=g.IN()?w:g.P8(w,4),R.source_ve_path=w);this.L.length=0}};var mxU=class extends qj{constructor(R){super(R);N(R,"isEmbedsShortsMode",()=>R.isEmbedsShortsMode()); N(R,"getReelItemWatchResponse",()=>R.getVideoData({playerType:1})?.getReelItemWatchResponse()??null)}};var zPP=class extends qj{constructor(R){super(R);this.events=new g.th(R);g.K(this,this.events);this.events.W(R,"initialvideodatacreated",w=>{g$(Q_(),16623);this.L=g.ut();var p=R.V().Ww&&!w.WB;wH(w)&&p?(g$(Q_(),27240,void 0,{implicitGestureType:"INTERACTION_LOGGING_GESTURE_TYPE_AUTOMATED"}),w.getWatchNextResponse()&&(p=w.getWatchNextResponse()?.trackingParams)&&k3(p),w.getPlayerResponse()&&(w=w.getPlayerResponse()?.trackingParams)&&k3(w)):(g$(Q_(),32594,void 0,{implicitGestureType:"INTERACTION_LOGGING_GESTURE_TYPE_AUTOMATED"}), w.getEmbeddedPlayerResponse()&&(w=w.getEmbeddedPlayerResponse()?.trackingParams)&&k3(w))}); this.events.W(R,"loadvideo",()=>{g$(Q_(),27240,void 0,{implicitGestureType:"INTERACTION_LOGGING_GESTURE_TYPE_AUTOMATED",parentCsn:this.L})}); this.events.W(R,"cuevideo",w=>{w===1&&g$(Q_(),32594,void 0,{implicitGestureType:"INTERACTION_LOGGING_GESTURE_TYPE_AUTOMATED",parentCsn:this.L})}); this.events.W(R,"largeplaybuttonclicked",w=>{g$(Q_(),27240,w.visualElement)}); this.events.W(R,"playlistnextbuttonclicked",w=>{g$(Q_(),27240,w.visualElement)}); this.events.W(R,"playlistprevbuttonclicked",w=>{g$(Q_(),27240,w.visualElement)}); this.events.W(R,"playlistautonextvideo",()=>{g$(Q_(),27240,void 0,{implicitGestureType:"INTERACTION_LOGGING_GESTURE_TYPE_AUTOMATED"})})}};var KNd=class extends g.f5{constructor(R,w){super();this.L=null;this.O=w;w=[];for(let p=0;p<=100;p++)w.push(p/100);w={threshold:w,trackVisibility:!0,delay:1E3};(this.C=window.IntersectionObserver?new IntersectionObserver(p=>{p=p[p.length-1];let r=null;typeof p.isVisible==="undefined"?document.visibilityState==="visible"&&p.isIntersecting&&p.intersectionRatio>0?r=p.intersectionRatio:document.visibilityState==="hidden"?r=0:r=null:r=p.isVisible?p.intersectionRatio:0;r!=null&&(r=Math.max(r,0),r=Math.min(r, 1));this.L=r;typeof this.O==="function"&&this.O(this.L)},w):null)&&this.C.observe(R)}Gy(){super.Gy(); this.L=null;this.C&&this.C.disconnect()}};var BdR=class extends qj{constructor(R){super(R);this.events=new g.th(R);g.K(this,this.events);this.events.W(R,"applicationInitialized",()=>{Ej6(this)})}};var Wdt=class extends qj{constructor(R){super(R);N(this.api,"dismissFeaturedProductOverlay",()=>{this.dismissFeaturedProductOverlay()})}dismissFeaturedProductOverlay(){this.api.publish("featuredproductdismissed")}};var xxU=class extends g.k{constructor(R){super({j:"div",E0:["ytp-player-content","ytp-iv-player-content"],N:[{j:"div",Z:"ytp-free-preview-countdown-timer",N:[{j:"span",fB:"{{label}}"},{j:"span",Z:"ytp-free-preview-countdown-timer-separator",fB:"\u2022"},{j:"span",fB:"{{duration}}"}]}]});this.api=R;this.L=null;this.O=this.C=0;this.W(this.api,"videodatachange",this.onVideoDataChange);this.api.createClientVe(this.element,this,191284)}show(){super.show();this.api.logVisibility(this.element,!0)}stopTimer(){this.L&& (this.L.dispose(),this.L=null)}onVideoDataChange(R){var w=this.api.getVideoData()?.getPlayerResponse()?.playabilityStatus;w&&(w=Dml(w),this.api.getPlayerStateObject().L(128)||R==="dataloaderror"||!w?(this.C=0,this.stopTimer(),this.hide()):(R=(w.remainingTimeSecs||0)*1E3,R>0&&(this.show(),this.updateValue("label",Fm(w.label)),MOx(this,R))))}Gy(){this.stopTimer();super.Gy()}};var lLb=class extends qj{constructor(R){super(R);this.events=new g.th(R);g.K(this,this.events);this.events.W(R,"basechromeinitialized",()=>{this.L=new xxU(R);g.K(this,this.L);g.P7(R,this.L.element,4);this.L.hide()})}};var Lda=class extends g.k{constructor(R){super({j:"button",E0:["ytp-fullerscreen-edu-button","ytp-button"],N:[{j:"div",E0:["ytp-fullerscreen-edu-text"],fB:"Scroll for details"},{j:"div",E0:["ytp-fullerscreen-edu-chevron"],N:[kwI()]}],A:{"data-priority":"2"}});this.o0=R;this.fade=new g.HU(this,250,void 0,100);this.C=this.L=!1;R.createClientVe(this.element,this,61214);g.K(this,this.fade);this.W(R,"fullscreentoggled",this.WS);this.W(R,"presentingplayerstatechange",this.WS);this.listen("click",this.onClick); this.WS()}G(R){g.M(this.element,"ytp-fullerscreen-edu-button-subtle",R);R&&!this.C&&(this.o0.Y("player_tooltip_data_title_killswitch")?this.element.setAttribute("title","Scroll for details"):this.element.setAttribute("data-tooltip-title","Scroll for details"),or(this.o0,this.element,this),this.C=!0)}onClick(){this.o0.logClick(this.element);g.m1(this.o0,"onFullerscreenEduClicked")}O(R){this.L=R;this.WS()}WS(){this.o0.isFullscreen()?this.L?this.fade.hide():this.fade.show():this.hide();this.o0.logVisibility(this.element, this.o0.isFullscreen()&&!this.L)}};var qIi=class extends qj{constructor(R){super(R);this.events=new g.th(R);g.K(this,this.events);N(this.api,"updateFullerscreenEduButtonSubtleModeState",p=>{this.updateFullerscreenEduButtonSubtleModeState(p)}); N(this.api,"updateFullerscreenEduButtonVisibility",p=>{this.updateFullerscreenEduButtonVisibility(p)}); const w=R.V();R.Y("external_fullscreen_with_edu")&&w.externalFullscreen&&b8(w)&&w.controlsType==="1"&&this.events.W(R,"standardControlsInitialized",()=>{this.L=new Lda(R);g.K(this,this.L);R.GA(this.L)})}updateFullerscreenEduButtonSubtleModeState(R){this.L?.G(R)}updateFullerscreenEduButtonVisibility(R){this.L?.O(R)}};var AYa=class extends g.k{constructor(R){super({j:"div",Z:"ytp-gated-actions-overlay",N:[{j:"div",Z:"ytp-gated-actions-overlay-background",N:[{j:"div",Z:"ytp-gated-actions-overlay-background-overlay"}]},{j:"button",E0:["ytp-gated-actions-overlay-miniplayer-close-button","ytp-button"],A:{"aria-label":"Close"},N:[g.fQ()]},{j:"div",Z:"ytp-gated-actions-overlay-bar",N:[{j:"div",Z:"ytp-gated-actions-overlay-text-container",N:[{j:"div",Z:"ytp-gated-actions-overlay-title",fB:"{{title}}"},{j:"div",Z:"ytp-gated-actions-overlay-subtitle", fB:"{{subtitle}}"}]},{j:"div",Z:"ytp-gated-actions-overlay-button-container"}]}]});this.api=R;this.background=this.KB("ytp-gated-actions-overlay-background");this.C=this.KB("ytp-gated-actions-overlay-button-container");this.L=[];this.W(this.KB("ytp-gated-actions-overlay-miniplayer-close-button"),"click",()=>{g.m1(this.api,"onCloseMiniplayer")}); this.hide()}};var bdU=class extends qj{constructor(R){super(R);this.events=new g.th(R);g.K(this,this.events);this.L=new AYa(this.api);g.K(this,this.L);this.events.W(R,"videodatachange",()=>{const w=this.api.getVideoData()?.Cj;var p=this.L;if(w){p.update({title:w.title?.content||"",subtitle:w.subtitle?.content||""});var r=w.thumbnail;let f="none";if(r?.sources){let G=0;for(const I of r.sources)I.width&&I.url&&I.width>G&&(G=I.width,f=`url(${I.url})`)}p.background.style.backgroundImage=f;Plr(p,w.actionButtons||[]); p.show()}else p.hide()}); g.P7(this.api,this.L.element,4)}};var yYS=class extends qj{constructor(R){super(R);B7(this.api,"getSphericalProperties",()=>this.getSphericalProperties()); B7(this.api,"setSphericalProperties",(...w)=>{this.setSphericalProperties(...w)}); zZ(this.api,"getSphericalProperties",()=>this.api.getPresentingPlayerType()===2?{}:this.getSphericalProperties()); zZ(this.api,"setSphericalProperties",(...w)=>{this.api.getPresentingPlayerType()!==2&&this.setSphericalProperties(...w)})}getSphericalProperties(){const R=g.MS(this.api.tf()); return R?R.getSphericalProperties():{}}setSphericalProperties(R){if(R){var w=g.MS(this.api.tf());w&&w.setSphericalProperties(R,!0)}}};var V_m=class extends qj{constructor(R){super(R);N(R,"createClientVe",this.createClientVe.bind(this));N(R,"createServerVe",this.createServerVe.bind(this));N(R,"destroyVe",this.destroyVe.bind(this));N(R,"hasVe",this.hasVe.bind(this));N(R,"logClick",this.logClick.bind(this));N(R,"logVisibility",this.logVisibility.bind(this));N(R,"setTrackingParams",this.setTrackingParams.bind(this))}createClientVe(R,w,p,r=!1){this.api.createClientVe(R,w,p,r)}createServerVe(R,w,p=!1){this.api.createServerVe(R,w,p)}setTrackingParams(R, w){this.api.setTrackingParams(R,w)}logClick(R,w){this.api.logClick(R,w)}logVisibility(R,w,p){this.api.logVisibility(R,w,p)}hasVe(R){return this.api.hasVe(R)}destroyVe(R){this.api.destroyVe(R)}};var oba=class{constructor(R,w){this.BB=R;this.policy=w;this.playbackRate=1}setPlaybackRate(R){this.playbackRate=Math.max(1,R)}getPlaybackRate(){return this.playbackRate}};var t_b=class{constructor(R,w,p,r){this.M0=R;this.Z$=w;this.policy=p;this.logger=r;this.Db=[];this.nL=[];this.C=-1;this.Vh=null;this.U=this.timestampOffset=0;this.L=10;this.K=new Set;this.Xf={Qp:f=>this.Qp(f)}; this.G=w.PB?0:1;p.wK>0&&(this.L=p.wK)}O0(R){this.K.add(R.info.yk);this.C=Znx(this,this.nL,this.Db,R,this.C);this.O=R;this.U=(0,g.T)()}X(R){YUD(this,this.nL,"og");FNH(this,R);YUD(this,this.nL,"trim");const {nL:w,Db:p}=jnd(this);R=[];for(let r=0;r0){const m=ji(C, G);m>=0&&(u=(C.end(m)-G+.1)*1E3)}R.push({formatId:g.ZK(f.info.rN.info,this.Z$.PB),CS:f.info.CS,sequenceNumber:f.info.yk+this.G,hR:I,Z_:f.info.C,Cu:u})}return{nL:w,k7:R}}S(R,w){w?.iq||(this.Db=[]);this.policy.Ta?(R=g.VU(this.nL,{startTimeMs:R*1E3},(p,r)=>p.startTimeMs-r.startTimeMs),this.C!==R&&(this.C=-1,this.O=void 0)):(FNH(this,!0),this.C=njL(this.nL,R*1E3))}xY(R){this.Vh=R}I0(){return this.O?.info}Qp(R){const w=g.ZK(R.info.rN.info,this.Z$.PB),p=R.info.yk+this.G; var r=R.info.startTime*1E3;if(this.policy.U0)try{r=this.policy.U0?g.N9(R)*1E3:R.info.startTime*1E3}catch(I){Math.random()>.99&&this.logger&&(r=BX(R.C).slice(0,1E3),this.logger&&this.logger({parserErrorSliceInfo:R.info.EC(),encodedDataView:g.c8(r,4)})),r=R.info.startTime*1E3}const f=R.info.clipId;let G=this.policy.U0?g.I66(R)*1E3:R.info.duration*1E3;this.policy.U0&&(r<0||G<0)&&(this.logger&&(this.logger({missingSegInfo:R.info.EC(),startTimeMs:r,durationMs:G}),this.policy.Bk||(r<0&&(r=R.info.startTime* 1E3),G<0&&(G=R.info.duration*1E3))),this.policy.Bk&&(r<0&&(r=R.info.startTime*1E3),G<0&&(G=R.info.duration*1E3)));return{formatId:w,yk:p,startTimeMs:r,clipId:f,WI:G}}J(){this.nL=[];this.Db=[];this.K.clear();this.C=-1;this.O=void 0}D(){this.O=void 0}QV(R){this.timestampOffset=R}pB(R){return this.K.has(R)}};var OdS=class{constructor(R,w,p,r,f){this.loader=R;this.Z$=w;this.videoTrack=p;this.audioTrack=r;this.policy=f;this.seekCount=this.targetTime=0;this.G=!1;this.O=null;this.C=0;this.L=this.Z$.isManifestless&&!this.Z$.yv}seek(R,w){R!==this.targetTime&&(this.seekCount=0);this.targetTime=R;const p=this.videoTrack.L,r=this.audioTrack.L,f=this.audioTrack.Vh,G=inI(this,this.videoTrack,R,this.videoTrack.Vh,w);w=inI(this,this.audioTrack,this.policy.SI?R:G,f,w);R=Math.max(R,G,w);this.G=!0;this.Z$.isManifestless&& (QnW(this,this.videoTrack,p),QnW(this,this.audioTrack,r));return R}isSeeking(){return this.G}pP(R){this.C=R}},TSI=2/24;var Kdm=0;var Vv,l2=class{constructor(){this.data=new Uint8Array(2048);this.pos=0;Vv||(Vv=Vx("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_."))}add(R){if(this.pos+20>this.data.length){const w=new Uint8Array(this.data.length*2);w.set(this.data);this.data=w}for(;R>31;)this.data[this.pos++]=Vv[(R&31)+32],R>>=5;this.data[this.pos++]=Vv[R|0]}AF(){return g.AH(this.data.subarray(0,this.pos))}L(){return this.pos>0}reset(){this.pos=0}};var Ebm=class{constructor(R,w){this.kY=R;this.requestNumber=++Kdm;this.L=this.now();this.S=this.xY=NaN;this.D=this.L;this.O=this.a9=this.G=0;this.U=this.L;this.p_=this.Jl=this.nB=this.wB=this.h8=this.PS=this.C=this.K=0;this.O0=this.isActive=!1;this.Af=this.Mr=0;this.Xf={Bl$:()=>this.HC}; this.BB=w.BB;this.snapshot=zB(this.BB);this.policy=this.BB.C;this.Il=!!w.Il;this.Wc=w.Wc;this.oe=w.oe||0;this.zH=w.zH||0;w.qh&&(this.YY=new l2);this.HC=w.HC??!1;this.Il||OEd(this.BB);this.DC=w.DC??!1}n4(){this.xY=this.now();NSP(this.BB,this.xY);this.kY.n4()}M3(R,w){const p=this.policy.C?(0,g.T)():0;bJ(this,R,w);R-this.U<10&&this.C>0||this.M0(R,w);this.kY.M3(R,w);this.policy.C&&(R=(0,g.T)()-p,this.Af+=R,this.Mr=Math.max(R,this.Mr))}M0(R,w){const p=(R-this.U)/1E3,r=w-this.O;this.Il||(BV(this.BB,p,r), this.Wc(p,r));this.U=R;this.O=w}Yi(){this.PS&&kfI(this);this.kY.Yi()}z2(R){this.PS||(this.PS=this.G-this.a9+R,this.h8=this.G,this.wB=this.D)}I0(R=this.D,w=this.G){this.C>0||(this.S=R,this.C=w,this.O0=this.isActive=!0)}eI(){return this.zH||2}uo(){}eq(){}AK(){}X(){const R={rn:this.requestNumber,rt:(this.D-this.L).toFixed(),lb:this.G,stall:(1E3*this.K).toFixed(),ht:(this.xY-this.L).toFixed(),elt:(this.S-this.L).toFixed(),elb:this.C,d:this.YY?.AF()};this.url&&a3I(R,this.url);this.policy.C&&(R.mph=this.Mr.toFixed(), R.tph=this.Af.toFixed());R.ulb=this.nB;R.ult=this.Jl;return R}now(){return(0,g.T)()}deactivate(){this.isActive&&(this.isActive=!1)}};var oP=class extends Ebm{constructor(R,w){super(R,w);this.yh=this.pL=!1;this.pB=this.J=Infinity;this.jI=NaN;this.WB=!1;this.mq=NaN;this.Nl=this.U0=this.Qk=0;this.aM=w.aM||1;this.TW=w.TW||this.aM;this.n2=w.n2;this.yk=w.yk;this.Ou=w.Ou;SUl(this);this.ez(this.L);this.MH=(this.mq-this.L)/1E3}X(){const R=super.X();R.pb=this.aM;R.pt=(1E3*this.MH).toFixed();R.se=this.Nl;return R}ML(){const R=this.kY;this.q0||(this.q0=R.ML?R.ML():1);return this.q0}yw(){return this.n2?this.ML()!==1:!1}cB(R,w,p){if(!this.pL){this.pL= !0;if(!this.Il){bJ(this,R,w);this.M0(R,w);var r=this.ML();this.Nl=p;if(!this.Il)if(r===2){r=R-this.S0)||VW(this,r,w),this.C>0&&WV(this.BB,w,this.K));R=(R-this.L)/1E3||.01;this.policy.U&&!(this.C>0)||x$(this.BB, R,this.O,Rdr(this),this.HC)}this.deactivate()}}Uj(R,w,p){p&&(this.q0=2);R<0&&this.zH&&(R=this.zH);w?this.Qk+=R:this.U0+=R}eI(){return this.U0||this.Qk||super.eI()}M0(R,w){const p=(R-this.U)/1E3,r=w-this.O,f=this.ML();this.isActive?f===1&&((r>0||this.policy.K)&&(p>.2||r<1024)?(this.K+=p,r>0&&p>.2&&VW(this,this.oe?p:.05,r),this.yh=!0):r>0&&(VW(this,p,r),this.yh=!0)):w&&w>=this.policy.L&&this.I0(R,w);super.M0(R,w)}SI(R){if(!this.Il){bJ(this,R,this.G);var w=(R-this.L)/1E3;this.ML()!==2&&this.C>0&&(this.K+= (R-this.U)/1E3,WV(this.BB,this.O,this.K));x$(this.BB,w,this.O,Rdr(this),this.HC,!0);R=(R-this.U)/1E3;BV(this.BB,R,0);this.Wc(R,0)}}I0(R=this.D,w=this.G){if(!(this.C>0)&&(super.I0(R,w),this.ML()===1)){w=(this.xY-this.L)/1E3;var p=(R-this.xY)/1E3;this.n2&&o8(this,this.now());this.WB||this.Il||(this.zH&&(p=Math.max(0,p-this.zH)),R=this.BB,R.U.wY(1,w),R.I0.wY(1,p))}}Ml(){this.n2&&o8(this,this.now());return this.jI}BT(){var R;if(R=this.O>this.TW)R=(R=this.O)?R>=this.policy.L:!1;return R}f_(){return this.mq}ez(R= this.now()){let w;if(this.n2){o8(this,R);if(this.q0?this.yw():this.J!==this.pB){if(w=this.pB,R0?p+R:p+Math.max(R,w)}N0(){return this.now()-this.S}ag(){return(this.O-this.C)*1E3/this.N0()||0}Df(){return this.S}};var tp=class{constructor(R){this.kY=R;this.L=new oi}feed(R){uY(this.L,R);this.n3()}n3(){if(this.G){if(!this.L.totalLength)return;const {wf:w,eY:p}=this.L.split(this.O-this.C);if(!this.kY.z2(this.G,w,this.C,this.O))return;this.C+=w.totalLength;this.L=p;this.C===this.O&&(this.G=this.O=this.C=void 0)}for(;;){var R=0;let w,p;[w,R]=fkI(this.L,R);[p,R]=fkI(this.L,R);if(w<0||p<0)break;if(!(R+p<=this.L.totalLength)){if(!(this.kY.z2&&R+1<=this.L.totalLength))break;({eY:R}=this.L.split(R));this.kY.z2(w,R,0, p)&&(this.G=w,this.C=R.totalLength,this.O=p,this.L=new oi([]));break}const {wf:r,eY:f}=this.L.split(R).eY.split(p);this.kY.Xg(w,r);this.L=f}}dispose(){this.L=new oi}};var Dxb=class{constructor(R,w){this.info=R;this.callback=w;this.state=1;this.wH=this.SJ=!1;this.OZ=null}O9(){return 0}cj(){return null}Jd(){return null}OV(){return this.state>=1}isComplete(){return this.state>=3}Y7(){return this.state===5}onStateChange(){}kp(R){const w=this.state;this.state=R;this.onStateChange(w);this.callback&&this.callback(this,w)}dH(R){R&&this.state{R+= `${w.EC()}.`}); return R.slice(0,-1)}dispose(){this.cS()||(this.info.C_[0].rN.pB=!1,this.kp(-1))}nx(){return 0}};var utb=class{constructor(R,w,p,r={}){this.policy=w;this.kY=p;this.status=0;this.L=new oi;this.C=0;this.cS=this.G=this.O=!1;this.xhr=new XMLHttpRequest;this.xhr.open(r.method||"GET",R);if(r.headers){R=r.headers;for(const f of Object.keys(R))this.xhr.setRequestHeader(f,R[f])}this.xhr.withCredentials=!0;this.xhr.onreadystatechange=()=>this.Nu(); this.xhr.onload=()=>this.onDone(); this.xhr.onerror=()=>this.onError(); this.xhr.fetch(f=>{this.L.append(f);this.C+=f.length;f=(0,g.T)();this.kY.M3(f,this.C)},()=>{},r.body||null)}Nu(){this.xhr.status&&(this.status=this.xhr.status); this.xhr.readyState===this.xhr.HEADERS_RECEIVED&&this.kY.n4()}onError(){this.O=!0;this.onDone()}onDone(){this.cS||(this.G=!0,this.kY.Yi())}X_(){return this.xhr.readyState>=this.xhr.HEADERS_RECEIVED}getResponseHeader(R){try{return this.xhr.getResponseHeader(R)}catch{return""}}Pj(){return+this.getResponseHeader("content-length")}MB(){return this.C}pZ(){return this.status>=200&&this.status<300&&!!this.C}Hk(){return this.L.totalLength>0}E2(){const R=this.L;this.L=new oi;return R}gP(){return this.L}abort(){this.cS= !0;this.xhr.abort()}w3(){return!0}V1(){return this.O}Ch(){return""}};var eP6=class{constructor(R,w){this.C=(new TextEncoder).encode(R);this.L=(new TextEncoder).encode(w)}};var C_L=class{constructor(R,w){this.L=R;this.kY=w;this.loaded=this.status=0;this.error="";R=KL(this.L.get("range")||"");if(!R)throw Error("bad range");this.range=R;this.C=new oi;this.run().then(()=>{this.kY.Yi()},p=>{this.error=`${p}`||"unknown_err"; this.kY.Yi()})}async run(){this.status=200; const R=this.L.get("docid"),w=zj(this.L.get("fmtid")||""),p=this.L.get("lmt")||"0",r=+(this.L.get("csz")||0);if(!R||!w||!r)throw Error("Invalid local URL");let f;this.L.get("ck")&&this.L.get("civ")&&(f=new eP6(this.L.get("ck"),this.L.get("civ")));const G=this.range;var I=Math.floor(G.start/r);const C=Math.floor(G.end/r);for(;I<=C;I++){var u=await s1d(R,w,p,I,f);if(u===void 0)throw Error("invariant: data is undefined");var m=I*r;const z=Math.max(0,G.start-m);m=Math.min(G.end+1,(I+1)*r)-(z+m);u=new Uint8Array(u.buffer, z,m);this.C.append(u);this.loaded+=m;this.loaded{if(f)if(this.status=f.status,f.ok&&f.body&&this.status!==204)this.status=this.status||242,this.O=f.body.getReader(),this.cS()?this.O.cancel().catch(()=>{}):(this.responseHeaders=f.headers,this.kY.n4(),Ikb(this)); else this.onDone();else this.onError(Error("null_response"))}; this.D=f=>{const G=(0,g.T)();this.cS()||(f.done?(this.O=void 0,this.onDone()):(f=f.value,this.C+=f.length,this.L.append(f),Ikb(this),this.kY.M3(G,this.C)))}; this.onError=f=>{this.errorMessage=String(f);this.K=!0;this.onDone()}; this.L=new oi;this.G=window.AbortController?new AbortController:void 0;this.start(R)}start(R){const w={credentials:"include",cache:"no-store"};Object.assign(w,this.J);this.G&&(w.signal=this.G.signal);R=new Request(R,w);fetch(R).then(this.U,this.onError).then(void 0,qb)}onDone(){this.cS()||this.kY.Yi()}getResponseHeader(R){return this.responseHeaders?this.responseHeaders.get(R):null}X_(){return!!this.responseHeaders}MB(){return this.C}Pj(){return+this.getResponseHeader("content-length")}pZ(){return this.status>= 200&&this.status<300&&!!this.C}Hk(){return!!this.L.totalLength}E2(){const R=this.L;this.L=new oi;return R}gP(){return this.L}cS(){return this.aborted}abort(){this.O&&this.O.cancel().catch(()=>{}); this.G&&this.G.abort();this.aborted=!0}w3(){return!0}V1(){return this.K}Ch(){return this.errorMessage}};var m2x=class{constructor(R,w,p={}){this.kY=w;this.C=this.status=0;this.cS=this.L=!1;this.xhr=new XMLHttpRequest;this.xhr.open(p.method||"GET",R);if(p.headers){R=p.headers;for(var r of Object.keys(R))this.xhr.setRequestHeader(r,R[r])}this.xhr.responseType="arraybuffer";this.xhr.withCredentials=!0;this.xhr.onreadystatechange=f=>{this.Nu(f)}; r=j3(f=>{this.onDone(f)}); this.xhr.addEventListener("load",r,!1);this.xhr.addEventListener("error",r,!1);p.body?this.xhr.send(p.body):this.xhr.send();this.xhr.addEventListener("progress",j3(f=>{this.onProgress(f)}),!1)}onDone(){if(!this.cS){this.status=this.xhr.status; try{this.response=this.xhr.response,this.C=this.response.byteLength}catch{}this.L=!0;this.kY.Yi()}}Nu(){this.xhr.readyState===2&&this.kY.n4()}onProgress(R){this.cS||(this.status=this.xhr.status,this.L||(this.C=R.loaded),this.kY.M3((0,g.T)(),R.loaded))}X_(){return this.xhr.readyState>=2}getResponseHeader(R){try{return this.xhr.getResponseHeader(R)}catch{return g.AO(Error(`Could not read XHR header ${R}`)),""}}Pj(){return+this.getResponseHeader("content-length")}MB(){return this.C}pZ(){return this.status>= 200&&this.status<300&&this.L&&!!this.C}Hk(){return this.L&&!!this.response&&!!this.response.byteLength}E2(){const R=this.response;this.response=void 0;return new oi([new Uint8Array(R)])}gP(){return new oi([new Uint8Array(this.response)])}abort(){this.cS=!0;this.xhr.abort()}w3(){return!1}V1(){return!1}Ch(){return""}};var rRY=class extends g.f5{constructor(R,w){super();this.policy=R;this.C_=w;this.C=0;this.L=null;this.QL=[];this.O=null;this.Xf={O5:()=>this.C_}; this.C_.length===1||g.kb(this.C_,p=>!!p.range)}VI(){if(!this.QL.length)return[]; const R=this.QL;this.QL=[];this.O=g.Tr(R).info;return R}Gx(){return this.QL}Gy(){super.Gy();this.L=null;this.QL.length=0;this.C_.length=0;this.O=null}};var M_i=class extends g.f5{constructor(R,w,p,r,f,G,I,C,u=!1){super();this.kY=R;this.policy=w;this.Uy=p;this.EQ=r;this.timing=f;this.logger=G;this.G=I;this.mP=C;this.J=u;this.lastError=null;this.L=0;this.K=!1;this.O=0;this.C=new g.vZ(this.D,this.policy.wB,this)}D(){if(!this.cS()){var R=(0,g.T)(),w=!1;if(this.policy.GE){var p=this.timing.C>0?this.timing.S:this.timing.L;this.policy.xe&&this.O&&(p=this.O);R=R-p-(this.policy.Ie?this.policy.hO:this.timing.eI()*1E3);p=LL(K7(this),!1);R>=2E3*p?w=!0:R>=this.policy.LU* p&&(this.L=this.policy.XT)}else if(this.timing.C>0){if(this.J){this.policy.cB&&(this.L=0);return}R=this.timing.f_();this.timing.ez();this.timing.f_()-R>=this.policy.wB*.8?(this.L++,w=this.L>=5):this.L=0}else w=R-this.timing.Ml(),this.policy.XT&&w>0&&(this.L+=1),R=LL(K7(this),!1)*this.policy.tB,w=w>R*1E3;this.L>0&&this.kY.NT();w?this.py():this.C.start()}}py(){this.K=!0;this.kY.TA();this.lastError="net.timeout";ER(this)}canRetry(R){const w=K7(this);R=R?this.policy.LV:this.policy.gS;return w.timedOut< this.policy.pV&&w.L{this.kp(O)}, qK0:()=>this.OZ, PBq:O=>{this.OZ=O}, l5I:O=>{this.Po=O}, EuB:O=>{this.Yp.lastError=O}, W3:()=>this.xhr}; this.timing=new oP(this,p);this.ZO=I;this.St=B;this.A8=W;this.Uy=g.Zy(this.info,this.policy,r);this.Uy.set("rn",this.WF().toString());this.Uy.set("rbuf",(C*1E3).toFixed().toString());this.ZO&&this.Uy.set("smb","1");this.policy.J6&&u&&this.Uy.set("pot",u);z&&this.Uy.set("bbs",z);this.policy.useUmp&&!AQ(91,8671,this.Uy.Ld)&&(this.SY=new tp(this),this.Uy.set("ump","1"),this.Uy.set("srfvp","1"));R=this.policy.fg?this.policy.Hx&&!isNaN(this.info.Ou)&&this.info.Ou>this.policy.gU?!1:!0:!1;this.Yp=new M_i(this, this.policy,this.Uy,this.info.EQ,this.timing,this.logger,r,m);this.ES=G||null;this.wH=Y0_(this);zd_(this.Yp);r=void 0;if(this.policy.F5||this.SY||this.policy.Jl)r={method:"POST"},G=(0,g.xn)([120,0]),m={},q&&(q=XZ(void 0,q),m.gh=q),this.policy.Ss&&this.A8&&(m.videoPlaybackUstreamerConfig=this.A8),this.policy.Jl&&(q=this.info.G)&&Object.assign(m,q),Object.keys(m).length>0?r.body=g.nm(m,g.bV):r.body=G;this.St&&this.A8&&(this.Uy.set("iwts","1"),r={method:"POST"},q=g.nm({jk:{Zb:this.St*1E3},AM:this.info.G?.AM|| void 0,videoPlaybackUstreamerConfig:this.A8},g.bV),r.body=q);try{this.xhr=t3(this.Uy,this.policy.D,this.timing,R,r),this.Yp.C.start(),x&&(this.sV=new g.vZ(this.Lk,x,this),this.sV.start(x+(this.timing.BB.U.QB()||0)*1E3)),g.TF(()=>{})}catch(O){FAI(this,O,!0)}}WF(){return this.timing.requestNumber}qk(){return this.Uy.qk()}J9(){const R=x2I(this.Yp); if(this.SY){var w=this.SY,p=w.L.totalLength;R.ulen=p;p>0&&(w=WX(w.L,0),R.ubyte=w,p===1&&w===0&&(R.b248180278=!0))}this.Po&&(R.rc=this.policy.zL?this.Po:this.Po.toString());this.policy.WB&&this.Gr&&(R.tr=this.Gr);R.itag=this.info.C_[0].rN.info.itag;R.ml=`${+this.info.C_[0].rN.L()}`;R.sq=`${this.info.C_[0].yk}`;this.Uy&&(R.ifi=`${+hV(2,8101,this.info.EQ.G)}`);this.Po!==410&&this.Po!==500&&this.Po!==503||(R.fmt_unav="true");(p=this.errorMessage||this.xhr?.Ch())&&(R.msg=p);this.ZO&&(R.smb="1");this.info.isDecorated()&& (R.sdai="1");return R}Mo(){return wbd(this.timing)}Ch(){return this.xhr.Ch()||""}BT(){return this.isComplete()||this.timing.BT()}M3(){!this.cS()&&this.xhr&&(this.Po=this.xhr.status,this.policy.Na&&this.OZ&&this.J4(!1),this.nJ()?this.dH(2):!this.RH&&this.BT()&&(this.dH(),this.RH=!0))}n4(){if(!this.cS()&&this.xhr){if(!this.ib&&this.xhr.X_()&&this.xhr.getResponseHeader("X-Walltime-Ms")){var R=Number(this.xhr.getResponseHeader("X-Walltime-Ms"));this.ib=((0,g.T)()-R)/1E3}this.xhr.X_()&&this.xhr.getResponseHeader("X-Restrict-Formats-Hint")&& this.policy.ZS&&!lld()&&g.Qp("yt-player-headers-readable",!0,2592E3);R=Number(this.xhr.getResponseHeader("X-Head-Seqnum"));var w=Number(this.xhr.getResponseHeader("X-Head-Time-Millis"));this.sV?.stop();this.iC=R||this.iC;this.Eq=w||this.Eq}}Yi(){var R=this.xhr;!this.cS()&&R&&(this.Po=R.status,R=this.mD(R),this.policy.WB&&this.sV?.stop(),R===5?ER(this.Yp):this.kp(R),this.Yp.C.stop())}mD(R){jEd(this);if(D7(this.Yp,this.xhr.status,this.nU?this.timing.O0||this.vZ:this.xhr.pZ(),!1,this.gA))return 5;var w= "";e$(this.Yp,this.xhr)&&(w=WAr(this.Yp,this.xhr));if(w)return lm(K7(this.Yp)),this.info.gw(this.Uy,w),3;w=R.MB();if(this.SY){this.J4(!0);jEd(this);if(D7(this.Yp,this.xhr.status,this.timing.O0||this.vZ,!1,this.gA))return 5;if(!this.YV){if(this.vZ)return lm(K7(this.Yp)),3;this.Yp.lastError="net.closed";return 5}}else{if(D7(this.Yp,this.xhr.status,this.xhr.pZ(),!1,this.gA))return 5;var p=this.info.O;if(p&&p!==w||R.V1())return this.Yp.lastError="net.closed",5;this.J4(!0)}p=GgP(this)?R.getResponseHeader("X-Bandwidth-Est"): 0;if(R=GgP(this)?R.getResponseHeader("X-Bandwidth-Est3"):0)this.Y5=!0,this.policy.Bx&&(p=R);Bnb(this.Yp,w,p?Number(p):0,this.info.C_[0].type===5);return 4}canRetry(){this.cS();const R=this.info.isDecorated();return this.Yp.canRetry(R)}onStateChange(){this.isComplete()&&(this.policy.mR?this.TA():this.timing.deactivate())}py(){this.Yp.py()}NT(){this.callback&&this.callback(this,this.state)}aJ(){return this.Yp.aJ()}dispose(){super.dispose();this.Yp.dispose();this.sV?.dispose();this.policy.mR||this.TA()}TA(){this.xhr&& this.xhr.abort();this.timing.deactivate()}VI(){if(!this.Gx().length)return[];this.SJ=!0;return this.OZ.VI()}nJ(){return this.state<1?!1:this.OZ&&this.OZ.QL.length||this.xhr?.Hk()?!0:!1}Gx(){this.J4(!1);return this.OZ?this.OZ.Gx():[]}J4(R){try{if(R||this.xhr.X_()&&this.xhr.Hk()&&!e$(this.Yp,this.xhr)&&!this.wH)this.OZ||(this.OZ=new rRY(this.policy,this.info.C_)),this.xhr.Hk()&&(this.SY?this.SY.feed(this.xhr.E2()):OR(this.OZ,this.xhr.E2(),R&&!this.xhr.Hk()))}catch(w){this.SY?FAI(this,w):g.AO(w)}}Xg(R, w){switch(R){case 21:({eY:R}=w.split(1));JWx(this,R);break;case 22:this.YV=!0;OR(this.OZ,new oi([]),!0);break;case 43:({redirectUrl:R}={redirectUrl:PX(new tH(w),1)});R&&(this.info.gw(this.Uy,R),this.vZ=!0);break;case 45:const {fE:p,N_:r}=VG(new tH(w));p&&r&&(this.If=p/r);break;case 44:this.jp=xKL(new tH(w));!this.timing.O0&&this.jp?.action===4&&this.jp?.sY?.nU&&(this.nU=this.jp.sY.nU);break;case 53:this.policy.WB&&({fA:R}=zk_(new tH(w)),R&&(this.sV||(this.fA=R,this.sV=new g.vZ(this.Lk,R,this)),this.sV.start())); break;case 60:this.YJ=yG(new tH(w));break;case 58:if(R=nDD(new tH(w)))this.w9=R,R.w9===3&&(this.gA=!0)}}z2(R,w,p,r){p||this.timing.z2(r);if(R!==21)return!1;if(R=this.policy.Na)if(R*=this.info.C_[0].rN.info.hf,w.totalLength+p!==r&&w.totalLength0)return!1;if(!this.xhr.X_())return!0; if(this.SY)var R=!this.info.O;else this.xhr.Pj()?R=!1:(R=this.xhr.getResponseHeader("content-type"),R=R==="audio/mp4"||R==="video/mp4"||R==="video/webm");if(!R)return!1;if(isNaN(this.info.Ou)){R=this.xhr.getResponseHeader("x-head-seqnum");const w=this.timing.policy.D?1:0;if(R&&Number(R)>this.info.C_[0].yk+w)return!1}return!0}nx(){return+this.xhr.getResponseHeader("X-Segment-Lmt")||0}cj(){this.xhr&&(this.iC=Number(this.xhr.getResponseHeader("X-Head-Seqnum")));return this.iC}Jd(){this.xhr&&(this.Eq= Number(this.xhr.getResponseHeader("X-Head-Time-Millis")));return this.Eq}Tg(){return this.Yp.Tg()}Lk(){if(!this.cS()&&this.xhr){this.Gr="heartbeat";var R=this.Yp;R.L+=2;this.NT()}}};var Ox=class extends Ebm{constructor(R,w){super(R,w);this.U0=!0;this.jI=!1;this.yh=this.q0=0;this.mq=this.Qk=NaN;this.WB=0;this.DC&&(this.pB=new l2)}M0(R,w){const p=(R-this.U)/1E3,r=w-this.O;this.C>0?r>0&&(this.jI&&(p>.2||r<1024?(this.K+=p,p>.2&&Tnx(this,.05,r)):Tnx(this,p,r)),this.U0&&(this.q0+=r,this.yh+=p)):w>this.policy.L&&this.I0(R,w);super.M0(R,w)}cB(R,w){bJ(this,R,w);this.M0(R,w);this.DC&&this.J&&(w-=this.J.j6,itH(this,0,R-this.J.localTimestampMs,R-this.J.localTimestampMs,w,this.J.f5>0?w/this.J.f5* 1E3:0));this.jI&&(w=this.O*this.snapshot.stall+this.O/this.snapshot.byterate,this.C>0&&WV(this.BB,this.q0,this.K),R=(R-this.L)/1E3||.01,this.policy.U&&!(this.C>0)||x$(this.BB,R,this.O,w,!1))}SI(R){bJ(this,R,this.G);var w=(R-this.U)/1E3;BV(this.BB,w,0);this.Wc(w,0);!this.jI&&this.C>0||(w=this.O*this.snapshot.stall+this.O/this.snapshot.byterate,this.C>0&&(this.K+=(R-this.U)/1E3,WV(this.BB,this.q0,this.K)),x$(this.BB,(R-this.L)/1E3||.01,this.O,w,!1,!0))}Cc(R){R=R.bQ||2147483647;(R&2)!==2&&(this.U0=!1); (R&1)===1&&(this.jI=!0)}H$(R){R=R.bQ||2147483647;(R&2)===2&&(this.U0=!1);(R&1)===1&&(this.jI=!1)}Df(){return this.S}N0(){const R=this.U0?this.now()-this.U:0;return Math.max(this.yh*1E3+R,1)}ag(){return this.q0*1E3/this.N0()}I0(R=this.D,w=this.G){this.C>0||(super.I0(R,w),w=this.BB,R=(R-this.xY)/1E3,w.U.wY(1,(this.xY-this.L)/1E3),w.I0.wY(1,R))}uo(R){this.Qk=R}eq(R){R.timestampMs&&(this.Qk=R.timestampMs);R.t_&&(this.mq=R.t_);isNaN(this.Qk)||isNaN(this.mq)||(this.WB=this.now()-this.mq/2-this.Qk)}AK(R){const w= this.J?.f5,p=R.zQ!==void 0?R.zQ*1E3:0,r=this.now(),f=this.G;if(this.J){const G=R.mQ-this.J.mQ,I=r-this.J.localTimestampMs,C=f-this.J.j6,u=isNaN(this.J.localTimestampMs)||isNaN(this.D)?0:this.D-this.J.localTimestampMs;this.DC&&itH(this,G,I,u,C,w&&w>0?C/w*1E3:0)}this.J={mQ:R.mQ,localTimestampMs:r,j6:f,f5:p}}X(){const R=super.X();R.rbw=this.ag();R.rbe=+this.U0;R.gbe=+this.jI;R.ackt=(this.Qk-this.L).toFixed();this.pB?.L()&&(R.nts=this.pB.AF());return R}ez(){}f_(){return NaN}Ml(){return this.L+this.snapshot.delay* 1E3}};var cY6=class{constructor(R,w){this.kY=w;this.C={};this.logger=new g.Q6(R)}Xg(R,w){switch(R){case 20:R=new tH(w);R={KX:DC(R,1),videoId:PX(R,2),itag:DC(R,3),lmt:DC(R,4),xtags:PX(R,5),Bf:DC(R,6),MM:MX(R,8),XD:DC(R,9),BgN:DC(R,10),startMs:DC(R,11),durationMs:DC(R,12),o5:DC(R,14),timeRange:ai(R,15,Lq),CS:DC(R,16),Ae:DC(R,17),vI:DC(R,20),c$:ai(R,21,Ugb),clipId:PX(R,1E3)};this.D(R);break;case 21:this.J(w,!1);break;case 22:this.Qb(w);break;case 31:R=OA(w,rsI);this.kY.xR(R);break;case 52:R=OA(w,BbW);this.kY.yW(R); break;case 69:R={S8:XX(new tH(w),1,vDL)};this.kY.KA(R);break;case 65:R=OA(w,XEr);this.kY.TF(R);break;default:this.K(R,w)}}D(){}K(){}};var PHU=new Set([53,49,50]),aLb=class extends cY6{constructor(R){super("sabr",R);this.kY=R;this.L=[]}K(R,w){GRl(this.kY)&&!PHU.has(R)?this.L.push({id:R,data:w}):QEI(this,R,w)}AK(R){R=new tH(R);R={mQ:DC(R,1),zQ:DC(R,2)};this.kY.AK(R)}eq(R){R=new tH(R);R={timestampMs:DC(R,1),t_:DC(R,2)};this.kY.eq(R)}w0(R){R=new tH(R);R={Kgn:XX(R,1,lV),I5Y:XX(R,2,lV)};this.kY.w0(R)}e5(R){var w=new tH(R);R=$r(w,1);var p=$r(w,2);w=$r(w,3);this.kY.e5(R,p,w)}al(R){R=VG(new tH(R));this.kY.al(R)}m2(R){R=OA(R,INd);this.kY.m2(R)}De(R){R= new tH(R);R={videoId:PX(R,1),formatId:ai(R,2,lV),endTimeMs:DC(R,3),lHB:DC(R,4),mimeType:PX(R,5),by:ai(R,6,NF_),indexRange:ai(R,7,NF_),Lx:ai(R,8,kX6)};this.kY.De(R)}NR(R){R=new tH(R);R={type:DC(R,1),scope:DC(R,2),value:cX(R,3),sendByDefault:MX(R,4),writePolicy:DC(R,5)};this.kY.NR(R)}NZ(){this.kY.NZ()}UP(R){R=fNb(new tH(R));this.kY.UP(R)}At(R){R=zk_(new tH(R));this.kY.At(R)}Xq(R){R=xKL(new tH(R));this.kY.Xq(R)}ey(R){R={redirectUrl:PX(new tH(R),1)};this.kY.ey(R)}J(R){const w=WX(R,0);if(R.totalLength!== 1){({eY:R}=R.split(1));var p=this.C[w]||null;p&&this.kY.Xn.L(w,p,R)}}Qb(R){R=WX(R,0);const w=this.C[R]||null;w&&this.kY.Qb(R,w)}D(R){const w=R.KX,p=R.MM,r=R.Bf,f=R.Ae,G=R.CS,I=R.XD,C=R.startMs,u=R.durationMs,m=R.timeRange,z=R.o5,B=R.vI,W=R.clipId,x=R.c$,q=oH(R);R=Itx.has(uI[`${R.itag}`]);this.C[w]=q;let O=-1;C&&B&&m?.timescale&&(O=C/1E3+B/m.timescale);this.kY.Uj(q,R,O,{KX:w,MM:!!p,Bf:r??-1,XD:I??-1,startMs:C??-1,durationMs:u??-1,o5:z,Ae:f,CS:G,clipId:W,timeRange:m,c$:x})}Cc(R){R={bQ:DC(new tH(R), 1)};this.kY.Cc(R)}H$(R){R={bQ:DC(new tH(R),1)};this.kY.H$(R)}Dz(R){R=nDD(new tH(R));this.kY.Dz(R)}j$(R){R={Ix:ai(new tH(R),1,sUd)};this.kY.j$(R)}onSnackbarMessage(R){R=DC(new tH(R),1);this.kY.onSnackbarMessage(R)}AE(R){R=new tH(R);R={reloadPlaybackParams:ai(R,1,$gl),Uc:MX(R,2)};this.kY.AE(R)}sA(){for(const {id:R,data:w}of this.L)QEI(this,R,w);this.L=[]}};var $xb=class extends g.f5{constructor(R){super();this.J=R;this.logger=new g.Q6("onesie");this.Sa=new Map;this.G=this.O=!1;this.Ey=this.Z$=null;this.K=!1}uH(){return Array.from(this.Sa.keys())}QR(R){return this.Sa.has(R)}dX(R){this.Sa.get(R).vn=!0}U(){let R=0;const w=this.uH();for(let p=0;p0||!p[0].range&&z.MR)f=void 0,p=p[0],r=z.Gt,G=z.data,p.range||(f=z.MR),f=new v2(ntb(p,p.L+r,G.totalLength,f),G),z.Gt+=f.info.C,w.QP.push(f);w.RD.get(m).data=new oi;z.MR&&w.RD.delete(m)}R=this.Sa.get(R);if(!R)return[];w=R.QP;R.QP=[];for(var I of w)R.JG+=I.info.C;return w||[]}I=this.Sa.get(R)?.OZ; if(!I)return[];this.J4(R,I);return I.VI()}nJ(R){return n7?YQ(this,R):!!this.Sa.get(R)?.OZ?.Gx()?.length||YQ(this,R)}J4(R,w){for(;YQ(this,R);){var p=this.WH(R);var r=R;r=this.Sa.get(r).u4&&!Z7(this,r);OR(w,p,r&&wL_(this,R))}}D(){return this.K?!1:this.K=!0}X(){this.O=!0}Gy(){super.Gy();for(const R of this.Sa.keys())this.C(R);if(this.Ey?.wm)for(const R of this.Sa.values())R.RD.clear(),R.rh.clear(),R.IW.clear(),R.QP.length=0,R.C_.length=0,R.XR.length=0,R.U8.length=0;this.Sa.clear()}},n7=!1;var X6V=new Set([2]),J3=class extends g.f5{constructor(R,w,p,r,f,G,I){super();this.policy=R;this.info=w;this.Z$=p;this.kY=f;this.logger=new g.Q6("sabr");this.SY=new tp(this);this.AV=new aLb(this);this.Xn=new $xb(this);this.state=1;this.qV=!1;this.ow=0;this.clipId="";this.segmentStartTimeMs=this.segmentNumber=-1;this.fM=0;this.Qq=-1;this.E$=this.X2=this.gA=this.ev=!1;this.policy.f7?this.Hy=new Ox(this,G):this.Hy=new oP(this,G);this.Uy=this.policy.p_?w.KE:fHr(w,this.policy,r);this.Uy.set("rn",`${this.WF()}`); this.Uy.set("alr","yes");fg6(this.Xn,p,R);this.Yp=new M_i(this,this.policy,this.Uy,w.EQ,this.Hy,this.logger,r,I,this.policy.enableServerDrivenRequestCancellation);zd_(this.Yp);this.policy?.wm&&(g.K(this,this.Xn),g.K(this,this.Yp));R=w.C;w={method:"POST",body:R};R&&(this.fM=R.length);try{this.xhr=t3(this.Uy,this.policy.D,this.Hy,s_,w),this.Yp.C.start()}catch(C){g.AO(C)}}M3(){!this.cS()&&this.xhr&&(this.J4(!1),Ms(this.kY,this))}n4(){}Yi(){if(!this.cS()&&this.xhr){var R=this.mD();R===5?(this.Tg()=== "net.badstatus"&&this.kY.vg(),ER(this.Yp)):(this.kY.UA(),this.kp(R));this.Yp.C.stop();this.uR?.stop()}}mD(){let R="";e$(this.Yp,this.xhr)&&(R=WAr(this.Yp,this.xhr));if(R)return this.info.EQ.gw(this.Uy,R),3;this.J4(!0);if(D7(this.Yp,this.xhr.status,this.xhr.pZ(),this.info.XY(),this.gA))return 5;if(this.qV)return 3;Bnb(this.Yp,this.xhr.MB(),0,this.XY());this.policy.yh&&k0D(this.kY);return 4}J4(R){const w=this.xhr;!R&&e$(this.Yp,this.xhr)||!w.Hk()||(R=w.E2(),this.SY.feed(R))}Xg(R,w){this.xhr.w3()&&R=== 21&&IgL(this);this.AV.Xg(R,w)}z2(R,w,p,r){p||(this.Hy.z2(r),this.policy.mG&&R===21&&IgL(this));if(R!==21)return!1;this.Hy.O0=!0;R=w.totalLength;p||(this.Qq=WX(w,0),w=w.split(1).eY);var f=this.policy.Ew;const G=this.AV.C[this.Qq],I=this.Z$.G.get(G);if(f&&I&&(f*=I.info.hf,R+p!==r&&R0)){this.policy.GE&&this.Yp.C.stop();var R=this.Hy.N0(),w=this.Hy.ag(),p=C7P(this,R);w>p.yE||p.zc>0&&this.info.jJ()>p.zc||(this.ow=(0,g.T)(),this.uR?.stop(),this.policy.yh&&(p=this.kY,R={ys:Math.round(w*R/1E3),FU:R},p.policy.yh&&(p.jI=R,p.Vb++)),this.py())}}py(){this.Yp.py()}Xq(R){this.kY.Xq(R,this.WF())}ey(R){this.qV=!0;this.info.EQ.gw(this.Uy,R.redirectUrl)}Cc(R){this.Hy instanceof Ox&&this.Hy.Cc(R)}H$(R){this.Hy instanceof Ox&&this.Hy.H$(R)}De(R){var w=R.formatId;const p=new OD(R.by?.first||0,R.by?.Mx||0),r=new OD(R.indexRange?.first||0,R.indexRange?.Mx||0);if(!this.Z$.G.get(oH({itag:w.itag,lmt:w.lmt,xtags:w.xtags}))){var f=R.Lx||{};f.mimeType=R.mimeType;f.itag=w.itag;f.lastModified=`${w.lmt||0}`;f.xtags=w.xtags;R=this.Z$;w=r3("");f=p_(f,null);f_(R,new I0(w,f,p,r))}}al(R){this.kY.al(R,this.WF())}onSnackbarMessage(R){if(this.policy.xv)this.kY.onSnackbarMessage(R)}KA(R){this.policy.K&&this.kY.KA(R,this.WF())}xR(R){this.hT= R;this.Yp.O=(0,g.T)();this.kY.xR(R)}eG(R){this.kY.eG(R)}e5(R,w,p){this.kY.e5(R,w,p)}NR(R){R.scope===2&&(this.HQ=R);this.kY.NR(R)}NZ(){this.ev=!0;this.kY.NZ()}w0(R){this.policy.J8&&this.kY.w0(R)}m2(R){this.kY.m2(R,this.WF())}Dz(R){R.w9===3&&(this.gA=!0);this.kY.Dz(R)}eq(R){this.policy.DC?this.Hy.eq(R):this.Hy.uo((0,g.T)())}j$(R){this.kY.j$(R)}AE(R){this.kY.AE(R)}TF(R){this.kY.TF(R)}canRetry(){this.cS();return this.Yp.canRetry(!1)}dispose(){this.cS()||(super.dispose(),this.Yp.dispose(),this.uR?.dispose(), this.kp(-1),this.TA())}kp(R){this.state=R;Ms(this.kY,this)}XY(){return this.info.XY()}f6(){return this.ev}DL(){return this.HQ}Uj(R,w,p,r){p>=0&&this.kY.DB(p);r.clipId&&(this.clipId=r.clipId);this.policy.C&&!w&&(this.segmentNumber=r.XD,this.segmentStartTimeMs=r.startMs);this.info.isDecorated()&&(p=this.info,p=p.data?.AM?.y9?p.data.AM.y9:-1,p>=0&&p>r.XD&&this.kY.loader.Ty("sdai",{skpsqmismatch:"1",stsq:p,rcvsq:r.XD,a:w}));this.Xn.Uj(R,w,r);this.policy.L2&&this.hT&&this.Hy instanceof oP&&(p=this.hT.SR, this.Hy.Uj(r.durationMs/1E3,w,p>0&&r.XD+1>=p));this.Xn.dX(R);this.kY.Uj(r)}Qb(R,w){this.Xn.Qb(R,w)}yW(R){this.requestIdentifier=R}VI(R){return this.Xn.VI(R)}O5(R){return this.Xn.O5(R)}nJ(R){return this.Xn.nJ(R)}uH(){return this.Xn.uH()}ML(){return 1}WF(){return this.Hy.requestNumber}P3(){return this.requestIdentifier}qk(){return this.Uy.qk()}gQ(){this.TA()}TA(){this.Hy.deactivate();this.xhr?.abort()}isComplete(){return this.state>=3}FQ(){return this.state===3}Y7(){return this.state===5}j0(){return this.state=== 4}HD(){return this.isComplete()}OV(){return this.state>=1}aJ(){return this.policy.cB?this.Yp.aJ():0}NT(){this.policy.cB&&Ms(this.kY,this)}Fs(){return this.info.L?.jk?.MW||0}sA(){this.lF()&&!this.E$&&(this.E$=!0,this.AV.sA())}lF(){const R=this.info.L?.jk?.Wu;return!!R&&X6V.has(R)}Yn(){return"SABR"}Tg(){return this.Yp.Tg()}J9(){const R=x2I(this.Yp);Object.assign(R,px(this.info));R.req="sabr";R.rn=this.WF();this.xhr?.status&&(R.rc=this.policy.zL?this.xhr.status:this.xhr.status.toString());var w=this.xhr?.Ch(); w&&(R.msg=w);this.ow&&(w=C7P(this,this.ow-this.Hy.Df()),R.letm=w.DS,R.mrbps=w.yE,R.mram=w.zc);return R}};var nba=class{constructor(R){this.L=R;this.X=this.jI=this.D=this.M0=this.G=this.K=this.pB=this.J=this.I0=this.U=this.Jl=this.xY=this.O0=this.S=0;this.ticks={}}tick(R,w){this.ticks[R]=w?window.performance.timing.navigationStart+w:(0,g.T)()}};var dx6=class extends g.HC{constructor(R,w,p,r,f,G){super();this.loader=R;this.Z$=w;this.policy=p;this.videoTrack=r;this.audioTrack=f;this.X=this.L=null;this.K=this.J=NaN;this.D=0;this.U=NaN;this.u3=null;this.O0=this.xY=NaN;this.I0=new Map;this.S=this.O=this.G=NaN;this.Xf={Nby:()=>this.C}; this.C=G?1:0}bS(R,w,p,r){var f=!1;this.policy.C&&(f=p?this.O0===R.yk:this.xY===R.yk);if(this.u3&&r&&!f){r=[];f=[];let G=[],I=void 0,C=0;w&&(r=w.L,f=w.C,G=w.G,I=w.O,C=w.Yo,this.Ty("sdai",{sq:R.yk,ssvicpns:r.join("."),ssvid:f.join(".")}));this.policy.C&&(p?this.O0=R.yk:this.xY=R.yk);this.u3.Sy(R.yk,R.startTime,r,f,G,p,C,I)}this.policy.C?p&&(this.C===1&&Tl(this,5,"noad"),R.yk!==this.L?.yk&&(BZW(this,R,w,p),isNaN(R.startTime)||lgr(this,R.yk,h3(this,R.startTime,R.yk),!!w,this.u3))):p&&BZW(this,R,w)}uN(R, w,p){const r=this.videoTrack.rN.index.ea()<=w;this.L={rg:R,yk:w,pw:p};r&&iJ(this,R,w)}X1(){this.u3&&this.u3.X1()}M0(R,w){if(this.C!==0&&w&&R.C_[0].Ih()){var p=R.C_[0].yk,r=R.C_[0].G;R=R.isDecorated();lgr(this,p,r,R,w)}}pB(R,w){if(this.policy.O0?0:this.C===1||this.C===2)return!1;if(this.C!==0&&R===this.audioTrack){if(this.policy.C)return V3D(this.videoTrack,w)||V3D(this.videoTrack,w+1);R=$f(this.videoTrack);if(w>(R?R.yk:-1))return!1}return!0}Ty(R,w,p=!1){(R!=="sdai"||this.policy.gM||p)&&this.loader.Ty(R, w)}oG(R,w){const p=this.videoTrack.rN.index.I3(R);if(p>=0){var r=w.SM(p,2)?.RB||"";if(this.policy.C||r)return w.AQ(R,p),QW(this.loader,R,R,p),this.Ty("sdai",{cmskpad:1,t:R.toFixed(3),sq:p}),!0}this.Ty("sdai",{cmskpad:0,t:R.toFixed(3),sq:p});return!1}};var Zda=class{constructor(R,w,p,r){this.policy=R;this.Ty=w;this.D=p;this.L=r;this.K=void 0;this.C=new Set;this.J=-1;this.O=0;this.G=!1;this.Xf={pw0:()=>this.C, G8:f=>this.G8(f)}}mS(R,w,p){let r=this.policy.Tw&&R.tileContext?`${R.fJ};${R.tileContext}`:R.fJ; r||(r=HW(this,this.K));this.Ty("clsdai",{setadcfg:R.fJ||"misscid",cid:r,acpn:p,acfglen:w?.length||0});this.L.has(r)||(this.Ty("clsdai",{setadcfg:"noentry",cid:r}),this.L.set(r,{event:"unknown",startTimeSecs:0,W1:0,Xr:[],Pp:Date.now(),iK:-1,Xk:6,oX:R}));(R=this.L.get(r))?w?(R.Xk=6,R.Xr.push(p),R.Hn=w):R.Xk=2:this.Ty("clsdai",{setadcfg:"notfound",cid:r})}d3(R){const w=R||HW(this,this.K);this.Ty("clsdai",{rmvadcfg:R||"misscid",lastcid:HW(this,this.K)});(R=this.L.get(w))?(R.Hn="",R.Xk=4):this.Ty("clsdai", {rmadcfg:"notfound",cid:w})}KA(R,w,p,r,f){this.J=w;if(!((R.S8?.length||0)<=0))if(r){if(this.O=r,this.Ty("clsdai",{oncldisabled:r,rn:w}),this.O===3&&f)for(var G of R.S8)G.rg&&G.trackType===2&&gJL(f,qEH(this,G),G.XD||0,!0)}else for(const C of R.S8){if(R=C.rg)a:{let u;R=qEH(this,C);r=w;f=C.XD||0;G=p;var I=this.policy.z1&&C.G9?new HOd:void 0;if(!this.policy.cn&&R.event==="prefetch"){R=!1;break a}const m=HW(this,R);this.L.has(m)?(u=this.L.get(m),f>u.iK&&(u.startTimeSecs=R.startSecs,u.W1=R.W1,u.event=== "predictStart"&&u.Xk===5&&R.event!=="predictStart"&&(u.Pp=Date.now()),u.event=R.event)):(u={event:R.event,startTimeSecs:R.startSecs,W1:R.W1,Xr:[],iK:f,Xk:0,oX:{fJ:R.identifier,tileContext:R.tileContext}},this.L.set(m,u),this.policy.K&&this.Ty("clsdai",{newcid:1,cid:R.identifier,tc:R.tileContext,evt:R.event,sn:f,rn:r,st:this.G8(u.Xk)}));let z=!1;u.Xk===0&&(G?.Pc(R,I)?u.Xk=5:(u.Xk=G?11:3,u.Hn="",z=!0),u.Pp=Date.now(),u.iK=f,this.policy.K&&this.Ty("clsdai",{onqpnt:1,cid:R.identifier,tc:R.tileContext, evt:R.event,sn:f,rn:r,st:this.G8(u.Xk)}));f>u.iK&&(G?.Pc(R),u.iK=f);this.K=R;this.policy.K&&this.C.add(m);R=z}R&&(this.G=!0)}}S(){this.C.clear();this.O=0;this.G=!1}pB(){this.L.clear();this.C.clear();this.O=2;this.G=!1}U(){return this.G}X(R,w){if(this.O!==0){this.Ty("clsdai",{gssinfodisabled:this.O});w=7;switch(this.O){case 1:w=7;break;case 2:w=9;break;case 3:w=10;break;default:this.Ty("clsdai",{unknowndisr:this.O})}return[{Xk:w}]}const p=[];if(!isNaN(R)){var r=ARP(this,R),f=this.J+1;if(r.length>0){this.Ty("clsdai", {updcids:1,mt:R.toFixed(3),cid:r.join(","),rn:f});this.C.clear();for(const G of r)this.C.add(G)}else this.D&&(this.Ty("clsdai",{updcids:0,mt:R.toFixed(3),rn:f}),this.C.clear())}for(const G of this.C)f=G,R=w,f?(r=this.L.get(f),f={cuepointId:r?.oX?.fJ||f.split(";")[0]},r?.Hn&&(f.adsConfig=Ia(r.Hn)||void 0),r?.Xr&&(f.Sf=r.Xr),r?.KN&&(f.y9=r.KN),R&&(f.uL=ls(R.split(";")[0]),f.WO=R.split(";")[1]||""),f.Xk=r?.Xk||0,R=f):R=void 0,R&&p.push(R);return p}AQ(R,w,p){var r=R;this.policy.K&&(r+=p);let f,G="";r= ARP(this,r);r.length>0&&(G=r[0])&&(f=this.L.get(G));if(!f||f.KN)return this.Ty("clsdai",{skipadfail:1,cid:G,sn:w,mt:R.toFixed(3),of:p.toFixed(3),skipsq:f?.KN||-1}),!1;this.Ty("clsdai",{skipadsuc:1,cid:G,sn:w,mt:R.toFixed(3),of:p.toFixed(3)});f.KN=w;this.C.clear();this.C.add(G);return!0}u6(){this.Ty("clsdai",{rstskipad:1});for(const R of this.L.values())R.KN=NaN}xY(){let R=!1;for(const [,w]of this.L.entries()){const p=w;p.event!=="predictStart"&&p.event!=="prefetch"&&p.Xk===5&&(p?.Pp&&Date.now()-p?.Pp> 1E4?p.Xk=1:R=!0)}return R}G8(R){if(this.policy.zq)switch(R){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(R){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 RV=class{constructor(R,w,p){this.audio=R;this.video=w;this.reason=p}},ri=class{constructor(R,w,p,r){this.L=R;this.reason=w;this.source=p;this.token=r}};var YIS=class extends g.f5{constructor(R,w,p){super();this.policy=R;this.C=w;this.Ty=p;this.G=new Map;this.K=0;this.J=!1;this.L="";this.O=!1}q3(){return this.J&&vW(this).size>0}vN(R,w=!1,p={}){this.policy.DI=Xa(R,p,this.C,w)}};var KI=class{constructor(R){this.L=this.C=0;this.alpha=Math.exp(Math.log(.5)/R)}wY(R,w){const p=this.alpha**R;this.L=w*(1-p)+p*this.L;this.C+=R}QB(){return this.L/(1-this.alpha**this.C)}};var Fdk=class{constructor(R,w,p,r,f,G=[]){this.loader=R;this.xY=w;this.policy=p;this.Z$=r;this.J=f;this.Jl=G;this.logger=new g.Q6("dash/abr");this.L=$Q;this.O=this.D=null;this.X=-1;this.jI=!1;this.nextVideo=this.C=null;this.G=[];this.YY=new Set;this.M0={};this.Qk=new KI(1);this.U=0;this.nB=this.S=this.pB=!1;this.O0=0;this.U0=!1;this.I0=new Set;this.PS=!1;this.Xf={EY:()=>{kQ(this)}}; this.K=new YIS(this.policy,f,(I,C)=>{this.loader.Ty(I,C)})}Lq(R){if(this.policy.aj){var w=new Set(R); w.size===this.I0.size&&[...w].every(p=>this.I0.has(p))||(this.loader.Ty("lwnmow",{itagDenylist:[...R].join()}),this.loader.zG(!!w.size),this.X=-1,this.I0=w,S$(this,this.L),this.PS=!0)}}vN(R,w=!1,p={}){const r=this.policy.DI; this.K.vN(R,w,p);r!==this.policy.DI&&(S$(this,this.L),wk(this),r>this.policy.DI&&this.O?.info.L()&&!this.nextVideo?.info.L()&&(this.pB=!0))}};var Ex={u$:-1,mN:!1,Wu:0},jlR=class extends g.f5{constructor(R){super();this.KL=R;this.L=null;this.C=Ex;this.KL("ismp_i")}O(R=!0){R&&YED(this);this.L=null}Gy(){this.C=Ex;this.O();super.Gy()}};var JYp=class{constructor(R){this.track=R;this.buffered=[];this.O=this.G=0;this.J={};this.K=0;this.L=new l2}QV(R){this.timestampOffset=R;this.flush()}X(R,w){this.flush();this.C=w;G6(this,3,R)}U(R,w,p,r){!this.C||aYH(this.C,R)&&this.C.yk===R.yk||this.flush();this.G+=p;this.O+=r;p=1;!this.C&&R.L&&(p=2);G6(this,p,w);w=Math.ceil(R.L/1024);p===2&&this.L.add(w);this.L.add(Math.ceil((R.L+R.C)/1024)-w);this.C=R}pB(){G6(this,0)}D(){G6(this,4);this.flush()}flush(){if(this.L.L()){var R={a:this.track.i4(),u:this.L.AF(), pd:Math.round(this.G),ad:Math.round(this.O)},w=this.C;if(w){const p=w.rN.info;R.itag=p.itag;p.C&&(R.xtags=p.C);R.sq=w.yk;R.st=w.startTime;R.sd=w.duration;this.track.policy.Be&&(R.si=w.EC());w.O&&(R.esl=w.L+w.C);w.J()&&(R.eos=1)}isNaN(this.timestampOffset)||(R.to=this.timestampOffset);if(w=this.track.Vh?.TK({})){for(const p in w)this.J[p]!==w[p]&&(R["sb_"+p]=w[p]);this.J=w}this.track.Ty("sbu",R);this.L.reset();this.buffered=[];this.K=this.O=this.G=0;this.timestampOffset=this.C=void 0}}};var TdU=class{constructor(R,w,p){this.policy=R;this.L=w;this.O0=p;this.G=this.C=0;this.Nw=null;this.pB=new Set;this.X=[];this.indexRange=this.initRange=null;this.U=new aa;this.S=this.xY=!1;this.Xf={Uwy:()=>this.O, Lt0:()=>this.chunkSize, R1S:()=>this.D, vNB:()=>this.J}; (w=jID(this))?(this.chunkSize=w.csz,this.O=Math.floor(w.clen/w.csz),this.D=w.ck,this.J=w.civ):(this.chunkSize=R.Qj,this.O=0,this.D=g.k0(16),this.J=g.k0(16));this.K=new Uint8Array(this.chunkSize);this.D&&this.J&&(this.crypto=new eP6(this.D,this.J))}dispose(){this.S=!0}cS(){return this.S}},uU=class extends Error{constructor(R){super(R)}};var Ay6=class{constructor(R,w,p,r,f,G){this.ids=R;this.L=w;this.C=p;this.G=r;this.O=f;this.Yo=G}};var qk=class{constructor(R,w,p){this.initData=R;this.contentType=w;this.isPrefetch=p;this.L=this.cryptoPeriodIndex=NaN;this.O=[];this.G3=!1;this.C=null;if(w?.toLowerCase()==="webm"||R.length===16)this.G3=!0}};var XI=class{constructor(R,w,{Ic:p=!1,videoDuration:r=0,aY:f,O$:G=!1}={}){this.videoId=R;this.status=w;this.Ic=p;this.videoDuration=r;this.aY=f;this.O$=G}},idR=class{constructor(R,w,p,r,f){this.videoId=R;this.Lx=w;this.C=p;this.bytesDownloaded=r;this.L=f}};var SEI=class{constructor(R){this.C=R;this.offset=0}skip(R){this.offset+=R}L(){return this.offset}};var Qli=class{constructor(R,w,p){this.loader=R;this.policy=w;this.rN=p;this.logger=new g.Q6("dash");this.C=[];this.L=null;this.S=-1;this.U=0;this.O0=NaN;this.X=0;this.O=NaN;this.D=this.M0=0;this.YY=-1;this.I0=this.G=this.K=this.xY=null;this.nB=this.PS=NaN;this.J=this.pB=this.jI=this.U0=null;this.Qk=!1;this.Jl=this.timestampOffset=0;this.Xf={Yb:()=>this.C}; if(this.policy.G){const r=this.rN,f=this.policy.G;this.policy.Qk&&R.Ty("atv",{ap:this.policy.Qk});this.J=new TdU(this.policy,r,(G,I,C)=>{R.CB.Ax(new XI(this.policy.G,2,{aY:new idR(f,G,r.info,I,C)}))}); this.J.U.promise.then(G=>{this.J=null;G===1?R.CB.Ax(new XI(this.policy.G,G)):this.loader.Ty("offlineerr",{status:G.toString()})},G=>{const I=(G.message||"none").replace(/[+]/g,"-").replace(/[^a-zA-Z0-9;.!_-]/g,"_"); G instanceof uU?(this.loader.Ty("offlinenwerr",{em:I}),Wj(this),R.CB.Ax(new XI(this.policy.G,4))):(this.loader.Ty("dldbwerr",{em:I}),Wj(this),R.CB.Ax(new XI(this.policy.G,4,{O$:!0})))})}}Yb(){return this.C}uC(){return this.C.length?this.C[this.C.length-1]:null}xU(){this.C=[]; lU(this);Wj(this)}WH(R){this.jI=this.C.shift().info;R.info.equals(this.jI)}O5(){return g.gd(this.C,R=>R.info)}i4(){return!!this.rN.info.audio}isDrm(){return!!this.rN.info.contentProtection}getDuration(){return this.rN.index.kZ()}};var sR=class extends Dxb{constructor(R,w,p,r,f){super(p,f);this.policy=R;this.formatId=w;this.Xn=r;this.lastError=null;this.onProgress=()=>{this.cS()||(this.Xn.QR(this.formatId)?(this.isComplete()||this.L.start(),YQ(this.Xn,this.formatId)&&this.dH(2),this.Xn.u4(this.formatId)&&(wL_(this.Xn,this.formatId)?this.kp(4):(this.lastError="net.closed",this.kp(5)))):(this.lastError="player.exception",this.kp(5)))}; this.L=new g.vZ(()=>{this.isComplete()||(this.lastError="net.timeout",this.kp(5))},1E3); this.L.start();U2x(this.Xn,this.formatId,this.onProgress);g.TF(this.onProgress)}onStateChange(){this.cS()&&(dK(this.Xn,this.formatId),this.L.dispose())}J9(){return{expected:R5D(this.Xn,this.formatId),received:this.Xn.Sa.get(this.formatId)?.bytesReceived||0,bytesShifted:this.Xn.Sa.get(this.formatId)?.JG||0,sliceLength:Z7(this.Xn,this.formatId),isAnyMediaEndReceived:this.Xn.IS(this.formatId)}}Mo(){return 0}BT(){return!0}VI(){return this.Xn.VI(this.formatId)}Gx(){return[]}nJ(){return this.Xn.nJ(this.formatId)}Tg(){return this.lastError}aJ(){return 0}};var hPU=class extends g.f5{constructor(R,w,p,r){super();this.loader=R;this.policy=w;this.rN=p;this.timing=r;this.logger=new g.Q6("dash");this.C=[];this.xY=[];this.L=this.Vh=null;this.jI=!1;this.M0=this.Jl=0;this.K=-1;this.S=!1;this.O0=-1;this.I0=null;this.pB=NaN;this.X=[];this.Xf={E9:()=>this.O, Z3l:()=>this.C, e10:()=>this.D}; this.O=new Qli(R,w,p);this.policy.L&&(this.D=new t_b(this.O,this.loader.getManifest(),this.policy,f=>{this.policy.CU&&this.Ty("buftl",f)})); this.policy.f_&&(this.U=new JYp(this));this.hf=p.info.hf;this.J=this.policy.xY?!1:p.O0();this.isManifestless=p.O0();this.G=this.J;g.K(this,this.I0)}i4(){return!!this.rN.info.audio}uC(){return this.O.uC()}WH(R){this.O.WH(R);this.D?.O0(R);this.hf=Math.max(this.hf,R.info.rN.info.hf||0)}getDuration(){return this.rN.index.kZ()}xU(){zl(this);this.O.xU()}E9(){return this.O}N9(R){return this.Vh?JC(this.Vh.f3(),R):!0}isRequestPending(R){return this.C.length?R===this.C[this.C.length-1].info.C_[0].yk:!1}QV(R){this.D?.QV(R); this.U?.QV(R)}Ty(R,w){this.loader.Ty(R,w)}Ja(){return this.loader.Ja()}dispose(){this.U?.flush();super.dispose()}};var n3b=class{constructor(){this.Tm=!1}};g.nsr=class{constructor(R){this.zy=R;this.D=new n3b;this.xs=this.C0=!1;this.HE=2;this.jI=20971520;this.N0=8388608;this.I0=120;this.EN=this.t6=this.JP=2;this.GE=this.Gf=!1;this.LU=1E3;this.mq=15;this.qH=1;this.U=1.15;this.S=1.05;this.pU=1;this.PF=this.Ww=!1;this.YU=6;this.O=!1;this.pV=100;this.gS=10;this.W8=6;this.zv=!1;this.kL=1;this.e_=this.h8=!1;this.XT=2;this.m1=this.O_=this.Hw=!1;this.eI=!0;this.Ml=this.hW=this.q4=this.Af=!1;this.Ky=!0;this.Y_=!1;this.G="";this.wg=[];this.Tf=this.f_=!1;this.DI= 0;this.Jp="";this.Pa=this.CV=this.CU=this.JE=this.Pw=this.J8=this.J=this.il=this.t8=this.L=this.Qk=this.M0=this.iE=this.Gw=this.X=this.Nk=this.Sp=!1;this.MH=!0;this.Es=this.X3=this.hM=this.f4=this.L0=this.C=this.U0=!1;this.nB=!0;this.Ie=this.jR=this.Df=this.cB=this.Qi=this.B$=this.tW=this.Os=this.MO=this.pL=this.wh=this.xY=this.xu=this.q0=this.pB=!1;this.hO=0;this.kF=this.K=this.JW=this.uo=this.gM=this.mO=!1;this.latencyClass="UNKNOWN";this.tP=!1;this.nN=0;this.hP=this.C2=!1;this.XU=g.Iq(this.zy.experiments, "html5_min_readbehind_secs");this.l0=g.Iq(this.zy.experiments,"html5_min_readbehind_cap_secs");this.Ov=this.zy.Y("html5_offline_reset_media_stream_on_unresumable_slices");this.hf=NaN;this.mj=Fy(this,"html5_request_size_min_kb",64)*1024;this.PS=2097152;this.i7=Fy(this,"html5_bypass_contention_secs");this.QA=1048576;this.wB=Fy(this,"html5_repredict_interval_ms",1800);this.tB=Fy(this,"html5_head_miss_secs",5);this.u0=Fy(this,"html5_min_upgrade_health_secs",10);this.Pe=Fy(this,"html5_min_seconds_between_format_selections", 8);this.JB=Fy(this,"html5_max_buffer_health_for_downgrade_secs",15);this.fg=s_;this.FL=g.Iq(this.zy.experiments,"html5_min_startup_buffered_media_duration_secs");this.bb=g.Iq(this.zy.experiments,"html5_post_interrupt_readahead");this.D8=this.zy.Y("html5_disable_classic_alr");this.ll=g.Iq(this.zy.experiments,"html5_probe_primary_delay_base_ms")||5E3;this.LV=Fy(this,"html5_ssdai_failure_retry_limit",3);this.Od=this.zy.experiments.XB("html5_clone_original_for_fallback_location");this.ez=g.Iq(this.zy.experiments, "html5_subsegment_readahead_target_buffer_health_secs");this.f2=g.Iq(this.zy.experiments,"html5_subsegment_readahead_timeout_secs");this.b5=g.Iq(this.zy.experiments,"html5_subsegment_readahead_min_buffer_health_secs");this.Oj=g.Iq(this.zy.experiments,"html5_subsegment_readahead_min_buffer_health_secs_on_timeout");this.PG=g.Iq(this.zy.experiments,"html5_subsegment_readahead_min_load_speed");this.bl=g.Iq(this.zy.experiments,"html5_subsegment_readahead_load_speed_check_interval");this.cn=this.zy.Tk().L.vS(gab); this.Rc=g.Iq(this.zy.experiments,"html5_subsegment_readahead_seek_latency_fudge");this.iD=Fy(this,"html5_hopeless_secs",15);this.Hx=this.zy.Y("html5_restrict_streaming_xhr_on_sqless_requests");this.gU=g.Iq(this.zy.experiments,"html5_max_headm_for_streaming_xhr");this.Li=this.zy.Y("html5_pipeline_manifestless_allow_nonstreaming");this.Bx=this.zy.Y("html5_prefer_server_bwe3");this.Cj=this.zy.Y("html5_last_slice_transition");this.ZS=this.zy.Y("html5_store_xhr_headers_readable");this.u_=g.Iq(this.zy.experiments, "html5_max_drift_per_track_secs");this.mx=this.zy.Y("html5_no_placeholder_rollbacks");this.wF=this.zy.Y("html5_subsegment_readahead_enable_mffa");this.SI=this.zy.Y("html5_allow_video_keyframe_without_audio");this.m1=g.I1(this.zy)&&!g.IN()&&this.zy.Y("html5_adjust_media_time_for_non_cobalt_tv");this.SU=this.zy.Y("html5_enable_vp9_fairplay");this.Qj=1048576;this.U_=this.zy.Y("html5_woffle_resume");this.M9=this.zy.Y("html5_abs_buffer_health");this.dP=this.zy.Y("html5_interruption_resets_seeked_time"); this.Vl=g.Iq(this.zy.experiments,"html5_max_live_dvr_window_plus_margin_secs")||46800;this.pj=this.zy.Y("html5_report_captions_ctmp_qoe");this.mR=this.zy.Y("html5_explicitly_dispose_xhr");this.l7=!this.zy.Y("html5_encourage_array_coalescing");this.zy.Y("html5_limit_media_merge_size")?s_?ry()<21?this.Nl=786432:this.Nl=8388608:this.Nl=262144:this.Nl=0;this.bX=this.zy.Y("html5_filter_non_efficient_formats_for_safari");this.zy.Y("html5_format_hybridization");this.s_=this.zy.Y("html5_abort_before_separate_init"); this.Lf=mH();this.Z9=this.zy.Y("html5_serialize_server_stitched_ad_request");this.J6=this.zy.Y("html5_attach_po_token_to_bandaid");this.Ac=g.Iq(this.zy.experiments,"html5_max_redirect_response_length")||8192;this.Sk=this.zy.Y("html5_rewrite_timestamps_for_webm");this.ag=this.zy.Y("html5_only_media_duration_for_discontinuities");this.l2=g.Iq(this.zy.experiments,"html5_resource_bad_status_delay_scaling")||1;this.zy.Y("html5_onesie_live");this.XG=g.Iq(this.zy.experiments,"html5_onesie_live_ttl_secs")|| 8;this.Sm=g.Iq(this.zy.experiments,"html5_attach_num_random_bytes_to_bandaid");this.Cs=this.zy.Y("html5_update_container_type_on_codec_family_change");this.p_=this.zy.Y("html5_enable_sabr_host_fallback");this.u7=this.zy.Tk().L.vS(rEd);this.Hd=this.zy.supportsGaplessShorts();this.aV=this.zy.Y("html5_shorts_stop_request_when_buffer_to_end");this.vY=this.zy.Y("html5_vod_stop_request_when_buffer_to_end");this.Jl=this.zy.Y("html5_ssdai_use_post_for_media")&&this.zy.Y("gab_return_sabr_ssdai_config");this.F5= this.zy.Y("html5_use_post_for_media");this.WB=this.zy.Y("html5_use_live_ump_heartbeat");this.useUmp=this.zy.Y("html5_use_ump");this.gz=this.zy.Nk;this.E3=this.zy.Y("html5_reset_primary_stats_on_redirector_failure");this.zL=this.zy.Y("html5_use_network_error_code_enums");this.enableServerDrivenRequestCancellation=this.zy.Y("html5_enable_server_driven_request_cancellation");this.f7=this.zy.Y("html5_enable_sabr_request_timing");this.aj=this.zy.Y("html5_enable_lawnmower");this.sZ=this.zy.dn()?g.Iq(this.zy.experiments, "html5_continuous_goodput_probe_interval_ms"):0;this.Ry=g.Iq(this.zy.experiments,"html5_jumbo_ull_nonstreaming_mffa_ms")||NaN;this.GJ=g.Iq(this.zy.experiments,"html5_drm_byterate_soft_cap");this.K4=g.Iq(this.zy.experiments,"html5_drm_live_byterate_soft_cap");this.a9=this.zy.Y("html5_sabr_log_request_creation");this.B1=this.zy.Y("html5_use_buffer_timeline_for_sabr_request_creation");this.jw=this.zy.Tk().L.vS(zJr);this.yh=this.zy.Y("html5_sabr_report_request_cancellation_info");this.wW=this.zy.Y("html5_spoof_4k"); this.Na=Fy(this,"html5_min_media_duration_for_cabr_slice");this.Ew=Fy(this,"html5_sabr_min_media_bytes_factor_to_append_for_stream")||.01;this.Pn=this.zy.Y("html5_consume_all_buffered_bytes_one_poll");this.Z8=this.zy.Y("html5_disable_urgent_adaptation");this.E_=this.zy.Y("html5_apply_constraints_in_client_for_sabr");this.Ss=this.zy.Y("html5_send_video_playback_ustreamer_config");this.aO=Fy(this,"html5_max_discontinuity_rewrite_count");this.S$=Fy(this,"html5_fixed_media_duration_for_request");this.Bk= this.zy.Y("html5_apply_fix_for_missing_seg_info_without_logger");this.hW=this.zy.Y("html5_enable_audio_quality_setting");this.zy.Y("html5_enable_audio_quality_setting_feature");this.jb=Fy(this,"html5_sabr_request_limit_per_period");this.wm=this.zy.Y("html5_sabr_dispose_media_objects");this.lD=this.zy.Y("html5_fix_hbr_reselection_qoe_restart_for_sabr");this.zy.Y("html5_high_res_seek_logging");this.m5=this.zy.Y("html5_disable_chunk_synchronization_sabr_seek");this.wK=g.Iq(this.zy.experiments,"html5_override_micro_discontinuities_threshold_ms"); this.wR=this.zy.Y("html5_byterate_constraints");this.xv=this.zy.Y("enable_sabr_snackbar_message");this.Be=this.zy.Y("html5_log_slice_info_in_sbu");this.Mr=Fy(this,"html5_paced_poll_ms");this.m$=Fy(this,"html5_paced_poll_min_health_ms");this.yj=this.zy.Y("html5_disable_sabr_fallback");this.Ta=this.zy.Y("html5_track_current_buffered_range_at_sync");this.Ya=g.I1(this.zy)?500:2E3;this.L2=this.zy.Y("html5_sabr_live_timing");this.Yk=this.zy.Y("html5_count_updating_slice_for_buffer_health");this.s3=this.zy.Y("html5_report_max_buffer_bytes_limit_to_sabr"); this.mG=this.zy.Y("html5_sabr_live_audio_early_return_fix");this.x$=g.Iq(this.zy.experiments,"html5_platform_max_buffer_health_oversend_duration_secs");this.Fr=this.zy.Y("html5_cuepoint_identifier_logging");this.Mp=this.zy.Y("html5_sabr_log_server_xtag_selection_onesie_mismatch");this.Sl=this.zy.Y("html5_skip_client_drm_license_constraint");this.Sp=this.zy.Y("html5_pseudogapless_shorts_skip_abort_on_transition");this.tW=this.zy.Y("html5_sabr_request_on_constraint");this.xe=this.zy.Y("html5_live_metadata_resets_timeout"); this.JW=this.zy.Y("html5_sabr_log_invalid_sabr_current_time");this.K2=this.zy.Y("html5_ssdai_new_decoration_logic");this.Js=this.zy.Y("html5_cuepoint_list_clear_on_seek");this.M6=this.zy.Tk().L.vS(nD);this.O0=this.zy.Tk().L.vS(Kx_);this.c_=this.zy.Y("html5_ssdai_clear_backoff_on_cuepoint_list_resolved");this.Tw=this.zy.Tk().L.vS(FDr);this.nN=g.Iq(this.zy.experiments,"html5_sabr_unused_bloat_size_bytes");this.Ny=this.zy.Tk().L.vS(l4D);this.Qz=this.zy.Y("html5_mta_initial_audio_prefer_drc");this.z1= this.zy.Tk().L.vS(f4b);this.zq=this.zy.Tk().L.vS(I4d);this.DC=this.zy.Y("html5_enable_sabr_network_timestamps_bwe");this.Jh=this.zy.Y("html5_reinitialize_source_buffer_on_incompatible_codec_for_ssff")}YY(){return this.L&&this.J8}};var QqP=class{constructor({e_:R,Tm:w,zH:p,ea:r,SE:f}={}){this.e_=R;this.Tm=w;this.zH=p;this.ea=r;this.SE=f}};var Hda=class extends g.f5{constructor(R,w,p){super();this.loader=R;this.policy=w;this.BB=p;this.O=0;this.C=!1;this.delay=new g.vZ(this.G,this.policy.sZ,this);g.K(this,this.delay)}L(R){AQ(89,8669,R.L)||(this.EQ=R,this.O=0,this.delay.ql())}G(){this.O++>15||(this.C=!this.C,new gbP(this.loader,this.policy,this.BB,this.EQ,this.C),this.delay.start())}},gbP=class{constructor(R,w,p,r,f){this.loader=R;this.policy=w;this.BB=p;this.EQ=r;this.pS=f;this.done=!1;this.onTimeout=()=>{this.done||(this.done=!0,this.onError("net.timeout"))}; this.size=Math.ceil(Math.min(1E5,.1*rK(this.BB)));this.timing=new oP(this,{BB:this.BB,aM:this.size,Il:!0,Wc:()=>{}, qh:this.policy.O});R=y6(this.EQ,this.pS,this.policy).Ld.clone();rg(54,3318,R);R["path"]!=="/videogoodput"&&(R["path"]="/videogoodput",R["url"]="");this.location=new bm(R);this.location.set("rn",`${this.timing.requestNumber}`);this.location.set("range",`0-${this.size-1}`);this.xhr=t3(this.location,this.policy.D,this.timing,this.policy.fg,{});setTimeout(this.onTimeout,1E4)}n4(){}M3(){}Yi(){if(!this.done)if(this.done=!0,this.xhr.status===200&&this.xhr.MB()===this.size)this.loader.Ty("rqs",this.getInfo()); else{var R="net.connect";this.xhr.status>200?R="net.badstatus":this.xhr.X_()&&(R="net.closed");this.onError(R)}}onError(R){this.loader.handleError(R,this.getInfo());p7(`https://www.gstatic.com/ytlr/img/sign_in_avatar_default.png?rn=${this.timing.requestNumber}`,"gp",w=>{this.loader.Ty("pathprobe",w)},w=>{this.loader.handleError(w.errorCode,w.details)})}getInfo(){const R=this.timing.X(); R.shost=AQ(70,8310,this.location.Ld);R.pb=this.size;return R}};var vbt=class extends g.f5{constructor(R,w,p,r,f,G,I,C,u,m,z,B,W=null){super();this.loader=R;this.policy=w;this.videoTrack=p;this.audioTrack=r;this.O=f;this.L=G;this.timing=I;this.G=C;this.schedule=u;this.Z$=m;this.C=z;this.X=B;this.A8=W;this.pB=!1;this.RY="";this.n2=null;this.Ou=NaN;this.S=!1;this.u3=null;this.St=this.U=NaN;this.fA=this.K=0;this.logger=new g.Q6("dash");this.Xf={Yl:(x,q)=>this.Yl(x,q)}; this.policy.Sm>0&&(this.RY=g.k0(this.policy.Sm));this.policy.sZ&&(this.D=new Hda(this.loader,this.policy,this.schedule),g.K(this,this.D))}J(R,w){if(R.J){this.Z$.isLive?(R=this.Z$.tj&&this.Z$.O?R.rN.K(this.Z$.tj,!1):R.rN.J(Infinity),R.Ou=this.Ou):R=R.rN.K(0,!1);if(this.X){var p=this.X;R.Ou===0&&(R.K=p.U)}else R.K=this.U;return R}var r=R.L;if(!r.rN.L())return r.rN.O()?(p=I8(this.G,R.rN.info.hf,w.rN.info.hf,0),p=r.rN.S(r,p)):p=r.rN.Jl(r),p;var f=this.loader.getCurrentTime();f=isFinite(f)||!this.policy.C2? r.K-f:0;var G=!r.range||r.C===0&&r.L===0?0:r.range.length-(r.L+r.C),I=r.rN;this.Yl(R,f)&&G===0&&(this.Z$.isManifestless?I=R.rN:(I=r.startTime+BF,r.C&&(I+=r.duration),xQ(R,I),r=R.L,I=r.rN));I.O()?(G=this.C,w=I8(this.G,I.info.hf,w.rN.info.hf,f,G.G.length>0&&G.U===0&&this.loader.m_),f=dk(R),R=r.rN.S(r,w),(w=R.O)&&R.C_.length>1&&(f||R.EQ.C||R.C_[0].rN!==r.rN?R=r.rN.S(r,R.C_[0].C):(f=R.C_[R.C_.length-1],I=f.C/w,!f.O&&I<.4&&(R=r.rN.S(r,w-f.C))))):(r.yk<0&&(w=aH(r),w.pr=`${R.C.length}`,this.loader.isSeeking()&& (w.sk="1"),w.snss=r.D,this.loader.Ty("nosq",w)),R=I.Jl(r));if(this.policy.M0)for(p of R.C_)p.type=6;return R}Yl(R,w){if(!dk(R)||!R.rN.L())return!1;var p;(p=this.C.PS)||(p=dk(R)&&R.rN.L()&&R.L.rN.info.hf{this.loader.Ty(u,m)}); this.isAudioOnly&&g3_(this,this.Z$.L["0"])}w2(R,w,p,r){this.loader.w2(new ri(R,this.C?.reason==="m"?"m":this.C?.reason==="s"?"s":this.C&&kAd(this,this.C)?this.C.reason:"a",p,r));QL(this.loader,w,R,!0)}EY(R,w){for(const p of this.I0)if(p.id===R)return this.K=this.Z$.L[R],this.Ey.YY()&&(this.S=!0),R=new ri(this.K,w?"t":"m"),w&&(this.D=!0),R;this.O=[];return null}vN(R,w=!1,p={}){this.L.vN(R,w,p)}q3(){return this.L.q3()}};var vOb=class{constructor(R,w,p){this.requestType=R;this.EQ=w;this.kY=p;this.C=null;this.Xf={Wu:()=>this.data?.Wu, sN:()=>this.data?.sN, Zb:()=>this.data?.Zb}}setData(R,w,p={}){w?.p_&&(this.KE=fHr(this,w,p),R.Qs=this.EQ.Qs()); if(this.XY())return!0;this.data=R;this.L=pnH(R,(r,f)=>{this.kY?.l3(r,f)},w?.O,w?.K); if(!this.L)return!1;this.C=g.nm(this.L,YcL);return!0}XY(){return this.requestType===1}jJ(){return this.kY?.jJ()||0}isDecorated(){return!(!this.data?.AM&&!this.data?.vc?.length)}};var krk=class{constructor(R){this.L=R;this.iv=(0,g.xn)(NT(16))}encrypt(R){(0,g.T)();return this.L.L?fx(this,R,this.iv):(new r9(this.L.C)).encrypt(R,this.iv)}decrypt(R,w){(0,g.T)();return this.L.L?fx(this,R,w):(new r9(this.L.C)).decrypt(R,w)}};var SIk=class extends g.f5{constructor(R){super();this.LB=R;this.L=new Map;this.O=[];this.C=!fH();this.X=g.Iq(this.LB.experiments,"html5_onesie_prewarm_interval_ms");this.U=new g.vZ(this.D,this.X,this);this.J=-1;this.Xf={JjY:()=>this.L, i3S:()=>this.K, tu$:()=>UxU}; g.K(this,this.U);WqH(this,g.hj("yt-player-bandaid-host"));this.K=this.load();this.X&&this.K.then(()=>{this.D()})}pB(R){if(!((0,g.T)()=R||(R=this.L.get(0))&&qzW(this,R)}G(){const R=this.O;this.O=[];return R}},UxU={TN0:0,XSB:1,ZBk:2,m0Y:3,sH:4,0:"PRIMARY",1:"SECONDARY",2:"RANDOM",3:"SENSITIVE_CONTENT",4:"C_YOUTUBE"},xJr=class{constructor(R,w){this.location=R;this.C=w}L(){return AQ(70,8310,this.location)}};var RVb=class{constructor(R){this.cC=R;this.C=!1;this.L=[]}async decrypt(R){if(!this.L.length||this.L[0].isEncrypted){this.C=!0;this.cC.KL("omd_s");var w=new Uint8Array(16),p,r;for(fH()?p=new GI(R):r=new r9(R);this.L.length&&this.L[0].isEncrypted;){var f=this.L.shift(),G=p?await p.decrypt(zQ(f.buffer),w):r.decrypt(zQ(f.buffer),w);for(R=0;Rthis.Hy}; this.LB=this.CB.V();this.videoData=this.CB.getVideoData();this.iA=this.LB.dn();this.yF=this.LB.cB;this.x_=new krk(this.yF.L);this.aR=this.LB.Y("html5_onesie_check_timeout");this.jS=new g.vZ(this.xf,500,this);this.bR=new g.vZ(this.XF,1E4,this);this.IY=new g.vZ(()=>{if(!this.isComplete()){const r=Kx(this);this.fail(new g.pq("net.timeout",r))}},1E3); this.Zs=new g.vZ(this.Vd,2E3,this);this.pR=this.CB.Xb();this.qW=this.Y("html5_onesie_wait_for_media_availability");g.K(this.videoData,this);g.K(this,this.jS);g.K(this,this.bR);g.K(this,this.Zs);R=Ra();s_&&R&&(this.SC=new Map);this.Ku=new Map;this.BU=new Map;this.Gb=new Map;this.wC=new Map}uH(R){return this.SC?.get(R)?.uH()||[]}nJ(R,w){return!!this.SC?.get(w)?.nJ(R)}VI(R,w){return this.SC?.get(w)?.VI(R)||[]}O5(R,w){return this.SC?.get(w)?.O5(R)||[]}ya(){return this.segmentStartTimeMs}kp(R){this.state= R;this.notifySubscribers()}XY(){return!1}f6(){return!1}DL(){}KL(R){this.CB.KL(R)}Xl(R){return this.CB.Xl(R)}z2(R,w,p,r){p||this.Hy.z2(r);return!1}Xg(R,w){this.cC.Xg(R,w)}Fw(){this.KL("orfb");this.Xe=!0;if(iJl(this)&&this.xhr){var R={rc:this.xhr.status,lb:this.xhr.MB(),rt:(1E3*wbd(this.Hy)).toFixed(),shost:g.sH(this.xX),trigger:"o1"};this.Ty("pathprobe",Ro(R))}}VU(){this.KL("opr_r");this.vD=!0}Uj(R,w,p,r){this.bN.push(r);if(this.SC){if(!this.SC.has(R)){const f=new $xb(this);this.SC.set(R,f);g.K(this, f)}this.SC.get(R)?.Uj(w,p,r);tr(this);p||(this.segmentNumber=r.XD,this.segmentStartTimeMs=r.startMs)}else tr(this)}cW(){return this.bN}zb(){this.bN=[]}xR(R){this.W2=R;R.je!=null&&this.CB.hc(R.je)}QU(R){this.YJ=R}UP(R){R.videoId&&this.BU.set(R.videoId,R)}TF(R){if(R.url)for(const w of R.url)p7(w,"ump_prewarm")}kx(){if(this.SC)for(const R of this.SC.keys())this.SC.get(R)?.dH()}al(R){this.QW=R}j$(R){if(R?.Ix&&(R=R.Ix.IH))for(const w of R)w.videoId&&this.wC.set(w.videoId,w)}KA(R){this.nm.push(R)}Ty(R, w,p=!1){this.CB.Ty(R,w,p)}Qb(R,w,p){this.SC?.get(R)?.Qb(w,p)}yW(R){this.Gb.set(R.videoId,R)}async fetch(){this.aR?this.jS.start():this.bR.start();this.KL("or_i");const R=this.LB.experiments.XB("html5_onesie_verbose_timing")||this.LB.Tk().L.vS(qG_)?this.KL.bind(this):()=>{}; R("oloc_ss");var w=Xnl(this.videoData,this.pR);w||(R("oloc_sa"),w=g.Iq(this.LB.experiments,"html5_onesie_redirector_timeout_ms"),w=await nOP(this.videoData,this.pR,w));if(!w)return this.fail(new g.pq("onesie.unavailable.hotconfig",{url:"0"})),this.Cg;this.KE=AQ(78,8318,w);R("oloc_e");var p=g.$W(this.LB,this.videoData.J()),r=!!p.L;p=r?await p.L:p.getValue();this.Y("html5_log_onesie_empty_oauth")&&!p&&this.Ty("no_token",{async:r});r=ZJx(this.playerRequest,this.LB,this.videoData,p,Cx(this.KE));var f; try{if(!this.LB.q0||this.LB.q0?.L||r?.i_||(R("orqb_w"),(f=jTd(r,this.x_,this.LB,this.CB,this.BB,this.yF.onesieUstreamerConfig,this.videoData.Kq?.AU,this.Y("onesie_cdm_mosaic_send_audio_tracks_from_client")?this.playerRequest.playbackContext?.contentPlaybackContext?.compositeVideoContext?.defaultActiveSourceVideoId:void 0))&&this.Ty("orpqenc",{i:"w"})),!f){var G=Ji6(this,r),I=this.LB.Tk().L.vS(Lxx);if(G){R("orqb_a");let C=FqP(r,this.x_,this.LB,this.CB,this.BB,this.yF.onesieUstreamerConfig,this.videoData.Kq?.AU, this.Y("onesie_cdm_mosaic_send_audio_tracks_from_client")?this.playerRequest.playbackContext?.contentPlaybackContext?.compositeVideoContext?.defaultActiveSourceVideoId:void 0);if(I){const u=new Promise((m,z)=>{setTimeout(()=>void z("timeout 10s"),1E4)}); C=Promise.race([C,u]).catch(m=>{this.Ty("orpqenc",{i:"a",e:`${m}`});R("orqb_f")})}f=await C; !f&&I||this.Ty("orpqenc",{i:"a"})}if(!G||I&&!f)R("orqb_s"),f=Yzx(r,this.x_,this.LB,this.CB,this.BB,this.yF.onesieUstreamerConfig,this.videoData.Kq?.AU,this.Y("onesie_cdm_mosaic_send_audio_tracks_from_client")?this.playerRequest.playbackContext?.contentPlaybackContext?.compositeVideoContext?.defaultActiveSourceVideoId:void 0),this.Ty("orpqenc",{i:"j"})}}catch(C){return this.fail(C),this.Cg}R("orqb_e");this.enableCompression=f.innertubeRequest.Ao;this.KM=f?.jk?.MW||0;this.KL("osor");G=dzY();f={method:"POST", body:g.nm(f,xg6),headers:{"Content-Type":"text/plain",Referer:location.origin}};I=this.Y("html5_onesie_media_capabilities");dJ_(w,this.videoData,hRD(this),I);this.iA&&this.Ty("ombrs","1");this.Hy=new oP(this,{BB:this.BB,qh:this.iA,Wc:(C,u)=>{this.CB.yK(C,u)}, HC:!0});w.set("rn",`${this.Hy.requestNumber}`);this.xX=w.qk();UmH(this.Hy,this.xX);this.KL("or_p");this.xhr=t3(new bm(w),G,this.Hy,s_,f);this.Zs.start();this.CB.onPlayerRequestSent(this.videoData.videoId);return this.Cg}ML(){return 2}n4(){this.KL("orh_r")}M3(){!this.Xe&&this.xhr.MB()&&this.Fw();this.rH&&!this.aR&&this.IY?.start();this.J4()}Yi(R=!1){this.J4();if(!(this.cS()||this.state>=4)){var w=Kx(this),p=this.xhr;w.rc=p.status;R&&(w.ab=!0);if(p.Ch()){var r="onesie.net";w.msg=p.Ch()}else p.status>= 400?r="onesie.net.badstatus":p.pZ()?this.vD||(r="onesie.response.noplayerresponse"):r=p.status===204?"onesie.net.nocontent":"onesie.net.connect";r?this.fail(new g.pq(r,w)):(this.KL("or_fs"),this.Hy.cB((0,g.T)(),p.MB(),0),this.kp(4),this.iA&&this.Ty("rqs",w));this.iA&&this.Ty("ombre",`ok.${+!r}`);this.qW=!1;tr(this);ob(this.cC);this.aR||(this.bR.stop(),this.IY?.stop());if(R=this.pR?.G())for(r=0;r1E3){this.Hy?.SI((0,g.T)());const w=Kx(this);if(this.iA&& this.xhr instanceof utb){var R=this.xhr;w.xrs=R.xhr.readyState;w.xpb=R.L.totalLength;w.xdc=R.G}this.fail(new g.pq("net.timeout",w))}}else(this.Hy||!this.LB.Tk().L.vS(Lxx))&&(0,g.T)()-this.Hy.L>1E4&&(this.Hy?.SI((0,g.T)()),this.XF());this.isComplete()||this.jS.start()}}XF(){this.qW=!1;if(!tr(this)){var R=Kx(this);R.timeout="1";this.fail(new g.pq("onesie.request",R))}}fail(R){R=ru(R);this.rH?this.CB.K$(R):(this.Cg.reject(R),this.rH=!0);ob(this.cC);this.aR||this.bR.stop();this.KL("or_fe");this.pR?.G()?.forEach(w=> {this.Ty("pathprobe",w)}); this.kp(5);this.dispose()}isComplete(){return this.state>=3}j0(){return this.state===4}HD(R){return this.isComplete()||!!this.SC?.get(R)?.O}FQ(){return!1}Y7(){return this.state===5}notifySubscribers(R){for(let w=0;w102400&&!this.Im&&(this.KL("or100k"), this.Im=!0);if(R.Hk()){const w=R.E2(),p=w.totalLength;this.iA&&this.Ty("ombrss",`len.${p}`);this.SY.feed(w)}if(this.SC)for(const w of this.SC.keys())this.SC.get(w)?.dH(),this.notifySubscribers(w)}catch(R){this.fail(R)}}Y$(R){return!!this.SC?.get(R)?.D()}WF(){return this.Hy.requestNumber}P3(R){return this.Gb.get(R)}lF(){return!1}Yn(){return"ONESIE"}};var pkb=class extends g.f5{constructor(R,w,p,r,f,G,I,C,u,m,z,B){super();this.CB=R;this.loader=w;this.policy=p;this.audioTrack=r;this.videoTrack=f;this.Z$=G;this.BB=I;this.mq=C;this.C=u;this.timing=m;this.xY=z;this.D=B;this.L=[];this.G={};this.YY=this.SI=!1;this.q0=this.Vb=0;this.zn=!0;this.N0=this.qV=!1;this.pB=0;this.S={UB:0,yV:0};this.eI={UB:0,yV:0};this.u3=null;this.I0={nL:[],k7:[]};this.M0={nL:[],k7:[]};this.J=null;this.K=[];this.Jl=0;this.nB=!1;this.Xf={dwB:()=>this.L, Tb0:()=>this.G, b$0:()=>{this.L.length=0}, gy$:()=>this.videoData.jI, BbB:()=>this.pB, sk0:W=>{this.pB=W}, YuB:W=>{this.S.yV=W}, FC:W=>{this.J=W}, LP:W=>{this.K=W}, Tj:()=>this.Tj()}; this.videoData=this.CB.getVideoData();this.X=this.videoData.latencyClass==="LOW"?50:this.videoData.latencyClass==="ULTRALOW"?100:this.policy.jb;this.policy.sZ&&(this.O0=new Hda(this.loader,this.policy,this.BB),g.K(this,this.O0))}Tj(R){var w=wi(this.loader)&&R&&R.u$!==void 0&&!R.mN?R.u$*1E3+(this.loader.vB()||0):P_(this);if(this.policy.B1){var p=this.I0;var r=this.M0}else p=$U(this,this.audioTrack),r=$U(this,this.videoTrack);var f=[...p.nL,...r.nL];nx(this)&&f.push(...this.K);var G=[...p.k7,...r.k7]; const I=this.loader.lM();if(this.policy.JW&&!this.videoData.isLivePlayback){var C=this.videoData.lengthSeconds*1E3;w>=C&&this.loader.Ty("invalidSabrCmt",{cmt:w,vd:C})}C=this.BB;var u=this.CB,m=this.Z$,z=this.O,B=this.videoData.jI,W=this.policy,x=this.loader.Vw,q=ilY(this.loader)*1E3,O=this.jI?.ys,e=this.jI?.FU,P=this.Vb,c=Number(this.C.G?.info.itag)||0,X=Number(this.C.K?.info.itag)||0,Z=this.CB.I1();var Gr=R?.Wu?R.Wu:this.loader.isSuspended?4:void 0;w={BB:C,CB:u,Z$:m,nL:f,k7:G,Zo:w,nextRequestPolicy:z, fb:B,Ey:W,Gq:x,Uh:q,ys:O,FU:e,Vb:P,Id:c,Or:X,rr:I,JD:Z,Wu:Gr,zn:this.zn,s$:this.N0,qV:this.qV};f=this.loader.hU();G=Ia(f);f&&(w.sN=G);if(R=wi(this.loader)&&R?.mN?R.u$:this.CB.qj())w.Zb=R*1E3;R=this.C;f=R.S;if(R.Ey?.YY()&&!f)for(Il of R.O)if(Il.DT){f=!0;break}var Il=R.Ey.YY()&&!f?[]:v3Y(R,R.O);w.Aw=Il;Il=this.C;Il.Ey.YY()&&!Il.xY?Il=[]:(R=Hll(Il),R.length===0&&(R=Il.J),Il=v3Y(Il,R));w.e2=Il;w.NW=nx(this)?[this.J]:void 0;w.Pt=Array.from(vW(this.C.L).keys(),Number);w.q3=this.C.q3();this.policy.s3&&(w.yA= B3H(this.loader,this.audioTrack),w.Zd=B3H(this.loader,this.videoTrack));Il=this.loader.getCurrentTime();p=ab(this,p.nL,Il);r=ab(this,r.nL,Il);this.Jl=r=Math.min(p,r);this.policy.C&&(nx(this)&&(p=ab(this,this.K,Il),this.CB.dn()&&p0&&this.L[0].f6()&&(w.Q3=this.L[0].DL());return w}A9(R,w){this.U=void 0;k0D(this);Cmx(this,R,w)}iF(R){if(this.L.length===0)return!1;const w=this.L[0];return w instanceof eU?R===this.loader.getCurrentTime()*1E3:!(w instanceof J3&&w.info.L?.jk?.Zb)&&Math.abs(w.Fs()-R)<50}UP(R,w){this.O=R;this.policy.C&&!R.playbackCookie&&this.loader.Ty("sbrnocookie",{rn:w??-1});this.policy.c_&&this.D?.U()?this.loader.Ty("clsdai",{ignbckoff:w??-1,backoff:R.backoffTimeMs?? -1}):this.U=(0,g.T)()+(R.backoffTimeMs||0)}Xq(R,w){if(R.action===void 0)R=this.CB.qj(),R!==void 0&&this.loader.jx(R);else if(R.action!==0||!this.YY)if(R.action===0&&this.policy.yj&&(R.action=2),R.qQ==="sabr.malformed_config"&&this.q0++<3)this.loader.handleError("sabr.malformed_config",{action:R.action,rn:w,retry:this.q0},0);else{var p={};p.reason=R.qQ;p.action=R.action;p.rn=w;switch(R.action){case 1:this.policy.C&&this.u3&&(Hj(this.u3,void 0,void 0,p),this.policy.u7&&this.D?.pB());break;case 0:this.YY= !0;this.videoData.L$()&&this.policy.C&&this.u3&&Hj(this.u3,void 0,void 0,p,!1);this.loader.dC(p);break;case 2:BXd(R.qQ)!=="sabr.config"&&delete p.reason;this.loader.handleError(BXd(R.qQ),p,1);break;case 3:this.policy.p_&&(this.Z$.pB?.xY(),this.loader.handleError("sabr.hostfallback",p))}}}TF(R){if(R.url)for(const w of R.url)p7(w,"ump_prewarm")}NR(R){R&&(this.loader.Ty("sabrctxt",{onsbrctxt:R.type,scp:R.scope,dflt:R.sendByDefault}),R.type&&R.sendByDefault&&this.videoData.jI.add(R.type),R.scope!==2&& (R.type&&this.videoData.sabrContextUpdates.set(R.type,R),this.CB.NR(R)))}NZ(){}al(R,w){if(this.loader.wE)this.loader.Ty("sdai",{ignSabrSeek:1,smt:R?.fE,rn:w});else if(R.fE!==void 0&&R.N_){const p=R.fE/R.N_;this.audioTrack.J=!1;this.videoTrack.J=!1;if(this.policy.xY||this.policy.xu||this.policy.m5)this.loader.Bo.L=!1;this.CB.getCurrentTime()!==p&&(w={dB:"sabr_seek",iq:!0,UY:!0},R.seekSource&&(w.seekSource=R.seekSource),A3(this.loader,p+.1,w))}}onSnackbarMessage(R){this.CB.publish("onSnackbarMessage", R)}KA(R,w){this.policy.K&&this.loader.KA(R,w)}xR(R){R.SR&&R.xJ&&Oq(this.Z$,R.SR,R.xJ);this.policy.L0&&(R.hq&&R.Ot&&(this.Z$.VK=R.hq/R.Ot),R.e0&&R.XA&&(this.Z$.M7=R.e0/R.XA));H4(this.videoData)&&!this.videoData.vF&&R.xJ&&this.loader.gE(R.xJ,1E3);R.je!=null&&this.CB.hc(R.je);R.w5&&(R=((0,g.T)()-R.w5)/1E3,this.loader.HL.wY(1,R))}eG(R){this.loader.eG(R)}Uj(R){this.loader.Uj(R)}Dz(R){this.loader.Dz(R)}EX(R){return this.videoData.jI.has(R)}e5(R,w,p){this.policy.O&&this.loader.Ty("sabrctxtplc",{start:R? R.join("_"):"",stop:w?w.join("_"):"",discard:p?p.join("_"):""});if(R)for(const r of R)this.videoData.jI.add(r);if(w)for(const r of w)this.videoData.jI.has(r)&&this.videoData.jI.delete(r);if(p)for(const r of p)if(this.videoData.sabrContextUpdates.has(r)&&this.videoData.sabrContextUpdates.delete(r),this.policy.X&&this.L.length)for(const f of this.L)f instanceof eU||f.HQ?.type!==r||(f.HQ=void 0)}w0(){}FC(R){this.J=R}LP(R){this.K=R}m2(R,w){jk(this.policy,R,4,w)}j$(R){if(R?.Ix&&(R=R.Ix.IH))for(const w of R)w.formatId&& (R=this.Z$.G.get(oH(w.formatId)))&&R.info&&(R.info.debugInfo=w.debugInfo)}AE(R){this.nB=!0;this.CB.publish("reloadplayer",R)}Mw(){return this.CB.Mw()||""}jJ(){const {pm:R,x8:w}=GVx(this);return Math.min(R,w)}l3(R,w){this.loader.Ty(R,w)}nu(R){fG(this.loader,P7I(this.mq,R))}p_(){return{requestNumber:this.PS?.WF()||-1,isDecorated:this.PS?.info.isDecorated()}}DB(R){this.CB.DB(R)}UA(){this.loader.UA()}vg(){this.loader.vg()}Gy(){super.Gy();this.O=void 0;Cmx(this,!0,"i");this.L=[]}};var rtP=class{constructor(R){this.CB=R;this.L=new Map;this.delay=null}getCurrentTime(){return this.CB.getCurrentTime()-this.CB.vB()}},fSS=class{constructor(R,w,p){this.G=R;this.cpn=w;this.CB=p;this.L=new Map;this.O=new Map;this.J=NaN;this.C=this.Rq="";this.isSeeking=!1;this.K=new rtP(p);this.Co=p.Co;this.CB.subscribe("statechange",this.U,this);this.CB.subscribe("SEEK_TO",()=>{this.S5()}); this.CB.subscribe("SEEK_COMPLETE",()=>{W_l(this)}); this.Rq=this.C=this.cpn}U(R){fn(R.state)&&Z0(this.K)}clear(){var R=this.K;R.delay?.dispose();R.L.clear();this.O.clear();this.L.clear();this.J=NaN}D(R,w,p=0){if(R!==this.J||this.L.get(R)?.O!==w?.O)if(w?this.L.set(R,w):this.L.delete(R),!this.isSeeking){var r=this.G.getStartTime(R);this.J=R;lyb(this,R);if(w){let f=r;w.L.forEach((G,I)=>{f=2&&!R.Y7()&&R.info.Ou===0&&(this.G=R,this.D=p,this.C=w.info,this.J=this.startTimeSecs=Date.now()/1E3,this.K=this.C.startTime)}return NaN}clear(){this.C=this.D=this.G=null;this.L=this.K=this.J= this.startTimeSecs=NaN;this.O=!1}};var Gpp=class extends g.f5{constructor(){super();try{this.O=OLd(R=>{this.C=R.at(-1)}),this.K=this.O?.observe("cpu",{sampleInterval:2E3}).catch(R=>{R instanceof DOMException&&(this.L=R)})}catch(R){R instanceof DOMException&&(this.L=R)}}G(){const R={},w=window.h5vcc; R.hwConcurrency=navigator.hardwareConcurrency;this.L&&(R.cpe=this.L.message);this.C&&(R.cpt=this.C.time,R.cps=this.C.state);w?.cVal&&(R.cb2s=w.cVal.getValue("CPU.Total.Usage.IntervalSeconds.2"),R.cb5s=w.cVal.getValue("CPU.Total.Usage.IntervalSeconds.5"),R.cb30s=w.cVal.getValue("CPU.Total.Usage.IntervalSeconds.30"));return R}Gy(){K_b(this);super.Gy()}};var EYL=/[?&]cpn=/;var ISm=class extends g.f5{constructor(){super();this.maxBufferSize=this.sampleInterval=100;this.K=MMd;this.L=[];this.O=0;Pm_(this)}flush(){const R={};this.C&&(R.pe=this.C);this.L.length>0&&(R.pt=this.L.join("."));this.L=[];return R}async stop(){try{const R=await this.G?.stop();R&&this.logTrace(R)}catch(R){this.C=cgW(R.message)}}logTrace(R){const w=[],p=[],r=[],f=[];let G=0;for(const I of R.resources)w.push({id:G,url:I}),G++;G=0;for(const {name:I,resourceId:C,line:u,column:m}of R.frames)p.push({id:G, name:I,resourceId:C,line:u,column:m}),G++;G=0;for(const {frameId:I,parentId:C}of R.stacks)f.push({id:G,frameId:I,parentId:C}),G++;G=0;for(const {timestamp:I,stackId:C}of R.samples)r.push({id:G,timestampMs:I,stackId:C}),G++;R=g.c8(g.nm({resources:w,frames:p,samples:r,stacks:f},oCb),4);this.O+=R.length;this.O<1E7&&this.L.push(R)}Gy(){this.stop();super.Gy()}};var kVW=[2,5,30];g.U5=D2(()=>{let R="";try{const w=g.sW("CANVAS").getContext("webgl");w&&(w.getExtension("WEBGL_debug_renderer_info"),R=w.getParameter(37446),R=R.replace(/[ :]/g,"_"))}catch(w){}return R});g.Db=class extends g.f5{constructor(R){super();this.provider=R;this.logger=new g.Q6("qoe");this.L=new Map;this.sequenceNumber=1;this.pB=NaN;this.Rb="N";this.D=this.hA=this.T0=this.X=this.O=0;this.p_=this.Jl=this.M0=this.cB="";this.ag=this.jI=NaN;this.f_=0;this.yh=-1;this.Mr=1;this.playTimeSecs=this.rebufferTimeSecs=0;this.q0=this.isEmbargoed=this.O0=this.isOffline=this.isBuffering=!1;this.WB=[];this.U=null;this.Qk=this.K=this.xY=this.J=!1;this.G=-1;this.YY=!1;this.ez=new g.vZ(this.Df,750,this);this.Oi= this.adCpn="";this.iR=this.Fx=this.f0=this.hG=this.adFormat=void 0;this.uo=0;this.Ml=new Set("cl fexp drm drm_system drm_product ns adformat live cat shbpslc".split(" "));this.a9=new Set(["gd","pw","gp","gm","dd"]);this.serializedHouseBrandPlayerServiceLoggingContext="";this.N0=!1;this.mq=NaN;this.I0=0;this.eI=!1;this.remoteConnectedDevices=[];this.remoteControlMode=void 0;this.SI=!1;this.Af=new Set;this.U0=!1;this.Xf={cP:p=>{this.cP(p)}, lZl:()=>this.C, reportStats:()=>{this.reportStats()}, mkB:()=>this.L.get("cat")||[], Ex:p=>this.L.get(p)||[], SK0:()=>this.L, W6B:()=>({adCpn:this.adCpn,Oi:this.Oi,adFormat:this.adFormat}), u9I:()=>({hG:this.hG,f0:this.f0,Fx:this.Fx,iR:this.iR})}; this.S=this.provider.LB.Y("html5_qoe_relaxed_reporting");var w=g.Iq(this.provider.LB.experiments,"html5_qoe_proto_mock_length");w&&!kU.length&&(kU=eDr(w));g.K(this,this.ez);try{navigator.getBattery?.().then(p=>{this.U=p})}catch{}g.ix(this,0,"vps",["N"]); R.LB.dn()&&(this.I0=(0,g.T)(),this.mq=g.PI(()=>{const p=(0,g.T)(),r=p-this.I0;r>500&&this.Ty("vmlock",{diff:r.toFixed()});this.I0=p},250)); this.provider.videoData.rS&&(this.remoteControlMode=QCx[this.provider.videoData.rS]||0);this.provider.videoData.Vf&&(w=OFl(this.provider.videoData.Vf),w?.length&&(this.remoteConnectedDevices=w));R.LB.dn()&&(this.nB=new Gpp,g.K(this,this.nB));R.LB.webPlayerContextConfig?.enableSelfProfilingLogging&&(this.PS=new ISm,g.K(this,this.PS))}Df(){const R=g.g9(this.provider);QY(this,R)}yp(){return this.ix}R7(){return{T0:this.T0,hA:this.hA}}Hc(R,w){this.T0=R;this.hA=w}hc(R){if(!this.SI){this.SI=!0;var w=""; switch(R){case 1:w="proximaui";break;case 2:w=this.provider.videoData.zy.getWebPlayerContextConfig()?.enableProximaLowLatency?"proximawpcc":this.provider.videoData.Y("html5_enable_proxima")||this.provider.videoData.Y("html5_sabr_force_proxima")?"proximaexp":"proximaclient";break;case 3:w="proximaauto"}w!==""&&Ns(this,w)}}uf(R,w,p,r){if(!this.Af.has(R)){this.Af.add(R);var f=g.g9(this.provider);g.ix(this,f,"lse",[R,w,p,r.toFixed(3)])}}Dp(R){Tk(this,"lwc",[R.tj?R.tj.toFixed():"",R.v0?R.v0.toFixed(): "",R.Vm?(R.Vm*1E3).toFixed():"",R.gL?(R.gL*1E3).toFixed():"",R.SQ?(R.SQ*1E3).toFixed():""].join(":"))}reportStats(R=NaN){if(!this.cS()&&(R=R>=0?R:g.g9(this.provider),this.S?CaP.has(this.Rb)&&(this.L.size||(this.Rb==="PL"?R>=this.O+30:R<=this.X+30||R>=this.O+1200&&R<=this.X+86400))&&(g.ix(this,R,"vps",[this.Rb]),this.O=R):["PL","B","S"].indexOf(this.Rb)>-1&&(this.L.size||R>=this.O+30)&&(g.ix(this,R,"vps",[this.Rb]),this.O=R),this.L.size)){this.sequenceNumber===7E3&&g.AO(Error("Sent over 7000 pings")); if(!(this.sequenceNumber>=7E3)){H_(this,R);var w=this.provider.CB.T5();for(const {key:u,value:m}of w)this.Ty(u,m);w=R;var p=this.provider.CB.Vp(),r=p.droppedVideoFrames||0;const G=p.totalVideoFrames||0,I=r-this.T0,C=G&&!this.hA;r>p.totalVideoFrames||I>5E3?r2H(this,"html5.badframedropcount",`df.${r};tf.${p.totalVideoFrames}`):(I>0||C)&&g.ix(this,w,"df",[I]);this.T0=r;this.hA=G;this.D>0&&(g.ix(this,R,"glf",[this.D]),this.D=0);sx.isActive()&&(R=sx.Ol(),Object.keys(R).length>0&&this.Ty("profile",R)); this.eI&&Ns(this,"lwnmow");R={};this.provider.videoData.C&&(R.fmt=this.provider.videoData.C.itag,(w=this.provider.videoData.G)&&w.itag!==R.fmt&&(R.afmt=w.itag));R.cpn=this.provider.videoData.clientPlaybackNonce;this.hG?.length?R.adcpn=this.hG.join(","):this.adCpn&&(R.adcpn=this.adCpn);this.f0?.length?R.addocid=this.f0.join(","):this.Oi.length&&(R.addocid=this.Oi);p=this.provider.videoData;w=p.L$();p=p.latencyClass;(this.provider.LB.Tk().L.vS(kuH)&&w&&p==="NORMAL"||this.provider.LB.Tk().L.vS(N_W)&& w&&p==="LOW"||this.provider.LB.Tk().L.vS(vab)&&this.provider.videoData.isDaiEnabled()&&c4(this.provider.videoData))&&(R.adc=1);this.provider.videoData.cotn&&(R.cotn=this.provider.videoData.cotn);R.el=SG(this.provider.videoData);R.content_v=uX(this.provider.videoData);R.ns=this.provider.LB.pB;R.fexp=BPd(this.provider.LB.experiments).toString();R.cl=(885186571).toString();w=this.provider.videoData.adFormat||this.adFormat;this.Fx?.length?R.adformat=this.Fx.join(","):w&&(R.adformat=w);(w=Q0(this.provider.videoData))&& (R.live=w);this.provider.videoData.ph()&&(R.drm=1,this.provider.videoData.K&&(R.drm_system=RhP[this.provider.videoData.K.flavor]||0),this.provider.videoData.drmProduct&&(R.drm_product=this.provider.videoData.drmProduct));tk()&&this.provider.videoData.iI&&(R.ctt=this.provider.videoData.iI,R.cttype=this.provider.videoData.u8,this.provider.videoData.mdxEnvironment&&(R.mdx_environment=this.provider.videoData.mdxEnvironment));this.provider.videoData.isDaiEnabled()?(R.dai=this.provider.videoData.enableServerStitchedDai? "ss":"cs",this.provider.videoData.S$&&(R.dai_fallback="1"),c4(this.provider.videoData)&&(R.dai="mv")):this.provider.videoData.iU?R.dai="cs":this.provider.videoData.N1&&(R.dai="disabled");R.seq=this.sequenceNumber++;if(this.provider.videoData.G7){if(w=this.provider.videoData.G7,R&&w){w.ns==="3pp"&&(R.ns="3pp");this.a9.has(w.ns)&&Ns(this,"hbps");w.shbpslc&&(this.serializedHouseBrandPlayerServiceLoggingContext=w.shbpslc);for(var f of Object.keys(w))this.Ml.has(f)||(R[f]=w[f])}}else R.event="streamingstats", R.docid=this.provider.videoData.videoId,R.ei=this.provider.videoData.eventId;this.isEmbargoed&&(R.embargoed="1");Object.assign(R,this.provider.LB.L);(f=R.seq)&&!this.provider.LB.experiments.Tk().L.vS(uur)&&(w=GnI(this,+f),w=g.nm(w,gDH),w=g.c8(w,4),this.L.set("qclc",[w]));R=g.bu("//"+this.provider.LB.J6+"/api/stats/qoe",R);p=w="";for(const [u,m]of this.L.entries()){r=m;if(!r?.join)continue;r=`&${u}=${r.join(",")}`;r.length>100?p+=r:w+=r}this.provider.LB.experiments.Tk().L.vS(uur)&&(f=GnI(this,+(f|| 0)),f.qoePingUrl=R+w+p,g.Rv("qoeClientLoggingContext",f),w+="&dl=1");IMb(this,R+w,p.replace(/ /g,"%20"))}this.L.clear()}}zG(R){this.eI=R}pL(){if(this.provider.videoData.K){var R=this.provider.videoData.K;Ns(this,`eme-${R.keySystemAccess?"final":ZM(R)?"ms":h2(R)?"ytfp":Fa(R)?"safarifp":"nonfinal"}`)}}SN(R){this.isEmbargoed=R}onPlaybackRateChange(R){const w=g.g9(this.provider);R&&R!==this.Mr&&(g.ix(this,w,"rate",[R]),this.Mr=R);this.S||this.reportStats(w)}getPlayerState(R){if(R.L(128))return"ER";if(R.L(2048))return"B"; if(R.L(512))return"SU";if(R.L(16)||R.L(32))return"S";if(R.isOrWillBePlaying()&&R.L(64))return"B";let w=ubt[Bo(R)];g.I1(this.provider.LB)&&w==="B"&&this.provider.CB.getVisibilityState()===3&&(w="SU");w==="B"&&R.L(4)&&(w="PB");return w}O2(R,w){const p=g.g9(this.provider);g.ix(this,p,"vfi",[R==="A"?"":`${w??0}`,R])}Gy(){super.Gy();g.$E(this.pB);g.$E(this.mq)}cP(R){this.isOffline=R;g.ix(this,g.g9(this.provider),"is_offline",[this.isOffline?"1":"0"])}Ty(R,w,p){const r=this.WB.indexOf(R)!==-1;r||this.WB.push(R); if(!p||!r){w=typeof w!=="string"?Ro(w):w;w=ua_(w);if(!p&&!/^t[.]/.test(w)){var f=g.g9(this.provider)*1E3;w=`t.${f.toFixed()};${w}`}Tk(this,"ctmp",`${R}:${w}`);v_(this);return f}}UV(R,w,p){this.C={Vt:Number(this.Ty("glrem",{nst:R.toFixed(),rem:w.toFixed(),ca:+p})),Jq:R,Zl:w,isAd:p}}DM(R,w,p){g.ix(this,g.g9(this.provider),"ad_playback",[R,w,p])}QS(R,w){const p=g.g9(this.provider)*1E3;Tk(this,"daism",`t.${p.toFixed(0)};smw.${(R*1E3).toFixed(0)};smo.${(w*1E3).toFixed(0)}`)}resume(){isNaN(this.pB)?CI6(this): this.pB=g.PI(()=>{this.reportStats()},1E4)}}; g.Db.prototype.QI=pd(50);g.Db.prototype.NO=pd(33);g.Db.prototype.g_=pd(27);g.Db.prototype.hp=pd(21);var ubt={[5]:"N",[-1]:"N",[3]:"B",[0]:"EN",[2]:"PA",[1]:"PL",[-1E3]:"ER",[1E3]:"N"},CaP=new Set(["PL","B","S"]),kU=[];var Yml=class extends g.f5{constructor(R,w,p,r,f,G,I,C=!1,u,m){super();this.CB=R;this.schedule=w;this.policy=p;this.Z$=r;this.pB=u;this.uo=m;this.rL=this.un=null;this.jI=this.PS=this.Jl=this.S=0;this.m_=this.kE=this.isSuspended=!1;this.q0="";this.wB={};this.mq=NaN;this.SI=this.p_=this.XO=0;this.u3=null;this.f_=this.YY=!1;this.Vw=0;this.N0=!1;this.M0=this.eI=0;this.yh=null;this.cB=this.wE=!1;this.Ja=()=>this.CB.Ja(); this.timing=new nba(this.uo);this.X=new oba(this.schedule,this.policy);this.Mr=new g.vZ(this.n3,0,this);this.ag=new g.vZ(this.n3,this.policy.Mr,this);this.DF=new g.vZ(this.n3,1E3,this);this.Ml=new g.vZ(this.n3,void 0,this);this.Qk=new g.vZ(()=>{this.isSuspended||this.n3()},1E4,this); this.Af=new g.vZ(this.wg,250,this);this.D=this.currentTime=NaN;this.HL=new KI(5);this.I0=this.timestampOffset=NaN;this.logger=new g.Q6("dash");this.pL=Infinity;this.Xf={w1q:()=>this.Bo, b3Y:()=>this.G, getAudioTrack:()=>this.audioTrack, C40:()=>this.videoTrack, O3Y:()=>this.xY, getManifest:()=>this.Z$, Vuy:()=>this.C, n3:()=>{this.n3()}, b$:()=>{this.S=0;this.b$()}, Xoy:z=>GK(this,this.videoTrack,this.un.C,z)}; R=u&&u.uH();u&&(fg6(u,this.Z$,this.policy),this.I0=Date.now());this.L=new Fdk(this,this.X,p,this.Z$,f,R);p=e5l(this.L,G,I&&I.id);this.audioTrack=new hPU(this,this.policy,p.audio,this.timing);this.videoTrack=new hPU(this,this.policy,p.video,this.timing);this.videoTrack.O.xY=this.audioTrack.E9();this.U0={updateend:this.GE,error:this.B1};g.K(this,this.Mr);g.K(this,this.ag);g.K(this,this.DF);g.K(this,this.Ml);g.K(this,this.Qk);this.ez=FvH({Tm:this.policy.D.Tm,e_:this.policy.e_,fg:this.policy.fg});this.U= Agl(this,this.policy,this.ez,this.schedule,this.HL,(z,B)=>WrW(this,z,B)); this.G=new dx6(this,this.Z$,this.policy,this.videoTrack,this.audioTrack,C);this.policy.K&&(C=this.CB.getVideoData(),this.Ty("clsdai",{initld:1,admapsz:C.Gw?.size}),C.Gw||(C.Gw=new Map),this.xY=new Zda(this.policy,(z,B)=>{this.Ty(z,B)},this.policy.Js,C.Gw)); this.Bo=new OdS(this,this.Z$,this.videoTrack,this.audioTrack,this.policy);C=this.policy.Ss?this.CB.getVideoData().A8:null;this.J=new vbt(this,this.policy,this.videoTrack,this.audioTrack,this.wB,this.G,this.timing,this.X,this.schedule,this.Z$,this.L,this.U,C);g.K(this,this.J);this.K=new Ndb(this,this.policy,this.videoTrack,this.audioTrack,this.Z$,f,eG(this.CB.getVideoData()),I?.id);g.K(this,this.K);S9r(this.K,G);this.C=new pkb(this.CB,this,this.policy,this.audioTrack,this.videoTrack,this.Z$,this.schedule, this.L,this.K,this.timing,this.G,this.xY);g.K(this,this.C);this.O=this.CB.Wy.JQ.eE;this.policy.J||xCH(this);this.policy.uo&&(this.Df=new fSS(this.videoTrack.rN.index,this.CB.getVideoData().clientPlaybackNonce??"",this.CB))}initialize(R,w,p){R=R||0;this.policy.L||(w=$Mr(this.L),pG(this.CB,new ri(w.video,w.reason)),this.CB.HT(new ri(w.audio,w.reason)));this.policy.L&&Uh(this);this.Z$.isManifestless&&hlY(this.J);this.U&&bLd(this.U,this.videoTrack.rN);w=isNaN(this.getCurrentTime())?0:this.getCurrentTime(); let r=!this.Z$.isManifestless;this.policy.Es&&(r=r||this.Z$.yv);if(!this.policy.pB||this.policy.q0)this.currentTime=r?R:w;this.policy.xY&&this.seek(this.getCurrentTime(),{}).bA(()=>{}); this.policy.L?this.O?.Y$(this.Mw()||"")&&LrL(this)&&IZ(this,this.videoTrack)&&IZ(this,this.audioTrack)&&(uhW(this.C,this.O),this.policy.J&&xCH(this)):this.pB&&(qq6(this,this.videoTrack),qq6(this,this.audioTrack),S0I(this.pB),delete this.pB);p?(this.O0(!1),this.DF.ql()):(R=this.getCurrentTime()===0,iU(this.J,this.videoTrack,this.videoTrack.rN,R),iU(this.J,this.audioTrack,this.audioTrack.rN,R),this.policy.L&&rg_(this.C,{Wu:1}),this.policy.xY||this.seek(this.getCurrentTime(),{}).bA(()=>{}),this.timing.tick("gv")); (this.Z$.tj||this.Z$.v0||this.Z$.Vm||this.Z$.gL||this.Z$.SQ)&&this.CB.Dp(this.Z$)}O0(R){this.kE=R||this.CB.V().Y("html5_allow_multiview_tile_preload")&&this.CB.getVideoData().yh;this.policy.M0||(this.isSuspended=!0,this.policy.CV&&(this.DF.stop(),this.ag.stop(),this.Mr.stop()),this.Qk.stop())}resume(){if(this.isSuspended||this.m_){this.kE=this.m_=this.isSuspended=!1;try{this.n3()}catch(R){g.LF(R)}}}rA(){return!this.policy.Ml}nB(R=!1){return Math.min(oV(this.audioTrack,R),oV(this.videoTrack,R))}Zq(R= !1,w=!1){y2r(this);this.CB.lB()&&(this.D=NaN);R?(this.policy.Jl&&this.Ty("loader",{setsmb:1}),this.policy.M0=!0,this.xU()):(this.O0(!1),w||this.xU())}setAudioTrack(R,w,p=!1){if(!this.cS()){var r=!isNaN(w);p&&r&&(this.audioTrack.pB=Date.now(),this.policy.MH&&(this.N0=!0));p=this.CB.lB()&&!this.CB.getVideoData().U;if(this.policy.L){var f=this.K.EY(R.id,r);this.CB.HT(f)}else f=this.L,f.C=f.Z$.L[R.id],f.D=f.C,f=new RV(f.D,f.O,r?"t":"m"),this.CB.HT(new ri(f.audio,f.reason));r?(this.mq=Date.now(),r=this.audioTrack.rN.index.I3(w), this.Ty("setAudio",{id:R.id,cmt:w,sq:r}),r>=0&&(this.policy.L&&this.A9(!0,"mosaic"),aV(this.audioTrack,r,NaN,NaN),!this.policy.Df&&this.Z$.isLive&&t2(this.Z$,r,!1))):p||this.CB.nX()}}setPlaybackRate(R){R!==this.X.getPlaybackRate()&&this.X.setPlaybackRate(R)}i$(R){const w=this.C.J;this.C.FC(R);this.Ty("scfidc",{curr:oH(w),"new":oH(R)});R&&oH(R)!==oH(w)&&(this.A9(!0,"caption change"),this.Fo())}l$(R){this.C.LP(R)}w2(R){R.L.info.i4()?this.CB.HT(R):pG(this.CB,R)}nu(R){c2(R.C_[R.C_.length-1])&&fG(this, P7I(this.L,R.C_[0].rN))}hU(){return this.CB.hU()}lM(){return this.CB.lM()}Dz(R){this.CB.V().dn()&&this.Ty("sps",{status:R.w9||""});if(R.w9===1)this.XO=0;else if(R.w9===2||R.w9===3){let w=!1;R.w9===3&&(this.pL=R.nT??Infinity,this.XO+=1,(w=gk(this))&&this.nw(!0));this.CB.wk(!0,w)}}Xb(){return this.CB.Xb()}D5(){return this.CB.D5()}C5(R){this.CB.C5(R)}Fo(){this.n3()}wg(){const R=this.CB.XI()?.getCurrentTime();R?this.CB.Ty("rms",{cta:R}):this.Af.ql()}n3(){ub(this);if(this.un&&NF(this.un)&&!this.un.cM()&& (!this.policy.pB||isFinite(this.getCurrentTime()))){var R=yL(this.videoTrack);R=this.policy.Cj&&R&&R.J();this.Z$.isManifestless&&this.Z$.O&&lI(this.Z$)?(this.D=lI(this.Z$),this.un.vM(this.D)):K_(this.Z$)&&!R?(R=this.getCurrentTime(),this.policy.pB&&this.policy.q0&&this.Ty("ssrDuration",{ld:this.N8(),lct:this.currentTime,vpd:this.getCurrentTime()},!0),isNaN(this.D)?(this.D=R+3600,this.un.vM(this.D)):this.D<=R+1800&&(this.D=Math.max(this.D+1800,R+3600),this.un.vM(this.D))):this.un.isView||(R=Math.max(this.audioTrack.getDuration(), this.videoTrack.getDuration()),(!isFinite(this.D)||this.D!==R)&&R>0&&(this.un.vM(R),this.D=R))}if(!this.cS())if(xX(this.Z$)&&this.Z$.Y7()){var w=this.Z$;this.handleError("manifest.net.retryexhausted",w.SI?{rc:w.Po}:{rc:w.Po.toString()},1)}else if(this.policy.L)a:{try{if(wi(this)&&this.rL){w=this.C;var p=this.rL;const q=p.L;if(q){var r=w.CB.qj(),f=!0;r||(r=w.loader.getCurrentTime(),f=!1);{var G=q,I=r;const O=f?w.CB.Tp(I):I;if(w.loader.N9(O))var C=!1;else{var u={t:I.toFixed(3),isUtc:f};c:{const e=w.CB.Mw(); if(e){for(const P of[w.audioTrack,w.videoTrack]){const c=tg(P.rN,w.Z$.PB);r=G?.O5(c,e)||[];if(r.length===0||!j$H(new TV(r),O)){var m=!1;break c}}m=!0}else m=!1}m?(w.loader.Ty("prebuffer",Object.assign(u,{inrange:1})),C=!0):(G.info.L?.jk?.Zb?f&&(G.info.L?.jk?.Zb||0)===I*1E3:!f&&(G.info.L?.jk?.MW||0)===I*1E3)?(w.loader.Ty("prebuffer",Object.assign(u,{match:1})),C=!0):C=!1}}C&&(w.CB.KL("ismp_c"),w.L.push(q),w.O0?.L(q.info.EQ),q.sA(),p.O(!1))}}D0(this.C);this.Z$.isManifestless&&this.policy.J&&qw(this.Bo); this.un?.J()&&this.b$();rg_(this.C);if(wi(this)&&this.rL){var z=this.C,B=this.rL;const q=B.C.u$;if(q!==void 0&&q>=0){z.CB.KL("ismp_a");var W=B.C;if(sHW(z,W)){var x=p2D(z,W);z.policy.jb>0&&z.eI.yV++;x&&(B.L!==x&&(YED(B),B.L=x,B.C=Ex),z.CB.KL("ismp_rc"))}}}}catch(q){g.AO(q);if(q.message.includes("changeType")){this.Ty("ctype",{exp:q.name,msg:q.message,s:q.stack});break a}this.handleError("fmt.unplayable",{exp:q.name,msg:q.message,s:q.stack,trg:"sabrslicerqt"},1)}O_d(this);this.Qk.ql()}else if(!this.Z$.C|| !cy6(this.videoTrack)&&!cy6(this.audioTrack)||(this.videoTrack.G||this.audioTrack.G)&&this.policy.eI?w=!1:(this.xU(),this.CB.seekTo(Infinity,{dB:"checkLoaderTracksSync",gE:!0}),w=!0),!w){ub(this);this.Z$.isManifestless&&(PPL(this.videoTrack),PPL(this.audioTrack),qw(this.Bo),(w=lJ(this.videoTrack))&&w.L&&(w=w.L.G&&!this.policy.e_,this.Ty(w===this.policy.D.Tm?"strm":"strmbug",{strm:w,sfmp4:this.policy.D.Tm,dfs:this.policy.e_},!0)));if(this.un)this.b$();else if(this.policy.G){w=!1;if(this.policy.Pn)for(f of[this.videoTrack, this.audioTrack]){for(p=lJ(f);p&&f.uC()!==yL(f);p=lJ(f))f.WH(p);w=w||!!p}else(G=lJ(this.videoTrack))&&this.videoTrack.WH(G),(I=lJ(this.audioTrack))&&this.audioTrack.WH(I);Eh(this.videoTrack)&&Eh(this.audioTrack)||(G||I||w)&&E5(this)}CG(this);iU(this.J,this.videoTrack,this.videoTrack.rN,!1);iU(this.J,this.audioTrack,this.audioTrack.rN,!1);if(!this.policy.Z8&&(w=this.videoTrack,u=this.audioTrack,(!this.un||NF(this.un)&&!this.policy.Gf)&&!this.Bo.isSeeking()&&(this.policy.L||dk(w)&&w.rN.L()&&this.L.pB)))a:{if(p= this.getCurrentTime(),C=this.X,m=I8(C,w.rN.info.hf,u.rN.info.hf,0),u=Gl(C.BB)+m/rK(C.BB),p+=Math.max(u,u+C.policy.u0-m/w.rN.info.hf),w.C.length){if(w.C[0].info.C_[0].startTime<=p)break a;zl(w)}C=w.O;for(u=C.C.length-1;u>=0;u--)C.C[u].info.startTime>p&&C.C.pop();KTx(w);w.L&&p5&&R.X.shift(),w=w.yk,this.CB.getVideoData()?.enableServerStitchedDai&&(p=XQH(this.audioTrack, w),R=XQH(this.videoTrack,w),p!==0&&R!==0&&p!==R&&this.handleError("ssdai.avsync",{sq:w,a:p,v:R},0)))}}uN(R,w,p,r){R.info.video&&this.G.uN(w,p,r)}Lq(R){this.L.Lq(R)}iM(){return this.u3}j5(){return this.videoTrack.J||this.audioTrack.J}seek(R,w){if(this.cS())return jZ();if(this.j5())return jZ("seeking to head");if(this.policy.xY&&!isFinite(R))return gjL(this.Bo),g.FB(Infinity);ub(this);XKb(this,R,!1,w.seekSource);Uh(this);this.policy.L||CG(this,R);this.un&&this.un.L&&this.un.C&&!this.CB.getVideoData().Qi&& (this.un.L.isLocked()||this.un.C.isLocked())&&this.CB.nX({reattachOnLockedBuffer:1,vsb:`${this.un.C.isLocked()}`,asb:`${this.un.L.isLocked()}`});const p=this.getCurrentTime(),r=this.Bo.seek(R,w);if(!this.policy.pB||this.policy.q0)this.currentTime=r;gK(this.G,R,p,this.policy.wh&&!w.iq);E5(this);return g.FB(r)}iF(R){return this.policy.L&&this.C.iF(R)}EX(R){return this.C.EX(R)}A9(R,w){this.C.A9(R,w)}getCurrentTime(){if(this.policy.pB){const R=this.vB()||0;return this.CB.getCurrentTime(!0)-R}return this.currentTime}N8(){return this.currentTime+ this.timestampOffset}Kx(){return this.audioTrack.rN.info}Bi(){return this.videoTrack.rN.info}RM(){return this.audioTrack.rN.info.wN}Vo(){return this.videoTrack.rN.info.wN}Gy(){try{this.Zq(),zl(this.audioTrack),zl(this.videoTrack),Zd(this.audioTrack),Zd(this.videoTrack),this.audioTrack.dispose(),this.videoTrack.dispose(),super.Gy()}catch(R){g.LF(R)}}handleError(R,w,p=0){const r=wu(p);R==="fmt.unplayable"&&this.Z$.isLive&&(this.policy.fg=!1,o0(this.Z$));w=new g.pq(R,w,p);g.DL(this);Ro(w.details);this.CB.handleError(w); R!=="html5.invalidstate"&&w.errorCode!=="fmt.unplayable"&&R!=="fmt.unparseable"&&r&&this.dispose()}TK(){var R=yL(this.audioTrack),w=yL(this.videoTrack);R={lct:this.getCurrentTime().toFixed(3),lsk:this.Bo.isSeeking(),lmf:this.L.L.isLocked(),lbw:mh(this.schedule).toFixed(3),lhd:Gl(this.schedule).toFixed(3),lst:((this.schedule.D.QB()||0)*1E9).toFixed(3),laa:R?R.EC():"",lva:w?w.EC():"",lar:this.audioTrack.L?this.audioTrack.L.EC():"",lvr:this.videoTrack.L?this.videoTrack.L.EC():"",laq:`${Pj(this.audioTrack)}`, lvq:`${Pj(this.videoTrack)}`};this.un&&!this.un.u4()&&this.un.L&&this.un.C&&(R.lab=Fs(this.un.L.f3()),R.lvb=Fs(this.un.C.f3()));this.S&&(R.lapt=((0,g.T)()-this.S).toFixed(0),R.lapr=DCW(this));this.Jl&&(R.lapmabht=((0,g.T)()-this.Jl).toFixed(0),R.lapmabh=WW(this,this.audioTrack).toFixed(0));(w=this.C.Qk)&&(R.reqBlocked=w);(w=this.C.f_)&&(R.lsrt=((0,g.T)()-w).toFixed(0));this.PS&&(R.lapmvbht=((0,g.T)()-this.PS).toFixed(0),R.lapmvbh=WW(this,this.videoTrack).toFixed(0));this.jI&&(R.lapsdai=((0,g.T)()- this.jI).toFixed(0));return R}Nl(){return this.L.L}xU(){try{this.policy.L&&this.C.A9(!1,"pending"),this.audioTrack.xU(),this.videoTrack.xU()}catch(R){g.LF(R)}this.policy.G=""}N9(R){return this.videoTrack&&this.audioTrack?this.videoTrack.N9(R)&&this.audioTrack.N9(R):!0}hv(){return f7(this.X)}Ty(R,w,p=!1){this.CB.Ty(R,w,p)}Mw(){return this.CB.Mw()}gE(R,w){R/=w;isNaN(this.timestampOffset)&&WF(this,R-Math.min(R,this.policy.Vl));let p=R-this.timestampOffset;p<0&&!this.cB&&(this.cB=!0,this.Ty("neg_ts", {ts:p.toFixed(3),offset:this.timestampOffset.toFixed(3),wnd:L_(this.Z$)||this.Z$.tj?"1":"0"}),this.CB.V().Tk().L.vS(Jp_)&&(WF(this,R-Math.min(R,this.policy.Vl)),p=R-this.timestampOffset));return p*w}vB(){return this.timestampOffset}isSeeking(){return this.Bo.isSeeking()}X1(){this.G.X1()}vN(R,w=!1,p={}){this.policy.L?this.K.vN(R,w,p):this.L.vN(R,w,p)}Nk(){this.policy.C&&this.wE&&(this.Ty("sdai",{skipAdSked:"1"}),this.wE=!1)}oG(R,w){if(this.policy.C&&(this.wE||this.isSeeking()))return this.Ty("sdai", {ignoreSkip:"1",isSkip:this.wE,isSeek:this.isSeeking(),t:R.toFixed(3)}),!1;const p=this.policy.C&&(this.policy.K||this.policy.K2),r=this.videoTrack.rN.index.I3(R);let f=!1;if(p){if(f=!!this.xY?.AQ(R,r,this.timestampOffset))QW(this,R,R,r),this.u3&&this.u3?.AQ(R,r)}else this.u3&&(f=!!this.G.oG(R,this.u3));if(!f)return this.handleError("ad.skipfailed",{dec:!!this.u3,t:R.toFixed(3),sq:r}),!1;this.policy.C&&(this.Ty("sdai",{skipAdStd:"1"}),this.wE=!0);this.policy.uo&&this.Df?.clear();WF(this,this.timestampOffset- w);E5(this);this.policy.C&&(o0(this.Z$),Zd(this.audioTrack),Zd(this.videoTrack),this.xU());return!0}Hw(){WF(this,this.timestampOffset-1E3);var R=this.Z$;const w=new Set;for(const r in R.L){const f=R.L[r].index;var p=f.SE();p&&!w.has(p)&&(p.startTime+=1E3,p.endTime=p.startTime+p.duration,w.add(p));f.segments.length&&(p=f.segments[f.segments.length-1],f.segments=[],f.segments.push(p))}this.u3&&this.u3.u6();this.policy.K2&&this.policy.C&&this.xY?.u6();gK(this.G,0,0,!0);this.wE=!1}getManifest(){return this.Z$}isOffline(){return!!this.CB.getVideoData().cotn}yK(R, w){this.CB.yK(R,w)}yx(R,w){if(this.policy.L)XKb(this,R,!0,w),this.C.A9(!0,"utc"),this.Fo();else if(w=this.CB.getVideoData().A8){var p=this.J;p.St=R;p.A8=w;vj(this)}}jx(R){this.videoTrack.J=!1;this.audioTrack.J=!1;this.Bo.L=!1;this.CB.jx(R)}pP(R){this.Bo.pP(R-this.vB())}Vi(){this.CB.Vi()}nw(R){R!==this.policy.Pw&&((this.policy.Pw=R)||this.n3())}nX(R){this.CB.nX(R)}zG(R){this.CB.zG(R)}mS(R,w,p){this.xY?.mS(R,w,p);this.policy.K&&(this.C.U=void 0,this.n3())}d3(R){this.xY?.d3(R)}Uj(R){this.policy.O0&& this.CB.getVideoData().PB()&&!R.c$&&(this.Ty("liveUmpMissing",{segmentNum:R.XD,headerId:R.KX,startMs:R.startMs,durationMs:R.durationMs}),this.policy.O0=!1)}KA(R,w){if(this.policy.K){const p=R.S8?.[0],r=DFH(this.CB.getVideoData());this.xY?.KA(R,w,this.u3||void 0,r,this.policy.kF?this.Z$:void 0);this.Ty("clidai",{onqlst:1,len:R.S8?.length||0,rn:w,evt:LvP(p?.rg?.event),cid:p?.rg?.identifier||"null",sq:p?.XD||-1,trk:p?.trackType||"null",disr:r})}}eG(R){this.policy.O0&&this.u3?.eG(R)}prefetchKeyPlay(R, w){wi(this)&&(this.rL||(this.rL=new jlR(p=>{this.CB.KL(p)}),g.K(this,this.rL)),Zzx(this.rL,{u$:R, mN:w,Wu:2}),this.n3())}vg(){this.p_++}UA(){this.p_=0}a9(){return this.CB.getVideoData().U?(0,g.T)()-this.schedule.jI>3E5&&this.p_>=3:!this.schedule.jI}Ww(){this.C.S.yV=0}Pw(){this.C.U=void 0}};var sMm=class extends g.HC{};var m6i=class extends sMm{constructor(R,w,p,r){super();this.O=-1;this.L={};this.G=new g.vZ(this.K,0,this);g.K(this,this.G);this.C=new g.vZ(()=>{this.cS()||(this.G.start(Math.random()*p),this.C.start(w))},R,this); g.K(this,this.C);r.subscribe("fairplay_next_need_key_info",this.J,this)}J(R,w){if(R&&w){var p=Number(t4(R,"cpi"))*1+1;isNaN(p)||p<=0||pthis.O&&(this.O=p,g.Jt(this.L)||(this.L={},this.G.stop(),this.C.stop())),this.L[w]=R,this.C.ql())}}K(){for(const f of Object.keys(this.L)){var R=this.publish,w=this.O,p=g.Cp(this.L[f]),r=p[6];const G=[];for(const I of r.split("&"))I.indexOf("cpi=")===0?G.push("cpi="+w.toString()):I.indexOf("ek=")===0?G.push("ek="+ g.m3(f)):G.push(I);p[6]="?"+G.join("&");w="skd://"+p.slice(2).join("");r=w.length*2;p=new Uint8Array(r+4);p[0]=r%256;p[1]=(r-p[0])/256;for(r=0;r{this.publish("log_qoe",{wvagt:"timer",reqlen:this.L?this.L.length:-1});if(this.L){if(this.L.length>0){var p=this.L.shift();YqD(this,p.info)}this.L.length>0&&(p=this.L[0].time-(0,g.T)(),this.C.start(Math.max(0,p)))}},0); g.K(this,this.C);w.subscribe("widevine_set_need_key_info",this.G,this)}G(R){var w;a:{if((w=R.cryptoPeriodIndex)&&this.L.length>0)for(var p of this.L)if(w===p.info.cryptoPeriodIndex){w=!0;break a}w=!1}if(!w){w=(0,g.T)();a:{p=R.cryptoPeriodIndex;if(!isNaN(p))for(r of this.O.values())if(Math.abs(r.cryptoPeriodIndex-p)<=1){var r=!0;break a}r=!1}r?(r=R.L,r=Math.max(0,Math.random()*((isNaN(r)?120:r)-30))*1E3):r=0;this.publish("log_qoe",{wvagt:`delay.${r}`,cpi:R.cryptoPeriodIndex,reqlen:this.L.length}); r<=0?YqD(this,R):(this.L.push({time:w+r,info:R}),this.C.ql(r))}}Gy(){this.L=[];super.Gy()}};var paP=class{constructor(){({url:p,interval:w,retries:R}={});var R,w,p;this.url=p;this.interval=w;this.retries=R}};var j0H=class{constructor(R,w){this.statusCode=R;this.message=w;this.O=this.heartbeatParams=this.errorMessage=null;this.C=[];this.L={};this.nextFairplayKeyId=null}},J2I={DRM_TRACK_TYPE_AUDIO:"AUDIO",DRM_TRACK_TYPE_SD:"SD",DRM_TRACK_TYPE_HD:"HD",DRM_TRACK_TYPE_UHD1:"UHD1"};var knd=class extends g.f5{constructor(R,w,p="",r=!1){super();this.message=R;this.requestNumber=w;this.timer=p;this.C=r;this.onError=this.onSuccess=null;this.L=new g.RR(5E3,2E4,.2)}};var Ba6=class extends g.HC{constructor(R,w,p,r,f){super();this.videoData=R;this.LB=w;this.U=p;this.sessionId=r;this.F9=f;this.K={};this.cryptoPeriodIndex=NaN;this.url="";this.requestNumber=0;this.S=this.xY=!1;this.G=null;this.O0=[];this.O=[];this.authorizedFormats=[];this.X=[];this.D=!1;this.L={};this.status="";this.J=NaN;this.C=R.K;this.cryptoPeriodIndex=p.cryptoPeriodIndex;R={};Object.assign(R,this.LB.L);R.cpn=this.videoData.clientPlaybackNonce;this.videoData.xY&&(R.vvt=this.videoData.xY,this.videoData.mdxEnvironment&& (R.mdx_environment=this.videoData.mdxEnvironment));this.LB.O0&&(R.authuser=this.LB.O0);this.LB.pageId&&(R.pageid=this.LB.pageId);isNaN(this.cryptoPeriodIndex)||(R.cpi=this.cryptoPeriodIndex.toString());f=(f=/_(TV|STB|GAME|OTT|ATV|BDP)_/.exec(g.s3()))?f[1]:"";f==="ATV"&&(R.cdt=f);this.K=R;this.K.session_id=r;this.pB=!0;this.C.flavor==="widevine"&&(this.K.hdr="1");this.C.flavor==="playready"&&(w=Number(Sz(w.experiments,"playready_first_play_expiration")),!isNaN(w)&&w>=0&&(this.K.mfpe=`${w}`),this.pB= !1);w="";g.g3(this.C)?this.C.L()?(r=p.C)&&(w="https://www.youtube.com/api/drm/fps?ek="+Bax(r)):(w=p.initData.subarray(4),w=new Uint16Array(w.buffer,w.byteOffset,w.byteLength/2),w=String.fromCharCode.apply(null,w).replace("skd://","https://")):w=this.C.O;this.baseUrl=w;this.fairplayKeyId=t4(this.baseUrl,"ek")||"";if(w=t4(this.baseUrl,"cpi")||"")this.cryptoPeriodIndex=Number(w);this.O0=p.G3?[g.c8(p.initData,4)]:p.O;lb(this,{sessioninit:p.cryptoPeriodIndex});this.status="in"}ol(R){if(!(this.cS()||R.size<= 0)){var w={};R.forEach((p,r)=>{const f=YX(this.C)?r:p;r=new Uint8Array(YX(this.C)?p:r);YX(this.C)&&mUI(r);p=g.c8(r,4);mUI(r);r=g.c8(r,4);this.L[p]?this.L[p].status=f:this.L[r]?this.L[r].status=f:this.L[p]={type:"",status:f};C8r(this,this.L[p].type,w)}); u7d(this,",");lb(this,{onkeystatuschange:1});this.status="kc";this.publish("keystatuseschange",this)}}error(R,w,p,r){this.cS()||(this.publish("licenseerror",R,w,p,r),R==="drm.provision"&&(R=(Date.now()-this.J)/1E3,this.J=NaN,this.publish("ctmp","provf",{et:R.toFixed(3)})));wu(w)&&this.dispose();this.F9&&(this.F9.dispose(),this.F9=void 0)}shouldRetry(R,w){return!R&&this.requestNumber===w.requestNumber}Gy(){this.L={};super.Gy()}TK(){const R={ctype:this.U.contentType||"",length:this.U.initData.length, requestedKeyIds:this.O0,cryptoPeriodIndex:this.cryptoPeriodIndex};this.G&&(R.keyStatuses=this.L);return R}getInfo(){let R=this.O.join();if(Av(this)){const w=new Set;for(const p in this.L)this.L[p].status!=="usable"&&w.add(this.L[p].type);R+=`/UKS.${Array.from(w)}`}return R+=`/${this.cryptoPeriodIndex}`}qk(){return this.url}};var VN=class extends g.f5{constructor(R,w,p,r,f,G=!1){super();this.element=R;this.U=w;this.initData=p;this.L=r;this.C=f;this.xY=G;this.sessionId="";this.D=this.J=this.O=this.K=null;this.G=new g.th(this);g.K(this,this.G);zmd(this)}O0(R){if(this.K){var w=R.messageType||"license-request";this.K(new Uint8Array(R.message),w)}}ol(){this.D&&this.D(this.L.keyStatuses)}onClosed(){this.cS()||g.fh("xboxone")&&this.O&&this.O("closedShouldNotRetry")}S(R){this.K&&this.K(R.message,"license-request")}pB(R){if(this.O){if(this.C){var w= this.C.error.code;R=this.C.error.systemCode}else w=R.errorCode,R=R.systemCode;this.O(`t.prefixedKeyError;c.${w};sc.${R}`,w,R)}}X(){this.J&&this.J()}update(R){if(this.L)return this.L.update(R).then(null,j3(w=>{BNr(this,"t.update",w)})); this.C?this.C.update(R):this.element.addKey?this.element.addKey(this.U.keySystem,R,this.initData,this.sessionId):this.element.webkitAddKey&&this.element.webkitAddKey(this.U.keySystem,R,this.initData,this.sessionId);return gD()}Gy(){this.L&&(this.xY?this.L.close().catch(g.AO):this.L.close());this.element=null;super.Gy()}};var eB=class extends g.f5{constructor(R,w,p=!1){super();this.element=R;this.L=w;this.J=p;this.K={};this.O=null;this.G=new g.th(this);this.C=this.mediaKeys=null;this.D=Promise.resolve();g.K(this,this.G)}setServerCertificate(){return this.mediaKeys.setServerCertificate?this.L.flavor==="widevine"&&this.L.N7?this.mediaKeys.setServerCertificate(this.L.N7):this.L.L()&&this.L.IG?this.mediaKeys.setServerCertificate(this.L.IG):null:null}createSession(R,w){let p=R.initData;if(this.L.keySystemAccess){w&&w("createsession"); const r=this.mediaKeys.createSession();h2(this.L)?p=LfH(p,this.L.IG):this.L.L()&&(p=Z_l(p)||new Uint8Array(0));w&&w("genreq");R=r.generateRequest(R.contentType,p);const f=new VN(null,null,null,r,null,this.J);R.then(()=>{w&&w("genreqsuccess")},j3(G=>{BNr(f,"t.generateRequest",G)})); return f}if(ZM(this.L))return lEr(this,p);if(Fa(this.L))return qgI(this,p);this.element?.generateKeyRequest?this.element.generateKeyRequest(this.L.keySystem,p):this.element?.webkitGenerateKeyRequest(this.L.keySystem,p);return this.O=new VN(this.element,this.L,p,null,null,this.J)}pB(R){const w=oZ(this,R);w&&w.S(R)}X(R){const w=oZ(this,R);w&&w.pB(R)}U(R){const w=oZ(this,R);w&&w.X(R)}getMetrics(){let R=null;if(this.mediaKeys&&this.mediaKeys.getMetrics)try{R=this.mediaKeys.getMetrics()}catch{}return R}Gy(){this.C= this.mediaKeys=null;this.O?.dispose();for(const R of Object.values(this.K))R.dispose();this.K={};super.Gy();delete this.element}};var Mj=class{constructor(){this.keys=[];this.values=[]}get(R){R=this.findIndex(R);return R!==-1?this.values[R]:null}remove(R){R=this.findIndex(R);R!==-1&&(this.keys.splice(R,1),this.values.splice(R,1))}removeAll(){this.keys=[];this.values=[]}set(R,w){const p=this.findIndex(R);p!==-1?this.values[p]=w:(this.keys.push(R),this.values.push(w))}findIndex(R){return g.wa(this.keys,w=>g.Oi(R,w))}};var X7d=class extends g.HC{constructor(R,w,p,r=null,f){super();this.element=R;this.videoData=w;this.LB=p;this.mediaElement=r;this.F9=f;this.G=[];this.PS=2;this.N0=this.Jl=!1;this.heartbeatParams=null;this.O0=this.pB=!1;this.K=null;this.jI=!1;this.L=this.videoData.K;this.drmSessionId=this.videoData.drmSessionId||g.aaH();this.O=new Map;this.J=new Mj;this.U=new Mj;this.xY=new g.th(this);this.X=this.LB.Y("html5_eme_ignore_teardown_errors");(R=this.element)&&(R.addKey||R.webkitAddKey)||n_()||d3(p.experiments); this.LB.Y("html5_enable_vp9_fairplay")&&this.L.L()?p=pI:(p=this.videoData.HX,p=this.L.flavor==="fairplay"||p?$Q:pI);this.D=p;this.LB.Tk().L.vS(iId)&&this.F9?(this.F9.mediaKeys||(this.F9.mediaKeys=new eB(this.element,this.L,this.X)),this.mediaKeys=this.F9.mediaKeys):(this.mediaKeys=new eB(this.element,this.L,this.X),g.K(this,this.mediaKeys));ZM(this.L)&&(this.S=new eB(this.element,this.L,this.X),g.K(this,this.S));g.K(this,this.xY);p=this.element;this.L.keySystemAccess?this.xY.W(p,"encrypted",this.SI): TU(this.xY,p,ZM(this.L)?["msneedkey"]:["needkey","webkitneedkey"],this.mq);bb6(this);a:switch(R=this.L,p=this.O,R.flavor){case "fairplay":ry()>19.2999?(p=R.p7,R=R.bM,R>=p&&(R=p*.75),w=(p-R)*.5,p=new m6i(w,p,p-w-R,this)):p=null;break a;case "widevine":p=new zV6(p,this);break a;default:p=null}if(this.K=p)g.K(this,this.K),this.K.subscribe("rotated_need_key_info_ready",this.M0,this),this.K.subscribe("log_qoe",this.C,this);d3(this.LB.experiments);this.C({cks:this.L.getInfo()})}SI(R){this.C({onecpt:1}); R.initData&&VfY(this,new Uint8Array(R.initData),R.initDataType)}mq(R){this.C({onndky:1});VfY(this,R.initData,R.contentType)}Y4(R){this.C({onneedkeyinfo:1});this.LB.Y("html5_eme_loader_sync")&&(this.U.get(R.initData)||this.U.set(R.initData,R));y5d(this,R)}M0(R){this.G.push(R);Or(this)}createSession(R){var w=oWb(this)?NZY(R):g.c8(R.initData);this.O.get(w);this.O0=!0;R=new Ba6(this.videoData,this.LB,R,this.drmSessionId,this.F9);this.O.set(w,R);R.subscribe("ctmp",this.YY,this);R.subscribe("keystatuseschange", this.ol,this);R.subscribe("licenseerror",this.Cq,this);R.subscribe("newlicense",this.U0,this);R.subscribe("newsession",this.Qk,this);R.subscribe("sessionready",this.q0,this);R.subscribe("fairplay_next_need_key_info",this.nB,this);this.LB.Y("html5_enable_vp9_fairplay")&&R.subscribe("qualitychange",this.I0,this);R.subscribe("sabrlicenseconstraint",this.p_,this);w=this.mediaKeys;lb(R,{createkeysession:1});R.status="gr";u$("drm_gk_s",void 0,R.videoData.pB);R.url=hcr(R);R.LB.Tk().L.vS(r5H)&&R.F9?.L&&R.F9?.licenseRequest? (R.G=R.F9.L,H__(R,R.F9.L,R.F9,R.F9.certificate),qd(R,R.F9.licenseRequest,"license-request")):(R.G=wad(R,w,R.F9?.certificate),g.K(R,R.G))}U0(R){this.cS()||(this.C({onnelcswhb:1}),R&&!this.heartbeatParams&&(this.heartbeatParams=R,this.publish("heartbeatparams",R)))}Qk(){this.cS()||(this.C({newlcssn:1}),this.G.shift(),this.O0=!1,Or(this))}q0(){if(ZM(this.L)&&(this.C({onsnrdy:1}),this.PS--,this.PS===0)){var R=this.S;R.element?.msSetMediaKeys?.(R.C)}}ol(R){if(!this.cS()){this.jI||(this.jI=!0,this.LB.dn()&& tfx(this));this.C({onksch:1});var w=this.I0;if(!Av(R)&&g.gx&&R.C.keySystem==="com.microsoft.playready"&&navigator.requestMediaKeySystemAccess)var p="large";else{p=[];var r=!0;if(Av(R))for(const G of Object.keys(R.L))R.L[G].status==="usable"&&p.push(R.L[G].type),R.L[G].status!=="unknown"&&(r=!1);if(!Av(R)||r)p=R.O;p=fEd(p);R.LB.Tk().L.vS(LG)&&R.F9?.certificate&&p<="large"&&R.O.length===0&&lb(R,{best_qual:p},!0)}w.call(this,p);if(R.LB.Y("html5_enable_vp9_fairplay")&&R.C.L())var f=R.X;else{if(!Av(R)){w= {};for(f of R.O)C8r(R,f,w)}f=R.authorizedFormats}this.videoData.authorizedFormats=f;this.publish("keystatuseschange",R)}}YY(R,w){this.cS()||this.publish("ctmp",R,w)}nB(R,w){this.cS()||this.publish("fairplay_next_need_key_info",R,w)}Cq(R,w,p,r){this.cS()||(this.videoData.Y("html5_log_drm_metrics_on_error")&&tfx(this),this.publish("licenseerror",R,w,p,r))}wM(){this.LB.Tk().L.vS(LG)&&this.F9?.certificate&&this.C({lic_qual_cap:this.D.L},!0);return this.D}I0(R){const w=g.qJ("auto",R,!1,"l");if(this.videoData.HX){if(this.D.equals(w))return}else if(Egr(this.D, R))return;this.D=w;this.publish("qualitychange");this.C({updtlq:R})}p_(R){this.videoData.sabrLicenseConstraint=R}Gy(){this.L.keySystemAccess&&this.element&&!this.mediaElement?.kY?.lB()&&(this.X?this.element.setMediaKeys(null).catch(g.AO):this.element.setMediaKeys(null));this.element=null;this.G=[];for(const R of this.O.values())R.unsubscribe("ctmp",this.YY,this),R.unsubscribe("keystatuseschange",this.ol,this),R.unsubscribe("licenseerror",this.Cq,this),R.unsubscribe("newlicense",this.U0,this),R.unsubscribe("newsession", this.Qk,this),R.unsubscribe("sessionready",this.q0,this),R.unsubscribe("fairplay_next_need_key_info",this.nB,this),this.LB.Y("html5_enable_vp9_fairplay")&&R.unsubscribe("qualitychange",this.I0,this),R.dispose();this.O.clear();this.J.removeAll();this.U.removeAll();this.heartbeatParams=null;super.Gy()}TK(){const R={systemInfo:this.L.TK(),sessions:[]};for(const w of this.O.values())R.sessions.push(w.TK());return R}getInfo(){return this.O.size<=0?"no session":`${this.O.values().next().value.getInfo()}${this.K? "/KR":""}`}C(R,w=!1){this.cS()||(Ro(R),(this.LB.dn()||w)&&this.publish("ctmp","drmlog",R))}eI(){let R=void 0,w=void 0;for(const p of this.O.values())R||(R=saY(p,"SD")),w||(w=saY(p,"AUDIO"));this.C({sd:R,audio:w});return R==="output-restricted"||w==="output-restricted"}};var WbV=class extends g.f5{constructor(R){super();this.CB=R;this.E8=0;this.C=this.K=!1;this.G=0;this.zy=this.CB.V();this.videoData=this.CB.getVideoData();this.O=g.Iq(this.zy.experiments,"html5_delayed_retry_count");this.L=new g.vZ(()=>{this.CB.yG()},g.Iq(this.zy.experiments,"html5_delayed_retry_delay_ms")); g.K(this,this.L)}Rf(){return!!this.E8}lq(){return this.C}handleError(R){c56(this,R);if((R.errorCode!=="html5.invalidstate"&&R.errorCode!=="fmt.unplayable"&&R.errorCode!=="fmt.unparseable"||!KG(this,R.errorCode,R.details))&&!$UP(this,R)&&!Xad(this)){if(this.zy.pB!=="yt"&&aEI(this,R)&&this.videoData.Nl&&(0,g.T)()/1E3>this.videoData.Nl&&O_(this.videoData)){var w=Object.assign({e:R.errorCode},R.details);w.stalesigexp="1";w.expire=Math.round(this.videoData.Nl*1E3);w.init=Math.round(this.videoData.JB); w.now=Math.round((0,g.T)());R=new g.pq(R.errorCode,w,2);this.CB.A$(R.errorCode,2,"SIGNATURE_EXPIRED",Ro(R.details))}if(wu(R.severity)){w=this.CB.loader?.Nl();let r;if(this.zy.Y("html5_use_network_error_code_enums"))if(P8I(R)&&w&&w.isLocked())var p="FORMAT_UNAVAILABLE";else this.zy.J||R.errorCode!=="auth"||R.details.rc!==429?R.errorCode==="ump.spsrejectfailure"&&(p="HTML5_SPS_UMP_STATUS_REJECTED"):(p="TOO_MANY_REQUESTS",r="6");else P8I(R)&&w&&w.isLocked()?p="FORMAT_UNAVAILABLE":this.zy.J||R.errorCode!== "auth"||R.details.rc!=="429"?R.errorCode==="ump.spsrejectfailure"&&(p="HTML5_SPS_UMP_STATUS_REJECTED"):(p="TOO_MANY_REQUESTS",r="6");this.CB.A$(R.errorCode,R.severity,p,Ro(R.details),r)}else this.CB.publish("nonfatalerror",R),p=/^pp/.test(this.videoData.clientPlaybackNonce),this.K$(R.errorCode,R.details),p&&R.errorCode==="manifest.net.connect"&&(R=`https://www.youtube.com/generate_204?cpn=${this.videoData.clientPlaybackNonce}&t=${(0,g.T)()}`,p7(R,"manifest",r=>{this.Ty("pathprobe",r)},r=>{this.K$(r.errorCode, r.details)}))}}Ty(R,w){this.CB.HB.Ty(R,w)}K$(R,w){w=Ro(w); this.CB.HB.K$(R,w)}};var F1I=class{constructor(R,w,p,r,f){this.L=R;this.reason=w;this.C=p;this.source=r;this.token=f}};var x6i=class{constructor(R,w,p,r){this.LB=R;this.DQ=w;this.CB=p;this.BB=r;this.U=this.J=this.L=this.G=this.D=this.C=0;this.K=!1;this.X=g.Iq(this.LB.experiments,"html5_displayed_frame_rate_downgrade_threshold")||45;this.O=new Map}b1(R){const w=nWb(this);if(!R)return{dQ:$Q,uQ:$Q,uO:$Q,qm:$Q,mJ:$Q,qs:$Q,Ns:w};let p=$Q;if(bk(w)||this.Y("html5_perf_cap_override_sticky"))p=cF(this,R);return{dQ:p,uQ:YgD(this,R),uO:dUd(this,R),qm:el(this,R.videoData),mJ:Md(this,R.videoData,R),qs:aZ(this,R),Ns:w}}Hj(R){if(g.I1(this.LB)&& aT(this.LB.K,du.HEIGHT))var w=R.L.videoInfos[0].video.qualityOrdinal;else{var p=this.r4(R.L.L());eG(R.videoData)||rH(R.videoData);R=R.L.videoInfos;if(R.length){var r=.85,f=R[0].video;f.projectionType!=="MESH"&&f.projectionType!=="EQUIRECTANGULAR"&&f.projectionType!=="EQUIRECTANGULAR_THREED_TOP_BOTTOM"||MU||(r=.45);f=g.Iq(this.LB.experiments,"html5_viewport_undersend_maximum");for(let G=0;G{this.VP()}}; this.VP=()=>{this.jsErrorCount++}; g.K(this,this.delay);window.addEventListener("error",this.VP);window.addEventListener("unhandledrejection",this.VP)}kK(){const R=g.g9(this.provider);this.L<0&&(this.L=R,this.delay.start());this.G=this.C=R}onError(R){if(R!=="player.fatalexception"||this.provider.Y("html5_exception_to_health"))R==="sabr.fallback"&&(this.encounteredSabrFallback=!0),R.match(lSt)?this.networkErrorCount++:this.nonNetworkErrorCount++}send(){if(!(this.O||this.L<0)){Hbd(this);var R=g.g9(this.provider)-this.L,w="PLAYER_PLAYBACK_STATE_UNKNOWN", p=this.playerState.Yu;this.playerState.isError()?w=p&&p.errorCode==="auth"?"PLAYER_PLAYBACK_STATE_UNKNOWN":"PLAYER_PLAYBACK_STATE_ERROR":this.playerState.L(2)?w="PLAYER_PLAYBACK_STATE_ENDED":this.playerState.L(64)?w="PLAYER_PLAYBACK_STATE_UNSTARTED":this.playerState.L(16)||this.playerState.L(32)?w="PLAYER_PLAYBACK_STATE_SEEKING":this.playerState.L(1)&&this.playerState.L(4)?w="PLAYER_PLAYBACK_STATE_PAUSED_BUFFERING":this.playerState.L(1)?w="PLAYER_PLAYBACK_STATE_BUFFERING":this.playerState.L(4)?w= "PLAYER_PLAYBACK_STATE_PAUSED":this.playerState.L(8)&&(w="PLAYER_PLAYBACK_STATE_PLAYING");p=wib[Q0(this.provider.videoData)];a:switch(this.provider.LB.playerCanaryState){case "canary":var r="HTML5_PLAYER_CANARY_TYPE_EXPERIMENT";break a;case "holdback":r="HTML5_PLAYER_CANARY_TYPE_CONTROL";break a;default:r="HTML5_PLAYER_CANARY_TYPE_UNSPECIFIED"}var f=hmd(this.provider),G=this.C<0?R:this.C-this.L;R=this.provider.LB.B1+36E5<(0,g.T)();w={started:this.C>=0,stateAtSend:w,joinLatencySecs:G,jsErrorCount:this.jsErrorCount, playTimeSecs:this.playTimeSecs,rebufferTimeSecs:this.rebufferTimeSecs,seekCount:this.seekCount,networkErrorCount:this.networkErrorCount,nonNetworkErrorCount:this.nonNetworkErrorCount,playerCanaryType:r,playerCanaryStage:f,isAd:this.provider.videoData.isAd(),liveMode:p,hasDrm:!!g.Tq(this.provider.videoData),isGapless:this.provider.videoData.D,isServerStitchedDai:this.provider.videoData.enableServerStitchedDai,encounteredSabrFallback:this.encounteredSabrFallback,isSabr:Qk(this.provider.videoData)}; R||g.Rv("html5PlayerHealthEvent",w);this.O=!0;this.dispose()}}Gy(){this.O||this.send();window.removeEventListener("error",this.VP);window.removeEventListener("unhandledrejection",this.VP);super.Gy()}},lSt=/\bnet\b/;var qia=class{constructor(R){this.provider=R;this.U=!1;this.C=0;this.G=-1;this.Fv=NaN;this.O=0;this.segments=[];this.D=this.J=0;this.previouslyEnded=!1;this.K=0;this.qS=this.jN=void 0;this.Xf={H30:()=>this.jN, AjY:()=>this.qS}; this.pB=this.provider.CB.getVolume();this.X=this.provider.CB.isMuted()?1:0;this.L=Xw(this.provider)}update(){if(this.U){var R=this.Lh()||0,w=g.g9(this.provider);R>=this.provider.CB.getDuration()-.1&&(this.previouslyEnded=!0);if(R!==this.C||UUr(this,R,w)){var p;if(!(p=Rw-this.Fv+2||UUr(this,R,w))){{p=this.provider.CB.getVolume();const r=p!==this.pB,f=this.provider.CB.isMuted()?1:0;f!==this.X?(this.X=f,p=!0):(!r||this.G>=0||(this.pB=p,this.G=w),p=w-this.G,this.G>=0&&p>2?(this.G=-1, p=!0):p=!1)}}p&&(nG(this),this.O=R);this.Fv=w;this.C=R}}}Lh(){const R=this.provider.CB.Lh();return c4(this.provider.videoData)||this.provider.LB.Tk().L.vS(E1D)?R+this.provider.CB.vB():R}};var frl=class{constructor(R,w,p,r){this.LB=w;this.ag=p;this.segments=[];this.experimentIds=[];this.nB=this.f_=this.isFinal=this.delayThresholdMet=this.SI=this.ez=this.autoplay=this.autonav=!1;this.Mr="yt";this.J=[];this.D=this.X=null;this.p_=this.sendVisitorIdHeader=this.U0=!1;this.U=this.pageId="";this.Af=!1;this.K=p==="watchtime";this.O=p==="playback";this.O0=p==="atr";this.wB=p==="engage";this.sendVisitorIdHeader=!1;this.uri=this.O0?`/api/stats/${p}`:"//"+w.J6+"/api/stats/"+p;r&&(this.f_=r.fs, r.rtn&&(this.D=r.rtn),this.K?(this.playerState=r.state,r.rti>0&&(this.X=r.rti)):(this.GE=r.mos,this.Pw=r.volume,r.at&&(this.adType=r.at)),r.autonav&&(this.autonav=r.autonav),r.inview!=null&&(this.yh=r.inview),r.size&&(this.cB=r.size),r.playerwidth&&(this.Nl=r.playerwidth),r.playerheight&&(this.uo=r.playerheight));this.Df=g.ht(w.L);this.U=Sz(w.experiments,"html5_log_vss_extra_lr_cparams_freq");if(this.U==="all"||this.U==="once")this.mq=g.ht(w.p_);this.h8=w.GE;this.experimentIds=BPd(w.experiments); this.YY=w.pL;this.Mr=w.pB;this.region=w.region;this.userAge=w.userAge;this.q0=w.kF;this.pL=r1();this.sendVisitorIdHeader=w.sendVisitorIdHeader;this.I0=w.Y("vss_pings_using_networkless")||w.Y("kevlar_woffle");this.B1=w.Y("vss_final_ping_send_and_write");this.M0=w.Y("vss_use_send_and_write");this.pageId=w.pageId;this.Nk=w.Y("vss_playback_use_send_and_write");w.livingRoomAppMode&&(this.livingRoomAppMode=w.livingRoomAppMode);g.zI(w)&&(this.jI=w.I0);g.En(g.xW(w))&&this.J.push(1);this.accessToken=R.J(); R.Kc[this.ag]?this.G=R.Kc[this.ag]:R.Kc.playback&&(this.G=R.Kc.playback);this.adFormat=R.adFormat;this.adQueryId=R.adQueryId;this.autoplay=AC_(R);this.O&&(this.ez=R.oA&&SG(R)==="adunit"?!0:!1);this.autonav=R.isAutonav||this.autonav;this.contentVideoId=uX(R);this.clientPlaybackNonce=R.clientPlaybackNonce;this.SI=R.h$;R.iI&&(this.S=R.iI,this.eI=R.u8);R.mdxEnvironment&&(this.mdxEnvironment=R.mdxEnvironment);this.L=R.ag;this.GC=R.GC;R.C&&(this.Ml=R.C.itag,R.G&&R.G.itag!==this.Ml&&(this.N0=R.G.itag)); R.L&&oT(R.L)&&(this.offlineDownloadUserChoice="1");this.eventLabel=SG(R);this.nB=R.WB?!1:R.Af;this.MH=R.M9;if(w=Q0(R))this.wg=w;this.a9=R.Bk;this.partnerId=R.partnerId;this.eventId=R.eventId;this.playlistId=R.bX||R.playlistId;this.X8=R.X8;this.rS=R.rS;this.Vf=R.Vf;this.OO=R.OO;this.subscribed=R.subscribed;this.videoId=R.videoId;this.videoMetadata=R.videoMetadata;this.visitorData=R.visitorData;this.osid=R.osid;this.OA=R.OA;this.referrer=R.referrer;this.oo=R.Z8||R.oo;this.Qk=R.t6;this.V6=R.V6;this.userGenderAge= R.userGenderAge;this.qz=R.qz;this.embedsRct=R.embedsRct;this.embedsRctn=R.embedsRctn;g.zI(this.LB)&&R.mutedAutoplay&&(R.mutedAutoplayDurationMode===2&&R.limitedPlaybackDurationInSeconds===0&&R.endSeconds===0?this.J.push(7):this.J.push(2));R.isEmbedsShortsMode(new g.dg(this.Nl,this.uo),!!this.playlistId)&&this.J.push(3);g.Ir(R)&&this.J.push(4);this.PS=R.gz;R.compositeLiveIngestionOffsetToken&&(this.compositeLiveIngestionOffsetToken=R.compositeLiveIngestionOffsetToken);this.heartbeatLoggingToken=R.heartbeatLoggingToken; R=R.getPlayerResponse();this.Af=this.LB.Y("html5_switch_vss_to_post")||!!R?.playerConfig?.vssClientConfig?.vssUsePostRequest}send(R){if(!this.U0){var w=Sh(this),p=g.bu(this.uri,w);this.LB.Y("vss_through_gel_double")&&Sgb(p);this.O0&&!this.LB.Y("html5_simplify_pings")?R2I(this,p):di(this,R).then(r=>{if(this.Af){r=r||{};r.method="POST";const f=w4d(this);f&&(r.postParams={form_data:f})}this.O0&&(r=r||{},r.method="POST",r.postParams={atr:this.attestationResponse});jU(p,r,{token:this.S,Zj:this.eI,mdxEnvironment:this.mdxEnvironment}, this.LB,R,this.I0,this.isFinal&&this.B1||this.M0||this.O&&this.Nk)}); this.U0=!0}}C(R){R===void 0&&(R=NaN);return Number(R.toFixed(3)).toString()}},c0r={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},MgP={EMBEDDED_PLAYER_MODE_UNKNOWN:0,EMBEDDED_PLAYER_MODE_DEFAULT:1,EMBEDDED_PLAYER_MODE_PFP:2,EMBEDDED_PLAYER_MODE_PFL:3};var xrd=class extends g.f5{constructor(R){super();this.provider=R;this.X="paused";this.K=NaN;this.O0=[10,10,10,40];this.I0=this.pB=0;this.Jl=this.PS=this.jI=this.M0=this.G=!1;this.O=this.C=NaN;this.logger=new g.Q6("vss");this.Xf={QqY:()=>this.L}; this.L=new qia(R)}kK(){if(!this.G){this.provider.videoData.Ro===16623&&g.AO(Error("Playback for EmbedPage"));var R=Zu(this,"playback");this.O0=GqP(this);kId(this.L);R.D=Yn(this);this.O>0&&(R.L-=this.O);R.send();if(this.provider.videoData.JX){R=this.provider.LB;var w=this.provider.videoData;const p={html5:"1",video_id:w.videoId,cpn:w.clientPlaybackNonce,ei:w.eventId,ptk:w.JX,oid:w.uZ,ptchn:w.ai,pltype:w.WU,content_v:uX(w)};w.VF&&Object.assign(p,{m:w.VF});R=g.bu(R.ZI+"ptracking",p);Fw(this,R)}this.provider.videoData.GC|| (uEI(this),sul(this));this.G=!0;R=this.L;R.C=R.Lh();R.Fv=g.g9(R.provider);!(R.O===0&&R.C<5)&&R.C-R.O>2&&(R.O=R.C);R.U=!0}}J(){g.a2(this.K);this.K=NaN}D(R=!1){nG(this.L,R)}S(){this.L.update();var R=this.L;R.segments.length&&R.C===R.O||nG(R);const w=R.segments;R.segments=[];R.K=0;return w}U0(R){var w=this.L,p=R.qS;w.jN=R.jN;w.qS=p}U(R,w=!1){const p=Irr(this,this.S());!isNaN(this.C)&&R&&(p.X=this.C);w&&(p.p_=!0);return p}onProgress(){this.L.update();CXW(this)&&(uEI(this),sul(this))}xY(R){if(!this.cS())if(R.state.L(2)|| R.state.L(512)){if(this.X="paused",R.TE(2)||R.TE(512))R.TE(2)&&(this.L.previouslyEnded=!0),this.G&&(this.J(),jl(this).send(),this.C=NaN)}else if(R.state.L(8)){this.X="playing";const w=this.G&&isNaN(this.K)?Yn(this):NaN;if(!isNaN(w)&&(cs(R,64)<0||cs(R,512)<0)){const p=this.U(!1);p.D=w;p.send()}R.TE(16)&&R.state.seekSource===58&&(this.L.previouslyEnded=!0)}else this.X="paused"}Gy(){super.Gy();this.J();NNI(this.L)}TK(){return Sh(Zu(this,"playback"))}h3(R){const w=Zu(this,"engage");w.xY=R;return p4Y(w, z2P(this.provider))}YY(){const R=this.L.K,w=this.provider.LB.Tk().L.vS(WxW)||4E3;R>w&&this.U(!isNaN(this.C)).send()}nB(){this.pB=0}};var WFd=class{constructor(){this.endTime=this.startTime=-1;this.O="-";this.playbackRate=1;this.visibilityState=0;this.audioId="";this.volume=this.connectionType=this.C=0;this.muted=!1;this.L=this.clipId="-";this.G=this.previouslyEnded=!1}isEmpty(){return this.endTime===this.startTime}};var lrb=class{constructor(R,w,p){this.videoData=R;this.LB=w;this.CB=p;this.L=void 0}Y(R){return this.LB.Y(R)}getCurrentTime(){return this.CB.getCurrentTime()}Lh(){return this.CB.Lh()}},Bsd={other:1,none:2,wifi:3,cellular:7,ethernet:30};g.c3=class extends g.f5{constructor(R){super();this.provider=R;this.O=new Map;this.Rb=new g.Gf;this.Xf={k3N:()=>this.qoe, xHY:()=>this.L, Mu0:()=>this.C}; this.provider.videoData.n$()&&!this.provider.videoData.Hw&&(this.L=new xrd(this.provider),this.L.O=0,g.K(this,this.L),this.qoe=new g.Db(this.provider),g.K(this,this.qoe),this.provider.videoData.enableServerStitchedDai&&(this.Rq=this.provider.videoData.clientPlaybackNonce)&&this.O.set(this.Rq,this.L));if(R.LB.playerCanaryState==="canary"||R.LB.playerCanaryState==="holdback")this.C=new Lbi(this.provider),g.K(this,this.C)}kK(){this.L&&this.L.kK();this.C&&this.C.kK()}onProgress(){if(this.provider.videoData.enableServerStitchedDai&& this.Rq)this.O.get(this.Rq)?.onProgress();else if(this.L)this.L.onProgress()}SN(R){this.qoe&&this.qoe.SN(R)}QS(R,w){this.qoe&&this.qoe.QS(R,w)}vX(){this.provider.videoData.enableServerStitchedDai&&this.Rq?this.O.get(this.Rq)?.D():this.L&&this.L.D()}K$(R,w){this.qoe&&r2H(this.qoe,R,w);if(this.C)this.C.onError(R)}O2(R,w){switch(R){case "M":this.qoe?.O2(R,w);break;case "A":this.qoe?.O2(R)}}onPlaybackRateChange(R){if(this.qoe)this.qoe.onPlaybackRateChange(R);this.L&&this.L.D()}Ty(R,w,p){this.qoe&&this.qoe.Ty(R, w,p)}UV(R,w,p){this.qoe&&this.qoe.UV(R,w,p)}hc(R){this.qoe?.hc(R)}Dp(R){this.qoe?.Dp(R)}uf(R,w,p,r){this.qoe?.uf(R,w,p,r)}zG(R){this.qoe&&this.qoe.zG(R)}DM(R,w,p){this.qoe&&this.qoe.DM(R,w,p)}yp(){if(this.qoe)return this.qoe.yp()}TK(){return this.provider.videoData.enableServerStitchedDai&&this.Rq?this.O.get(this.Rq)?.TK()??{}:this.L?this.L.TK():{}}R7(){return this.qoe?.R7()}Hc(R,w){this.qoe?.Hc(R,w)}h3(R){return this.L?this.L.h3(R):()=>{}}getVideoData(){return this.provider.videoData}resume(){this.qoe&& this.qoe.resume()}}; g.c3.prototype.QI=pd(49);g.c3.prototype.NO=pd(32);g.c3.prototype.g_=pd(26);g.c3.prototype.hp=pd(20);var AtV=class{constructor(){this.M8=0;this.G=this.O=this.xO=this.N3=this.C=NaN;this.L={};this.bandwidthEstimate=NaN}};var bRi=class{constructor(){this.L=g.A6;this.array=[]}};g.P3=class extends g.f5{constructor(R,w){super();this.CB=R;this.D=w;this.O=NaN;this.K=this.J=this.started=!1;this.C=[];this.U=new g.vZ(this.sync,250,this);g.K(this,this.U);this.G=new g.vZ(this.sync,0,this);g.K(this,this.G);this.L=new bRi}C3(R,w){this.sync();w&&this.L.array.length>=2E3&&this.zC("captions",1E4);w=this.L;if(R.length>1&&R.length>w.array.length)w.array=w.array.concat(R),w.array.sort(w.L);else for(const p of R)!w.array.length||w.L(p,w.array[w.array.length-1])>0?w.array.push(p):g.KR(w.array, p,w.L);this.O=NaN;this.sync()}LS(R){R.length>1E4&&g.AO(new g.Id("Over 10k cueRanges removal occurs with a sample: ",R[0]));if(!this.cS()){var w=new Set(R);this.C=this.C.filter(p=>!w.has(p)); Oad(this.L,w);this.sync()}}h_(R){if(!this.cS()){var w=this.D5().find(p=>p.id===void 0&&p.namespace===R); w&&this.LS([w])}}zC(R,w){const p=(isNaN(this.O)?KFd(this):this.O)-w;w=this.D5().filter(r=>r.namespace===R&&r.endp.namespace===R); this.LS(w);return w}bT(R){let w=[];var p=ib(this.L,0x7ffffffffffff);const r=[];for(const f of p)f.active&&R===f.associatedClipId&&r.push(f);w=w.concat(QN(this,r));hv(this,w);w=[];p=[];for(const f of this.C)f.active&&f.associatedClipId===R&&f.start===0x7ffffffffffff&&p.push(f);w=w.concat(gi(this,p));hv(this,w);return r.length}UN(R){const w=ib(this.L,0x7ffffffffffff),p=[];for(const r of w)r.active&&R===r.associatedClipId&&p.push(r);this.LS(p)}sync(){this.K=!0;if(!this.J){for(var R=3;this.K&&R;)this.K= !1,this.J=!0,Eox(this),this.J=!1,R--;this.CB.getPlayerState().isPlaying()&&(R=tGd(this.L,this.O),!isNaN(R)&&R<0x7ffffffffffff&&(R=(R-this.O)/this.CB.getPlaybackRate(),this.G.start(R)))}}isEnded(R,w){w=this.CB.Ev()*1E3-w;w=this.CB.eb()&&R.L(1)&&w<500;return R.L(2)||this.CB.V().Y("html5_pseudogapless_shorts")&&w}Gy(){this.C=[];this.L.array=[];super.Gy()}};g.P3.prototype.lC=pd(38);var ytb=class{constructor(R){this.LB=R;this.O=this.C=this.mediaTime=NaN;this.G=this.L=!1;this.K=.001;g.I1(R)&&(this.K=.01)}};var Dr6=class{constructor(R,w){this.videoData=R;this.L=w}};var VPP=class{constructor(R){this.data=window.Float32Array?new Float32Array(R):Array(R);this.C=this.L=R-1}add(R){this.L=(this.L+1)%this.data.length;this.data[this.L]=R}O(){return this.data[this.L]||0}forEach(R){for(var w=this.L+1;wthis.L,f=w.L(8)&&w.L(16),G=this.CB.Z5().isBackground()||w.isSuspended();wo(this,this.nB,f&&!G,r,"qoe.slowseek",()=>{},"timeout"); var I=isFinite(this.L);I=f&&I&&iMH(R,this.L);var C=!p||Math.abs(p-this.L)>10,u=this.LB.Y("html5_exclude_initial_sabr_live_dvr_seek_in_watchdog"),m=p===0&&this.C&&[11,10].includes(this.C);wo(this,this.U0,I&&C&&!G&&(!u||!m),r,"qoe.slowseek",()=>{R.seekTo(this.L)},"set_cmt"); C=I&&JC(R.po(),this.L);var z=this.CB.loader;I=!z||z.rA();var B=()=>{R.seekTo(this.L+.001)}; wo(this,this.M0,C&&I&&!G,r,"qoe.slowseek",B,"jiggle_cmt");I=()=>this.CB.yG(); wo(this,this.jI,C&&!G,r,"qoe.slowseek",I,"new_elem");var W=fn(w);m=w.isBuffering();var x=R.po(),q=ji(x,p),O=q>=0&&x.end(q)>p+5;C=W&&m&&O;u=this.CB.getVideoData();wo(this,this.Jl,p<.002&&this.L<.002&&f&&g.I1(this.LB)&&g.Rr(u)&&!G,r,"qoe.slowseek",I,"slow_seek_shorts");wo(this,this.X,u.uB()&&f&&!G&&!u.U,r,"qoe.slowseek",I,"slow_seek_gapless_shorts");wo(this,this.pB,C&&!G,W&&!m,"qoe.longrebuffer",B,"jiggle_cmt");wo(this,this.S,C&&!G,W&&!m,"qoe.longrebuffer",I,"new_elem_nnr");if(z){const c=z.getCurrentTime(); f=R.K();f=PMD(f,c);f=!z.isSeeking()&&p===f;wo(this,this.mq,W&&m&&f&&!G,W&&!m&&!f,"qoe.longrebuffer",()=>{R.seekTo(c)},"seek_to_loader")}f={}; B=ji(x,Math.max(p-3.5,0));var e=B>=0&&p>x.end(B)-1.1,P=B>=0&&B+1=0&&e&&P<11;f.close2edge=e;f.gapsize=P;f.buflen=x.length;this.C&&(f.seekSour=this.C);wo(this,this.xY,W&&m&&!G,W&&!m,"qoe.longrebuffer",()=>{},"timeout",f); f=w.isSuspended();f=this.CB.jf()&&!f;wo(this,this.D,f,!f,"qoe.start15s",()=>{this.CB.lr("ad")},"ads_preroll_timeout"); f=this.LB.experiments.XB("html5_use_playback_rate_in_skip_slow_ad")?this.CB.getPlaybackRate()*1E3:1E3;q=p-this.G{var c=this.CB;const X=c.Wy.getVideoData();(!X||!c.videoData.isAd()||X.iU!==c.getVideoData().iU)&&c.videoData.b4||c.A$("ad.rebuftimeout",2,"RETRYABLE_ERROR",`skipslad.vid.${c.videoData.videoId}`)}; wo(this,this.N0,e,!e,"ad.rebuftimeout",f,"skip_slow_ad");q=B&&m&&JC(R.po(),p+5)&&q;wo(this,this.eI,q&&!G,!q,"ad.rebuftimeout",f,"skip_slow_ad_buf");f=w.isOrWillBePlaying()&&w.L(64)&&!G;wo(this,this.SI,f,r,"qoe.start15s",()=>{},"timeout"); z=!!z&&!z.un&&w.isOrWillBePlaying();wo(this,this.O0,z,r,"qoe.start15s",I,"newElemMse");z=hC(x,0);x=w.L(16)||w.L(32);z=!G&&w.isOrWillBePlaying()&&m&&!x&&(w.L(64)||p===0)&&z>5;wo(this,this.YY,z,W&&!m,"qoe.longrebuffer",()=>{this.CB.nX()},"reset_media_source"); wo(this,this.PS,z,W&&!m,"qoe.longrebuffer",I,"reset_media_element");this.G===0&&(this.J=p);z=m&&this.L===0&&p>1&&p===this.J;wo(this,this.I0,g.Rr(u)&&z,W&&!m,"qoe.slowseek",()=>{R.seekTo(0)},"reseek_after_time_jump"); G=w.isOrWillBePlaying()&&!G;O=this.CB.Ev()-p<6&&!O&&this.CB.eb();wo(this,this.U,u.uB()&&G&&m&&O,W&&!m,"qoe.longrebuffer",()=>{this.CB.yG(!1,!0)},"handoff_end_long_buffer_reload"); G=this.C===104||this.CB.HA;w=Dr(u)&&u.isAd()&&!u.U&&G&&(m||w.L(8)&&w.L(16));wo(this,this.Qk,w,r,"qoe.start15s",I,"gapless_ad_slow_start");w=Dr(u)&&!u.U&&G&&C;wo(this,this.q0,w,r,"qoe.longrebuffer",I,"gapless_slow_start");this.G=p;this.K.start()}}K$(R,w,p){w=this.TK(w);w.wn=p;w.wdup=this.O[R]?"1":"0";this.CB.K$(new g.pq(R,w));this.O[R]=!0}TK(R){R=Object.assign(this.CB.TK(!0),R.TK());this.L&&(R.stt=this.L.toFixed(3));this.CB.getVideoData().isLivePlayback&&(R.ct=this.CB.getCurrentTime().toFixed(3),R.to= this.CB.vB().toFixed(3));delete R.uga;delete R.euri;delete R.referrer;delete R.fexp;delete R.vm;return R}},Sl=class{constructor(R,w=!1){this.J=w;this.L=this.C=this.O=this.startTimestamp=0;this.G=!1;this.K=Math.ceil(R/1E3)}reset(){this.L=this.C=this.O=this.startTimestamp=0;this.G=!1}test(R){if(!this.K||this.C)return!1;if(!R)return this.reset(),!1;R=(0,g.T)();if(!this.startTimestamp)this.startTimestamp=R,this.O=0;else if(this.O>=this.K)return this.C=R,!0;this.O+=1;return!1}TK(){const R={},w=(0,g.T)(); this.startTimestamp&&(R.wsd=(w-this.startTimestamp).toFixed());this.C&&(R.wtd=(w-this.C).toFixed());this.L&&(R.wssd=(w-this.L).toFixed());return R}};var Kbi=class extends g.f5{constructor(R){super();this.CB=R;this.U=this.L=this.loader=this.mediaElement=this.playbackData=null;this.O=0;this.K=this.xY=this.G=null;this.I0=!1;this.mq=0;this.S=!1;this.timestampOffset=0;this.X=!0;this.YY=0;this.U0=this.f_=!1;this.D=0;this.q0=!1;this.jI=this.O0=0;this.LB=this.CB.V();this.videoData=this.CB.getVideoData();this.policy=new ORP;this.pB=new tPP(this.CB);this.eI=this.PS=this.Jl=this.J=this.C=NaN;this.M0=new g.vZ(()=>{X46(this,!1)},2E3); this.p_=new g.vZ(()=>{ro(this)}); this.nB=new g.vZ(()=>{Y_d(this,{})}); this.SI=NaN;this.N0=new g.vZ(()=>{var w=this.LB.L2;w.L+=1E4/36E5;w.L-w.O>1/6&&($XL(w),w.O=w.L);this.N0.start()},1E4); g.K(this,this.pB);g.K(this,this.M0);g.K(this,this.nB);g.K(this,this.p_);g.K(this,this.N0)}setMediaElement(R){(this.mediaElement=R)?(this.mediaElement&&(this.K||this.O||!this.mediaElement.f_()||this.seekTo(.01,{dB:"seektimeline_setupMediaElement"})),ro(this)):CD(this)}getCurrentTime(R=!1){if(Gd(this.CB)){if(this.Y("html5_use_centralized_player_time")&&!R&&!isNaN(this.J))return this.J;if(!isNaN(this.C))return this.C}else{if(this.Y("html5_use_centralized_player_time")&&!R&&!isNaN(this.J)&&isFinite(this.J))return this.J; R=this.Y("html5_seek_refactor_bh_fix");if(!isNaN(this.C)&&(R||isFinite(this.C)))return this.C}return this.mediaElement&&nod(this)?this.mediaElement.getCurrentTime()+this.timestampOffset:this.O||0}qj(){return this.Qk}Lh(){return this.getCurrentTime()-this.vB()}aD(){return this.L?this.L.aD():Infinity}isAtLiveHead(R){if(!this.L)return!1;R===void 0&&(R=this.getCurrentTime());return Ur(this.L,R)}YK(){return!!this.L&&this.L.YK()}seekTo(R,{Z4:w=!1,PO:p=0,hK:r=!1,zr:f=0,dB:G="",seekSource:I,gE:C=!1,iq:u= !1,UY:m=!1}={}){C&&(R+=this.vB());Qk(this.videoData)&&I===29&&(this.Qk=void 0);C=R=this.p$())||!g.gs(this.videoData),B||(z={st:z,mst:this.p$()},this.L&&this.Y("html5_high_res_seek_logging")&&(z.ht=this.L.aD(),z.adft=kn(this.L)),this.CB.Ty("seeknotallowed",z)),z=B)}}if(!z)return this.G&&(this.G=null,m4(this)),g.FB(this.getCurrentTime());z=.005;u&&this.Y("html5_sabr_seek_no_shift_tolerance")&&(z=0);if(Math.abs(R-this.C)<=z&&this.I0)return this.K;this.Y("html5_reset_rate_limiter_on_user_seek")&&this.loader?.Ww();this.Y("html5_reset_backoff_on_user_seek")&&this.loader?.Pw();G&& (z=R,this.LB.dn()&&(G={reason:G,tgt:z},this.Y("html5_sabr_csdai_seek_log")&&(G.source=I),this.CB.Ty("seekreason",G)));I&&(this.pB.C=I);this.I0&&CD(this);this.K||(this.K=new aa);R&&!isFinite(R)&&IY(this,!1);(m=m||C)||(m=R,m=!(this.videoData.isLivePlayback&&this.videoData.O&&!this.videoData.O.L()&&!(this.mediaElement&&this.mediaElement.O()>0&&Rn(this.mediaElement)>0)||na(this.videoData)&&this.xN()===this.p$(!1)?0:isFinite(m)||!na(this.videoData)));m||(R=pD(this,R,r));R&&!isFinite(R)&&IY(this,!1);this.Y("html5_use_centralized_player_time")? this.J=R:this.C=this.O=R;this.YY=f;this.D=0;this.L&&arH(this.L,R,!1);r=this.CB;f=R;m={Z4:w,seekSource:I};r.Py.O=f;G=r.aK;G.mediaTime=f;G.L=!0;m.Z4&&r.oT(m);m=f>r.videoData.endSeconds&&f>r.videoData.limitedPlaybackDurationInSeconds;r.y7&&m&&isFinite(f)&&yn(r);f0&&Rw.start&&yn(this.CB);return this.K}p$(R){return this.videoData.isLivePlayback? this.videoData.I0()&&this.mediaElement?.isPaused()&&this.videoData.L?(R=this.getCurrentTime(),oiH(this.gg(R)*1E3)+R):this.Y("html5_sabr_parse_live_metadata_playback_boundaries")&&Qk(this.videoData)&&this.videoData.L?R?this.videoData.L.O0||0:this.videoData.L.M7||0:na(this.videoData)&&this.videoData.vF&&this.videoData.L?this.videoData.L.p$()+this.timestampOffset:this.videoData.O&&this.videoData.O.L()?!R&&this.L?this.L.aD():this.CB.videoData.p$()+this.timestampOffset:this.mediaElement?Ch()?oiH(this.mediaElement.jI().getTime()): Rn(this.mediaElement)+this.timestampOffset||this.timestampOffset:this.timestampOffset:this.CB.videoData.p$()}xN(){if(this.Y("html5_sabr_parse_live_metadata_playback_boundaries")&&Qk(this.videoData))return this.videoData.L?.VK||0;const R=this.videoData?this.videoData.xN()+this.timestampOffset:this.timestampOffset;if(this.videoData.I0()&&this.videoData.L){var w=Number(this.videoData.progressBarStartPosition?.utcTimeMillis)/1E3;if(!isNaN(w)&&(w=this.Tp(w),!isNaN(w)))return Math.max(R,w)}return R}SS(){this.K|| this.seekTo(this.O,{dB:"seektimeline_forceResumeTime_singleMediaSourceTransition",seekSource:15})}j5(){return this.I0&&!isFinite(this.C)}Gy(){uR(this,null);this.pB.dispose();super.Gy()}TK(){const R={};this.loader&&Object.assign(R,this.loader.TK());this.mediaElement&&Object.assign(R,this.mediaElement.TK());return R}L5(R){this.timestampOffset=R}getStreamTimeOffset(){return na(this.videoData)?0:this.videoData.L?this.videoData.L.getStreamTimeOffset():0}vB(){return this.timestampOffset}gg(R){return this.videoData&& this.videoData.L?this.videoData.L.gg(R-this.timestampOffset):NaN}Lw(){if(!this.mediaElement)return 0;if(H4(this.videoData)){var R=this.mediaElement,w=R.po();R=(QG(w)&&R.getDuration()?w.end(w.length-1):0)+this.timestampOffset-this.xN();w=this.p$()-this.xN();return Math.max(0,Math.min(1,R/w))}return this.mediaElement.Lw()}HT(R){this.U&&(this.U.L=R)}yx(R,w,p){this.CB.Ty("requestUtcSeek",{time:R});Qk(this.videoData)&&(this.Qk=R);this.loader?.yx(R,p);w&&(this.O0=w)}jx(R){Qk(this.videoData)&&(this.Qk=void 0); this.O0?(this.CB.Ty("utcSeekingFallback",{source:"streamTime",timeSeconds:this.O0}),this.CB.seekTo(this.O0,{dB:"utcSeekingFallback_streamTime"}),this.O0=0):(R=this.Tp(R),isNaN(R)||(this.CB.Ty("utcSeekingFallback",{source:"estimate",timeSeconds:R}),this.CB.seekTo(R,{dB:"utcSeekingFallback_estimate"})))}Vi(){this.O0=0}DB(R){this.jI=R}Tp(R){const w=this.getCurrentTime();if(isNaN(w))return NaN;const p=this.gg(w);return isNaN(p)?NaN:R-(p-w)}Y(R){return this.LB&&this.LB.Y(R)}},ORP=class{};var eVP=class extends g.f5{constructor(R){super();this.O=R;this.L=new Map;this.C=new g.vZ(this.sample,250,this);g.K(this,this.C);this.start()}start(){this.C.start()}stop(){this.C.stop()}clear(){for(const R of this.L.values())R.clear()}sample(){for(const [R,w]of this.O){const p=R,r=w;this.L.has(p)||this.L.set(p,new Ema(D6a.has(p)));this.L.get(p).update(r())}this.C.start()}},D6a=new Set(["networkactivity"]),Ema=class{constructor(R){this.C=R;this.L=NaN;this.buffer=new VPP(100)}update(R){this.C?(this.buffer.add(R- this.L||0),this.L=R):this.buffer.add(R)}clear(){this.buffer.clear();this.L=0}};var MPi=class{constructor(){this.finished=this.started=!1}OV(){return this.started}start(){this.started=!0}reset(){this.finished=this.started=!1}};var fwD=!1;var bgx=!1,qf=!1;g.oW=class extends g.HC{constructor(R,w,p,r,f,G,I,C,u,m=new g.ct(R),z=!0,B,W){super();this.LB=R;this.playerType=w;this.Jf=p;this.DQ=r;this.getVisibilityState=G;this.visibility=I;this.Wy=C;this.BB=u;this.videoData=m;this.SV=z;this.F9=B;this.zx=W;this.logger=new g.Q6("VideoPlayer");this.X9=null;this.LD=new Mj;this.y7=null;this.Ul=!0;this.un=this.loader=null;this.Ji=[];this.sI=new MPi;this.rb=this.hw=null;this.gR=new MPi;this.lS=null;this.VX=this.TJ=!1;this.iS=NaN;this.vU=!1;this.playerState=new g.Gf; this.YR=[];this.RR=new g.th;this.mediaElement=null;this.eg=this.q$=!1;this.b_=NaN;this.Cm=!1;this.wU=0;this.AR=!1;this.Tq=NaN;this.E8=0;this.loop=!1;this.playbackRate=1;this.vr=0;this.T7=!1;this.Pl=[];this.dO=this.Ri=0;this.q_=this.nF=!1;this.xO=this.N3=0;this.HA=!1;this.nV=this.u3=null;this.gb=()=>{var x=this.HB;x.provider.LB.Nl||x.provider.CB.getVisibilityState()===3||(x.provider.LB.Nl=!0);x.vX();if(x.C){var q=x.C;q.K&&q.L<0&&q.provider.CB.getVisibilityState()!==3&&gWd(q)}x.qoe&&(x=x.qoe,x.YY&& x.G<0&&x.provider.LB.Nl&&s0d(x),x.K&&H_(x));this.loader&&td(this);KD(this)}; this.Xf={ol:x=>{this.ol(x)}, tt0:x=>{this.X9=x}, PI0:()=>this.HB, j_:()=>this.un, VCY:()=>this.L6, H$B:()=>this.C6, kHN:()=>{}, V:()=>this.LB, XI:()=>this.mediaElement, aUY:x=>{this.nk(x)}, eQk:()=>this.DQ}; this.MS=new WbV(this);this.D1=new g.vZ(this.c5,15E3,this);this.sJ=new eVP(new Map([["bufferhealth",()=>sJ(this.Py)], ["bandwidth",()=>this.hv()], ["networkactivity",()=>this.BB.xY], ["livelatency",()=>this.isAtLiveHead()&&this.isPlaying()?EJ(this):NaN], ["rawlivelatency",()=>EJ(this)]])); this.Py=new Kbi(this);this.R6=new g.vZ(this.qI,0,this);this.Op=[this.RR,this.R6,this.D1,this.sJ];this.aK=new ytb(this.LB);this.Gv=new x6i(this.LB,this.DQ,this,this.BB);this.Co=new g.P3(this,(x,q)=>{x!==g.bp("endcr")||this.playerState.L(32)||this.Rz();f(x,q,this.playerType)}); g.K(this,this.Co);g.K(this,this.Py);Ogb(this,m);this.videoData.subscribe("dataupdated",this.wx,this);this.videoData.subscribe("dataloaded",this.M2,this);this.videoData.subscribe("dataloaderror",this.handleError,this);this.videoData.subscribe("ctmp",this.Ty,this);this.videoData.subscribe("ctmpstr",this.DY,this);!this.HB||this.HB.cS();this.HB=new g.c3(new lrb(this.videoData,this.LB,this));qmD(this.gb);this.visibility.subscribe("visibilitystatechange",this.gb);this.L6=new g.vZ(this.rJ,g.Iq(this.LB.experiments, "html5_player_att_initial_delay_ms")||4500,this);this.C6=new g.vZ(this.rJ,g.Iq(this.LB.experiments,"html5_player_att_retry_delay_ms")||4500,this);this.FH=new g.yV(this.BR,350,this);g.K(this,this.FH)}Gy(){g.$E(this.iS);Aab(this.gb);this.visibility.unsubscribe("visibilitystatechange",this.gb);q_b(this.HB);g.p5(this.HB);D$(this);g.YM.zm(this.b_);this.gY();this.rb=null;g.p5(this.videoData);g.p5(this.MS);g.p5(this.L6);g.p5(this.C6);g.rG(this.Op);this.y7=null;super.Gy()}DM(R,w,p,r){this.HB.DM(R,w,p);this.Y("html5_log_media_perf_info")&& this.Ty("adloudness",{ld:r.toFixed(3),cpn:R})}RM(){return this.loader?.RM()}Vo(){return this.loader?.Vo()}Bi(){return this.loader?.Bi()}Kx(){return this.loader?.Kx()}ph(){return this.videoData.ph()}lB(){return this.Y("html5_not_reset_media_source")&&this.videoData.isLivePlayback||this.Y("html5_not_reset_media_source_non_drm_vod")&&!this.videoData.isLivePlayback&&!this.videoData.ph()&&!this.videoData.uB()}Yc(){!this.videoData.D||this.Y("html5_disable_target_codec_family_for_gapless")&&Dr(this.videoData)|| (this.videoData.YU=this.videoData.YU||this.Wy.HS().RM(),this.videoData.FL=this.videoData.FL||this.Wy.HS().Vo());if(K7x(this.videoData)||!GZ(this.videoData)){var R=this.videoData.errorDetail;this.A$(this.videoData.errorCode||"auth",2,unescape(this.videoData.errorReason),R,R,this.videoData.S_||void 0)}this.Y("html5_generate_content_po_token")&&this.nZ();this.Q0();if(this.LB.experiments.Tk().L.vS(mol)){R=this.Ty;var w=this.LB;w.t8===null&&(w.t8=window.MediaSource&&window.MediaSource.isTypeSupported? window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42001E"; decode-to-texture=true'):!1);R.call(this,"dttg",{dtt:w.t8,gl:this.LB.supportsGaplessShorts()})}}getVideoData(){return this.videoData}V(){return this.LB}b1(){return this.Gv.b1(this.rb)}Z5(){return this.visibility}Ha(){return this.mediaElement&&this.mediaElement.J()?this.mediaElement.zk():null}XI(){return this.mediaElement}kO(){if(this.videoData.errorCode)return!1;this.V().J&&this.V().houseBrandUserStatus&&this.Ty("hbut",{status:this.V().houseBrandUserStatus}, !0);if(this.videoData.n$())return!0;this.A$("api.invalidparam",2,void 0,"invalidVideodata.1");return!1}R5(R=!1){R||TK(this.HB);this.TJ=R;!this.kO()||this.sI.OV()?Pd(this)&&this.sI.OV()&&!this.sI.finished&&!this.TJ&&this.M2():(this.sI.start(),R=this.HB,g.g9(R.provider),R.qoe&&CI6(R.qoe),R.provider.LB.Tk().L.vS(s9l)&&g.fh("cobalt")&&g.fh("android")&&(R=R.provider.videoData.clientPlaybackNonce)&&RcY(R),this.M2())}M2(){if(this.videoData.isLoaded()){var R=this.MS;g.Iq(R.zy.experiments,"html5_player_min_build_cl")> 0&&g.Iq(R.zy.experiments,"html5_player_min_build_cl")>885186571&&Er(R,"oldplayer",!0);eBd(this)}else this.videoData.Ml||this.videoData.zv?this.TJ&&Pd(this)||(this.videoData.Ml?IKb(this.videoData):(R=this.HB,R.qoe&&(R=R.qoe,Ns(R,"protected"),R.provider.videoData.K?R.pL():R.provider.videoData.subscribe("dataloaded",R.pL,R)),R8l(this.videoData))):!this.videoData.loading&&this.SV&&Me_(this)}gJ(R){this.u3=R;this.loader&&(aM_(this.loader,R),this.Ty("sdai",{sdsstm:1}))}mS(R,w,p){this.loader?.mS(R,w,p)}d3(R){this.loader?.d3(R)}Cw(){return this.loader?.iM()|| null}isFullscreen(){return this.visibility.isFullscreen()}isBackground(){return this.visibility.isBackground()}RA(){eX(this).then(()=>OJ(this)); this.playerState.isOrWillBePlaying()&&this.playVideo()}ZQ(){this.mediaElement&&this.mediaElement.activate();this.R5();this.kO()&&!this.playerState.L(128)&&(this.gR.OV()||(this.gR.start(),this.videoData.eI?this.I9(ul(this.playerState,4)):this.I9(ul(ul(this.playerState,8),1))),cd(this))}tK(){return this.sI.finished}sendAbandonmentPing(){this.getPlayerState().L(128)||(this.publish("internalAbandon"),this.rJ(!0),q_b(this.HB),g.p5(this.HB),g.YM.zm(this.b_))}Rz(R=!0,w=!0,p){w&&this.mediaElement&&this.mediaElement.pause(); R&&p&&this.loader&&na(this.videoData)&&this.loader.uf(p);this.I9(R?new g.Gf(14):new g.Gf)}e$(){this.HB.vX()}A$(R,w,p,r,f,G){let I,C;g.Ym(vRI,p)?I=p:p?C=p:I="GENERIC_WITHOUT_LINK";r=(r||"")+`;a6s.${Ri()}`;if(R==="auth"||R==="drm.auth"||R==="heartbeat.stop")p&&(r+=`;r.${p.replaceAll(" ","_")}`),G&&(r+=`sr.${G.replaceAll(" ","_")}`);w={errorCode:R,errorDetail:f,errorMessage:C||g.Rx[I]||"",Vq:I,S_:G||"",vl:r,ma:w,cpn:this.videoData.clientPlaybackNonce};this.videoData.errorCode=R;Mf(this,"dataloaderror"); this.I9(In(this.playerState,128,w));g.YM.zm(this.b_);D$(this);this.Ra()}lr(R){this.Ji=this.Ji.filter(w=>R!==w); this.gR.OV()&&cd(this)}PM(){var R;(R=!!this.Ji.length)||(R=this.Co.L.array[0],R=!!R&&R.start<=-0x8000000000000);return R}YK(){return this.Py.YK()}isPlaying(){return this.playerState.isPlaying()}bf(){return this.playerState.bf()&&this.videoData.eI}getPlayerState(){return this.playerState}i$(R){this.loader?.i$(R)}l$(R){this.loader?.l$(R)}getPlayerType(){return this.playerType}getPreferredQuality(){if(this.rb){var R=this.rb;R=R.videoData.K2.compose(R.videoData.B$);R=Vy(R)}else R="auto";return R}isGapless(){return!!this.mediaElement&& this.mediaElement.isView()}qJ(){return this.Wy.qJ()}setMediaElement(R){if(this.mediaElement&&R.zk()===this.mediaElement.zk()&&(R.isView()||this.mediaElement.isView())){if(R.isView()||!this.mediaElement.isView())this.G0(),this.mediaElement=R,this.mediaElement.kY=this,jrb(this),this.Py.setMediaElement(this.mediaElement)}else{this.mediaElement&&this.gY();if(!this.playerState.isError()){let w=sU(this.playerState,512);w.L(8)&&!w.L(2)&&(w=ul(w,1));R.isView()&&(w=sU(w,64));this.I9(w)}this.mediaElement=R; this.mediaElement.kY=this;!g.I1(this.LB)&&this.mediaElement.setLoop(this.loop);this.mediaElement.setPlaybackRate(this.playbackRate);jrb(this);this.Py.setMediaElement(this.mediaElement);this.Y("html5_prewarm_media_source")&&!this.MS.Rf()&&jU_(this.mediaElement)}}gY(R=!1,w=!1,p=!1){if(this.mediaElement){var r=this.getCurrentTime();r>0&&(this.Py.O=r);this.Py.setMediaElement(null);!R&&this.lB()?K1_(this):this.qL(p);this.loader&&(E5(this.loader),this.loader?.O0(w));this.D1.stop();if(this.mediaElement&& (!this.gR.OV()&&!this.jf()||this.playerState.isError()||this.playerState.L(2)||this.I9(ul(this.playerState,512)),this.mediaElement)){this.G0();if(R||!this.mediaElement.isView())this.Jf.Cy("mesv_s"),this.mediaElement.stopVideo(),bR(this);this.mediaElement=this.mediaElement.kY=null}}}async playVideo(R=!1,w=!1){var p=window.google_image_requests;p&&p.length>10&&(window.google_image_requests=p.slice(-10));if(!this.playerState.L(128))if(this.MS.lq())this.publish("signatureexpired");else if(this.mediaElement&& TK(this.HB),this.ZQ(),(this.playerState.L(64)||R)&&this.I9(ul(this.playerState,8)),this.gR.finished&&this.mediaElement){if(!this.rb&&this.hw&&(await this.hw,this.playerState.L(128)))return;if(this.videoData.O){if(this.Ko()&&this.videoData.O.L())return eX(this);if(Gd(this))R=this.Py,$o(R.videoData)&&!R.isAtLiveHead(R.getCurrentTime())&&R.YK()&&R.CB.seekTo(Infinity,{dB:"seektimeline_peggedToLive",seekSource:34});else if($o(this.videoData)){R=this.getCurrentTime()p.video)?.sort((p,r)=>(r.O??0)-(p.O??0)); this.HB.O2("M",w?.[0]?.O??(OMD(R.L)?R.L:0))}}CN(R,w,p){this.O2(R);this.videoData.K2=R;if(this.rb&&w){w=this.Gv;var r=this.rb;if(r.L.L()){var f=g.Iq(w.LB.experiments,"html5_max_quality_sel_upgrade"),G=f?R.L:g.tC[Vy(R)],I=r.L.videoInfos[0].video.qualityOrdinal,C=I!==0&&R.L===I;I=fJ()>I;C&&I||(f&&C&&(G=Math.max(G,f)),f=PF(w,r.L?.videoInfos),C=w.CB.getPlaybackRate(),C>1&&f&&(f=lC_(w.LB.K,r.L.videoInfos,C),R.L!==0&&f=480,w.Y("html5_perf_cap_override_sticky")&&NCd(w.O,w.Y("html5_perserve_av1_perf_cap")))}}this.loader&&(R=this.loader,p=p||"",R.policy.L?Nw(R.K.L,p):Nw(R.L.K,p));this.TL()}getUserPlaybackQualityPreference(){return this.videoData.O&&!this.videoData.O.L()?Vy(this.videoData.K2):yy[fJ()]}hasSupportedAudio51Tracks(){return this.videoData.hasSupportedAudio51Tracks()}setUserAudio51Preference(R,w){this.getUserAudio51Preference()!==R&&(this.Ty("toggle51",{pref:R}),g.Qp("yt-player-audio51", R,w?31536E3:2592E3),this.RA())}getUserAudio51Preference(){return this.videoData.getUserAudio51Preference()}setProximaLatencyPreference(R){const w=this.getProximaLatencyPreference();this.Ty("proxima",{pref:R});g.Qp("yt-player-proxima-pref",R,31536E3);w!==R&&(R=this.Py,R.q0=!0,R.CB.seekTo(Infinity,{dB:"seektimeline_proximaSeekToHead",seekSource:34}))}getProximaLatencyPreference(){return G0()??0}isProximaLatencyEligible(){return this.videoData.isProximaLatencyEligible}nZ(){this.videoData.videoId?this.Wy.nZ(this.videoData): this.Ty("povid",{})}Q0(){this.videoData.videoId?this.Wy.Q0(this.videoData):this.Ty("piavid",{})}TL(){if(!this.cS()&&!this.playerState.L(128)&&this.videoData.O){if(this.videoData.O.L())td(this);else{const r=oY(this);var R=this.videoData;a:{var w=r;var p=this.videoData.SI;if(w.L){for(const f of p){const G=f.getInfo(),I=g.tC[G.video.quality];if((!w.O||G.video.quality!=="auto")&&I<=w.L){w=f;break a}}w=p[p.length-1]}else w=p[0]}R.M0=w;Ad(this,r.reason,igd(this,this.videoData.M0))}if(this.Y("html5_check_unstarted")? this.playerState.isOrWillBePlaying():this.isPlaying())this.Py.X=!1,this.playVideo()}}yl(R,w){if(this.cS()||this.playerState.L(128))return!1;var p=!!this.videoData.O?.L(),r=p&&w?this.getCurrentTime()-this.vB():NaN;if(R.DT&&R.DT.id){var f=this.HB;if(f.qoe){f=f.qoe;const I=[R.DT.id,isNaN(r)?"m":"t"];g.ix(f,g.g9(f.provider),"afi",I)}}if(p){if(w){var G=sJ(this.Py);this.Ty("aswh",{id:R.id,xtags:R.xtags,bh:G.toFixed(3)})}this.loader.setAudioTrack(R,r,w);return!0}if(hBd(this)){a:{G=this.mediaElement.audioTracks(); w=!1;for(r=0;r{try{USW(this,f,w,p)}catch(G){g.AO(G),this.handleError(new g.pq("fmt.unplayable",{msi:"1",ename:G&&typeof G==="object"&&"name"in G?String(G.name):void 0,trg:"setmediasrc"},1))}}; this.lB()&&this.un.O()==="open"?R(this.un):$Kb(this.un,R)}Y4(R){this.LD.set(R.initData,R);this.X9&&(this.X9.Y4(R),this.Y("html5_eme_loader_sync")||this.LD.remove(R.initData))}C5(R){this.videoData.m1=g.qJ("auto",R,!1,"u");td(this)}HT(R){var w=R.reason,p=R.L.info,r=R.source,f=R.token,G=this.HB;const I=this.videoData;if(p!==I.G){var C=!I.G;I.G=p;var u=w==="m"||w==="t";u||(w=C?"i":"a");w=new F1I(p,w,"",r,f);if(G.qoe){G=G.qoe;p=g.g9(G.provider);const B=G.provider.LB.Tk(),W=[];if(w.L.id!==G.M0){r=[w.L.id, G.M0,w.reason];f=W;var m=f.push;const x=[];var z=w.L.audio;if(z){const q=z?.G;q!==void 0&&x.push(`fl.${q}`);z=z?.O;z!==void 0&&(z=Math.min(-z,0),x.push(`vg.${z}`),x.push("nm.4"))}m.call(f,...x);B.L.vS(nD)&&w.reason==="i"&&W.push(mCx(G,w));W.length>0&&r.push(W.join(";"));w.token&&r.push(w.token);g.ix(G,p,"afs",r);G.M0=w.L.id}}this.publish("internalaudioformatchange",I,!C&&u)}this.bB();this.Py.HT(R.L.index)}Ax(R){this.publish("localmediachange",R)}vN(R={}){this.loader?.vN(this.LB,Mr(this.videoData), R)}lq(){return this.MS.lq()}eF(R){this.K$(new g.pq("staleconfig",{reason:R}))}handleError(R){this.MS.handleError(R)}Rf(){return this.MS.Rf()}jx(R){this.Py.jx(R)}async yG(R=!1,w=!1){this.loader&&this.loader.X1();this.loader&&this.loader.cS()&&D$(this);this.Y("html5_enable_vp9_fairplay")&&this.ph()&&this.videoData.L?.p_();this.I9(ul(this.playerState,2048));this.publish("newelementrequired");R&&await eX(this);this.videoData.PB()&&this.loader?.I0&&!Gd(this)&&(this.isAtLiveHead()&&$o(this.videoData)?this.seekTo(Infinity, {dB:"videoPlayer_getNewElement"}):this.videoData.yv&&this.loader&&(R=this.loader,R.Z$.PB&&(R.Z$.yv||R.Z$.O||R.Z$.isPremiere?(R.seek(0,{dB:"loader_resetSqless"}),R.videoTrack.J=!0,R.audioTrack.J=!0,R.videoTrack.G=!0,R.audioTrack.G=!0):K_(R.Z$)&&vj(R))));w&&this.seekTo(0,{seekSource:105});this.playerState.L(8)&&this.playVideo()}xP(R){this.Ty("hgte",{ne:+R});this.videoData.D=!1;R&&this.yG();this.loader&&b_l(this.loader)}Zy(R){this.Ty("newelem",{r:R});this.yG()}pauseVideo(R=!1,w){if((this.playerState.L(64)|| this.playerState.L(2))&&!R)if(this.playerState.L(8))this.I9(mN(this.playerState,4,8,null,w));else if(this.bf())OJ(this);else return;this.playerState.L(128)||(R?this.I9(ul(this.playerState,256,null,w)):this.I9(mN(this.playerState,4,8,null,w)));this.mediaElement&&this.mediaElement.pause();g.gs(this.videoData)&&this.loader&&this.loader?.O0(!1)}stopVideo(){this.pauseVideo();this.loader&&(this.loader?.O0(!1),this.loader.xU())}Ra(R=!1,w=!1){this.lB()&&w?this.mediaElement?.Ra():this.mediaElement?.stopVideo(); bR(this);D$(this);this.playerState.L(128)||(R?this.I9(sU(sU(ul(this.playerState,4),8),16)):this.I9(In(this.playerState)));this.videoData.videoId&&this.LB.Jl.remove(this.videoData.videoId)}seekTo(R,w={}){this.playerState.L(2)&&OJ(this);w.P4Y&&this.I9(ul(this.playerState,2048));if((w.seekSource===58||w.seekSource===60)&&this.Y("html5_update_vss_during_gapless_seeking")){var p=this.HB;p.L&&(p=p.L,w.seekSource===58?p.L.update():p.G&&(p.J(),jl(p).send(),p.C=NaN))}this.Py.seekTo(R,w);this.Co.sync()}oT(R){this.Jf.G.C= (0,g.T)();this.playerState.L(32)||(this.I9(ul(this.playerState,32,R?.seekSource)),this.playerState.L(8)&&this.pauseVideo(!0),this.publish("beginseeking"));this.Q2()}WJ(R){R=R?.seekSource;this.playerState.L(32)?(this.I9(mN(this.playerState,16,32,R)),this.publish("endseeking")):this.playerState.L(2)||this.I9(ul(this.playerState,16,R));R=this.Jf.G;var w=this.videoData,p=this.playerState.isPaused();if(w.clientPlaybackNonce&&!isNaN(R.L)){if(Math.random()<.01){p=p?"pbp":"pbs";const r={startTime:R.L};w.iI&& (r.cttAuthInfo={token:w.iI,videoId:w.videoId});mp("seek",r);g.sT({clientPlaybackNonce:w.clientPlaybackNonce},"seek");isNaN(R.C)||u$("pl_ss",R.C,"seek");u$(p,(0,g.T)(),"seek")}R.reset()}}S5(R){this.WJ(R)}Xw(){this.publish("SEEK_COMPLETE")}NR(R){var w=this.Wy,p=this.videoData.clientPlaybackNonce,r=this.playerType;if(R.scope===4){var f=R.type;if(f){var G=w.Gk(),I=G.getVideoData().clientPlaybackNonce;r===1&&(I=p);if(r=zOI(w,I)){if(p=r.getVideoData())R.writePolicy===2&&p.sabrContextUpdates.has(f)||(R.sendByDefault&& p.jI.add(f),p.sabrContextUpdates.set(f,R)),w.Y("html5_enable_t1_enf_on_sabr")&&(R=f===5,f=pNd(p.playerResponse),R?(R=f?1:0,e5(R,"m.p_",{}),Gh("MBSTAT",R)):R=1,R===0&&g.m1(w.o0,"onAbnormalityDetected"))}else G.Ty("scuset",{ncpf:"1",ccpn:I,crcpn:p})}else g.AO(Error("b/380308491: contextUpdateType is undefined"))}}I1(){if(this.playerType===2)return this.Wy.I1("")}getCurrentTime(R=!1){return this.Py.getCurrentTime(R)}qj(){return this.Py.qj()}Lh(){return this.Py.Lh()}z5(){return this.Lh()}aD(){return this.Py.aD()}getPlaylistSequenceForTime(R){return this.videoData.getPlaylistSequenceForTime(R- this.vB())}BM(){let R=NaN;this.mediaElement&&(R=this.mediaElement.BM());return R>=0?R:this.getCurrentTime()}gg(){if(this.videoData.L?.gg)return this.videoData.L.gg(this.getCurrentTime()-this.vB());if(this.mediaElement){var R=this.mediaElement.jI();if(R&&(R=R.getTime(),!isNaN(R)))return R/1E3+this.getCurrentTime()}return NaN}getDuration(){return this.videoData.lengthSeconds?this.videoData.lengthSeconds+this.vB():this.p$()?this.p$():0}qC(){const R=new AtV;if(this.loader){KDL(this.BB,R,this.LB.dn()); var w=this.loader;if(w.un&&w.un.K&&!w.un.u4()&&(R.M8=oV(w.videoTrack),R.C=oV(w.audioTrack),w.policy.O)){const p=Pj(w.videoTrack),r=Pj(w.audioTrack),f=Fs(w.un.C.f3(),"_",5),G=Fs(w.un.L.f3(),"_",5);Object.assign(R.L,{lvq:p,laq:r,lvb:f,lab:G})}R.bandwidthEstimate=f7(w.X);w.audioTrack.U?.flush();w.videoTrack.U?.flush()}else this.mediaElement&&(R.M8=wS(this.mediaElement));R.N3=this.N3;R.xO=this.xO;R.O=this.isAtLiveHead()&&this.isPlaying()?EJ(this):NaN;w=this.Py;w=w.L?kn(w.L):0;R.G=w;return R}yK(R,w){this.xO+= R;this.N3+=w}Lw(){return this.mediaElement?g.gs(this.videoData)?1:H4(this.videoData)?this.isAtLiveHead()||this.YK()?1:this.Py.Lw():this.mediaElement.Lw():0}w7(){var R=this.sJ;const w=Wd(R,"bandwidth"),p=Wd(R,"bufferhealth"),r=Wd(R,"livelatency"),f=Wd(R,"networkactivity"),G=Bd(R,"bandwidth"),I=Bd(R,"bufferhealth"),C=Bd(R,"livelatency");R=Bd(R,"networkactivity");var u=this.Vp();const m=u.droppedVideoFrames;u=u.totalVideoFrames;var z=this.getCurrentTime();if(this.X9){var B="IT/"+(this.X9.L.getInfo()+ "/"+Vy(this.wM()));B+="/"+this.X9.getInfo()}else B="";var W=this.isGapless(),x=this.qJ(),q=this.Uu(),O=this.yp(),e=g.Z$(this),P=this.getPlayerState().state.toString(16),c=this.getPlaylistSequenceForTime(this.getCurrentTime());a:{var X=0;var Z="";if(this.u3){if(this.u3.Xj){Z="D,";break a}X=this.u3.dM;Z=this.u3.G_.substring(0,4)}X>0?(X=`AD${X}, `,Z&&(X+=`${Z}, `),Z=X):Z=""}return{fC:G,BJ:I,currentTime:z,fH:B,droppedVideoFrames:m,isGapless:W,qJ:x,Uu:q,ix:O,P2:w,Yw:p,D_:r,yr:f,uy:C,jA:R,Ut:e,HU:P,Nb:c, fF:Z,totalVideoFrames:u}}TK(R=!1){const w={};if(R){Object.assign(w,this.HB.TK());this.mediaElement&&(Object.assign(w,this.mediaElement.TK()),R=this.Vp(),w.dvf=R.droppedVideoFrames,w.tvf=R.totalVideoFrames);this.loader&&Object.assign(w,this.loader.TK());this.X9&&(w.drm=JSON.stringify(this.X9.TK()));w.state=this.playerState.state.toString(16);this.playerState.L(128)&&(w.debug_error=JSON.stringify(this.playerState.Yu));this.PM()&&(w.prerolls=this.Ji.join(","));this.videoData.RJ&&(w.ismb=this.videoData.RJ); this.videoData.latencyClass!=="UNKNOWN"&&(w.latency_class=this.videoData.latencyClass);this.videoData.isLowLatencyLiveStream&&(w.lowlatency="1");if(this.videoData.defaultActiveSourceVideoId||this.videoData.compositeLiveStatusToken||this.videoData.compositeLiveIngestionOffsetToken)w.is_mosaic=1;this.videoData.cotn&&(w.is_offline=1,w.cotn=this.videoData.cotn);this.videoData.playerResponseCpn&&(w.playerResponseCpn=this.videoData.playerResponseCpn);this.Wy.isOrchestrationLeader()&&(w.leader=1);this.videoData.isLivePlayback&& (this.videoData.L&&qC(this.videoData.L)&&(w.segduration=qC(this.videoData.L)),R=this.Py,w.lat=R.U?R.U.G.O():0,w.liveutcstart=this.videoData.liveUtcStartSeconds);w.relative_loudness=this.videoData.fZ.toFixed(3);if(R=g.Z$(this))w.optimal_format=R.video.qualityLabel;w.user_qual=fJ();w.release_version="youtube.player.web_20260317_10_RC00"}w.debug_videoId=this.videoData.videoId;return w}addCueRange(R){this.zf([R])}removeCueRange(R){this.Co.LS([R])}VA(){var R=this.Co;if(R.CB.V().Y("html5_sort_cueranges_on_update")&& !(R.D5().length<=0||R.cS())){var w=R.L;w.array.sort(w.L)}R.sync()}zC(R,w){return this.Co.zC(R,w)}zf(R,w){this.Co.C3(R,w)}rK(R){this.Co.LS(R)}D5(){return this.Co.D5()||[]}Bq(){return this.AR}Ko(){return this.visibility.Ko()}U5(){this.mediaElement&&this.mediaElement.U5()}wx(){Mf(this)}togglePictureInPicture(){this.mediaElement&&this.mediaElement.togglePictureInPicture()}G0(){this.RR.C()}BR(){this.Q2();this.publish("onLoadProgress",this.Lw())}nk(R){var w=R.target.Kv();if(this.mediaElement&&this.mediaElement.Kv()&& this.mediaElement.Kv()===w){SmP(this,R.type);switch(R.type){case "error":var p=rS(this.mediaElement)||"",r=this.mediaElement.Ch();if(p==="capability.changed"){this.Y("html5_restart_on_capability_change")?(this.Ty("capchg",{msg:r}),this.yG(!0)):eX(this);return}if(this.mediaElement.hasError()&&KG(this.MS,p,{msg:r,trg:"elementevt"}))return;if(this.isBackground()&&this.mediaElement.Tg()===4){this.Ra();aY(this,"unplayable");return}break;case "durationchange":p=this.mediaElement.getDuration();isFinite(p)&& (!this.un||p>0)&&p!==1&&this.vM(p);break;case "ratechange":this.loader&&this.loader.setPlaybackRate(this.mediaElement.getPlaybackRate());p=this.Co;p.started=!0;p.sync();this.HB.onPlaybackRateChange(this.getPlaybackRate());break;case "loadedmetadata":KD(this,!1);RHY(this);this.publish("onLoadedMetadata");wWD(this);p=this.gg();this.videoData.pz&&(this.videoData.pz=p);break;case "loadstart":wWD(this);break;case "progress":case "suspend":this.FH.G();break;case "seeked":this.loader?.Nk();break;case "playing":KD(this, !1);this.Jf.Cy("plev");this.eg&&!Gd(this)&&(this.eg=!1,this.isAtLiveHead()||this.seekTo(Infinity,{dB:"videoplayer_onPlaying"}));break;case "timeupdate":KD(this,!1);p=this.mediaElement&&!this.mediaElement.getCurrentTime();r=this.mediaElement&&this.mediaElement.O()===0;if(p&&(!this.q$||r))return;this.q$=this.q$||!!this.mediaElement.getCurrentTime();jX(this);this.Q2();if(!this.mediaElement||this.mediaElement.Kv()!==w)return;this.publish("onVideoProgress",this.getCurrentTime());break;case "waiting":if(this.mediaElement.K().length> 0&&this.mediaElement.po().length===0&&this.mediaElement.getCurrentTime()>0&&this.mediaElement.getCurrentTime()<5&&this.loader)return;break;case "resize":RHY(this);this.videoData.C&&this.videoData.C.video.quality==="auto"&&this.publish("internalvideoformatchange",this.videoData,!1);break;case "pause":if(this.T7&&this.playerState.L(8)&&!this.playerState.L(1024)&&this.getCurrentTime()===0&&g.tx){aY(this,"safari_autoplay_disabled");return}}if(this.mediaElement&&this.mediaElement.Kv()===w){kqP(this.Py, R);this.publish("videoelementevent",R);w=this.playerState;r=this.aK;var f=this.mediaElement;p=this.videoData.clientPlaybackNonce;if(!w.L(128)){var G=w.state;f=f?f:R.target;var I=f.getCurrentTime();if(!w.L(64)||R.type!=="ended"&&R.type!=="pause"){var C=f.getDuration();C=f.isEnded()||I>1&&Math.abs(I-C)<1.1;var u=R.type==="pause"&&f.isEnded();I=R.type==="ended"||R.type==="waiting"||R.type==="timeupdate"&&!w.L(4)&&!HF(r,I);if(u||C&&I)f.YY()>0&&f.Kv()&&(G=14);else switch(R.type){case "error":rS(f)&&(G|= 128);break;case "pause":w.L(256)?(G^=256)||(G=64):w.L(32)||w.L(2)||w.L(4)||(G=4,w.L(1)&&w.L(8)&&(G|=1));break;case "playing":C=G;G=(G|8)&-1093;C&4?(G|=1,Cn(r,f,!0)):HF(r,f.getCurrentTime())&&(G&=-2);w.L(1)&&Cn(r,f)&&(G|=1);break;case "seeking":G|=16;w.L(8)&&(G|=1);G&=-3;break;case "seeked":G&=-17;Cn(r,f,!0);break;case "waiting":w.L(2)||(G|=1);Cn(r,f);break;case "timeupdate":C=w.L(16),u=w.L(4),(w.L(8)||C)&&!u&&HF(r,f.getCurrentTime())&&(G=8),Cn(r,f)&&(G|=1)}}r=G;G=null;r&128&&(G=R.target,u=rS(G),I= 1,u?(u==="capability.changed"&&(I=2),f="GENERIC_WITHOUT_LINK",C=G.TK(),C.mediaElem="1",C.trg="melem",/AUDIO_RENDERER/.test(G.Ch())&&(f="HTML5_AUDIO_RENDERER_ERROR"),G={errorCode:u,errorMessage:g.Rx[f]||"",Vq:f,vl:Ro(C),ma:I,cpn:w.Yu?w.Yu.cpn:""}):G=null,G&&(G.cpn=p));w=In(w,r,G)}!this.playerState.L(1)&&w.L(1)&&Jd(this,"evt"+R.type);this.I9(w)}}}fG(R){R=R.L.availability==="available";R!==this.AR&&(this.AR=R,this.publish("airplayavailabilitychange"))}Gs(){var R=(0,g.T)();const w=this.mediaElement.Ko(); this.Ty("airplay",{ia:w});!w&&!isNaN(this.Tq)&&R-this.Tq<2E3||(this.Tq=R,w!==this.Ko()&&(R=this.visibility,R.L!==w&&(R.L=w,R.gb()),this.Ty("airplay",{rbld:w}),this.RA()),this.publish("airplayactivechange"))}AO(R){if(this.loader){var w=this.loader,p=w.G,r=w.getCurrentTime();const f=Date.now()-p.U;p.U=NaN;p.Ty("sdai",{adfetchdone:R,d:f});R&&!isNaN(p.J)&&p.C!==3&&QW(p.loader,r,p.J,p.K);p.policy.C?p.O=NaN:p.G=NaN;Tl(p,4,p.C===3?"adfps":"adf");E5(w)}}v$(){g.$E(this.iS);this.D1.stop();this.videoData.U= !0;this.LB.pU=!0;this.LB.SI=0;var R=this.MS;if(R.videoData.C){var w=R.zy.K,p=R.videoData.C.wN;w.O.has(p)&&(w.O.delete(p),w.L=!0)}R.L.stop();R.zy.J8=0;this.qf();this.playerState.L(8)&&this.I9(sU(this.playerState,65));this.TJ=!1;this.HB.kK();this.L6.ql();this.publish("playbackstarted");(R=g.yD("yt.scheduler.instance.clearPriorityThreshold"))?R():BP(0)}qf(){var R=this.Wy.Ib(),w={};const p={};!z3("pbs",this.Jf.timerName)&&kt.measure&&kt.getEntriesByName&&(kt.getEntriesByName("mark_nr")[0]?k8x("mark_nr"): k8x());R.videoId&&(w.videoId=R.videoId);R.clientPlaybackNonce&&!this.Y("web_player_early_cpn")&&(w.clientPlaybackNonce=R.clientPlaybackNonce);this.mediaElement&&this.mediaElement.isPaused()&&(p.isPausedOnLoad=!0);p.itag=R.C?Number(R.C.itag):-1;R.a9&&(p.preloadType=String(this.VX?2:1));w.liveStreamMode=wib[Q0(R)];w.playerInfo=p;this.Jf.infoGel(w);if(this.loader){R=this.loader.timing;window&&window.performance&&window.performance.getEntriesByName&&(R.O&&(w=window.performance.getEntriesByName(R.O),w.length&& (w=w[0],R.tick("vri",w.fetchStart),R.tick("vdns",w.domainLookupEnd),R.tick("vreq",w.requestStart),R.tick("vrc",w.responseEnd))),R.C&&(w=window.performance.getEntriesByName(R.C),w.length&&(w=w[0],R.tick("ari",w.fetchStart),R.tick("adns",w.domainLookupEnd),R.tick("areq",w.requestStart),R.tick("arc",w.responseEnd))));R=R.ticks;for(const r in R)R.hasOwnProperty(r)&&this.Jf.tick(r,R[r])}}Q2(R=!1){if(this.mediaElement&&this.videoData){iad(this.Py,this.isPlaying());var w=this.getCurrentTime();this.loader&& (this.playerState.L(4)&&g.gs(this.videoData)||this.playerState.L(32)&&Qk(this.videoData)||$CY(this.loader,w),this.Y("html5_log_centralized_player_time")&&Math.abs(this.getCurrentTime()-this.loader.N8())>10&&this.Ty("sabrSeekRefactorCmt",{cmt:this.getCurrentTime(),loaderCmt:this.loader?.N8(),bh:this.loader?.nB()},!0));w>5&&(this.Py.O=w);var p=g.zD();p?g.YM.zm(this.b_):g.a2(this.b_);var r=this.mediaElement.isPaused();if((this.playerState.isBuffering()||!r||this.videoData.I0())&&!this.playerState.L(128)){const f= ()=>{if(this.mediaElement&&!this.playerState.L(128)){this.LB.dn()&&SmP(this,"pfx");var G=this.getCurrentTime();this.Y("html5_buffer_underrun_transition_fix")&&(G-=this.vB());var I=wS(this.mediaElement),C=this.playerState.L(8),u=HF(this.aK,G),m=hkb(this.aK,G,(0,g.T)(),I);C&&u?this.I9(sU(this.playerState,1)):C&&m?(this.LB.dn()&&this.Y("html5_log_centralized_player_time")&&!isFinite(G)&&m&&this.Ty("sabrSeekRefactorCmtBhFix",{cmt:G,loaderCmt:this.loader?.N8(),bh:this.loader?.nB()}),C=this.getDuration(), u=$o(this.videoData),C&&Math.abs(C-G)<1.1?(this.Ty("setended",{ct:G,bh:I,dur:C,live:u}),this.mediaElement.pX()?this.seekTo(0,{dB:"videoplayer_loop",seekSource:37}):this.Rz()):(this.playerState.isBuffering()||Jd(this,"progress_fix"),this.I9(ul(this.playerState,1)))):(C&&!u&&!m&&G>0&&(C=(Date.now()-this.E8)/1E3,u=this.getDuration(),G>u-1&&this.Ty("misspg",{t:G.toFixed(2),d:u.toFixed(2),r:C.toFixed(2),bh:I.toFixed(2)})),this.playerState.isPaused()&&this.playerState.isBuffering()&&wS(this.mediaElement)> 5&&this.I9(sU(this.playerState,1)));this.Q2()}}; this.mediaElement.K().length===0?this.b_=p?g.YM.SL(f,100):g.cI(f,100):this.b_=p?g.YM.SL(f,500):g.cI(f,500)}this.videoData.ag=w;!R&&this.isPlaying()&&pWP(this);ib_(this.Gv,this.rb,this.XI(),this.isBackground())&&td(this);this.publish("progresssync",R);r&&this.videoData.I0()&&this.publish("onVideoProgress",this.getCurrentTime())}}qI(){this.A$("ad.rebuftimeout",2,"RETRYABLE_ERROR",`vps.${this.playerState.state.toString(16)}`)}yp(){return this.HB.yp()}hv(){return this.loader?this.loader.hv():rK(this.BB, !0)}I9(R){if(!g.zf(this.playerState,R)){var w=new g.ll(R,this.playerState);this.playerState=R;r36(this);var p=!this.YR.length;this.YR.push(w);var r=this.mediaElement&&this.mediaElement.isSeeking();w.TE(1)&&this.loader&&zcP(this.loader);r=w.oldState.C()&&!r;if(w.TE(1)&&r&&this.playerState.L(8)&&!this.playerState.L(64)&&this.loader&&(r=this.loader,r.m_=!0,r.policy.f_&&r.un&&r.Ty("lr_rb",{c:r.getCurrentTime(),s:r.isSeeking(),ab:Fs(r.un.L.f3()),ala:yL(r.audioTrack)?.EC(),alr:r.audioTrack.L?.EC(),vb:Fs(r.un.C.f3()), vla:yL(r.videoTrack)?.EC(),vlr:r.videoTrack.L?.EC()}),r.XO!==0&&r.Ty("sps_rebuffer",{c:r.getCurrentTime()}),this.mediaElement&&wS(this.mediaElement)>=5)){r=this.Gv;var f=this.rb;!f.videoData.C||r.Y("html5_disable_performance_downgrade")?r=!1:(Date.now()-r.D>6E4&&(r.C=0),r.C++,r.D=Date.now(),r.C!==4?r=!1:(J5r(r,f.videoData.C),r=!0));r&&td(this)}(r=g.Iq(this.LB.experiments,"html5_ad_timeout_ms"))&&this.videoData.isAd()&&R.L(1)&&(R.L(8)||R.L(16))?this.R6.start(r):this.R6.stop();(cs(w,8)<0||w.TE(1024))&& this.D1.stop();!w.TE(8)||this.videoData.U||w.state.L(1024)||this.D1.start();w.state.L(8)&&cs(w,16)<0&&!w.state.L(32)&&!w.state.L(2)&&this.playVideo();w.state.L(2)&&H4(this.videoData)&&(this.vM(this.getCurrentTime()),this.Q2(!0));w.TE(2)&&(this.rJ(!0),this.LB.dn()&&this.Y("html5_sabr_parse_live_metadata_playback_boundaries")&&Qk(this.videoData)&&this.videoData.L&&(R={minst:`${this.videoData.L.VK}`,cminst:`${this.videoData.L.xN()+this.vB()}`,maxst:`${this.videoData.L.M7}`,hts:`${this.videoData.L.O0}`, cmaxst:`${this.videoData.L.p$()+this.vB()}`},this.Ty("sabrSeekableBoundaries",R)));w.TE(128)&&this.Ra();this.videoData.L&&this.videoData.isLivePlayback&&!this.nF&&(cs(w,8)<0?(R=this.videoData.L,R.J&&R.J.stop()):w.TE(8)&&this.videoData.L.resume());R=this.Py;R.pB.K.ql();if(R.mediaElement)if(w.oldState.C()&&fn(w.state)&&w.state.isBuffering()){r=R.mediaElement.getCurrentTime();f=R.mediaElement.po();var G=R.Y("manifestless_post_live_ufph")||R.Y("manifestless_post_live")?ji(f,Math.max(r-3.5,0)):ji(f,r- 3.5);G>=0&&r>f.end(G)-1.1&&G+10?(Vn(R.CB,R.getCurrentTime()+R.videoData.limitedPlaybackDurationInSeconds),R.U0=!0):R.videoData.isLivePlayback&&R.videoData.endSeconds>0&&(Vn(R.CB,R.getCurrentTime()+R.videoData.endSeconds),R.U0=!0));R=this.HB;if(w.TE(1024)|| w.TE(512)||w.TE(4))R.C&&(r=R.C,r.C>=0||(r.L=-1,r.delay.stop())),R.qoe&&(r=R.qoe,r.J||(r.G=-1));R.provider.videoData.enableServerStitchedDai&&R.Rq?R.O.get(R.Rq)?.xY(w):R.L&&R.L.xY(w);if(R.qoe){r=R.qoe;f=w.state;G=g.g9(r.provider);var I=r.getPlayerState(f),C=G,u=f.seekSource||void 0,m=f.stoppageReason||void 0;if(I!==r.Rb){r.S||C=10&&r.playTimeSecs<=180&&(r.L.set("qoealert", ["1"]),r.q0=!0)),I!=="B"||r.Rb!=="PL"&&r.Rb!=="PB"||(r.isBuffering=!0),r.O=C);r.Rb==="PL"&&(I==="B"||I==="S")||r.provider.LB.dn()?H_(r,C):(r.N0||I!=="PL"||(r.N0=!0,hr(r,C,r.provider.CB.qC())),QY(r,C));I==="PL"&&r.ez.ql();var z=[I];I==="S"&&u&&z.push(`ss.${u}`);I==="PA"&&m&&r.provider.LB.experiments.Tk().L.vS(BBd)&&z.push(`sr.${m}`);g.ix(r,C,"vps",z);r.Rb=I;r.X=C;r.O=C;r.K=!0}C=f.Yu;f.L(128)&&C&&(C.vl=C.vl||"",pKd(r,G,C.errorCode,C.ma,C.vl));(f.L(2)||f.L(128))&&r.reportStats(G);f.isPlaying()&&!r.J&& (r.G>=0&&r.L.set("user_intent",[r.G.toString()]),r.J=!0);v_(r)}R.C&&(R=R.C,Hbd(R),R.playerState=w.state,R.C>=0&&w.TE(16)&&R.seekCount++,w.state.isError()&&R.send());if(p&&!this.cS())try{for(const W of this.YR){var B=this.Co;if(B.started&&(B.sync(),W.oldState.L(16))){w=B;const x=tGd(w.L,Math.max(w.O-2E3,0));!isNaN(x)&&x<0x7ffffffffffff&&w.G.start()}this.publish("statechange",W)}}finally{this.YR.length=0}}}Ni(){this.Jf.tick("qoes")}SS(){this.Py.SS()}Cq(R,w,p,r="LICENSE"){a:{var f=this.MS;p=p.substring(0, 256);let G=wu(w);R==="drm.keyerror"&&this.X9&&this.X9.O.keys.length>1&&f.G<96&&(R="drm.sessionlimitexhausted",G=!1);const I=f.zy.experiments.XB("html5_retry_on_drm_unavailable"),C=f.zy.experiments.XB("html5_retry_on_drm_key_error"),u=/^(closedShouldNotRetry|t\.prefixedKeyError)(.*)/;if(I&&R==="drm.unavailable"||C&&R==="drm.keyerror"&&!p.match(u))f.K$("qoe.restart",{retryOnDrmError:1,e:R,detail:p}),f.CB.yG(!0);else{if(G)if(f.videoData.C&&f.videoData.C.video.isHdr())Du(f,R);else{if(f.CB.A$(R,w,r,p), KfP(f,{detail:p}))break a}else f.K$(R,{detail:p});R==="drm.sessionlimitexhausted"&&(f.Ty("retrydrm",{sessionLimitExhausted:1}),f.G++,te6(f.CB))}}}FX(){var R=g.Iq(this.LB.experiments,"html5_license_constraint_delay");const w=q0();R&&w?(R=new g.vZ(()=>{this.TL();Mf(this)},R),g.K(this,R),R.start()):(this.TL(),Mf(this))}yU(R){this.publish("heartbeatparams",R)}ol(R){this.Ty("keystatuses",yN(R)); var w="auto",p=!1;this.videoData.C&&(w=this.videoData.C.video.quality,p=this.videoData.C.video.isHdr());a:{switch(w){case "highres":case "hd2880":w="UHD2";break;case "hd2160":case "hd1440":w="UHD1";break;case "hd1080":case "hd720":w="HD";break;case "large":case "medium":case "small":case "light":case "tiny":w="SD";break;default:w="";break a}p&&(w+="HDR")}w=Av(R)?bb(R,w):R.O.includes(w);if(this.Y("html5_enable_vp9_fairplay")){if(p){if(!R.D){this.videoData.GJ||(this.videoData.GJ=!0,this.Ty("drm",{dphdr:1}), this.yG(!0));return}if(this.X9?.L.L()?this.X9?.eI():!w){this.Ty("drm",{dshdr:1});Du(this.MS);return}}if(this.X9?.L.L())return}else{const r=R.D&&w;if(p&&!r){Du(this.MS);return}}if(p=!w)p=!(bb(R,"AUDIO")&&bb(R,"SD"));p&&(R=yN(R),this.q_?(this.publish("drmoutputrestricted"),this.Y("html5_report_fatal_drm_restricted_error_killswitch")||this.A$("drm.keyerror",2,void 0,`info.${R}`)):(this.q_=!0,this.K$(new g.pq("qoe.restart",{retrydrm:1,...R})),td(this),te6(this)))}c5(){if(!this.videoData.U&&this.mediaElement&& !this.isBackground()){var R="0";this.mediaElement.O()>0&&wS(this.mediaElement)>=5&&this.videoData.O&&this.videoData.O.L()&&(this.I9(ul(this.playerState,1)),Jd(this,"load_soft_timeout"),this.publish("playbackstalledatstart"),R="1");r36(this);var w=this.videoData.O;R={restartmsg:R,mfmt:!E_(this.videoData),mdrm:!(!(w&&w.videoInfos&&w.videoInfos.length&&w.videoInfos[0].contentProtection)||this.X9),mfmtinfo:!this.videoData.C,prerolls:this.PM()?this.Ji.join(","):"0"};if(this.X9){w=this.X9;if(w.O.size<= 0){let p="ns;";w.pB||(p+="nr;");w=p+=`ql.${w.G.length}`}else w=yN(w.O.values().next().value),w=Ro(w);R.drmp=w}Object.assign(R,this.loader?.TK()||{});Object.assign(R,this.mediaElement?.TK()||{});this.HB.K$("qoe.start15s",Ro(R));this.publish("loadsofttimeout")}}vM(R){this.videoData.lengthSeconds!==R&&(this.videoData.lengthSeconds=R,Mf(this))}rJ(R=!1,w){if(!this.Cm)if(z3("att_s","player_att")||Wx("att_s",void 0,"player_att"),this.Y("use_rta_for_player"))(async()=>{if(!R||await g.qFx())try{const r=bad(this.HB); if(!r)throw Error();const f=await g.L6P({cpn:this.videoData.clientPlaybackNonce,encryptedVideoId:this.videoData.videoId||""},g.Iq(this.LB.experiments,"html5_att_playback_timeout_ms")||3E4);if(this.Cm)throw Error();if(!f.challenge)throw g.AO(Error(`Not sending atr ping; missing challenge string${f.error?`; error: ${f.error}`:""}`)),Error();this.Cm=!0;const G=[f.challenge];if(f.error){const I=NBW(),C=V4x(I).get(f.error)||0;G.push(`r1c=${C}`)}else f.webResponse&&G.push(`r1a=${f.webResponse}`);f.adblockReporting?.reportingStatus!== void 0&&G.push(`r6a=${f.adblockReporting.reportingStatus}`);f.adblockReporting?.broadSpectrumDetectionResult!==void 0&&G.push(`r6b=${f.adblockReporting.broadSpectrumDetectionResult}`);r(G.join("&"));Wx("att_f",void 0,"player_att")}catch(r){Wx("att_e",void 0,"player_att")}})().then(()=>{w?.()}); else{var p=new g.TRd(this.videoData);if("c1a"in p.VQ&&!g.RT.isInitialized()){Wx("att_wb",void 0,"player_att");this.wU===2&&Math.random()<.01&&g.AO(Error("Botguard not available after 2 attempts"));if(R)return;if(this.wU<5){this.C6.ql();this.wU++;return}}(p=g.GPP(p))?(Wx("att_f",void 0,"player_att"),ANl(this.HB,p),this.Cm=!0):Wx("att_e",void 0,"player_att")}}Ev(R=!1){return $o(this.videoData)&&(this.isAtLiveHead()&&!this.playerState.isPaused()||this.YK()||g.gs(this.videoData))?this.getCurrentTime(): this.p$(R)}dc(){return this.xN()}p$(R=!1){return this.Py.p$(R)}xN(){return this.Py.xN()}vB(){return this.Py?this.Py.vB():0}getStreamTimeOffset(){return this.Py?this.Py.getStreamTimeOffset():0}g9(){return this.getStreamTimeOffset()===0?this.vB():this.getStreamTimeOffset()}setPlaybackRate(R){this.playbackRate!==R&&PF(this.Gv,this.videoData.O?.videoInfos)&&(this.playbackRate=R,td(this));this.playbackRate=R;this.mediaElement&&this.mediaElement.setPlaybackRate(R)}getPlaybackRate(){return this.playbackRate}getPlaybackQuality(){let R= "unknown";if(this.videoData.C&&(R=this.videoData.C.video.quality,R==="auto"&&this.mediaElement)){const w=this.Ha();w&&w.videoHeight>0&&(R=Ow(w.videoWidth,w.videoHeight))}return R}isHdr(){return!!(this.videoData.C&&this.videoData.C.video&&this.videoData.C.video.isHdr())}sendVideoStatsEngageEvent(R,w){var p=this.HB;p.L?(p=Zu(p.L,"engage"),p.xY=R,p.send(w)):w&&w()}h3(R){return this.HB.h3(R)}isAtLiveHead(R,w=!1){return $o(this.videoData)&&(this.Ul||w)?this.Py.isAtLiveHead(R):!1}t9(){const R=this.p$(), w=this.getCurrentTime();var p;(p=!$o(this.videoData))||(p=this.Py,p=!(p.L&&p.L.O));return p||this.YK()||isNaN(R)||isNaN(w)?0:Math.max(0,R-w)}Nt(R){(this.Ul=R)||this.D1.stop();if(this.videoData.L)if(R)this.videoData.L.resume();else{var w=this.videoData.L;w.J&&w.J.stop()}this.loader&&(w=this.videoData.Y("html5_disable_preload_for_ssdai_with_preroll")&&this.jf()&&this.videoData.isLivePlayback,R&&!w?this.loader.resume():this.loader?.O0(!0));this.playerState.L(2)||R?this.playerState.L(512)&&R&&this.I9(sU(this.playerState, 512)):this.I9(ul(this.playerState,512));w=this.HB;w.qoe&&(w=w.qoe,g.ix(w,g.g9(w.provider),"stream",[R?"A":"I"]))}m3(R){this.HB.K$("player.exception",Ro({n:R.name,m:R.message}))}SN(R){this.HB.SN(R)}hc(R){this.HB.hc(R)}zG(R){this.HB.zG(R)}Dp(R){this.HB.Dp(R)}uf(R,w,p,r){this.HB.uf(R,w,p,r)}Bd(){this.Ty("hidden",{},!0)}Vp(){return this.mediaElement?this.mediaElement.getVideoPlaybackQuality():{}}rA(){return this.loader?this.loader.rA():!0}setLoop(R){this.loop=R;this.mediaElement&&!g.I1(this.LB)&&this.mediaElement.setLoop(R)}pX(){return this.mediaElement&& !g.I1(this.LB)?this.mediaElement.pX():this.loop}L5(R){this.Ty("timestamp",{o:R.toString()});this.Py.L5(R)}KL(R){this.Jf.tick(R)}Xl(R){return this.Jf.Xl(R)}Cy(R){this.Jf.Cy(R)}Ty(R,w,p=!1){this.HB.Ty(R,w,p)}DY(R,w,p=!1){this.HB.Ty(R,w,p)}K$(R){this.HB.K$(R.errorCode,Ro(R.details));R=R.errorCode;if(this.videoData.isLivePlayback&&(R==="qoe.longrebuffer"||R==="qoe.slowseek")||R==="qoe.restart")R=this.loader?o3r(this.loader.videoTrack):{},this.Ty("lasoe",Object.assign(this.loader?o3r(this.loader.audioTrack): {},this.un?.L?.tR())),this.Ty("lvsoe",Object.assign(R,this.un?.C?.tR()));this.Y("html5_log_centralized_player_time")&&this.Ty("sabrSeekRefactorCmt",{cmt:this.getCurrentTime(),loaderCmt:this.loader?.N8(),bh:this.loader?.nB()})}UV(R,w,p){this.HB.UV(R,w,p)}Zp(R,w,p,r,f,G,I,C){if(this.videoData.L?.isLive){var u=w.playerType===2?w:R,m=R.videoData.videoId,z=w.videoData.videoId;if(m&&z){var B=this.HB;if(C?.CM){if(B.qoe){m=B.qoe;z=C.CM;m.reportStats();var W=m.provider.videoData.clientPlaybackNonce,x=m.provider.videoData.videoId|| "",q=m.hG?.join(".")||W,O=m.f0?.join(".")||x;RZ(m,G?4:f?2:0,z.Sf.join(".")||W,z.Vz.join(".")||x,r);m.reportStats();m.hG=z.Sf;m.f0=z.Vz;m.Fx=z.adFormats;m.iR=z.serializedQoeContextData;RZ(m,G?5:f?3:1,q,O,p);m.reportStats()}}else if(B.qoe){W=B.qoe;x=R.cpn;q=w.cpn;O=u.videoData.mq;var e=W.provider.videoData.clientPlaybackNonce;const P=W.provider.videoData.videoId,c=q!==e&&z!==P;e=x!==e&&m!==P;W.reportStats();W.adCpn&&W.adCpn!==x||(W.adCpn=e?x:"",W.Oi=e?m:"",W.adFormat=e?O:void 0,RZ(W,G?4:f?2:0,q,z,r), W.reportStats(),W.adCpn=c?q:"",W.Oi=c?z:"",W.adFormat=c?O:void 0,RZ(W,G?5:f?3:1,x,m,p),W.reportStats())}C?.vO?(B.L?.YY(),B.L?.D(),B.L?.U0(C.vO),B.L?.D(!0),B.L?.U(!0,!0).send(),B.L?.nB()):(p=B,f=R.cpn,p.O.has(f)?(G=p.O.get(f),jl(G,!0).send(),G.J(),f!==p.provider.videoData.clientPlaybackNonce&&(Jv(G),p.L?.S(),p.O.delete(f))):(p.Rq=p.provider.videoData.clientPlaybackNonce,p.Rq&&p.L&&(p.O.set(p.Rq,p.L),jl(p.L).send(),p.L.J())),p=w.cpn,u=u.videoData,r-=this.g9(),B.O.has(p)?(u=B.O.get(p),r=u.G&&isNaN(u.K)? Yn(u):NaN,u=u.U(!1),isNaN(r)||(u.D=r),u.send()):(r=LFx(B,B.provider,u,r),B.O.set(p,r),r.xY(new g.ll(ul(new g.Gf,8),new g.Gf)),r.kK(),B.L?.J()),B.Rq=p);this.Y("html5_unify_csi_server_stitched_transition_logging")?(r=this.Jf,B=R.cpn,R=w.cpn,p=this.videoData.clientPlaybackNonce,u=w.videoData,w=(0,g.T)(),p=`${B===p?"video":"ad"}_to_${R===p?"video":"ad"}`,p!=="video_to_ad"&&(f=p==="ad_to_video"?void 0:u,B=f?.Qz,G={},u?.iI&&(G.cttAuthInfo={token:u.iI,videoId:u.videoId}),I&&(G.startTime=I),mp(p,G),I={targetVideoId:u?.videoId?? "empty_video",targetCpn:R,adVideoId:f?.videoId??"empty_video",adClientPlaybackNonce:B?.cpn??f?.clientPlaybackNonce},B&&(I.adBreakType=B.adBreakType,I.adType=B.adType),g.sT(I,p),Dq(r,w,p))):(r=this.Jf,p=this.videoData.clientPlaybackNonce,u=(0,g.T)(),B=w.videoData,R=`${R.cpn===p?"video":"ad"}_to_${w.cpn===p?"video":"ad"}`,p={},B.iI&&(p.cttAuthInfo={token:B.iI,videoId:B.videoId}),I&&(p.startTime=I),mp(R,p),g.sT({targetVideoId:B.videoId,targetCpn:w.cpn,isSsdai:!0},R),I||Dq(r,u,R))}}else g.hg(this.logger, 360717806,"SSTEvent for nonSS")}T5(){var R=this.Wy;const w=R.Sg;R.Sg=[];return w}dC(R){this.videoData.mG=!0;this.K$(new g.pq("sabr.fallback",R));this.yG(!0)}uh(R,w=!0){this.videoData.S$=!0;w&&(this.K$(new g.pq("qoe.restart",R)),this.yG(!0))}AX(R){this.Ty("sdai",{aftimeout:R});this.K$(new g.pq("ad.fetchtimeout",{timeout:R}))}NQ(R,w){this.Ty("timelineerror",R);R=new g.pq("dai.timelineerror",R);w?this.A$("dai.timelineerror",1,"RETRYABLE_ERROR",Ro(R.details)):this.K$(R)}Ja(){return g.g9(this.HB.provider)}getPlayerSize(){return this.DQ.getPlayerSize()}lA(){return this.DQ.lA()}FD(){return this.Jf}uc(){return this.Wy.uc()}getVolume(){return this.Wy.getVolume()}Pi(){return this.Wy.Pi()}isMuted(){return this.Wy.isMuted()}vJ(){return this.Wy.vJ()}BZ(){this.nF= !0}Y(R){return this.LB.Y(R)}Tk(){return this.LB.Tk()}Fz(R,w,p,r,f){this.Ty("xvt",{m:R,g:w?1:0,tt:p?1:0,np:r?1:0,c:f})}pE(){this.loader?.resume()}jf(){return g.ra(this.Ji,"ad")}oG(){const R=this.getCurrentTime(),w=R-this.vB();var p=this.mediaElement?iV(this.mediaElement.po()):0;p=Math.floor(Math.max(p-w,0))+100;return this.loader?.oG(w,p)?(this.Ty("sdai",{skipad:1,ct:w.toFixed(3),adj:p.toFixed(3)}),Qk(this.videoData)&&this.loader.seek(w+p,{seekSource:89,dB:"videoplayer_skipServerStitchedAd"}),UrI(this.Py, R),!0):!1}dn(){return this.LB.dn()}hU(){if(this.Y("html5_generate_content_po_token"))return this.videoData.QA||"";this.Wy.eH();return this.LB.wg||""}lM(){if(this.videoData.videoId)return this.videoData.Gf}Mw(){return this.videoData.videoId}Xb(){return this.Wy.mP}sX(){return this.TJ}eb(){return this.Wy.eb()}yx(R,w,p){this.I9(ul(this.playerState,16,p));this.Py.yx(R,w,p)}prefetchKeyPlay(R,w){this.loader?.prefetchKeyPlay(R,w)}Tp(R){return this.Py.Tp(R)}Vi(){this.Py.Vi()}wk(R,w){const p=this.Y("html5_generate_content_po_token")? this.videoData:void 0;this.Wy.wk(R,w,p)}x3(){return this.Y("html5_remove_ios_7_hack_force_play")}Hc(R,w){this.HB.Hc(R,w)}R7(){return this.HB.R7()}Uu(){return this.Wy.Uu()}Pr(){return this.Wy.Pr(this)}fq(){this.HA=!0}nw(R){this.loader?.nw(R)}DB(R){this.Py.DB(R)}};g.t=g.oW.prototype;g.t.QI=pd(48);g.t.NO=pd(31);g.t.g_=pd(25);g.t.hp=pd(19);g.t.sP=pd(13);var FI={primary:"Primary",secondary:"Secondary"};var ctk=class extends qj{constructor(R){super(R);this.events=new g.th(R);g.K(this,this.events);N(this.api,"isLifaAdPlaying",()=>this.api.isLifaAdPlaying()); this.events.W(R,Dc(R.V().Tk())?"playbackChange":"serverstitchedvideochange",()=>{this.api.getVideoData()?.L$()&&(this.api.isLifaAdPlaying()?(this.playbackRate=this.api.getPlaybackRate(),this.api.setPlaybackRate(1)):this.api.setPlaybackRate(this.playbackRate))}); this.playbackRate=1}};var Paa=class extends Ap{constructor(R){super("Loop",g.LI.uV);this.B=R;const w=R.Y("delhi_modern_web_player_icons")?{j:"svg",A:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},N:[{j:"path",A:{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"}}]}:AIP();this.setIcon(w);this.subscribe("select",this.O,this);R.createClientVe(this.element,this,28661);this.W(R,"settingsMenuVisibilityChanged",this.C);this.listen("click",this.logClick);this.W(R,"onLoopChange",this.onLoopChange);this.L(R.getLoopVideo());R.Ue().CL(this)}C(R){R&&this.L(this.B.getLoopVideo());this.B.logVisibility(this.element,R)}logClick(){this.B.logClick(this.element)}onLoopChange(R){this.L(R)}O(R){this.B.setLoopVideo(R)}};var aSV=class extends qj{constructor(R){super(R);R.addEventListener("settingsMenuInitialized",()=>{this.menuItem||(this.menuItem=new Paa(this.api),g.K(this,this.menuItem))}); R.addEventListener("videodatachange",(w,p)=>{w=this.api.getPresentingPlayerType()===2;this.menuItem?.Rg(!p.isLivePlayback&&!w)})}};var $6b=class extends qj{constructor(R){super(R);this.events=new g.th(R);g.K(this,this.events);N(this.api,"seekToChapterWithAnimation",w=>{this.seekToChapterWithAnimation(w)}); N(this.api,"seekToTimeWithAnimation",(w,p)=>{this.seekToTimeWithAnimation(w,p)}); N(this.api,"renderChapterSeekingAnimation",(w,p,r)=>{this.api.renderChapterSeekingAnimation(w,p,r)}); N(this.api,"setMacroMarkers",w=>{this.setMacroMarkers(R,w)}); N(this.api,"changeMarkerVisibility",(w,p,r)=>{this.changeMarkerVisibility(w,p,r)}); N(this.api,"isSameMarkerTypeVisible",w=>this.isSameMarkerTypeVisible(w))}seekToChapterWithAnimation(R){if(g.qS(this.api)&&!(R<0)){var w=this.api.getVideoData(),p=w.pL; if(p&&R{f===R&&Td(this,r.timeRangeStartMillis,r.title)})}}seekToTimeWithAnimation(R,w){g.qS(this.api)&&Td(this,R,w)}setMacroMarkers(R,w){w={playerOverlays:{playerOverlayRenderer:{decoratedPlayerBarRenderer:{decoratedPlayerBarRenderer:{playerBar:{multiMarkersPlayerBarRenderer:w}}}}}}; R=R.getVideoData();R.getWatchNextResponse();R&&R.getWatchNextResponse()==null&&(y0(R,{raw_watch_next_response:w}),R.publish("dataupdated"))}changeMarkerVisibility(R,w,p){const r=this.api.getVideoData();if(r){var f=!1;if(R)for(const G of w){if((R=r.Jl)&&!R.includes(G))switch(p){case "CHANGE_MARKERS_VISIBILITY_RESTRICTION_MODE_NOT_OVERWRITE_SAME_TYPE":f7H(G,r)||(f=!0,r.Jl?.push(G));break;case "CHANGE_MARKERS_VISIBILITY_RESTRICTION_MODE_NOT_OVERWRITE_ANY_TYPE":R.length===0&&(f=!0,r.Jl?.push(G));break; default:f=!0,r.Jl?.push(G)}}else for(const G of w)r.visibleOnLoadKeys.includes(G)||g.CR(r.Jl,G)&&(f=!0);f&&this.api.publish("updatemarkervisibility")}}isSameMarkerTypeVisible(R){const w=this.api.getVideoData();return w?f7H(R,w):!1}};var Xkp=class extends qj{constructor(R){super(R);this.events=new g.th(R);g.K(this,this.events);this.events.W(R,"videodatachange",()=>{this.updateMetadata()}); this.events.W(R,"presentingplayerstatechange",()=>{Gld(this)}); this.events.W(R,"SEEK_COMPLETE",()=>{I7b(this)})}updateMetadata(){var R=this.api.getVideoData(); if(R?.n$()){var w=this.api.V(),p=[],r="";if(!w.S){const f=this.api.getVideoData().getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.browserMediaSession?.browserMediaSessionRenderer;g.dQ(w)&&f?(p=CJY(f.thumbnailDetails),f.album&&(r=Fm(f.album))):p=[{src:R.EZ("mqdefault.jpg")||"",sizes:"320x180",type:"image/jpeg"}]}this.api.getVideoData()?.U_()&&I7b(this);Gld(this);uZr(this);navigator.mediaSession.metadata=new MediaMetadata({title:R.title,artist:R.author,artwork:p,album:r});w=R=null;g.Dw(this.api)&& (R=()=>{this.api.nextVideo()},w=()=>{this.api.previousVideo()}); iR("nexttrack",R);iR("previoustrack",w)}}Gy(){navigator.mediaSession.playbackState="none";navigator.mediaSession.metadata=null;const R="nexttrack previoustrack play pause seekbackward seekforward seekto".split(" ");for(const w of R)iR(w,null);this.api.getVideoData()?.U_()&&navigator.mediaSession.setPositionState&&navigator.mediaSession.setPositionState({});super.Gy()}};var nmb=class extends qj{constructor(R){super(R);this.C=new Map;this.K=this.L=void 0;this.compositeVideoState=null;this.O=void 0;this.events=new g.th(R);g.K(this,this.events);this.events.W(R,"modulecreated",w=>{a:{var p=this.api.getVideoData()?.getPlayerResponse()?.overlay?.playerControlsOverlayRenderer;if(p&&(p=g.F(p.compositeVideoOverlay,Al6),p?.sources?.length))for(r of p?.sources)if(r.isActive)break a;var r=void 0}w==="captions"&&r?.topLeftCornerX!==void 0&&r?.topLeftCornerY!==void 0&&r?.width!== void 0&&r?.height!==void 0&&this.api.HZ({top:r.topLeftCornerY,right:1-r.topLeftCornerX-r.width,bottom:1-r.topLeftCornerY-r.height,left:r.topLeftCornerX})}); this.events.W(R,"videodatachange",w=>{const p=this.api.getVideoData();this.L=void 0;this.C.clear();this.api.P1("compositeembargo",1);const r=p?.f2.get("PLAYER_CUE_RANGE_SET_IDENTIFIER_EMBARGO");r?.length?s8d(this,r.filter(f=>f.onEnter?.some(this.G))):p?.cueRanges&&s8d(this,p.cueRanges.filter(f=>f.onEnter?.some(this.G))); w==="dataupdated"&&p?.compositeLiveStatusToken!==this.K&&(this.K=p?.compositeLiveStatusToken,this.api.e$())}); this.events.W(R,g.bp("compositeembargo"),w=>{if(this.L?.id!==w.id&&(this.api.SN(!0),this.C.has(w.id))){var p=this.C.get(w.id),r=this.api.getVideoData();for(const f of p)p=f.compositeEmbargo?.embargoStatusToken,r.jb!==p&&(r.jb=p,this.api.e$()),mwd(this,w)}}); this.events.W(R,g.yl("compositeembargo"),w=>{if(this.L?.id===w.id&&(this.api.SN(!1),this.C.has(w.id))){if(w=this.api.getVideoData())w.jb=void 0;this.api.e$();mwd(this)}}); this.events.W(R,"heartbeatRequest",w=>{this.compositeVideoState!==null&&(w.playbackState||(w.playbackState={}),w.playbackState.compositeVideoState=this.compositeVideoState)}); this.events.W(R,"internalaudioformatchange",(w,p)=>{const r=this.api.getVideoData({Lo:!1});r?.Ty("atrkchg",{id:w,m:p});if(r&&!r.LU()){p=this.api.getAvailableAudioTracks();for(const f of p)if(f.getLanguageInfo().getId()===w){this.api.V().U0=w;break}}}); this.events.W(R,"onPlaybackAudioChange",()=>{this.api.e$();if(R.getVideoData()?.V().Y("html5_preload_on_mosaic_audio_track_change")){const w=this.api.getSourceConfigForActiveAudioTrack();w&&R.preloadVideoByPlayerVars({videoId:w.videoId,live_preload:!0},1)}}); N(R,"setCompositeParam",w=>{this.compositeVideoState=w}); this.api.Y("web_watch_enable_multiview_manager")&&N(R,"setCompositeVideoOverlayRendererComponent",w=>{this.setCompositeVideoOverlayRendererComponent(w)})}setCompositeVideoOverlayRendererComponent(R){this.O&&(this.O.remove(),g.fc(this.O,"ytp-composite-video-overlay-renderer"),this.O=void 0); R&&(g.pc(R,"ytp-composite-video-overlay-renderer"),g.P7(this.api,R,4),this.O=R)}G(R){return R.compositeEmbargo!==void 0}Gy(){super.Gy();this.C.clear()}};var d6a=class extends qj{constructor(R){super(R);this.events=new g.th;g.K(this,this.events);this.events.W(R,"applicationInitialized",()=>{({handleError:w=qb,logEvent:p=g.Rv}={});var w;for(LX=new YKD(w,p);qA.length>0;){var p=qA.shift();switch(p.type){case "ERROR":LX.qP(p.payload);break;case "EVENT":LX.logEvent(p.eventType,p.payload)}}}); N(this.api,"queueOfflineAction",this.queueOfflineAction.bind(this));N(this.api,"updateDownloadState",this.updateDownloadState.bind(this));N(this.api,"pauseVideoDownload",this.pauseVideoDownload.bind(this));N(this.api,"resumeVideoDownload",this.resumeVideoDownload.bind(this));N(this.api,"isOrchestrationLeader",this.isOrchestrationLeader.bind(this));N(this.api,"refreshAllStaleEntities",this.refreshAllStaleEntities.bind(this));N(this.api,"setUpPositionSyncInterval",this.setUpPositionSyncInterval.bind(this))}async queueOfflineAction(R, w,p,r){const f=iN(this.api.tf());return f&&(R=await f.bO([R],w,p,r),R.length)?R[0]:Promise.reject()}updateDownloadState(R,w){const p=iN(this.api.tf());return p?p.updateDownloadState(R,w):Promise.reject()}pauseVideoDownload(R){const w=iN(this.api.tf());w&&w.K5(R)}async resumeVideoDownload(R){const w=iN(this.api.tf());return w?w.vP(R):Promise.reject()}isOrchestrationLeader(){return this.api.isOrchestrationLeader()}refreshAllStaleEntities(R){R===void 0&&(R=14400);const w=iN(this.api.tf());return w?w.refreshAllStaleEntities(R): Promise.reject()}setUpPositionSyncInterval(R){const w=iN(this.api.tf());w&&w.setUpPositionSyncInterval(R)}};var ZRa=class extends qj{constructor(R){super(R);this.loaded=!1;this.overlay=null;this.events=new g.th(R);g.K(this,this.events);this.L=new g.th(R);g.K(this,this.L);this.events.W(R,"modulesCreated",()=>{this.HM()&&this.load()}); this.events.W(R,"modulesDestroyed",w=>{let p=!0;switch(w){case 2:case 3:p=!1;break;case 4:p=this.api.getPresentingPlayerType()===1}p&&this.unload()})}HM(){var R=this.api.getVideoData(); return R.sF&&!R.Sp}load(){this.loaded||g.Cb(this.api.V())||(this.overlay=new g.k({j:"div",E0:["ytp-ypc-clickwrap-overlay","ytp-player-content"],N:[{j:"h2",Z:"ytp-ypc-clickwrap-header",fB:"Would you like to start this rental?"},{j:"div",Z:"ytp-ypc-clickwrap-description",fB:this.api.getVideoData().Le},{j:"button",E0:["ytp-ypc-clickwrap-confirm","ytp-button"],fB:"Start rental period"}]}),g.K(this,this.overlay),g.P7(this.api,this.overlay.element,4),this.overlay.W(this.overlay.KB("ytp-ypc-clickwrap-confirm"), "click",()=>{this.onConfirm()}),this.loaded=!0)}onConfirm(){this.overlay&&this.overlay.hide(); this.L.W(this.api,"videodatachange",()=>{this.api.lr("ypcRentalActivation")}); this.api.lr("ypcRentalActivation")}unload(){this.loaded&&(this.overlay&&(this.overlay.dispose(),this.overlay=null),this.L.C(),this.loaded=!1)}Gy(){this.unload();super.Gy()}};var YiU=class extends qj{constructor(R){super(R);N(R,"getAvailableQualityData",()=>this.getAvailableQualityData()); N(R,"getAvailableQualityDataAndMessaging",()=>this.getAvailableQualityDataAndMessaging()); N(R,"getPaygatedAudioQualityData",()=>this.getPaygatedAudioQualityData())}getAvailableQualityDataAndMessaging(){return{qualityData:this.getAvailableQualityData(), qualityMessagingFormattedString:void 0}}getAvailableQualityData(){var R=this.api.getVideoData();if(!R)return[];var w=[],p=R.getPlayerResponse()?.playabilityStatus?.paygatedQualitiesMetadata,r=zHY(p),f=p?.restrictedAdaptiveFormats;if(f){p=[];for(var G of f){if(G.mimeType?.includes("audio")&&this.api.Y("enable_lr_upsell_for_premium_high_quality_audio"))continue;f=ao(G.mimeType,G.quality,G.itag.toString(),G.width.toString(),G.height.toString(),G.qualityLabel,G.qualityOrdinal&&Vod[G.qualityOrdinal]); p.push(f)}R=g.P4(R);DH(p);G=[];for(var I of p)Oz(R,I,this.api.V().K)===!0&&G.push(I);w=w.concat(BKl(G,!1,r))}I=this.api.Q7();w=w.concat(BKl(I,!0,r));r=[];if(this.api.Y("web_player_enable_premium_hbr_in_h5_api")){I=w;w=new Set;r=new Map;var C={};for(var u of I)I=u.quality,p=u.isPlayable,(R=u.qualityLabel)&&I&&(p&&r.has(I)&&r.get(I)!==R?w.add(I):p&&r.set(I,R),C[R]||(C[R]=u));u=[];for(var m of Object.values(C))C=m.quality,r=m,C&&!w.has(C)&&(r.formatId=void 0),u.push(r);m=w=u;u=0;for(C=0;Cthis.O}; this.events=new g.th(R);g.K(this,this.events);this.events.W(R,"d6de4videobindingchange",w=>{this.Q0(w)}); this.events.W(R,"csiinitialized",()=>{xwb(this)})}Q0(R){if(hd())if(!this.C&&this.L){R.Gf={coldStartInfo:{clientState:this.O}}; try{this.L.then(()=>{l7d(this,R)},w=>{go(w,"player_update"); this.handleError(w,R)})}catch(w){go(w,"player_update_catch"),this.handleError(w,R)}}else this.C?l7d(this,R):this.api.Ty("pf",{m:this.C?1:0, p:this.L?1:0})}handleError(R,w){g.AO(R);let p=0;R.mediaIntegrityErrorName?p||(p=Fbp[R.mediaIntegrityErrorName]):R.code&&(p=R.code());w.Gf={hS:{code:p}}}};var JtU=class extends g.k{constructor(R){super({j:"button",E0:["ytp-pip-button","ytp-button"],A:{title:R.Y("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"},N:[mj()]});this.api=R;this.listen("click",this.onClick);const w=this.api.Z5(),p=w.subscribe("visibilitystatechange",()=>{this.WS(w.W0())}); this.addOnDisposeCallback(()=>{w.Cv(p)}); or(R,this.element,this);this.WS(w.W0())}WS(R){R=R?"Exit picture-in-picture":"Picture-in-picture";this.api.V().Y("player_tooltip_data_title_killswitch")?this.update({title:R,"data-title-no-tooltip":R}):this.update({"data-tooltip-title":R,"data-title-no-tooltip":R});this.api.wl()}onClick(){this.api.togglePictureInPicture()}};var Taa=class extends qj{constructor(R){super(R);this.events=new g.th(R);g.K(this,this.events);this.events.W(R,"standardControlsInitialized",()=>{this.createButton()}); g.t5(this.api.V())&&(this.Y("web_watch_pip")||this.Y("web_shorts_pip"))&&N(this.api,"setDocumentPictureInPicture",w=>{this.setDocumentPictureInPicture(w)})}createButton(){this.button=new JtU(this.api); g.K(this,this.button);this.api.GA(this.button);this.events.W(this.api,"videodatachange",()=>{Llb(this)}); Llb(this)}setDocumentPictureInPicture(R){this.api.Z5().VS(R);R=this.api.W0();const w=RzI(this.api.tf());w&&(R?w.load():w.unload());this.api.publish("documentpictureinpicturechange")}};var iRk=class extends qj{constructor(R){super(R);this.loaded=!1;this.U=0;this.L=!1;this.D={};this.O=[];this.G=0;this.J=!1;this.events=new g.th(R);g.K(this,this.events);this.C=new g.th(R);g.K(this,this.C);this.events.W(R,"modulesCreated",()=>{this.HM()&&this.load()}); this.events.W(R,"modulesDestroyed",w=>{const p=this.api.getPresentingPlayerType();switch(w){case 2:case 3:w=p!==1&&!(p===5||p===6||p===7);break;case 4:w=!this.L;break;default:w=!0}w&&this.unload()})}HM(){return this.api.getVideoData().XL.includes("playableSequences")}load(){if(!this.loaded){this.K||(this.K=new g.k({j:"div", E0:["ytp-player-content","ytp-yto-overlay"],N:[{j:"div",E0:["ytp-yto-preroll-message"],fB:"Video will begin shortly"}]}),g.K(this,this.K),qRd(this,!1),g.P7(this.api,this.K.element,4));var R=this.api.getPresentingPlayerType();this.C.W(this.api,"playbackChange",()=>{var w=this.api.getPresentingPlayerType()===5;g.M(this.api.getRootNode(),"ytp-yto-preroll",w);qRd(this,w)}); this.C.W(this.api,"presentingplayerstatechange",w=>{this.onStateChange(w)}); this.C.W(this.api,g.bp("yto"),(w,p)=>{this.onCueRangeEnter(w,p)}); this.C.W(this.api,"ytoprerollinternstitialnext",()=>{b7x(this)}); y3d(this);this.loaded=!0;this.api.lr("playableSequences",R)}}onCueRangeEnter(R){R=R.getId();if(!this.L){if(this.api.getPlayerStateObject(1).L(2)){if(this.J)return}else this.J=!1;this.O.includes(R)||this.O.push(R);this.api.getPresentingPlayerType()===1&&A3D(this)}}onStateChange(R){var w=this.api.getPresentingPlayerType();R=R.state;this.L||w!==5&&w!==6&&w!==7||R.L(1)||R.L(16)||R.L(32)||(w=R.L(128),(R.L(2)||w)&&b7x(this))}unload(){this.loaded&&(this.U=0,this.J=this.L=!1,this.D={},this.G=0,this.O.length= 0,this.C.C(),this.loaded=!1)}Gy(){this.unload();super.Gy()}};var QMP=class{constructor(R=200){this.O=R;this.C=this.L=void 0}async delete(R){await V$D(this);if(this.L)try{const w=g.Qx(R,"videoPlaybackPositionEntity");await g.AB(this.L,w);this.C===R&&(this.C=void 0)}catch(w){throw Error("Failed to delete playback position",{cause:w});}}};var hVM=class extends qj{constructor(R){super(R);R=R.V().Tk().L.vS(OsY);const w=new QMP(Number(R)||void 0);N(this.api,"addOrUpdateOnlinePlaybackPosition",(p,r,f)=>t$r(w,p,r,f)); N(this.api,"deleteOnlinePlaybackPosition",p=>w.delete(p))}};var gmm=class extends qj{constructor(R){super(R);this.events=new g.th(R);g.K(this,this.events);N(this.api,"musicDisableUi",()=>{g.pc(this.api.getRootNode(),"ytp-player-in-bar-disable-ui")}); N(this.api,"musicEnableUi",()=>{g.fc(this.api.getRootNode(),"ytp-player-in-bar-disable-ui")})}};var aP=class extends g.k{constructor(R,w=!0,p=!1){super({j:"div",Z:"ytp-suggested-action"});this.B=R;this.Qk=w;this.uo=this.Jl=this.PS=this.M0=this.O=this.O0=this.expanded=this.enabled=this.yh=!1;this.pL=new g.vZ(()=>{this.badge.element.style.width=""},200,this); this.p_=new g.vZ(()=>{Hd(this);vd(this)},200,this); this.f_=this.B.Y("delhi_modern_web_player")?40:34;this.dismissButton=new g.k({j:"button",E0:["ytp-suggested-action-badge-dismiss-button-icon","ytp-button"]});g.K(this,this.dismissButton);this.K=new g.k({j:"div",Z:"ytp-suggested-action-badge-expanded-content-container",N:[{j:"label",Z:"ytp-suggested-action-badge-title",fB:"{{badgeLabel}}"},this.dismissButton]});g.K(this,this.K);this.J=new g.k({j:"div",Z:"ytp-suggested-action-badge-icon",fB:"{{icon}}",A:{"aria-hidden":"true"}});g.K(this,this.J);this.jI= new g.k({j:"div",Z:"ytp-suggested-action-badge-icon-container"});w&&this.J.gN(this.jI.element);g.K(this,this.jI);this.badge=new g.k({j:p?"div":"button",E0:["ytp-button","ytp-suggested-action-badge","ytp-suggested-action-badge-with-controls"],N:[this.jI,this.K]});g.K(this,this.badge);this.badge.gN(this.element);this.I0=new g.HU(this.badge,250,!1,100,()=>{this.B.Y("web_player_overlay_positioned_layout")&&this.hide()}); g.K(this,this.I0);R.Y("web_player_overlay_positioned_layout")&&this.hide();this.Af=new g.HU(this.K,250,!1,100);g.K(this,this.Af);this.Ml=new g.hf(this.sZ,null,this);g.K(this,this.Ml);this.WB=new g.hf(this.wg,null,this);g.K(this,this.WB);g.K(this,this.pL);g.K(this,this.p_);this.B.createServerVe(this.badge.element,this.badge,!0);this.B.createServerVe(this.dismissButton.element,this.dismissButton,!0);this.W(this.B,"onHideControls",()=>{this.N0(!1)}); this.W(this.B,"onShowControls",()=>{this.N0(!0)}); this.W(this.badge.element,"click",this.YY);this.W(this.dismissButton.element,"click",this.U);this.W(this.B,"pageTransition",this.a9);this.W(this.B,"appresize",this.C);this.W(this.B,"fullscreentoggled",this.Ww);this.W(this.B,"cardstatechange",this.Pw);this.W(this.B,"annotationvisibility",this.qH,this);this.W(this.B,"offlineslatestatechange",this.MO,this)}YY(){}U(){}X(){return!0}sZ(){let R;this.expanded?(this.Af.show(),R=this.K.element.scrollWidth):(R=this.K.element.scrollWidth,this.Af.hide());this.GE= this.f_+R;g.M(this.badge.element,"ytp-suggested-action-badge-expanded",this.expanded);this.badge.element.style.width=`${this.expanded?this.f_:this.GE}px`;this.WB.start()}wg(){this.badge.element.style.width=`${this.expanded?this.GE:this.f_}px`;this.pL.start()}q0(){this.O&&this.B.logVisibility(this.badge.element,this.X());this.M0&&this.B.logVisibility(this.dismissButton.element,this.X()&&this.SI())}N0(R){this.PS=R;vd(this);Hd(this);this.C()}MO(){g.M(this.badge.element,"ytp-suggested-action-badge-with-offline-slate", !0)}SI(){return this.Jl||this.PS||!this.O0}C(){this.X()?(this.show(),this.I0.show()):this.I0.hide();this.q0()}a9(){this.enabled=!1;this.C()}D(R){R?this.M0&&this.B.logClick(this.dismissButton.element):this.O&&this.B.logClick(this.badge.element)}qH(){this.C()}Pw(R){this.uo=R===1;this.C();g.M(this.badge.element,"ytp-suggested-action-badge-with-offline-slate",!1)}Ww(){g.M(this.badge.element,"ytp-suggested-action-badge-fullscreen",this.B.isFullscreen());this.C()}};var $a=class extends g.RX{constructor(R,w,p,r,f,G){const I={j:"div",Z:"ytp-panel"};let C,u,m;if(p){C="ytp-panel-back-button";u="ytp-panel-title";const z={j:"div",Z:"ytp-panel-header",N:[{j:"div",E0:["ytp-panel-back-button-container"],N:[{A:{"aria-label":"Back to previous menu"},j:"button",E0:["ytp-button",C]}]},{j:"span",E0:[u],A:{role:"heading","aria-level":"2"},N:[p]}]};f&&(m="ytp-panel-options",z.N.push({j:"button",E0:["ytp-button",m],N:[r]}));I.N=[z]}r=!1;G&&(G={j:"div",Z:"ytp-panel-footer",N:[G]}, r=!0,I.N?I.N.push(G):I.N=[G]);super(I);this.content=w;r&&I.N?w.gN(this.element,I.N.length-1):w.gN(this.element);this.dZ=!1;this.WD=r;p&&(this.backButton=this.KB(C),p=this.KB(u),this.W(this.backButton,"click",this.Et),this.W(p,"click",this.Et),this.dZ=!0,f&&this.W(this.KB(m),"click",f));w.subscribe("size-change",this.lZ,this);this.W(R,"fullscreentoggled",this.lZ);this.B=R}lZ(){this.publish("size-change")}fu(){return Nf(this)}Gi(){return Nf(this)}focus(){this.content.focus()}Et(){this.publish("back")}};g.X2=class extends $a{constructor(R,w=null,p,r,f,G){const I={role:"menu"};w&&(I.id=w);w=new g.RX({j:"div",Z:"ytp-panel-menu",A:I});super(R,w,p,r,f,G);this.menuItems=w;this.items=[];g.K(this,this.menuItems)}CL(R,w=!1){if(w)this.items.push(R),this.menuItems.element.appendChild(R.element);else{w=g.VU(this.items,R,Dw_);if(w>=0)return;w=~w;g.q6(this.items,w,0,R);Wc(this.menuItems.element,R.element,w)}R.subscribe("size-change",this.Wg,this);this.menuItems.publish("size-change")}fu(){Nf(this)||this.items[0].focus(); return!0}Gi(){this.items[this.items.length-1].focus();return!0}EK(R){R.unsubscribe("size-change",this.Wg,this);this.cS()||(g.CR(this.items,R),this.menuItems.element.removeChild(R.element),this.menuItems.publish("size-change"))}Wg(){this.menuItems.publish("size-change")}focus(){let R=0;for(let w=0;w1&&g.SX(this)}q7(){M$6(this);this.K_&&(eHW(this),g.SE(this.element,this.size))}ID(){const R=this.L.pop();UJ(this,R,this.L[this.L.length-1],!0)}R3(R){if(!R.defaultPrevented)switch(R.keyCode){case 27:this.Qh();R.preventDefault();break;case 37:this.L.length>1&&this.ID();R.preventDefault();break;case 39:R.preventDefault()}}focus(){this.L.length&&this.L[this.L.length- 1].focus()}Gy(){super.Gy();this.O&&this.O.dispose();this.G&&this.G.dispose()}};var HRa=class extends g.nI{constructor(R){super(R,"ytp-shopping-product-menu");this.bI=new g.X2(this.B);g.K(this,this.bI);this.hide();g.Rk(this,this.bI);g.P7(this.B,this.element,4)}open(R,w){this.initialize(R.items)&&this.R9(w,!!w)}initialize(R){g.k_(this.bI);if(R===void 0||R.length===0)return!1;let w=R.length;for(const p of R)this.CL(p,w--);return!0}CL(R,w){R.menuNavigationItemRenderer?a7d(this,R.menuNavigationItemRenderer,w):R.menuServiceItemRenderer&&$wD(this,R.menuServiceItemRenderer,w)}};var vmt=class extends aP{constructor(R){super(R,!1,!0);this.isCounterfactual=this.G=this.isVisible=this.isInitialized=this.shouldShowOverflowButton=this.shouldHideDismissButton=!1;this.O0=!0;this.overflowButton=new g.k({j:"button",E0:["ytp-featured-product-overflow-icon","ytp-button"],A:{"aria-haspopup":"true"}});this.overflowButton.hide();g.K(this,this.overflowButton);this.badge.element.classList.add("ytp-suggested-action");this.thumbnailImage=new g.k({j:"img",Z:"ytp-suggested-action-badge-img", A:{src:"{{url}}"}});this.thumbnailImage.hide();g.K(this,this.thumbnailImage);this.thumbnailIcon=new g.k({j:"div",Z:"ytp-suggested-action-badge-icon"});this.thumbnailIcon.hide();g.K(this,this.thumbnailIcon);this.banner=new g.k({j:"a",Z:"ytp-suggested-action-container",N:[this.thumbnailImage,this.thumbnailIcon,{j:"div",Z:"ytp-suggested-action-details",N:[{j:"text",Z:"ytp-suggested-action-title",fB:"{{title}}"},{j:"text",Z:"ytp-suggested-action-subtitle",fB:"{{subtitle}}"},{j:"text",Z:"ytp-suggested-action-metadata-text", fB:"{{metadata}}"}]},this.dismissButton,this.overflowButton]});g.K(this,this.banner);this.banner.gN(this.K.element);this.W(this.B,"videodatachange",this.onVideoDataChange);this.W(this.B,g.bp("suggested_action_view_model"),this.mq);this.W(this.B,g.yl("suggested_action_view_model"),this.Mr);this.W(this.overflowButton.element,"click",this.eI);this.W(R,"featuredproductdismissed",this.U);this.B.createServerVe(this.banner.element,this.banner,!0)}YY(R){R.target!==this.dismissButton.element&&R.target!==this.overflowButton.element&& (this.D(),this.onClickCommand&&g.m1(this.B,"innertubeCommand",this.onClickCommand))}U(){this.enabled=!1;this.I0.hide()}X(){return!!this.L&&this.enabled}onVideoDataChange(R,w){this.nB(w);if(this.L){this.U0();a:if(!this.isCounterfactual){this.banner.update({title:this.L?.title,subtitle:this.L?.subtitle,metadata:this.L?.metadataText});this.onClickCommand=g.F(this.L?.onTap,tO);if(R=g.F(this.L?.onOverflow,tO))this.xY=g.F(R,RTW);if(this.L?.thumbnailImage){R=this.L?.thumbnailImage?.sources||[];if(R.length=== 0)break a;this.thumbnailImage.update({url:R[0].url})}else this.L?.thumbnailIconName&&this.thumbnailIcon.update({icon:this.L?.thumbnailIconName});this.shouldShowOverflowButton=!!this.L?.shouldShowOverflowButton;this.shouldHideDismissButton=!!this.L?.shouldHideDismissButton}this.banner.element.setAttribute("aria-label",this.L?.a11yLabel||"");this.cB=this.L?.dismissButtonA11yLabel;this.dismissButton.hide();this.overflowButton.hide();this.isInitialized=!0;p8(this)}}mq(){this.isVisible=!0;p8(this)}Mr(){this.isVisible= !1;p8(this)}q0(){super.q0();this.G&&this.B.logVisibility(this.banner.element,this.isVisible)}D(){super.D(!1);this.G&&this.B.logClick(this.banner.element)}eI(R){this.S||(this.S=new HRa(this.B),g.K(this,this.S));this.xY?.menu?.menuRenderer&&(this.S.open(this.xY.menu.menuRenderer,R.target),R.preventDefault())}nB(){}U0(){}Gy(){this.B.P1("suggested_action_view_model");super.Gy()}};var Nap=class extends vmt{nB(R){this.productUpsellSuggestedActionViewModel=g.F(R.getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.suggestedActionViewModel,j__);this.productUpsellSuggestedActionViewModel?.content&&(this.L=g.F(this.productUpsellSuggestedActionViewModel?.content,DBx));(this.G=!!this.productUpsellSuggestedActionViewModel?.loggingDirectives?.trackingParams)&&this.B.setTrackingParams(this.banner.element,this.productUpsellSuggestedActionViewModel?.loggingDirectives?.trackingParams|| null);this.isCounterfactual=!!this.productUpsellSuggestedActionViewModel?.isCounterfactualServing}U0(){const R=[];for(const w of this.productUpsellSuggestedActionViewModel?.ranges||[]){if(!w)continue;const p=Number(w.startTimeMilliseconds),r=Number(w.endTimeMilliseconds);isNaN(p)||isNaN(r)||R.push(new g.Ja(p,r,{id:"product_upsell",namespace:"suggested_action_view_model"}))}this.B.C3(R)}};var kp6=class extends qj{constructor(R){super(R);this.L=new Nap(this.api);g.K(this,this.L);g.P7(this.api,this.L.element,4)}};var U6M=class extends qj{constructor(R){super(R);this.L=!0;const w=new g.th(R);g.K(this,w);w.W(R,"internalaudioformatchange",(p,r)=>{FlH(this,p,r)}); w.W(R,"annotationvisibility",p=>{this.api.Y("web_fix_annotations")&&YRI(this,(294).toString(),{boolValue:p})}); w.W(R,"videoplayerreset",()=>{f8(this)}); w.W(R,"videodatachange",(p,r)=>{this.onVideoDataChange(p,r)})}onVideoDataChange(R,w){w.LU()&&(R==="newdata"&&f8(this),this.L&&R==="dataloaded"&&(this.L=!1,$3(PQ(X7(this.api.V(),this.api.getVideoData()?.J()),p=>{J3Y(this,p)}),()=>{this.L=!0})))}QC(){if(g.I1(this.api.V())){const R=g.$W(this.api.V(),this.api.getVideoData()?.J()); return PQ(e3(R),w=>{const p=XV();ng(p,w);return this.api.QC(p)})}return e3(this.api.QC())}};var i7l=class{constructor(){this.label="Auto-dubbed"}};g.d_=class extends g.wv{constructor(R,w,p,r,f,G,I){super(g.Ys({"aria-haspopup":"true"}),w,R);this.OQ=r;this.M0=!1;this.U=null;this.options={};this.UC=new g.X2(p,void 0,R,f,G,I);g.K(this,this.UC);this.listen("keydown",this.R3);this.listen("click",this.open)}open(){g.Rk(this.OQ,this.UC)}C(R){TKI(this);const w=this.options[R];w&&(w.element.setAttribute("aria-checked","true"),this.setContent(this.O(R)),this.U=R)}G(R){g.k_(this.UC);const w={};let p=!1;for(let r=0;r{this.Jl(R)}); return w}enable(R){this.M0?R||(this.M0=!1,this.D(!1)):R&&(this.M0=!0,this.D(!0))}D(R){R?this.OQ.CL(this):this.OQ.EK(this)}L(R){this.publish("select",R)}Jl(R){this.L(R)}O(R){return R.toString()}R3(R){R.defaultPrevented||R.keyCode!==39||(this.open(),R.preventDefault())}Gy(){this.M0&&this.OQ.EK(this);super.Gy();for(const R of Object.keys(this.options))this.options[R].dispose()}};var Sib=class extends g.d_{constructor(R,w){super("Sleep timer",g.LI.SLEEP_TIMER,R,w);this.B=R;this.jI={};this.xY=this.K("Off");this.O0=this.J="";R.Y("web_settings_menu_icons")&&(w=R.Y("delhi_modern_web_player_icons")?{j:"svg",A:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},N:[{j:"path",A:{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",A:{height:"24",viewBox:"0 0 24 24",width:"24"},N:[{j:"path",A:{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(w)); this.S=new g.k({j:"div",E0:["ytp-menuitem-label-wrapper"],N:[{j:"div",fB:"End of video"},{j:"div",E0:["ytp-menuitem-sublabel"],fB:"{{content}}"}]});g.K(this,this.S);this.listen("click",this.onClick);this.W(R,"videodatachange",this.onVideoDataChange);this.W(R,"presentingplayerstatechange",this.WS);this.W(R,"settingsMenuVisibilityChanged",this.PS);R.createClientVe(this.element,this,218889);this.WS();g.m1(this.B,"onSleepTimerFeatureAvailable")}WS(){const R=this.K("Off");this.B.getPresentingPlayerType()!== 2?(gQI(this),this.C(this.xY),this.J&&(this.xY===R?this.J="":this.setSleepTimerTimeLeft(this.J)),this.O0&&this.setVideoTimeLeft(this.O0),this.enable(!0)):(this.G([]),this.enable(!1))}L(R){this.I0(R);this.OQ.ID()}K(R){switch(R){case "Off":return"Off";case "End of video":return"End of video";case "End of playlist":return"End of playlist";default:return`${R.toString()} Minutes`.toLowerCase()}}I0(R){const w=this.jI[R],p=w==="End of video"||w==="End of playlist";w==="Off"&&(this.J="");this.B.getPlayerState()!== 0&&this.B.getPlayerState()!==5||!p?(this.xY=R,super.L(R),this.C(R),g.m1(this.B,"onSleepTimerSettingsChanged",w)):g.m1(this.B,"innertubeCommand",{openPopupAction:{popupType:"TOAST",popup:{notificationActionRenderer:{responseText:{simpleText:"Video has already ended"}}}}})}onVideoDataChange(R){R==="dataloaded"&&gQI(this)}PS(R){this.B.logVisibility(this.element,R)}onClick(){this.B.logClick(this.element)}resetSleepTimerMenuSettings(){this.I0(this.K("Off"))}setSleepTimerTimeLeft(R){this.J=R;this.setContent(R)}setVideoTimeLeft(R){this.O0= R;this.S.setContent(R)}};var RZb=class extends qj{constructor(R){super(R);R.addEventListener("settingsMenuInitialized",()=>{this.menuItem||(this.menuItem=new Sib(this.api,this.api.Ue()),g.K(this,this.menuItem))}); R.addEventListener("openSettingsMenuItem",w=>{w==="menu_item_sleep_timer"&&(this.menuItem||this.api.Ue()?.R9(),this.menuItem.open())}); N(R,"resetSleepTimerMenuSettings",()=>{this.resetSleepTimerMenuSettings()}); N(R,"setSleepTimerTimeLeft",w=>{this.setSleepTimerTimeLeft(w)}); N(R,"setVideoTimeLeft",w=>{this.setVideoTimeLeft(w)})}resetSleepTimerMenuSettings(){this.menuItem&&this.menuItem.resetSleepTimerMenuSettings()}setSleepTimerTimeLeft(R){this.menuItem&&this.menuItem.setSleepTimerTimeLeft(R)}setVideoTimeLeft(R){this.menuItem&&this.menuItem.setVideoTimeLeft(R)}};var wwb=class extends qj{constructor(R){super(R);this.events=new g.th(R);g.K(this,this.events);this.events.W(R,"onSnackbarMessage",w=>{switch(w){case 1:this.api.getPlayerStateObject().isBuffering()&&g.m1(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 H7D; g.Aq=class extends g.HC{constructor(R,w=!1,p,r=!1,f=!1){super();this.I0=f;this.S=!1;this.G=new ag(this);this.K=this.D=null;this.O=this.C=!1;g.K(this,this.G);this.target=R;this.L=w;this.xY=p||R;this.S=r;w&&(g.f$&&this.target.setAttribute("draggable","true"),f||(this.target.style.touchAction="none"));Ik(this)}W(R,w){this.G.W(this.xY,R,w,void 0,!this.L)}cancel(){this.O&&(this.O=!1,this.publish("dragend",0,0,null));this.C&&(this.C=!1,this.publish("hoverend",0,0,null),C8(this),Ik(this))}oS(R){C8(this);this.W(Gx("move"), this.X);this.W(Gx("out"),this.a_);this.W("touchstart",this.U);this.L&&this.W(Gx("down"),this.J);const w=R.target;R=new g.Xx(R.pageX,R.pageY);this.C=!0;this.publish("hoverstart",R.x,R.y,w);this.publish("hovermove",R.x,R.y,w)}X(R){const w=R.target;R=new g.Xx(R.pageX,R.pageY);if(this.K){const p=this.K;this.K=null;if(p.relatedTarget===w&&n0(new g.Xx(p.pageX,p.pageY),R))return}this.publish("hovermove",R.x,R.y,w)}a_(R){const w=new g.Xx(R.pageX,R.pageY),p=R.relatedTarget;try{if(p&&g.lA(this.target,p)){this.K= R;this.publish("hovermove",w.x,w.y,p);return}}catch(r){}C8(this);Ik(this);this.C=!1;this.publish("hoverend",w.x,w.y,p)}jI(R){this.oS(R);this.J(R)}J(R){if(typeof R.button!=="number"||R.button===0){C8(this);this.G.W(uN(R.target),Gx("move"),this.Jl);this.G.W(uN(R.target),Gx("up"),this.O0);var w=R.target;if(g.f$)this.W("dragstart",this.M0);else if(R.preventDefault(),(g.ef||jE)&&w)a:{let p=w;for(;p;){if(AG(p)||p.getAttribute("tabindex")==="-1"){p.focus();break a}p=p.parentElement}uN(w).activeElement.blur()}this.O= !0;R=new g.Xx(R.pageX,R.pageY);this.publish("dragstart",R.x,R.y,w);this.publish("dragmove",R.x,R.y,w)}}M0(R){R.preventDefault()}Jl(R){let w=R.target;w===uN(R.target)&&(w=null);R=new g.Xx(R.pageX,R.pageY);this.publish("hovermove",R.x,R.y,w);this.publish("dragmove",R.x,R.y,w)}O0(R){C8(this);this.O=!1;const w=jN(R),p=R.target;R=new g.Xx(R.pageX,R.pageY);w&&g.lA(this.target,w)?(this.W(Gx("move"),this.X),this.W(Gx("out"),this.a_),this.W(Gx("down"),this.J),this.W("touchstart",this.U),this.publish("dragend", R.x,R.y,p)):(Ik(this),this.C=!1,this.publish("dragend",R.x,R.y,p),this.publish("hoverend",R.x,R.y,p))}U(R){const w=R.changedTouches[0];w&&(C8(this),this.I0||(this.W("touchmove",this.PS),this.W("touchend",this.pB),this.W("touchcancel",this.pB),this.D=w.identifier,R=R.target,this.C||(this.C=!0,this.publish("hoverstart",w.pageX,w.pageY,R)),this.publish("hovermove",w.pageX,w.pageY,R),this.L&&(this.O=!0,this.publish("dragstart",w.pageX,w.pageY,R),this.publish("dragmove",w.pageX,w.pageY,R))))}PS(R){const w= vQl(this,R);w&&(this.L&&R.preventDefault(),R=R.target,this.publish("hovermove",w.pageX,w.pageY,R),this.L&&this.publish("dragmove",w.pageX,w.pageY,R))}pB(R){const w=vQl(this,R);if(w){C8(this);Ik(this);this.C=!1;const p=R.target;this.L&&(this.S||R.preventDefault(),this.O=!1,this.publish("dragend",w.pageX,w.pageY,p));this.publish("hoverend",w.pageX,w.pageY,p)}}Gy(){this.L&&(g.f$&&this.target.removeAttribute("draggable"),this.target.style.touchAction="");C8(this);super.Gy()}};H7D=!1;var pwM=class extends g.k{constructor(R,w){super({j:"div",E0:["ytp-overlay","ytp-speedmaster-overlay"],N:[{j:"div",Z:"ytp-speedmaster-user-edu",N:[{j:"div",Z:"ytp-speedmaster-label",fB:w},{j:"div",Z:"ytp-speedmaster-icon",fB:"{{icon}}"}]}]});this.B=R;this.L=this.KB("ytp-speedmaster-user-edu");this.updateValue("icon",rIL());g.pc(this.L,"ytp-speedmaster-has-icon");this.B.createClientVe(this.L,this,173040,!0);this.K()}K(){g.Z2(this.element,"display","none");this.B.logVisibility(this.L,!1)}};var r$a=class extends qj{constructor(R){super(R);this.G=this.O=!1;this.C=new g.th(R);g.K(this,this.C);this.X="2x";this.speedmasterUserEdu=new pwM(R,this.X);g.K(this,this.speedmasterUserEdu);g.P7(this.api,this.speedmasterUserEdu.element,4);this.L=new g.Aq(this.api.L_().uT,!0,null,!1,!0);g.K(this,this.L);this.delay=new g.vZ(this.O0,500,this);g.K(this,this.delay);this.C.W(R,"videodatachange",()=>{mg(this)},this); this.C.W(R,"presentingplayerstatechange",()=>{mg(this)},this); this.C.W(R,"autonavvisibility",()=>{mg(this)},this); this.api.Z5().subscribe("visibilitystatechange",()=>{mg(this)}); this.C.W(R,"rootnodemousedown",w=>{this.D=w}); this.Y("web_speedmaster_spacebar_control")&&(this.C.W(R,"keyboardserviceglobalkeydown",(w,p)=>{this.pB=p;Uwr(this,w,p.aP,!0)},this),this.C.W(R,"keyboardserviceglobalkeyup",w=>{Uwr(this,w,!1,!1)},this))}S(R,w){this.cS()||(this.U=[R, w],this.L.subscribe("dragmove",this.J,this),this.L.subscribe("dragend",this.K,this),this.O||this.delay.ql())}O0(){if(this.G){this.O=!0;this.xY=this.api.getPlaybackRate();this.I0=this.api.getPlayerStateObject().isPaused();var R=this.speedmasterUserEdu;g.Z2(R.element,"display","");R.B.logVisibility(R.L,!0);this.api.setPlaybackRate(2);this.api.hideControls();this.api.playVideo();this.D&&(this.D.Tu=!0);this.pB&&(this.pB.Ct=!0);this.Y("enable_smart_skip_speedmaster_on_web")&&this.api.publish("speedmasterchanged", !0)}}J(R,w){if(!this.O){R=[R,w];var p=this.U;p&&R&&p.length===2&&R.length===2?(w=Math.abs(p[0]-R[0]),p=Math.abs(p[1]-R[1]),w=Math.sqrt(w*w+p*p)):w=-1;w<10?this.U=R:sS(this)}}K(){sS(this)}};var fpt=class extends qj{constructor(R){super(R);this.C=new Set;this.L={};this.events=new g.th(R);g.K(this,this.events);this.events.W(R,"videodatachange",w=>{w==="newdata"&&(this.api.P1("stationsEmbargo"),this.api.P1("stationsMetadataUpdate"),this.L={},this.C.clear());w=this.api.getVideoData().f2;const p=w.get("PLAYER_CUE_RANGE_SET_IDENTIFIER_STATION_AIRING_EMBARGO");p&&SRd(this,p,"stationsEmbargo");(w=w.get("PLAYER_CUE_RANGE_SET_IDENTIFIER_STATION_METADATA_UPDATE"))&&SRd(this,w,"stationsMetadataUpdate")}); this.events.W(R,g.bp("stationsEmbargo"),w=>{this.api.SN(!0);var p=this.L[w.id]??[];for(const r of p){p=r.embargo;if(!p)continue;this.api.hideControls();this.api.A$("auth",2,Fm(p.errorRenderer.reason),Ro({embargoed:1,id:w.id,idx:w.C,start:w.start}));(p=p.onTrigger)&&g.m1(this.api,"innertubeCommand",p)}}); this.events.W(R,g.bp("stationsMetadataUpdate"),w=>{w=this.L[w.id]??[];for(const p of w)(w=p.command)&&g.m1(this.api,"innertubeCommand",w)})}};var G1b=class extends g.IR{constructor(R,w,p){super(w,R);this.L=p}preventDefault(){super.preventDefault();this.L&&this.L.preventDefault()}stopPropagation(){super.stopPropagation();this.L&&this.L.stopPropagation()}};g.Hy=class extends u$d{constructor(R){super();this.L=R;this.nB={};this.listener=w=>{this.dispatchEvent(new G1b(this,w.type,w))}}J(){return!0}isView(){return!1}f_(){return!1}zk(){return this.L}Kv(){return this.L.src}Qk(R){const w=this.getPlaybackRate(); this.L.src=R;this.setPlaybackRate(w)}U0(){this.L.removeAttribute("src")}getPlaybackRate(){try{return this.L.playbackRate>=0?this.L.playbackRate:1}catch{return 1}}setPlaybackRate(R){this.getPlaybackRate()!==R&&(this.L.playbackRate=R);return R}pX(){return this.L.loop}setLoop(R){this.L.loop=R}canPlayType(R,w){return this.L.canPlayType(R,w)}isPaused(){return this.L.paused}isSeeking(){return this.L.seeking}isEnded(){return this.L.ended}PS(){return this.L.muted}X(R){mB();this.L.muted=R}K(){return this.L.played|| Yi([],[])}po(){let R;try{R=this.L.buffered}catch{}return R||Yi([],[])}U(){return this.L.seekable||Yi([],[])}jI(){const R=this.L;return R.getStartDate?R.getStartDate():null}getCurrentTime(){return this.L.currentTime}setCurrentTime(R){this.L.currentTime=R}getDuration(){return this.L.duration}load(){const R=this.L.playbackRate;try{this.L.load()}catch{}this.L.playbackRate=R}pause(){this.L.pause()}play(){const R=this.L.play();if(!R||!R.then)return null;R.then(void 0,()=>{}); return R}O(){return this.L.readyState}YY(){return this.L.networkState}Tg(){return this.L.error?this.L.error.code:null}Ch(){return this.L.error?this.L.error.message:""}getVideoPlaybackQuality(){if(window.HTMLVideoElement&&this.L instanceof window.HTMLVideoElement&&this.L.getVideoPlaybackQuality)return this.L.getVideoPlaybackQuality();if(this.L){var R=this.L;const w=R.webkitDroppedFrameCount;if(R=R.webkitDecodedFrameCount)return{droppedVideoFrames:w||0,totalVideoFrames:R}}return{}}Ko(){return!!this.L.webkitCurrentPlaybackTargetIsWireless}U5(){return!!this.L.webkitShowPlaybackTargetPicker()}togglePictureInPicture(){const R= this.L,w=window.document;window.document.pictureInPictureEnabled?this.L!==w.pictureInPictureElement?R.requestPictureInPicture():w.exitPictureInPicture():uV()&&R.webkitSetPresentationMode(R.webkitPresentationMode==="picture-in-picture"?"inline":"picture-in-picture")}va(){var R=this.L;return new g.Xx(R.offsetLeft,R.offsetTop)}getSize(){return g.RL(this.L)}setSize(R){g.SE(this.L,R)}getVolume(){return this.L.volume}setVolume(R){mB();this.L.volume=R}SI(R){this.nB[R]||(this.L.addEventListener(R,this.listener), this.nB[R]=this.listener)}setAttribute(R,w){this.L.setAttribute(R,w)}removeAttribute(R){this.L.removeAttribute(R)}hasAttribute(R){return this.L.hasAttribute(R)}S(){return X4(this.L)}KU(R){g.pc(this.L,R)}xY(R){return g.JG(this.L,R)}mq(){return g.lA(document.body,this.L)}audioTracks(){const R=this.L;if("audioTracks"in R)return R.audioTracks}Gy(){for(const R of Object.keys(this.nB))this.L.removeEventListener(R,this.nB[R]);super.Gy()}ag(R){this.L.disableRemotePlayback=R}};g.Hy.prototype.D=pd(59); g.Hy.prototype.I0=pd(57);g.Hy.prototype.O0=pd(55);g.Hy.prototype.pB=pd(53);var Zb=class extends g.k{constructor(R,w){super({j:"div",Z:"ytp-horizonchart"});this.sampleCount=150;this.G=R;this.K=w;this.index=0;this.heightPx=-1;this.O=this.C=null;this.L=2;this.element.style.width=`${this.L*this.sampleCount}px`;this.element.style.height="1em"}};var wjP=class extends g.k{constructor(R){var w=null;w={j:"button",E0:["ytp-sfn-close","html5-video-info-panel-close","ytp-button"],A:{title:"close"},fB:"[X]"};super({j:"div",E0:["html5-video-info-panel","ytp-sfn"],N:[w,{j:"div",E0:["html5-video-info-panel-content","ytp-sfn-content"],N:[{j:"div",N:[{j:"div",fB:"Video ID / sCPN"},{j:"span",fB:"{{video_id_and_cpn}}",Z:"ytp-sfn-cpn"}]},{j:"div",N:[{j:"div",fB:"Viewport / Frames"},{j:"span",fB:"{{dims_and_frames}}"}]},{j:"div",N:[{j:"div",fB:"Current / Optimal Res"}, {j:"span",fB:"{{resolution}}"}]},{j:"div",N:[{j:"div",fB:"Volume / Normalized"},{j:"span",fB:"{{volume}}"}]},{j:"div",N:[{j:"div",fB:"Codecs"},{j:"span",fB:"{{codecs}}"}]},{j:"div",A:{style:"{{shader_info_style}}"},N:[{j:"div",fB:"Shader Info"},{j:"span",fB:"{{shader_info}}"}]},{j:"div",A:{style:"{{color_style}}"},N:[{j:"div",fB:"Color"},{j:"span",fB:"{{color}}"}]},{j:"div",A:{style:"{{drm_style}}"},N:[{j:"div",fB:"Protected"},{j:"span",fB:"{{drm}}"}]},{j:"div",A:{style:"{{bandwidth_style}}"},N:[{j:"div", fB:"Connection Speed"},{j:"span",N:[{j:"span",fB:"{{bandwidth_chart}}"},{j:"span",fB:"{{bandwidth_kbps}}"}]}]},{j:"div",A:{style:"{{network_activity_style}}"},N:[{j:"div",fB:"Network Activity"},{j:"span",N:[{j:"span",fB:"{{network_activity_chart}}"},{j:"span",fB:"{{network_activity_bytes}}"}]}]},{j:"div",N:[{j:"div",fB:"Buffer Health"},{j:"span",N:[{j:"span",fB:"{{buffer_health_chart}}"},{j:"span",fB:"{{buffer_health_seconds}}"}]}]},{j:"div",A:{style:"{{live_latency_style}}"},N:[{j:"div",fB:"Live Latency"}, {j:"span",N:[{j:"span",fB:"{{live_latency_chart}}"},{j:"span",fB:"{{live_latency_secs}}"}]}]},{j:"div",A:{style:"{{live_mode_style}}"},N:[{j:"div",fB:"Live Mode"},{j:"span",fB:"{{live_mode}}"}]},{j:"div",A:{style:"{{playback_categories_style}}"},N:[{j:"div",fB:"Playback Categories"},{j:"span",fB:"{{playback_categories}}"}]},{j:"div",A:{style:"{{fmt_debug_info_style}}"},N:[{j:"div",fB:"Format Debug Info"},{j:"span",fB:"{{fmt_debug_info}}"}]},{j:"div",N:[{j:"div",fB:"Mystery Text"},{j:"span",fB:"{{debug_info}}"}]}, {j:"div",A:{style:"{{extra_debug_info_style}}"},N:[{j:"div",fB:""},{j:"span",N:[{j:"span",fB:"{{extra_debug_info}}"}]}]},{j:"div",N:[{j:"div",fB:"Date"},{j:"span",fB:"{{date}}"}]},{j:"div",A:{style:"{{cotn_and_local_media_style}}"},N:[{j:"div",fB:"COTN / Local Media"},{j:"span",fB:"{{cotn_and_local_media}}"}]},{j:"div",A:{style:"{{release_style}}"},N:[{j:"div",fB:"Player Release"},{j:"span",fB:"{{release_name}}"}]}]}]});this.o0=R;this.position=0;this.K=!0;w?this.W(this.KB("ytp-sfn-close"),"click", this.hide):this.W(this.element,"click",this.hide);R=[0,18750,37500,81250,128E3,256E3,512E3,2048E3,8192E3,32768E3,131072E3];w="#000 #d53e4f #f46d43 #fdae61 #fee08b #e6f598 #abdda4 #66c2a5 #3288bd #124588 #fff".split(" ");const p=R.map(r=>r/4); this.D={};this.L=new Zb(R,w);g.K(this,this.L);this.updateValue("bandwidth_chart",this.L);this.O=new Zb([0,3,10,15,30,60,90],"#000 #66c2a5 #abdda4 #e6f598 #fdae61 #f46d43 #a8330f".split(" "));g.K(this,this.O);this.updateValue("live_latency_chart",this.O);this.C=new Zb([0,15,30,60,90,120],"#000 #fdae61 #e6f598 #66c2a5 #3288bd #fff".split(" "));g.K(this,this.C);this.updateValue("buffer_health_chart",this.C);this.J=new Zb(p,w);g.K(this,this.J);this.updateValue("network_activity_chart",this.J);this.delay= new g.vZ(this.WS,500,this);g.K(this,this.delay);this.G=new g.vZ(this.U,2E4,this);g.K(this,this.G)}show(){super.show();this.WS()}hide(){super.hide();this.delay.stop();this.G.stop()}WS(){var R=(0,g.T)(),w=eKP(this.o0);zx(this.L,w.bandwidth_samples);zx(this.J,w.network_activity_samples);zx(this.O,w.live_latency_samples);zx(this.C,w.buffer_health_samples);const p={};for(const [r,f]of Object.entries(w)){w=r;const G=f;this.D[w]!==G&&(p[w]=" "+String(G));this.D[w]=G}this.update(p);R=(0,g.T)()-R>25?5E3:500; this.delay.start(R)}U(){this.K?(this.position+=1,this.position>15&&(this.K=!1)):(--this.position,this.position<=0&&(this.K=!0));this.element.style.left=`${this.position}%`;this.element.style.top=`${this.position}%`;this.G.start(2E4)}};var IpM=class extends qj{constructor(R){super(R);N(R,"getStatsForNerds",()=>eKP(this.api)); zZ(R,"showVideoInfo",()=>{pj6(this,!0)}); zZ(R,"hideVideoInfo",()=>{pj6(this,!1)}); zZ(R,"isVideoInfoVisible",()=>!!this.UC?.Jp())}};var Ya=class extends g.f5{constructor(){super();this.C=null;this.startTime=this.duration=0;this.delay=new g.hf(this.L,null,this);g.K(this,this.delay)}L(){var R=(0,g.T)()-this.startTime;R=R{this.button=new urU(R);g.K(this,this.button);R.GA(this.button,"RIGHT_CONTROLS_RIGHT")})}};var miS=class extends qj{constructor(R){super(R);this.I0={TIMELY_ACTION_TRIGGER_TYPE_UNSPECIFIED:()=>!1, TIMELY_ACTION_TRIGGER_TYPE_KEYBOARD_SEEK:w=>uyx(this,w), TIMELY_ACTION_TRIGGER_TYPE_PROGRESS_BAR_SEEK:w=>uyx(this,w), TIMELY_ACTION_TRIGGER_TYPE_PLAYER_CONTROLS_SHOWN:()=>this.api.V().experiments.XB("enable_smart_skip_player_controls_shown_on_web_increased_triggering_sensitivity")?this.J&&this.X:this.J&&this.U, TIMELY_ACTION_TRIGGER_TYPE_SPEEDMASTER:()=>this.O0}; this.O0=this.X=this.U=this.J=!1;this.K={};this.events=new g.th(R);g.K(this,this.events);this.D=new g.Aq(this.api.L_().uT);g.K(this,this.D);if(this.api.Y("enable_smart_skip_web_player_bar_hover_length_threshold")&&g.Iq(this.api.V().experiments,"smart_skip_web_player_bar_min_hover_length_milliseconds")){const w=g.Iq(this.api.V().experiments,"smart_skip_web_player_bar_min_hover_length_milliseconds");this.S=new g.vZ(this.G,w,this);g.K(this,this.S)}this.events.W(R,"videodatachange",(w,p)=>{if(w!=="dataupdated"|| p.videoId!==this.videoId||!ij(this.timelyActions,xkd(p)))this.onVideoDataChange(p)}); this.events.W(R,"presentingplayerstatechange",w=>{this.fd(w)}); R.Y("enable_smart_skip_player_controls_shown_on_web")&&(this.events.W(R,"onShowControls",()=>{this.J=!0;this.G()}),this.events.W(R,"onHideControls",()=>{this.J=!1}),this.D.subscribe("hoverstart",()=>{this.U=!0; this.G()},this),this.D.subscribe("hoverend",()=>{this.U=!1},this),R.Y("enable_smart_skip_player_controls_shown_on_web_increased_triggering_sensitivity")&&(this.events.W(R,"progressBarHoverStart",()=>{this.X=!0; this.api.Y("enable_smart_skip_web_player_bar_hover_length_threshold")?this.S?.ql():this.G()}),this.events.W(R,"progressBarHoverEnd",()=>{this.X=!1; this.api.Y("enable_smart_skip_web_player_bar_hover_length_threshold")&&this.S?.stop()}))); R.Y("enable_smart_skip_speedmaster_on_web")&&this.events.W(R,"speedmasterchanged",w=>{(this.O0=w)&&this.G()}); this.events.W(R,g.bp("timelyAction"),w=>{this.onCueRangeEnter(w.getId())}); this.events.W(R,g.yl("timelyAction"),w=>{this.onCueRangeExit(w.getId())}); R.Y("web_enable_keyboard_shortcut_for_timely_actions")&&this.events.W(R,"keyboardserviceglobalkeydown",(w,p)=>{(rk?w.altKey:w.ctrlKey)&&w.keyCode===39&&this.pB&&this.L&&(w=g.F(xe(this,this.L)?.rendererContext,yAL),w=KF(w?.onTap))&&(g.m1(this.api,"innertubeCommand",w),p&&(p.Ct=!0),p=Q_(),(w=ivL(p))&&QOH(p,w))},this); this.C=new g.k({j:"div",E0:["ytp-player-content","ytp-timely-actions-content"]});this.C.hide();N(R,"insertTimelyActionUi",w=>{this.C.element.children.length>0&&g.Bc(this.C.element);w.classList.add("ytp-timely-actions-overlay");this.C.element.appendChild(w)}); g.K(this,this.C);this.Y("web_player_overlay_positioned_layout")?this.events.W(R,"basechromeinitialized",()=>{this.api.Dm(this.C.element,4,!0);this.C.element.setAttribute("data-overlay-order","10")}):g.P7(this.api,this.C.element,4)}onVideoDataChange(R){this.LS(); this.videoId=R.videoId;this.O=this.L=void 0;this.timelyActions=xkd(R);sV6(this);Wt(this);this.C3()}fd(R){const w=R.oldState,p=R.state,r=p.seekSource;!w.L(16)&&p.L(16)?this.S5(r??void 0):w.L(16)&&!p.L(16)&&this.Xw();R=R.state;R=!R.isCued()&&!R.L(1024);this.C.Rg(R)}C3(){const R=this.D5();R&&this.api.C3(R)}LS(){this.api.P1("timelyAction",1);if(this.L!==void 0)this.onCueRangeExit(this.L)}D5(){if(this.timelyActions){var R=[];for(const p of this.timelyActions){var w=p.startTimeMilliseconds!=null&&p.endTimeMilliseconds!= null&&p.cueRangeId!=null?new g.Ja(Number(p.startTimeMilliseconds),Number(p.endTimeMilliseconds),{id:p.cueRangeId,namespace:"timelyAction"}):void 0;w&&R.push(w)}return R}}onCueRangeEnter(R){const w=xe(this,R);w&&this.K[R]!==void 0&&(w.maxShowCount===void 0||w?.maxShowCount>this.K[R])&&(this.L=R,this.G())}onCueRangeExit(R){const w=mkW(this,R);w&&this.L===R&&g.m1(this.api,"innertubeCommand",w);Wt(this);this.L=void 0}S5(R){this.O=R}Xw(){this.G();this.O=void 0}G(){if(this.L!==void 0){var R=(R=xe(this, this.L))&&R.onCueRangeEnter?KF(R.onCueRangeEnter):void 0;var w=xe(this,this.L);a:if(w&&w.additionalTrigger){for(p of w.additionalTrigger)if(p.type&&(0,this.I0[p.type])?.(p.args??{})){var p=!0;break a}p=!1}else p=!0;R&&p&&(g.m1(this.api,"innertubeCommand",R),zuH(this,w),this.K[this.L]!==void 0&&this.K[this.L]++,this.pB=!0)}}Gy(){this.timelyActions=this.O=this.L=this.videoId=void 0;this.K={};this.LS();Wt(this);super.Gy()}};var zZU=class extends qj{constructor(R){super(R);R=window;var w=this.api.V().Tk();w.L.vS(yEb)?(w=[],R.ytPlayerArraySizeExperimentLength=w.length,R.ytPlayerArraySizeExperimentValue=w[0]):w.L.vS(bsd)?(w="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(" "), R.ytPlayerArraySizeExperimentLength=w.length,R.ytPlayerArraySizeExperimentValue=w[Math.floor(Math.random()*w.length)]):w.L.vS(AEx)&&(w="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(" "), R.ytPlayerArraySizeExperimentLength=w.length,R.ytPlayerArraySizeExperimentValue=w[Math.floor(Math.random()*w.length)])}};var B2U=class extends qj{constructor(R){super(R);zZ(this.api,"getPlaybackRate",()=>this.api.getPlaybackRate()); zZ(this.api,"setPlaybackRate",w=>{typeof w==="number"&&this.api.setPlaybackRate(w)})}};var ldr=class extends Ap{constructor(R,w,p,r){super("Voice boost",g.LI.ke);this.B=R;this.G=w;this.O=p;this.getVoiceBoostState=r;this.C=!1;this.OQ=this.B.Y("html5_enable_new_audio_settings_menu")?R.Ue().xE:R.Ue();this.W(R,"onFilterAudioFeatures",this.aq);this.setIcon({j:"svg",A:{fill:"currentColor",height:"24",viewBox:"0 0 24 24",width:"24"},N:[{j:"path",A:{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.K,this);this.aq()}K(R){this.G(R?2:1)}aq(){var R=this.B.getPresentingPlayerType();R===2||R===3?this.C&&(this.C=!1,this.OQ.EK(this)):(R=this.getVoiceBoostState(),R!==1?(R===0?(this.L(this.O()===2),this.setEnabled(!0)):(this.L(!1),this.setEnabled(!1)),this.C||(this.OQ.CL(this),this.C=!0)):this.C&&(this.OQ.EK(this),this.C=!1))}Gy(){this.OQ.EK(this);super.Gy()}};var Wuk=class extends qj{constructor(R){super(R);this.events=new g.th(R);g.K(this,this.events);const w=this.api.Y("html5_enable_voice_boost");w&&this.events.W(R,"settingsMenuInitialized",()=>{LQb(this)}); N(this.api,"getVoiceBoostUserPreference",()=>w?this.getVoiceBoostUserPreference():0); N(this.api,"setVoiceBoostUserPreference",p=>{w&&this.setVoiceBoostUserPreference(p)}); N(this.api,"getVoiceBoostState",()=>w?this.getVoiceBoostState():1); this.L=LVW()??0;this.updateEnvironmentData()}getVoiceBoostUserPreference(){return this.L}setVoiceBoostUserPreference(R){this.api.Ty("vb_set",{pref:R});g.Qp("yt-player-voice-boost",R,31536E4);R!==this.L&&(this.L=R,this.updateEnvironmentData(),this.getVoiceBoostState()!==1&&this.api.RA(),this.api.bB())}getVoiceBoostState(){return this.api.ww(1)}updateEnvironmentData(){this.api.V().t6=this.L}};var xiV=class extends qj{constructor(R){super(R);this.useLivingRoomPoToken=!1;this.K=new g.mR;this.L=!1;this.Jf=null;this.D=!1;this.G=null;this.J=!1;const w=R.V().getWebPlayerContextConfig();this.events=new g.th(R);g.K(this,this.events);this.events.W(R,"spsumpreject",(p,r,f)=>{this.J=r;p&&this.D&&!this.G&&(this.Y("html5_generate_content_po_token")&&f?this.nZ(f):this.Y("html5_generate_session_po_token")&&tkL(this));this.G||this.api.Ty("stp",{s:+this.D,b:+this.J})}); this.events.W(R,"poTokenVideoBindingChange",p=>{this.nZ(p)}); if(this.Y("html5_web_po_on_demand_init")){const p=this.events.W(R,"videodatachange",(r,f)=>{f.Hd&&!this.D&&(EfI(this),this.events.o9(p))}) }this.useLivingRoomPoToken=!!w?.useLivingRoomPoToken;R.addEventListener("csiinitialized",()=>{this.Jf=R.FD();this.Y("html5_web_po_on_demand_init")?this.O=Ph():EfI(this)}); R.addEventListener("trackListLoaded",this.MP.bind(this));R.bk(this)}Gy(){this.U&&(g.$E(this.U),this.U=void 0);super.Gy()}eH(){(this.C?!this.L:this.O)&&L8(this)}MP(R,w,p){if(A7H(R)){var r=p||"";if(this.L)w=y1(this,r),b66(R,w);else{var f=new g.mR;w.push(f.promise);this.K.promise.then(()=>{const G=y1(this,r);b66(R,G);f.resolve()})}}}nZ(R){if(this.C||this.O)R.QA=y1(this,R.videoId),this.L||(this.G=new aa,this.K.promise.then(()=>{this.Jf.Xl("pot_if"); R.QA=y1(this,R.videoId)}))}};var Yhx=class extends g.k{constructor(R){super({j:"div",E0:["ytp-more-videos-button","ytp-button"],A:{title:"{{title}}",role:"button",tabindex:"0","aria-hidden":"true"},N:[{j:"div",Z:"ytp-more-videos-button-thumbnail"},{j:"span",Z:"ytp-more-videos-button-title",fB:"{{title}}"}]});this.B=R;this.O=this.KB("ytp-more-videos-button-thumbnail");this.G=this.KB("ytp-more-videos-button-title");this.C=new g.th(this);g.K(this,this.C);this.C.W(this.B,"videodatachange",this.L);this.L();this.listen("click",this.onClick); adL(this,0);this.hide()}L(){var R=this.B.getVideoData({playerType:1});R=(R?.suggestions?.length?R.suggestions:R?.X()?[R.X()]:[])[0]?.EZ("mqdefault.jpg");this.O&&R&&g.Z2(this.O,"background-image",R?`url("${R}")`:"")}onClick(){this.B.logClick(this.element)}kp(R){this.Rg([1,2].includes(R));adL(this,R)}Rg(R){super.Rg(R);this.element.setAttribute("aria-hidden",String(!R));R&&this.L()}Gy(){super.Gy()}};g.lpm=class extends g.k{constructor(R){const w=R.V(),p=g.Io||g.DE?{style:"will-change: opacity"}:void 0,r=w.G,f=["ytp-modern-videowall-still"];w.C&&f.push("ytp-videowall-show-text");super({j:"a",E0:f,A:{href:"{{url}}",target:r?w.X:"","aria-label":"{{aria_label}}","data-is-live":"{{is_live}}","data-is-list":"{{is_list}}","data-is-mix":"{{is_mix}}"},N:[{j:"div",Z:"ytp-modern-videowall-still-image",A:{style:"{{background}}"},N:[{j:"span",Z:"ytp-modern-videowall-still-info-duration",fB:"{{duration}}"}]}, {j:"span",Z:"ytp-modern-videowall-still-info",A:{"aria-hidden":"true"},N:[{j:"span",Z:"ytp-modern-videowall-still-info-bg",N:[{j:"span",Z:"ytp-modern-videowall-still-info-content",A:p,N:[{j:"span",Z:"ytp-modern-videowall-still-info-title",fB:"{{title}}"},{j:"span",Z:"ytp-modern-videowall-still-info-author",fB:"{{author}}"},{j:"span",Z:"ytp-modern-videowall-still-view-count-and-date-info",fB:"{{views_and_publish_time}}"},{j:"span",Z:"ytp-modern-videowall-still-info-live",fB:"Live"}]}]}]},{j:"span", E0:["ytp-modern-videowall-still-listlabel-regular","ytp-modern-videowall-still-listlabel"],A:{"aria-hidden":"true"},N:[{j:"span",Z:"ytp-modern-videowall-still-listlabel-icon"},"Playlist",{j:"span",Z:"ytp-modern-videowall-still-listlabel-length",N:[" (",{j:"span",fB:"{{playlist_length}}"},")"]}]},{j:"span",E0:["ytp-modern-videowall-still-listlabel-mix","ytp-modern-videowall-still-listlabel"],A:{"aria-hidden":"true"},N:[{j:"span",Z:"ytp-modern-videowall-still-listlabel-mix-icon"},"Mix",{j:"span",Z:"ytp-modern-videowall-still-listlabel-length", fB:" (50+)"}]}]});this.suggestion=null;this.C=r;this.api=R;this.L=new g.th(this);g.K(this,this.L);this.listen("click",this.onClick);this.listen("keypress",this.onKeyPress);this.L.W(R,"videodatachange",this.onVideoDataChange);R.createServerVe(this.element,this);this.onVideoDataChange()}select(){this.api.WC(this.suggestion.videoId,this.suggestion.sessionData,this.suggestion.playlistId,void 0,void 0,this.suggestion.Ui||void 0)&&this.api.logClick(this.element)}onClick(R){if(g.zI(this.api.V())&&this.api.Y("web_player_log_click_before_generating_ve_conversion_params")){this.api.logClick(this.element); let w=this.suggestion.dS();const p={};g.ee(this.api,p);w=g.bu(w,p);g.gH(w,this.api,R)}else g.ha(R,this.api,this.C,this.suggestion.sessionData||void 0)&&this.select()}onKeyPress(R){switch(R.keyCode){case 13:case 32:R.defaultPrevented||(this.select(),R.preventDefault())}}onVideoDataChange(){const R=this.api.getVideoData(),w=this.api.V();this.C=R.h$?!1:w.G}};var Z6D=class extends g.k{constructor(R,w){const p=R.Y("web_player_use_more_videos_button");super({j:"div",E0:["ytp-fullscreen-grid"],N:[{j:"div",Z:"ytp-fullscreen-grid-hover-overlay",A:{"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",N:p?[]:[{j:"button",E0:["ytp-fullscreen-grid-expand-button","ytp-button"],A:{"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"},N:["{{icon}}"]}]},{j:"div",Z:"ytp-fullscreen-grid-main-content",N:[{j:"div",Z:"ytp-fullscreen-grid-stills-container"}]}]});this.player=R;this.stills=[];this.videoData=null;this.currentState=0;this.J=p;this.xY=this.player.Y("web_player_use_external_grid_component");(this.I0=this.player.Y("web_player_enable_horizontal_endscreen_shelf"))&&g.pc(this.player.getRootNode(), "ytp-enable-horizontal-endscreen-shelf");this.G=this.KB("ytp-fullscreen-grid-main-content");this.S=this.KB("ytp-fullscreen-grid-stills-container");this.U=this.KB("ytp-fullscreen-grid-buttons-container");this.J&&(this.K=new Yhx(this.player),this.U.appendChild(this.K.element),g.K(this,this.K),this.W(this.K.element,"click",this.X));this.xY&&(this.S.style.display="none");this.D=new g.th(this);g.K(this,this.D);this.O0=w;if(this.G&&this.S){if(R=this.KB("ytp-fullscreen-grid-hover-overlay"))this.W(R,"click", this.X),or(this.player,R,this);!this.J&&(R=this.KB("ytp-fullscreen-grid-expand-button"))&&(this.W(R,"click",this.X),or(this.player,R,this));if(R=this.player.getVideoData({playerType:1}))this.videoData=R;this.player.createClientVe(this.G,this,223051);this.D.W(this.player,"videodatachange",this.onVideoDataChange)}}Gy(){this.hide();this.D.C();g.rG(this.stills);this.stills.length=0;this.O&&(this.O.remove(),this.O=void 0);this.L&&(this.L.remove(),this.L=void 0);this.C&&(this.C.remove(),this.C=void 0); super.Gy()}setCommentsButton(R){R!==this.L&&(this.L&&this.L.remove(),this.L=R)&&(g.pc(this.L,"ytp-fullscreen-grid-action-button"),this.U.appendChild(this.L))}setDescriptionButton(R){R!==this.C&&(this.C&&this.C.remove(),this.C=R)&&(g.pc(this.C,"ytp-fullscreen-grid-action-button"),Wc(this.U,this.C,0))}X(R){this.O0&&this.O0(R)}onVideoDataChange(){if(!this.xY){this.videoData=this.player.getVideoData({playerType:1});var R=(this.videoData?.suggestions?.length?this.videoData?.suggestions:this.videoData?.X()? [this.videoData?.X()]:[]).slice(0,18),w=this.S;if(w&&this.G)if(g.Bc(w),R.length){this.stills.length>R.length&&g.rG(this.stills.splice(R.length));this.stills.length=R.length;for(let p=0;p{OS(this)}); w.W(R,"videodatachange",()=>{if(this.G){var p=this.api.getVideoData({playerType:1});this.videoData!==p&&this.O===2&&(g.fc(this.api.getRootNode(),"ytp-grid-scrolling"),ES(this,1,"INTERACTION_LOGGING_GESTURE_TYPE_AUTOMATED"));this.videoData=p}},this); w.W(R,"sizestylechange",()=>{this.G&&OS(this)}); N(this.api,"setFullscreenQuickActions",p=>{this.setFullscreenQuickActions(p)}); N(this.api,"setPlayerOverlayVideoDetailsRenderer",p=>{this.setPlayerOverlayVideoDetailsRenderer(p)}); this.I0&&N(this.api,"setFullscreenGrid",p=>{this.setFullscreenGrid(p)}); N(this.api,"setCommentsButton",p=>{this.setCommentsButton(p)}); N(this.api,"setDescriptionButton",p=>{this.setDescriptionButton(p)}); this.G&&jVL(this,w,R)}PS(){this.G&&this.O!==0&&this.S("INTERACTION_LOGGING_GESTURE_TYPE_GENERIC_CLICK")}S(R){this.G&&(R==="INTERACTION_LOGGING_GESTURE_TYPE_SCROLL_BEGAN_DRAGGING"&&(this.pB&&clearTimeout(this.pB),this.pB=window.setTimeout(()=>{this.pB=null},1E3)),this.O===1?ES(this,2,R):ES(this,1,R))}setFullscreenGrid(R){if(this.I0&&this.C){var w=this.C; w.xY&&R!==w.O&&(w.O&&w.O.remove(),w.O=R,w.O&&w.G.appendChild(w.O))}}setCommentsButton(R){this.C&&this.C.setCommentsButton(R)}setDescriptionButton(R){this.C&&this.C.setDescriptionButton(R)}setFullscreenQuickActions(R){this.xY&&this.xY.remove();R?(g.pc(R,"ytp-fullscreen-quick-actions"),this.Y("web_player_overlay_positioned_layout")?(R.setAttribute("data-overlay-order","13"),this.api.Dm(R,4)):(g.pc(this.api.getRootNode(),"ytp-has-fullscreen-quick-actions"),g.P7(this.api,R,4))):g.fc(this.api.getRootNode(), "ytp-has-fullscreen-quick-actions");this.xY=R;OS(this)}setPlayerOverlayVideoDetailsRenderer(R){this.playerOverlayVideoDetailsRenderer&&this.playerOverlayVideoDetailsRenderer.remove();if(R){g.pc(R,"ytp-fullscreen-metadata");g.pc(this.api.getRootNode(),"ytp-hide-fullscreen-title");R.setAttribute("data-overlay-order","1");var w=this.api.Y("delhi_modern_web_player_fullscreen_metadata_bottom");const p=w?3:1;w=w?"ytp-fullscreen-metadata-bottom":"ytp-fullscreen-metadata-top";g.pc(this.api.getRootNode(), w);this.Y("web_player_overlay_positioned_layout")?this.api.Dm(R,p):g.P7(this.api,R,4)}else g.fc(this.api.getRootNode(),"ytp-hide-fullscreen-title"),g.fc(this.api.getRootNode(),"ytp-fullscreen-metadata-bottom"),g.fc(this.api.getRootNode(),"ytp-fullscreen-metadata-top");this.playerOverlayVideoDetailsRenderer=R;OS(this)}};var q3k=class extends qj{constructor(R){super(R);this.freePreviewWatchedDuration=null;this.freePreviewUsageDetails=[];this.events=new g.th(R);g.K(this,this.events);this.events.W(R,"heartbeatRequest",w=>{if(this.freePreviewUsageDetails.length||this.freePreviewWatchedDuration!==null)w.heartbeatRequestParams||(w.heartbeatRequestParams={}),w.heartbeatRequestParams.unpluggedParams||(w.heartbeatRequestParams.unpluggedParams={}),this.freePreviewUsageDetails.length>0?w.heartbeatRequestParams.unpluggedParams.freePreviewUsageDetails= this.freePreviewUsageDetails:w.heartbeatRequestParams.unpluggedParams.freePreviewWatchedDuration={seconds:`${this.freePreviewWatchedDuration}`}}); N(R,"setFreePreviewWatchedDuration",w=>{this.freePreviewWatchedDuration=w}); N(R,"setFreePreviewUsageDetails",w=>{this.freePreviewUsageDetails=w})}};var A$6=class extends g.f5{constructor(R){super();this.features=[];var w=new V_m(R),p=new JF6(R),r=new YiU(R),f=new xiV(R);var G=g.f2(R.V())?void 0:new uWa(R);var I=new nmb(R),C=new IpM(R),u=new B2U(R),m=new yYS(R);var z=g.f2(R.V())?new q3k(R):void 0;var B=R.V().getWebPlayerContextConfig()?.cinematicSettingsAvailable?new p6V(R):void 0;var W=new qIi(R);var x=R.Y("enable_courses_player_overlay_purchase")?new bdU(R):void 0;var q=g.t5(R.V())?new lLb(R):void 0;var O=new slm(R);var e=R.V().G?new zPP(R): void 0;var P=g.zI(R.V())?new mxU(R):void 0;var c=R.Y("web_player_move_autonav_toggle")&&R.V().Ml?new w6R(R):void 0;var X=g.t5(R.V())?new $6b(R):void 0;var Z=R.Y("web_enable_speedmaster")&&g.t5(R.V())?new r$a(R):void 0;var Gr=R.V().gS?void 0:new sKt(R);var Il=R.Y("report_pml_debug_signal")?new hhr(R):void 0;var FW=new d6a(R),tY=new Taa(R);var j_=g.dQ(R.V())?new gmm(R):void 0;var hY=navigator.mediaSession&&window.MediaMetadata&&R.V().Gf?new Xkp(R):void 0;var aK=R.Y("html5_enable_drc")&&!R.V().J?new CHb(R): void 0;var JY=new Q6d(R);var Df=g.t5(R.V())?new kp6(R):void 0;var gg=new jMb(R);var Dv=g.t5(R.V())&&R.Y("web_sleep_timer")?new RZb(R):void 0;var N_=g.zI(R.V())?new BdR(R):void 0;R.Y("mweb_debug_sticky_settings");var Le=new U6M(R);var A2=new rYa(R),bI=new ctk(R);var y5=R.Y("enable_sabr_snackbar_message")?new wwb(R):void 0;var V=R.Y("web_enable_timely_actions")?new miS(R):void 0;var xm=new fLV(R);var ET=R.V()?.getWebPlayerContextConfig()?.enableFullscreenComponentsFeature?new LuS(R):void 0;var az=new Wuk(R); var S=R.Y("web_player_loop_settings_menu")&&R.V().FL?new aSV(R):void 0;var JI=g.f2(R.V())?void 0:new TVW(R);var A=new iRk(R),J=new UuW(R),D6=new ZRa(R),eo=new SuH(R);var j0=g.t5(R.V())&&R.V().Y("delhi_modern_web_player")?new GrS(R):void 0;var gE=R.V().O?void 0:new NVL(R);var w2=new fpt(R),nh=new Wdt(R);var J0=R.V().Tk();J0=J0.L.vS(yEb)||J0.L.vS(bsd)||J0.L.vS(AEx)?new zZU(R):void 0;var b=R.V().Tk().L.vS(g.Dob)?new hVM(R):void 0;R=R.V().experiments.Tk().L.vS(eJW)?new g6_(R):void 0;w=[w,p,r,f,G,I,C, u,m,z,B,W,x,q,O,e,P,c,X,Z,Gr,Il,FW,tY,j_,void 0,hY,aK,JY,void 0,Df,gg,Dv,N_,void 0,Le,A2,bI,void 0,y5,V,xm,ET,az,void 0,S,void 0,JI,A,J,D6,eo,j0,gE,w2,nh,J0,void 0,b,R];for(const L of w)L&&this.features.push(L)}Gy(){for(let R=this.features.length-1;R>=0;R--)this.features[R].dispose();this.features.length=0;super.Gy()}};var bja=class{constructor(){this.C=this.L=NaN}reset(){this.L=this.C=NaN}};var S6_=class{constructor(R,w){this.LB=R;this.timerName="";this.O=!1;this.C=NaN;this.G=new bja;this.L=w||null;this.O=!1}reset(){G3(this.timerName)}tick(R,w){u$(R,w,this.timerName)}Xl(R){return Bx(R,void 0,this.timerName)}Cy(R){g.qm(R,void 0,this.timerName)}infoGel(R){g.sT(R,this.timerName)}};var dad=class extends g.HC{constructor(R,w){super();this.zy=R;this.startSeconds=0;this.shuffle=!1;this.index=0;this.title="";this.length=0;this.items=[];this.loaded=!1;this.sessionData=this.L=null;this.dislikes=this.likes=this.views=0;this.order=[];this.author="";this.w_={};this.C=0;if(R=w.session_data)this.sessionData=WI(R,"&");this.index=Math.max(0,Number(w.index)||0);this.loop=!!w.loop;this.startSeconds=Number(w.startSeconds)||0;this.title=w.playlist_title||"";this.description=w.playlist_description|| "";this.author=w.author||w.playlist_author||"";w.video_id&&(this.items[this.index]=w);if(R=w.api)typeof R==="string"&&R.length===16?w.list="PL"+R:w.playlist=R;if(R=w.list)switch(w.listType){case "user_uploads":this.listId=new gN("UU",`PLAYER_${R}`);break;default:var p=w.playlist_length;p&&(this.length=Number(p)||0);this.listId=Ha(R);if(p=w.video)this.items=p.slice(0),this.loaded=!0}else if(w.playlist){R=w.playlist.toString().split(",");this.index>0&&(this.items=[]);for(p of R)p&&this.items.push({video_id:p}); this.length=this.items.length;if(p=w.video)this.items=p.slice(0),this.loaded=!0}this.setShuffle(!!w.shuffle);if(p=w.suggestedQuality)this.quality=p;this.w_=YW(w,"playlist_");this.O=(w=w.thumbnail_ids)?w.split(","):[]}hasNext(R){return this.loop||!!R||this.index+1=0}setShuffle(R){this.shuffle=R;R=this.order&&this.order[this.index]!=null?this.order[this.index]:this.index;this.order=[];for(var w=0;w{}),this.D=w,Promise.all(p).then(w.resolve,w.reject).finally(()=> {this.D=null})):R.MP()}else R.MP()}Gy(){this.D&&(this.D.reject(),this.D=null); this.O();super.Gy()}};g.jB.prototype.S=pd(63);g.jB.prototype.G=pd(62);g.Jp=class extends g.jB{constructor(R,w,p){super(R);this.videoData=w;this.audioTrack=p;this.C=null;this.U=!1;this.X=w.Mh;this.O0=w.K6;this.U=g.Rr(w)}K(R){if(this.audioTrack){for(const w of this.audioTrack.captionTracks)g.n8(this.L,w);this.audioTrack.L&&g.n8(this.I0,this.audioTrack.L)}this.MP(R,this.videoData.videoId)}J(R,w){const p=R.qk(),r={fmt:w};if(w==="srv3"||w==="3"||w==="json3")g.IN()?Object.assign(r,{xorb:2,xobt:1,xovt:1}):Object.assign(r,{xorb:2,xobt:3,xovt:3});R.translationLanguage&&(r.tlang= g.lk(R));this.U&&(r.xosf="1");Object.assign(r,this.o0.V().L);return yj(p,r)}O(){this.C&&this.C.abort()}};g.Jp.prototype.G=pd(61);g.Vaa=new Map;g.Tu=class extends g.jB{constructor(R,w,p,r,f,G){super(R);this.videoId=p;this.Cn=f;this.eventId=G;this.pB={};this.C=null;R=r||g.Ak(w).hl||"";R=R.split("_").join("-");this.U=yj(w,{hl:R})}K(R){let w=this.U;const p={type:"list",tlangs:1,v:this.videoId,vssids:1};this.Cn&&(p.asrs=1);w=yj(w,p);this.O();this.C=g.Ff(w,{format:"RAW",onSuccess:r=>{this.C=null;if((r=r.responseXML)&&r.firstChild){var f=r.getElementsByTagName("track");for(var G=0;Gthis.D, X10:()=>this.G}; this.pB=this.B.Y("web_player_defer_modules");this.sK=new Map;g.K(this,this.U);this.U.W(R,"videodatachange",this.onVideoDataChange)}createSubtitlesModuleIfNeeded(){p_d(this)&&Q1(this,"captions");return!!g.FA(this)}pN(){return this.B.getVideoData().pN()}Ac(){return this.B.getVideoData().Ac()}X(){const R=this.sK.get("heartbeat");Q1(this,"heartbeat",!1,!0,this.X);!R&&this.sK.has("heartbeat")&&this.B.publish("offlineslatestatechange")}L(){Q1(this,"annotations_module",!0,void 0,this.L);const R=this.sK.get("annotations_module"); if(R)for(const w in this.O){if(!this.O.hasOwnProperty(w))continue;const p=w;R.subscribe(p,this.O[p])}}K(){if(!this.sK.get("ad"))try{gv(this)?Q1(this,"ad",!1,!0,this.K):hm(this,"ad")}catch(R){hm(this,"ad"),g.LF(R)}}FD(){return this.C}uc(){const R={},w=g.FA(this);w&&Object.assign(R,w.uc());return R}c9(R,w){Object.assign(this.C,R||null);Object.assign(this.Do,w||null)}Dy(){if(g.Cb(this.B.V()))return this.sK.get("unplugged")}onVideoDataChange(){const R=this.B.getVideoData();this.B.Y("enable_wn_infocards")&& R.J8()&&!g.j2(this)&&this.L()}Gy(){super.Gy();ke(this,1,!0);for(const [R,w]of Object.entries(zzY)){const p=R;this.J.has(w)&&$e.delete(p)}this.J.clear()}},zzY={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"}, sbd={ad:["ad"],annotations_module:[],asmjs:[],creatorendscreen:[],embed:[],endscreen:[],heartbeat:["heartbeat"],kids:[],remote:["mdx"],miniplayer:[],offline:[],captions:[],unplugged:[],ux:[],webgl:["webgl"],ypc:[]},LtI="ad annotations_module asmjs creatorendscreen embed endscreen heartbeat kids remote miniplayer offline captions webgl ypc unplugged ux".split(" ");var okm=class extends g.HC{constructor(R,w,p,r){super();this.target=R;this.api=w;this.zt=p;this.C=0;this.J=!1;this.G=new g.Xx(NaN,NaN);this.L=new g.th(this);this.I0=this.O=this.D=null;g.K(this,this.L);w=r?g.Iq(this.api.V().experiments,"web_player_touch_idle_wait_time_ms",4E3):g.Iq(this.api.V().experiments,"web_player_mouse_idle_wait_time_ms",3E3);this.X=new g.vZ(()=>{S2(this,1,!1)},w,this); g.K(this,this.X);this.pB=new g.vZ(()=>{S2(this,2,!1)},w,this); g.K(this,this.pB);this.S=new g.vZ(()=>{S2(this,2048,!1)},w,this); g.K(this,this.S);this.xY=new g.vZ(()=>{S2(this,512,!1)},w,this); g.K(this,this.xY);this.Jl=3E3;r||(this.O=this.L.W(R,"mouseover",this.oS),this.L.W(R,"mousemove",this.jI),this.L.W(R,"mouseleave",this.Qk));this.api.Y("web_player_enable_fullscreen_grid_components")&&this.L.W(R,"wheel",this.q0,this,!0);jE?this.L.W(R,"keypress",this.U0):this.L.W(R,"focusin",this.nB);this.K=this.L.W(R,"mousedown",this.O0);this.U=this.L.W(R,"touchstart",this.M0,void 0,!0);S2(this,640,!0)}jI(R){R=new g.Xx(R.pageX,R.pageY);if(!n0(R,this.G)){let w=2;this.J&&(w|=8);this.G=R;S2(this,w,!0)}}q0(){S2(this, 2048,!0)}Qk(R){this.J&&S2(this,8,!0);if(this.api.Y("allow_autohide_on_paused_videos")){R=R.relatedTarget;var w=this.target instanceof HTMLElement?this.target:this.target.element;if(R instanceof Element&&(w=w.getBoundingClientRect(),R=R.getBoundingClientRect(),R.top>=w.top&&R.right<=w.right&&R.bottom<=w.bottom&&R.left>=w.left))return}S2(this,2,!1)}oS(R){const w=new g.Xx(R.pageX,R.pageY);n0(w,this.G)||(this.G=w,(R=R.target)&&this.zt(R)&&(S2(this,4,!0),this.L.o9(this.O),this.O=this.L.W(this.target,"mouseover", this.a_),this.D=this.L.W(this.target,"mouseout",this.a_)))}a_(R){R=R.relatedTarget;R&&this.zt(R)||(this.G=new g.Xx(NaN,NaN),Arr(this))}U0(){S2(this,1,!0)}nB(R){R=R.target;R instanceof Element&&!(R.tabIndex>0)||S2(this,1,!0)}O0(){this.J=!0;this.L.o9(this.K);this.K=this.L.W(document,"mouseup",this.PS)}PS(){this.J=!1;S2(this,8,!1);this.L.o9(this.K);this.K=this.L.W(this.target,"mousedown",this.O0)}M0(R){if(R=(R=R.changedTouches)&&R[0])this.I0=R.identifier,this.L.o9(this.U),this.U=this.L.W(this.target, "touchend",this.YY,void 0,!0),S2(this,1024,!0)}YY(R){let w;if(R=R.changedTouches)for(let p=0;p{this.L.ql()}),this.C.W(this.api,"videoplayerreset",()=>{this.L.ql()})); super.show()}hide(){this.C&&this.C.C();super.hide()}LL(){this.L.ql()}onStateChange(){this.L.ql()}G(){this.L.ql()}onReset(){this.fade.stop();this.hide();this.L.ql()}WS(){const R=this.api.getPlayerStateObject();if(this.api.getPresentingPlayerType()===3&&(R.isPlaying()||R.isPaused()))var w=!0;else(w=this.api.tf().sK.get("ypc"))&&w.jF?w=!0:(w=this.api.V(),w=R.L(2)&&g.Kg(this.api)&&w.Pw?!0:!1);w?(w=!0,this.O.hide()):(this.O.show(),w=R.isCued()&&this.api.getPresentingPlayerType()!==2||R.L(2)&&!g.Kg(this.api)&& !this.api.iz()||R.L(1024)?!0:!1);const p=this.api.getVideoData();w&&!p.Es?(this.fade.show(),bxd(this,this.api.getPlaylist(),p)):(this.fade.hide(),R.L(1)||this.fade.stop())}};var VUd; g.KuU=class extends g.k{constructor(R){super({j:"div",E0:["ytp-error"],A:{role:"alert"},N:[{j:"div",Z:"ytp-error-content",N:[{j:"div",Z:"ytp-error-icon-container",N:[{j:"svg",A:{fill:"#fff",viewBox:"0 0 48 48"},N:[{j:"path",A:{d:"M0 0h48v48H0V0z",fill:"none"}},{j:"path",A:{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",N:[{j:"div", Z:"ytp-error-content-wrap-reason",fB:"{{content}}"},{j:"div",Z:"ytp-error-content-wrap-subreason",fB:"{{subreason}}"}]}]}]});this.api=R;this.keys=[];this.O=!1;R.createClientVe(this.element,this,216103);this.api.logVisibility(this.element,this.K_)}resize(){}C(R){this.O=!1;yrW(this);var w=R.Vq,p=this.api.V();w!=="GENERIC_WITHOUT_LINK"||p.J?w==="TOO_MANY_REQUESTS"?(p=this.api.getVideoData(),this.setContent(wI(this,"TOO_MANY_REQUESTS_WITH_LINK",p.dS(),void 0,void 0,void 0,!1))):w!=="HTML5_NO_AVAILABLE_FORMATS_FALLBACK"|| p.J?this.api.V().Y("html5_enable_bandaid_error_screen")&&w==="HTML5_SPS_UMP_STATUS_REJECTED"&&!p.J?(p=p.hostLanguage,R="//support.google.com/youtube?p=videoError",p&&(R=g.bu(R,{hl:p})),this.setContent(wI(this,"HTML5_SPS_UMP_STATUS_REJECTED",R))):this.api.V().Y("enable_adb_handling_in_sabr")&&w==="BROWSER_OR_EXTENSION_ERROR"&&!p.J?(p=p.hostLanguage,R="//support.google.com/youtube/answer/3037019#zippy=%2Cupdate-your-browser-and-check-your-extensions",p&&(R=g.bu(R,{hl:p})),this.setContent(wI(this,"BROWSER_OR_EXTENSION_ERROR", R))):this.setContent(g.pE(R.errorMessage)):this.setContent(wI(this,"HTML5_NO_AVAILABLE_FORMATS_FALLBACK_WITH_LINK_SHORT","//www.youtube.com/supported_browsers")):(R=p.hostLanguage,w="//support.google.com/youtube/?p=player_error1",R&&(w=g.bu(w,{hl:R})),this.setContent(wI(this,"GENERIC_WITH_LINK_AND_CPN",w,!0)),p.ag&&!p.G&&oUD(this,r=>{if(g.ha(r,this.api,!b8(this.api.V()))){const f={as3:!1,html5:!0,player:!0,cpn:this.api.getVideoData().clientPlaybackNonce};r=this.api;g.xs(r,"onFeedbackArticleRequest", {articleId:3037019,helpContext:"player_error",productData:f});r.isFullscreen()&&r.toggleFullscreen()}})); if(this.O){const r=this.KB("ytp-error-link");r&&(this.api.createClientVe(r,this,216104),this.api.logVisibility(r,!0),oUD(this,()=>{this.api.logClick(r)}))}}}; VUd=/([^<>]+)<\/a>/;var EkR=class extends g.k{constructor(R){super({j:"div",E0:["ytp-overlays-container"],N:[{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.O=this.KB("ytp-overlay-top-left");this.G=this.KB("ytp-overlay-top-right");this.L=this.KB("ytp-overlay-bottom-left");this.C=this.KB("ytp-overlay-bottom-right");g.P7(R,this.element,4)}Dm(R,w,p=!1){switch(w){case 1:rI(this,R,this.O,p);break;case 2:rI(this,R,this.G, p);break;case 3:rI(this,R,this.L,p);break;case 4:rI(this,R,this.C,p)}}};var Dia=class extends g.k{constructor(R){super({j:"div",Z:"ytp-paid-content-overlay",A:{"aria-live":"assertive","aria-atomic":"true",["data-overlay-order"]:"5"}});this.B=R;this.videoId=null;this.G=!1;this.innertubeCommand=this.Rb=this.L=null;const w=R.V();w.experiments.Tk().L.vS(HId)?(this.C=new g.vZ(()=>{this.R9()},5E3,this),g.K(this,this.C)):this.C=null; R.Y("enable_new_paid_product_placement")&&!g.Eg(w)?(this.O=new g.k({j:"a",Z:"ytp-paid-content-overlay-link",A:{href:"{{href}}",target:"_blank"},N:[{j:"div",Z:"ytp-paid-content-overlay-indicator"},{j:"div",Z:"ytp-paid-content-overlay-icon",fB:"{{icon}}"},{j:"div",Z:"ytp-paid-content-overlay-text",fB:"{{text}}"},{j:"div",Z:"ytp-paid-content-overlay-chevron",fB:"{{chevron}}"}]}),this.W(this.O.element,"click",this.onClick)):this.O=new g.k({j:"div",E0:["ytp-button","ytp-paid-content-overlay-text"],fB:"{{text}}"}); this.fade=new g.HU(this.O,250,!1,100);g.K(this,this.O);this.O.gN(this.element);g.K(this,this.fade);this.B.createServerVe(this.element,this);this.W(R,"videodatachange",this.onVideoDataChange);this.W(R,"presentingplayerstatechange",this.K)}onClick(R){this.innertubeCommand?(g.m1(this.B,"innertubeCommand",this.innertubeCommand),R.preventDefault()):g.ha(R,this.B,!0);this.B.logClick(this.element)}onVideoDataChange(R,w){this.C&&R==="newdata"&&this.C.stop();Oxr(this,w);this.Rb&&KtH(this,this.Rb)}K(R){const w= this.B.getVideoData();this.videoId!==w.videoId&&Oxr(this,w);this.L&&KtH(this,R.state);this.Rb=R.state}R9(){this.fade.show();this.L?.start();this.B.publish("paidcontentoverlayvisibilitychange",!0);this.B.logVisibility(this.element,!0)}Qh(){this.fade.hide();this.B.publish("paidcontentoverlayvisibilitychange",!1);this.B.logVisibility(this.element,!1)}};var eZR=class extends g.k{constructor(R){super({j:"div",Z:"ytp-spinner",N:[v7(),{j:"div",Z:"ytp-spinner-message",fB:"If playback doesn't begin shortly, try restarting your device."}]});this.api=R;this.message=this.KB("ytp-spinner-message");this.L=new g.vZ(this.show,500,this);g.K(this,this.L);this.W(R,"presentingplayerstatechange",this.onStateChange);this.W(R,"playbackstalledatstart",this.C);this.kp(R.getPlayerStateObject())}hide(){this.L.stop();this.message.style.display="none";super.hide()}onStateChange(R){this.kp(R.state)}kp(R){(R.L(128)|| this.api.sX()||this.api.Y("web_watch_enable_multiview_manager")&&this.api.getVideoData()?.t8()?0:R.L(16)||R.L(1))?this.L.start():this.hide()}C(){this.message.style.display="block"}};var Mai=class extends TN{constructor(R){const w=[{j:"div",E0:["ytp-unmute-icon"],N:[R.V().experiments.XB("delhi_modern_web_player_icons")?{j:"svg",A:{height:"24",viewBox:"0 0 24 24",width:"24"},N:[{j:"path",Z:"ytp-svg-fill",A:{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",A:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},N:[{j:"path",FI:!0,Z:"ytp-svg-fill",A:{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",E0:["ytp-unmute-text"],fB:"Tap to unmute"}];w.push({j:"div",E0:["ytp-unmute-box"],N:[]});super(R,{j:"button",E0:["ytp-unmute","ytp-popup","ytp-button","ytp-unmute-animated","ytp-unmute-shrink"],N:[{j:"div",Z:"ytp-unmute-inner",N:w}]},100);this.L=this.clicked=!1;this.api=R;this.api.createClientVe(this.element,this,51663);this.W(R,"onMutedAutoplayChange",this.onMutedAutoplayChange,this);this.W(R,"presentingplayerstatechange",this.fd);this.listen("click",this.onClick,this);R=R.isMutedByMutedAutoplay()&& !g.zI(this.api.V());this.Rg(R);R&&EUd(this);this.C=R}onMutedAutoplayChange(R){this.C&&(R?(EUd(this),this.R9()):(this.L&&this.logClick(),this.Qh()))}fd(R){this.api.isMutedByMutedAutoplay()&&R.TE(2)&&this.Qh()}onClick(){this.api.unMute();this.logClick()}logClick(){this.clicked||(this.clicked=!0,this.api.logClick(this.element))}};g.DD=class extends g.th{constructor(R){super();this.api=R;this.Of=!1;this.zp=null;this.YD=!1;this.tF=null;this.Fc=this.dJ=!1;this.Wt=this.d5=null;this.En=NaN;this.kz=this.OE=!1;this.Rx=0;this.qp=[];this.hV=!1;this.Ru={height:0,width:0};this.k5=480;this.MU=["ytp-player-content","html5-endscreen","ytp-overlay"];this.QE={Tu:!1};this.eN=null;const w=R.V(),p=R.L_();this.Ru=R.getPlayerSize();this.bY=new g.vZ(this.lN,0,this);g.K(this,this.bY);w.disableOrganicUi||(this.A4=new g.Ojt(R),g.K(this,this.A4),g.P7(R, this.A4.element,4));this.api.Y("web_player_overlay_positioned_layout")&&(this.eN=new EkR(this.api),g.K(this,this.eN));if(DsD(this)){var r=new eZR(R);g.K(this,r);r=r.element;g.P7(R,r,4)}var f=R.getVideoData();this.uI=new okm(p,R,G=>this.zt(G),w.xu); g.K(this,this.uI);this.uI.subscribe("autohideupdate",this.R_,this);this.api.Y("web_player_default_autohide")||US(this.uI);if(!w.disablePaidContentOverlay){const G=new Dia(R);g.K(this,G);this.eN?this.eN.Dm(G.element,g.Eg(w)?3:1):g.P7(R,G.element,4)}this.V_=new Mai(R);g.K(this,this.V_);g.P7(this.api,this.V_.element,2);this.Cb=this.api.isMutedByMutedAutoplay();this.W(R,"onMutedAutoplayChange",this.onMutedAutoplayChange);this.aW=new g.vZ(this.Ai,200,this);g.K(this,this.aW);this.g0=f.videoId;this.jd=new g.vZ(()=> {this.Rx=0},350); g.K(this,this.jd);this.Wp=new g.vZ(()=>{this.kz||Ix(this)},350,this); g.K(this,this.Wp);f=R.getRootNode();f.setAttribute("aria-label","YouTube Video Player");switch(w.color){case "white":g.pc(f,"ytp-color-white")}this.W(R,"appresize",this.LL);this.W(R,"presentingplayerstatechange",this.fd);this.W(R,"videodatachange",this.onVideoDataChange);this.W(R,"videoplayerreset",this.k6);this.W(R,"autonavvisibility",()=>{this.h6()}); this.W(R,"sizestylechange",()=>{this.h6()}); this.W(p,"click",this.cR,this);this.W(p,"dblclick",this.D2,this);this.W(p,"mousedown",this.Z2,this);w.N0&&(this.W(p,"gesturechange",this.yJ,this),this.W(p,"gestureend",this.nK,this));this.qZ=[p.uT];this.A4&&this.qZ.push(this.A4.element);r&&this.qZ.push(r);this.api.Y("web_player_fullscreen_double_click_ve")&&(this.api.createClientVe(p.element,this,247482),this.api.logVisibility(p.element,!0))}init(){const R=this.api,w=R.getPlayerStateObject();this.Ru=R.getPlayerSize();this.I9(w);this.h6();this.LL(); this.api.publish("basechromeinitialized",this);this.o1()&&this.api.publish("standardControlsInitialized")}onVideoDataChange(R,w){var p=this.g0!==w.videoId;if(p||R==="newdata")R=this.api,R.isFullscreen()||(this.Ru=R.getPlayerSize());p&&(this.g0=w.videoId,p=this.uI,p.Jl=3E3,S2(p,512,!0),this.h6());this.api.Y("web_render_jump_buttons")&&w.showSeekingControls&&(this.k5=572)}k6(){this.onVideoDataChange("newdata",this.api.getVideoData())}Fd(){const R=this.api.KS()&&this.api.xK(),w=this.api.w4();return this.YD|| R||this.Cb||w}GV(){const R=!this.Fd();g.M(this.api.getRootNode(),"ytp-menu-shown",!R)}zt(R){try{if(!g.lA(this.api.getRootNode(),R))return!1}catch(w){return!1}for(;R&&!AG(R);)R=R===this.api.getRootNode()?null:R.parentElement||null;return!!R}R_(R){const w=this.api.getRootNode();g.M(w,"ytp-autohide",R);g.M(w,"ytp-autohide-active",!0);this.bY.start(R?250:100);R&&(this.dJ=!1,g.fc(w,"ytp-touch-mode"));this.Fc=!R;this.api.Mt(!R);this.api.Y("web_player_enable_fullscreen_grid_components")&&this.api.publish("autohideupdate", R)}lN(){const R=this.api.getRootNode();g.M(R,"ytp-autohide-active",!1)}UW(){this.kz=!0}QJ(R){if(this.api.V().Y("player_doubletap_to_seek")||this.api.V().D)this.kz=!1,this.Wt&&this.o9(this.Wt),this.Rx===0&&CE(this,R)?(this.xl(),this.Wp.start(),this.Wt=this.W(this.api.L_(),"touchmove",this.UW,void 0,!0)):this.Wp.stop();MUx(this)&&CE(this,R)&&!this.api.V().D&&Ix(this,R);var w=this.V_.Pu();if(!g.zI(this.api.V())&&hq&&un(this,R))w&&R.preventDefault();else if(this.dJ=!0,g.pc(this.api.getRootNode(),"ytp-touch-mode"), this.uI.bc(),this.api.V().Y("player_doubletap_to_seek")||this.api.V().D)if(w=this.api.getPlayerStateObject(),!(!this.api.Wo()||w.L(2)&&g.Kg(this.api)||w.L(64))){w=Date.now()-this.En;this.Rx+=1;if(w<=350){if(GN(this,R))return;this.OE=!0;w=this.api.getPlayerSize().width/3;var p=this.api.getRootNode().getBoundingClientRect();const r=R.targetTouches[0].clientX-p.left;p=R.targetTouches[0].clientY-p.top;const f=(this.Rx-1)*10;r>0&&rw*2&&r=650,r=R.width<528;this.uI.resize();if(this.api.Y("web_player_use_screen_width_for_big_mode")){const f=R.width>=(g.Iq(this.api.V().experiments,"web_player_big_mode_screen_width_cutoff")??2E3);g.M(w,"ytp-big-mode",f)}g.M(w,"ytp-fullscreen",this.api.isFullscreen());g.M(w,"ytp-large-width-mode",p);this.api.Y("delhi_modern_web_player")? g.M(w,"ytp-xsmall-width-mode",r):g.M(w,"ytp-small-mode",this.dl());g.M(w,"ytp-tiny-mode",this.LO());g.M(w,"ytp-big-mode",this.r_());this.tF&&this.tF.resize(R)}fd(R){this.I9(R.state);this.h6()}gt(){var R=!!this.g0&&!this.api.Jj()&&!this.hV,w=this.api.getPresentingPlayerType()===2,p=this.api.V();if(w)return p=Ye(this.api.tf()),R&&(p&&p.player?R=(R=p.player.getVideoData({playerType:2}))?R.isListed&&!g.f2(p.player.V()):!1:(MY("showInfoBarDuringAd: this is null"),R=!1)),R;w=p.Y("web_player_imax_theater_mode")&& this.api.dY()&&!this.api.isInline();return R&&(p.zL||w||this.api.isFullscreen()||p.gS)}h6(){const R=this.gt();this.zp!==R&&(this.zp=R,g.M(this.api.getRootNode(),"ytp-hide-info-bar",!R))}I9(R){const w=R.isCued()||this.api.PM()&&this.api.getPresentingPlayerType()!==3;w!==this.isCued&&(this.isCued=w,this.d5&&this.o9(this.d5),this.d5=this.W(this.api.L_(),"touchstart",this.QJ,void 0,w));var p=this.uI,r=R.isPlaying()&&!R.L(32)||this.api.zz();S2(p,128,!r);p=this.uI;r=this.api.getPresentingPlayerType()=== 3;S2(p,256,r);p=this.api.getRootNode();R.L(2)?r=[Kf.ENDED]:(r=[],R.L(8)?r.push(Kf.PLAYING):R.L(4)&&r.push(Kf.PAUSED),R.L(1)&&!R.L(32)&&r.push(Kf.BUFFERING),R.L(32)&&r.push(Kf.SEEKING),R.L(64)&&r.push(Kf.UNSTARTED));g.Oi(this.qp,r)||(g.GX(p,this.qp),this.qp=r,g.rF(p,r));r=this.api.V();const f=R.L(2);a:{var G=this.api.V();const I=G.controlsType;switch(I){case "2":case "0":G=!1;break a}G=I==="3"&&!R.L(2)||this.isCued||(this.api.getPresentingPlayerType()!==2?0:qe(Ye(this.api.tf())))||this.api.w4()||g.zI(G)&& this.api.getPresentingPlayerType()===2?!1:!0}g.M(p,"ytp-hide-controls",!G);g.M(p,"ytp-native-controls",r.controlsType==="3"&&!w&&!f&&!this.Cb);R.L(128)&&!g.zI(r)?(this.tF||(this.tF=new g.KuU(this.api),g.K(this,this.tF),g.P7(this.api,this.tF.element,4)),this.tF.C(R.Yu),this.tF.show()):this.tF&&(this.tF.dispose(),this.tF=null)}ZC(){return this.api.KS()&&this.api.xK()?(this.api.tA(!1,!1),!0):this.api.Jj()?(g.Om(this.api,!0),!0):!1}onMutedAutoplayChange(R){this.Cb=R;this.GV()}r_(){return!1}dl(){return!this.r_()&& (this.api.getPlayerSize().width{this.element.style.margin="0"},250); this.onClickCommand=this.C=null;g.K(this,this.fade);g.K(this,this.D);g.K(this,this.J);g.K(this,this.xY);R.V().Y("player_new_info_card_format")?(g.pc(R.getRootNode(),"ytp-cards-teaser-dismissible"),this.W(this.KB("ytp-cards-teaser-close-button"),"click",this.I0),this.W(this.KB("ytp-cards-teaser-info-icon"),"click",this.U),this.W(this.KB("ytp-cards-teaser-label"),"click",this.U)):this.listen("click",this.U);this.W(w.element,"mouseover",this.S);this.W(w.element,"mouseout",this.X);this.W(R,"cardsteasershow", this.YY);this.W(R,"cardsteaserhide",this.Qh);this.W(R,"cardstatechange",this.O0);this.W(R,"presentingplayerstatechange",this.O0);this.W(R,"appresize",this.K);this.W(R,"onShowControls",this.K);this.W(R,"onHideControls",this.Jl);this.listen("mouseenter",this.M0)}O0(){this.B.KS()&&this.B.xK()&&this.Pu()&&this.Qh()}U(){this.Qh();!this.B.KS()&&this.B.V().Y("enable_error_corrections_infocards_icon_web")&&this.oh.Qh();g.JT("iv-teaser-clicked",this.L!=null);this.onClickCommand?g.m1(this.B,"innertubeCommand", this.onClickCommand):this.B.getVideoData()?.Pw()||this.B.tA(!0,!1,"YOUTUBE_DRAWER_MANUAL_OPEN")}M0(){g.JT("iv-teaser-mouseover");this.L&&this.L.stop()}YY(R){this.B.V().Y("player_new_info_card_format")&&!g.zI(this.B.V())?this.oh.Qh():this.B.V().Y("enable_error_corrections_infocards_icon_web")&&this.oh.R9();this.L||!R||this.B.xK()||this.O&&this.O.isActive()||(this.R9(R),g.JT("iv-teaser-shown"))}R9(R){this.onClickCommand=R.onClickCommand;this.updateValue("text",R.teaserText);this.element.setAttribute("dir", g.lG(R.teaserText));this.fade.show();if(this.B.V().Y("player_new_info_card_format")){const w=this.KB("ytp-cards-teaser-info-icon"),p=this.KB("ytp-cards-teaser-channel-avatar");p&&R.P7&&g.L2(R.P7)&&(p.src=R.P7,p.style.display="block",w.style.display="none")}this.O=new g.vZ(function(){g.pc(this.B.getRootNode(),"ytp-cards-teaser-shown");this.B.Y("player_new_info_card_format")&&!g.zI(this.B.V())&&this.oh.Qh();this.K()},0,this); this.O.start();this.oh.LN(!1);this.L=new g.vZ(this.Qh,580+R.durationMs,this);this.L.start();this.G.push(this.listen("mouseover",this.S,this));this.G.push(this.listen("mouseout",this.X,this))}K(){if(!this.B.V().Y("player_new_info_card_format")&&g.zI(this.B.V())&&this.K_){const R=this.oh.element.offsetLeft,w=g.Up("ytp-cards-button-icon"),p=this.B.isFullscreen()?54:36;if(w){const r=R+w.offsetLeft;this.element.style.marginRight=this.oh.element.offsetParent.offsetWidth-R-w.offsetLeft-p+"px";this.element.style.marginLeft= r+"px"}}}Jl(){g.zI(this.B.V())&&this.B.dl()&&this.K_&&this.xY.start()}S(){this.J.stop();this.L&&this.L.isActive()&&this.D.start()}X(){this.D.stop();this.L&&!this.L.isActive()&&this.J.start()}PS(){this.L&&this.L.stop()}jI(){this.Qh()}I0(){this.Qh()}Qh(){!this.L||this.C&&this.C.isActive()||(g.JT("iv-teaser-hidden"),this.fade.hide(),g.fc(this.B.getRootNode(),"ytp-cards-teaser-shown"),this.C=new g.vZ(function(){for(const R of this.G)this.o9(R);this.G=[];this.L&&(this.L.dispose(),this.L=null);this.oh.LN(!0); !this.B.KS()&&this.B.V().Y("enable_error_corrections_infocards_icon_web")&&this.oh.Qh()},330,this),this.C.start())}Pu(){return this.K_&&this.fade.state!==4}Gy(){const R=this.B.getRootNode(); R&&g.fc(R,"ytp-cards-teaser-shown");g.rG(this.O,this.C,this.L);super.Gy()}};var zN={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"},JrI=class extends g.k{constructor(R){super({j:"button",E0:[zN.BUTTON,zN.TITLE_NOTIFICATIONS],A:{"aria-pressed":"{{pressed}}","aria-label":"{{label}}"},N:[{j:"div",Z:zN.TITLE_NOTIFICATIONS_ON,A:{title:"Stop getting notified about every new video","aria-label":"Notify subscriptions"}, N:[g.m5D()]},{j:"div",Z:zN.TITLE_NOTIFICATIONS_OFF,A:{title:"Get notified about every new video","aria-label":"Notify subscriptions"},N:[{j:"svg",A:{fill:"#fff",height:"24px",viewBox:"0 0 24 24",width:"24px"},N:[{j:"path",A:{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=R;this.L=!1;R.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 R=!this.L;this.updateValue("label",R?"Stop getting notified about every new video":"Get notified about every new video");this.updateValue("pressed",R);X_d(this,R)}};g.AY("yt.pubsub.publish",g.JT);g.xH=class extends g.k{constructor(R,w,p,r,f,G,I,C,u,m,z,B){R=R.charAt(0)+R.substring(1).toLowerCase();p=p.charAt(0)+p.substring(1).toLowerCase();if(w==="0"||w==="-1")w=null;if(r==="0"||r==="-1")r=null;const W=z.V(),x=W.userDisplayName&&g.sg(W);super({j:"div",E0:["ytp-button","ytp-sb"],N:[{j:"div",Z:"ytp-sb-subscribe",A:x?{title:z.V().Y("player_tooltip_data_title_killswitch")?g.K2("Subscribe as $USER_NAME",{USER_NAME:W.userDisplayName}):"","data-tooltip-title":g.K2("Subscribe as $USER_NAME",{USER_NAME:W.userDisplayName}), "aria-label":"Subscribe to channel","data-tooltip-image":ca(W),"data-tooltip-opaque":String(g.zI(W)),tabindex:"0",role:"button"}:{"aria-label":"Subscribe to channel"},N:[{j:"div",Z:"ytp-sb-text",N:[{j:"div",Z:"ytp-sb-icon"},R]},w?{j:"div",Z:"ytp-sb-count",fB:w}:""]},{j:"div",Z:"ytp-sb-unsubscribe",A:x?{title:z.Y("player_tooltip_data_title_killswitch")?g.K2("Subscribed as $USER_NAME",{USER_NAME:W.userDisplayName}):"","data-tooltip-title":g.K2("Subscribed as $USER_NAME",{USER_NAME:W.userDisplayName}), "aria-label":"Unsubscribe to channel","data-tooltip-image":ca(W),"data-tooltip-opaque":String(g.zI(W)),tabindex:"0",role:"button"}:{"aria-label":"Unsubscribe to channel"},N:[{j:"div",Z:"ytp-sb-text",N:[{j:"div",Z:"ytp-sb-icon"},p]},r?{j:"div",Z:"ytp-sb-count",fB:r}:""]}],A:{"aria-live":"polite"}});this.channelId=I;this.B=z;this.O=B;const q=this.KB("ytp-sb-subscribe"),O=this.KB("ytp-sb-unsubscribe");G&&g.pc(this.element,"ytp-sb-classic");if(f){C?this.L():this.C();var e=()=>{if(W.O0){var c=this.channelId; if(u||m){var X={c};var Z;g.RT.isInitialized()&&(Z=pCr(X));X=Z||"";if(Z=z.getVideoData())if(Z=Z.subscribeCommand){var Gr=z.QC();Gr?(aw(Gr,Z,{botguardResponse:X,feature:u}),g.m1(z,"SUBSCRIBE",c)):g.LF(Error("No innertube service available when updating subscriptions."))}else g.LF(Error("No subscribe command in videoData."));else g.LF(Error("No video data available when updating subscription."))}O.focus();O.removeAttribute("aria-hidden");q.setAttribute("aria-hidden","true")}else BB(g.qU(this.B.V()), "sb_button",this.G)},P=()=>{var c=this.channelId; if(u||m){var X=z.getVideoData();aw(z.QC(),X.unsubscribeCommand,{feature:u});g.m1(z,"UNSUBSCRIBE",c)}q.focus();q.removeAttribute("aria-hidden");O.setAttribute("aria-hidden","true")}; this.W(q,"click",e);this.W(O,"click",P);this.W(q,"keypress",c=>{c.keyCode===13&&e(c)}); this.W(O,"keypress",c=>{c.keyCode===13&&P(c)}); this.W(z,"SUBSCRIBE",this.L);this.W(z,"UNSUBSCRIBE",this.C);this.O&&x&&(kOx(z),or(z,q,this),or(z,O,this))}else g.pc(q,"ytp-sb-disabled"),g.pc(O,"ytp-sb-disabled")}G(){window.location.reload()}L(){g.pc(this.element,"ytp-sb-subscribed")}C(){g.fc(this.element,"ytp-sb-subscribed")}};var $ia=class extends g.k{constructor(R){super({j:"div",Z:"ytp-title-channel",N:[{j:"div",Z:"ytp-title-beacon"},{j:"a",Z:"ytp-title-channel-logo",A:{href:"{{channelLink}}",target:R.V().X,role:"link","aria-label":"{{channelLogoLabel}}",tabIndex:"0"}},{j:"div",Z:"ytp-title-expanded-overlay",A:{"aria-hidden":"{{flyoutUnfocusable}}"},N:[{j:"div",Z:"ytp-title-expanded-heading",N:[{j:"div",Z:"ytp-title-expanded-title",N:[{j:"a",fB:"{{expandedTitle}}",A:{href:"{{channelTitleLink}}",target:R.V().X,"aria-hidden":"{{shouldHideExpandedTitleForA11y}}", tabIndex:"{{channelTitleFocusable}}"}}]},{j:"div",Z:"ytp-title-expanded-subtitle",fB:"{{expandedSubtitle}}",A:{"aria-hidden":"{{shouldHideExpandedSubtitleForA11y}}"}}]}]}]});this.api=R;this.channel=this.KB("ytp-title-channel");this.C=this.KB("ytp-title-channel-logo");this.channelName=this.KB("ytp-title-expanded-title");this.U=this.KB("ytp-title-expanded-overlay");this.O=this.L=this.subscribeButton=null;this.G=!1;R.createClientVe(this.C,this,36925);R.createClientVe(this.channelName,this,37220);g.zI(this.api.V())&& FtW(this);this.W(R,"videodatachange",this.WS);this.W(R,"videoplayerreset",this.WS);this.W(this.channelName,"click",w=>{this.api.logClick(this.channelName);g.g2(window,WB(this));w.preventDefault()}); this.W(this.C,"click",this.S);this.WS()}S(R){this.api.logClick(this.C);const w=this.api.V();w.C||w.PS?jbb(this)&&(this.isExpanded()?this.K():this.J()):g.g2(window,WB(this));R.preventDefault()}D(){Y56(this);this.channel.classList.remove("ytp-title-expanded")}isExpanded(){return this.channel.classList.contains("ytp-title-expanded")}J(){if(jbb(this)&&!this.isExpanded()){this.updateValue("flyoutUnfocusable","false");this.updateValue("channelTitleFocusable","0");this.updateValue("shouldHideExpandedTitleForA11y", "false");this.updateValue("shouldHideExpandedSubtitleForA11y","false");this.O&&this.O.stop();this.api.logVisibility(this.channelName,!0);this.subscribeButton&&(this.subscribeButton.show(),this.api.logVisibility(this.subscribeButton.element,!0));const R=this.api.getVideoData();this.L&&R.Ww&&R.subscribed&&(this.L.show(),this.api.logVisibility(this.L.element,!0));this.channel.classList.add("ytp-title-expanded");this.channel.classList.add("ytp-title-show-expanded")}}K(){this.updateValue("flyoutUnfocusable", "true");this.updateValue("channelTitleFocusable","-1");this.updateValue("shouldHideExpandedTitleForA11y","true");this.updateValue("shouldHideExpandedSubtitleForA11y","true");this.O&&this.O.start()}WS(){const R=this.api.V();this.Rg(!this.api.isEmbedsShortsMode());const w=this.api.getVideoData(),p=this.api.V(),r=this.api.getVideoData();this.G=!1;const f=!!r.videoId&&!!r.PS&&!!r.profilePicture;this.api.getPresentingPlayerType()===2?this.G=f&&!!r.isListed&&!!r.author:g.zI(p)&&(this.G=f&&!r.h$&&!p.O&& !(p.D&&this.api.getPlayerSize().width<200));T9I(this,w.profilePicture,g.zI(R)?w.expandedTitle:w.author);this.subscribeButton&&(this.subscribeButton.channelId=w.wy);this.updateValue("expandedTitle",w.expandedTitle);this.updateValue("expandedSubtitle",w.expandedSubtitle)}GK(R){super.GK(R);this.api.logVisibility(this.C,this.G&&R)}};var iL=class extends g.wv{constructor(R){super(g.Ys({"aria-haspopup":"true"}),R);this.listen("keydown",this.R3)}R3(R){R.defaultPrevented||R.keyCode!==39||(this.element.click(),R.preventDefault())}};var XwP=class extends g.k{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(R,w){super({j:"div",Z:"ytp-user-info-panel",A:{"aria-label":"User info"},N:R.V().O0?[{j:"div",Z:"ytp-user-info-panel-icon",fB:"{{icon}}"},{j:"div",Z:"ytp-user-info-panel-content",N:[{j:"div",Z:"ytp-user-info-panel-info", A:{tabIndex:"{{userInfoFocusable}}",role:"text"},fB:"{{watchingAsUsername}}"},{j:"div",Z:"ytp-user-info-panel-info",A:{tabIndex:"{{userInfoFocusable2}}",role:"text"},fB:"{{watchingAsEmail}}"}]}]:[{j:"div",Z:"ytp-user-info-panel-icon",fB:"{{icon}}"},{j:"div",Z:"ytp-user-info-panel-content",N:[{j:"div",N:[{j:"text",A:{tabIndex:"{{userInfoFocusable}}"},fB:"Signed out"}]},{j:"div",Z:"ytp-user-info-panel-login",N:[{j:"a",A:{tabIndex:"{{userInfoFocusable2}}",role:"button"},fB:R.V().f_?"":"Sign in on YouTube"}]}]}]}); this.o0=R;this.sourceElement=w;R.V().O0||R.V().f_||this.W(this.KB("ytp-user-info-panel-login"),"click",this.C);this.closeButton=new g.k({j:"button",E0:["ytp-collapse","ytp-button"],A:{title:"Close"},N:[g.lE()]});this.closeButton.gN(this.element);g.K(this,this.closeButton);this.W(window,"blur",this.hide);this.W(document,"click",this.L);this.WS()}L(R){const w=jN(R),p=g.lA(this.closeButton.element,w),r=g.lA(this.element,w);R=this.sourceElement&&g.lA(this.sourceElement,w)&&g.$t(R);w&&(r||R)&&!p||this.hide()}C(){BB(g.qU(this.o0.V()), "user_info_panel",()=>{window.location.reload()})}WS(){const R=this.o0.V(),w={USER_NAME:R.userDisplayName, USER_EMAIL:R.sZ};this.updateValue("icon",x5d());this.updateValue("watchingAsUsername",g.K2("Watching as $USER_NAME",w));R.sZ?this.updateValue("watchingAsEmail",g.K2("($USER_EMAIL)",w)):this.updateValue("watchingAsEmail","")}};var nka=class extends g.X2{constructor(R,w,p){super(R);this.OQ=w;this.YN=p;this.getVideoUrl=new iL(6);this.fX=new iL(5);this.xi=new iL(4);this.TK=new iL(3);this.ao=new g.wv(g.Ys({href:"{{href}}",target:this.B.V().X},void 0,!0),2,"Troubleshoot playback issue");this.showVideoInfo=new g.wv(g.Ys(),1,"Stats for nerds");this.Dq=new g.RX({j:"div",E0:["ytp-copytext","ytp-no-contextmenu"],A:{draggable:"false",tabindex:"1"},fB:"{{text}}"});this.nC=new $a(this.B,this.Dq);this.dh=this.wc=null;g.zI(this.B.V())&& (this.closeButton=new g.k({j:"button",E0:["ytp-collapse","ytp-button"],A:{title:"Close"},N:[g.lE()]}),g.K(this,this.closeButton),this.closeButton.gN(this.element),this.closeButton.listen("click",this.Og,this));g.zI(this.B.V())&&(this.Aa=new g.wv(g.Ys(),10,"Account"),g.K(this,this.Aa),this.CL(this.Aa,!0),this.Aa.listen("click",this.Rs,this),R.createClientVe(this.Aa.element,this.Aa,137682));this.B.V().FL&&(this.yI=new Ap("Loop",9),g.K(this,this.yI),this.CL(this.yI,!0),this.yI.listen("click",this.Dv, this),R.createClientVe(this.yI.element,this.yI,28661));this.B.Y("web_player_miniplayer_in_context_menu")&&(this.OI=new g.wv(g.Ys(),8,"Miniplayer"),g.K(this,this.OI),this.CL(this.OI,!0),this.OI.listen("click",this.Zv,this),R.createClientVe(this.OI.element,this.OI,62946));this.B.Y("web_watch_pip_context_menu_button")&&this.B.V().showMiniplayerButton&&(this.SG=new g.wv(g.Ys(),7,"Picture-in-picture"),g.K(this,this.SG),this.CL(this.SG,!0),this.SG.listen("click",this.QH,this),R.createClientVe(this.SG.element, this.SG,194442));g.K(this,this.getVideoUrl);this.CL(this.getVideoUrl,!0);this.getVideoUrl.listen("click",this.P5,this);R.createClientVe(this.getVideoUrl.element,this.getVideoUrl,28659);g.K(this,this.fX);this.CL(this.fX,!0);this.fX.listen("click",this.Y6,this);R.createClientVe(this.fX.element,this.fX,28660);g.K(this,this.xi);this.CL(this.xi,!0);this.xi.listen("click",this.i5,this);R.createClientVe(this.xi.element,this.xi,28658);g.K(this,this.TK);this.CL(this.TK,!0);this.TK.listen("click",this.l5,this); g.K(this,this.ao);this.CL(this.ao,!0);this.ao.listen("click",this.PR,this);g.K(this,this.showVideoInfo);this.CL(this.showVideoInfo,!0);this.showVideoInfo.listen("click",this.VJ,this);g.K(this,this.Dq);this.Dq.listen("click",this.gT,this);g.K(this,this.nC);ixd()&&(this.wc=new g.k({j:"textarea",Z:"ytp-html5-clipboard",A:{readonly:"",tabindex:"-1"}}),g.K(this,this.wc),this.wc.gN(this.element));this.Aa?.setIcon(x5d());this.yI?.setIcon(AIP());this.OI?.setIcon(this.B.Y("delhi_modern_web_player_icons")? ud6():mj());this.SG?.setIcon(mj());this.TK.setIcon({j:"svg",A:{height:"24",viewBox:"0 0 24 24",width:"24"},N:[{j:"path",A:{"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.ao.setIcon(I$());this.showVideoInfo.setIcon(f9Y());this.W(R,"onLoopChange",this.onLoopChange);this.W(R,"videodatachange",this.onVideoDataChange);this.W(R,"fullscreentoggled",()=>{LE(this)}); this.W(R,"minimized",()=>{LE(this);this.SG?.Rg(!this.B.isMinimized()&&this.B.V().showMiniplayerButton)}); QbI(this);hzD(this,this.B.getVideoData())}Og(){this.OQ.Qh()}gT(){NS(this.Dq.element)}l5(){q8(this,this.B.getDebugText(!0))&&so(this.YN,wQ())}i5(){q8(this,this.B.getVideoEmbedCode())&&so(this.YN,wMd());this.B.logClick(this.xi.element)}P5(){q8(this,this.B.getVideoUrl(!0,!0))&&so(this.YN,CQ());this.B.logClick(this.getVideoUrl.element)}Y6(){q8(this,this.B.getVideoUrl(!1,!0))&&so(this.YN,CQ());this.B.logClick(this.fX.element)}onLoopChange(R){this.yI?.L(R)}Dv(){this.B.setLoopVideo(this.yI.getValue());this.OQ.Qh(); this.B.logClick(this.yI.element)}Zv(){g.m1(this.B,"onCollapseMiniplayer");this.OQ.Qh()}QH(){g.m1(this.B,"onCollapseMiniplayer",!0);this.OQ.Qh()}PR(R){this.B.reportPlaybackIssue();if(g.ha(R,this.B,!b8(this.B.V()))){R=this.B;const w=R.app.getFeedbackProductData();g.xs(R,"onFeedbackStartRequest",w);R.isFullscreen()&&R.toggleFullscreen()}this.OQ.Qh()}VJ(){g.W7(this.B,"isVideoInfoVisible",[])?g.W7(this.B,"hideVideoInfo",[]):g.W7(this.B,"showVideoInfo",[]);this.OQ.Qh()}Rs(){this.Aa&&(this.dh||(this.dh= new XwP(this.B,this.Aa.element),g.K(this,this.dh),g.P7(this.B,this.dh.element,4)),this.dh.show(),this.OQ.Qh(),this.B.logClick(this.Aa.element))}onVideoDataChange(R,w){hzD(this,w)}GK(R){super.GK(R);this.B.logVisibility(this.xi.element,R);this.B.logVisibility(this.getVideoUrl.element,R);this.B.logVisibility(this.fX.element,R);this.yI&&this.B.logVisibility(this.yI.element,R);this.Aa&&this.B.logVisibility(this.Aa.element,R);this.OI&&this.B.logVisibility(this.OI.element,R)}};var diP=class extends g.nI{constructor(R,w){super(R);this.YN=w;this.C=new g.th(this);this.D=new g.vZ(this.nB,1E3,this);this.xY=this.UC=null;g.K(this,this.C);g.K(this,this.D);w=this.B.V();R.createClientVe(this.element,this,28656);g.pc(this.element,"ytp-contextmenu");this.B.V().experiments.XB("delhi_modern_web_player")&&g.t5(w)&&g.pc(this.element,"ytp-delhi-modern-contextmenu");Hxd(this);this.hide()}onTouchStart(R){const w=jN(R);w&&(y8(w,"a")||y8(w,null,"ytp-no-contextmenu"))||this.K_||(this.xY=(R= R.touches?.item(0))?new g.Xx(R.clientX,R.clientY):new g.Xx(0,0),this.D.start())}S(){this.D.stop()}nB(){this.open(this.xY)}X(){if(this.UC&&gUd(this.UC)){const R=gUd(this.UC).element;R.tabIndex=-1;R.focus()}else this.element.tabIndex=-1,this.element.focus()}show(){this.UC||(this.UC=new nka(this.B,this,this.YN),g.K(this,this.UC),g.Rk(this,this.UC));this.UC.onLoopChange(this.B.getLoopVideo());super.show();this.B.logVisibility(this.element,!0);this.UC.GK(!0)}hide(){Hxd(this);super.hide();this.B.logVisibility(this.element, !1);this.UC&&this.UC.GK(!1)}Jl(R){const w=jN(R);this.K_||w&&(y8(w,"a")||y8(w,null,"ytp-no-contextmenu"))||(R.preventDefault(),this.open(new g.Xx(R.pageX,R.pageY)))}R9(R){if(R){const w=R.getBoundingClientRect();this.open(new g.Xx(w.x,w.y))}super.R9(R)}open(R){vUL(this);var w=this.B.getVideoData();g.M(this.element,"ytp-dni",w.h$);this.element.style.left="";this.element.style.top="";R.x++;R.y++;super.R9();var p=dH(this).body;w=new cc(0,Infinity,Infinity,0);var r=hJ(p);for(var f=r.L.body,G=r.L.documentElement, I=p$(r.L);p=Ndd(p);)if((!g.f$||p.clientHeight!=0||p!=f)&&p!=f&&p!=G&&iA(p,"overflow")!="visible"){const C=g.Hc(p),u=new g.Xx(p.clientLeft,p.clientTop);C.x+=u.x;C.y+=u.y;w.top=Math.max(w.top,C.y);w.right=Math.min(w.right,C.x+p.clientWidth);w.bottom=Math.min(w.bottom,C.y+p.clientHeight);w.left=Math.max(w.left,C.x)}f=I.scrollLeft;I=I.scrollTop;w.left=Math.max(w.left,f);w.top=Math.max(w.top,I);r=wp(r.L.defaultView||window);w.right=Math.min(w.right,f+r.width);w.bottom=Math.min(w.bottom,I+r.height);r=w.top>= 0&&w.left>=0&&w.bottom>w.top&&w.right>w.left?w:null;w=this.size;R=R.clone();w=w.clone();r&&(I=w,f=5,(f&65)==65&&(R.x=r.right)&&(f&=-2),(f&132)==132&&(R.y=r.bottom)&&(f&=-5),R.xr.right&&(I.width=Math.min(r.right-R.x,G+I.width-r.left),I.width=Math.max(I.width,0))),R.x+I.width>r.right&&f&1&&(R.x=Math.max(r.right-I.width,r.left)),R.y r.bottom&&(I.height=Math.min(r.bottom-R.y,G+I.height-r.top),I.height=Math.max(I.height,0))),R.y+I.height>r.bottom&&f&4&&(R.y=Math.max(r.bottom-I.height,r.top)));r=new g.X8(0,0,0,0);r.left=R.x;r.top=R.y;r.width=w.width;r.height=w.height;g.hG(this.element,new g.Xx(r.left,r.top));this.C.C();this.C.W(dH(this),"contextmenu",this.jI);this.C.W(this.B,"fullscreentoggled",this.onFullscreenToggled);this.C.W(this.B,"pageTransition",this.O0)}jI(R){if(!R.defaultPrevented){const w=jN(R);g.lA(this.element,w)||this.Qh(); this.B.V().disableNativeContextMenu&&R.preventDefault()}}onFullscreenToggled(){this.Qh();vUL(this)}O0(){this.Qh()}};var Zjb=class extends g.k{constructor(R,w){super({j:"button",E0:["ytp-button","ytp-copylink-button"],A:{title:R.Y("player_tooltip_data_title_killswitch")?"{{title-attr}}":"","data-tooltip-title":"{{tooltip-title}}","data-tooltip-opaque":String(g.zI(R.V()))},N:[{j:"div",Z:"ytp-copylink-icon",fB:"{{icon}}"},{j:"div",Z:"ytp-copylink-title",fB:"Copy link",A:{"aria-hidden":"true"}}]});this.api=R;this.L=w;this.visible=!1;this.tooltip=this.L.dg();w=R.V();this.tooltip.element.setAttribute("aria-live","polite"); g.M(this.element,"ytp-show-copylink-title",g.zI(w));R.createClientVe(this.element,this,86570);this.listen("click",this.onClick);this.W(R,"videodatachange",this.WS);this.W(R,"videoplayerreset",this.WS);this.W(R,"appresize",this.WS);this.WS();this.addOnDisposeCallback(g.V9(this.tooltip,this.element))}async onClick(){var R=this.api.V();const w=this.api.getVideoData(),p=this.api.getPlaylistId();R=R.getVideoUrl(w.videoId,p,void 0,!0);await N9l(this,R)&&kkI(this);this.api.logClick(this.element)}WS(){this.updateValue("icon", {j:"svg",A:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},N:[{j:"path",FI:!0,Z:"ytp-svg-fill",A:{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=Usd(this);g.M(this.element,"ytp-copylink-button-visible",this.visible); this.Rg(this.visible);this.tooltip.wl();this.api.logVisibility(this.element,this.visible&&this.pB)}GK(R){super.GK(R);this.api.logVisibility(this.element,this.visible&&R)}Gy(){super.Gy();g.fc(this.element,"ytp-copylink-button-visible")}};var Y3M=class extends g.k{constructor(R){super({j:"div",Z:"ytp-doubletap-ui-legacy",N:[{j:"div",Z:"ytp-doubletap-fast-forward-ve"},{j:"div",Z:"ytp-doubletap-rewind-ve"},{j:"div",Z:"ytp-doubletap-static-circle",N:[{j:"div",Z:"ytp-doubletap-ripple"}]},{j:"div",Z:"ytp-doubletap-overlay-a11y"},{j:"div",Z:"ytp-doubletap-seek-info-container",N:[{j:"div",Z:"ytp-doubletap-arrows-container",N:[{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",N:[{j:"div",Z:"ytp-seek-icon-text-container",N:[{j:"div",Z:"ytp-seek-icon",fB:"{{seekIcon}}"},{j:"div",Z:"ytp-chapter-seek-text-legacy",fB:"{{seekText}}"}]},{j:"div",Z:"ytp-doubletap-tooltip-label",fB:"{{seekTime}}"}]}]}]});this.B=R;this.G=new g.vZ(this.show,10,this);this.C=new g.vZ(this.hide,700,this);this.J=this.O=0;this.X=this.K=!1;this.L=this.KB("ytp-doubletap-static-circle");g.K(this,this.G);g.K(this,this.C);this.hide();this.D=this.KB("ytp-doubletap-fast-forward-ve"); this.U=this.KB("ytp-doubletap-rewind-ve");this.B.createClientVe(this.D,this,28240);this.B.createClientVe(this.U,this,28239);this.B.logVisibility(this.D,!0);this.B.logVisibility(this.U,!0);this.K=R.Y("web_show_cumulative_seek_time");this.X=R.Y("web_center_static_circles")}show(){super.show();this.C.ql()}hide(){this.G.stop();this.O=0;this.KB("ytp-seek-icon").style.display="none";this.updateValue("seekIcon","");g.fc(this.element,"ytp-chapter-seek");g.fc(this.element,"ytp-time-seeking");super.hide()}IT(R, w,p,r){this.O=R===this.J?this.O+r:r;this.J=R;var f=R===-1?this.U:this.D;f&&this.B.logClick(f);this.K?this.C.stop():this.C.bv();this.G.start();this.element.setAttribute("data-side",R===-1?"back":"forward");var G=3*this.B.L_().getPlayerSize().height;f=this.B.L_().getPlayerSize();f=f.width/3-3*f.height;this.L.style.width=`${G}px`;this.L.style.height=`${G}px`;R===1?(this.L.style.left="",this.L.style.right=`${f}px`):R===-1&&(this.L.style.right="",this.L.style.left=`${f}px`);const I=G*2.5;G=I/2;const C= this.KB("ytp-doubletap-ripple");C.style.width=`${I}px`;C.style.height=`${I}px`;R===1?(R=this.B.L_().getPlayerSize().width-w+Math.abs(f),C.style.left="",C.style.right=`${R-G}px`):R===-1&&(R=Math.abs(f)+w,C.style.right="",C.style.left=`${R-G}px`);C.style.top=`calc((33% + ${Math.round(p)}px) - ${G}px)`;if(p=this.KB("ytp-doubletap-ripple"))p.classList.remove("ytp-doubletap-ripple"),p.classList.add("ytp-doubletap-ripple");S5b(this,this.K?this.O:r)}Rl(R,w,p=null){if(p){var r=R===-1?this.U.visualElement: this.D.visualElement;p={seekData:p};const f=g.ut();f&&hO(f,r,"INTERACTION_LOGGING_GESTURE_TYPE_KEY_PRESS",p)}this.O=R===this.J?this.O+w:w;this.J=R;r=this.B.L_().getPlayerSize();this.K?this.C.stop():this.C.bv();this.G.start();this.element.setAttribute("data-side",R===-1?"back":"forward");g.pc(this.element,"ytp-time-seeking");this.L.style.width="110px";this.L.style.height="110px";p=r.width*.1-15;R===1?this.X?(this.L.style.right=`${p}px`,this.L.style.left=""):(this.L.style.right="",this.L.style.left= `${r.width*.8-30}px`):R===-1&&(this.X?(this.L.style.right="",this.L.style.left=`${p}px`):(this.L.style.right="",this.L.style.left=`${r.width*.1-15}px`));this.L.style.top=`${r.height*.5+15}px`;S5b(this,this.K?this.O:w)}k_(R,w,p=null){this.C.bv();this.G.start();switch(R){case -1:R="back";break;case 1:R="forward";break;default:R=""}this.element.setAttribute("data-side",R);this.L.style.width="0";this.L.style.height="0";g.pc(this.element,"ytp-chapter-seek");this.updateValue("seekText",w);this.updateValue("seekTime", "");w=this.KB("ytp-seek-icon");if(p){a:if(p){switch(p){case "PREMIUM_STANDALONE":p=l9x();break a;case "PREMIUM_STANDALONE_CAIRO":p=LK_();break a}p=void 0}else p=null;this.updateValue("seekIcon",p);w.style.display="inline-block"}else w.style.display="none"}};var FuV=class extends aP{constructor(R){super(R,!1,!0);this.U0=[];this.ez=[];this.element.setAttribute("data-overlay-order","9");RKI(this,this.B.getVideoData());this.O0=!0;this.badge.element.classList.add("ytp-featured-product");this.eI=new g.k({j:"div",Z:"ytp-featured-product-open-in-new"});g.K(this,this.eI);this.countdownTimer=new g.k({j:"text",Z:"ytp-featured-product-countdown",fB:"{{content}}"});this.countdownTimer.hide();g.K(this,this.countdownTimer);this.G=new g.k({j:"div",Z:"ytp-featured-product-trending", N:[{j:"div",Z:"ytp-featured-product-trending-icon"},{j:"text",Z:"ytp-featured-product-trending-text",fB:"{{trendingOffer}}"}]});this.G.hide();g.K(this,this.G);this.overflowButton=new g.k({j:"button",E0:["ytp-featured-product-overflow-icon","ytp-button"],A:{"aria-haspopup":"true"}});this.overflowButton.hide();g.K(this,this.overflowButton);this.xY=new g.k({j:"text",Z:"ytp-featured-product-exclusive-countdown",fB:"{{content}}",A:{id:"exclusiveCountdown","aria-hidden":"true"}});this.xY.hide();g.K(this, this.xY);this.S=new g.k({j:"div",Z:"ytp-featured-product-exclusive-container",A:{"aria-labelledby":"exclusiveBadge exclusiveCountdown"},N:[{j:"div",Z:"ytp-featured-product-exclusive-badge-container",N:[{j:"div",Z:"ytp-featured-product-exclusive-badge",N:[{j:"text",Z:"ytp-featured-product-exclusive-badge-text",fB:"{{exclusive}}",A:{id:"exclusiveBadge","aria-hidden":"true"}}]}]},this.xY]});this.S.hide();g.K(this,this.S);this.banner=new g.k({j:"a",Z:"ytp-featured-product-container",N:[{j:"div",Z:"ytp-featured-product-thumbnail", N:[{j:"img",A:{src:"{{thumbnail}}"}},this.eI]},{j:"div",Z:"ytp-featured-product-details",N:[{j:"text",Z:"ytp-featured-product-title",fB:"{{title}}"},this.B.Y("web_player_enable_featured_product_banner_promotion_text_on_desktop")?{j:"div",Z:"ytp-featured-product-price-container",A:{"aria-label":"{{priceA11yText}}"},N:[{j:"text",Z:"ytp-featured-product-price-when-promotion-text-enabled",fB:"{{price}}",A:{"aria-hidden":"true"}},{j:"text",Z:"ytp-featured-product-promotion-text",fB:"{{promotionText}}", A:{"aria-hidden":"true"}}]}:{j:"div",A:{"aria-label":"{{priceA11yText}}"},N:[{j:"text",Z:"ytp-featured-product-price",fB:"{{price}}",A:{"aria-hidden":"true"}},{j:"text",Z:"ytp-featured-product-sales-original-price",fB:"{{salesOriginalPrice}}",A:{"aria-hidden":"true"}},{j:"text",Z:"ytp-featured-product-price-drop-reference-price",fB:"{{priceDropReferencePrice}}",A:{"aria-hidden":"true"}}]},this.B.Y("web_player_enable_featured_product_banner_promotion_text_on_desktop")?{j:"div",Z:"ytp-featured-product-when-promotion-text-enabled", N:[{j:"text",Z:"ytp-featured-product-affiliate-disclaimer-when-promotion-text-enabled",fB:"{{affiliateDisclaimer}}"},this.G,{j:"text",Z:"ytp-featured-product-vendor-when-promotion-text-enabled",fB:"{{vendor}}"}]}:{j:"div",N:[{j:"text",Z:"ytp-featured-product-affiliate-disclaimer",fB:"{{affiliateDisclaimer}}"},this.B.Y("web_player_enable_featured_product_banner_exclusives_on_desktop")?this.S:null,this.G,{j:"text",Z:"ytp-featured-product-vendor",fB:"{{vendor}}"},this.countdownTimer]}]},this.overflowButton]}); g.K(this,this.banner);this.banner.gN(this.K.element);this.W(this.B,g.bp("featured_product"),this.Hw);this.W(this.B,g.yl("featured_product"),this.nB);this.W(this.B,"videodatachange",this.onVideoDataChange);this.W(this.overflowButton.element,"click",this.Nk);this.W(R,"featuredproductdismissed",this.U)}Nk(R){this.mq||(this.mq=new HRa(this.B),g.K(this,this.mq));this.Df?.menu?.menuRenderer&&(this.mq.open(this.Df.menu.menuRenderer,R.target),R.preventDefault())}X(){return!!this.L}SI(){return!!this.L}YY(R){R.target=== this.overflowButton.element?R.preventDefault():(this.B1&&g.m1(this.B,"innertubeCommand",this.B1),this.D(!1))}U(){this.D(!0);if(this.L?.bannerData?.dismissedStatusKey){if(this.ez.includes(this.L.bannerData.dismissedStatusKey))return;this.ez.push(this.L.bannerData.dismissedStatusKey)}this.nB();if(this.B.Y("web_enable_shopping_timely_shelf_client")){const R={};g.Ek(R,N7d,{overlayId:"player_overlay_timely_shelf"});g.m1(this.B,"innertubeCommand",R)}}a9(){this.nB();AM(this)}Hw(R){if(R.id!==this.L?.identifier){this.nB(); for(const w of this.U0){const p=w?.bannerData?.itemData;if(!p||w.identifier!==R.id)continue;if(this.ez.includes(w?.bannerData?.dismissedStatusKey||""))return;this.L=w;this.banner.element.setAttribute("aria-label",p.accessibilityLabel||"");p.trackingParams&&(this.O=!0,this.B.setTrackingParams(this.badge.element,p.trackingParams));this.show();this.I0.show();vd(this);this.eI.Rg(!p.stayInApp);this.Mr?.stop();this.countdownTimer.hide();yR(this);bn(this);this.B1=g.F(p.onTapCommand,tO);const r=g.F(p.menuOnTap, tO);r&&(this.Df=g.F(r,RTW));this.banner.update({thumbnail:(p.thumbnailSources||[])[0]?.url,title:p.productTitle,price:p.priceReplacementText?p.priceReplacementText:p.price,salesOriginalPrice:wF6(this),priceDropReferencePrice:pFY(this),promotionText:rvW(this),priceA11yText:fub(this),affiliateDisclaimer:p.affiliateDisclaimer,vendor:ox(this)});p?.hiddenProductOptions?.showDropCountdown&&p?.hiddenProductOptions?.dropTimestampMs&&(this.Mr=new g.vZ(()=>{GKd(this)},1E3),this.eI.hide(),this.countdownTimer.show(), GKd(this)); this.B.Y("web_player_enable_featured_product_banner_exclusives_on_desktop")&&Iul(this)&&(this.wB=new g.vZ(()=>{Cbd(this)},1E3),Cbd(this))}this.B.getRootNode()&&g.pc(this.B.getRootNode(),"ytp-featured-product-shown")}}nB(){this.L&&(this.L=void 0,this.C(),this.B.getRootNode()&&g.fc(this.B.getRootNode(),"ytp-featured-product-shown"))}onVideoDataChange(R,w){RKI(this,w); R==="dataloaded"&&AM(this);R=g.F(w.getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.productsInVideoOverlayRenderer,PZW);this.overflowButton.show();this.dismissButton.hide();const p=R?.featuredProductsEntityKey;this.trendingOfferEntityKey=R?.trendingOfferEntityKey;this.U0.length||(sZH(this,p),bn(this));this.kF?.();this.kF=g.bX.subscribe(()=>{sZH(this,p);bn(this)})}Gy(){AM(this); this.Mr?.stop();this.countdownTimer.hide();yR(this);super.Gy()}};var jKS=class extends g.k{constructor(R,w,p){super({j:"div",E0:["ytp-info-panel-action-item"],N:[{j:"div",Z:"ytp-info-panel-action-item-disclaimer",fB:"{{disclaimer}}"},{j:"a",E0:["ytp-info-panel-action-item-button","ytp-button"],A:{role:"button",href:"{{url}}",target:"_blank",rel:"noopener"},N:[{j:"div",Z:"ytp-info-panel-action-item-icon",fB:"{{icon}}"},{j:"div",Z:"ytp-info-panel-action-item-label",fB:"{{label}}"}]}]});this.B=R;this.C=p;this.disclaimer=this.KB("ytp-info-panel-action-item-disclaimer"); this.button=this.KB("ytp-info-panel-action-item-button");this.n$=!1;this.B.createServerVe(this.element,this,!0);this.listen("click",this.onClick);R="";var r=g.F(w?.onTap,tO);p=g.F(r,g.y$);this.n$=!1;p?(R=p.url||"",R.startsWith("//")&&(R="https:"+R),this.n$=!0,g.J$(this.button,g.Zp(R))):(p=g.F(r,pGL))&&!this.C?((R=p.phoneNumbers)&&R.length>0?(R="sms:"+R[0],p.messageText&&(R+="?&body="+encodeURI(p.messageText))):R="",this.n$=!0,g.J$(this.button,g.Zp(R,[ZT_]))):(p=g.F(r,wGL))&&!this.C&&(R=p.phoneNumber? "tel:"+p.phoneNumber:"",this.n$=!0,g.J$(this.button,g.Zp(R,[deH])));!R&&(p=g.F(w?.onTap,tO),r=g.F(p,e8))&&(this.n$=!0,this.L=p,this.feedbackToken=r.feedbackToken);(p=w.disclaimerText?.content)?(this.button.style.borderBottom="1px solid white",this.button.style.paddingBottom="16px",this.update({label:w.bodyText?.content,icon:mdI(w.icon?.iconType),disclaimer:p})):(this.disclaimer.style.display="none",this.update({label:w.bodyText?.content,icon:mdI(w.icon?.iconType)}));this.B.setTrackingParams(this.element, w.trackingParams||null);this.n$&&(this.O={externalLinkData:{url:R}})}onClick(){this.B.logClick(this.element,this.O);if(this.L&&this.feedbackToken){const R=this.B.QC();R?.Ad(this.L)&&(aw(R,this.L,{feedbackTokens:[this.feedbackToken]}),this.B.publish("infopaneldetaildismissed"))}}};var J$P=class extends TN{constructor(R,w){const p=vC();super(R,{j:"div",Z:"ytp-info-panel-detail-skrim",N:[{j:"div",Z:"ytp-info-panel-detail",A:{role:"dialog",id:p},N:[{j:"div",Z:"ytp-info-panel-detail-header",N:[{j:"div",Z:"ytp-info-panel-detail-title",fB:"{{title}}"},{j:"button",E0:["ytp-info-panel-detail-close","ytp-button"],A:{"aria-label":"Close"},N:[g.fQ()]}]},{j:"div",Z:"ytp-info-panel-detail-body",fB:"{{body}}"},{j:"div",Z:"ytp-info-panel-detail-items"}]}]},250);this.L=w;this.items=this.KB("ytp-info-panel-detail-items"); this.C=new g.th(this);this.itemData=[];this.O=p;this.W(this.KB("ytp-info-panel-detail-close"),"click",this.Qh);this.W(this.KB("ytp-info-panel-detail-skrim"),"click",this.Qh);this.W(this.KB("ytp-info-panel-detail"),"click",r=>{r.stopPropagation()}); this.W(this.B,"infopaneldetaildismissed",()=>{this.Qh()}); g.K(this,this.C);this.B.createServerVe(this.element,this,!0);this.W(R,"videodatachange",this.onVideoDataChange);this.onVideoDataChange("newdata",R.getVideoData());this.hide()}show(){super.show();this.B.publish("infopaneldetailvisibilitychange",!0);this.B.logVisibility(this.element,!0);for(const R of this.itemData)R.B.logVisibility(R.element,!0)}hide(){super.hide();this.B.publish("infopaneldetailvisibilitychange",!1);this.B.logVisibility(this.element,!1);for(const R of this.itemData)R.B.logVisibility(R.element, !1)}getId(){return this.O}KJ(){return this.itemData.length}onVideoDataChange(R,w){if(w){this.update({title:w.Nk?.title?.content||"",body:w.Nk?.bodyText?.content||""});this.B.setTrackingParams(this.element,w.Nk?.trackingParams||null);for(const p of this.itemData)p.dispose();this.itemData=[];if(w.Nk?.ctaButtons)for(const p of w.Nk.ctaButtons)if(R=g.F(p,T7r))R=new jKS(this.B,R,this.L),R.n$&&(this.itemData.push(R),R.gN(this.items))}}Gy(){this.hide();super.Gy()}};var T2a=class extends g.k{constructor(R,w){super({j:"button",Z:"ytp-info-panel-preview",A:{"aria-live":"assertive","aria-atomic":"true","aria-owns":w.getId(),"aria-haspopup":"true","data-tooltip-opaque":String(g.zI(R.V()))},N:[{j:"div",Z:"ytp-info-panel-preview-text",fB:"{{text}}"},{j:"div",Z:"ytp-info-panel-preview-chevron",fB:"{{chevron}}"}]});this.B=R;this.Rb=this.L=this.videoId=null;this.isDismissed=this.O=this.showControls=this.C=!1;this.W(this.element,"click",()=>{R.logClick(this.element);R.ZC(); Zw(w)}); this.fade=new g.HU(this,250,!1,100);g.K(this,this.fade);this.B.createServerVe(this.element,this,!0);this.W(R,"videodatachange",this.onVideoDataChange);this.W(R,"presentingplayerstatechange",this.D);this.W(this.B,"paidcontentoverlayvisibilitychange",this.G);this.W(this.B,"infopaneldetailvisibilitychange",this.G);const p=R.getVideoData()||{};(p.YY?.title?.content||p.YY?.bodyText?.content)&&tM(this,p);this.W(R,"onShowControls",this.J);this.W(R,"onHideControls",this.K);this.W(this.B,"infopaneldetaildismissed", ()=>{this.isDismissed=!0;this.hide()})}onVideoDataChange(R,w){tM(this,w); this.Rb&&Bid(this,this.Rb)}D(R){const w=this.B.getVideoData();this.videoId!==w.videoId&&tM(this,w);Bid(this,R.state);this.Rb=R.state}G(R){(this.O=R)?this.hide():this.L&&!this.isDismissed&&this.show()}J(){this.C||this.R9();this.showControls=!0}K(){this.C||this.Qh();this.showControls=!1}R9(){if(!this.isDismissed){var R=this.B?.getPlayerSize(),w=R.width<380;R=R.height<(this.B?.isEmbedsShortsMode()?400:280);(this.B?.getPlayerStateObject().isCued()||this.B?.getPlayerStateObject().L(1024))&&w&&R||!this.L|| this.O||(this.fade.show(),this.B.publish("infopanelpreviewvisibilitychange",!0),this.B.logVisibility(this.element,!0))}}Qh(){this.L&&!this.O&&(this.fade.hide(),this.B.publish("infopanelpreviewvisibilitychange",!1),this.B.logVisibility(this.element,!1))}U(){this.C=!1;this.showControls||this.Qh()}};var ijM={"default":0,monoSerif:1,propSerif:2,monoSans:3,propSans:4,casual:5,cursive:6,smallCaps:7};Object.keys(ijM).reduce((R,w)=>{R[ijM[w]]=w;return R},{}); var QKa={none:0,raised:1,depressed:2,uniform:3,dropShadow:4};Object.keys(QKa).reduce((R,w)=>{R[QKa[w]]=w;return R},{}); var hZa={normal:0,bold:1,italic:2,bold_italic:3};Object.keys(hZa).reduce((R,w)=>{R[hZa[w]]=w;return R},{});var Qv,gkV;Qv=[{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"}];gkV=[{option:0,text:Oo(0)},{option:.25,text:Oo(.25)},{option:.5,text:Oo(.5)},{option:.75,text:Oo(.75)},{option:1,text:Oo(1)}]; g.en=[{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:Qv},{option:"fontSizeIncrement",text:"Font size",options:[{option:-2,text:Oo(.5)},{option:-1,text:Oo(.75)},{option:0,text:Oo(1)},{option:1,text:Oo(1.5)},{option:2,text:Oo(2)}, {option:3,text:Oo(3)},{option:4,text:Oo(4)}]},{option:"background",text:"Background color",options:Qv},{option:"backgroundOpacity",text:"Background opacity",options:gkV},{option:"windowColor",text:"Window color",options:Qv},{option:"windowOpacity",text:"Window opacity",options:gkV},{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:Oo(.25)},{option:.5,text:Oo(.5)},{option:.75,text:Oo(.75)},{option:1,text:Oo(1)}]}];var Hjt=[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],vki=class extends g.th{constructor(R,w,p,r,f,G,I,C){super();this.api=R;this.X=w;this.contextMenu=p;this.uI=r;this.YN=f;this.L=G;this.pB=I;this.progressBar=C;this.K=new g.vZ(()=>{qrI(this,!1)},1E3); this.O="";this.G={Ct:!1,aP:!1,oy:!1};g.K(this,this.K);this.W(w,"mousedown",()=>{Eo(this,!1)}); this.W(p.element,"mousedown",()=>{Eo(this,!1)}); this.W(w,"keydown",this.J);this.W(p.element,"keydown",this.J);this.W(w,"keyup",this.U);this.W(p.element,"keyup",this.U)}J(R){R.repeat||(this.G.Ct=!1);let w=!1;const p=R.keyCode;var r=jN(R);let f=!R.altKey&&!R.ctrlKey&&!R.metaKey&&(!this.api.isMutedByEmbedsMutedAutoplay()||Hjt.includes(p));var G=!1;let I=!1;const C=this.api.V();R.defaultPrevented?(f=!1,I=!0):C.mq&&!this.api.isMutedByEmbedsMutedAutoplay()&&(f=!1);if(p===9)w=!0;else{if(r)switch(p){case 32:case 13:if(r.tagName==="BUTTON"||r.tagName=== "A"||r.tagName==="INPUT")w=!0,f=!1;else if(f){var u=r.getAttribute("role");!u||u!=="option"&&u!=="button"&&u.indexOf("menuitem")!==0||(w=!0,r.click(),G=!0)}break;case 37:case 39:case 36:case 35:w=r.getAttribute("role")==="slider";break;case 38:case 40:u=r.getAttribute("role"),r=p===38?r.previousSibling:r.nextSibling,u==="slider"?w=!0:f&&(u==="option"?(r&&r.getAttribute("role")==="option"&&r.focus(),G=w=!0):u&&u.indexOf("menuitem")===0&&(r&&r.hasAttribute("role")&&r.getAttribute("role").indexOf("menuitem")=== 0&&r.focus(),G=w=!0))}if(f&&!G)switch(p){case 38:G=Math.min(this.api.getVolume()+5,100);mD(this.YN,G,!1);this.api.setVolume(G);I=G=!0;break;case 40:G=Math.max(this.api.getVolume()-5,0);mD(this.YN,G,!0);this.api.setVolume(G);I=G=!0;break;case 36:this.api.Wo()&&(this.api.startSeekCsiAction(),this.api.seekTo(0,void 0,void 0,void 0,79),I=G=!0);break;case 35:this.api.Wo()&&(this.api.startSeekCsiAction(),this.api.seekTo(Infinity,void 0,void 0,void 0,80),I=G=!0)}}w&&Eo(this,!0);(w||I)&&this.uI.bc();(G|| f&&this.handleGlobalKeyDown(p,R.shiftKey,R.ctrlKey,R.altKey,R.metaKey,R.key,R.code,R.repeat))&&R.preventDefault();C.U&&(R={keyCode:R.keyCode,altKey:R.altKey,ctrlKey:R.ctrlKey,metaKey:R.metaKey,shiftKey:R.shiftKey,handled:R.defaultPrevented,fullscreen:this.api.isFullscreen()},g.lK(this.api,"onKeyPress",R))}U(R){const w=R.keyCode;!this.G.aP&&this.handleGlobalKeyUp(w,R.shiftKey,R.ctrlKey,R.altKey,R.metaKey,R.key,R.code)&&R.preventDefault()}handleGlobalKeyUp(R,w,p,r,f,G,I){this.api.publish("keyboardserviceglobalkeyup", {keyCode:R,shiftKey:w,ctrlKey:p,altKey:r,metaKey:f,key:G,code:I});w=!1;if(this.G.Ct)return w;(G=g.MS(this.api.tf()))&&(G=G.vH)&&G.K_&&(G.oH(R),w=!0);switch(R){case 9:Eo(this,!0);w=!0;break;case 32:this.api.Y("web_speedmaster_spacebar_control")&&(this.api.V().mq||(w=this.Ai(this.progressBar?.t8()?.isEnabled)));break;case 39:(this.api.Y("web_player_chapter_seeking_keyboard_shortcut_killswitch")||!(f||p&&r))&&(rk?r:p)&&this.api.Wo()&&this.api.Y("web_enable_keyboard_shortcut_for_timely_actions")&&(this.api.startSeekCsiAction(), R=(R=this.api.getVideoData())?R.pL:[],p=xdW(R,this.api.getCurrentTime()*1E3),p!==-1&&this.L!=null&&(this.L.k_(1,R[p].title),this.api.seekTo(R[p].startTime/1E3,void 0,void 0,void 0,52),w=!0))}return w}handleGlobalKeyDown(R,w,p,r,f,G,I,C){C||(this.G.Ct=!1);var u=!1,m=this.api.V();if(m.mq&&!this.api.isMutedByEmbedsMutedAutoplay())return u;var z=g.MS(this.api.tf());if(z&&(z=z.vH)&&z.K_)switch(R){case 65:case 68:case 87:case 83:case 107:case 221:case 109:case 219:u=z.ZW(R)}m.J||u||(u=G||String.fromCharCode(R).toLowerCase(), this.O+=u,"awesome".indexOf(this.O)===0||this.api.Y("web_player_rtr_ctrls")&&"bday".indexOf(this.O)===0?(u=!0,4===this.O.length&&this.O==="bday"&&this.api.Y("web_player_rtr_ctrls")&&(by6(this.X),this.uI.bc()),7===this.O.length&&this.O==="awesome"&&I4(this.api.getRootNode(),"ytp-color-party")):(this.O=u,u="awesome".indexOf(this.O)===0||"bday".indexOf(this.O)===0));if(!u&&(!this.api.isMutedByEmbedsMutedAutoplay()||Hjt.includes(R))){z=this.api.getVideoData();var B=this.progressBar?.t8()?.isEnabled;z= z?z.pL:[];const W=rk?r:p;switch(R){case 80:w&&!m.jI&&(so(this.YN,q$b(),"Previous"),this.api.previousVideo(),u=!0);break;case 78:w&&!m.jI&&(so(this.YN,uE(),"Next"),this.api.nextVideo(),u=!0);break;case 74:this.api.Wo()&&(this.api.startSeekCsiAction(),this.L?this.api.Y("enable_key_press_seek_logging")?(u=Dx(this,-10*this.api.getPlaybackRate(),"SEEK_SOURCE_SEEK_BACKWARD_10S"),this.L.Rl(-1,10,u)):this.L.Rl(-1,10):so(this.YN,{j:"svg",A:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},N:[{j:"path", FI:!0,Z:"ytp-svg-fill",A:{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),u=!0);break;case 76:this.api.Wo()&&(this.api.startSeekCsiAction(),this.L?this.api.Y("enable_key_press_seek_logging")?(u=Dx(this,10*this.api.getPlaybackRate(),"SEEK_SOURCE_SEEK_FORWARD_10S"),this.L.Rl(1,10,u)):this.L.Rl(1,10):so(this.YN,{j:"svg",A:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},N:[{j:"path",FI:!0,Z:"ytp-svg-fill",A:{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),u=!0);break;case 37:if(this.api.Wo())if(this.api.startSeekCsiAction(),W){if(this.api.Y("web_player_chapter_seeking_keyboard_shortcut_killswitch")||!(f||p&&r))B=luL(z,this.api.getCurrentTime()*1E3),B!==-1&&this.L!=null&&(this.L.k_(-1,z[B].title),this.api.seekTo(z[B].startTime/1E3,void 0,void 0,void 0,53),u=!0)}else this.L?this.api.Y("enable_key_press_seek_logging")?(u=Dx(this,-5*this.api.getPlaybackRate(),"SEEK_SOURCE_SEEK_BACKWARD_5S"), this.L.Rl(-1,5,u)):this.L.Rl(-1,5):so(this.YN,{j:"svg",A:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},N:[{j:"path",FI:!0,Z:"ytp-svg-fill",A:{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),u=!0;break;case 39:this.api.Wo()&&(this.api.startSeekCsiAction(),W?this.api.Y("web_enable_keyboard_shortcut_for_timely_actions")||!this.api.Y("web_player_chapter_seeking_keyboard_shortcut_killswitch")&&(f||p&&r)||(B=xdW(z,this.api.getCurrentTime()*1E3),B!==-1&&this.L!=null&&(this.L.k_(1,z[B].title),this.api.seekTo(z[B].startTime/1E3,void 0,void 0,void 0,52),u=!0)):(this.L!=null?this.api.Y("enable_key_press_seek_logging")?(u=Dx(this,5* this.api.getPlaybackRate(),"SEEK_SOURCE_SEEK_FORWARD_5S"),this.L.Rl(1,5,u)):this.L.Rl(1,5):so(this.YN,{j:"svg",A:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},N:[{j:"path",FI:!0,Z:"ytp-svg-fill",A:{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),u=!0));break;case 77:this.api.isMuted()?(this.api.unMute(),mD(this.YN,this.api.getVolume(),!1)):(this.api.mute(),mD(this.YN,0,!0));u=!0;break;case 32:u=this.api.Y("web_speedmaster_spacebar_control")?!this.api.V().jI:this.Ai(B);break;case 75:u=this.Ai(B);break;case 190:w?m.enableSpeedOptions&&bGl(this)&&(u=this.api.getPlaybackRate(),this.api.setPlaybackRate(u+.25,!0),a0I(this.YN,!1),u=!0):this.api.Wo()&&(this.step(1),u=!0);break;case 188:w? m.enableSpeedOptions&&bGl(this)&&(u=this.api.getPlaybackRate(),this.api.setPlaybackRate(u-.25,!0),a0I(this.YN,!0),u=!0):this.api.Wo()&&(this.step(-1),u=!0);break;case 70:ugP(this.api)&&(this.api.toggleFullscreen().catch(()=>{}),u=!0); break;case 27:B?(this.progressBar.XS(),u=!0):this.pB()&&(u=!0)}if(m.controlsType!=="3")switch(R){case 67:g.FA(this.api.tf())&&(m=this.api.getOption("captions","track"),this.api.toggleSubtitles(!0),$sl(this.YN,!m||m&&!m.displayName),u=!0);break;case 79:M8(this,"textOpacity");break;case 87:M8(this,"windowOpacity");break;case 187:case 61:M8(this,"fontSizeIncrement",!1,!0);break;case 189:case 173:M8(this,"fontSizeIncrement",!0,!0)}let x;w||p||r||(R>=48&&R<=57?x=R-48:R>=96&&R<=105&&(x=R-96));x!=null&& this.api.Wo()&&!this.api.Y("web_player_disable_keyboard_seek_percent")&&(this.api.startSeekCsiAction(),m=this.api.getProgressState(),this.api.seekTo(x/10*(m.seekableEnd-m.seekableStart)+m.seekableStart,void 0,void 0,void 0,81),u=!0);u&&this.uI.bc()}this.G.oy=!1;this.api.publish("keyboardserviceglobalkeydown",{keyCode:R,shiftKey:w,ctrlKey:p,altKey:r,metaKey:f,key:G,code:I,repeat:C},this.G);this.G.oy&&(u=!0,this.uI.bc());return u}step(R){this.api.Wo();if(this.api.getPlayerStateObject().isPaused()){var w= this.api.getVideoData().C;w&&(w=w.video)&&this.api.seekBy(R/(w.fps||30),void 0,void 0,R>0?77:78)}}Ai(R){if(!this.api.V().jI){const w=this.api.getVideoData()?.getPlayerResponse()?.playabilityStatus;w&&g.F(w.miniplayer,b3P)?.playbackMode==="PLAYBACK_MODE_PAUSED_ONLY"&&g.m1(this.api,"onExpandMiniplayer");R?this.progressBar.wB():(R=!this.api.getPlayerStateObject().isOrWillBePlaying(),this.YN.fN(R),R?this.api.playVideo():this.api.pauseVideo());return!0}return!1}Gy(){this.K.bv();super.Gy()}};var N2b=class extends g.k{constructor(R,w){super({j:"button",E0:["ytp-button","ytp-overflow-button"],A:{title:R.Y("player_tooltip_data_title_killswitch")?"More":"","data-tooltip-title":"More","aria-haspopup":"true","aria-owns":w.element.id},N:[{j:"div",Z:"ytp-overflow-icon",N:[{j:"svg",A:{height:"100%",viewBox:"-5 -5 36 36",width:"100%"},N:[{j:"path",A:{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.B=R;this.B0=w;this.visible=!1;R.createClientVe(this.element,this,16499);this.W(R,"videoplayerreset",this.WS);this.W(R,"appresize",this.WS);this.W(R,"fullscreentoggled",this.WS);this.W(R,"presentingplayerstatechange",this.WS);this.WS();or(R,this.element,this);this.listen("click",()=>{R.logClick(this.element);Zw(w,this.element,!1)}); this.W(w.closeButton,"click",()=>{this.focus()})}WS(){var R=this.B.V(); const w=R.O||this.B.Y("web_player_hide_overflow_button_if_empty_menu")&&this.B0.isEmpty();R=g.zI(R)&&g.Dw(this.B)&&this.B.getPlayerStateObject().L(128);const p=this.B.getPlayerSize();this.visible=this.B.dl()&&!R&&p.width>=240&&!this.B.getVideoData().h$&&!w&&!this.B.isEmbedsShortsMode();g.M(this.element,"ytp-overflow-button-visible",this.visible);this.Rg(this.visible);this.visible&&this.B.wl();this.B.logVisibility(this.element,this.visible&&this.pB)}GK(R){super.GK(R);this.B.logVisibility(this.element, this.visible&&R)}Gy(){super.Gy();g.fc(this.element,"ytp-overflow-button-visible")}};var k1t=class extends TN{constructor(R){super(R,{j:"div",Z:"ytp-overflow-panel",A:{id:vC(),role:"dialog"},N:[{j:"div",Z:"ytp-overflow-panel-content",N:[{j:"div",Z:"ytp-overflow-panel-action-buttons",fB:"{{buttons}}"}]},{j:"button",E0:["ytp-overflow-panel-close","ytp-button"],A:{"data-tooltip-title":"Close",title:R.V().Y("player_tooltip_data_title_killswitch")?"Close":""},N:[g.fQ()]}]},250);this.actionButtons=[];this.L=this.KB("ytp-overflow-panel-content");this.closeButton=this.KB("ytp-overflow-panel-close"); this.W(this.closeButton,"click",this.Qh);or(R,this.closeButton,this);this.listen("click",this.C);this.W(R,"videoplayerreset",this.hide);this.W(R,"fullscreentoggled",this.onFullscreenToggled);this.hide()}C(R){R=jN(R);g.lA(this.element,R)&&(g.lA(this.L,R)||g.lA(this.closeButton,R)||Zw(this))}Qh(){super.Qh();this.B.h4(this.element)}show(){this.K_&&this.B.publish("OVERFLOW_PANEL_OPENED");super.show();this.element.setAttribute("aria-modal","true");for(const R of this.actionButtons)R.GK(!0)}hide(){super.hide(); this.element.removeAttribute("aria-modal");for(const R of this.actionButtons)R.GK(!1)}onFullscreenToggled(R){!R&&this.Pu()&&Zw(this)}isEmpty(){return this.actionButtons.length===0}focus(){for(const R of this.actionButtons)if(R.K_){R.focus();break}}};var Uii=class extends g.k{constructor(R,w,p){const r=g.Pt(w,p),f=r.EZ("default.jpg");super({j:"a",E0:["ytp-video-menu-item","ytp-button"],A:{role:"menuitemradio","aria-label":r.title,href:R.V().getVideoUrl(r.videoId,w.listId?w.listId.toString():null)},N:[{j:"div",Z:"ytp-video-menu-item-index",fB:String(p+1)},{j:"div",Z:"ytp-video-menu-item-now-playing",fB:"\u25b6"},{j:"div",Z:"ytp-video-menu-item-thumbnail",A:{style:f?`background-image: url(${f});`:void 0}},{j:"div",Z:"ytp-video-menu-item-title", fB:r.title},{j:"div",Z:"ytp-video-menu-item-author",fB:r.author}]});this.api=R;this.index=p;this.listen("click",this.onClick)}onClick(R){g.ha(R,this.api)&&this.api.playVideoAt(this.index)}};var S3S=class extends TN{constructor(R){super(R,{j:"div",Z:"ytp-playlist-menu",A:{role:"dialog",id:vC()},N:[{j:"div",Z:"ytp-playlist-menu-header",N:[{j:"div",Z:"ytp-playlist-menu-title",N:[R.V().O?{j:"span",Z:"ytp-playlist-menu-title-name",fB:"{{title}}"}:{j:"a",Z:"ytp-playlist-menu-title-name",A:{href:"{{playlisturl}}"},fB:"{{title}}"},{j:"button",E0:["ytp-playlist-menu-close","ytp-button"],A:{"aria-label":"Close"},N:[g.fQ()]}]},{j:"div",Z:"ytp-playlist-menu-subtitle",fB:"{{subtitle}}"}]},{j:"div", Z:"ytp-playlist-menu-items",A:{role:"menu"}}]},250);this.api=R;this.O=this.selected=this.D=this.playlist=null;this.items=this.KB("ytp-playlist-menu-items");this.L=new g.th(this);this.playlistData=[];this.W(this.KB("ytp-playlist-menu-close"),"click",this.Qh);const w=this.KB("ytp-playlist-menu-title-name");R.V().O||(this.O=this.W(w,"click",this.S));g.K(this,this.L);this.hide()}show(){super.show();this.L.W(this.api,"videodatachange",this.G);this.L.W(this.api,"onPlaylistUpdate",this.G);this.G()}hide(){super.hide(); this.L.C();this.updatePlaylist(null)}G(){this.updatePlaylist(this.api.getPlaylist());this.api.V().O&&(this.KB("ytp-playlist-menu-title-name").removeAttribute("href"),this.O&&(this.o9(this.O),this.O=null))}C(){const R=this.playlist;var w=R.author,p=w?"by $AUTHOR \u2022 $CURRENT_POSITION/$PLAYLIST_LENGTH":"$CURRENT_POSITION/$PLAYLIST_LENGTH",r={CURRENT_POSITION:String(R.index+1),PLAYLIST_LENGTH:String(R.length)};w&&(r.AUTHOR=w);this.update({title:R.title,subtitle:g.K2(p,r),playlisturl:this.api.getVideoUrl(!0)}); w=R.C;if(w===this.D)this.selected.element.setAttribute("aria-checked","false"),this.selected=this.playlistData[R.index];else{for(var f of this.playlistData)f.dispose();f=R.length;this.playlistData=[];for(p=0;p{R.logClick(this.element); R.Y("delhi_web_player_use_external_playlist_panel")?g.m1(R,"onToggleExternalPlaylistPanel"):Zw(w,this.element,!1)})}hide(){super.hide(); this.GK(!1);this.api.wl()}WS(){const R=g.zI(this.api.V());g.M(this.element,"ytp-playlist-menu-button-tiny",this.api.L_().getPlayerSize().width<400&&!R);this.api.isEmbedsShortsMode()?this.hide():this.playlist&&this.api.getPresentingPlayerType()!==2?(this.update({text:g.K2("$CURRENT_POSITION/$PLAYLIST_LENGTH",{CURRENT_POSITION:String(this.playlist.index+1),PLAYLIST_LENGTH:String(this.playlist.length)}),title:g.K2("Playlist: $PLAYLIST_NAME",{PLAYLIST_NAME:this.playlist.title}),"tooltip-title":g.K2("Playlist: $PLAYLIST_NAME", {PLAYLIST_NAME:this.playlist.title})}),this.api.Y("delhi_modern_web_player")&&this.update({playlistTitle:g.K2("Playlist: $PLAYLIST_NAME",{PLAYLIST_NAME:this.playlist.title})}),this.K_||(this.show(),this.api.wl()),this.visible=!0,this.GK(!0)):this.K_&&this.hide()}GK(R){super.GK(R);this.api.logVisibility(this.element,this.visible&&R)}L(){this.playlist&&this.playlist.unsubscribe("shuffle",this.WS,this);(this.playlist=this.api.getPlaylist())&&this.playlist.subscribe("shuffle",this.WS,this);this.WS()}};var Xt_=class extends g.k{constructor(R,w){super({j:"div",Z:"ytp-promotooltip-wrapper",N:[{j:"div",Z:"ytp-promotooltip-container",N:[{j:"div",Z:"ytp-promotooltip-content",N:[{j:"div",Z:"ytp-promotooltip-title",fB:"{{title}}"},{j:"div",Z:"ytp-promotooltip-details",fB:"{{details}}"}]},{j:"div",Z:"ytp-promotooltip-buttons",N:[{j:"div",Z:"ytp-promotooltip-dismiss-button",fB:"{{dismissButtonText}}",A:{tabindex:"0"}},{j:"div",Z:"ytp-promotooltip-accept-button",fB:"{{acceptButtonText}}",A:{tabindex:"0", "aria-haspopup":"true"}}]}]},{j:"div",Z:"ytp-promotooltip-pointer"}]});this.tooltipRenderer=R;this.B=w;this.L=this.sourceElement=null;this.title=this.KB("ytp-promotooltip-title");this.details=this.KB("ytp-promotooltip-details");this.acceptButton=this.KB("ytp-promotooltip-accept-button");this.dismissButton=this.KB("ytp-promotooltip-dismiss-button");this.C=this.G=!1;this.O=!0;this.X=this.J=this.U=this.D=!1;this.Xf={Xz:p=>{this.Xz(p)}}; this.Rg(!1);R=this.tooltipRenderer.trackingParams||null;if(this.C=!!R)this.B.createServerVe(this.element,this,!0),this.B.setTrackingParams(this.element,R);this.W(w,"onShowControls",this.xY);this.W(w,"onHideControls",this.S);this.W(w,"resize",this.LL);this.W(this.acceptButton,"click",this.I0);this.W(this.dismissButton,"click",this.M0);this.W(document,"click",this.O0)}K(R,w){if(!this.G){if(R){this.tooltipRenderer=R;R=this.tooltipRenderer.text;var p=!1;R?.runs?.length&&R.runs[0].text&&(this.update({title:R.runs[0].text.toString()}), p=!0);g.wO(this.title,p);p=this.tooltipRenderer.detailsText;R=!1;if(p?.runs?.length&&p.runs[0].text){{var r=p.runs[0].text.toString();const u=r.indexOf("$TARGET_ICON");if(u>-1)if(this.tooltipRenderer.targetId){p=[];r=r.split("$TARGET_ICON");var f=new g.Jw({j:"span",Z:"ytp-promotooltip-details-icon",N:[wD6[this.tooltipRenderer.targetId]]});g.K(this,f);var G=[];for(I of r){const m=new g.Jw({j:"span",Z:"ytp-promotooltip-details-component",fB:I});g.K(this,m);G.push(m)}r.length===2?(p.push(G[0].element), p.push(f.element),p.push(G[1].element)):r.length===1&&(u===0?(p.push(f.element),p.push(G[0].element)):(p.push(G[0].element),p.push(f.element)));var I=p.length?p:null}else I=null;else I=r}if(I){if(typeof I!=="string"){g.Bc(this.details);for(var C of I)this.details.appendChild(C)}else this.update({details:I});R=!0}}g.wO(this.details,R);C=this.tooltipRenderer.acceptButton;I=!1;g.F(C,ky)?.text?.runs?.length&&g.F(C,ky).text.runs[0].text&&(this.update({acceptButtonText:g.F(C,ky).text.runs[0].text.toString()}), I=!0);g.wO(this.acceptButton,I);C=this.tooltipRenderer.dismissButton;I=!1;g.F(C,ky)?.text?.runs?.length&&g.F(C,ky).text.runs[0].text&&(this.update({dismissButtonText:g.F(C,ky).text.runs[0].text.toString()}),I=!0);g.wO(this.dismissButton,I)}w&&(this.sourceElement=w);this.L=yvd(this);this.J=!1;this.B.V().Y("web_player_hide_nitrate_promo_tooltip")||this.Rg(!0);PB(this);this.K_&&!this.X&&(this.X=!0,this.Xf.Xz(0));this.C&&this.B.logVisibility(this.element,this.K_)}}xY(){this.O?this.K():PB(this)}S(){this.O? (ax(this),this.J=!0):PB(this)}I0(){this.G=!0;this.Xz(1);this.B.publish("promotooltipacceptbuttonclicked",this.acceptButton);ax(this);this.C&&this.B.logClick(this.acceptButton)}M0(){this.G=!0;this.Xz(2);ax(this);this.C&&this.B.logClick(this.dismissButton)}O0(R){if(this.B.getPresentingPlayerType()===1||this.B.getPresentingPlayerType()===2&&this.D){var w=!0,p=g.Up("ytp-ad-overlay-ad-info-dialog-container"),r=g.Up("ytp-ad-player-overlay-layout"),f=jN(R);if(this.sourceElement&&f&&g.lA(this.sourceElement, f))this.sourceElement=null;else{this.B.getPresentingPlayerType()===1&&f&&Array.from(f.classList).forEach(I=>{if(I.startsWith("ytp-ad")||I.startsWith("ytp-skip-ad"))w=!1}); var G=Vl_(this.tooltipRenderer);this.tooltipRenderer.dismissStrategy?.type==="TOOLTIP_DISMISS_TYPE_TAP_ANYWHERE"?G&&(w=w&&!g.lA(this.element,f)):this.tooltipRenderer.dismissStrategy?.type==="TOOLTIP_DISMISS_TYPE_TAP_INTERNAL"&&(w=G?!1:w&&g.lA(this.element,f));this.L&&this.K_&&!p&&!r&&(!f||w&&g.$t(R))&&(this.G=!0,ax(this))}}}Xz(R){var w=this.tooltipRenderer.promoConfig;if(w){let p;switch(R){case 0:w.impressionEndpoints?.length&&(p=w.impressionEndpoints[0]);break;case 1:p=w.acceptCommand;break;case 2:p= w.dismissCommand}R=g.F(p,e8)?.feedbackToken;p&&R&&(R={feedbackTokens:[R]},w=this.B.QC(),w?.Ad(p)&&aw(w,p,R))}}LL(){this.J||(this.L||(this.L=yvd(this)),this.K())}},wD6={"ytp-settings-button":g.xt()};var pDU=class extends g.k{constructor(R){super({j:"button",E0:["ytp-replay-button","ytp-button"],A:{title:R.Y("player_tooltip_data_title_killswitch")?"Replay":"","data-tooltip-title":"Replay"},N:[g.Ws()]});this.B=R;this.W(R,"presentingplayerstatechange",this.onStateChange);this.listen("click",this.onClick,this);this.kp(R.getPlayerStateObject());or(this.B,this.element,this)}onStateChange(R){this.kp(R.state)}kp(R){this.Rg(R.L(2))}onClick(){this.B.getPlayerStateObject().isOrWillBePlaying();this.B.playVideo()}};var rJp=class extends g.k{constructor(R){super({j:"button",E0:["ytp-button","ytp-search-button"],A:{title:R.Y("player_tooltip_data_title_killswitch")?"Search":"","data-tooltip-title":"Search","data-tooltip-opaque":String(g.zI(R.V()))},N:[{j:"div",Z:"ytp-search-icon",fB:"{{icon}}"},{j:"div",Z:"ytp-search-title",fB:"Search"}]});this.api=R;this.visible=!1;this.updateValue("icon",{j:"svg",A:{height:"100%",version:"1.1",viewBox:"0 0 24 24",width:"100%"},N:[{j:"path",Z:"ytp-svg-fill",A:{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"}}]}); R.createClientVe(this.element,this,184945);this.listen("click",this.onClick);this.L();this.W(R,"appresize",this.L);this.W(R,"videodatachange",this.L);or(R,this.element,this)}onClick(R){this.api.logClick(this.element);var w=g.bu(this.api.V().ZI,{focusSearch:"true"}),p={};g.W7(this.api,"addEmbedsConversionTrackingParams",[p]);w=g.bu(w,p);(p=this.api.getVideoData().Ew?.params)&&(w=g.bu(w,{bp:p}));g.g2(window,w);R.preventDefault()}L(){if(this.api.Y("embeds_web_enable_search_button")){var R=this.api.V(); var w=this.api.getVideoData(),p=this.api.L_().getPlayerSize().width;R=g.zI(R)&&p>=240&&!R.O&&!w.isAd()&&!this.api.isEmbedsShortsMode()}else R=!1;this.visible=R;this.Rg(this.visible);g.M(this.element,"ytp-search-button-visible",this.visible);g.M(this.element,"ytp-show-search-title",!this.api.dl());this.api.logVisibility(this.element,this.visible&&this.pB)}GK(R){super.GK(R);this.api.logVisibility(this.element,this.visible&&R)}};var ffP=class extends g.k{constructor(R){super({j:"div",Z:"ytp-seek-overlay",N:[{j:"div",E0:["ytp-seek-overlay-animation","ytp-seek-overlay-animation-back"],N:[{j:"div",E0:["ytp-seek-overlay-arrow","ytp-seek-overlay-arrow-persistent"],N:[{j:"svg",A:{viewBox:"0 0 22 32",width:"22",height:"24"},N:[{j:"path",A:{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",fB:"{{durationBack}}"}]},{j:"div",E0:["ytp-seek-overlay-animation", "ytp-seek-overlay-animation-forward"],N:[{j:"div",Z:"ytp-seek-overlay-duration",fB:"{{durationForward}}"},{j:"div",E0:["ytp-seek-overlay-arrow","ytp-seek-overlay-arrow-persistent"],N:[{j:"svg",A:{viewBox:"0 0 22 32",width:"22",height:"24"},N:[{j:"path",A:{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",N:[{j:"div",Z:"ytp-seek-overlay-message-icon",fB:"{{icon}}"},{j:"div",Z:"ytp-seek-overlay-message-text", fB:"{{text}}"}]}]});this.B=R;this.K=0;this.L="hidden";this.D=this.KB("ytp-seek-overlay-animation-back");this.U=this.KB("ytp-seek-overlay-animation-forward");this.X=this.KB("ytp-seek-overlay-message");this.J=new g.vZ(()=>{tlL(this)},g.Iq(this.B.V().experiments,"web_player_seek_overlay_linger_duration")||1E3); g.K(this,this.J);this.B.createClientVe(this.U,this,28240);this.B.createClientVe(this.D,this,28239);this.B.logVisibility(this.U,!0);this.B.logVisibility(this.D,!0);this.hide()}trigger(R,w,p,r){this.show();if(this.C&&R!==this.C){let f=1;this.O&&(f=MlW(this));tlL(this,f,!1);ond(this)}this.C=R;this.G=this.C===-1?this.D:this.U;R="";w?(this.C===-1&&this.B.getCurrentTime()<=w?this.K=w:this.K+=w,R=`${this.C===-1?"\u2212":"+"} ${this.K}`):this.K=0;this.updateValue(this.C===-1?"durationBack":"durationForward", R);if(this.L==="hidden"||this.L==="fading-out")w=0,this.L==="fading-out"&&(w=MlW(this),Enb(this)),OGH(this,w),this.L!=="fading-out"&&KO6(this,this.G.querySelector(".ytp-seek-overlay-arrow-persistent")),this.L="fading-in";else if(this.L==="fading-in"||this.L==="lingering")w=this.G.querySelector(".ytp-seek-overlay-duration"),R=g.Iq(this.B.V().experiments,"web_player_seek_overlay_duration_bump_scale")||.9,w.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(${R})`},{offset:1,transform:"scale(1)"}],{duration:184}),Enb(this),this.L==="lingering"&&(this.J.stop(),this.J.start());p&&cvW(this,p,r)}IT(R,w,p,r){this.trigger(R,r)}Rl(R,w,p){this.trigger(R,w);p&&(R=R===-1?this.U.visualElement:this.D.visualElement,p={seekData:p},(w=g.ut())&&hO(w,R,"INTERACTION_LOGGING_GESTURE_TYPE_KEY_PRESS",p))}k_(R,w,p){this.trigger(R,void 0,w,p)}};var GjS=class extends g.k{constructor(R,w,p){super({j:"button",E0:["ytp-button","ytp-share-button"],A:{title:R.Y("player_tooltip_data_title_killswitch")?"Share":"","data-tooltip-title":"Share","aria-haspopup":"true","aria-owns":p.element.id,"data-tooltip-opaque":String(g.zI(R.V()))},N:[{j:"div",Z:"ytp-share-icon",fB:"{{icon}}"},{j:"div",Z:"ytp-share-title",fB:"Share"}]});this.api=R;this.L=w;this.C=p;this.visible=!1;this.tooltip=this.L.dg();R.createClientVe(this.element,this,28664);this.listen("click", this.onClick);this.W(R,"videodatachange",this.WS);this.W(R,"videoplayerreset",this.WS);this.W(R,"appresize",this.WS);this.W(R,"presentingplayerstatechange",this.WS);this.WS();this.addOnDisposeCallback(g.V9(this.tooltip,this.element))}onClick(){var R=this.api.V();const w=this.api.getVideoData({playerType:this.api.getPresentingPlayerType()}),p=this.api.getPlaylistId();R=this.api.Y("enable_share_button_url_fix")?this.api.getVideoUrl(!0,!0,!0):R.getVideoUrl(w.videoId,p,void 0,!0);if(navigator.share)try{const r= navigator.share({title:w.title,url:R});r instanceof Promise&&r.catch(f=>{Pb_(this,f)})}catch(r){r instanceof Error&&Pb_(this,r)}else this.L.ZC(),Zw(this.C,this.element,!1); this.api.logClick(this.element)}WS(){var R=this.api.V();const w=this.api.isEmbedsShortsMode();g.M(this.element,"ytp-show-share-title",g.zI(R)&&!w);this.L.r_()&&w?(R=(this.api.L_().getPlayerSize().width-this.api.getVideoContentRect().width)/2,g.Z2(this.element,"right",`${R}px`)):w&&g.Z2(this.element,"right","0px");this.updateValue("icon",{j:"svg",A:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},N:[{j:"path",FI:!0,Z:"ytp-svg-fill",A:{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=$H(this);g.M(this.element,"ytp-share-button-visible",this.visible);this.Rg(this.visible);this.tooltip.wl();this.api.logVisibility(this.element,$H(this)&&this.pB)}GK(R){super.GK(R);this.api.logVisibility(this.element,this.visible&&R)}Gy(){super.Gy();g.fc(this.element,"ytp-share-button-visible")}};var IfP=class extends TN{constructor(R,w){var p=vC();const r=R.V();p={j:"div",Z:"ytp-share-panel",A:{id:vC(),role:"dialog","aria-labelledby":p},N:[{j:"div",Z:"ytp-share-panel-inner-content",N:[{j:"div",Z:"ytp-share-panel-title",A:{id:p},fB:"Share"},{j:"a",E0:["ytp-share-panel-link","ytp-no-contextmenu"],A:{href:"{{link}}",target:r.X,title:"Share link","aria-label":"{{shareLinkWithUrl}}"},fB:"{{linkText}}"},{j:"label",Z:"ytp-share-panel-include-playlist",N:[{j:"input",Z:"ytp-share-panel-include-playlist-checkbox", A:{type:"checkbox",checked:"true"}},"Include playlist"]},{j:"div",Z:"ytp-share-panel-loading-spinner",N:[v7()]},{j:"div",Z:"ytp-share-panel-service-buttons",fB:"{{buttons}}"},{j:"div",Z:"ytp-share-panel-error",fB:"An error occurred while retrieving sharing information. Please try again later."}]},{j:"button",E0:["ytp-share-panel-close","ytp-button"],A:{title:"Close"},N:[g.fQ()]}]};super(R,p,250);this.moreButton=null;this.api=R;this.tooltip=w.dg();this.C=[];this.G=this.KB("ytp-share-panel-inner-content"); this.closeButton=this.KB("ytp-share-panel-close");this.W(this.closeButton,"click",this.Qh);this.addOnDisposeCallback(g.V9(this.tooltip,this.closeButton));this.O=this.KB("ytp-share-panel-include-playlist-checkbox");this.W(this.O,"click",this.WS);this.L=this.KB("ytp-share-panel-link");this.addOnDisposeCallback(g.V9(this.tooltip,this.L));this.api.createClientVe(this.L,this,164503);this.W(this.L,"click",f=>{f.preventDefault();this.api.logClick(this.L);var G=this.api.getVideoUrl(!0,!0,!1,!1);G=XFd(this, G);g.gH(G,this.api,f)&&g.m1(this.api,"SHARE_CLICKED")}); this.listen("click",this.D);this.W(R,"videoplayerreset",this.hide);this.W(R,"fullscreentoggled",this.onFullscreenToggled);this.W(R,"onLoopRangeChange",this.S);this.hide()}D(R){R=jN(R);g.lA(this.G,R)||g.lA(this.closeButton,R)||Zw(this)}Qh(){super.Qh();this.tooltip.h4(this.element);this.api.logVisibility(this.L,!1);for(const R of this.C)this.api.hasVe(R.element)&&this.api.logVisibility(R.element,!1)}show(){const R=this.K_;super.show();this.WS();R||g.m1(this.api,"onSharePanelOpened")}S(){this.K_&&this.WS()}WS(){g.pc(this.element, "ytp-share-panel-loading");g.fc(this.element,"ytp-share-panel-fail");var R=this.api.getVideoData();const w=this.api.getPlaylistId()&&this.O.checked;R.getSharePanelCommand&&aw(this.api.QC(),R.getSharePanelCommand,{includeListId:w}).then(p=>{this.cS()||(g.fc(this.element,"ytp-share-panel-loading"),nnL(this,p))}); R=this.api.getVideoUrl(!0,!0,!1,!1);this.updateValue("link",R);this.updateValue("linkText",R);this.updateValue("shareLinkWithUrl",g.K2("Share link $URL",{URL:R}));NS(this.L);this.api.logVisibility(this.L,!0)}onFullscreenToggled(R){!R&&this.Pu()&&Zw(this)}focus(){this.L.focus()}Gy(){super.Gy();au_(this)}};var CsM=class extends aP{constructor(R){super(R);this.G=this.L=this.isContentForward=this.xY=!1;this.element.setAttribute("data-overlay-order","8");jZD(this);this.W(this.B,"changeProductsInVideoVisibility",this.nB);this.W(this.B,"videodatachange",this.onVideoDataChange)}Gy(){dI(this);super.Gy()}YY(R){R.target!==this.dismissButton.element&&(this.D(!1),g.m1(this.B,"innertubeCommand",this.onClickCommand))}U(){this.yh=!0;this.D(!0);this.C()}nB(R){this.xY=R;this.C()}onVideoDataChange(R,w){if(R=!!w.videoId&& this.videoId!==w.videoId)this.videoId=w.videoId,this.yh=!1,this.PS=!0,this.O0=this.Jl=!1,dI(this),ddd(this,!1),this.G=this.L=!1,Zx(this),ZG6(this);if(R||!w.videoId)this.M0=this.O=!1;if(w?.getPlayerResponse()?.videoDetails?.isLiveContent)this.gb(!1);else{w=g.F(w.getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.productsInVideoOverlayRenderer,PZW);this.xY=this.enabled=!1;if(w){if(R=w?.featuredProductsEntityKey){var p=g.bX.getState().entities;if(HX(p,"featuredProductsEntity",R)?.productsData){this.gb(!1); return}}if(!w.text||!w.onClickCommand||!w.timing){this.gb(!1);return}this.enabled=!0;this.O||(R=w.badgeInteractionLogging?.trackingParams,(this.O=!!R)&&this.B.setTrackingParams(this.badge.element,R||null));this.M0||(this.M0=!!w.dismissButton?.trackingParams)&&this.B.setTrackingParams(this.dismissButton.element,w.dismissButton?.trackingParams||null);if(w.isContentForward){R=w.productsData;ddd(this,!0);ZG6(this);R=FOd(this,R);p=[];R.length>0&&p.push(R[0]);if(R.length>1){const r=new g.k({j:"div",Z:"ytp-suggested-action-more-products-icon"}); g.K(this,r);p.push(r);p.push(...R.slice(1))}this.S=new g.k({j:"div",N:p,Z:"ytp-suggested-action-content-forward-container"});g.K(this,this.S);this.jI.element.append(this.S.element)}this.text=g.Su(w.text);if(R=w.dismissButton?.a11yLabel)this.cB=g.Su(R);this.onClickCommand=w.onClickCommand;this.timing=w.timing;this.C3()}O7L(this);vd(this);this.C()}}X(){return!this.xY&&this.enabled&&!this.yh&&!this.B.dl()&&!this.uo&&(this.O0||this.PS)}N0(R){super.N0(R);if(this.L||this.G)this.timing&&Xz(this.timing.preview)&& (this.L=!1,Zx(this),this.G=!1,Zx(this),this.B.P1("shopping_overlay_preview_collapsed"),this.B.P1("shopping_overlay_preview_expanded"),R=YH(this.timing.preview.startSec,this.timing.preview.endSec,"shopping_overlay_expanded"),Xz(this.timing.expanded)&&this.timing.preview.endSec===this.timing.expanded.startSec&&(this.B.P1("shopping_overlay_expanded"),R.end=this.timing.expanded.endSec*1E3),this.B.C3([R])),this.Jl=!0,vd(this);Zx(this)}gb(R){(this.O0=R)?(Hd(this),vd(this,!1)):(dI(this),this.p_.start()); this.C()}C3(R=0){var w=this.timing;R+=this.B.getCurrentTime();const p=[];var r=w.visible;const f=w.preview;w=w.expanded;Xz(r)&&(nE(r,R),p.push(YH(r.startSec,r.endSec,"shopping_overlay_visible")));Xz(f)&&(nE(f,R),r=f.startSec+1,p.push(YH(f.startSec,r,"shopping_overlay_preview_collapsed")),p.push(YH(r,f.endSec,"shopping_overlay_preview_expanded")));Xz(w)&&(nE(w,R),p.push(YH(w.startSec,w.endSec,"shopping_overlay_expanded")));this.B.C3(p)}C(){super.C();this.B.getRootNode()&&g.M(this.B.getRootNode(),"ytp-shopping-pill-shown", this.X())}};var uxM=class extends g.k{constructor(R){super({j:"div",Z:"ytp-shorts-title-channel",N:[{j:"a",Z:"ytp-shorts-title-channel-logo",A:{href:"{{channelLink}}",target:R.V().X,"aria-label":"{{channelLogoLabel}}"}},{j:"div",Z:"ytp-shorts-title-expanded-heading",N:[{j:"div",Z:"ytp-shorts-title-expanded-title",N:[{j:"a",fB:"{{expandedTitle}}",A:{href:"{{channelTitleLink}}",target:R.V().X,tabIndex:"0"}}]}]}]});this.api=R;this.L=this.KB("ytp-shorts-title-channel-logo");this.channelName=this.KB("ytp-shorts-title-expanded-title"); this.subscribeButton=null;R.createClientVe(this.L,this,36925);this.W(this.L,"click",w=>{this.api.logClick(this.L);g.g2(window,Jv6(this));w.preventDefault()}); R.createClientVe(this.channelName,this,37220);this.W(this.channelName,"click",w=>{this.api.logClick(this.channelName);g.g2(window,Jv6(this));w.preventDefault()}); Tib(this);this.W(R,"videodatachange",this.WS);this.W(R,"videoplayerreset",this.WS);this.WS()}WS(){const R=this.api.V();this.Rg(g.zI(R)&&this.api.isEmbedsShortsMode());this.subscribeButton&&this.api.logVisibility(this.subscribeButton.element,this.K_);const w=this.api.getVideoData();let p=!1;this.api.getPresentingPlayerType()===2?p=!!w.videoId&&!!w.isListed&&!!w.author&&!!w.PS&&!!w.profilePicture:g.zI(R)&&(p=!!w.videoId&&!!w.PS&&!!w.profilePicture&&!w.h$&&!R.O&&!(R.D&&this.api.getPlayerSize().width< 200));iGD(this,p,w.profilePicture,g.zI(R)?w.expandedTitle:w.author);this.subscribeButton&&(this.subscribeButton.channelId=w.wy);this.updateValue("expandedTitle",w.expandedTitle)}};var sBa=class extends TN{constructor(R){super(R,{j:"button",E0:["ytp-skip-intro-button","ytp-popup","ytp-button"],N:[{j:"div",Z:"ytp-skip-intro-button-text",fB:"Skip Intro"}]},100);this.C=!1;this.L=new g.vZ(()=>{this.hide()},5E3); this.C4=this.Gn=NaN;g.K(this,this.L);this.D=()=>{this.show()}; this.G=()=>{this.hide()}; this.O=()=>{const w=this.B.getCurrentTime();w>this.Gn/1E3&&w{this.Ej(w,p)}); this.W(this.element,"click",()=>{this.B.seekTo(this.C4/1E3)}); this.hide()}show(){super.show();this.L.start()}hide(){super.hide();this.L.stop()}Ej(R,w){R==="dataloaded"&&((this.Gn=w.Gn,this.C4=w.C4,isNaN(this.Gn)||isNaN(this.C4))?this.C&&(this.B.P1("intro"),this.B.removeEventListener(g.bp("intro"),this.D),this.B.removeEventListener(g.yl("intro"),this.G),this.B.removeEventListener("onShowControls",this.O),this.hide(),this.C=!1):(this.B.addEventListener(g.bp("intro"),this.D),this.B.addEventListener(g.yl("intro"),this.G),this.B.addEventListener("onShowControls", this.O),R=new g.Ja(this.Gn,this.C4,{priority:9,namespace:"intro"}),this.B.C3([R]),this.C=!0))}};var mNa=class extends g.k{constructor(R){super({j:"button",E0:["ytp-airplay-button","ytp-button"],A:{title:R.Y("player_tooltip_data_title_killswitch")?"AirPlay":"","data-tooltip-title":"AirPlay","data-priority":"11"},fB:"{{icon}}"});this.B=R;this.listen("click",this.onClick);this.W(R,"airplayactivechange",this.WS);this.W(R,"airplayavailabilitychange",this.WS);this.WS();or(R,this.element,this)}onClick(){this.B.U5()}WS(){var R=!0;g.zI(this.B.V())&&(R=R&&this.B.L_().getPlayerSize().width>=480);this.Rg(R); R=this.updateValue;var w=this.B.Y("delhi_modern_web_player_icons");const p=w?{j:"svg",A:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},N:[{j:"path",A:{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",A:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},N:[{j:"path",FI:!0,A:{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"}}]};w=w?{j:"svg",A:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},N:[{j:"path",A:{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",A:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},N:[{j:"path",FI:!0,Z:"ytp-svg-fill",A:{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"}}]};R.call(this,"icon",this.B.Ko()?p:w)}};var z1R=class extends g.k{constructor(R){super({j:"div",Z:"ytp-gradient-bottom"});this.C=g.sW("CANVAS");this.L=this.C.getContext("2d",{willReadFrequently:!0});this.O=NaN;this.C.width=1;QZW(this,R.L_().getPlayerSize().height)}Gy(){this.L=null;super.Gy()}};var Bga=class extends g.k{constructor(R,w,p,r){super({j:"div",Z:"ytp-chapter-container",N:[{j:"button",E0:["ytp-chapter-title","ytp-button"],N:[{j:"span",A:{"aria-hidden":"true"},Z:"ytp-chapter-title-prefix",fB:"\u2022"},{j:"div",Z:"ytp-chapter-title-content",fB:"{{chapterTitle}}",A:{"aria-label":"{{ariaLabel}}","aria-live":"polite",title:R.Y("player_tooltip_data_title_killswitch")?r:"","data-tooltip-title":r}},{j:"div",Z:"ytp-chapter-title-chevron",N:[{j:"svg",A:{height:"100%",viewBox:"0 0 24 24", width:"100%"},N:[{j:"path",A:{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.B=R;this.G=w;this.J="";this.currentIndex=0;this.C=void 0;this.O=!0;this.X=this.KB("ytp-chapter-container");this.L=this.KB("ytp-chapter-title");this.K=this.KB("ytp-chapter-title-content");this.U();this.updateVideoData("newdata",this.B.getVideoData());this.W(R,"videodatachange",this.updateVideoData);this.W(R,"resize",this.U);this.W(this.X,"click",this.onClick);this.W(R,g.bp(p), this.Q2);this.W(R,"onLoopRangeChange",this.Q2);this.W(R,"innertubeCommand",this.onClickCommand);(R=g.Wa(this.B.V()))&&g.M(this.L,"ytp-profile-page",!0);g.zI(this.B.V())||R||or(this.B,this.K,this)}onClick(){g.m1(this.B,"innertubeCommand",this.C)}U(){if(this.B.Y("delhi_modern_web_player")){var R=this.B.getPlayerSize();R.width&&(this.element.style.maxWidth=`${R.width*.25}px`)}}};var W3k=class extends Bga{constructor(R,w){super(R,w,"chapterCueRange","View chapter");this.D=""}onClickCommand(R){g.F(R,AN)&&this.Q2()}updateVideoData(R,w){R=g.F(w.getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.decoratedPlayerBarRenderer,NU);R=g.F(R?.playerBarActionButton,ky);this.B.Y("web_player_updated_entrypoint")&&(this.D=Fm(R?.text),this.K.setAttribute("title",R?.tooltip??"View chapter"));this.C=R?.command;gn6(this)}Q2(){var R=this.D;const w=this.G.L;var p=this.B.getLoopRange()?.type=== "clips";if(w.length>1&&!p){R=this.B.getProgressState().current*1E3;p=KE(w,R);R=w[p].title||"Chapters";if(p!==this.currentIndex||this.O)g.m1(this.B,"innertubeCommand",w[p].onActiveCommand),this.currentIndex=p;this.O=!1}else this.O=!0;hKd(this,R)}};var xNR=class extends g.RX{constructor(R){super({j:"button",E0:["ytp-expand-right-bottom-section-button","ytp-button"],A:{title:"{{title}}","aria-pressed":"{{pressed}}","data-priority":"1","data-title-no-tooltip":"{{data-title-no-tooltip}}"},N:[g.rQ()]});this.L=!1;this.listen("click",this.C);R.createClientVe(this.element,this,276954)}C(){this.element.parentElement?.classList.contains("ytp-right-controls-left");(this.L=!this.L)?this.publish("small-mode-expand-right-bottom-controls"):this.publish("small-mode-collapse-right-bottom-controls")}isExpanded(){return this.L}};var lfm=class extends g.k{constructor(R,w){super({j:"div",Z:"ytp-storyboard-framepreview",N:[{j:"div",Z:"ytp-storyboard-framepreview-timestamp",fB:"{{timestamp}}"},{j:"div",Z:"ytp-storyboard-framepreview-img"}]});this.api=R;this.C=this.KB("ytp-storyboard-framepreview-img");this.L=null;this.frameIndex=NaN;this.events=new g.th(this);this.fade=new g.HU(this,100);g.K(this,this.events);g.K(this,this.fade);this.W(this.api,"presentingplayerstatechange",this.O);w&&this.W(this.element,"click",()=>{w.XS()})}O(R){R.state.L(32)? Fz(this,this.api.kG()):this.K_&&(R.state.L(16)||R.state.L(1))||this.fade.hide()}onProgress(){const R=this.api.getPlayerStateObject(); (R.L(32)||R.L(16))&&jn(this)}G(){this.frameIndex=NaN;jn(this)}hide(){this.L&&Fz(this,null);super.hide()}};var L3a=class extends g.k{constructor(R,w){super({j:"button",E0:["ytp-fullscreen-button","ytp-button"],A:{title:R.Y("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}}"},fB:"{{icon}}"});this.B=R;this.C=w;this.message=null;this.L=g.V9(this.C.dg(),this.element);this.O=new g.vZ(this.K,2E3,this);g.K(this,this.O);this.W(R,"fullscreentoggled", this.Re);this.W(R,"presentingplayerstatechange",this.WS);this.W(R,"resize",this.WS);this.listen("click",this.onClick);g.aN()&&(w=this.B.L_(),this.W(w,HWd(),this.G),this.W(w,g9Y(document),this.Vg));R.V().N0||R.V().D||this.disable();R.createClientVe(this.element,this,139117);this.WS();this.Re(R.isFullscreen())}onClick(){if(this.B.V().N0||this.B.V().D){this.B.logClick(this.element);try{this.B.toggleFullscreen().catch(R=>{this.eR(R)})}catch(R){this.eR(R)}}else Zw(this.message,this.element,!0)}eR(R){String(R).includes("fullscreen error")? g.AO(R):g.LF(R); this.G()}G(){this.disable();this.message.R9(this.element,!0)}Vg(){$B()===this.B.getRootNode()?this.O.start():(this.O.stop(),this.message&&this.message.hide())}K(){if(window.screen&&window.outerWidth&&window.outerHeight){const R=window.screen.width*.9,w=window.screen.height*.9;let p=Math.max(window.outerWidth,window.innerWidth),r=Math.max(window.outerHeight,window.innerHeight);if(p>r!==R>w){const f=p;p=r;r=f}R>p&&w>r&&this.G()}}disable(){if(!this.message){var R=(ce(["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 TN(this.B,{j:"div",E0:["ytp-popup","ytp-generic-popup"],A:{role:"alert",tabindex:"0"},N:[R[0],{j:"a",A:{href:"https://support.google.com/youtube/answer/6276924",target:this.B.V().X},fB:R[2]},R[4]]},100,!0);this.message.hide();g.K(this,this.message);this.message.subscribe("show", w=>{this.C.KH(this.message,w)}); g.P7(this.B,this.message.element,4);this.element.setAttribute("aria-disabled","true");this.element.setAttribute("aria-haspopup","true");(0,this.L)();this.L=null}}WS(){const R=ugP(this.B),w=this.B.V().D&&this.B.getPlayerSize().width<250;this.Rg(R&&!w);this.B.logVisibility(this.element,this.K_)}Re(R){let w;R?(w=g.ta(this.B,"Exit full screen","f"),this.update({"data-title-no-tooltip":"Exit full screen"}),document.activeElement===this.element&&this.B.getRootNode().focus(),document.pictureInPictureElement&& document.exitPictureInPicture().catch(p=>{g.AO(p)})):(w=g.ta(this.B,"Full screen","f"),this.update({"data-title-no-tooltip":"Full screen"})); R=vnP(this,R);w=this.message?null:w;this.B.V().Y("player_tooltip_data_title_killswitch")?this.update({title:w,icon:R}):this.update({"tooltip-title":w,"aria-label":w,icon:R});this.C.dg().wl()}Gy(){this.message||((0,this.L)(),this.L=null);super.Gy()}GK(R){super.GK(R)}};var qpM=class extends g.k{constructor(R,w){super({j:"button",E0:["ytp-button","ytp-jump-button"],A:{title:R.Y("player_tooltip_data_title_killswitch")?"{{title}}":"","data-tooltip-title":"{{tooltip-title}}","aria-keyshortcuts":"{{aria-keyshortcuts}}","data-title-no-tooltip":"{{data-title-no-tooltip}}"},N:[w>0?{j:"svg",A:{height:"100%",mlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"100%"},N:[{j:"path",E0:["ytp-circle-arrow","ytp-svg-fill"],A:{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",E0:["ytp-jump-button-text","ytp-svg-fill"],A:{x:"7.05",y:"15.05"}}]}:{j:"svg",A:{height:"100%",mlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"100%"},N:[{j:"path",E0:["ytp-circle-arrow","ytp-svg-fill"],A:{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",E0:["ytp-jump-button-text","ytp-svg-fill"],A:{x:"6.5",y:"15"}}]}]});this.B=R;this.L=w;this.C=new g.vZ(()=>{this.O?(this.O=!1,this.C.start()):this.element.classList.remove("ytp-jump-spin","backwards")},250); this.O=!1;(w=w>0)?this.B.createClientVe(this.element,this,36843):this.B.createClientVe(this.element,this,36844);const p=g.K2(w?"Seek forward $SECONDS seconds. (\u2192)":"Seek backwards $SECONDS seconds. (\u2190)",{SECONDS:Math.abs(this.L).toString()});this.B.Y("player_tooltip_data_title_killswitch")?this.update({title:p,"data-title-no-tooltip":p,"aria-keyshortcuts":w?"\u2192":"\u2190"}):this.update({"tooltip-title":p,"data-title-no-tooltip":p,"aria-keyshortcuts":w?"\u2192":"\u2190"});this.G=this.element.querySelector(".ytp-jump-button-text"); this.G.textContent=Math.abs(this.L).toString();this.listen("click",this.onClick,this);or(R,this.element,this)}onClick(){this.B.logClick(this.element);this.B.seekBy(this.L,!0);var R=this.L>0?1:-1,w=Math.abs(this.L);const p=this.B.kU().Yq;p&&p.Rl(R,w);this.C.isActive()?this.O=!0:(R=["ytp-jump-spin"],this.L<0&&R.push("backwards"),this.element.classList.add(...R),this.C.ql())}};var AJt=class extends Bga{constructor(R,w){super(R,w,"timedMarkerCueRange","View key moments");this.W(R,g.yl("timedMarkerCueRange"),this.Q2);this.W(R,"updatemarkervisibility",this.updateVideoData)}onClickCommand(R){g.F(R,EqW)&&this.Q2()}updateVideoData(){this.C=kKH(this)?.onTap?.innertubeCommand;gn6(this)}Q2(){var R="";const w=this.G.U;var p=kKH(this)?.headerTitle;p=p?g.Su(p):"";var r=this.B.getLoopRange()?.type==="clips";w.length>1&&!r&&(R=this.B.getProgressState().current*1E3,r=WOP(w,R),R=r!=null? w[r].title:p,r!=null&&r!==this.currentIndex&&(g.m1(this.B,"innertubeCommand",w[r].onActiveCommand),this.currentIndex=r));hKd(this,R)}};var b0a=class extends g.k{constructor(R){super({j:"button",E0:["ytp-miniplayer-button","ytp-button"],A:{title:R.Y("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"},N:["{{icon}}"]});this.B=R;this.visible=!1;this.listen("click",this.onClick);this.W(R,"fullscreentoggled",this.WS);this.B.Y("player_tooltip_data_title_killswitch")? this.update({title:g.ta(R,"Miniplayer","i"),"data-title-no-tooltip":"Miniplayer",icon:Udl(this)}):this.update({"tooltip-title":g.ta(R,"Miniplayer","i"),"data-title-no-tooltip":"Miniplayer",icon:Udl(this)});or(R,this.element,this);R.createClientVe(this.element,this,62946);this.WS()}onClick(){g.m1(this.B,"onCollapseMiniplayer");this.B.logClick(this.element)}WS(){this.visible=!this.B.isFullscreen();this.Rg(this.visible);this.B.logVisibility(this.element,this.visible&&this.pB)}GK(R){super.GK(R);this.B.logVisibility(this.element, this.visible&&R)}};var pdI=new yB(0,0,.05,0,0,1,1,1),yJb=class extends g.k{constructor(R,w,p,r,f,G=!1){const I={j:"div",E0:["ytp-input-slider-section"],N:[{j:"input",Z:"ytp-input-slider",A:{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}}"}}]};f&&I.N.unshift(f);G&&I.E0.push("ytp-vertical-slider");super(I); this.O=R;this.J=w;this.U=p;this.initialValue=r;this.header=f;this.G=0;this.C=this.KB("ytp-input-slider");this.L=r?r:R;this.init();this.W(this.C,"input",this.K);this.W(this.C,"keydown",this.D)}init(){this.update({minvalue:this.O,maxvalue:this.J,stepvalue:this.U,slidervalue:this.L,ariaValueNow:this.L,ariaMinValue:this.O,ariaMaxValue:this.J,ariaValueText:`${this.L.toFixed(2)}`});Srd(this,this.L)}K(){JM(this,Number(this.C.value));this.C.focus()}D(R){if(!R.defaultPrevented){switch(R.code){case "ArrowDown":R= -this.U;break;case "ArrowUp":R=this.U;break;default:return}JM(this,Math.min(this.J,Math.max(Number((this.L+R).toFixed(2)),this.O)))}}};var VwV=class extends yJb{constructor(R){super(0,100,1,R.isMuted()?0:R.getVolume(),void 0,!0);this.B=R;this.S=M1(this.O0,10,this);this.X=!1;this.W(R,"onVolumeChange",this.onVolumeChange);this.W(this.element,"wheel",this.xY)}onVolumeChange(R){if(this.X)this.X=!1;else{var w=R.volume;w===0||R.muted?JM(this,0):JM(this,w)}}K(){super.K();this.S(this.L)}xY(R){var w=-R.deltaY;w=R.deltaMode===WheelEvent.DOM_DELTA_LINE||R.deltaMode===WheelEvent.DOM_DELTA_PAGE?g.MN(this.L+w,0,100):g.MN(this.L+g.MN(w/10,-10, 10),0,100);w===0?JM(this,0):JM(this,w);this.S(w);R.preventDefault();R.stopPropagation()}O0(R,w){this.X=!0;R===0||w?this.B.mute():(this.B.isMuted()&&this.B.unMute(),this.B.setVolume(R))}};var o2U=class extends g.k{constructor(R,w){super({j:"div",A:{tabindex:"0",title:R.Y("player_tooltip_data_title_killswitch")?"Volume":"","data-tooltip-title":"Volume","data-tooltip-offset-y":"-120"},E0:["ytp-volume-popover"]});this.isVisible=!1;this.tooltip=w.dg();this.G=new VwV(R);g.K(this,this.G);this.G.gN(this.element);this.L=new g.vZ(()=>{rdd(this,!1)},300); this.listen("mouseenter",()=>{this.L.stop()}); this.listen("mouseleave",()=>{this.O()}); this.listen("focus",()=>{this.L.stop()}); this.W(this.G.C,"focus",()=>{this.L.stop()}); this.listen("focusout",()=>{this.O();this.element.dispatchEvent(new Event("blur"))}); this.addOnDisposeCallback(g.V9(w.dg(),this.element));g.K(this,this.L)}C(){rdd(this,!0)}O(){this.L.start()}J(){this.L.stop()}K(){return this.isVisible}};var hp=class extends g.k{constructor(R,w){var p=R.V().M0?{"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:R.Y("player_tooltip_data_title_killswitch")?"{{title}}":""}:{"aria-disabled":"true","aria-haspopup":"true"};super(R.Y("delhi_modern_web_player")?{j:"div",Z:"ytp-mute-button",N:[{j:"button",A:p,E0:["ytp-volume-icon", "ytp-button"],fB:"{{icon}}"}]}:{j:"button",E0:["ytp-mute-button","ytp-button"],A:p,N:[{j:"div",Z:"ytp-volume-icon",fB:"{{icon}}"}]});this.B=R;this.C=null;this.J=this.Jl=this.X=this.U=NaN;this.PS=this.S=null;this.K=[];this.G=[];this.visible=!1;this.O=this.L=this.xY=null;R.Y("delhi_modern_web_player")&&this.update({"data-priority":4});p=this.B.V();this.updateValue("icon",LQ());this.tooltip=w.dg();this.updateValue("dataTooltipOffsetY",0);this.O=g.Up("ytp-volume-icon",this.element);const r=this.B.Y("delhi_modern_web_player_icons")? {j:"svg",A:{height:"24",viewBox:"0 0 24 24",width:"24"},N:[{j:"path",E0:["ytp-svg-fill","ytp-svg-volume-animation-speaker"],A:{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",A:{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",A:{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",A:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},N:[{j:"defs",N:[{j:"clipPath",A:{id:"ytp-svg-volume-animation-mask"},N:[{j:"path",A:{d:"m 14.35,-0.14 -5.86,5.86 20.73,20.78 5.86,-5.91 z"}},{j:"path",A:{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",A:{d:"M 9.09,5.20 6.47,7.88 26.82,28.77 29.66,25.99 z"}}]},{j:"clipPath",A:{id:"ytp-svg-volume-animation-slash-mask"},N:[{j:"path",Z:"ytp-svg-volume-animation-mover", A:{d:"m -11.45,-15.55 -4.44,4.51 20.45,20.94 4.55,-4.66 z"}}]}]},{j:"path",FI:!0,E0:["ytp-svg-fill","ytp-svg-volume-animation-speaker"],A:{"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",FI:!0,E0:["ytp-svg-fill","ytp-svg-volume-animation-hider"],A:{"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.C=new g.Jw(r);g.K(this,this.C);this.S=this.C.KB("ytp-svg-volume-animation-speaker");this.PS=this.S.getAttribute("d");this.K=g.NN("ytp-svg-volume-animation-mover",this.C.element);this.B.Y("delhi_modern_web_player_icons");this.G=g.NN("ytp-svg-volume-animation-hider",this.C.element);this.B.Y("delhi_modern_web_player_icons");this.YY=new Ya;g.K(this,this.YY);this.jI=new Ya;g.K(this,this.jI);this.W(R,"appresize",this.I0);this.W(R,"onVolumeChange",this.onVolumeChange);R.Y("delhi_modern_web_player")? this.listen("click",this.nB):this.listen("click",this.D);p.M0?(R.Y("delhi_modern_web_player")&&!R.Y("delhi_modern_web_player_horizontal_volume_controls")&&(this.L=new o2U(R,w),this.L.gN(this.element),g.K(this,this.L),this.W(this.O,"mouseover",this.O0),this.W(this.O,"focus",this.O0),this.W(this.O,"mouseout",this.M0),this.W(this.O,"blur",this.M0)),p=R.Y("delhi_modern_web_player")?this.O:this.element,this.addOnDisposeCallback(g.V9(w.dg(),p))):f$d(this);this.message=null;R.createClientVe(this.element, this,28662);this.I0(R.L_().getPlayerSize());this.setVolume(R.getVolume(),R.isMuted())}O0(){this.B.YI()||(this.updateValue("dataTooltipOffsetY",-120),this.L?.C(),this.L?.J())}M0(){this.L?.O()}I0(R){this.visible=R.width>=300||!1;this.Rg(this.visible);this.B.logVisibility(this.element,this.visible&&this.pB)}D(){this.B.V().M0?this.B.isMuted()?this.B.unMute():this.B.mute():Zw(this.message,this.element,!0);this.B.logClick(this.element)}nB(R){this.B.V().M0&&this.L?R.target===this.O?this.B.YI()&&!this.L?.K()? this.L?.C():this.D():this.L?.C():this.D()}onVolumeChange(R){this.setVolume(R.volume,R.muted)}setVolume(R,w){var p=w?0:R/100;R=p===0?1:R>50?1:0;if(this.X!==R){const r=this.U;isNaN(r)?CRY(this,R):Bt(this.YY,f=>{CRY(this,r+(this.X-r)*f)},250); this.X=R}p=p===0?1:0;if(this.J!==p){const r=this.Jl;isNaN(r)?mfd(this,p):Bt(this.jI,f=>{mfd(this,r+(this.J-r)*f)},250); this.J=p}zG6(this,w)}GK(R){super.GK(R);this.B.logVisibility(this.element,this.visible&&R)}},Gd6=["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"],I$I=["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"],uIW=18,sY_=12,QR=22,hM=12;g.twV=class extends g.k{constructor(R,w){super({j:"button",E0:["ytp-play-button","ytp-button"],A:{title:R.Y("player_tooltip_data_title_killswitch")?"{{title}}":"","data-tooltip-title":"{{tooltip-title}}","aria-keyshortcuts":"k","data-title-no-tooltip":"{{data-title-no-tooltip}}"},fB:"{{icon}}"});this.B=R;this.L=null;this.transition=new Ya;this.tooltip=w.dg();g.K(this,this.transition);R.createClientVe(this.element,this,36842);R.logVisibility(this.element,!0);this.W(R,"fullscreentoggled",this.onVideoDataChange); this.W(R,"presentingplayerstatechange",this.onStateChange);this.W(R,"videodatachange",this.onVideoDataChange);this.kp(R.getPlayerStateObject());this.listen("click",this.Ai,this);this.addOnDisposeCallback(g.V9(w.dg(),this.element))}onStateChange(R){this.kp(R.state)}kp(R){var w=g.gs(this.B.getVideoData());let p=!1;R.isOrWillBePlaying()?R=w?4:2:R.L(2)?(R=3,p=w):R=1;this.element.disabled=p;if(this.L!==R){w=null;switch(R){case 2:w=g.ta(this.B,"Pause","k");this.update({"data-title-no-tooltip":"Pause"}); break;case 3:w="Replay";this.update({"data-title-no-tooltip":"Replay"});break;case 1:w=g.ta(this.B,"Play","k");this.update({"data-title-no-tooltip":"Play"});break;case 4:w="Stop playback",this.update({"data-title-no-tooltip":"Stop playback"})}R===3?this.B.V().Y("player_tooltip_data_title_killswitch")?this.update({title:w,icon:gI(this,R)}):this.update({"tooltip-title":w,icon:gI(this,R)}):(this.B.Y("player_tooltip_data_title_killswitch")?this.update({title:w}):this.update({"tooltip-title":w}),(w=gI(this, R))&&this.L&&this.L!==3?CUb(this.transition,this.element,w):this.updateValue("icon",w));this.tooltip.wl();this.L=R}}onVideoDataChange(){g.M(this.element,"ytp-play-button-playlist",g.Dw(this.B))}Ai(R){this.B.logClick(this.element);if(this.B.getPlayerStateObject().isOrWillBePlaying())this.B.pauseVideo();else{if(this.B.isMinimized()&&this.B.getPlayerStateObject().isCued()){const w={};this.B.getVideoData()?.iI&&(w.cttAuthInfo={token:this.B.getVideoData().iI,videoId:this.B.getVideoData().videoId});mp("direct_playback", w);this.B.FD().timerName="direct_playback"}this.B.playVideo()}this.B.isMinimized()&&R?.type==="click"&&this.element.blur()}GK(R){super.GK(R)}};g.g_=class extends g.k{constructor(R,w,p){super({j:"a",E0:[p?"ytp-next-button":"ytp-prev-button","ytp-button"],A:{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"},N:[l$_(p,R.Y("delhi_modern_web_player_icons"))]}); this.B=R;this.L=p;this.playlist=this.videoData=null;this.D=!1;this.G=this.K=this.C=null;this.O=!1;this.tooltip=w.dg();p?R.createClientVe(this.element,this,6193):R.createClientVe(this.element,this,6194);this.W(R,"fullscreentoggled",this.onVideoDataChange);this.W(R,"videodatachange",this.onVideoDataChange);this.W(R,"onPlaylistUpdate",this.onVideoDataChange);this.W(R,"onLoopRangeChange",this.onVideoDataChange);this.L||this.W(R,"appresize",this.J);this.W(R,"mdxpreviousnextchange",()=>{HB(this);this.J()}); this.onVideoDataChange()}onVideoDataChange(){W4_(this);this.G&&(this.o9(this.G),this.G=null);this.videoData=this.B.getVideoData({playerType:1});if(this.playlist=this.B.getPlaylist())this.playlist.subscribe("shuffle",this.onVideoDataChange,this),this.G=this.W(this.B,"progresssync",this.U);this.O=xfd(this);HB(this);this.J(this.B.L_().getPlayerSize())}J(R=this.B.L_().getPlayerSize()){var w=this.B.getLoopRange()?.type==="clips";const p=g.Dw(this.B)||this.L&&g.ar(this.B)&&!this.B.Y("web_hide_next_button")|| Bod(this),r=!this.L&&R.width<400;R=this.B.Y("delhi_modern_web_player_horizontal_volume_controls")&&R.width<640;w=p&&!w&&!r&&!R;this.Rg(w);this.B.logVisibility(this.element,w)}onClick(R){this.B.logClick(this.element);let w=!0;this.D?w=g.ha(R,this.B):R.preventDefault();w&&(this.L&&this.B.getPresentingPlayerType()===5?this.B.publish("ytoprerollinternstitialnext"):this.L?(e2(this.B.FD()),this.B.publish("playlistnextbuttonclicked",this.element),this.B.nextVideo(!0)):this.O?this.B.seekTo(0):(e2(this.B.FD()), this.B.publish("playlistprevbuttonclicked",this.element),this.B.previousVideo(!0)))}U(){const R=xfd(this);R!==this.O&&(this.O=R,HB(this))}Gy(){this.C&&(this.C(),this.C=null);W4_(this);super.Gy()}};var O0t=class extends g.k{constructor(R,w){super({j:"div",Z:"ytp-fine-scrubbing",N:[{j:"div",Z:"ytp-fine-scrubbing-draggable",N:[{j:"div",Z:"ytp-fine-scrubbing-thumbnails",A:{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",A:{"aria-hidden":"true"},Z:"ytp-fine-scrubbing-cursor"},{j:"div",Z:"ytp-fine-scrubbing-seek-time", A:{"aria-hidden":"true"},fB:"{{seekTime}}"},{j:"div",Z:"ytp-fine-scrubbing-play",N:[R.Y("delhi_modern_web_player_icons")?Bs():zi()],A:{title:"Play from this position",role:"button"}},{j:"div",Z:"ytp-fine-scrubbing-dismiss",N:[g.fQ()],A:{title:"Exit precise seeking",role:"button"}}]});this.api=R;this.K=this.KB("ytp-fine-scrubbing-thumbnails");this.dismissButton=this.KB("ytp-fine-scrubbing-dismiss");this.xY=this.KB("ytp-fine-scrubbing-draggable");this.playButton=this.KB("ytp-fine-scrubbing-play");this.thumbnails= [];this.C=[];this.PS=this.L=0;this.M0=void 0;this.X=NaN;this.YY=this.U=this.O=this.D=0;this.G=[];this.interval=this.frameCount=0;this.J=160;this.scale=1;this.nB=0;this.isEnabled=this.I0=!1;vB(this,this.api.getCurrentTime());this.addOnDisposeCallback(g.V9(w,this.dismissButton));this.addOnDisposeCallback(g.V9(w,this.playButton));this.O0=new g.Aq(this.xY,!0);this.O0.subscribe("dragstart",this.jI,this);this.O0.subscribe("dragmove",this.Jl,this);this.O0.subscribe("dragend",this.U0,this);this.W(R,"SEEK_COMPLETE", this.q0);R.Y("web_fix_fine_scrubbing_false_play")&&this.W(R,"rootnodemousedown",p=>{this.S=p}); this.K.addEventListener("keydown",()=>{}); g.K(this,this.O0);this.api.createClientVe(this.element,this,153154);this.api.createClientVe(this.K,this,152789);this.api.createClientVe(this.dismissButton,this,153156);this.api.createClientVe(this.playButton,this,153155)}Qk(R){this.jI(R.pageX);this.Jl(R.pageX+R.deltaX);N8(this)}jI(R){this.X=R-this.PS}Jl(R){R-=this.PS;!isNaN(this.X)&&this.thumbnails.length>0&&(this.U=R-this.X,this.thumbnails.length>0&&this.U!==0&&(this.O=this.D+this.U,R=qJb(this,this.O),this.O<=this.L/2&&this.O>=L46(this)?(this.api.seekTo(R, !1,void 0,void 0,25),g.Z2(this.xY,"transform",`translateX(${this.O-this.L/2}px)`),vB(this,R)):this.O=this.D))}U0(){this.S&&(this.S.Tu=!0);var R=(0,g.T)()-this.nB<300;if(Math.abs(this.U)<5&&!R){this.nB=(0,g.T)();R=this.X+this.U;const w=this.L/2-R;this.jI(R);this.Jl(R+w);N8(this);this.api.logClick(this.K)}N8(this)}q0(){kH(this,this.api.getCurrentTime())}play(R){this.api.seekTo(qJb(this,this.O),void 0,void 0,void 0,26);this.api.playVideo();R&&this.api.logClick(this.playButton)}onExit(R){this.api.seekTo(this.YY, void 0,void 0,void 0,63);this.api.playVideo();R&&this.api.logClick(this.dismissButton)}LL(R,w){this.PS=R;this.L=w;kH(this,this.api.getCurrentTime())}N0(R){this.scale=R?1.5:1}enable(){this.isEnabled||(this.isEnabled=!0,this.YY=this.api.getCurrentTime(),vB(this,this.YY),g.M(this.api.getRootNode(),"ytp-fine-scrubbing-enable",this.isEnabled),this.M0=this.W(this.element,"wheel",this.Qk),this.logVisibility(this.isEnabled))}disable(){this.isEnabled=!1;this.hide();g.M(this.api.getRootNode(),"ytp-fine-scrubbing-enable", this.isEnabled);this.M0&&this.o9(this.M0);this.logVisibility(this.isEnabled)}reset(){this.disable();this.G=[];this.I0=!1}logVisibility(R){this.api.logVisibility(this.element,R);this.api.logVisibility(this.K,R);this.api.logVisibility(this.dismissButton,R);this.api.logVisibility(this.playButton,R)}Gy(){for(;this.C.length;)this.C.pop()?.dispose();super.Gy()}},Ad_=class extends g.k{constructor(){super({j:"div",Z:"ytp-fine-scrubbing-thumbnail"})}},bDl=class extends g.k{constructor(){super({j:"div",Z:"ytp-fine-scrubbing-chapter-title", N:[{j:"div",Z:"ytp-fine-scrubbing-chapter-title-content",fB:"{{chapterTitle}}"}]})}};var E__=class extends g.k{constructor(R){super({j:"div",Z:"ytp-heat-map-chapter",N:[{j:"svg",Z:"ytp-heat-map-svg",A:{height:"100%",preserveAspectRatio:"none",version:"1.1",viewBox:"0 0 1000 100",width:"100%"},N:[{j:"defs",N:[{j:"clipPath",A:{id:"{{id}}"},N:[{j:"path",Z:"ytp-heat-map-path",A:{d:"",fill:"white"}}]},{j:"linearGradient",A:{gradientUnits:"userSpaceOnUse",id:"ytp-heat-map-gradient-def",x1:"0%",x2:"0%",y1:"0%",y2:"100%"},N:[{j:"stop",A:{offset:"0%","stop-color":"white","stop-opacity":"1"}}, {j:"stop",A:{offset:"100%","stop-color":"white","stop-opacity":"0"}}]}]},{j:"rect",Z:"ytp-heat-map-graph",A:{"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",A:{"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",A:{"clip-path":"url(#hm_1)",height:"100%",x:"0",y:"0"}},{j:"path",Z:"ytp-modern-heat-map",A:{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=R;this.D=this.KB("ytp-heat-map-svg");this.K=this.KB("ytp-heat-map-path");this.G=this.KB("ytp-heat-map-graph");this.J=this.KB("ytp-heat-map-play");this.L=this.KB("ytp-heat-map-hover");this.O=this.KB("ytp-modern-heat-map");this.n$=!1;this.C=60;R=`${g.DL(this)}`;this.update({id:R});R=`url(#${R})`;this.G.setAttribute("clip-path",R);this.J.setAttribute("clip-path",R);this.L.setAttribute("clip-path", R)}X(R){this.J.setAttribute("width",`${(R*100).toFixed(2)}%`)}U(R){this.L.setAttribute("width",`${(R*100).toFixed(2)}%`)}};var ODH=class extends g.k{constructor(){super({j:"div",Z:"ytp-chapter-hover-container",N:[{j:"div",Z:"ytp-progress-bar-padding"},{j:"div",Z:"ytp-progress-list",N:[{j:"div",E0:["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.C=this.KB("ytp-progress-list");this.K=this.KB("ytp-progress-linear-live-buffer"); this.G=this.KB("ytp-ad-progress-list");this.J=this.KB("ytp-load-progress");this.D=this.KB("ytp-play-progress");this.O=this.KB("ytp-hover-progress");this.L=this.KB("ytp-chapter-hover-container")}zk(R){return R==="PLAY_PROGRESS"?this.D:R==="LOAD_PROGRESS"?this.J:R==="LIVE_BUFFER"?this.K:this.O}};var K3P=class{constructor(){this.C=this.position=this.O=this.L=this.G=this.width=NaN}update(R,w,p=0,r=0){this.width=w;this.G=p;this.L=w-p-r;this.position=g.MN(R,p,p+this.L);this.O=this.position-p;this.C=this.O/this.L}};var $fY=class extends g.k{constructor(){super({j:"div",Z:"ytp-timed-marker"});this.L=this.timeRangeStartMillis=NaN;this.title="";this.onActiveCommand=void 0}};g.E2P=class extends g.RX{constructor(R,w){super({j:"div",Z:"ytp-progress-bar-container",A:{"aria-disabled":"true"},N:[{j:"div",E0:["ytp-heat-map-container"],N:[{j:"div",Z:"ytp-heat-map-edu"}]},{j:"div",E0:["ytp-progress-bar"],A:{tabindex:"0",role:"slider","aria-label":"Seek slider","aria-valuemin":"{{ariamin}}","aria-valuemax":"{{ariamax}}","aria-valuenow":"{{arianow}}","aria-valuetext":"{{arianowtext}}"},N:[{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",N:[{j:"div",E0:["ytp-scrubber-button","ytp-swatch-background-color"],N:[{j:"div",Z:"ytp-scrubber-pull-indicator"},{j:"img",E0:["ytp-decorated-scrubber-button"]}]}]}]},{j:"div",E0:["ytp-fine-scrubbing-container"],N:[{j:"div",Z:"ytp-fine-scrubbing-edu"}]},{j:"div",Z:"ytp-bound-time-left",fB:"{{boundTimeLeft}}"},{j:"div",Z:"ytp-bound-time-right",fB:"{{boundTimeRight}}"},{j:"div",Z:"ytp-clip-start",A:{title:"{{clipstarttitle}}"},fB:"{{clipstarticon}}"}, {j:"div",Z:"ytp-clip-end",A:{title:"{{clipendtitle}}"},fB:"{{clipendicon}}"}]});this.api=R;this.qH=!1;this.Pw=this.YU=this.Qk=this.O0=this.D=this.hM=0;this.Ww=null;this.wg=!1;this.nB={};this.yh={};this.clipEnd=Infinity;this.Mr=this.KB("ytp-clip-end");this.Df=new g.Aq(this.Mr,!0);this.Ml=this.KB("ytp-clip-end-exclude");this.a9=this.KB("ytp-clip-start-exclude");this.clipStart=0;this.cB=this.KB("ytp-clip-start");this.uo=new g.Aq(this.cB,!0);this.S=this.SI=0;this.progressBar=this.KB("ytp-progress-bar"); this.p_={};this.U0={};this.q0=this.KB("ytp-chapters-container");this.lD=this.KB("ytp-timed-markers-container");this.L=[];this.U=[];this.sZ={};this.J8=null;this.Jl=-1;this.mq=this.jI=0;this.B1=this.X=null;this.Hw=this.KB("ytp-scrubber-button");this.I0=this.KB("ytp-decorated-scrubber-button");this.FL=this.KB("ytp-scrubber-container");this.eI=new g.Xx;this.pL=0;this.zv=new K3P;this.O=new By(0,0);this.sQ=null;this.J=this.kF=!1;this.gS=null;this.xY=this.KB("ytp-heat-map-container");this.GE=this.KB("ytp-heat-map-edu"); this.G=[];this.heatMarkersDecorations=[];this.N0=this.KB("ytp-fine-scrubbing-container");this.Nl=this.KB("ytp-fine-scrubbing-edu");this.C=void 0;this.PS=this.Nk=this.YY=!1;this.tooltip=w.dg();this.addOnDisposeCallback(g.V9(this.tooltip,this.Mr));g.K(this,this.Df);this.Df.subscribe("hoverstart",this.PF,this);this.Df.subscribe("hoverend",this.iD,this);this.W(this.Mr,"click",this.Af);this.addOnDisposeCallback(g.V9(this.tooltip,this.cB));g.K(this,this.uo);this.uo.subscribe("hoverstart",this.PF,this); this.uo.subscribe("hoverend",this.iD,this);this.W(this.cB,"click",this.Af);K4Y(this);this.W(R,"resize",this.LL);this.W(R,"presentingplayerstatechange",this.Av);this.W(R,"videodatachange",this.Ej);this.W(R,"videoplayerreset",this.XT);this.W(R,"cuerangesadded",this.Ie);this.W(R,"cuerangesremoved",this.Gw);this.W(R,"onLoopRangeChange",this.MO);this.W(R,"innertubeCommand",this.onClickCommand);this.W(R,"onRetroModeChanged",this.Oj);this.W(R,g.bp("timedMarkerCueRange"),this.f2);this.W(R,"updatemarkervisibility", this.Ov);this.W(R,Dc(R.V().Tk())?"playbackChange":"serverstitchedvideochange",this.K2);this.updateVideoData(R.getVideoData(),!0);this.MO(R.getLoopRange());Rc(this)&&!this.C&&(this.C=new O0t(this.api,this.tooltip),R=g.Hc(this.element).x||0,this.C.LL(R,this.D),this.C.gN(this.N0),g.K(this,this.C),this.W(this.C.dismissButton,"click",this.XS),this.W(this.C.playButton,"click",this.wB),this.W(this.C.element,"dblclick",this.wB));this.api.createClientVe(this.xY,this,139609,!0);this.api.createClientVe(this.GE, this,140127,!0);this.api.createClientVe(this.Nl,this,151179,!0);this.api.createClientVe(this.progressBar,this,38856,!0)}Ov(){var R=!1;const w=this.api.getVideoData();if(!w)return R;this.api.P1("timedMarkerCueRange");wr(this);for(const m of w.Jl){var p=this.U0[m]?.markerType,r=this.U0[m]?.markers;if(!r)break;if(p==="MARKER_TYPE_TIMESTAMPS"){for(const z of r)R=new $fY,p=z,R.title=p.title?.simpleText||"",R.timeRangeStartMillis=Number(p.startMillis),R.L=Number(p.durationMillis),R.onActiveCommand=p.onActive?.innertubeCommand?? void 0,n_D(this,R);fy(this,this.U);R=this.U;p=this.sZ;var f=[],G=null;for(var I=0;IC&&(G.end=C);C=LO_(C,C+u);f.push(C);G=C;p[C.id]=R[I].onActiveCommand}}this.api.C3(f);a:{for(const z of r)if(z.sourceType==="SOURCE_TYPE_SMART_SKIP"){R=!1;break a}R=!0}R&&(this.J8=this.U0[m]);R=!0}else if(p==="MARKER_TYPE_HEATMAP"){if((r=this.U0[m])&&r.markers){p=r.markersMetadata?.heatmapMetadata?.minHeightDp?? 0;f=r.markersMetadata?.heatmapMetadata?.maxHeightDp??60;G=this.L.length;I=null;for(C=0;C=u&&x<=z&&B.push(W)}f>0&&(this.xY.style.height=`${f}px`);tX_(this.G[C],B,p,f,C===0);B.length>0&&(I=B[B.length-1])}g.py(this)}p=[];if(r=r.markersDecoration?.timedMarkerDecorations)for(const z of r)p.push({visibleTimeRangeStartMillis:z.visibleTimeRangeStartMillis?? -1,visibleTimeRangeEndMillis:z.visibleTimeRangeEndMillis??-1,decorationTimeMillis:z.decorationTimeMillis??NaN,label:z.label?g.Su(z.label):""});r=p;this.heatMarkersDecorations=r}}w.ll=this.U;g.M(this.element,"ytp-timed-markers-enabled",R);return R}LL(){g.py(this);rr(this);fy(this,this.U);if(this.C){const R=g.Hc(this.element).x||0;this.C.LL(R,this.D)}}Oj(){const R=this.api.getVideoData();R&&ToY(this,R)}onClickCommand(R){if(R=g.F(R,AN)){const w=R.key;R.isVisible&&w&&Go(this,w)}}f2(R){g.m1(this.api,"innertubeCommand", this.sZ[R.id])}Q2(){rr(this);const R=this.api.getCurrentTime();(Rthis.clipEnd)&&this.Af()}R3(R){if(!R.defaultPrevented){let w=!1;switch(R.keyCode){case 36:this.api.seekTo(0,void 0,void 0,void 0,79);w=!0;break;case 35:this.api.seekTo(Infinity,void 0,void 0,void 0,80);w=!0;break;case 34:this.api.seekBy(-60,void 0,void 0,76);w=!0;break;case 33:this.api.seekBy(60,void 0,void 0,75);w=!0;break;case 38:this.api.Y("enable_key_press_seek_logging")&&qa(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);w=!0;break;case 40:this.api.Y("enable_key_press_seek_logging")&&qa(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),w=!0}w&&R.preventDefault()}}Ej(R,w){this.updateVideoData(w,R==="newdata")}XT(){this.Ej("newdata",this.api.getVideoData())}updateVideoData(R,w=!1){var p= !!R&&R.n$();p&&(R.I0()||zo(this)?this.kF=!1:this.kF=R.allowLiveDvr,g.M(this.api.getRootNode(),"ytp-enable-live-buffer",!!R?.I0()),ToY(this,R));bW(this,this.api.Wo());if(w){if(p){w=R.clipEnd;this.clipStart=R.clipStart;this.clipEnd=w;lW(this);for(uW(this,this.S,this.SI);this.G.length>0;)this.G.pop().dispose();this.heatMarkersDecorations=[];this.p_={};this.C?.reset();yT(this);g.M(this.api.getRootNode(),"ytp-fine-scrubbing-exp",Rc(this))}else this.Af();this.K()}if(R){w=this.sQ?.type==="clips";if(p=!R.isLivePlayback){p= this.api.getVideoData();var r=g.kW(p);const I=MXd(p);p=r!=null||I!=null&&I.length>0||p.C2?.length>0}if(p&&!w){w=this.api.getVideoData();r=g.kW(w);p=!1;if(r?.markersMap){p=this.api.getVideoData();p.m5=r.visibleOnLoad?.key||p.m5;r=r.markersMap;for(var f of r)f.key&&f.value&&(this.p_[f.key]=f.value,f.value.onChapterRepeat&&(p.gU=f.value.onChapterRepeat));p.m5!=null&&Go(this,p.m5);p=!0}if(w.C2?.length>0){f=g.bX.getState().entities;for(var G of w.C2)if(r=va(f,G)?.markersList,r?.markerType==="MARKER_TYPE_TIMESTAMPS"|| r?.markerType==="MARKER_TYPE_HEATMAP")this.U0[G]=r;p=this.Ov()||p}!p&&(G=MXd(w))&&(PRr(this,G),w.pL=this.L,a$x(this));hGI(this,null);R.pV&&this.G.length===0&&(R=R.pV,G=R.key,R.isVisible&&G&&Go(this,G))}else K4Y(this),wr(this)}rr(this)}Av(R){this.X&&!R.state.L(32)&&this.api.getPresentingPlayerType()!==3&&this.X.cancel();this.C?.isEnabled&&R.state.L(8)&&this.api.pauseVideo();R=this.api.getPresentingPlayerType()===2||!this.api.Wo()||this.api.getPlayerState()===-1&&this.api.getCurrentTime()===0;g.M(this.Hw, "ytp-hide-scrubber-button",R)}MO(R){const w=!!this.sQ!==!!R,p=this.sQ;this.sQ=R;hGI(this,p);R?.type!=="clips"&&R||(R?(this.updateValue("clipstarticon",Cz6()),this.updateValue("clipendicon",Cz6()),this.updateValue("clipstarttitle",null),this.updateValue("clipendtitle",null)):(this.updateValue("clipstarticon",Rwx()),this.updateValue("clipendicon",SNH()),this.updateValue("clipstarttitle","Watch full video"),this.updateValue("clipendtitle","Watch full video")),w&&(this.updateVideoData(this.api.getVideoData(), !0),g.py(this)),lW(this));uW(this,this.S,this.SI)}Sk(){this.api.publish("progressBarHoverStart")}L2(R,w,p){var r=g.Hc(this.element),f=mZ(this).L;const G=p?p.getAttribute("data-tooltip"):void 0;var I=p?p.getAttribute("data-position"):void 0,C=p?p.getAttribute("data-offset-y"):void 0;C=C?Number(C):0;I&&(R=nQ(this.O,Number(p.getAttribute("data-position")),0)*f+g.Hc(this.progressBar).x);this.eI.x=R-r.x;this.eI.y=w-r.y;R=mZ(this);r=VT(this,R);w=0;this.api.getVideoData()?.I0()&&((w=this.api.getProgressState().seekableEnd)&& r>w&&(r=w,R.position=nQ(this.O,w)*mZ(this).L),w=this.O.C);zo(this)&&(w=this.O.C);w=G||g.a$(this.kF?r-this.O.L:r-w);p=R.position+this.hM;r-=this.api.vB();if(!this.C?.isEnabled)if(this.api.kG()){if(this.L.length>1){f=Ly(this,this.eI.x,!0);if(!this.sQ)for(I=0;I1)for(I=0;I0){f=this.eI.x;for(var u of this.U)I=s6(this,u.timeRangeStartMillis/ (this.O.L*1E3),mZ(this)),g.M(u.element,"ytp-timed-marker-hover",I<=f&&I+6>=f)}f=this.tooltip.scale;u=this.api.Y("delhi_modern_web_player")?67:45;C=(isNaN(C)?0:C)-u*f;this.api.Y("web_key_moments_markers")?this.J8?(u=WOP(this.U,r*1E3),u=u!=null?this.U[u].title:""):(u=KE(this.L,r*1E3),u=this.L[u].title):(u=KE(this.L,r*1E3),u=this.L[u].title);u||(C+=16*f);this.tooltip.scale===.6&&(g.t5(this.api.V())?(C=this.api.L_().getPlayerSize().height-225,f=this.api.Y("delhi_modern_web_player")?70:110,C=u?C+f:C+f+ 16):C=u?110:126);f=KE(this.L,r*1E3);this.Jl=v_L(this,r,f)?f:v_L(this,r,f+1)?f+1:-1;g.M(this.api.getRootNode(),"ytp-progress-bar-snap",this.Jl!==-1&&this.L.length>1);f=!1;for(var m of this.heatMarkersDecorations)I=r*1E3,I>=m.visibleTimeRangeStartMillis&&I<=m.visibleTimeRangeEndMillis&&(u=m.label,w=g.a$(VT(this,R)),f=!0);this.Nk!==f&&(this.Nk=f,this.api.logVisibility(this.GE,this.Nk));g.M(this.api.getRootNode(),"ytp-progress-bar-decoration",f);m=160*this.tooltip.scale*2;f=u.length*(this.J?8.55:5.7); f=f<=m?f:m;I=f<160*this.tooltip.scale;m=3;!I&&f/2>R.position&&(m=1);!I&&f/2>this.D-R.position&&(m=2);this.api.V().D&&(C-=10);this.G.length&&this.G[0].n$&&(C-=14*(this.J?2:1),this.YY||(this.YY=!0,this.api.logVisibility(this.xY,this.YY)));Rc(this)&&(this.C?.isEnabled||this.Qk>0)&&(C-=this.C?.isEnabled?(this.J?135:90)-this.O0:this.Qk);R=void 0;Rc(this)&&!this.api.Y("web_player_hide_fine_scrubbing_edu")&&(R="Pull up for precise seeking",this.PS||(this.PS=!0,this.api.logVisibility(this.Nl,this.PS)));this.tooltip.DO(p, r,w,!!G,C,u,m,R)}else this.tooltip.DO(p,r,w,!!G,C);g.pc(this.api.getRootNode(),"ytp-progress-bar-hover");jYL(this)}wm(){this.K();g.fc(this.api.getRootNode(),"ytp-progress-bar-hover");this.YY&&(this.YY=!1,this.api.logVisibility(this.xY,this.YY));this.PS&&(this.PS=!1,this.api.logVisibility(this.Nl,this.PS));this.api.Y("enable_smart_skip_player_controls_shown_on_web_increased_triggering_sensitivity")&&this.api.publish("progressBarHoverEnd")}mj(R,w){const p=g.Hc(this.element);this.pL=R-p.x;Rc(this)&& this.C&&(this.C.I0?kH(this.C,this.api.getCurrentTime()):ydr(this.C),this.C.show(),g.M(this.api.getRootNode(),"ytp-fine-scrubbing-enable",this.C.isEnabled));this.Ww&&(this.Ww.dispose(),this.Ww=null);this.YU=w;this.Pw=this.api.getCurrentTime();this.L.length>1&&this.Jl!==-1?this.api.seekTo(this.L[this.Jl].startTime/1E3,!1,void 0,void 0,7):this.api.seekTo(VT(this,mZ(this)),!1,void 0,void 0,7);g.pc(this.element,"ytp-drag");(this.qH=this.api.getPlayerStateObject().isOrWillBePlaying())&&this.api.pauseVideo()}C2(){if(Rc(this)&& this.C){var R=(this.J?135:90)-this.O0;this.Qk>=R*.5?(this.C.enable(),kH(this.C,this.api.getCurrentTime()),HDW(this,R)):yT(this)}if(this.api.getPlayerStateObject().L(32)||this.api.getPresentingPlayerType()===3)if(this.C?.isEnabled)this.api.pauseVideo();else{this.api.startSeekCsiAction();if(this.L.length>1&&this.Jl!==-1)this.api.Y("html5_enable_progress_bar_slide_seek_logging")&&qa(this,this.Pw,this.L[this.Jl].startTime/1E3,"SEEK_SOURCE_SLIDE_ON_SCRUBBER_BAR_CHAPTER","INTERACTION_LOGGING_GESTURE_TYPE_GENERIC_CLICK"), this.api.seekTo(this.L[this.Jl].startTime/1E3,void 0,void 0,void 0,7);else{R=VT(this,mZ(this));this.api.Y("html5_enable_progress_bar_slide_seek_logging")&&qa(this,this.Pw,R,"SEEK_SOURCE_SLIDE_ON_SCRUBBER_BAR","INTERACTION_LOGGING_GESTURE_TYPE_GENERIC_CLICK");this.api.seekTo(R,void 0,void 0,void 0,7);for(const w of this.heatMarkersDecorations)R*1E3>=w.visibleTimeRangeStartMillis&&R*1E3<=w.visibleTimeRangeEndMillis&&this.api.logClick(this.GE)}g.fc(this.element,"ytp-drag");this.M0&&(this.I0.src=this.M0); this.qH&&!this.api.getPlayerStateObject().L(2)&&this.api.playVideo()}}Tw(R,w){const p=mZ(this),r=VT(this,p);this.api.L_().Z0||(p.position>this.pL+2?this.ez&&(this.I0.src=this.ez):p.position{const f=g.Hc(this.element).x||0;this.pL=R-f},150)); this.api.seekTo(r,!1,void 0,void 0,7);Rc(this)&&this.C?.I0&&(kH(this.C,r),this.C.isEnabled||(this.Qk=g.MN(this.YU-w-10,0,(this.J?135:90)-this.O0),HDW(this,this.Qk)))}K(){this.tooltip.bF()}PF(){this.sQ||(this.updateValue("clipstarticon",UVl()),this.updateValue("clipendicon",UVl()),g.pc(this.element,"ytp-clip-hover"))}iD(){this.sQ||(this.updateValue("clipstarticon",Rwx()),this.updateValue("clipendicon",SNH()),g.fc(this.element,"ytp-clip-hover"))}Af(){this.clipStart=0;this.clipEnd=Infinity;lW(this); uW(this,this.S,this.SI)}Ie(R){for(const w of R)if(w.visible){if(R=w.getId(),!this.nB[R]){const p=g.sW("DIV");w.tooltip&&p.setAttribute("data-tooltip",w.tooltip);this.nB[R]=w;this.yh[R]=p;g.R4(p,w.style);iDd(this,R);this.api.V().Y("disable_ad_markers_on_content_progress_bar")||this.L[0].G.appendChild(p)}}else wtr(this,w)}Gw(R){for(const w of R)wtr(this,w)}XS(R){this.C&&(this.C.onExit(R!=null),yT(this))}wB(R){this.C&&(this.C.play(R!=null),yT(this))}K2(){bW(this,this.api.Wo())}Gy(){bW(this,!1);super.Gy()}t8(){return this.C}};var DNS=class extends g.k{constructor(R,w){super({j:"button",E0:["ytp-remote-button","ytp-button"],A:{title:R.Y("player_tooltip_data_title_killswitch")?"Play on TV":"","data-tooltip-title":"Play on TV","aria-haspopup":"true","data-priority":"10"},fB:"{{icon}}"});this.B=R;this.OQ=w;this.L=null;this.W(R,"onMdxReceiversChange",this.WS);this.W(R,"presentingplayerstatechange",this.WS);this.W(R,"appresize",this.WS);R.createClientVe(this.element,this,139118);this.WS();this.listen("click",this.C,this);or(R, this.element,this)}isActive(){return!!this.B.getOption("remote","casting")}WS(){var R=!1;this.B.getOptions().includes("remote")&&(R=this.B.getOption("remote","receivers").length>1);this.Rg(R&&this.B.L_().getPlayerSize().width>=400);this.B.logVisibility(this.element,this.K_);let w=1;R&&this.isActive()&&(w=2);if(this.L!==w){this.L=w;R=this.B.Y("delhi_modern_web_player_icons");switch(w){case 1:this.updateValue("icon",R?{j:"svg",A:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},N:[{j:"path", A:{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",A:{height:"100%",version:"1.1",viewBox:"0 0 36 36",width:"100%"},N:[{j:"path",FI:!0,A:{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", R?{j:"svg",A:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},N:[{j:"path",A:{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.NGI())}g.M(this.element,"ytp-remote-button-active",this.isActive())}}C(){if(this.B.getOption("remote","quickCast"))this.B.setOption("remote","quickCast",!0);else{var R=this.OQ,w=this.element;if(R.Pu())R.Qh();else{R.initialize();a:{for(p of R.bI.items)if(p.priority===1)break a;var p=null}p&&(p.open(),R.R9(w));R.R9(w)}}this.B.logClick(this.element)}};var e1M=class extends g.k{constructor(R,w){super({j:"button",E0:["ytp-button","ytp-settings-button"],A:{"aria-expanded":"false","aria-haspopup":"true","aria-controls":vC(),title:R.Y("player_tooltip_data_title_killswitch")?"Settings":"","data-tooltip-title":"Settings","data-tooltip-target-id":"ytp-settings-button"},N:[R.Y("delhi_modern_web_player_icons")?{j:"svg",A:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},N:[{j:"path",A:{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.xt()]});this.B=R;this.OQ=w;this.C=!0;this.listen("click",this.O);this.W(R,"onPlaybackQualityChange",this.updateBadge);this.W(R,"videodatachange",this.updateBadge);this.W(R,"webglsettingschanged",this.updateBadge);this.W(R,"appresize",this.L);or(R,this.element,this);this.B.createClientVe(this.element,this,28663);this.updateBadge();this.L(R.L_().getPlayerSize())}L(R){const w=this.B.V();let p=400;w.J?p=300:w.D&&(p=200);R=this.C&&R.width>=p;this.Rg(R);this.B.logVisibility(this.element, R)}O(){if(this.OQ.K_)this.OQ.Qh();else{const R=g.FA(this.B.tf());R&&!R.loaded&&(R.Oe("tracklist",{includeAsr:!0}).length||R.load());this.B.logClick(this.element);this.OQ.R9(this.element)}}updateBadge(){const R=this.B.isHdr();var w=this.B.getPresentingPlayerType(),p=w!==2&&w!==3,r=g.c7(this.B),f=p&&!!g.MS(this.B.tf());w=f&&r.displayMode===1;r=f&&r.displayMode===2;p=(f=w||r)||!p?null:this.B.getPlaybackQuality();g.M(this.element,"ytp-hdr-quality-badge",R);g.M(this.element,"ytp-hd-quality-badge",!R&& (p==="hd1080"||p==="hd1440"));g.M(this.element,"ytp-4k-quality-badge",!R&&p==="hd2160");g.M(this.element,"ytp-5k-quality-badge",!R&&p==="hd2880");g.M(this.element,"ytp-8k-quality-badge",!R&&p==="highres");g.M(this.element,"ytp-3d-badge-grey",!R&&f&&w);g.M(this.element,"ytp-3d-badge",!R&&f&&r)}};var Mwb=class extends g.d_{constructor(R,w,p){if(R.Y("web_add_footer_template_to_audio_track")){var r="Edit your $BEGIN_LINKpreferred languages$END_LINK in settings".split(/\$(BEGIN|END)_LINK/);r={j:"div",Z:"ytp-panel-footer-content",N:[r[0],{j:"a",Z:"ytp-panel-footer-content-link",A:{href:"/account_playback"},fB:r[2]},r[4]]}}super("Audio track",g.LI.AUDIO,R,w,void 0,void 0,r);this.B=R;this.K=p;this.tracks={};g.pc(this.element,"ytp-audio-menu-item");this.countLabel=new g.k({j:"div",N:[{j:"span",fB:"Audio track"}, {j:"span",Z:"ytp-menuitem-label-count",fB:"{{content}}"}]});R.Y("web_settings_menu_icons")&&!this.B.Y("html5_enable_new_audio_settings_menu")&&(w=R.Y("delhi_modern_web_player_icons")?{j:"svg",A:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},N:[{j:"path",A:{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",A:{height:"24",viewBox:"0 0 24 24",width:"24"},N:[{j:"path",A:{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(w));g.K(this,this.countLabel);g.FV(this,this.countLabel);R.createClientVe(this.element,this,273318);this.listen("click",this.onClick);this.W(R,"videodatachange",this.WS);this.W(R,"onPlaybackAudioChange",this.WS);this.WS()}WS(){var R=this.B.getAvailableAudioTracks();if(R.length>1){const w=R.filter(r=>r.isAutoDubbed()),p=R.filter(r=>!r.isAutoDubbed()).map(this.J); w.length>0&&(this.B.Ty("ad_grp",{ad_c:w.length,t_c:R.length}),p.push(new i7l),p.push(...w.map(this.J)));Q8H(this,p);this.tracks=g.Ei(R,this.J,this);this.countLabel.setContent(R.length?` (${R.length})`:"");this.publish("size-change");R=this.J(this.B.getAudioTrack());this.C(R);this.B.Y("html5_enable_new_audio_settings_menu")&&this.K?.Dg(R.toString());this.enable(!0)}else this.B.Y("html5_enable_new_audio_settings_menu")&&this.K?.Dg(""),this.enable(!1)}L(R){super.L(R);R=this.tracks[R];this.B.setAudioTrack(R); this.OQ.ID();this.B.Ty("ad_sel",{lang:R.DT.id})}J(R){return R.toString()}D(R){this.B.Y("html5_enable_new_audio_settings_menu")?this.K&&(R?this.K.CL(this):this.K.EK(this)):super.D(R)}onClick(){this.B.logClick(this.element)}};var cJk=class extends g.wv{constructor(R,w){super(g.Ys({"aria-haspopup":"true"},["ytp-audio-settings-menu-item"]),g.LI.xm);this.B=R;this.OQ=w;g.pc(this.element,"ytp-audio-settings-menu-item");this.UC=new g.X2(R,void 0,"Audio");this.countLabel=new g.k({j:"div",N:[{j:"span",fB:"Audio"},{j:"span",Z:"ytp-menuitem-label-count",fB:"{{content}}"}]});R.Y("web_settings_menu_icons")&&this.setIcon({j:"svg",A:{height:"24",viewBox:"0 0 24 24",width:"24"},N:[{j:"path",A:{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.vx=new Mwb(R,this.OQ,this);g.K(this,this.vx);this.W(R,"settingsMenuInitialized",this.aq.bind(this));this.W(R,"videodatachange",this.aq.bind(this));g.K(this,this.countLabel);g.FV(this,this.countLabel);this.OQ.CL(this);this.W(R,"onPlaybackAudioChange",this.bB);this.listen("keydown",this.R3);this.listen("click",this.open)}bB(){this.B.bB()}open(){this.UC.KJ()>0&&g.Rk(this.OQ,this.UC)}aq(){this.UC.KJ()>0&&this.B.getPresentingPlayerType()!==2&&this.B.getPresentingPlayerType()!==3? this.element.removeAttribute("aria-disabled"):this.element.setAttribute("aria-disabled","true")}R3(R){R.defaultPrevented||(this.open(),R.preventDefault())}CL(R){this.UC.CL(R)}EK(R){this.UC.EK(R)}Dg(R){this.setContent(R)}};var PsV=class extends Ap{constructor(R,w){super("Autoplay",g.LI.Td);this.B=R;this.OQ=w;this.C=!1;this.O=[];this.W(R,"presentingplayerstatechange",this.aq);this.subscribe("select",this.onSelect,this);R.createClientVe(this.element,this,113682);this.aq()}aq(){var R=this.B.getPresentingPlayerType();if(R!==2&&R!==3&&g.ar(this.B))this.C||(this.OQ.CL(this),this.C=!0,this.O.push(this.W(this.B,"videodatachange",this.aq)),this.O.push(this.W(this.B,"videoplayerreset",this.aq)),this.O.push(this.W(this.B,"onPlaylistUpdate", this.aq)),this.O.push(this.W(this.B,"autonavchange",this.G)),R=this.B.getVideoData(),this.G(R.autonavState),this.B.logVisibility(this.element,this.C));else if(this.C){this.OQ.EK(this);this.C=!1;for(const w of this.O)this.o9(w)}}G(R){this.L(R!==1)}onSelect(R){this.B.CE(R?2:1);this.C&&(this.B.logVisibility(this.element,this.C),this.B.logClick(this.element))}Gy(){this.C&&this.OQ.EK(this);super.Gy()}};var afR=class extends g.wv{constructor(R,w){super(g.Ys({"aria-haspopup":"false"}),0,"More options");this.B=R;this.OQ=w;this.W(this.element,"click",this.onClick);this.OQ.CL(this)}onClick(R){R.preventDefault();g.qS(this.B)?.Ue()?.Qh();g.qS(this.B)?.jP()?.R9(R.target)}};var $NU=class extends g.d_{constructor(R,w){let p;g.t5(R.V())&&(p={j:"div",Z:"ytp-panel-footer-content",N:[{j:"span",fB:"Adjust download quality from your "},{j:"a",Z:"ytp-panel-footer-content-link",fB:"Settings",A:{href:"/account_downloads"}}]});super("Quality",g.LI.ws,R,w,void 0,void 0,p);this.B=R;this.YY={};this.O0={};this.J={};this.nB=new Set;this.K=this.S=!1;this.xY="unknown";this.I0="";this.jI=new g.Xp;g.K(this,this.jI);this.S=this.B.Y("web_player_use_new_api_for_quality_pullback");this.K=this.B.Y("web_player_enable_premium_hbr_playback_cap"); R.Y("web_settings_menu_icons")&&(w=R.Y("delhi_modern_web_player_icons")?{j:"svg",A:{fill:"none",height:"24",viewBox:"0 0 24 24",width:"24"},N:[{j:"path",A:{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",A:{height:"24",viewBox:"0 0 24 24",width:"24"},N:[{j:"path",A:{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(w));g.pc(this.UC.element,"ytp-quality-menu");this.W(R,"videodatachange",this.aq);this.W(R,"videoplayerreset",this.aq);this.W(R,"onPlaybackQualityChange",this.PS);this.aq();R.createClientVe(this.element,this,137721)}aq(){var R= this.B.getPresentingPlayerType();if(R!==2&&R!==3){this.YY=this.B.LX();R=this.B.getAvailableQualityLevels();if(this.K){this.J={};var w=g.W7(this.B,"getAvailableQualityData",[]);for(var p of w)this.J[p.qualityLabel]=p;w=Object.keys(this.J);R[R.length-1]==="auto"&&w.push("auto");this.nB=new Set(R)}else if(this.S){p=g.W7(this.B,"getAvailableQualityData",[]);var r=[];for(w of p)this.O0[w.quality]=w,w.quality&&r.push(w.quality);R[R.length-1]==="auto"&&r.push("auto");w=r}else w=R;g.UFW(this.B)&&this.B.bq()&& w.unshift("missing-qualities");{r=this.B.app.HS();const f=r.getVideoData();!f.C||!f.C.video||f.C.video.qualityOrdinal<1080||f.O_?R=!1:(R=/^qsa/.test(f.clientPlaybackNonce),p="r",f.C.id.indexOf(";")>=0&&(R=/^[a-p]/.test(f.clientPlaybackNonce),p="x"),R?(r.Ty("iqss",{trigger:p},!0),R=!0):R=!1)}R&&w.unshift("inline-survey");this.G(w);R=this.B.getVideoData().cotn?!0:!1;p=this.jI.zg();hHd(this,YAL(this.B.V(),R,p));if(w.length){this.PS();this.enable(!0);return}}this.enable(!1)}PS(){if(this.K){var R=this.B.getPreferredQuality(); this.nB.has(R)&&(this.xY=this.B.getPlaybackQuality(),this.I0=this.B.getPlaybackQualityLabel(),R==="auto"?(this.C(R),this.setContent(this.O(R))):this.C(this.I0))}else R=this.B.getPreferredQuality(),this.options[R]&&(this.xY=this.B.getPlaybackQuality(),this.C(R),R==="auto"&&this.setContent(this.O(R)))}L(R){if(R!=="missing-qualities"){super.L(R);var w=this.K?this.J[R]:this.O0[R];var p=w?.quality,r=w?.formatId;w=w?.paygatedQualityDetails;var f=w?.endpoint;w&&this.B.logClick(this.options[R]?.element); if(this.K){if(g.F(f,ea_)?.popup?.notificationActionRenderer)g.m1(this.B,"innertubeCommand",f);else if(f){g.m1(this.B,"innertubeCommand",f);return}r?this.B.setPlaybackQuality(p,r):this.B.setPlaybackQuality(p)}else{if(this.S)if(g.F(f,ea_)?.popup?.notificationActionRenderer)g.m1(this.B,"innertubeCommand",f);else if(f){g.m1(this.B,"innertubeCommand",f);return}this.B.setPlaybackQuality(R)}this.OQ.Qh();this.aq()}}open(){for(const R of Object.values(this.options))this.B.hasVe(R?.element)&&this.B.logVisibility(R?.element, !0);super.open();this.B.logClick(this.element)}X(R,w,p){if(R==="missing-qualities")return new g.wv({j:"a",E0:["ytp-menuitem"],A:{href:"https://support.google.com/youtube/?p=missing_quality",target:this.B.V().X,tabindex:"0",role:"menuitemradio"},N:[{j:"div",E0:["ytp-menuitem-label"],fB:"{{label}}"}]},w,this.O(R));if(R!=="inline-survey"){var r=(this.K?this.J[R]:this.O0[R])?.paygatedQualityDetails,f=r?.veType;r=r?.trackingParams;w=super.X(R,w,p);r?(this.B.createServerVe(w.element,this,!0),this.B.setTrackingParams(w.element, r)):f&&this.B.createClientVe(w.element,this,f,!0);return w}f=[{j:"span",fB:"Looks good?"}];for(const G of[!0,!1])R=new g.k({j:"span",Z:"ytp-menuitem-inline-survey-response",N:[G?I9b():pMH()],A:{tabindex:"0",role:"button"}}),R.listen("click",()=>{const I=this.B.app.HS();I.Ty("iqsr",{tu:G});I.getVideoData().O_=!0;this.OQ.Qh();this.aq()}),f.push(R); return new g.wv({j:"div",Z:"ytp-menuitem",A:{"aria-disabled":"true"},N:[{j:"div",E0:["ytp-menuitem-label"],N:f}]},w)}O(R,w=!1){if(R==="missing-qualities")return{j:"div",fB:"Missing options?"};if(R==="inline-survey")return"";this.K||g.Ym(g.C3d,R);let p;p=this.S||this.K?[O6(this,R,w,!1)]:[rmP(this,R)];const r=this.B.getPreferredQuality();w||r!=="auto"||R!=="auto"||(p.push(" "),this.K?p.push(O6(this,this.I0,w,!0,["ytp-menu-label-secondary"])):this.S?p.push(O6(this,this.xY,w,!0,["ytp-menu-label-secondary"])): p.push(rmP(this,this.xY,["ytp-menu-label-secondary"])));return{j:"div",N:p}}};var H3=class extends yJb{constructor(R){super(R.getAvailablePlaybackRates()[0],R.getAvailablePlaybackRates()[R.getAvailablePlaybackRates().length-1],.05,R.getPlaybackRate(),{j:"div",Z:"ytp-speedslider-indicator-container",N:[{j:"div",Z:"ytp-speedslider-badge"},{j:"p",Z:"ytp-speedslider-text"}]});this.B=R;this.S=M1(this.O0,50,this);g.pc(this.C,"ytp-speedslider");this.X=this.KB("ytp-speedslider-text");this.xY=this.KB("ytp-speedslider-badge");this.B.Y("web_enable_varispeed_panel")&&g.pc(this.C,"ytp-varispeed-input-slider"); this.Ok();this.W(this.C,"change",this.I0)}K(){super.K();this.X&&this.Ok()}I0(){this.B.Y("enable_web_premium_varispeed")&&JM(this,Math.round(this.L/.05)*.05);this.S()}O0(){this.B.setPlaybackRate(this.L,!0)}Ok(){this.X.textContent=`${this.L.toFixed(2)}x`;const R=this.L>2&&this.B.Y("enable_web_premium_varispeed");this.xY.classList.toggle("ytp-speedslider-premium-badge",R);this.xY.setAttribute("aria-label",R?"Premium":"")}D(R){super.D(R);this.S();this.Ok();this.B.Y("web_enable_varispeed_panel")?(R.code=== "ArrowUp"||R.code==="ArrowDown")&&R.preventDefault():R.preventDefault()}};var XD6=class extends g.k{constructor(R,w,p){super({j:"div",Z:"ytp-slider-section",A:{role:"slider","aria-valuemin":"{{minvalue}}","aria-valuemax":"{{maxvalue}}","aria-valuenow":"{{valuenow}}","aria-valuetext":"{{valuetext}}",tabindex:"0"},N:[{j:"div",Z:"ytp-slider",N:[{j:"div",Z:"ytp-slider-handle"}]}]});this.U=.05;this.O=R;this.G=w;this.range=this.G-this.O;this.Jl=this.KB("ytp-slider-section");this.K=this.KB("ytp-slider");this.O0=this.KB("ytp-slider-handle");this.D=new g.Aq(this.K,!0);this.C=p? p:R;g.K(this,this.D);this.D.subscribe("dragmove",this.S,this);this.W(this.element,"keydown",this.xY);this.W(this.element,"wheel",this.X);this.init()}init(){this.L(this.C);this.updateValue("minvalue",this.O);this.updateValue("maxvalue",this.G)}xY(R){if(!R.defaultPrevented){switch(R.keyCode){case 37:case 40:var w=-this.U;break;case 39:case 38:w=this.U;break;default:return}this.L(this.C+w);R.preventDefault()}}X(R){let w=this.C;w+=(R.deltaX||-R.deltaY)<0?-.05:.05;this.L(w);R.preventDefault()}S(R){R=(R- g.Hc(this.K).x)/150*this.range+this.O;this.L(R)}L(R,w=""){R=g.MN(R,this.O,this.G);w===""&&(w=R.toString());this.updateValue("valuenow",R);this.updateValue("valuetext",w);this.O0.style.left=`${(R-this.O)/this.range*130}px`;this.C=R}focus(){this.Jl.focus()}};var n2i=class extends XD6{constructor(R){super(R.getAvailablePlaybackRates()[0],R.getAvailablePlaybackRates()[R.getAvailablePlaybackRates().length-1],R.getPlaybackRate());this.B=R;this.J=g.sW("P");this.M0=M1(this.I0,50,this);g.pc(this.K,"ytp-speedslider");g.pc(this.J,"ytp-speedslider-text");R=this.J;var w=this.K;w.parentNode&&w.parentNode.insertBefore(R,w.nextSibling);this.Ok();this.W(this.B,"onPlaybackRateChange",this.updateValues)}I0(){this.B.setPlaybackRate(this.C,!0)}Ok(){this.J.textContent=`${Ky(this, this.C)}x`}L(R){super.L(R,Ky(this,R).toString());this.J&&(this.Ok(),this.M0())}updateValues(){const R=this.B.getPlaybackRate();Ky(this,this.C)!==R&&(this.L(R),this.Ok())}};var dNb=class extends g.RX{constructor(R){super({j:"div",Z:"ytp-speedslider-component"});R.Y("web_settings_use_input_slider")?this.L=new H3(R):this.L=new n2i(R);g.K(this,this.L);this.element.appendChild(this.L.element)}focus(){this.L.focus()}};var Z0i=class extends $a{constructor(R){const w=new dNb(R);super(R,w,"Custom");g.K(this,w)}};var Ypi=class extends g.d_{constructor(R,w){const p=new Z0i(R);super("Playback speed",g.LI.Uo,R,w,DV(R)?void 0:"Custom",DV(R)?void 0:()=>{g.Rk(w,p)}); this.I0=new g.k({j:"div",Z:"ytp-menuitem-premium-badge",A:{"aria-label":"Premium"}});this.xY=!1;this.Xf={wwq:()=>this.S}; g.K(this,p);this.QQ=new H3(R);g.K(this,this.QQ);if(R.Y("web_settings_menu_icons")){const r=R.Y("delhi_modern_web_player_icons")?zwP():{j:"svg",A:{height:"24",viewBox:"0 0 24 24",width:"24"},N:[{j:"path",A:{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(r)}this.B=R;this.xY=!1;this.jI=null;DV(R)?(this.K=g.K2("Custom ($CURRENT_CUSTOM_SPEED)",{CURRENT_CUSTOM_SPEED:this.B.getPlaybackRate().toString()}),this.O0=this.B.getPlaybackRate()):this.O0=this.K=null;g.K(this,this.I0);this.PS=this.B.getVideoData()?.getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.showPlaybackRateUpsellPanelCommand;uAd(R,this.PS)?(this.J=E6(4),this.B.createClientVe(this.I0.element,this,273508)):this.J=null;this.B.Y("enable_web_premium_varispeed_upsell")&& this.B.createClientVe(this.element,this,278479);this.S=this.B.getAvailablePlaybackRates();this.W(R,"presentingplayerstatechange",this.WS);this.B.getVideoData()?.L$()&&this.W(R,Dc(R.V().Tk())?"playbackChange":"serverstitchedvideochange",this.WS);this.W(R,"videodatachange",this.onVideoDataChange);this.W(this.QQ.C,"change",()=>{this.xY=!0;this.WS()}); this.WS()}onVideoDataChange(R){R==="dataloaded"&&(R=this.B.getAvailablePlaybackRates(),g.Oi(this.S,R)||(this.S=R,this.QQ.dispose(),this.QQ=new H3(this.B)),this.WS())}O(R){return R==="1"?"Normal":R.toLocaleString()}WS(){var R=this.B.getVideoData()?.L$();R=this.B.getPresentingPlayerType(R);this.enable(R!==2&&R!==3);IqD(this)}G(R){super.G(R);this.QQ&&this.QQ.C.focus()}D(R){super.D(R);R?(this.jI=this.W(this.B,"onPlaybackRateChange",this.onPlaybackRateChange),IqD(this),fqI(this,this.B.getPlaybackRate()), this.B.Y("enable_web_premium_varispeed_upsell")&&(this.B.logVisibility(this.element,!0),this.J&&this.B.logVisibility(this.I0.element,!0))):(this.o9(this.jI),this.jI=null)}onPlaybackRateChange(R){const w=this.B.getPlaybackRate();!this.xY&&this.S.includes(w)||Gxd(this,w);fqI(this,R)}X(R,w,p){return R===this.K&&eL(this.B)?super.X(R,w,p,{j:"div",Z:"ytp-speed-slider-menu-footer",N:[this.QQ]}):R===this.J&&uAd(this.B,this.PS)?CNH(this,R,w,p):super.X(R,w,p)}L(R){super.L(R);R===this.J?(this.B.logClick(this.I0.element), g.m1(this.B,"innertubeCommand",this.PS)):R===this.K?this.B.setPlaybackRate(this.O0,!0):this.B.setPlaybackRate(Number(R),!0);(!eL(this.B)||R!==this.K&&R!==this.J)&&this.OQ.ID()}Jl(R){const w=R===this.K;this.xY=!1;w&&DV(this.B)&&!eL(this.B)?(R=new Z0i(this.B),g.Rk(this.OQ,R)):(this.B.logClick(this.element),super.Jl(R))}};var F3p=class extends g.d_{constructor(R,w,p,r){const f=new g.X2(w,void 0,"Video Override");super(r.text||"",R,w,p,"Video Override",()=>{g.Rk(p,f)}); g.pc(this.element,"ytp-subtitles-options-menu-item");this.setting=r.option.toString();R=r.options;this.settings=g.Ei(R,this.xY,this);this.S=f;g.K(this,this.S);w=new g.wv({j:"div",Z:"ytp-menuitemtitle",fB:"Allow for a different caption style if specified by the video."},0);g.K(this,w);this.S.CL(w,!0);this.J=new g.wv({j:"div",Z:"ytp-menuitem",A:{role:"menuitemradio",tabindex:"0"},N:[{j:"div",Z:"ytp-menuitem-label",fB:"On"}]},-1);g.K(this,this.J);this.S.CL(this.J,!0);this.W(this.J.element,"click",()=> {skI(this,!0)}); this.K=new g.wv({j:"div",Z:"ytp-menuitem",A:{role:"menuitemradio",tabindex:"0"},N:[{j:"div",Z:"ytp-menuitem-label",fB:"Off"}]},-2);g.K(this,this.K);this.S.CL(this.K,!0);this.W(this.K.element,"click",()=>{skI(this,!1)}); this.G(g.gd(R,this.xY))}C(R){super.C(R)}xY(R){return R.option.toString()}getOption(R){return this.settings[R]}O(R){return this.getOption(R).text||""}L(R){super.L(R);this.publish("settingChange",this.setting,this.settings[R].option)}};var jBt=class extends g.X2{constructor(R,w){super(R,void 0,"Options");this.tQ={};for(let p=0;p{this.ZJ("reset",!0)}); this.CL(R,!0)}P0(R){for(const w of Object.keys(R)){const p=this.tQ[w];if(p){const r=R[w].toString(),f=!!R[`${w}Override`];p.options[r]&&(p.C(r),p.J.element.setAttribute("aria-checked",String(!f)),p.K.element.setAttribute("aria-checked",String(f)))}}}ZJ(R,w){this.publish("settingChange",R,w)}};var JJS=class extends g.d_{constructor(R,w){super("Auto-translate",0,R,w);this.B=R;this.languages={};R.createClientVe(this.element,this,127301);R.logVisibility(this.element,!0)}K(R){return R.languageCode}O(R){return this.languages[R].languageName||""}L(R){this.publish("select",R);this.B.logClick(this.element);g.SX(this.OQ)}};var Tgt=class extends g.d_{constructor(R,w){const p=new jBt(R,w),r=["This setting only applies to the current video. Adjust caption visibility in "," for all videos."];let f;g.t5(R.V())&&!R.Y("web_watch_disable_account_level_captions_settings")&&(f={j:"div",Z:"ytp-panel-footer-content",N:[{j:"span",fB:r[0]},{j:"a",Z:"ytp-panel-footer-content-link",fB:"Settings",A:{href:"/account_playback"}},{j:"span",fB:r[1]}]});super("Subtitles/CC",g.LI.SUBTITLES,R,w,"Options",()=>{g.Rk(w,p)},f); this.countLabel=void 0;this.B=R;this.OQ=w;this.tracks={};this.O0=new g.vZ(()=>{zrW(this,!1)},3E3); g.K(this,this.O0);R.Y("deprecate_captions_track_count_display")||(this.countLabel=new g.k({j:"div",N:[{j:"span",fB:"Subtitles/CC"},{j:"span",Z:"ytp-menuitem-label-count",fB:"{{content}}"}]}),g.K(this,this.countLabel),g.FV(this,this.countLabel));R.Y("web_settings_menu_icons")&&this.setIcon(mm_(R.Y("delhi_modern_web_player_icons")));this.K=new JJS(R,w);g.K(this,this.K);this.K.subscribe("select",this.I0,this);this.xY=p;g.K(this,this.xY);this.xY.subscribe("settingChange",this.ZJ,this);w.subscribe("show", this.jI,this);this.W(R,"videodatachange",this.WS);this.W(R,"onApiChange",this.WS);this.W(R,"onCaptionsTrackListChanged",this.WS);this.W(R,"captionschanged",this.WS);R.createClientVe(this.element,this,127300);this.WS()}J(R){return g.Jt(R)?"__off__":R.displayName}O(R){return R==="__off__"?"Off":R==="__translate__"?"Auto-translate":R==="__contribute__"?"Add subtitles/CC":R==="__correction__"?"Suggest caption corrections":(R==="__off__"?{}:this.tracks[R]).displayName}L(R){R==="__translate__"?this.K.open(): R==="__contribute__"?(this.B.pauseVideo(),this.B.isFullscreen()&&this.B.toggleFullscreen(),R=g.pJ(this.B.V(),this.B.getVideoData()),g.b$(R)):R==="__correction__"?(this.B.pauseVideo(),this.B.isFullscreen()&&this.B.toggleFullscreen(),R=Ma(this),cy(this,R),super.L(this.J(R)),R=this.B.getVideoData().getPlayerResponse()?.captions?.playerCaptionsTracklistRenderer?.openTranscriptCommand,g.m1(this.B,"innertubeCommand",R),this.OQ.ID(),this.S&&this.B.logClick(this.S)):(R==="__correction__"?(this.B.pauseVideo(), this.B.isFullscreen()&&this.B.toggleFullscreen(),R=Ma(this),cy(this,R),super.L(this.J(R)),R=this.B.getVideoData().getPlayerResponse()?.captions?.playerCaptionsTracklistRenderer?.openTranscriptCommand,g.m1(this.B,"innertubeCommand",R)):(this.B.logClick(this.element),cy(this,R==="__off__"?{}:this.tracks[R]),super.L(R)),this.OQ.ID())}WS(){var R=this.B.getOptions();R=R&&R.indexOf("captions")!==-1;var w=this.B.getVideoData();const p=w&&w.jh;var r=!!this.B.getVideoData()?.cB();let f,G={};if(R||p){if(R){f= this.B.getOption("captions","track");G=this.B.getOption("captions","tracklist",{includeAsr:!0});var I=r?[]:this.B.getOption("captions","translationLanguages");this.tracks=g.Ei(G,this.J,this);r=g.gd(G,this.J);Ma(this)&&w.getPlayerResponse()?.captions?.playerCaptionsTracklistRenderer?.openTranscriptCommand&&r.push("__correction__");if(I.length&&!g.Jt(f)){if((w=f.translationLanguage)&&w.languageName){const C=w.languageName;w=I.findIndex(u=>u.languageName===C); xxD(I,w)}mZr(this.K,I);r.push("__translate__")}I=this.J(f)}else this.tracks={},r=[],I="__off__";r.unshift("__off__");this.tracks.__off__={};p&&r.unshift("__contribute__");this.tracks[I]||(this.tracks[I]=f,r.push(I));this.G(r);this.C(I);f&&f.translationLanguage?this.K.C(this.K.K(f.translationLanguage)):TKI(this.K);R&&this.xY.P0(this.B.getSubtitlesUserSettings());this.B.Y("deprecate_captions_track_count_display")||this.countLabel?.setContent(G&&G.length?` (${G.length})`:"");this.publish("size-change"); this.B.logVisibility(this.element,!0);this.enable(!0)}else this.enable(!1)}I0(R){var w=this.B.getOption("captions","track");w=g.ht(w);w.translationLanguage=this.K.languages[R];cy(this,w)}ZJ(R,w){if(R==="reset")this.B.resetSubtitlesUserSettings();else{const p={};p[R]=w;this.B.updateSubtitlesUserSettings(p)}zrW(this,!0);this.O0.start();this.xY.P0(this.B.getSubtitlesUserSettings())}jI(R){R||this.O0.bv()}Gy(){this.O0.bv();super.Gy()}open(){super.open();this.options.__correction__&&!this.S&&(this.S=this.options.__correction__.element, this.B.createClientVe(this.S,this,167341),this.B.logVisibility(this.S,!0))}};var i0p=class extends $a{constructor(R){const w=new H3(R),p=new g.k({j:"div",Z:"ytp-variable-speed-panel-chips"}),r=new g.k({j:"button",E0:["ytp-button","ytp-variable-speed-panel-button","ytp-variable-speed-panel-increment-button"],A:{"aria-label":"Decrease playback speed 0.05"},N:[{j:"span",fB:"-"}]});r.listen("click",()=>{this.B.setPlaybackRate(Number((this.B.getPlaybackRate()-.05).toFixed(2)));R.logClick(r.element)}); const f=new g.k({j:"button",E0:["ytp-button","ytp-variable-speed-panel-button","ytp-variable-speed-panel-increment-button"],A:{"aria-label":"Increase playback speed 0.05"},N:[{j:"span",fB:"+"}]});f.listen("click",()=>{this.B.setPlaybackRate(Number((this.B.getPlaybackRate()+.05).toFixed(2)));R.logClick(f.element)}); var G=new g.k({j:"div",Z:"ytp-variable-speed-panel-slider-container",N:[r,w,f]}),I=new g.k({j:"div",Z:"ytp-variable-speed-panel-premium-badge",A:{tabindex:"-1"},N:[{j:"div",Z:"ytp-variable-speed-panel-badge"}]}),C=new g.k({j:"span"});const u=new g.k({j:"div",Z:"ytp-variable-speed-panel-display",N:[I,C],A:{"aria-live":"polite"}}),m=new g.k({j:"div",Z:"ytp-speed-display-container",N:[u]}),z=new g.RX({j:"div",Z:"ytp-variable-speed-panel-content",A:{tabindex:"0"},N:[m,G,p]});super(R,z,"Playback speed"); w.listen("click",()=>{R.logClick(w.C)}); this.B.createClientVe(r.element,this,258237);this.B.logVisibility(r.element,!0);this.B.createClientVe(f.element,this,258236);this.B.logVisibility(f.element,!0);this.B.createClientVe(z.element,this,225845);this.B.logVisibility(z.element,!0);this.B.createClientVe(w.C,this,258235);this.B.logVisibility(w.C,!0);this.B.createClientVe(p.element,this,258234);this.B.logVisibility(p.element,!0);g.K(this,u);this.vA=C;g.K(this,this.vA);this.m9=I;g.K(this,this.m9);this.QQ=w;g.K(this,this.QQ);g.K(this,r);g.K(this, f);g.K(this,p);g.K(this,G);g.K(this,m);g.K(this,z);G=M1(this.ZN,50,this);I=R.getVideoData();const B=I?.getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.showPlaybackRateUpsellPanelCommand;if((I=I?.getPlayerResponse()?.playerConfig?.granularVariableSpeedConfig?.defaultPlaybackRateOptions)&&I.length>0)for(const W of I){const x=B&&W.isPremiumUpsell,q=new g.k({j:"button",E0:["ytp-button","ytp-variable-speed-panel-preset-button","ytp-variable-speed-panel-button"],N:x?[{j:"div",Z:"ytp-variable-speed-panel-premium-upsell-icon"}, {j:"span",fB:`${W.label}`}]:[{j:"span",fB:`${W.label}`}]});x&&(this.B.createClientVe(q.element,this,273508),this.B.logVisibility(q.element,!0));g.K(this,q);p.element.appendChild(q.element);q.listen("click",()=>{x?(g.m1(this.B,"innertubeCommand",B),R.logClick(q.element)):W.value&&this.B.setPlaybackRate(W.value/100);R.logClick(p.element)}); I=new g.k({j:"div",Z:"ytp-variable-speed-panel-preset-button-wrapper",A:{"data-priority":`${W.priority??0}`},N:[q]});g.K(this,I);W.value===100&&(C=new g.k({j:"div",Z:"ytp-variable-speed-panel-preset-button-label-text",fB:"Normal"}),g.K(this,C),I.element.appendChild(C.element));p.element.appendChild(I.element)}this.W(this.QQ.C,"input",()=>{this.Ok(this.QQ.L)}); this.W(R,"onPlaybackRateChange",this.onPlaybackRateChange);this.W(R,"resize",G);this.onPlaybackRateChange(R.getPlaybackRate());this.ZN()}onPlaybackRateChange(R){JM(this.QQ,R,!0);this.Ok(R)}Ok(R){R=Math.round(R*20)/20;this.vA.element.textContent=`${R.toFixed(2)}x`;this.m9.element.classList.toggle("ytp-variable-speed-panel-premium-badge-visible",R>2)}ZN(){const R=this.B.getPlayerSize().width;var w=this.element.getElementsByClassName("ytp-variable-speed-panel-preset-button-wrapper");for(const p of w){w= p;const r=Number(w.dataset.priority??0);let f=!0;R<680?f=r>1:R<1900&&(f=r>0);g.wO(w,f);w.setAttribute("aria-hidden",f?"false":"true")}}};var QBa=class extends g.d_{constructor(R,w){super("Playback speed",g.LI.Uo,R,w);this.B=R;R.Y("web_settings_menu_icons")&&this.setIcon(zwP());this.J(R.getPlaybackRate());this.W(R,"onPlaybackRateChange",this.J);this.W(R,"presentingplayerstatechange",this.K);this.B.getVideoData()?.L$()&&this.W(R,Dc(R.V().Tk())?"playbackChange":"serverstitchedvideochange",this.K);this.K()}K(){var R=this.B.getVideoData()?.L$();R=this.B.getPresentingPlayerType(R);this.enable(R!==2&&R!==3)}J(R){this.setContent(R===1?"Normal": R.toString())}open(){g.Rk(this.OQ,new i0p(this.B))}};var h1a=class extends g.nI{constructor(R){super(R,"ytp-settings-menu");this.bI=new g.X2(this.B);this.xE=this.FR=this.settingsButton=null;this.isInitialized=this.MQ=!1;g.K(this,this.bI);this.hide();g.Rk(this,this.bI);R.createClientVe(this.element,this,108341,!0);this.subscribe("show",w=>{this.gb(w)}); this.W(R,"highlightSettingsMenu",()=>{this.MQ=!0;this.R9()}); this.W(R,"openSettingsMenuItem",w=>{w&&(this.MQ=!0,this.R9(),w==="menu_item_video_quality_advanced"&&this.FR?.open())}); R.Y("html5_enable_voice_boost")&&(this.W(R,"onPlaybackAudioChange",this.bB),this.W(R,"videodatachange",this.bB));this.B.V()?.getWebPlayerContextConfig()?.enableFullscreenComponentsFeature&&this.W(this.element,"wheel",w=>{w.stopPropagation()})}initialize(){if(!this.isInitialized){var R=this.B.V(); this.isInitialized=!0;try{this.FR=new $NU(this.B,this)}catch(p){g.AO(Error("QualityMenuItem creation failed"))}g.K(this,this.FR);var w=new Tgt(this.B,this);g.K(this,w);R.enableSpeedOptions&&(R.Y("web_enable_varispeed_panel")?(w=new QBa(this.B,this),g.K(this,w)):(w=new Ypi(this.B,this),g.K(this,w)));(g.zI(R)||R.J)&&(R.C||R.PS)&&(w=new afR(this.B,this),g.K(this,w));R.Ml&&!R.Y("web_player_move_autonav_toggle")&&(w=new PsV(this.B,this),g.K(this,w));R.Y("html5_enable_new_audio_settings_menu")?(this.xE= new cJk(this.B,this),g.K(this,this.xE)):(R=new Mwb(this.B,this),g.K(this,R));this.B.publish("settingsMenuInitialized");tq(this.settingsButton,this.bI.KJ())}}CL(R){this.initialize();this.bI.CL(R);tq(this.settingsButton,this.bI.KJ())}EK(R){this.cS()||(this.K_&&this.bI.KJ()<=1&&this.hide(),this.bI.EK(R),tq(this.settingsButton,this.bI.KJ()))}R9(R){this.initialize();this.bI.KJ()>0&&super.R9(R)}Qh(){this.MQ?this.MQ=!1:super.Qh()}show(){super.show();g.pc(this.B.getRootNode(),"ytp-settings-shown")}hide(){super.hide(); g.fc(this.B.getRootNode(),"ytp-settings-shown")}gb(R){this.B.logVisibility(this.element,R);this.B.publish("settingsMenuVisibilityChanged",R)}bB(){this.B.bB()}};var g2U=class extends g.k{constructor(R,w){super({j:"button",E0:["ytp-subtitles-button","ytp-button"],A:{"aria-keyshortcuts":"c","aria-pressed":"{{pressed}}","data-priority":"5","data-tooltip-title":"{{tooltip-title}}",title:R.Y("player_tooltip_data_title_killswitch")?"{{title}}":"","data-title-no-tooltip":"{{data-title-no-tooltip}}"},N:[R.Y("delhi_modern_web_player_icons")?{j:"div",Z:"ytp-subtitles-button-icon",fB:"{{icon}}"}:snl(R)]});this.B=R;this.tooltip=w.dg();R.Y("delhi_modern_web_player_icons")&& this.updateValue("icon",Wgb(this));this.W(R,"videodatachange",this.WS);this.W(R,"appresize",this.WS);this.W(R,"promotooltipacceptbuttonclicked",this.L);this.W(R,"onApiChange",this.WS);this.W(R,"onCaptionsTrackListChanged",this.WS);this.W(R,"captionschanged",this.WS);this.B.createClientVe(this.element,this,127299);this.WS();this.listen("click",this.onClick);this.addOnDisposeCallback(g.V9(w.dg(),this.element))}onClick(){if(Py(this)&&(this.B.toggleSubtitles(!0),this.B.logClick(this.element),!this.isEnabled())){let R= !1;const w=g.SN().vS(65);g.t5(this.B.V())&&w!=null&&(R=!w);R&&this.B.V().Y("web_player_nitrate_promo_tooltip")&&this.B.publish("showpromotooltip",this.element)}}L(R){g.qS(this.B)?.Ue()?.R9(R)}isEnabled(){const R=this.B.getOption("captions","track");return!(!R||!R.displayName)}WS(){const R=Py(this);let w=300;this.B.V().D&&(w=480);this.B.Y("delhi_modern_web_player_icons")&&this.updateValue("icon",Wgb(this));var p=this.B.V();(p.Y("html5_hide_unavailable_subtitles_button")?0:!p.J)?(R?(this.KB("ytp-subtitles-button-icon")?.setAttribute("fill-opacity", "1"),this.B.V().Y("player_tooltip_data_title_killswitch")?this.updateValue("title",g.ta(this.B,"Subtitles/closed captions","c")):this.update({"tooltip-title":g.ta(this.B,"Subtitles/closed captions","c")}),this.update({"data-title-no-tooltip":"Subtitles/closed captions"})):(this.B.Y("delhi_modern_web_player_icons")?this.KB("ytp-subtitles-button-icon")?.getElementsByTagName("svg")[0].setAttribute("fill-opacity","0.3"):this.KB("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"})),p=this.B.Y("player_disable_caption_button_if_captions_not_available")&&this.B.Y("delhi_modern_web_player")?R:!0):(this.updateValue("title",g.ta(this.B,"Subtitles/closed captions","c")),this.update({"tooltip-title":g.ta(this.B,"Subtitles/closed captions","c")}),this.update({"data-title-no-tooltip":"Subtitles/closed captions"}), p=R);this.tooltip.wl();p=p&&this.B.L_().getPlayerSize().width>=w;this.Rg(p);this.B.logVisibility(this.element,p);R?this.updateValue("pressed",this.isEnabled()):this.updateValue("pressed",!1)}GK(R){super.GK(R)}};g.H0t=class extends g.k{constructor(R,w,p=350){super({j:"div",E0:["ytp-time-display","notranslate"],N:[{j:"div",Z:"ytp-time-wrapper",N:[{j:"div",Z:"ytp-time-contents",A:R.Y("delhi_modern_web_player")?{"aria-label":"{{timeDisplayAriaLabel}}",role:"button",tabindex:"0"}:{"aria-label":"{{timeDisplayAriaLabel}}"},N:[{j:"span",Z:"ytp-time-clip-icon",fB:"{{clipicon}}",A:{"aria-label":"Clip"}},{j:"span",Z:"ytp-time-current",fB:"{{currenttime}}"},{j:"span",Z:"ytp-time-separator",fB:" / "},{j:"span",Z:"ytp-time-duration", fB:"{{duration}}"}]}]},{j:"span",Z:"ytp-clip-watch-full-video-button-separator",fB:"\u2022"},{j:"span",Z:"ytp-clip-watch-full-video-button",fB:"{{watchfullvideo}}"}]});this.api=R;this.X=p;this.liveBadge=new g.k({j:"button",E0:["ytp-live-badge","ytp-button"],A:{disabled:"true"},fB:"{{content}}"});this.L=null;this.r0=this.C=!1;this.U=this.D=this.J=null;this.isPremiere=!1;this.K=this.G=null;this.O=!1;this.sQ=this.liveIndicatorText=null;this.O0=this.KB("ytp-clip-watch-full-video-button");this.liveBadge.setContent("Live"); g.K(this,this.liveBadge);this.api.Y("web_player_updated_entrypoint")||this.api.Y("delhi_modern_web_player")?this.liveBadge.gN(this.KB("ytp-time-wrapper")):this.liveBadge.gN(this.element);this.tooltip=w.dg();this.liveBadge.listen("click",this.onClick.bind(this));this.api.Y("delhi_modern_web_player")&&(w=this.KB("ytp-time-wrapper"),this.W(w,"click",this.S),w.classList.toggle("ytp-time-wrapper-delhi",this.canShowCountdown()));this.W(this.O0,"click",this.xY);this.W(this.api,Dc(this.api.V().Tk())?"playbackChange": "serverstitchedvideochange",()=>{xZD(this,this.api.getProgressState().isAtLiveHead)}); this.W(R,"presentingplayerstatechange",this.Q2);this.W(R,"appresize",this.Q2);this.W(R,"onLoopRangeChange",this.onLoopRangeChange);this.W(R,"videodatachange",this.onVideoDataChange);(w=R.getVideoData())&&this.updateVideoData(w);this.Q2();lqd(this,R.getLoopRange())}canShowCountdown(){return!Xl(this)&&!ac(this)}Q2(){var R=this.api.L_().getPlayerSize().width,w=this.X;this.api.V().D&&(w=400);w=R>=w&&(!ac(this)||!this.api.getPlayerStateObject().L(64));this.Rg(w);g.M(this.element,"ytp-time-display-allow-autohide", w&&R<400);R=this.api.getProgressState();if(w){var p=this.api.getPresentingPlayerType();w=this.api.getCurrentTime({playerType:p,Lo:!1});this.C&&p!==2&&(w-=R.airingStart);Xl(this)&&(w-=this.sQ.startTimeMs/1E3);this.canShowCountdown()&&this.O&&(w-=this.api.getDuration({playerType:p,Lo:!1}));var r=g.a$(w);this.G!==r&&(this.updateValue("currenttime",r),this.G=r);p=Xl(this)?(this.sQ.endTimeMs-this.sQ.startTimeMs)/1E3:this.api.getDuration({playerType:p,Lo:!1});r=g.a$(p);this.K!==r&&(this.updateValue("duration", r),this.K=r);w=g.K2("$PLAY_PROGRESS of $DURATION",{PLAY_PROGRESS:g.a$(w,!0),DURATION:g.a$(p,!0)});this.updateValue("timeDisplayAriaLabel",w)}xZD(this,R.isAtLiveHead);lqd(this,this.api.getLoopRange())}onLoopRangeChange(R){const w=this.sQ!==R;this.sQ=R;w&&(this.Q2(),$u(this))}xY(){this.api.setLoopRange(null)}S(){this.O=!this.O;this.Q2()}onVideoDataChange(R,w,p){this.updateVideoData((this.api.V().Y("enable_topsoil_wta_for_halftime")||this.api.V().Y("enable_topsoil_wta_for_halftime_live_infra"))&&p=== 2?this.api.getVideoData({playerType:1}):w);this.Q2();$u(this)}updateVideoData(R){this.r0=R.isLivePlayback&&!R.Fi;this.C=R.I0();this.isPremiere=R.isPremiere;this.liveIndicatorText=(R=R.getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.liveIndicatorText)?Fm(R):null;g.M(this.element,"ytp-live",ac(this));this.api.Y("delhi_modern_web_player")&&this.KB("ytp-time-wrapper").classList.toggle("ytp-time-wrapper-delhi",this.canShowCountdown())}onClick(R){R.target===this.liveBadge.element&&(this.api.seekTo(Infinity, void 0,void 0,void 0,33),this.api.playVideo())}Gy(){this.L&&this.L();super.Gy()}};var v2M=class extends g.k{constructor(R,w){super({j:"div",Z:"ytp-volume-panel",A:{title:R.Y("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"},N:[{j:"div",Z:"ytp-volume-slider",N:[{j:"div",Z:"ytp-volume-slider-handle"}]}]});this.api=R;this.J=w;this.YI=!1;this.xY=this.volume=0;this.K=null;this.C=this.L=this.isDragging=!1;this.J=w;this.O= R.r_();this.S=R.Y("web_player_use_screen_width_for_big_mode");this.U=this.KB("ytp-volume-slider");this.Jl=this.KB("ytp-volume-slider-handle");this.G=new g.Aq(this.U,!0);g.K(this,this.G);this.G.subscribe("dragstart",this.YY,this);this.G.subscribe("dragmove",this.I0,this);this.G.subscribe("dragend",this.PS,this);this.W(R,"onVolumeChange",this.onVolumeChange);this.W(R,"appresize",this.jI);this.W(R,"fullscreentoggled",this.Vg);this.W(R,"onShowControls",this.X);this.W(R,"onHideControls",this.X);this.W(this.element, "keydown",this.M0);this.W(this.element,"focus",()=>{dr(this,this.L,this.isDragging,!0,this.api.YI())}); this.W(this.element,"blur",()=>{dr(this,this.L,this.isDragging,!1,this.api.YI())}); LgI(this,R.L_().getPlayerSize());ny(this,R.getVolume(),R.isMuted());or(R,this.element,this)}Vg(){qSI(this)}jI(R){LgI(this,R);this.S&&qSI(this)}M0(R){if(!R.defaultPrevented){const w=R.keyCode;let p=null;w===37?p=this.volume-5:w===39?p=this.volume+5:w===36?p=0:w===35&&(p=100);p!==null&&(p=g.MN(p,0,100),p===0?this.api.mute():(this.api.isMuted()&&this.api.unMute(),this.api.setVolume(p)),R.preventDefault())}}O0(R){const w=R.deltaX||-R.deltaY;R.deltaMode?this.api.setVolume(this.volume+(w<0?-10:10)):this.api.setVolume(this.volume+ g.MN(w/10,-10,10));R.preventDefault();this.api.V()?.getWebPlayerContextConfig()?.enableFullscreenComponentsFeature&&R.stopPropagation()}YY(){dr(this,this.L,!0,this.C,this.api.YI());this.xY=this.volume;this.api.isMuted()&&this.api.unMute()}I0(R){var w=this.O?78:52,p=this.O?18:12;R-=g.Hc(this.U).x;p=g.MN((R-p/2)/(w-p),0,1);this.S&&(p=g.MN(R/w,0,1));w=p;w=this.api.Y("web_player_non_linear_volume_controls")?w<=.25?w/.25*.1:.1+(w-.25)/.75*.9:w;this.api.setVolume(w*100)}PS(){dr(this,this.L,!1,this.C,this.api.YI()); this.volume===0&&(this.api.mute(),this.api.setVolume(this.xY))}onVolumeChange(R){ny(this,R.volume,R.muted)}X(){dr(this,this.L,this.isDragging,this.C,this.api.YI())}D(R){g.M(this.element,"ytp-volume-control-hover",R);dr(this,R,this.isDragging,this.C,this.api.YI())}Gy(){super.Gy();g.fc(this.J,"ytp-volume-slider-active")}};var Ngi=class extends g.k{constructor(R,w){const p=R.V(),r=["ytp-youtube-button","ytp-button","yt-uix-sessionlink"];p.O&&r.push("no-link");const f={title:R.Y("player_tooltip_data_title_killswitch")?"{{title}}":"","data-tooltip-title":"{{tooltip-title}}",target:p.X,"data-priority":"6","data-sessionlink":"feature=player-button"};p.O||(f.href="{{url}}");super({j:"a",E0:r,A:f,fB:"{{logoSvg}}"});this.L=null;this.api=R;this.visible=!1;p.O||(this.L=this.listen("click",this.onClick));this.W(R,"videodatachange", this.onVideoDataChange);this.W(R,"videoplayerreset",this.onVideoDataChange);this.W(R,"onLoopRangeChange",this.onVideoDataChange);this.W(R,"appresize",this.LL);this.onVideoDataChange();p.O||this.addOnDisposeCallback(g.V9(w.dg(),this.element));this.LL()}onVideoDataChange(){var R=this.api.V();this.LL();this.visible=!!this.api.getVideoData().videoId&&!this.api.getVideoData({playerType:1}).h$;this.Rg(this.visible);this.api.logVisibility(this.element,this.visible&&this.pB);if(this.visible){var w=this.api.getVideoUrl(!0, !1,!1,!0);this.updateValue("url",w)}R.O&&(this.L&&(this.o9(this.L),this.L=null),this.element.removeAttribute("href"),this.element.removeAttribute("title"),this.element.removeAttribute("aria-label"),g.pc(this.element,"no-link"));w=this.api.V();R=this.api.getVideoData();let p="";w.O||(w=g.qU(w),w.indexOf("www.")===0&&(w=w.substring(4)),p=g.Ir(R)?"Watch on YouTube Music":w==="youtube.com"?"Watch on YouTube":g.K2("Watch on $WEBSITE",{WEBSITE:w}));this.api.Y("player_tooltip_data_title_killswitch")?this.updateValue("title", p):this.updateValue("tooltip-title",p)}onClick(R){this.api.Y("web_player_log_click_before_generating_ve_conversion_params")&&this.api.logClick(this.element);const w=this.api.V();let p=this.api.getVideoUrl(!g.$t(R),!1,!0,!0);if(g.zI(w)){const r={};g.zI(w)&&g.W7(this.api,"addEmbedsConversionTrackingParams",[r]);p=g.bu(p,r)}g.gH(p,this.api,R);this.api.Y("web_player_log_click_before_generating_ve_conversion_params")||this.api.logClick(this.element)}LL(){let R={j:"svg",A:{height:"100%",version:"1.1",viewBox:"0 0 67 36", width:"100%"},N:[{j:"path",FI:!0,Z:"ytp-svg-fill",A:{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 "}}]}, w=28666;const p=this.api.getVideoData();this.api.isEmbedsShortsMode()?R={j:"svg",A:{fill:"none",height:"100%",viewBox:"-10 -8 67 36",width:"100%"},N:[{j:"path",A:{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.Ir(p)&&(R={j:"svg",A:{fill:"none",height:"25",viewBox:"0 0 140 25",width:"140"},N:[{j:"path",A:{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",A:{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",A:{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",A:{d:"M59.64 20.91V6.16H62.68V4.11H53.99V6.16H57.03V20.91H59.64Z",fill:"white"}},{j:"path",A:{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",A:{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",A:{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",A:{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",A:{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",A:{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",A:{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",A:{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"}}]},w=216163);g.Ir(p)?g.pc(this.element,"ytp-youtube-music-button"):g.fc(this.element,"ytp-youtube-music-button");R.A={...R.A,"aria-hidden":"true"};this.updateValue("logoSvg",R);this.api.hasVe(this.element)&&this.api.destroyVe(this.element);this.api.createClientVe(this.element,this,w,!0)}GK(R){super.GK(R);this.api.logVisibility(this.element,this.visible&&R)}};var kjV=class extends g.th{constructor(R,w,p){super();this.B=R;this.O0=w;this.uI=p;this.eI=NaN;this.xY=this.nB=this.playButton=this.K=this.J=this.PS=this.Jl=this.S=this.pB=this.muteButton=this.U=this.U0=this.lK=this.N0=null;this.O=new h1a(this.B);this.progressBar=new g.E2P(this.B,this.O0);this.HH=new g.H0t(this.B,this.O0);this.Qk=new L3a(this.B,this.O0);this.X=new g.hf(this.p_,null,this);p=R.V();this.uI.subscribe("autohideupdate",this.R_,this);var r=!R.getPlayerStateObject().isCued(),f;(this.mq=!R.Y("delhi_modern_web_player")&& R.V().Y("html5_player_dynamic_bottom_gradient"))?this.U0=f=new z1R(R):f=new g.k({j:"div",Z:"ytp-gradient-bottom"});g.K(this,f);g.P7(R,f.element,9);this.M0=new g.HU(f,250,r,100);g.K(this,this.M0);this.L=new g.k({j:"div",Z:"ytp-chrome-bottom",N:[{j:"div",Z:"ytp-chrome-controls"}]});g.K(this,this.L);g.P7(R,this.L.element,9);R.Y("frosted_glass_controls_opacity_animation")&&this.L.element.classList.add("ytp-frosted-glass-opacity-animation");this.I0=new g.HU(this.L,250,r,100);g.K(this,this.I0);this.jI= this.L.element.children[0];g.K(this,this.O);g.P7(R,this.O.element,6);this.O.subscribe("show",G=>{this.B.LN(!G);R.xz(this.O,G)}); g.K(this,this.progressBar);ZV(this,this.progressBar,this.L.element,void 0,0);r=new lfm(R,w);g.K(this,r);g.P7(R,r.element,4);r=new g.Jw({j:"div",Z:"ytp-left-controls"});g.K(this,r);r.gN(this.jI);R.Y("delhi_modern_web_player")||(f=new g.g_(R,w,!1),g.K(this,f),ZV(this,f,r.element));R.Y("web_render_jump_buttons")&&(this.pB=new qpM(R,-10),g.K(this,this.pB),ZV(this,this.pB,r.element));p.jI||(this.playButton=new g.twV(R,w),g.K(this,this.playButton),ZV(this,this.playButton,r.element));R.Y("web_render_jump_buttons")&& (this.S=new qpM(R,10),g.K(this,this.S),ZV(this,this.S,r.element));R.Y("delhi_modern_web_player")&&(f=new g.g_(R,w,!1),g.K(this,f),ZV(this,f,r.element));f=new g.g_(R,w,!0);g.K(this,f);ZV(this,f,r.element);if(!R.Y("delhi_modern_web_player")||R.Y("delhi_modern_web_player_horizontal_volume_controls"))if(f=new g.k({j:"span",Z:"ytp-volume-area"}),g.K(this,f),ZV(this,f,r.element),!p.yh&&(this.muteButton=new hp(R,w),g.K(this,this.muteButton),this.muteButton.gN(f.element),p.M0&&!p.D)){const G=new v2M(R,this.L.element); this.nB=G;g.K(this,G);G.gN(f.element);f=new g.Aq(f.element);g.K(this,f);f.subscribe("hoverstart",()=>{this.nB?.D(!0)}); f=new g.Aq(r.element);g.K(this,f);f.subscribe("hoverend",()=>{this.nB?.D(!1)})}R.Y("delhi_modern_web_player_lhs_volume_controls")&&!R.Y("delhi_modern_web_player_horizontal_volume_controls")&&(r.element.classList.add("ytp-left-controls-with-volume"),this.muteButton=new hp(R,w),g.K(this,this.muteButton),this.muteButton.gN(r.element),this.muteButton.element.classList.add("ytp-standalone-mute-button")); g.K(this,this.HH);ZV(this,this.HH,r.element,"ytp-time-wrapper");this.Jl=new W3k(R,this.progressBar);g.K(this,this.Jl);ZV(this,this.Jl,r.element,"ytp-chapter-title");p.Y("web_key_moments_markers")&&(this.PS=new AJt(R,this.progressBar),g.K(this,this.PS),ZV(this,this.PS,r.element,"ytp-chapter-title"));R.Y("delhi_modern_web_player")?this.G=new g.Jw({j:"div",Z:"ytp-right-controls",N:[{j:"div",Z:Yu.RIGHT_CONTROLS_LEFT},{j:"div",Z:Yu.RIGHT_CONTROLS_RIGHT}]}):this.G=new g.Jw({j:"div",Z:"ytp-right-controls"}); g.K(this,this.G);ZV(this,this.G,this.jI);R.Y("delhi_modern_web_player")&&(this.U=new xNR(R),g.K(this,this.U),this.U.gN(this.G.KB(Yu.RIGHT_CONTROLS_LEFT)),R.Y("delhi_modern_web_player_lhs_volume_controls")||R.Y("delhi_modern_web_player_horizontal_volume_controls")||(this.muteButton=new hp(R,w),g.K(this,this.muteButton),this.muteButton.gN(this.G.KB(Yu.RIGHT_CONTROLS_LEFT))));this.SI=new g2U(R,w);g.K(this,this.SI);Fl(this,this.SI,"RIGHT_CONTROLS_LEFT");this.settingsButton=new e1M(R,this.O);g.K(this, this.settingsButton);Bvd(this.O,this.settingsButton);Fl(this,this.settingsButton,"RIGHT_CONTROLS_LEFT");r=R.getVideoData();if(p.jb||r.h$&&p.controlsType==="1")this.J=new Ngi(R,w),g.K(this,this.J),this.J.gN(this.G.element);p.showMiniplayerButton&&!R.Y("web_player_miniplayer_in_context_menu")&&(this.K=new b0a(R),g.K(this,this.K),Fl(this,this.K,"RIGHT_CONTROLS_RIGHT"));p.showMiniplayerButton&&this.W(R,"minimized",()=>{this.O.hide()}); p.zv&&(w=new DNS(R,this.O),g.K(this,w),Fl(this,w,"RIGHT_CONTROLS_RIGHT"));p.m1&&(w=new mNa(R),g.K(this,w),Fl(this,w,"RIGHT_CONTROLS_RIGHT"));g.K(this,this.Qk);Fl(this,this.Qk,"RIGHT_CONTROLS_RIGHT");g.K(this,this.X);this.W(R,"appresize",this.LL);this.W(R,"fullscreentoggled",this.LL);this.U?.subscribe("small-mode-expand-right-bottom-controls",()=>{Amd(this)}); this.U?.subscribe("small-mode-collapse-right-bottom-controls",()=>{Amd(this)}); this.W(R,"presentingplayerstatechange",this.YY);this.W(R,"videodatachange",this.onVideoDataChange);this.LL()}onProgress(){if(this.B.Y("web_player_max_seekable_on_ended")||!this.B.getPlayerStateObject().L(2))US(this.uI),this.progressBar.Q2(),this.HH.Q2()}R_(){this.YY();if(US(this.uI))this.progressBar.K();else this.onProgress()}p_(){this.onProgress();this.X.start()}YY(){var R;if(R=!this.B.V().C){R=this.progressBar;const p=2*g.oa()*R.D;var w=R.O;R=(w.L-w.C)*1E3/R.api.getPlaybackRate()/p<300}R=R&&this.B.getPlayerStateObject().isPlaying()&& !!window.requestAnimationFrame;w=!R;US(this.uI)&&(R=w=!1);w?this.xY||(this.xY=this.W(this.B,"progresssync",this.onProgress)):this.xY&&(this.o9(this.xY),this.xY=null);R?this.X.isActive()||this.X.start():this.X.stop()}Mr(){return this.playButton?(this.playButton.focus(),!0):!1}LL(){var R=this.B.r_();const w=this.B.L_().getPlayerSize();var p=this.B.L_().Z0;const r=jL(this),f=ymx(this);var G=Math.max(w.width-r*2,100);if(this.eI!==w.width||this.N0!==R||this.B.Y("web_player_rtr_ctrls")&&this.lK!==p)this.eI= w.width,this.N0=R,this.lK=p,this.L.element.style.width=`${f}px`,this.L.element.style.left=`${r}px`,g.RrY(this.progressBar,r,f,R),this.B.dg().T6=f;p=this.O;G=Math.min(570*(R?1.5:1),G);R=Math.min(413*(R?1.5:1),Math.round((w.height-Jq(this))*.82));p.maxWidth=G;p.maxHeight=R;p.q7();this.YY();this.mq&&QZW(this.U0,w.height)}onVideoDataChange(){const R=this.B.getVideoData();this.jI.style.background=R.h$?R.Kl:"";this.S&&Nid(this.S,R.showSeekingControls);this.pB&&Nid(this.pB,R.showSeekingControls)}zk(){return this.L.element}q0(){return this.progressBar}ag(R, w){const p=Number(R.element.getAttribute("data-priority"))||0;let r=0,f=this.G.element;w&&this.B.Y("delhi_modern_web_player")&&(f=this.G.KB(Yu[w]));for(const G of f.children){if(p<(Number(G.getAttribute("data-priority"))||0))break;r++}R.gN(f,r)}};var UNb=class extends aP{constructor(R){super(R,!1);this.suggestedActions={};this.L=null;this.G=!1;this.element.setAttribute("data-overlay-order","7");this.W(this.B,"videodatachange",this.onVideoDataChange);this.W(this.B,g.bp("suggested_action_button_visible"),w=>{V2H(this,w.id);this.enabled=!0;this.gb()}); this.W(this.B,g.yl("suggested_action_button_visible"),w=>{this.enabled=!1;this.gb();this.B.removeCueRange(w.id)}); this.W(R,"presentingplayerstatechange",this.onStateChange)}YY(R){R.target===this.dismissButton.element?this.L&&QOH(Q_(),this.L):(this.onClickCommand&&(this.D(!1),g.m1(this.B,"innertubeCommand",this.onClickCommand)),this.U())}U(){this.enabled=!1;this.I0.hide()}onVideoDataChange(R,w){R==="dataloaded"&&oed(this);R=[];if(w=g.F(w.getWatchNextResponse()?.playerOverlays?.playerOverlayRenderer?.suggestedActionsRenderer,Jll)?.suggestedActions)for(var p of w)(w=g.F(p,TYY))&&g.F(w.trigger,cU)&&R.push(w);if(R.length!== 0){p=[];for(const r of R){R=g.F(r.trigger,cU);if(!R)continue;w=(w=r.title)?g.Su(w):"View Chapters";const f=R.timeRangeStartMillis,G=R.timeRangeEndMillis;R=R.onlyTriggersOnPlayerPause;r.tapCommand&&(f!=null&&G!=null&&p.push(new g.Ja(f,G,{priority:9,namespace:"suggested_action_button_visible",id:w})),f!=null&&G!=null||R)&&(this.suggestedActions[w]=r,r.rendererContext&&!this.O&&(R=g.F(r.rendererContext,v4H))&&(R=R.loggingDirectives?.trackingParams)&&(this.B.setTrackingParams(this.badge.element,R),this.O= !0),r.dismissButtonClientVeSpec?.uiType&&!this.L&&(this.L=rw(r.dismissButtonClientVeSpec.uiType),HQ(Q_(),this.L)))}this.B.C3(p)}}X(){return this.enabled}gb(){this.enabled?this.p_.start():Hd(this);this.C()}onStateChange(R){for(const w of Object.keys(this.suggestedActions))if(g.F(this.suggestedActions[w].trigger,cU)?.onlyTriggersOnPlayerPause){R.state.isPaused()&&!this.G?(V2H(this,w),this.enabled=!0,this.gb(),this.G=!0):R.oldState.isPaused()&&(this.enabled=!1,this.gb());break}}Gy(){oed(this);super.Gy()}};var v3={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"},SpU=class extends g.k{constructor(R){super({j:"div",Z:v3.TITLE,N:[{j:"div",E0:[v3.TEXT,R.Y("enable_larger_title_line_height")?"ytp-title-text-larger-line-height":""],N:[{j:"a",E0:[v3.LINK,v3.SESSIONLINK],A:{target:R.V().X,href:"{{url}}","data-sessionlink":"feature=player-title",tabIndex:"{{channelTitleFocusable}}"}, fB:"{{title}}"},{j:"div",Z:v3.SUBTEXT,N:["{{subtextElement}}"]}]}]});this.api=R;this.L=null;this.link=this.KB(v3.LINK);R.createClientVe(this.element,this,23851);this.W(R,"videodatachange",this.WS);this.W(R,"videoplayerreset",this.WS);this.WS()}onClick(R){this.api.logClick(this.element);var w=this.api.V();let p=this.api.getVideoUrl(!g.$t(R),!1,!0);g.zI(w)&&(w={},g.W7(this.api,"addEmbedsConversionTrackingParams",[w]),p=g.bu(p,w));g.gH(p,this.api,R)}WS(){const R=this.api.getVideoData(),w=this.api.V(); this.updateValue("title",R.title);var p={j:"a",Z:v3.CHANNEL_NAME,A:{href:"{{channelLink}}",target:"_blank"},fB:"{{channelName}}"};this.api.V().O?p={j:"span",Z:v3.CHANNEL_NAME,fB:"{{channelName}}",A:{tabIndex:"{{channelSubtextFocusable}}"}}:R.XU&&(p={j:"span",Z:v3.SUBTEXT,fB:R.XU});this.updateValue("subtextElement",p);t2W(this);this.api.getPresentingPlayerType()===2&&(p=this.api.getVideoData(),p.videoId&&p.isListed&&p.author&&p.PS&&p.profilePicture?(this.updateValue("channelLink",p.PS),this.updateValue("channelName", p.author),this.updateValue("channelTitleFocusable","0")):t2W(this));p=w.externalFullscreen||!this.api.isFullscreen()&&w.gS;g.M(this.link,v3.FULLERSCREEN_LINK,p);w.S||!R.videoId||p||R.h$||w.O?this.L&&(this.updateValue("url",null),this.o9(this.L),this.L=null):(this.updateValue("url",this.api.getVideoUrl(!0)),this.L||(this.L=this.W(this.link,"click",this.onClick)));w.O&&(this.element.classList.add("ytp-no-link"),this.updateValue("channelName",g.zI(w)?R.expandedTitle:R.author),this.updateValue("channelTitleFocusable", "0"),this.updateValue("channelSubtextFocusable","0"))}};g.RWa=class extends g.k{constructor(R,w){const p={j:"div",Z:"ytp-tooltip-progress-bar-pill",N:[{j:"div",Z:"ytp-tooltip-progress-bar-pill-time-stamp",fB:"{{pillTimeStamp}}"},{j:"div",Z:"ytp-tooltip-progress-bar-pill-title",fB:"{{pillTitle}}"}]};super({j:"div",N:[{j:"div",Z:"ytp-tooltip-text-wrapper",A:{"aria-hidden":"{{ariaHidden}}"},N:[{j:"div",Z:"ytp-tooltip-edu",N:[{j:"svg",A:{height:"100%",viewBox:"0 0 36 36",width:"100%"},N:[{j:"path",A:{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",fB:"{{eduText}}"}]},{j:"div",Z:"ytp-tooltip-image"},{j:"div",Z:"ytp-tooltip-title",N:[{j:"span",fB:"{{title}}"},{j:"div",Z:"ytp-tooltip-keyboard-shortcut",fB:"{{keyBoardShortcutTitle}}"}]},{j:"div",Z:"ytp-tooltip-bottom-text",N:[{j:"span",Z:"ytp-tooltip-text",fB:"{{text}}"},{j:"div",Z:"ytp-tooltip-keyboard-shortcut",fB:"{{keyBoardShortcut}}"}]},R.Y("frosted_glass_controls_opacity_animation")?null:p]},{j:"div",Z:"ytp-tooltip-bg",N:[{j:"div",Z:"ytp-tooltip-duration",fB:"{{duration}}"}]},R.Y("frosted_glass_controls_opacity_animation")? p:null]});this.api=R;this.PS=w;this.X=r=>{(r=r.relatedTarget)&&g.lA(this.L,r)||this.K()}; this.J=r=>{this.type===3&&this.K();(r=r.currentTarget)&&r.nodeType===1&&!this.type&&(r.removeEventListener("mouseover",this.J),r.addEventListener("mouseout",this.X),r.removeEventListener("focus",this.J),r.addEventListener("blur",this.X),DZl(this,r,2))}; this.S=()=>{this.K()}; this.type=this.L=null;this.U=!1;this.C=null;this.O="";this.D=!0;this.scale=1;this.env=this.api.V();this.I0=this.env.C;this.wrapper=this.KB("ytp-tooltip-text-wrapper");this.bg=this.KB("ytp-tooltip-bg");this.M0=this.KB("ytp-tooltip-edu");this.image=this.KB("ytp-tooltip-image");this.text=this.KB("ytp-tooltip-text");this.bottomText=this.KB("ytp-tooltip-bottom-text");this.title=this.KB("ytp-tooltip-title");this.fade=new g.HU(this,100);this.G=NaN;this.T6=this.api.L_().getPlayerSize().width;this.xY=new g.vZ(this.jI, 250,this);this.O0=new g.vZ(this.K,5E3,this);g.K(this,this.fade);g.K(this,this.xY);g.K(this,this.O0);hq&&(R=this.KB("ytp-tooltip-text"),R.setAttribute("role","text"),R.setAttribute("aria-live","polite"));if(this.api.Y("frosted_glass_controls_opacity_animation"))for(const r of this.element.children)g.pc(r,"ytp-frosted-glass-fade-transition")}setEnabled(R){if(this.type!=null)if(R)switch(this.type){case 3:case 2:To(this);this.fade.show();break;default:this.fade.show()}else this.fade.hide();this.D=R}DO(R, w,p,r,f,G,I,C){if(!this.I0||this.env.D){this.type===3&&this.K();this.type!==1&&(g.R4(this.element,"ytp-tooltip ytp-bottom"),this.api.Y("frosted_glass_controls_opacity_animation")&&g.pc(this.element,"ytp-frosted-glass-fade-transition"),this.type=1,this.D&&this.fade.show(),this.C&&this.C.dispose(),(this.C=this.api.kG())&&this.C.subscribe("l",this.Jl,this));if(C){const u=g.RL(this.bg).height||141;this.M0.style.bottom=`${u+2}px`}else this.M0.style.display="none";this.env.Y("delhi_modern_web_player")? (this.update({pillTimeStamp:p,pillTitle:G??"",eduText:C??""}),g.pc(this.element,"ytp-tooltip-progress-bar-style")):(this.update({text:p,title:G??"",eduText:C??""}),g.M(this.bottomText,"ytp-tooltip-text-no-title",this.type===1&&!G));this.api.isInline()&&g.pc(this.bottomText,"ytp-modern-tooltip-text");g.M(this.element,"ytp-text-detail",!!r);p=-1;this.C&&(p=Gq(this.C,243*this.scale),this.env.Y("web_l3_storyboard")&&this.C.levels.length===4&&(p=this.C.levels.length-1),p=L7Y(this.C,p,w));EeY(this,p);if(I)switch(w= g.RL(this.element).width,I){case 1:this.title.style.right="0";this.title.style.textAlign="left";break;case 2:this.title.style.right=`${w}px`;this.title.style.textAlign="right";break;case 3:this.title.style.right=`${w/2}px`,this.title.style.textAlign="center"}KgH(this,!!r,R,f)}}bF(){this.type===1&&this.K()}IR(R,w){if(this.type)if(this.type===3)this.K();else return;DZl(this,R,3,w)}wl(){this.L&&!this.U&&(this.env.Y("player_tooltip_data_title_killswitch")?this.L.hasAttribute("title")&&(this.O=this.L.getAttribute("title")|| "",this.L.removeAttribute("title"),this.D&&To(this)):this.L.hasAttribute("data-tooltip-title")&&(this.O=this.L.getAttribute("data-tooltip-title")||"",this.L.removeAttribute("data-tooltip-title"),this.D&&To(this)))}Jl(R,w){R<=this.G&&this.G<=w&&(R=this.G,this.G=NaN,EeY(this,R))}jI(){lTD(this.C,this.G,243*this.scale)}K(){switch(this.type){case 2:const R=this.L;R.removeEventListener("mouseout",this.X);R.addEventListener("mouseover",this.J);R.removeEventListener("blur",this.X);R.addEventListener("focus", this.J);erL(this);break;case 3:erL(this);break;case 1:this.C&&(this.C.unsubscribe("l",this.Jl,this),this.C=null),this.api.removeEventListener("videoready",this.S),this.xY.stop()}this.type=null;this.D&&this.fade.hide()}h4(...R){if(this.L)for(R=0;R{this.Qo(r,G)}); this.y0.push(r);this.LZ=new R1k(this.api,r);g.K(this,this.LZ);!this.A6&&(this.eN&&this.api.Y("delhi_modern_web_player")?this.eN.Dm(this.LZ.element,2):this.LZ.gN(this.Fk.element));g.K(this,this.channelAvatar);this.channelAvatar.gN(this.Fk.element);g.K(this,this.title);this.title.gN(this.Fk.element);this.A6&&(p=new uxM(this.api),g.K(this,p),p.gN(this.Fk.element));g.K(this,this.jW);this.eN?(this.jW.element.setAttribute("data-overlay-order","2"),this.eN.Dm(this.jW.element,2)):this.jW.gN(this.Fk.element); const f=new IfP(this.api,this);g.K(this,f);g.P7(this.api,f.element,5);f.subscribe("show",G=>{this.Qo(f,G)}); this.y0.push(f);this.searchButton=new rJp(this.api);g.K(this,this.searchButton);this.searchButton.gN(this.jW.element);p=this.api.V().getWebPlayerContextConfig();this.ef=new wcM(this.api);g.K(this,this.ef);p?.hideTopWatchNextButton||this.ef.gN(this.jW.element);this.shareButton=new GjS(this.api,this,f);g.K(this,this.shareButton);p?.hideTopShareButton||this.shareButton.gN(this.jW.element);this.copyLinkButton=new Zjb(this.api,this);g.K(this,this.copyLinkButton);this.copyLinkButton.gN(this.jW.element); this.A6&&this.LZ.gN(this.jW.element);g.K(this,this.oh);this.oh.gN(this.jW.element);w.m5&&(p=new sBa(this.api),g.K(this,p),g.P7(this.api,p.element,4));w.O||(p=new apa(this.api,this.oh),g.K(this,p),p.gN(this.jW.element));this.B0=new k1t(this.api);g.K(this,this.B0);g.P7(this.api,this.B0.element,5);this.B0.subscribe("show",()=>{this.Qo(this.B0,this.B0.Pu())}); this.y0.push(this.B0);this.overflowButton=new N2b(this.api,this.B0);g.K(this,this.overflowButton);this.overflowButton.gN(this.jW.element);this.Fl&&g.K(this,this.Fl);w.controlsType==="3"&&(p=new pDU(this.api),g.K(this,p),g.P7(this.api,p.element,9));g.K(this,this.contextMenu);this.contextMenu.subscribe("show",this.QD,this);this.gf.listen("focus",this.s1,this);g.K(this,this.gf);this.sE.listen("focus",this.ge,this);g.K(this,this.sE);(this.PT=w.xu?null:new vki(this.api,R,this.contextMenu,this.uI,this.YN, this.Yq,()=>this.ZC(),this.Fl?.q0()))&&g.K(this,this.PT); this.A6||(this.AC=new FuV(this.api),g.K(this,this.AC),this.eN?this.eN.Dm(this.AC.element,3):g.P7(this.api,this.AC.element,4),this.hg=new CsM(this.api),g.K(this,this.hg),this.eN?this.eN.Dm(this.hg.element,3):g.P7(this.api,this.hg.element,4));this.FZ=new UNb(this.api);g.K(this,this.FZ);this.eN?this.eN.Dm(this.FZ.element,3):g.P7(this.api,this.FZ.element,4);if(this.A6){const G=new J$P(this.api,this.api.V().PS);g.K(this,G);g.P7(this.api,G.element,5);G.subscribe("show",I=>{this.Qo(G,I)}); R=new T2a(this.api,G);g.K(this,R);g.P7(this.api,R.element,4)}this.qZ.push(this.YN.element);this.W(this.api,"fullscreentoggled",this.Vg);this.W(this.api,"offlineslatestatechange",()=>{this.api.zz()&&S2(this.uI,128,!1)}); this.W(this.api,"cardstatechange",()=>{this.GV()}); this.W(this.api,"resize",this.Jm);this.W(this.api,"videoplayerreset",this.onReset);this.W(this.api,"showpromotooltip",this.yH);super.init()}dg(){return this.tooltip}o1(){return this.Fl}Qo(R,w){w?this.wz=R:this.wz=null;this.GV()}KH(R,w){if(w)this.g3.push(R);else for(w=this.g3.length;w>=0;w--)if(this.g3[w]===R){this.g3.splice(w,1);break}S2(this.uI,64,this.g3.length>0)}Fd(){this.api.KS()&&this.api.xK();return!!this.wz||$ZP(this)||super.Fd()}GV(){const R=!this.Fd(),w=R&&this.api.KS()&&!this.api.getPlayerStateObject().L(2)&& !this.api.getVideoData().h$&&!this.api.V().O&&!this.api.isEmbedsShortsMode(),p=this.A6&&g.Dw(this.api)&&this.api.getPlayerStateObject().L(128);R||p?(this.uu.show(),this.WZ.show()):(this.uu.hide(),this.WZ.hide(),this.api.h4(this.Fk.element));w?this.oh.R9():this.oh.Qh();this.Fl&&b8r(this.Fl,this.LT||!R);this.api.Y("web_player_hide_overflow_button_if_empty_menu")&&iW(this);super.GV()}CZ(R,w,p,r,f){R.style.left="";R.style.top="";R.style.bottom="";var G=g.RL(R),I=r||this.Fl&&g.lA(this.Fl.zk(),w),C=r=null; p!=null&&I||(r=g.RL(w),C=g.UW(w,this.api.getRootNode()),p==null&&(p=C.x+r.width/2));p-=G.width/2;I?(w=this.Fl,r=jL(w),C=ymx(w),I=this.api.L_().getPlayerSize().height,p=g.MN(p,r,r+C-G.width),G=I-Jq(w)-G.height):g.lA(this.Fk.element,w)?(w=this.api.L_().getPlayerSize().width,p=g.MN(p,12,w-G.width-12),G=this.r_()?this.JC:this.BV,this.api.V().playerStyle==="gvn"&&(G+=20),this.A6&&(G-=this.r_()?26:18)):(w=this.api.L_().getPlayerSize(),p=g.MN(p,12,w.width-G.width-12),G=C.y>(w.height-r.height)/2?C.y-G.height- 12:C.y+r.height+12);R.style.top=`${G+(f||0)}px`;R.style.left=`${p}px`}R_(R){R&&(this.api.h4(this.Fk.element),this.Fl&&this.api.h4(this.Fl.zk()));this.eO&&(g.M(this.contextMenu.element,"ytp-autohide",R),g.M(this.contextMenu.element,"ytp-autohide-active",!0));super.R_(R)}lN(){super.lN();this.eO&&(g.M(this.contextMenu.element,"ytp-autohide-active",!1),this.eO&&(this.contextMenu.hide(),this.B0&&this.B0.hide()))}gy(R,w){var p=this.api.L_().getPlayerSize();p=new g.X8(0,0,p.width,p.height);if(R||!US(this.uI)&& !this.Fd()){if(this.api.V().zL||w)R=this.r_()?this.JC:this.BV,p.top+=R,p.height-=R;this.Fl&&(p.height-=Jq(this.Fl))}return p}Vg(R){const w=this.api.getRootNode();R?w.parentElement?(w.setAttribute("aria-label","YouTube Video Player in Fullscreen"),this.api.V().externalFullscreen||(w.parentElement.insertBefore(this.gf.element,w),w.parentElement.insertBefore(this.sE.element,w.nextSibling))):g.LF(Error("Player not in DOM.")):(w.setAttribute("aria-label","YouTube Video Player"),this.gf.detach(),this.sE.detach()); this.LL();this.h6()}r_(){if(this.api.Y("web_player_use_screen_width_for_big_mode"))return this.api.L_().getPlayerSize().width>=(g.Iq(this.api.V().experiments,"web_player_big_mode_screen_width_cutoff")??2E3);const R=this.api.V();return this.api.isFullscreen()&&!R.D||!1}showControls(R){this.YD=!R;this.GV()}LL(){var R=this.r_();this.tooltip.scale=R?1.5:1;this.contextMenu&&g.M(this.contextMenu.element,"ytp-big-mode",R);this.GV();this.api.Y("web_player_hide_overflow_button_if_empty_menu")||iW(this);this.h6(); const w=this.api.isEmbedsShortsMode();w&&R?(R=(this.api.L_().getPlayerSize().width-this.api.getVideoContentRect().width)/2,g.Z2(this.Fk.element,"padding-left",`${R}px`),g.Z2(this.Fk.element,"padding-right",`${R}px`)):w&&(g.Z2(this.Fk.element,"padding-left",""),g.Z2(this.Fk.element,"padding-right",""));super.LL()}gt(){if($ZP(this)&&!g.Dw(this.api))return!1;var R=this.api.getVideoData();return!g.zI(this.api.V())||this.api.getPresentingPlayerType()===2||!this.o3||((R=this.o3||R.o3)?(R=R.embedPreview)? (R=R.thumbnailPreviewRenderer,R=R.videoDetails&&g.F(R.videoDetails,b2Y)||null):R=null:R=null,R&&R.collapsedRenderer&&R.expandedRenderer)?super.gt():!1}h6(){super.h6();this.api.logVisibility(this.title.element,!!this.zp);this.LZ&&this.LZ.GK(!!this.zp);this.channelAvatar.GK(!!this.zp);this.overflowButton&&this.overflowButton.GK(this.dl()&&!!this.zp);this.shareButton&&this.shareButton.GK(!this.dl()&&!!this.zp);this.ef&&this.ef.GK(!this.dl()&&!!this.zp);this.searchButton&&this.searchButton.GK(!this.dl()&& !!this.zp);this.copyLinkButton&&this.copyLinkButton.GK(!this.dl()&&!!this.zp);if(!this.zp){this.api.h4(this.Fk.element);for(let R=0;R5&&w.Ty("glrs",{cmt:p});w.seekTo(0,{seekSource:58});w.Ty("glrre",{cmt:p})}}Gy(){this.L=null;super.Gy()}};var Fgr=class{constructor(){this.L=this.D=this.O=this.C=this.X=this.J=this.pB=this.U=this.K=this.G=!1}};g.ku=class extends u$d{constructor(R,w,p,r=!1){super();this.mediaElement=R;this.start=w;this.end=p;this.L=r}isView(){return!0}f_(){const R=this.mediaElement.getCurrentTime();if(R{}); this.timeout=new g.vZ(()=>{this.NH("timeout")},1E4); g.K(this,this.timeout);this.I0=isFinite(r)||this.Wy.V().experiments.XB("html5_pseudogapless_shorts")&&Dr(w.getVideoData());this.status={status:0,error:null}}qJ(){return this.status.status===5}getStatus(){return this.status}O(){var R=this.L.getVideoData(),w=this.C.getVideoData(),p;if((p=R.O)&&!(p=!R.L)){p=R.L;var r=!1;let m=!1;for(var f of Object.values(p.L))f.info.audio&&f.index.isLoaded()&&(r=!0),f.info.video&&f.index.isLoaded()&&(m=!0);p.L["0"]&&(m=!0);p=r&&m}if(p)if(this.L.XI()){f=vy(this.policy, this.L,this.C,this.kH);var {kW:G,d2:I,U6:C,Mb:u}=this.U();this.xY||(p=this.C.Lh()*1E3,r=this.L.Lh(),r=(C-G-r)*1E3,f&&f.msg==="in-the-past"&&(r=0),R=R.isAd(),this.C.UV(p,r,R),this.xY=!0);f?(w=`cannot_apply${f.msg}`,delete f.msg,this.NH(w,f)):this.status.status===2?Qkr(this):(R=this.L.j_())&&R.J()&&(!NF(R)&&g.IN()?this.NH("mse_closed"):w.L&&w.L.K()&&R.C&&!R.C.JR()?this.NH("encr_upgrade"):(w=this.L.XI(),w.isEnded()?this.NH("elem_ended"):I<0?this.NH("next_player_future"):(this.X=C,this.currentVideoDuration= C-G,this.G=YVd(R,G,C,!0),this.K=YVd(R,I,u,!1),R=this.C.getVideoData().clientPlaybackNonce,this.L.Ty("gaplessPrep",{cpn:R}),this.L.sL(this.G,!1,this.J===1&&Qk(this.L.getVideoData()),this.Wy.V().Y("html5_shorts_gapless_keep_pending_requests")&&Dr(this.L.getVideoData())),this.L.setMediaElement(JmH(w,G,C,!this.L.getVideoData().isAd())),Na(this,2),Qkr(this))))}else this.NH("no-elem")}D(R){var {TO:w}=U6(this),p=R===w;w=p?this.G.L:this.G.C;p=p?this.K.L:this.K.C;if(w.isActive&&!p.isActive){var r=this.X,f= this.Wy.V().Y("html5_gapless_disable_on_discontinuous_buffer")&&this.J!==0&&w.f3().length>1;JC(R.f3(),r-.01)&&!f&&(Na(this,4),w.isActive=!1,w.XV=w.XV||w.isActive,(this.J===1?this.L:this.C).Ty("sbh",{}),p.isActive=!0,p.XV=p.XV||p.isActive,this.J!==0&&(this.L.getVideoData().Qi=!0));R=this.K.C;this.K.L.isActive&&R.isActive&&(Na(this,5),this.J!==0&&(R=this.C.Bi(),w=this.L.Bi(),this.L.Ty("sbs",{citag:w?.itag,nitag:R?.itag}),this.C.Ty("gitags",{pitag:w?.itag,citag:R?.itag}),this.C?.Rd()))}}O0(){this.eb()&& this.NH("player-reload-after-handoff")}NH(R,w={}){if(!this.cS()&&this.status.status!==6){var p=this.status.status>=4&&R!=="player-reload-after-handoff";this.status={status:Infinity,error:R};if(this.L&&this.C){const r=this.C.getVideoData().clientPlaybackNonce;this.L.K$(new g.pq("dai.transitionfailure",Object.assign(w,{cpn:r,transitionTimeMs:this.kH,msg:R})));this.L.xP(p)}this.Cg.reject(R);this.dispose()}}M0(){if(this.getStatus().status!==5)return"niss";if(vy(this.policy,this.L,this.C,this.kH)!=null)return"pge"; const {TO:R,yu:w}=U6(this),p=g.Iq(this.Wy.V().experiments,"html5_shorts_gapless_next_buffer_in_seconds");var r=this.X+p;this.Wy.V().experiments.XB("html5_pseudogapless_shorts")&&(r=this.U().d2+p);const f=JC(w.f3(),r);r=JC(R.f3(),r);return!(p>0)||f&&r?null:"neb"}pB(){return this.currentVideoDuration}eb(){return this.status.status>=4&&this.status.status<6}Gy(){i8_(this);this.L.unsubscribe("newelementrequired",this.O0,this);if(this.G){const R=this.G.C;this.G.L.f$.unsubscribe("updateend",this.D,this); R.f$.unsubscribe("updateend",this.D,this)}super.Gy()}U(){var R=this.L.XI();R=R.isView()?R.start:0;var w=this.L.getVideoData().isLivePlayback?Infinity:this.L.Ev(!0);w=Math.min(this.kH/1E3,w)+R;var p=this.I0?100:0;p=w-this.C.Lh()+p;return{kW:R,d2:p,U6:w,Mb:Infinity}}S(R){R.TE(128)&&this.NH("player-error-event")}};var GMR=class extends g.f5{constructor(R){super();this.app=R;this.D=this.C=this.L=null;this.pB=!1;this.X=this.J=this.O=this.G=null;this.K=jkW(this.app.V());this.U=()=>{g.TF(()=>{geW(this)})}}clearQueue(R=!1,w=!1){R5(this); this.G&&this.G.reject("Queue cleared");this.app.V().Y("html5_gapless_fallback_on_qoe_restart_v2")||w&&this.C&&this.C.xP(!1);SL(this,R)}Uu(){return!this.L}eb(){return this.O?.eb()||!1}qJ(){return this.O?.qJ()||!1}Gy(){R5(this);SL(this);super.Gy()}};var I2k=class extends g.HC{constructor(){super();this.fullscreen=0;this.G=this.O=this.pictureInPicture=this.L=this.C=this.inline=!1;this.K=()=>{this.gb()}; qmD(this.K);this.J=this.getVisibilityState(this.Ko(),this.isFullscreen(),this.isMinimized(),this.isInline(),this.W0(),this.Mu(),this.lx(),this.dY())}getVisibilityState(R,w,p,r,f,G,I,C){return R?4:f&&qf?7:bgx&&!(LD()||document.hasFocus&&document.hasFocus())||LD()?3:w?2:p?1:r?5:f&&!qf?7:G?8:I?9:C?10:0}Re(R){this.fullscreen!==R&&(this.fullscreen=R,this.gb())}setMinimized(R){this.C!==R&&(this.C=R,this.gb())}setInline(R){this.inline!==R&&(this.inline=R,this.gb())}VS(R){this.pictureInPicture!==R&&(this.pictureInPicture= R,this.gb())}setSqueezeback(R){this.O!==R&&(this.O=R,this.gb())}Pf(R){this.G!==R&&(this.G=R,this.gb())}Ko(){return this.L}Pi(){return this.fullscreen!==0}isFullscreen(){return this.fullscreen!==0&&this.fullscreen!==4}F1(){return this.fullscreen}isMinimized(){return this.C}isInline(){return this.inline}isBackground(){return LD()}W0(){return this.pictureInPicture}Mu(){return!1}lx(){return this.O}dY(){return this.G}gb(){this.publish("visibilitychange");const R=this.getVisibilityState(this.Ko(),this.isFullscreen(), this.isMinimized(),this.isInline(),this.W0(),this.Mu(),this.lx(),this.dY());R!==this.J&&this.publish("visibilitystatechange");this.J=R}Gy(){Aab(this.K);super.Gy()}};g.Nj=class extends g.f5{constructor(R){super();this.LB=R;this.videoData=this.playerState=null}Gy(){this.videoData=this.playerState=null;super.Gy()}addCueRange(){}zf(){}qf(){}kO(){return!1}yc(){return!1}vX(){}uh(){}zC(){return[]}bB(){}WJ(){}ww(){return 1}getAudioTrack(){return this.getVideoData().qH}d7(){return null}getAvailableAudioTracks(){return[]}LX(){return[]}Q7(){return[]}m6(){return this.LB.Y("web_player_misc_bugfix_b")?this.getVideoData().clientPlaybackNonce:""}D5(){return[]}RM(){}Lh(){return 0}getCurrentTime(){return 0}Vo(){}Bi(){}TK(){return{}}getDuration(){return 0}aD(){return 0}gg(){return 0}Bq(){return!1}t9(){return 0}BM(){return 0}Cw(){return null}Ja(){return 0}pX(){return!1}Ev(){return 0}XI(){return null}j_(){return null}xN(){return 0}dc(){return 0}async yG(){}getPlaybackQuality(){return"auto"}getPlaybackRate(){return 1}getPlayerState(){this.playerState|| (this.playerState=new g.Gf);return this.playerState}getPlayerType(){return 0}getPlaylistSequenceForTime(){return null}h3(){return()=>{}}hU(){return""}getPreferredQuality(){return"unknown"}R7(){}getProximaLatencyPreference(){return 0}Y1(){return $Q}getStartTime(){return NaN}kG(){return null}getStoryboardFormat(){return null}getStreamTimeOffset(){return 0}g9(){return 0}vB(){return 0}w7(){return{fC:[], BJ:[],currentTime:0,fH:"",droppedVideoFrames:0,isGapless:!1,qJ:!1,Uu:!0,ix:0,P2:0,Yw:0,D_:0,yr:0,uy:[],jA:[],Ut:null,HU:"0",Nb:null,fF:"",totalVideoFrames:0}}getUserAudio51Preference(){return 0}getUserPlaybackQualityPreference(){return""}getVideoData(){this.videoData||(this.videoData=new g.ct(this.LB),g.K(this,this.videoData));return this.videoData}u1(){return null}Ha(){return null}Mw(){}getVideoLoadedFraction(){return 0}AO(){}handleError(){}xP(){}Zy(){}PM(){return!1}hasSupportedAudio51Tracks(){return!1}isAd(){return!1}jf(){return!1}Ko(){return!1}isAtLiveHead(){return!1}rA(){return!0}isGapless(){return!1}qJ(){return!1}isHdr(){return!1}bf(){return!1}tK(){return!1}sX(){return!1}isProximaLatencyEligible(){return!1}Uu(){return!0}EX(){return!1}lq(){return!1}Bd(){}nw(){}Rd(){}EV(){}v$(){}VA(){}m3(){}fq(){}pauseVideo(){}prefetchKeyPlay(){}async playVideo(){}DM(){}Fz(){}Ty(){}SN(){}QS(){}UV(){}K$(){}AX(){}NQ(){}Zp(){}Tb(){}eF(){}Ra(){}removeCueRange(){}rK(){}P1(){return[]}qL(){}gY(){}G0(){}d3(){}r$(){}pE(){}yx(){}seekTo(){}sendAbandonmentPing(){}sendVideoStatsEngageEvent(){}Rz(){}setLoop(){}BZ(){}setMediaElement(){}sL(){}setPlaybackRate(){}A$(){}Hc(){}lr(){}setProximaLatencyPreference(){}l$(){}i$(){}mS(){}Yc(){}gJ(){}setUserAudio51Preference(){}CN(){}lB(){return!1}U5(){}oG(){return!1}R5(){}ZQ(){}oT(){}stopVideo(){}subscribe(){return NaN}Uq(){}togglePictureInPicture(){}bT(){return 0}UN(){}unsubscribe(){return!1}OF(){}yl(){return!1}TL(){}Nt(){}RA(){}}; g.t=g.Nj.prototype;g.t.QI=pd(47);g.t.lC=pd(37);g.t.NO=pd(30);g.t.g_=pd(24);g.t.hp=pd(18);g.t.sP=pd(12);var ka=class extends g.f5{constructor(R,w){super();this.data=[];this.O=R||NaN;this.C=w||null;this.L=new g.vZ(()=>{pN(this);r6(this)}); g.K(this,this.L)}get(R){pN(this);const w=this.data.find(p=>p.key===R); return w?w.value:null}set(R,w,p){this.remove(R,!0);pN(this);R={key:R,value:w,expire:Infinity};p&&isFinite(p)&&(p*=1E3,R.expire=(0,g.T)()+p);for(this.data.push(R);this.data.length>this.O;)(p=this.data.shift())&&w6(this,p,!0);r6(this)}remove(R,w=!1){const p=this.data.find(r=>r.key===R); p&&(w6(this,p,w),g.ua(this.data,r=>r.key===R),r6(this))}removeAll(R=!1){if(R)for(const w of this.data)w6(this,w,R); this.data=[];r6(this)}Gy(){super.Gy();this.data.forEach(R=>{w6(this,R,!0)}); this.data=[]}};g.Ux=class extends g.f5{constructor(R,w){super();this.api=R;this.O={};this.K={};this.d_=null;this.G={};this.L=null;this.U=new Map;this.D=null;w=new ka(w,p=>{p!==this.Ff({playerType:p.getPlayerType()})&&p.dispose()}); g.K(this,w);this.C=this.pB=this.X=new g.Nj(R.V());this.J=w}Gy(){for(const R of Object.values(this.O))R.dispose();wBH(this);this.X.dispose();super.Gy()}Ff(R){var w=R.cpn;const p=R.h0;R=R.playerType;if(w)a:if(Dc(this.api.V().Tk()))w=this.K[w]||null;else{for(const r of Object.values(this.O))if(r.m6()===w){w=r;break a}w=this.G[w]||null}else w=p&&this.d_?this.d_:R?R?R===1?this.pB:this.C.getVideoData().enableServerStitchedDai&&R===2?this.C.getVideoData().vp?this.O[2]||this.C:this.C:this.O[R]||null:this.C: this.C;return w}Gk(){return this.pB}jo(R){this.pB=R}HS(){return this.C}a5(R){const w=[R],p=[this.C];this.C=R;fN(this,w,p)}};g.Ux.prototype.QK=pd(45);g.Ux.prototype.wr=pd(43);var CAp=class{constructor(){this.values=new Float64Array(176);this.L=new Float64Array(11);this.C=new Float64Array(16)}wY(R,w){for(var p=0;p<10;p++){var r=this.L[p],f=r+(p===0?R:0),G=1*Math.pow(2,p);if(f<=G)break;r=Math.min(1,(f-G*.5)/r);for(f=0;f<16;f++)G=this.values[p*16+f]*r,this.values[(p+1)*16+f]+=G,this.L[p+1]+=G,this.values[p*16+f]-=G,this.L[p]-=G}r=p=0;f=8192;w>8192&&(p=Math.ceil(Math.log(w/8192)/Math.log(2)),r=8192*Math.pow(2,p-1),f=r*2);p+2>16?this.values[15]+=R:(w=(w-r)/(f-r),this.values[p]+= R*(1-w),this.values[p+1]+=R*w);this.L[0]+=R}QB(){const R=this.C;for(var w=0;w<16;w++)R[w]=this.values[w];w=this.L[0];for(var p=1;p<11;p++){var r=this.L[p];if(r===0)break;var f=Math.min(1,(17-w)/r);for(var G=0;G<16;G++)R[G]+=this.values[p*16+G]*f;w+=r*f;if(f<1)break}p=f=0;for(r=0;r<16;r++){G=f+R[r]/w;p+=Math.max(0,Math.min(G,.98)-Math.max(f,.02))*(r>0?8192*Math.pow(2,r-1):0);if(G>.98)break;f=G}return p/.96}};var SB=class{constructor(R,w,p=.5,r=0){this.resolution=w;this.C=0;this.K=!1;this.oM=!0;this.L=Math.round(R*this.resolution);this.values=Array(this.L);for(R=0;R=this.L&&(this.K=!0);for(;R--;)this.values[this.C]=w,this.C=(this.C+1)%this.L;this.oM=!0}percentile(R){if(!this.K&&this.C===0)return 0;this.oM&&(g.tt(this.J, (w,p)=>this.values[w]-this.values[p]),this.oM=!1); return this.values[this.J[Math.round(R*((this.K?this.L:this.C)-1))]]||0}QB(){return this.G?(this.percentile(this.O-this.G)+this.percentile(this.O)+this.percentile(this.O+this.G))/3:this.percentile(this.O)}};var u8p=class extends g.f5{constructor(R,w,p){super();this.policy=R;this.C=w;this.U0=p;this.xY=this.YY=0;this.S=-1;this.O0=this.K=0;this.pB=!1;this.interruptions=[];this.O=[{stamp:0,net:0,max:0}];this.jI=0;this.Jl=this.J=(0,g.T)();this.U=new SB(4,1,.6,.4);this.I0=new SB(4,1,.6,.4);this.D=new SB(20,1,.5,.4);R.pB?this.G=new CAp:R.O?this.G=new KI(17):this.G=new SB(17,20,.5,.4);this.M0=new SB(5,1,.25);this.X=new SB(30,1,.5);R=g.hj("yt-player-bandwidth")||{};w=this.policy.L;R.byterate>0?(w=R.byterate, this.pB=!0):(p=(navigator.connection?.downlink||0)*64*1024,p>0&&(w=p,this.pB=!0));this.G.wY(this.policy.K,w);R.delay>0&&this.U.wY(1,Math.min(R.delay,2));R.stall>0&&this.D.wY(1,R.stall);R.init>0&&(this.Jl=Math.min(R.init,this.Jl));R.interruptions&&(this.O=this.O.concat(R.interruptions),this.O.length>16&&this.O.pop());this.S=(0,g.T)();this.policy.J>0&&(this.PS=new g.vZ(this.nB,this.policy.J,this),g.K(this,this.PS),this.PS.start())}nB(){this.PS?.start();J7(this)&&this.policy.D&&this.U0()}};var EHW=class{constructor(R){this.experiments=R;this.L=13E4;this.K=.5;this.C=this.O=!1;this.pB=this.Y("html5_use_histogram_for_bandwidth");this.G=g.Iq(this.experiments,"html5_auxiliary_estimate_weight");this.X=g.Iq(this.experiments,"html5_stall_factor")||1;this.J=g.Iq(this.experiments,"html5_check_for_idle_network_interval_ms");this.D=this.experiments.XB("html5_trigger_loader_when_idle_network");this.U=this.experiments.XB("html5_sabr_fetch_on_idle_network_preloaded_players")}Y(R){return this.experiments.XB(R)}};var JMb=class extends g.li{constructor(R,w,p=0){super(w.u1());this.videoData=R;this.duration=p;this.L=this.startTimeSecs=0;this.C=this.O=!0}G(){}m6(){return this.videoData.clientPlaybackNonce}getVideoData(){return this.videoData}getCurrentTime(R){let w=super.getCurrentTime();this.L===0?R||(w-=this.startTimeSecs,super.getVideoData().Y("html5_ssdai_log_missed_ad_impressions")&&this.C&&this.O&&w>1&&this.Ty("sdai-admiss",{cpn:this.m6(),ct:w.toFixed(3),pfs:this.O}),this.C=!1):R&&(w=this.L);return w}getDuration(){return this.duration}getPlayerType(){return 2}getStartTime(){return this.startTimeSecs}vM(R){this.duration= R}};var U86,sma;U86=class{constructor(R){this.end=this.start=R}};g.R9=class{constructor(){this.L=new Map;this.O=new Map;this.C=new Map}SM(R,w){if(w===1)return this.L.get(R);if(w===2)return this.O.get(R);if(w===3)return this.C.get(R)}Sy(R,w,p,r){p={RB:r,Yo:p};w?this.O.set(R,p):this.L.set(R,p)}clearAll(){this.L.clear();this.O.clear();this.C.clear()}};g.R9.prototype.oR=pd(65);sma=class{constructor(R){this.LB=R;this.C=[];this.O=new Map;this.G=new Map;this.L=new Map;this.Xf={zi:()=>this.O, qyk:()=>this.G, rZ:()=>this.C}}clear(){this.C=[]; this.O.clear();this.G.clear();this.L.clear()}Ff(R){return this.O.get(R)}};g.wB=class extends g.f5{constructor(R,w,p,r){super();this.api=R;this.LB=w;this.playback=p;this.app=r;this.pB=new g.R9;this.C=new Map;this.Mr=new Map;this.xY=new Map;this.M0=null;this.f_=NaN;this.eI=this.p_=null;this.SI=new g.vZ(()=>{ZEL(this,this.f_,this.p_||void 0)}); this.events=new g.th(this);this.Qk=15E3;this.J=new g.vZ(()=>{this.D=!0;this.playback.AX(this.Qk);o5(this);this.playback.getVideoData().L$()&&this.l3({togab:this.K?.identifier});this.AO(!1)},this.Qk); this.D=!1;this.NB=new Map;this.nB=[];this.K=null;this.a9=new Set;this.U=[];this.jI=[];this.pL=[];this.WB=[];this.PS=new Set;this.O0=0;this.X=!1;this.Af=new Set;this.Df=new Set;this.Ml=new Set;this.N0=new Set;this.ez=this.dM=0;this.Xj=this.yh=!1;this.G_=this.O="";this.S=null;this.logger=new g.Q6("dai");this.GE="";this.YY=!0;this.Jl=new Map;this.ag=new Map;this.Xf={aHI:()=>this.C, zi:()=>this.L.Xf.zi(), mwN:()=>this.O, PUl:f=>{this.onCueRangeEnter(this.C.get(f))}, nNY:f=>{this.onCueRangeExit(this.C.get(f))}, zW$:(f,G)=>{this.C.set(f,G)}, Mt$:f=>{this.G_=f}, CX:()=>this.CX(), dkB:f=>this.L.L.get(f), XwI:()=>this.S, rZ:()=>this.L.Xf.rZ(), kK:(f,G)=>{this.kK(f,G)}, xwY:()=>this.Mr, Lm:f=>{this.Lm(f)}}; this.playback.getPlayerType();this.L=new sma(this.LB);this.playback.gJ(this);this.U0=this.LB.dn();g.K(this,this.SI);g.K(this,this.events);g.K(this,this.J);this.B1=this.LB.Y("html5_use_new_ssdai_transition_detector");this.q0=this.LB.Tk().L.vS(vWL);R=this.playback.getVideoData();R.L$()&&R.latencyClass==="NORMAL"&&(this.q0=this.LB.Tk().L.vS(hY6));this.cB=this.LB.Tk().L.vS(QPd);this.wB=this.playback.getVideoData().nD;this.B1?this.playback.subscribe("playbackstarted",this.kK,this):(this.events.W(this.api, g.bp("serverstitchedcuerange"),this.onCueRangeEnter),this.events.W(this.api,g.yl("serverstitchedcuerange"),this.onCueRangeExit));this.uo=this.LB.Y("html5_ssdai_report_stitch_error_after_skip_ad");GB(this.app.UZ(),this.playback,!1)}Nl(R,w,p,r,f,G,I,C){var u=Yol(this,f,f+r);this.D&&this.l3({adaftto:1});w||this.l3({missadcon:1,enter:f,len:r,aid:I});this.G&&!this.G.Rj&&(this.G.Rj=I);this.Xj&&this.l3({adfbk:1,enter:f,len:r,aid:I});var m=this.playback;f>G&&t_(this,{reason:"enterTime_greater_than_return", J2:f,lU:G});var z=m.xN()*1E3;fm&&t_(this,{reason:"parent_return_greater_than_content_duration",lU:G,vFY:m});(m=$8H(this.L,f))&&m.lU>f&&t_(this,{reason:"overlapping_playbacks",Qh0:R.video_id||"",J2:f,lU:G,Yy0:m.cpn,y$k:m.videoData?.videoId||"",F6B:m.durationMs,c$B:m.J2,DkS:m.lU});if(u&&m)for(z=0;zB===I)&&(this.l3({rejectAdBreakAttl:I},!0),this.WB.push(I)); LN(this);return}R.cpn||(R.cpn=g.k0(16));u=R.cpn;R=new g.ct(this.LB,R);R.wW=!0;R.iU=R.clientPlaybackNonce;m=I?I:m?m.fS:u;w={playerType:p,durationMs:r,J2:f,lU:G,cpn:u,videoData:R,errorCount:0,ssdaiAdsConfig:w,fS:m};p=R.getPlayerResponse()?.playbackTracking;this.cB&&(w.serializedQoeContextData=p?.serializedQoeContextData);this.q0&&(p=Ia(p?.serializedPlaybackPingContextData??"")??void 0,w.jN=g.nm({clientPlaybackNonce:u,serializedPlaybackPingContextData:p},j46));PnL(this.L,w);(C=jxd(this,C))&&this.wB&& this.Mr.set(m,C);TIW(this,R,r);this.l3({attlDone:G-f,acpn:u,et:f,prt:G});this.J.isActive()&&(this.D=!1,this.J.stop(),o5(this),this.AO(!0));I&&this.B1&&(this.Jl.has(I)?this.Jl.get(I).add(u):this.Jl.set(I,new Set([u])),this.ag.set(u,I));return R}zC(){const R=this.playback.zC("serverstitchedcuerange",36E5);for(const w of R)this.C.delete(w.getId())}onCueRangeEnter(R){const w=R.getId();this.l3({oncueEnter:1,cpn:w,start:R.start,end:R.end,ct:(this.playback.getCurrentTime()||0).toFixed(3),cmt:(this.playback.Lh()|| 0).toFixed(3)});var p=this.L.Ff(w);this.l3({enterAdCueRange:1});var r=this.G_||this.CX().cpn;const f=this.L.Ff(r)??this.CX();p&&(r=this.playback.getCurrentTime(),p.startTimeSecs=R.start/1E3,p={wG:f,eh:p,Xh:r},KN(this,w,R.start/1E3,r),DB(this,p));this.YY=!1}kK(R,w,p){if(R&&w&&R!==this.app.UZ().L?.m6())if((this.app.UZ().G[R]||null)===null)this.l3({nocpn:R,active:this.app.UZ().L?.m6()});else{this.YY=p??!1;p=this.app.UZ().L?.m6()||this.playback.m6();var r=this.L.Ff(p)??this.CX(),f=this.L.Ff(R)??this.CX(); f.startTimeSecs=w;f.playerType===2&&(f.b8=f.b8!=null?Math.min(f.b8,w):w);var G=this.playback.getCurrentTime();KN(this,p,w,G);DB(this,{wG:r,eh:f,Xh:G});if(this.playback.getVideoData().L$()&&R===this.playback.m6())if(w=this.ag.get(p)){for(const I of this.Jl.get(w)??[]){R=this.app.UZ();if(p=R.G[I])R.L===p&&(R.L=null),R.D===p&&(R.D=null),I===R.U.get("")?.m6()&&R.U.delete(""),delete R.G[I],delete R.K[I];this.xY.delete(I);this.ag.delete(I)}this.Jl.delete(w)}else this.l3({no_abid:R})}}eB(R,w){if(R===this.playback.m6())GB(this.app.UZ(), this.playback,!1);else{const p=this.xY.get(R);p?(e6x(p,w,!this.YY),GB(this.app.UZ(),p,!0)):this.l3({nop_s:R})}}onCueRangeExit(R){var w=this.playback.getCurrentTime()*1E3,p=R.getId();this.l3({oncueExit:1,cpn:p,start:R.start,end:R.end,ct:(this.playback.getCurrentTime()||0).toFixed(3),cmt:(this.playback.Lh()||0).toFixed(3)});for(var r of this.C.values())if(r.getId()!==p&&w>=r.start&&w<=r.end)return;if(w=this.L.Ff(p))p=this.playback.getPlayerState(),this.playback.getVideoData().L$()&&p.L(2)||(p=this.playback.getCurrentTime(), r=this.CX(),r.startTimeSecs=R.end/1E3,w={wG:w,eh:r,Xh:p},KN(this,this.playback.m6(),R.end/1E3,p),DB(this,w))}CX(){return{cpn:this.playback.m6(),durationMs:0,J2:0,playerType:1,lU:0,videoData:this.playback.getVideoData(),errorCount:0,fS:""}}mq(){if(this.Xj)return!1;let R=void 0;this.G_&&(R=this.L.Ff(this.G_));return this.playback.getVideoData().L$()?!!R&&!R.zX:!!R}seekTo(R=0,w={},p=!1,r=null){El(this,this.G_);if(this.playback.getVideoData().L$()&&R<=this.O0)this.playback.pauseVideo(),this.O0=0,vHr(this, R);else if(this.YY=this.X=!0,p)ZEL(this,R,w);else{p=this.app.HS();const f=p===this.M0?this.eI:null;Va(this,!1);this.f_=R;this.p_=w;r!=null&&this.SI.start(r);p&&(this.eI=f||p.getPlayerState(),p.oT(w),this.M0=p)}}Gy(){Va(this,!1);cV(this);kND(this);super.Gy()}gw(R,w,p){if(p&&w){var r=this.NB.get(R);if(r){r.locations||(r.locations=new Map);var f=Number(w.split(";")[0]);p=new g.uh(p);this.l3({hdlredir:1,itag:w,seg:R,hostport:AQ(79,8319,p)});r.locations.set(f,p)}}}nI(R){a:{if(!this.Xj){var w=PV(this,R); if(!this.playback.getVideoData().L$()||!w?.zX)break a}w=void 0}var p=w;if(!p)return this.l3({gvprp:"ncp",mt:R}),null;w=p.fS;var r=d8Y(this,p.ssdaiAdsConfig);p=p.aA&&p.M5&&R>=p.M5?p.aA:void 0;r={Sf:w?b2(this,w):[],adsConfig:r,y9:p};this.l3({gvprpro:"v",mt:R.toFixed(3),acpns:r.Sf?.join("_")||"none",abid:w});return r}z8(R,w,p,r,f,G){const I=Number(p.split(";")[0]);var C=r===3;R=nHH(this,R,w,r,p,G);this.l3({gdu:1,seg:w,itag:I,pb:`${!!R}`});if(!R)return qc(this,w,C),null;R.locations||(R.locations=new Map); if(!R.locations.has(I)){G=R.videoData.getPlayerResponse()?.streamingData?.adaptiveFormats;if(!G)return this.l3({gdu:"noadpfmts",seg:w,itag:I}),qc(this,w,C),null;var u=G.find(z=>z.itag===I); if(!u||!u.url){R=R.videoData.videoId;r=[];for(var m of G)r.push(m.itag);this.l3({gdu:"nofmt",seg:w,vid:R,itag:I,fullitag:p,itags:r.join(",")});qc(this,w,C);return null}R.locations.set(I,new g.uh(u.url,!0))}m=R.locations.get(I);if(!m)return this.l3({gdu:"nourl",seg:w,itag:I}),qc(this,w,C),null;m=new bm(m);this.yh&&(m.get("dvc")?this.l3({dvc:m.get("dvc")||""}):m.set("dvc","webm"));(r=this.SM(w-1,r,f)?.RB)&&m.set("daistate",r);R.aA&&w>=R.aA&&m.set("skipsq",`${R.aA}`);(r=this.playback.getVideoData().clientPlaybackNonce)&& m.set("cpn",r);r=[];R.fS&&(r=b2(this,R.fS),r.length>0&&m.set("acpns",r.join(",")));C||this.NB.set(w,R);C=null;C=m.get("aids");f=m.qk();f?.length>2048&&this.l3({urltoolong:1,sq:w,itag:I,len:f.length});this.U0&&(f&&(G=R.cpn,m=R.fS,Sod(this,G,m),m&&!this.Ml.has(m)&&(G=Rfl(this,G,m),u=wyW(this,m),this.l3({iofa:G}),this.l3({noawnzd:u-G}),this.l3({acpns:r.join("."),aids:C?.replace(/,/g,".")}),this.Ml.add(m))),this.l3({gdu:"v",seg:w,itag:p,ast:R.J2.toFixed(3),alen:R.durationMs.toFixed(3),acpn:R.cpn,avid:R.videoData.videoId})); return f}AQ(R,w,p=!1){const r=ya(this,R,w);if(r){this.uo&&(this.I0=r);var f=void 0,G=r.fS;if(G){this.l3({skipadonsq:w,sts:p,abid:G,acpn:r.cpn,avid:r.videoData.videoId});p=this.L.L.get(G);if(!p)return;for(const I of p)I.aA=w,I.M5=R,I.J2>r.J2&&(f=I)}El(this,this.G_);this.O=r.cpn;pyd(this);this.api.Y("html5_ssdai_enable_media_end_cue_range")&&this.playback.UN(this.O);R=this.playback.getCurrentTime();QxP(this,r,f,R,R,!1,!0);HED(this)}}u6(){var R=this.L;for(const w of R.C)w.aA=NaN,w.M5=NaN;pyd(this);this.l3({rsac:"resetSkipAd", sac:this.O});this.N0.delete(this.O);this.O="";this.uo&&(this.I0=void 0)}SM(R,w,p){return this.pB.SM(R,w,p)}eG(R){const w=R.trackType;for(const C of R.metadata??[])for(const u of C.zo??[]){var p=u.ra,r=u.hD;R=u.cpn;var f=u.loggingMetadata,G=u.h5,I=u.J5;if(!R||R===this.playback.getVideoData().clientPlaybackNonce)continue;const m=this.L.Ff(R);if(w===2){if(p&&p.startTicks!==void 0&&p.Da!==void 0&&p.timescale!==void 0&&r&&r.startTicks!==void 0&&r.Da!==void 0&&r.timescale!==void 0&&G!==void 0){const z= p.startTicks/p.timescale,B=r.startTicks/r.timescale;p=(z-B)*1E3;r=(B+r.Da/r.timescale)*1E3;I=I?r:Math.max(r+1E3,G);G=p+I;m&&(Mc(this,m,I,G),m.b8=m.b8!==void 0?Math.min(m.b8,z):z,f&&(m.PA=f));(f=this.C.get(R))?(f.start=p,f.end=G,this.playback.VA()):(f=iEl(p,G,R),this.C.set(R,f),this.playback.addCueRange(f))}this.zC()}else w===1&&m&&f&&(m.iO=f)}}Sy(R,w,p,r,f,G,I,C){p.length>0&&this.l3({onssinfo:1,sq:R,start:w.toFixed(3),cpns:p.join(","),ds:r.join(","),isVideo:G?1:0});if(this.uo&&this.I0&&this.I0.aA&& p.length>0)for(var u of p)if(u===this.I0.cpn){this.GE!==u&&(this.l3({skiperror:1,sq:R,acpn:this.I0.cpn,skipsq:this.I0.aA||0}),this.GE=u);break}C&&this.pB.Sy(R,G,I,C);if(G){if(p.length&&r.length)for(this.N0.has(p[0])&&this.l3({skipfail:1,sq:R,acpn:p[0]}),R=w+this.g9(),G=0;Gthis.G.Vj+1){this.l3({cueStChg:R.identifier,oldSt:this.G.Vj.toFixed(3),newSt:R.startSecs.toFixed(3),abid:this.G.Rj});if(this.G.Rj){p=R.startSecs-this.G.Vj;const r=this.L.L.get(this.G.Rj);if(r)for(const f of r)f.J2>=0&&(f.J2+=p*1E3,this.l3({newApEt:f.J2,newApPrt:f.lU,acpn:f.cpn}))}this.G.Vj=R.startSecs}w?this.PS.add(R.identifier):this.PS.has(R.identifier)&&this.PS.delete(R.identifier); return w}Zr(R){let w="";R?R.event==="unknown"?w="unknown":this.PS.has(R.identifier)?this.G&&this.G.yq===R.identifier?this.G.yq===R.identifier?w=Nx(this.jI,p=>p.identifier===R.identifier)?"shortad":"pending":Nx(this.jI,p=>p.identifier===R.identifier)||(w="noAdsAdded"):w="wrongAdBreakInfo":w="unscheduled":w="noCuepoint"; return w}Ug(R){return this.Xj?!1:!!PV(this,R)}jH(R){if(this.LB.Y("html5_lifa_ignore_multiple_skips")&&this.S)return this.l3({ufs_ad:this.O,ufs_cur:this.G_,ufs_cont:this.CX().cpn}),!1;El(this,this.G_);this.playback.pauseVideo(!1,this.LB.Tk().L.vS(BBd)?68:void 0);const w=this.playback.getCurrentTime(),p=this.L.Ff(this.G_);if(!p)return this.l3({skipFail:w}),!1;this.O=this.G_;this.X=!1;this.api.Y("html5_ssdai_enable_media_end_cue_range")&&this.playback.UN(this.O);this.Lm(p.fS);fVP(this,p,this.CX(),R); vHr(this,w,{seekSource:89,dB:"lifa_skip"});this.S||(this.S=this.events.W(this.api,"progresssync",()=>{Dq(this.api.FD(),(0,g.T)(),"ad_to_video");this.S&&(this.events.o9(this.S),this.S=null)})); return!0}Lm(R){if(this.playback.getVideoData().L$()){var w=this.L.L.get(R);if(w){for(var p of w)w=this.C.get(p.cpn),this.C.delete(p.cpn),w&&this.playback.removeCueRange(w),XBI(this.L,p);this.NB.clear();p=this.L;w=p.L.get(R)??[];for(const r of w)XBI(p,r);p.L.delete(R);(R=this.Mr.get(R))&&this.wB&&this.playback.d3(R)}}}l3(R,w=!1){(w||this.U0)&&this.playback.Ty("sdai",R)}};g.wB.prototype.oR=pd(64);var m1P=class extends g.f5{constructor(R,w,p,r){super();this.api=R;this.LB=w;this.L=p;this.app=r;this.K=new Map;this.C=[];this.O=this.D=null;this.pB=NaN;this.J=this.G=this.X=null;this.U=new g.vZ(()=>{IVI(this,this.pB,this.X||void 0)}); this.S=[];this.xY=new g.vZ(()=>{var f=this.S.pop();if(f){const G=f.iU,I=f.playerVars;f=f.playerType;I&&(I.prefer_gapless=!0,this.api.preloadVideoByPlayerVars(I,f,NaN,"",G),this.S.length&&this.xY.ql(4500))}}); this.events=new g.th(this);this.Xf={SyN:()=>this.C}; this.L.getPlayerType();g.K(this,this.U);g.K(this,this.xY);g.K(this,this.events);this.events.W(this.api,g.bp("childplayback"),this.onCueRangeEnter);this.events.W(this.api,"onQueuedVideoLoaded",this.onQueuedVideoLoaded);this.events.W(this.api,"presentingplayerstatechange",this.fd)}onCueRangeEnter(R){if(this.L===this.app.HS()){var w=this.K.get(R);w?zfY(this,w.target,w.kH,R):this.K$("dai.transitionfailure",{e:"unexpectedCueRangeTriggered",cr:R.toString()})}else if(w=this.C.find(r=>r.Za.bD===R)){var p= w.Za; const r=p.target;p=p.kH;r?zfY(this,r,p,R):BrW(this,w.lU,p,R)}}onQueuedVideoLoaded(){const R=this.D;d6(this);R&&(nN(this,R)||this.K$("dai.transitionfailure",{e:"unexpectedPresentingPlayer",pcpn:this.app.HS()?.getVideoData().clientPlaybackNonce,ccpn:`${R.playerVars.cpn}`}),this.app.HS().addCueRange(R.Za.bD))}seekTo(R=0,w={},p=!1,r=null){if(p)IVI(this,R,w);else{p=this.app.HS()||null;const f=p===this.G?this.J:null;a5(this,!1);this.pB=R;this.X=w;r!=null&&this.U.start(r);p&&(this.J=f||p.getPlayerState(), p.oT(),this.G=p)}}fd(R){R.TE(128)&&xaY(this)}isManifestless(){return na(this.L.getVideoData())}Gy(){a5(this,!1);jT(this);super.Gy()}K$(R,w){this.L.K$(new g.pq(R,w))}},scD=0;var LZr="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 zWS=class extends g.f5{constructor(){super();this.L=new ka(5,null);g.K(this,this.L);this.C=new ka(15,null);g.K(this,this.C)}M1(R){if(R)return this.C.get(R)}Gy(){this.L.removeAll();this.C.removeAll();super.Gy()}};var BpR=class extends g.f5{constructor(R){super();this.cache=new ka(R,null);g.K(this,this.cache)}get(R){R=this.cache.get(R);return R===null?void 0:R}put(R,w,p){this.cache.set(R,w,p||3600)}};g.W9k=D2(()=>{const R=window.AudioContext||window.webkitAudioContext;try{return new R}catch(w){return w.name}});var x1P=class extends g.k{constructor(R){super({j:"div",E0:["html5-video-player"],A:{tabindex:R.V().disableOrganicUi?"":"-1",id:R.webPlayerContextConfig.rootElementId},N:[{j:"div",Z:g.mq.VIDEO_CONTAINER,A:{"data-layer":"0"}}]});this.app=R;this.uT=this.KB(g.mq.VIDEO_CONTAINER);this.pD=new g.X8(0,0,0,0);this.OC=null;this.Q1=new g.X8(0,0,0,0);this.dt=this.Ka=this.Ir=NaN;this.Wq=this.F8=this.JV=this.E6=!1;this.iQ=NaN;this.oP=!1;this.Dd=null;this.X$=new g.vZ(()=>{this.app.V().Y("web_enable_smart_zoom")&& this.app.o0.getInternalApi().isAutocropEnabled()||this.resize()},100); this.cg=()=>{this.element.focus({preventScroll:!0})}; this.GF=()=>{this.app.o0.publish("playerUnderlayVisibilityChange","visible");this.OC.classList.remove(g.mq.VIDEO_CONTAINER_TRANSITIONING);this.OC.removeEventListener(i2,this.GF);this.OC.removeEventListener("transitioncancel",this.GF)}; this.WQ=this.Z0=!1;const w=this.element.addEventListener,p=this.element.removeEventListener;this.addEventListener=(f,G,I)=>{w.apply(this.element,[f,G,I])}; this.removeEventListener=(f,G,I)=>{p.apply(this.element,[f,G,I])}; const r=R.V();r.transparentBackground&&this.KU("ytp-transparent");r.controlsType==="0"&&this.KU("ytp-hide-controls");g.pc(this.element,"ytp-exp-bottom-control-flexbox");g.pc(this.element,"ytp-modern-caption");r.Y("enable_new_paid_product_placement")&&!g.Eg(r)&&g.pc(this.element,"ytp-exp-ppp-update");g.pc(this.element,"ytp-livebadge-color");r.Y("web_player_default_autohide")&&g.pc(this.element,"ytp-autohide");AqL(this.element,Zyd(R));this.nM=!1;this.Jr=new g.dg(NaN,NaN);yqL(this);this.W(R.o0,"onMutedAutoplayChange", this.onMutedAutoplayChange);g.K(this,this.X$)}KU(...R){g.rF(this.element,R)}gY(){this.OC&&(this.OC.removeEventListener("focus",this.cg),g.x7(this.OC),this.OC=null)}aN(){this.cS();const R=this.app.V();R.M9||this.KU("tag-pool-enabled");R.J&&this.KU(g.mq.HOUSE_BRAND);R.playerStyle==="gvn"&&(this.KU("ytp-gvn"),this.element.style.backgroundColor="transparent");R.ag&&(this.iQ=g.FG("yt-dom-content-change",this.resize,this));this.W(window,"orientationchange",this.resize,this);this.W(window,"resize",this.resize, this)}Mt(R){g.u8(this.app.V());this.Wq=!R;J_(this)}resize(){if(this.OC){var R=this.lA();if(!R.isEmpty()){this.app.o0.isFullscreen()&&GU()&&this.X$.start();var w=!g.Zf(R,this.pD.getSize()),p=tLH(this);w&&(this.pD.width=R.width,this.pD.height=R.height);R=this.app.V();(p||w||this.WQ||R.ag)&&this.app.o0.publish("resize",this.getPlayerSize())}}}Ej(R,w){this.updateVideoData(w)}updateVideoData(R){if(this.OC){var w=this.app.V();hx&&(this.OC.setAttribute("x-webkit-airplay","allow"),R.title?this.OC.setAttribute("title", R.title):this.OC.removeAttribute("title"));this.OC.setAttribute("controlslist","nodownload");w.CU&&R.videoId?this.OC.poster=R.EZ("default.jpg"):Lh()&&(w_??0)>=10&&(this.OC.poster="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}w=g.hN(R,"yt:bgcolor");this.uT.style.backgroundColor=w?w:"";this.Ir=tj(g.hN(R,"yt:stretch"));this.Ka=tj(g.hN(R,"yt:crop"),!0);g.M(this.element,"ytp-dni",R.h$);this.resize()}setGlobalCrop(R){this.dt=tj(R,!0);this.resize()}setCenterCrop(R){this.E6= R;this.resize()}Re(){}getPlayerSize(){var R=this.app.V();const w=this.app.o0.isFullscreen();var p=R.externalFullscreen&&g.zI(R);if(w&&GU()&&!p)return new g.dg(window.outerWidth,window.outerHeight);p=!isNaN(this.Jr.width)&&!isNaN(this.Jr.height);const r=this.app.V().Y("kevlar_player_enable_squeezeback_fullscreen_sizing")||this.app.V().Y("web_watch_enable_fs_squeezeback_panels");if(w&&!p&&r)return new g.dg(this.element.clientWidth,this.element.clientHeight);if(w||R.f4){let f;window.matchMedia&&(R="(width: "+ window.innerWidth+"px) and (height: "+window.innerHeight+"px)",this.Dd&&this.Dd.media===R||(this.Dd=window.matchMedia(R)),f=this.Dd&&this.Dd.matches);if(f)return new g.dg(window.innerWidth,window.innerHeight)}else if(p)return this.Jr.clone();return new g.dg(this.element.clientWidth,this.element.clientHeight)}lA(){var R=this.app.V().Y("enable_desktop_player_underlay");const w=this.getPlayerSize(),p=g.Iq(this.app.V().experiments,"player_underlay_min_player_width");return R&&this.JV&&w.width>p?(R=g.Iq(this.app.V().experiments, "player_underlay_video_width_fraction"),new g.dg(Math.min(w.height*this.getVideoAspectRatio(),w.width*R),Math.min(w.height,w.width*R/this.getVideoAspectRatio()))):w}getVideoAspectRatio(){return isNaN(this.Ir)?oub(this):this.Ir}getVideoContentRect(R){const w=this.lA();R=VLP(this,w,this.getVideoAspectRatio(),R);return new g.X8((w.width-R.width)/2,(w.height-R.height)/2,R.width,R.height)}eQ(R){this.JV=R;this.resize()}gH(){return this.F8}onMutedAutoplayChange(){J_(this)}setInternalSize(R){g.Zf(this.Jr, R)||(this.Jr=R,this.resize())}Gy(){this.iQ&&g.jh(this.iQ);this.gY();super.Gy()}};var l2U=class{constructor(){this.csn=g.ut();this.clientPlaybackNonce=null;this.elements=new Set;this.O=new Set;this.L=new Set;this.C=new Set}click(R,w){this.elements.has(R);this.L.has(R);const p=g.ut();p&&R.visualElement&&g.Qs(p,R.visualElement,w)}createClientVe(R,w,p,r=!1){this.elements.has(R);this.elements.add(R);p=rw(p);R.visualElement=p;const f=g.ut(),G=g.GP();f&&G&&(g.Y("combine_ve_grafts")?HQ(Q_(),p,G):g.mJ(g.av)(void 0,f,G,p));w.addOnDisposeCallback(()=>{this.elements.has(R)&&this.destroyVe(R)}); r&&this.C.add(R)}createServerVe(R,w,p=!1){this.elements.has(R);this.elements.add(R);w.addOnDisposeCallback(()=>{this.destroyVe(R)}); p&&this.C.add(R)}destroyVe(R){this.elements.has(R);this.elements.delete(R);this.O.delete(R);this.L.delete(R);this.C.delete(R)}O0(R,w){this.clientPlaybackNonce!==w&&(this.clientPlaybackNonce=w,g$(Q_(),R),KZI(this))}setTrackingParams(R,w){this.elements.has(R);w&&(R.visualElement=g.pF(w))}Rg(R,w,p){this.elements.has(R);w?this.L.add(R):this.L.delete(R);const r=g.ut(),f=R.visualElement;this.C.has(R)?r&&f&&(w?g.JO(r,[f]):g.TP(r,[f])):w&&!this.O.has(R)&&(r&&f&&g.ju(r,f,void 0,p),this.O.add(R))}hasVe(R){return this.elements.has(R)}};var L9a=class extends g.f5{constructor(R,w,p,r,f,G,I){super();this.S=R;this.Ty=w;this.X=p;this.J=r;this.U=f;this.intervalMs=G;this.K=I;this.xY=sp;this.D=0;this.G=this.O=!1;this.pB=Math.floor(Math.random()*256)}sendRequest(){var R=[0,1,2,3];this.K&&(R.push(4),this.G&&R.push(5));switch(R[Math.floor(Math.random()*R.length)]){case 0:efY(this,this.J);break;case 1:this.nh&&(R={[0]:1,[1]:performance.now()},this.request(R));break;case 2:R=this.U;this.nh&&(R={[0]:2,[1]:performance.now(),[3]:R},this.request(R)); break;case 3:this.nh&&(R={[0]:3,[1]:performance.now()},this.request(R));break;case 4:this.K&&(R={[0]:4,[1]:performance.now(),[4]:this.K},this.request(R));break;case 5:var w=this.J;R=this.pB;this.nh&&(w=Dad(this,w),R={[0]:5,[1]:performance.now(),[2]:w,[5]:R},this.request(R))}}request(R){this.nh&&this.nh.postMessage(R)}receive(R){if(!(this.D>=5E3)){var w=R.timeStamp,p=performance.now();R=R.data;R[0]===5&&(this.G=!0);var r=R[1];this.Ty("worker",{type:R[0],t1:(R[2]-performance.timeOrigin-r).toFixed(3), t2:(R[3]-performance.timeOrigin-r).toFixed(3),t3:(w-r).toFixed(3),t4:(p-r).toFixed(3)});this.D++}}Gy(){this.C!==void 0&&(clearInterval(this.C),this.C=void 0);this.nh?.terminate();this.L=this.nh=void 0;this.G=!1;this.Ty("workerDtor",{});super.Gy()}};g.rB=class extends g.f5{constructor(R,w,p,r){super();this.logger=new g.Q6("App");this.ux=this.UR=!1;this.kR={};this.z0=[];this.pn=!1;this.MN=null;this.intentionalPlayback=!1;this.Jx=!0;this.OJ=!1;this.lK=this.ly=this.RP=null;this.Rm=!0;this.mediaElement=this.sQ=null;this.Bg=NaN;this.Tx=!1;this.kN=this.AA=this.H1=this.screenLayer=this.playlist=null;this.Sg=[];this.La=0;this.F9=new YuW;this.B2=[];this.Xf={UZ:()=>this.Oy, iM:()=>this.H1}; if(!p)throw Error("b/179532961");this.VR=w?.args||{};this.webPlayerContextConfig=p;w=this.VR;this.LB=new DuW(w,p,p.canaryState,r);g.K(this,this.LB);fxW(this.LB);r=tnd(this.LB);this.LB.dn()&&PQ(r,I=>{this.y3("h5vcc",I)}); this.LB.experiments.XB("jspb_serialize_with_worker")&&wO6();this.LB.C&&Z8L();this.Y("html5_onesie")&&(this.mP=new SIk(this.LB),g.K(this,this.mP));this.BB=new u8p(D8b(g.I1(this.LB),this.LB.RJ,this.LB.experiments),new ZSr(this.LB.experiments),()=>void this.EV()); g.K(this,this.BB);this.Qu=bB(Ba(this.LB)&&!0,w.enablesizebutton);this.ZE=bB(!1,w.player_wide);this.visibility=new I2k;g.K(this,this.visibility);this.Y("web_log_theater_mode_visibility")&&this.Pf(bB(!1,w.player_wide));this.UR=bB(!1,w.external_list);this.events=new g.th(this);g.K(this,this.events);this.Y("start_client_gcf")&&(IO(mE(),{VC:RA,uE:u3H()}),this.GP=mE().resolve(RA),xyl(this.GP));this.sD=new W3;g.K(this,this.sD);this.V7=new l2U;r=new XiY;this.o0=new g.lL(this,r);g.K(this,this.o0);this.template= new x1P(this);g.K(this,this.template);this.appState=1;this.NP=$ad(this);g.K(this,r);this.Sw={internalvideodatachange:this.Ef,playbackready:this.rT,playbackstarted:this.zs,statechange:this.jr};this.jl=new A$6(this.o0);this.Vv=FZL(this);r=this.LB.J;!1!==r&&this.y3("badps",{hbp:r,hostname:window.location.hostname,ps:this.LB.playerStyle});this.Jf=new S6_(this.LB,this.Vv);this.o0.publish("csiinitialized");(this.webPlayerContextConfig.wasmModuleUrl||Ht(this.Vv))&&jcY(this);r=10;g.I1(this.LB)&&(r=3);Og(this.LB)&& (r=g.Iq(this.LB.experiments,"tvhtml5_unplugged_preload_cache_size"));this.Oy=new g.Ux(this.o0,r);r=this.LB.experiments.Tk().L.vS(VYH)||r;this.zx=new BpR(r);g.K(this,this.zx);r=Jq6(this);this.Oy.jo(r);iyx(this);this.SA={airplayactivechange:this.u5,airplayavailabilitychange:this.W5,beginseeking:this.v5,sabrCaptionsDataLoaded:this.xA,endseeking:this.VH,internalAbandon:this.Am,internalaudioformatchange:this.dT,internalvideodatachange:this.Is,internalvideoformatchange:this.zI,liveviewshift:this.NK,playbackstalledatstart:this.GI, progresssync:this.LK,onAbnormalityDetected:this.aI,onSnackbarMessage:this.fK,onLoadProgress:this.er,SEEK_COMPLETE:this.pK,SEEK_TO:this.TI,onVideoProgress:this.j4,onLoadedMetadata:this.XX,onAutoplayBlocked:this.qK,onPlaybackPauseAtStart:this.Sr,playbackready:this.wT,statechange:this.Y9,newelementrequired:this.PU,heartbeatparams:this.H5,videoelementevent:this.KK,drmoutputrestricted:this.RI,signatureexpired:this.OW,nonfatalerror:this.mw,reloadplayer:this.CK};this.Bc=new g.th(this);g.K(this,this.Bc); this.JQ=new zWS;g.K(this,this.JQ);this.HV=this.C7=-1;this.bu=new g.vZ(this.template.resize,16,this.template);g.K(this,this.bu);this.u3=new m1P(this.o0,this.LB,this.Gk(),this);this.xG=new GMR(this);g.K(this,this.xG);this.Cz=new f2U(this);g.K(this,this.Cz);q6H(this.LB.L.c);this.events.W(this.o0,g.bp("appapi"),this.II);this.events.W(this.o0,g.yl("appapi"),this.KG);this.events.W(this.o0,g.bp("appprogressboundary"),this.MY);this.events.W(this.o0,g.yl("applooprange"),this.GY);this.events.W(this.o0,"presentingplayerstatechange", this.fd);this.events.W(this.o0,"resize",this.YA);this.template.gN(HD(document,R));this.events.W(this.o0,"offlineslatestatechange",this.oI);this.events.W(this.o0,"sabrCaptionsTrackChanged",this.WR);this.events.W(this.o0,"sabrCaptionsBufferedRangesUpdated",this.kA);this.Vv.B.V().qH&&Q1(this.Vv,"offline");this.LB.nB&&g.XA("ux",rGm);R=g.Iq(this.LB.experiments,"html5_defer_fetch_att_ms");this.wX=new g.vZ(this.FK,R,this);g.K(this,this.wX);this.Ib().n$()&&(g.He()&&this.Ib().XL.push("mdx"),qp(this));this.Jf.tick("fs"); hfl(this);this.LB.nB&&Q1(this.Vv,"ux",!0);g.zI(this.Vv.B.V())&&Q1(this.Vv,"embed");this.Y("web_player_sentinel_is_uniplayer")||g.AO(new g.Id("Player experiment flags missing","web_player_sentinel_is_uniplayer"));R=this.Y("web_player_sentinel_yt_experiments_sync");r=g.Y("web_player_sentinel_yt_experiments_sync");R!==r&&g.AO(new g.Id("b/195699950",{yt:R,player:r}));this.cO=gul(this);if(R=g.Iq(this.LB.experiments,"html5_block_pip_safari_delay"))this.Cx=new g.vZ(this.Mg,R,this),g.K(this,this.Cx);p=UV(p?.trustedEchoWorkerUrl?? null);R=this.LB.Tk().L.vS(wqH);r=this.LB.Tk().L.vS(pqd);w=this.LB.Tk().L.vS(RJl);const f=this.LB.Tk().L.vS(Sxx),G=this.webPlayerContextConfig.echoWorkerWasmModuleUrl??"";p&&R>0&&r>0&&w>0&&f>0&&(this.Vc=new L9a(p,(I,C)=>{this.Gk().Ty(I,C)},w,r,f,R,G),g.K(this,this.Vc),MLr(this.Vc)); g.K(this,this.F9);HI=this.LB.Mr;this.o0.publish("applicationInitialized")}static create(R,w,p,r){try{const f=typeof R==="string"?R:`player${g.DL(R)}`,G=ps[f];if(G){try{G.dispose()}catch(C){g.LF(C)}ps[f]=null}const I=new g.rB(R,w,p,r);I.addOnDisposeCallback(()=>{ps[f]=null;I.cO&&I.cO()}); return ps[f]=I}catch(f){throw g.LF(f),(f&&f instanceof Error?f:Error(String(f))).stack;}}Z5(){return this.visibility}jo(R){const w=this.Gk();if(R!==w){R.getVideoData().autonavState=w.getVideoData().autonavState;w.OF(this.Sw,this);var p=w.getPlaybackRate();w.dispose();this.Oy.jo(R);R.setPlaybackRate(p);R.Uq(this.Sw,this);qp(this)}}QC(){this.MN||(this.MN=g.J1(XV(),g8_(),{r9:this.LB.r9(),clientInterface:Uq(this.LB)}));return this.MN}gY(R){if(this.mediaElement){this.AA&&(this.events.o9(this.AA),this.AA= null);this.Bc.C();this.HS().gY(!0,!1,R);this.template.gY();try{this.Y("html5_use_async_stopVideo")?this.mediaElement.dispose():this.mediaElement.U0()}catch(w){g.AO(w)}this.mediaElement=null}}a5(R,w,p=!1){if(R!==this.HS()){var r=null;p||(p=this.HS(),r=p.getPlayerState(),ke(this.Vv,3),fU(this,"cuerangesremoved",p.D5()),this.xG&&!R.isGapless()&&p.isGapless()&&this.mediaElement&&this.mediaElement.stopVideo(),p=R.lB()&&p.lB(),this.Jf.Cy("iv_s"),NrW(this,p));R.getPlayerType()===1&&this.jo(R);p=R.getPlayerType(); var f=this.Oy.O[p]||null;R!==this.Gk()&&R!==f&&(f?.dispose(),f=this.Oy,f.O[p]=R,f.K[R.m6()]=R);this.Oy.a5(R);this.mediaElement&&R.setMediaElement(this.mediaElement);R.Uq(this.SA,this);R.lq()?bi(this,"setPresenting",!1):(this.Ej("newdata",R,R.getVideoData()),r&&!g.zf(r,R.getPlayerState())&&this.Y9(new g.ll(R.getPlayerState(),r)),w=w&&R.getPlayerType()===1,R.tK()&&!w&&this.Ej("dataloaded",R,R.getVideoData()),(w=(w=R.getVideoData().C)&&w.video)&&g.lK(this.o0,"onPlaybackQualityChange",w.quality),fU(this, "cuerangesadded",R.D5()),w=R.getPlayerState(),w.L(2)?UaW(this):w.L(8)?R.playVideo():R.bf()&&R.pauseVideo(),w=this.Gk(),R.getPlayerType()===2&&(R.getVideoData().gz=w.getVideoData().clientPlaybackNonce),R.getPlayerType()!==2||this.b4()||(R=R.getVideoData(),w.DM(R.clientPlaybackNonce,R.mq||"",R.breakType||0,R.fZ,R.videoId||"")))}}KZ(){this.Gk()!==this.HS()&&this.a5(this.Gk())}UZ(){return this.Oy}Ff(R){return this.Oy.Ff(R)||this.Oy.X}Gk(){return this.Oy.Gk()}HS(){return this.Oy.HS()}rT(){OC(this)||this.NL(5)}wT(){if(!OC(this)){RW(this); var R=this.HS(),w=R.getVideoData();this.LB.Y("html5_allow_multiview_tile_preload")&&w.yh&&R.seekTo(Infinity);w=R.getPlayerState();R.bf()?this.pauseVideo():w.isOrWillBePlaying()&&this.playVideo()}}canPlayType(R){return GO(R)}V(){return this.LB}getVideoData(){return this.HS().getVideoData()}iM(){return this.HS().Cw()}Ib(){return this.Gk().getVideoData()}getVideoLoadedFraction(R){return this.Ff({playerType:R}).getVideoLoadedFraction()}L_(){return this.template}tf(){return this.Vv}FD(){return this.Jf}EL(R, w=1,p){this.Ff({playerType:w}).Rz(R,void 0,p)}uc(){const R=this.Vv.uc();this.o0.publish("videoStatsPingCreated",R);return R}getVolume(){return Math.round(this.o0.getVolume())}isMuted(){return this.o0.isMuted()}vJ(){if(this.Gk()===this.HS()&&this.sQ)return this.sQ.postId}FK(){this.Y("use_rta_for_player")||(g.I1(this.LB)?g.$W(this.LB,this.getVideoData().J()).then(R=>{ng(XV(),R);X1x(this.getVideoData(),this.LB,this.QC())}):X1x(this.getVideoData(),this.LB,this.QC()))}nZ(R){this.o0.publish("poTokenVideoBindingChange", R)}Q0(R){this.o0.publish("d6de4videobindingchange",R)}eH(){this.eA&&this.eA.eH()}bk(R){this.eA=R}gr(R){if(R===1){this.Jf.tick("vr"); var w=this.HS();w.qf();TkI(this.Jf,w.getVideoData(),pVP(this));NZ(this.Vv)}w=this.LB;(yk(w)&&w.U||g.Cb(w))&&(this.HS().getVideoData()?.enableServerStitchedDai||!this.b4())&&g.lK(this.o0,"onAdStateChange",R)}setLoopVideo(R){const w=this.HS();w===this.Gk()&&w.pX()!==R&&(w.setLoop(R),g.m1(this.o0,"onLoopChange",R))}getLoopVideo(){return this.HS().pX()}setLoopRange(R){var w=!1;!!this.sQ!==!!R?w=!0:this.sQ&&R&&(w=this.sQ.startTimeMs!==R.startTimeMs||this.sQ.endTimeMs!==R.endTimeMs||this.sQ.postId!==R.postId|| this.sQ.type!==R.type);if(w){w=this.HS();Dr(w.getVideoData())&&w.Ty("slr",{et:R?.endTimeMs||-1});w=this.Gk();w.P1("applooprange");if(R){var p=new g.Ja(R.startTimeMs,R.endTimeMs,{id:"looprange",namespace:"applooprange"});w.addCueRange(p)}else this.Ib().clipConfig=void 0,this.sQ?.type!=="repeatChapter"||isNaN(Number(this.sQ?.loopCount))||(p={loopCount:String(this.sQ.loopCount),cpn:this.getVideoData().clientPlaybackNonce},g.Rv("repeatChapterLoopEvent",p));this.sQ=R;g.m1(this.o0,"onLoopRangeChange",R|| void 0);this.Gk()===this.HS()&&(this.GY(),w.vX())}}getLoopRange(){return this.sQ}GY(){let R="";const w=this.Gk();this.sQ?w!==this.HS()?R="pnea":PWL(this,w.getCurrentTime())&&(this.sQ.loopCount=0,R="ilr"):R="nlr";const p=this.HS();Dr(p.getVideoData())&&(this.Y("html5_gapless_log_loop_range_info")?p.Ty("slrre",{rej:R,ct:w.getCurrentTime(),lst:this.sQ?.startTimeMs,let:this.sQ?.endTimeMs}):p.Ty("slrre",{}));R||fB_(this)}setPlaybackRate(R,w){if(!isNaN(R)){R=TrI(this,R);var p=this.Gk();p.getPlaybackRate()!== R&&(p.setPlaybackRate(R),w&&!this.LB.G&&g.Qp("yt-player-playback-rate",R),g.lK(this.o0,"onPlaybackRateChange",R))}}getCurrentTime(R={}){const {playerType:w,Lo:p=!0}=R;var r=this.Oy.d_;if(r)return r.getCurrentTime();R=(r=w===2&&this.getVideoData().enableServerStitchedDai)?this.HS():this.Ff(R);return r&&this.H1?(r=this.Oy.D)?r.getCurrentTime(p):R.getCurrentTime():p?(R=tz(this,R),k$(this,R.getCurrentTime(),R)):R.getCurrentTime()}BM(){var R=this.Ff({playerType:void 0});R=tz(this,R);return k$(this,R.BM(), R)}getDuration(R={}){const {playerType:w,Lo:p=!0}=R;if(R=this.Oy.d_)return R.getDuration();R=this.getVideoData();const r=w===2&&R.enableServerStitchedDai;let f;f=r?this.HS():this.Ff({playerType:w});if(R.hasProgressBarBoundaries()&&!r){const G=Number(R.progressBarStartPosition?.utcTimeMillis),I=Number(R.progressBarEndPosition?.utcTimeMillis);if(!isNaN(G)&&!isNaN(I))return(I-G)/1E3}if(Dr(R)&&!R.isLivePlayback)return Ul(this,w);if(p)return R=Nc(this,f),k$(this,R.getDuration(),R);r&&this.H1?(R=this.Oy, R=R.L===R.D?R.L:null,R=(R==null?void 0:R.getDuration())||0):R=f.getDuration();return R}gg(R){var w=this.Ff({playerType:R});return this.b4(w)?(w=Nc(this,w),w.gg()-w.getCurrentTime()+this.getCurrentTime({playerType:R})):w.gg()}finishSegmentByCpn(){return[]}aN(){this.template.aN();var R=this.o0;R.state.element=this.template.element;const w=R.state.element;let p;for(p in R.state.L)R.state.L.hasOwnProperty(p)&&(w[p]=R.state.L[p]);(R=g9Y(this.template.element))&&this.events.W(this.template,R,this.onFullscreenChange)}getDebugText(R){var w= this.Gk().TK(R),p=this.HS();if(p!==this.Gk()){p=p.TK(R);for(var r of Object.keys(p))w["ad"+r]=p[r];if(R){r=w;p={};var f=HD(document,"movie_player");f&&(p.bounds=f.getBoundingClientRect(),p["class"]=f.className);f={};var G=g.Up("video-ads");G?(mcd(G,f),f.html=G.outerHTML):f.missing=1;G={};const I=g.Up("videoAdUiSkipContainer"),C=g.Up("ytp-ad-skip-button-container"),u=g.Up("ytp-skip-ad-button"),m=I||C||u;m?(mcd(m,G),G.ima=I?1:0,G.bulleit=C?1:0,G.component=u?1:0):G.missing=1;p=JSON.stringify({player:p, videoAds:f,skipButton:G});r.ad_skipBtnDbgInfo=p}}R&&this.mediaElement&&(w["0sz"]=`${+Y2(this.mediaElement.getSize())===0}`,w.op=this.mediaElement.xY("opacity"),r=this.mediaElement.va().y+this.mediaElement.getSize().height,w.yof=`${+r<=0}`,w.dis=this.mediaElement.xY("display"));R&&((R=(0,g.U5)())&&(w.gpu=R),(R=this.LB.playerStyle)&&(w.ps=R),this.LB.PS&&(w.webview=1),(R=this.webPlayerContextConfig.jsUrl)&&(w.js=R));w.debug_playbackQuality=this.o0.getPlaybackQuality(1);w.debug_date=(new Date).toString(); w.origin=window.origin;w.timestamp=Date.now();delete w.uga;delete w.q;return JSON.stringify(w,null,2)}getFeedbackProductData(){const R={player_debug_info:this.getDebugText(!0),player_experiment_ids:this.V().experiments.experimentIds.join(", "),player_release:"youtube.player.web_20260317_10_RC00"},w=this.getPlayerStateObject().Yu;w&&(R.player_error_code=w.errorCode,R.player_error_details=JSON.stringify(w.errorDetail));return R}getPresentingPlayerType(R){return this.appState===1?1:OC(this)?3:(R&&this.LB.Tk().L.vS(g6)? this.Oy.L?.isAd()??!1:this.H1?.mq(this.getCurrentTime()))?2:this.HS().getPlayerType()}w4(){return!1}getPlayerStateObject(R){return this.Ff({h0:!0,playerType:R}).getPlayerState()}getAppState(){return this.appState}KK(R){switch(R.type){case "loadedmetadata":this.bu.start();for(var w of this.z0)Xy_(this,w.id,w.xr,w.Cr,void 0,!1);this.z0=[];break;case "loadstart":this.Jf.Cy("gv");break;case "progress":case "timeupdate":iV(R.target.po())>=2&&this.Jf.Cy("l2s");break;case "playing":g.ef&&this.bu.start(); if(g.I1(this.LB))R=!1;else{w=g.MS(this.tf());R=this.mediaElement.xY("display")==="none"||Y2(this.mediaElement.getSize())===0;var p=TB(this.template),r=this.HS().getVideoData(),f=g.dQ(this.LB);r=eG(r);w=!p||w||f||r||this.LB.Qk;R=R&&!w}R&&(R=this.HS(),R.Bd(),this.getVideoData().U0||(this.getVideoData().U0=1,this.PU(),R.playVideo()))}}er(R){g.xs(this.o0,"onLoadProgress",R)}GI(){this.o0.publish("playbackstalledatstart")}xA(R,w){this.o0.publish("sabrCaptionsDataLoaded",R,w)}WR(R){this.HS().i$(R)}kA(R){this.HS().l$(R)}j4(R){R= tz(this,this.HS());R=k$(this,R.getCurrentTime(),R);g.lK(this.o0,"onVideoProgress",R);this.LB.Gw&&this.visibility.W0()&&this.LB.a9&&!this.getVideoData()?.backgroundable&&this.pauseVideo()}qK(){g.lK(this.o0,"onAutoplayBlocked");var R=this.HS().getVideoData();R&&(R.jR=!0);g.zI(this.LB)&&(R={autoplayBrowserPolicy:z0(),autoplayIntended:Bn(this.getVideoData()),autoplayStatus:"AUTOPLAY_STATUS_BLOCKED",cpn:this.getVideoData().clientPlaybackNonce,intentionalPlayback:this.intentionalPlayback},g.Rv("embedsAutoplayStatusChanged", R))}LK(){this.o0.publish("progresssync")}Sr(){g.xs(this.o0,"onPlaybackPauseAtStart")}jr(R){if(this.getPresentingPlayerType()===1){R.TE(1)&&!R.state.L(64)&&this.Ib().isLivePlayback&&this.Gk().isAtLiveHead()&&this.o0.getPlaybackRate()>1&&this.setPlaybackRate(1,!0);if(R.TE(2)){if(this.sQ&&this.sQ.endTimeMs>=(this.getDuration()-1)*1E3){fB_(this);return}UaW(this)}if(R.state.L(128)){var w=R.state;this.cancelPlayback(5);w=w.Yu;JSON.stringify({errorData:w,debugInfo:this.getDebugText(!0)});g.lK(this.o0,"onError", vid(w.errorCode));g.xs(this.o0,"onDetailedError",{errorCode:w.errorCode,errorDetail:w.errorDetail,message:w.errorMessage,messageKey:w.Vq,cpn:w.cpn});(0,g.T)()-this.LB.B1>6048E5&&g.xs(this.o0,"onReloadRequired")}w={};if(R.state.isPlaying()&&!R.state.isBuffering()&&!z3("pbresume","ad_to_video")&&z3("_start","ad_to_video")){const p=this.getVideoData();w.clientPlaybackNonce=p.clientPlaybackNonce;p.videoId&&(w.videoId=p.videoId);g.sT(w,"ad_to_video");u$("pbresume",void 0,"ad_to_video");NZ(this.Vv)}this.o0.publish("applicationplayerstatechange", R)}}Y9(R){this.Oy.d_||this.o0.publish("presentingplayerstatechange",R)}fd(R){yz(this,Bo(R.state));R.state.L(1024)&&this.o0.isMutedByMutedAutoplay()&&(wc(this,{muted:!1,volume:this.NP.volume},!1),ST(this,!1))}onPlayerRequestSent(R){g.m1(this.o0,"onPlayerRequestSent",R)}Ef(R,w){R==="newdata"&&qp(this);this.o0.publish("applicationvideodatachange",R,w)}dT(R,w){RW(this);g.xs(this.o0,"onPlaybackAudioChange",this.o0.getAudioTrack().DT.name);this.o0.publish("internalaudioformatchange",this.o0.getAudioTrack().DT.id, w)}zI(R){const w=this.HS().getVideoData();R===w&&g.lK(this.o0,"onPlaybackQualityChange",R.C.video.quality)}gG(){var R=this.Oy.O[2]||null;if(R){R=R.getVideoData();this.HS().Ty("ssdai",{cleanaply:1,acpn:R?.clientPlaybackNonce,avid:R.videoId,isDai:this.Ib().enableServerStitchedDai?1:0});R=this.Oy;const w=R.O[2];w&&(delete R.K[w.m6()],delete R.O[2])}}Is(R,w){this.Ej(R,this.HS(),w)}Ej(R,w,p){this.LB.dn()&&w.Ty("vdc",{type:R,vid:p.videoId||"",cpn:p.clientPlaybackNonce||""});w===this.Gk()&&(this.LB.MO=p.oauthToken); w===this.Gk()&&(this.getVideoData().enableServerStitchedDai&&!this.H1?(this.Gk().Ty("sdai",{initSstm:1}),this.H1=new g.wB(this.o0,this.LB,this.Gk(),this)):!this.getVideoData().enableServerStitchedDai&&this.H1&&(this.H1.dispose(),this.H1=null));if(R==="newdata")ke(this.Vv,2),this.o0.publish("videoplayerreset",w);else{if(!this.mediaElement)return;if(R==="dataloaded")if(this.Gk()===this.HS()){if(l8(p.zy,p.JP),!this.Gk().getPlayerState().isError()){var r=OC(this);this.Ib().isLoaded();r&&this.NL(6);wV6(this); vt(this.Vv)||Az(this)}}else wV6(this);if(w.getPlayerType()===1&&(this.LB.M0&&GBr(this),this.getVideoData().isLivePlayback&&!this.LB.S$&&this.NH("html5.unsupportedlive",2,"DEVICE_FALLBACK"),p.isLoaded()&&((kEY(p)||this.getVideoData().Ov)&&this.o0.publish("legacyadtrackingpingchange",this.getVideoData()),p.hasProgressBarBoundaries()&&(r=Number(this.getVideoData().progressBarEndPosition?.utcTimeMillis)/1E3,!isNaN(r))))){var f=this.gg();f&&(f-=this.getCurrentTime(),r=(r-f)*1E3,f=this.kR.progressEndBoundary, f?.start!==r&&(f&&this.rK([f]),r=new g.Ja(r,0x7ffffffffffff,{id:"progressEndBoundary",namespace:"appprogressboundary"}),this.Gk().addCueRange(r),this.kR.progressEndBoundary=r))}this.o0.publish("videodatachange",R,p,w.getPlayerType())}g.lK(this.o0,"onVideoDataChange",{type:R,playertype:w.getPlayerType()});this.GY();(R=p.Ro)?this.V7.O0(R,p.clientPlaybackNonce):KZI(this.V7)}tC(){rc(this,null);g.xs(this.o0,"onPlaylistUpdate")}MY(R){delete this.kR[R.getId()];this.Gk().removeCueRange(R);a:{R=this.getVideoData(); var w=R.O0?.contents?.singleColumnWatchNextResults?.autoplay?.autoplay?.sets||R.O0?.contents?.twoColumnWatchNextResults?.autoplay?.autoplay?.sets;if(w)for(p of w){w=p.autoplayVideo||p.autoplayVideoRenderer?.autoplayEndpointRenderer?.endpoint;const r=g.F(w,g.xo);if(w!=null&&r?.videoId===R.videoId&&r?.continuePlayback){var p=w;break a}}p=null}(R=g.F(p,g.xo))&&g.m1(this.o0,"onPlayVideo",{sessionData:{autonav:"1",itct:p?.clickTrackingParams},videoId:R.videoId,watchEndpoint:R})}NL(R){R!==this.appState&& (R===2&&this.getPresentingPlayerType()===1&&(yz(this,-1),yz(this,5)),this.appState=R,this.o0.publish("appstatechange",R))}NH(R,w,p,r,f){this.Gk().A$(R,w,p,r,f)}isAtLiveHead(R,w=!1){var p=this.Ff({playerType:R});R=Nc(this,p);p=tz(this,p);return R!==p?R.isAtLiveHead(k$(this,p.getCurrentTime(),p),!0):R.isAtLiveHead(void 0,w)}t9(){const R=this.Ff({playerType:void 0});return Nc(this,R).t9()}seekTo(R,w,p,r,f,G){w=w!==!1;r=this.Ff({playerType:r});this.appState===2&&WJ(this);this.b4(r)?et(this)?this.H1.seekTo(R, {seekSource:f},w,p):this.u3.seekTo(R,{seekSource:f},w,p):(this.Y("html5_sabr_csdai_seek_log")||(G=""),r.seekTo(R,{Z4:!w,PO:p,dB:"application"+(G??""),seekSource:f}))}seekBy(R,w,p,r){this.seekTo(this.getCurrentTime()+R,w,p,r,void 0,"_by")}pK(){g.lK(this.o0,"SEEK_COMPLETE")}aI(){g.m1(this.o0,"onAbnormalityDetected")}fK(R){g.m1(this.o0,"onSnackbarMessage",R)}TI(R){const w=this.HS(),p=w.getVideoData();if(this.appState===1||this.appState===2)p.startSeconds=R;this.appState===2?w.getPlayerState().L(512)|| WJ(this):g.lK(this.o0,"SEEK_TO",R)}u5(){this.o0.publish("airplayactivechange")}W5(){this.o0.publish("airplayavailabilitychange")}showAirplayPicker(){this.HS().U5()}v5(){this.o0.publish("beginseeking")}VH(){this.o0.publish("endseeking")}getStoryboardFormat(R){R=this.Ff({playerType:R});return Nc(this,R).getStoryboardFormat()}kG(R){R=this.Ff({playerType:R});return Nc(this,R).getVideoData().kG()}b4(R){R=(R||this.HS()).getVideoData();if(et(this))var w=R===this.H1.playback.getVideoData();else a:{var p= this.u3;if(R===p.L.getVideoData()&&p.C.length)w=!0;else{for(w of p.C)if(R.iU===w.iU){w=!0;break a}w=!1}}return w}cL(R,w,p,r,f,G,I,C){const u=et(this);this.HS().Ty("appattl",{sstm:this.H1?1:0,ssenable:this.getVideoData().enableServerStitchedDai,susstm:u});u?(p=this.H1.Nl(R,w,p,r,f,G,I,C),R=p?.clientPlaybackNonce||"",(this.Y("html5_ssdai_new_decoration_logic")||this.Gk().getVideoData().nD)&&this.Gk().mS(C||{fJ:""},w,p?.clientPlaybackNonce||"")):R=ma_(this.u3,R,p,r,f,G);return R}hE(R,w,p,r,f,G,I,C){et(this)&& (R=this.H1?.Nl(R,w,p,r,f,G,I,C),this.Gk().getVideoData().nD&&this.Gk().mS(C||{fJ:""},w,R?.clientPlaybackNonce||""))}FO(R){(this.Y("html5_ssdai_new_decoration_logic")||this.Gk().getVideoData().nD)&&this.Gk().mS(R,"","");this.H1?.FO(R.fJ||"")}tG(R=-1,w=Infinity){et(this)||jT(this.u3,R,w)}UO(R,w,p){if(et(this)){var r=this.H1,f=p;(p=r.L.Ff(R))?(f===void 0&&(f=p.lU),Mc(r,p,w,f)):r.qP(`Invalid_cpn_${R}_specified`)}else{r=this.u3;let G=null;for(f of r.C)if(f.iU===R){G=f;break}G?(p===void 0&&(p=G.lU),lVI(r, G,w,p)):Y$(r,"InvalidTimelinePlaybackId timelinePlaybackId="+R)}}enqueueVideoByPlayerVars(R,w,p=Infinity,r=""){this.b4();R=new g.ct(this.LB,R);r&&(R.iU=r);ui(this,R,w,p)}queueNextVideo(R,w=1,p=NaN,r="",f=""){R=this.preloadVideoByPlayerVars(R,w,p,r,f);w=this.HS();R&&(this.Y("html5_check_queue_on_data_loaded")?this.V().supportsGaplessShorts()&&w.getVideoData().D&&(p=this.Cz,r=this.xG.K,p.G!==R&&(p.C=w,p.G=R,p.O=1,p.L=R.getVideoData(),p.K=r,p.L.isLoaded()?p.J():p.L.subscribe("dataloaded",p.J,p))):(p= YSr(w,R,this.xG.K),p!=null?(w.Ty("sgap",p),w.getVideoData().D&&w.xP(!1)):(R=R.getVideoData(),w=this.Cz,w.L!==R&&(w.L=R,w.O=1,R.isLoaded()?w.D():w.L.subscribe("dataloaded",w.D,w)))))}Au(R,w,p=0,r=0){Nc(this,this.HS()).BZ();NvL(this.xG,R,w,p,r).then(()=>{g.xs(this.o0,"onQueuedVideoLoaded")},()=>{})}Uu(){return this.xG.Uu()}Pr(R){const w=this.xG.L; return w?w.yc(R):!1}clearQueue(R=!1,w=!1){this.xG.clearQueue(R,w)}loadVideoByPlayerVars(R,w=1,p,r,f,G){var I=this.Gk();if(w===2&&this.Ib().enableServerStitchedDai&&I&&!I.jf())return I.Ty("lvonss",{vid:R?.videoId||"",ptype:w}),!1;var C=!1;I=new g.ct(this.LB,R);I.lD=G;g.Eg(this.LB)&&!I.Ho&&e2(this.Jf);this.Jf.timerName=I.pB??"";this.Jf.Xl("pl_i");this.Y("web_player_early_cpn")&&I.clientPlaybackNonce&&this.Jf.infoGel({clientPlaybackNonce:I.clientPlaybackNonce});PVI(I).supportsVp9Encoding===!1&&this.HS().Ty("noVp9enc", {});if(this.V().supportsGaplessShorts()){G=R6H(this.xG,I,w);if(G==null){yz(this,-1);this.xG.L?.getVideoData().isAd()||LU(this);R=this.xG;R.app.V().Y("html5_gapless_new_slr")?GT(R.app,"gaplessshortslooprange"):R.app.setLoopRange(null);R.app.getVideoData().K4=!0;R.L?.pE();R.L?.Tb();p={dB:"gapless_to_next_video",seekSource:60,UY:R.K.L};r=R.O?.pB()||-1;if(R.K.L){const {kW:z,d2:B}=R.O?.U()||{};B!=null&&z!=null&&(r=B-z+.001)}R.app.HS()?.seekTo(r,p);R.app.getPlayerStateObject(w).isPlaying()||R.app.HS()?.playVideo(!0); SSW(R,r);R.app.HS()?.G0();R.U();return!0}const u=this.Y("html5_shorts_gapless_preload_fallback"),m=this.xG.L;if(u&&m&&!m.cS()){const z=m.getVideoData();this.Oy.J.set(EC(w,z),m,3600)}this.xG.clearQueue(u);this.HS().Ty("sgap",{f:G})}if(f){for(;I.YH.length&&I.YH[0].isExpired();)I.YH.shift();C=I.YH.length-1;C=C>0&&f.C(I.YH[C])&&f.C(I.YH[C-1]);I.YH.push(f)}p||(R&&MZ(R)?(b8(this.LB)&&!this.UR&&(R.fetch=0),rc(this,R)):this.playlist&&rc(this,null),R&&(this.UR=bB(!1,R.external_list)));this.o0.publish("loadvideo"); w=this.r3(I,w,r);C&&this.NH("player.fatalexception",1,"GENERIC_WITH_LINK_AND_CPN",`loadvideo.1;emsg.${I.YH.join()}`.replace(/[;:,]/g,"_"));return w}preloadVideoByPlayerVars(R,w=1,p=NaN,r,f=""){r=On(R);if(r=this.Oy.J.get(`${w}_${r}_${f}_${+(R.autonav==="1"||R.autonav===!0)}${+(R.autoplay==="1"||R.autoplay===!0||R.autoplay===1)}`)||null)return r;R=new g.ct(this.LB,R);f&&(R.iU=f);{f=EC(w,R);r=this.HS();const G=EC(r.getPlayerType(),r.getVideoData());f===G?(r.R5(!0),R.dispose(),w=null):(R.a9=!0,r=CU(this, w,R,!0),(w!==1||!Og(this.LB)||this.LB.Y("html5_allow_multiview_tile_preload")&&R.yh)&&r.R5(!0),this.Oy.J.set(f,r,p||3600),w=r)}return w}setMinimized(R){this.visibility.setMinimized(R);(R=RzI(this.Vv))&&(this.isMinimized()?R.load():R.unload());this.o0.publish("minimized")}setInline(R){this.visibility.setInline(R)}setInlinePreview(R){this.visibility.setInline(R)}VS(R){IBx(this,R)||this.visibility.VS(R)}setSqueezeback(R){this.visibility.setSqueezeback(R)}Mg(){const R=this.mediaElement?.zk();R&&(this.LB.JW&& $3(cQ(()=>document.exitFullscreen()),()=>{}),$3(cQ(()=>X4(R)),()=>{}))}qY(){this.mediaElement.zk(); this.mediaElement.zk().webkitPresentationMode==="picture-in-picture"?this.VS(!0):this.VS(!1)}togglePictureInPicture(){this.HS().togglePictureInPicture()}r3(R,w=1,p){z3("_start",this.Jf.timerName)||g.mJ(rC)(void 0,this.Jf.timerName);let r=!1,f=IW(this,w,R,!1);f?(r=!0,R.dispose(),f.getVideoData().yh&&f.Ty("app_lv",{pdl:f.tK()}),this.Tk().L.vS(o1D)&&(f.getVideoData().eI=R.eI,f.Ty("cpvd",{pas:R.eI}))):(f=CU(this,w,R,!0,p),(this.Y("html5_onesie")||this.Y("html5_load_before_stop"))&&f.kO()&&f.R5(),this.bu.stop(), w===1&&w!==this.getPresentingPlayerType()&&this.cancelPlayback(4),this.cancelPlayback(4,w),this.a5(f));R.videoId&&this.B2.includes(R.videoId)&&f.Ty("mvt",{});f===this.Gk()&&(this.LB.MO=R.oauthToken);if(!f.kO())return!1;if(f===this.Gk())return this.NL(1),R=WJ(this),r&&f.getPlayerType()===1&&f.tK()&&this.Ej("dataloaded",f,f.getVideoData()),R;f.ZQ();return!0}cueVideoByPlayerVars(R,w=1){var p=this.Gk();if(this.Ib().enableServerStitchedDai&&p&&!p.jf()&&R&&Object.keys(R).length>0)p.Ty("qvonss",{vid:R?.videoId|| "",ptype:w});else if(R&&MZ(R))if(this.Jx=!0,rc(this,R),(R=g.Pt(this.playlist))&&R.n$())KU(this,R,w);else this.playlist.onReady(()=>{zT(this)}); else{w||(w=this.getPresentingPlayerType());w===1&&this.tC();p=new g.ct(this.LB,R);const r=g.zI(this.LB)&&!this.LB.S&&w===1&&!p.isAd()&&!p.mq;this.o0.publish("cuevideo",w);r?(this.HS().getVideoData().loading=!0,Nkd(p,R?R:{}).then(f=>{KU(this,f,w)}),p.dispose()):KU(this,p,w)}}WC(R,w,p,r,f,G,I){if(!R&&!p)throw Error("Playback source is invalid"); if(Ba(this.LB)||g.f2(this.LB))return w=w||{},w.lact=r1(),w.vis=this.o0.getVisibilityState(),g.m1(this.o0,"onPlayVideo",{videoId:R,watchEndpoint:G,sessionData:w,listId:p}),!1;i6W(this.Jf);this.Jf.reset();R={video_id:R};r&&(R.autoplay="1");r&&(R.autonav="1");G&&(R.player_params=G.playerParams);I&&(R.oauth_token=I);p?(R.list=p,this.loadPlaylist(R)):this.loadVideoByPlayerVars(R,1);return!0}cuePlaylist(R,w,p,r){this.Jx=!0;C2L(this,R,w,p,r)}loadPlaylist(R,w,p,r){this.Jx=!1;C2L(this,R,w,p,r)}iz(){return this.o0.isMutedByMutedAutoplay()? !1:this.Oy.d_?!0:!(!this.playlist||!this.playlist.hasNext())}nextVideo(R,w){var p=this.Gk().getVideoData().X();g.ar(this.o0)&&p?this.WC(p.videoId,w?p.zB:p.sessionData,p.playlistId,w,void 0,p.pC||void 0):this.UR?g.xs(this.o0,"onPlaylistNext"):this.getPresentingPlayerType()===3?Em(this.Vv).nextVideo():!this.playlist||b8(this.LB)&&!this.o0.isFullscreen()||(this.playlist.hasNext(R)&&ak(this.playlist,huI(this.playlist)),this.playlist.loaded?(R=w&&this.LB.Y("html5_player_autonav_logging"),w&&this.o0.publish("playlistautonextvideo"), this.r3(g.Pt(this.playlist,void 0,w,R),1)):this.Jx=!1)}previousVideo(R){this.UR?g.xs(this.o0,"onPlaylistPrevious"):this.getPresentingPlayerType()===3?Em(this.Vv).oY():!this.playlist||b8(this.LB)&&!this.o0.isFullscreen()||(this.playlist.hasPrevious(R)&&ak(this.playlist,gf6(this.playlist)),this.playlist.loaded?this.r3(g.Pt(this.playlist),1):this.Jx=!1)}playVideoAt(R){this.UR?g.xs(this.o0,"onPlaylistIndex",R):this.playlist&&(this.playlist.loaded?this.r3(g.Pt(this.playlist,R),1):this.Jx=!1,ak(this.playlist, R))}getPlaylist(){return this.playlist}h_(R){this.z0=g.QD(this.z0,r=>r.id!==R); const w=this.Gk(),p=w.D5();for(let r=0;r{xz(this)}):xz(this); this.GY();r_D(this);g.zI(this.LB)&&(R={autoplayBrowserPolicy:z0(),autoplayIntended:Bn(this.getVideoData()),autoplayStatus:bFD(this.getVideoData(),1),cpn:this.getVideoData().clientPlaybackNonce,intentionalPlayback:this.intentionalPlayback},g.Rv("embedsAutoplayStatusChanged",R))}}wO(R){if(this.LB.Y("mweb_client_log_screen_associated"),!Lb(this.LB)){var w=this.screenLayer||(this.isMinimized()?3:0);if((w=g.ut(w))&&w!=="UNDEFINED_CSN"){var p=this.LB.Y("web_player_attach_player_response_ve");const r=this.LB.Y("web_playback_associated_ve"); R={cpn:R,csn:w};this.getVideoData().S&&(p||r)&&(p=g.pF(this.getVideoData().S),g.ju(w,p),r&&(R.playbackVe=p.getAsJson()));this.getVideoData().queueInfo&&(R.queueInfo=this.getVideoData().queueInfo);w={};this.getVideoData().iI&&(w.cttAuthInfo={token:this.getVideoData().iI,videoId:this.getVideoData().videoId});g.Rv("playbackAssociated",R,w)}else g.AO(new g.Id("CSN Missing or undefined during playback association"))}}Am(){this.o0.publish("internalAbandon");LU(this)}onApiChange(){const R=this.HS();this.LB.U? g.lK(this.o0,"onApiChange",R.getPlayerType()):g.lK(this.o0,"onApiChange")}nG(){var R=this.mediaElement;R={volume:g.MN(Math.floor(R.getVolume()*100),0,100),muted:R.PS()};R.muted||ST(this,!1);this.NP=g.ht(R);g.lK(this.o0,"onVolumeChange",R)}mutedAutoplay(R){isNaN(this.Bg)&&(this.Bg=this.getVideoData().startSeconds);const w=this.getVideoData(),p=w.videoId,r={video_id:R?.videoId?R?.videoId:p,playmuted:!0,start:this.Bg,muted_autoplay_duration_mode:R?.durationMode};this.Y("embeds_enable_embed_config_for_muted_autoplay")&& (R?.embedConfig?r.embed_config=Zqd(R.embedConfig):w.B1&&(r.embed_config=w.B1));if(R?.videoId||p)this.loadVideoByPlayerVars(r),g.xs(this.o0,"onMutedAutoplayStarts")}onFullscreenChange(){const R=Mp(this);this.Re(R?1:0);s5_(this,!!R)}Re(R){var w=!!R;const p=!!this.F1()!==w;this.visibility.Re(R);this.template.Re(w);this.Y("html5_media_fullscreen")&&!w&&this.mediaElement&&Mp(this)===this.mediaElement.zk()&&this.mediaElement.S();this.template.resize();p&&this.Jf.tick("fsc");p&&(this.o0.publish("fullscreentoggled", w),R=this.Ib(),w={fullscreen:w,videoId:R.bb||R.videoId,time:this.getCurrentTime()},this.o0.getPlaylistId()&&(w.listId=this.o0.getPlaylistId()),g.lK(this.o0,"onFullscreenChange",w))}Pi(){return this.visibility.Pi()}isFullscreen(){return this.visibility.isFullscreen()}F1(){return this.visibility.F1()}F7(){var R=this.F1();R!==0&&R!==1||this.Re(Mp(this)?1:0);R=window.screen.width*window.screen.height;const w=window.outerHeight*window.outerWidth;this.LB.tW?(this.La=Math.max(this.La,R,w),R=w/this.Lar.videoId??"").filter(r=>!!r)))}sendVideoStatsEngageEvent(R,w,p){w=this.Ff({playerType:w}); ji_(this.LB,R)?w.sendVideoStatsEngageEvent(R,p):p&&p()}h3(R){const w=this.Ff({playerType:void 0});return ji_(this.LB,R)?w.h3(R):null}updatePlaylist(){!b8(this.LB)&&g.zI(this.LB)&&m5(this);g.xs(this.o0,"onPlaylistUpdate")}setSizeStyle(R,w){this.Qu=R;this.Y("web_log_theater_mode_visibility")?this.Pf(w):this.ZE=w;this.o0.publish("sizestylechange",R,w);this.template.resize()}Pf(R){this.visibility.Pf(R)}dY(){return this.Y("web_log_theater_mode_visibility")?this.visibility.dY():this.ZE}isMinimized(){return this.visibility.isMinimized()}isInline(){return this.visibility.isInline()}W0(){return this.visibility.W0()}Mu(){return this.visibility.Mu()}lx(){return this.visibility.lx()}DE(){return this.Qu}getAdState(){if(this.getPresentingPlayerType()=== 3)return Em(this.Vv).getAdState();if(!this.b4()){const R=Ye(this.tf());if(R)return R.getAdState()}return-1}YA(R){var w=this.template.getVideoContentRect();n$(this.ly,w)||(this.ly=w,this.HS().TL(),(w=this.Gk())&&w===this.HS()&&w.TL(),this.F1()===1&&this.Tx&&s5_(this,!0));w=this.L_().Z0!==this.lK;this.lK=this.L_().Z0;this.RP&&g.Zf(this.RP,R)&&!w||(this.o0.publish("appresize",R),this.RP=R)}Wo(){return this.o0.Wo()}OW(){this.getPresentingPlayerType()===2&&this.u3.isManifestless()?xaY(this.u3):(this.H1&& (cV(this.H1),LU(this)),this.BB.jI=(0,g.T)(),bi(this,"signature"))}CK(R){R&&bi(this,"reloadPlayerEvent",void 0,R)}PU(R){this.gY(R);sC(this)}mw(R){if(R.errorCode==="manifest.net.badstatus"){const w=this.LB.experiments.XB("html5_use_network_error_code_enums")?401:"401";R.details.rc===w&&g.m1(this.o0,"onPlayerRequestAuthFailed")}}H5(R){this.o0.publish("heartbeatparams",R)}CE(R){g.m1(this.o0,"onAutonavChangeRequest",R!==1)}XI(){return this.mediaElement}setBlackout(R){if(this.LB.Qk!==R){this.LB.Qk=R;var w= this.HS();w.vX();this.LB.M0&&GBr(this);w.SN(R)}}oI(){const R=this.HS(),w=!this.o0.zz();R.Nt(w)}XX(){g.xs(this.o0,"onLoadedMetadata")}RI(){g.xs(this.o0,"onDrmOutputRestricted")}yP(){this.intentionalPlayback=!0}Gy(){this.Vv.dispose();this.jl.dispose();this.u3.dispose();this.H1&&this.H1.dispose();this.Gk().dispose();this.gY();this.Oy.dispose();g.rG(this.playlist);super.Gy()}Y(R){return this.LB.Y(R)}Tk(){return this.LB.Tk()}aL(){return this.LB.aL()}setScreenLayer(R){this.screenLayer=R}getInternalApi(){return this.o0.getInternalApi()}createSubtitlesModuleIfNeeded(){return this.Vv.createSubtitlesModuleIfNeeded()}isOrchestrationLeader(){const R= iN(this.Vv);return R?R.isOrchestrationLeader():!1}getVideoUrl(R,w,p,r,f){if(this.sQ&&this.sQ.postId)return R=this.LB.getVideoUrl(R),R=OH(R,"v"),R.replace("/watch",`/clip/${this.sQ.postId}`);const G=this.o0.isEmbedsShortsMode()||this.LB.xY==="shortspage",I=g.Ir(this.getVideoData());return this.LB.getVideoUrl(R,w,p,r,f,G,I)}eb(){return this.xG.eb()}qJ(R){return R?this.xG.qJ()&&this.xG.L?.Mw()===R:this.xG.qJ()}wk(R,w,p){this.o0.publish("spsumpreject",R,w,p)}EV(){try{for(const R of Object.values(this.Oy.O))R.cS()|| R.EV();if(this.Y("html5_sabr_fetch_on_idle_network_preloaded_players"))for(const R of SwW(this.Oy.J))R.cS()||R.EV();this.Gk().EV()}catch(R){g.AO(R)}}jH(){if(this.H1){const R=(0,g.T)();return this.H1.jH(R)}return!1}I1(R){let w=this.Gk();R&&(w=zOI(this,R));if(w){var p=w.getVideoData();R=new Map;for(const [r,f]of p.sabrContextUpdates){p=r;const G=f;G.scope===4&&w?.EX(p)&&R.set(p,G)}return R}this.Gk().Ty("scuget",{ncpf:"1",ccpn:R})}y3(R,w){this.Sg.push({key:R,value:w})}};g.rB.prototype.mI=pd(41); g.rB.prototype.UE=pd(16);g.rB.prototype.Xv=pd(10);g.rB.prototype.a7=pd(8);var ps={};var qWP={pA:[{yb:/Unable to load player module/,weight:20},{yb:/Failed to fetch/,weight:500},{yb:/XHR API fetch failed/,weight:10},{yb:/JSON parsing failed after XHR fetch/,weight:10},{yb:/Retrying OnePlatform request/,weight:10},{yb:/CSN Missing or undefined during playback association/,weight:100},{yb:/Non-recoverable error. Do not retry./,weight:0},{yb:/Internal Error. Retry with an exponential backoff./,weight:0},{yb:/API disabled by application./,weight:0},{yb:/Unexpected end of JSON input/, weight:0}],YZ:[{callback:B6W,weight:500}]};var HpY=/[&\?]action_proxy=1/,gPH=/[&\?]token=([\w-]*)/,vPD=/[&\?]video_id=([\w-]*)/,NAb=/[&\?]index=([\d-]*)/,kHd=/[&\?]m_pos_ms=([\d-]*)/,rQ_=/[&\?]vvt=([\w-]*)/,qlW="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(" "),wgP="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(" "),A_d={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"},bN_={desktop:"DESKTOP",phone:"MOBILE",tablet:"TABLET"},pgl={FLAG_AUTO_CAPTIONS_DEFAULT_ON:66,FLAG_AUTOPLAY_DISABLED:140,FLAG_AUTOPLAY_EXPLICITLY_SET:141},AGb=class{constructor(R){this.player=R;this.C=this.L=1}c9(R){this.player.FD().tick(R)}fetch(R,w){if(!R.match(/\[BISCOTTI_ID\]/g))return cJ(this, R,w);const p=this.L===1;p&&this.c9("a_bid_s");var r=xcr();if(r!==null)return p&&this.c9("a_bid_f"),cJ(this,R,w,r);r=lBd();p&&g.ge(r,()=>{this.c9("a_bid_f")}); return r.then(f=>cJ(this,R,w,f))}reset(){this.C=this.L=1}};var b$M={a$0:"replaceUrlMacros",UG:"onAboutThisAdPopupClosed",p8:"executeCommand"};var VTl=class{constructor(R){this.D$=R}Uk(){return"adPingingEndpoint"}Nj(R,w,p){rzI(this.D$.get(),R,w,p)}};var o$_=class{constructor(R){this.B=R}Uk(){return"changeEngagementPanelVisibilityAction"}Nj(R){g.m1(this.B,"changeEngagementPanelVisibility",{changeEngagementPanelVisibilityAction:R})}};var tTI=class{constructor(R){this.D$=R}Uk(){return"loggingUrls"}Nj(R,w,p){for(const r of R)rzI(this.D$.get(),r.baseUrl,w,p,r.attributionSrcMode)}};var yGM=class extends g.f5{constructor(R){super();this.L=R;this.C=MTH(this)}};var c_6=class{constructor(R,w){this.uv=R;this.BS=w}l3(R,w){w={...w,cc:this.uv.G5()};this.uv.B.Ty(R,w)}};var fs=class extends g.f5{constructor(R,w,p,r,f){super();this.C=w;this.s0=p;this.dN=r;this.uU=f;this.listeners=[];const G=new ag(this);g.K(this,G);G.W(R,"internalAbandon",this.O);this.addOnDisposeCallback(()=>{G.C()})}addListener(R){this.listeners.push(R)}removeListener(R){this.listeners=this.listeners.filter(w=>w!==R)}Ap(R,w,p,r,f,G,I,C){if(R==="")MY("Received empty content video CPN in DefaultContentPlaybackLifecycleApi"); else if(R!==this.L||p){this.L=R;this.s0.get().Ap(R,w,p,r,f,G,I,C);this.dN.get().Ap(R,w,p,r,f,G,I,C);this.uU?.get().Ap(R,w,p,r,f,G,I,C);this.C.Ap(R,w,p,r,f,G,I,C);for(const u of this.listeners)u.Ap(R,w,p,r,f,G,I,C)}else MY("Duplicate content video loaded signal")}O(){this.L&&this.Fj(this.L)}Fj(R){this.L=void 0;for(const w of this.listeners)w.Fj(R)}};var G5=class{constructor(R){this.B=R;this.adVideoId=this.L=this.videoId=this.adCpn=this.contentCpn=null;this.K=!0;this.C=this.O=!1;this.adFormat=null;this.G="AD_PLACEMENT_KIND_UNKNOWN";this.actionType="unknown_type";this.videoStreamType="VIDEO_STREAM_TYPE_VOD"}Tt(R,w,p,r,f){n$P(this);this.K=!w&&p===0;const G=this.B.getVideoData({playerType:1}),I=this.B.getVideoData({playerType:2});G&&(this.contentCpn=G.clientPlaybackNonce,this.videoId=G.videoId,this.L=G.iI);I&&(this.adCpn=I.clientPlaybackNonce,this.adVideoId= I.videoId,this.adFormat=I.adFormat);this.G=R;r<=0?(n$P(this),this.K=!w&&p===0):(this.actionType=this.K?w?"unknown_type":"video_to_ad":w?"ad_to_video":"ad_to_ad",this.videoStreamType=f?"VIDEO_STREAM_TYPE_LIVE":"VIDEO_STREAM_TYPE_VOD",this.actionType!=="unknown_type"&&(this.O=!0,z3("_start",this.actionType)&&aBd(this)))}reset(){return new G5(this.B)}};var I9=class extends g.f5{constructor(R){super();this.B=R;this.L=new Map;this.C=new ag(this);g.K(this,this.C);this.C.W(this.B,g.bp("ad"),this.onCueRangeEnter,this);this.C.W(this.B,g.yl("ad"),this.onCueRangeExit,this)}addCueRange(R,w,p,r,f,G=3,I=1,C,u){this.L.has(R)?MY("Tried to register duplicate cue range",void 0,void 0,{CueRangeID:R}):(R=new VEm(R,w,p,r,G,C,u),this.L.set(R.id,{bD:R,listener:f,HN:I}),this.B.C3([R],I))}removeCueRange(R){const w=this.L.get(R);w?(this.B.LS([w.bD],w.HN),this.L.delete(w.bD.id)): MY("Requested to remove unknown cue range",void 0,void 0,{CueRangeID:R})}onCueRangeEnter(R){if(this.L.has(R.id))this.L.get(R.id).listener.onCueRangeEnter(R.id)}onCueRangeExit(R){if(this.L.has(R.id))this.L.get(R.id).listener.onCueRangeExit(R.id)}},VEm=class extends g.Ja{constructor(R,w,p,r,f,G,I){super(w,p,{id:R,namespace:"ad",priority:f,visible:r,associatedClipId:G,markerPositionMs:I})}};var Cs=class{constructor(R){this.B=R}addPlayerResponseForAssociation(R){this.B.addPlayerResponseForAssociation(R)}};var u1=class{constructor(R){this.B=R}gr(R){this.B.gr(R)}};var sG=class{constructor(R){this.B=R}};var nU=null,iNH=class extends g.HC{constructor(){super();this.L={};this.addOnDisposeCallback(()=>{for(const R of Object.keys(this.L))delete this.L[R]})}tv(R){return this.L.hasOwnProperty(R)?this.L[R].tv():{}}}; g.AY("ytads.bulleit.getVideoMetadata",function(R){return dc().tv(R)}); g.AY("ytads.bulleit.triggerExternalActivityEvent",function(R,w,p){var r=dc();p=T6L(p);p!==null&&r.publish(p,{queryId:R,viewabilityString:w})});var mx=class{constructor(R,w,p){this.s0=R;this.B=w;this.BS=p;this.C=new Set;this.L=new Map;dc().subscribe("adactiveviewmeasurable",this.qR,this);dc().subscribe("adfullyviewableaudiblehalfdurationimpression",this.dA,this);dc().subscribe("adviewableimpression",this.vT,this);dc().subscribe("adaudioaudible",this.aS,this);dc().subscribe("adaudiomeasurable",this.uq,this)}Lv(R,w){if(!this.L.has(R))return{};if(w==="seek")return(R=Vh(mG).X(R,{}))&&XS(R),{};w=g$d(w);if(w===null)return{};var p=this.B.Ha();if(!p)return{}; const r=this.B.getPresentingPlayerType(!0);if(!this.B.getVideoData({playerType:r})?.isAd())return{};p={opt_adElement:p,opt_fullscreen:this.s0.get().isFullscreen()};return z8(w,R,p)}D(R,w,p,r,f){this.L.has(R)&&(r<=0||f<=0||Vh(mG).D(R,w,p,r,f))}qR({queryId:R}){this.L.get(R)?.qR()}dA({queryId:R}){this.L.get(R)?.dA()}vT({queryId:R}){this.L.get(R)?.vT()}aS({queryId:R}){this.L.get(R)?.aS()}uq({queryId:R}){this.L.get(R)?.uq()}};var o7b=class{send(R,w,p,r=!1){try{wJH(this,R,w,p,r)}catch(f){}}};var tEa=class extends o7b{constructor(R,w,p,r,f){super();this.G=R;this.K=w;this.L=p;this.C=r;this.O=f}};var O$6=class{constructor(R,w){this.L=R;this.BS=w}send(R,w,p,r){let f=!1;try{if(r==="ATTRIBUTION_SRC_MODE_LABEL_CHROME"||r==="ATTRIBUTION_SRC_MODE_XHR_OPTION")f=!0,R=zsL(R);r=f;var G=g.Cp(R);if(G[1]==="https")var I=R;else G[1]="https",I=It("https",G[2],G[3],G[4],G[5],G[6],G[7]);const C=lAd(I);G=[];const u=Es(I)&&this.BS.get().B.V().experiments.XB("add_auth_headers_to_remarketing_google_dot_com_ping");if(Ke(I)||u)G.push({headerType:"USER_AUTH"}),G.push({headerType:"PLUS_PAGE_ID"}),G.push({headerType:"VISITOR_ID"}), G.push({headerType:"EOM_VISITOR_ID"}),G.push({headerType:"AUTH_USER"}),G.push({headerType:"DATASYNC_ID"});this.L.send({baseUrl:I,scrubReferrer:C,headers:G},w,p,r)}catch(C){}}};var z5=class{constructor(R,w,p,r,f,G,I=new tEa(()=>{const C=R.V(),u=R.getVideoData({playerType:1});return g.$W(C,u?u.J():"")},()=>R.V().pageId,()=>R.V().O0,()=>R.V().datasyncId??"",()=>R.V().experiments)){this.B=R; this.C=w;this.kB=p;this.dN=r;this.qr=f;this.BS=G;this.G=I;this.oW=null;this.L=new Map;this.O=new O$6(I,this.BS)}h3(){return this.B.h3(1)}};var Bq=class extends g.f5{constructor(R,w,p){super();this.B=R;this.WN=w;this.BS=p;this.listeners=[];this.KO=null;this.eD=new Map;w=new g.th(this);g.K(this,w);w.W(R,"videodatachange",this.S4);Dc(R.V().Tk())?w.W(R,"playbackChange",this.Up):w.W(R,"serverstitchedvideochange",this.vR);this.q6=Ut(this)}getAccumulatedWatchTime(){return this.B.getInternalApi().getAccumulatedWatchTime()}G5(){return this.B.getVideoData({playerType:1}).clientPlaybackNonce}addListener(R){this.listeners.push(R)}removeListener(R){this.listeners= this.listeners.filter(w=>w!==R)}Ap(){this.eD.clear(); this.KO=null;this.WN.get().clear()}Fj(){}S4(R,w,p){w.videoId==="nPpU29QrbiU"&&this.B.Ty("ads_ssm_vdc_s",{pt:p,dvt:R});GA(this.BS.get())&&R!=="dataloaded"||Qz(this,w,p)}Up(R){if(this.B.getVideoData({playerType:1}).enableServerStitchedDai)for(const w of R.started){R=this.B.getStartTime({cpn:w.cpn});const p=this.B.getVideoData({cpn:w.cpn}),r=this.B.getPlayerType(w.cpn);let f=null;r===2&&(this.KO=w.cpn,R===void 0?MY("Expected ad video start time on SS video changed"):this.eD.set(w.cpn,R),f=Kl(this.WN.get(), w.cpn));this.B.getVideoData({playerType:1}).Ty("ads_ssvc",{pt:r,cpn:p?.clientPlaybackNonce,crtt:this.B.getCurrentTime({playerType:r,Lo:!1}),atlh:this.B.isAtLiveHead(),adstt:R,pid:w.cpn,slid:f?.layoutId});p&&r?Qz(this,p,r):MY("Expected video data on server stitched video changed",void 0,void 0,{cpn:this.B.getVideoData({playerType:1}).clientPlaybackNonce,timelinePlaybackId:w.cpn})}}vR(R,w){R!==void 0&&(this.KO=R,w===void 0||isNaN(w)?MY("Expected ad video start time on SS video changed"):this.eD.set(R, w));const p=this.B.getPresentingPlayerType(!0),r=this.B.getVideoData({playerType:p}),f=R===void 0?null:Kl(this.WN.get(),R);this.B.getVideoData({playerType:1}).Ty("ads_ssvc",{pt:p,cpn:r?.clientPlaybackNonce,crtt:this.B.getCurrentTime({playerType:1,Lo:!1}),atlh:this.B.isAtLiveHead(),adstt:w,pid:R,slid:f?.layoutId});r?Qz(this,r,p):MY("Expected video data on server stitched video changed",void 0,void 0,{cpn:this.B.getVideoData({playerType:1}).clientPlaybackNonce,timelinePlaybackId:R})}Oa(R,w){const p= R.author,r=R.clientPlaybackNonce,f=R.isListed;var G=R.iU;const I=R.title,C=R.rS,u=R.Vf,m=R.isMdxPlayback,z=R.u8,B=R.mdxEnvironment,W=R.isAutonav,x=R.oA,q=R.Ho,O=R.ZP,e=R.videoId||"",P=R.profilePicture||"",c=R.wy||"",X=R.uB()||!1,Z=R.L$()||!1;R=R.AP||void 0;G=Kl(this.WN.get(),G)||{layoutId:null,slotId:null};var Gr=this.B.getVideoData({playerType:1});const Il=Gr.PB();Gr=Gr.getPlayerResponse();w=1E3*this.B.getDuration({playerType:w});const FW=1E3*this.B.getDuration({playerType:1});return{...G,videoId:e, author:p,clientPlaybackNonce:r,qb:w,Zm:FW,daiEnabled:Gr?.playerConfig?.daiConfig?.enableDai||!1,uY:Gr?.playerConfig?.daiConfig?.enablePreroll||!1,isListed:f,PB:Il,profilePicture:P,title:I,wy:c,rS:C,Vf:u,AP:R,isMdxPlayback:m,u8:z,mdxEnvironment:B,isAutonav:W,oA:x,Ho:q,ZP:O,uB:X,L$:Z}}Gy(){this.listeners.length=0;this.q6=null;super.Gy()}};var Wq=class extends g.f5{constructor(R,w){super();this.B=R;this.dN=w;this.listeners=[];this.Xx=[];this.TB=()=>{MY("Called 'doUnlockPreroll' before it's initialized.")}; w=new ag(this);const p=new g.th(this);g.K(this,p);g.K(this,w);w.W(R,"progresssync",this.C);w.W(R,"presentingplayerstatechange",this.L);w.W(R,"fullscreentoggled",this.onFullscreenToggled);w.W(R,"onVolumeChange",this.onVolumeChange);w.W(R,"minimized",this.jL);w.W(R,"overlayvisibilitychange",this.nS);w.W(R,"shortsadswipe",this.oa);w.W(R,"resize",this.LL);p.W(R,g.bp("appad"),this.yf)}Ap(){this.TB=eE(()=>{this.B.cS()||this.B.lr("ad",1)})}Fj(){}addListener(R){this.listeners.push(R)}removeListener(R){this.listeners= this.listeners.filter(w=>w!==R)}iN(){}playVideo(){this.B.playVideo()}pauseVideo(){this.B.pauseVideo()}resumeVideo(R){this.BN(R)&&this.B.playVideo()}BN(R){return this.B.getPlayerState(R)===2}getCurrentTimeSec(R,w){const p=this.dN.get().KO; return R!==2||w||p===null?this.B.getCurrentTime({playerType:R,Lo:w}):kz(this,p)}getVolume(){return this.B.getVolume()}isMuted(){return this.B.isMuted()}getPresentingPlayerType(){return this.B.getPresentingPlayerType(!0)}getPlayerState(R){return this.B.getPlayerState(R)}getGetAdBreakContext(){return this.B.getGetAdBreakContext()}isFullscreen(){return this.B.isFullscreen()}isAtLiveHead(){return this.B.isAtLiveHead()}eQ(R){this.B.eQ(R)}C(){const R=this.B.getPresentingPlayerType(!0),w=this.getCurrentTimeSec(R, !1);if(R===2)for(const p of this.listeners)p.HF(w);else if(R===1)for(const p of this.Xx)p.iN(w)}L(R){for(const w of this.listeners)w.OR(R,this.getPresentingPlayerType())}onFullscreenToggled(R){for(const w of this.listeners)w.onFullscreenToggled(R)}onVolumeChange(){for(const R of this.listeners)R.onVolumeChange()}jL(){const R=this.B.isMinimized();for(const w of this.listeners)w.jL(R)}nS(R){for(const w of this.listeners)w.nS(R)}LL(){const R=this.B.L_().lA();for(const w of this.listeners)w.DJ(R)}yf(R){for(const w of this.listeners)w.yf(R)}oa(){for(const R of this.listeners)R.oa()}};var OUW=class extends g.f5{constructor(R,w,p,r){super();const f=v(()=>new vl(this.BS)); g.K(this,f);const G=v(()=>new NO(f)); g.K(this,G);const I=v(()=>new dL); g.K(this,I);const C=v(()=>new XC(R)); g.K(this,C);const u=v(()=>new kl(f,G,this.BS)); g.K(this,u);const m=v(()=>new UM); g.K(this,m);this.YB=v(()=>new Bl(r)); g.K(this,this.YB);this.Zf=v(()=>new G5(w)); g.K(this,this.Zf);this.By=v(()=>new I9(w)); g.K(this,this.By);this.vy=v(()=>new Cs(w)); g.K(this,this.vy);this.C$=v(()=>new u1(w)); g.K(this,this.C$);this.BS=v(()=>new sG(w)); g.K(this,this.BS);const z=v(()=>new z$(this.BS)); g.K(this,z);const B=v(()=>new cl(f,u,G,this.BS,z,null,null,null,null)); g.K(this,B);this.dN=v(()=>new Bq(w,m,this.BS)); g.K(this,this.dN);const {qr:W,context:x}=PJ({dN:this.dN,BS:this.BS,L3:z});this.qr=W;this.s0=v(()=>new Wq(w,this.dN)); g.K(this,this.s0);this.kB=v(()=>new mx(this.s0,w,this.BS)); g.K(this,this.kB);this.D$=v(()=>new z5(w,I,this.kB,this.dN,this.qr,this.BS)); g.K(this,this.D$);this.Mk=new $l(C,B,p,R,this.dN,this.s0,this.Zf);g.K(this,this.Mk);const q=new fs(w,this.Mk,this.s0,this.dN);this.JF=v(()=>q); this.RS=q;this.DU=new nf(C,u,this.By,this.JF,x);g.K(this,this.DU);this.J$=new e0(this.BS,C,B,this.dN,this.DU,p,this.vy);g.K(this,this.J$);this.Eu={Sq:new Map,kq:new Map,aG:new Map,NV:new Map,Iz:new Map};this.listeners=[];this.Fg={J$:this.J$,Qm:this.BS.get(),Vk:this.YB.get(),xc:this.s0.get(),Mk:this.Mk,Tn:f.get(),P$:null,l9:{H3(){}},Dx:I.get(),uv:this.dN.get()}}};var K9a=class extends g.f5{constructor(R){super();this.s5=R;this.s5.get().addListener(this)}Gy(){this.s5.cS()||this.s5.get().removeListener(this);super.Gy()}};var x1=class{constructor(R){this.L=R}fetch(R){const {XZ:w,Zc:p,n6:r,cueProcessedMs:f=0}=R;return this.L.fetch(w,{n6:r,bD:p,cueProcessedMs:f}).then(G=>znd(G,p))}};var l1=class extends g.f5{constructor(R){super();this.B=R;this.listeners=[];this.L=new ag(this);g.K(this,this.L);this.L.W(this.B,"aduxclicked",this.onAdUxClicked);this.L.W(this.B,"aduxmouseover",this.gk);this.L.W(this.B,"aduxmouseout",this.sf);this.L.W(this.B,"muteadaccepted",this.C)}addListener(R){this.listeners.push(R)}removeListener(R){this.listeners=this.listeners.filter(w=>w!==R)}cZ(R){W5L(this,R,1)}onAdUxClicked(R,w){UC(this,p=>{p.xF(R,w)})}gk(R){UC(this,w=>{w.R1(R)})}sf(R){UC(this,w=>{w.v3(R)})}C(R){UC(this, w=>{w.n7(R)})}};var E7M=class{constructor(R,w=!1){this.C=R;this.O=w;this.L={}}reduce(R){switch(R.event){case "unknown":return}var w=R.identifier;var p=this.L[w];p?w=p:(p={LH:null,FA:-Infinity},w=this.L[w]=p);p=R.startSecs+R.L/1E3;if(!(pw!==R)}Pc(R){qCd(this,R); if(this.BS.get().B.V().Y("html5_lifa_move_gab_on_continue_or_stop_restriction")&&this.B.getVideoData({playerType:1})?.L$()&&(R.event==="continue"||R.event==="stop")||J_b(this.BS.get())&&this.B.getCurrentTime({playerType:1})===0&&this.B.getVideoData({playerType:1}).L$())return!1;this.K.reduce(R);R=this.G;this.G=!1;return R}J(R){const w=this.B.getVideoData({playerType:1}).isDaiEnabled();if(w||!g.f2(this.B.V()))for(const p of R)qCd(this,p),Cl(this.BS.get())&&this.B.getCurrentTime({playerType:1})===0&& p.event==="start"&&Po(this.D$.get(),"ocuz",`cpi.${p.identifier};cpe.${p.event};cps.${p.startSecs};cpd.${p.W1}`),w?J_b(this.BS.get())&&this.B.getCurrentTime({playerType:1})===0&&this.B.getVideoData({playerType:1}).L$()||this.K.reduce(p):this.B.getCurrentTime({playerType:1})!==0&&p.event==="start"&&(this.BS.get().B.V().experiments.XB("ignore_overlapping_cue_points_on_endemic_live_html5")&&(this.L==null||this.BS.get().B.V().experiments.XB("enable_only_drop_overlapping_cuepoints_with_same_identifier")&& this.L.identifier!==p.identifier?0:p.startSecs+p.W1>=this.L.startSecs&&p.startSecs<=this.L.startSecs+this.L.W1)?(Cl(this.BS.get())&&p.identifier!==this.L?.identifier&&Po(this.D$.get(),"ocud",`ccpi.${p.identifier};ccpe.${p.event};ccps.${p.startSecs}; ccpd.${p.W1};pcpi.${this.L?.identifier};pcpe.${this.L?.event}; pcps.${this.L?.startSecs};pcpd.${this.L?.W1};`),p.identifier!==this.L?.identifier&&MY("Latest Endemic Live Web cue point overlaps with previous cue point")):(this.L=p,lDH(this,p)))}Gy(){this.C!=null&&(this.C.unsubscribe("cuepointupdated",this.J,this),this.C=null);this.listeners.length=0;this.Wf.length=0;super.Gy()}};var qo=class{constructor(R){this.B=R}};var AE=class{constructor(R){this.B=R}cL(R,w,p,r,f,G,I,C){return this.B.cL(R,w,p,r,f,G,I,C!==void 0?{fJ:C}:void 0)}tG(R,w){this.B.tG(R,w)}UO(R,w,p){this.B.UO(R,w,p)}FO(R){this.B.FO({fJ:R})}hE(R,w,p,r,f,G,I,C){this.B.hE(R,w,p,r,f,G,I,C!==void 0?{fJ:C}:void 0)}oG(R){return this.B.oG(R)}finishSegmentByCpn(R,w,p){p=Azd(p);this.B.finishSegmentByCpn(R,w,p)}};var b1=class extends g.f5{constructor(){super(...arguments);this.Go=new Map}};var eWi=class{constructor(R){this.B=R}};var bU_=class extends g.f5{constructor(R,w,p,r,f){super();const G=v(()=>new vl(this.BS)); g.K(this,G);const I=v(()=>new NO(G)); g.K(this,I);const C=v(()=>new dL); g.K(this,C);const u=v(()=>new XC(R)); g.K(this,u);const m=v(()=>new kl(G,I,this.BS)); g.K(this,m);const z=v(()=>new UM); g.K(this,z);this.rB=v(()=>new l1(w)); g.K(this,this.rB);this.YB=v(()=>new Bl(f)); g.K(this,this.YB);this.Zf=v(()=>new G5(w)); g.K(this,this.Zf);this.By=v(()=>new I9(w)); g.K(this,this.By);this.vy=v(()=>new Cs(w)); g.K(this,this.vy);this.C$=v(()=>new u1(w)); g.K(this,this.C$);this.BS=v(()=>new sG(w)); g.K(this,this.BS);const B=v(()=>new x1(r)); g.K(this,B);const W=v(()=>new z$(this.BS)); g.K(this,W);this.YF=v(()=>new qo(w)); g.K(this,this.YF);this.s5=v(()=>new uTY); g.K(this,this.s5);this.dN=v(()=>new Bq(w,z,this.BS)); g.K(this,this.dN);const {qr:x,context:q}=PJ({dN:this.dN,BS:this.BS,L3:W});this.qr=x;this.uU=v(()=>new Ls(w,this.BS,this.D$)); g.K(this,this.uU);this.V2=v(()=>new AE(w)); g.K(this,this.V2);this.s0=v(()=>new Wq(w,this.dN)); g.K(this,this.s0);this.rl=v(()=>new b1); g.K(this,this.rl);const O=v(()=>new cl(G,m,I,this.BS,W,"SLOT_TYPE_ABOVE_FEED",this.s0,this.PK,this.ZZ)); g.K(this,O);this.UK=v(()=>new Wl(this.BS)); this.kB=v(()=>new mx(this.s0,w,this.BS)); g.K(this,this.kB);this.D$=v(()=>new z5(w,C,this.kB,this.dN,this.qr,this.BS)); g.K(this,this.D$);this.kI=new aF(s9,(P,c,X,Z)=>tR(I.get(),P,c,X,Z),u,m,I,W,this.BS,this.dN); g.K(this,this.kI);this.Mk=new $l(u,O,p,R,this.dN,this.s0,this.Zf);g.K(this,this.Mk);const e=new fs(w,this.Mk,this.s0,this.dN,this.uU);this.JF=v(()=>e); this.RS=e;this.PK=new Pl(u,m,this.JF,this.uU,this.s0,this.BS,this.D$,this.V2);g.K(this,this.PK);this.DU=new nf(u,m,this.By,this.JF,q);g.K(this,this.DU);this.J$=new e0(this.BS,u,O,this.dN,this.DU,p,this.vy);g.K(this,this.J$);this.Ia=v(()=>new xl(B,I,W,this.BS,this.D$,this.s0,this.V2)); g.K(this,this.Ia);this.ju=v(()=>new lr); g.K(this,this.ju);this.SW=new FC(R,this.rB,this.BS);g.K(this,this.SW);this.mZ=new Jh(R);g.K(this,this.mZ);this.aB=new XpW(R);g.K(this,this.aB);this.iB=new T$(R,this.JF,q);g.K(this,this.iB);this.qw=new ir(R,this.By,this.s0,this.dN);g.K(this,this.qw);this.cT=new nTI(R,this.dN);g.K(this,this.cT);this.ZZ=new gL(R,this.uU,this.s0,this.D$,this.JF,this.PK);g.K(this,this.ZZ);this.TH=new Qo(R);g.K(this,this.TH);this.lI=new Hl;g.K(this,this.lI);this.Qf=new hh(R);g.K(this,this.Qf);this.cE=new dvx(R);g.K(this, this.cE);this.lI=new Hl;g.K(this,this.lI);this.hj=v(()=>new Zh); g.K(this,this.hj);this.uA=v(()=>new Yl(this.s0)); g.K(this,this.uA);this.Ws=v(()=>new FXb(this.rB,this.D$,R,C,this.kB)); g.K(this,this.Ws);this.Gm=v(()=>new br(this.J$,u,G)); g.K(this,this.Gm);this.tM=v(()=>new yo(this.BS,this.D$,this.TH,this.kB)); g.K(this,this.tM);this.Uv=v(()=>new xv_(R,this.lI,this.TH,this.dN,this.V2,this.s0,this.rl,this.D$,z,this.uU,this.kB,this.UK,this.vy,this.By,this.Zf,this.C$,this.YB,this.YF,this.BS,C,q)); g.K(this,this.Uv);this.jg=v(()=>new HrD(this.s0,this.D$,this.YB,this.BS,this.kB,this.dN)); g.K(this,this.jg);this.L4=v(()=>new oTD(this.rB,this.s0,this.D$,C,this.kB,this.aB,this.cE,this.YB,this.BS,p)); g.K(this,this.L4);this.DN=v(()=>new jS6(this.rB,this.D$,C)); g.K(this,this.DN);this.VY=new K9a(this.s5);g.K(this,this.VY);this.Eu={Sq:new Map([["OPPORTUNITY_TYPE_AD_BREAK_SERVICE_RESPONSE_RECEIVED",this.J$],["OPPORTUNITY_TYPE_LIVE_STREAM_BREAK_SIGNAL",this.PK],["OPPORTUNITY_TYPE_PLAYER_BYTES_MEDIA_LAYOUT_ENTERED",this.kI],["OPPORTUNITY_TYPE_PLAYER_RESPONSE_RECEIVED",this.Mk],["OPPORTUNITY_TYPE_THROTTLED_AD_BREAK_REQUEST_SLOT_REENTRY",this.DU]]),kq:new Map([["SLOT_TYPE_AD_BREAK_REQUEST",this.Ia],["SLOT_TYPE_ABOVE_FEED",this.ju],["SLOT_TYPE_FORECASTING",this.ju], ["SLOT_TYPE_IN_PLAYER",this.ju],["SLOT_TYPE_PLAYER_BYTES",this.ju],["SLOT_TYPE_PLAYER_UNDERLAY",this.ju],["SLOT_TYPE_PLAYBACK_TRACKING",this.ju],["SLOT_TYPE_PLAYER_BYTES_SEQUENCE_ITEM",this.ju]]),aG:new Map([["TRIGGER_TYPE_SKIP_REQUESTED",this.SW],["TRIGGER_TYPE_SURVEY_SUBMITTED",this.SW],["TRIGGER_TYPE_LAYOUT_ID_ENTERED",this.mZ],["TRIGGER_TYPE_LAYOUT_ID_EXITED",this.mZ],["TRIGGER_TYPE_LAYOUT_EXITED_FOR_REASON",this.mZ],["TRIGGER_TYPE_ON_DIFFERENT_LAYOUT_ID_ENTERED",this.mZ],["TRIGGER_TYPE_SLOT_ID_ENTERED", this.mZ],["TRIGGER_TYPE_SLOT_ID_EXITED",this.mZ],["TRIGGER_TYPE_SLOT_ID_FULFILLED_EMPTY",this.mZ],["TRIGGER_TYPE_SLOT_ID_FULFILLED_NON_EMPTY",this.mZ],["TRIGGER_TYPE_SLOT_ID_SCHEDULED",this.mZ],["TRIGGER_TYPE_SLOT_ID_UNSCHEDULED",this.mZ],["TRIGGER_TYPE_ON_DIFFERENT_SLOT_ID_ENTER_REQUESTED",this.mZ],["TRIGGER_TYPE_CLOSE_REQUESTED",this.aB],["TRIGGER_TYPE_BEFORE_CONTENT_VIDEO_ID_STARTED",this.iB],["TRIGGER_TYPE_PROGRESS_PAST_MEDIA_TIME_WITH_OFFSET_RELATIVE_TO_LAYOUT_ENTER",this.qw],["TRIGGER_TYPE_SEEK_FORWARD_PAST_MEDIA_TIME_WITH_OFFSET_RELATIVE_TO_LAYOUT_ENTER", this.qw],["TRIGGER_TYPE_SEEK_BACKWARD_BEFORE_LAYOUT_ENTER_TIME",this.qw],["TRIGGER_TYPE_CONTENT_VIDEO_ID_ENDED",this.qw],["TRIGGER_TYPE_MEDIA_TIME_RANGE",this.qw],["TRIGGER_TYPE_MEDIA_TIME_RANGE_ALLOW_REACTIVATION_ON_USER_CANCELLED",this.qw],["TRIGGER_TYPE_NOT_IN_MEDIA_TIME_RANGE",this.qw],["TRIGGER_TYPE_LIVE_STREAM_BREAK_STARTED",this.cT],["TRIGGER_TYPE_LIVE_STREAM_BREAK_ENDED",this.cT],["TRIGGER_TYPE_ON_LAYOUT_SELF_EXIT_REQUESTED",this.TH],["TRIGGER_TYPE_ON_NEW_PLAYBACK_AFTER_CONTENT_VIDEO_ID", this.iB],["TRIGGER_TYPE_ON_OPPORTUNITY_TYPE_RECEIVED",this.Qf],["TRIGGER_TYPE_TIME_RELATIVE_TO_LAYOUT_ENTER",this.cE],["TRIGGER_TYPE_AD_BREAK_STARTED",this.lI],["TRIGGER_TYPE_LIVE_STREAM_BREAK_SCHEDULED_DURATION_MATCHED",this.ZZ],["TRIGGER_TYPE_LIVE_STREAM_BREAK_SCHEDULED_DURATION_NOT_MATCHED",this.ZZ],["TRIGGER_TYPE_NEW_SLOT_SCHEDULED_WITH_BREAK_DURATION",this.ZZ],["TRIGGER_TYPE_PREFETCH_CACHE_EXPIRED",this.ZZ],["TRIGGER_TYPE_CUE_BREAK_IDENTIFIED",this.ZZ]]),NV:new Map([["SLOT_TYPE_ABOVE_FEED",this.hj], ["SLOT_TYPE_AD_BREAK_REQUEST",this.hj],["SLOT_TYPE_FORECASTING",this.hj],["SLOT_TYPE_IN_PLAYER",this.hj],["SLOT_TYPE_PLAYER_BYTES",this.uA],["SLOT_TYPE_PLAYER_UNDERLAY",this.hj],["SLOT_TYPE_PLAYBACK_TRACKING",this.hj],["SLOT_TYPE_PLAYER_BYTES_SEQUENCE_ITEM",this.hj]]),Iz:new Map([["SLOT_TYPE_ABOVE_FEED",this.Ws],["SLOT_TYPE_AD_BREAK_REQUEST",this.Gm],["SLOT_TYPE_FORECASTING",this.tM],["SLOT_TYPE_PLAYER_BYTES",this.Uv],["SLOT_TYPE_PLAYBACK_TRACKING",this.jg],["SLOT_TYPE_PLAYER_BYTES_SEQUENCE_ITEM", this.jg],["SLOT_TYPE_IN_PLAYER",this.L4],["SLOT_TYPE_PLAYER_UNDERLAY",this.DN]])};this.listeners=[C.get()];this.Fg={J$:this.J$,Qm:this.BS.get(),Vk:this.YB.get(),xc:this.s0.get(),Mk:this.Mk,Tn:G.get(),P$:this.s5.get(),l9:this.SW,Dx:C.get(),uv:this.dN.get()}}};var yzr=class extends g.f5{constructor(R,w,p,r,f){super();const G=v(()=>new vl(this.BS)); g.K(this,G);const I=v(()=>new NO(G)); g.K(this,I);const C=v(()=>new dL); g.K(this,C);const u=v(()=>new XC(R)); g.K(this,u);const m=v(()=>new kl(G,I,this.BS)); g.K(this,m);const z=v(()=>new UM); g.K(this,z);this.rB=v(()=>new l1(w)); g.K(this,this.rB);this.YB=v(()=>new Bl(f)); g.K(this,this.YB);this.Zf=v(()=>new G5(w)); g.K(this,this.Zf);this.By=v(()=>new I9(w)); g.K(this,this.By);this.vy=v(()=>new Cs(w)); g.K(this,this.vy);this.C$=v(()=>new u1(w)); g.K(this,this.C$);this.BS=v(()=>new sG(w)); g.K(this,this.BS);const B=v(()=>new x1(r)); g.K(this,B);const W=v(()=>new z$(this.BS)); g.K(this,W);const x=v(()=>new cl(G,m,I,this.BS,W,null,null,this.PK,this.ZZ)); g.K(this,x);this.YF=v(()=>new qo(w)); g.K(this,this.YF);this.s5=v(()=>new uTY); g.K(this,this.s5);this.dN=v(()=>new Bq(w,z,this.BS)); g.K(this,this.dN);const {qr:q,context:O}=PJ({dN:this.dN,BS:this.BS,L3:W});this.qr=q;this.uU=v(()=>new Ls(w,this.BS,this.D$)); this.s0=v(()=>new Wq(w,this.dN)); g.K(this,this.s0);this.rl=v(()=>new b1); g.K(this,this.rl);this.kB=v(()=>new mx(this.s0,w,this.BS)); g.K(this,this.kB);this.D$=v(()=>new z5(w,C,this.kB,this.dN,this.qr,this.BS)); g.K(this,this.D$);this.UK=v(()=>new Wl(this.BS)); g.K(this,this.UK);this.kI=new aF(s9,(P,c,X,Z)=>tR(I.get(),P,c,X,Z),u,m,I,W,this.BS,this.dN); g.K(this,this.kI);this.Mk=new $l(u,x,p,R,this.dN,this.s0,this.Zf);g.K(this,this.Mk);const e=new fs(w,this.Mk,this.s0,this.dN,this.uU);this.JF=v(()=>e); this.RS=e;this.PK=new Pl(u,m,this.JF,this.uU,this.s0,this.BS,this.D$);g.K(this,this.PK);this.DU=new nf(u,m,this.By,this.JF,O);g.K(this,this.DU);this.J$=new e0(this.BS,u,x,this.dN,this.DU,p,this.vy);g.K(this,this.J$);this.Ia=v(()=>new xl(B,I,W,this.BS,this.D$,this.s0)); g.K(this,this.Ia);this.ju=v(()=>new lr); g.K(this,this.ju);this.SW=new FC(R,this.rB,this.BS);g.K(this,this.SW);this.mZ=new Jh(R);g.K(this,this.mZ);this.aB=new XpW(R);g.K(this,this.aB);this.iB=new T$(R,this.JF,O);g.K(this,this.iB);this.qw=new ir(R,this.By,this.s0,this.dN);g.K(this,this.qw);this.TH=new Qo(R);g.K(this,this.TH);this.Qf=new hh(R);g.K(this,this.Qf);this.cE=new dvx(R);g.K(this,this.cE);this.V2=v(()=>new AE(w)); g.K(this,this.V2);this.lI=new Hl;g.K(this,this.lI);this.ZZ=new gL(R,this.uU,this.s0,this.D$,this.JF,this.PK);g.K(this,this.ZZ);this.hj=v(()=>new Zh); g.K(this,this.hj);this.uA=v(()=>new Yl(this.s0)); g.K(this,this.uA);this.Gm=v(()=>new br(this.J$,u,G)); g.K(this,this.Gm);this.tM=v(()=>new yo(this.BS,this.D$,this.TH,this.kB)); g.K(this,this.tM);this.L4=v(()=>new tAl(this.rB,this.s0,this.D$,C,this.kB,this.aB,this.cE,this.YB,this.BS,p)); g.K(this,this.L4);this.Uv=v(()=>new EM(R,this.lI,this.TH,this.D$,this.kB,this.UK,this.vy,this.dN,this.s0,this.rl,this.By,this.Zf,this.C$,this.YB,this.YF,this.BS,this.V2,O)); g.K(this,this.Uv);this.VY=new K9a(this.s5);g.K(this,this.VY);this.Eu={Sq:new Map([["OPPORTUNITY_TYPE_AD_BREAK_SERVICE_RESPONSE_RECEIVED",this.J$],["OPPORTUNITY_TYPE_LIVE_STREAM_BREAK_SIGNAL",this.PK],["OPPORTUNITY_TYPE_PLAYER_BYTES_MEDIA_LAYOUT_ENTERED",this.kI],["OPPORTUNITY_TYPE_PLAYER_RESPONSE_RECEIVED",this.Mk],["OPPORTUNITY_TYPE_THROTTLED_AD_BREAK_REQUEST_SLOT_REENTRY",this.DU]]),kq:new Map([["SLOT_TYPE_AD_BREAK_REQUEST",this.Ia],["SLOT_TYPE_FORECASTING",this.ju],["SLOT_TYPE_IN_PLAYER",this.ju], ["SLOT_TYPE_PLAYER_BYTES",this.ju]]),aG:new Map([["TRIGGER_TYPE_SKIP_REQUESTED",this.SW],["TRIGGER_TYPE_LAYOUT_ID_ENTERED",this.mZ],["TRIGGER_TYPE_LAYOUT_ID_EXITED",this.mZ],["TRIGGER_TYPE_LAYOUT_EXITED_FOR_REASON",this.mZ],["TRIGGER_TYPE_ON_DIFFERENT_LAYOUT_ID_ENTERED",this.mZ],["TRIGGER_TYPE_SLOT_ID_ENTERED",this.mZ],["TRIGGER_TYPE_SLOT_ID_EXITED",this.mZ],["TRIGGER_TYPE_SLOT_ID_FULFILLED_EMPTY",this.mZ],["TRIGGER_TYPE_SLOT_ID_FULFILLED_NON_EMPTY",this.mZ],["TRIGGER_TYPE_SLOT_ID_SCHEDULED",this.mZ], ["TRIGGER_TYPE_ON_DIFFERENT_SLOT_ID_ENTER_REQUESTED",this.mZ],["TRIGGER_TYPE_CLOSE_REQUESTED",this.aB],["TRIGGER_TYPE_BEFORE_CONTENT_VIDEO_ID_STARTED",this.iB],["TRIGGER_TYPE_CONTENT_VIDEO_ID_ENDED",this.qw],["TRIGGER_TYPE_MEDIA_TIME_RANGE",this.qw],["TRIGGER_TYPE_NOT_IN_MEDIA_TIME_RANGE",this.qw],["TRIGGER_TYPE_ON_LAYOUT_SELF_EXIT_REQUESTED",this.TH],["TRIGGER_TYPE_ON_NEW_PLAYBACK_AFTER_CONTENT_VIDEO_ID",this.iB],["TRIGGER_TYPE_ON_OPPORTUNITY_TYPE_RECEIVED",this.Qf],["TRIGGER_TYPE_TIME_RELATIVE_TO_LAYOUT_ENTER", this.cE],["TRIGGER_TYPE_AD_BREAK_STARTED",this.lI],["TRIGGER_TYPE_LIVE_STREAM_BREAK_SCHEDULED_DURATION_MATCHED",this.ZZ],["TRIGGER_TYPE_LIVE_STREAM_BREAK_SCHEDULED_DURATION_NOT_MATCHED",this.ZZ],["TRIGGER_TYPE_NEW_SLOT_SCHEDULED_WITH_BREAK_DURATION",this.ZZ],["TRIGGER_TYPE_PREFETCH_CACHE_EXPIRED",this.ZZ],["TRIGGER_TYPE_CUE_BREAK_IDENTIFIED",this.ZZ]]),NV:new Map([["SLOT_TYPE_AD_BREAK_REQUEST",this.hj],["SLOT_TYPE_FORECASTING",this.hj],["SLOT_TYPE_IN_PLAYER",this.hj],["SLOT_TYPE_PLAYER_BYTES",this.uA]]), Iz:new Map([["SLOT_TYPE_AD_BREAK_REQUEST",this.Gm],["SLOT_TYPE_FORECASTING",this.tM],["SLOT_TYPE_IN_PLAYER",this.L4],["SLOT_TYPE_PLAYER_BYTES",this.Uv]])};this.listeners=[C.get()];this.Fg={J$:this.J$,Qm:this.BS.get(),Vk:this.YB.get(),xc:this.s0.get(),Mk:this.Mk,Tn:G.get(),P$:this.s5.get(),l9:this.SW,Dx:C.get(),uv:this.dN.get()}}};var Vtx=class extends g.f5{constructor(R,w,p,r,f){super();const G=v(()=>new vl(this.BS)); g.K(this,G);const I=v(()=>new NO(G)); g.K(this,I);const C=v(()=>new dL); g.K(this,C);const u=v(()=>new XC(R)); g.K(this,u);const m=v(()=>new kl(G,I,this.BS)); g.K(this,m);const z=v(()=>new UM); g.K(this,z);this.rB=v(()=>new l1(w)); g.K(this,this.rB);this.YB=v(()=>new Bl(f)); g.K(this,this.YB);this.Zf=v(()=>new G5(w)); g.K(this,this.Zf);this.By=v(()=>new I9(w)); g.K(this,this.By);this.vy=v(()=>new Cs(w)); g.K(this,this.vy);this.C$=v(()=>new u1(w)); g.K(this,this.C$);this.BS=v(()=>new sG(w)); g.K(this,this.BS);const B=v(()=>new x1(r)); g.K(this,B);const W=v(()=>new z$(this.BS)); g.K(this,W);const x=v(()=>new cl(G,m,I,this.BS,W,null,null,null,null)); g.K(this,x);this.YF=v(()=>new qo(w)); g.K(this,this.YF);this.dN=v(()=>new Bq(w,z,this.BS)); g.K(this,this.dN);const {qr:q,context:O}=PJ({dN:this.dN,BS:this.BS,L3:W});this.qr=q;this.s0=v(()=>new Wq(w,this.dN)); g.K(this,this.s0);this.rl=v(()=>new b1); g.K(this,this.rl);this.kB=v(()=>new mx(this.s0,w,this.BS)); g.K(this,this.kB);this.D$=v(()=>new z5(w,C,this.kB,this.dN,this.qr,this.BS)); g.K(this,this.D$);this.UK=v(()=>new Wl(this.BS)); g.K(this,this.UK);this.kI=new aF(s9,(P,c,X,Z)=>tR(I.get(),P,c,X,Z),u,m,I,W,this.BS,this.dN); g.K(this,this.kI);this.Mk=new $l(u,x,p,R,this.dN,this.s0,this.Zf);g.K(this,this.Mk);const e=new fs(w,this.Mk,this.s0,this.dN);this.JF=v(()=>e); this.RS=e;this.DU=new nf(u,m,this.By,this.JF,O);g.K(this,this.DU);this.J$=new e0(this.BS,u,x,this.dN,this.DU,p,this.vy);g.K(this,this.J$);this.Ia=v(()=>new xl(B,I,W,this.BS,this.D$,this.s0)); g.K(this,this.Ia);this.ju=v(()=>new lr); g.K(this,this.ju);this.SW=new FC(R,this.rB,this.BS);g.K(this,this.SW);this.mZ=new Jh(R);g.K(this,this.mZ);this.iB=new T$(R,this.JF,O);g.K(this,this.iB);this.qw=new ir(R,this.By,this.s0,this.dN);g.K(this,this.qw);this.TH=new Qo(R);g.K(this,this.TH);this.Qf=new hh(R);g.K(this,this.Qf);this.V2=v(()=>new AE(w)); g.K(this,this.V2);this.lI=new Hl;g.K(this,this.lI);this.hj=v(()=>new Zh); g.K(this,this.hj);this.uA=v(()=>new Yl(this.s0)); g.K(this,this.uA);this.Gm=v(()=>new br(this.J$,u,G)); g.K(this,this.Gm);this.tM=v(()=>new yo(this.BS,this.D$,this.TH,this.kB)); g.K(this,this.tM);this.k9=v(()=>new hUx(this.rB,this.s0,this.D$,C,p,this.BS)); g.K(this,this.k9);this.Uv=v(()=>new EM(R,this.lI,this.TH,this.D$,this.kB,this.UK,this.vy,this.dN,this.s0,this.rl,this.By,this.Zf,this.C$,this.YB,this.YF,this.BS,this.V2,O)); g.K(this,this.Uv);this.Eu={Sq:new Map([["OPPORTUNITY_TYPE_AD_BREAK_SERVICE_RESPONSE_RECEIVED",this.J$],["OPPORTUNITY_TYPE_PLAYER_BYTES_MEDIA_LAYOUT_ENTERED",this.kI],["OPPORTUNITY_TYPE_PLAYER_RESPONSE_RECEIVED",this.Mk],["OPPORTUNITY_TYPE_THROTTLED_AD_BREAK_REQUEST_SLOT_REENTRY",this.DU]]),kq:new Map([["SLOT_TYPE_AD_BREAK_REQUEST",this.Ia],["SLOT_TYPE_FORECASTING",this.ju],["SLOT_TYPE_IN_PLAYER",this.ju],["SLOT_TYPE_PLAYER_BYTES",this.ju]]),aG:new Map([["TRIGGER_TYPE_SKIP_REQUESTED",this.SW],["TRIGGER_TYPE_LAYOUT_ID_ENTERED", this.mZ],["TRIGGER_TYPE_LAYOUT_ID_EXITED",this.mZ],["TRIGGER_TYPE_LAYOUT_EXITED_FOR_REASON",this.mZ],["TRIGGER_TYPE_ON_DIFFERENT_LAYOUT_ID_ENTERED",this.mZ],["TRIGGER_TYPE_SLOT_ID_ENTERED",this.mZ],["TRIGGER_TYPE_SLOT_ID_EXITED",this.mZ],["TRIGGER_TYPE_SLOT_ID_FULFILLED_EMPTY",this.mZ],["TRIGGER_TYPE_SLOT_ID_FULFILLED_NON_EMPTY",this.mZ],["TRIGGER_TYPE_SLOT_ID_SCHEDULED",this.mZ],["TRIGGER_TYPE_BEFORE_CONTENT_VIDEO_ID_STARTED",this.iB],["TRIGGER_TYPE_CONTENT_VIDEO_ID_ENDED",this.qw],["TRIGGER_TYPE_MEDIA_TIME_RANGE", this.qw],["TRIGGER_TYPE_ON_LAYOUT_SELF_EXIT_REQUESTED",this.TH],["TRIGGER_TYPE_ON_NEW_PLAYBACK_AFTER_CONTENT_VIDEO_ID",this.iB],["TRIGGER_TYPE_ON_OPPORTUNITY_TYPE_RECEIVED",this.Qf],["TRIGGER_TYPE_AD_BREAK_STARTED",this.lI]]),NV:new Map([["SLOT_TYPE_AD_BREAK_REQUEST",this.hj],["SLOT_TYPE_ABOVE_FEED",this.hj],["SLOT_TYPE_FORECASTING",this.hj],["SLOT_TYPE_IN_PLAYER",this.hj],["SLOT_TYPE_PLAYER_BYTES",this.uA]]),Iz:new Map([["SLOT_TYPE_AD_BREAK_REQUEST",this.Gm],["SLOT_TYPE_FORECASTING",this.tM],["SLOT_TYPE_IN_PLAYER", this.k9],["SLOT_TYPE_PLAYER_BYTES",this.Uv]])};this.listeners=[C.get()];this.Fg={J$:this.J$,Qm:this.BS.get(),Vk:this.YB.get(),xc:this.s0.get(),Mk:this.Mk,Tn:G.get(),P$:null,l9:this.SW,Dx:C.get(),uv:this.dN.get()}}};var ozP=class extends g.f5{constructor(R,w,p,r,f){super();const G=v(()=>new vl(this.BS)); g.K(this,G);const I=v(()=>new NO(G)); g.K(this,I);const C=v(()=>new dL); g.K(this,C);const u=v(()=>new XC(R)); g.K(this,u);const m=v(()=>new kl(G,I,this.BS)); g.K(this,m);const z=v(()=>new UM); g.K(this,z);this.dw=v(()=>new eWi(w)); g.K(this,this.dw);this.rB=v(()=>new l1(w)); g.K(this,this.rB);this.YB=v(()=>new Bl(f)); g.K(this,this.YB);this.Zf=v(()=>new G5(w)); g.K(this,this.Zf);this.By=v(()=>new I9(w)); g.K(this,this.By);this.vy=v(()=>new Cs(w)); g.K(this,this.vy);this.C$=v(()=>new u1(w)); g.K(this,this.C$);this.BS=v(()=>new sG(w)); g.K(this,this.BS);const B=v(()=>new x1(r)); g.K(this,B);const W=v(()=>new z$(this.BS)); g.K(this,W);const x=v(()=>new cl(G,m,I,this.BS,W,null,null,null,null)); g.K(this,x);this.YF=v(()=>new qo(w)); g.K(this,this.YF);this.dN=v(()=>new Bq(w,z,this.BS)); g.K(this,this.dN);const {qr:q,context:O}=PJ({dN:this.dN,BS:this.BS,L3:W});this.qr=q;this.s0=v(()=>new Wq(w,this.dN)); g.K(this,this.s0);this.rl=v(()=>new b1); g.K(this,this.rl);this.kB=v(()=>new mx(this.s0,w,this.BS)); g.K(this,this.kB);this.D$=v(()=>new z5(w,C,this.kB,this.dN,this.qr,this.BS)); g.K(this,this.D$);this.UK=v(()=>new Wl(this.BS)); g.K(this,this.UK);this.kI=new aF(FCx,(P,c,X,Z)=>mQd(I.get(),P,c,X,Z),u,m,I,W,this.BS,this.dN); g.K(this,this.kI);this.Mk=new $l(u,x,p,R,this.dN,this.s0,this.Zf);g.K(this,this.Mk);const e=new fs(w,this.Mk,this.s0,this.dN);this.JF=v(()=>e); this.RS=e;this.DU=new nf(u,m,this.By,this.JF,O);g.K(this,this.DU);this.J$=new e0(this.BS,u,x,this.dN,this.DU,p,this.vy);g.K(this,this.J$);this.Ia=v(()=>new xl(B,I,W,this.BS,this.D$,this.s0)); g.K(this,this.Ia);this.ju=v(()=>new lr); g.K(this,this.ju);this.SW=new FC(R,this.rB,this.BS);g.K(this,this.SW);this.mZ=new Jh(R);g.K(this,this.mZ);this.iB=new T$(R,this.JF,O);g.K(this,this.iB);this.qw=new ir(R,this.By,this.s0,this.dN);g.K(this,this.qw);this.TH=new Qo(R);g.K(this,this.TH);this.Qf=new hh(R);g.K(this,this.Qf);this.V2=v(()=>new AE(w)); g.K(this,this.V2);this.lI=new Hl;g.K(this,this.lI);this.hj=v(()=>new Zh); g.K(this,this.hj);this.uA=v(()=>new Yl(this.s0)); g.K(this,this.uA);this.Gm=v(()=>new br(this.J$,u,G)); g.K(this,this.Gm);this.tM=v(()=>new yo(this.BS,this.D$,this.TH,this.kB)); g.K(this,this.tM);this.Uv=v(()=>new EM(R,this.lI,this.TH,this.D$,this.kB,this.UK,this.vy,this.dN,this.s0,this.rl,this.By,this.Zf,this.C$,this.YB,this.YF,this.BS,this.V2,O)); g.K(this,this.Uv);this.HO=v(()=>new KmL(this.rB,this.s0,this.D$,C,this.dw,p,this.dN)); g.K(this,this.HO);this.Eu={Sq:new Map([["OPPORTUNITY_TYPE_AD_BREAK_SERVICE_RESPONSE_RECEIVED",this.J$],["OPPORTUNITY_TYPE_PLAYER_BYTES_MEDIA_LAYOUT_ENTERED",this.kI],["OPPORTUNITY_TYPE_PLAYER_RESPONSE_RECEIVED",this.Mk],["OPPORTUNITY_TYPE_THROTTLED_AD_BREAK_REQUEST_SLOT_REENTRY",this.DU]]),kq:new Map([["SLOT_TYPE_AD_BREAK_REQUEST",this.Ia],["SLOT_TYPE_FORECASTING",this.ju],["SLOT_TYPE_IN_PLAYER",this.ju],["SLOT_TYPE_PLAYER_BYTES",this.ju]]),aG:new Map([["TRIGGER_TYPE_SKIP_REQUESTED",this.SW],["TRIGGER_TYPE_LAYOUT_ID_ENTERED", this.mZ],["TRIGGER_TYPE_LAYOUT_ID_EXITED",this.mZ],["TRIGGER_TYPE_LAYOUT_EXITED_FOR_REASON",this.mZ],["TRIGGER_TYPE_ON_DIFFERENT_LAYOUT_ID_ENTERED",this.mZ],["TRIGGER_TYPE_SLOT_ID_ENTERED",this.mZ],["TRIGGER_TYPE_SLOT_ID_EXITED",this.mZ],["TRIGGER_TYPE_SLOT_ID_FULFILLED_EMPTY",this.mZ],["TRIGGER_TYPE_SLOT_ID_FULFILLED_NON_EMPTY",this.mZ],["TRIGGER_TYPE_SLOT_ID_SCHEDULED",this.mZ],["TRIGGER_TYPE_BEFORE_CONTENT_VIDEO_ID_STARTED",this.iB],["TRIGGER_TYPE_CONTENT_VIDEO_ID_ENDED",this.qw],["TRIGGER_TYPE_MEDIA_TIME_RANGE", this.qw],["TRIGGER_TYPE_ON_LAYOUT_SELF_EXIT_REQUESTED",this.TH],["TRIGGER_TYPE_ON_NEW_PLAYBACK_AFTER_CONTENT_VIDEO_ID",this.iB],["TRIGGER_TYPE_ON_OPPORTUNITY_TYPE_RECEIVED",this.Qf],["TRIGGER_TYPE_AD_BREAK_STARTED",this.lI]]),NV:new Map([["SLOT_TYPE_AD_BREAK_REQUEST",this.hj],["SLOT_TYPE_FORECASTING",this.hj],["SLOT_TYPE_IN_PLAYER",this.hj],["SLOT_TYPE_PLAYER_BYTES",this.uA]]),Iz:new Map([["SLOT_TYPE_AD_BREAK_REQUEST",this.Gm],["SLOT_TYPE_FORECASTING",this.tM],["SLOT_TYPE_IN_PLAYER",this.HO],["SLOT_TYPE_PLAYER_BYTES", this.Uv]])};this.listeners=[C.get()];this.Fg={J$:this.J$,Qm:this.BS.get(),Vk:this.YB.get(),xc:this.s0.get(),Mk:this.Mk,Tn:G.get(),P$:null,l9:this.SW,Dx:C.get(),uv:this.dN.get()}}};var ttI=class extends g.f5{constructor(R,w,p,r,f){super();const G=v(()=>new vl(this.BS)); g.K(this,G);const I=v(()=>new NO(G)); g.K(this,I);const C=v(()=>new dL); g.K(this,C);const u=v(()=>new XC(R)); g.K(this,u);const m=v(()=>new kl(G,I,this.BS)); g.K(this,m);const z=v(()=>new UM); g.K(this,z);this.dw=v(()=>new eWi(w)); g.K(this,this.dw);this.rB=v(()=>new l1(w)); g.K(this,this.rB);this.YB=v(()=>new Bl(f)); g.K(this,this.YB);this.Zf=v(()=>new G5(w)); g.K(this,this.Zf);this.By=v(()=>new I9(w)); g.K(this,this.By);this.vy=v(()=>new Cs(w)); g.K(this,this.vy);this.C$=v(()=>new u1(w)); g.K(this,this.C$);this.BS=v(()=>new sG(w)); g.K(this,this.BS);const B=v(()=>new x1(r)); g.K(this,B);const W=v(()=>new z$(this.BS)); g.K(this,W);this.YF=v(()=>new qo(w)); g.K(this,this.YF);this.dN=v(()=>new Bq(w,z,this.BS)); g.K(this,this.dN);const {qr:x,context:q}=PJ({dN:this.dN,BS:this.BS,L3:W});this.qr=x;this.uU=v(()=>new Ls(w,this.BS,this.D$)); g.K(this,this.uU);this.V2=v(()=>new AE(w)); g.K(this,this.V2);this.s0=v(()=>new Wq(w,this.dN)); g.K(this,this.s0);this.rl=v(()=>new b1); g.K(this,this.rl);const O=v(()=>new cl(G,m,I,this.BS,W,null,this.s0,this.PK,this.ZZ,3)); g.K(this,O);this.UK=v(()=>new Wl(this.BS)); this.kB=v(()=>new mx(this.s0,w,this.BS)); g.K(this,this.kB);this.D$=v(()=>new z5(w,C,this.kB,this.dN,this.qr,this.BS)); g.K(this,this.D$);this.Mk=new $l(u,O,p,R,this.dN,this.s0,this.Zf);g.K(this,this.Mk);const e=new fs(w,this.Mk,this.s0,this.dN,this.uU);this.JF=v(()=>e); this.RS=e;this.kI=new aF(jAd,(P,c,X,Z)=>mQd(I.get(),P,c,X,Z),u,m,I,W,this.BS,this.dN); g.K(this,this.kI);this.PK=new Pl(u,m,this.JF,this.uU,this.s0,this.BS,this.D$,this.V2);g.K(this,this.PK);this.DU=new nf(u,m,this.By,this.JF,q);g.K(this,this.DU);this.J$=new e0(this.BS,u,O,this.dN,this.DU,p,this.vy);g.K(this,this.J$);this.Ia=v(()=>new xl(B,I,W,this.BS,this.D$,this.s0,this.V2)); g.K(this,this.Ia);this.ju=v(()=>new lr); g.K(this,this.ju);this.SW=new FC(R,this.rB,this.BS);g.K(this,this.SW);this.mZ=new Jh(R);g.K(this,this.mZ);this.iB=new T$(R,this.JF,q);g.K(this,this.iB);this.qw=new ir(R,this.By,this.s0,this.dN);g.K(this,this.qw);this.cT=new nTI(R,this.dN);g.K(this,this.cT);this.ZZ=new gL(R,this.uU,this.s0,this.D$,this.JF,this.PK);g.K(this,this.ZZ);this.TH=new Qo(R);g.K(this,this.TH);this.Qf=new hh(R);g.K(this,this.Qf);this.lI=new Hl;g.K(this,this.lI);this.hj=v(()=>new Zh); g.K(this,this.hj);this.uA=v(()=>new Yl(this.s0)); g.K(this,this.uA);this.Gm=v(()=>new br(this.J$,u,G)); g.K(this,this.Gm);this.tM=v(()=>new yo(this.BS,this.D$,this.TH,this.kB)); g.K(this,this.tM);this.Uv=v(()=>new xv_(R,this.lI,this.TH,this.dN,this.V2,this.s0,this.rl,this.D$,z,this.uU,this.kB,this.UK,this.vy,this.By,this.Zf,this.C$,this.YB,this.YF,this.BS,C,q)); g.K(this,this.Uv);this.L4=v(()=>new ETD(this.rB,this.s0,this.D$,C,this.dw,p,this.BS,this.dN)); g.K(this,this.L4);this.Eu={Sq:new Map([["OPPORTUNITY_TYPE_AD_BREAK_SERVICE_RESPONSE_RECEIVED",this.J$],["OPPORTUNITY_TYPE_LIVE_STREAM_BREAK_SIGNAL",this.PK],["OPPORTUNITY_TYPE_PLAYER_BYTES_MEDIA_LAYOUT_ENTERED",this.kI],["OPPORTUNITY_TYPE_PLAYER_RESPONSE_RECEIVED",this.Mk],["OPPORTUNITY_TYPE_THROTTLED_AD_BREAK_REQUEST_SLOT_REENTRY",this.DU]]),kq:new Map([["SLOT_TYPE_AD_BREAK_REQUEST",this.Ia],["SLOT_TYPE_FORECASTING",this.ju],["SLOT_TYPE_IN_PLAYER",this.ju],["SLOT_TYPE_PLAYER_BYTES",this.ju]]),aG:new Map([["TRIGGER_TYPE_SKIP_REQUESTED", this.SW],["TRIGGER_TYPE_LAYOUT_ID_ENTERED",this.mZ],["TRIGGER_TYPE_LAYOUT_ID_EXITED",this.mZ],["TRIGGER_TYPE_LAYOUT_EXITED_FOR_REASON",this.mZ],["TRIGGER_TYPE_ON_DIFFERENT_LAYOUT_ID_ENTERED",this.mZ],["TRIGGER_TYPE_SLOT_ID_ENTERED",this.mZ],["TRIGGER_TYPE_SLOT_ID_EXITED",this.mZ],["TRIGGER_TYPE_SLOT_ID_FULFILLED_EMPTY",this.mZ],["TRIGGER_TYPE_SLOT_ID_FULFILLED_NON_EMPTY",this.mZ],["TRIGGER_TYPE_SLOT_ID_SCHEDULED",this.mZ],["TRIGGER_TYPE_BEFORE_CONTENT_VIDEO_ID_STARTED",this.iB],["TRIGGER_TYPE_CONTENT_VIDEO_ID_ENDED", this.qw],["TRIGGER_TYPE_MEDIA_TIME_RANGE",this.qw],["TRIGGER_TYPE_LIVE_STREAM_BREAK_STARTED",this.cT],["TRIGGER_TYPE_LIVE_STREAM_BREAK_ENDED",this.cT],["TRIGGER_TYPE_ON_LAYOUT_SELF_EXIT_REQUESTED",this.TH],["TRIGGER_TYPE_ON_NEW_PLAYBACK_AFTER_CONTENT_VIDEO_ID",this.iB],["TRIGGER_TYPE_ON_OPPORTUNITY_TYPE_RECEIVED",this.Qf],["TRIGGER_TYPE_AD_BREAK_STARTED",this.lI],["TRIGGER_TYPE_LIVE_STREAM_BREAK_SCHEDULED_DURATION_MATCHED",this.ZZ],["TRIGGER_TYPE_LIVE_STREAM_BREAK_SCHEDULED_DURATION_NOT_MATCHED", this.ZZ],["TRIGGER_TYPE_NEW_SLOT_SCHEDULED_WITH_BREAK_DURATION",this.ZZ],["TRIGGER_TYPE_PREFETCH_CACHE_EXPIRED",this.ZZ],["TRIGGER_TYPE_CUE_BREAK_IDENTIFIED",this.ZZ]]),NV:new Map([["SLOT_TYPE_AD_BREAK_REQUEST",this.hj],["SLOT_TYPE_FORECASTING",this.hj],["SLOT_TYPE_IN_PLAYER",this.hj],["SLOT_TYPE_PLAYER_BYTES",this.uA]]),Iz:new Map([["SLOT_TYPE_AD_BREAK_REQUEST",this.Gm],["SLOT_TYPE_FORECASTING",this.tM],["SLOT_TYPE_PLAYER_BYTES",this.Uv],["SLOT_TYPE_IN_PLAYER",this.L4]])};this.listeners=[C.get()]; this.Fg={J$:this.J$,Qm:this.BS.get(),Vk:this.YB.get(),xc:this.s0.get(),Mk:this.Mk,Tn:G.get(),P$:null,l9:this.SW,Dx:C.get(),uv:this.dN.get()}}};var MEi=class extends g.f5{constructor(R,w,p,r){super();const f=()=>this.C; R.V().experiments.XB("html5_dispose_of_manager_before_dependency")?(this.L=K5_(f,R,w,p,r),this.C=(new CdD(this.L)).O(),g.K(this,this.C),g.K(this,this.L)):(this.L=K5_(f,R,w,p,r),g.K(this,this.L),this.C=(new CdD(this.L)).O(),g.K(this,this.C))}O(){return this.C}};var cGV=class extends azl{G(R){var w=R.content;if(w.componentType==="shopping-companion")switch(R.actionType){case 1:case 2:R=this.L.getVideoData({playerType:1});g.m1(this.L,"updateKevlarOrC3Companion",{contentVideoId:R&&R.videoId,shoppingCompanionCarouselRenderer:w.renderer,layoutId:w.layoutId,macros:w.macros,onLayoutVisibleCallback:w.L,interactionLoggingClientData:w.interactionLoggingClientData});break;case 3:g.m1(this.L,"updateKevlarOrC3Companion",{})}else if(w.componentType==="action-companion")switch(R.actionType){case 1:case 2:R= this.L.getVideoData({playerType:1});g.m1(this.L,"updateKevlarOrC3Companion",{contentVideoId:R&&R.videoId,actionCompanionAdRenderer:w.renderer,layoutId:w.layoutId,macros:w.macros,onLayoutVisibleCallback:w.L,interactionLoggingClientData:w.interactionLoggingClientData});break;case 3:w.renderer&&(w=this.L.getVideoData({playerType:1}),g.m1(this.L,"updateKevlarOrC3Companion",{contentVideoId:w&&w.videoId})),g.m1(this.L,"updateKevlarOrC3Companion",{})}else if(w.componentType==="image-companion")switch(R.actionType){case 1:case 2:R= this.L.getVideoData({playerType:1});g.m1(this.L,"updateKevlarOrC3Companion",{contentVideoId:R&&R.videoId,imageCompanionAdRenderer:w.renderer,layoutId:w.layoutId,macros:w.macros,onLayoutVisibleCallback:w.L,interactionLoggingClientData:w.interactionLoggingClientData});break;case 3:w=this.L.getVideoData({playerType:1}),g.m1(this.L,"updateKevlarOrC3Companion",{contentVideoId:w&&w.videoId}),g.m1(this.L,"updateKevlarOrC3Companion",{})}else if(w.componentType==="top-banner-image-text-icon-buttoned")switch(R.actionType){case 1:case 2:R= this.L.getVideoData({playerType:1});g.m1(this.L,"updateKevlarOrC3Companion",{contentVideoId:R&&R.videoId,topBannerImageTextIconButtonedLayoutViewModel:w.renderer,layoutId:w.layoutId,macros:w.macros,onLayoutVisibleCallback:w.L,interactionLoggingClientData:w.interactionLoggingClientData});break;case 3:w.renderer&&(w=this.L.getVideoData({playerType:1}),g.m1(this.L,"updateKevlarOrC3Companion",{contentVideoId:w&&w.videoId})),g.m1(this.L,"updateKevlarOrC3Companion",{})}else if(w.componentType==="banner-image")switch(R.actionType){case 1:case 2:R= this.L.getVideoData({playerType:1});g.m1(this.L,"updateKevlarOrC3Companion",{contentVideoId:R&&R.videoId,bannerImageLayoutViewModel:w.renderer,layoutId:w.layoutId,macros:w.macros,onLayoutVisibleCallback:w.L,interactionLoggingClientData:w.interactionLoggingClientData});break;case 3:w=this.L.getVideoData({playerType:1}),g.m1(this.L,"updateKevlarOrC3Companion",{contentVideoId:w&&w.videoId}),g.m1(this.L,"updateKevlarOrC3Companion",{})}else if(w.componentType==="ads-engagement-panel")switch(w=w.renderer, R.actionType){case 1:case 2:g.m1(this.L,"updateEngagementPanelAction",w.addAction);g.m1(this.L,"changeEngagementPanelVisibility",w.expandAction);break;case 3:g.m1(this.L,"changeEngagementPanelVisibility",w.hideAction),g.m1(this.L,"updateEngagementPanelAction",w.removeAction)}else if(w.componentType==="ads-engagement-panel-layout"){const p=w.renderer;switch(R.actionType){case 1:case 2:g.m1(this.L,"updateEngagementPanelAction",{action:KF(p.addAction),layoutId:w.layoutId,onLayoutVisibleCallback:w.L, interactionLoggingClientData:w.interactionLoggingClientData});g.m1(this.L,"changeEngagementPanelVisibility",KF(p.expandAction));break;case 3:g.m1(this.L,"changeEngagementPanelVisibility",KF(p.hideAction)),g.m1(this.L,"updateEngagementPanelAction",{action:KF(p.removeAction)})}}}};var PAV=class extends gt{constructor(R,w,p,r,f){super(R,{j:"div",Z:"ytp-ad-timed-pie-countdown-container",N:[{j:"svg",Z:"ytp-ad-timed-pie-countdown",A:{viewBox:"0 0 20 20"},N:[{j:"circle",Z:"ytp-ad-timed-pie-countdown-background",A:{r:"10",cx:"10",cy:"10"}},{j:"circle",Z:"ytp-ad-timed-pie-countdown-inner",A:{r:"5",cx:"10",cy:"10"}},{j:"circle",Z:"ytp-ad-timed-pie-countdown-outer",A:{r:"10",cx:"10",cy:"10"}}]}]},"timed-pie-countdown",w,p,r,f);this.J=this.KB("ytp-ad-timed-pie-countdown-container"); this.G=this.KB("ytp-ad-timed-pie-countdown-inner");this.D=this.KB("ytp-ad-timed-pie-countdown-outer");this.C=Math.ceil(2*Math.PI*5);this.hide()}init(R,w,p){super.init(R,w,p);g.Z2(this.G,"stroke-dasharray",`0 ${this.C}`);this.G.classList.add("ytp-ad-timed-pie-countdown-inner-light");this.D.classList.add("ytp-ad-timed-pie-countdown-outer-light");this.J.classList.add("ytp-ad-timed-pie-countdown-container-upper-right");this.show()}clear(){this.hide()}hide(){Ef(this);super.hide()}show(){KQ(this);super.show()}K(){this.hide()}O(){if(this.L){var R= this.L.getProgressState();R!=null&&R.current!=null&&g.Z2(this.G,"stroke-dasharray",`${R.current/R.seekableEnd*this.C} ${this.C}`)}}};var me_=class extends TW{constructor(R,w,p,r,f,G){super(R,{j:"div",Z:"ytp-ad-action-interstitial",A:{tabindex:"0"},N:[{j:"div",Z:"ytp-ad-action-interstitial-background-container"},{j:"div",Z:"ytp-ad-action-interstitial-slot",N:[{j:"div",Z:"ytp-ad-action-interstitial-instream-info"},{j:"div",Z:"ytp-ad-action-interstitial-card",N:[{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",w,p,r);this.GO=f;this.YQ=G;this.navigationEndpoint=this.L=this.skipButton=this.C=this.actionButton=null;this.jI=this.KB("ytp-ad-action-interstitial-instream-info");this.O0=this.KB("ytp-ad-action-interstitial-image-container");this.J=new i5(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk,"ytp-ad-action-interstitial-image");g.K(this,this.J);this.J.gN(this.O0);this.S=this.KB("ytp-ad-action-interstitial-headline-container"); this.K=new hw(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk,"ytp-ad-action-interstitial-headline");g.K(this,this.K);this.K.gN(this.S);this.D=this.KB("ytp-ad-action-interstitial-description-container");this.O=new hw(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk,"ytp-ad-action-interstitial-description");g.K(this,this.O);this.O.gN(this.D);this.q0=this.KB("ytp-ad-action-interstitial-background-container");this.YY=new i5(this.api,this.layoutId,this.interactionLoggingClientData, this.Vk,"ytp-ad-action-interstitial-background",!0);g.K(this,this.YY);this.YY.gN(this.q0);this.Qk=this.KB("ytp-ad-action-interstitial-action-button-container");this.slot=this.KB("ytp-ad-action-interstitial-slot");this.cw=this.KB("ytp-ad-action-interstitial-card");this.G=new ag;g.K(this,this.G);this.hide()}init(R,w,p){super.init(R,w,p);if(w.image&&w.image.thumbnail)if(w.headline)if(w.description)if(w.backgroundImage&&w.backgroundImage.thumbnail)if(w.actionButton&&g.F(w.actionButton,ky))if(R=w.durationMilliseconds|| 0,typeof R!=="number"||R<=0)g.LF(Error("durationMilliseconds was specified incorrectly in "+`AdActionInterstitialRenderer with a value of: ${R}`));else if(w.navigationEndpoint){var r=this.api.getVideoData({playerType:2});if(r!=null){var f=w.image.thumbnail.thumbnails;f!=null&&f.length>0&&g.fj(g.WD(f[0].url))&&(f[0].url=r.profilePicture,g.fj(g.WD(r.profilePicture))&&UYW(6,"VideoPlayer",239976093,"Expected non-empty profile picture."));f=w.backgroundImage.thumbnail.thumbnails;f!=null&&f.length>0&&g.fj(g.WD(f[0].url))&& (f[0].url=r.EZ());f=w.headline;f!=null&&g.fj(g.WD(f.text))&&(f.text=r.author)}this.J.init(gw("ad-image"),w.image,p);this.K.init(gw("ad-text"),w.headline,p);this.O.init(gw("ad-text"),w.description,p);this.YY.init(gw("ad-image"),w.backgroundImage,p);r=["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.K.element.classList.add("ytp-ad-action-interstitial-headline-light");this.O.element.classList.add("ytp-ad-action-interstitial-description-light"); this.api.V().Y("enable_default_mono_cta_migration_web_client")?r.push("ytp-ad-action-interstitial-action-button-mono-dark"):r.push("ytp-ad-action-interstitial-action-button-dark");this.api.V().C&&(r.push("ytp-ad-action-interstitial-action-button-mobile-companion-size"),this.api.V().Y("enable_default_mono_cta_migration_web_client")?r.push("ytp-ad-action-interstitial-action-button-mono-dark"):r.push("ytp-ad-action-interstitial-action-button-dark"));this.api.V().Y("enable_unified_action_endcap_on_web")&& !this.api.V().C&&(this.api.V().Y("enable_default_mono_cta_migration_web_client")?r.push("ytp-ad-action-interstitial-action-button-unified-mono"):r.push("ytp-ad-action-interstitial-action-button-unified"),this.Qk.classList.add("ytp-ad-action-interstitial-action-button-container-unified"),this.J.element.classList.add("ytp-ad-action-interstitial-image-unified"),this.q0.classList.add("ytp-ad-action-interstitial-background-container-unified"),this.cw.classList.add("ytp-ad-action-interstitial-card-unified"), this.D.classList.add("ytp-ad-action-interstitial-description-container-unified"),this.O.element.classList.add("ytp-ad-action-interstitial-description-unified"),this.S.classList.add("ytp-ad-action-interstitial-headline-container-unified"),this.K.element.classList.add("ytp-ad-action-interstitial-headline-unified"),this.O0.classList.add("ytp-ad-action-interstitial-image-container-unified"),this.jI.classList.add("ytp-ad-action-interstitial-instream-info-unified"),this.slot.classList.add("ytp-ad-action-interstitial-slot-unified")); this.actionButton=new tV(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk,r);g.K(this,this.actionButton);this.actionButton.gN(this.Qk);this.actionButton.init(gw("button"),g.F(w.actionButton,ky),p);Jf(this.actionButton.element);r=QA(this.actionButton.element);iO(this.actionButton.element,r+" This link opens in new tab");this.navigationEndpoint=w.navigationEndpoint;this.G.W(this.O0,"click",this.nB,this);this.G.W(this.D,"click",this.nB,this);this.api.V().C||this.G.W(this.S,"click",this.nB, this);this.L=this.GO?new sB(this.api,R):new RF(R);g.K(this,this.L);if(w.skipButton){(R=g.F(w.skipButton,fmH))&&this.L&&(this.skipButton=new dEb(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk,this.L,this.YQ),g.K(this,this.skipButton),this.skipButton.gN(this.element),this.skipButton.init(gw("skip-button"),R,p));if(p=w.adBadgeRenderer)if(p=g.F(p,rAr))R=new UL(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk,!0),R.gN(this.jI),R.init(gw("simple-ad-badge"),p,this.macros), g.K(this,R);if(p=w.adInfoRenderer)if(p=g.F(p,AW))R=new rj(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk,this.element,void 0,!0),R.gN(this.jI),R.init(gw("ad-info-hover-text-button"),p,this.macros),g.K(this,R)}else w.nonskippableOverlayRenderer&&(R=g.F(w.nonskippableOverlayRenderer,b_))&&this.L&&(this.C=new vU(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk,this.L,!1),g.K(this,this.C),this.C.gN(this.element),this.C.init(gw("ad-preview"),R,p));w.countdownRenderer&& (w=w.countdownRenderer,g.F(w,GmD)&&this.L&&(p=new PAV(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk,this.L),g.K(this,p),p.gN(this.element),p.init(gw("timed-pie-countdown"),g.F(w,GmD),this.macros)));this.show();this.element.focus()}else g.LF(Error("AdActionInterstitialRenderer has no navigation endpoint."));else g.LF(Error("AdActionInterstitialRenderer has no button."));else g.LF(Error("AdActionInterstitialRenderer has no background AdImage."));else g.LF(Error("AdActionInterstitialRenderer has no description AdText.")); else g.LF(Error("AdActionInterstitialRenderer has no headline AdText."));else g.LF(Error("AdActionInterstitialRenderer has no image."))}clear(){this.G.C();this.hide()}show(){Dpr(!0);this.actionButton&&this.actionButton.show();this.skipButton&&this.skipButton.show();this.C&&this.C.show();super.show()}hide(){Dpr(!1);this.actionButton&&this.actionButton.hide();this.skipButton&&this.skipButton.hide();this.C&&this.C.hide();super.hide()}nB(){this.navigationEndpoint&&(this.layoutId?this.Vk.executeCommand(this.navigationEndpoint, this.layoutId):g.LF(Error("Missing layoutId for ad action interstitial.")))}};var wj={iconType:"CLOSE"},IX=new g.dg(320,63),IPb=class extends TW{constructor(R,w,p,r){super(R,{j:"div",Z:"ytp-ad-overlay-slot",N:[{j:"div",Z:"ytp-ad-overlay-container"}]},"invideo-overlay",w,p,r);this.J=[];this.q0=this.S=this.G=this.Qk=this.YY=null;this.nB=!1;this.K=null;this.D=0;R=this.KB("ytp-ad-overlay-container");this.O0=new Nl(R,45E3,6E3,.3,.4);g.K(this,this.O0);this.O=enY(this);g.K(this,this.O);this.O.gN(R);this.C=MtL(this);g.K(this,this.C);this.C.gN(R);this.L=czH(this);g.K(this,this.L);this.L.gN(R); this.hide()}init(R,w,p){super.init(R,w,p);this.G=w;this.J=g.zp(this.G.onClickCommands||[]);this.YY=this.G.onErrorCommand||null;if(R=this.G.contentSupportedRenderer)R=this.G.contentSupportedRenderer,w=this.G.adInfoRenderer||null,g.F(R,Rad)?(this.K=g.Up("ytp-ad-overlay-ad-info-button-container",this.O.element),fT(this,w),R=aD_(this,g.F(R,Rad))):g.F(R,w0r)?(this.K=g.Up("ytp-ad-overlay-ad-info-button-container",this.C.element),fT(this,w),R=$pH(this,g.F(R,w0r))):g.F(R,p0r)?(this.K=g.Up("ytp-ad-overlay-ad-info-button-container", this.L.element),fT(this,w),R=XJY(this,g.F(R,p0r))):(g.LF(Error("InvideoOverlayAdRenderer content could not be initialized.")),R=!1);R&&(this.show(),PiL(this,!0))}clear(){PiL(this,!1);this.O0.reset();this.D=0;this.O.hide();this.logVisibility(this.O.element,!1);this.C.hide();this.logVisibility(this.C.element,!1);this.L.hide();this.logVisibility(this.L.element,!1);this.hide();this.dispose()}cB(){this.Qk&&(this.layoutId?this.Vk.executeCommand(this.Qk,this.layoutId):g.LF(Error("Missing layoutId for invideo_overlay_ad."))); this.api.pauseVideo()}jI(){for(const R of nzr(this))this.layoutId?this.Vk.executeCommand(R,this.layoutId):g.LF(Error("Missing layoutId for invideo_overlay_ad."));this.api.onAdUxClicked("in_video_overlay_close_button",this.layoutId)}mq(){this.nB||this.api.getPlayerState(1)!==2||this.api.playVideo()}dk(){this.nB||this.api.getPlayerState(1)!==2||this.api.playVideo();this.api.dk("invideo-overlay")}Mr(R){R.target===this.K&&g.Up("ytp-ad-button",this.q0.element).click()}};var WYW=class extends gt{constructor(R,w,p,r,f){super(R,{j:"div",Z:"ytp-ad-message-overlay",N:[{j:"div",Z:"ytp-ad-message-slot"}]},"ad-message",w,p,r,f);this.D=-1;this.G=0;this.O0=!1;this.jI=this.KB("ytp-ad-message-slot");this.C=new g.RX({j:"span",Z:"ytp-ad-message-container"});this.C.gN(this.jI);g.K(this,this.C);this.messageText=new hw(this.api,this.layoutId,this.interactionLoggingClientData,r,"ytp-ad-message-text");g.K(this,this.messageText);this.messageText.gN(this.C.element);this.J=new g.HU(this.C, 400,!1,100,()=>{this.hide()}); g.K(this,this.J);this.hide()}init(R,w,p){super.init(R,w,p);R=w.durationMs;this.G=R==null||R===0?0:R+this.L.getProgressState().current*1E3;let r;w.text?r=w.text.templatedAdText:w.staticMessage&&(r=w.staticMessage);this.messageText.init(gw("ad-text"),r,p);this.messageText.gN(this.C.element);this.J.show(100);this.show()}clear(){this.hide()}hide(){dpD(this,!1);super.hide();this.C.hide();this.messageText.hide();Ef(this)}show(){dpD(this,!0);super.show();KQ(this);this.C.show();this.messageText.show()}K(){this.hide()}O(){if(this.L!= null){var R=this.L.getProgressState();R!=null&&R.current!=null&&(R=1E3*R.current,!this.O0&&R>=this.G?(this.J.hide(),this.O0=!0):this.messageText&&this.messageText.isTemplated()&&(R=Math.max(0,Math.ceil((this.G-R)/1E3)),R!==this.D&&(Of(this.messageText,{TIME_REMAINING:String(R)}),this.D=R)))}}};var xed=class extends TW{constructor(R,w,p,r){super(R,{j:"div",Z:"ytp-ad-underlay-companion",N:[{j:"div",Z:"ytp-ad-underlay-side-container",N:[{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",w,p,r);this.actionButton=null;this.jI=this.KB("ytp-ad-underlay-image-container");this.O=new i5(this.api,this.layoutId,this.interactionLoggingClientData, this.Vk,"ytp-ad-underlay-image");g.K(this,this.O);this.O.gN(this.jI);this.O0=this.KB("ytp-ad-underlay-headline-container");this.C=new hw(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk,"ytp-ad-underlay-headline");g.K(this,this.C);this.C.gN(this.O0);this.S=this.KB("ytp-ad-underlay-description-container");this.G=new hw(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk,"ytp-ad-underlay-description");g.K(this,this.G);this.G.gN(this.S);this.D=this.KB("ytp-ad-underlay-action-button-container"); this.L=this.KB("ytp-ad-underlay-side-container");this.hide()}init(R,w,p){super.init(R,w,{});w.image&&w.image.thumbnail?w.headline?w.description?w.actionButton&&g.F(w.actionButton,ky)?(this.O.init(gw("ad-image"),w.image,p),this.C.init(gw("ad-text"),w.headline,p),this.G.init(gw("ad-text"),w.description,p),this.actionButton=new tV(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk,["ytp-ad-underlay-action-button"]),w.backgroundColor&&g.Z2(this.element,"background-color",r8d(w.backgroundColor)), g.K(this,this.actionButton),this.actionButton.gN(this.D),this.actionButton.init(gw("button"),g.F(w.actionButton,ky),p),R=g.Iq(this.api.V().experiments,"player_underlay_video_width_fraction"),this.api.V().Y("place_shrunken_video_on_left_of_player")?(w=this.L,g.fc(w,"ytp-ad-underlay-left-container"),g.pc(w,"ytp-ad-underlay-right-container"),g.Z2(this.L,"margin-left",`${Math.round((R+.02)*100)}%`)):(w=this.L,g.fc(w,"ytp-ad-underlay-right-container"),g.pc(w,"ytp-ad-underlay-left-container")),g.Z2(this.L, "width",`${Math.round((1-R-.04)*100)}%`),this.api.gH()&&this.show(),this.api.addEventListener("playerUnderlayVisibilityChange",this.J.bind(this)),this.api.addEventListener("resize",this.K.bind(this))):g.LF(Error("InstreamAdPlayerUnderlayRenderer has no button.")):g.LF(Error("InstreamAdPlayerUnderlayRenderer has no description AdText.")):g.LF(Error("InstreamAdPlayerUnderlayRenderer has no headline AdText.")):g.LF(Error("InstreamAdPlayerUnderlayRenderer has no image."))}show(){ZUd(!0);this.actionButton&& this.actionButton.show();super.show()}hide(){ZUd(!1);this.actionButton&&this.actionButton.hide();super.hide()}clear(){this.api.removeEventListener("playerUnderlayVisibilityChange",this.J.bind(this));this.api.removeEventListener("resize",this.K.bind(this));this.hide()}onClick(R){super.onClick(R);this.actionButton&&g.lA(this.actionButton.element,R.target)&&this.api.pauseVideo()}J(R){R==="transitioning"?(this.L.classList.remove("ytp-ad-underlay-clickable"),this.show()):R==="visible"?this.L.classList.add("ytp-ad-underlay-clickable"): R==="hidden"&&(this.hide(),this.L.classList.remove("ytp-ad-underlay-clickable"))}K(R){R.width>1200?(this.actionButton.element.classList.add("ytp-ad-underlay-action-button-large"),this.actionButton.element.classList.remove("ytp-ad-underlay-action-button-medium")):R.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.Z2(this.C.element,"font-size",`${R.width/40}px`)}};var jWd=class extends TW{constructor(R,w,p,r,f,G=()=>{}){super(R,{j:"div", Z:"ytp-ad-survey-answer"},"survey-answer",w,p,r);this.index=f;this.onSelected=G;this.L=null;this.toggledLoggingParams="";this.answer=this.KB("ytp-ad-survey-answer");this.hide()}init(R,w,p){super.init(R,w,p);w.toggledLoggingParams&&(this.toggledLoggingParams=w.toggledLoggingParams);w.answer&&g.F(w.answer,ky)?(R=new tV(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk,["ytp-ad-survey-answer-button"],"survey-single-select-answer-button"),R.gN(this.answer),R.init(gw("ytp-ad-survey-answer-button"), g.F(w.answer,ky),p),R.show()):w.answer&&g.F(w.answer,Ml)&&(this.L=new QV(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk,["ytp-ad-survey-answer-toggle-button"]),this.L.gN(this.answer),g.K(this,this.L),this.L.init(gw("survey-answer-button"),g.F(w.answer,Ml),p));this.show()}I0(R){this.layoutId?zE(this.Vk,R,this.layoutId,this.macros):(R=new g.Id("There is undefined layoutId when calling the runCommand method.",{componentType:this.componentType}),g.LF(R))}onClick(R){super.onClick(R); if(this.api.V().Y("supports_multi_step_on_desktop")&&this.index!==null)this.onSelected(this.index)}clear(){this.hide()}};var hn_=class extends TW{constructor(R,w,p,r){super(R,{j:"div",Z:"ytp-ad-survey-none-of-the-above"},"survey-none-of-the-above",w,p,r);this.button=null;this.L=this.KB("ytp-ad-survey-none-of-the-above");this.hide()}init(R,w,p){super.init(R,w,p);w.answer&&g.F(w.answer,Ml)&&(this.button=new QV(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk,["ytp-ad-survey-answer-toggle-button","ytp-ad-survey-none-of-the-above-button"]),this.button.gN(this.L),this.button.init(gw("survey-none-of-the-above-button"), g.F(w.answer,Ml),p));this.show()}};var a2m=class extends tV{constructor(R,w,p,r){const f=["ytp-ad-survey-submit-button"];f.push("ytp-ad-survey-submit-button-rounded");super(R,w,p,r,f,"survey-submit")}init(R,w,p){super.init(R,w,p);R=!1;w.text&&(w=g.Su(w.text),R=!g.fj(w));R||g.AO(Error("No submit text was present in the renderer."))}onClick(R){this.publish("l");super.onClick(R)}};var iUd=class extends TW{constructor(R,w,p,r,f){super(R,{j:"div",Z:"ytp-ad-survey-player-overlay",N:[{j:"div",Z:"ytp-ad-survey-player-overlay-instream-info"},{j:"div",Z:"ytp-ad-survey-player-overlay-skip-preview-submit",N:[{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",w,p,r);this.G=f;this.C=this.L=null;this.O=this.KB("ytp-ad-survey-player-overlay-instream-info"); this.skipOrPreview=this.KB("ytp-ad-survey-player-overlay-skip-or-preview");this.submitButton=this.KB("ytp-ad-survey-player-overlay-submit");g.K(this,this.G);this.hide()}init(R,w,p){super.init(R,w,p);if(R=w.skipOrPreviewRenderer)g.F(R,dS)?(R=g.F(R,dS),p=new CT(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk,this.G,!0),p.gN(this.skipOrPreview),p.init(gw("skip-button"),R,this.macros),g.K(this,p),this.L=p):g.F(R,b_)&&(R=g.F(R,b_),p=new vU(this.api,this.layoutId,this.interactionLoggingClientData, this.Vk,this.G,!1),p.gN(this.skipOrPreview),p.init(gw("ad-preview"),R,this.macros),p.O0.show(100),p.show(),g.K(this,p),this.L=p);this.L==null&&(R=Error("ISAPOR.skipOrPreviewRenderer was not initialized properly."+`ISAPOR: ${JSON.stringify(w)}`),g.LF(R));w.submitButton&&(R=w.submitButton,g.F(R,ky)&&(R=g.F(R,ky),p=new a2m(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk),p.gN(this.submitButton),p.init(gw("survey-submit"),R,this.macros),g.K(this,p),this.C=p));if(R=w.adBadgeRenderer)R= g.F(R,rAr),p=new UL(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk,!0,!0),p.gN(this.O),p.init(gw("simple-ad-badge"),R,this.macros),this.adBadge=p.element,g.K(this,p);if(R=w.adDurationRemaining)R=g.F(R,k56),p=new wL(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk,this.G,void 0,!0),p.gN(this.O),p.init(gw("ad-duration-remaining"),R,this.macros),g.K(this,p);(w=w.adInfoRenderer)&&g.F(w,AW)&&(R=new rj(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk,this.element, void 0,!0),g.K(this,R),this.adBadge!==void 0?this.O.insertBefore(R.element,this.adBadge.nextSibling):R.gN(this.O),R.init(gw("ad-info-hover-text-button"),g.F(w,AW),this.macros));this.show()}clear(){this.hide()}};var $1M=class extends TW{constructor(R,w,p,r,f,G=()=>{}){super(R,{j:"div", Z:"ytp-ad-survey-question",N:[{j:"div",E0:["ytp-ad-survey-question-text","ytp-ad-survey-question-foreground"]},{j:"div",E0:["ytp-ad-survey-answers","ytp-ad-survey-question-foreground"]},{j:"div",E0:["ytp-ad-survey-question-player-overlay","ytp-ad-survey-question-foreground"]},{j:"div",Z:"ytp-ad-survey-question-background"}]},f,w,p,r);this.O0=G;this.O=null;this.C=[];this.L=null;this.J=this.api.V().experiments.XB("a11y_h5_associate_survey_question");this.question=this.KB("ytp-ad-survey-question");this.YY= this.KB("ytp-ad-survey-question-background");this.questionText=this.KB("ytp-ad-survey-question-text");this.answers=this.KB("ytp-ad-survey-answers");this.playerOverlay=this.KB("ytp-ad-survey-question-player-overlay");this.G=Date.now()}init(R,w,p){super.init(R,w,p);YCI(this)}show(){this.G=Date.now();super.show()}D(){}};var SC_=class extends $1M{constructor(R,w,p,r,f){super(R,w,p,r,"survey-question-multi-select");this.S=f;this.noneOfTheAbove=null;this.submitEndpoints=[];this.K=null;this.hide()}init(R,w,p){super.init(R,w,p);w.questionText&&F5Y(this,w.questionText);w.answers&&w.answers.forEach((r,f)=>{g.F(r,OL)&&Jzl(this,g.F(r,OL),p,f)}); this.K=new Set(this.C.map(r=>r.L.L)); (R=w.noneOfTheAbove)&&(R=g.F(R,SGL))&&gzP(this,R,p);w.surveyAdQuestionCommon&&QWP(this,w.surveyAdQuestionCommon);w.submitEndpoints&&(this.submitEndpoints=w.submitEndpoints);this.W(this.element,"change",this.onChange);this.show()}D(){uw(this.O,zc(this),!1);this.O.C.subscribe("l",this.jI,this)}onChange(R){R.target===this.noneOfTheAbove.button.L?HUY(this):this.K.has(R.target)&&(this.noneOfTheAbove.button.toggleButton(!1),uw(this.O,zc(this),!0))}jI(){const R=[],w=this.C.reduce((r,f,G)=>{const I=f.toggledLoggingParams; f.L&&f.L.isToggled()&&I&&(r.push(I),R.push(G));return r},[]).join("&"),p=this.submitEndpoints.map(r=>{if(!r.loggingUrls)return r; r=g.Hk(r);r.loggingUrls=r.loggingUrls.map(f=>{f.baseUrl&&(f.baseUrl=y7(f.baseUrl,w));return f}); return r}); if(p)for(const r of p)this.layoutId?zE(this.Vk,r,this.layoutId,this.macros):g.LF(Error("Missing layoutId for multi_select_question."));this.api.V().Y("supports_multi_step_on_desktop")&&this.S(R)}clear(){this.api.V().Y("enable_hide_on_clear_in_survey_question_bulleit")?this.hide():this.dispose()}};var Up6=class extends $1M{constructor(R,w,p,r,f){super(R,w,p,r,"survey-question-single-select",G=>{this.api.V().Y("supports_multi_step_on_desktop")&&f([G])}); this.hide()}init(R,w,p){super.init(R,w,p);w.questionText&&F5Y(this,w.questionText);w.answers&&w.answers.forEach((r,f)=>{g.F(r,OL)&&Jzl(this,g.F(r,OL),p,f)}); w.surveyAdQuestionCommon?QWP(this,w.surveyAdQuestionCommon):qb(Error("SurveyAdQuestionCommon was not sent."+`SingleSelectQuestionRenderer: ${JSON.stringify(w)}`));this.show()}clear(){this.api.V().Y("enable_hide_on_clear_in_survey_question_bulleit")?this.hide():this.dispose()}};var sXI=class extends TW{constructor(R,w,p,r){super(R,{j:"div",Z:"ytp-ad-survey",N:[{j:"div",Z:"ytp-ad-survey-questions"}]},"survey",w,p,r);this.questions=[];this.C=[];this.conditioningRules=[];this.L=0;this.K=this.KB("ytp-ad-survey-questions");this.api.V().Y("fix_survey_color_contrast_on_destop")&&this.KB("ytp-ad-survey").classList.add("color-contrast-fix");this.api.V().Y("web_enable_speedmaster")&&this.KB("ytp-ad-survey").classList.add("relative-positioning-survey");this.hide()}init(R,w,p){super.init(R, w,p);this.api.V().Y("supports_multi_step_on_desktop")?(this.conditioningRules=w.conditioningRules??[],this.C=w.questions??[],w.questions?.length&&kTr(this,0)):(w.questions||[]).forEach(r=>{g.F(r,Lt)?vzH(this,g.F(r,Lt),p):g.F(r,l_)&&NcP(this,g.F(r,l_),p)}); this.show()}clear(){this.api.V().Y("enable_hide_on_clear_in_survey_question_bulleit")?this.hide():(this.hide(),this.dispose())}G(R){if(this.api.V().Y("supports_multi_step_on_desktop"))if(this.conditioningRules?.length){let w;if(R.length===0)this.api.onAdUxClicked("ad-action-submit-survey",this.layoutId);else if(this.conditioningRules.find(p=>p.questionIndex===this.L)==null)g.LF(Error("Expected conditioning rule(s) for survey question.")),this.api.onAdUxClicked("ad-action-submit-survey",this.layoutId); else if(this.conditioningRules.forEach(p=>{if(p.questionIndex===this.L)switch(p.condition){case "CONDITION_ALL_OF":p.answerIndices?.every(r=>R.includes(r))&&(w=p.nextQuestionIndex); break;case "CONDITION_ANY_OF":p.answerIndices?.some(r=>R.includes(r))&&(w=p.nextQuestionIndex); break;default:g.LF(Error("Expected specified condition in survey conditioning rules."))}}),w!=null)kTr(this,w); else this.api.onAdUxClicked("ad-action-submit-survey",this.layoutId)}else this.questions.length>1&&g.LF(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 Bj_=class extends TW{constructor(R,w,p,r){super(R,{j:"div",Z:"ytp-ad-survey-interstitial",N:[{j:"div",Z:"ytp-ad-survey-interstitial-contents",N:[{j:"div",Z:"ytp-ad-survey-interstitial-logo",N:[{j:"div",Z:"ytp-ad-survey-interstitial-logo-image"}]},{j:"div",Z:"ytp-ad-survey-interstitial-text"}]}]},"survey-interstitial",w,p,r);this.L=this.actionButton=null;this.interstitial=this.KB("ytp-ad-survey-interstitial");this.C=this.KB("ytp-ad-survey-interstitial-contents");this.text=this.KB("ytp-ad-survey-interstitial-text"); this.logoImage=this.KB("ytp-ad-survey-interstitial-logo-image");this.transition=new g.HU(this,500,!1,300);g.K(this,this.transition)}init(R,w,p){super.init(R,w,p);R=w.timeoutSeconds||0;if(typeof R!=="number"||R<0)g.LF(Error("timeoutSeconds was specified incorrectly in "+`SurveyTextInterstitialRenderer with a value of: ${R}`));else if(w.timeoutCommands)if(w.text)if(w.ctaButton&&g.F(w.ctaButton,ky))if(w.brandImage)if(w.backgroundImage&&g.F(w.backgroundImage,UE)&&g.F(w.backgroundImage,UE).landscape){this.layoutId|| g.LF(Error("Missing layoutId for survey interstitial."));RbH(this.interstitial,g.F(w.backgroundImage,UE).landscape);RbH(this.logoImage,w.brandImage);g.L$(this.text,g.Su(w.text));var r=["ytp-ad-survey-interstitial-action-button"];r.push("ytp-ad-survey-interstitial-action-button-rounded");this.actionButton=new tV(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk,r);g.K(this,this.actionButton);this.actionButton.gN(this.C);this.actionButton.init(gw("button"),g.F(w.ctaButton,ky),p);this.actionButton.show(); this.L=new sB(this.api,R*1E3);this.L.subscribe("g",()=>{this.transition.hide()}); g.K(this,this.L);this.W(this.element,"click",f=>{const G=f.target===this.interstitial;f=this.actionButton.element.contains(f.target);if(G||f)if(this.transition.hide(),G)this.api.onAdUxClicked(this.componentType,this.layoutId)}); this.transition.show(100)}else g.LF(Error("SurveyTextInterstitialRenderer has no landscape background image."));else g.LF(Error("SurveyTextInterstitialRenderer has no brandImage."));else g.LF(Error("SurveyTextInterstitialRenderer has no button."));else g.LF(Error("SurveyTextInterstitialRenderer has no text."));else g.LF(Error("timeoutSeconds was specified yet no timeoutCommands where specified"))}clear(){this.hide()}show(){wuH(!0);super.show()}hide(){wuH(!1);super.hide()}};var XcV=class extends gt{constructor(R,w,p,r,f,G=0){super(R,{j:"div",Z:"ytp-preview-ad",N:[{j:"div",Z:"ytp-preview-ad__text"}]},"preview-ad",w,p,r,f);this.YY=G;this.C=0;this.O0=-1;this.G=this.KB("ytp-preview-ad__text");switch(this.YY){case 1:this.G.classList.add("ytp-preview-ad__text--font--small")}this.transition=new g.HU(this,400,!1,100,()=>{this.hide()}); g.K(this,this.transition);this.hide()}init(R,w){super.init(R,w,{});if(w.durationMilliseconds){if(w.durationMilliseconds<0){g.LF(Error("DurationMilliseconds was specified incorrectly in "+`AdPreview with a value of: ${w.durationMilliseconds}`));return}this.C=w.durationMilliseconds}else this.C=this.L.jO();!w.previewText?.text||g.fj(w.previewText.text)?g.LF(Error("No text is returned for AdPreview.")):(this.jI=w.previewText,w.previewText.isTemplated||g.L$(this.G,w.previewText.text),this.api.getVideoData({playerType:1})?.cf&& w.previewImage?(R=tB(w.previewImage?.sources||[],52,!1)?.url||"")&&R.length?(this.previewImage=new g.RX({j:"img",Z:"ytp-preview-ad__image",A:{src:"{{imageUrl}}"}}),this.previewImage.updateValue("imageUrl",R),g.K(this,this.previewImage),this.previewImage.gN(this.element)):g.LF(Error("Failed to get imageUrl in AdPreview.")):this.G.classList.add("ytp-preview-ad__text--padding--wide"))}clear(){this.hide()}hide(){Ef(this);super.hide()}show(){KQ(this);super.show()}K(){this.hide()}O(){if(this.L){var R=this.L.getProgressState(); if(R?.current)if(R=1E3*R.current,R>=this.C)this.J();else if(this.jI?.isTemplated&&(R=Math.max(0,Math.ceil((this.C-R)/1E3)),R!==this.O0)){const w=this.jI?.text?.replace("{TIME_REMAINING}",String(R));w&&g.L$(this.G,w);this.O0=R}}}J(){this.transition.hide()}D(){this.transition.show(100);this.show()}};var y3=class extends TW{constructor(R,w,p,r){super(R,{j:"img",Z:"ytp-ad-avatar"},"ad-avatar",w,p,r);this.hide()}init(R,w){super.init(R,w,{});var p=tB(w.image?.sources||[],puD(w),!0)?.url||"";if(p&&p.length){R=this.KB("ytp-ad-avatar");R.src=p;if(p=w.interaction?.accessibility?.label)R.alt=p;switch(w.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(w.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.LF(Error("Failed to get imageUrl in AdAvatar."))}clear(){this.hide()}onClick(R){super.onClick(R)}};var V3=class extends TW{constructor(R,w,p,r,f=!1){super(R,{j:"button",Z:"ytp-ad-button-vm"},"ad-button",w,p,r);this.buttonText=this.buttonIcon=null;this.hide();this.forceDarkTheme=f}init(R,w){super.init(R,w,{});var p=w.label?.content;if((R=p!=null&&!g.fj(p))||w.iconImage){R&&(this.buttonText=new g.RX({j:"span",Z:"ytp-ad-button-vm__text",fB:p}),g.K(this,this.buttonText),this.buttonText.gN(this.element));(p=w.interaction?.accessibility?.label||R?p:"")&&iO(this.element,`${p} This link opens in new tab`); Jf(this.element);if(w.iconImage){p=void 0;if(w.iconImage){a:{var r=w.iconImage;if(r.sources)for(f of r.sources)if(f.clientResource?.imageName||f.customImageSource&&g.F(f.customImageSource,JAI)?.clientResource?.icon)break a;var f=void 0}f&&(p={iconType:f.clientResource?.imageName})}f=qY(p,!1,!1);f!=null&&(this.buttonIcon=new g.RX({j:"span",Z:"ytp-ad-button-vm__icon",N:[f]}),g.K(this,this.buttonIcon),w.iconLeading?(Wc(this.element,this.buttonIcon.element,0),this.buttonIcon.element.classList.add("ytp-ad-button-vm__icon--leading")): R?(this.buttonIcon.gN(this.element),this.buttonIcon.element.classList.add("ytp-ad-button-vm__icon--trailing")):(this.buttonIcon.gN(this.element),this.element.classList.add("ytp-ad-button-vm--icon-only")))}switch(w.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.Y("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(w.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.AO(Error("AdButton does not have label or an icon."))}clear(){this.hide()}onClick(R){super.onClick(R)}};var n7b=class extends gt{constructor(R,w,p,r,f){super(R,{j:"div",E0:["ytp-ad-avatar-lockup-card--inactive","ytp-ad-avatar-lockup-card"],N:[{j:"div",Z:"ytp-ad-avatar-lockup-card__avatar_and_text_container",N:[{j:"div",Z:"ytp-ad-avatar-lockup-card__text_container"}]}]},"ad-avatar-lockup-card",w,p,r,f);this.startMilliseconds=0;this.adAvatar=new y3(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk);g.K(this,this.adAvatar);Wc(this.element,this.adAvatar.element,0);this.headline=new rL(this.api, this.layoutId,this.interactionLoggingClientData,this.Vk);g.K(this,this.headline);this.headline.gN(this.KB("ytp-ad-avatar-lockup-card__text_container"));this.headline.element.classList.add("ytp-ad-avatar-lockup-card__headline");this.description=new rL(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk);g.K(this,this.description);this.description.gN(this.KB("ytp-ad-avatar-lockup-card__text_container"));this.description.element.classList.add("ytp-ad-avatar-lockup-card__description");this.adButton= new V3(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk);g.K(this,this.adButton);this.adButton.gN(this.element);this.hide()}init(R,w){super.init(R,w,{});if(R=g.F(w.avatar,Bu)){var p=w.headline;if(p){var r=w.description;if(r){var f=g.F(w.button,xG);f?(this.adAvatar.init(gw("ad-avatar"),R),this.headline.init(gw("ad-simple-attributed-string"),new pf(p)),this.description.init(gw("ad-simple-attributed-string"),new pf(r)),p.content&&p.content.length>20&&this.description.element.classList.add("ytp-ad-avatar-lockup-card__description--hidden--in--small--player"), this.adButton.init(gw("ad-button"),f),this.startMilliseconds=w.startMs||0,this.api.gH()||this.show(),this.api.addEventListener("playerUnderlayVisibilityChange",this.C.bind(this)),KQ(this)):g.LF(Error("No AdButtonViewModel is returned in PlayerAdAvatarLockupCardButtonedViewModel."))}else g.LF(Error("No description is returned in PlayerAdAvatarLockupCardButtonedViewModel."))}else g.LF(Error("No headline is returned in PlayerAdAvatarLockupCardButtonedViewModel."))}else g.LF(Error("No AdAvatarViewModel is returned in PlayerAdAvatarLockupCardButtonedViewModel."))}O(){if(this.L){var R= this.L.getProgressState();R&&R.current&&1E3*R.current>=this.startMilliseconds&&(Ef(this),this.element.classList.remove("ytp-ad-avatar-lockup-card--inactive"))}}K(){this.clear()}onClick(R){this.api.pauseVideo();super.onClick(R)}clear(){this.hide();this.api.removeEventListener("playerUnderlayVisibilityChange",this.C.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()}C(R){R==="hidden"?this.show():this.hide()}};var d1m=class extends TW{constructor(R,w,p,r){super(R,{j:"button",Z:"ytp-skip-ad-button",N:[{j:"div",Z:"ytp-skip-ad-button__text"}]},"skip-button",w,p,r);this.C=!1;this.K=this.KB("ytp-skip-ad-button__text");this.transition=new g.HU(this,500,!1,100,()=>{this.hide()}); g.K(this,this.transition);this.L=new Nl(this.element,15E3,5E3,.5,.5,!0);g.K(this,this.L);this.hide()}init(R,w){super.init(R,w,{});if(!w.label||g.fj(w.label))g.LF(Error("No label is returned for SkipAdButton."));else if(g.L$(this.K,w.label),R=qY({iconType:"SKIP_NEXT_NEW"},!1,!1,this.api.Y("delhi_modern_web_player_icons")),R==null)g.LF(Error("Unable to retrieve icon for SkipAdButton"));else if(this.O=new g.RX({j:"span",Z:"ytp-skip-ad-button__icon",N:[R]}),g.K(this,this.O),this.O.gN(this.element),this.api.V().experiments.XB("enable_skip_to_next_messaging")&& (w=g.WD(w.targetId)))this.C=!0,this.element.setAttribute("data-tooltip-target-id",w),this.element.setAttribute("data-tooltip-target-fixed","")}onClick(R){R&&R.preventDefault();gpI(R,{contentCpn:this.api.getVideoData({playerType:1})?.clientPlaybackNonce??""})===0?g.m1(this.api,"onAbnormalityDetected"):(super.onClick(R),g.m1(this.api,"onAdSkip"),this.api.onAdUxClicked(this.componentType,this.layoutId))}clear(){this.L.reset();this.hide()}hide(){super.hide()}show(){this.L.start();super.show();this.C&& this.api.V().experiments.XB("enable_skip_to_next_messaging")&&this.api.publish("showpromotooltip",this.element)}G(){this.transition.show();this.show()}};var Z$t=class extends gt{constructor(R,w,p,r,f){super(R,{j:"div",Z:"ytp-skip-ad"},"skip-ad",w,p,r,f);this.skipOffsetMilliseconds=0;this.isSkippable=!1;this.G=new d1m(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk);g.K(this,this.G);this.G.gN(this.element);this.hide()}init(R,w){super.init(R,w,{});R=g.F(w.preskipState,B7r);if(this.api.getVideoData()?.isDaiEnabled()){if(!R){g.LF(Error("No AdPreviewViewModel is returned in SkipAdViewModel."));return}this.C=new XcV(this.api,this.layoutId, this.interactionLoggingClientData,this.Vk,this.L);g.K(this,this.C);this.C.gN(this.element);this.C?.init(gw("preview-ad"),R);this.C?.D()}(R=g.F(w.skippableState,xtP))?(w.skipOffsetMilliseconds!=null?this.skipOffsetMilliseconds=w.skipOffsetMilliseconds:(g.AO(Error("No skipOffsetMilliseconds is returned in SkipAdViewModel.")),this.skipOffsetMilliseconds=5E3),this.G.init(gw("skip-button"),R),this.show()):g.LF(Error("No SkipAdButtonViewModel is returned in SkipAdViewModel."))}show(){KQ(this);super.show()}hide(){!this.isSkippable&& this.C?this.C.hide():this.G&&this.G.hide();Ef(this);super.hide()}clear(){this.C?.clear();this.G&&this.G.clear();Ef(this);super.hide()}K(){this.hide()}O(){1E3*this.L.getProgressState().current>=this.skipOffsetMilliseconds&&!this.isSkippable&&(this.isSkippable=!0,this.C?.J(),this.G?.G())}};var YWM=class extends TW{constructor(R,w,p,r){super(R,{j:"div",Z:"ytp-visit-advertiser-link"},"visit-advertiser-link",w,p,r);this.hide()}init(R,w){super.init(R,w,{});w.label?(w.label?.content&&!g.fj(w.label.content)&&(this.linkText=new g.RX({j:"span",Z:"ytp-visit-advertiser-link__text",fB:w.label.content}),g.K(this,this.linkText),this.linkText.gN(this.element)),w.interaction?.accessibility?.label?iO(this.element,`${w.interaction.accessibility.label} This link opens in new tab`):w.label?.content&& !g.fj(w.label.content)&&iO(this.element,`${w.label.content} This link opens in new tab`),Jf(this.element),this.element.setAttribute("tabindex","0"),this.show()):g.LF(Error("No label found in VisitAdvertiserLink."))}onClick(R){super.onClick(R);this.api.onAdUxClicked(this.componentType,this.layoutId)}clear(){this.hide()}};var u6d=class extends TW{constructor(R,w,p,r,f){super(R,{j:"div",Z:"ytp-ad-player-overlay-layout",N:[{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",w,p,r);this.C=f;this.S=this.KB("ytp-ad-player-overlay-layout__player-card-container");this.L=this.KB("ytp-ad-player-overlay-layout__ad-info-container"); this.J=this.KB("ytp-ad-player-overlay-layout__skip-or-preview-container");this.D=this.KB("ytp-ad-player-overlay-layout__ad-disclosure-banner-container");this.hide()}init(R,w,p,r){super.init(R,w,{});let f;w.skipOrPreview&&(p=w.skipOrPreview,R=g.F(p,lm_),p=g.F(p,B7r),R?(this.AQ=new Z$t(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk,this.C),g.K(this,this.AQ),this.AQ.gN(this.J),this.AQ.init(gw("skip-ad"),R)):p&&this.api.getVideoData()?.isDaiEnabled()&&(this.G=new XcV(this.api,this.layoutId, this.interactionLoggingClientData,this.Vk,this.C,1),g.K(this,this.G),this.G.gN(this.J),this.G.init(gw("ad-preview"),p),this.G.D()),R=g.F(w.skipOrPreview,lm_))&&(f=R.skipOffsetMilliseconds);w.playerAdCard&&(R=g.F(w.playerAdCard,W0L))&&(this.playerAdCard=new n7b(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk,this.C),g.K(this,this.playerAdCard),this.playerAdCard.gN(this.S),this.playerAdCard.init(gw("ad-avatar-lockup-card"),R));w.adBadgeRenderer&&((R=g.F(w.adBadgeRenderer,Wu))?(this.O= new ff(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk,!0),g.K(this,this.O),this.O.gN(this.L),this.O.init(gw("ad-badge"),R)):g.LF(Error("AdBadgeViewModel is not found in player overlay layout.")));w.adPodIndex&&(R=g.F(w.adPodIndex,u5d))&&(this.adPodIndex=new F8_(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk),g.K(this,this.adPodIndex),this.adPodIndex.gN(this.L),this.adPodIndex.init(gw("ad-pod-index"),R));w.adInfoRenderer&&((R=g.F(w.adInfoRenderer,AW))?(this.adInfoButton= new rj(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk,this.element,void 0,!0),g.K(this,this.adInfoButton),this.O!==void 0?this.L.insertBefore(this.adInfoButton.element,this.O.element.nextSibling):this.adInfoButton.gN(this.L),this.adInfoButton.init(gw("ad-info-hover-text-button"),R,this.macros)):g.AO(Error("AdInfoRenderer is not found in player overlay layout.")));R=this.api.getVideoData()?.isDaiEnabled();w.adDurationRemaining&&R&&(R=g.F(w.adDurationRemaining,k56))&&(this.adDurationRemaining= new wL(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk,this.C,r.videoAdDurationSeconds,!0),g.K(this,this.adDurationRemaining),this.adPodIndex!==void 0?this.L.insertBefore(this.adDurationRemaining.element,this.adPodIndex.element.nextSibling):this.adDurationRemaining.gN(this.L),this.adDurationRemaining.init(gw("ad-duration-remaining"),R,this.macros),this.adDurationRemaining.element.classList.add("ytp-ad-duration-remaining-autohide"));w.visitAdvertiserLink&&(r=g.F(w.visitAdvertiserLink, qvl))&&(this.visitAdvertiserLink=new YWM(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk),g.K(this,this.visitAdvertiserLink),this.visitAdvertiserLink.gN(this.L),this.visitAdvertiserLink.init(gw("visit-advertiser-link"),r));w.adDisclosureBanner&&(w=g.F(w.adDisclosureBanner,CSD))&&(this.adDisclosureBanner=new jG6(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk),g.K(this,this.adDisclosureBanner),this.adDisclosureBanner.gN(this.D),this.adDisclosureBanner.init(gw("ad-disclosure-banner"), w));this.K=new mY(this.api,this.C,f,!0);g.K(this,this.K);g.P7(this.api,this.K.element,4);this.show()}clear(){this.hide()}};var F9P=class extends TW{constructor(R,w,p,r){super(R,{j:"div",Z:"ytp-ad-grid-card-text",N:[{j:"div",Z:"ytp-ad-grid-card-text__metadata",N:[{j:"div",Z:"ytp-ad-grid-card-text__metadata__headline"},{j:"div",Z:"ytp-ad-grid-card-text__metadata__description",N:[{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",w,p,r);this.headline=new rL(this.api,this.layoutId, this.interactionLoggingClientData,this.Vk);g.K(this,this.headline);this.headline.gN(this.KB("ytp-ad-grid-card-text__metadata__headline"));this.moreInfoButton=new V3(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk,!0);g.K(this,this.moreInfoButton);this.moreInfoButton.gN(this.KB("ytp-ad-grid-card-text__button"))}init(R,w){super.init(R,w,{});if(w?.title)if(R=w.title)if(this.headline.init(gw("ad-simple-attributed-string"),new pf(R)),R=g.F(w.moreInfoButton,xG)){if(this.moreInfoButton.init(gw("ad-button"), R),w.descriptions)w.descriptions.length>0&&(R=w.descriptions[0])&&(this.L=new rL(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk),g.K(this,this.L),this.L.gN(this.element.getElementsByClassName("ytp-ad-grid-card-text__metadata__description__line")[0]),this.L.init(gw("ad-simple-attributed-string"),new pf(R))),w.descriptions.length>1&&(w=w.descriptions[1])&&(this.C=new rL(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk),g.K(this,this.C),this.C.gN(this.element.getElementsByClassName("ytp-ad-grid-card-text__metadata__description__line")[1]), this.C.init(gw("ad-simple-attributed-string"),new pf(w)))}else g.LF(Error("No AdButtonViewModel is returned in AdGridCardText."));else g.LF(Error("No headline found in AdGridCardText."));else g.LF(Error("No headline found in AdGridCardText."))}onClick(R){super.onClick(R);this.api.pauseVideo();this.api.onAdUxClicked(this.componentType,this.layoutId)}clear(){this.hide();this.headline.clear();this.moreInfoButton.clear();this.L?.clear();this.C?.clear()}hide(){this.headline.hide();this.moreInfoButton.hide(); this.L?.hide();this.C?.hide();super.hide()}show(){super.show();this.headline.show();this.moreInfoButton.show();this.L?.show();this.C?.show()}};var jmb=class extends TW{constructor(R,w,p,r){super(R,{j:"div",Z:"ytp-ad-grid-card-collection"},"ad-grid-card-collection",w,p,r);this.L=[]}init(R,w){super.init(R,w,{});if(w?.gridCards)if(w.style!=="AD_GRID_CARD_COLLECTION_STYLE_FIXED_ONE_COLUMN")g.LF(Error("Only single column style is currently supported in AdGridCardCollection."));else for(const p of w.gridCards){if(w=g.F(p,zaY))R=new F9P(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk),g.K(this,R),R.gN(this.element),R.init(gw("ad-grid-card-text"), w),this.L.push(R)}else g.LF(Error("No grid cards found in AdGridCardCollection."))}show(){for(const R of this.L)R.show();super.show()}clear(){this.hide();for(const R of this.L)R.clear()}hide(){for(const R of this.L)R.hide();super.hide()}};var JGa=class extends gt{constructor(R,w,p,r,f){super(R,{j:"div",Z:"ytp-display-underlay-text-grid-cards",N:[{j:"div",Z:"ytp-display-underlay-text-grid-cards__content_container",N:[{j:"div",Z:"ytp-display-underlay-text-grid-cards__content_container__header",N:[{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",w,p,r,f);this.playerProgressOffsetMs=0;this.C=!1}init(R,w,p,r,f=0){super.init(R,w,p,r);this.playerProgressOffsetMs=f;KQ(this);this.api.addEventListener("playerUnderlayVisibilityChange",this.D.bind(this));this.api.addEventListener("resize",this.J.bind(this));this.api.gH()?(this.C=!0,this.api.eQ(!0),this.show()):this.hide()}O(){if(this.L){var R=this.L.getProgressState();R&&R.current&& !this.C&&1E3*R.current>=this.playerProgressOffsetMs&&(this.C=!0,this.api.eQ(!0),this.show())}}K(){this.C&&this.api.eQ(!1);this.hide()}clear(){this.api.eQ(!1);this.api.removeEventListener("playerUnderlayVisibilityChange",this.D.bind(this));this.api.removeEventListener("resize",this.J.bind(this));Ef(this);this.hide()}hide(){rPW(!1);super.hide()}show(){rPW(!0);super.show()}};var lPl=class extends JGa{constructor(R,w,p,r,f){super(R,w,p,r,f);this.adGridCardCollection=new jmb(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk);g.K(this,this.adGridCardCollection);this.adGridCardCollection.gN(this.KB("ytp-display-underlay-text-grid-cards__content_container__ad_grid_card_collection"));this.adButton=new V3(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk);g.K(this,this.adButton);this.adButton.gN(this.KB("ytp-display-underlay-text-grid-cards__content_container__ad_button")); this.G=this.KB("ytp-display-underlay-text-grid-cards__content_container");this.O0=this.KB("ytp-display-underlay-text-grid-cards__content_container__header")}init(R,w,p,r){if(w?.adGridCardCollection)if(w?.adButton){var f=Number(w.playerProgressOffsetMs||"0");isNaN(f)?super.init(R,w,p,r):super.init(R,w,p,r,f);R=w.headline;p=g.F(w.adAvatar,Bu);R&&p?(this.headline=new rL(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk),g.K(this,this.headline),this.headline.gN(this.KB("ytp-display-underlay-text-grid-cards__content_container__header__headline")), this.headline.init(gw("ad-simple-attributed-string"),new pf(R)),this.adAvatar=new y3(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk),g.K(this,this.adAvatar),this.adAvatar.gN(this.KB("ytp-display-underlay-text-grid-cards__content_container__header__ad_avatar")),this.adAvatar.init(gw("ad-avatar"),p)):this.O0.classList.remove("ytp-display-underlay-text-grid-cards__content_container__header");R=g.F(w.adGridCardCollection,mtH);this.adGridCardCollection.init(gw("ad-grid-card-collection"), R);w=g.F(w.adButton,xG);this.adButton.init(gw("ad-button"),w);this.hide()}else g.LF(Error("No button found in DisplayUnderlayTextGridCardsLayout."));else g.LF(Error("No grid cards found in DisplayUnderlayTextGridCardsLayout."))}onClick(R){(this.adButton&&g.lA(this.adButton.element,R.target)||this.adAvatar&&g.lA(this.adAvatar.element,R.target))&&this.api.pauseVideo();super.onClick(R);this.api.onAdUxClicked(this.componentType,this.layoutId)}J(){}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()}D(R){R==="transitioning"?(this.G.classList.remove("ytp-ad-underlay-clickable"),this.show()):R==="visible"?this.G.classList.add("ytp-ad-underlay-clickable"):R==="hidden"&&(this.hide(),this.G.classList.remove("ytp-ad-underlay-clickable"))}};var Tpp=class extends TW{constructor(R,w,p,r){super(R,{j:"div",Z:"ytp-ad-details-line"},"ad-details-line",w,p,r);this.L=[];this.hide()}init(R,w){super.init(R,w,{});if(w.attributes===void 0)g.LF(Error("No attributes found in AdDetailsLineViewModel."));else if(w.style===void 0)g.LF(Error("No style found in AdDetailsLineViewModel."));else{for(const r of w.attributes)if(r.text!==void 0){R=r.text;var p=w.style;const f=new rL(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk);g.K(this,f); f.gN(this.element);a:switch(p){case "AD_DETAILS_LINE_STYLE_RESPONSIVE":p="ytp-ad-details-line__text--style-responsive";break a;default:p="ytp-ad-details-line__text--style-standard"}f.element.classList.add(p);f.init(gw("ad-simple-attributed-string"),new pf(R));this.L.push(f)}this.show()}}show(){this.L.forEach(R=>{R.show()}); super.show()}clear(){this.hide()}hide(){this.L.forEach(R=>{R.hide()}); super.hide()}};var i$b=class extends TW{constructor(R,w,p,r){super(R,{j:"div",Z:"ytp-image-background",N:[{j:"img",Z:"ytp-image-background-image"}]},"image-background",w,p,r);this.hide()}init(R,w){super.init(R,w,{});if((R=tB(w.image?.sources||[])?.url||"")&&R.length){var p=this.KB("ytp-image-background-image");g.Z2(p,"backgroundImage",`url(${R})`);w.blurLevel!==void 0&&g.Z2(p,"filter",`blur(${w.blurLevel}px)`);w.gradient!==void 0&&(w=new g.k({j:"div",E0:["ytp-image-background--gradient-vertical"]}),g.K(this,w), w.gN(this.element));this.show()}else g.LF(Error("Failed to get imageUrl in ImageBackground."))}clear(){this.hide()}};var QmV=class extends gt{constructor(R,w,p,r,f){super(R,{j:"svg",Z:"ytp-timed-pie-countdown",A:{viewBox:"0 0 20 20"},N:[{j:"circle",Z:"ytp-timed-pie-countdown__background",A:{r:"10",cx:"10",cy:"10"}},{j:"circle",Z:"ytp-timed-pie-countdown__inner",A:{r:"5",cx:"10",cy:"10"}},{j:"circle",Z:"ytp-timed-pie-countdown__outer",A:{r:"10",cx:"10",cy:"10"}}]},"timed-pie-countdown",w,p,r,f);this.G=this.KB("ytp-timed-pie-countdown__inner");this.C=Math.ceil(2*Math.PI*5);this.hide()}init(R,w){super.init(R,w,{}); g.Z2(this.G,"stroke-dasharray",`0 ${this.C}`);this.show()}clear(){this.hide()}hide(){Ef(this);super.hide()}show(){KQ(this);super.show()}K(){this.hide()}O(){if(this.L){var R=this.L.getProgressState();R!=null&&R.current!=null&&g.Z2(this.G,"stroke-dasharray",`${R.current/R.seekableEnd*this.C} ${this.C}`)}}};var zbd=class extends TW{constructor(R,w,p,r){super(R,{j:"div",Z:"ytp-video-interstitial-buttoned-centered-layout",A:{tabindex:"0"},N:[{j:"div",Z:"ytp-video-interstitial-buttoned-centered-layout__content",N:[{j:"div",Z:"ytp-video-interstitial-buttoned-centered-layout__content__instream-info-container"},{j:"div",Z:"ytp-video-interstitial-buttoned-centered-layout__content__lockup",N:[{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",w,p,r);this.C=null;this.G=this.KB("ytp-video-interstitial-buttoned-centered-layout__content__instream-info-container");this.O=new ag;g.K(this,this.O);this.hide()}init(R, w){super.init(R,w,{});if(Gcl(w)){this.adAvatar=new y3(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk);g.K(this,this.adAvatar);this.adAvatar.gN(this.KB("ytp-video-interstitial-buttoned-centered-layout__content__lockup__ad-avatar-container"));this.adAvatar.init(gw("ad-avatar"),g.F(w.adAvatar,Bu));this.headline=new rL(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk);g.K(this,this.headline);this.headline.gN(this.KB("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(gw("ad-simple-attributed-string"),new pf(w.headline));if(R=g.F(w.adDetailsLine,Imx))this.detailsLine=new Tpp(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk),g.K(this,this.detailsLine),this.detailsLine.gN(this.KB("ytp-video-interstitial-buttoned-centered-layout__content__lockup__details-line-container")),this.detailsLine.init(gw("ad-details-line"),R); this.adButton=new V3(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk,!0);g.K(this,this.adButton);this.adButton.gN(this.KB("ytp-video-interstitial-buttoned-centered-layout__content__lockup__ad-button-container"));this.adButton.init(gw("ad-button"),g.F(w.adButton,xG));this.adBadge=new ff(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk,!0);g.K(this,this.adBadge);this.adBadge.gN(this.G);this.adBadge.init(gw("ad-badge"),g.F(w.adBadge,Wu));this.adInfoButton=new rj(this.api, this.layoutId,this.interactionLoggingClientData,this.Vk,this.element,void 0,!0);g.K(this,this.adInfoButton);this.adInfoButton.gN(this.G);this.adInfoButton.init(gw("ad-info-hover-text-button"),g.F(w.adInfoRenderer,AW),this.macros);if(R=g.F(w.skipAdButton,xtP))this.skipAdButton=new d1m(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk),g.K(this,this.skipAdButton),this.skipAdButton.gN(this.element),this.skipAdButton.init(gw("skip-button"),R);this.C=new RF(w.durationMilliseconds);g.K(this, this.C);if(R=g.F(w.countdownViewModel,L0Y))this.L=new QmV(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk,this.C),g.K(this,this.L),this.L.gN(this.KB("ytp-video-interstitial-buttoned-centered-layout__timed-pie-countdown-container")),this.L.init(gw("timed-pie-countdown"),R);if(w=g.F(w.imageBackground,ssl))this.imageBackground=new i$b(this.api,this.layoutId,this.interactionLoggingClientData,this.Vk),g.K(this,this.imageBackground),this.imageBackground.gN(this.element),this.imageBackground.element.classList.add("ytp-video-interstitial-buttoned-centered-layout__background-image-container"), this.imageBackground.init(gw("image-background"),w);this.show();this.element.focus()}}clear(){this.O.C();this.hide()}show(){fPP(!0);this.adAvatar&&this.adAvatar.show();this.headline&&this.headline.show();this.adButton&&this.adButton.show();this.skipAdButton&&this.skipAdButton.show();super.show()}hide(){fPP(!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.L&&this.L.hide();this.imageBackground&&this.imageBackground.hide();super.hide()}};var lw=class extends g.HC{constructor(R,w=2){super();this.api=R;this.L=null;this.handler=new ag(this);g.K(this,this.handler);this.C=$Ed;this.handler.W(this.api,"presentingplayerstatechange",this.O);this.L=this.handler.W(this.api,"progresssync",this.Q2);this.HN=w;this.HN===1&&this.Q2()}jO(){return 1E3*this.api.getDuration({playerType:this.HN,Lo:!1})}stop(){this.L&&this.handler.o9(this.L)}Q2(){const R=this.api.getProgressState(this.HN);this.C={seekableStart:R.seekableStart,seekableEnd:R.seekableEnd, current:this.api.getCurrentTime({playerType:this.HN,Lo:!1})};this.publish("h")}getProgressState(){return this.C}O(R){R.TE(2)&&this.publish("g")}};var hWp="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(" ")),g7a=class extends azl{constructor(R,w,p){super(R);this.api=R;this.Vk=w;this.components={};R=new g.k({j:"div",E0:["video-ads","ytp-ad-module"]});g.K(this,R);$X&&g.pc(R.element,"ytp-ads-tiny-mode");this.K=new dt(R.element); g.K(this,this.K);g.P7(this.api,R.element,4);OE(p)&&(p=new g.k({j:"div",E0:["ytp-ad-underlay"]}),g.K(this,p),this.O=new dt(p.element),g.K(this,this.O),g.P7(this.api,p.element,0));g.K(this,OBP())}G(R){var w=R.id,p=R.content;const r=p.componentType;if(!hWp.includes(r))switch(R.actionType){case 1:R=LYb(r,this.api,this.Vk,p.layoutId,p.interactionLoggingClientData,p instanceof Ah?p.GO:!1,p instanceof Ah||p instanceof S8?p.YQ:!1);if(!R){g.AO(Error("No UI component returned from ComponentFactory for type: "+ r));break}g.da(this.components,w)?g.AO(Error("Ad UI component already registered: "+w)):this.components[w]=R;R.bind(p);p instanceof XHI?this.O?this.O.append(R.Rw):g.AO(Error("Underlay view was not created but UnderlayRenderer was created")):this.K.append(R.Rw);break;case 2:w=qBY(this,R);if(w==null)break;w.bind(p);break;case 3:p=qBY(this,R),p!=null&&(g.p5(p),g.da(this.components,w)?(p=this.components,w in p&&delete p[w]):g.AO(Error("Ad UI component does not exist: "+w)))}}Gy(){g.rG(Object.values(this.components)); this.components={};super.Gy()}};var H$b=class extends g.F2{constructor(R){super(R);this.C=null;this.created=!1;this.O=new AGb(this.player);this.G=()=>this.C!=null?this.C:this.C=(new yGM({l9:St(this.L).l9,uv:St(this.L).uv,B:this.player,Qm:St(this.L).Qm,D$:this.L.L.D$,Dx:St(this.L).Dx,C$:this.L.L.C$})).C; this.L=new MEi(this.player,this,this.O,this.G);g.K(this,this.L);const w=R.V();!GE(w)||g.Cb(w)||Lb(w)||(g.K(this,new g7a(R,St(this.L).Vk,St(this.L).Qm)),g.K(this,new cGV(R)))}create(){try{VFd(this),this.load(),this.created=!0,VFd(this)}catch(R){MY(R instanceof Error?R:String(R))}}load(){this.K()}K(){super.load();var R=St(this.L).Qm;try{this.player.getRootNode().classList.add("ad-created")}catch(I){MY(I instanceof Error?I:String(I))}var w=this.player.getVideoData({playerType:1});const p=w&&w.videoId|| "";var r=w&&w.getPlayerResponse()||{},f=(r&&r.adPlacements||[]).map(I=>I.adPlacementRenderer),G=(r?.adSlots||[]).map(I=>g.F(I,xN)); r=r.playerConfig&&r.playerConfig.daiConfig&&r.playerConfig.daiConfig.enableDai||!1;w&&w.PB();R=APb(f,G,R,St(this.L).Tn);f=w&&w.clientPlaybackNonce||"";w=w&&w.ZP||!1;G=1E3*this.player.getDuration({playerType:1});this.player.getVideoData({playerType:1})?.ZP||EzY(this.player)&&Wsd(this.player.getInternalApi());this.L.L.RS.Ap(f,G,w,R.Bl,R.ND,R.Bl,r,p)}destroy(){const R=this.player.getVideoData({playerType:1});this.L.L.RS.Fj(R&&R.clientPlaybackNonce||"");this.unload();this.created=!1}unload(){super.unload(); try{this.player.getRootNode().classList.remove("ad-created")}catch(R){MY(R instanceof Error?R:String(R))}if(this.C!=null){const R=this.C;this.C=null;R.dispose()}this.O.reset()}dR(){return!1}getAdState(){return-1}getOptions(){return Object.values(b$M)}Oe(R,w={}){switch(R){case "replaceUrlMacros":return w.url?(R=kBW(this.player),Object.assign(R,w.eE0),w=g.MG(w.url,R)):w=null,w;case "onAboutThisAdPopupClosed":this.Z6(w);break;case "executeCommand":w.command&&w.layoutId&&this.executeCommand(w);break; default:return null}}Pc(R,w){return!!this.L.L.uU?.get().Pc(R,w)}Z6(R){R.isMuted&&PhD(St(this.L).Dx,St(this.L).l9,R.layoutId);this.fU&&this.fU.Z6()}executeCommand(R){St(this.L).Vk.executeCommand(R.command,R.layoutId)}};g.AY("yt.player.Application.create",g.rB.create);g.AY("yt.player.Application.createAlternate",g.rB.create);AQY(BC(),qWP);var v7P=g.yD("ytcsi.tick");v7P&&v7P("pe");g.XA("ad",H$b);g.NpU=class extends g.f5{constructor(R){super();this.callback=R;this.L=new yB(0,0,.4,0,.2,1,1,1);this.delay=new g.hf(this.next,window,this);g.K(this,this.delay)}start(R,w,p){this.config={from:R,to:w,duration:p,startTime:(0,g.T)()};this.next()}stop(){this.delay.stop();this.config=void 0}next(){if(this.config){var R=this.config.from,w=this.config.to,p=this.config.duration,r=this.config.startTime;r=(0,g.T)()-r;var f=this.L;p=g.MN(o4(f,tu(f,r/p)),0,1);this.callback(R+(w-R)*p);p<1&&this.delay.start()}}};g.kMV=class extends g.k{constructor(R){super({j:"div",Z:"ytp-more-videos-view",A:{tabIndex:"-1"}});this.api=R;this.C=!0;this.O=new g.th(this);this.L=[];this.suggestionData=[];this.columns=this.containerWidth=this.D=this.G=this.scrollPosition=0;this.title=new g.k({j:"h2",Z:"ytp-related-title",fB:"{{title}}"});this.previous=new g.k({j:"button",E0:["ytp-button","ytp-previous"],A:{"aria-label":"Show previous suggested videos"},N:[g.pQ()]});this.J=new g.NpU(w=>{this.suggestions.element.scrollLeft=-w}); this.next=new g.k({j:"button",E0:["ytp-button","ytp-next"],A:{"aria-label":"Show more suggested videos"},N:[g.rQ()]});g.K(this,this.O);this.K=R.V().G;g.K(this,this.title);this.title.gN(this.element);this.suggestions=new g.k({j:"div",Z:"ytp-suggestions"});g.K(this,this.suggestions);this.suggestions.gN(this.element);g.K(this,this.previous);this.previous.gN(this.element);this.previous.listen("click",this.X,this);g.K(this,this.J);tFH(this);g.K(this,this.next);this.next.gN(this.element);this.next.listen("click", this.U,this);this.O.W(this.api,"appresize",this.LL);this.O.W(this.api,"fullscreentoggled",this.Vg);this.O.W(this.api,"videodatachange",this.onVideoDataChange);this.LL(this.api.L_().getPlayerSize());this.onVideoDataChange()}hasSuggestions(){return this.suggestionData.length>0}U(){this.C&&this.scrollTo(this.scrollPosition-this.containerWidth)}show(){super.show();OTr(this)}X(){this.C&&this.scrollTo(this.scrollPosition+this.containerWidth)}Vg(){this.LL(this.api.L_().getPlayerSize())}LL(R){var w=this.api.isEmbedsShortsMode()? .5625:16/9,p=this.api.r_();R=R.width-(p?112:58);p=Math.ceil(R/(p?320:192));const r=(R-p*8)/p;w=Math.floor(r/w);for(const f of this.L){const G=f.KB("ytp-suggestion-image");G.style.width=`${r}px`;G.style.height=`${w}px`}this.suggestions.element.style.height=`${w}px`;this.G=r;this.D=w;this.containerWidth=R;this.columns=p;this.scrollPosition=0;this.suggestions.element.scrollLeft=-0;g.bw(this)}onVideoDataChange(){const R=this.api.V(),w=this.api.getVideoData();this.K=w.h$?!1:R.G;this.suggestionData=w.suggestions? g.QD(w.suggestions,p=>p&&!p.playlistId):[]; EGl(this);w.h$?this.title.update({title:g.K2("More videos from $DNI_RELATED_CHANNEL",{DNI_RELATED_CHANNEL:w.author})}):this.title.update({title:this.api.isEmbedsShortsMode()?"More shorts":"More videos"})}scrollTo(R){R=g.MN(R,this.containerWidth-this.suggestionData.length*(this.G+8),0);this.J.start(this.scrollPosition,R,1E3);this.scrollPosition=R;g.bw(this);OTr(this)}};})(_yt_player);