@castlabs/prestoplay 6.29.0 → 6.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/cjs/cl.adobe.js +3 -3
  3. package/cjs/cl.airplay.js +3 -3
  4. package/cjs/cl.broadpeak.js +7 -7
  5. package/cjs/cl.cast.js +129 -127
  6. package/cjs/cl.conviva.js +32 -32
  7. package/cjs/cl.core.js +619 -621
  8. package/cjs/cl.crypto.js +9 -9
  9. package/cjs/cl.dash.js +92 -89
  10. package/cjs/cl.externs.js +36 -35
  11. package/cjs/cl.freewheel.js +25 -25
  12. package/cjs/cl.hls.js +78 -79
  13. package/cjs/cl.hlssmpte.js +6 -6
  14. package/cjs/cl.htmlcue.js +30 -30
  15. package/cjs/cl.ima.js +25 -24
  16. package/cjs/cl.mediatailor.js +3 -3
  17. package/cjs/cl.mse.js +352 -351
  18. package/cjs/cl.muxdata.js +14 -14
  19. package/cjs/cl.onboard.js +4 -4
  20. package/cjs/cl.persistent.js +15 -15
  21. package/cjs/cl.playlist.js +6 -6
  22. package/cjs/cl.simid.js +16 -16
  23. package/cjs/cl.smooth.js +71 -71
  24. package/cjs/cl.thumbnails.js +26 -26
  25. package/cjs/cl.tizen.js +71 -71
  26. package/cjs/cl.ttml.js +29 -29
  27. package/cjs/cl.verimatrix.js +5 -5
  28. package/cjs/cl.vimond.js +12 -12
  29. package/cjs/cl.vr.js +19 -19
  30. package/cjs/cl.vtt.js +14 -14
  31. package/cjs/cl.yospace.js +4 -4
  32. package/cjs/cl.youbora.js +38 -38
  33. package/cjs/polyfill.min.js +2 -2
  34. package/cl.adobe.js +3 -3
  35. package/cl.airplay.js +3 -3
  36. package/cl.broadpeak.js +6 -6
  37. package/cl.cast.js +101 -99
  38. package/cl.conviva.js +27 -27
  39. package/cl.core.js +486 -486
  40. package/cl.crypto.js +9 -9
  41. package/cl.dash.js +84 -83
  42. package/cl.externs.js +36 -35
  43. package/cl.freewheel.js +19 -19
  44. package/cl.hls.js +82 -82
  45. package/cl.hlssmpte.js +5 -5
  46. package/cl.htmlcue.js +26 -26
  47. package/cl.ima.js +19 -18
  48. package/cl.mediatailor.js +2 -2
  49. package/cl.mse.js +303 -303
  50. package/cl.muxdata.js +13 -13
  51. package/cl.onboard.js +4 -4
  52. package/cl.persistent.js +11 -11
  53. package/cl.playlist.js +5 -5
  54. package/cl.simid.js +14 -14
  55. package/cl.smooth.js +60 -60
  56. package/cl.thumbnails.js +19 -19
  57. package/cl.tizen.js +56 -56
  58. package/cl.ttml.js +22 -22
  59. package/cl.verimatrix.js +4 -4
  60. package/cl.vimond.js +8 -8
  61. package/cl.vr.js +14 -14
  62. package/cl.vtt.js +12 -12
  63. package/cl.yospace.js +3 -3
  64. package/cl.youbora.js +31 -31
  65. package/package.json +1 -1
  66. package/typings.d.ts +11 -1
package/cl.core.js CHANGED
@@ -1,356 +1,356 @@
1
- let g={}; let _ = {};let f=function(window){'use strict';var ba,ca,la,oa,sa,ta,wa,xa,ya,za,Aa,Ba,Fa,Ga,Ha,Ia,Ja,Ma,Na,Ra,Ta,Ua,Va,Wa,Xa,Ya,$a,ab,eb,ib,ob,pb,tb,vb,yb,zb,Ab,Eb,Fb,Hb,Ib,Nb,Rb,Yb,Zb,$b,Cc,Hc,Pc,Qc,Xc,Yc,Zc,cd,dd,ed,fd,hd,id,jd,kd,ld,md,nd,sd,ud,zd,Fd,Gd,Hd,Id,Kd,Ld,Md,Rd,Sd,Ud,$d,ie,ke,le,ve,Oe,Ve,Xe,Ye,Ze,$e,af,bf,cf,df,ef,ff,lf,mf,nf,of,pf,qf,sf,wf,yf,Of,Rf,Xf,jg,pg,vg,Dg,Hg,Ig,Jg,Kg,Lg,Ng,Og,Pg,Vg,Wg,Zg,$g,eh,bh,mh,nh,ph,sh,uh,Ch,Gh,Nh,Oh,Ph,Qh,Rh,Sh,Th,Uh,Vh,Yh,Wh,$h,bi,ai,di,fi,hi,gi,ii,ji,ki,ni,oi,ri,Hi,Ii,Ji,Ki,Oi,Ti,Si,
2
- ej,Yi,Xi,rj,sj,tj,uj,wj,xj,yj,zj,Nj,Ij,Pj,Qj,Rj,Tj,Uj,Sj,Xj,Yj,Zj,Wj,Aj,Bj,Ej,Fj,Gj,Hj,Jj,Kj,Lj,Mj,fk,gk,Oj,Vj,hk,ck,ek,ak,kk,nk,ok,pk,qk,sk,rk,vk,wk,zk,Ak,Bk,Dk,Ek,Fk,Gk,Ik,Jk,Lk,Mk,Nk,Qk,Rk,Ok,Zk,$k,al,Yk,jl,Pk,bl,dl,el,fl,gl,hl,il,ll,Tk,kl,Uk,Sk,Vk,ml,nl,rl,tl,ol,ul,Wk,Xk,xl,zl,Dl,El,Cl,Gl,Bl,Al,Kl,Ll,Ml,Ol,Pl,Ql,Rl,Sl,Ul,Vl,Tl,Wl,$l,Zl,em,nm,Hl,qm,pm,om,vl,Fl,sm,rm,um,vm,zm,Km,Pm,Rm,Sm,Vm,Zm,dn,gn,jn,kn,ln,on,un,wn,xn,yn,zn,An,Bn,Cn,Dn,En,Fn,Gn,Ln,Sn,Pn,Un,Yn,$n,bo,eo,fo,go,ho,jo,so,ko,lo,mo,
3
- no,uo,qo,xo,yo,wo,vo,Ao,Bo,Fo,zo,Go,Eo,Ho,Io,Co,Do,Jo,Oo,Po,Ko,No,Mo,Lo,Qo,Ro,So,dp,fp,lp,pp,rp,yp,Ip,up,Dp,Op,Pp,Qp,Sp,Tp,Up,Xp,Vp,Wp,Yp,Zp,$p,cq,jq,kq,oq,rq,sq,uq,wq,xq,zq,pq,vq,Aq,Bq,Cq,Dq,Mq,Fq,Nq,Eq,Gq,Hq,Oq,Tq,Vq,Xq,Wq,Zq,Rq,gr,dr,fr,er,Uq,hr,ir,jr,kr,lr,mr,nr,or,ur,xr,Ar,Br,Fr,Hr,Cr,Er,Gr,Ir,Jr,Kr,Mr,Nr,Sr,Tr,Vr,Wr,Xr,Yr,Zr,$r,bs,as,cs,ds,es,fs,gs,Ur,hs,js,ps,qs,rs,zs,As,Bs,Cs,xs,ts,Hs,Js,Ks,Ls,Gs,Ns,Os,Ps,Qs,Ts,Us,Vs,Rs,Ss,Ws,Xs,$s,dt,et,ht,jt,kt,it,ft,Zs,ct,at,bt,nt,ot,pt,qt,rt,st,tt,ut,
4
- wt,Ht,Lt,Xg,Yg;_.aa=" is registered.";ba=" is unsupported on this platform.";ca=" to a log level. Falling back to default!";_.da="#text";_.ea="6.29.0";_.ha="AdaptationSet";_.ia="Already destroyed. No-op";_.ja="Already released. No-op";_.ka="Autoplay is not allowed due to browser policy.";la="Autoplay should not be used for preloaded streams. ";_.ma="BANDWIDTH";_.na="BASIC";oa="CHECKSUM";_.pa="CODECS";_.qa="Cannot retrieve buffer information due to platform limitations";_.ra="CastlabsPlayer";sa="Content-Length";
5
- ta="Content-Type";_.va="Could not find configured DRM environment.";wa="DRM licenses loaded";xa="DRMtoday";ya="DRMtodayOnboard";za="Destroying player";Aa="Error while decoding string!";Ba="Error while fetching certificate!";_.Ca="FairPlay Certificate URL is not defined";_.Da="FairPlay License URL is not defined";_.Ea="GROUP-ID";Fa="HW_SECURE_ALL";Ga="HW_SECURE_CRYPTO";Ha="HW_SECURE_DECODE";Ia="HeaderDrm";Ja="InvalidStateError";_.Ka="LANGUAGE";Ma="License verification failed: ";Na="Load interrupted while a player release is pending";
6
- _.Oa="Loading player with configuration";_.Pa="MaxHeight";_.Qa="MaxWidth";Ra="Missing media element";_.Sa="NAME";Ta="No drmtoday configuration found in player configuration. Unable to modify the DRM license request!";Ua="No event provided!";Va="No items in the playlist";Wa="No sources provided!";Xa="No track data attached to the event, unable to add track!";Ya="Not a persistent session.";_.Za="Not supported";$a="NotAllowedError";ab="NotSupportedError";_.bb="PLAYLIST";_.cb="POST";_.db="PlayReady License URL is not defined";
7
- eb="Player not ready yet.";_.gb="Player sources";_.hb="Please make sure ";ib="Preloading is not supported by this player.";_.jb="QualityLevel";_.kb="RESOLUTION";_.lb="Representation";_.mb="SW_SECURE_CRYPTO";_.nb="SW_SECURE_DECODE";ob="Session is closed";pb="Skipping Session creation. License for init data was already requested in ";_.qb="SmoothStreamingMedia";_.sb="TYPE";tb="The index is not in the allowed range.";_.ub="URI";vb="Unable to translate ";_.wb="Unhandled/ignored event";_.xb="Unregistering listeners";
8
- yb="Unsupported keySystem";zb="Updating playout limit for interstitial";Ab="Using VTTCue polyfill from 3 argument TextTrackCue.";_.Cb="VIDEO";_.Db="VOD";Eb="Wait for preloading to finish";Fb="WebkitEmeManager.MediaKeySession.load";_.Gb="Widevine License URL is not defined";Hb="Will create EME Manager: ";Ib="X-AD-CREATIVE-SIGNALING";_.Jb="X-ASSET-LIST";_.Kb="X-ASSET-URI";Nb="X-GROUPED-ASSET-LIST";_.Ob="X-PLAYOUT-LIMIT";_.Pb="X-RESTRICT";_.Qb="X-RESUME-OFFSET";Rb="X-TIMELINE-OCCUPIES";_.Sb="ad-break-started";
9
- _.Tb="ad-break-stopped";_.Ub="ad-buffering";_.Vb="ad-clicked";_.Wb="ad-completed";_.Xb="ad-first-quartile";Yb="ad-hls-asset-list-request";Zb="ad-hls-asset-list-response";$b="ad-hls-resoled";_.dc="ad-impression";_.fc="ad-loaded";_.gc="ad-midpoint";_.hc="ad-paused";_.ic="ad-progress";_.jc="ad-resumed";_.kc="ad-skipped";_.lc="ad-started";_.mc="ad-stopped";_.nc="ad-third-quartile";_.oc="addtrack";_.pc="ads-timeline-changed";_.qc="airplay-casting-ended";_.rc="airplay-casting-started";_.uc="airplay-status-changed";
10
- _.vc="application/cea-608";_.wc="application/dash+xml";_.xc="application/mp4";_.yc='application/mp4; codecs\x3d"stpp"';_.zc='application/mp4; codecs\x3d"wvtt"';_.Ac="application/ttml+xml";_.Bc="application/vnd.ms-sstr+xml";Cc="application/x-www-form-urlencoded";_.q="audio";_.Dc="audio/aac";_.Ec="audio/ac3";_.Fc="audio/eac3";_.Gc="audio/mp4";Hc='audio/mp4;codecs\x3d"mp4a.40.2"';_.Ic="audiobufferchanged";_.Jc="audiotrackchanged";_.Kc="autoplaynotallowed";_.Lc="bitratechanged";_.Mc="boolean";_.Nc="bufferingended";
11
- _.Oc="bufferingstarted";Pc="canplay";Qc="canplaythrough";_.Rc="castingstarted";_.Sc="caststatuschanged";_.Tc="cdn-switch-success";_.Uc="cenc";_.Wc="center";Xc="certificate-request";Yc="change";Zc="chrome";_.bd="clpp-fill";cd="clpp-hidden";dd="clpp-mc-playlist";ed="clpp-visible";fd="clpp.PlayerFleet";_.gd="clpp.cast.CastSender";hd="clpp.drm.DrmToday";id="clpp.drm.HeaderDrm";jd="clpp.drm.eme.AppleEmeManager";kd="clpp.drm.eme.EmeFactory";ld="clpp.native.Player";md="clpp.playlist.McPlaylist";nd="clpp.utils.Platform";
12
- _.od="codecs";_.pd="column-reverse";_.qd="com.adobe.primetime";_.rd="com.apple.fps";sd="com.apple.quicktime.HLS";_.td="com.microsoft.playready";ud="com.microsoft.playready.recommendation";_.vd="com.widevine.alpha";_.wd="config.drm.customData is not defined";_.xd="content-steering-change";_.yd="content-steering-location-ban-update";zd="controls";_.Ad="cuechange";_.Bd="decoder";_.Cd="destroy()";_.Dd="disabled";_.Ed="div";Fd="drm.mediaKeys.end";Gd="drm.mediaKeys.start";Hd="drm.onPlay.end";Id="drm.onPlay.start";
13
- _.Jd="drmexpirationupdate";Kd="drmlicenserequested";Ld="drmrenewalstarted";Md="drmsessioncreated";_.Nd="drmsessionpersisted";_.Qd="drmsessionupdate";Rd="drmtoday";Sd="durationchange";_.Td="ec-3";Ud="encrypted";_.Vd="end";_.Wd="ended";_.Xd="error";_.Yd="estimatedThroughputKbps";_.Zd="forced";$d="fullscreenElement";_.ae="function";_.be="height";_.ce="hidden";_.de="hls-daterange";_.ee="html";_.fe="https://";_.ge="image";_.he="internal-error";ie="keystatuseschange";_.je="left";ke="license-renewal";
14
- le="license-request";_.me="line-left";_.ne="line-right";_.oe="live-turned-static";_.se="load";_.te="loadeddata";_.ue="loadedmetadata";ve="loadstart";_.we="main";_.xe="mdat";_.ye="mdia";_.ze="message";_.Ae="metadata";_.Be="mimeType";_.Ce="minf";_.De="moov";_.Ee="mpd-type-changed";_.Fe="mpeg-dash-callback-event";_.Ge="none";_.r="number";_.He="object";_.Ie="onBitrateChanged()";_.Je="onContentLoaded";_.Ke="onPlayerError()";_.Le="onPlayerWillDestroy";_.Me="onPlayerWillRelease";_.Ne="onStateChanged()";
15
- Oe="online-status-changed";_.Pe="optional";_.Qe="org.w3.clearkey";_.Re="output-restricted";_.Se="pause";_.Te="persistent";_.Ue="persistent-license";Ve="picture-in-picture";_.We="play";Xe="player.afterLoad.end";Ye="player.afterLoad.start";Ze="player.appendLoad.end";$e="player.appendLoad.start";af="player.beforeLoad.end";bf="player.beforeLoad.start";cf="player.load.end";df="player.load.start";ef="player.setupPlaylist.end";ff="player.setupPlaylist.start";_.gf="playing";_.hf="playlist-item-changed";
16
- _.jf="playlist-modified";lf="playlist.next.end";mf="playlist.next.start";nf="preload-aborted";of="preload-failed";pf="preloaded";qf="preloading";_.rf="prevent";sf="primary-content";_.tf="progress";_.uf="px";_.vf="ratechange";wf="released";_.xf="releasing";yf="removetrack";_.zf="required";_.Af="resize";_.Bf="right";_.Cf="sc-playlist-ended";_.Df="sc-playlist-item-changed";_.Ef="sc-playlist-live-turned-static";_.Ff="sc-playlist-timeline-changed";_.Gf="scte35";_.Hf="seeked";_.If="seeking";_.Jf="showing";
1
+ let g={}; let _ = {};let f=function(window){'use strict';var ba,ca,la,oa,sa,ta,va,xa,ya,za,Aa,Ba,Fa,Ga,Ha,Ia,Ja,La,Na,Ra,Ta,Ua,Va,Wa,Ya,Za,ab,bb,gb,kb,qb,rb,ub,xb,Ab,Bb,Cb,Gb,Hb,Jb,Kb,Nb,Sb,Zb,$b,ac,Dc,Ic,Qc,Rc,Yc,Zc,$c,dd,ed,fd,gd,id,jd,kd,ld,md,nd,od,td,vd,Ad,Gd,Hd,Id,Jd,Ld,Md,Nd,Rd,Sd,Ud,$d,ie,ke,le,ve,Oe,Ve,Xe,Ye,Ze,$e,af,bf,cf,df,ef,ff,lf,mf,nf,of,pf,qf,sf,wf,yf,Of,Rf,Xf,jg,pg,vg,Hg,Ig,Jg,Kg,Lg,Ng,Og,Pg,Vg,Wg,Zg,$g,eh,bh,mh,nh,ph,sh,uh,Ch,Ih,Nh,Oh,Ph,Qh,Rh,Sh,Th,Uh,Vh,Yh,Wh,$h,bi,ai,di,fi,ei,gi,hi,ii,li,mi,pi,Fi,Gi,Hi,Ii,Mi,Ri,Qi,cj,Wi,
2
+ Vi,nj,oj,pj,sj,uj,vj,wj,xj,Lj,Gj,Nj,Oj,Pj,Rj,Sj,Qj,Vj,Wj,Xj,Uj,yj,zj,Cj,Dj,Ej,Fj,Hj,Ij,Jj,Kj,dk,ek,Mj,Tj,fk,ak,ck,Yj,ik,lk,mk,nk,ok,qk,pk,tk,uk,xk,yk,zk,Bk,Ck,Dk,Ek,Gk,Hk,Jk,Kk,Lk,Ok,Pk,Mk,Xk,Yk,Zk,Wk,hl,Nk,$k,al,bl,dl,el,fl,gl,jl,Rk,il,Sk,Qk,Tk,kl,ll,pl,rl,ml,sl,Uk,Vk,vl,xl,Bl,Cl,Al,El,zl,yl,Il,Jl,Kl,Ml,Nl,Ol,Pl,Ql,Sl,Tl,Rl,Ul,Wl,Vl,Zl,hm,Fl,km,jm,im,tl,Dl,mm,lm,om,pm,tm,Bm,Jm,Lm,Mm,Pm,Tm,Ym,an,cn,dn,en,hn,on,qn,rn,sn,tn,un,vn,wn,xn,yn,zn,An,Fn,Mn,Jn,On,Sn,Un,Wn,Yn,Zn,$n,ao,co,mo,eo,fo,ho,oo,ko,
3
+ ro,so,qo,po,uo,vo,zo,to,Ao,yo,Bo,Co,wo,xo,Do,Io,Jo,Eo,Ho,Go,Fo,Ko,Lo,Mo,Yo,$o,fp,jp,lp,sp,Cp,op,xp,Ip,Jp,Kp,Mp,Np,Op,Rp,Pp,Qp,Sp,Tp,Up,Xp,dq,eq,iq,lq,mq,oq,qq,rq,tq,jq,pq,uq,vq,wq,xq,Gq,zq,Hq,yq,Aq,Bq,Iq,Nq,Pq,Rq,Qq,Tq,Lq,ar,Yq,$q,Zq,Oq,br,cr,dr,er,fr,gr,hr,ir,or,rr,ur,vr,zr,Br,wr,yr,Ar,Cr,Dr,Er,Gr,Hr,Mr,Nr,Pr,Qr,Rr,Sr,Tr,Ur,Wr,Vr,Xr,Yr,Zr,$r,as,Or,bs,ds,js,ks,ls,qs,rs,ss,ts,os,ns,Bs,Ds,Es,Fs,As,Hs,Is,Js,Ks,Ns,Os,Ps,Ls,Ms,Qs,Rs,Us,Ys,Zs,bt,dt,et,ct,$s,Ts,Xs,Vs,Ws,ht,it,jt,kt,lt,mt,nt,ot,qt,Bt,Ft,
4
+ Xg,Yg;_.aa=" is registered.";ba=" is unsupported on this platform.";ca=" to a log level. Falling back to default!";_.da="#text";_.ea="6.30.0";_.fa="AdaptationSet";_.ha="Already destroyed. No-op";_.ja="Already released. No-op";_.ka="Autoplay is not allowed due to browser policy.";la="Autoplay should not be used for preloaded streams. ";_.ma="BANDWIDTH";_.na="BASIC";oa="CHECKSUM";_.pa="CODECS";_.qa="Cannot retrieve buffer information due to platform limitations";_.ra="CastlabsPlayer";sa="Content-Length";
5
+ ta="Content-Type";_.ua="Could not find configured DRM environment.";va="DRM licenses loaded";xa="DRMtoday";ya="DRMtodayOnboard";za="Destroying player";Aa="Error while decoding string!";Ba="Error while fetching certificate!";_.Ca="FairPlay Certificate URL is not defined";_.Da="FairPlay License URL is not defined";_.Ea="GROUP-ID";Fa="HW_SECURE_ALL";Ga="HW_SECURE_CRYPTO";Ha="HW_SECURE_DECODE";Ia="HeaderDrm";Ja="InvalidStateError";_.Ka="LANGUAGE";La="License verification failed: ";Na="Load interrupted while a player release is pending";
6
+ _.Oa="Loading player with configuration";_.Pa="MaxHeight";_.Qa="MaxWidth";Ra="Missing media element";_.Sa="NAME";Ta="No drmtoday configuration found in player configuration. Unable to modify the DRM license request!";Ua="No event provided!";Va="No items in the playlist";Wa="No sources provided!";Ya="No track data attached to the event, unable to add track!";Za="Not a persistent session.";_.$a="Not supported";ab="NotAllowedError";bb="NotSupportedError";_.db="PLAYLIST";_.eb="POST";_.fb="PlayReady License URL is not defined";
7
+ gb="Player not ready yet.";_.hb="Player sources";_.jb="Please make sure ";kb="Preloading is not supported by this player.";_.lb="QualityLevel";_.mb="RESOLUTION";_.nb="Representation";_.ob="SW_SECURE_CRYPTO";_.pb="SW_SECURE_DECODE";qb="Session is closed";rb="Skipping Session creation. License for init data was already requested in ";_.sb="SmoothStreamingMedia";_.tb="TYPE";ub="The index is not in the allowed range.";_.vb="URI";xb="Unable to translate ";_.yb="Unhandled/ignored event";_.zb="Unregistering listeners";
8
+ Ab="Unsupported keySystem";Bb="Updating playout limit for interstitial";Cb="Using VTTCue polyfill from 3 argument TextTrackCue.";_.Db="VIDEO";_.Fb="VOD";Gb="Wait for preloading to finish";Hb="WebkitEmeManager.MediaKeySession.load";_.Ib="Widevine License URL is not defined";Jb="Will create EME Manager: ";Kb="X-AD-CREATIVE-SIGNALING";_.Lb="X-ASSET-LIST";_.Mb="X-ASSET-URI";Nb="X-GROUPED-ASSET-LIST";_.Pb="X-PLAYOUT-LIMIT";_.Qb="X-RESTRICT";_.Rb="X-RESUME-OFFSET";Sb="X-TIMELINE-OCCUPIES";_.Tb="ad-break-started";
9
+ _.Ub="ad-break-stopped";_.Vb="ad-buffering";_.Wb="ad-clicked";_.Xb="ad-completed";_.Yb="ad-first-quartile";Zb="ad-hls-asset-list-request";$b="ad-hls-asset-list-response";ac="ad-hls-resoled";_.bc="ad-impression";_.ec="ad-loaded";_.gc="ad-midpoint";_.hc="ad-paused";_.ic="ad-progress";_.jc="ad-resumed";_.kc="ad-skipped";_.lc="ad-started";_.mc="ad-stopped";_.nc="ad-third-quartile";_.oc="addtrack";_.pc="ads-timeline-changed";_.qc="airplay-casting-ended";_.sc="airplay-casting-started";_.tc="airplay-status-changed";
10
+ _.wc="application/cea-608";_.xc="application/dash+xml";_.yc="application/mp4";_.zc='application/mp4; codecs\x3d"stpp"';_.Ac='application/mp4; codecs\x3d"wvtt"';_.Bc="application/ttml+xml";_.Cc="application/vnd.ms-sstr+xml";Dc="application/x-www-form-urlencoded";_.q="audio";_.Ec="audio/aac";_.Fc="audio/ac3";_.Gc="audio/eac3";_.Hc="audio/mp4";Ic='audio/mp4;codecs\x3d"mp4a.40.2"';_.Jc="audiobufferchanged";_.Kc="audiotrackchanged";_.Lc="autoplaynotallowed";_.Mc="bitratechanged";_.Nc="boolean";_.Oc="bufferingended";
11
+ _.Pc="bufferingstarted";Qc="canplay";Rc="canplaythrough";_.Sc="castingstarted";_.Tc="caststatuschanged";_.Uc="castvisibilitychanged";_.Vc="cdn-switch-success";_.Wc="cenc";_.Xc="center";Yc="certificate-request";Zc="change";$c="chrome";_.cd="clpp-fill";dd="clpp-hidden";ed="clpp-mc-playlist";fd="clpp-visible";gd="clpp.PlayerFleet";_.hd="clpp.cast.CastSender";id="clpp.drm.DrmToday";jd="clpp.drm.HeaderDrm";kd="clpp.drm.eme.AppleEmeManager";ld="clpp.drm.eme.EmeFactory";md="clpp.native.Player";nd="clpp.playlist.McPlaylist";
12
+ od="clpp.utils.Platform";_.pd="codecs";_.qd="column-reverse";_.rd="com.adobe.primetime";_.sd="com.apple.fps";td="com.apple.quicktime.HLS";_.ud="com.microsoft.playready";vd="com.microsoft.playready.recommendation";_.wd="com.widevine.alpha";_.xd="config.drm.customData is not defined";_.yd="content-steering-change";_.zd="content-steering-location-ban-update";Ad="controls";_.Bd="cuechange";_.Cd="decoder";_.Dd="destroy()";_.Ed="disabled";_.Fd="div";Gd="drm.mediaKeys.end";Hd="drm.mediaKeys.start";Id="drm.onPlay.end";
13
+ Jd="drm.onPlay.start";_.Kd="drmexpirationupdate";Ld="drmlicenserequested";Md="drmrenewalstarted";Nd="drmsessioncreated";_.Pd="drmsessionpersisted";_.Qd="drmsessionupdate";Rd="drmtoday";Sd="durationchange";_.Td="ec-3";Ud="encrypted";_.Vd="end";_.Wd="ended";_.Xd="error";_.Yd="estimatedThroughputKbps";_.Zd="forced";$d="fullscreenElement";_.ae="function";_.be="height";_.ce="hidden";_.de="hls-daterange";_.ee="html";_.fe="https://";_.ge="image";_.he="internal-error";ie="keystatuseschange";_.je="left";
14
+ ke="license-renewal";le="license-request";_.me="line-left";_.ne="line-right";_.oe="live-turned-static";_.pe="load";_.te="loadeddata";_.ue="loadedmetadata";ve="loadstart";_.we="main";_.xe="mdat";_.ye="mdia";_.ze="message";_.Ae="metadata";_.Be="mimeType";_.Ce="minf";_.De="moov";_.Ee="mpd-type-changed";_.Fe="mpeg-dash-callback-event";_.Ge="none";_.r="number";_.He="object";_.Ie="onBitrateChanged()";_.Je="onContentLoaded";_.Ke="onPlayerError()";_.Le="onPlayerWillDestroy";_.Me="onPlayerWillRelease";
15
+ _.Ne="onStateChanged()";Oe="online-status-changed";_.Pe="optional";_.Qe="org.w3.clearkey";_.Re="output-restricted";_.Se="pause";_.Te="persistent";_.Ue="persistent-license";Ve="picture-in-picture";_.We="play";Xe="player.afterLoad.end";Ye="player.afterLoad.start";Ze="player.appendLoad.end";$e="player.appendLoad.start";af="player.beforeLoad.end";bf="player.beforeLoad.start";cf="player.load.end";df="player.load.start";ef="player.setupPlaylist.end";ff="player.setupPlaylist.start";_.gf="playing";_.hf="playlist-item-changed";
16
+ _.kf="playlist-modified";lf="playlist.next.end";mf="playlist.next.start";nf="preload-aborted";of="preload-failed";pf="preloaded";qf="preloading";_.rf="prevent";sf="primary-content";_.tf="progress";_.uf="px";_.vf="ratechange";wf="released";_.xf="releasing";yf="removetrack";_.zf="required";_.Af="resize";_.Bf="right";_.Cf="sc-playlist-ended";_.Df="sc-playlist-item-changed";_.Ef="sc-playlist-live-turned-static";_.Ff="sc-playlist-timeline-changed";_.Gf="scte35";_.Hf="seeked";_.If="seeking";_.Jf="showing";
17
17
  _.Kf="simid-creative-started";_.Lf="simid-creative-stopped";_.Mf="sinf";_.Nf="smooth";Of="stalled";_.Pf="start";_.Qf="statechanged";Rf="status-pending";_.Sf="stbl";_.Tf="string";_.Uf="stsd";_.Vf="style";_.Wf="subtitles-htmlcue";Xf="temporary";_.Yf="text";_.Zf="text/vtt";_.$f="text/xml";_.ag="texttrackchanged";_.bg="timeline-cue-added";_.cg="timeline-cue-enter";_.dg="timeline-cue-exit";_.eg="timeline-cues-changed";_.fg="timeupdate";_.gg="tracksadded";_.hg="trak";_.ig="ttml-xml";jg="unauthenticated";
18
- _.kg="und";_.og="unknown";pg="update";_.qg="urn:scte:scte35";_.rg="urn:scte:scte35:2014";_.sg="user-seeked";_.tg="user-seeking";_.ug="value";vg="version";_.wg="vertical-lr";_.xg="vertical-rl";_.t="video";_.yg="video/mp2t";_.zg="video/mp4";_.Ag="videobufferchanged";_.Bg="videotrackchanged";_.Cg="vimond-response";Dg="visibilitychange";_.Eg="vtt-xml";_.Fg="waiting";_.Gg="waitingforkey";Hg="webkit-org.w3.clearkey";Ig="webkitkeyadded";Jg="webkitkeyerror";Kg="webkitkeymessage";Lg="webkitneedkey";_.Mg="width";
19
- Ng="x-dt-csl-tracking-token";Og="x-dt-follow-up-token";Pg="x-dt-resp-code";_.Qg="yospace-session-ended";_.Rg="yospace-session-started";_.Ug=function(a){return function(){return _.Tg[a].apply(this,arguments)}};Vg=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};Wg=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:Vg(a)}};
18
+ _.kg="und";_.lg="unknown";pg="update";_.qg="urn:scte:scte35";_.rg="urn:scte:scte35:2014";_.sg="user-seeked";_.tg="user-seeking";_.ug="value";vg="version";_.wg="vertical-lr";_.xg="vertical-rl";_.t="video";_.yg="video/mp2t";_.zg="video/mp4";_.Ag="videobufferchanged";_.Bg="videotrackchanged";_.Cg="vimond-response";_.Dg="visibilitychange";_.Eg="vtt-xml";_.Fg="waiting";_.Gg="waitingforkey";Hg="webkit-org.w3.clearkey";Ig="webkitkeyadded";Jg="webkitkeyerror";Kg="webkitkeymessage";Lg="webkitneedkey";
19
+ _.Mg="width";Ng="x-dt-csl-tracking-token";Og="x-dt-follow-up-token";Pg="x-dt-resp-code";_.Qg="yospace-session-ended";_.Rg="yospace-session-started";_.Ug=function(a){return function(){return _.Tg[a].apply(this,arguments)}};Vg=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}};Wg=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:Vg(a)}};
20
20
  Zg=function(a,b){if(b){var c=Xg;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&Yg(c,a,{configurable:!0,writable:!0,value:b})}};$g=function(a){function b(d){return a.next(d)}function c(d){return a.throw(d)}return new Promise(function(d,e){function f(g){g.done?d(g.value):Promise.resolve(g.value).then(b,c).then(f,e)}f(a.next())})};_.w=function(a){return $g(a())};
21
21
  _.x=function(a,b){a=a.split(".");var c=ah;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};_.dh=function(a){return _.z(a)||bh(a)?a:_.ch(a)};_.ch=function(...a){let b={};for(let c=0;c<a.length;c++)null!=a[c]&&(b=eh(b,{merging:a[c]},1));return b.merging||null};_.fh=function(a){for(const b in a)if(void 0!==a[b])return!0;return!1};
22
- eh=function(a,b,c){const d=c+1;if(_.z(a)||!_.gh(a))a={};for(const e in b)c=b[e],bh(c)||_.z(c)||_.hh(c)||c instanceof Element?a[e]=c:c instanceof Date?a[e]=c:_.gh(c)&&c.buffer&&c.buffer instanceof ArrayBuffer&&_.hh(c.subarray)?a[e]=c.subarray(0):c instanceof Array?a[e]=eh([],c,d):!_.z(c)&&_.ih(c)&&20>d&&(a[e]=eh(a[e],c,d));return a};bh=function(a){a=typeof a;return a===_.Tf||a===_.r||a===_.Mc};_.z=function(a){return null===a||"undefined"===typeof a};_.gh=function(a){return typeof a===_.He};
22
+ eh=function(a,b,c){const d=c+1;if(_.z(a)||!_.gh(a))a={};for(const e in b)c=b[e],bh(c)||_.z(c)||_.hh(c)||c instanceof Element?a[e]=c:c instanceof Date?a[e]=c:_.gh(c)&&c.buffer&&c.buffer instanceof ArrayBuffer&&_.hh(c.subarray)?a[e]=c.subarray(0):c instanceof Array?a[e]=eh([],c,d):!_.z(c)&&_.ih(c)&&20>d&&(a[e]=eh(a[e],c,d));return a};bh=function(a){a=typeof a;return a===_.Tf||a===_.r||a===_.Nc};_.z=function(a){return null===a||"undefined"===typeof a};_.gh=function(a){return typeof a===_.He};
23
23
  _.hh=function(a){return typeof a===_.ae};_.jh=function(a){return typeof a===_.Tf};_.kh=function(a){return typeof a===_.r};_.ih=function(a){if(_.z(a)||!_.gh(a))return!1;a=Object.getPrototypeOf(a);return a===Object.prototype||null===a};
24
24
  _.lh=function(a,b,c,d){if(a===b||null===a&&null===b||void 0===a&&void 0===b)return!0;if(null===a&&null!==b||null!==a&&null===b||void 0!==a&&void 0===b||void 0===a&&void 0!==b||!_.gh(a)||!_.gh(b))return!1;const e=c||Object.keys(a),f={};for(let g=0;g<e.length;g++){const h=e[g];if(_.z(d)||0>d.indexOf(h))if(f[h]=!0,a[h]!==b[h])return!1}if(_.z(c))for(a=Object.keys(b),b=0;b<a.length;b++)if(c=a[b],(_.z(d)||0>d.indexOf(c))&&!f[c])return!1;return!0};
25
25
  mh=function(a){return(Number.hasOwnProperty("isNaN")?Number.isNaN:b=>b!==b)(a)};nh=function(a){const b=new Map;for(const c of Object.keys(a))b.set(c,a[c]);return b};_.oh=function(a){const b={};a.forEach((c,d)=>{b[d]=c});return b};ph=function(a,b){b=b.toLowerCase();for(const [c,d]of Object.entries(a))if(c.toLowerCase()===b)return d;return null};sh=function(a){return a&&0<=qh[a]?qh[a]:rh};
26
- uh=function(a){if(!a)return _.B("clpp.log",vb+a+ca),-1;const b=th[a.toUpperCase()];return void 0===b?(_.B("clpp.log",vb+a+ca),-1):b};_.wh=function(a){vh.info.apply(vh,arguments)};_.xh=function(a){vh.debug.apply(vh,arguments)};_.B=function(a){vh.warn.apply(vh,arguments)};_.yh=function(a){vh.error.apply(vh,arguments)};_.Bh=function(a){if(a){var b=a.a();b in _.zh?_.Ah.warn("Player-Factory '"+b+"' already registered"):(_.zh[b]=a,_.Ah.info("Registered Player-Factory: '"+b+"'"))}};
27
- Ch=function(a){return Object.values(_.zh).find(a)||null};_.Fh=function(a){0<=Dh.indexOf(a)?Eh.warn(`Factory '${a.name()}' is already registered`):(Dh.push(a),Eh.info(`Factory '${a.name()}' has been registered.`))};Gh=function(a,b){const c=Dh.find(d=>d.a(a,b))||null;c&&Eh.info(`Chosen ads manager: ${c.name()}`);return c};_.Kh=function(a){return _.Hh.get(a)||null};_.Mh=function(a){_.Hh.get(a.id())?Lh.warn("Component already in use."):_.Hh.set(a.id(),a)};
28
- Nh=function(a){return Array.from(_.Hh.values()).find(b=>b instanceof a)||null};Oh=function(a){for(const b of _.Hh.values())a(b)};Ph=function(a){Oh(b=>{b.playerConstructed(a)})};Qh=function(a){Oh(b=>{b.beforeLoad(a)})};Rh=function(a){Oh(b=>{b.afterLoad(a)})};Sh=function(a){Oh(b=>{b.playerDestroyed(a)})};Th=function(a){if(null!==Nh(a))return null;a=new a;a.install();_.Mh(a);Lh.info("Installed component:",a.id());return a};
29
- Uh=function(a){if(a=Nh(a))a.uninstall(),_.Hh.delete(a.id()),Lh.info("Uninstalled component:",a.id())};Vh=function(a,b,c,d){a=`${a===_.C?"FATAL":"RECOVERABLE"} Clpp-Error [Category ${b} - Code ${c}]`;if(_.jh(d))a+=": "+d;else if(null!=d)if(null!=d.message)a+=": "+d.message,delete d.message;else try{a+=": "+JSON.stringify(d)}catch(e){}return a};_.Xh=function(a){var b=a.a;var c=[];for(const d in b.a)c.push.apply(c,b.a[d]);b=c;for(c=0;c<b.length;++c)Wh(b[c]);a.a.clear()};
26
+ uh=function(a){if(!a)return _.C("clpp.log",xb+a+ca),-1;const b=th[a.toUpperCase()];return void 0===b?(_.C("clpp.log",xb+a+ca),-1):b};_.wh=function(a){vh.info.apply(vh,arguments)};_.xh=function(a){vh.debug.apply(vh,arguments)};_.C=function(a){vh.warn.apply(vh,arguments)};_.yh=function(a){vh.error.apply(vh,arguments)};_.Bh=function(a){if(a){var b=a.a();b in _.zh?_.Ah.warn("Player-Factory '"+b+"' already registered"):(_.zh[b]=a,_.Ah.info("Registered Player-Factory: '"+b+"'"))}};
27
+ Ch=function(a){return Object.values(_.zh).find(a)||null};_.Fh=function(a){0<=Dh.indexOf(a)?Eh.warn(`Factory '${a.name()}' is already registered`):(Dh.push(a),Eh.info(`Factory '${a.name()}' has been registered.`))};Ih=function(a,b){const c=Dh.find(d=>d.a(a,b))||null;c&&Eh.info(`Chosen ads manager: ${c.name()}`);return c};_.Kh=function(a){return _.Jh.get(a)||null};_.Mh=function(a){_.Jh.get(a.id())?Lh.warn("Component already in use."):_.Jh.set(a.id(),a)};
28
+ Nh=function(a){return Array.from(_.Jh.values()).find(b=>b instanceof a)||null};Oh=function(a){for(const b of _.Jh.values())a(b)};Ph=function(a){Oh(b=>{b.playerConstructed(a)})};Qh=function(a){Oh(b=>{b.beforeLoad(a)})};Rh=function(a){Oh(b=>{b.afterLoad(a)})};Sh=function(a){Oh(b=>{b.playerDestroyed(a)})};Th=function(a){if(null!==Nh(a))return null;a=new a;a.install();_.Mh(a);Lh.info("Installed component:",a.id());return a};
29
+ Uh=function(a){if(a=Nh(a))a.uninstall(),_.Jh.delete(a.id()),Lh.info("Uninstalled component:",a.id())};Vh=function(a,b,c,d){a=`${a===_.D?"FATAL":"RECOVERABLE"} Clpp-Error [Category ${b} - Code ${c}]`;if(_.jh(d))a+=": "+d;else if(null!=d)if(null!=d.message)a+=": "+d.message,delete d.message;else try{a+=": "+JSON.stringify(d)}catch(e){}return a};_.Xh=function(a){var b=a.a;var c=[];for(const d in b.a)c.push.apply(c,b.a[d]);b=c;for(c=0;c<b.length;++c)Wh(b[c]);a.a.clear()};
30
30
  Yh=function(a,b,c){var d=[Ud,"msneedkey",Lg,"needkey"];const e=f=>{for(const g of d)a.off(b,g,e);c(f)};for(const f of d)a.on(b,f,e)};Wh=function(a){a.target.removeEventListener(a.type,a.a,a.f);a.target=null;a.a=null};_.Zh=function(a){return Array.isArray(a)?a:[a]};$h=function(a,b){return a===b?!0:a.length===b.length&&a.every((c,d)=>c===b[d])};bi=function(a,b,c){if(null==a&&null==b)return!0;if(null==a||null==b)return!1;a=c?a.map(c):a;b=c?b.map(c):b;return ai(a,b)&&ai(b,a)};
31
- ai=function(a,b){const c=new Set(a);return b.every(d=>c.has(d))};_.ci=function(a,b={}){if(b.Sf){const c=[];for(const d of a)c.some(e=>b.Sf(d,e))||c.push(d);return c}return Array.from((new Set(a)).values())};di=function(a,b){const c=new Set(a),d=new Set(b);return{Ci:a.filter(e=>!d.has(e)),yj:a.filter(e=>d.has(e)),kh:b.filter(e=>!c.has(e))}};_.ei=function(a,b){for(const c of a)if(!b(c))return!1;return!0};fi=function*(a){for(let b=0;b<a;b++)yield b};
32
- hi=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!==b.byteLength)return!1;if(gi(a)===gi(b)&&(a.byteOffset||0)===(b.byteOffset||0))return!0;const c=_.F(a);b=_.F(b);for(const d of fi(a.byteLength))if(c[d]!==b[d])return!1;return!0};gi=function(a){return a instanceof ArrayBuffer?a:a.buffer};_.F=function(a,b=0,c=Infinity){return ii(a,b,c,Uint8Array)};
33
- ii=function(a,b,c,d){const e=d.BYTES_PER_ELEMENT||1,f=gi(a),g=(a.byteOffset||0)+a.byteLength;a=Math.max(0,Math.min((a.byteOffset||0)+b*e,g));c=Math.min(a+Math.max(c*e,0),g);a/=e;return new d(f,a,c/e-a)};ji=function(a,b=0,c=Infinity){return ii(a,b,c,Uint16Array)};ki=function(a,b=0,c=Infinity){return ii(a,b,c,Uint32Array)};_.li=function(a,b=0,c=Infinity){return ii(a,b,c,Int32Array)};_.mi=function(a,b=0,c=Infinity){return ii(a,b,c,DataView)};
34
- ni=function(a){return a instanceof ArrayBuffer?a:0===a.byteOffset&&a.byteLength===a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer};oi=function(a){let b="";for(let c=0;c<a.length;c+=16E3)b+=String.fromCharCode.apply(null,a.subarray(c,c+16E3));return b};
35
- _.pi=function(a){if(!a)return"";a=_.F(a);239===a[0]&&187===a[1]&&191===a[2]&&(a=a.subarray(3));if("TextDecoder"in window){a=(new TextDecoder).decode(a);if(a.includes("\ufffd"))throw Error(Aa);return a}a=escape(oi(a));try{return decodeURIComponent(a)}catch(b){throw Error(Aa);}};
36
- ri=function(a,b,c){if(!a)return"";if(!c&&0!==a.byteLength%2)throw qi.error("Data has an incorrect length, must be even."),Error("Data does not seem to be UTF-16 encoded!");c=_.F(a);if(b&&255===c[0]&&254===c[1]||254===c[0]&&255===c[1])a=c.subarray(2);if(a instanceof ArrayBuffer)var d=a;else c=new Uint8Array(a.byteLength),c.set(_.F(a)),d=c.buffer;a=Math.floor(a.byteLength/2);c=new Uint16Array(a);d=new DataView(d);for(let e=0;e<a;e++)c[e]=d.getUint16(2*e,b);return oi(c)};
37
- _.si=function(a,b){if(_.jh(a))return a;let c="";b=!!b;const d=_.F(a);239===d[0]&&187===d[1]&&191===d[2]?c=_.pi(d):254===d[0]&&255===d[1]?c=ri(d.subarray(2),!1):255===d[0]&&254===d[1]&&(c=ri(d.subarray(2),!0));const e=function(f,g){return f.byteLength<=g||32<=f[g]&&126>=f[g]}.bind(null,d);qi.debug("Unable to find byte-order-mark, making an educated guess.");0===d[0]&&0===d[2]?c=ri(a,!1):0===d[1]&&0===d[3]?c=ri(a,!0):e(0)&&e(1)&&e(2)&&e(3)&&(c=_.pi(a));if(c)return b&&(c=escape(c)),c;throw Error("Unable to detect text encoding");
38
- };_.ti=function(a){if("TextEncoder"in window)return(new TextEncoder).encode(a);a=encodeURIComponent(a);a=unescape(a);const b=new Uint8Array(a.length);for(let c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b};_.ui=function(a,b){const c=new Uint8Array(2*a.length),d=new DataView(c.buffer);for(let e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c.buffer};
39
- _.vi=function(a,b){var c=b||1;b=a.length;const d=new ArrayBuffer(b*c);let e;4===c?e=ki(d):2===c?e=ji(d):e=_.F(d);for(c=0;c<b;c++)e[c]=a.charCodeAt(c);return d};_.wi=function(a,b){return String.prototype.startsWith?a.startsWith(b):0===a.indexOf(b)};_.xi=function(a,b){if(String.prototype.endsWith)return a.endsWith(b);const c=a.length-b.length;a=a.lastIndexOf(b,c);return-1!==a&&a===c};_.yi=function(a){return!!(a&&0<a.length)};_.zi=function(a){return!a||0===a.length};
40
- _.Ai=function(a){if(void 0===a||null===a||""===a)return"";try{let b=Number(a);if(mh(b))return"";a="bps";1E3<=Math.abs(b)&&(a="Kbps",b/=1E3);1E3<=Math.abs(b)&&(a="Mbps",b/=1E3);return`${b.toFixed(2).replace(/[.,]00$/,"")}${a}`}catch(b){return""}};_.Ci=function(a){a=a.replace(/<[^>]+>/gi,"");Bi.innerHTML=a;a=Bi.textContent;return a=a.replace(/<[^>]+>/gi,"")};_.Di=function(a,b){a=document.createElement(a);for(const c in b){const d=b[c];null===d||void 0===d?a.setAttribute(c,""):a.setAttribute(c,d)}return a};
41
- _.Ei=function(a,b){a.classList.add(b)};_.Fi=function(a,b){if(a&&typeof b===_.He)for(const c in b)a.style[c]=b[c]};_.Gi=function(a){return document.createElement(a)};Hi=function(a,b){const c=new MutationObserver(()=>{const d=Array.from(a.h.values());ai(Array.from(b.classList),Array.from(d))||b.classList.add(...d)});c.observe(b,{attributes:!0,attributeFilter:["class"]});return c};Ii=function(a,b){a.a&&0!==b.length&&(a.a.classList.add(b),a.h.add(b))};
42
- Ji=function(a,b,c){a.stop();let d=!0,e=null;a.a=()=>{c?clearInterval(e):clearTimeout(e);d=!1};const f=()=>{d&&a.f()};e=c?setInterval(f,1E3*b):setTimeout(f,1E3*b);return a};Ki=function(a){return 0>=a?Promise.resolve():new Promise(b=>{setTimeout(()=>{b()},1E3*a)})};Oi=function(){if(Li)return Li;Mi||(Mi=new _.Ni(()=>{Li=null}));(Li=document.querySelector(_.t)||document.querySelector(_.q))||(Li=document.createElement(_.t));Mi.la(1);return Li};_.Pi=function(){return!!navigator.userAgent.match(/Edge?\//)};
43
- _.Qi=function(a){return(navigator.userAgent||"").includes(a)};_.Ri=function(a){return _.Qi("Tizen"+(a?" "+String(a):""))};Ti=function(a){const b={major:-1,name:_.og};if(!a)return b;var c=a.replace(/_/g,".");b.name=c;c=c.split(".");1<=c.length&&(b.major=Si(a,c[0]));2<=c.length&&(b.minor=Si(a,c[1]));3<=c.length&&(b.patch=Si(a,c[2]));4<=c.length&&(b.build=Si(a,c[3]));return b};_.Ui=function(){return _.Qi("Web0S")};_.Wi=function(){return _.Ui()&&79===_.Vi().major};
44
- _.Vi=function(){const a=Xi();const b=["ie","edge","opera","firefox","safari",Zc];var c=Yi();const d=Zi[c];for(let e=0,f=b.length;e<f;e++)if(c=d[b[e]]&&a.match(d[b[e]]))return Ti(c[1]);return Ti("")};_.$i=function(){return _.Qi("CrKey")};_.aj=function(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!_.Ri()};_.bj=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:_.aj()&&1<navigator.maxTouchPoints};_.cj=function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)};
45
- Si=function(a,b){try{return parseInt(b,10)}catch(c){dj.warn("Unable to parse version number for '"+b+"' from '"+a+"'")}return-1};ej=function(a,b){if(!a||!b||0===b.length)return!1;for(let c=0;c<b.length;c++)if(0<=a.indexOf(b[c]))return!0;return!1};
46
- Yi=function(){const a=Xi();if(!a)return fj;var b=a.match(/^.+?(?=\))/);if(!b)return fj;b=b[0];if(ej(b,["iphone","ipad"]))return gj;if(ej(b,["android"]))return hj;if(ej(b,["macintosh"]))return ij;if(ej(b,["windows nt"]))return jj;if(ej(b,["tizen"]))return kj;if(ej(b,["web0s"]))return lj;if(ej(b,["linux"]))return mj;dj.warn("Unable to identify OS from user agent: "+a);return fj};Xi=function(){let a=window.navigator.userAgent;return a=a.toLowerCase()};
47
- _.oj=function(){var a=Yi();var b=Yi();var c=Zi[b];if(c){c=Xi().match(c.os_version)[1];c=Ti(c);if(b===jj)if("5.1"===c.name)c.name="xp";else if("6.1"===c.name)c.name="7";else if("6.2"===c.name||"6.3"===c.name)c.name="8";b=c}else b=Ti("");a:{c=Xi();const e=["ie","edge","opera","firefox","safari",Zc];var d=Yi();d=Zi[d];for(let f=0,g=e.length;f<g;f++)if(d[e[f]]&&c.match(d[e[f]])){c=e[f];break a}c=nj}return{os:a,osVersion:b,browser:c,browserVersion:_.Vi()}};
48
- rj=function(a,b,c){(_.Ui()&&53===_.Vi().major||_.Ui()&&68===_.Vi().major||_.Wi())&&!b.hasAttribute(zd)&&(b.style.opacity="0",b.setAttribute(zd,""),a.j.one(b,Sd,()=>{b.removeAttribute(zd);b.style.opacity="1";c&&(c.style.opacity="1")}))};sj=function(a){if(a.Va){let b=a.player.getDuration();a.maxDuration&&(b=Math.min(b,a.maxDuration));a.Va.h=b}a.ne&&a.ne()};tj=function(a,b){return _.w(function*(){yield a.release();yield a.load(b)})};
49
- uj=function(a){if(a.sideAdContainer)a=a.sideAdContainer;else if(a=a.Gg.getSurface().getContainer(),!a)throw Error("Primary player does not have a container");return a};
50
- wj=function(a,b,c){return Array.from({length:2}).map((d,e)=>{var f=document.createElement(_.t);b.appendChild(f);d=a.ka.ab.create();f=new vj(f);d.init(f,c);d.setSourceIndex(0);const g=f.getContainer();if(!g)throw Error("Failed to create player surface container element");g.classList.add("secondary");f.getMedia().classList.add(`v-${e}`);a.A.push(g);return d})};xj=function(a){return[a.a,...a.l.a.map(b=>b.player)]};
51
- yj=function(a,b,c){const d=b.getSurface().getMedia();b=b.getSurface().getUniqueCssClass();d&&(c?(a.g.debug(`Show video element .${b}`),d.classList.add(ed),d.classList.remove("clpp-hide")):(a.g.debug(`Hide video element .${b}`),d.classList.remove(ed),d.classList.add("clpp-hide")),a.F&&a.F(d,c))};zj=function(a){return a.h.find(b=>!!b.primary)||null};
52
- Nj=function(a,b,c){return _.w(function*(){if(a.w)a.g.warn(`Cannot ${c} item while busy (ID: ${b})`);else{var d=Aj(a,b);if(d){a.g.info(`${c} item (ID: ${b})`);a.w=!0;var e=a.f;e&&(e.player.isPaused()||(a.o?e.primary?Bj(a,e,Cj):e.player.pause():e.player.pause()),e.primary?Bj(a,e,Cj):Bj(a,e,Dj));var f=a.j.has(b);f&&a.j.delete(b);try{c===_.We?(e&&d.primary?yield Ej(a,d):f?yield Fj(a,d):yield Gj(a,d),sj(d)):f?a.g.error("Loading preloaded items is not supported"):yield Hj(a,d);Ij(a,d);d.primary?Bj(a,d,
53
- Dj):Bj(a,d,Cj);d.Va&&Jj(a,d,d.Va);if(d.Aa)d.player.one(_.Wd,d.Aa);d.zg&&d.zg(d.player.getDuration());e&&Kj(a,e)}catch(g){a.g.error(`Item failed to ${c} (ID: ${b})`,g);if(d.primary)throw g;const h=zj(a);h&&(a.g.warn("Ad failed, resuming primary item"),yield Ej(a,h))}finally{a.w=!1,Lj(a),Mj(a,d.next)}}else a.g.warn(`Item not found (ID: ${b})`)}})};
54
- Ij=function(a,b){const c=b.transition;if(c&&!c.Ng){if(c.Aa){const d=c.Aa,e=()=>{a.g.info(`Transition onEnded to (ID: ${d})`);a.play(d)};b.player.one(_.Wd,e);b.disposers.push(()=>{b.player.off(_.Wd,e)})}c.le&&Oj(a,b,()=>{const d=a.f.Va;d&&(b.disposers.forEach(e=>e()),b.disposers=[],a.a.trigger(new _.G(_.mc,{ad:d})),a.a.trigger(new _.G(_.Wb,{ad:d})),a.a.trigger(new _.G(_.Tb,{id:b.Qb})))});c.Ng=!0}};
55
- Pj=function(a,b){return _.w(function*(){a.g.info("Crop ads by playout limit",b);var c=zj(a),d=a.getCurrentItem();if(c&&d&&d.Va&&null!=c.W){var e=a.h.filter(l=>!l.primary),f=Math.max(...e.map(l=>l.kb));if(b>f)a.g.info("Playout limit is greater than ad pod duration, ignored.");else{var g=d.player.getPosition()+(d.kb-d.duration),h=e.sort((l,m)=>m.kb-l.kb)[0],k=c.W;b<=g?(c.W-=f-g,a.g.warn("Playout limit exceeded, immediately returning "+`to primary at ${c.W.toFixed(1)} instead of `+`${k.toFixed(1)}`),
56
- yield Nj(a,c.id,_.We),h.Aa&&h.Aa(),c=d.Va,a.a.trigger(new _.G(_.mc,{ad:c})),a.a.trigger(new _.G(_.Wb,{ad:c})),a.a.trigger(new _.G(_.Tb,{id:d.Qb}))):(a.g.warn("Limiting playout of ads to",b),(d=e.find(l=>b<=l.kb&&b>=l.kb-l.duration))?(e=b-(d.kb-d.duration),d.Va.h=e,c.W-=f-b,a.g.info("Last ad is now ",d.Va.qb(),"with cropped duration",e,"and primary will resume at",c.W.toFixed(1),"instead of",k.toFixed(1)),h.Aa&&(d.Aa=h.Aa),d.transition={le:{position:e,itemId:c.id,W:c.W}},Ij(a,d)):a.g.warn("Cannot find ad hit by limit"))}}})};
57
- Qj=function(a){return _.w(function*(){const b=a.f;b&&("loaded"!==b.state&&(yield b.Sc),yield b.player.play(),b.state=_.gf,sj(b))})};Rj=function(a,b){a.g.info("Add items",b);a.h=a.h.concat(b.map(c=>Object.assign({},c,{state:"idle",disposers:[],preloadPromise:Promise.resolve(),Sc:Promise.resolve()})))};
58
- Tj=function(a,b){return _.w(function*(){a.g.info("Remove items",b);const c=[],d=[];for(const e of a.h)b.includes(e.id)?d.push(e):c.push(e);a.h=c;yield Promise.all(d.map(e=>{e.disposers.forEach(f=>f());e.disposers=[];return Sj(a,e.id)}))})};Uj=function(a){return _.w(function*(){yield Tj(a,a.h.map(b=>b.id))})};Sj=function(a,b){return _.w(function*(){const c=a.j.get(b);c&&(a.g.info(`Stop preloading item (ID: ${b})`),c.player&&(yield Vj(a,c.player)),a.j.delete(b))})};
59
- Xj=function(a){const b=zj(a);b&&(b.transition=void 0,b.next=[],Wj(a))};Yj=function(a){return _.w(function*(){const b=a.h.filter(c=>!c.primary).map(c=>c.id);Xj(a);yield Tj(a,b)})};Zj=function(a){_.w(function*(){const b=a.getCurrentItem(),c=b.next[0];b&&b.primary&&c&&(Xj(a),yield a.play(c))})};Wj=function(a){a.f&&(a.f.disposers.forEach(b=>b()),a.f.disposers=[],a.f.transition&&(a.f.transition.Ng=!1),Ij(a,a.f))};Aj=function(a,b){return a.h.find(c=>c.id===b)||null};
60
- Bj=function(a,b,c){const d=b?b.Qb||null:null;a.a.getConfiguration().muted||a.B?(a.a.setMuted(!0),ak(a,!0)):(b.audio&&(c=b.audio),a.ka.onAudioDecision&&(c=a.ka.onAudioDecision(d)),c===Dj?(a.a.setMuted(!1),ak(a,!0)):c===Cj?(a.a.setMuted(!0),ak(a,!1)):a.g.warn("Audio decision not supported",c))};
61
- Ej=function(a,b){return _.w(function*(){if(b.player){a.G();if(b.state===qf){a.g.info("Wait for seek to finish");try{yield b.preloadPromise}catch(c){}}a.fa=!1;b.W&&(yield b.player.seek(b.W,!0));a.f=b;b.role=bk;yj(a,b.player,!0);b.state="loading";a.o?(Bj(a,b,Dj),b.player.isPaused()&&(yield b.player.play())):yield b.player.play();b.state=_.gf}})};
62
- Fj=function(a,b){return _.w(function*(){const c=b.player;if(c){if(b.state===qf){a.g.info(Eb);try{yield b.preloadPromise}catch(d){}}a.f=b;b.role=bk;yj(a,c,!0);b.state===pf?yield c.play():b.state===of&&(yield tj(c,b.config));b.state=_.gf}})};Gj=function(a,b){return _.w(function*(){yield Hj(a,b);yield b.player.play();b.state=_.gf})};
63
- Hj=function(a,b){return _.w(function*(){const c=yield ck(a,!!b.primary);a.f=b;b.role=bk;a.f.player=c;a.f.videoEl=c.getSurface().getMedia();yj(a,c,!0);b.state="loading";b.Sc=tj(c,b.config);yield b.Sc;b.state="loaded"})};
64
- Jj=function(a,b,c){const d=b.player,e=()=>{const l=d.getPosition(),m=c.getDuration();c.j=l;a.a.trigger(new _.G(_.ic,{ad:c}));!c.l&&l>=m/4&&(c.l=!0,a.a.trigger(new _.G(_.Xb,{ad:c})));!c.o&&l>=m/2&&(c.o=!0,a.a.trigger(new _.G(_.gc,{ad:c})));!c.w&&l>=3*m/4&&(c.w=!0,a.a.trigger(new _.G(_.nc,{ad:c})))},f=()=>{d.isEnded()||a.a.trigger(new _.G(_.hc,{ad:c}))},g=()=>{a.a.trigger(new _.G(_.jc,{ad:c}))},h=()=>{a.a.trigger(new _.G(_.Ub,{ad:c}))},k=()=>{a.a.trigger(new _.G(_.mc,{ad:c}));a.a.trigger(new _.G(_.Wb,
65
- {ad:c}));c.f===c.a&&a.a.trigger(new _.G(_.Tb,{id:b.Qb}))};d.on(_.fg,e);d.on(_.Se,f);d.on(_.gf,g);d.on(_.Oc,h);d.one(_.Wd,k);b.disposers.push(()=>{d.off(_.fg,e);d.off(_.Se,f);d.off(_.gf,g);d.off(_.Oc,h);d.off(_.Wd,k)});1===c.f&&a.a.trigger(new _.G(_.Sb,{id:b.Qb}));c.videoEl=d.getSurface().getMedia();a.a.trigger(new _.G(_.dc,{ad:c}));a.a.trigger(new _.G(_.lc,{ad:c}))};
66
- Kj=function(a,b){return _.w(function*(){const c=b.player;b.primary?(a.g.info("Pause primary playback"),a.o||yj(a,c,!1)):(a.g.info(`Stop previous playback (ID: ${b.id})`),b.disposers.forEach(d=>d()),b.disposers=[],b.player=null,b.videoEl=null,b.role=dk,b.cf?(a.g.info(`Release player (ID: ${b.id}) `+`after delay ${b.cf} ms.`),yield new Promise(d=>{setTimeout(()=>_.w(function*(){yield Vj(a,c);yj(a,c,!1);a.a.trigger(new _.G("ad-hls-released"));d()}),b.cf)})):(yield Vj(a,c),yj(a,c,!1)))})};
67
- Lj=function(a){Promise.all(Array.from(a.j.keys()).map(b=>Sj(a,b)))};Mj=function(a,b){_.w(function*(){if(0!==b.length){a.g.info(`Preload items (IDs: ${b})`);var c=a.h.filter(d=>b.includes(d.id))||[];yield Promise.all(c.map(d=>ek(a,d)))}})};fk=function(a,b,c){c=void 0===c?!1:c;if(!a.fa){var d=zj(a);d?(d.W=b,c&&(a.fa=!0)):a.g.error("Failed to get primary item. Cannot configure resume position.")}};gk=function(a){a.A.forEach(b=>a.C.removeChild(b));a.A=[];yj(a,a.a,!0)};
68
- Oj=function(a,b,c){const d=b.transition.le;let e=null;d.W&&fk(a,d.W);const f=()=>{const k=b.player.getPosition();.5>=d.position-k&&(a.g.info("Start RAF polling"),h(),g())},g=()=>{var k=b.player.getPosition();k>=d.position?(c(),a.g.info(`Transition onPosition to (ID: ${d.itemId}), `+`playback position: ${k.toFixed(3)} s, `+`transition point: ${d.position.toFixed(3)} s. `),a.play(d.itemId),k=!0):k=!1;k?e=null:e=requestAnimationFrame(g)},h=()=>{a.g.info("Stop timeupdate polling");b.player.off(_.fg,f)};
69
- a.g.info("Start timeupdate polling");b.player.on(_.fg,f);b.disposers.push(()=>{null!=e&&(a.g.info("Stop RAF polling"),cancelAnimationFrame(e),e=null)});b.disposers.push(h)};Vj=function(a,b){return _.w(function*(){b!==a.a&&(yield a.l.release(b))})};hk=function(a){return _.w(function*(){a.f&&(yield Kj(a,a.f),yj(a,a.a,!0))})};ck=function(a,b){return _.w(function*(){if(b)return a.a;const c=yield a.l.get();if(!c)throw Error("No player available");return c})};
70
- ek=function(a,b){return _.w(function*(){if(b.primary){b.state=qf;a.j.set(b.id,b);if(b.W&&!a.o){var c=b.player;a.g.info("Preparing to resume at",b.W);Bj(a,b,Cj);yield c.seek(b.W,!0)}b.state=pf}else{c=b.id;var d=yield ck(a,!1);b.player=d;b.videoEl=d.getSurface().getMedia();b.role=dk;b.state=qf;try{a.j.set(c,b);b.config.autoplay&&(a.g.warn(la+`Force disabling autoplay (ID: ${c})`),b.config.autoplay=!1);const e=a.a.getBandwidthEstimate();e&&(b.config.abr||(b.config.abr={}),b.config.abr.defaultBandwidthEstimate=
71
- e);b.preloadPromise=tj(d,b.config);yield b.preloadPromise;b.state=pf}catch(e){7001===e.code?(a.g.info(`Preload aborted (ID: ${c})`),b.state=nf):(a.g.warn(`Preload failed (ID: ${c})`,e),b.state=of)}}})};ak=function(a,b){a.h.filter(c=>!c.primary&&c.player).forEach(c=>c.player.setMuted(b))};_.ik=function(a){return"com.apple.hls.interstitial"===a||"com.apple.hls.overlay"===a};_.jk=function(a){if(!a)return!1;const b=!!a[_.Kb];a=!!a[_.Jb];return(b||a)&&!(b&&a)};
72
- kk=function(a){return a&&a.ASSETS&&Array.isArray(a.ASSETS)?a.ASSETS.every(b=>typeof b.URI===_.Tf&&typeof b.DURATION===_.r):!1};nk=function(a){return a.xf&&!(a.once&&a.Og)&&[lk,mk].includes(a.state)};ok=function(a){a=a.customAttributes[Ib];if(!a)return null;try{return JSON.parse(atob(a))}catch(b){return null}};pk=function(a,b){for(let d=0;d<a.length;d++){const e=a[d];var c=d===a.length-1;c&&2===b||(c?(e.next=[sf],e.transition={Aa:sf}):(c=a[d+1].id,e.next=[c],e.transition={Aa:c}))}};
73
- qk=function(a){const b={};a=a.map(d=>d.customAttributes||{});const c=new Set;a.forEach(d=>{Object.keys(d).forEach(e=>{c.add(e)})});for(const d of c)if(d===_.Pb){const e=new Set([]);a.forEach(f=>{f[d]&&f[d].forEach(g=>e.add(g))});b[d]=Array.from(e)}else if(d===_.Qb){const e=a.reduce((f,g)=>g[d]?f+g[d]:f,0);b[d]=e}return b};
74
- sk=function(a,b){if(0===a.length)return a;const c=new Map;1===b?a.forEach(d=>{const e=c.get(d.startTime)||[];e.push(d);c.set(d.startTime,e)}):c.set(0,a);a=[];for(const d of c.values())1===d.length?a.push(d[0]):(b=rk(d),a.push(b));return a};
75
- rk=function(a){const b=[];let c=0;a.forEach(f=>{var g=Math.max(0,f.endTime-f.startTime);c+=g;var h=f.customAttributes[_.Jb];h&&b.push({type:"list",id:f.id,customAttributes:f.customAttributes,lc:{URI:h,DURATION:0}});if(h=f.customAttributes[_.Kb])g={type:"uri",id:f.id,customAttributes:f.customAttributes,lc:{URI:h,DURATION:g}},(f=ok(f))&&(g.lc[Ib]=f),b.push(g)});const d=qk(a);d[Nb]={entries:b,na:[]};const e=a[0];a=a.map(f=>f.id).join("+");return Object.assign({},e,{id:a,endTime:e.startTime+c,customAttributes:d})};
76
- _.uk=function(){return{maxAttempts:1,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0,fatalStatusCodes:[...tk]}};vk=function(a,b){a.timeout=b.timeout;a.baseDelay=b.baseDelay;a.backoffFactor=b.backoffFactor;a.fuzzFactor=b.fuzzFactor;a.maxAttempts=b.maxAttempts;a.fatalStatusCodes=b.fatalStatusCodes||[...tk]};wk=function(a){const b={};a.forEach((c,d)=>{b[d.trim()]=c});return b};
77
- _.yk=function(a,b){_.jh(a)&&(a={uris:[a]});Array.isArray(a)&&(a={uris:a});const c={uris:a.uris||[],type:a.type||_.xk,uriIndex:0,method:a.method||"GET",body:a.body||null,headers:Object.assign({},a.headers),allowCrossSiteCredentials:a.allowCrossSiteCredentials||!1,onProgress:a.onProgress||null,onFragment:a.onFragment||null,maxAttempts:a.maxAttempts||1,currentAttempt:0,baseDelay:a.baseDelay||1E3,backoffFactor:a.backoffFactor||2,fuzzFactor:a.fuzzFactor||.5,timeout:a.timeout||0,requestModifiers:a.requestModifiers||
78
- [],responseModifiers:a.responseModifiers||[],startTime:a.startTime||null,endTime:a.endTime||null,contentType:a.contentType||null,licenseRequestType:a.licenseRequestType||null,sessionId:null,bytesRemaining:-1,bytesLoaded:-1,bytesTotal:-1,timescale:a.timescale||null,rateLimitBps:a.rateLimitBps||null,disableFragmentSupport:a.disableFragmentSupport||!1,disableMergedFragments:a.disableMergedFragments||!1,fatalStatusCodes:[...tk],requestStartTimestamp:null};a.keyInfo&&(c.keyInfo=a.keyInfo);b&&vk(c,b);return c};
79
- _.Ck=function(a,b,c,d,e,f,g,h){a={uri:e||d,data:b,headers:a,status:c,timeMs:g,responseStartMs:h,request:f};if(zk(c))return Ak(a);throw Bk(a);};zk=function(a){return 200<=a&&299>=a&&202!==a};Ak=function(a){return{uri:a.uri,data:a.data||new ArrayBuffer(0),headers:a.headers,status:a.status,fromCache:!!a.headers["x-shaka-from-cache"],timeMs:a.timeMs,responseStartMs:a.responseStartMs,request:a.request}};
80
- Bk=function(a){a=Ak(a);try{var b=_.si(a.data,!0)}catch(d){b=null}_.xh("HTTP error text:",b);const c=a.request;return new _.H(0<=(c?c.fatalStatusCodes||[]:[]).indexOf(a.status)?_.C:1,1,1001,{url:a.uri,status:a.status,responseText:b,headers:a.headers,request:a.request,response:a})};Dk=function(a,b){b=parseInt(b,10);Number.isNaN(b)&&(b=-1);a.bytesTotal=b;a.bytesLoaded=0;a.bytesRemaining=b};Ek=function(a,b,c){0<a.bytesRemaining&&(a.bytesRemaining-=b);a.bytesLoaded+=b;if(a.onProgress)a.onProgress(b,c)};
81
- Fk=function(a,b,c){if(0>=a)return Promise.resolve();const d=8*c/a-b/1E3;return 0<d?new Promise(e=>{setTimeout(e,1E3*d)}):Promise.resolve()};Gk=function(a){return a.reduce((b,c)=>b+c,0)};Ik=function(a){return a.a.find(b=>b.state===Hk)||null};Jk=function(a,b){const c=a.f.getPosition();b>=c||a.a.filter(d=>1===d.Vc&&!d.once&&d.ug&&d.startTime>b).forEach(d=>{d.xf=!0})};Lk=function(a){return a.a.find(b=>b.state===Kk)||null};
82
- Mk=function(a,b){return a.a.find(c=>nk(c)&&!c.$h&&1===c.Vc&&b>c.startTime&&b<c.endTime)||null};Nk=function(a,b){const c=a.f.getPosition();return a.a.filter(d=>1===d.Vc&&!d.Pf).sort((d,e)=>e.startTime-d.startTime).find(d=>d.startTime>c&&d.startTime<b)||null};Qk=function(a,b,c){_.w(function*(){a.fa=!0;try{const d=Lk(a);d&&(yield Ok(a,d));a.g.info("Seek into interstitial",b.da);yield Pk(a,b)}catch(d){yield a.f.seek(c)}finally{a.fa=!1}})};
83
- Rk=function(a,b,c){_.w(function*(){a.fa=!0;try{const d=Lk(a);d&&(yield Ok(a,d));a.g.info("Play jumped interstitial",b.da,"resume at",c.toFixed(2));yield Pk(a,b,c)}catch(d){a.g.warn("Failed to play jumped interstitial",b.da,d),b.Ah=new Date,yield a.f.seek(c)}finally{a.fa=!1}})};Ok=function(a,b){return _.w(function*(){a.g.info("Unschedule interstitial",b.da);yield Yj(a.X);b.state=lk})};
84
- Zk=function(a,b){const c=()=>_.w(function*(){if(!a.fa&&!a.ze){var g=b.getPosition(),h=Sk(a,g);h&&(yield Tk(a,h))&&Uk(a,h,b);if((h=Vk(a))&&h.state===lk&&b.getDuration()-g<a.ka.resolutionOffsetSec&&(yield Tk(a,h)))if(h.na&&0!==h.na.length){if(g=a.X.getCurrentItem()){var k=Wk(a,h,2);if(0!==k.length){var l=k[0].id;g.next=[l];g.transition={Aa:l};a.g.info(`Schedule postroll interstitial ${h.da}`);Xk(a,h,k)}}}else a.g.warn("Postroll interstitial has no assets, ignoring.")}});b.on(_.fg,c);a.h.push(()=>{b.off(_.fg,
85
- c)});const d=()=>{Yk(a,!1,!0,!0)};b.on(_.eg,d);a.h.push(()=>{b.off(_.eg,d)});const e=()=>{a.ze=!0};b.on(_.Sb,e);a.h.push(()=>{b.off(_.Sb,e)});const f=()=>{a.ze=!1};b.on(_.Tb,f);a.h.push(()=>{b.off(_.Tb,f)})};$k=function(a){a.h.forEach(b=>b());a.h=[]};al=function(a){return(a=a.X.getCurrentItem())&&!a.primary?a.player:null};
86
- Yk=function(a,b,c,d){var e=bl(a);a.g.info("Interstitial cues changed",e);var f=e;if(d){f=di(a.a.map(p=>p.da),e.map(p=>p.id));dl(a,f.Ci);const n=new Set(f.kh);f=e.filter(p=>n.has(p.id))}if(!el(a,f))return!1;const g=[],h=[],k=[];f.forEach(n=>{const p=n.customAttributes.CUE||[];p.includes(_.cb)?h.push(n):!d&&p.includes("PRE")?g.push(n):!c&&n.startTime<a.ka.xi?g.push(n):k.push(n)});e=sk(g,0);f=sk(h,2);const l=sk(k,1),m=e.concat(f,l);fl(a,m);0<e.length&&gl(a,e[0],b);l.forEach(n=>hl(a,n,1));0<f.length&&
87
- hl(a,f[0],2);il(a,m);return 0<e.length};jl=function(a){_.w(function*(){var b=a.X;Rj(b,[{id:sf,primary:!0,config:b.a.getConfiguration(),next:[],kb:0,duration:0,Qb:null}]);var c=zj(b);if(!c)throw Error("Failed to find primary item");b.f=c;c.role=bk;c.player=b.a;c.videoEl=c.player.getSurface().getMedia();yj(b,c.player,!0);b=a.f;c=b.getConfiguration();a.j=Yk(a,!c.autoplay,b.isLive(),!1);if(a.j){if(b=a.X,c=b.l,c=c.a[0]?c.a[0].player:null)b.o||yj(b,b.a,!1),yj(b,c,!0)}else c.autoplay&&(yield Qj(a.X))})};
88
- Pk=function(a,b,c){return _.w(function*(){if(!(yield Tk(a,b)))throw Error("Failed to bind");yield kl(a,b,1,!1,c)})};bl=function(a){return a.f.getTimelineCues().filter(b=>_.ik(b.schemeIdUri)&&b.customAttributes)};dl=function(a,b){const c=new Set(b);a.a.forEach(d=>{c.has(d.da)&&!nk(d)&&a.g.warn("Removing an interstitial in active state",d)});a.a=a.a.filter(d=>!c.has(d.da))};
89
- el=function(a,b){const c=[];b.forEach(d=>{_.jk(d.customAttributes)||c.push(`Interstitial cue ${d.id} is invalid `+"it must contain exactly one of X-ASSET-LIST or X-ASSET-URI.")});0<c.length&&a.g.error("Invalid interstitials, all interstitials will "+`be skipped. ${c.join(" ")}`);return 0===c.length};
90
- fl=function(a,b){var c=b.sort((f,g)=>f.startTime-g.startTime);b=a.ka.resolutionOffsetSec;let d=Infinity;const e=[];for(let f=0;f<c.length-1;f++){const g=c[f],h=c[f+1];h&&(d=Math.min(d,h.startTime-g.endTime));h&&h.startTime<=g.endTime&&e.push(`Interstitials ${g.id} and ${h.id} `+"overlap.")}d<b&&(c=d/2,a.ka.resolutionOffsetSec=c,a.g.info("Interstitials are closer than configured "+`resolutionOffsetSec (${b} s) auto-reconfiguring to `+`${c} s.`));0<e.length&&a.g.warn("Unsupported format of interstitials, playback may not "+
91
- `behave correctly. ${e.join(" ")}`)};gl=function(a,b,c){_.w(function*(){var d=hl(a,b,0);const e=yield Tk(a,d),f=d.na?d.na.length:0;if(e&&0<f)try{a.g.info(`Player preroll interstitial ${d.da}`),yield kl(a,d,0,c)}catch(g){a.g.error("Preroll interstitial failed.",g),(d=zj(a.X))&&(yield a.X.play(d.id))}else e?a.g.warn("Preroll interstitial has no assets, skipping"):a.g.error("Preroll interstitial failed, skipping"),yield hk(a.X),c||(yield Qj(a.X))})};
92
- hl=function(a,b,c){{const e=b.customAttributes[_.Kb],f=b.customAttributes[_.Jb],g=b.customAttributes[Nb],h=b.customAttributes[_.Qb],k=b.customAttributes[_.Ob],l=b.customAttributes[_.Pb]||[];b.customAttributes[Rb]||(b.customAttributes[Rb]=null==h||0<h?"RANGE":"POINT");var d=b.customAttributes["X-YOSPACE-AUDIO-PRIORITY"];d="CONTENT"===d?Dj:"AD"===d?Cj:void 0;b={da:b.id,startTime:b.startTime,endTime:b.endTime,state:lk,Ef:f,Ff:e,nd:g,na:null,W:null==h?null:Math.max(0,b.startTime+h),Ei:h,cc:k,Vc:c,$h:"POINT"===
93
- b.customAttributes[Rb],sh:!l.includes("SKIP"),Pf:!l.includes("JUMP"),Pg:ok(b),ug:null!=h&&0>h,once:(b.customAttributes.CUE||[]).includes("ONCE"),Og:!1,xf:!0,customAttributes:b.customAttributes,audio:d}}a.a.push(b);return b};
94
- il=function(a,b){_.w(function*(){const c=a.X.getCurrentItem();if(c)if(c.primary)a.a.forEach(g=>{const h=b.find(k=>k.id===g.da);if(h){const k=h.customAttributes[_.Ob];null==g.cc&&null!=k&&(a.g.info(zb,h.id,"Playout limit",k),g.cc=k,1===g.Vc&&g.state===Kk&&ll(a,g))}});else{var d=b.find(g=>g.id===c.Qb);if(d){var e=d.customAttributes[_.Ob];if(null!=e){var f=a.a.find(g=>g.da===d.id);f&&null==f.cc&&(a.g.info(zb,d.id,"Playout limit",e),f.cc=e,yield Pj(a.X,e))}}}})};
95
- ll=function(a,b){_.w(function*(){yield Ok(a,b);yield Uk(a,b,a.f)})};Tk=function(a,b){return _.w(function*(){b.state=Hk;if(b.nd)yield ml(a,b,b.nd);else if(b.Ef)yield nl(a,b,b.Ef);else if(b.Ff){b.na=[{URI:b.Ff,DURATION:b.endTime-b.startTime}];var c={URI:b.na[0].URI,DURATION:b.na[0].DURATION};b.Pg&&(c[Ib]=b.Pg);c={ASSETS:[c]};ol(a,new _.G($b,{id:b.da,detail:c}));b.state=pl}else b.state=ql;return b.state===pl})};
96
- kl=function(a,b,c,d,e){return _.w(function*(){if(0!==b.na.length&&a.X.getCurrentItem()){var f=Wk(a,b,c);0!==f.length&&(Xk(a,b,f),0===c&&a.f.isLive()||(null!=e?fk(a.X,e,!0):null!=b.W&&fk(a.X,b.W)),d?yield a.X.load(f[0].id):yield a.X.play(f[0].id))}})};
97
- Uk=function(a,b,c){if(b.na)if(0===b.na.length){const g=()=>{c.isLive()?a.g.info("Skipping empty "+`live interstitial ${b.da}`):null!=b.W&&0!==b.Ei?c.seek(b.W):a.g.info(`Empty VOD interstitial ${b.da}, `+"continuing to next segment")};c.one(_.cg,g);a.h.push(()=>{c.off(_.cg,g)});a.g.info(`Schedule interstitial ${b.da} to `+"be skipped")}else{var d=a.X.getCurrentItem();if(d){var e=Wk(a,b,1);if(0!==e.length){var f=e[0].id;null!=b.W&&fk(a.X,b.W);d.next=[f];d.transition={le:{position:b.startTime,itemId:f,
98
- W:b.W}};a.g.info(`Schedule interstitial ${b.da} for `+`${b.startTime} s`);Xk(a,b,e)}}}};Sk=function(a,b){return a.a.find(c=>{const d=c.startTime-b;return 1===c.Vc&&nk(c)&&0<d&&d<=a.ka.resolutionOffsetSec})||null};Vk=function(a){return a.a.find(b=>2===b.Vc)||null};
99
- ml=function(a,b,c){return _.w(function*(){try{const d=[],e=c.entries,f=e.map(h=>_.w(function*(){if("list"===h.type)return(yield rl(a,h.lc.URI)).ASSETS.map(k=>({id:h.id,customAttributes:h.customAttributes,lc:k}));if("uri"===h.type)return[{id:h.id,customAttributes:h.customAttributes,lc:h.lc}];throw new _.sl("Invalid group asset entry type");}));(yield Promise.all(f)).forEach(h=>d.push(...h));b.nd={entries:e,na:d};const g={ASSETS:d.map(h=>h.lc)};tl(a,b,g)}catch(d){a.g.error(`Failed to bind grouped asset list for ${b.da}`,
100
- d),b.state=ql}})};nl=function(a,b,c){return _.w(function*(){try{a.g.info(`Load X-ASSET-LIST for ${b.da}`);ol(a,new _.G(Yb));const d=yield rl(a,c);tl(a,b,d)}catch(d){a.g.error("Failed to load X-ASSET-LIST",d),b.state=ql}})};
101
- rl=function(a,b){return _.w(function*(){var c=a.X.Zd();if(!c)throw Error("No player found");c=c.getNetworkEngine();const d=_.yk(ul(a,b));c=yield vl(c,d);if(null===c)return a.g.warn(`X-ASSET-LIST ${b} returned no content`),{ASSETS:[]};if(!kk(c))throw new _.sl("Invalid X-ASSET-LIST list response");return c})};
102
- tl=function(a,b,c){b.na=c.ASSETS;b.na&&0!==b.na.length||a.g.info(`Interstitial ${b.da} has no assets, `+"will be smoothly skipped");if(null==b.W){const d=Gk(b.na.map(e=>e.DURATION));b.W=b.startTime+(null==b.cc?d:Math.min(b.cc,d))}b.state=pl;ol(a,new _.G(Zb));ol(a,new _.G($b,{id:b.da,detail:c}))};ol=function(a,b){a.f.trigger(b)};ul=function(a,b){return(a=a.ka.wi)?(b=new URL(b),b.searchParams.set("_HLS_primary_id",a),b.toString()):b};
103
- Wk=function(a,b,c){let d=0;const e=!!b.nd;let f=b.na.map((k,l)=>{let m=b.da;e&&(m=b.nd.na[l].id);d+=k.DURATION;return{id:`${m}-${l}`,config:{source:{url:ul(a,k.URI),type:_.wl}},duration:k.DURATION,kb:d,Qb:m,next:[],Va:new I(c,l+1,b.na.length,k.DURATION,m,b.sh,b.customAttributes||null),audio:b.audio}});pk(f,c);f.forEach(k=>{k.ne=()=>{var l=k.Va;a.g.info(`Playing ad ${`${l.f}/${l.a}`} of interstitial `+k.Qb)}});if(null!=b.cc&&(f=xl(a,b,f),0===f.length))return[];const g=f[0].ne;f[0].ne=()=>{b.Og=!0;
104
- b.ug&&(b.xf=!1);a.g.info(`Playing interstitial ${b.da} with `+`${b.na.length} assets and will resume primary `+`content ${b.W?`at ${b.W.toFixed(1)} s`:"after interstitial ended"}.`);g()};f[0].zg=k=>{null==b.W&&(b.W=b.startTime+k,fk(a.X,b.W),a.g.info("Primary content will resume at",b.W.toFixed(1),"s"));b.state=yl};const h=f[f.length-1];h.Aa=()=>{b.state=mk;Tj(a.X,f.map(k=>k.id));2===c&&hk(a.X)};h.cf=a.ka.adReleaseDelayMs;return f};
105
- Xk=function(a,b,c){Rj(a.X,c);c=a.X;Wj(c);c.f&&(c.f.Va&&Jj(c,c.f,c.f.Va),Lj(c),Mj(c,c.f.next));b.state=Kk;ol(a,new _.G(_.fc,{ad:null}))};
106
- xl=function(a,b,c){const d=b.cc;a.g.info(`Playout limit for ${b.da} is `+`${d} s`);b=c[c.length-1].kb;if(d>=b)return a.g.info(`Playout limit (${d}) is`+`larger or equal to total duration: (${b}).`),c;if(0>=d)return a.g.info("Discarding all ads."),[];const e=c.filter(f=>f.kb-f.duration<=d);e.forEach(f=>{f.Va.a=e.length});a=e[e.length-1];c=d-(a.kb-a.duration);.1>Math.abs(c-a.duration)?a.transition.Aa=sf:a.transition.le={position:c,itemId:sf,W:null};a.maxDuration=c;return e};
107
- zl=function(){try{const a=URL.createObjectURL(new Blob);URL.revokeObjectURL(a);return a.slice(a.lastIndexOf("/")+1)}catch(a){let b=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,c=>{const d=(b+16*Math.random())%16|0;b=Math.floor(b/16);return("x"===c?d:d&3|8).toString(16)})}};
108
- Dl=function(a){a.a.on(window,"offline",()=>{Al(a,!1)});a.a.on(window,"online",()=>{a.f||Bl(a)});a.a.on(a.m,Of,()=>Cl(a));a.a.on(a.m,"suspend",()=>Cl(a));a.a.on(a.m,_.Fg,()=>Cl(a));a.a.on(a.m,_.gf,()=>{a.f||Bl(a)});a.a.on(a.m,_.tf,()=>{a.f||Bl(a)});a.a.on(a.m,_.Qf,()=>{switch(a.m.getState()){case 2:Cl(a);break;default:Cl(a)}})};El=function(a){a.h&&(a.h.stop(),a.h=null)};Cl=function(a){a.f&&Bl(a)};
109
- Gl=function(a){return _.w(function*(){var b=a.m.getConfiguration().connectivityCheck;b&&a.m&&(b=yield Fl(a.j,b.url,b.attemptParameters,b.method),Al(a,b))})};Bl=function(a){a.m.getConfiguration().connectivityCheck&&(El(a),a.h=(new _.Ni(()=>Gl(a))).la(5))};Al=function(a,b){El(a);a.f!==b&&(a.f=b,a.m&&a.m.getConfiguration().connectivityCheck&&a.m.trigger(new _.G(Oe,{online:a.f})))};_.Il=function(a,b){a.a.push(Hl(b,()=>{{var c=a.a;const d=c.indexOf(b);-1<d&&c.splice(d,1)}}))};
110
- _.Jl=function(){let a,b;const c=new Promise((e,f)=>{a=e;b=f}),d=Object.assign(c,{done:!1,df:!1,Ai:!1,value:null,error:null,resolve(e){d.df=!0;d.done=!0;d.value=e;a(e)},reject(e){d.Ai=!0;d.done=!0;d.error=e;b(e)}});return d};Kl=function(a,b){try{return new URL(a,b)}catch(c){return null}};Ll=function(){return window.performance&&window.performance.now?window.performance.now():Date.now()};Ml=function(a){return Ll()-a.a};Ol=function(a){const b=new Nl;b.a=a.a;return b};
111
- Pl=function(a,b){var c=a.f+b.byteLength;if(a.a.byteLength<c){let d=a.a.byteLength;for(;d<c;)d*=2;c=new Uint8Array(d);c.set(a.a);a.a=c}a.a.set(b,a.f);a.f+=b.byteLength};Ql=function(a,b,c){return b.read().then(({done:d,value:e})=>{null!=e&&(Pl(a,e),Ek(c,e.byteLength,Ml(a.h)),a.h.a=Ll());return d?(d=a.a.buffer,a.a.byteLength!==a.f&&(d=d.slice(0,a.f)),Promise.resolve(d)):Promise.resolve().then(()=>Ql(a,b,c))})};
112
- Rl=function(a){let b=null;a.h!==a.f&&(b={start:a.h,end:a.f,length:a.f-a.h,data:new DataView(a.j.a.buffer,a.h,a.f-a.h),count:-1});return b};Sl=function(a,b){{var c=a.j;const d=c.f+b.byteLength;if(d>c.a.byteLength){const e=c.a;c.a=new Uint8Array(Math.max(Math.ceil(c.a.buffer.byteLength*c.h),d));c.a.set(e)}c.a.set(b,c.f);c.f+=b.byteLength}a.a=a.h;a.f=a.j.f;a.l=new DataView(a.j.a.buffer,0,a.j.f)};
113
- Ul=function(a){if(0<=a.o&&a.f<a.o)return null;let b=Tl(a);for(;null!==b;){if(b.name===_.xe){const c={start:a.h,end:b.end,length:b.end-a.h,data:new DataView(a.j.a.buffer,a.h,b.end-a.h),count:1};a.h=b.end;return c}b=Tl(a)}return null};
114
- Vl=function(a,b,c,d){return b.read().then(e=>{var {done:f,value:g}=e;d&&g&&(d(g.byteLength,Ml(a.w)),a.w.a=Ll());if(f)return e=Rl(a),(e=c(!0,e))?e.then(()=>a.j.a.buffer):Promise.resolve(a.j.a.buffer);let h=Promise.resolve();if(null!=g){Sl(a,g);var k=Ul(a);for(e=[];k;)e.push(k),k=Ul(a);if(!a.A)e.forEach(l=>{h=h.then(()=>c(!1,l))});else if(0<e.length){k=e[0];if(1<e.length){k=e[0];const l=e[e.length-1],m=l.end-k.start;k={start:k.start,end:l.end,length:m,data:new DataView(a.j.a.buffer,k.start,m),count:e.length}}(e=
115
- c(!1,k))&&(h=e)}}return h.then(()=>Vl(a,b,c,d))})};
116
- Tl=function(a){const b=a.a;if(a.a+4>=a.f)return a.a=a.f,null;var c=Wl(a);if(a.a+4>=a.f)return a.a=a.f,null;var d=Wl(a);d=String.fromCharCode(d>>24&255,d>>16&255,d>>8&255,d&255);switch(c){case 0:c=a.f-b;break;case 1:if(a.a+8>=a.f)return a.a=a.f,null;{let e,f;try{f=a.l.getUint32(a.a,!1),e=a.l.getUint32(a.a+4,!1)}catch(g){throw new _.H(_.C,3,3E3);}if(2097151<f)throw new _.H(_.C,3,3E3);a.a+=8;c=f*Math.pow(2,32)+e}}c=b+c;a.o=c;return a.f>=c?(a.a=c,{name:d,start:b,end:c}):null};
117
- Wl=function(a){const b=a.l.getUint32(a.a,!1);a.a+=4;return b};
118
- $l=function(a){var b=new Xl;for(const e in a.headers)b.append(e.toLowerCase(),a.headers[e]);const c=new Yl,d={bd:!1,Sg:!1};b={U:Zl(a.uris[a.uriIndex],a,{body:a.body||void 0,headers:b,method:a.method,signal:c.signal,credentials:a.allowCrossSiteCredentials?"include":void 0},d),request:a,abort:()=>{d.bd||(d.bd=!0,c.abort());return Promise.resolve()}};if(a=a.timeout){const e=window.setTimeout(()=>{d.Sg=!0;c.abort()},a);b.U=b.U.finally(()=>{window.clearTimeout(e)})}return b};
119
- Zl=function(a,b,c,d){return _.w(function*(){const e=new Nl,f=Ol(e);try{const g=yield am(a,c),h=wk(g.headers),k={uri:g.url,data:null,headers:h,status:g.status,timeMs:0,responseStartMs:Ml(f),request:b};if(!zk(g.status))throw k.data=yield g.arrayBuffer(),k.timeMs=Ml(e),Bk(k);const l=g.headers.get(sa);Dk(b,l);const m=l?parseInt(l,10):0;if(b.onFragment&&!b.disableFragmentSupport&&2===b.type){const n=g.body.getReader(),p=new bm(m,!b.disableMergedFragments);k.data=yield Vl(p,n,(u,v)=>{if(d.bd)return null;
120
- v&&v.data&&(Ek(b,v.data.byteLength,Ml(f)),f.a=Ll());return b.onFragment&&v?b.rateLimitBps?Fk(b.rateLimitBps,Ml(e),b.bytesLoaded).then(()=>b.onFragment(v)):b.onFragment(v):null},b.onProgress)}else{const n=g.body.getReader(),p=yield Ql(new cm(m),n,b);b.rateLimitBps&&(yield Fk(b.rateLimitBps,Ml(e),p.byteLength));k.data=p}if(d.bd)throw Error("Request was aborted");k.timeMs=Ml(e);return Ak(k)}catch(g){if(d.bd)throw new _.H(1,1,7001,{url:a,request:b});if(d.Sg)throw new _.H(1,1,1003,{url:a,request:b});if(g&&
121
- 1001===g.code)throw g;_.yh("Error while fetching data:",g);throw new _.H(1,1,1002,{url:a,error:g,request:b,status:-1},g);}})};
122
- em=function(a){const b=a.uris[a.uriIndex],c=new dm,d=new Nl,e=Ol(d);let f=0,g;const h=new _.Jl;c.open(a.method,b,!0);c.responseType="arraybuffer";c.timeout=a.timeout;c.withCredentials=a.allowCrossSiteCredentials;let k=!1,l=!1;c.onreadystatechange=function(m){m=m.target;m.readyState>=XMLHttpRequest.LOADING&&0===f&&(g=Ml(e));m.readyState>=XMLHttpRequest.HEADERS_RECEIVED&&!k&&(m=m.getResponseHeader(sa),Dk(a,m),k=!0)};c.onload=function(m){m=m.target;var n=(m.getAllResponseHeaders()||"").trim().split("\r\n");
123
- const p={};for(const u of n)n=u.split(": "),p[n[0].toLowerCase()]=n.slice(1).join(": ");try{const u=Ml(e);l||Ek(a,m.response?m.response.length:0,u);const v=_.Ck(p,m.response,m.status,b,m.responseURL,a,u,g);a.rateLimitBps?Fk(a.rateLimitBps,Ml(e),a.bytesLoaded).then(()=>{h.resolve(v)}):h.resolve(v)}catch(u){h.reject(u)}};c.onerror=function(m){m=m.target;if(0>=m.status)h.reject(new _.H(1,1,1002,{url:b,request:a,status:m.status}));else{var n=m.getAllResponseHeaders();const u={};if(n){n=n.trim().split("\r\n");
124
- for(var p of n)n=p.split(": "),u[n[0].toLowerCase()]=n.slice(1).join(": ")}p=_.Ck(u,m.response,m.status,b,m.responseURL,a,Ml(e),g);h.resolve(p)}};c.ontimeout=function(){h.reject(new _.H(1,1,1003,{url:b,request:a}))};c.onprogress=function(m){const n=Ml(d);d.a=Ll();if(100<n||m.lengthComputable&&m.loaded===m.total)Ek(a,m.loaded-f,n),f=m.loaded,l=!0};for(const m in a.headers)c.setRequestHeader(m.toLowerCase(),a.headers[m]);c.send(a.body);return{U:h,request:a,abort:()=>{c.abort();h.reject(new _.H(1,1,
125
- 7001,{url:b,request:a}));return Promise.resolve()}}};_.gm=function(a,b=!0){a=_.fm(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")};_.fm=function(a){a=oi(_.F(a));return btoa(a)};_.hm=function(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));const b=new Uint8Array(a.length);for(let c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b};_.im=function(a){const b=new Uint8Array(a.length/2);for(let c=0;c<a.length;c+=2)b[c/2]=window.parseInt(a.substr(c,2),16);return b};
126
- _.jm=function(a){let b="";for(let c=0;c<a.length;++c){let d=a[c].toString(16);1===d.length&&(d="0"+d);b+=d}return b};_.km=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.length!==b.length)return!1;for(let c=0;c<a.length;++c)if(a[c]!==b[c])return!1;return!0};_.lm=function(a){var b=0;for(var c=0;c<arguments.length;++c)b+=arguments[c].length;b=new Uint8Array(+b);c=0;for(let d=0;d<arguments.length;++d)b.set(arguments[d],c),c+=arguments[d].length;return b};
127
- nm=function(a){try{const b=a.uris[a.uriIndex],c=_.mm(b);return{U:Promise.resolve({uri:b,data:c.data,request:a,headers:{"content-type":c.contentType}}),request:a,abort:()=>Promise.resolve()}}catch(b){return{U:Promise.reject(b),request:a,abort:()=>Promise.resolve()}}};
128
- _.mm=function(a){var b=a.split(":");if(2>b.length||"data"!==b[0])throw _.yh("Bad data URI, failed to parse scheme"),new _.H(_.C,1,1004,{uri:a});b=b.slice(1).join(":").split(",");if(2>b.length)throw _.yh("Bad data URI, failed to extract encoding and MIME type"),new _.H(_.C,1,1004,{uri:a});var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];let d=!1;1<b.length&&"base64"===b[b.length-1]&&(d=!0,b.pop());return{data:d?_.hm(a).buffer:_.ti(a).buffer,contentType:c}};
129
- Hl=function(a,b){a.U.then(()=>b(!0),()=>b(!1));return a};
130
- qm=function(a){a.h=a.C.then(e=>{a.j=e.request;e.request.uriIndex=e.request.currentAttempt%e.request.uris.length;if(0<e.request.currentAttempt){-1===a.f&&(a.f=om(e.request.baseDelay,1E3));const f=a.f*(1+(2*Math.random()-1)*om(e.request.fuzzFactor,.5));a.f*=om(e.request.backoffFactor,2);if(0<f)return(new Promise((g,h)=>{a.l=h;pm(a,()=>{g(e.plugin(e.request))},f)})).catch(g=>{if(!a.a)throw g;})}if(a.a)throw new _.H(1,1,7001,{url:e.request.uris[e.request.uriIndex],request:e.request});return e.plugin(e.request)});
131
- let b=0,c=0,d=0;return a.h.then(e=>{const f=e.request;f.currentAttempt+=1;b=f.currentAttempt;c=f.maxAttempts;d=f.uris.length;return e.U}).then(e=>{a.w.resolve(e)}).catch(e=>{if(e instanceof _.H){const f=b<d,g=7001!==e.code,h=b<c;if((1===e.severity||f)&&g&&h)return a.A&&a.A(e),qm(a);g&&e.a(_.C);a.w.reject(e)}else a.w.reject(e)})};pm=function(a,b,c){a.o=setTimeout(b,c)};om=function(a,b){return null===a||void 0===a?b:a};
132
- vl=function(a,b){return _.w(function*(){const c=yield rm(a,b);if(!c)return null;try{const d=JSON.parse(c);if(null==d||typeof d!==_.He)throw Error("Not an object");return d}catch(d){throw new _.sl("Failed to parse JSON response","json-failed");}})};Fl=function(a,b,c,d){d=void 0===d?"HEAD":d;return _.w(function*(){if(!navigator.onLine)return!1;if(b){const e=_.yk(b,c);e.method=d;c||(e.timeout=5E3);e.headers["cache-control"]="no-cache";try{yield a.fetch(e).U}catch(f){if(1002===f.code||1003===f.code)return!1}}return!0})};
133
- sm=function(a,b){a.A=b};rm=function(a,b){return _.w(function*(){const c=yield a.fetch(b);return _.pi(c.data).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")})};
134
- _.wm=function(a,b,c){if(a.w)return new tm(Promise.reject(new _.H(1,1,7001,{url:b.uris[b.uriIndex],request:b})));a.l&&0<a.l&&(b.rateLimitBps=a.l);var d=[];for(var e of a.h)d.push(e);if(b.requestModifiers)for(const g of b.requestModifiers)d.push(g);b.requestModifiers=d;um(a,b);b.responseModifiers=[...a.j,...b.responseModifiers||[]];let f;e=d=new _.Jl;try{const g=[{type:"public",modifiers:b.requestModifiers},{type:"internal",modifiers:a.f}];for(const h of g)for(const k of h.modifiers)e=e.then(l=>{if(f.a)throw new _.H(_.C,
135
- 1,7001,l?{url:l.uris[l.uriIndex],request:l}:null);return"internal"===h.type?k(l,c)||l:k(l)||l}).catch(l=>{if(l instanceof _.H)throw l;throw new _.H(_.C,1,1006,null,l);});e=e.then(h=>({request:h,plugin:vm(a,h)}));f=new tm(e,a.A);for(const h of b.responseModifiers)f.then(k=>{const l=()=>{if(f.a)throw new _.H(_.C,1,7001,k?{url:k.request.uris[k.request.uriIndex],request:k.request}:null);};l();const m=h(k)||k;l();return m}).catch(k=>{if(k instanceof _.H&&k.data&&k.data.response){const l=h(k.data.response);
136
- if(l&&l.then)return l.then(()=>Promise.reject(k))}return Promise.reject(k)}).catch(k=>{if(k instanceof _.H)throw k;throw new _.H(_.C,1,1007,null,k);});_.Il(a.o,f);d.resolve(b);return f}catch(g){return new tm(Promise.reject(g))}};um=function(a,b){for(const c of a.headers){const [d,e]=c;b.headers[d]||(b.headers[d]=e)}};vm=function(a,b){b=b.uris[b.uriIndex];var c=new _.xm(b,location.href);c=c?c.a.protocol.slice(0,-1):"";const d=a.a[c];if(!d)throw new _.H(_.C,1,1E3,{url:b});return e=>d(e)};
137
- zm=function(){ym.forEach(a=>a())};_.Am=function(a){ym.push(a)};_.Fm=function(a){Bm&&performance.mark(a)};_.Hm=function(a,b,c){Bm&&(b=performance.measure(a,b,c),null!=b&&Gm.info(`Step: "${a}" took ${b.duration.toFixed(0)} ms.`))};Km=function(a,b){var c=Im;Jm.set(`${a.toLowerCase().split(";")[0]}-${c}`,{priority:c,plugin:b})};_.Om=function(a,b){var c=[Lm,Mm,Nm,Im];for(const d of c)if(c=Jm.get(`${a.toLowerCase().split(";")[0]}-${d}`)){const e=c.plugin(),f=e.isSupported(a,b);e.destroy();if(f)return c.plugin}return null};
138
- Pm=function(a,b){const c=b||$h;let d=null,e=null,f=!1;return function(...g){if(f&&c(g,d))return e;f=!0;d=g;return e=a(...g)}};_.Qm=function(a){return null!=a};Rm=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}throw new _.sl("No non-null, non-undefined value found");};Sm=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}};_.Tm=function(a){return`${a.scheme}//`+`${a.a}${a.port?":"+a.port:""}${a.path}${a.h}${a.f}`};
139
- _.Um=function(a,b,c){return a?(c||Object.keys(a).sort()).reduce(function(d,e){if(!(e in a))return d;const f=a[e];let g="\x26";""===d&&(g=b?"":"?");d=d+g+encodeURIComponent(e);return d=d+"\x3d"+encodeURIComponent(void 0===f?"":f)},""):""};Vm=function(a){const b={};a=a||"";a=a.substring(a.indexOf("?")+1);for(const d of a.split("\x26")){var c=d.split("\x3d");a=decodeURIComponent(c[0]);c=decodeURIComponent(c[1]||"");a&&(b[a]=c)}return b};
140
- _.Wm=function(a,b){if(a.startsWith("http://")||a.startsWith(_.fe))return a;let c=b;b.startsWith("//")&&(c=`${location.protocol}${c}`);b=new URL(c);b.search="";return(new URL(a,b)).toString()};_.Xm=function(a){if(!a)return null;a=(new _.xm(a)).a.pathname.split("/");if(1>a.length)return null;a=a.pop().split(".");return 1>=a.length?null:a.pop().toLowerCase()};Zm=function(a,b){const c=Ym[a];for(const d of c)for(const e of b)if(d.test(e.trim()))return e.trim();return a===_.J?"":null};
141
- _.$m=function(a,b){b&&(a+=';codecs\x3d"'+b+'"');return a.replace(/\s/g,"")};_.an=function(a){return a.split(";")[0]};_.bn=function(a){a=a.split(/\s*;\s*/);a.shift();return(a=a.find(b=>b.startsWith("codecs\x3d")))?a.split("\x3d")[1].replace(/^"|"$/g,"").split(/\s*,\s*/).join(","):""};
142
- _.fn=function(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&_.bj()&&(a=360);const b=_.uk();b.maxAttempts=3;a={source:"",license:cn,viewerId:void 0,autoplay:void 0,pauseWhenInBackground:!1,ads:{hls:{enable:!0,resolutionOffsetSec:35}},manifest:{attemptParameters:_.uk(),availabilityWindowOverride:NaN,clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,autoCorrectDrift:!0,timeline:{version:1,type:void 0}},abr:{enabled:!0,defaultBandwidthEstimate:1E3,switchInterval:8,bandwidthUpgradeTarget:.85,
143
- bandwidthDowngradeTarget:.95,useSwitchIntervalForInitialSwitch:!1,restrictions:dn(a),useCmsd:!0},contentSteering:{enabled:!0,attemptParameters:_.uk()},drm:null,cmcd:{enabled:!1,version:1,rtpMultiplier:5,deliveryMode:"headers"},enableHtmlCue:!0,preferredAudioLanguage:"",preferredTextLanguage:"",preferredAudioRole:_.we,preferredTextRole:"",preferredAudioChannelCount:2,preferredAudioCodec:[],preferredVideoCodec:[],preferSpatialAudio:!1,preferForcedSubtitles:!1,volume:null,startTime:null,loop:!1,lowLatencyMode:!1,
144
- suggestedPresentationDelay:void 0,muted:void 0,forceWaitForTracks:!1,xmlParser:_.en,streaming:{attemptParameters:b,bufferingGoal:10,rebufferingGoal:2,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,relativeTextTimestamp:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,disableAudioTracks:!1,disableVideoTracks:!1,smallGapLimit:.5,jumpLargeGaps:!0,gapTolerance:.001,durationBackoff:1,maxSegmentToMediaOffset:1,forceNativeTS:!1,preferNativeHlsOnSafari:!0,safeSeekOffset:5,stallEnabled:!0,
145
- stallThreshold:3,stallSkip:.5,bufferLimitUpdateInterval:.5,overridePasp:!1,enableLiveEdgeChasing:!1,chasingRate:1.15,startChasingAt:5,stopChasingAt:2,chaseJumpDistance:10,patchEdgeWhenMixedContent:!1,ignoreDrift:!1,disableFragmentSupport:!1,disableMergedFragments:!1,ignoreManagedMediaSourceStreamingHints:!1},mediaSource:{codecSwitchingStrategy:_.rf},restrictions:dn(),tizen:{sideStreamText:_.Ri(2)},safari:{enableHlsVideoTrackInfo:!1,enableMetadata:!1},mse:{sendPlaybackSessionIdHeader:!1},trickPlay:{speedUpMode:_.Bd,
146
- preferTrickPlayTracks:!0},playlist:{timeline:"basic",content:_.Db,cropTimeline:!1},yospace:{enabled:!1},cmsd:{enabled:!0},mediatailor:{enabled:!1,sessionConfig:{}},disableRestrictions:!1,chromecast:{useSenderAbrConfig:!1,useSenderStreamingConfig:!1}};if(_.Ri()||_.Ui())a.ads.hls.enable=!1;if(_.Qi("Edge/")||_.Ri())a.streaming.gapDetectionThreshold=.5;_.Ui()&&(a.streaming.stallEnabled=!1);_.Wi()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=1,a.streaming.gapDetectionThreshold=
147
- .02);_.Ri()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=0);a.vr={enable:!1,attachMouseListener:!0,fieldOfView:70,sensitivity:1,invertHorizontalControl:!1,invertVerticalControl:!1};return a};dn=function(a){a=void 0===a?Infinity:a;return{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity}};
148
- _.hn=function(a,b){b=void 0===b?{}:b;if(!a)return _.fn();const c=[_.fn()];let d=!1;for(let e of a)null!==e&&void 0!==e&&(_.jh(e)&&(e={source:e}),e.lowLatencyMode&&!d&&(c.push({streaming:{rebufferingGoal:.1,bufferLimitUpdateInterval:.01,attemptParameters:{maxAttempts:3,baseDelay:250,backoffFactor:1}},abr:{bandwidthUpgradeTarget:.6,bandwidthDowngradeTarget:.95},manifest:{lowLatencyMode:!0}}),d=!0),c.push(e),b.Gi||null==e.suggestedPresentationDelay||c.push({manifest:{suggestedPresentationDelay:e.suggestedPresentationDelay}}));
149
- a=_.ch.apply(null,c);_.jh(a.volume)&&(""===""+a.volume?a.volume=null:a.volume=Number(a.volume));if(!_.z(a.volume)&&(!_.kh(a.volume)||mh(a.volume)))throw new _.H(_.C,7,7100,"config.volume is not a number");if(!_.z(a.preferredTextLanguage)&&!_.jh(a.preferredTextLanguage)&&!Array.isArray(a.preferredTextLanguage))throw new _.H(_.C,7,7100,"config.preferredTextLanguage is not a string or an array");if(!_.z(a.preferredAudioLanguage)&&!_.jh(a.preferredAudioLanguage)&&!Array.isArray(a.preferredAudioLanguage))throw new _.H(_.C,
150
- 7,7100,"config.preferredAudioLanguage is not a string or an array");if(!_.z(a.preferredAudioCodec)&&!_.jh(a.preferredAudioCodec)&&!Array.isArray(a.preferredAudioCodec))throw new _.H(_.C,7,7100,"config.preferredAudioCodec is not a string or an array");if(!_.z(a.preferredVideoCodec)&&!_.jh(a.preferredVideoCodec)&&!Array.isArray(a.preferredVideoCodec))throw new _.H(_.C,7,7100,"config.preferredVideoCodec is not a string or an array");if(!_.z(a.drm)){if(a.drm.env&&!_.jh(a.drm.env))throw new _.H(_.C,7,
151
- 7100,"config.drm.env is not a string");if(a.drm.offlineId&&!_.jh(a.drm.offlineId))throw new _.H(_.C,7,7100,"config.drm.offlineId is not a string");}if(b=a.streaming){b.bufferingGoal=Number(b.bufferingGoal);b.rebufferingGoal=Number(b.rebufferingGoal);b.bufferBehind=Number(b.bufferBehind);b.smallGapLimit=Number(b.smallGapLimit);b.durationBackoff=Number(b.durationBackoff);if(!_.kh(b.bufferingGoal)||mh(b.bufferingGoal))throw new _.H(_.C,7,7100,"config.streaming.bufferingGoal is not a number");if(!_.kh(b.rebufferingGoal)||
152
- mh(b.rebufferingGoal))throw new _.H(_.C,7,7100,"config.streaming.rebufferingGoal is not a number");if(b.rebufferingGoal>b.bufferingGoal)throw new _.H(_.C,7,7100,"config.streaming.rebufferingGoal must be \x3e\x3d bufferingGoal");if(!_.kh(b.bufferBehind)||mh(b.bufferBehind))throw new _.H(_.C,7,7100,"config.streaming.bufferBehind is not a number");if(!_.kh(b.smallGapLimit)||mh(b.smallGapLimit))throw new _.H(_.C,7,7100,"config.streaming.smallGapLimit is not a number");if(!_.kh(b.durationBackoff)||mh(b.durationBackoff))throw new _.H(_.C,
153
- 7,7100,"config.streaming.durationBackoff is not a number");b=a.manifest;if(_.z(b.availabilityWindowOverride))b.availabilityWindowOverride=NaN;else if(typeof b.availabilityWindowOverride!==_.r)throw new _.H(_.C,7,7100,"Invalid value for |manifest.availabilityWindowOverride|");gn(a.restrictions);gn(a.abr.restrictions);a.abr.initialRestrictions&&gn(a.abr.initialRestrictions)}return a};
154
- gn=function(a){_.z(a.maxPixels)&&(a.maxPixels=Infinity);_.z(a.maxBandwidth)&&(a.maxBandwidth=Infinity);_.z(a.maxHeight)&&(a.maxHeight=Infinity);_.z(a.maxWidth)&&(a.maxWidth=Infinity);_.z(a.minPixels)&&(a.minPixels=0);_.z(a.minBandwidth)&&(a.minBandwidth=0);_.z(a.minHeight)&&(a.minHeight=0);_.z(a.minWidth)&&(a.minWidth=0);a.minWidth=Number(a.minWidth);a.maxWidth=Number(a.maxWidth);a.minHeight=Number(a.minHeight);a.maxHeight=Number(a.maxHeight);a.minBandwidth=Number(a.minBandwidth);a.maxBandwidth=Number(a.maxBandwidth);
155
- a.minPixels=Number(a.minPixels);a.maxPixels=Number(a.maxPixels);if(Number.isNaN(a.minWidth)||Number.isNaN(a.maxWidth)||Number.isNaN(a.minHeight)||Number.isNaN(a.maxHeight)||Number.isNaN(a.minBandwidth)||Number.isNaN(a.maxBandwidth)||Number.isNaN(a.minPixels)||Number.isNaN(a.maxPixels))throw new _.H(_.C,7,7100,"Restrictions contain NaN");};jn=function(a){return typeof a===_.He&&!Array.isArray(a)&&"source"in a};
156
- kn=function(a){if(!a)return null;a=(new _.xm(a)).a.pathname.toUpperCase();return a.endsWith(".MPD")?_.wc:a.endsWith(".M3U8")?_.wl:a.endsWith(".MP4")?_.zg:a.endsWith(".MP3")?"audio/mp3":a.endsWith("MANIFEST")||a.endsWith(".ISM")?_.Bc:null};_.mn=function(a){let b;jn(a)?b=a.source:b=a;Array.isArray(b)||(b=[b]);b=b.filter(c=>typeof c===_.Tf||"url"in c);a=[];for(let c=0;c<b.length;c++){const d=ln(b[c]);d&&a.push(d)}return a};
157
- ln=function(a){let b=null;_.jh(a)&&(a={url:a});typeof a===_.He&&!Array.isArray(a)&&"url"in a&&(b={url:a.url,type:a.type?a.type:null},_.z(a.drmProtected)||typeof a.drmProtected!==_.Mc||(b.drmProtected=a.drmProtected),_.z(a.isLive)||typeof a.isLive!==_.Mc||(b.isLive=a.isLive),_.z(a.name)||typeof a.name!==_.Tf||(b.name=a.name),_.z(a.Yb)||typeof a.Yb!==_.Tf||(b.Yb=a.Yb),_.z(a.$a)||typeof a.$a!==_.Tf||(b.$a=a.$a));b&&!b.type&&(b.type=kn(a.url),b.type?nn.debug("Detect media type "+b.type+" for "+a.url):
158
- nn.warn("Unable to detect media type for "+a.url));return b};on=function(a,b){a.onError(b);a.release().then(()=>a.destroy())};_.qn=function(a){_.pn[a.I]=a};
159
- _.sn=function(a){const b={attemptParameters:_.uk(),enforceSingleSession:!1,delayLicenseRequestUntilPlayed:!1,enableSessionCacheForSkd:!1,ignoreUnrecognizedInitData:!0,Ia:{},widevineVersion:_.vd};if(a&&(b.enforceSingleSession=!!a.enforceSingleSession,b.delayLicenseRequestUntilPlayed=!!a.delayLicenseRequestUntilPlayed,b.preferredDrmSystem=a.preferredDrmSystem,b.emeApi=a.emeApi,a.attemptParameters&&(b.attemptParameters=a.attemptParameters),b.enableSessionCacheForSkd=!!a.enableSessionCacheForSkd,void 0!==
160
- a.ignoreUnrecognizedInitData&&(b.ignoreUnrecognizedInitData=!!a.ignoreUnrecognizedInitData),typeof a.widevineVersion===_.Tf&&0<a.widevineVersion.length&&(b.widevineVersion=a.widevineVersion),a.env)){const c=_.pn[a.env]||null;if(!c)throw _.xh(_.va,_.hb+a.env+_.aa),new _.H(_.C,6,6015,`DRM environment '${a.env}' is missing.`);b.Ia=_.rn(c,a.customData)||{};_.wi(a.env.toLowerCase(),Rd)&&(b.enforceSingleSession=!0)}return b};
161
- un=function(a){var b=tn;const c={kty:"RSA",n:b.n,e:b.e},d=a.h+"."+a.f,e=a.j;return new Promise(function(f,g){let h;try{h=window&&window.crypto&&window.crypto.subtle}catch(l){}if(h){var k={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};h.importKey("jwk",c,k,!1,["verify"]).then(function(l){const m=_.ti(d),n=_.hm(e);return h.verify(k,l,n.buffer,m.buffer)}).then(function(l){l?f():g(new _.sl("Signature Verification failed",jg))}).catch(g)}else f()})};
162
- wn=function(a){if(!a.a){var b=a.f.split(".");if(3!==b.length)throw Error("Expected to find 3 data sections in JWT raw data");b=new vn(b[0],b[1],b[2]);a.a=b}return a.a};xn=function(a){return _.w(function*(){var b=wn(a);try{yield un(b)}catch(c){if(c&&c.code===jg)throw c;b=new _.xm(window.location.href);if(!/(^127\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^192\.168\.)|(^localhost)/.test(b.a.hostname))throw c;}})};
163
- yn=function(a){switch((a.ga[0]||{src:"",type:""}).type){case _.wc:a="dash";break;case _.Bc:a="ss";break;case _.wl:a="hls";break;case _.zg:a="mp4";break;default:a=""}return a};zn=function(a){return a.viewerId?a.viewerId:(a=a.drm||null)&&a.customData&&a.customData.userId?`${a.customData.userId}`:""};An=function(a){return(a=a.drm||null)&&a.customData&&a.customData.assetId?`${a.customData.assetId}`:""};
164
- Bn=function(a){return(a=a.drm||null)&&a.customData&&a.customData.sessionId?`${a.customData.sessionId}`:""};Cn=function(a){return(a=(a=a.drmInfo)&&a.licenseServerUri||"")?(new _.xm(a)).a.hostname:""};Dn=function(a){const b=a.configuration;let c="no";b.drm&&!_.lh(b.drm,{})&&(c="custom",b.drm.env&&b.drm.env.toLowerCase().startsWith(Rd)||Cn(a).endsWith("drmtoday.com"))&&(c=Rd);return c};
165
- En=function(a){a=a.drmInfo;let b="";if(a)switch(a.keySystem){case _.vd:b="wv";break;case _.td:b="pr";break;case _.rd:b="fps"}return b};Fn=function(a){a=a.drmInfo;let b=!1;a&&(b=a.persistentStateRequired);return b.toString()};Gn=function(a){a=a.drmInfo;let b="";if(a)switch(a.videoRobustness){case Ha:case Fa:b="L1";break;case Ga:b="L2";break;case _.nb:case _.mb:b="L3"}return b};
166
- Ln=function(a,b){const c="ie"===_.oj().browser;var d=b.configuration;const e=[...Array.from(_.Hh.keys()),...b.Fg];b={"CL-KEY":a.f,"CL-LOCATION":window.location.href,"CL-SDK-VERSION":_.ea,"CL-USER-ID":zn(d),"CL-ASSET-ID":An(d),"CL-SESSION-ID":Bn(d),"CL-PLAYBACK-TYPE":b.isLive?Hn:In,"CL-CONTENT-TYPE":yn(b),"CL-PLUGINS":e.join(" "),"CL-DRM":Dn(b),"CL-DRM-CDM":En(b),"CL-DRM-SEC-LEVEL":Gn(b),"CL-DRM-OFFLINE":Fn(b),"CL-DRM-IP":Cn(b)};Jn&&Jn.companionSdk&&(Jn.companionSdk.name&&(b["CL-COMPANION-SDK"]=Jn.companionSdk.name),
167
- Jn.companionSdk.version&&(b["CL-COMPANION-SDK-VERSION"]=Jn.companionSdk.version));c&&(d=window.localStorage.getItem("cl_et"))&&(b["CL-ETAG"]=d);d=_.yk(["https://downloads.castlabs.com/r/register/"]);d.method="GET";d.headers=b;return(new _.Kn).fetch(d).U.then(f=>{200===f.status&&c&&window.localStorage.setItem("cl_et",f.headers.etag);return Promise.resolve()}).catch(f=>{a:{var g=wn(a);f=f.data;var h=f.status;if(g.a&&g.a.ilv)g=Promise.resolve();else{switch(h){case 403:case 404:g=7101;var k="Castlabs Player license is invalid";
168
- if(403===h){h=k;k="";try{k=JSON.parse(decodeURIComponent(f.responseText)).message}catch(l){}f=k;f=h+(": "+f)}else f=k+"!";k=f;break;case 412:g=7103;k="License requires a viewer ID. It should be supplied either via the `viewerId` config or in case of DRMtoday via the `drm.customData.userID` config.";break;default:g=Promise.resolve();break a}a.g.error(Ma+k);g=Promise.reject(new _.H(_.C,7,g,k))}}return g})};
169
- _.Nn=function(a){var b=(a||"").split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Mn.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a};_.On=function(a,b){a=_.Nn(a);b=_.Nn(b);return a.split("-")[0]===b.split("-")[0]};
170
- Sn=function(a){try{const b=a.split(",").map(c=>{const d={};c=c.split(";");for(let e=0;e<c.length;e++){const {key:f,value:g}=Pn(c[e]);Object.keys(Qn).includes(f)&&(d[Qn[f]]=g)}return d}).filter(c=>_.fh(c));return 0<b.length?b:null}catch(b){return Rn.error("CmsdManager parseCmsdDynamicHeader_ failed:",b),null}};
171
- Pn=function(a){var b=a.split("\x3d");const c=b[0];b=b[1];if(!c)throw new _.sl("Parsing CMSD, missing parameter or wrong format");if(c&&!b)return{key:c,value:!0};const d=b[0];if('"'===d&&'"'===b[b.length-1])return{key:c,value:b.replaceAll(/(^")|("$)/g,"")};if(/^[-0-9]/.test(d))return{key:c,value:parseInt(b,10)};if(/^[a-zA-Z*]/.test(d))return{key:c,value:b};throw new _.sl(`Parsing CMSD, not recognized value type of ${a}`);};
172
- Un=function(a){return b=>{{var c=b.headers;let e=b=null;var d=ph(c,"cmsd-dynamic");c=ph(c,"cmsd-static");d&&(b=Sn(d),a.a=b);if(c)try{d={};const f=c.split(",");for(c=0;c<f.length;c++){const {key:g,value:h}=Pn(f[c]);Object.keys(Tn).includes(g)&&(d[Tn[g]]=h)}e=_.fh(d)?d:null}catch(f){Rn.error("CmsdManager parseCmsdStaticHeader_ failed:",f),e=null}(b||e)&&a.m.trigger(new _.G("cmsd-event",{oj:b,Aj:e}))}}};_.Wn=function(a){a&&(0<=Vn.indexOf(a)||Vn.push(a))};
173
- Yn=function(a){if(!a.h&&a.A&&a.a&&a.f.ads.hls.enable&&a.getTimelineCues().some(b=>_.ik(b.schemeIdUri))){const b=a.f.mse.sendPlaybackSessionIdHeader?a.F:null;a.h=new Xn;a.h.o(a.a,a.A,b)}};$n=function(a,b){a.H=new Zn(b);xn(a.H).catch(c=>{setTimeout(()=>{a.g.error(Ma+c);a.trigger(new _.G(_.Xd,{detail:new _.H(_.C,7,7101)}));a.destroy()},1E3)})};bo=function(a,b){a.Y=b;for(const c of a.Y)(b=c.id())&&(a.K[b]=c);_.ao(a,"onPlayerCreated")};
174
- _.co=function(a,b,c){c=void 0===c?null:c;null!=b&&b===a.a?a.a.forwardEventsTo(a):(a.a&&(a.a.stopForwardingEventsTo(a),a.a.destroy(),a.a=null,a.A=null),b&&(b.init(a.j,a.C),b.setNetworkEngine(a.getNetworkEngine()),b.forwardEventsTo(a),a.a=b,a.A=c))};
175
- eo=function(a,b){_.w(function*(){a.j.getMedia()||a.j.getCastElement();a.H||(a.H=new Zn(a.f.license));try{a.g.debug("Verifying license remotely"),yield Ln(a.H,b),a.g.debug("License verified remotely")}catch(c){a.g.debug("License rejected by remote",c),setTimeout(on,1E3,{release:a.release.bind(a),destroy:a.destroy.bind(a),onError:a.onError.bind(a)},c)}})};_.ao=function(a,b,...c){if(!a.ba)return Promise.resolve();const d=a.Y.map(e=>e[b].call(e,a,...c)).filter(e=>e instanceof Promise);return Promise.all(d)};
176
- fo=function(a){return _.w(function*(){if(a.R)return a.g.debug("The player is already released. No-op"),new Promise(b=>b());a.ca.off(document,Dg);a.trigger(new _.G(_.xf));a.j&&a.j.release();a.h&&(yield a.h.h(),a.h=null);a.B&&(yield a.B.release(),a.B=null);if(a.a){let b=null;const c=a.a.on(_.Qf,d=>{b=d});return _.ao(a,_.Me).then(()=>{a.a.stopForwardingEventsTo(a);return Promise.all([a.a.release(),a.I.release()])}).then(()=>{a.g.debug("Releasing player completed");b&&(a.g.debug("Re-post state change event after release"),
177
- a.trigger(b))}).finally(()=>{a.a.off(_.Qf,c);a.trigger(new _.G(wf))})}a.trigger(new _.G(wf));return new Promise(b=>b())})};go=function(a){a.F&&(a.g.info("Playback session ended, ID:",a.F),a.F=null,a.a&&a.a.setPlaybackSessionId(null))};ho=function(a,b){const c=Ch(d=>d.f(_.bb)&&a.every(e=>2===d.canPlay(e,b)));if(!c)throw new _.H(_.C,7,7003,"No compatible player implementing playlist mode found!");return{ab:c,player:c.create(),sourceIndex:0}};
178
- jo=function(a,b,c){if(a.M===_.bb)b=ho(b,c);else if(2!==(a.a?a.a.canPlay(b[0],c):0)||a.T){a.T=!1;if(b){var d=a=null;for(var e=0;e<b.length;e++);e=Object.values(_.zh);for(let f=0;f<b.length;f++)for(let g=0;g<e.length;g++){const h={ab:e[g],confidence:e[g].canPlay(b[f],c)};if(null===a||a.confidence<h.confidence)a=h,d=f}a&&typeof d===_.r&&0<a.confidence?(_.Ah.debug("Player Factory '"+a.ab.a()+"' can play",b[d]),b=new io(a.ab,d)):(_.Ah.debug("No compatible Player Factory found for sources:",b),b=null)}else b=
179
- null;if(!b)throw new _.H(_.C,7,7003,"No player factory compatible with given sources found!");c=b.ab;a=c.create();b={ab:c,player:a,sourceIndex:b.sourceIndex}}else b={ab:a.A,player:a.a,sourceIndex:0};return b};
180
- _.oo=function(a,b,c){return _.w(function*(){if(a.P)throw new _.H(_.C,7,7E3,"Player is already destroyed.");if(!a.j)throw new _.H(_.C,7,7E3,"No surface associated with this player!");_.Fm(bf);yield a.release();var d=c||_.mn(b);if(!b||0===d.length)throw new _.H(_.C,7,7003,Wa);a.ha=d;a.f=_.hn([a.C,b,{source:d}]);a.R=!1;d=jo(a,d,a.f);_.co(a,d.player,d.ab);ko(a,a.a);a.a&&a.a.setSourceIndex(d.sourceIndex);lo(a);a.a&&a.a.setCdnErrorCallback(a.L);mo(a,a.f);no(a);if(a.f.pauseWhenInBackground)a.ca.on(document,
181
- Dg,()=>{document.hidden?(a.g.debug("Player is hidden: pausing..."),a.pause()):(a.g.debug("Player is visible: resuming..."),a.play())});Qh(a);yield _.ao(a,"onContentWillLoad",a.f.source[d.sourceIndex]);_.Fm(af);_.Hm("player.beforeLoad",bf,af)})};_.po=function(a){return _.w(function*(){a.j.getMedia()||a.j.getCastElement();a.trigger(new _.G(ve));yield Promise.all([a.a.load(a.f),a.h?a.h.load():Promise.resolve()])})};
182
- _.ro=function(a){return _.w(function*(){_.Fm(Ye);eo(a,{configuration:a.getConfiguration(),ga:a.hg(),drmInfo:a.getDrmInfo(),Fg:Object.keys(a.K),isLive:a.isLive()});qo(a);Rh(a);yield _.ao(a,_.Je);a.f.autoplay&&(a.h?a.h.l():1)&&(yield a.play());_.Fm(Xe);_.Hm("player.afterLoad",Ye,Xe)})};so=function(a){return _.w(function*(){if(a.a){var b=a.a;b.Vg?(a.trigger(new _.G(ve)),yield b.Vg(),yield _.ro(a)):a.g.warn(ib)}else a.g.warn(eb)})};
183
- ko=function(a,b){try{var c=crypto.randomUUID()}catch(d){c=zl()}a.g.info("Playback session started, ID:",c);b.setPlaybackSessionId(c);a.F=c};lo=function(a){a.a&&a.a.setDrmCustomDataModifier(b=>_.w(function*(){a.Me&&a.Kc&&(yield a.Kc(b))}))};mo=function(a,b){if(b=Gh(a,b))a.h=b.create(a)};no=function(a){a.f.cmsd.enabled&&(a.B=new to(a),a.a.setCmsdManager(a.B))};
184
- uo=function(a){const b=_.Zh(a.f.preferredTextLanguage).filter(f=>f),c=a.f.preferForcedSubtitles,d=a.getTrackManager().qa().filter(f=>c?f.kind===_.Zd:f.kind!==_.Zd);if(0===d.length)c&&a.g.warn("Forced subtitles are configured to be preferred, but no forced subtitles are available.");else{if(c&&0===b.length){var e=a.getTrackManager().pa();e&&e.language?(e=_.Nn(e.language||""),b.push(e)):(e=a.getTrackManager().Fa())&&e.language&&(e=_.Nn(e.language||""),b.push(e));0===b.length&&a.g.warn("Forced subtitles are configured to be preferred, but neither the preferred text language is set, nor the audio or video track language is available to determine which forced subtitles language to select.")}b.some(f=>
185
- {const g=_.Nn(f);if(f=d.find(h=>{h=_.Nn(h.language||"");return _.On(h,g)}))return a.getTrackManager().Sa(f),!0;c&&a.g.warn("Forced subtitles are configured to be preferred, but no forced subtitles match the preferred languages: ",b);return!1})}};qo=function(a){_.w(function*(){const b=[];if(a.f.remoteTextTracks)for(const c of a.f.remoteTextTracks)b.push(a.getTrackManager().addTextTrack(c));yield Promise.all(b);uo(a)})};xo=function(a,b){return _.w(function*(){yield vo(a,()=>Promise.all(wo(a).map(b)))})};
186
- yo=function(a,b){_.w(function*(){yield vo(a,()=>Promise.all(a.f.filter(c=>null!=c.getLoadedSource()).map(b)))})};wo=function(a){return[a.zc,...a.f].filter(b=>null!=b)};vo=function(a,b){return _.w(function*(){a.a&&(yield a.a);a.a=b().then(()=>{a.a=null})})};Ao=function(a){return zo(a).filter(b=>b.type===sd&&!b.Ze)};Bo=function(a){a.forEach(b=>{b.Ze=!0})};Fo=function(a,b){a=a.map(c=>({startTime:c.startTime,endTime:c.endTime,key:c.value.key,value:c.value.data,og:!1}));a=Co(a);b&&(a=Do(a));return new Set(Eo(a))};
187
- zo=function(a){const b=[];for(const c of a)b.push(c);return b};Go=function(a,b){const c=a.endTime-a.startTime,d=b.endTime-b.startTime,e=a.Vf||a.startTime,f=b.Vf||b.startTime;return(Infinity===c&&Infinity===d||.01>Math.abs(c-d))&&.5>Math.abs(e-f)&&a.value.key===b.value.key&&a.value.data===b.value.data};Eo=function(a){const b=[];for(const c of a)(a=b.find(d=>d.startTime===c.startTime&&d.endTime===c.endTime))?Ho(c,a):(a=Io(c),b.push(a));return b};
188
- Ho=function(a,b){if(a.key.startsWith("X-"))b.customAttributes||(b.customAttributes={}),b.customAttributes[a.key]=a.value,"X-CUSTOM-ID"===a.key&&(b.id=a.value);else if("SCTE35-OUT"===a.key||"SCTE35-IN"===a.key)b.schemeIdUri=_.rg,b.type=_.Gf};Io=function(a){var b=a.startTime;const c=a.endTime;b={schemeIdUri:"",value:"",startTime:b,endTime:c,id:`T${b.toFixed(2)}-${c.toFixed(2)}`,type:_.de,eventElement:null};Ho(a,b);return b};
189
- Co=function(a){const b=new Set(a),c=new Set(a.filter(d=>"SCTE35-OUT"===d.key).map(Jo));a.filter(d=>"SCTE35-IN"===d.key).forEach(d=>{c.has(Jo(d))||(d.og=!0)});return Array.from(b.values())};Do=function(a){a.forEach(b=>{b.og&&(b.endTime=b.startTime,b.startTime=0)});return a};Jo=function(a){return`${a.startTime}-${a.endTime}`};
190
- Oo=function(a,b){a.g.debug("onMetadataTrackAdded_()");b.mode=_.ce;var c=!b.cues||0===b.cues.length;if(a.m.isLive()||!c){var d=b.cues;c=Ao(d);Bo(c);a.a=Fo(c,a.l);0<a.a.size&&(Ko(a,a.a),a.m.trigger(new _.G(_.eg)));a.j.on(b,_.Ad,()=>{{const l=a.m.getPosition();for(const m of a.a){var e,f=a,g=m,h=l;if(Infinity===g.endTime){if(e=!f.f.has(g)){e=g.startTime;var k=e+.5;e=e<=h&&h<=k}e&&(f.f.add(g),f.m.trigger(new _.G(_.cg,{detail:g})))}else h=g.startTime<=h&&h<=g.endTime,!h&&f.f.has(g)?(f.f.delete(g),f.m.trigger(new _.G(_.dg,
191
- {detail:g}))):h&&!f.f.has(g)&&(f.f.add(g),f.m.trigger(new _.G(_.cg,{detail:g})))}}});a.m.isLive()&&(a.h=setInterval(()=>{if(b.cues){var e=a.m.getSeekRange().start;var f=[];for(var g of b.cues)g.endTime<e&&f.push(g);Lo(a,b,f);0<f.length&&a.g.debug(`Evicted ${f.length} old cues.`);for(var h of a.a)h.endTime<e&&a.a.delete(h);e=0<f.length}else e=!1;Mo(a,b);f=Ao(d);var k=Fo(f,a.l);g=new Set;h=!1;for(l of k)(k=No(a,l))?(l.customAttributes&&(k.customAttributes=_.ch(k.customAttributes||{},l.customAttributes)||
192
- void 0),h=!0):(a.a.add(l),g.add(l));var l={ji:g,nh:0<g.size||h};const {ji:m,nh:n}=l;Bo(f);(e||n)&&a.m.trigger(new _.G(_.eg));Ko(a,m)},6E3))}};Po=function(a,b){a.j.on(b,_.oc,c=>{c=c.track;c.kind===_.Ae&&Oo(a,c)})};Ko=function(a,b){for(const c of b)a.m.trigger(new _.G(_.bg,{detail:c}))};No=function(a,b){return Array.from(a.a.values()).find(c=>b.startTime===c.startTime&&b.endTime===c.endTime)||null};
193
- Mo=function(a,b){if(b.cues){var c=zo(b.cues).filter(f=>f.type===sd),d=c.filter(f=>f.Ze);c=c.filter(f=>!f.Ze);var e=[];for(const f of c)for(const g of d)Go(f,g)&&(e.push(f),g.Vf=f.startTime);Lo(a,b,e);0<e.length&&a.g.debug(`Removed ${e.length} duplicated cues.`)}};Lo=function(a,b,c){for(const d of c)try{b.removeCue(d)}catch(e){a.g.debug("Failed to remove cue",d,e)}};
194
- Qo=function(a,b){b=b.track;b.kind!==_.Ae&&(b.mode===_.Jf&&(b.mode=_.ce),a.a.on(b,_.Ad,c=>{c=c.target||c.srcElement;c.mode=_.ce;c.activeCues&&(c=Array.from(c.activeCues).map(a.o),a.l.append(c,[]))}))};_.K=function(a,b,c,d){d=void 0===d?{}:d;a=a.getAttribute(b);if(!a&&d.required)throw new _.H(_.C,4,4023,`Required attribute missing: ${b}`);return a?a.value:c||null};Ro=function(a,b){3===b.type&&(a.f&&(a.g.debug("Attaching tracking token"),b.headers[Ng]=a.f),a.a&&(b.headers[Og]=a.a))};
195
- So=function(a,b){return b.request&&3===b.request.type&&(a.f=b.headers[Ng],a.a=b.headers[Og],b=b.headers["x-dt-csl-renewal-info"],a.f&&a.g.debug("Loaded tracking token "+a.f),a.a&&a.g.debug("Loaded followup token "+a.a),b)?(a=JSON.parse(_.pi(_.hm(b))),{delay:a.renewalPeriod,ej:{maxAttempts:a.retryCount,baseDelay:1E3*a.retryPeriod,backoffFactor:1,fuzzFactor:0,timeout:0}}):null};
196
- _.Uo=function(a){a=To[a];if(!a)return null;const b=_.oj();return b.os===hj&&4===b.osVersion.major&&4===b.osVersion.minor?null:new Uint8Array(a)};_.Vo=function(a,b){return void 0===a?b:null===a?null:typeof a===_.Tf?_.Uo(a):a};
197
- _.rn=function(a,b){const c={};var d=b?b.widevineVideoRobustness:void 0;const e=b?b.widevineAudioRobustness:void 0,f=b?b.serverCertificate:void 0;let g=a.f[_.vd];g&&(c[_.vd]={licenseUrl:g.licenseUrl,videoRobustness:Sm(d,g.videoRobustness),audioRobustness:Sm(e,g.audioRobustness),modifiers:g.modifiers,distinctiveIdentifierRequired:Rm(b?b.widevineDistinctiveIdentifierRequired:void 0,g.distinctiveIdentifierRequired,!1),persistentStateRequired:Rm(b?b.widevinePersistentStateRequired:void 0,g.persistentStateRequired,
198
- !1),serverCertificate:_.Vo(f,g.serverCertificate)});(g=a.f[_.rd])&&(c[_.rd]={licenseUrl:g.licenseUrl,certificateUrl:g.certificateUrl,modifiers:g.modifiers});d=b?b.playReadyVideoRobustness:void 0;b=b?b.playReadyAudioRobustness:void 0;(g=a.f[_.td])&&(c[_.td]={licenseUrl:g.licenseUrl,videoRobustness:d||g.videoRobustness,audioRobustness:b||g.audioRobustness,individualizationServer:g.individualizationServer,useLegacySystem:g.useLegacySystem,modifiers:g.modifiers});return c};
199
- _.Wo=function(){throw new _.H(_.C,3,3E3);};_.Xo=function(a,b,c){const d=c||0;c=b.byteLength-d;const e=_.F(a.f.buffer);b=_.F(b.buffer,d,c);try{e.set(b,a.a),a.a+=c}catch(f){_.Wo()}};_.L=function(a,b){try{a.f.setUint32(a.a,b,a.h),a.a+=4}catch(c){_.Wo()}};_.Yo=function(a){return a.a<a.f.byteLength};_.Zo=function(){throw new _.H(_.C,3,3E3,"Buffer read out of bounds.");};_.$o=function(a){try{const b=a.f.getUint8(a.a);a.a+=1;return b}catch(b){_.Zo()}};
200
- _.ap=function(a){try{const b=a.f.getUint16(a.a,a.h);a.a+=2;return b}catch(b){_.Zo()}};_.M=function(a){try{const b=a.f.getUint32(a.a,a.h);a.a+=4;return b}catch(b){_.Zo()}};_.bp=function(a){try{const b=a.f.getInt32(a.a,a.h);a.a+=4;return b}catch(b){_.Zo()}};_.cp=function(a){let b=0,c=0;try{!0===a.h?(b=a.f.getUint32(a.a,!0),c=a.f.getUint32(a.a+4,!0)):(c=a.f.getUint32(a.a,!1),b=a.f.getUint32(a.a+4,!1))}catch(d){_.Zo()}if(2097151<c)throw new _.H(_.C,3,3001);a.a+=8;return c*Math.pow(2,32)+b};
201
- dp=function(a,b){const c=new Uint8Array(b);for(let d=0;d<b;d++)c[d]=_.$o(a);return c};_.ep=function(a,b){a.a+b>a.f.byteLength&&_.Zo();var c=a.a+a.f.byteOffset;c=a.f.buffer.slice(c,c+b);a.a+=b;return _.F(c)};fp=function(a){let b=0;for(let c=0;c<a.length;c++)b=b<<8|a.charCodeAt(c);return b};_.gp=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};_.hp=function(a){for(;_.Yo(a.reader)&&!a.parser.a;)a.parser.pe(a.start+a.headerSize,a.reader,a.partialOkay)};
202
- _.ip=function(a){for(let b=_.M(a.reader);0<b&&!a.parser.a;--b)a.parser.pe(a.start+a.headerSize,a.reader,a.partialOkay)};_.jp=function(a){return b=>{const c=b.reader.Na()-b.reader.getPosition();a(_.ep(b.reader,c))}};_.kp=function(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)};lp=function(a){let b="";try{b=_.si(a)}catch(c){}return b};_.np=function(a){a=lp(a);let b="";a.length&&(b=(new _.mp(a)).a);return b};
203
- pp=function(a){if(!a)return null;let b=null;try{const c=JSON.parse(_.pi(a)),d=_.hm(c.sinf[0]);(new _.op).N(_.Mf,_.hp).N("schi",_.hp).N("tenc",e=>{e.reader.skip(6);_.$o(e.reader)&&(e.reader.skip(1),b=_.jm(_.ep(e.reader,16)));e.parser.stop()}).parse(d)}catch(c){}return b};
204
- rp=function(a,b,c){if(!c||!c.byteLength)throw new _.H(_.C,6,6102);let d;typeof b===_.Tf?d=_.ui(b,!0):d=b;a=_.ui(lp(a),!0);b=new _.qp(12+a.byteLength+d.byteLength+c.byteLength,!0);_.L(b,a.byteLength);_.Xo(b,_.F(a));_.L(b,d.byteLength);_.Xo(b,_.F(d));_.L(b,c.byteLength);_.Xo(b,_.F(c));return _.F(b.buffer)};_.sp=function(a){var b=_.F(a.body);b=_.gm(b);a.headers[ta]=Cc;a.body=_.ti("spc\x3d"+b).buffer};
205
- _.tp=function(a){let b;try{b=_.pi(a.data)}catch(c){return}b=b.trim();"\x3cckc\x3e"===b.substr(0,5)&&"\x3c/ckc\x3e"===b.substr(-6)&&(b=b.slice(5,-6));try{const c=JSON.parse(b);c.ckc&&(b=c.ckc);c.CkcMessage&&(b=c.CkcMessage);c.License&&(b=c.License)}catch(c){}a.data=ni(_.hm(b))};yp=function(a,b){b=up(b);if(a===_.vd)return b+vp;if(a===_.td)return b+wp;if(a===_.rd)return b+xp;throw Error("Unknown DRM Key-System '"+a+"'. Can not infer license URL!");};
206
- _.Bp=function(a,b,c,d){d=void 0===d?!0:d;c=a.drm;c&&c.env.startsWith(xa)?c.customData&&(_.Ap(b,a),a=b.uris[0],d&&c.customData.assetId&&(a+="?assetId\x3d"+encodeURI(`${c.customData.assetId}`),c.customData.variantId&&(a+="\x26variantId\x3d"+encodeURI(`${c.customData.variantId}`)),b.uris[0]=a)):zp.warn(Ta)};
207
- _.Cp=function(a,b){try{const c=_.F(b.data),d=JSON.parse(String.fromCharCode.apply(null,c));zp.debug("Widevine License response",d);const e=atob(d.license),f=new Uint8Array(e.length);for(a=0;a<e.length;++a)f[a]=e.charCodeAt(a);b.data=f.buffer}catch(c){zp.debug("Unable to parse DRMtoday response JSON, assuming the response contained raw data")}};
208
- _.Ep=function(a,b,c){var d=c&&c.customData&&c.customData.fpsContentId;_.Bp(a,b,c,!1);b.headers[ta]=Cc;c={spc:_.fm(b.body)};if((a=a.drm)&&a.env.startsWith(ya)&&d){a={};var e=Vm((new _.mp(Dp(d))).f);d=e.keyId;if(e=e.assetId)zp.info("Applying assetId from HLS manifest."),a.assetId=e;d&&(zp.info("Applying keyId from HLS manifest."),a.keyId=d);d=a;d.keyId&&(zp.info("Adding keyID to FPS payload:",d.keyId),c.keyId=d.keyId);d.assetId&&(zp.info("Adding assetID to FPS payload:",d.assetId),c.assetId=d.assetId)}b.body=
209
- _.vi(_.Um(c,!0))};_.Fp=function(a,b){zp.debug("Clearing response data");200===b.status&&(a=_.pi(b.data).trim(),"\x3cckc\x3e"===a.substr(0,5)&&"\x3c/ckc\x3e"===a.substr(-6)&&(a=a.slice(5,-6)),b.data=_.hm(a).buffer)};
210
- _.Gp=function(a,b,c){b=lp(b);c=c&&c.customData?c.customData:{};b=new _.mp(Dp(b));const d=Vm(b.f);if(a&&a.drm&&a.drm.customData){var e=a.drm.customData;a=e.assetId;e=e.variantId;a&&_.yi(`${a}`)&&(d.assetId=a,zp.debug("Using assetId from the configuration instead of the value from the HLS manifest."));e&&_.yi(`${e}`)&&(d.variantId=e,zp.info("Using variantId from the configuration instead of the value from the HLS manifest."))}d.keyId?(a=["keyId"],zp.debug("KeyId found in FPS SKD. Removing other parameters")):
211
- a=["assetId","variantId"];b.f=_.Um(d,!1,a);"/"!==b.path||b.j.includes(`${b.a}/`)||(b.path="");b=_.Tm(b);return c.fpsContentId=b};_.Hp=function(a,b){a=a.drm;if(!a||!a.env.startsWith(xa))zp.warn(Ta);else if(a.customData&&a.customData.merchant&&!a.env.startsWith(ya)){const c=new _.xm(b.uris[0]);let d=c.a.pathname;d.endsWith("/")||(d+="/");d+=a.customData.merchant;c.a.pathname=d;b.uris[0]=c.toString()}};
212
- Ip=function(a,b,c){_.Bp(a,b,c);a=a.drm;a=!(!a||!a.offlineId);c=new _.xm(b.uris[0]);c.a.searchParams.set(_.Te,a.toString());b.uris[0]=c.toString()};up=function(a){if(a===Jp)return"https://lic.drmtoday.com";if(a===Kp)return"https://lic.staging.drmtoday.com";if(a===Lp)return"https://lic-demo.staging.drmtoday.com";if(a===Mp)return"https://lic.test.drmtoday.com";throw Error("Unknown DRMtoday environment '"+a+"'. Can not infer DRMtoday base URL!");};
213
- Dp=function(a){a=a.replace(/assetid/gi,"assetId");a=a.replace(/variantid/gi,"variantId");return a=a.replace(/keyid/gi,"keyId")};_.Ap=function(a,b){if((b=b.drm)&&b.customData){var c={userId:b.customData.userId,sessionId:b.customData.sessionId,merchant:b.customData.merchant};_.fh(c)&&(a.headers["dt-custom-data"]=btoa(JSON.stringify(c)));(b=b.customData.authToken)&&(a.headers["x-dt-auth-token"]=b)}};
214
- Op=function(a){const b={},c=a?a[Pg]:void 0;a=Np[a?a[Pg]:void 0];c&&(b.drmTodayErrorCode=c);a&&(b.drmTodayErrorMessage=a);return b};Pp=function(a){a=a["x-dt-li"];if(!a)return null;try{const b=JSON.parse(atob(a));a={};b.ti&&(a.requestId=b.ti);b.rpd&&(a.delay=Number(b.rpd)/1E3);return a}catch(b){return zp.warn("Unable to parse DRMtoday License Info header (x-dt-li)",b),null}};Qp=function(a,b){a.size=void 0===b?0:1;a.g.debug("Setting key status to",b);a.a=b};
215
- Sp=function(a,b,c,d){b===HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Rp.value().get(b),c.one(a,b,d))};
216
- Tp=function(a,b){a.f=b;_.Xh(a.a);if(!b)return Promise.resolve();a.a.on(b,Ud,c=>{_.xh("AppleEmeManager.cancelNativeMediaEncryptedEvent_",c);"MediaEncryptedEvent"in window&&c instanceof MediaEncryptedEvent&&(a.g.info("Cancel native MediaEncryptedEvent when using Apple-prefixed EME"),c.stopImmediatePropagation())});a.a.on(b,Lg,c=>{{a.g.debug("Handle webkitNeedKey event");c=_.F(c.initData);if(_.mi(c).getUint32(0,!0)+4!==c.byteLength)throw new RangeError("Malformed FairPlay init data");c=ri(c.subarray(4),
217
- !0);c=_.ti(c);const d=new Event(Ud);d.initDataType="skd";d.initData=ni(c);a.f.dispatchEvent(d)}});Sp(b,HTMLMediaElement.HAVE_METADATA,a.a,()=>b.webkitSetMediaKeys(a.h));return Promise.resolve()};Up=function(a,b){Qp(a.keyStatuses,b);b=new _.G(ie);a.dispatchEvent(b)};
218
- Xp=function(a,b){a.a=b;_.Xh(a.f);b&&(a.f.on(b,a.h+"needkey",c=>{{const d=new Event(Ud);d.initDataType=_.Uc;d.initData=ni(c.initData);a.a.dispatchEvent(d)}}),a.f.on(b,a.h+"keymessage",c=>{{const e=Vp(a,c.sessionId);if(e){var d=void 0===e.keyStatuses.getStatus();c=new _.G(_.ze,{messageType:d?le:ke,message:c.message});d=e;_.xh("WebkitEmeManager.MediaKeySession.generated");d.f&&(d.f.resolve(),d.f=null);e.dispatchEvent(c)}else _.yh("Session not found",c.sessionId)}}),a.f.on(b,a.h+"keyadded",c=>{(c=Vp(a,
219
- c.sessionId))&&c.ready()}),a.f.on(b,a.h+"keyerror",c=>{var d=Vp(a,c.sessionId);if(d){{var e=Error("EME v0.1b key error");const f=c.errorCode;f.systemCode=c.systemCode;e.errorCode=f;!c.sessionId&&d.f?(45===c.systemCode&&(e.message="Unsupported session type."),d.f.reject(e),d.f=null):c.sessionId&&d.a?(d.a.reject(e),d.a=null):(e=c.systemCode,c.errorCode.code===MediaKeyError.MEDIA_KEYERR_OUTPUT?Wp(d,_.Re):1===e?Wp(d,"expired"):Wp(d,_.he))}}}))};
220
- Vp=function(a,b){let c=a.l.get(b);return c?c:(c=a.j.shift())?(c.sessionId=b,a.l.set(b,c),c):null};Wp=function(a,b){Qp(a.keyStatuses,b);b=new _.G(ie);a.dispatchEvent(b)};Yp=function(a,b){return a.w?a.w+b.charAt(0).toUpperCase()+b.slice(1):b};
221
- Zp=function(a,b,c){if(a.o)return Promise.reject(Error("The session is already initialized."));a.o=!0;let d;try{if(a.l===_.Ue)if(c)d=_.F(_.ti("LOAD_SESSION|"+c));else{const f=_.ti("PERSISTENT|"),g=new Uint8Array(f.byteLength+b.byteLength);g.set(f,0);g.set(_.F(b),f.byteLength);d=g}else d=_.F(b)}catch(f){return Promise.reject(f)}a.f=new _.Jl;const e=Yp(a,"generateKeyRequest");try{a.j[e](a.h,d)}catch(f){if(f.name!==Ja)return a.f=null,Promise.reject(f);(new _.Ni(()=>{try{a.j[e](a.h,d)}catch(g){a.f.reject(g),
222
- a.f=null}})).la(.01)}return a.f};$p=function(a,b,c){if(a.a)a.a.then(()=>$p(a,b,c)).catch(()=>$p(a,b,c));else{a.a=b;if(a.h===Hg){var d=_.pi(c);var e=JSON.parse(d);"oct"!==e.keys[0].kty&&(a.a.reject(Error("Response is not a valid JSON Web Key Set.")),a.a=null);d=_.hm(e.keys[0].k);e=_.hm(e.keys[0].kid)}else d=_.F(c),e=null;var f=Yp(a,"addKey");try{a.j[f](a.h,d,e,a.sessionId)}catch(g){a.a.reject(g),a.a=null}}};
223
- cq=function(a,b){var c=aq;if(a){var d=c.find(e=>e.a()===a);if(d)return bq.info(Hb+d.a()),d.create();bq.info("Cannot create selected EME manager, falling back to the default.")}if(b&&(d=c.find(e=>e.a()===b)))return bq.info(Hb+d.a()),d.create();c=c[0];if(!c)throw Error("Missing EME managers.");bq.info(Hb+c.a());return c.create()};_.fq=function(a){var b=_.im(a);b=parseInt(b.byteLength,10).toString(16);b=_.im("12"+b+a);return new dq(eq,a,b)};
224
- _.hq=function(a){const b=new _.gq(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);a=_.M(b);var c=_.M(b);c=_.gp(c);var d=_.M(b);const e=d>>>24;d&=16777215;var f=_.ep(b,16);f=_.jm(f);if(0<e){var g=_.M(b);b.skip(16*g)}g=_.M(b);const h=()=>{let u=_.$o(b),v=(u&127)>>>0,y=7;for(;128<=u&&28>=y;)u=_.$o(b),v=(v|(u&(28>y?127:15))<<y)>>>0,y+=7;return 28<y?-1:v},k=u=>{switch(u){case 0:do if(!_.Yo(b))throw Error("not enough data to skip!");while(_.$o(b)&128);break;case 1:b.skip(8);break;case 2:b.skip(h());
225
- break;case 3:for(;4!==(u=h()&7);)k(u);break;case 5:b.skip(4);break;default:throw Error("invalid wire type "+u);}},l=[];let m=null;for(;_.Yo(b);){var n=h(),p=n&7;n>>>=3;if(2===p){p=h();if(0>p)throw Error(`unable to read length of field ${n}`);p=dp(b,p);2===n?l.push(p):4===n&&(m=p)}else k(p)}_.xh("Parsed WV PSSH Box","size",a,"name",c,vg,e,"flags",d,"size",g,"systemId",f,"contentId (base64)",m?_.fm(m):"","keyIds",l.map(u=>_.jm(u)));return 0<l.length?_.fq(_.jm(l[0])):null};
226
- _.iq=function(a){const b=[];b.push(a[3]);b.push(a[2]);b.push(a[1]);b.push(a[0]);b.push(a[5]);b.push(a[4]);b.push(a[7]);b.push(a[6]);a=_.F(a);a.set(b,0);return a};
227
- _.nq=function(a){var b=_.N;a:{var c=new _.gq(new DataView(a.buffer),!0);_.M(c);for(_.ap(c);_.Yo(c);)if(1===_.ap(c)){var d=_.ap(c);c=_.ep(c,d);break a}c=null}c||(c=a);a=ri(c,!0);d=b.j(a,"WRMHEADER");a=d.getAttribute(vg)||"";d=b.h(d,"DATA");var e=b.h(d,"LA_URL");b=e?b.f(e):"";var f=_.N;if(e=f.h(d,"KID"))if(e=f.f(e)){var g=f.h(d,oa);f=g?f.f(g):null;e={value:e,Ee:f}}else e=null;else e=null;d=e?[e]:(e=jq(d))?[e]:(d=kq(d))?d:null;const {value:h="",Ee:k}=d&&d[0]||{};d=_.hm(h);d=_.iq(d);d=_.jm(d);return new _.lq(_.mq,
228
- d,b,c,a,k)};jq=function(a){var b=_.N;a=b.h(a,"PROTECTINFO");if(!a)return null;var c=b.h(a,"KID");if(!c)return null;b=c.getAttribute("VALUE");if(!b)return null;a=c.getAttribute(oa);c=c.getAttribute("ALGID");return{value:b,Ee:a,lh:c}};
229
- kq=function(a){var b=_.N;a=b.h(a,"PROTECTINFO");if(!a)return null;a=b.h(a,"KIDS");if(!a)return null;a=b.a(a,"KID");if(!a.length)return null;b=[];for(const c of a)if(a=c.getAttribute("VALUE")){const d=c.getAttribute(oa),e=c.getAttribute("ALGID");b.push({value:a,Ee:d,lh:e})}return b.length?b:null};oq=function(a){return _.w(function*(){const b=new Promise(c=>{(new _.Ni(c)).la(1)});(yield Promise.race([a.close().then(()=>!0),b.then(()=>!1)]))||_.B("Timeout waiting for session close")})};
230
- _.qq=function(a){return pq(a)?_.td:a};rq=function(a,b){const c=[];b.forEach((d,e)=>{c.push({keySystem:e,licenseServerUri:d.licenseUrl,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[]})});for(const d of a)d.drmInfos=c};
231
- sq=function(a,b){b=b[_.qq(a.keySystem)];a.keyIds||(a.keyIds=[]);b&&(a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=b.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=b.persistentStateRequired),a.videoRobustness||(a.videoRobustness=b.videoRobustness||""),a.audioRobustness||(a.audioRobustness=b.audioRobustness||""),a.serverCertificate||(a.serverCertificate=b.serverCertificate||null))};
232
- _.tq=function(a,b){b=_.$m(a.mimeType,b||a.codecs);if(_.Om(b,a.type)){a=a.type;var c=_.Om(b,a);c&&(c=c(),b=c.convertCodecs(a,b),c.destroy())}return b};uq=function(a){for(const b of a.audioCapabilities||[])delete b.robustness;for(const b of a.videoCapabilities||[])delete b.robustness};wq=function(a){return(a.audioCapabilities||[]).some(vq)||(a.videoCapabilities||[]).some(vq)};
233
- xq=function(a,b){a=_.np(b);_.xh("Using default Content ID extractor. The hostname part from HLS #EXT-X-KEY:URI skd:// will be used.","Extracted Content ID: "+a);return a};
234
- zq=function(a){var {playerConfig:b,initData:c,initDataType:d,drmInfo:e,drmSystemConfig:f,sessionContext:g,emeApi:h}=a;if("skd"===d&&h===yq){a=e.serverCertificate;let k=f&&f.modifiers&&f.modifiers.extractContentId;_.hh(k)||(k=xq);let l="";try{l=k(b,c,g)}catch(m){throw new _.H(_.C,6,6103);}if(!l.length)throw new _.H(_.C,6,6101,"Content ID is an empty string");c=rp(c,l,a)}return c};pq=function(a){return!!a.match(/^com\.(microsoft|chromecast)\.playready/)};
235
- vq=function(a){return null!=a.robustness&&""!==a.robustness};Aq=function(a,b,c,d,e){for(const f of a){b.includes(f.licenseServerUri)||b.push(f.licenseServerUri);f.serverCertificate&&(c.some(g=>_.km(g,f.serverCertificate))||c.push(f.serverCertificate));if(f.initData){for(const g of f.initData)g.periodId=f.periodId;for(const g of f.initData)d.some(h=>h.keyId&&h.keyId===g.keyId&&h.periodId===g.periodId?!0:!1)||d.push(g)}if(f.keyIds)for(a=0;a<f.keyIds.length;++a)e.includes(f.keyIds[a])||e.push(f.keyIds[a])}};
236
- Bq=function(a){var b=a.o;const c=a.ba;c.clear();b.forEach((d,e)=>c.set(e,d));b=Array.from(c.values());b.length&&b.every(d=>"expired"===d)&&a.w(new _.H(_.C,6,6014));a.D.Ue(_.oh(c));a.A||a.g.info(wa);a.A=!0;a.F=!1};Cq=function(a){a.h.forEach((b,c)=>{const d=b.Qe;let e=c.expiration;isNaN(e)&&(e=Infinity);e!==d&&(a.D.Te(c.sessionId,e),b.Qe=e)})};
237
- Dq=function(a){return _.w(function*(){a.B.release();a.B=null;a.M.release();a.M=null;a.A=!1;a.F=!1;a.H.reject();a.ca.stop();a.ca=null;a.V.stop();a.V=null;const b=Array.from(a.h.keys());for(const c of a.h.values())c.Jc&&c.Jc.stop();a.h.clear();yield Promise.all(b.map(c=>Promise.resolve().then(()=>_.w(function*(){a.g.debug("Closing session",c.sessionId);try{yield oq(c)}catch(d){a.g.warn("Error while closing session",d)}}))));if(a.C){try{yield a.l.h(null)}catch(c){a.g.warn("Error while resetting media keys",
238
- c)}a.C=null}a.l=null;a.a=null;a.J.clear();a.I=null;a.L=[];a.f=null;a.w=null;a.D=null;a.R=0;a.P=null})};_.Jq=function(a,b){const c=Eq(a,b),d=Fq(b);for(const e of d)Gq(a,e,a.f.Ia);b=Hq(a,b);if(!b.size)return a.T=!0,Promise.resolve();_.Fm(Gd);a=_.Iq(a,b);return(c?a:a.catch(()=>{})).then(()=>{_.Fm(Fd);_.Hm("DRM queryMediaKeys_()",Gd,Fd)})};
239
- _.Lq=function(a,b,c){c=void 0===c?[]:c;a.K=Kq;a.L=c;a.G=0<c.length;a.g.debug("Using Persisted Licenses: "+a.G);a.f&&a.f.enableSessionCacheForSkd&&a.g.info("Enabled session cache for SKD license requests");return _.Jq(a,b)};
240
- _.Iq=function(a,b){if(1===b.size&&b.has(""))return Promise.reject(new _.H(_.C,6,6E3));null===a.l&&(a.l=cq(a.f.emeApi,a.Za));for(var c of b.values())0===c.audioCapabilities.length&&delete c.audioCapabilities,0===c.videoCapabilities.length&&delete c.videoCapabilities;let d=c=new _.Jl;const e=_.oj(),f=(k,l,m)=>{l.drmInfos.some(n=>!!n.licenseServerUri)===k&&(d=d.catch(()=>{if(a.j)return null;if(m===_.td){if((_.Pi()||e.os===jj&&_.Qi("Chrome")&&!_.Pi())&&!a.f.Ia[m].useLegacySystem)return l.label=ud,a.l.a(ud,
241
- [l]).catch(()=>{a.g.warn("Unable to create com.microsoft.playready.recommendation. Falling back to com.microsoft.playready.");l.label=_.td;uq(l);return a.l.a(m,[l])});uq(l)}if(m===_.vd&&a.f.widevineVersion!==_.vd){const n=a.f.widevineVersion;if(!n.startsWith(_.vd))return a.g.error(`Invalid "widevineVersion" value "${n}".`),Promise.reject();const p=Object.assign({},l,{label:n,distinctiveIdentifier:_.Pe,persistentState:_.Pe});return a.l.a(n,[p]).catch(()=>a.l.a(m,[l]))}return a.l.a(m,[l]).catch(n=>
242
- {a:{if(m===_.vd&&wq(l)){const p=_.oj();if(wq(l)&&p.os===hj&&p.browser===Zc){a.g.warn("requestMediaKeySystemAccess() failed",n);a.g.warn("Will try to recover by removing the robustness attribute of videoCapabilities and audioCapabilities.");uq(l);n=a.l.a(m,[l]);break a}}throw n;}return n})}))};let g=a.f.preferredDrmSystem;if(!g){var h=_.oj();if(h.os===jj&&10<=h.osVersion.major&&"edge"===h.browser)g=_.td;else if("safari"===h.browser)g=_.rd;else if(h.browser===Zc||"firefox"===h.browser)g=_.vd}g&&(h=
243
- b.get(g))&&(f(!0,h,g),f(!1,h,g));for(const k of[!0,!1])b.forEach((l,m)=>{m!==g&&f(k,l,m)});d=d.catch(()=>{throw new _.H(_.C,6,6001,"Failed to get MediaKeySystemAccess.");});d=d.then(k=>{if(a.j)return null;a.J.clear();var l=k.getConfiguration();a.g.info("Got MediaKeySystemAccess with configuration",l);var m=l.audioCapabilities||[];l=l.videoCapabilities||[];for(var n of m)a.J.add(n.contentType.toLowerCase());for(var p of l)a.J.add(p.contentType.toLowerCase());{m=k.keySystem;n=b.get(_.qq(k.keySystem));
244
- p=[];l=[];const u=[],v=[];Aq(n.drmInfos,p,l,u,v);1<l.length&&_.B("Multiple unique server certificates found! Only the first will be used.");1<p.length&&_.B("Multiple unique license server URIs found! Only the first will be used.");m={keySystem:m,licenseServerUri:p[0],distinctiveIdentifierRequired:n.distinctiveIdentifier===_.zf,persistentStateRequired:n.persistentState===_.zf,audioRobustness:n.audioCapabilities?n.audioCapabilities[0].robustness:"",videoRobustness:n.videoCapabilities?n.videoCapabilities[0].robustness:
245
- "",serverCertificate:l[0],initData:u,keyIds:v,periodId:null}}a.a=m;if(!a.a.licenseServerUri)throw new _.H(_.C,6,6012,a.a.keySystem);return k.createMediaKeys()}).then(k=>{a.j||(a.g.info("Created MediaKeys for key system",a.a.keySystem),a.I=k,a.T=!0)}).catch(k=>{if(!a.j){a.a=null;a.J.clear();if(k instanceof _.H)throw k;throw new _.H(_.C,6,6002,{browserError:k.message});}});c.reject();return d};
246
- Mq=function(a){a=nh(a.f.Ia[_.Qe]||{});if(0===a.size)return null;const b=[],c=[];a.forEach((e,f)=>{f=_.im(f);e=_.im(e);e={kty:"oct",kid:_.gm(f,!1),k:_.gm(e,!1)};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:_.ti(d),initDataType:"keyids"}];return{keySystem:_.Qe,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:d,
247
- keyIds:[],periodId:null}};Fq=function(a){const b=[];for(const c of a)for(const d of c.drmInfos)b.push(d);return b};Nq=function(a,b){for(const c of b)""===c.licenseServerUri||a.f.Ia[c.keySystem]||(a.f.Ia[c.keySystem]={licenseUrl:""})};
248
- Eq=function(a,b){const c=b.some(g=>0<g.drmInfos.length);if(!c){var d=nh(a.f.Ia);rq(b,d)}d=a.f.Ia[_.rd];const e=b.some(g=>g.drmInfos.some(h=>h.keySystem===_.rd));if(!1!==a.f.hj&&_.aj()&&!e&&d)for(var f of b)f.drmInfos.push({keySystem:_.rd,licenseServerUri:d.licenseUrl,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[],periodId:null});if(f=Mq(a))for(const g of b)g.drmInfos=[f];b=Fq(b);Nq(a,b);for(const g of b)sq(g,
249
- a.f.Ia);return c};Gq=function(a,b,c){const d=_.qq(b.keySystem);c=c[d];d===_.Qe&&b.licenseServerUri?a.g.debug("Using Clear Key data URI for",d):c&&c.licenseUrl?(b.licenseServerUri=c.licenseUrl,a.g.debug("Using license server URI from user-configured clpp.drm.DrmEnvironment (licenseUrl) for",d)):a.g.debug("Using license server URI from the manifest for ",d)};
250
- Hq=function(a,b){var c=new Set(Fq(b));const d=a.G?_.zf:_.Pe,e=a.G?[_.Ue]:[Xf];a=new Map;for(const f of c)a.set(f.keySystem,{initDataTypes:[_.Uc],audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:_.Pe,persistentState:d,sessionTypes:e,label:f.keySystem,drmInfos:[]});for(const f of b){b=f.audio;c=f.video;const g=b?_.tq(b):"";let h=null;b&&"ac-3"===b.codecs.toLowerCase()&&_.Ri()&&(h=_.tq(b,_.Td));const k=c?_.tq(c):"";let l=null;c&&"ac-3"===c.codecs.toLowerCase()&&_.Ri()&&(l=_.tq(c,_.Td));
31
+ ai=function(a,b){const c=new Set(a);return b.every(d=>c.has(d))};_.ci=function(a,b={}){if(b.$f){const c=[];for(const d of a)c.some(e=>b.$f(d,e))||c.push(d);return c}return Array.from((new Set(a)).values())};di=function(a,b){const c=new Set(a),d=new Set(b);return{Ii:a.filter(e=>!d.has(e)),Fj:a.filter(e=>d.has(e)),rh:b.filter(e=>!c.has(e))}};
32
+ fi=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.byteLength!==b.byteLength)return!1;if(ei(a)===ei(b)&&(a.byteOffset||0)===(b.byteOffset||0))return!0;const c=_.G(a);b=_.G(b);for(let d=0;d<a.byteLength;d++)if(c[d]!==b[d])return!1;return!0};ei=function(a){return a instanceof ArrayBuffer?a:a.buffer};_.G=function(a,b=0,c=Infinity){return gi(a,b,c,Uint8Array)};
33
+ gi=function(a,b,c,d){const e=d.BYTES_PER_ELEMENT||1,f=ei(a),g=(a.byteOffset||0)+a.byteLength;a=Math.max(0,Math.min((a.byteOffset||0)+b*e,g));c=Math.min(a+Math.max(c*e,0),g);a/=e;return new d(f,a,c/e-a)};hi=function(a,b=0,c=Infinity){return gi(a,b,c,Uint16Array)};ii=function(a,b=0,c=Infinity){return gi(a,b,c,Uint32Array)};_.ji=function(a,b=0,c=Infinity){return gi(a,b,c,Int32Array)};_.ki=function(a,b=0,c=Infinity){return gi(a,b,c,DataView)};
34
+ li=function(a){return a instanceof ArrayBuffer?a:0===a.byteOffset&&a.byteLength===a.buffer.byteLength?a.buffer:(new Uint8Array(a)).buffer};mi=function(a){let b="";for(let c=0;c<a.length;c+=16E3)b+=String.fromCharCode.apply(null,a.subarray(c,c+16E3));return b};
35
+ _.ni=function(a){if(!a)return"";a=_.G(a);239===a[0]&&187===a[1]&&191===a[2]&&(a=a.subarray(3));if("TextDecoder"in window){a=(new TextDecoder).decode(a);if(a.includes("\ufffd"))throw Error(Aa);return a}a=escape(mi(a));try{return decodeURIComponent(a)}catch(b){throw Error(Aa);}};
36
+ pi=function(a,b,c){if(!a)return"";if(!c&&0!==a.byteLength%2)throw oi.error("Data has an incorrect length, must be even."),Error("Data does not seem to be UTF-16 encoded!");c=_.G(a);if(b&&255===c[0]&&254===c[1]||254===c[0]&&255===c[1])a=c.subarray(2);if(a instanceof ArrayBuffer)var d=a;else c=new Uint8Array(a.byteLength),c.set(_.G(a)),d=c.buffer;a=Math.floor(a.byteLength/2);c=new Uint16Array(a);d=new DataView(d);for(let e=0;e<a;e++)c[e]=d.getUint16(2*e,b);return mi(c)};
37
+ _.qi=function(a,b){if(_.jh(a))return a;let c="";b=!!b;const d=_.G(a);239===d[0]&&187===d[1]&&191===d[2]?c=_.ni(d):254===d[0]&&255===d[1]?c=pi(d.subarray(2),!1):255===d[0]&&254===d[1]&&(c=pi(d.subarray(2),!0));const e=function(f,g){return f.byteLength<=g||32<=f[g]&&126>=f[g]}.bind(null,d);oi.debug("Unable to find byte-order-mark, making an educated guess.");0===d[0]&&0===d[2]?c=pi(a,!1):0===d[1]&&0===d[3]?c=pi(a,!0):e(0)&&e(1)&&e(2)&&e(3)&&(c=_.ni(a));if(c)return b&&(c=escape(c)),c;throw Error("Unable to detect text encoding");
38
+ };_.ri=function(a){if("TextEncoder"in window)return(new TextEncoder).encode(a);a=encodeURIComponent(a);a=unescape(a);const b=new Uint8Array(a.length);for(let c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b};_.si=function(a,b){const c=new Uint8Array(2*a.length),d=new DataView(c.buffer);for(let e=0;e<a.length;++e)d.setUint16(2*e,a.charCodeAt(e),b);return c.buffer};
39
+ _.ti=function(a,b){var c=b||1;b=a.length;const d=new ArrayBuffer(b*c);let e;4===c?e=ii(d):2===c?e=hi(d):e=_.G(d);for(c=0;c<b;c++)e[c]=a.charCodeAt(c);return d};_.ui=function(a,b){return String.prototype.startsWith?a.startsWith(b):0===a.indexOf(b)};_.vi=function(a,b){if(String.prototype.endsWith)return a.endsWith(b);const c=a.length-b.length;a=a.lastIndexOf(b,c);return-1!==a&&a===c};_.wi=function(a){return!!(a&&0<a.length)};_.xi=function(a){return!a||0===a.length};
40
+ _.yi=function(a){if(void 0===a||null===a||""===a)return"";try{let b=Number(a);if(mh(b))return"";a="bps";1E3<=Math.abs(b)&&(a="Kbps",b/=1E3);1E3<=Math.abs(b)&&(a="Mbps",b/=1E3);return`${b.toFixed(2).replace(/[.,]00$/,"")}${a}`}catch(b){return""}};_.Ai=function(a){a=a.replace(/<[^>]+>/gi,"");zi.innerHTML=a;a=zi.textContent;return a=a.replace(/<[^>]+>/gi,"")};_.Bi=function(a,b){a=document.createElement(a);for(const c in b){const d=b[c];null===d||void 0===d?a.setAttribute(c,""):a.setAttribute(c,d)}return a};
41
+ _.Ci=function(a,b){a.classList.add(b)};_.Di=function(a,b){if(a&&typeof b===_.He)for(const c in b)a.style[c]=b[c]};_.Ei=function(a){return document.createElement(a)};Fi=function(a,b){const c=new MutationObserver(()=>{const d=Array.from(a.h.values());ai(Array.from(b.classList),Array.from(d))||b.classList.add(...d)});c.observe(b,{attributes:!0,attributeFilter:["class"]});return c};Gi=function(a,b){a.a&&0!==b.length&&(a.a.classList.add(b),a.h.add(b))};
42
+ Hi=function(a,b,c){a.stop();let d=!0,e=null;a.a=()=>{c?clearInterval(e):clearTimeout(e);d=!1};const f=()=>{d&&a.f()};e=c?setInterval(f,1E3*b):setTimeout(f,1E3*b);return a};Ii=function(a){return 0>=a?Promise.resolve():new Promise(b=>{setTimeout(()=>{b()},1E3*a)})};Mi=function(){if(Ji)return Ji;Ki||(Ki=new _.Li(()=>{Ji=null}));(Ji=document.querySelector(_.t)||document.querySelector(_.q))||(Ji=document.createElement(_.t));Ki.la(1);return Ji};_.Ni=function(){return!!navigator.userAgent.match(/Edge?\//)};
43
+ _.Oi=function(a){return(navigator.userAgent||"").includes(a)};_.Pi=function(a){return _.Oi("Tizen"+(a?" "+String(a):""))};Ri=function(a){const b={major:-1,name:_.lg};if(!a)return b;var c=a.replace(/_/g,".");b.name=c;c=c.split(".");1<=c.length&&(b.major=Qi(a,c[0]));2<=c.length&&(b.minor=Qi(a,c[1]));3<=c.length&&(b.patch=Qi(a,c[2]));4<=c.length&&(b.build=Qi(a,c[3]));return b};_.Si=function(){return _.Oi("Web0S")};_.Ui=function(){return _.Si()&&79===_.Ti().major};
44
+ _.Ti=function(){const a=Vi();const b=["ie","edge","opera","firefox","safari",$c];var c=Wi();const d=Xi[c];for(let e=0,f=b.length;e<f;e++)if(c=d[b[e]]&&a.match(d[b[e]]))return Ri(c[1]);return Ri("")};_.Yi=function(){return _.Oi("CrKey")};_.Zi=function(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!_.Pi()};_.$i=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:_.Zi()&&1<navigator.maxTouchPoints};_.aj=function(){return/(?:iPhone|iPad|iPod)/.test(navigator.userAgent)};
45
+ Qi=function(a,b){try{return parseInt(b,10)}catch(c){bj.warn("Unable to parse version number for '"+b+"' from '"+a+"'")}return-1};cj=function(a,b){if(!a||!b||0===b.length)return!1;for(let c=0;c<b.length;c++)if(0<=a.indexOf(b[c]))return!0;return!1};
46
+ Wi=function(){const a=Vi();if(!a)return dj;var b=a.match(/^.+?(?=\))/);if(!b)return dj;b=b[0];if(cj(b,["iphone","ipad"]))return ej;if(cj(b,["android"]))return fj;if(cj(b,["macintosh"]))return gj;if(cj(b,["windows nt"]))return hj;if(cj(b,["tizen"]))return ij;if(cj(b,["web0s"]))return jj;if(cj(b,["linux"]))return kj;bj.warn("Unable to identify OS from user agent: "+a);return dj};Vi=function(){let a=window.navigator.userAgent;return a=a.toLowerCase()};
47
+ _.mj=function(){var a=Wi();var b=Wi();var c=Xi[b];if(c){c=Vi().match(c.os_version)[1];c=Ri(c);if(b===hj)if("5.1"===c.name)c.name="xp";else if("6.1"===c.name)c.name="7";else if("6.2"===c.name||"6.3"===c.name)c.name="8";b=c}else b=Ri("");a:{c=Vi();const e=["ie","edge","opera","firefox","safari",$c];var d=Wi();d=Xi[d];for(let f=0,g=e.length;f<g;f++)if(d[e[f]]&&c.match(d[e[f]])){c=e[f];break a}c=lj}return{os:a,osVersion:b,browser:c,browserVersion:_.Ti()}};
48
+ nj=function(a,b,c){(_.Si()&&53===_.Ti().major||_.Si()&&68===_.Ti().major||_.Ui())&&!b.hasAttribute(Ad)&&(b.style.opacity="0",b.setAttribute(Ad,""),a.j.one(b,Sd,()=>{b.removeAttribute(Ad);b.style.opacity="1";c&&(c.style.opacity="1")}))};oj=function(a){if(a.Wa){let b=a.player.getDuration();a.maxDuration&&(b=Math.min(b,a.maxDuration));a.Wa.h=b}a.re&&a.re()};pj=function(a,b){return _.w(function*(){yield a.release();yield a.load(b)})};
49
+ sj=function(a){if(a.sideAdContainer)a=a.sideAdContainer;else if(a=a.Ng.getSurface().getContainer(),!a)throw Error("Primary player does not have a container");return a};
50
+ uj=function(a,b,c){return Array.from({length:2}).map((d,e)=>{var f=document.createElement(_.t);b.appendChild(f);d=a.ka.bb.create();f=new tj(f);d.init(f,c);d.setSourceIndex(0);const g=f.getContainer();if(!g)throw Error("Failed to create player surface container element");g.classList.add("secondary");f.getMedia().classList.add(`v-${e}`);a.A.push(g);return d})};vj=function(a){return[a.a,...a.l.a.map(b=>b.player)]};
51
+ wj=function(a,b,c){const d=b.getSurface().getMedia();b=b.getSurface().getUniqueCssClass();d&&(c?(a.g.debug(`Show video element .${b}`),d.classList.add(fd),d.classList.remove("clpp-hide")):(a.g.debug(`Hide video element .${b}`),d.classList.remove(fd),d.classList.add("clpp-hide")),a.F&&a.F(d,c))};xj=function(a){return a.h.find(b=>!!b.primary)||null};
52
+ Lj=function(a,b,c){return _.w(function*(){if(a.w)a.g.warn(`Cannot ${c} item while busy (ID: ${b})`);else{var d=yj(a,b);if(d){a.g.info(`${c} item (ID: ${b})`);a.w=!0;var e=a.f;e&&(e.player.isPaused()||(a.o?e.primary?zj(a,e,Aj):e.player.pause():e.player.pause()),e.primary?zj(a,e,Aj):zj(a,e,Bj));var f=a.j.has(b);f&&a.j.delete(b);try{c===_.We?(e&&d.primary?yield Cj(a,d):f?yield Dj(a,d):yield Ej(a,d),oj(d)):f?a.g.error("Loading preloaded items is not supported"):yield Fj(a,d);Gj(a,d);d.primary?zj(a,d,
53
+ Bj):zj(a,d,Aj);d.Wa&&Hj(a,d,d.Wa);if(d.Ba)d.player.one(_.Wd,d.Ba);d.Gg&&d.Gg(d.player.getDuration());e&&Ij(a,e)}catch(g){a.g.error(`Item failed to ${c} (ID: ${b})`,g);if(d.primary)throw g;const h=xj(a);h&&(a.g.warn("Ad failed, resuming primary item"),yield Cj(a,h))}finally{a.w=!1,Jj(a),Kj(a,d.next)}}else a.g.warn(`Item not found (ID: ${b})`)}})};
54
+ Gj=function(a,b){const c=b.transition;if(c&&!c.Ug){if(c.Ba){const d=c.Ba,e=()=>{a.g.info(`Transition onEnded to (ID: ${d})`);a.play(d)};b.player.one(_.Wd,e);b.disposers.push(()=>{b.player.off(_.Wd,e)})}c.pe&&Mj(a,b,()=>{const d=a.f.Wa;d&&(b.disposers.forEach(e=>e()),b.disposers=[],a.a.trigger(new _.H(_.mc,{ad:d})),a.a.trigger(new _.H(_.Xb,{ad:d})),a.a.trigger(new _.H(_.Ub,{id:b.Tb})))});c.Ug=!0}};
55
+ Nj=function(a,b){return _.w(function*(){a.g.info("Crop ads by playout limit",b);var c=xj(a),d=a.getCurrentItem();if(c&&d&&d.Wa&&null!=c.W){var e=a.h.filter(l=>!l.primary),f=Math.max(...e.map(l=>l.lb));if(b>f)a.g.info("Playout limit is greater than ad pod duration, ignored.");else{var g=d.player.getPosition()+(d.lb-d.duration),h=e.sort((l,m)=>m.lb-l.lb)[0],k=c.W;b<=g?(c.W-=f-g,a.g.warn("Playout limit exceeded, immediately returning "+`to primary at ${c.W.toFixed(1)} instead of `+`${k.toFixed(1)}`),
56
+ yield Lj(a,c.id,_.We),h.Ba&&h.Ba(),c=d.Wa,a.a.trigger(new _.H(_.mc,{ad:c})),a.a.trigger(new _.H(_.Xb,{ad:c})),a.a.trigger(new _.H(_.Ub,{id:d.Tb}))):(a.g.warn("Limiting playout of ads to",b),(d=e.find(l=>b<=l.lb&&b>=l.lb-l.duration))?(e=b-(d.lb-d.duration),d.Wa.h=e,c.W-=f-b,a.g.info("Last ad is now ",d.Wa.rb(),"with cropped duration",e,"and primary will resume at",c.W.toFixed(1),"instead of",k.toFixed(1)),h.Ba&&(d.Ba=h.Ba),d.transition={pe:{position:e,itemId:c.id,W:c.W}},Gj(a,d)):a.g.warn("Cannot find ad hit by limit"))}}})};
57
+ Oj=function(a){return _.w(function*(){const b=a.f;b&&("loaded"!==b.state&&(yield b.Vc),yield b.player.play(),b.state=_.gf,oj(b))})};Pj=function(a,b){a.g.info("Add items",b);a.h=a.h.concat(b.map(c=>Object.assign({},c,{state:"idle",disposers:[],preloadPromise:Promise.resolve(),Vc:Promise.resolve()})))};
58
+ Rj=function(a,b){return _.w(function*(){a.g.info("Remove items",b);const c=[],d=[];for(const e of a.h)b.includes(e.id)?d.push(e):c.push(e);a.h=c;yield Promise.all(d.map(e=>{e.disposers.forEach(f=>f());e.disposers=[];return Qj(a,e.id)}))})};Sj=function(a){return _.w(function*(){yield Rj(a,a.h.map(b=>b.id))})};Qj=function(a,b){return _.w(function*(){const c=a.j.get(b);c&&(a.g.info(`Stop preloading item (ID: ${b})`),c.player&&(yield Tj(a,c.player)),a.j.delete(b))})};
59
+ Vj=function(a){const b=xj(a);b&&(b.transition=void 0,b.next=[],Uj(a))};Wj=function(a){return _.w(function*(){const b=a.h.filter(c=>!c.primary).map(c=>c.id);Vj(a);yield Rj(a,b)})};Xj=function(a){_.w(function*(){const b=a.getCurrentItem(),c=b.next[0];b&&b.primary&&c&&(Vj(a),yield a.play(c))})};Uj=function(a){a.f&&(a.f.disposers.forEach(b=>b()),a.f.disposers=[],a.f.transition&&(a.f.transition.Ug=!1),Gj(a,a.f))};yj=function(a,b){return a.h.find(c=>c.id===b)||null};
60
+ zj=function(a,b,c){const d=b?b.Tb||null:null;a.a.getConfiguration().muted||a.B?(a.a.setMuted(!0),Yj(a,!0)):(b.audio&&(c=b.audio),a.ka.onAudioDecision&&(c=a.ka.onAudioDecision(d)),c===Bj?(a.a.setMuted(!1),Yj(a,!0)):c===Aj?(a.a.setMuted(!0),Yj(a,!1)):a.g.warn("Audio decision not supported",c))};
61
+ Cj=function(a,b){return _.w(function*(){if(b.player){a.G();if(b.state===qf){a.g.info("Wait for seek to finish");try{yield b.preloadPromise}catch(c){}}a.fa=!1;b.W&&(yield b.player.seek(b.W,!0));a.f=b;b.role=Zj;wj(a,b.player,!0);b.state="loading";a.o?(zj(a,b,Bj),b.player.isPaused()&&(yield b.player.play())):yield b.player.play();b.state=_.gf}})};
62
+ Dj=function(a,b){return _.w(function*(){const c=b.player;if(c){if(b.state===qf){a.g.info(Gb);try{yield b.preloadPromise}catch(d){}}a.f=b;b.role=Zj;wj(a,c,!0);b.state===pf?yield c.play():b.state===of&&(yield pj(c,b.config));b.state=_.gf}})};Ej=function(a,b){return _.w(function*(){yield Fj(a,b);yield b.player.play();b.state=_.gf})};
63
+ Fj=function(a,b){return _.w(function*(){const c=yield ak(a,!!b.primary);a.f=b;b.role=Zj;a.f.player=c;a.f.videoEl=c.getSurface().getMedia();wj(a,c,!0);b.state="loading";b.Vc=pj(c,b.config);yield b.Vc;b.state="loaded"})};
64
+ Hj=function(a,b,c){const d=b.player,e=()=>{const l=d.getPosition(),m=c.getDuration();c.j=l;a.a.trigger(new _.H(_.ic,{ad:c}));!c.l&&l>=m/4&&(c.l=!0,a.a.trigger(new _.H(_.Yb,{ad:c})));!c.o&&l>=m/2&&(c.o=!0,a.a.trigger(new _.H(_.gc,{ad:c})));!c.w&&l>=3*m/4&&(c.w=!0,a.a.trigger(new _.H(_.nc,{ad:c})))},f=()=>{d.isEnded()||a.a.trigger(new _.H(_.hc,{ad:c}))},g=()=>{a.a.trigger(new _.H(_.jc,{ad:c}))},h=()=>{a.a.trigger(new _.H(_.Vb,{ad:c}))},k=()=>{a.a.trigger(new _.H(_.mc,{ad:c}));a.a.trigger(new _.H(_.Xb,
65
+ {ad:c}));c.f===c.a&&a.a.trigger(new _.H(_.Ub,{id:b.Tb}))};d.on(_.fg,e);d.on(_.Se,f);d.on(_.gf,g);d.on(_.Pc,h);d.one(_.Wd,k);b.disposers.push(()=>{d.off(_.fg,e);d.off(_.Se,f);d.off(_.gf,g);d.off(_.Pc,h);d.off(_.Wd,k)});1===c.f&&a.a.trigger(new _.H(_.Tb,{id:b.Tb}));c.videoEl=d.getSurface().getMedia();a.a.trigger(new _.H(_.bc,{ad:c}));a.a.trigger(new _.H(_.lc,{ad:c}))};
66
+ Ij=function(a,b){return _.w(function*(){const c=b.player;b.primary?(a.g.info("Pause primary playback"),a.o||wj(a,c,!1)):(a.g.info(`Stop previous playback (ID: ${b.id})`),b.disposers.forEach(d=>d()),b.disposers=[],b.player=null,b.videoEl=null,b.role=bk,b.kf?(a.g.info(`Release player (ID: ${b.id}) `+`after delay ${b.kf} ms.`),yield new Promise(d=>{setTimeout(()=>_.w(function*(){yield Tj(a,c);wj(a,c,!1);a.a.trigger(new _.H("ad-hls-released"));d()}),b.kf)})):(yield Tj(a,c),wj(a,c,!1)))})};
67
+ Jj=function(a){Promise.all(Array.from(a.j.keys()).map(b=>Qj(a,b)))};Kj=function(a,b){_.w(function*(){if(0!==b.length){a.g.info(`Preload items (IDs: ${b})`);var c=a.h.filter(d=>b.includes(d.id))||[];yield Promise.all(c.map(d=>ck(a,d)))}})};dk=function(a,b,c){c=void 0===c?!1:c;if(!a.fa){var d=xj(a);d?(d.W=b,c&&(a.fa=!0)):a.g.error("Failed to get primary item. Cannot configure resume position.")}};ek=function(a){a.A.forEach(b=>a.C.removeChild(b));a.A=[];wj(a,a.a,!0)};
68
+ Mj=function(a,b,c){const d=b.transition.pe;let e=null;d.W&&dk(a,d.W);const f=()=>{const k=b.player.getPosition();.5>=d.position-k&&(a.g.info("Start RAF polling"),h(),g())},g=()=>{var k=b.player.getPosition();k>=d.position?(c(),a.g.info(`Transition onPosition to (ID: ${d.itemId}), `+`playback position: ${k.toFixed(3)} s, `+`transition point: ${d.position.toFixed(3)} s. `),a.play(d.itemId),k=!0):k=!1;k?e=null:e=requestAnimationFrame(g)},h=()=>{a.g.info("Stop timeupdate polling");b.player.off(_.fg,f)};
69
+ a.g.info("Start timeupdate polling");b.player.on(_.fg,f);b.disposers.push(()=>{null!=e&&(a.g.info("Stop RAF polling"),cancelAnimationFrame(e),e=null)});b.disposers.push(h)};Tj=function(a,b){return _.w(function*(){b!==a.a&&(yield a.l.release(b))})};fk=function(a){return _.w(function*(){a.f&&(yield Ij(a,a.f),wj(a,a.a,!0))})};ak=function(a,b){return _.w(function*(){if(b)return a.a;const c=yield a.l.get();if(!c)throw Error("No player available");return c})};
70
+ ck=function(a,b){return _.w(function*(){if(b.primary){b.state=qf;a.j.set(b.id,b);if(b.W&&!a.o){var c=b.player;a.g.info("Preparing to resume at",b.W);zj(a,b,Aj);yield c.seek(b.W,!0)}b.state=pf}else{c=b.id;var d=yield ak(a,!1);b.player=d;b.videoEl=d.getSurface().getMedia();b.role=bk;b.state=qf;try{a.j.set(c,b);b.config.autoplay&&(a.g.warn(la+`Force disabling autoplay (ID: ${c})`),b.config.autoplay=!1);const e=a.a.getBandwidthEstimate();e&&(b.config.abr||(b.config.abr={}),b.config.abr.defaultBandwidthEstimate=
71
+ e);b.preloadPromise=pj(d,b.config);yield b.preloadPromise;b.state=pf}catch(e){7001===e.code?(a.g.info(`Preload aborted (ID: ${c})`),b.state=nf):(a.g.warn(`Preload failed (ID: ${c})`,e),b.state=of)}}})};Yj=function(a,b){a.h.filter(c=>!c.primary&&c.player).forEach(c=>c.player.setMuted(b))};_.gk=function(a){return"com.apple.hls.interstitial"===a||"com.apple.hls.overlay"===a};_.hk=function(a){if(!a)return!1;const b=!!a[_.Mb];a=!!a[_.Lb];return(b||a)&&!(b&&a)};
72
+ ik=function(a){return a&&a.ASSETS&&Array.isArray(a.ASSETS)?a.ASSETS.every(b=>typeof b.URI===_.Tf&&typeof b.DURATION===_.r):!1};lk=function(a){return a.Ff&&!(a.once&&a.Vg)&&[jk,kk].includes(a.state)};mk=function(a){a=a.customAttributes[Kb];if(!a)return null;try{return JSON.parse(atob(a))}catch(b){return null}};nk=function(a,b){for(let d=0;d<a.length;d++){const e=a[d];var c=d===a.length-1;c&&2===b||(c?(e.next=[sf],e.transition={Ba:sf}):(c=a[d+1].id,e.next=[c],e.transition={Ba:c}))}};
73
+ ok=function(a){const b={};a=a.map(d=>d.customAttributes||{});const c=new Set;a.forEach(d=>{Object.keys(d).forEach(e=>{c.add(e)})});for(const d of c)if(d===_.Qb){const e=new Set([]);a.forEach(f=>{f[d]&&f[d].forEach(g=>e.add(g))});b[d]=Array.from(e)}else if(d===_.Rb){const e=a.reduce((f,g)=>g[d]?f+g[d]:f,0);b[d]=e}return b};
74
+ qk=function(a,b){if(0===a.length)return a;const c=new Map;1===b?a.forEach(d=>{const e=c.get(d.startTime)||[];e.push(d);c.set(d.startTime,e)}):c.set(0,a);a=[];for(const d of c.values())1===d.length?a.push(d[0]):(b=pk(d),a.push(b));return a};
75
+ pk=function(a){const b=[];let c=0;a.forEach(f=>{var g=Math.max(0,f.endTime-f.startTime);c+=g;var h=f.customAttributes[_.Lb];h&&b.push({type:"list",id:f.id,customAttributes:f.customAttributes,nc:{URI:h,DURATION:0}});if(h=f.customAttributes[_.Mb])g={type:"uri",id:f.id,customAttributes:f.customAttributes,nc:{URI:h,DURATION:g}},(f=mk(f))&&(g.nc[Kb]=f),b.push(g)});const d=ok(a);d[Nb]={entries:b,na:[]};const e=a[0];a=a.map(f=>f.id).join("+");return Object.assign({},e,{id:a,endTime:e.startTime+c,customAttributes:d})};
76
+ _.sk=function(){return{maxAttempts:1,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0,fatalStatusCodes:[...rk]}};tk=function(a,b){a.timeout=b.timeout;a.baseDelay=b.baseDelay;a.backoffFactor=b.backoffFactor;a.fuzzFactor=b.fuzzFactor;a.maxAttempts=b.maxAttempts;a.fatalStatusCodes=b.fatalStatusCodes||[...rk]};uk=function(a){const b={};a.forEach((c,d)=>{b[d.trim()]=c});return b};
77
+ _.wk=function(a,b){_.jh(a)&&(a={uris:[a]});Array.isArray(a)&&(a={uris:a});const c={uris:a.uris||[],type:a.type||_.vk,uriIndex:0,method:a.method||"GET",body:a.body||null,headers:Object.assign({},a.headers),allowCrossSiteCredentials:a.allowCrossSiteCredentials||!1,onProgress:a.onProgress||null,onFragment:a.onFragment||null,maxAttempts:a.maxAttempts||1,currentAttempt:0,baseDelay:a.baseDelay||1E3,backoffFactor:a.backoffFactor||2,fuzzFactor:a.fuzzFactor||.5,timeout:a.timeout||0,requestModifiers:a.requestModifiers||
78
+ [],responseModifiers:a.responseModifiers||[],startTime:a.startTime||null,endTime:a.endTime||null,contentType:a.contentType||null,licenseRequestType:a.licenseRequestType||null,sessionId:null,bytesRemaining:-1,bytesLoaded:-1,bytesTotal:-1,timescale:a.timescale||null,rateLimitBps:a.rateLimitBps||null,disableFragmentSupport:a.disableFragmentSupport||!1,disableMergedFragments:a.disableMergedFragments||!1,fatalStatusCodes:[...rk],requestStartTimestamp:null};a.keyInfo&&(c.keyInfo=a.keyInfo);b&&tk(c,b);return c};
79
+ _.Ak=function(a,b,c,d,e,f,g,h){a={uri:e||d,data:b,headers:a,status:c,timeMs:g,responseStartMs:h,request:f};if(xk(c))return yk(a);throw zk(a);};xk=function(a){return 200<=a&&299>=a&&202!==a};yk=function(a){return{uri:a.uri,data:a.data||new ArrayBuffer(0),headers:a.headers,status:a.status,fromCache:!!a.headers["x-shaka-from-cache"],timeMs:a.timeMs,responseStartMs:a.responseStartMs,request:a.request}};
80
+ zk=function(a){a=yk(a);try{var b=_.qi(a.data,!0)}catch(d){b=null}_.xh("HTTP error text:",b);const c=a.request;return new _.I(0<=(c?c.fatalStatusCodes||[]:[]).indexOf(a.status)?_.D:1,1,1001,{url:a.uri,status:a.status,responseText:b,headers:a.headers,request:a.request,response:a})};Bk=function(a,b){b=parseInt(b,10);Number.isNaN(b)&&(b=-1);a.bytesTotal=b;a.bytesLoaded=0;a.bytesRemaining=b};Ck=function(a,b,c){0<a.bytesRemaining&&(a.bytesRemaining-=b);a.bytesLoaded+=b;if(a.onProgress)a.onProgress(b,c)};
81
+ Dk=function(a,b,c){if(0>=a)return Promise.resolve();const d=8*c/a-b/1E3;return 0<d?new Promise(e=>{setTimeout(e,1E3*d)}):Promise.resolve()};Ek=function(a){return a.reduce((b,c)=>b+c,0)};Gk=function(a){return a.a.find(b=>b.state===Fk)||null};Hk=function(a,b){const c=a.f.getPosition();b>=c||a.a.filter(d=>1===d.Yc&&!d.once&&d.Bg&&d.startTime>b).forEach(d=>{d.Ff=!0})};Jk=function(a){return a.a.find(b=>b.state===Ik)||null};
82
+ Kk=function(a,b){return a.a.find(c=>lk(c)&&!c.gi&&1===c.Yc&&b>c.startTime&&b<c.endTime)||null};Lk=function(a,b){const c=a.f.getPosition();return a.a.filter(d=>1===d.Yc&&!d.Xf).sort((d,e)=>e.startTime-d.startTime).find(d=>d.startTime>c&&d.startTime<b)||null};Ok=function(a,b,c){_.w(function*(){a.fa=!0;try{const d=Jk(a);d&&(yield Mk(a,d));a.g.info("Seek into interstitial",b.da);yield Nk(a,b)}catch(d){yield a.f.seek(c)}finally{a.fa=!1}})};
83
+ Pk=function(a,b,c){_.w(function*(){a.fa=!0;try{const d=Jk(a);d&&(yield Mk(a,d));a.g.info("Play jumped interstitial",b.da,"resume at",c.toFixed(2));yield Nk(a,b,c)}catch(d){a.g.warn("Failed to play jumped interstitial",b.da,d),b.Hh=new Date,yield a.f.seek(c)}finally{a.fa=!1}})};Mk=function(a,b){return _.w(function*(){a.g.info("Unschedule interstitial",b.da);yield Wj(a.X);b.state=jk})};
84
+ Xk=function(a,b){const c=()=>_.w(function*(){if(!a.fa&&!a.De){var g=b.getPosition(),h=Qk(a,g);h&&(yield Rk(a,h))&&Sk(a,h,b);if((h=Tk(a))&&h.state===jk&&b.getDuration()-g<a.ka.resolutionOffsetSec&&(yield Rk(a,h)))if(h.na&&0!==h.na.length){if(g=a.X.getCurrentItem()){var k=Uk(a,h,2);if(0!==k.length){var l=k[0].id;g.next=[l];g.transition={Ba:l};a.g.info(`Schedule postroll interstitial ${h.da}`);Vk(a,h,k)}}}else a.g.warn("Postroll interstitial has no assets, ignoring.")}});b.on(_.fg,c);a.h.push(()=>{b.off(_.fg,
85
+ c)});const d=()=>{Wk(a,!1,!0,!0)};b.on(_.eg,d);a.h.push(()=>{b.off(_.eg,d)});const e=()=>{a.De=!0};b.on(_.Tb,e);a.h.push(()=>{b.off(_.Tb,e)});const f=()=>{a.De=!1};b.on(_.Ub,f);a.h.push(()=>{b.off(_.Ub,f)})};Yk=function(a){a.h.forEach(b=>b());a.h=[]};Zk=function(a){return(a=a.X.getCurrentItem())&&!a.primary?a.player:null};
86
+ Wk=function(a,b,c,d){var e=$k(a);a.g.info("Interstitial cues changed",e);var f=e;if(d){f=di(a.a.map(p=>p.da),e.map(p=>p.id));al(a,f.Ii);const n=new Set(f.rh);f=e.filter(p=>n.has(p.id))}if(!bl(a,f))return!1;const g=[],h=[],k=[];f.forEach(n=>{const p=n.customAttributes.CUE||[];p.includes(_.eb)?h.push(n):!d&&p.includes("PRE")?g.push(n):!c&&n.startTime<a.ka.Ei?g.push(n):k.push(n)});e=qk(g,0);f=qk(h,2);const l=qk(k,1),m=e.concat(f,l);dl(a,m);0<e.length&&el(a,e[0],b);l.forEach(n=>fl(a,n,1));0<f.length&&
87
+ fl(a,f[0],2);gl(a,m);return 0<e.length};hl=function(a){_.w(function*(){var b=a.X;Pj(b,[{id:sf,primary:!0,config:b.a.getConfiguration(),next:[],lb:0,duration:0,Tb:null}]);var c=xj(b);if(!c)throw Error("Failed to find primary item");b.f=c;c.role=Zj;c.player=b.a;c.videoEl=c.player.getSurface().getMedia();wj(b,c.player,!0);b=a.f;c=b.getConfiguration();a.j=Wk(a,!c.autoplay,b.isLive(),!1);if(a.j){if(b=a.X,c=b.l,c=c.a[0]?c.a[0].player:null)b.o||wj(b,b.a,!1),wj(b,c,!0)}else c.autoplay&&(yield Oj(a.X))})};
88
+ Nk=function(a,b,c){return _.w(function*(){if(!(yield Rk(a,b)))throw Error("Failed to bind");yield il(a,b,1,!1,c)})};$k=function(a){return a.f.getTimelineCues().filter(b=>_.gk(b.schemeIdUri)&&b.customAttributes)};al=function(a,b){const c=new Set(b);a.a.forEach(d=>{c.has(d.da)&&!lk(d)&&a.g.warn("Removing an interstitial in active state",d)});a.a=a.a.filter(d=>!c.has(d.da))};
89
+ bl=function(a,b){const c=[];b.forEach(d=>{_.hk(d.customAttributes)||c.push(`Interstitial cue ${d.id} is invalid `+"it must contain exactly one of X-ASSET-LIST or X-ASSET-URI.")});0<c.length&&a.g.error("Invalid interstitials, all interstitials will "+`be skipped. ${c.join(" ")}`);return 0===c.length};
90
+ dl=function(a,b){var c=b.sort((f,g)=>f.startTime-g.startTime);b=a.ka.resolutionOffsetSec;let d=Infinity;const e=[];for(let f=0;f<c.length-1;f++){const g=c[f],h=c[f+1];h&&(d=Math.min(d,h.startTime-g.endTime));h&&h.startTime<=g.endTime&&e.push(`Interstitials ${g.id} and ${h.id} `+"overlap.")}d<b&&(c=d/2,a.ka.resolutionOffsetSec=c,a.g.info("Interstitials are closer than configured "+`resolutionOffsetSec (${b} s) auto-reconfiguring to `+`${c} s.`));0<e.length&&a.g.warn("Unsupported format of interstitials, playback may not "+
91
+ `behave correctly. ${e.join(" ")}`)};el=function(a,b,c){_.w(function*(){var d=fl(a,b,0);const e=yield Rk(a,d),f=d.na?d.na.length:0;if(e&&0<f)try{a.g.info(`Player preroll interstitial ${d.da}`),yield il(a,d,0,c)}catch(g){a.g.error("Preroll interstitial failed.",g),(d=xj(a.X))&&(yield a.X.play(d.id))}else e?a.g.warn("Preroll interstitial has no assets, skipping"):a.g.error("Preroll interstitial failed, skipping"),yield fk(a.X),c||(yield Oj(a.X))})};
92
+ fl=function(a,b,c){{const e=b.customAttributes[_.Mb],f=b.customAttributes[_.Lb],g=b.customAttributes[Nb],h=b.customAttributes[_.Rb],k=b.customAttributes[_.Pb],l=b.customAttributes[_.Qb]||[];b.customAttributes[Sb]||(b.customAttributes[Sb]=null==h||0<h?"RANGE":"POINT");var d=b.customAttributes["X-YOSPACE-AUDIO-PRIORITY"];d="CONTENT"===d?Bj:"AD"===d?Aj:void 0;b={da:b.id,startTime:b.startTime,endTime:b.endTime,state:jk,Mf:f,Nf:e,qd:g,na:null,W:null==h?null:Math.max(0,b.startTime+h),Ki:h,gc:k,Yc:c,gi:"POINT"===
93
+ b.customAttributes[Sb],zh:!l.includes("SKIP"),Xf:!l.includes("JUMP"),Wg:mk(b),Bg:null!=h&&0>h,once:(b.customAttributes.CUE||[]).includes("ONCE"),Vg:!1,Ff:!0,customAttributes:b.customAttributes,audio:d}}a.a.push(b);return b};
94
+ gl=function(a,b){_.w(function*(){const c=a.X.getCurrentItem();if(c)if(c.primary)a.a.forEach(g=>{const h=b.find(k=>k.id===g.da);if(h){const k=h.customAttributes[_.Pb];null==g.gc&&null!=k&&(a.g.info(Bb,h.id,"Playout limit",k),g.gc=k,1===g.Yc&&g.state===Ik&&jl(a,g))}});else{var d=b.find(g=>g.id===c.Tb);if(d){var e=d.customAttributes[_.Pb];if(null!=e){var f=a.a.find(g=>g.da===d.id);f&&null==f.gc&&(a.g.info(Bb,d.id,"Playout limit",e),f.gc=e,yield Nj(a.X,e))}}}})};
95
+ jl=function(a,b){_.w(function*(){yield Mk(a,b);yield Sk(a,b,a.f)})};Rk=function(a,b){return _.w(function*(){b.state=Fk;if(b.qd)yield kl(a,b,b.qd);else if(b.Mf)yield ll(a,b,b.Mf);else if(b.Nf){b.na=[{URI:b.Nf,DURATION:b.endTime-b.startTime}];var c={URI:b.na[0].URI,DURATION:b.na[0].DURATION};b.Wg&&(c[Kb]=b.Wg);c={ASSETS:[c]};ml(a,new _.H(ac,{id:b.da,detail:c}));b.state=nl}else b.state=ol;return b.state===nl})};
96
+ il=function(a,b,c,d,e){return _.w(function*(){if(0!==b.na.length&&a.X.getCurrentItem()){var f=Uk(a,b,c);0!==f.length&&(Vk(a,b,f),0===c&&a.f.isLive()||(null!=e?dk(a.X,e,!0):null!=b.W&&dk(a.X,b.W)),d?yield a.X.load(f[0].id):yield a.X.play(f[0].id))}})};
97
+ Sk=function(a,b,c){if(b.na)if(0===b.na.length){const g=()=>{c.isLive()?a.g.info("Skipping empty "+`live interstitial ${b.da}`):null!=b.W&&0!==b.Ki?c.seek(b.W):a.g.info(`Empty VOD interstitial ${b.da}, `+"continuing to next segment")};c.one(_.cg,g);a.h.push(()=>{c.off(_.cg,g)});a.g.info(`Schedule interstitial ${b.da} to `+"be skipped")}else{var d=a.X.getCurrentItem();if(d){var e=Uk(a,b,1);if(0!==e.length){var f=e[0].id;null!=b.W&&dk(a.X,b.W);d.next=[f];d.transition={pe:{position:b.startTime,itemId:f,
98
+ W:b.W}};a.g.info(`Schedule interstitial ${b.da} for `+`${b.startTime} s`);Vk(a,b,e)}}}};Qk=function(a,b){return a.a.find(c=>{const d=c.startTime-b;return 1===c.Yc&&lk(c)&&0<d&&d<=a.ka.resolutionOffsetSec})||null};Tk=function(a){return a.a.find(b=>2===b.Yc)||null};
99
+ kl=function(a,b,c){return _.w(function*(){try{const d=[],e=c.entries,f=e.map(h=>_.w(function*(){if("list"===h.type)return(yield pl(a,h.nc.URI)).ASSETS.map(k=>({id:h.id,customAttributes:h.customAttributes,nc:k}));if("uri"===h.type)return[{id:h.id,customAttributes:h.customAttributes,nc:h.nc}];throw new _.ql("Invalid group asset entry type");}));(yield Promise.all(f)).forEach(h=>d.push(...h));b.qd={entries:e,na:d};const g={ASSETS:d.map(h=>h.nc)};rl(a,b,g)}catch(d){a.g.error(`Failed to bind grouped asset list for ${b.da}`,
100
+ d),b.state=ol}})};ll=function(a,b,c){return _.w(function*(){try{a.g.info(`Load X-ASSET-LIST for ${b.da}`);ml(a,new _.H(Zb));const d=yield pl(a,c);rl(a,b,d)}catch(d){a.g.error("Failed to load X-ASSET-LIST",d),b.state=ol}})};
101
+ pl=function(a,b){return _.w(function*(){var c=a.X.ae();if(!c)throw Error("No player found");c=c.getNetworkEngine();const d=_.wk(sl(a,b));c=yield tl(c,d);if(null===c)return a.g.warn(`X-ASSET-LIST ${b} returned no content`),{ASSETS:[]};if(!ik(c))throw new _.ql("Invalid X-ASSET-LIST list response");return c})};
102
+ rl=function(a,b,c){b.na=c.ASSETS;b.na&&0!==b.na.length||a.g.info(`Interstitial ${b.da} has no assets, `+"will be smoothly skipped");if(null==b.W){const d=Ek(b.na.map(e=>e.DURATION));b.W=b.startTime+(null==b.gc?d:Math.min(b.gc,d))}b.state=nl;ml(a,new _.H($b));ml(a,new _.H(ac,{id:b.da,detail:c}))};ml=function(a,b){a.f.trigger(b)};sl=function(a,b){return(a=a.ka.Di)?(b=new URL(b),b.searchParams.set("_HLS_primary_id",a),b.toString()):b};
103
+ Uk=function(a,b,c){let d=0;const e=!!b.qd;let f=b.na.map((k,l)=>{let m=b.da;e&&(m=b.qd.na[l].id);d+=k.DURATION;return{id:`${m}-${l}`,config:{source:{url:sl(a,k.URI),type:_.ul}},duration:k.DURATION,lb:d,Tb:m,next:[],Wa:new J(c,l+1,b.na.length,k.DURATION,m,b.zh,b.customAttributes||null),audio:b.audio}});nk(f,c);f.forEach(k=>{k.re=()=>{var l=k.Wa;a.g.info(`Playing ad ${`${l.f}/${l.a}`} of interstitial `+k.Tb)}});if(null!=b.gc&&(f=vl(a,b,f),0===f.length))return[];const g=f[0].re;f[0].re=()=>{b.Vg=!0;
104
+ b.Bg&&(b.Ff=!1);a.g.info(`Playing interstitial ${b.da} with `+`${b.na.length} assets and will resume primary `+`content ${b.W?`at ${b.W.toFixed(1)} s`:"after interstitial ended"}.`);g()};f[0].Gg=k=>{null==b.W&&(b.W=b.startTime+k,dk(a.X,b.W),a.g.info("Primary content will resume at",b.W.toFixed(1),"s"));b.state=wl};const h=f[f.length-1];h.Ba=()=>{b.state=kk;Rj(a.X,f.map(k=>k.id));2===c&&fk(a.X)};h.kf=a.ka.adReleaseDelayMs;return f};
105
+ Vk=function(a,b,c){Pj(a.X,c);c=a.X;Uj(c);c.f&&(c.f.Wa&&Hj(c,c.f,c.f.Wa),Jj(c),Kj(c,c.f.next));b.state=Ik;ml(a,new _.H(_.ec,{ad:null}))};
106
+ vl=function(a,b,c){const d=b.gc;a.g.info(`Playout limit for ${b.da} is `+`${d} s`);b=c[c.length-1].lb;if(d>=b)return a.g.info(`Playout limit (${d}) is`+`larger or equal to total duration: (${b}).`),c;if(0>=d)return a.g.info("Discarding all ads."),[];const e=c.filter(f=>f.lb-f.duration<=d);e.forEach(f=>{f.Wa.a=e.length});a=e[e.length-1];c=d-(a.lb-a.duration);.1>Math.abs(c-a.duration)?a.transition.Ba=sf:a.transition.pe={position:c,itemId:sf,W:null};a.maxDuration=c;return e};
107
+ xl=function(){try{const a=URL.createObjectURL(new Blob);URL.revokeObjectURL(a);return a.slice(a.lastIndexOf("/")+1)}catch(a){let b=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,c=>{const d=(b+16*Math.random())%16|0;b=Math.floor(b/16);return("x"===c?d:d&3|8).toString(16)})}};
108
+ Bl=function(a){a.a.on(window,"offline",()=>{yl(a,!1)});a.a.on(window,"online",()=>{a.f||zl(a)});a.a.on(a.m,Of,()=>Al(a));a.a.on(a.m,"suspend",()=>Al(a));a.a.on(a.m,_.Fg,()=>Al(a));a.a.on(a.m,_.gf,()=>{a.f||zl(a)});a.a.on(a.m,_.tf,()=>{a.f||zl(a)});a.a.on(a.m,_.Qf,()=>{switch(a.m.getState()){case 2:Al(a);break;default:Al(a)}})};Cl=function(a){a.h&&(a.h.stop(),a.h=null)};Al=function(a){a.f&&zl(a)};
109
+ El=function(a){return _.w(function*(){var b=a.m.getConfiguration().connectivityCheck;b&&a.m&&(b=yield Dl(a.j,b.url,b.attemptParameters,b.method),yl(a,b))})};zl=function(a){a.m.getConfiguration().connectivityCheck&&(Cl(a),a.h=(new _.Li(()=>El(a))).la(5))};yl=function(a,b){Cl(a);a.f!==b&&(a.f=b,a.m&&a.m.getConfiguration().connectivityCheck&&a.m.trigger(new _.H(Oe,{online:a.f})))};_.Gl=function(a,b){a.a.push(Fl(b,()=>{{var c=a.a;const d=c.indexOf(b);-1<d&&c.splice(d,1)}}))};
110
+ _.Hl=function(){let a,b;const c=new Promise((e,f)=>{a=e;b=f}),d=Object.assign(c,{done:!1,lf:!1,Gi:!1,value:null,error:null,resolve(e){d.lf=!0;d.done=!0;d.value=e;a(e)},reject(e){d.Gi=!0;d.done=!0;d.error=e;b(e)}});return d};Il=function(a,b){try{return new URL(a,b)}catch(c){return null}};Jl=function(){return window.performance&&window.performance.now?window.performance.now():Date.now()};Kl=function(a){return Jl()-a.a};Ml=function(a){const b=new Ll;b.a=a.a;return b};
111
+ Nl=function(a,b){var c=a.f+b.byteLength;if(a.a.byteLength<c){let d=a.a.byteLength;for(;d<c;)d*=2;c=new Uint8Array(d);c.set(a.a);a.a=c}a.a.set(b,a.f);a.f+=b.byteLength};Ol=function(a,b,c){return b.read().then(({done:d,value:e})=>{null!=e&&(Nl(a,e),Ck(c,e.byteLength,Kl(a.h)),a.h.a=Jl());return d?(d=a.a.buffer,a.a.byteLength!==a.f&&(d=d.slice(0,a.f)),Promise.resolve(d)):Promise.resolve().then(()=>Ol(a,b,c))})};
112
+ Pl=function(a){let b=null;a.h!==a.f&&(b={start:a.h,end:a.f,length:a.f-a.h,data:new DataView(a.j.a.buffer,a.h,a.f-a.h),count:-1});return b};Ql=function(a,b){{var c=a.j;const d=c.f+b.byteLength;if(d>c.a.byteLength){const e=c.a;c.a=new Uint8Array(Math.max(Math.ceil(c.a.buffer.byteLength*c.h),d));c.a.set(e)}c.a.set(b,c.f);c.f+=b.byteLength}a.a=a.h;a.f=a.j.f;a.l=new DataView(a.j.a.buffer,0,a.j.f)};
113
+ Sl=function(a){if(0<=a.o&&a.f<a.o)return null;let b=Rl(a);for(;null!==b;){if(b.name===_.xe){const c={start:a.h,end:b.end,length:b.end-a.h,data:new DataView(a.j.a.buffer,a.h,b.end-a.h),count:1};a.h=b.end;return c}b=Rl(a)}return null};
114
+ Tl=function(a,b,c,d){return b.read().then(e=>{var {done:f,value:g}=e;d&&g&&(d(g.byteLength,Kl(a.w)),a.w.a=Jl());if(f)return e=Pl(a),(e=c(!0,e))?e.then(()=>a.j.a.buffer):Promise.resolve(a.j.a.buffer);let h=Promise.resolve();if(null!=g){Ql(a,g);var k=Sl(a);for(e=[];k;)e.push(k),k=Sl(a);if(!a.A)e.forEach(l=>{h=h.then(()=>c(!1,l))});else if(0<e.length){k=e[0];if(1<e.length){k=e[0];const l=e[e.length-1],m=l.end-k.start;k={start:k.start,end:l.end,length:m,data:new DataView(a.j.a.buffer,k.start,m),count:e.length}}(e=
115
+ c(!1,k))&&(h=e)}}return h.then(()=>Tl(a,b,c,d))})};
116
+ Rl=function(a){const b=a.a;if(a.a+4>=a.f)return a.a=a.f,null;var c=Ul(a);if(a.a+4>=a.f)return a.a=a.f,null;var d=Ul(a);d=String.fromCharCode(d>>24&255,d>>16&255,d>>8&255,d&255);switch(c){case 0:c=a.f-b;break;case 1:if(a.a+8>=a.f)return a.a=a.f,null;{let e,f;try{f=a.l.getUint32(a.a,!1),e=a.l.getUint32(a.a+4,!1)}catch(g){throw new _.I(_.D,3,3E3);}if(2097151<f)throw new _.I(_.D,3,3E3);a.a+=8;c=f*Math.pow(2,32)+e}}c=b+c;a.o=c;return a.f>=c?(a.a=c,{name:d,start:b,end:c}):null};
117
+ Ul=function(a){const b=a.l.getUint32(a.a,!1);a.a+=4;return b};
118
+ Wl=function(a){var b=new window.Headers;for(const e in a.headers)b.append(e.toLowerCase(),a.headers[e]);const c=new window.AbortController,d={ed:!1,Zg:!1};b={U:Vl(a.uris[a.uriIndex],a,{body:a.body||void 0,headers:b,method:a.method,signal:c.signal,credentials:a.allowCrossSiteCredentials?"include":void 0},d),request:a,abort:()=>{d.ed||(d.ed=!0,c.abort());return Promise.resolve()}};if(a=a.timeout){const e=window.setTimeout(()=>{d.Zg=!0;c.abort()},a);b.U=b.U.finally(()=>{window.clearTimeout(e)})}return b};
119
+ Vl=function(a,b,c,d){return _.w(function*(){const e=new Ll,f=Ml(e);try{const g=yield window.fetch(a,c),h=uk(g.headers),k={uri:g.url,data:null,headers:h,status:g.status,timeMs:0,responseStartMs:Kl(f),request:b};if(!xk(g.status))throw k.data=yield g.arrayBuffer(),k.timeMs=Kl(e),zk(k);const l=g.headers.get(sa);Bk(b,l);const m=l?parseInt(l,10):0;if(b.onFragment&&!b.disableFragmentSupport&&2===b.type){const n=g.body.getReader(),p=new Xl(m,!b.disableMergedFragments);k.data=yield Tl(p,n,(u,v)=>{if(d.ed)return null;
120
+ v&&v.data&&(Ck(b,v.data.byteLength,Kl(f)),f.a=Jl());return b.onFragment&&v?b.rateLimitBps?Dk(b.rateLimitBps,Kl(e),b.bytesLoaded).then(()=>b.onFragment(v)):b.onFragment(v):null},b.onProgress)}else{const n=g.body.getReader(),p=yield Ol(new Yl(m),n,b);b.rateLimitBps&&(yield Dk(b.rateLimitBps,Kl(e),p.byteLength));k.data=p}if(d.ed)throw Error("Request was aborted");k.timeMs=Kl(e);return yk(k)}catch(g){if(d.ed)throw new _.I(1,1,7001,{url:a,request:b});if(d.Zg)throw new _.I(1,1,1003,{url:a,request:b});if(g&&
121
+ 1001===g.code)throw g;_.yh("Error while fetching data:",g);throw new _.I(1,1,1002,{url:a,error:g,request:b,status:-1},g);}})};
122
+ Zl=function(a){const b=a.uris[a.uriIndex],c=new window.XMLHttpRequest,d=new Ll,e=Ml(d);let f=0,g;const h=new _.Hl;c.open(a.method,b,!0);c.responseType="arraybuffer";c.timeout=a.timeout;c.withCredentials=a.allowCrossSiteCredentials;let k=!1,l=!1;c.onreadystatechange=function(m){m=m.target;m.readyState>=XMLHttpRequest.LOADING&&0===f&&(g=Kl(e));m.readyState>=XMLHttpRequest.HEADERS_RECEIVED&&!k&&(m=m.getResponseHeader(sa),Bk(a,m),k=!0)};c.onload=function(m){m=m.target;var n=(m.getAllResponseHeaders()||
123
+ "").trim().split("\r\n");const p={};for(const u of n)n=u.split(": "),p[n[0].toLowerCase()]=n.slice(1).join(": ");try{const u=Kl(e);l||Ck(a,m.response?m.response.length:0,u);const v=_.Ak(p,m.response,m.status,b,m.responseURL,a,u,g);a.rateLimitBps?Dk(a.rateLimitBps,Kl(e),a.bytesLoaded).then(()=>{h.resolve(v)}):h.resolve(v)}catch(u){h.reject(u)}};c.onerror=function(m){m=m.target;if(0>=m.status)h.reject(new _.I(1,1,1002,{url:b,request:a,status:m.status}));else{var n=m.getAllResponseHeaders();const u=
124
+ {};if(n){n=n.trim().split("\r\n");for(var p of n)n=p.split(": "),u[n[0].toLowerCase()]=n.slice(1).join(": ")}p=_.Ak(u,m.response,m.status,b,m.responseURL,a,Kl(e),g);h.resolve(p)}};c.ontimeout=function(){h.reject(new _.I(1,1,1003,{url:b,request:a}))};c.onprogress=function(m){const n=Kl(d);d.a=Jl();if(100<n||m.lengthComputable&&m.loaded===m.total)Ck(a,m.loaded-f,n),f=m.loaded,l=!0};for(const m in a.headers)c.setRequestHeader(m.toLowerCase(),a.headers[m]);c.send(a.body);return{U:h,request:a,abort:()=>
125
+ {c.abort();h.reject(new _.I(1,1,7001,{url:b,request:a}));return Promise.resolve()}}};_.am=function(a,b=!0){a=_.$l(a).replace(/\+/g,"-").replace(/\//g,"_");return b?a:a.replace(/[=]*$/,"")};_.$l=function(a){a=mi(_.G(a));return btoa(a)};_.bm=function(a){a=window.atob(a.replace(/-/g,"+").replace(/_/g,"/"));const b=new Uint8Array(a.length);for(let c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b};
126
+ _.cm=function(a){const b=new Uint8Array(a.length/2);for(let c=0;c<a.length;c+=2)b[c/2]=window.parseInt(a.substr(c,2),16);return b};_.dm=function(a){let b="";for(let c=0;c<a.length;++c){let d=a[c].toString(16);1===d.length&&(d="0"+d);b+=d}return b};_.em=function(a,b){if(!a&&!b)return!0;if(!a||!b||a.length!==b.length)return!1;for(let c=0;c<a.length;++c)if(a[c]!==b[c])return!1;return!0};
127
+ _.fm=function(a){var b=0;for(var c=0;c<arguments.length;++c)b+=arguments[c].length;b=new Uint8Array(+b);c=0;for(let d=0;d<arguments.length;++d)b.set(arguments[d],c),c+=arguments[d].length;return b};hm=function(a){try{const b=a.uris[a.uriIndex],c=_.gm(b);return{U:Promise.resolve({uri:b,data:c.data,request:a,headers:{"content-type":c.contentType}}),request:a,abort:()=>Promise.resolve()}}catch(b){return{U:Promise.reject(b),request:a,abort:()=>Promise.resolve()}}};
128
+ _.gm=function(a){var b=a.split(":");if(2>b.length||"data"!==b[0])throw _.yh("Bad data URI, failed to parse scheme"),new _.I(_.D,1,1004,{uri:a});b=b.slice(1).join(":").split(",");if(2>b.length)throw _.yh("Bad data URI, failed to extract encoding and MIME type"),new _.I(_.D,1,1004,{uri:a});var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];let d=!1;1<b.length&&"base64"===b[b.length-1]&&(d=!0,b.pop());return{data:d?_.bm(a).buffer:_.ri(a).buffer,contentType:c}};
129
+ Fl=function(a,b){a.U.then(()=>b(!0),()=>b(!1));return a};
130
+ km=function(a){a.h=a.C.then(e=>{a.j=e.request;e.request.uriIndex=e.request.currentAttempt%e.request.uris.length;if(0<e.request.currentAttempt){-1===a.f&&(a.f=im(e.request.baseDelay,1E3));const f=a.f*(1+(2*Math.random()-1)*im(e.request.fuzzFactor,.5));a.f*=im(e.request.backoffFactor,2);if(0<f)return(new Promise((g,h)=>{a.l=h;jm(a,()=>{g(e.plugin(e.request))},f)})).catch(g=>{if(!a.a)throw g;})}if(a.a)throw new _.I(1,1,7001,{url:e.request.uris[e.request.uriIndex],request:e.request});return e.plugin(e.request)});
131
+ let b=0,c=0,d=0;return a.h.then(e=>{const f=e.request;f.currentAttempt+=1;b=f.currentAttempt;c=f.maxAttempts;d=f.uris.length;return e.U}).then(e=>{a.w.resolve(e)}).catch(e=>{if(e instanceof _.I){const f=b<d,g=7001!==e.code,h=b<c;if((1===e.severity||f)&&g&&h)return a.A&&a.A(e),km(a);g&&e.a(_.D);a.w.reject(e)}else a.w.reject(e)})};jm=function(a,b,c){a.o=setTimeout(b,c)};im=function(a,b){return null===a||void 0===a?b:a};
132
+ tl=function(a,b){return _.w(function*(){const c=yield lm(a,b);if(!c)return null;try{const d=JSON.parse(c);if(null==d||typeof d!==_.He)throw Error("Not an object");return d}catch(d){throw new _.ql("Failed to parse JSON response","json-failed");}})};Dl=function(a,b,c,d){d=void 0===d?"HEAD":d;return _.w(function*(){if(!navigator.onLine)return!1;if(b){const e=_.wk(b,c);e.method=d;c||(e.timeout=5E3);e.headers["cache-control"]="no-cache";try{yield a.fetch(e).U}catch(f){if(1002===f.code||1003===f.code)return!1}}return!0})};
133
+ mm=function(a,b){a.A=b};lm=function(a,b){return _.w(function*(){const c=yield a.fetch(b);return _.ni(c.data).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")})};
134
+ _.qm=function(a,b,c){if(a.w)return new nm(Promise.reject(new _.I(1,1,7001,{url:b.uris[b.uriIndex],request:b})));a.l&&0<a.l&&(b.rateLimitBps=a.l);var d=[];for(var e of a.h)d.push(e);if(b.requestModifiers)for(const g of b.requestModifiers)d.push(g);b.requestModifiers=d;om(a,b);b.responseModifiers=[...a.j,...b.responseModifiers||[]];let f;e=d=new _.Hl;try{const g=[{type:"public",modifiers:b.requestModifiers},{type:"internal",modifiers:a.f}];for(const h of g)for(const k of h.modifiers)e=e.then(l=>{if(f.a)throw new _.I(_.D,
135
+ 1,7001,l?{url:l.uris[l.uriIndex],request:l}:null);return"internal"===h.type?k(l,c)||l:k(l)||l}).catch(l=>{if(l instanceof _.I)throw l;throw new _.I(_.D,1,1006,null,l);});e=e.then(h=>({request:h,plugin:pm(a,h)}));f=new nm(e,a.A);for(const h of b.responseModifiers)f.then(k=>{const l=()=>{if(f.a)throw new _.I(_.D,1,7001,k?{url:k.request.uris[k.request.uriIndex],request:k.request}:null);};l();const m=h(k)||k;l();return m}).catch(k=>{if(k instanceof _.I&&k.data&&k.data.response){const l=h(k.data.response);
136
+ if(l&&l.then)return l.then(()=>Promise.reject(k))}return Promise.reject(k)}).catch(k=>{if(k instanceof _.I)throw k;throw new _.I(_.D,1,1007,null,k);});_.Gl(a.o,f);d.resolve(b);return f}catch(g){return new nm(Promise.reject(g))}};om=function(a,b){for(const c of a.headers){const [d,e]=c;b.headers[d]||(b.headers[d]=e)}};pm=function(a,b){b=b.uris[b.uriIndex];var c=new _.rm(b,location.href);c=c?c.a.protocol.slice(0,-1):"";const d=a.a[c];if(!d)throw new _.I(_.D,1,1E3,{url:b});return e=>d(e)};
137
+ tm=function(){sm.forEach(a=>a())};_.um=function(a){sm.push(a)};_.wm=function(a){vm&&performance.mark(a)};_.ym=function(a,b,c){vm&&(b=performance.measure(a,b,c),null!=b&&xm.info(`Step: "${a}" took ${b.duration.toFixed(0)} ms.`))};Bm=function(a,b){var c=zm;Am.set(`${a.toLowerCase().split(";")[0]}-${c}`,{priority:c,plugin:b})};_.Im=function(a,b){var c=[Cm,Dm,Hm,zm];for(const d of c)if(c=Am.get(`${a.toLowerCase().split(";")[0]}-${d}`)){const e=c.plugin(),f=e.isSupported(a,b);e.destroy();if(f)return c.plugin}return null};
138
+ Jm=function(a,b){const c=b||$h;let d=null,e=null,f=!1;return function(...g){if(f&&c(g,d))return e;f=!0;d=g;return e=a(...g)}};_.Km=function(a){return null!=a};Lm=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}throw new _.ql("No non-null, non-undefined value found");};Mm=function(...a){for(let b=0;b<a.length;b++){const c=a[b];if(null!==c&&void 0!==c)return c}};_.Nm=function(a){return`${a.scheme}//`+`${a.a}${a.port?":"+a.port:""}${a.path}${a.h}${a.f}`};
139
+ _.Om=function(a,b,c){return a?(c||Object.keys(a).sort()).reduce(function(d,e){if(!(e in a))return d;const f=a[e];let g="\x26";""===d&&(g=b?"":"?");d=d+g+encodeURIComponent(e);return d=d+"\x3d"+encodeURIComponent(void 0===f?"":f)},""):""};Pm=function(a){const b={};a=a||"";a=a.substring(a.indexOf("?")+1);for(const d of a.split("\x26")){var c=d.split("\x3d");a=decodeURIComponent(c[0]);c=decodeURIComponent(c[1]||"");a&&(b[a]=c)}return b};
140
+ _.Qm=function(a,b){if(a.startsWith("http://")||a.startsWith(_.fe))return a;let c=b;b.startsWith("//")&&(c=`${location.protocol}${c}`);b=new URL(c);b.search="";return(new URL(a,b)).toString()};_.Rm=function(a){if(!a)return null;a=(new _.rm(a)).a.pathname.split("/");if(1>a.length)return null;a=a.pop().split(".");return 1>=a.length?null:a.pop().toLowerCase()};Tm=function(a,b){const c=Sm[a];for(const d of c)for(const e of b)if(d.test(e.trim()))return e.trim();return a===_.K?"":null};
141
+ _.Um=function(a,b){b&&(a+=';codecs\x3d"'+b+'"');return a.replace(/\s/g,"")};_.Vm=function(a){return a.split(";")[0]};_.Wm=function(a){a=a.split(/\s*;\s*/);a.shift();return(a=a.find(b=>b.startsWith("codecs\x3d")))?a.split("\x3d")[1].replace(/^"|"$/g,"").split(/\s*,\s*/).join(","):""};
142
+ _.$m=function(){var a=Infinity;navigator.connection&&navigator.connection.saveData&&_.$i()&&(a=360);const b=_.sk();b.maxAttempts=3;a={source:"",license:Xm,viewerId:void 0,autoplay:void 0,pauseWhenInBackground:!1,ads:{hls:{enable:!0,resolutionOffsetSec:35}},manifest:{attemptParameters:_.sk(),availabilityWindowOverride:NaN,clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,autoCorrectDrift:!0,timeline:{version:1,type:void 0}},abr:{enabled:!0,defaultBandwidthEstimate:1E3,switchInterval:8,bandwidthUpgradeTarget:.85,
143
+ bandwidthDowngradeTarget:.95,useSwitchIntervalForInitialSwitch:!1,restrictions:Ym(a),useCmsd:!0},contentSteering:{enabled:!0,attemptParameters:_.sk()},drm:null,cmcd:{enabled:!1,version:1,rtpMultiplier:5,deliveryMode:"headers"},enableHtmlCue:!0,preferredAudioLanguage:"",preferredTextLanguage:"",preferredAudioRole:_.we,preferredTextRole:"",preferredAudioChannelCount:2,preferredAudioCodec:[],preferredVideoCodec:[],preferSpatialAudio:!1,preferForcedSubtitles:!1,volume:null,startTime:null,loop:!1,lowLatencyMode:!1,
144
+ suggestedPresentationDelay:void 0,muted:void 0,forceWaitForTracks:!1,xmlParser:_.Zm,streaming:{attemptParameters:b,bufferingGoal:10,rebufferingGoal:2,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,relativeTextTimestamp:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,disableAudioTracks:!1,disableVideoTracks:!1,smallGapLimit:.5,jumpLargeGaps:!0,gapTolerance:.001,durationBackoff:1,maxSegmentToMediaOffset:1,forceNativeTS:!1,preferNativeHlsOnSafari:!0,safeSeekOffset:5,stallEnabled:!0,
145
+ stallThreshold:3,stallSkip:.5,bufferLimitUpdateInterval:.5,overridePasp:!1,enableLiveEdgeChasing:!1,chasingRate:1.15,startChasingAt:5,stopChasingAt:2,chaseJumpDistance:10,patchEdgeWhenMixedContent:!1,ignoreDrift:!1,disableFragmentSupport:!1,disableMergedFragments:!1,ignoreManagedMediaSourceStreamingHints:!1},mediaSource:{codecSwitchingStrategy:_.rf},restrictions:Ym(),tizen:{sideStreamText:_.Pi(2)},safari:{enableHlsVideoTrackInfo:!1,enableMetadata:!1},mse:{sendPlaybackSessionIdHeader:!1},trickPlay:{speedUpMode:_.Cd,
146
+ preferTrickPlayTracks:!0},playlist:{timeline:"basic",content:_.Fb,cropTimeline:!1},yospace:{enabled:!1},cmsd:{enabled:!0},mediatailor:{enabled:!1,sessionConfig:{}},disableRestrictions:!1,chromecast:{useSenderAbrConfig:!1,useSenderStreamingConfig:!1}};if(_.Pi()||_.Si())a.ads.hls.enable=!1;if(_.Oi("Edge/")||_.Pi())a.streaming.gapDetectionThreshold=.5;_.Si()&&(a.streaming.stallEnabled=!1);_.Ui()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=1,a.streaming.gapDetectionThreshold=
147
+ .02);_.Pi()&&(a.streaming.stallEnabled=!0,a.streaming.stallThreshold=1,a.streaming.stallSkip=0);a.vr={enable:!1,attachMouseListener:!0,fieldOfView:70,sensitivity:1,invertHorizontalControl:!1,invertVerticalControl:!1};return a};Ym=function(a){a=void 0===a?Infinity:a;return{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:a,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity}};
148
+ _.bn=function(a,b){b=void 0===b?{}:b;if(!a)return _.$m();const c=[_.$m()];let d=!1;for(let e of a)null!==e&&void 0!==e&&(_.jh(e)&&(e={source:e}),e.lowLatencyMode&&!d&&(c.push({streaming:{rebufferingGoal:.1,bufferLimitUpdateInterval:.01,attemptParameters:{maxAttempts:3,baseDelay:250,backoffFactor:1}},abr:{bandwidthUpgradeTarget:.6,bandwidthDowngradeTarget:.95},manifest:{lowLatencyMode:!0}}),d=!0),c.push(e),b.Mi||null==e.suggestedPresentationDelay||c.push({manifest:{suggestedPresentationDelay:e.suggestedPresentationDelay}}));
149
+ a=_.ch.apply(null,c);_.jh(a.volume)&&(""===""+a.volume?a.volume=null:a.volume=Number(a.volume));if(!_.z(a.volume)&&(!_.kh(a.volume)||mh(a.volume)))throw new _.I(_.D,7,7100,"config.volume is not a number");if(!_.z(a.preferredTextLanguage)&&!_.jh(a.preferredTextLanguage)&&!Array.isArray(a.preferredTextLanguage))throw new _.I(_.D,7,7100,"config.preferredTextLanguage is not a string or an array");if(!_.z(a.preferredAudioLanguage)&&!_.jh(a.preferredAudioLanguage)&&!Array.isArray(a.preferredAudioLanguage))throw new _.I(_.D,
150
+ 7,7100,"config.preferredAudioLanguage is not a string or an array");if(!_.z(a.preferredAudioCodec)&&!_.jh(a.preferredAudioCodec)&&!Array.isArray(a.preferredAudioCodec))throw new _.I(_.D,7,7100,"config.preferredAudioCodec is not a string or an array");if(!_.z(a.preferredVideoCodec)&&!_.jh(a.preferredVideoCodec)&&!Array.isArray(a.preferredVideoCodec))throw new _.I(_.D,7,7100,"config.preferredVideoCodec is not a string or an array");if(!_.z(a.drm)){if(a.drm.env&&!_.jh(a.drm.env))throw new _.I(_.D,7,
151
+ 7100,"config.drm.env is not a string");if(a.drm.offlineId&&!_.jh(a.drm.offlineId))throw new _.I(_.D,7,7100,"config.drm.offlineId is not a string");}if(b=a.streaming){b.bufferingGoal=Number(b.bufferingGoal);b.rebufferingGoal=Number(b.rebufferingGoal);b.bufferBehind=Number(b.bufferBehind);b.smallGapLimit=Number(b.smallGapLimit);b.durationBackoff=Number(b.durationBackoff);if(!_.kh(b.bufferingGoal)||mh(b.bufferingGoal))throw new _.I(_.D,7,7100,"config.streaming.bufferingGoal is not a number");if(!_.kh(b.rebufferingGoal)||
152
+ mh(b.rebufferingGoal))throw new _.I(_.D,7,7100,"config.streaming.rebufferingGoal is not a number");if(b.rebufferingGoal>b.bufferingGoal)throw new _.I(_.D,7,7100,"config.streaming.rebufferingGoal must be \x3e\x3d bufferingGoal");if(!_.kh(b.bufferBehind)||mh(b.bufferBehind))throw new _.I(_.D,7,7100,"config.streaming.bufferBehind is not a number");if(!_.kh(b.smallGapLimit)||mh(b.smallGapLimit))throw new _.I(_.D,7,7100,"config.streaming.smallGapLimit is not a number");if(!_.kh(b.durationBackoff)||mh(b.durationBackoff))throw new _.I(_.D,
153
+ 7,7100,"config.streaming.durationBackoff is not a number");b=a.manifest;if(_.z(b.availabilityWindowOverride))b.availabilityWindowOverride=NaN;else if(typeof b.availabilityWindowOverride!==_.r)throw new _.I(_.D,7,7100,"Invalid value for |manifest.availabilityWindowOverride|");an(a.restrictions);an(a.abr.restrictions);a.abr.initialRestrictions&&an(a.abr.initialRestrictions)}return a};
154
+ an=function(a){_.z(a.maxPixels)&&(a.maxPixels=Infinity);_.z(a.maxBandwidth)&&(a.maxBandwidth=Infinity);_.z(a.maxHeight)&&(a.maxHeight=Infinity);_.z(a.maxWidth)&&(a.maxWidth=Infinity);_.z(a.minPixels)&&(a.minPixels=0);_.z(a.minBandwidth)&&(a.minBandwidth=0);_.z(a.minHeight)&&(a.minHeight=0);_.z(a.minWidth)&&(a.minWidth=0);a.minWidth=Number(a.minWidth);a.maxWidth=Number(a.maxWidth);a.minHeight=Number(a.minHeight);a.maxHeight=Number(a.maxHeight);a.minBandwidth=Number(a.minBandwidth);a.maxBandwidth=Number(a.maxBandwidth);
155
+ a.minPixels=Number(a.minPixels);a.maxPixels=Number(a.maxPixels);if(Number.isNaN(a.minWidth)||Number.isNaN(a.maxWidth)||Number.isNaN(a.minHeight)||Number.isNaN(a.maxHeight)||Number.isNaN(a.minBandwidth)||Number.isNaN(a.maxBandwidth)||Number.isNaN(a.minPixels)||Number.isNaN(a.maxPixels))throw new _.I(_.D,7,7100,"Restrictions contain NaN");};cn=function(a){return typeof a===_.He&&!Array.isArray(a)&&"source"in a};
156
+ dn=function(a){if(!a)return null;a=(new _.rm(a)).a.pathname.toUpperCase();return a.endsWith(".MPD")?_.xc:a.endsWith(".M3U8")?_.ul:a.endsWith(".MP4")?_.zg:a.endsWith(".MP3")?"audio/mp3":a.endsWith("MANIFEST")||a.endsWith(".ISM")?_.Cc:null};_.fn=function(a){let b;cn(a)?b=a.source:b=a;Array.isArray(b)||(b=[b]);b=b.filter(c=>typeof c===_.Tf||"url"in c);a=[];for(let c=0;c<b.length;c++){const d=en(b[c]);d&&a.push(d)}return a};
157
+ en=function(a){let b=null;_.jh(a)&&(a={url:a});typeof a===_.He&&!Array.isArray(a)&&"url"in a&&(b={url:a.url,type:a.type?a.type:null},_.z(a.drmProtected)||typeof a.drmProtected!==_.Nc||(b.drmProtected=a.drmProtected),_.z(a.isLive)||typeof a.isLive!==_.Nc||(b.isLive=a.isLive),_.z(a.name)||typeof a.name!==_.Tf||(b.name=a.name),_.z(a.ac)||typeof a.ac!==_.Tf||(b.ac=a.ac),_.z(a.ab)||typeof a.ab!==_.Tf||(b.ab=a.ab));b&&!b.type&&(b.type=dn(a.url),b.type?gn.debug("Detect media type "+b.type+" for "+a.url):
158
+ gn.warn("Unable to detect media type for "+a.url));return b};hn=function(a,b){a.onError(b);a.release().then(()=>a.destroy())};_.kn=function(a){_.jn[a.I]=a};
159
+ _.mn=function(a){const b={attemptParameters:_.sk(),enforceSingleSession:!1,delayLicenseRequestUntilPlayed:!1,enableSessionCacheForSkd:!1,ignoreUnrecognizedInitData:!0,Ja:{},widevineVersion:_.wd};if(a&&(b.enforceSingleSession=!!a.enforceSingleSession,b.delayLicenseRequestUntilPlayed=!!a.delayLicenseRequestUntilPlayed,b.preferredDrmSystem=a.preferredDrmSystem,b.emeApi=a.emeApi,a.attemptParameters&&(b.attemptParameters=a.attemptParameters),b.enableSessionCacheForSkd=!!a.enableSessionCacheForSkd,void 0!==
160
+ a.ignoreUnrecognizedInitData&&(b.ignoreUnrecognizedInitData=!!a.ignoreUnrecognizedInitData),typeof a.widevineVersion===_.Tf&&0<a.widevineVersion.length&&(b.widevineVersion=a.widevineVersion),a.env)){const c=_.jn[a.env]||null;if(!c)throw _.xh(_.ua,_.jb+a.env+_.aa),new _.I(_.D,6,6015,`DRM environment '${a.env}' is missing.`);b.Ja=_.ln(c,a.customData)||{};_.ui(a.env.toLowerCase(),Rd)&&(b.enforceSingleSession=!0)}return b};
161
+ on=function(a){var b=nn;const c={kty:"RSA",n:b.n,e:b.e},d=a.h+"."+a.f,e=a.j;return new Promise(function(f,g){let h;try{h=window&&window.crypto&&window.crypto.subtle}catch(l){}if(h){var k={name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};h.importKey("jwk",c,k,!1,["verify"]).then(function(l){const m=_.ri(d),n=_.bm(e);return h.verify(k,l,n.buffer,m.buffer)}).then(function(l){l?f():g(new _.ql("Signature Verification failed",jg))}).catch(g)}else f()})};
162
+ qn=function(a){if(!a.a){var b=a.f.split(".");if(3!==b.length)throw Error("Expected to find 3 data sections in JWT raw data");b=new pn(b[0],b[1],b[2]);a.a=b}return a.a};rn=function(a){return _.w(function*(){var b=qn(a);try{yield on(b)}catch(c){if(c&&c.code===jg)throw c;b=new _.rm(window.location.href);if(!/(^127\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^192\.168\.)|(^localhost)/.test(b.a.hostname))throw c;}})};
163
+ sn=function(a){switch((a.ha[0]||{src:"",type:""}).type){case _.xc:a="dash";break;case _.Cc:a="ss";break;case _.ul:a="hls";break;case _.zg:a="mp4";break;default:a=""}return a};tn=function(a){return a.viewerId?a.viewerId:(a=a.drm||null)&&a.customData&&a.customData.userId?`${a.customData.userId}`:""};un=function(a){return(a=a.drm||null)&&a.customData&&a.customData.assetId?`${a.customData.assetId}`:""};
164
+ vn=function(a){return(a=a.drm||null)&&a.customData&&a.customData.sessionId?`${a.customData.sessionId}`:""};wn=function(a){return(a=(a=a.drmInfo)&&a.licenseServerUri||"")?(new _.rm(a)).a.hostname:""};xn=function(a){const b=a.configuration;let c="no";b.drm&&!_.lh(b.drm,{})&&(c="custom",b.drm.env&&b.drm.env.toLowerCase().startsWith(Rd)||wn(a).endsWith("drmtoday.com"))&&(c=Rd);return c};
165
+ yn=function(a){a=a.drmInfo;let b="";if(a)switch(a.keySystem){case _.wd:b="wv";break;case _.ud:b="pr";break;case _.sd:b="fps"}return b};zn=function(a){a=a.drmInfo;let b=!1;a&&(b=a.persistentStateRequired);return b.toString()};An=function(a){a=a.drmInfo;let b="";if(a)switch(a.videoRobustness){case Ha:case Fa:b="L1";break;case Ga:b="L2";break;case _.pb:case _.ob:b="L3"}return b};
166
+ Fn=function(a,b){const c="ie"===_.mj().browser;var d=b.configuration;const e=[...Array.from(_.Jh.keys()),...b.Mg];b={"CL-KEY":a.f,"CL-LOCATION":window.location.href,"CL-SDK-VERSION":_.ea,"CL-USER-ID":tn(d),"CL-ASSET-ID":un(d),"CL-SESSION-ID":vn(d),"CL-PLAYBACK-TYPE":b.isLive?Bn:Cn,"CL-CONTENT-TYPE":sn(b),"CL-PLUGINS":e.join(" "),"CL-DRM":xn(b),"CL-DRM-CDM":yn(b),"CL-DRM-SEC-LEVEL":An(b),"CL-DRM-OFFLINE":zn(b),"CL-DRM-IP":wn(b)};Dn&&Dn.companionSdk&&(Dn.companionSdk.name&&(b["CL-COMPANION-SDK"]=Dn.companionSdk.name),
167
+ Dn.companionSdk.version&&(b["CL-COMPANION-SDK-VERSION"]=Dn.companionSdk.version));c&&(d=window.localStorage.getItem("cl_et"))&&(b["CL-ETAG"]=d);d=_.wk(["https://downloads.castlabs.com/r/register/"]);d.method="GET";d.headers=b;return(new _.En).fetch(d).U.then(f=>{200===f.status&&c&&window.localStorage.setItem("cl_et",f.headers.etag);return Promise.resolve()}).catch(f=>{a:{var g=qn(a);f=f.data;var h=f.status;if(g.a&&g.a.ilv)g=Promise.resolve();else{switch(h){case 403:case 404:g=7101;var k="Castlabs Player license is invalid";
168
+ if(403===h){h=k;k="";try{k=JSON.parse(decodeURIComponent(f.responseText)).message}catch(l){}f=k;f=h+(": "+f)}else f=k+"!";k=f;break;case 412:g=7103;k="License requires a viewer ID. It should be supplied either via the `viewerId` config or in case of DRMtoday via the `drm.customData.userID` config.";break;default:g=Promise.resolve();break a}a.g.error(La+k);g=Promise.reject(new _.I(_.D,7,g,k))}}return g})};
169
+ _.Hn=function(a){var b=(a||"").split("-");a=b[0]||"";b=b[1]||"";a=a.toLowerCase();a=Gn.get(a)||a;return(b=b.toUpperCase())?a+"-"+b:a};_.In=function(a,b){a=_.Hn(a);b=_.Hn(b);return a.split("-")[0]===b.split("-")[0]};
170
+ Mn=function(a){try{const b=a.split(",").map(c=>{const d={};c=c.split(";");for(let e=0;e<c.length;e++){const {key:f,value:g}=Jn(c[e]);Object.keys(Kn).includes(f)&&(d[Kn[f]]=g)}return d}).filter(c=>_.fh(c));return 0<b.length?b:null}catch(b){return Ln.error("CmsdManager parseCmsdDynamicHeader_ failed:",b),null}};
171
+ Jn=function(a){var b=a.split("\x3d");const c=b[0];b=b[1];if(!c)throw new _.ql("Parsing CMSD, missing parameter or wrong format");if(c&&!b)return{key:c,value:!0};const d=b[0];if('"'===d&&'"'===b[b.length-1])return{key:c,value:b.replaceAll(/(^")|("$)/g,"")};if(/^[-0-9]/.test(d))return{key:c,value:parseInt(b,10)};if(/^[a-zA-Z*]/.test(d))return{key:c,value:b};throw new _.ql(`Parsing CMSD, not recognized value type of ${a}`);};
172
+ On=function(a){return b=>{{var c=b.headers;let e=b=null;var d=ph(c,"cmsd-dynamic");c=ph(c,"cmsd-static");d&&(b=Mn(d),a.a=b);if(c)try{d={};const f=c.split(",");for(c=0;c<f.length;c++){const {key:g,value:h}=Jn(f[c]);Object.keys(Nn).includes(g)&&(d[Nn[g]]=h)}e=_.fh(d)?d:null}catch(f){Ln.error("CmsdManager parseCmsdStaticHeader_ failed:",f),e=null}(b||e)&&a.m.trigger(new _.H("cmsd-event",{vj:b,Hj:e}))}}};_.Qn=function(a){a&&(0<=Pn.indexOf(a)||Pn.push(a))};
173
+ Sn=function(a){if(!a.h&&a.A&&a.a&&a.f.ads.hls.enable&&a.getTimelineCues().some(b=>_.gk(b.schemeIdUri))){const b=a.f.mse.sendPlaybackSessionIdHeader?a.F:null;a.h=new Rn;a.h.o(a.a,a.A,b)}};Un=function(a,b){a.H=new Tn(b);rn(a.H).catch(c=>{setTimeout(()=>{a.g.error(La+c);a.trigger(new _.H(_.Xd,{detail:new _.I(_.D,7,7101)}));a.destroy()},1E3)})};Wn=function(a,b){a.Y=b;for(const c of a.Y)(b=c.id())&&(a.K[b]=c);_.Vn(a,"onPlayerCreated")};
174
+ _.Xn=function(a,b,c){c=void 0===c?null:c;null!=b&&b===a.a?a.a.forwardEventsTo(a):(a.a&&(a.a.stopForwardingEventsTo(a),a.a.destroy(),a.a=null,a.A=null),b&&(b.init(a.j,a.C),b.setNetworkEngine(a.getNetworkEngine()),b.forwardEventsTo(a),a.a=b,a.A=c))};
175
+ Yn=function(a,b){_.w(function*(){a.j.getMedia()||a.j.getCastElement();a.H||(a.H=new Tn(a.f.license));try{a.g.debug("Verifying license remotely"),yield Fn(a.H,b),a.g.debug("License verified remotely")}catch(c){a.g.debug("License rejected by remote",c),setTimeout(hn,1E3,{release:a.release.bind(a),destroy:a.destroy.bind(a),onError:a.onError.bind(a)},c)}})};_.Vn=function(a,b,...c){if(!a.ba)return Promise.resolve();const d=a.Y.map(e=>e[b].call(e,a,...c)).filter(e=>e instanceof Promise);return Promise.all(d)};
176
+ Zn=function(a){return _.w(function*(){if(a.R)return a.g.debug("The player is already released. No-op"),new Promise(b=>b());a.ca.off(document,_.Dg);a.trigger(new _.H(_.xf));a.j&&a.j.release();a.h&&(yield a.h.j(),a.h=null);a.B&&(yield a.B.release(),a.B=null);if(a.a){let b=null;const c=a.a.on(_.Qf,d=>{b=d});return _.Vn(a,_.Me).then(()=>{a.a.stopForwardingEventsTo(a);return Promise.all([a.a.release(),a.I.release()])}).then(()=>{a.g.debug("Releasing player completed");b&&(a.g.debug("Re-post state change event after release"),
177
+ a.trigger(b))}).finally(()=>{a.a.off(_.Qf,c);a.trigger(new _.H(wf))})}a.trigger(new _.H(wf));return new Promise(b=>b())})};$n=function(a){a.F&&(a.g.info("Playback session ended, ID:",a.F),a.F=null,a.a&&a.a.setPlaybackSessionId(null))};ao=function(a,b){const c=Ch(d=>d.f(_.db)&&a.every(e=>2===d.canPlay(e,b)));if(!c)throw new _.I(_.D,7,7003,"No compatible player implementing playlist mode found!");return{bb:c,player:c.create(),sourceIndex:0}};
178
+ co=function(a,b,c){if(a.M===_.db)b=ao(b,c);else if(2!==(a.a?a.a.canPlay(b[0],c):0)||a.T){a.T=!1;if(b){var d=a=null;for(var e=0;e<b.length;e++);e=Object.values(_.zh);for(let f=0;f<b.length;f++)for(let g=0;g<e.length;g++){const h={bb:e[g],confidence:e[g].canPlay(b[f],c)};if(null===a||a.confidence<h.confidence)a=h,d=f}a&&typeof d===_.r&&0<a.confidence?(_.Ah.debug("Player Factory '"+a.bb.a()+"' can play",b[d]),b=new bo(a.bb,d)):(_.Ah.debug("No compatible Player Factory found for sources:",b),b=null)}else b=
179
+ null;if(!b)throw new _.I(_.D,7,7003,"No player factory compatible with given sources found!");c=b.bb;a=c.create();b={bb:c,player:a,sourceIndex:b.sourceIndex}}else b={bb:a.A,player:a.a,sourceIndex:0};return b};
180
+ _.io=function(a,b,c){return _.w(function*(){if(a.P)throw new _.I(_.D,7,7E3,"Player is already destroyed.");if(!a.j)throw new _.I(_.D,7,7E3,"No surface associated with this player!");_.wm(bf);yield a.release();var d=c||_.fn(b);if(!b||0===d.length)throw new _.I(_.D,7,7003,Wa);a.ga=d;a.f=_.bn([a.C,b,{source:d}]);a.R=!1;d=co(a,d,a.f);_.Xn(a,d.player,d.bb);eo(a,a.a);a.a&&a.a.setSourceIndex(d.sourceIndex);fo(a);a.a&&a.a.setCdnErrorCallback(a.L);_.go(a,a.f);ho(a);if(a.f.pauseWhenInBackground)a.ca.on(document,
181
+ _.Dg,()=>{document.hidden?(a.g.debug("Player is hidden: pausing..."),a.pause()):(a.g.debug("Player is visible: resuming..."),a.play())});Qh(a);yield _.Vn(a,"onContentWillLoad",a.f.source[d.sourceIndex]);_.wm(af);_.ym("player.beforeLoad",bf,af)})};_.jo=function(a){return _.w(function*(){a.j.getMedia()||a.j.getCastElement();a.trigger(new _.H(ve));yield Promise.all([a.a.load(a.f),a.h?a.h.load():Promise.resolve()])})};
182
+ _.lo=function(a){return _.w(function*(){_.wm(Ye);Yn(a,{configuration:a.getConfiguration(),ha:a.pg(),drmInfo:a.getDrmInfo(),Mg:Object.keys(a.K),isLive:a.isLive()});ko(a);Rh(a);yield _.Vn(a,_.Je);a.f.autoplay&&(a.h?a.h.l():1)&&(yield a.play());_.wm(Xe);_.ym("player.afterLoad",Ye,Xe)})};mo=function(a){return _.w(function*(){if(a.a){var b=a.a;b.bh?(a.trigger(new _.H(ve)),yield b.bh(),yield _.lo(a)):a.g.warn(kb)}else a.g.warn(gb)})};
183
+ eo=function(a,b){try{var c=crypto.randomUUID()}catch(d){c=xl()}a.g.info("Playback session started, ID:",c);b.setPlaybackSessionId(c);a.F=c};fo=function(a){a.a&&a.a.setDrmCustomDataModifier(b=>_.w(function*(){a.Te&&a.Nc&&(yield a.Nc(b))}))};_.go=function(a,b){if(b=Ih(a,b||a.f))a.h=b.create(a)};ho=function(a){a.f.cmsd.enabled&&(a.B=new no(a),a.a.setCmsdManager(a.B))};
184
+ oo=function(a){const b=_.Zh(a.f.preferredTextLanguage).filter(f=>f),c=a.f.preferForcedSubtitles,d=a.getTrackManager().qa().filter(f=>c?f.kind===_.Zd:f.kind!==_.Zd);if(0===d.length)c&&a.g.warn("Forced subtitles are configured to be preferred, but no forced subtitles are available.");else{if(c&&0===b.length){var e=a.getTrackManager().pa();e&&e.language?(e=_.Hn(e.language||""),b.push(e)):(e=a.getTrackManager().Fa())&&e.language&&(e=_.Hn(e.language||""),b.push(e));0===b.length&&a.g.warn("Forced subtitles are configured to be preferred, but neither the preferred text language is set, nor the audio or video track language is available to determine which forced subtitles language to select.")}b.some(f=>
185
+ {const g=_.Hn(f);if(f=d.find(h=>{h=_.Hn(h.language||"");return _.In(h,g)}))return a.getTrackManager().Ta(f),!0;c&&a.g.warn("Forced subtitles are configured to be preferred, but no forced subtitles match the preferred languages: ",b);return!1})}};ko=function(a){_.w(function*(){const b=[];if(a.f.remoteTextTracks)for(const c of a.f.remoteTextTracks)b.push(a.getTrackManager().addTextTrack(c));yield Promise.all(b);oo(a)})};ro=function(a,b){return _.w(function*(){yield po(a,()=>Promise.all(qo(a).map(b)))})};
186
+ so=function(a,b){_.w(function*(){yield po(a,()=>Promise.all(a.f.filter(c=>null!=c.getLoadedSource()).map(b)))})};qo=function(a){return[a.Cc,...a.f].filter(b=>null!=b)};po=function(a,b){return _.w(function*(){a.a&&(yield a.a);a.a=b().then(()=>{a.a=null})})};uo=function(a){return to(a).filter(b=>b.type===td&&!b.ff)};vo=function(a){a.forEach(b=>{b.ff=!0})};zo=function(a,b){a=a.map(c=>({startTime:c.startTime,endTime:c.endTime,key:c.value.key,value:c.value.data,vg:!1}));a=wo(a);b&&(a=xo(a));return new Set(yo(a))};
187
+ to=function(a){const b=[];for(const c of a)b.push(c);return b};Ao=function(a,b){const c=a.endTime-a.startTime,d=b.endTime-b.startTime,e=a.cg||a.startTime,f=b.cg||b.startTime;return(Infinity===c&&Infinity===d||.01>Math.abs(c-d))&&.5>Math.abs(e-f)&&a.value.key===b.value.key&&a.value.data===b.value.data};yo=function(a){const b=[];for(const c of a)(a=b.find(d=>d.startTime===c.startTime&&d.endTime===c.endTime))?Bo(c,a):(a=Co(c),b.push(a));return b};
188
+ Bo=function(a,b){if(a.key.startsWith("X-"))b.customAttributes||(b.customAttributes={}),b.customAttributes[a.key]=a.value,"X-CUSTOM-ID"===a.key&&(b.id=a.value);else if("SCTE35-OUT"===a.key||"SCTE35-IN"===a.key)b.schemeIdUri=_.rg,b.type=_.Gf};Co=function(a){var b=a.startTime;const c=a.endTime;b={schemeIdUri:"",value:"",startTime:b,endTime:c,id:`T${b.toFixed(2)}-${c.toFixed(2)}`,type:_.de,eventElement:null};Bo(a,b);return b};
189
+ wo=function(a){const b=new Set(a),c=new Set(a.filter(d=>"SCTE35-OUT"===d.key).map(Do));a.filter(d=>"SCTE35-IN"===d.key).forEach(d=>{c.has(Do(d))||(d.vg=!0)});return Array.from(b.values())};xo=function(a){a.forEach(b=>{b.vg&&(b.endTime=b.startTime,b.startTime=0)});return a};Do=function(a){return`${a.startTime}-${a.endTime}`};
190
+ Io=function(a,b){a.g.debug("onMetadataTrackAdded_()");b.mode=_.ce;var c=!b.cues||0===b.cues.length;if(a.m.isLive()||!c){var d=b.cues;c=uo(d);vo(c);a.a=zo(c,a.l);0<a.a.size&&(Eo(a,a.a),a.m.trigger(new _.H(_.eg)));a.j.on(b,_.Bd,()=>{{const l=a.m.getPosition();for(const m of a.a){var e,f=a,g=m,h=l;if(Infinity===g.endTime){if(e=!f.f.has(g)){e=g.startTime;var k=e+.5;e=e<=h&&h<=k}e&&(f.f.add(g),f.m.trigger(new _.H(_.cg,{detail:g})))}else h=g.startTime<=h&&h<=g.endTime,!h&&f.f.has(g)?(f.f.delete(g),f.m.trigger(new _.H(_.dg,
191
+ {detail:g}))):h&&!f.f.has(g)&&(f.f.add(g),f.m.trigger(new _.H(_.cg,{detail:g})))}}});a.m.isLive()&&(a.h=setInterval(()=>{if(b.cues){var e=a.m.getSeekRange().start;var f=[];for(var g of b.cues)g.endTime<e&&f.push(g);Fo(a,b,f);0<f.length&&a.g.debug(`Evicted ${f.length} old cues.`);for(var h of a.a)h.endTime<e&&a.a.delete(h);e=0<f.length}else e=!1;Go(a,b);f=uo(d);var k=zo(f,a.l);g=new Set;h=!1;for(l of k)(k=Ho(a,l))?(l.customAttributes&&(k.customAttributes=_.ch(k.customAttributes||{},l.customAttributes)||
192
+ void 0),h=!0):(a.a.add(l),g.add(l));var l={ri:g,uh:0<g.size||h};const {ri:m,uh:n}=l;vo(f);(e||n)&&a.m.trigger(new _.H(_.eg));Eo(a,m)},6E3))}};Jo=function(a,b){a.j.on(b,_.oc,c=>{c=c.track;c.kind===_.Ae&&Io(a,c)})};Eo=function(a,b){for(const c of b)a.m.trigger(new _.H(_.bg,{detail:c}))};Ho=function(a,b){return Array.from(a.a.values()).find(c=>b.startTime===c.startTime&&b.endTime===c.endTime)||null};
193
+ Go=function(a,b){if(b.cues){var c=to(b.cues).filter(f=>f.type===td),d=c.filter(f=>f.ff);c=c.filter(f=>!f.ff);var e=[];for(const f of c)for(const g of d)Ao(f,g)&&(e.push(f),g.cg=f.startTime);Fo(a,b,e);0<e.length&&a.g.debug(`Removed ${e.length} duplicated cues.`)}};Fo=function(a,b,c){for(const d of c)try{b.removeCue(d)}catch(e){a.g.debug("Failed to remove cue",d,e)}};
194
+ Ko=function(a,b){b=b.track;b.kind!==_.Ae&&(b.mode===_.Jf&&(b.mode=_.ce),a.a.on(b,_.Bd,c=>{c=c.target||c.srcElement;c.mode=_.ce;c.activeCues&&(c=Array.from(c.activeCues).map(a.o),a.l.append(c,[]))}))};_.L=function(a,b,c,d){d=void 0===d?{}:d;a=a.getAttribute(b);if(!a&&d.required)throw new _.I(_.D,4,4023,`Required attribute missing: ${b}`);return a?a.value:c||null};Lo=function(a,b){3===b.type&&(a.f&&(a.g.debug("Attaching tracking token"),b.headers[Ng]=a.f),a.a&&(b.headers[Og]=a.a))};
195
+ Mo=function(a,b){return b.request&&3===b.request.type&&(a.f=b.headers[Ng],a.a=b.headers[Og],b=b.headers["x-dt-csl-renewal-info"],a.f&&a.g.debug("Loaded tracking token "+a.f),a.a&&a.g.debug("Loaded followup token "+a.a),b)?(a=JSON.parse(_.ni(_.bm(b))),{delay:a.renewalPeriod,lj:{maxAttempts:a.retryCount,baseDelay:1E3*a.retryPeriod,backoffFactor:1,fuzzFactor:0,timeout:0}}):null};
196
+ _.Oo=function(a){a=No[a];if(!a)return null;const b=_.mj();return b.os===fj&&4===b.osVersion.major&&4===b.osVersion.minor?null:new Uint8Array(a)};_.Po=function(a,b){return void 0===a?b:null===a?null:typeof a===_.Tf?_.Oo(a):a};
197
+ _.ln=function(a,b){const c={};var d=b?b.widevineVideoRobustness:void 0;const e=b?b.widevineAudioRobustness:void 0,f=b?b.serverCertificate:void 0;let g=a.f[_.wd];g&&(c[_.wd]={licenseUrl:g.licenseUrl,videoRobustness:Mm(d,g.videoRobustness),audioRobustness:Mm(e,g.audioRobustness),modifiers:g.modifiers,distinctiveIdentifierRequired:Lm(b?b.widevineDistinctiveIdentifierRequired:void 0,g.distinctiveIdentifierRequired,!1),persistentStateRequired:Lm(b?b.widevinePersistentStateRequired:void 0,g.persistentStateRequired,
198
+ !1),serverCertificate:_.Po(f,g.serverCertificate)});(g=a.f[_.sd])&&(c[_.sd]={licenseUrl:g.licenseUrl,certificateUrl:g.certificateUrl,modifiers:g.modifiers});d=b?b.playReadyVideoRobustness:void 0;b=b?b.playReadyAudioRobustness:void 0;(g=a.f[_.ud])&&(c[_.ud]={licenseUrl:g.licenseUrl,videoRobustness:d||g.videoRobustness,audioRobustness:b||g.audioRobustness,individualizationServer:g.individualizationServer,useLegacySystem:g.useLegacySystem,modifiers:g.modifiers});return c};
199
+ _.Qo=function(){throw new _.I(_.D,3,3E3);};_.Ro=function(a,b,c){const d=c||0;c=b.byteLength-d;const e=_.G(a.f.buffer);b=_.G(b.buffer,d,c);try{e.set(b,a.a),a.a+=c}catch(f){_.Qo()}};_.M=function(a,b){try{a.f.setUint32(a.a,b,a.h),a.a+=4}catch(c){_.Qo()}};_.So=function(a){return a.a<a.f.byteLength};_.To=function(){throw new _.I(_.D,3,3E3,"Buffer read out of bounds.");};_.Uo=function(a){try{const b=a.f.getUint8(a.a);a.a+=1;return b}catch(b){_.To()}};
200
+ _.Vo=function(a){try{const b=a.f.getUint16(a.a,a.h);a.a+=2;return b}catch(b){_.To()}};_.N=function(a){try{const b=a.f.getUint32(a.a,a.h);a.a+=4;return b}catch(b){_.To()}};_.Wo=function(a){try{const b=a.f.getInt32(a.a,a.h);a.a+=4;return b}catch(b){_.To()}};_.Xo=function(a){let b=0,c=0;try{!0===a.h?(b=a.f.getUint32(a.a,!0),c=a.f.getUint32(a.a+4,!0)):(c=a.f.getUint32(a.a,!1),b=a.f.getUint32(a.a+4,!1))}catch(d){_.To()}if(2097151<c)throw new _.I(_.D,3,3001);a.a+=8;return c*Math.pow(2,32)+b};
201
+ Yo=function(a,b){const c=new Uint8Array(b);for(let d=0;d<b;d++)c[d]=_.Uo(a);return c};_.Zo=function(a,b){a.a+b>a.f.byteLength&&_.To();var c=a.a+a.f.byteOffset;c=a.f.buffer.slice(c,c+b);a.a+=b;return _.G(c)};$o=function(a){let b=0;for(let c=0;c<a.length;c++)b=b<<8|a.charCodeAt(c);return b};_.ap=function(a){return String.fromCharCode(a>>24&255,a>>16&255,a>>8&255,a&255)};_.bp=function(a){for(;_.So(a.reader)&&!a.parser.a;)a.parser.te(a.start+a.headerSize,a.reader,a.partialOkay)};
202
+ _.cp=function(a){for(let b=_.N(a.reader);0<b&&!a.parser.a;--b)a.parser.te(a.start+a.headerSize,a.reader,a.partialOkay)};_.dp=function(a){return b=>{const c=b.reader.Oa()-b.reader.getPosition();a(_.Zo(b.reader,c))}};_.ep=function(a){return 8+(a.has64BitSize?8:0)+(null!=a.flags?4:0)};fp=function(a){let b="";try{b=_.qi(a)}catch(c){}return b};_.hp=function(a){a=fp(a);let b="";a.length&&(b=(new _.gp(a)).a);return b};
203
+ jp=function(a){if(!a)return null;let b=null;try{const c=JSON.parse(_.ni(a)),d=_.bm(c.sinf[0]);(new _.ip).N(_.Mf,_.bp).N("schi",_.bp).N("tenc",e=>{e.reader.skip(6);_.Uo(e.reader)&&(e.reader.skip(1),b=_.dm(_.Zo(e.reader,16)));e.parser.stop()}).parse(d)}catch(c){}return b};
204
+ lp=function(a,b,c){if(!c||!c.byteLength)throw new _.I(_.D,6,6102);let d;typeof b===_.Tf?d=_.si(b,!0):d=b;a=_.si(fp(a),!0);b=new _.kp(12+a.byteLength+d.byteLength+c.byteLength,!0);_.M(b,a.byteLength);_.Ro(b,_.G(a));_.M(b,d.byteLength);_.Ro(b,_.G(d));_.M(b,c.byteLength);_.Ro(b,_.G(c));return _.G(b.buffer)};_.mp=function(a){var b=_.G(a.body);b=_.am(b);a.headers[ta]=Dc;a.body=_.ri("spc\x3d"+b).buffer};
205
+ _.np=function(a){let b;try{b=_.ni(a.data)}catch(c){return}b=b.trim();"\x3cckc\x3e"===b.substr(0,5)&&"\x3c/ckc\x3e"===b.substr(-6)&&(b=b.slice(5,-6));try{const c=JSON.parse(b);c.ckc&&(b=c.ckc);c.CkcMessage&&(b=c.CkcMessage);c.License&&(b=c.License)}catch(c){}a.data=li(_.bm(b))};sp=function(a,b){b=op(b);if(a===_.wd)return b+pp;if(a===_.ud)return b+qp;if(a===_.sd)return b+rp;throw Error("Unknown DRM Key-System '"+a+"'. Can not infer license URL!");};
206
+ _.vp=function(a,b,c,d){d=void 0===d?!0:d;c=a.drm;c&&c.env.startsWith(xa)?c.customData&&(_.up(b,a),a=b.uris[0],d&&c.customData.assetId&&(a+="?assetId\x3d"+encodeURI(`${c.customData.assetId}`),c.customData.variantId&&(a+="\x26variantId\x3d"+encodeURI(`${c.customData.variantId}`)),b.uris[0]=a)):tp.warn(Ta)};
207
+ _.wp=function(a,b){try{const c=_.G(b.data),d=JSON.parse(String.fromCharCode.apply(null,c));tp.debug("Widevine License response",d);const e=atob(d.license),f=new Uint8Array(e.length);for(a=0;a<e.length;++a)f[a]=e.charCodeAt(a);b.data=f.buffer}catch(c){tp.debug("Unable to parse DRMtoday response JSON, assuming the response contained raw data")}};
208
+ _.yp=function(a,b,c){var d=c&&c.customData&&c.customData.fpsContentId;_.vp(a,b,c,!1);b.headers[ta]=Dc;c={spc:_.$l(b.body)};if((a=a.drm)&&a.env.startsWith(ya)&&d){a={};var e=Pm((new _.gp(xp(d))).f);d=e.keyId;if(e=e.assetId)tp.info("Applying assetId from HLS manifest."),a.assetId=e;d&&(tp.info("Applying keyId from HLS manifest."),a.keyId=d);d=a;d.keyId&&(tp.info("Adding keyID to FPS payload:",d.keyId),c.keyId=d.keyId);d.assetId&&(tp.info("Adding assetID to FPS payload:",d.assetId),c.assetId=d.assetId)}b.body=
209
+ _.ti(_.Om(c,!0))};_.zp=function(a,b){tp.debug("Clearing response data");200===b.status&&(a=_.ni(b.data).trim(),"\x3cckc\x3e"===a.substr(0,5)&&"\x3c/ckc\x3e"===a.substr(-6)&&(a=a.slice(5,-6)),b.data=_.bm(a).buffer)};
210
+ _.Ap=function(a,b,c){b=fp(b);c=c&&c.customData?c.customData:{};b=new _.gp(xp(b));const d=Pm(b.f);if(a&&a.drm&&a.drm.customData){var e=a.drm.customData;a=e.assetId;e=e.variantId;a&&_.wi(`${a}`)&&(d.assetId=a,tp.debug("Using assetId from the configuration instead of the value from the HLS manifest."));e&&_.wi(`${e}`)&&(d.variantId=e,tp.info("Using variantId from the configuration instead of the value from the HLS manifest."))}d.keyId?(a=["keyId"],tp.debug("KeyId found in FPS SKD. Removing other parameters")):
211
+ a=["assetId","variantId"];b.f=_.Om(d,!1,a);"/"!==b.path||b.j.includes(`${b.a}/`)||(b.path="");b=_.Nm(b);return c.fpsContentId=b};_.Bp=function(a,b){a=a.drm;if(!a||!a.env.startsWith(xa))tp.warn(Ta);else if(a.customData&&a.customData.merchant&&!a.env.startsWith(ya)){const c=new _.rm(b.uris[0]);let d=c.a.pathname;d.endsWith("/")||(d+="/");d+=a.customData.merchant;c.a.pathname=d;b.uris[0]=c.toString()}};
212
+ Cp=function(a,b,c){_.vp(a,b,c);a=a.drm;a=!(!a||!a.offlineId);c=new _.rm(b.uris[0]);c.a.searchParams.set(_.Te,a.toString());b.uris[0]=c.toString()};op=function(a){if(a===Dp)return"https://lic.drmtoday.com";if(a===Ep)return"https://lic.staging.drmtoday.com";if(a===Fp)return"https://lic-demo.staging.drmtoday.com";if(a===Gp)return"https://lic.test.drmtoday.com";throw Error("Unknown DRMtoday environment '"+a+"'. Can not infer DRMtoday base URL!");};
213
+ xp=function(a){a=a.replace(/assetid/gi,"assetId");a=a.replace(/variantid/gi,"variantId");return a=a.replace(/keyid/gi,"keyId")};_.up=function(a,b){if((b=b.drm)&&b.customData){var c={userId:b.customData.userId,sessionId:b.customData.sessionId,merchant:b.customData.merchant};_.fh(c)&&(a.headers["dt-custom-data"]=btoa(JSON.stringify(c)));(b=b.customData.authToken)&&(a.headers["x-dt-auth-token"]=b)}};
214
+ Ip=function(a){const b={},c=a?a[Pg]:void 0;a=Hp[a?a[Pg]:void 0];c&&(b.drmTodayErrorCode=c);a&&(b.drmTodayErrorMessage=a);return b};Jp=function(a){a=a["x-dt-li"];if(!a)return null;try{const b=JSON.parse(atob(a));a={};b.ti&&(a.requestId=b.ti);b.rpd&&(a.delay=Number(b.rpd)/1E3);return a}catch(b){return tp.warn("Unable to parse DRMtoday License Info header (x-dt-li)",b),null}};Kp=function(a,b){a.size=void 0===b?0:1;a.g.debug("Setting key status to",b);a.a=b};
215
+ Mp=function(a,b,c,d){b===HTMLMediaElement.HAVE_NOTHING||a.readyState>=b?d():(b=Lp.value().get(b),c.one(a,b,d))};
216
+ Np=function(a,b){a.f=b;_.Xh(a.a);if(!b)return Promise.resolve();a.a.on(b,Ud,c=>{_.xh("AppleEmeManager.cancelNativeMediaEncryptedEvent_",c);"MediaEncryptedEvent"in window&&c instanceof MediaEncryptedEvent&&(a.g.info("Cancel native MediaEncryptedEvent when using Apple-prefixed EME"),c.stopImmediatePropagation())});a.a.on(b,Lg,c=>{{a.g.debug("Handle webkitNeedKey event");c=_.G(c.initData);if(_.ki(c).getUint32(0,!0)+4!==c.byteLength)throw new RangeError("Malformed FairPlay init data");c=pi(c.subarray(4),
217
+ !0);c=_.ri(c);const d=new Event(Ud);d.initDataType="skd";d.initData=li(c);a.f.dispatchEvent(d)}});Mp(b,HTMLMediaElement.HAVE_METADATA,a.a,()=>b.webkitSetMediaKeys(a.h));return Promise.resolve()};Op=function(a,b){Kp(a.keyStatuses,b);b=new _.H(ie);a.dispatchEvent(b)};
218
+ Rp=function(a,b){a.a=b;_.Xh(a.f);b&&(a.f.on(b,a.h+"needkey",c=>{{const d=new Event(Ud);d.initDataType=_.Wc;d.initData=li(c.initData);a.a.dispatchEvent(d)}}),a.f.on(b,a.h+"keymessage",c=>{{const e=Pp(a,c.sessionId);if(e){var d=void 0===e.keyStatuses.getStatus();c=new _.H(_.ze,{messageType:d?le:ke,message:c.message});d=e;_.xh("WebkitEmeManager.MediaKeySession.generated");d.f&&(d.f.resolve(),d.f=null);e.dispatchEvent(c)}else _.yh("Session not found",c.sessionId)}}),a.f.on(b,a.h+"keyadded",c=>{(c=Pp(a,
219
+ c.sessionId))&&c.ready()}),a.f.on(b,a.h+"keyerror",c=>{var d=Pp(a,c.sessionId);if(d){{var e=Error("EME v0.1b key error");const f=c.errorCode;f.systemCode=c.systemCode;e.errorCode=f;!c.sessionId&&d.f?(45===c.systemCode&&(e.message="Unsupported session type."),d.f.reject(e),d.f=null):c.sessionId&&d.a?(d.a.reject(e),d.a=null):(e=c.systemCode,c.errorCode.code===MediaKeyError.MEDIA_KEYERR_OUTPUT?Qp(d,_.Re):1===e?Qp(d,"expired"):Qp(d,_.he))}}}))};
220
+ Pp=function(a,b){let c=a.l.get(b);return c?c:(c=a.j.shift())?(c.sessionId=b,a.l.set(b,c),c):null};Qp=function(a,b){Kp(a.keyStatuses,b);b=new _.H(ie);a.dispatchEvent(b)};Sp=function(a,b){return a.w?a.w+b.charAt(0).toUpperCase()+b.slice(1):b};
221
+ Tp=function(a,b,c){if(a.o)return Promise.reject(Error("The session is already initialized."));a.o=!0;let d;try{if(a.l===_.Ue)if(c)d=_.G(_.ri("LOAD_SESSION|"+c));else{const f=_.ri("PERSISTENT|"),g=new Uint8Array(f.byteLength+b.byteLength);g.set(f,0);g.set(_.G(b),f.byteLength);d=g}else d=_.G(b)}catch(f){return Promise.reject(f)}a.f=new _.Hl;const e=Sp(a,"generateKeyRequest");try{a.j[e](a.h,d)}catch(f){if(f.name!==Ja)return a.f=null,Promise.reject(f);(new _.Li(()=>{try{a.j[e](a.h,d)}catch(g){a.f.reject(g),
222
+ a.f=null}})).la(.01)}return a.f};Up=function(a,b,c){if(a.a)a.a.then(()=>Up(a,b,c)).catch(()=>Up(a,b,c));else{a.a=b;if(a.h===Hg){var d=_.ni(c);var e=JSON.parse(d);"oct"!==e.keys[0].kty&&(a.a.reject(Error("Response is not a valid JSON Web Key Set.")),a.a=null);d=_.bm(e.keys[0].k);e=_.bm(e.keys[0].kid)}else d=_.G(c),e=null;var f=Sp(a,"addKey");try{a.j[f](a.h,d,e,a.sessionId)}catch(g){a.a.reject(g),a.a=null}}};
223
+ Xp=function(a,b){var c=Vp;if(a){var d=c.find(e=>e.a()===a);if(d)return Wp.info(Jb+d.a()),d.create();Wp.info("Cannot create selected EME manager, falling back to the default.")}if(b&&(d=c.find(e=>e.a()===b)))return Wp.info(Jb+d.a()),d.create();c=c[0];if(!c)throw Error("Missing EME managers.");Wp.info(Jb+c.a());return c.create()};_.$p=function(a){var b=_.cm(a);b=parseInt(b.byteLength,10).toString(16);b=_.cm("12"+b+a);return new Yp(Zp,a,b)};
224
+ _.bq=function(a){const b=new _.aq(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);a=_.N(b);var c=_.N(b);c=_.ap(c);var d=_.N(b);const e=d>>>24;d&=16777215;var f=_.Zo(b,16);f=_.dm(f);if(0<e){var g=_.N(b);b.skip(16*g)}g=_.N(b);const h=()=>{let u=_.Uo(b),v=(u&127)>>>0,y=7;for(;128<=u&&28>=y;)u=_.Uo(b),v=(v|(u&(28>y?127:15))<<y)>>>0,y+=7;return 28<y?-1:v},k=u=>{switch(u){case 0:do if(!_.So(b))throw Error("not enough data to skip!");while(_.Uo(b)&128);break;case 1:b.skip(8);break;case 2:b.skip(h());
225
+ break;case 3:for(;4!==(u=h()&7);)k(u);break;case 5:b.skip(4);break;default:throw Error("invalid wire type "+u);}},l=[];let m=null;for(;_.So(b);){var n=h(),p=n&7;n>>>=3;if(2===p){p=h();if(0>p)throw Error(`unable to read length of field ${n}`);p=Yo(b,p);2===n?l.push(p):4===n&&(m=p)}else k(p)}_.xh("Parsed WV PSSH Box","size",a,"name",c,vg,e,"flags",d,"size",g,"systemId",f,"contentId (base64)",m?_.$l(m):"","keyIds",l.map(u=>_.dm(u)));return 0<l.length?_.$p(_.dm(l[0])):null};
226
+ _.cq=function(a){const b=[];b.push(a[3]);b.push(a[2]);b.push(a[1]);b.push(a[0]);b.push(a[5]);b.push(a[4]);b.push(a[7]);b.push(a[6]);a=_.G(a);a.set(b,0);return a};
227
+ _.hq=function(a){var b=_.O;a:{var c=new _.aq(new DataView(a.buffer),!0);_.N(c);for(_.Vo(c);_.So(c);)if(1===_.Vo(c)){var d=_.Vo(c);c=_.Zo(c,d);break a}c=null}c||(c=a);a=pi(c,!0);d=b.j(a,"WRMHEADER");a=d.getAttribute(vg)||"";d=b.h(d,"DATA");var e=b.h(d,"LA_URL");b=e?b.f(e):"";var f=_.O;if(e=f.h(d,"KID"))if(e=f.f(e)){var g=f.h(d,oa);f=g?f.f(g):null;e={value:e,Ie:f}}else e=null;else e=null;d=e?[e]:(e=dq(d))?[e]:(d=eq(d))?d:null;const {value:h="",Ie:k}=d&&d[0]||{};d=_.bm(h);d=_.cq(d);d=_.dm(d);return new _.fq(_.gq,
228
+ d,b,c,a,k)};dq=function(a){var b=_.O;a=b.h(a,"PROTECTINFO");if(!a)return null;var c=b.h(a,"KID");if(!c)return null;b=c.getAttribute("VALUE");if(!b)return null;a=c.getAttribute(oa);c=c.getAttribute("ALGID");return{value:b,Ie:a,sh:c}};
229
+ eq=function(a){var b=_.O;a=b.h(a,"PROTECTINFO");if(!a)return null;a=b.h(a,"KIDS");if(!a)return null;a=b.a(a,"KID");if(!a.length)return null;b=[];for(const c of a)if(a=c.getAttribute("VALUE")){const d=c.getAttribute(oa),e=c.getAttribute("ALGID");b.push({value:a,Ie:d,sh:e})}return b.length?b:null};iq=function(a){return _.w(function*(){const b=new Promise(c=>{(new _.Li(c)).la(1)});(yield Promise.race([a.close().then(()=>!0),b.then(()=>!1)]))||_.C("Timeout waiting for session close")})};
230
+ _.kq=function(a){return jq(a)?_.ud:a};lq=function(a,b){const c=[];b.forEach((d,e)=>{c.push({keySystem:e,licenseServerUri:d.licenseUrl,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[]})});for(const d of a)d.drmInfos=c};
231
+ mq=function(a,b){b=b[_.kq(a.keySystem)];a.keyIds||(a.keyIds=[]);b&&(a.distinctiveIdentifierRequired||(a.distinctiveIdentifierRequired=b.distinctiveIdentifierRequired),a.persistentStateRequired||(a.persistentStateRequired=b.persistentStateRequired),a.videoRobustness||(a.videoRobustness=b.videoRobustness||""),a.audioRobustness||(a.audioRobustness=b.audioRobustness||""),a.serverCertificate||(a.serverCertificate=b.serverCertificate||null))};
232
+ _.nq=function(a,b){b=_.Um(a.mimeType,b||a.codecs);if(_.Im(b,a.type)){a=a.type;var c=_.Im(b,a);c&&(c=c(),b=c.convertCodecs(a,b),c.destroy())}return b};oq=function(a){for(const b of a.audioCapabilities||[])delete b.robustness;for(const b of a.videoCapabilities||[])delete b.robustness};qq=function(a){return(a.audioCapabilities||[]).some(pq)||(a.videoCapabilities||[]).some(pq)};
233
+ rq=function(a,b){a=_.hp(b);_.xh("Using default Content ID extractor. The hostname part from HLS #EXT-X-KEY:URI skd:// will be used.","Extracted Content ID: "+a);return a};
234
+ tq=function(a){var {playerConfig:b,initData:c,initDataType:d,drmInfo:e,drmSystemConfig:f,sessionContext:g,emeApi:h}=a;if("skd"===d&&h===sq){a=e.serverCertificate;let k=f&&f.modifiers&&f.modifiers.extractContentId;_.hh(k)||(k=rq);let l="";try{l=k(b,c,g)}catch(m){throw new _.I(_.D,6,6103);}if(!l.length)throw new _.I(_.D,6,6101,"Content ID is an empty string");c=lp(c,l,a)}return c};jq=function(a){return!!a.match(/^com\.(microsoft|chromecast)\.playready/)};
235
+ pq=function(a){return null!=a.robustness&&""!==a.robustness};uq=function(a,b,c,d,e){for(const f of a){b.includes(f.licenseServerUri)||b.push(f.licenseServerUri);f.serverCertificate&&(c.some(g=>_.em(g,f.serverCertificate))||c.push(f.serverCertificate));if(f.initData){for(const g of f.initData)g.periodId=f.periodId;for(const g of f.initData)d.some(h=>h.keyId&&h.keyId===g.keyId&&h.periodId===g.periodId?!0:!1)||d.push(g)}if(f.keyIds)for(a=0;a<f.keyIds.length;++a)e.includes(f.keyIds[a])||e.push(f.keyIds[a])}};
236
+ vq=function(a){var b=a.o;const c=a.ba;c.clear();b.forEach((d,e)=>c.set(e,d));b=Array.from(c.values());b.length&&b.every(d=>"expired"===d)&&a.w(new _.I(_.D,6,6014));a.D.af(_.oh(c));a.A||a.g.info(va);a.A=!0;a.F=!1};wq=function(a){a.h.forEach((b,c)=>{const d=b.Xe;let e=c.expiration;isNaN(e)&&(e=Infinity);e!==d&&(a.D.$e(c.sessionId,e),b.Xe=e)})};
237
+ xq=function(a){return _.w(function*(){a.B.release();a.B=null;a.M.release();a.M=null;a.A=!1;a.F=!1;a.H.reject();a.ca.stop();a.ca=null;a.V.stop();a.V=null;const b=Array.from(a.h.keys());for(const c of a.h.values())c.Mc&&c.Mc.stop();a.h.clear();yield Promise.all(b.map(c=>Promise.resolve().then(()=>_.w(function*(){a.g.debug("Closing session",c.sessionId);try{yield iq(c)}catch(d){a.g.warn("Error while closing session",d)}}))));if(a.C){try{yield a.l.h(null)}catch(c){a.g.warn("Error while resetting media keys",
238
+ c)}a.C=null}a.l=null;a.a=null;a.J.clear();a.I=null;a.L=[];a.f=null;a.w=null;a.D=null;a.R=0;a.P=null})};_.Dq=function(a,b){const c=yq(a,b),d=zq(b);for(const e of d)Aq(a,e,a.f.Ja);b=Bq(a,b);if(!b.size)return a.T=!0,Promise.resolve();_.wm(Hd);a=_.Cq(a,b);return(c?a:a.catch(()=>{})).then(()=>{_.wm(Gd);_.ym("DRM queryMediaKeys_()",Hd,Gd)})};
239
+ _.Fq=function(a,b,c){c=void 0===c?[]:c;a.K=Eq;a.L=c;a.G=0<c.length;a.g.debug("Using Persisted Licenses: "+a.G);a.f&&a.f.enableSessionCacheForSkd&&a.g.info("Enabled session cache for SKD license requests");return _.Dq(a,b)};
240
+ _.Cq=function(a,b){if(1===b.size&&b.has(""))return Promise.reject(new _.I(_.D,6,6E3));null===a.l&&(a.l=Xp(a.f.emeApi,a.$a));for(var c of b.values())0===c.audioCapabilities.length&&delete c.audioCapabilities,0===c.videoCapabilities.length&&delete c.videoCapabilities;let d=c=new _.Hl;const e=_.mj(),f=(k,l,m)=>{l.drmInfos.some(n=>!!n.licenseServerUri)===k&&(d=d.catch(()=>{if(a.j)return null;if(m===_.ud){if((_.Ni()||e.os===hj&&_.Oi("Chrome")&&!_.Ni())&&!a.f.Ja[m].useLegacySystem)return l.label=vd,a.l.a(vd,
241
+ [l]).catch(()=>{a.g.warn("Unable to create com.microsoft.playready.recommendation. Falling back to com.microsoft.playready.");l.label=_.ud;oq(l);return a.l.a(m,[l])});oq(l)}if(m===_.wd&&a.f.widevineVersion!==_.wd){const n=a.f.widevineVersion;if(!n.startsWith(_.wd))return a.g.error(`Invalid "widevineVersion" value "${n}".`),Promise.reject();const p=Object.assign({},l,{label:n,distinctiveIdentifier:_.Pe,persistentState:_.Pe});return a.l.a(n,[p]).catch(()=>a.l.a(m,[l]))}return a.l.a(m,[l]).catch(n=>
242
+ {a:{if(m===_.wd&&qq(l)){const p=_.mj();if(qq(l)&&p.os===fj&&p.browser===$c){a.g.warn("requestMediaKeySystemAccess() failed",n);a.g.warn("Will try to recover by removing the robustness attribute of videoCapabilities and audioCapabilities.");oq(l);n=a.l.a(m,[l]);break a}}throw n;}return n})}))};let g=a.f.preferredDrmSystem;if(!g){var h=_.mj();if(h.os===hj&&10<=h.osVersion.major&&"edge"===h.browser)g=_.ud;else if("safari"===h.browser)g=_.sd;else if(h.browser===$c||"firefox"===h.browser)g=_.wd}g&&(h=
243
+ b.get(g))&&(f(!0,h,g),f(!1,h,g));for(const k of[!0,!1])b.forEach((l,m)=>{m!==g&&f(k,l,m)});d=d.catch(()=>{throw new _.I(_.D,6,6001,"Failed to get MediaKeySystemAccess.");});d=d.then(k=>{if(a.j)return null;a.J.clear();var l=k.getConfiguration();a.g.info("Got MediaKeySystemAccess with configuration",l);var m=l.audioCapabilities||[];l=l.videoCapabilities||[];for(var n of m)a.J.add(n.contentType.toLowerCase());for(var p of l)a.J.add(p.contentType.toLowerCase());{m=k.keySystem;n=b.get(_.kq(k.keySystem));
244
+ p=[];l=[];const u=[],v=[];uq(n.drmInfos,p,l,u,v);1<l.length&&_.C("Multiple unique server certificates found! Only the first will be used.");1<p.length&&_.C("Multiple unique license server URIs found! Only the first will be used.");m={keySystem:m,licenseServerUri:p[0],distinctiveIdentifierRequired:n.distinctiveIdentifier===_.zf,persistentStateRequired:n.persistentState===_.zf,audioRobustness:n.audioCapabilities?n.audioCapabilities[0].robustness:"",videoRobustness:n.videoCapabilities?n.videoCapabilities[0].robustness:
245
+ "",serverCertificate:l[0],initData:u,keyIds:v,periodId:null}}a.a=m;if(!a.a.licenseServerUri)throw new _.I(_.D,6,6012,a.a.keySystem);return k.createMediaKeys()}).then(k=>{a.j||(a.g.info("Created MediaKeys for key system",a.a.keySystem),a.I=k,a.T=!0)}).catch(k=>{if(!a.j){a.a=null;a.J.clear();if(k instanceof _.I)throw k;throw new _.I(_.D,6,6002,{browserError:k.message});}});c.reject();return d};
246
+ Gq=function(a){a=nh(a.f.Ja[_.Qe]||{});if(0===a.size)return null;const b=[],c=[];a.forEach((e,f)=>{f=_.cm(f);e=_.cm(e);e={kty:"oct",kid:_.am(f,!1),k:_.am(e,!1)};b.push(e);c.push(e.kid)});a=JSON.stringify({keys:b});var d=JSON.stringify({kids:c});d=[{initData:_.ri(d),initDataType:"keyids"}];return{keySystem:_.Qe,licenseServerUri:"data:application/json;base64,"+window.btoa(a),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:d,
247
+ keyIds:[],periodId:null}};zq=function(a){const b=[];for(const c of a)for(const d of c.drmInfos)b.push(d);return b};Hq=function(a,b){for(const c of b)""===c.licenseServerUri||a.f.Ja[c.keySystem]||(a.f.Ja[c.keySystem]={licenseUrl:""})};
248
+ yq=function(a,b){const c=b.some(g=>0<g.drmInfos.length);if(!c){var d=nh(a.f.Ja);lq(b,d)}d=a.f.Ja[_.sd];const e=b.some(g=>g.drmInfos.some(h=>h.keySystem===_.sd));if(!1!==a.f.oj&&_.Zi()&&!e&&d)for(var f of b)f.drmInfos.push({keySystem:_.sd,licenseServerUri:d.licenseUrl,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[],periodId:null});if(f=Gq(a))for(const g of b)g.drmInfos=[f];b=zq(b);Hq(a,b);for(const g of b)mq(g,
249
+ a.f.Ja);return c};Aq=function(a,b,c){const d=_.kq(b.keySystem);c=c[d];d===_.Qe&&b.licenseServerUri?a.g.debug("Using Clear Key data URI for",d):c&&c.licenseUrl?(b.licenseServerUri=c.licenseUrl,a.g.debug("Using license server URI from user-configured clpp.drm.DrmEnvironment (licenseUrl) for",d)):a.g.debug("Using license server URI from the manifest for ",d)};
250
+ Bq=function(a,b){var c=new Set(zq(b));const d=a.G?_.zf:_.Pe,e=a.G?[_.Ue]:[Xf];a=new Map;for(const f of c)a.set(f.keySystem,{initDataTypes:[_.Wc],audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:_.Pe,persistentState:d,sessionTypes:e,label:f.keySystem,drmInfos:[]});for(const f of b){b=f.audio;c=f.video;const g=b?_.nq(b):"";let h=null;b&&"ac-3"===b.codecs.toLowerCase()&&_.Pi()&&(h=_.nq(b,_.Td));const k=c?_.nq(c):"";let l=null;c&&"ac-3"===c.codecs.toLowerCase()&&_.Pi()&&(l=_.nq(c,_.Td));
251
251
  for(const m of f.drmInfos){const n=a.get(m.keySystem);n.drmInfos.push(m);m.initData&&m.initData.length&&(n.initDataTypes=[...new Set(m.initData.map(p=>p.initDataType))]);m.distinctiveIdentifierRequired&&(n.distinctiveIdentifier=_.zf);m.persistentStateRequired&&(n.persistentState=_.zf);b&&_.Zh(m.audioRobustness).forEach(p=>{const u={robustness:p||"",contentType:g};n.audioCapabilities.find(v=>v.robustness===u.robustness&&v.contentType===u.contentType)||n.audioCapabilities.push(u);h&&n.audioCapabilities.push({robustness:p||
252
- "",contentType:h})});c&&_.Zh(m.videoRobustness).forEach(p=>{const u={robustness:p||"",contentType:k};n.videoCapabilities.find(v=>v.robustness===u.robustness&&v.contentType===u.contentType)||n.videoCapabilities.push(u);l&&n.videoCapabilities.push({robustness:p||"",contentType:l})})}}return a};Oq=function(a){return _.w(function*(){if(!a.l.o())if(a.P)yield a.P;else try{a.P=a.l.h(a.I),yield a.P}catch(b){a.j||a.w(new _.H(_.C,6,6003,b.message,b))}})};
253
- _.Sq=function(a,b,c,d){d=void 0===d?"":d;if(c.length&&(!a.G||a.K!==Kq)){var e=a.keySystem();if(!e.startsWith(_.rd)&&b===_.Uc){const f=new Pq(c);if(1<f.a.length&&(e={"org.w3.clearkey":"1077efecc0b24d02ace33c1e52e2fb4b","com.widevine.alpha":"edef8ba979d64acea3c827dcd51d21ed","com.microsoft.playready":"9a04f07998404286ab92e65be0885f95","com.adobe.primetime":"f239e769efa348509c16a903c6932efb"}[e]))for(let g=0;g<f.f.length;g++)if(e===f.f[g]){c=c.subarray(f.a[g].start,f.a[g].end+1);break}}(a.C.webkitCurrentPlaybackTargetIsWireless||
254
- _.Ri(2)||a.keySystem().startsWith(_.rd)||!_.Qq(a,d,c,!0))&&Rq(a,d,null,b,c)}};Tq=function(a,b){return _.w(function*(){a.g.info(`Handle encrypted event for type ${b.initDataType}`);yield Oq(a);b.initData&&_.Sq(a,b.initDataType,_.F(b.initData))})};Vq=function(a){return _.w(function*(){_.Fm(Id);const b=a.Y.map(c=>Uq(a,c));a.ia=!0;a.Y=[];yield Promise.all(b);_.Fm(Hd);_.Hm("drm.onPlay",Id,Hd)})};
255
- Xq=function(a){const b=a.keySystem(),c=a.f.Ia[b],d=c.certificateUrl||"";if(""===d)return Promise.resolve();const e=a.D.getConfiguration();return Wq(a,e).then(()=>{var f=c.modifiers;const g=f&&f.certificateRequest,h=f&&f.certificateResponse;f=_.yk([d],a.f.attemptParameters);f.type=3;f.licenseRequestType=Xc;g&&f.requestModifiers.push(k=>g(e,k));h&&f.responseModifiers.push(k=>h(e,k));a.g.debug("Fetching certificate");return a.D.ub.fetch(f).U}).then(f=>{a.a.serverCertificate=_.F(f.data)}).catch(f=>{var g=
256
- f.data.headers;g=Object.assign({message:Ba,url:f.data.url,status:f.data.status,response:f.data.response},g?{headers:g}:{},Op(g));throw new _.H(_.C,6,6100,g,f);})};
257
- _.Yq=function(a){return _.w(function*(){if(a.I&&a.a&&a.a.serverCertificate&&a.a.serverCertificate.length)try{const b=yield a.I.setServerCertificate(a.a.serverCertificate);void 0===b||b||a.g.debug("Server certificates are not supported by the key system. The server certificate has been ignored.")}catch(b){throw new _.H(_.C,6,6004,{browserError:b.message});}})};
258
- _.ar=function(a){const b=a.a?a.a.initData||[]:[];for(const c of b){let d=!_.Ri(2);if(a.f.enforceSingleSession&&!a.keySystem().startsWith(_.rd)){const e=a.h.values();for(const f of e)_.km(c.initData,f.initData)?(a.g.info("Skipping Session creation. Existing init data in single session mode!"),d=!1):f.periodId===c.periodId&&(a.g.info("Skipping Session creation. Merging init data for period in single session mode "+`for Key ID ${c.keyId}.`),Zq(c.initData,f)||(f.Wd.push(c.initData),c.keyId&&!f.jb.includes(c.keyId)&&
259
- f.jb.push(c.keyId),a.o.get(c.keyId)||a.o.set(c.keyId,Rf)),d=!1)}!d||a.G&&a.K===Kq||(_.Qq(a,c.keyId,c.initData)&&(d=!1),d&&(a.g.info("Request new media key session on create"),Rq(a,c.keyId,c.periodId,c.initDataType,c.initData)))}for(const c of a.L)_.$q(a,c);b.length||a.L.length||(a.A||a.g.info(wa),a.A=!0,a.F=!1,a.H.resolve());return a.H};
260
- _.cr=function(a,b){if(!a.I)return Yh(a.B,b,()=>{a.w(new _.H(_.C,6,6010))}),Promise.resolve();a.C=b;a.l.l(b);a.B.one(a.C,_.We,()=>Vq(a));a.B.on(a.C,_.Gg,e=>{const f=a.F;a.F=!a.A;!f&&a.F&&(a.g.info("Waiting for DRM license key delivery"),a.D.onEvent(e))});var c=a.a.initData.find(e=>0<e.initData.length);let d=Promise.resolve();if(c||a.l.f()!==br||a.L.length)d=Oq(a);c=Promise.resolve();_.Ui()&&38===_.Vi().major||(a.a&&a.a.keySystem!==_.Qe&&!a.a.serverCertificate&&(c=Xq(a)),c=c.then(()=>_.Yq(a)));return Promise.all([d,
261
- c]).then(()=>{a.j||(_.ar(a),a.B.on(a.C,Ud,e=>Tq(a,e)))}).catch(e=>{if(!a.j){if(6004===e.code&&a.a&&a.a.keySystem===_.vd&&1>a.R&&a.a.serverCertificate&&a.a.serverCertificate.length)return a.g.warn("Detected invalid widevine server certificate!. Retrying"),a.w(new _.H(1,6,6004)),a.a.serverCertificate=null,a.R++,_.cr(a,b);1<=a.R&&a.g.info("Could not get valid widevine server certificate. Giving up");throw e;}})};
262
- Wq=function(a,b){return _.w(function*(){const c=a.D.Nc();if(c){var d=b&&b.drm&&b.drm.customData;d&&(yield c(d))}})};
263
- _.$q=function(a,b){let c;try{a.g.debug("Attempting to load an offline session",b),c=a.I.createSession(_.Ue)}catch(e){const f=new _.H(_.C,6,6005,{browserError:e.message});a.w(f);return Promise.reject(f)}a.B.on(c,_.ze,a.Ua.bind(a));a.B.on(c,ie,a.Ta.bind(a));const d={initData:null,loaded:!1,Qe:Infinity,ic:null,fb:new _.Jl,periodId:null,Wd:[],keyId:null,jb:[],initDataType:null,rc:null,sessionContext:{ldlDelay:0,customData:{}}};d.fb.catch(()=>{});a.h.set(c,d);return c.load(b).then(e=>{if(a.j)return null;
264
- a.g.debug("Loaded offline session",b,e);if(!e)return a.h.delete(c),a.w(new _.H(_.C,6,6013)),null;d.loaded=!0;dr(a)&&(a.A||a.g.info(wa),a.A=!0,a.F=!1,a.H.resolve());return c},e=>{a.j||(a.h.delete(c),a.w(new _.H(_.C,6,6005,{browserError:e.message})))})};Zq=function(a,b){if(!a)return!1;for(let c=0;c<b.Wd.length;c++)if(_.km(a,b.Wd[c]))return!0;return!1};
265
- _.Qq=function(a,b,c,d){d=void 0===d?!1:d;for(const e of a.h.keys()){const f=a.h.get(e);if(_.km(c,f.initData))return b?f.jb.includes(b)?d&&a.g.info("Skipping Session creation. "+`License for init data with Key ID ${b} was already `+`requested in Session: '${e.sessionId}'. `):(f.jb.push(b),a.o.get(b)||a.o.set(b,Rf),d&&a.g.info(pb+`Session: '${e.sessionId}'`+`Adding Key ID ${b} to session meta-data.`)):d&&a.g.info(pb+`Session: '${e.sessionId}'`),!0;if(Zq(c,f))return d&&a.g.info("Skipping Session creation. License for init data was already requested [extra]"),
252
+ "",contentType:h})});c&&_.Zh(m.videoRobustness).forEach(p=>{const u={robustness:p||"",contentType:k};n.videoCapabilities.find(v=>v.robustness===u.robustness&&v.contentType===u.contentType)||n.videoCapabilities.push(u);l&&n.videoCapabilities.push({robustness:p||"",contentType:l})})}}return a};Iq=function(a){return _.w(function*(){if(!a.l.o())if(a.P)yield a.P;else try{a.P=a.l.h(a.I),yield a.P}catch(b){a.j||a.w(new _.I(_.D,6,6003,b.message,b))}})};
253
+ _.Mq=function(a,b,c,d){d=void 0===d?"":d;if(c.length&&(!a.G||a.K!==Eq)){var e=a.keySystem();if(!e.startsWith(_.sd)&&b===_.Wc){const f=new Jq(c);if(1<f.a.length&&(e={"org.w3.clearkey":"1077efecc0b24d02ace33c1e52e2fb4b","com.widevine.alpha":"edef8ba979d64acea3c827dcd51d21ed","com.microsoft.playready":"9a04f07998404286ab92e65be0885f95","com.adobe.primetime":"f239e769efa348509c16a903c6932efb"}[e]))for(let g=0;g<f.f.length;g++)if(e===f.f[g]){c=c.subarray(f.a[g].start,f.a[g].end+1);break}}(a.C.webkitCurrentPlaybackTargetIsWireless||
254
+ _.Pi(2)||a.keySystem().startsWith(_.sd)||!_.Kq(a,d,c,!0))&&Lq(a,d,null,b,c)}};Nq=function(a,b){return _.w(function*(){a.g.info(`Handle encrypted event for type ${b.initDataType}`);yield Iq(a);b.initData&&_.Mq(a,b.initDataType,_.G(b.initData))})};Pq=function(a){return _.w(function*(){_.wm(Jd);const b=a.Y.map(c=>Oq(a,c));a.ia=!0;a.Y=[];yield Promise.all(b);_.wm(Id);_.ym("drm.onPlay",Jd,Id)})};
255
+ Rq=function(a){const b=a.keySystem(),c=a.f.Ja[b],d=c.certificateUrl||"";if(""===d)return Promise.resolve();const e=a.D.getConfiguration();return Qq(a,e).then(()=>{var f=c.modifiers;const g=f&&f.certificateRequest,h=f&&f.certificateResponse;f=_.wk([d],a.f.attemptParameters);f.type=3;f.licenseRequestType=Yc;g&&f.requestModifiers.push(k=>g(e,k));h&&f.responseModifiers.push(k=>h(e,k));a.g.debug("Fetching certificate");return a.D.vb.fetch(f).U}).then(f=>{a.a.serverCertificate=_.G(f.data)}).catch(f=>{var g=
256
+ f.data.headers;g=Object.assign({message:Ba,url:f.data.url,status:f.data.status,response:f.data.response},g?{headers:g}:{},Ip(g));throw new _.I(_.D,6,6100,g,f);})};
257
+ _.Sq=function(a){return _.w(function*(){if(a.I&&a.a&&a.a.serverCertificate&&a.a.serverCertificate.length)try{const b=yield a.I.setServerCertificate(a.a.serverCertificate);void 0===b||b||a.g.debug("Server certificates are not supported by the key system. The server certificate has been ignored.")}catch(b){throw new _.I(_.D,6,6004,{browserError:b.message});}})};
258
+ _.Vq=function(a){const b=a.a?a.a.initData||[]:[];for(const c of b){let d=!_.Pi(2);if(a.f.enforceSingleSession&&!a.keySystem().startsWith(_.sd)){const e=a.h.values();for(const f of e)_.em(c.initData,f.initData)?(a.g.info("Skipping Session creation. Existing init data in single session mode!"),d=!1):f.periodId===c.periodId&&(a.g.info("Skipping Session creation. Merging init data for period in single session mode "+`for Key ID ${c.keyId}.`),Tq(c.initData,f)||(f.Yd.push(c.initData),c.keyId&&!f.kb.includes(c.keyId)&&
259
+ f.kb.push(c.keyId),a.o.get(c.keyId)||a.o.set(c.keyId,Rf)),d=!1)}!d||a.G&&a.K===Eq||(_.Kq(a,c.keyId,c.initData)&&(d=!1),d&&(a.g.info("Request new media key session on create"),Lq(a,c.keyId,c.periodId,c.initDataType,c.initData)))}for(const c of a.L)_.Uq(a,c);b.length||a.L.length||(a.A||a.g.info(va),a.A=!0,a.F=!1,a.H.resolve());return a.H};
260
+ _.Xq=function(a,b){if(!a.I)return Yh(a.B,b,()=>{a.w(new _.I(_.D,6,6010))}),Promise.resolve();a.C=b;a.l.l(b);a.B.one(a.C,_.We,()=>Pq(a));a.B.on(a.C,_.Gg,e=>{const f=a.F;a.F=!a.A;!f&&a.F&&(a.g.info("Waiting for DRM license key delivery"),a.D.onEvent(e))});var c=a.a.initData.find(e=>0<e.initData.length);let d=Promise.resolve();if(c||a.l.f()!==Wq||a.L.length)d=Iq(a);c=Promise.resolve();_.Si()&&38===_.Ti().major||(a.a&&a.a.keySystem!==_.Qe&&!a.a.serverCertificate&&(c=Rq(a)),c=c.then(()=>_.Sq(a)));return Promise.all([d,
261
+ c]).then(()=>{a.j||(_.Vq(a),a.B.on(a.C,Ud,e=>Nq(a,e)))}).catch(e=>{if(!a.j){if(6004===e.code&&a.a&&a.a.keySystem===_.wd&&1>a.R&&a.a.serverCertificate&&a.a.serverCertificate.length)return a.g.warn("Detected invalid widevine server certificate!. Retrying"),a.w(new _.I(1,6,6004)),a.a.serverCertificate=null,a.R++,_.Xq(a,b);1<=a.R&&a.g.info("Could not get valid widevine server certificate. Giving up");throw e;}})};
262
+ Qq=function(a,b){return _.w(function*(){const c=a.D.Qc();if(c){var d=b&&b.drm&&b.drm.customData;d&&(yield c(d))}})};
263
+ _.Uq=function(a,b){let c;try{a.g.debug("Attempting to load an offline session",b),c=a.I.createSession(_.Ue)}catch(e){const f=new _.I(_.D,6,6005,{browserError:e.message});a.w(f);return Promise.reject(f)}a.B.on(c,_.ze,a.Va.bind(a));a.B.on(c,ie,a.Ua.bind(a));const d={initData:null,loaded:!1,Xe:Infinity,mc:null,gb:new _.Hl,periodId:null,Yd:[],keyId:null,kb:[],initDataType:null,tc:null,sessionContext:{ldlDelay:0,customData:{}}};d.gb.catch(()=>{});a.h.set(c,d);return c.load(b).then(e=>{if(a.j)return null;
264
+ a.g.debug("Loaded offline session",b,e);if(!e)return a.h.delete(c),a.w(new _.I(_.D,6,6013)),null;d.loaded=!0;Yq(a)&&(a.A||a.g.info(va),a.A=!0,a.F=!1,a.H.resolve());return c},e=>{a.j||(a.h.delete(c),a.w(new _.I(_.D,6,6005,{browserError:e.message})))})};Tq=function(a,b){if(!a)return!1;for(let c=0;c<b.Yd.length;c++)if(_.em(a,b.Yd[c]))return!0;return!1};
265
+ _.Kq=function(a,b,c,d){d=void 0===d?!1:d;for(const e of a.h.keys()){const f=a.h.get(e);if(_.em(c,f.initData))return b?f.kb.includes(b)?d&&a.g.info("Skipping Session creation. "+`License for init data with Key ID ${b} was already `+`requested in Session: '${e.sessionId}'. `):(f.kb.push(b),a.o.get(b)||a.o.set(b,Rf),d&&a.g.info(rb+`Session: '${e.sessionId}'`+`Adding Key ID ${b} to session meta-data.`)):d&&a.g.info(rb+`Session: '${e.sessionId}'`),!0;if(Tq(c,f))return d&&a.g.info("Skipping Session creation. License for init data was already requested [extra]"),
266
266
  !0}return!1};
267
- Rq=function(a,b,c,d,e,f,g){f=void 0===f?null:f;g=void 0===g?!1:g;_.w(function*(){if(e.length){var h=b;if(!h)try{h=er(a,d,e,f)}catch(u){if(a.g.warn("Ignoring unrecognized init data. This may be caused by unsupported or malformed init data. Set `drm.ignoreUnrecognizedInitData \x3d false` if you want to override this behavior and use the init data after all.",{error:u,initDataType:d,initData:e}),a.f.ignoreUnrecognizedInitData)return}if(!g&&fr(a,h,d,e)){var k=!0;if("skd"===d&&!a.f.enableSessionCacheForSkd)for(var l of a.h.keys()){var m=a.h.get(l);
268
- if(h&&m.keyId===h){a.g.warn(`Close and re-open session for ${h}`);try{yield l.close()}catch(u){a.g.warn("Unable to close session",u)}k=!1}}if(k){a.g.warn(`Skip creating a new session for ${h}`);return}}try{var n=a.G?_.Ue:Xf;var p=a.I.createSession(n);a.D.onEvent(new _.G(Md,{keySystem:a.keySystem()}));a.g.info(`Created new ${n} session for Key ID: '${h}'. `+`Init data type: ${d}.`)}catch(u){a.w(new _.H(_.C,6,6005,{browserError:u.message}));return}a.B.on(p,_.ze,a.Ua.bind(a));a.B.on(p,ie,a.Ta.bind(a));
269
- k={rc:f,Wd:[],initData:e,initDataType:d,keyId:h,jb:h?[h]:[],loaded:!1,Qe:Infinity,periodId:c,ic:null,fb:new _.Jl,sessionContext:{ldlDelay:0,customData:{}}};k.fb.catch(()=>{});f&&(l=a.h.get(f),k.sessionContext=l.sessionContext);a.h.set(p,k);h&&!a.o.get(h)&&a.o.set(h,Rf);if(e)for(l=0;l<a.a.initData.length;l++)m=a.a.initData[l],m.keyId&&!k.jb.includes(m.keyId)&&_.km(m.initData,e)&&(k.keyId||(k.keyId=m.keyId),k.jb.push(m.keyId),a.o.get(m.keyId)||a.o.set(m.keyId,Rf));l=a.D.getConfiguration();m=a.keySystem();
270
- m=a.f.Ia[m];n=(n=m.modifiers)&&n.transformInitData;_.hh(n)||(n=zq);try{e=n({playerConfig:l,initData:e,initDataType:d,drmInfo:a.a,drmSystemConfig:m,sessionContext:k.sessionContext,emeApi:a.l.f()})}catch(u){h=u;u instanceof _.H||(h=new _.H(_.C,6,6016,u));k.fb&&k.fb.reject(u);a.w(h);return}a.g.info(`Generate License Request for key ID: '${h}'`);p.generateRequest(d,e.buffer).catch(u=>{if(!a.j){var v=null;u.errorCode&&u.errorCode.systemCode&&(v=u.errorCode.systemCode,0>v&&(v+=Math.pow(2,32)),v="0x"+v.toString(16));
271
- a.w(new _.H(_.C,6,6006,{browserError:u.message,error:u,extended:v},u))}})}else a.g.warn("Empty init data")})};gr=function(a){let b=Infinity;a=a.h.keys();for(const c of a)isNaN(c.expiration)||(b=Math.min(b,c.expiration));return b};dr=function(a){a=a.h.values();return _.ei(a,b=>b.loaded)};fr=function(a,b,c,d){if(!b&&c!==_.Mf)return!1;d=b||pp(d);for(const e of a.h.values())if(b&&e.keyId===b||b&&e.jb.includes(b)||c===_.Mf&&(e.keyId||pp(e.initData))===d)return!0;return!1};
272
- er=function(a,b,c,d){d=void 0===d?null:d;if("skd"===b){a:{var e=d;e=void 0===e?null:e;var f=a.keySystem(),g=a.f.Ia[f];f=a.D.getConfiguration();g=g&&g.modifiers&&g.modifiers.extractContentId;_.hh(g)||(g=xq);try{var h={ldlDelay:0,customData:{}};e&&(h=a.h.get(e).sessionContext);var k=g(f,c,h);a.g.debug(`Extracted Content ID '${k}' from SKD`);var l=k;break a}catch(m){a.g.warn("Unable to extract Content ID from SKD",m)}l=""}return l}if(b===_.Mf)return pp(c)||"";if(b===_.Uc){l=a.keySystem();try{if(l.match(/^com\.widevine\.alpha/)){const m=
273
- _.hq(c);if(m)return m.a}else if(pq(l)){{f=new _.gq(new DataView(c.buffer,c.byteOffset,c.byteLength),!1);g=_.M(f);const m=_.M(f);h=_.gp(m);const n=_.M(f);c=n>>>24;k=n&16777215;const p=_.ep(f,16),u=_.jm(p);if(0<c){const D=_.M(f);f.skip(16*D)}const v=_.M(f),y=_.ep(f,v),A=_.nq(y);_.xh("Parsed PR PSSH Box","size",g,"name",h,vg,c,"flags",k,"size",v,"systemId",u,"keyId",A.a);e=A}if(e)return e.a}}catch(m){throw a.g.warn("Unable to extract Key ID from PSSH data.",{error:m,keySystem:l}),m;}}return""};
274
- Uq=function(a,b){return _.w(function*(){const c=b.target,d=a.h.get(c);if(d){var e=a.a.licenseServerUri;if(hr(a,b))yield ir(a,e,b,c,d);else{var f=a.za;if(0<f&&(a.g.info(`Delaying license request by ${f} s.`),yield Ki(f),a.j))return;var g=a.keySystem(),h=a.f.Ia[g];"individualization-request"===b.messageType&&h&&h.individualizationServer&&(e=h.individualizationServer);var k=_.yk([e],a.f.attemptParameters);k.type=3;k.body=b.message;k.method=_.cb;k.licenseRequestType=b.messageType===le&&d.rc?ke:b.messageType;
275
- k.sessionId=c.sessionId;if(k.licenseRequestType===ke)a.D.onEvent(new _.G(Ld));pq(a.a.keySystem)&&jr(a,k);Ro(a.M,k);h=String(Math.floor(b.timeStamp));if(f=yield kr(a,k,d,h,e,c.sessionId,b.messageType,f))if(e=So(a.M,f),yield lr(a,c,f.data,d,h))h=gr(a),a.D.onEvent(new _.G(_.Qd,{keySystem:g,expirationTime:h,expectedRenewalTime:e?Date.now()+1E3*e.delay:Number.NaN})),d.ic&&d.ic.resolve(),d.rc&&(h=d.rc,a.g.info(`Closing expired session '${h.sessionId}'`),oq(h).catch(()=>{a.g.warn("Unable to close expired session in time")}),
276
- (h=a.h.get(d.rc))&&h.Jc&&h.Jc.stop(),a.h.delete(d.rc),d.rc=null),(new _.Ni(()=>{a.j||(d.loaded=!0,d.fb&&d.fb.resolve(),dr(a)&&(a.A||a.g.info(wa),a.A=!0,a.F=!1,a.H.resolve()))})).la(5),null!==d.initData&&(0<d.sessionContext.ldlDelay||e&&(_.wi(g,_.rd)||_.wi(g,_.td)))&&(h=new _.Ni(()=>{!a.j&&a.M&&(a.g.info("Updating CSL Sessions"),pq(g)?Rq(a,d.keyId,d.periodId,d.initDataType,d.initData,c,!0):g.startsWith(_.rd)&&c.update(_.ti("renew")))}),d.Jc=h,h.la(e?e.delay:d.sessionContext.ldlDelay))}}else a.g.error(`Session metadata not found for ${c.sessionId}.`)})};
277
- hr=function(a,b){return!!a.keySystem().match(/^com\.widevine\.alpha/)&&b.message&&2===b.message.byteLength};ir=function(a,b,c,d,e){return _.w(function*(){var f=_.yk([b],a.f.attemptParameters);f.type=3;f.body=c.message;f.method=_.cb;f.licenseRequestType=Xc;f.sessionId=d.sessionId;(f=yield mr(a,f,e,b,d.sessionId,c.messageType))&&(yield lr(a,d,f.data,e,String(Math.floor(c.timeStamp))))})};
278
- jr=function(a,b){var c=ri(b.body,!0,!0);if(c.includes("PlayReadyKeyMessage")){a.g.debug("Unwrapping PlayReady request.");a=(new DOMParser).parseFromString(c,"application/xml");c=a.getElementsByTagName("HttpHeader");for(let d=0;d<c.length;++d)b.headers[c[d].querySelector("name").textContent]=c[d].querySelector(_.ug).textContent;b.body=_.hm(a.querySelector("Challenge").textContent).buffer}else a.g.debug("PlayReady request is already unwrapped."),b.headers[ta]="text/xml; charset\x3dutf-8"};
279
- kr=function(a,b,c,d,e,f,g,h){return _.w(function*(){a.g.info("License request for "+`SID:'${f}'/KID:'${c.keyId}' `+`from msg '${g}'.`);yield nr(a,b,c.sessionContext);a.g.debug("Sending DRM license request to",e,b);a.D.onEvent(new _.G(Kd,{delay:h}));var k=Date.now();_.Fm(`drm.license.req.${d}.start`);var l=null;try{l=yield a.D.ub.fetch(b).U}catch(p){if(a.j)return null;l=p.data.headers;l=Object.assign({message:"Error while fetching DRM license!",url:p.data.url,status:p.data.status,response:p.data.response},
280
- l?{headers:l}:{},Op(l));l=new _.H(_.C,6,6007,l,p);or(a,l,c);return null}_.Fm(`drm.license.req.${d}.end`);_.Hm(`drm.license.req.${d}`,`drm.license.req.${d}.start`,`drm.license.req.${d}.end`);k=Date.now()-k;const m=Pp(l.headers);m&&(a.za=m.delay||0);let n="";m&&m.requestId&&(n=` RID:${m.requestId}`);a.g.info("License response for "+`SID:'${f}'/`+`KID:'${c.keyId}' `+`${l.data.byteLength} bytes `+`in ${k}ms${n}`);return a.j?null:l})};
281
- lr=function(a,b,c,d,e){return _.w(function*(){_.Fm(`drm.sess.update.${e}.start`);try{yield b.update(c)}catch(f){if(a.j)return!1;if(f===ob)return a.g.info("Ignore update for closed sessions"),!1;const g=new _.H(_.C,6,6008,{browserError:f.message});or(a,g,d);return!1}_.Fm(`drm.sess.update.${e}.end`);_.Hm(`drm.sess.update.${e}`,`drm.sess.update.${e}.start`,`drm.sess.update.${e}.end`);return a.j?!1:!0})};
282
- mr=function(a,b,c,d,e,f){return _.w(function*(){a.g.info("WV Server certificate request for "+`SID:'${e} from msg '${f}'.`);yield nr(a,b,c.sessionContext);a.g.debug("Sending Widevine certificate request to",d,b);var g=Date.now(),h=null;try{h=yield a.D.ub.fetch(b).U}catch(m){if(a.j)return null;h=m.data.headers;h=Object.assign({message:Ba,url:m.data.url,status:m.data.status,response:m.data.response},h?{headers:h}:{},Op(h));h=new _.H(_.C,6,6100,h,m);or(a,h,c);return null}g=Date.now()-g;const k=Pp(h.headers);
267
+ Lq=function(a,b,c,d,e,f,g){f=void 0===f?null:f;g=void 0===g?!1:g;_.w(function*(){if(e.length){var h=b;if(!h)try{h=Zq(a,d,e,f)}catch(u){if(a.g.warn("Ignoring unrecognized init data. This may be caused by unsupported or malformed init data. Set `drm.ignoreUnrecognizedInitData \x3d false` if you want to override this behavior and use the init data after all.",{error:u,initDataType:d,initData:e}),a.f.ignoreUnrecognizedInitData)return}if(!g&&$q(a,h,d,e)){var k=!0;if("skd"===d&&!a.f.enableSessionCacheForSkd)for(var l of a.h.keys()){var m=a.h.get(l);
268
+ if(h&&m.keyId===h){a.g.warn(`Close and re-open session for ${h}`);try{yield l.close()}catch(u){a.g.warn("Unable to close session",u)}k=!1}}if(k){a.g.warn(`Skip creating a new session for ${h}`);return}}try{var n=a.G?_.Ue:Xf;var p=a.I.createSession(n);a.D.onEvent(new _.H(Nd,{keySystem:a.keySystem()}));a.g.info(`Created new ${n} session for Key ID: '${h}'. `+`Init data type: ${d}.`)}catch(u){a.w(new _.I(_.D,6,6005,{browserError:u.message}));return}a.B.on(p,_.ze,a.Va.bind(a));a.B.on(p,ie,a.Ua.bind(a));
269
+ k={tc:f,Yd:[],initData:e,initDataType:d,keyId:h,kb:h?[h]:[],loaded:!1,Xe:Infinity,periodId:c,mc:null,gb:new _.Hl,sessionContext:{ldlDelay:0,customData:{}}};k.gb.catch(()=>{});f&&(l=a.h.get(f),k.sessionContext=l.sessionContext);a.h.set(p,k);h&&!a.o.get(h)&&a.o.set(h,Rf);if(e)for(l=0;l<a.a.initData.length;l++)m=a.a.initData[l],m.keyId&&!k.kb.includes(m.keyId)&&_.em(m.initData,e)&&(k.keyId||(k.keyId=m.keyId),k.kb.push(m.keyId),a.o.get(m.keyId)||a.o.set(m.keyId,Rf));l=a.D.getConfiguration();m=a.keySystem();
270
+ m=a.f.Ja[m];n=(n=m.modifiers)&&n.transformInitData;_.hh(n)||(n=tq);try{e=n({playerConfig:l,initData:e,initDataType:d,drmInfo:a.a,drmSystemConfig:m,sessionContext:k.sessionContext,emeApi:a.l.f()})}catch(u){h=u;u instanceof _.I||(h=new _.I(_.D,6,6016,u));k.gb&&k.gb.reject(u);a.w(h);return}a.g.info(`Generate License Request for key ID: '${h}'`);p.generateRequest(d,e.buffer).catch(u=>{if(!a.j){var v=null;u.errorCode&&u.errorCode.systemCode&&(v=u.errorCode.systemCode,0>v&&(v+=Math.pow(2,32)),v="0x"+v.toString(16));
271
+ a.w(new _.I(_.D,6,6006,{browserError:u.message,error:u,extended:v},u))}})}else a.g.warn("Empty init data")})};ar=function(a){let b=Infinity;a=a.h.keys();for(const c of a)isNaN(c.expiration)||(b=Math.min(b,c.expiration));return b};Yq=function(a){for(const b of a.h.values())if(!b.loaded)return!1;return!0};$q=function(a,b,c,d){if(!b&&c!==_.Mf)return!1;d=b||jp(d);for(const e of a.h.values())if(b&&e.keyId===b||b&&e.kb.includes(b)||c===_.Mf&&(e.keyId||jp(e.initData))===d)return!0;return!1};
272
+ Zq=function(a,b,c,d){d=void 0===d?null:d;if("skd"===b){a:{var e=d;e=void 0===e?null:e;var f=a.keySystem(),g=a.f.Ja[f];f=a.D.getConfiguration();g=g&&g.modifiers&&g.modifiers.extractContentId;_.hh(g)||(g=rq);try{var h={ldlDelay:0,customData:{}};e&&(h=a.h.get(e).sessionContext);var k=g(f,c,h);a.g.debug(`Extracted Content ID '${k}' from SKD`);var l=k;break a}catch(m){a.g.warn("Unable to extract Content ID from SKD",m)}l=""}return l}if(b===_.Mf)return jp(c)||"";if(b===_.Wc){l=a.keySystem();try{if(l.match(/^com\.widevine\.alpha/)){const m=
273
+ _.bq(c);if(m)return m.a}else if(jq(l)){{f=new _.aq(new DataView(c.buffer,c.byteOffset,c.byteLength),!1);g=_.N(f);const m=_.N(f);h=_.ap(m);const n=_.N(f);c=n>>>24;k=n&16777215;const p=_.Zo(f,16),u=_.dm(p);if(0<c){const E=_.N(f);f.skip(16*E)}const v=_.N(f),y=_.Zo(f,v),A=_.hq(y);_.xh("Parsed PR PSSH Box","size",g,"name",h,vg,c,"flags",k,"size",v,"systemId",u,"keyId",A.a);e=A}if(e)return e.a}}catch(m){throw a.g.warn("Unable to extract Key ID from PSSH data.",{error:m,keySystem:l}),m;}}return""};
274
+ Oq=function(a,b){return _.w(function*(){const c=b.target,d=a.h.get(c);if(d){var e=a.a.licenseServerUri;if(br(a,b))yield cr(a,e,b,c,d);else{var f=a.Aa;if(0<f&&(a.g.info(`Delaying license request by ${f} s.`),yield Ii(f),a.j))return;var g=a.keySystem(),h=a.f.Ja[g];"individualization-request"===b.messageType&&h&&h.individualizationServer&&(e=h.individualizationServer);var k=_.wk([e],a.f.attemptParameters);k.type=3;k.body=b.message;k.method=_.eb;k.licenseRequestType=b.messageType===le&&d.tc?ke:b.messageType;
275
+ k.sessionId=c.sessionId;if(k.licenseRequestType===ke)a.D.onEvent(new _.H(Md));jq(a.a.keySystem)&&dr(a,k);Lo(a.M,k);h=String(Math.floor(b.timeStamp));if(f=yield er(a,k,d,h,e,c.sessionId,b.messageType,f))if(e=Mo(a.M,f),yield fr(a,c,f.data,d,h))h=ar(a),a.D.onEvent(new _.H(_.Qd,{keySystem:g,expirationTime:h,expectedRenewalTime:e?Date.now()+1E3*e.delay:Number.NaN})),d.mc&&d.mc.resolve(),d.tc&&(h=d.tc,a.g.info(`Closing expired session '${h.sessionId}'`),iq(h).catch(()=>{a.g.warn("Unable to close expired session in time")}),
276
+ (h=a.h.get(d.tc))&&h.Mc&&h.Mc.stop(),a.h.delete(d.tc),d.tc=null),(new _.Li(()=>{a.j||(d.loaded=!0,d.gb&&d.gb.resolve(),Yq(a)&&(a.A||a.g.info(va),a.A=!0,a.F=!1,a.H.resolve()))})).la(5),null!==d.initData&&(0<d.sessionContext.ldlDelay||e&&(_.ui(g,_.sd)||_.ui(g,_.ud)))&&(h=new _.Li(()=>{!a.j&&a.M&&(a.g.info("Updating CSL Sessions"),jq(g)?Lq(a,d.keyId,d.periodId,d.initDataType,d.initData,c,!0):g.startsWith(_.sd)&&c.update(_.ri("renew")))}),d.Mc=h,h.la(e?e.delay:d.sessionContext.ldlDelay))}}else a.g.error(`Session metadata not found for ${c.sessionId}.`)})};
277
+ br=function(a,b){return!!a.keySystem().match(/^com\.widevine\.alpha/)&&b.message&&2===b.message.byteLength};cr=function(a,b,c,d,e){return _.w(function*(){var f=_.wk([b],a.f.attemptParameters);f.type=3;f.body=c.message;f.method=_.eb;f.licenseRequestType=Yc;f.sessionId=d.sessionId;(f=yield gr(a,f,e,b,d.sessionId,c.messageType))&&(yield fr(a,d,f.data,e,String(Math.floor(c.timeStamp))))})};
278
+ dr=function(a,b){var c=pi(b.body,!0,!0);if(c.includes("PlayReadyKeyMessage")){a.g.debug("Unwrapping PlayReady request.");a=(new DOMParser).parseFromString(c,"application/xml");c=a.getElementsByTagName("HttpHeader");for(let d=0;d<c.length;++d)b.headers[c[d].querySelector("name").textContent]=c[d].querySelector(_.ug).textContent;b.body=_.bm(a.querySelector("Challenge").textContent).buffer}else a.g.debug("PlayReady request is already unwrapped."),b.headers[ta]="text/xml; charset\x3dutf-8"};
279
+ er=function(a,b,c,d,e,f,g,h){return _.w(function*(){a.g.info("License request for "+`SID:'${f}'/KID:'${c.keyId}' `+`from msg '${g}'.`);yield hr(a,b,c.sessionContext);a.g.debug("Sending DRM license request to",e,b);a.D.onEvent(new _.H(Ld,{delay:h}));var k=Date.now();_.wm(`drm.license.req.${d}.start`);var l=null;try{l=yield a.D.vb.fetch(b).U}catch(p){if(a.j)return null;l=p.data.headers;l=Object.assign({message:"Error while fetching DRM license!",url:p.data.url,status:p.data.status,response:p.data.response},
280
+ l?{headers:l}:{},Ip(l));l=new _.I(_.D,6,6007,l,p);ir(a,l,c);return null}_.wm(`drm.license.req.${d}.end`);_.ym(`drm.license.req.${d}`,`drm.license.req.${d}.start`,`drm.license.req.${d}.end`);k=Date.now()-k;const m=Jp(l.headers);m&&(a.Aa=m.delay||0);let n="";m&&m.requestId&&(n=` RID:${m.requestId}`);a.g.info("License response for "+`SID:'${f}'/`+`KID:'${c.keyId}' `+`${l.data.byteLength} bytes `+`in ${k}ms${n}`);return a.j?null:l})};
281
+ fr=function(a,b,c,d,e){return _.w(function*(){_.wm(`drm.sess.update.${e}.start`);try{yield b.update(c)}catch(f){if(a.j)return!1;if(f===qb)return a.g.info("Ignore update for closed sessions"),!1;const g=new _.I(_.D,6,6008,{browserError:f.message});ir(a,g,d);return!1}_.wm(`drm.sess.update.${e}.end`);_.ym(`drm.sess.update.${e}`,`drm.sess.update.${e}.start`,`drm.sess.update.${e}.end`);return a.j?!1:!0})};
282
+ gr=function(a,b,c,d,e,f){return _.w(function*(){a.g.info("WV Server certificate request for "+`SID:'${e} from msg '${f}'.`);yield hr(a,b,c.sessionContext);a.g.debug("Sending Widevine certificate request to",d,b);var g=Date.now(),h=null;try{h=yield a.D.vb.fetch(b).U}catch(m){if(a.j)return null;h=m.data.headers;h=Object.assign({message:Ba,url:m.data.url,status:m.data.status,response:m.data.response},h?{headers:h}:{},Ip(h));h=new _.I(_.D,6,6100,h,m);ir(a,h,c);return null}g=Date.now()-g;const k=Jp(h.headers);
283
283
  let l="";k&&k.requestId&&(l=` RID:${k.requestId}`);a.g.info("WV Server certificate response for "+`SID:'${e}' `+`${h.data.byteLength} bytes `+`in ${g}ms${l}`);return a.j?null:h})};
284
- nr=function(a,b,c){return _.w(function*(){const d=a.D.getConfiguration();yield Wq(a,d);const e=a.keySystem();var f=a.f.Ia[e];const g=(f=f&&f.modifiers)&&f.licenseRequest,h=f&&f.licenseResponse;g?b.requestModifiers.push(k=>g(d,k,c)):e.startsWith(_.rd)&&b.requestModifiers.push(k=>_.sp(k));h?b.responseModifiers.push(k=>h(d,k,c)):e.startsWith(_.rd)&&b.responseModifiers.push(k=>_.tp(k))})};or=function(a,b,c){a.j||(a.w(b),c.ic&&c.ic.reject(b),c.fb&&c.fb.reject(b))};
285
- _.pr=function(a,b){b.lastIndex=a.a;b=b.exec(a.f);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.a===a.f.length||null===b||b.position!==a.a)return null;a.a+=b.length;return b.results};
286
- _.tr=function(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new _.H(_.C,4,4016,{invalidTag:b});b=c[1];var d=c[2];c=[];let e;if(d){d=new _.qr(d);var f;(f=_.pr(d,/^([^,=]+)(?:,|$)/g))&&f[1]&&(e=f[1].trim());const g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;for(;f=_.pr(d,g);)c.push(new _.rr(f[1],f[2]||f[3]||""))}return new _.sr(a,b,c,e)};ur=function(a){return`@@scheme:${a.scheme||""}`+`@@value:${a.value}`+`@@id:${a.id||""}@@type:${a.type||""}`+`@@protocol:${a.protocol||""}`};
287
- _.vr=function(a){return a&&a!==_.kg?a:null};xr=function(a){if(!a)throw new _.H(_.C,3,3101,`Invalid track type: ${a}`);if(!_.jh(a))throw new _.H(_.C,3,3101,`Invalid track type: ${a}. Track type must be a string!`);switch(a.toLowerCase()){case _.O:return _.O;case _.P:return _.P;case _.Q:return _.Q;case wr:return wr}throw new _.H(_.C,3,3101,`Unknown track type: ${a}.`);};
288
- Ar=function(a,b){a=xr(a);const c=_.vr(b.kind);let d=b.id;d||(d=String(_.yr++));a=new _.zr(d,c===_.Ae?wr:a);a.kind=c;a.label=_.vr(b.label);a.language=_.vr(b.language);a.originalLanguage=b.originalLanguage||a.language;return a};Br=function(a,b){return _.w(function*(){const c=_.yk(b);return yield rm(a.f,c)})};
289
- Fr=function(a,b,c){return _.w(function*(){const {mimeType:d,renditions:e}=yield Cr(a,b,c),f=new _.zr("dummy",_.Q),g=e.map((h,k)=>{k=new _.Dr(`R${k}`,f);k.bandwidth=h.bandwidth;k.Zc=h.Zc;k.codec=h.codec;k.width=h.width;k.height=h.height;return k});Er(g);return{renditions:g,mimeType:d||void 0}})};
290
- Hr=function(a){a=a.split("\n").filter(c=>c.trim().startsWith("#EXT-X-MEDIA:")).map(c=>Gr(c));const b=new Map;a.forEach(c=>{if(c.type&&c.name){const d=`${c.type}:${c.name}`;if(b.has(d))throw Error("#EXT-X-MEDIA:NAME attributes are not unique. It is impossible to map HLS metadata to Safari data structures.");b.set(d,c)}});return b};Cr=function(a,b,c){return _.w(function*(){const d=Ir(b),e=Jr(b,c);return{mimeType:yield Kr(a,e,d[0]?d[0].codec:null),renditions:d}})};
291
- Er=function(a){const b=new Set;a.forEach(c=>{b.add(`${c.width}x${c.height}`)});if(b.size<a.length)throw Error("Playlist contains multiple renditions with the same resolution.");};Gr=function(a){const b=_.tr(0,a);a=d=>(d=b.getAttribute(d))?d.value:void 0;var c=a(_.sb);c=null!=c?{AUDIO:_.P,VIDEO:_.Q,SUBTITLES:_.O}[c]:void 0;return{type:c,groupId:a(_.Ea),name:a(_.Sa),language:a(_.Ka),ij:a("AUTOSELECT"),default:a("DEFAULT"),qj:a("FORCED"),Rf:a("CHARACTERISTICS"),uri:a(_.ub)}};
292
- Ir=function(a){return a.split("\n").filter(b=>b.trim().startsWith("#EXT-X-STREAM-INF:")).map(b=>{var c=_.tr(0,b);if(c.getAttribute(_.Cb))throw Error("Playlist contains alternative video streams.");var d=_.K(c,_.kb);b=d?Number(d.split("x")[0]):null;d=d?Number(d.split("x")[1]):null;var e=_.K(c,_.ma);e=e?Number(e):null;var f=_.K(c,"AVERAGE-BANDWIDTH");f=f?Number(f):null;c=_.K(c,_.pa);c=_.Lr(_.t,c?c.split(","):[]);return b={bandwidth:e,Zc:f,codec:c,width:b,height:d,mimeType:null}})};
293
- Jr=function(a,b){return(a=a.split("\n").filter(c=>c.trim().endsWith(".m3u8"))[0])?_.Wm(a,b):null};Kr=function(a,b,c){return _.w(function*(){if(!b||!c)return null;var d=yield Br(a,b);d=[Mr(d,b),Nr(d,b)].filter(Boolean);return _.Or(d,_.t,c)})};Mr=function(a,b){return(a=a.split("\n").find(c=>!c.startsWith("#")&&0<c.trim().length))?_.Wm(a,b):null};Nr=function(a,b){a=a.split("\n").find(c=>c.startsWith("#EXT-X-MAP:"));return a?(a=_.K(_.tr(0,a),_.ub))?_.Wm(a,b):null:null};
294
- _.Qr=function(a,b,c){for(const d of _.Pr)if(d.probe(b,c))return d.create(a);return null};_.Rr=function(a){a=_.Pr.indexOf(a);0<=a&&_.Pr.splice(a,1)};Sr=function(a,b,c){return a.type!==c?!1:void 0!==b.id&&null!==b.id&&""!==b.id?a.id===b.id:_.lh(a,{kind:_.vr(b.kind),language:_.vr(b.language),label:_.vr(b.label)},["kind","language","label"])};Tr=function(a){return a.enabled||a.selected||a.mode===_.Jf||a.mode===_.ce};Vr=function(a,b,c){return Ur(a)&&b===_.Q&&!!c.enableHlsVideoTrackInfo};
295
- Wr=function(a,b,c){return _.w(function*(){var d=a.m.getLoadedSource();d&&a.j&&(d=yield a.j.a(d.url,c),d.mimeType&&(b.mimeType=d.mimeType),d.renditions&&0<d.renditions.length&&(b.renditions=d.renditions,b.renditions.forEach(e=>{e.track=b})))})};Xr=function(a,b,c){return Ur(a)&&(b===_.P||b===_.O)&&!!c.enableMetadata};
296
- Yr=function(a,b,c){return _.w(function*(){var d=a.m.getLoadedSource();d&&a.j&&(d=yield a.j.a(d.url,c),d.Bc&&(d=d.Bc.get(`${b.type}:${b.label}`))&&d.Rf&&(b.accessibility=d.Rf.split(",").map(e=>e.trim()).map(e=>({value:e,type:b.type,protocol:"HLS"}))))})};Zr=function(a,b){return a.h.filter(c=>c.type===b)};$r=function(a){(a=a.m.getTextDisplayer())&&a.remove(0,Infinity)};bs=function(a,b){if(a=as(a,b))a=Array.from(a),b===_.O&&(a=a.filter(c=>c.kind!==_.Ae));return a};
297
- as=function(a,b){if(!a.m)return null;a=a.m.getSurface();if(!a)return null;a=a.getMedia();if(!a)return null;switch(b){case _.P:return a.audioTracks;case _.Q:return a.videoTracks;case _.O:return a.textTracks;default:return null}};cs=function(a,b){return(a=a.a.get(b)||null)&&a.renditions[0]};ds=function(a,b){return(a=a.l.get(b))&&a.renditions[0]};
298
- es=function(a,b,c){const d=bs(a,b);if(c){if(void 0===a.h.find(f=>f.id===c.id))throw Error(`Unknown track with ID ${c.id} and type ${b}`);if(c.type!==b)throw Error(`Types mismatch for track ${c.type} and arg ${b}`);a.g.debug("Activate track type "+b+" with ID: "+c.id);if(d){a.l.set(b,c);let f;var e=!0;let g=!1;switch(b){case _.O:f="mode";e=_.Jf;g=_.Dd;break;case _.P:f="enabled";break;case _.Q:f="selected"}if(f)for(const h of d)h[f]=Sr(c,h,c.type)?e:g}}else if(a.g.debug("Disable track type "+b),a.a.get(b)&&
299
- d&&b===_.O){for(e of d)e.mode=_.Dd;a.a.set(b,null)}b===_.P?a.m.trigger(new _.G(_.Jc)):b===_.O&&a.m.trigger(new _.G(_.ag))};fs=function(a,b,c){if(a.m){var d=a.m.getSurface().getMedia();if(d){var e=document.createElement("track");e.id=c;e.kind=b.kind;e.srclang=b.language;b.label&&(e.label=b.label);e.src=_.zi(b.url)?URL.createObjectURL(new Blob([])):b.url;d.appendChild(e);a.I.push(e)}}};
300
- gs=function(a,b){return _.w(function*(){var c=a.m.getConfiguration();if(c=_.Qr(c,b.mimeType,_.Zf)){var d=_.yk(b.url),e={objectType:b.mimeType===_.xc?"tt":"c"};(e=yield _.wm(a.m.getNetworkEngine(),d,e).U)&&e.data&&(d="External_"+`${a.G++}`,a.o[d]=b,c=c.a(_.F(e.data)),c={url:URL.createObjectURL(new Blob([c])),kind:b.kind,language:b.language,label:b.label,mimeType:_.Zf},fs(a,c,d))}else a.g.warn("Track MIME type is not supported",b)})};
301
- Ur=function(a){a=a.m.getLoadedSource();return!(!a||a.type!==_.wl&&!a.url.endsWith(".m3u8"))&&_.aj()};hs=function(a,b,c){c=_.Zh(c).filter(e=>e);a.g.info("Find preferred tracks for",b,c);const d=Zr(a,b);c.some(e=>{const f=_.Nn(e);return(e=d.find(g=>{g=_.Nn(g.language||"");return _.On(f,g)}))?(a.g.info("Will select track with id",e.id),es(a,b,e),!0):!1})};js=function(a){return a.name===$a&&is.some(b=>a.message.startsWith(b))};_.ms=function(a,b){a&&b&&(_.ks.set(a,b),_.ls.info(`Registered TextDisplayerFactory: '${a}'`))};
302
- _.ns=function(a,b){b=b.find(c=>(c=_.ks.get(c))?c.a(a):!1);if(null==b)return _.ls.warn("Subtitles may not work as expected. No compatible text displayer found for this platform."),null;_.ls.info(`Chosen the text displayer: ${b}`);return _.ks.get(b)};_.os=function(a,b){if(null==a.a)a.a={timestamp:Date.now()/1E3,state:b,duration:0};else{{const c=Date.now()/1E3;a.a.duration=c-a.a.timestamp;a.a.state!==b&&(a.f.push(a.a),a.a={timestamp:c,state:b,duration:0})}}};
303
- ps=function(a,b){let c=0;a.a&&a.a.state===b&&(c+=a.a.duration);for(const d of a.f)c+=d.state===b?d.duration:0;return c};qs=function(a){const b=d=>({timestamp:d.timestamp,state:d.state,duration:d.duration}),c=[];for(const d of a.f)c.push(b(d));a.a&&c.push(b(a.a));return c};rs=function(a){return a.a.map(b=>_.dh(b))};
304
- _.ss=function(){return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,loadLatency:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,switchHistory:[],stateHistory:[]}};
305
- zs=function(a){a.g.debug("Start watching for video events for "+a.m.namespace());const b=a.m,c=d=>ts(a,d.type);a.a.on(b,_.Wd,()=>{a.fa||(a.h=!1,xs(a,5))});a.a.on(b,Pc,c);a.a.on(b,_.gf,()=>{a.C=!0;a.h=!1;ts(a,_.gf)});a.a.on(b,_.Se,()=>{a.C=!1;a.h=!1;ts(a,_.Se)});a.a.on(b,_.fg,c);a.a.on(b,_.vf,c);a.a.on(b,_.Hf,d=>{a.fa=!1;a.h=!1;ts(a,d.type)});a.a.on(b,_.If,d=>{a.fa=!0;ts(a,d.type)});a.a.on(b,Of,c);a.a.on(b,_.Fg,()=>{a.h=!0;ts(a,_.Fg)});a.a.on(b,_.Xd,d=>{(d=d&&d.detail)&&d.severity&&d.severity===_.C&&
306
- xs(a,_.ys)});a.a.on(b,_.ue,c);a.a.on(b,Qc,()=>{a.B=!0;ts(a,Qc)});a.a.on(b,_.tg,d=>{a.fa=!0;ts(a,d.type)});a.a.on(b,_.sg,d=>{a.fa=!1;a.h=!1;ts(a,d.type)})};As=function(a,b){return Object.keys(b)[a]};Bs=function(a,b){const c={type:_.Qf};b===_.Oc||b===_.Nc?(c.reason=a.o,b===_.Oc?c.timeSinceLastStateChangeMS=a.G:c.bufferedTimeMS=a.A):(2===a.f&&(c.reason=a.o),2===a.w&&(c.reason=a.o,c.bufferedTimeMS=a.A),c.currentState=a.f,c.previousState=a.w,c.timeSinceLastStateChangeMS=a.G);return c};
307
- Cs=function(a,b,c){a.m&&a.m.trigger(new _.G(b,{detail:c}))};
308
- xs=function(a,b){if(a.f===b)return!1;var c=Date.now();const d=2===a.f;a.w=a.f;a.f=b;5===a.w&&(a.H=c,a.l=0);a.l||(a.l=a.H||c);a.G=c-a.l;a.l=c;2===b?(a.J=a.l,a.o=a.fa?1:2,a.g.info("Buffering started. Reason: "+As(a.o-1,_.Ds)),b=Bs(a,_.Oc),Cs(a,_.Oc,b)):d&&(a.A=a.l-a.J,a.g.info("Buffering finished. Reason: "+As(a.o-1,_.Ds)+". Buffering time: "+a.A+" ms"),b=Bs(a,_.Nc),Cs(a,_.Nc,b));b=As(a.w,_.Es);c=As(a.f,_.Es);a.g.info(`Player state change: ${b} -> ${c}`);Cs(a,_.Qf,Bs(a,""));return!0};
309
- ts=function(a,b){if(a.f===_.ys)a.g.warn("Player is in error state, aborting any further state checks");else{var c=a.m.isPaused(),d=a.m?a.m.isEnded():!1;if(d)a.fa||(a.h=!1,xs(a,5));else if(b!==_.fg){var e=a.m.getPosition();e=null!==e&&void 0!==e&&0<=e?a.m.getBufferInfo().La(e,!0):-1;a.F=e;e=a.m.getSurface().getMedia();a.j=e?e.readyState:null;a.I=a.m.getPlaybackRate()||1;e=typeof a.j===_.r&&2>a.j&&2===e.networkState;var f=typeof a.j===_.r&&0>=a.F&&a.f===_.Fs,g=typeof a.j===_.r&&2>=a.j&&a.h;e=a.fa||
310
- f||e||g;!a.K||a.m.isLive()||2!==a.f||e||(f=b===_.Hf&&4===a.j,(g=1===a.w)&&!a.B?e=!0:g||a.B||f||(e=!0));f=!1;e?f=xs(a,2):c?f=xs(a,4):a.C&&(f=xs(a,3));f&&(a.B=!1);a.g.debug("Video state check for event "+b+":: seeking: "+a.fa+", waiting: "+a.h+", playing: "+a.C+", paused: "+c+", readyState: "+a.j+", rate: "+a.I+", buffer: "+a.F+", ended: "+d+". Changed state: "+f+", Current state: "+As(a.f,_.Es))}}};
311
- Hs=function(a,b){if(a.w)throw new _.H(_.C,7,7E3);a.a||(a.h.on(b,_.Xd,()=>{{const c=Gs(a);if(c)a.onError(c)}}),a.h.on(b,_.Af,()=>{const c=b.videoWidth,d=b.videoHeight,e=a.getTrackManager();e&&0<c&&0<d&&(e.w={width:c,height:d});a.trigger(new _.G(_.Lc,{detail:{width:c,height:d}}))}),a.a=b)};Js=function(a){const b=_.aj()?yq:void 0;return new _.Is(a,b)};
312
- Ks=function(a){return _.w(function*(){if(a.w)return Promise.reject(new _.H(_.C,7,7E3));var b=a.ga[a.getSourceIndex()];if(!a.configuration.drm||!1===b.drmProtected)return a.log.debug("No DRM configuration present.","Skipping DRM engine initialization"),Promise.resolve();b=_.sn(a.configuration.drm);a.log.debug("Drm configuration: ",b);const c=a.getNetworkEngine();a.o=Js({ub:c,onError:d=>a.onError(d),Ue:()=>{},Te:(d,e)=>{a.trigger(new _.G(_.Jd,{expirationTime:e}))},onEvent:d=>{d instanceof _.G?a.dispatchEvent(d):
313
- a.log.debug(_.wb,d.type)},getConfiguration:()=>a.getConfiguration(),Nc:()=>a.Nc()});a.o.f=b;yield _.Lq(a.o,[{id:0,language:_.kg,primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:()=>null,getSegmentReference:()=>null,adjustSegmentDurations:()=>{},getDuration:a.getDuration.bind(a),initSegmentReference:null,Ca:0,mimeType:_.zg,codecs:"",encrypted:!0,keyId:null,language:_.kg,originalLanguage:_.kg,label:null,type:_.t,primary:!1,frameRate:void 0,
314
- uj:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,spatialAudio:!1,fj:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0}]);yield _.cr(a.o,a.a)})};Ls=function(a,b){Sp(a.a,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,()=>{a.getState()!==_.ys&&a.seek(b).catch(c=>{a.log.warn("Error while seeking to start position.",c)})})};
315
- Gs=function(a){if(null===a.ga||!a.a.error)return null;const b=a.a.error.code;if(1===b)return null;let c=a.a.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new _.H(_.C,3,3016,{code:b,pj:c,message:a.a.error.message})};
316
- Ns=function(a){if(a.w)return new _.Ms(Promise.reject(new _.H(_.C,7,7E3)),()=>{});const b=a.ga[a.getSourceIndex()],c=a.configuration.startTime||null,d=a.a,e=a.H;c&&Ls(a,c);if(d.preload!==_.Ge)a.h.one(d,_.ue,()=>{const g=Date.now()/1E3-e;a.f.B=g;a.log.debug("Time to load: ",g)});d.src=b.url;(_.Ri()||_.Ui())&&d.load();const f=new _.Jl;a.h.one(d,Of,()=>{const g=a.getConfiguration().manifest.attemptParameters.timeout||30;a.B||(a.B=(new _.Ni(()=>{f.reject(new _.H(_.C,3,3100,{message:`Unable to load media source successfully from ${b.url}`,
317
- uri:b.url},d.error))})).la(g))});Sp(d,a.configuration.forceWaitForTracks?HTMLMediaElement.HAVE_CURRENT_DATA:HTMLMediaElement.HAVE_METADATA,a.h,()=>f.resolve());d.error?f.reject(Gs(a)):d.preload===_.Ge&&(a.log.warn('With \x3cvideo preload\x3d"none"\x3e, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way. Please do not use preload\x3d"none" with PRESTOplay for Web Apps.'),f.resolve());a.h.one(d,_.Xd,()=>{f.reject(Gs(a))});return new _.Ms(f,
318
- ()=>{const g=new _.H(_.C,7,7001);f.reject(g);return Promise.resolve()})};Os=function(a,b){Sp(b,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,()=>{if(a.isLive()&&a.getState()!==_.ys){var c=a.getSeekRange().end,d=a.getPosition();Infinity===c||20>c-d||(a.log.warn("Detected that HLS live stream was not started from close to the live edge. Auto-fixing, seeking to seek range end."+`(position: ${d}, seek range end: ${c})`),a.seek(c).catch(e=>{a.log.warn("Error while seeking to seek range edge.",e)}))}})};
319
- Ps=function(a,b){let c=!1;a.h.on(b,_.If,()=>{c=b.paused});a.h.on(b,_.Hf,()=>{.2>b.duration-b.currentTime&&b.paused&&!c&&(a.log.warn("Player was auto-paused during seek to the end, auto-resuming."),b.play())})};Qs=function(a){a.J.forEach(b=>b());a.J=[]};
320
- Ts=function(a,b){return _.w(function*(){try{_.Fm(ff);a.M=_.bb;a.ba=!1;const c=b.slice(1).map(d=>({config:d,ga:_.mn(d)}));yield _.oo(a,b[0]);c.forEach(d=>{Rs(a,d.config,d.ga)});a.trigger(new _.G(ve));yield a.a.setupPlaylist(b);yield _.ro(a);c.forEach(d=>{Ss(a,d.config,d.ga)});_.Fm(ef);_.Hm("player.setupPlaylist",ff,ef)}catch(c){if(a.l)throw a.g.info(Na),new _.H(_.C,7,7E3);throw c;}})};
321
- Us=function(a,b){const c=d=>{a.G=a.o.findIndex(e=>e.id===d.id)};a.addEventListener(_.Df,c);a.J.push(()=>{a.removeEventListener(_.Df,c)});if(b.endTime){const d=b.endTime,e=()=>{a.getPosition()>=d&&(a.removeEventListener(_.fg,e),a.g.info("Playlist end time reached. Stopping playback."),a.trigger(new _.G(_.Cf)),a.pause())};a.addEventListener(_.fg,e);a.J.push(()=>{a.removeEventListener(_.fg,e)})}};
322
- Vs=function(a,b){return _.w(function*(){try{_.Fm($e);const c=_.mn(b);Rs(a,b,c);yield a.a.appendLoad(b);Ss(a,b,c);_.Fm(Ze);_.Hm("player.appendLoad",$e,Ze)}catch(c){if(a.l)throw a.g.info(Na),new _.H(_.C,7,7E3,{id:b.id});throw c;}})};
323
- Rs=function(a,b,c){if(0===c.length)throw new _.H(_.C,7,7003,{message:Wa,id:b.id});if(1<c.length)throw new _.H(_.C,7,7003,{message:"Multiple sources not supported!",id:b.id,source:c});if(2!==(a.a?a.a.canPlay(c[0],a.f):0))throw new _.H(_.C,7,7003,{message:"Source not supported by the current player!",id:b.id,source:c[0]});};Ss=function(a,b,c){eo(a,{configuration:b,ga:c,drmInfo:a.getDrmInfo(),Fg:Object.keys(a.K),isLive:c[0].isLive})};
324
- Ws=function(a,b){const c=document.getElementById(a);if(!c)throw Error("Anchor element not found");c.classList.add(dd);return Array.from({length:3}).map(()=>{const d=document.createElement(_.t);d.classList.add("clpp-mc-playlist-video-el");const e=document.createElement(_.Ed);e.classList.add("clpp-mc-playlist-item");e.appendChild(d);c.appendChild(e);return new R(d,b)})};
325
- Xs=function(a,b,c){const d=b.getSurface().getMedia();b=b.getSurface().getUniqueCssClass();d&&(c?(a.g.info(`Show video element .${b}`),d.classList.add(ed)):(a.g.info(`Hide video element .${b}`),d.classList.remove(ed)),a.w&&a.w(d,c))};$s=function(a,b){return _.w(function*(){const c=yield a.o.get();a.f=b;b.role=Ys;a.f.player=c;a.f.videoEl=c.getSurface().getMedia();Xs(a,c,!0);yield c.load(b.config);Zs(a,b);b.config.autoplay||(yield c.play())})};
326
- dt=function(a){_.w(function*(){if(0===a.a)yield at(a);else if(a.a===a.h.length-1)yield bt(a);else{const b=[a.a-1,a.a+1];a.g.info(`Preload items (indices: ${b})`);yield Promise.all(b.map(c=>ct(a,c)))}})};
327
- et=function(a,b){return _.w(function*(){if(b.player){if(b.state===qf){a.g.info(Eb);try{yield b.preloadPromise}catch(c){}}a.f=b;b.role=Ys;Xs(a,b.player,!0);b.state===pf?(_.Fm(mf),a.ka.preloadMedia?yield b.player.play():yield so(b.player),_.Fm(lf),_.Hm("playlist.next",mf,lf)):b.state===of&&(yield b.player.load(b.config));Zs(a,b);b.config.autoplay||(yield b.player.play())}})};
328
- ht=function(a,b){return _.w(function*(){a.g.info(`Stop current playback (index: ${b.index})`);b.player.pause();Xs(a,b.player,!1);yield ft(a,b);b.player=null;b.videoEl=null;b.role=gt})};jt=function(a){return Promise.all(Array.from(a.l.keys()).map(b=>it(a,b)))};kt=function(a){return _.w(function*(){yield a.o.destroy();const b=document.getElementById(a.ka.anchorId);b&&(b.classList.remove(dd),b.innerHTML="")})};
329
- it=function(a,b){return _.w(function*(){const c=a.l.get(b);c&&(a.g.info(`Stop preloading item (index: ${b})`),c.player&&(yield ft(a,c)),a.l.delete(b))})};ft=function(a,b){return _.w(function*(){b.disposers.forEach(c=>c());b.disposers=[];b.player&&(yield a.o.release(b.player))})};Zs=function(a,b){if(a.ka.autoplayNext){const c=()=>{a.g.info("Automatically transition to next item");a.Dg()};b.player.on(_.Wd,c);const d=b.player;b.disposers.push(()=>{d.off(_.Wd,c)})}};
330
- ct=function(a,b){return _.w(function*(){const c=yield a.o.get(),d=a.h[b];d.player=c;d.videoEl=c.getSurface().getMedia();d.role=gt;d.state=qf;a.trigger(new _.G(pg));try{a.l.set(b,d),a.ka.preloadMedia?(d.config.autoplay&&(a.g.warn(la+`Force disabling autoplay (index: ${b})`),d.config.autoplay=!1),d.preloadPromise=c.load(d.config)):d.preloadPromise=c.preload(d.config),yield d.preloadPromise,d.state=pf,a.trigger(new _.G(pg))}catch(e){7001===e.code?(a.g.info(`Preload aborted (index: ${b})`),d.state=nf):
331
- (a.g.warn(`Preload failed (index: ${b})`,e),a.trigger(new _.G(_.Xd,{detail:e})),d.state=of),a.trigger(new _.G(pg))}})};at=function(a){return _.w(function*(){const b=a.a+1;a.g.info(`Preload following item (index: ${b})`);yield ct(a,b)})};bt=function(a){return _.w(function*(){const b=a.a-1;a.g.info(`Preload preceding item (index: ${b})`);yield ct(a,b)})};
332
- _.mt=function(a){if(lt.has(a))return lt.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);lt.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),lt.set(a,b),b):!1};nt=function(a,b){b=b.replace(/mp2t/i,"mp4");a===_.q&&(b=b.replace(_.t,_.q));if(a=/avc1\.(66|77|100)\.(\d+)/.exec(b)){let d="avc1.";var c=a[1];d="66"===c?d+"4200":"77"===c?d+"4d00":d+"6400";c=Number(a[2]);d+=(c>>4).toString(16);d+=(c&15).toString(16);b=b.replace(a[0],d)}return b};
333
- ot=function(a){const b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();let c;typeof Event===_.ae?c=new Event(b,a):(c=document.createEvent("Event"),c.initEvent(b,a.bubbles,a.cancelable));a.target.dispatchEvent(c)};pt=function(a){a=a.target;if(a.webkitPresentationMode===Ve){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement===a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)};
334
- qt=function(){return this.webkitSupportsPresentationMode(Ve)?(this.webkitSetPresentationMode(Ve),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))};rt=function(){const a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))};
335
- st=function(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}};tt=function(a,b,c){return new window.TextTrackCue(a,b,c)};ut=function(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)};wt=function(a,b,c){if("input"===a)switch(this.type){case "range":a=Yc}vt.call(this,a,b,c)};_.xt=function(a){const b=[];for(const c of a)for(const d of c.variants)b.push(d);return b};
336
- _.zt=function(a,b){a=_.$m(_.an(a),_.bn(a));_.yt[a]=b};_.At=function(a){a=_.$m(_.an(a),_.bn(a));return _.yt[a]||null};_.Bt=function(a){a=_.$m(_.an(a),_.bn(a));delete _.yt[a]};_.Gt=function(a){if(!a.w)return null;const b=a.H;switch(a.w){case Ct:return`-2px -2px 0 ${b}, -1px -1px 0 ${b}`;case Dt:return`2px 2px 0 ${b}, 1px 1px 0 ${b}`;case Et:return`-1px 0 ${b}, 0 1px ${b}, 1px 0 ${b}, `+`0 -1px ${b}`;case Ft:return`2px 2px 3px ${b}, 2px 2px 4px ${b}, `+`2px 2px 5px ${b}`;default:return _.Ge}};
337
- _.It=function(a,b,c,d){return _.w(function*(){try{return new (yield Ht(a,b,c,d))}catch(e){throw e.a(_.C),e;}})};
338
- Ht=function(a,b,c,d){return _.w(function*(){if(d){var e=_.Jt[d.toLowerCase()];if(e)return e;_.B("Could not determine manifest type using MIME type ",d)}if(e=_.Xm(a)){const f=_.Kt[e];if(f)return f;_.B("Could not determine manifest type for extension ",e)}else _.B("Could not find extension for ",a);if(!d&&(d=yield Lt(a,b,c))){if(e=_.Jt[d])return e;_.B("Could not determine manifest type using MIME type",d)}throw new _.H(_.C,4,4E3,{url:a});})};
339
- Lt=function(a,b,c){return _.w(function*(){var d=_.yk(a);vk(d,c);d.type=1;d.method="HEAD";return(d=(yield b.fetch(d).U).headers["content-type"])?d.toLowerCase():""})};_.Tg=[];Xg="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;Yg=typeof Object.defineProperties==_.ae?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
284
+ hr=function(a,b,c){return _.w(function*(){const d=a.D.getConfiguration();yield Qq(a,d);const e=a.keySystem();var f=a.f.Ja[e];const g=(f=f&&f.modifiers)&&f.licenseRequest,h=f&&f.licenseResponse;g?b.requestModifiers.push(k=>g(d,k,c)):e.startsWith(_.sd)&&b.requestModifiers.push(k=>_.mp(k));h?b.responseModifiers.push(k=>h(d,k,c)):e.startsWith(_.sd)&&b.responseModifiers.push(k=>_.np(k))})};ir=function(a,b,c){a.j||(a.w(b),c.mc&&c.mc.reject(b),c.gb&&c.gb.reject(b))};
285
+ _.jr=function(a,b){b.lastIndex=a.a;b=b.exec(a.f);b=null==b?null:{position:b.index,length:b[0].length,results:b};if(a.a===a.f.length||null===b||b.position!==a.a)return null;a.a+=b.length;return b.results};
286
+ _.nr=function(a,b){var c=b.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!c)throw new _.I(_.D,4,4016,{invalidTag:b});b=c[1];var d=c[2];c=[];let e;if(d){d=new _.kr(d);var f;(f=_.jr(d,/^([^,=]+)(?:,|$)/g))&&f[1]&&(e=f[1].trim());const g=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;for(;f=_.jr(d,g);)c.push(new _.lr(f[1],f[2]||f[3]||""))}return new _.mr(a,b,c,e)};or=function(a){return`@@scheme:${a.scheme||""}`+`@@value:${a.value}`+`@@id:${a.id||""}@@type:${a.type||""}`+`@@protocol:${a.protocol||""}`};
287
+ _.pr=function(a){return a&&a!==_.kg?a:null};rr=function(a){if(!a)throw new _.I(_.D,3,3101,`Invalid track type: ${a}`);if(!_.jh(a))throw new _.I(_.D,3,3101,`Invalid track type: ${a}. Track type must be a string!`);switch(a.toLowerCase()){case _.P:return _.P;case _.Q:return _.Q;case _.R:return _.R;case qr:return qr}throw new _.I(_.D,3,3101,`Unknown track type: ${a}.`);};
288
+ ur=function(a,b){a=rr(a);const c=_.pr(b.kind);let d=b.id;d||(d=String(_.sr++));a=new _.tr(d,c===_.Ae?qr:a);a.kind=c;a.label=_.pr(b.label);a.language=_.pr(b.language);a.originalLanguage=b.originalLanguage||a.language;return a};vr=function(a,b){return _.w(function*(){const c=_.wk(b);return yield lm(a.f,c)})};
289
+ zr=function(a,b,c){return _.w(function*(){const {mimeType:d,renditions:e}=yield wr(a,b,c),f=new _.tr("dummy",_.R),g=e.map((h,k)=>{k=new _.xr(`R${k}`,f);k.bandwidth=h.bandwidth;k.cd=h.cd;k.codec=h.codec;k.width=h.width;k.height=h.height;return k});yr(g);return{renditions:g,mimeType:d||void 0}})};
290
+ Br=function(a){a=a.split("\n").filter(c=>c.trim().startsWith("#EXT-X-MEDIA:")).map(c=>Ar(c));const b=new Map;a.forEach(c=>{if(c.type&&c.name){const d=`${c.type}:${c.name}`;if(b.has(d))throw Error("#EXT-X-MEDIA:NAME attributes are not unique. It is impossible to map HLS metadata to Safari data structures.");b.set(d,c)}});return b};wr=function(a,b,c){return _.w(function*(){const d=Cr(b),e=Dr(b,c);return{mimeType:yield Er(a,e,d[0]?d[0].codec:null),renditions:d}})};
291
+ yr=function(a){const b=new Set;a.forEach(c=>{b.add(`${c.width}x${c.height}`)});if(b.size<a.length)throw Error("Playlist contains multiple renditions with the same resolution.");};Ar=function(a){const b=_.nr(0,a);a=d=>(d=b.getAttribute(d))?d.value:void 0;var c=a(_.tb);c=null!=c?{AUDIO:_.Q,VIDEO:_.R,SUBTITLES:_.P}[c]:void 0;return{type:c,groupId:a(_.Ea),name:a(_.Sa),language:a(_.Ka),pj:a("AUTOSELECT"),default:a("DEFAULT"),xj:a("FORCED"),Zf:a("CHARACTERISTICS"),uri:a(_.vb)}};
292
+ Cr=function(a){return a.split("\n").filter(b=>b.trim().startsWith("#EXT-X-STREAM-INF:")).map(b=>{var c=_.nr(0,b);if(c.getAttribute(_.Db))throw Error("Playlist contains alternative video streams.");var d=_.L(c,_.mb);b=d?Number(d.split("x")[0]):null;d=d?Number(d.split("x")[1]):null;var e=_.L(c,_.ma);e=e?Number(e):null;var f=_.L(c,"AVERAGE-BANDWIDTH");f=f?Number(f):null;c=_.L(c,_.pa);c=_.Fr(_.t,c?c.split(","):[]);return b={bandwidth:e,cd:f,codec:c,width:b,height:d,mimeType:null}})};
293
+ Dr=function(a,b){return(a=a.split("\n").filter(c=>c.trim().endsWith(".m3u8"))[0])?_.Qm(a,b):null};Er=function(a,b,c){return _.w(function*(){if(!b||!c)return null;var d=yield vr(a,b);d=[Gr(d,b),Hr(d,b)].filter(Boolean);return _.Ir(d,_.t,c)})};Gr=function(a,b){return(a=a.split("\n").find(c=>!c.startsWith("#")&&0<c.trim().length))?_.Qm(a,b):null};Hr=function(a,b){a=a.split("\n").find(c=>c.startsWith("#EXT-X-MAP:"));return a?(a=_.L(_.nr(0,a),_.vb))?_.Qm(a,b):null:null};
294
+ _.Kr=function(a,b,c){for(const d of _.Jr)if(d.probe(b,c))return d.create(a);return null};_.Lr=function(a){a=_.Jr.indexOf(a);0<=a&&_.Jr.splice(a,1)};Mr=function(a,b,c){return a.type!==c?!1:void 0!==b.id&&null!==b.id&&""!==b.id?a.id===b.id:_.lh(a,{kind:_.pr(b.kind),language:_.pr(b.language),label:_.pr(b.label)},["kind","language","label"])};Nr=function(a){return a.enabled||a.selected||a.mode===_.Jf||a.mode===_.ce};Pr=function(a,b,c){return Or(a)&&b===_.R&&!!c.enableHlsVideoTrackInfo};
295
+ Qr=function(a,b,c){return _.w(function*(){var d=a.m.getLoadedSource();d&&a.j&&(d=yield a.j.a(d.url,c),d.mimeType&&(b.mimeType=d.mimeType),d.renditions&&0<d.renditions.length&&(b.renditions=d.renditions,b.renditions.forEach(e=>{e.track=b})))})};Rr=function(a,b,c){return Or(a)&&(b===_.Q||b===_.P)&&!!c.enableMetadata};
296
+ Sr=function(a,b,c){return _.w(function*(){var d=a.m.getLoadedSource();d&&a.j&&(d=yield a.j.a(d.url,c),d.Ec&&(d=d.Ec.get(`${b.type}:${b.label}`))&&d.Zf&&(b.accessibility=d.Zf.split(",").map(e=>e.trim()).map(e=>({value:e,type:b.type,protocol:"HLS"}))))})};Tr=function(a,b){return a.h.filter(c=>c.type===b)};Ur=function(a){(a=a.m.getTextDisplayer())&&a.remove(0,Infinity)};Wr=function(a,b){if(a=Vr(a,b))a=Array.from(a),b===_.P&&(a=a.filter(c=>c.kind!==_.Ae));return a};
297
+ Vr=function(a,b){if(!a.m)return null;a=a.m.getSurface();if(!a)return null;a=a.getMedia();if(!a)return null;switch(b){case _.Q:return a.audioTracks;case _.R:return a.videoTracks;case _.P:return a.textTracks;default:return null}};Xr=function(a,b){return(a=a.a.get(b)||null)&&a.renditions[0]};Yr=function(a,b){return(a=a.l.get(b))&&a.renditions[0]};
298
+ Zr=function(a,b,c){const d=Wr(a,b);if(c){if(void 0===a.h.find(f=>f.id===c.id))throw Error(`Unknown track with ID ${c.id} and type ${b}`);if(c.type!==b)throw Error(`Types mismatch for track ${c.type} and arg ${b}`);a.g.debug("Activate track type "+b+" with ID: "+c.id);if(d){a.l.set(b,c);let f;var e=!0;let g=!1;switch(b){case _.P:f="mode";e=_.Jf;g=_.Ed;break;case _.Q:f="enabled";break;case _.R:f="selected"}if(f)for(const h of d)h[f]=Mr(c,h,c.type)?e:g}}else if(a.g.debug("Disable track type "+b),a.a.get(b)&&
299
+ d&&b===_.P){for(e of d)e.mode=_.Ed;a.a.set(b,null)}b===_.Q?a.m.trigger(new _.H(_.Kc)):b===_.P&&a.m.trigger(new _.H(_.ag))};$r=function(a,b,c){if(a.m){var d=a.m.getSurface().getMedia();if(d){var e=document.createElement("track");e.id=c;e.kind=b.kind;e.srclang=b.language;b.label&&(e.label=b.label);e.src=_.xi(b.url)?URL.createObjectURL(new Blob([])):b.url;d.appendChild(e);a.I.push(e)}}};
300
+ as=function(a,b){return _.w(function*(){var c=a.m.getConfiguration();if(c=_.Kr(c,b.mimeType,_.Zf)){var d=_.wk(b.url),e={objectType:b.mimeType===_.yc?"tt":"c"};(e=yield _.qm(a.m.getNetworkEngine(),d,e).U)&&e.data&&(d="External_"+`${a.G++}`,a.o[d]=b,c=c.a(_.G(e.data)),c={url:URL.createObjectURL(new Blob([c])),kind:b.kind,language:b.language,label:b.label,mimeType:_.Zf},$r(a,c,d))}else a.g.warn("Track MIME type is not supported",b)})};
301
+ Or=function(a){a=a.m.getLoadedSource();return!(!a||a.type!==_.ul&&!a.url.endsWith(".m3u8"))&&_.Zi()};bs=function(a,b,c){c=_.Zh(c).filter(e=>e);a.g.info("Find preferred tracks for",b,c);const d=Tr(a,b);c.some(e=>{const f=_.Hn(e);return(e=d.find(g=>{g=_.Hn(g.language||"");return _.In(f,g)}))?(a.g.info("Will select track with id",e.id),Zr(a,b,e),!0):!1})};ds=function(a){return a.name===ab&&cs.some(b=>a.message.startsWith(b))};_.gs=function(a,b){a&&b&&(_.es.set(a,b),_.fs.info(`Registered TextDisplayerFactory: '${a}'`))};
302
+ _.hs=function(a,b){b=b.find(c=>(c=_.es.get(c))?c.a(a):!1);if(null==b)return _.fs.warn("Subtitles may not work as expected. No compatible text displayer found for this platform."),null;_.fs.info(`Chosen the text displayer: ${b}`);return _.es.get(b)};_.is=function(a,b){if(null==a.a)a.a={timestamp:Date.now()/1E3,state:b,duration:0};else{{const c=Date.now()/1E3;a.a.duration=c-a.a.timestamp;a.a.state!==b&&(a.f.push(a.a),a.a={timestamp:c,state:b,duration:0})}}};
303
+ js=function(a,b){let c=0;a.a&&a.a.state===b&&(c+=a.a.duration);for(const d of a.f)c+=d.state===b?d.duration:0;return c};ks=function(a){const b=d=>({timestamp:d.timestamp,state:d.state,duration:d.duration}),c=[];for(const d of a.f)c.push(b(d));a.a&&c.push(b(a.a));return c};ls=function(a){return a.a.map(b=>_.dh(b))};
304
+ _.ms=function(){return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,loadLatency:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,switchHistory:[],stateHistory:[]}};
305
+ qs=function(a){a.g.debug("Start watching for video events for "+a.m.namespace());const b=a.m,c=d=>ns(a,d.type);a.a.on(b,_.Wd,()=>{a.fa||(a.h=!1,os(a,5))});a.a.on(b,Qc,c);a.a.on(b,_.gf,()=>{a.C=!0;a.h=!1;ns(a,_.gf)});a.a.on(b,_.Se,()=>{a.C=!1;a.h=!1;ns(a,_.Se)});a.a.on(b,_.fg,c);a.a.on(b,_.vf,c);a.a.on(b,_.Hf,d=>{a.fa=!1;a.h=!1;ns(a,d.type)});a.a.on(b,_.If,d=>{a.fa=!0;ns(a,d.type)});a.a.on(b,Of,c);a.a.on(b,_.Fg,()=>{a.h=!0;ns(a,_.Fg)});a.a.on(b,_.Xd,d=>{(d=d&&d.detail)&&d.severity&&d.severity===_.D&&
306
+ os(a,_.ps)});a.a.on(b,_.ue,c);a.a.on(b,Rc,()=>{a.B=!0;ns(a,Rc)});a.a.on(b,_.tg,d=>{a.fa=!0;ns(a,d.type)});a.a.on(b,_.sg,d=>{a.fa=!1;a.h=!1;ns(a,d.type)})};rs=function(a,b){return Object.keys(b)[a]};ss=function(a,b){const c={type:_.Qf};b===_.Pc||b===_.Oc?(c.reason=a.o,b===_.Pc?c.timeSinceLastStateChangeMS=a.G:c.bufferedTimeMS=a.A):(2===a.f&&(c.reason=a.o),2===a.w&&(c.reason=a.o,c.bufferedTimeMS=a.A),c.currentState=a.f,c.previousState=a.w,c.timeSinceLastStateChangeMS=a.G);return c};
307
+ ts=function(a,b,c){a.m&&a.m.trigger(new _.H(b,{detail:c}))};
308
+ os=function(a,b){if(a.f===b)return!1;var c=Date.now();const d=2===a.f;a.w=a.f;a.f=b;5===a.w&&(a.H=c,a.l=0);a.l||(a.l=a.H||c);a.G=c-a.l;a.l=c;2===b?(a.J=a.l,a.o=a.fa?1:2,a.g.info("Buffering started. Reason: "+rs(a.o-1,_.us)),b=ss(a,_.Pc),ts(a,_.Pc,b)):d&&(a.A=a.l-a.J,a.g.info("Buffering finished. Reason: "+rs(a.o-1,_.us)+". Buffering time: "+a.A+" ms"),b=ss(a,_.Oc),ts(a,_.Oc,b));b=rs(a.w,_.vs);c=rs(a.f,_.vs);a.g.info(`Player state change: ${b} -> ${c}`);ts(a,_.Qf,ss(a,""));return!0};
309
+ ns=function(a,b){if(a.f===_.ps)a.g.warn("Player is in error state, aborting any further state checks");else{var c=a.m.isPaused(),d=a.m?a.m.isEnded():!1;if(d)a.fa||(a.h=!1,os(a,5));else if(b!==_.fg){var e=a.m.getPosition();e=null!==e&&void 0!==e&&0<=e?a.m.getBufferInfo().Ma(e,!0):-1;a.F=e;e=a.m.getSurface().getMedia();a.j=e?e.readyState:null;a.I=a.m.getPlaybackRate()||1;e=typeof a.j===_.r&&2>a.j&&2===e.networkState;var f=typeof a.j===_.r&&0>=a.F&&a.f===_.zs,g=typeof a.j===_.r&&2>=a.j&&a.h;e=a.fa||
310
+ f||e||g;!a.K||a.m.isLive()||2!==a.f||e||(f=b===_.Hf&&4===a.j,(g=1===a.w)&&!a.B?e=!0:g||a.B||f||(e=!0));f=!1;e?f=os(a,2):c?f=os(a,4):a.C&&(f=os(a,3));f&&(a.B=!1);a.g.debug("Video state check for event "+b+":: seeking: "+a.fa+", waiting: "+a.h+", playing: "+a.C+", paused: "+c+", readyState: "+a.j+", rate: "+a.I+", buffer: "+a.F+", ended: "+d+". Changed state: "+f+", Current state: "+rs(a.f,_.vs))}}};
311
+ Bs=function(a,b){if(a.w)throw new _.I(_.D,7,7E3);a.a||(a.h.on(b,_.Xd,()=>{{const c=As(a);if(c)a.onError(c)}}),a.h.on(b,_.Af,()=>{const c=b.videoWidth,d=b.videoHeight,e=a.getTrackManager();e&&0<c&&0<d&&(e.w={width:c,height:d});a.trigger(new _.H(_.Mc,{detail:{width:c,height:d}}))}),a.a=b)};Ds=function(a){const b=_.Zi()?sq:void 0;return new _.Cs(a,b)};
312
+ Es=function(a){return _.w(function*(){if(a.w)return Promise.reject(new _.I(_.D,7,7E3));var b=a.ha[a.getSourceIndex()];if(!a.configuration.drm||!1===b.drmProtected)return a.log.debug("No DRM configuration present.","Skipping DRM engine initialization"),Promise.resolve();b=_.mn(a.configuration.drm);a.log.debug("Drm configuration: ",b);const c=a.getNetworkEngine();a.o=Ds({vb:c,onError:d=>a.onError(d),af:()=>{},$e:(d,e)=>{a.trigger(new _.H(_.Kd,{expirationTime:e}))},onEvent:d=>{d instanceof _.H?a.dispatchEvent(d):
313
+ a.log.debug(_.yb,d.type)},getConfiguration:()=>a.getConfiguration(),Qc:()=>a.Qc()});a.o.f=b;yield _.Fq(a.o,[{id:0,language:_.kg,primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:()=>null,getSegmentReference:()=>null,adjustSegmentDurations:()=>{},getDuration:a.getDuration.bind(a),initSegmentReference:null,Ca:0,mimeType:_.zg,codecs:"",encrypted:!0,keyId:null,language:_.kg,originalLanguage:_.kg,label:null,type:_.t,primary:!1,frameRate:void 0,
314
+ Bj:void 0,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],channelsCount:null,spatialAudio:!1,mj:null,closedCaptions:null},bandwidth:100,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0}]);yield _.Xq(a.o,a.a)})};Fs=function(a,b){Mp(a.a,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,()=>{a.getState()!==_.ps&&a.seek(b).catch(c=>{a.log.warn("Error while seeking to start position.",c)})})};
315
+ As=function(a){if(null===a.ha||!a.a.error)return null;const b=a.a.error.code;if(1===b)return null;let c=a.a.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));return new _.I(_.D,3,3016,{code:b,wj:c,message:a.a.error.message})};
316
+ Hs=function(a){if(a.w)return new _.Gs(Promise.reject(new _.I(_.D,7,7E3)),()=>{});const b=a.ha[a.getSourceIndex()],c=a.configuration.startTime||null,d=a.a,e=a.H;c&&Fs(a,c);if(d.preload!==_.Ge)a.h.one(d,_.ue,()=>{const g=Date.now()/1E3-e;a.f.B=g;a.log.debug("Time to load: ",g)});d.src=b.url;(_.Pi()||_.Si())&&d.load();const f=new _.Hl;a.h.one(d,Of,()=>{const g=a.getConfiguration().manifest.attemptParameters.timeout||30;a.B||(a.B=(new _.Li(()=>{f.reject(new _.I(_.D,3,3100,{message:`Unable to load media source successfully from ${b.url}`,
317
+ uri:b.url},d.error))})).la(g))});Mp(d,a.configuration.forceWaitForTracks?HTMLMediaElement.HAVE_CURRENT_DATA:HTMLMediaElement.HAVE_METADATA,a.h,()=>f.resolve());d.error?f.reject(As(a)):d.preload===_.Ge&&(a.log.warn('With \x3cvideo preload\x3d"none"\x3e, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way. Please do not use preload\x3d"none" with PRESTOplay for Web Apps.'),f.resolve());a.h.one(d,_.Xd,()=>{f.reject(As(a))});return new _.Gs(f,
318
+ ()=>{const g=new _.I(_.D,7,7001);f.reject(g);return Promise.resolve()})};Is=function(a,b){Mp(b,HTMLMediaElement.HAVE_CURRENT_DATA,a.h,()=>{if(a.isLive()&&a.getState()!==_.ps){var c=a.getSeekRange().end,d=a.getPosition();Infinity===c||20>c-d||(a.log.warn("Detected that HLS live stream was not started from close to the live edge. Auto-fixing, seeking to seek range end."+`(position: ${d}, seek range end: ${c})`),a.seek(c).catch(e=>{a.log.warn("Error while seeking to seek range edge.",e)}))}})};
319
+ Js=function(a,b){let c=!1;a.h.on(b,_.If,()=>{c=b.paused});a.h.on(b,_.Hf,()=>{.2>b.duration-b.currentTime&&b.paused&&!c&&(a.log.warn("Player was auto-paused during seek to the end, auto-resuming."),b.play())})};Ks=function(a){a.J.forEach(b=>b());a.J=[]};
320
+ Ns=function(a,b){return _.w(function*(){try{_.wm(ff);a.M=_.db;a.ba=!1;const c=b.slice(1).map(d=>({config:d,ha:_.fn(d)}));yield _.io(a,b[0]);c.forEach(d=>{Ls(a,d.config,d.ha)});a.trigger(new _.H(ve));yield a.a.setupPlaylist(b);yield _.lo(a);c.forEach(d=>{Ms(a,d.config,d.ha)});_.wm(ef);_.ym("player.setupPlaylist",ff,ef)}catch(c){if(a.l)throw a.g.info(Na),new _.I(_.D,7,7E3);throw c;}})};
321
+ Os=function(a,b){const c=d=>{a.G=a.o.findIndex(e=>e.id===d.id)};a.addEventListener(_.Df,c);a.J.push(()=>{a.removeEventListener(_.Df,c)});if(b.endTime){const d=b.endTime,e=()=>{a.getPosition()>=d&&(a.removeEventListener(_.fg,e),a.g.info("Playlist end time reached. Stopping playback."),a.trigger(new _.H(_.Cf)),a.pause())};a.addEventListener(_.fg,e);a.J.push(()=>{a.removeEventListener(_.fg,e)})}};
322
+ Ps=function(a,b){return _.w(function*(){try{_.wm($e);const c=_.fn(b);Ls(a,b,c);yield a.a.appendLoad(b);Ms(a,b,c);_.wm(Ze);_.ym("player.appendLoad",$e,Ze)}catch(c){if(a.l)throw a.g.info(Na),new _.I(_.D,7,7E3,{id:b.id});throw c;}})};
323
+ Ls=function(a,b,c){if(0===c.length)throw new _.I(_.D,7,7003,{message:Wa,id:b.id});if(1<c.length)throw new _.I(_.D,7,7003,{message:"Multiple sources not supported!",id:b.id,source:c});if(2!==(a.a?a.a.canPlay(c[0],a.f):0))throw new _.I(_.D,7,7003,{message:"Source not supported by the current player!",id:b.id,source:c[0]});};Ms=function(a,b,c){Yn(a,{configuration:b,ha:c,drmInfo:a.getDrmInfo(),Mg:Object.keys(a.K),isLive:c[0].isLive})};
324
+ Qs=function(a,b){const c=document.getElementById(a);if(!c)throw Error("Anchor element not found");c.classList.add(ed);return Array.from({length:3}).map(()=>{const d=document.createElement(_.t);d.classList.add("clpp-mc-playlist-video-el");const e=document.createElement(_.Fd);e.classList.add("clpp-mc-playlist-item");e.appendChild(d);c.appendChild(e);return new S(d,b)})};
325
+ Rs=function(a,b,c){const d=b.getSurface().getMedia();b=b.getSurface().getUniqueCssClass();d&&(c?(a.g.info(`Show video element .${b}`),d.classList.add(fd)):(a.g.info(`Hide video element .${b}`),d.classList.remove(fd)),a.w&&a.w(d,c))};Us=function(a,b){return _.w(function*(){const c=yield a.o.get();a.f=b;b.role=Ss;a.f.player=c;a.f.videoEl=c.getSurface().getMedia();Rs(a,c,!0);yield c.load(b.config);Ts(a,b);b.config.autoplay||(yield c.play())})};
326
+ Ys=function(a){_.w(function*(){if(0===a.a)yield Vs(a);else if(a.a===a.h.length-1)yield Ws(a);else{const b=[a.a-1,a.a+1];a.g.info(`Preload items (indices: ${b})`);yield Promise.all(b.map(c=>Xs(a,c)))}})};
327
+ Zs=function(a,b){return _.w(function*(){if(b.player){if(b.state===qf){a.g.info(Gb);try{yield b.preloadPromise}catch(c){}}a.f=b;b.role=Ss;Rs(a,b.player,!0);b.state===pf?(_.wm(mf),a.ka.preloadMedia?yield b.player.play():yield mo(b.player),_.wm(lf),_.ym("playlist.next",mf,lf)):b.state===of&&(yield b.player.load(b.config));Ts(a,b);b.config.autoplay||(yield b.player.play())}})};
328
+ bt=function(a,b){return _.w(function*(){a.g.info(`Stop current playback (index: ${b.index})`);b.player.pause();Rs(a,b.player,!1);yield $s(a,b);b.player=null;b.videoEl=null;b.role=at})};dt=function(a){return Promise.all(Array.from(a.l.keys()).map(b=>ct(a,b)))};et=function(a){return _.w(function*(){yield a.o.destroy();const b=document.getElementById(a.ka.anchorId);b&&(b.classList.remove(ed),b.innerHTML="")})};
329
+ ct=function(a,b){return _.w(function*(){const c=a.l.get(b);c&&(a.g.info(`Stop preloading item (index: ${b})`),c.player&&(yield $s(a,c)),a.l.delete(b))})};$s=function(a,b){return _.w(function*(){b.disposers.forEach(c=>c());b.disposers=[];b.player&&(yield a.o.release(b.player))})};Ts=function(a,b){if(a.ka.autoplayNext){const c=()=>{a.g.info("Automatically transition to next item");a.Kg()};b.player.on(_.Wd,c);const d=b.player;b.disposers.push(()=>{d.off(_.Wd,c)})}};
330
+ Xs=function(a,b){return _.w(function*(){const c=yield a.o.get(),d=a.h[b];d.player=c;d.videoEl=c.getSurface().getMedia();d.role=at;d.state=qf;a.trigger(new _.H(pg));try{a.l.set(b,d),a.ka.preloadMedia?(d.config.autoplay&&(a.g.warn(la+`Force disabling autoplay (index: ${b})`),d.config.autoplay=!1),d.preloadPromise=c.load(d.config)):d.preloadPromise=c.preload(d.config),yield d.preloadPromise,d.state=pf,a.trigger(new _.H(pg))}catch(e){7001===e.code?(a.g.info(`Preload aborted (index: ${b})`),d.state=nf):
331
+ (a.g.warn(`Preload failed (index: ${b})`,e),a.trigger(new _.H(_.Xd,{detail:e})),d.state=of),a.trigger(new _.H(pg))}})};Vs=function(a){return _.w(function*(){const b=a.a+1;a.g.info(`Preload following item (index: ${b})`);yield Xs(a,b)})};Ws=function(a){return _.w(function*(){const b=a.a-1;a.g.info(`Preload preceding item (index: ${b})`);yield Xs(a,b)})};
332
+ _.gt=function(a){if(ft.has(a))return ft.get(a);if(window.ManagedMediaSource){var b=ManagedMediaSource.isTypeSupported(a);ft.set(a,b);return b}return window.MediaSource?(b=MediaSource.isTypeSupported(a),ft.set(a,b),b):!1};ht=function(a,b){b=b.replace(/mp2t/i,"mp4");a===_.q&&(b=b.replace(_.t,_.q));if(a=/avc1\.(66|77|100)\.(\d+)/.exec(b)){let d="avc1.";var c=a[1];d="66"===c?d+"4200":"77"===c?d+"4d00":d+"6400";c=Number(a[2]);d+=(c>>4).toString(16);d+=(c&15).toString(16);b=b.replace(a[0],d)}return b};
333
+ it=function(a){const b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();let c;typeof Event===_.ae?c=new Event(b,a):(c=document.createEvent("Event"),c.initEvent(b,a.bubbles,a.cancelable));a.target.dispatchEvent(c)};jt=function(a){a=a.target;if(a.webkitPresentationMode===Ve){document.pictureInPictureElement=a;var b=new Event("enterpictureinpicture");a.dispatchEvent(b)}else document.pictureInPictureElement===a&&(document.pictureInPictureElement=null),b=new Event("leavepictureinpicture"),a.dispatchEvent(b)};
334
+ kt=function(){return this.webkitSupportsPresentationMode(Ve)?(this.webkitSetPresentationMode(Ve),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))};lt=function(){const a=document.pictureInPictureElement;return a?(a.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))};
335
+ mt=function(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}};nt=function(a,b,c){return new window.TextTrackCue(a,b,c)};ot=function(a,b,c){return new window.TextTrackCue(a+"-"+b+"-"+c,a,b,c)};qt=function(a,b,c){if("input"===a)switch(this.type){case "range":a=Zc}pt.call(this,a,b,c)};_.rt=function(a){const b=[];for(const c of a)for(const d of c.variants)b.push(d);return b};
336
+ _.tt=function(a,b){a=_.Um(_.Vm(a),_.Wm(a));_.st[a]=b};_.ut=function(a){a=_.Um(_.Vm(a),_.Wm(a));return _.st[a]||null};_.vt=function(a){a=_.Um(_.Vm(a),_.Wm(a));delete _.st[a]};_.At=function(a){if(!a.w)return null;const b=a.H;switch(a.w){case wt:return`-2px -2px 0 ${b}, -1px -1px 0 ${b}`;case xt:return`2px 2px 0 ${b}, 1px 1px 0 ${b}`;case yt:return`-1px 0 ${b}, 0 1px ${b}, 1px 0 ${b}, `+`0 -1px ${b}`;case zt:return`2px 2px 3px ${b}, 2px 2px 4px ${b}, `+`2px 2px 5px ${b}`;default:return _.Ge}};
337
+ _.Ct=function(a,b,c,d){return _.w(function*(){try{return new (yield Bt(a,b,c,d))}catch(e){throw e.a(_.D),e;}})};
338
+ Bt=function(a,b,c,d){return _.w(function*(){if(d){var e=_.Dt[d.toLowerCase()];if(e)return e;_.C("Could not determine manifest type using MIME type ",d)}if(e=_.Rm(a)){const f=_.Et[e];if(f)return f;_.C("Could not determine manifest type for extension ",e)}else _.C("Could not find extension for ",a);if(!d&&(d=yield Ft(a,b,c))){if(e=_.Dt[d])return e;_.C("Could not determine manifest type using MIME type",d)}throw new _.I(_.D,4,4E3,{url:a});})};
339
+ Ft=function(a,b,c){return _.w(function*(){var d=_.wk(a);tk(d,c);d.type=1;d.method="HEAD";return(d=(yield b.fetch(d).U).headers["content-type"])?d.toLowerCase():""})};_.Tg=[];Xg="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;Yg=typeof Object.defineProperties==_.ae?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};
340
340
  Zg("Promise",function(a){function b(g){this.f=0;this.l=void 0;this.a=[];var h=this.j();try{g(h.resolve,h.reject)}catch(k){h.reject(k)}}function c(){this.a=null}function d(g){return g instanceof b?g:new b(function(h){h(g)})}if(a)return a;c.prototype.f=function(g){if(null==this.a){this.a=[];var h=this;this.h(function(){h.l()})}this.a.push(g)};var e=Xg.setTimeout;c.prototype.h=function(g){e(g,0)};c.prototype.l=function(){for(;this.a&&this.a.length;){var g=this.a;this.a=[];for(var h=0;h<g.length;++h){var k=
341
341
  g[h];g[h]=null;try{k()}catch(l){this.j(l)}}}this.a=null};c.prototype.j=function(g){this.h(function(){throw g;})};b.prototype.j=function(){function g(l){return function(m){k||(k=!0,l.call(h,m))}}var h=this,k=!1;return{resolve:g(this.C),reject:g(this.h)}};b.prototype.C=function(g){if(g===this)this.h(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.F(g);else{a:switch(typeof g){case _.He:var h=null!=g;break a;case _.ae:h=!0;break a;default:h=!1}h?this.B(g):this.o(g)}};
342
342
  b.prototype.B=function(g){var h=void 0;try{h=g.then}catch(k){this.h(k);return}typeof h==_.ae?this.G(h,g):this.o(g)};b.prototype.h=function(g){this.w(2,g)};b.prototype.o=function(g){this.w(1,g)};b.prototype.w=function(g,h){if(0!=this.f)throw Error("Cannot settle("+g+", "+h+"): Promise already settled in state"+this.f);this.f=g;this.l=h;this.A()};b.prototype.A=function(){if(null!=this.a){for(var g=0;g<this.a.length;++g)f.f(this.a[g]);this.a=null}};var f=new c;b.prototype.F=function(g){var h=this.j();
343
- g.Sd(h.resolve,h.reject)};b.prototype.G=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(p,u){return typeof p==_.ae?function(v){try{l(p(v))}catch(y){m(y)}}:u}var l,m,n=new b(function(p,u){l=p;m=u});this.Sd(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.Sd=function(g,h){function k(){switch(l.f){case 1:g(l.l);break;case 2:h(l.l);break;default:throw Error("Unexpected state: "+
344
- l.f);}}var l=this;null==this.a?f.f(k):this.a.push(k)};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=Wg(g),m=l.next();!m.done;m=l.next())d(m.value).Sd(h,k)})};b.all=function(g){var h=Wg(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(v){return function(y){p[v]=y;u--;0==u&&l(p)}}var p=[],u=0;do p.push(void 0),u++,d(k.value).Sd(n(p.length-1),m),k=h.next();while(!k.done)})};return b});var ah=this||self;
345
- ah.a=!0;_.x("clpp.utils.obj.cloneItem",_.dh);_.x("clpp.utils.obj.merge",_.ch);var th={DEFAULT:-1,NONE:0,ERROR:1,WARNING:2,INFO:3,DEBUG:4};_.x("clpp.log.Level",th);var rh=0,qh={},Mt=[];_.x("clpp.log.getLoggers",function(){return _.dh(qh)});_.x("clpp.log.addInterceptor",function(a){a&&Mt.push(a)});_.x("clpp.log.removeInterceptor",function(a){a&&(a=Mt.indexOf(a),0<=a&&Mt.splice(a,1))});_.x("clpp.log.getTagLevel",sh);_.x("clpp.log.hasTagLevel",function(a){return void 0===a?!1:0<=qh[a]});_.x("clpp.log.setTagLevel",function(a,b){a&&(_.jh(b)&&(b=uh(b)),qh[a]=b)});
343
+ g.Ud(h.resolve,h.reject)};b.prototype.G=function(g,h){var k=this.j();try{g.call(h,k.resolve,k.reject)}catch(l){k.reject(l)}};b.prototype.then=function(g,h){function k(p,u){return typeof p==_.ae?function(v){try{l(p(v))}catch(y){m(y)}}:u}var l,m,n=new b(function(p,u){l=p;m=u});this.Ud(k(g,l),k(h,m));return n};b.prototype.catch=function(g){return this.then(void 0,g)};b.prototype.Ud=function(g,h){function k(){switch(l.f){case 1:g(l.l);break;case 2:h(l.l);break;default:throw Error("Unexpected state: "+
344
+ l.f);}}var l=this;null==this.a?f.f(k):this.a.push(k)};b.resolve=d;b.reject=function(g){return new b(function(h,k){k(g)})};b.race=function(g){return new b(function(h,k){for(var l=Wg(g),m=l.next();!m.done;m=l.next())d(m.value).Ud(h,k)})};b.all=function(g){var h=Wg(g),k=h.next();return k.done?d([]):new b(function(l,m){function n(v){return function(y){p[v]=y;u--;0==u&&l(p)}}var p=[],u=0;do p.push(void 0),u++,d(k.value).Ud(n(p.length-1),m),k=h.next();while(!k.done)})};return b});var ah=this||self;
345
+ ah.a=!0;_.x("clpp.utils.obj.cloneItem",_.dh);_.x("clpp.utils.obj.merge",_.ch);var th={DEFAULT:-1,NONE:0,ERROR:1,WARNING:2,INFO:3,DEBUG:4};_.x("clpp.log.Level",th);var rh=0,qh={},Gt=[];_.x("clpp.log.getLoggers",function(){return _.dh(qh)});_.x("clpp.log.addInterceptor",function(a){a&&Gt.push(a)});_.x("clpp.log.removeInterceptor",function(a){a&&(a=Gt.indexOf(a),0<=a&&Gt.splice(a,1))});_.x("clpp.log.getTagLevel",sh);_.x("clpp.log.hasTagLevel",function(a){return void 0===a?!1:0<=qh[a]});_.x("clpp.log.setTagLevel",function(a,b){a&&(_.jh(b)&&(b=uh(b)),qh[a]=b)});
346
346
  _.x("clpp.log.setLogLevel",function(a){-1===a&&(a=3);_.jh(a)&&(a=uh(a));rh=a});_.x("clpp.log.getLogLevel",function(){return rh});
347
- _.S=class{constructor(a){(this.tag=a)&&void 0===qh[a]&&(qh[a]=-1)}log(a,b){if(window.console){if(1<arguments.length){var c=arguments[0];Array.prototype.shift.call(arguments)}else c=3;var d=sh(this.tag);if(0<=d){if(d<c)return}else if(rh<c)return;this.tag&&Array.prototype.unshift.call(arguments,"["+this.tag+"]");d=new Date;d.toISOString&&(d=d.toISOString().substring(11).replace("Z",""),Array.prototype.unshift.call(arguments,d));4===c?console.log.apply(console,arguments):3===c?console.info.apply(console,
348
- arguments):2===c?console.warn.apply(console,arguments):1===c?console.error.apply(console,arguments):console.log.apply(console,arguments);for(const e of Mt)e.call(e,c,arguments)}}info(a){Array.prototype.unshift.call(arguments,3);this.log.apply(this,arguments)}debug(a){Array.prototype.unshift.call(arguments,4);this.log.apply(this,arguments)}warn(a){Array.prototype.unshift.call(arguments,2);this.log.apply(this,arguments)}error(a){Array.prototype.unshift.call(arguments,1);this.log.apply(this,arguments)}wh(a){return a?
349
- this.tag?new _.S(this.tag+"."+a):new _.S(a):this}};_.x("clpp.log.Logger",_.S);_.S.prototype.createChild=_.S.prototype.wh;_.S.prototype.error=_.S.prototype.error;_.S.prototype.warn=_.S.prototype.warn;_.S.prototype.debug=_.S.prototype.debug;_.S.prototype.info=_.S.prototype.info;_.S.prototype.log=_.S.prototype.log;var vh=new _.S("clpp");_.x("clpp.log.info",_.wh);_.x("clpp.log.debug",_.xh);_.x("clpp.log.warn",_.B);_.x("clpp.log.error",_.yh);(function(){const a=console.assert;a?a.bind||(console.assert=function(){a.apply(console,arguments)}):console.assert=function(){}})();var io;io=class{constructor(a,b){this.ab=a;this.sourceIndex=b}};_.Ah=new _.S("clpp.players");_.zh={};_.x("clpp.ads.PodType",{PREROLL:0,MIDROLL:1,POSTROLL:2});_.x("clpp.ads.Technology",{CLIENT_SIDE:0,SERVER_SIDE:1,SERVER_GUIDED:2});_.x("clpp.ads.ErrorType",{LOAD:0,PLAY:1,OTHER:2});var Eh=new _.S("clpp.ads"),Dh=[];_.Nt=class{constructor(a,b="total"){this.length=(this.f=a)?a.length:0;this.a=[];this.type=b}start(a){if(this.f)return this.f.start(a);if(a<this.a.length)return this.a[a].start;throw Error(tb);}end(a){if(this.f)return this.f.end(a);if(a<this.a.length)return this.a[a].end;throw Error(tb);}Lb(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:1===this.length&&0>this.start(0)?0:this.start(0)}Ka(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:this.end(this.length-
350
- 1)}yc(a,b=!0,c=0){if(!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)||a>this.end(this.length-1))return!1;if(b)return c+a>=this.start(0)&&a<=this.end(this.length-1);for(b=0;b<this.length;b++)if(c+a>=this.start(b)&&a<=this.end(b))return!0;return!1}La(a,b=!1){if(!this.length||1===this.length&&1E-6>this.end(0)-this.start(0))return 0;let c=0;if(b)b=this.Ka(),null!=b&&(c=Math.max(0,b-a));else for(b=this.length-1;0<=b&&this.end(b)>a;--b)c+=this.end(b)-Math.max(this.start(b),a);return c}toString(){let a=
351
- "";for(let b=0;b<this.length;b++)0<b&&(a+=" "),a+=`${this.start(b).toFixed(3)}-${this.end(b).toFixed(3)}`;return a}};_.x("clpp.BufferInfo",_.Nt);_.Nt.prototype.bufferedAheadOf=_.Nt.prototype.La;_.Nt.prototype.isBuffered=_.Nt.prototype.yc;_.Nt.prototype.bufferEnd=_.Nt.prototype.Ka;_.Nt.prototype.bufferStart=_.Nt.prototype.Lb;_.Nt.prototype.end=_.Nt.prototype.end;_.Nt.prototype.start=_.Nt.prototype.start;var Lh;Lh=new _.S("clpp.Components");_.Hh=new Map;_.x("clpp.install",function(a){Th(a)});_.x("clpp.uninstall",function(a){Uh(a)});_.H=class extends Error{constructor(a,b,c,d,e){super(Vh(a,b,c,d));this.severity=a;this.category=b;this.code=c;this.data=!d||_.jh(d)?{}:d;this.cause=void 0===e?null:e;this.f=!1;Error.captureStackTrace&&Error.captureStackTrace(this,_.H)}a(a){this.severity!==a&&(this.severity=a,this.message=Vh(this.severity,this.category,this.code,this.data))}toString(){let a=this.message;this.cause&&(a+=`\n Caused by ${this.cause}`);return a}};_.x("clpp.Error",_.H);_.C=2;_.H.Severity={RECOVERABLE:1,FATAL:_.C};
352
- _.H.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,PLUGIN:9,ADS:10};
353
- _.H.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_MODIFIER_ERROR:1006,RESPONSE_MODIFIER_ERROR:1007,MALFORMED_TEST_URI:1008,MALFORMED_URL:1011,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,FETCH_OR_APPEND_ERROR:2010,INVALID_MP4:2011,TEXT_PARSER_MISSING:2012,THUMBNAILS_FAILED_TO_LOAD:2013,THUMBNAIL_ERROR:2014,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,
347
+ _.T=class{constructor(a){(this.tag=a)&&void 0===qh[a]&&(qh[a]=-1)}log(a,b){if(window.console){if(1<arguments.length){var c=arguments[0];Array.prototype.shift.call(arguments)}else c=3;var d=sh(this.tag);if(0<=d){if(d<c)return}else if(rh<c)return;this.tag&&Array.prototype.unshift.call(arguments,"["+this.tag+"]");d=new Date;d.toISOString&&(d=d.toISOString().substring(11).replace("Z",""),Array.prototype.unshift.call(arguments,d));4===c?console.log.apply(console,arguments):3===c?console.info.apply(console,
348
+ arguments):2===c?console.warn.apply(console,arguments):1===c?console.error.apply(console,arguments):console.log.apply(console,arguments);for(const e of Gt)e.call(e,c,arguments)}}info(a){Array.prototype.unshift.call(arguments,3);this.log.apply(this,arguments)}debug(a){Array.prototype.unshift.call(arguments,4);this.log.apply(this,arguments)}warn(a){Array.prototype.unshift.call(arguments,2);this.log.apply(this,arguments)}error(a){Array.prototype.unshift.call(arguments,1);this.log.apply(this,arguments)}Dh(a){return a?
349
+ this.tag?new _.T(this.tag+"."+a):new _.T(a):this}};_.x("clpp.log.Logger",_.T);_.T.prototype.createChild=_.T.prototype.Dh;_.T.prototype.error=_.T.prototype.error;_.T.prototype.warn=_.T.prototype.warn;_.T.prototype.debug=_.T.prototype.debug;_.T.prototype.info=_.T.prototype.info;_.T.prototype.log=_.T.prototype.log;var vh=new _.T("clpp");_.x("clpp.log.info",_.wh);_.x("clpp.log.debug",_.xh);_.x("clpp.log.warn",_.C);_.x("clpp.log.error",_.yh);(function(){const a=console.assert;a?a.bind||(console.assert=function(){a.apply(console,arguments)}):console.assert=function(){}})();var bo;bo=class{constructor(a,b){this.bb=a;this.sourceIndex=b}};_.Ah=new _.T("clpp.players");_.zh={};_.x("clpp.ads.PodType",{PREROLL:0,MIDROLL:1,POSTROLL:2});_.x("clpp.ads.Technology",{CLIENT_SIDE:0,SERVER_SIDE:1,SERVER_GUIDED:2});_.x("clpp.ads.ErrorType",{LOAD:0,PLAY:1,OTHER:2});var Eh=new _.T("clpp.ads"),Dh=[];_.Ht=class{constructor(a,b="total"){this.length=(this.f=a)?a.length:0;this.a=[];this.type=b}start(a){if(this.f)return this.f.start(a);if(a<this.a.length)return this.a[a].start;throw Error(ub);}end(a){if(this.f)return this.f.end(a);if(a<this.a.length)return this.a[a].end;throw Error(ub);}Ob(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:1===this.length&&0>this.start(0)?0:this.start(0)}La(){return!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)?null:this.end(this.length-
350
+ 1)}ec(a,b=!0,c=0){if(!this.length||1===this.length&&1E-6>this.end(0)-this.start(0)||a>this.end(this.length-1))return!1;if(b)return c+a>=this.start(0)&&a<=this.end(this.length-1);for(b=0;b<this.length;b++)if(c+a>=this.start(b)&&a<=this.end(b))return!0;return!1}Ma(a,b=!1){if(!this.length||1===this.length&&1E-6>this.end(0)-this.start(0))return 0;let c=0;if(b)b=this.La(),null!=b&&(c=Math.max(0,b-a));else for(b=this.length-1;0<=b&&this.end(b)>a;--b)c+=this.end(b)-Math.max(this.start(b),a);return c}toString(){let a=
351
+ "";for(let b=0;b<this.length;b++)0<b&&(a+=" "),a+=`${this.start(b).toFixed(3)}-${this.end(b).toFixed(3)}`;return a}};_.x("clpp.BufferInfo",_.Ht);_.Ht.prototype.bufferedAheadOf=_.Ht.prototype.Ma;_.Ht.prototype.isBuffered=_.Ht.prototype.ec;_.Ht.prototype.bufferEnd=_.Ht.prototype.La;_.Ht.prototype.bufferStart=_.Ht.prototype.Ob;_.Ht.prototype.end=_.Ht.prototype.end;_.Ht.prototype.start=_.Ht.prototype.start;var Lh;Lh=new _.T("clpp.Components");_.Jh=new Map;_.x("clpp.install",function(a){Th(a)});_.x("clpp.uninstall",function(a){Uh(a)});_.I=class extends Error{constructor(a,b,c,d,e){super(Vh(a,b,c,d));this.severity=a;this.category=b;this.code=c;this.data=!d||_.jh(d)?{}:d;this.cause=void 0===e?null:e;this.f=!1;Error.captureStackTrace&&Error.captureStackTrace(this,_.I)}a(a){this.severity!==a&&(this.severity=a,this.message=Vh(this.severity,this.category,this.code,this.data))}toString(){let a=this.message;this.cause&&(a+=`\n Caused by ${this.cause}`);return a}};_.x("clpp.Error",_.I);_.D=2;_.I.Severity={RECOVERABLE:1,FATAL:_.D};
352
+ _.I.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,PLUGIN:9,ADS:10};
353
+ _.I.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_MODIFIER_ERROR:1006,RESPONSE_MODIFIER_ERROR:1007,MALFORMED_TEST_URI:1008,MALFORMED_URL:1011,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,FETCH_OR_APPEND_ERROR:2010,INVALID_MP4:2011,TEXT_PARSER_MISSING:2012,THUMBNAILS_FAILED_TO_LOAD:2013,THUMBNAIL_ERROR:2014,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,
354
354
  EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,
355
355
  MP4_PARSER_ERROR:3019,MEDIA_LOAD_ERROR:3100,INVALID_TRACK_TYPE:3101,MEDIA_DECRYPTION_ERROR:3103,PAUSE_FAILED:3201,UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,UNPLAYABLE_PERIOD:4011,RESTRICTIONS_CANNOT_BE_MET:4012,NO_PERIODS:4014,
356
356
  HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_COULD_NOT_GUESS_MIME_TYPE:4021,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,HLS_COULD_NOT_PARSE_SEGMENT_START_TIME:4030,CONTENT_UNSUPPORTED_BY_BROWSER:4032,SMOOTH_INVALID_MANIFEST_XML:4033,
@@ -358,68 +358,68 @@ SMOOTH_EMPTY_PRESENTATION:4034,SMOOTH_MEDIA_PROCESSING_ERROR:4035,SMOOTH_INVALID
358
358
  NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,REQUESTED_DRM_ENVIRONMENT_UNAVAILABLE:6015,INIT_DATA_TRANSFORM_ERROR:6016,CERTIFICATE_REQUEST_FAILED:6100,
359
359
  NO_CONTENT_ID:6101,SERVER_CERTIFICATE_REQUIRED:6102,EXTRACT_CONTENT_ID_MODIFIER_ERROR:6103,FAILED_TO_PERSIST_SESSION:6200,FAILED_TO_REMOVE_SESSION:6201,INVALID_SESSION_STORAGE_IMPLEMENTATION:6202,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,CANNOT_LOAD_SOURCE:7003,MEDIA_ELEMENT_NOT_FOUND:7004,INVALID_MEDIA_ELEMENT:7005,INVALID_CONTAINER_ELEMENT:7006,INVALID_ARGUMENT:7007,WRONG_ORDER_OF_OPERATIONS:7008,NOT_SUPPORTED:7009,INVALID_CONFIGURATION:7100,INVALID_LICENSE:7101,NO_ELEMENT:7102,USER_ID_NOT_PROVIDED:7103,
360
360
  KEY_LOAD_ERROR:7104,TIZEN_INTERNAL_ERROR:7200,CAF_INTERNAL_ERROR:7300,INTERNAL_CAST_ERROR:8E3,CAST_API_NOT_READY:8001,NO_RECEIVERS_AVAILABLE:8002,ALREADY_CASTING:8003,NO_CAST_SESSION:8004,CONVIVA_SDK_NOT_LOADED:9E3,CONVIVA_INVALID_CONFIGURATION:9001,CONVIVA_RUNTIME_ERROR:9002,GL_CONTEXT_ERROR:9003,GL_SHADER_ERROR:9004,YOUBORA_SDK_MISSING:9100,YOUBORA_INVALID_CONFIGURATION:9101,YOUBORA_SDK_VERSION_NOT_SUPPORTED:9102,VIMOND_INVALID_CONFIGURATION:9200,VIMOND_SESSION_ERROR:9201,MUXDATA_INVALID_CONFIGURATION:9300,
361
- MUX_SDK_MISSING:9301,MUXDATA_INIT_ERROR:9302,IMA_SDK_MISSING:1E4,IMA_INVALID_CONFIGURATION:10001,IMA_UNSUPPORTED_PLATFORM:10002,AD_ERROR:10003,SIMID_CONTAINER_MISSING:10100,BROADPEAK_SDK_MISSING:11E3,BROADPEAK_SESSION_ERROR:11001,FREEWHEEL_SDK_MISSING:12E3,FREEWHEEL_INVALID_CONFIGURATION:12001,CONTENT_TRANSFORMATION_FAILED:14E3,SESSIONS_INVALID_CONFIGURATION:15E3};_.sl=class extends Error{constructor(a,b){super(a);this.code=b}};_.G=class{constructor(a,b){if(b)for(const c in b)this[c]=b[c];this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.f=this.a=!1}preventDefault(){this.cancelable&&(this.defaultPrevented=!0)}stopImmediatePropagation(){this.f=!0}stopPropagation(){}};_.Ot=class{constructor(){this.a={}}push(a,b){a in this.a?this.a[a].push(b):this.a[a]=[b]}get(a){return(a=this.a[a])?a.slice():[]}remove(a,b){a=this.a[a];if(!a)return!1;let c=!1;for(let d=0;d<a.length;++d)a[d]===b&&(a.splice(d,1),--d,c=!0);return c}clear(){this.a={}}forEach(a){for(const b in this.a)a(b,this.a[b])}};var Pt;_.Qt=class{constructor(){this.a=new _.Ot}release(){_.Xh(this)}on(a,b,c,d=!1){a=new Pt(a,b,c,d);this.a.push(b,a)}one(a,b,c){const d=e=>{this.off(a,b,d);return c(e)};this.on(a,b,d)}off(a,b,c){const d=this.a.get(b)||[];for(let e=0;e<d.length;++e){const f=d[e];f.target!==a||c!==f.a&&c||(Wh(f),this.a.remove(b,f))}}};Pt=class{constructor(a,b,c,d){this.target=a;this.type=b;this.a=c;this.f=d;this.target.addEventListener(b,c,d)}};var Rt=class{constructor(a,b,c,d){this.h=a;this.a=b;this.f=c;this.j=!!d}trigger(a){try{this.a.handleEvent?this.a.handleEvent(a):this.a.call(this.f,a)}catch(b){_.yh("clpp","Uncaught exception in event handler for event '"+this.h+"'",b,b?b.message:null,b?b.stack:null)}}};var St=class{constructor(a){this.a=new _.Ot;this.f=a}trigger(a){const b=this.a.get(a.type);if(b)for(let c=0;c<b.length&&(a.target=this.f,a.currentTarget=this.f,b[c].trigger(a),b[c].j&&this.a.remove(a.type,b[c]),!a||!a.f);c++);}on(a,b,c){this.a.push(a,new Rt(a,b,c||this.f));return b}one(a,b,c){this.a.push(a,new Rt(a,b,c||this.f,!0));return b}off(a,b){const c=this.a.get(a);let d=!1;if(c)for(let e=0;e<c.length;e++)c[e].a===b&&(d=this.a.remove(a,c[e])||d);return d}clear(){this.a.clear()}};_.Tt=class{constructor(){this.gd=new St(this);this.dd=[]}addEventListener(a,b){this.on(a,b)}removeEventListener(a,b){this.off(a,b)}on(a,b,c){return this.gd.on(a,b,c)}one(a,b,c){return this.gd.one(a,b,c)}off(a,b){return this.gd.off(a,b)}forwardEventsTo(a){a&&(0<=this.dd.indexOf(a)||this.dd.push(a))}dispatchEvent(a){this.trigger(a);return a.defaultPrevented}stopForwardingEventsTo(a){a&&(a=this.dd.indexOf(a),0<=a&&this.dd.splice(a,1))}trigger(a){this.gd.trigger(a);for(const b of this.dd)b.dispatchEvent(a)}};
362
- _.Tt.prototype.off=_.Tt.prototype.off;_.Tt.prototype.one=_.Tt.prototype.one;_.Tt.prototype.on=_.Tt.prototype.on;_.Tt.prototype.removeEventListener=_.Tt.prototype.removeEventListener;_.Tt.prototype.addEventListener=_.Tt.prototype.addEventListener;var Ut=class{load(){}start(){}o(){}resume(){}pause(){}skip(){}getVolume(){}setVolume(){}getPosition(){}h(){}l(){}};_.x("clpp.ads.IAdsManager",Ut);Ut.prototype.getPosition=Ut.prototype.getPosition;Ut.prototype.setVolume=Ut.prototype.setVolume;Ut.prototype.getVolume=Ut.prototype.getVolume;Ut.prototype.skip=Ut.prototype.skip;Ut.prototype.pause=Ut.prototype.pause;Ut.prototype.resume=Ut.prototype.resume;_.x("clpp.events.ERROR",_.Xd);_.x("clpp.events.LOADEDMETADATA",_.ue);_.x("clpp.events.BUFFERING_ENDED",_.Nc);_.x("clpp.events.BUFFERING_STARTED",_.Oc);_.x("clpp.events.STATE_CHANGED",_.Qf);_.x("clpp.events.AUDIO_TRACK_CHANGED",_.Jc);_.x("clpp.events.TEXT_TRACK_CHANGED",_.ag);_.x("clpp.events.VIDEO_TRACK_CHANGED",_.Bg);_.x("clpp.events.BITRATE_CHANGED",_.Lc);_.x("clpp.events.TRACKS_ADDED",_.gg);_.x("clpp.events.LOAD_START",ve);_.x("clpp.events.RELEASING",_.xf);_.x("clpp.events.RELEASED",wf);
363
- _.x("clpp.events.DESTROYING","destroying");_.x("clpp.events.DESTROYED","destroyed");_.x("clpp.events.VIDEO_BUFFER_CHANGED",_.Ag);_.x("clpp.events.AUDIO_BUFFER_CHANGED",_.Ic);_.x("clpp.events.DOWNLOAD_TRACE","downloadtrace");_.x("clpp.events.DRM_SESSION_CREATED",Md);_.x("clpp.events.DRM_SESSION_UPDATE",_.Qd);_.x("clpp.events.DRM_SESSION_PERSISTED",_.Nd);_.x("clpp.events.DRM_RENEWAL_STARTED",Ld);_.x("clpp.events.DRM_EXPIRATION_UPDATE",_.Jd);_.x("clpp.events.DRM_LICENSE_REQUESTED",Kd);
364
- _.x("clpp.events.AUTOPLAY_NOT_ALLOWED",_.Kc);_.x("clpp.events.PLAY",_.We);_.x("clpp.events.SEEKING",_.If);_.x("clpp.events.SEEKED",_.Hf);_.x("clpp.events.USER_SEEKING",_.tg);_.x("clpp.events.USER_SEEKED",_.sg);_.Ds={SEEKING:1,NO_DATA:2};_.x("clpp.events.BufferingReasons",_.Ds);_.x("clpp.events.ADS_TIMELINE_CHANGED",_.pc);_.x("clpp.events.AD_LOADED",_.fc);_.x("clpp.events.AD_BREAK_STARTED",_.Sb);_.x("clpp.events.AD_STARTED",_.lc);_.x("clpp.events.AD_BUFFERING",_.Ub);_.x("clpp.events.AD_PROGRESS",_.ic);
365
- _.x("clpp.events.AD_FIRST_QUARTILE",_.Xb);_.x("clpp.events.AD_MIDPOINT",_.gc);_.x("clpp.events.AD_THIRD_QUARTILE",_.nc);_.x("clpp.events.AD_PAUSED",_.hc);_.x("clpp.events.AD_RESUMED",_.jc);_.x("clpp.events.AD_SKIPPED",_.kc);_.x("clpp.events.AD_CLICKED",_.Vb);_.x("clpp.events.AD_IMPRESSION",_.dc);_.x("clpp.events.AD_COMPLETED",_.Wb);_.x("clpp.events.AD_STOPPED",_.mc);_.x("clpp.events.AD_BREAK_STOPPED",_.Tb);_.x("clpp.events.AD_HLS_ASSET_LIST_REQUEST",Yb);
366
- _.x("clpp.events.AD_HLS_ASSET_LIST_RESPONSE",Zb);_.x("clpp.events.AD_HLS_RESOLVED",$b);_.x("clpp.events.SIMID_CREATIVE_STARTED",_.Kf);_.x("clpp.events.SIMID_CREATIVE_STOPPED",_.Lf);_.x("clpp.events.CASTING_STARTED",_.Rc);_.x("clpp.events.CASTING_ENDED","castingended");_.x("clpp.events.CAST_STATUS_CHANGED",_.Sc);_.x("clpp.events.AIRPLAY_STATUS_CHANGED",_.uc);_.x("clpp.events.AIRPLAY_CASTING_STARTED",_.rc);_.x("clpp.events.AIRPLAY_CASTING_ENDED",_.qc);_.x("clpp.events.TIMELINE_CUE_ADDED",_.bg);
367
- _.x("clpp.events.TIMELINE_CUE_ENTER",_.cg);_.x("clpp.events.TIMELINE_CUE_EXIT",_.dg);_.x("clpp.events.TIMELINE_CUES_CHANGED",_.eg);_.x("clpp.events.MPD_TYPE_CHANGED",_.Ee);_.x("clpp.events.LIVE_TURNED_STATIC",_.oe);_.x("clpp.events.VIMOND_RESPONSE",_.Cg);_.x("clpp.events.PLAYLIST_ITEM_CHANGED",_.hf);_.x("clpp.events.PLAYLIST_MODIFIED",_.jf);_.x("clpp.events.SC_PLAYLIST_TIMELINE_CHANGED",_.Ff);_.x("clpp.events.SC_PLAYLIST_ITEM_CHANGED",_.Df);_.x("clpp.events.SC_PLAYLIST_ENDED",_.Cf);
368
- _.x("clpp.events.SC_PLAYLIST_LIVE_TURNED_STATIC",_.Ef);_.x("clpp.events.CDN_SWITCH_SUCCESS",_.Tc);_.x("clpp.events.ONLINE_STATUS_CHANGED",Oe);_.x("clpp.events.CMSD_EVENT","cmsd-event");_.x("clpp.events.YOSPACE_SESSION_STARTED",_.Rg);_.x("clpp.events.YOSPACE_SESSION_ENDED",_.Qg);_.x("clpp.events.CONTENT_STEERING_CHANGE",_.xd);_.x("clpp.events.CONTENT_STEERING_LOCATION_BAN_UPDATE",_.yd);var T=class{lb(){}nb(){}sb(){}getId(){}getCreativeId(){}Nb(){}getApiFramework(){}getAdSystem(){}getAdvertiserName(){}getTitle(){}getDuration(){}getPosition(){}getSkipTimeOffset(){}Rb(){}ob(){}getMediaUrl(){}cb(){}bb(){}Oa(){}Pa(){}getPodIndex(){}Gb(){}qb(){}eb(){}getWrapperAdIds(){}getWrapperAdSystems(){}getWrapperCreativeIds(){}Pb(){}canSeek(){}};_.x("clpp.ads.IAd",T);T.prototype.canSeek=T.prototype.canSeek;T.prototype.getVideoElement=T.prototype.Pb;T.prototype.getWrapperCreativeIds=T.prototype.getWrapperCreativeIds;
369
- T.prototype.getWrapperAdSystems=T.prototype.getWrapperAdSystems;T.prototype.getWrapperAdIds=T.prototype.getWrapperAdIds;T.prototype.getSequenceLength=T.prototype.eb;T.prototype.getPositionInSequence=T.prototype.qb;T.prototype.getPodTimeOffset=T.prototype.Gb;T.prototype.getPodIndex=T.prototype.getPodIndex;T.prototype.getPodType=T.prototype.Pa;T.prototype.getMediaBitrate=T.prototype.Oa;T.prototype.getMediaHeight=T.prototype.bb;T.prototype.getMediaWidth=T.prototype.cb;T.prototype.getMediaUrl=T.prototype.getMediaUrl;
370
- T.prototype.getClickThroughUrl=T.prototype.ob;T.prototype.isBumper=T.prototype.Rb;T.prototype.getSkipTimeOffset=T.prototype.getSkipTimeOffset;T.prototype.getPosition=T.prototype.getPosition;T.prototype.getDuration=T.prototype.getDuration;T.prototype.getTitle=T.prototype.getTitle;T.prototype.getAdvertiserName=T.prototype.getAdvertiserName;T.prototype.getAdSystem=T.prototype.getAdSystem;T.prototype.getApiFramework=T.prototype.getApiFramework;T.prototype.getSourceId=T.prototype.Nb;
371
- T.prototype.getCreativeId=T.prototype.getCreativeId;T.prototype.getId=T.prototype.getId;T.prototype.getTechnology=T.prototype.sb;T.prototype.getAdManagerVersion=T.prototype.nb;T.prototype.getAdManagerName=T.prototype.lb;var I=class{constructor(a,b,c,d,e,f,g){this.w=this.o=this.l=!1;this.F=a;this.f=b;this.a=c;this.h=d;this.j=0;this.B=`${e}:${b}`;this.G=e;this.videoEl=null;this.A=f;this.C=g||null}lb(){return""}nb(){return""}sb(){return 2}getId(){return this.B}getCreativeId(){return""}Nb(){return this.G}getApiFramework(){return null}getAdSystem(){return""}getAdvertiserName(){return""}getTitle(){return""}getDuration(){return this.h}getPosition(){return this.j}getSkipTimeOffset(){return-1}canSeek(){return this.A}Rb(){return!1}ob(){return null}getMediaUrl(){return null}cb(){return 0}bb(){return 0}Oa(){return 0}Pa(){return this.F}getPodIndex(){return 0}Gb(){return 0}qb(){return this.f}eb(){return this.a}getWrapperAdIds(){return[]}getWrapperAdSystems(){return[]}getWrapperCreativeIds(){return[]}Pb(){return this.videoEl}Oh(){return this.C}};
372
- I.prototype.getCustomAttributes=I.prototype.Oh;I.prototype.getVideoElement=I.prototype.Pb;I.prototype.getWrapperCreativeIds=I.prototype.getWrapperCreativeIds;I.prototype.getWrapperAdSystems=I.prototype.getWrapperAdSystems;I.prototype.getWrapperAdIds=I.prototype.getWrapperAdIds;I.prototype.getSequenceLength=I.prototype.eb;I.prototype.getPositionInSequence=I.prototype.qb;I.prototype.getPodTimeOffset=I.prototype.Gb;I.prototype.getPodIndex=I.prototype.getPodIndex;I.prototype.getPodType=I.prototype.Pa;
373
- I.prototype.getMediaBitrate=I.prototype.Oa;I.prototype.getMediaHeight=I.prototype.bb;I.prototype.getMediaWidth=I.prototype.cb;I.prototype.getMediaUrl=I.prototype.getMediaUrl;I.prototype.getClickThroughUrl=I.prototype.ob;I.prototype.isBumper=I.prototype.Rb;I.prototype.canSeek=I.prototype.canSeek;I.prototype.getSkipTimeOffset=I.prototype.getSkipTimeOffset;I.prototype.getPosition=I.prototype.getPosition;I.prototype.getDuration=I.prototype.getDuration;I.prototype.getTitle=I.prototype.getTitle;
374
- I.prototype.getAdvertiserName=I.prototype.getAdvertiserName;I.prototype.getAdSystem=I.prototype.getAdSystem;I.prototype.getApiFramework=I.prototype.getApiFramework;I.prototype.getSourceId=I.prototype.Nb;I.prototype.getCreativeId=I.prototype.getCreativeId;I.prototype.getId=I.prototype.getId;I.prototype.getTechnology=I.prototype.sb;I.prototype.getAdManagerVersion=I.prototype.nb;I.prototype.getAdManagerName=I.prototype.lb;var Vt=class{constructor(a){this.a=a.map(b=>({Xb:b.getSurface().getMedia().id,player:b,Rd:!0,ready:Promise.resolve()}));this.g=new _.S("clpp.playlist.PlayerPool")}has(){return this.a.some(a=>a.Rd)}get(){const a=this;return _.w(function*(){const b=a.a.find(c=>c.Rd);if(!b)throw Error("No available players in the pool");b.Rd=!1;yield b.ready;return b.player})}release(a){const b=this.a.find(c=>c.player===a);if(!b)return Promise.resolve();b.Rd=!0;b.ready=new Promise(c=>{a.release().catch(d=>{this.g.error("Failed to unload player",
375
- d)}).then(c)});return b.ready}destroy(){const a=this;return _.w(function*(){yield Promise.all(a.a.map(b=>b.player.destroy()))})}};var Wt=class{};_.x("clpp.utils.BufferUtils",Wt);Wt.toArrayBuffer=ni;Wt.toDataView=_.mi;Wt.toInt32Array=_.li;Wt.toUint32Array=ki;Wt.toUint16Array=ji;Wt.toUint8Array=_.F;Wt.equal=hi;var qi=new _.S("clpp.utils.strings");_.x("clpp.utils.strings.fromUtf8",_.pi);_.x("clpp.utils.strings.fromBytesAutoDetect",_.si);_.x("clpp.utils.strings.toUtf8",_.ti);_.x("clpp.utils.strings.toUtf16",_.ui);_.x("clpp.utils.strings.toByteArray",_.vi);_.x("clpp.utils.strings.startsWith",_.wi);_.x("clpp.utils.strings.endsWith",_.xi);_.x("clpp.utils.strings.bitrateToString",_.Ai);
361
+ MUX_SDK_MISSING:9301,MUXDATA_INIT_ERROR:9302,IMA_SDK_MISSING:1E4,IMA_INVALID_CONFIGURATION:10001,IMA_UNSUPPORTED_PLATFORM:10002,AD_ERROR:10003,SIMID_CONTAINER_MISSING:10100,BROADPEAK_SDK_MISSING:11E3,BROADPEAK_SESSION_ERROR:11001,FREEWHEEL_SDK_MISSING:12E3,FREEWHEEL_INVALID_CONFIGURATION:12001,CONTENT_TRANSFORMATION_FAILED:14E3,SESSIONS_INVALID_CONFIGURATION:15E3};_.ql=class extends Error{constructor(a,b){super(a);this.code=b}};_.H=class{constructor(a,b){if(b)for(const c in b)this[c]=b[c];this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=a;this.isTrusted=!1;this.target=this.currentTarget=null;this.f=this.a=!1}preventDefault(){this.cancelable&&(this.defaultPrevented=!0)}stopImmediatePropagation(){this.f=!0}stopPropagation(){}};_.It=class{constructor(){this.a={}}push(a,b){a in this.a?this.a[a].push(b):this.a[a]=[b]}get(a){return(a=this.a[a])?a.slice():[]}remove(a,b){a=this.a[a];if(!a)return!1;let c=!1;for(let d=0;d<a.length;++d)a[d]===b&&(a.splice(d,1),--d,c=!0);return c}clear(){this.a={}}forEach(a){for(const b in this.a)a(b,this.a[b])}};var Jt;_.Kt=class{constructor(){this.a=new _.It}release(){_.Xh(this)}on(a,b,c,d=!1){a=new Jt(a,b,c,d);this.a.push(b,a)}one(a,b,c){const d=e=>{this.off(a,b,d);return c(e)};this.on(a,b,d)}off(a,b,c){const d=this.a.get(b)||[];for(let e=0;e<d.length;++e){const f=d[e];f.target!==a||c!==f.a&&c||(Wh(f),this.a.remove(b,f))}}};Jt=class{constructor(a,b,c,d){this.target=a;this.type=b;this.a=c;this.f=d;this.target.addEventListener(b,c,d)}};var Lt=class{constructor(a,b,c,d){this.h=a;this.a=b;this.f=c;this.j=!!d}trigger(a){try{this.a.handleEvent?this.a.handleEvent(a):this.a.call(this.f,a)}catch(b){_.yh("clpp","Uncaught exception in event handler for event '"+this.h+"'",b,b?b.message:null,b?b.stack:null)}}};var Mt=class{constructor(a){this.a=new _.It;this.f=a}trigger(a){const b=this.a.get(a.type);if(b)for(let c=0;c<b.length&&(a.target=this.f,a.currentTarget=this.f,b[c].trigger(a),b[c].j&&this.a.remove(a.type,b[c]),!a||!a.f);c++);}on(a,b,c){this.a.push(a,new Lt(a,b,c||this.f));return b}one(a,b,c){this.a.push(a,new Lt(a,b,c||this.f,!0));return b}off(a,b){const c=this.a.get(a);let d=!1;if(c)for(let e=0;e<c.length;e++)c[e].a===b&&(d=this.a.remove(a,c[e])||d);return d}clear(){this.a.clear()}};_.Nt=class{constructor(){this.kd=new Mt(this);this.gd=[]}addEventListener(a,b){this.on(a,b)}removeEventListener(a,b){this.off(a,b)}on(a,b,c){return this.kd.on(a,b,c)}one(a,b,c){return this.kd.one(a,b,c)}off(a,b){return this.kd.off(a,b)}forwardEventsTo(a){a&&(0<=this.gd.indexOf(a)||this.gd.push(a))}dispatchEvent(a){this.trigger(a);return a.defaultPrevented}stopForwardingEventsTo(a){a&&(a=this.gd.indexOf(a),0<=a&&this.gd.splice(a,1))}trigger(a){this.kd.trigger(a);for(const b of this.gd)b.dispatchEvent(a)}};
362
+ _.Nt.prototype.off=_.Nt.prototype.off;_.Nt.prototype.one=_.Nt.prototype.one;_.Nt.prototype.on=_.Nt.prototype.on;_.Nt.prototype.removeEventListener=_.Nt.prototype.removeEventListener;_.Nt.prototype.addEventListener=_.Nt.prototype.addEventListener;var Ot=class{load(){}A(){}o(){}resume(){}pause(){}skip(){}getVolume(){}setVolume(){}getPosition(){}j(){}l(){}};_.x("clpp.ads.IAdsManager",Ot);Ot.prototype.getPosition=Ot.prototype.getPosition;Ot.prototype.setVolume=Ot.prototype.setVolume;Ot.prototype.getVolume=Ot.prototype.getVolume;Ot.prototype.skip=Ot.prototype.skip;Ot.prototype.pause=Ot.prototype.pause;Ot.prototype.resume=Ot.prototype.resume;_.x("clpp.events.ERROR",_.Xd);_.x("clpp.events.LOADEDMETADATA",_.ue);_.x("clpp.events.BUFFERING_ENDED",_.Oc);_.x("clpp.events.BUFFERING_STARTED",_.Pc);_.x("clpp.events.STATE_CHANGED",_.Qf);_.x("clpp.events.AUDIO_TRACK_CHANGED",_.Kc);_.x("clpp.events.TEXT_TRACK_CHANGED",_.ag);_.x("clpp.events.VIDEO_TRACK_CHANGED",_.Bg);_.x("clpp.events.BITRATE_CHANGED",_.Mc);_.x("clpp.events.TRACKS_ADDED",_.gg);_.x("clpp.events.LOAD_START",ve);_.x("clpp.events.RELEASING",_.xf);_.x("clpp.events.RELEASED",wf);
363
+ _.x("clpp.events.DESTROYING","destroying");_.x("clpp.events.DESTROYED","destroyed");_.x("clpp.events.VIDEO_BUFFER_CHANGED",_.Ag);_.x("clpp.events.AUDIO_BUFFER_CHANGED",_.Jc);_.x("clpp.events.DOWNLOAD_TRACE","downloadtrace");_.x("clpp.events.DRM_SESSION_CREATED",Nd);_.x("clpp.events.DRM_SESSION_UPDATE",_.Qd);_.x("clpp.events.DRM_SESSION_PERSISTED",_.Pd);_.x("clpp.events.DRM_RENEWAL_STARTED",Md);_.x("clpp.events.DRM_EXPIRATION_UPDATE",_.Kd);_.x("clpp.events.DRM_LICENSE_REQUESTED",Ld);
364
+ _.x("clpp.events.AUTOPLAY_NOT_ALLOWED",_.Lc);_.x("clpp.events.PLAY",_.We);_.x("clpp.events.SEEKING",_.If);_.x("clpp.events.SEEKED",_.Hf);_.x("clpp.events.USER_SEEKING",_.tg);_.x("clpp.events.USER_SEEKED",_.sg);_.us={SEEKING:1,NO_DATA:2};_.x("clpp.events.BufferingReasons",_.us);_.x("clpp.events.ADS_TIMELINE_CHANGED",_.pc);_.x("clpp.events.AD_LOADED",_.ec);_.x("clpp.events.AD_BREAK_STARTED",_.Tb);_.x("clpp.events.AD_STARTED",_.lc);_.x("clpp.events.AD_BUFFERING",_.Vb);_.x("clpp.events.AD_PROGRESS",_.ic);
365
+ _.x("clpp.events.AD_FIRST_QUARTILE",_.Yb);_.x("clpp.events.AD_MIDPOINT",_.gc);_.x("clpp.events.AD_THIRD_QUARTILE",_.nc);_.x("clpp.events.AD_PAUSED",_.hc);_.x("clpp.events.AD_RESUMED",_.jc);_.x("clpp.events.AD_SKIPPED",_.kc);_.x("clpp.events.AD_CLICKED",_.Wb);_.x("clpp.events.AD_IMPRESSION",_.bc);_.x("clpp.events.AD_COMPLETED",_.Xb);_.x("clpp.events.AD_STOPPED",_.mc);_.x("clpp.events.AD_BREAK_STOPPED",_.Ub);_.x("clpp.events.AD_HLS_ASSET_LIST_REQUEST",Zb);
366
+ _.x("clpp.events.AD_HLS_ASSET_LIST_RESPONSE",$b);_.x("clpp.events.AD_HLS_RESOLVED",ac);_.x("clpp.events.SIMID_CREATIVE_STARTED",_.Kf);_.x("clpp.events.SIMID_CREATIVE_STOPPED",_.Lf);_.x("clpp.events.CASTING_STARTED",_.Sc);_.x("clpp.events.CASTING_ENDED","castingended");_.x("clpp.events.CAST_STATUS_CHANGED",_.Tc);_.x("clpp.events.CAST_VISIBILITY_CHANGED",_.Uc);_.x("clpp.events.AIRPLAY_STATUS_CHANGED",_.tc);_.x("clpp.events.AIRPLAY_CASTING_STARTED",_.sc);_.x("clpp.events.AIRPLAY_CASTING_ENDED",_.qc);
367
+ _.x("clpp.events.TIMELINE_CUE_ADDED",_.bg);_.x("clpp.events.TIMELINE_CUE_ENTER",_.cg);_.x("clpp.events.TIMELINE_CUE_EXIT",_.dg);_.x("clpp.events.TIMELINE_CUES_CHANGED",_.eg);_.x("clpp.events.MPD_TYPE_CHANGED",_.Ee);_.x("clpp.events.LIVE_TURNED_STATIC",_.oe);_.x("clpp.events.VIMOND_RESPONSE",_.Cg);_.x("clpp.events.PLAYLIST_ITEM_CHANGED",_.hf);_.x("clpp.events.PLAYLIST_MODIFIED",_.kf);_.x("clpp.events.SC_PLAYLIST_TIMELINE_CHANGED",_.Ff);_.x("clpp.events.SC_PLAYLIST_ITEM_CHANGED",_.Df);
368
+ _.x("clpp.events.SC_PLAYLIST_ENDED",_.Cf);_.x("clpp.events.SC_PLAYLIST_LIVE_TURNED_STATIC",_.Ef);_.x("clpp.events.CDN_SWITCH_SUCCESS",_.Vc);_.x("clpp.events.ONLINE_STATUS_CHANGED",Oe);_.x("clpp.events.CMSD_EVENT","cmsd-event");_.x("clpp.events.YOSPACE_SESSION_STARTED",_.Rg);_.x("clpp.events.YOSPACE_SESSION_ENDED",_.Qg);_.x("clpp.events.CONTENT_STEERING_CHANGE",_.yd);_.x("clpp.events.CONTENT_STEERING_LOCATION_BAN_UPDATE",_.zd);var U=class{nb(){}ob(){}ub(){}getId(){}getCreativeId(){}Qb(){}getApiFramework(){}getAdSystem(){}getAdvertiserName(){}getTitle(){}getDuration(){}getPosition(){}getSkipTimeOffset(){}Ub(){}pb(){}getMediaUrl(){}eb(){}cb(){}Pa(){}Qa(){}getPodIndex(){}Hb(){}rb(){}fb(){}getWrapperAdIds(){}getWrapperAdSystems(){}getWrapperCreativeIds(){}Sb(){}canSeek(){}};_.x("clpp.ads.IAd",U);U.prototype.canSeek=U.prototype.canSeek;U.prototype.getVideoElement=U.prototype.Sb;U.prototype.getWrapperCreativeIds=U.prototype.getWrapperCreativeIds;
369
+ U.prototype.getWrapperAdSystems=U.prototype.getWrapperAdSystems;U.prototype.getWrapperAdIds=U.prototype.getWrapperAdIds;U.prototype.getSequenceLength=U.prototype.fb;U.prototype.getPositionInSequence=U.prototype.rb;U.prototype.getPodTimeOffset=U.prototype.Hb;U.prototype.getPodIndex=U.prototype.getPodIndex;U.prototype.getPodType=U.prototype.Qa;U.prototype.getMediaBitrate=U.prototype.Pa;U.prototype.getMediaHeight=U.prototype.cb;U.prototype.getMediaWidth=U.prototype.eb;U.prototype.getMediaUrl=U.prototype.getMediaUrl;
370
+ U.prototype.getClickThroughUrl=U.prototype.pb;U.prototype.isBumper=U.prototype.Ub;U.prototype.getSkipTimeOffset=U.prototype.getSkipTimeOffset;U.prototype.getPosition=U.prototype.getPosition;U.prototype.getDuration=U.prototype.getDuration;U.prototype.getTitle=U.prototype.getTitle;U.prototype.getAdvertiserName=U.prototype.getAdvertiserName;U.prototype.getAdSystem=U.prototype.getAdSystem;U.prototype.getApiFramework=U.prototype.getApiFramework;U.prototype.getSourceId=U.prototype.Qb;
371
+ U.prototype.getCreativeId=U.prototype.getCreativeId;U.prototype.getId=U.prototype.getId;U.prototype.getTechnology=U.prototype.ub;U.prototype.getAdManagerVersion=U.prototype.ob;U.prototype.getAdManagerName=U.prototype.nb;var J=class{constructor(a,b,c,d,e,f,g){this.w=this.o=this.l=!1;this.F=a;this.f=b;this.a=c;this.h=d;this.j=0;this.B=`${e}:${b}`;this.G=e;this.videoEl=null;this.A=f;this.C=g||null}nb(){return""}ob(){return""}ub(){return 2}getId(){return this.B}getCreativeId(){return""}Qb(){return this.G}getApiFramework(){return null}getAdSystem(){return""}getAdvertiserName(){return""}getTitle(){return""}getDuration(){return this.h}getPosition(){return this.j}getSkipTimeOffset(){return-1}canSeek(){return this.A}Ub(){return!1}pb(){return null}getMediaUrl(){return null}eb(){return 0}cb(){return 0}Pa(){return 0}Qa(){return this.F}getPodIndex(){return 0}Hb(){return 0}rb(){return this.f}fb(){return this.a}getWrapperAdIds(){return[]}getWrapperAdSystems(){return[]}getWrapperCreativeIds(){return[]}Sb(){return this.videoEl}Vh(){return this.C}};
372
+ J.prototype.getCustomAttributes=J.prototype.Vh;J.prototype.getVideoElement=J.prototype.Sb;J.prototype.getWrapperCreativeIds=J.prototype.getWrapperCreativeIds;J.prototype.getWrapperAdSystems=J.prototype.getWrapperAdSystems;J.prototype.getWrapperAdIds=J.prototype.getWrapperAdIds;J.prototype.getSequenceLength=J.prototype.fb;J.prototype.getPositionInSequence=J.prototype.rb;J.prototype.getPodTimeOffset=J.prototype.Hb;J.prototype.getPodIndex=J.prototype.getPodIndex;J.prototype.getPodType=J.prototype.Qa;
373
+ J.prototype.getMediaBitrate=J.prototype.Pa;J.prototype.getMediaHeight=J.prototype.cb;J.prototype.getMediaWidth=J.prototype.eb;J.prototype.getMediaUrl=J.prototype.getMediaUrl;J.prototype.getClickThroughUrl=J.prototype.pb;J.prototype.isBumper=J.prototype.Ub;J.prototype.canSeek=J.prototype.canSeek;J.prototype.getSkipTimeOffset=J.prototype.getSkipTimeOffset;J.prototype.getPosition=J.prototype.getPosition;J.prototype.getDuration=J.prototype.getDuration;J.prototype.getTitle=J.prototype.getTitle;
374
+ J.prototype.getAdvertiserName=J.prototype.getAdvertiserName;J.prototype.getAdSystem=J.prototype.getAdSystem;J.prototype.getApiFramework=J.prototype.getApiFramework;J.prototype.getSourceId=J.prototype.Qb;J.prototype.getCreativeId=J.prototype.getCreativeId;J.prototype.getId=J.prototype.getId;J.prototype.getTechnology=J.prototype.ub;J.prototype.getAdManagerVersion=J.prototype.ob;J.prototype.getAdManagerName=J.prototype.nb;var Pt=class{constructor(a){this.a=a.map(b=>({$b:b.getSurface().getMedia().id,player:b,Td:!0,ready:Promise.resolve()}));this.g=new _.T("clpp.playlist.PlayerPool")}has(){return this.a.some(a=>a.Td)}get(){const a=this;return _.w(function*(){const b=a.a.find(c=>c.Td);if(!b)throw Error("No available players in the pool");b.Td=!1;yield b.ready;return b.player})}release(a){const b=this.a.find(c=>c.player===a);if(!b)return Promise.resolve();b.Td=!0;b.ready=new Promise(c=>{a.release().catch(d=>{this.g.error("Failed to unload player",
375
+ d)}).then(c)});return b.ready}destroy(){const a=this;return _.w(function*(){yield Promise.all(a.a.map(b=>b.player.destroy()))})}};var Qt=class{};_.x("clpp.utils.BufferUtils",Qt);Qt.toArrayBuffer=li;Qt.toDataView=_.ki;Qt.toInt32Array=_.ji;Qt.toUint32Array=ii;Qt.toUint16Array=hi;Qt.toUint8Array=_.G;Qt.equal=fi;var oi=new _.T("clpp.utils.strings");_.x("clpp.utils.strings.fromUtf8",_.ni);_.x("clpp.utils.strings.fromBytesAutoDetect",_.qi);_.x("clpp.utils.strings.toUtf8",_.ri);_.x("clpp.utils.strings.toUtf16",_.si);_.x("clpp.utils.strings.toByteArray",_.ti);_.x("clpp.utils.strings.startsWith",_.ui);_.x("clpp.utils.strings.endsWith",_.vi);_.x("clpp.utils.strings.bitrateToString",_.yi);
376
376
  _.x("clpp.utils.strings.durationToString",function(a,b="%h:%mm:%ss"){if(null===a||void 0===a)a=0;if(null===b||void 0===b)b="%h:%mm:%ss";const c=Math.floor(a/3600),d=Math.floor((a-3600*c)/60);a=Math.floor(a-3600*c-60*d);const e=(g,h)=>g.length<h?e("0"+g,h):g,f=g=>(h,k)=>e(g,k.length-1);return b.replace(/(%h+)/,f(String(c))).replace(/(%m+)/,f(String(d))).replace(/(%s+)/,f(String(a)))});
377
- _.x("clpp.utils.strings.hashCode",function(a){let b=0;if(0===a.length)return b;for(let c=0;c<a.length;c++)b=(b<<5)-b+a.charCodeAt(c),b|=0;return b});var Bi=document.createElement("span");_.x("clpp.utils.dom.createHTMLElement",_.Gi);var Xt=class{constructor(a){this.a=null;this.h=new Set;this.f=null;this.set(a||null)}set(a){this.h.clear();this.f&&(this.f.disconnect(),this.f=null);if(this.a=a)this.f=Hi(this,a)}get(){return this.a}};_.Yt=class{constructor(a){this.f=a;this.a=null}la(a){return Ji(this,a,!1)}zb(a){return Ji(this,a,!0)}stop(){this.a&&(this.a(),this.a=null)}};_.Ni=class{constructor(a){this.f=a;this.a=null}pf(){this.stop();this.f();return this}la(a){this.stop();this.a=(new _.Yt(()=>{this.f()})).la(a);return this}zb(a){this.stop();this.a=(new _.Yt(()=>{this.f()})).zb(a);return this}stop(){this.a&&(this.a.stop(),this.a=null)}};_.x("clpp.utils.Timer",_.Ni);_.Ni.prototype.stop=_.Ni.prototype.stop;_.Ni.prototype.tickEvery=_.Ni.prototype.zb;_.Ni.prototype.tickAfter=_.Ni.prototype.la;_.Ni.prototype.tickNow=_.Ni.prototype.pf;var Zt=class{};_.x(nd,Zt);Zt.getInfo=_.oj;
378
- var Mi=null,Li=null,dj=new _.S(nd),hj="android",gj="ios",mj="linux",ij="osx",jj="windows",kj="tizen",lj="webos",fj=_.og,nj=_.og,Zi={windows:{os_version:/windows\s+?nt\s([\d.]+)/i,ie:/windows\s+?nt.+?trident\/[\d.]+.*rv:([\d.]+)/i,edge:/windows\s+?nt.+?edge?\/([\d.]+)/i,chrome:/windows\s+?nt.+?chrome\/([\d.]+)/i,firefox:/windows\s+?nt.+?firefox\/([\d.]+)/i,opera:/windows\s+?nt.+?opr\/([\d.]+)/i},osx:{os_version:/macintosh.+?([\d._]+)/i,safari:/macintosh.+?version\/([\d._]+).+?safari/i,edge:/macintosh.+?edge?\/([\d._]+)/i,
377
+ _.x("clpp.utils.strings.hashCode",function(a){let b=0;if(0===a.length)return b;for(let c=0;c<a.length;c++)b=(b<<5)-b+a.charCodeAt(c),b|=0;return b});var zi=document.createElement("span");_.x("clpp.utils.dom.createHTMLElement",_.Ei);var Rt=class{constructor(a){this.a=null;this.h=new Set;this.f=null;this.set(a||null)}set(a){this.h.clear();this.f&&(this.f.disconnect(),this.f=null);if(this.a=a)this.f=Fi(this,a)}get(){return this.a}};_.St=class{constructor(a){this.f=a;this.a=null}la(a){return Hi(this,a,!1)}Ab(a){return Hi(this,a,!0)}stop(){this.a&&(this.a(),this.a=null)}};_.Li=class{constructor(a){this.f=a;this.a=null}yf(){this.stop();this.f();return this}la(a){this.stop();this.a=(new _.St(()=>{this.f()})).la(a);return this}Ab(a){this.stop();this.a=(new _.St(()=>{this.f()})).Ab(a);return this}stop(){this.a&&(this.a.stop(),this.a=null)}};_.x("clpp.utils.Timer",_.Li);_.Li.prototype.stop=_.Li.prototype.stop;_.Li.prototype.tickEvery=_.Li.prototype.Ab;_.Li.prototype.tickAfter=_.Li.prototype.la;_.Li.prototype.tickNow=_.Li.prototype.yf;var Tt=class{};_.x(od,Tt);Tt.getInfo=_.mj;
378
+ var Ki=null,Ji=null,bj=new _.T(od),fj="android",ej="ios",kj="linux",gj="osx",hj="windows",ij="tizen",jj="webos",dj=_.lg,lj=_.lg,Xi={windows:{os_version:/windows\s+?nt\s([\d.]+)/i,ie:/windows\s+?nt.+?trident\/[\d.]+.*rv:([\d.]+)/i,edge:/windows\s+?nt.+?edge?\/([\d.]+)/i,chrome:/windows\s+?nt.+?chrome\/([\d.]+)/i,firefox:/windows\s+?nt.+?firefox\/([\d.]+)/i,opera:/windows\s+?nt.+?opr\/([\d.]+)/i},osx:{os_version:/macintosh.+?([\d._]+)/i,safari:/macintosh.+?version\/([\d._]+).+?safari/i,edge:/macintosh.+?edge?\/([\d._]+)/i,
379
379
  chrome:/macintosh.+?chrome\/([\d._]+)/i,firefox:/macintosh.+?firefox\/([\d._]+)/i,opera:/macintosh.+?opr\/([\d._]+)/i},unknown:{ie:/.+?trident\/([\d.]+)/i,edge:/.+?edge?\/([\d.]+)/i,safari:/.+?version\/([\d._]+).+?safari/i,chrome:/.+?chrome\/([\d._]+)/i,firefox:/.+?firefox\/([\d._]+)/i,opera:/.+?opr\/([\d._]+)/i},android:{os_version:/android.+?([\d._]+)/i,chrome:/android.+?chrome\/([\d._]+)/i,firefox:/android.+?firefox\/([\d._]+)/i,opera:/android.+?opr\/([\d._]+)/i},ios:{os_version:/(?:iPad|iPhone).+?([\d._]+)/i,
380
380
  chrome:/.+?CriOS\/([\d._]+)/i,firefox:/.+?FxiOS\/([\d._]+)/i,safari:/.+?version\/([\d._]+).+?safari/i,opera:/.+?opr\/([\d._]+)/i},linux:{os_version:/linux.+?([\d._]+)/i,safari:/linux.+?version\/([\d._]+).+?safari/i,chrome:/linux.+?chrome\/([\d._]+)/i,firefox:/linux.+?firefox\/([\d._]+)/i,opera:/linux.+?opr\/([\d._]+)/i},tizen:{os_version:/tizen.+?([\d._]+)/i,safari:/linux.+?version\/([\d._]+).+?safari/i,chrome:/linux.+?chrome\/([\d._]+)/i,firefox:/linux.+?firefox\/([\d._]+)/i,opera:/linux.+?opr\/([\d._]+)/i},
381
- webos:{os_version:/linux.+?([\d._]+)/i,safari:/linux.+?version\/([\d._]+).+?safari/i,chrome:/linux.+?chrome\/([\d._]+)/i,firefox:/linux.+?firefox\/([\d._]+)/i,opera:/linux.+?opr\/([\d._]+)/i}};var vj=class{constructor(a,b){this.g=new _.S("clpp.PlayerSurface");this.w=_.ch($t,b);this.f=new Xt;this.h=null;this.a=new Xt;this.l=au;au+=1;this.o=`clpp-video-${this.l}`;this.j=new _.Qt;if(null==a)throw new _.H(_.C,7,7102,"No Media element was provided");if(!(a instanceof Element||(a=document.getElementById(a),a)))throw new _.H(_.C,7,7004,"Media element not found");b=this.w;this.g.debug("Initializing Player Surface on ",a);if("cast-media-player"===a.tagName.toLowerCase())this.h=a;else{if(!(a instanceof
382
- HTMLMediaElement))throw new _.H(_.C,7,7005,"Media element is not instance of HTMLMediaElement");if(!a.hasAttribute("crossorigin")){var c=b.crossorigin;this.g.info("Setting media elements crossorigin to "+c);a.setAttribute("crossorigin",c)}this.f.set(a);if(b.disableContainer)var d=null;else if(b.containerEl){if(a.parentNode!==b.containerEl)throw new _.H(_.C,7,7006,"Container element is not a direct parent of media element");d=b.containerEl}else{c=document.createElement(_.Ed);a.parentNode?a.parentNode.replaceChild(c,
383
- a):this.g.warn("Player Surface Element has no parent. Can not inject container. You have to manually add playerSurface.getContainer() to the DOM!");var e=[];for(let g=0;g<a.classList.length;g++)e.push(a.classList[g]);for(var f of e)a.classList.remove(f),_.Ei(c,f);c.style.cssText=a.style.cssText;a.removeAttribute(_.Vf);for(d of[_.Mg,_.be])f=a.getAttribute(d),f=parseInt(f,10),isNaN(f)||(c.style[d]=`${f}px`),_.Ri()||a.removeAttribute(d);c.appendChild(a);d=c}d&&(this.a.set(d),Ii(this.a,"clpp-container"),
384
- Ii(this.a,this.o),Ii(this.f,_.bd),Ii(this.f,"clpp-video"));b.webOSStartupPatch&&rj(this,a,d)}}getMedia(){return this.f.get()}getContainer(){return this.a.get()}getSafeContainer(){return this.a}getId(){return this.l}getUniqueCssClass(){return this.o}getCastElement(){return this.h}isFullscreen(){return!!document.fullscreenElement}hideMediaElement(){const a=this.getMedia();a?_.Ei(a,cd):this.g.debug("No media element available that could be hidden")}showMediaElement(){const a=this.getMedia();a?a.classList.remove(cd):
385
- this.g.debug("No media element available that could be shown")}addElementToContainer(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;const d=this.getContainer();if(!d)throw Error("No container is available. Unable to add element");b&&_.Ei(a,_.bd);c?d.insertBefore(a,d.firstElementChild):d.appendChild(a)}removeElementFromContainer(a){const b=this.getContainer();if(!b)throw Error("No container is available. Unable to remove element");b.removeChild(a)}hide(a){_.Ei(a,cd)}show(a){a.classList.remove(cd)}release(){this.j.release()}};
386
- vj.prototype.removeElementFromContainer=vj.prototype.removeElementFromContainer;vj.prototype.addElementToContainer=vj.prototype.addElementToContainer;vj.prototype.getCastElement=vj.prototype.getCastElement;vj.prototype.getContainer=vj.prototype.getContainer;vj.prototype.getMedia=vj.prototype.getMedia;var $t={disableContainer:!1,webOSStartupPatch:!0,crossorigin:"anonymous",containerEl:null},au=1;var bu=class{constructor(a){this.ka=a;this.o=!!a.sideAdContainer;this.h=[];this.a=a.Gg;this.C=uj(a);this.A=[];const b=wj(this,this.C,this.ka.yh);this.l=new Vt(b);this.f=null;this.w=!1;this.j=new Map;this.F=a.toggleVisible;this.g=new _.S("clpp.interstitial.MultiController");this.fa=this.B=!1;this.G=a.oi||(()=>{});xj(this).forEach(c=>yj(this,c,!1))}getCurrentItem(){return this.f}Zd(){return this.f?this.f.player:null}dg(){return Array.from(this.j.values())}qd(){return 0<this.j.size}play(a){return Nj(this,
387
- a,_.We)}load(a){return Nj(this,a,_.se)}release(){const a=this;return _.w(function*(){yield Promise.all([yield Uj(a),a.f?Kj(a,a.f):Promise.resolve()]);a.f=null;a.w=!1})}destroy(){const a=this;return _.w(function*(){a.g.info("Destroy");yield a.release();yield a.l.destroy();gk(a)})}isMuted(){return this.B}},dk="preload",bk=_.we,Dj="primary",Cj="ad";var tk=[403,401];_.x("clpp.net.DEFAULT_FATAL_STATUS_CODES",tk);_.x("clpp.net.makeRequest",_.yk);_.xk=6;_.x("clpp.net.RequestType",{MANIFEST:1,SEGMENT:2,LICENSE:3,APP:4,TIMING:5,OTHER:_.xk,CONTENT_STEERING:7});var cu=class extends _.Tt{constructor(a){super();this.ka=_.ch({xi:.5},a);this.ze=this.fa=!1;this.g=new _.S("clpp.interstitial.Player");this.f=a.player;this.f.setSeekInterceptor((b,c)=>{if(c)return!0;if(this.fa)return!1;if(c=Ik(this))return this.g.info("Seek ignored while binding interstitial",c.da),!1;Jk(this,b);c=Lk(this);const d=Mk(this,b),e=Nk(this,b);if(c){if(d&&d!==c)return Qk(this,d,b),!1;if(e&&e!==c)return Rk(this,e,b),!1;if(b<c.startTime-this.ka.resolutionOffsetSec)return Ok(this,c),!0;if(b<
388
- c.startTime)return Wj(this.X),this.g.info("Seek inside resolution area of",c.da),!0;if(b<=c.endTime)return this.g.info("Seek into the scheduled interstitial",c.da),Zj(this.X),!1;if(c.Pf)return this.g.info("Jump over a scheduled interstitial",c.da),Yj(this.X),c.state=lk,!0;this.g.info("Jump over a scheduled interstitial triggering it",c.da);Zj(this.X);fk(this.X,b,!0);return!1}return d?(Qk(this,d,b),!1):e&&!e.Ah?(Rk(this,e,b),!1):!0});this.X=new bu({yh:this.ka.config,Gg:a.player,preloadMedia:!0,ab:a.ab,
389
- sideAdContainer:this.ka.sideAdContainer,onAudioDecision:this.ka.onAudioDecision,oi:()=>{this.g.info("Resume primary content")}});this.h=[];this.a=[];this.j=!1;Zk(this,a.player)}destroy(){const a=this;return _.w(function*(){$k(a);a.a=[];a.j=!1;a.f.setSeekInterceptor(null);yield a.X.destroy()})}Ib(){return this.j}setMuted(a){var b=this.X;(b.B=a)?(b.a.setMuted(!0),ak(b,!0)):(a=b.getCurrentItem(),Bj(b,a,a&&a.Qb?Cj:Dj))}isMuted(){return this.X.isMuted()}isLive(){const a=this.X.Zd();return a?a.isLive():
390
- null}},lk=0,Hk=1,pl=2,ql=3,Kk=4,yl=5,mk=6;var Xn=class{constructor(){this.a=null}load(){return Promise.resolve()}start(){return Promise.resolve()}o(a,b,c){const d=a.getConfiguration();a=Object.assign({},{config:d,player:a,ab:b},d.ads.hls||{},{wi:c});this.a=new cu(a);jl(this.a)}setMuted(a){this.a&&this.a.setMuted(a)}isMuted(){return this.a?this.a.isMuted():!0}resume(){const a=al(this.a);a&&a.play()}pause(){const a=al(this.a);a&&a.pause()}skip(){}getVolume(){const a=al(this.a);return a?a.getVolume()||0:0}setVolume(a){const b=al(this.a);if(b)return b.setVolume(a)}getPosition(){const a=
391
- al(this.a);return a?a.getPosition():-1}l(){return!this.a.Ib()}h(){return this.a.destroy()}};Xn.prototype.getPosition=Xn.prototype.getPosition;Xn.prototype.setVolume=Xn.prototype.setVolume;Xn.prototype.getVolume=Xn.prototype.getVolume;Xn.prototype.skip=Xn.prototype.skip;Xn.prototype.pause=Xn.prototype.pause;Xn.prototype.resume=Xn.prototype.resume;var du=class{constructor(a){this.m=a;this.j=this.m.getNetworkEngine();this.a=new _.Qt;this.h=null;this.f=!0;Dl(this)}release(){this.a.release();El(this);this.m=null}};_.eu=class{constructor(){this.a=[]}destroy(){const a=[];for(const b of this.a)b.U.catch(()=>{}),a.push(b.abort());this.a=[];return Promise.all(a)}};_.Jl.prototype.resolve=function(){};_.Jl.prototype.reject=function(){};var fu;_.xm=class{constructor(a,b){{var c=[a];let f=Kl(...c);if(!f||f.protocol.includes("."))c=b?[a,b]:[a,location.href],c=(f=Kl(...c))?c:null}if(!c)throw new _.H(_.C,1,1011,{message:"The provided URL is invalid.",url:a,base:b});const [d,e]=c;this.a=new URL(d,e);this.f=a.startsWith("//")}toString(){const a=this.a.toString();return this.f?a.replace(fu,""):a}};fu=/^[A-Za-z]+:/;var Nl=class{constructor(){this.a=Ll()}};var cm=class{constructor(a){this.a=new Uint8Array(a||65536);this.f=0;this.h=new Nl}};var gu=class{constructor(a,b){b=void 0===b?2:b;this.a=new Uint8Array(a);this.h=b;this.f=0}};var bm=class{constructor(a,b){a=void 0===a?1E6:a;b=void 0===b?!0:b;this.j=new gu(a);this.length=a;this.A=b;this.f=this.a=this.h=0;this.l=null;this.o=-1;this.w=new Nl}};var am=window.fetch,Yl=window.AbortController,Xl=window.Headers;var dm=window.XMLHttpRequest;var hu=class{};_.x("clpp.utils.Uint8ArrayUtils",hu);hu.toStandardBase64=_.fm;hu.concat=_.lm;hu.equal=_.km;hu.toHex=_.jm;hu.fromHex=_.im;hu.fromBase64=_.hm;hu.toBase64Url=_.gm;_.Ms=class{constructor(a,b){this.U=a;this.B=b;this.a=!1}abort(){this.a=!0;return this.B()}};var tm=class extends _.Ms{constructor(a,b){super(new _.Jl,()=>Promise.resolve());this.C=a;this.h=null;this.w=this.U;this.f=-1;this.j=this.l=this.o=null;this.A=b||null;qm(this)}then(a,b){this.U=this.U.then(a,b);return this}catch(a){this.U=this.U.catch(a);return this}abort(){if(this.a)return Promise.resolve();this.a=!0;return this.h.then(a=>{this.o&&clearTimeout(this.o);this.l&&this.l();return a.abort()}).catch(()=>{})}};_.Kn=class{constructor(){this.h=[];this.f=[];this.j=[];this.w=!1;this.o=new _.eu;this.a={};this.headers=new Map;this.l=0;this.A=null;this.a.data=nm;!window.fetch||!window.AbortController||_.Ri(6)||_.Ui()&&68<_.oj().browserVersion.major?(this.a.http=em,this.a.https=em):(this.a.http=$l,this.a.https=$l)}Oi(a){0<a?_.B("Rate limit set to "+a+"bps"):_.B("Rate limit disabled");this.l=a}release(){return this.o.destroy()}destroy(){this.w=!0;this.h=[];this.f=[];this.j=[];return this.o.destroy()}Df(a){this.h.push(a)}Yc(a){this.j.push(a)}Kg(a){this.h=
392
- this.h.filter(b=>b!==a)}se(a){this.j=this.j.filter(b=>b!==a)}fetch(a){let b=void 0;1===a.type&&(b={objectType:iu});return _.wm(this,a,b)}};_.x("clpp.net.NetworkEngine",_.Kn);_.Kn.prototype.fetch=_.Kn.prototype.fetch;_.Kn.prototype.removeResponseModifier=_.Kn.prototype.se;_.Kn.prototype.removeRequestModifier=_.Kn.prototype.Kg;_.Kn.prototype.addResponseModifier=_.Kn.prototype.Yc;_.Kn.prototype.addRequestModifier=_.Kn.prototype.Df;_.Kn.prototype.setRateLimit=_.Kn.prototype.Oi;var ym=[];var Bm=!!(performance&&performance.mark&&performance.measure),Gm=new _.S("clpp.perf");_.x("clpp.version",_.ea);_.x("clpp.name",_.ra);var Jn=null;_.x("clpp.configure",a=>{Jn=a});_.wl="application/x-mpegurl";_.x("clpp.Type",{DASH:_.wc,HLS:_.wl,SMOOTH_STREAMING:_.Bc,MP4:_.zg,MP3:"audio/mp3"});_.x("clpp.TimelineCueType",{SCTE35:_.Gf,DASH_CALLBACK:_.Fe,HLS_DATERANGE:_.de,UNKNOWN:_.og});_.x("clpp.SpeedUpMode",{DECODER:_.Bd,SEEK:"seek"});_.x("clpp.CodecSwitchingStrategy",{PREVENT:_.rf,SMOOTH:_.Nf});var Jm=new Map,Im=1,Nm=2,Mm=3,Lm=4;_.mp=class{constructor(a){this.j=a;this.scheme=null;const b=document.createElement("a"),c=a.match(/^(.*:)(\/\/(.*))$/);let d=!1;if(c){if(this.scheme=c[1],b.href=c[2],":"===b.protocol||""===b.host&&""===b.pathname)b.href="//dummy.com/"+c[3],d=!0}else{b.href=a;if(":"===b.protocol||""===b.host&&""===b.pathname)b.href="//dummy.com/"+a.match(/\/?\/?(.*)/)[1],d=!0;this.scheme=b.protocol}""===this.scheme&&(this.scheme=window.location.protocol);this.a=d?"":b.hostname;this.port=b.port;this.path=b.pathname;
393
- _.wi(this.path,"/")||(this.path="/"+this.path);this.f=b.search;this.h=b.hash}};_.x("clpp.utils.url.queryString",_.Um);var Ym;_.J=_.Yf;_.ju=1/15;Ym={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/]};Ym[_.J]=[/^vtt$/,/^wvtt/,/^stpp/];_.ku=(new Map).set(_.od,_.od).set("frameRate","framerate").set("bandwidth","bitrate").set(_.Mg,_.Mg).set(_.be,_.be).set("channelsCount","channels");var iu="m";var lu=class{};_.x("clpp.utils.PlayerConfiguration",lu);lu.create=function(...a){return _.hn(a,{Gi:!1})};lu.build=_.hn;_.x("clpp.utils.media.detectType",kn);var nn=new _.S("clpp.sources");_.x("clpp.drm.WidevineRobustnessLevel",{SW_SECURE_CRYPTO:_.mb,SW_SECURE_DECODE:_.nb,HW_SECURE_CRYPTO:Ga,HW_SECURE_DECODE:Ha,HW_SECURE_ALL:Fa});_.x("clpp.drm.PlayreadyRobustnessLevel",{SL150:"150",SL2000:"2000",SL3000:"3000"});_.x("clpp.drm.KeySystem",{NONE:_.Ge,CLEAR_KEY:_.Qe,WIDEVINE:_.vd,PLAYREADY:_.td,FAIRPLAY:_.rd,PRIMETIME:_.qd});_.pn={};_.x("clpp.drm.registerDrmEnvironment",_.qn);var vn=class{constructor(a,b,c){this.h=a;this.f=b;JSON.parse(_.pi(_.hm(a)));this.a=JSON.parse(_.pi(_.hm(b)));this.j=c}};var tn={n:"vXdoJIQCz6sZ9pbduNukEHOR0H2dHlwuuBUAR5Ot7WLEYvav5mn63yxr6F6TIl8RHTFw2siXQhHblZH2Y89o8vhcZRFkYXo6h0igEVafu-n0w52UEcH8Cqzlb8Q7x03Qb8OcKLngSzDkwe5Y2Aix6I66RRVNLLssqyjp2n5tXs4JQmYdqY6hhpGhmBN84naeCTdcPpAYhCw8jqbTSNrJp5hjU4GVvOiUtoYCvdESV9xrOR7fPCFXhWfLtC3i1k1zVoIM7YW5qD0F676jhqkF-GmDuCHpRY2I2Cxui-ytYEVIM6_pylSIlmYLjARmv2jXz9aV_WvHLh6B8Yx0slNGCQ",e:"AQAB"},cn="eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1cmxzIjpbIjovL2Nhc3RsYWJzLmNvbSJdLCJ0eXBlIjoiV2ViIiwia2lkIjoxOTUwLCJpbHYiOmZhbHNlfQ.jzGGRcbFr_2QET-4tbMcpR5pSaj7eV7X2d1HWw_VKQpPg3zCwSZSDuqw225dIYyAYwLSiElbozbZPSArkBXOsoUm-KZRUPF4m7WG0T7Uza5G-QaQw57BbbfcSsooSpatC997kHKLMTjO71By9Olcu5ykN164nZpGQtZNzQjYag-bnUaMVI5vvhzjlvDihORQ9V_qRlEh0-mpoz6W0-36HGAbWIXWq0kxPh6inbovby-ZmFpqGrVjWOEFa55EARZXPNW9ERupW5xrrYHZdwwTpdRTY5IwEnobS85yTrLhK8Y2MV4jlQLTtQp372fKDsuU6q6_4XvmNq1SgAoKoaf41g";var Zn=class{constructor(a){this.f=a;this.a=null;this.g=new _.S("clpp.utils.LicenseKey")}},In="vod",Hn="live";var Mn=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze",
394
- "cs"],["dan","da"],["deu","de"],[_.Ed,"dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice",
381
+ webos:{os_version:/linux.+?([\d._]+)/i,safari:/linux.+?version\/([\d._]+).+?safari/i,chrome:/linux.+?chrome\/([\d._]+)/i,firefox:/linux.+?firefox\/([\d._]+)/i,opera:/linux.+?opr\/([\d._]+)/i}};var tj=class{constructor(a,b){this.g=new _.T("clpp.PlayerSurface");this.w=_.ch(Ut,b);this.f=new Rt;this.h=null;this.a=new Rt;this.l=Vt;Vt+=1;this.o=`clpp-video-${this.l}`;this.j=new _.Kt;if(null==a)throw new _.I(_.D,7,7102,"No Media element was provided");if(!(a instanceof Element||(a=document.getElementById(a),a)))throw new _.I(_.D,7,7004,"Media element not found");b=this.w;this.g.debug("Initializing Player Surface on ",a);if("cast-media-player"===a.tagName.toLowerCase())this.h=a;else{if(!(a instanceof
382
+ HTMLMediaElement))throw new _.I(_.D,7,7005,"Media element is not instance of HTMLMediaElement");if(!a.hasAttribute("crossorigin")){var c=b.crossorigin;this.g.info("Setting media elements crossorigin to "+c);a.setAttribute("crossorigin",c)}this.f.set(a);if(b.disableContainer)var d=null;else if(b.containerEl){if(a.parentNode!==b.containerEl)throw new _.I(_.D,7,7006,"Container element is not a direct parent of media element");d=b.containerEl}else{c=document.createElement(_.Fd);a.parentNode?a.parentNode.replaceChild(c,
383
+ a):this.g.warn("Player Surface Element has no parent. Can not inject container. You have to manually add playerSurface.getContainer() to the DOM!");var e=[];for(let g=0;g<a.classList.length;g++)e.push(a.classList[g]);for(var f of e)a.classList.remove(f),_.Ci(c,f);c.style.cssText=a.style.cssText;a.removeAttribute(_.Vf);for(d of[_.Mg,_.be])f=a.getAttribute(d),f=parseInt(f,10),isNaN(f)||(c.style[d]=`${f}px`),_.Pi()||a.removeAttribute(d);c.appendChild(a);d=c}d&&(this.a.set(d),Gi(this.a,"clpp-container"),
384
+ Gi(this.a,this.o),Gi(this.f,_.cd),Gi(this.f,"clpp-video"));b.webOSStartupPatch&&nj(this,a,d)}}getMedia(){return this.f.get()}getContainer(){return this.a.get()}getSafeContainer(){return this.a}getId(){return this.l}getUniqueCssClass(){return this.o}getCastElement(){return this.h}isFullscreen(){return!!document.fullscreenElement}hideMediaElement(){const a=this.getMedia();a?_.Ci(a,dd):this.g.debug("No media element available that could be hidden")}showMediaElement(){const a=this.getMedia();a?a.classList.remove(dd):
385
+ this.g.debug("No media element available that could be shown")}addElementToContainer(a,b,c){b=void 0===b?!1:b;c=void 0===c?!1:c;const d=this.getContainer();if(!d)throw Error("No container is available. Unable to add element");b&&_.Ci(a,_.cd);c?d.insertBefore(a,d.firstElementChild):d.appendChild(a)}removeElementFromContainer(a){const b=this.getContainer();if(!b)throw Error("No container is available. Unable to remove element");b.removeChild(a)}hide(a){_.Ci(a,dd)}show(a){a.classList.remove(dd)}release(){this.j.release()}};
386
+ tj.prototype.removeElementFromContainer=tj.prototype.removeElementFromContainer;tj.prototype.addElementToContainer=tj.prototype.addElementToContainer;tj.prototype.getCastElement=tj.prototype.getCastElement;tj.prototype.getContainer=tj.prototype.getContainer;tj.prototype.getMedia=tj.prototype.getMedia;var Ut={disableContainer:!1,webOSStartupPatch:!0,crossorigin:"anonymous",containerEl:null},Vt=1;var Wt=class{constructor(a){this.ka=a;this.o=!!a.sideAdContainer;this.h=[];this.a=a.Ng;this.C=sj(a);this.A=[];const b=uj(this,this.C,this.ka.Fh);this.l=new Pt(b);this.f=null;this.w=!1;this.j=new Map;this.F=a.toggleVisible;this.g=new _.T("clpp.interstitial.MultiController");this.fa=this.B=!1;this.G=a.yi||(()=>{});vj(this).forEach(c=>wj(this,c,!1))}getCurrentItem(){return this.f}ae(){return this.f?this.f.player:null}lg(){return Array.from(this.j.values())}td(){return 0<this.j.size}play(a){return Lj(this,
387
+ a,_.We)}load(a){return Lj(this,a,_.pe)}release(){const a=this;return _.w(function*(){yield Promise.all([yield Sj(a),a.f?Ij(a,a.f):Promise.resolve()]);a.f=null;a.w=!1})}destroy(){const a=this;return _.w(function*(){a.g.info("Destroy");yield a.release();yield a.l.destroy();ek(a)})}isMuted(){return this.B}},bk="preload",Zj=_.we,Bj="primary",Aj="ad";var rk=[403,401];_.x("clpp.net.DEFAULT_FATAL_STATUS_CODES",rk);_.x("clpp.net.makeRequest",_.wk);_.vk=6;_.x("clpp.net.RequestType",{MANIFEST:1,SEGMENT:2,LICENSE:3,APP:4,TIMING:5,OTHER:_.vk,CONTENT_STEERING:7});var Xt=class extends _.Nt{constructor(a){super();this.ka=_.ch({Ei:.5},a);this.De=this.fa=!1;this.g=new _.T("clpp.interstitial.Player");this.f=a.player;this.f.setSeekInterceptor((b,c)=>{if(c)return!0;if(this.fa)return!1;if(c=Gk(this))return this.g.info("Seek ignored while binding interstitial",c.da),!1;Hk(this,b);c=Jk(this);const d=Kk(this,b),e=Lk(this,b);if(c){if(d&&d!==c)return Ok(this,d,b),!1;if(e&&e!==c)return Pk(this,e,b),!1;if(b<c.startTime-this.ka.resolutionOffsetSec)return Mk(this,c),!0;if(b<
388
+ c.startTime)return Uj(this.X),this.g.info("Seek inside resolution area of",c.da),!0;if(b<=c.endTime)return this.g.info("Seek into the scheduled interstitial",c.da),Xj(this.X),!1;if(c.Xf)return this.g.info("Jump over a scheduled interstitial",c.da),Wj(this.X),c.state=jk,!0;this.g.info("Jump over a scheduled interstitial triggering it",c.da);Xj(this.X);dk(this.X,b,!0);return!1}return d?(Ok(this,d,b),!1):e&&!e.Hh?(Pk(this,e,b),!1):!0});this.X=new Wt({Fh:this.ka.config,Ng:a.player,preloadMedia:!0,bb:a.bb,
389
+ sideAdContainer:this.ka.sideAdContainer,onAudioDecision:this.ka.onAudioDecision,yi:()=>{this.g.info("Resume primary content")}});this.h=[];this.a=[];this.j=!1;Xk(this,a.player)}destroy(){const a=this;return _.w(function*(){Yk(a);a.a=[];a.j=!1;a.f.setSeekInterceptor(null);yield a.X.destroy()})}Jb(){return this.j}setMuted(a){var b=this.X;(b.B=a)?(b.a.setMuted(!0),Yj(b,!0)):(a=b.getCurrentItem(),zj(b,a,a&&a.Tb?Aj:Bj))}isMuted(){return this.X.isMuted()}isLive(){const a=this.X.ae();return a?a.isLive():
390
+ null}},jk=0,Fk=1,nl=2,ol=3,Ik=4,wl=5,kk=6;var Rn=class{constructor(){this.a=null}load(){return Promise.resolve()}A(){return!0}o(a,b,c){const d=a.getConfiguration();a=Object.assign({},{config:d,player:a,bb:b},d.ads.hls||{},{Di:c});this.a=new Xt(a);hl(this.a)}setMuted(a){this.a&&this.a.setMuted(a)}isMuted(){return this.a?this.a.isMuted():!0}resume(){const a=Zk(this.a);a&&a.play()}pause(){const a=Zk(this.a);a&&a.pause()}skip(){}getVolume(){const a=Zk(this.a);return a?a.getVolume()||0:0}setVolume(a){const b=Zk(this.a);if(b)return b.setVolume(a)}getPosition(){const a=
391
+ Zk(this.a);return a?a.getPosition():-1}l(){return!this.a.Jb()}j(){return this.a.destroy()}};Rn.prototype.getPosition=Rn.prototype.getPosition;Rn.prototype.setVolume=Rn.prototype.setVolume;Rn.prototype.getVolume=Rn.prototype.getVolume;Rn.prototype.skip=Rn.prototype.skip;Rn.prototype.pause=Rn.prototype.pause;Rn.prototype.resume=Rn.prototype.resume;var Yt=class{constructor(a){this.m=a;this.j=this.m.getNetworkEngine();this.a=new _.Kt;this.h=null;this.f=!0;Bl(this)}release(){this.a.release();Cl(this);this.m=null}};_.Zt=class{constructor(){this.a=[]}destroy(){const a=[];for(const b of this.a)b.U.catch(()=>{}),a.push(b.abort());this.a=[];return Promise.all(a)}};_.Hl.prototype.resolve=function(){};_.Hl.prototype.reject=function(){};var $t;_.rm=class{constructor(a,b){{var c=[a];let f=Il(...c);if(!f||f.protocol.includes("."))c=b?[a,b]:[a,location.href],c=(f=Il(...c))?c:null}if(!c)throw new _.I(_.D,1,1011,{message:"The provided URL is invalid.",url:a,base:b});const [d,e]=c;this.a=new URL(d,e);this.f=a.startsWith("//")}toString(){const a=this.a.toString();return this.f?a.replace($t,""):a}};$t=/^[A-Za-z]+:/;var Ll=class{constructor(){this.a=Jl()}};var Yl=class{constructor(a){this.a=new Uint8Array(a||65536);this.f=0;this.h=new Ll}};var au=class{constructor(a,b){b=void 0===b?2:b;this.a=new Uint8Array(a);this.h=b;this.f=0}};var Xl=class{constructor(a,b){a=void 0===a?1E6:a;b=void 0===b?!0:b;this.j=new au(a);this.length=a;this.A=b;this.f=this.a=this.h=0;this.l=null;this.o=-1;this.w=new Ll}};var bu=class{};_.x("clpp.utils.Uint8ArrayUtils",bu);bu.toStandardBase64=_.$l;bu.concat=_.fm;bu.equal=_.em;bu.toHex=_.dm;bu.fromHex=_.cm;bu.fromBase64=_.bm;bu.toBase64Url=_.am;_.Gs=class{constructor(a,b){this.U=a;this.B=b;this.a=!1}abort(){this.a=!0;return this.B()}};var nm=class extends _.Gs{constructor(a,b){super(new _.Hl,()=>Promise.resolve());this.C=a;this.h=null;this.w=this.U;this.f=-1;this.j=this.l=this.o=null;this.A=b||null;km(this)}then(a,b){this.U=this.U.then(a,b);return this}catch(a){this.U=this.U.catch(a);return this}abort(){if(this.a)return Promise.resolve();this.a=!0;return this.h.then(a=>{this.o&&clearTimeout(this.o);this.l&&this.l();return a.abort()}).catch(()=>{})}};_.En=class{constructor(){this.h=[];this.f=[];this.j=[];this.w=!1;this.o=new _.Zt;this.a={};this.headers=new Map;this.l=0;this.A=null;this.a.data=hm;!window.fetch||!window.AbortController||_.Pi(6)||_.Si()&&68<_.mj().browserVersion.major?(this.a.http=Zl,this.a.https=Zl):(this.a.http=Wl,this.a.https=Wl)}Ui(a){0<a?_.C("Rate limit set to "+a+"bps"):_.C("Rate limit disabled");this.l=a}release(){return this.o.destroy()}destroy(){this.w=!0;this.h=[];this.f=[];this.j=[];return this.o.destroy()}Lf(a){this.h.push(a)}bd(a){this.j.push(a)}Rg(a){this.h=
392
+ this.h.filter(b=>b!==a)}we(a){this.j=this.j.filter(b=>b!==a)}fetch(a){let b=void 0;1===a.type&&(b={objectType:cu});return _.qm(this,a,b)}};_.x("clpp.net.NetworkEngine",_.En);_.En.prototype.fetch=_.En.prototype.fetch;_.En.prototype.removeResponseModifier=_.En.prototype.we;_.En.prototype.removeRequestModifier=_.En.prototype.Rg;_.En.prototype.addResponseModifier=_.En.prototype.bd;_.En.prototype.addRequestModifier=_.En.prototype.Lf;_.En.prototype.setRateLimit=_.En.prototype.Ui;var sm=[];var vm=!!(performance&&performance.mark&&performance.measure),xm=new _.T("clpp.perf");_.x("clpp.version",_.ea);_.x("clpp.name",_.ra);var Dn=null;_.x("clpp.configure",a=>{Dn=a});_.ul="application/x-mpegurl";_.x("clpp.Type",{DASH:_.xc,HLS:_.ul,SMOOTH_STREAMING:_.Cc,MP4:_.zg,MP3:"audio/mp3"});_.x("clpp.TimelineCueType",{SCTE35:_.Gf,DASH_CALLBACK:_.Fe,HLS_DATERANGE:_.de,UNKNOWN:_.lg});_.x("clpp.SpeedUpMode",{DECODER:_.Cd,SEEK:"seek"});_.x("clpp.CodecSwitchingStrategy",{PREVENT:_.rf,SMOOTH:_.Nf});var Am=new Map,zm=1,Hm=2,Dm=3,Cm=4;_.gp=class{constructor(a){this.j=a;this.scheme=null;const b=document.createElement("a"),c=a.match(/^(.*:)(\/\/(.*))$/);let d=!1;if(c){if(this.scheme=c[1],b.href=c[2],":"===b.protocol||""===b.host&&""===b.pathname)b.href="//dummy.com/"+c[3],d=!0}else{b.href=a;if(":"===b.protocol||""===b.host&&""===b.pathname)b.href="//dummy.com/"+a.match(/\/?\/?(.*)/)[1],d=!0;this.scheme=b.protocol}""===this.scheme&&(this.scheme=window.location.protocol);this.a=d?"":b.hostname;this.port=b.port;this.path=b.pathname;
393
+ _.ui(this.path,"/")||(this.path="/"+this.path);this.f=b.search;this.h=b.hash}};_.x("clpp.utils.url.queryString",_.Om);var Sm;_.K=_.Yf;_.du=1/15;Sm={audio:[/^vorbis$/,/^Opus$/,/^opus$/,/^fLaC$/,/^flac$/,/^mp4a/,/^[ae]c-3$/,/^ac-4/,/^dts[cex]$/,/^iamf/,/^mhm[12]/],video:[/^avc/,/^hev/,/^hvc/,/^vvc/,/^vvi/,/^vp0?[89]/,/^av01/,/^dvh/,/^dva/,/^dav/]};Sm[_.K]=[/^vtt$/,/^wvtt/,/^stpp/];var cu="m";var eu=class{};_.x("clpp.utils.PlayerConfiguration",eu);eu.create=function(...a){return _.bn(a,{Mi:!1})};eu.build=_.bn;_.x("clpp.utils.media.detectType",dn);var gn=new _.T("clpp.sources");_.x("clpp.drm.WidevineRobustnessLevel",{SW_SECURE_CRYPTO:_.ob,SW_SECURE_DECODE:_.pb,HW_SECURE_CRYPTO:Ga,HW_SECURE_DECODE:Ha,HW_SECURE_ALL:Fa});_.x("clpp.drm.PlayreadyRobustnessLevel",{SL150:"150",SL2000:"2000",SL3000:"3000"});_.x("clpp.drm.KeySystem",{NONE:_.Ge,CLEAR_KEY:_.Qe,WIDEVINE:_.wd,PLAYREADY:_.ud,FAIRPLAY:_.sd,PRIMETIME:_.rd});_.jn={};_.x("clpp.drm.registerDrmEnvironment",_.kn);var pn=class{constructor(a,b,c){this.h=a;this.f=b;JSON.parse(_.ni(_.bm(a)));this.a=JSON.parse(_.ni(_.bm(b)));this.j=c}};var nn={n:"vXdoJIQCz6sZ9pbduNukEHOR0H2dHlwuuBUAR5Ot7WLEYvav5mn63yxr6F6TIl8RHTFw2siXQhHblZH2Y89o8vhcZRFkYXo6h0igEVafu-n0w52UEcH8Cqzlb8Q7x03Qb8OcKLngSzDkwe5Y2Aix6I66RRVNLLssqyjp2n5tXs4JQmYdqY6hhpGhmBN84naeCTdcPpAYhCw8jqbTSNrJp5hjU4GVvOiUtoYCvdESV9xrOR7fPCFXhWfLtC3i1k1zVoIM7YW5qD0F676jhqkF-GmDuCHpRY2I2Cxui-ytYEVIM6_pylSIlmYLjARmv2jXz9aV_WvHLh6B8Yx0slNGCQ",e:"AQAB"},Xm="eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ1cmxzIjpbIjovL2Nhc3RsYWJzLmNvbSJdLCJ0eXBlIjoiV2ViIiwia2lkIjoxOTUwLCJpbHYiOmZhbHNlfQ.jzGGRcbFr_2QET-4tbMcpR5pSaj7eV7X2d1HWw_VKQpPg3zCwSZSDuqw225dIYyAYwLSiElbozbZPSArkBXOsoUm-KZRUPF4m7WG0T7Uza5G-QaQw57BbbfcSsooSpatC997kHKLMTjO71By9Olcu5ykN164nZpGQtZNzQjYag-bnUaMVI5vvhzjlvDihORQ9V_qRlEh0-mpoz6W0-36HGAbWIXWq0kxPh6inbovby-ZmFpqGrVjWOEFa55EARZXPNW9ERupW5xrrYHZdwwTpdRTY5IwEnobS85yTrLhK8Y2MV4jlQLTtQp372fKDsuU6q6_4XvmNq1SgAoKoaf41g";var Tn=class{constructor(a){this.f=a;this.a=null;this.g=new _.T("clpp.utils.LicenseKey")}},Cn="vod",Bn="live";var Gn=new Map([["aar","aa"],["abk","ab"],["afr","af"],["aka","ak"],["alb","sq"],["amh","am"],["ara","ar"],["arg","an"],["arm","hy"],["asm","as"],["ava","av"],["ave","ae"],["aym","ay"],["aze","az"],["bak","ba"],["bam","bm"],["baq","eu"],["bel","be"],["ben","bn"],["bih","bh"],["bis","bi"],["bod","bo"],["bos","bs"],["bre","br"],["bul","bg"],["bur","my"],["cat","ca"],["ces","cs"],["cha","ch"],["che","ce"],["chi","zh"],["chu","cu"],["chv","cv"],["cor","kw"],["cos","co"],["cre","cr"],["cym","cy"],["cze",
394
+ "cs"],["dan","da"],["deu","de"],[_.Fd,"dv"],["dut","nl"],["dzo","dz"],["ell","el"],["eng","en"],["epo","eo"],["est","et"],["eus","eu"],["ewe","ee"],["fao","fo"],["fas","fa"],["fij","fj"],["fin","fi"],["fra","fr"],["fre","fr"],["fry","fy"],["ful","ff"],["geo","ka"],["ger","de"],["gla","gd"],["gle","ga"],["glg","gl"],["glv","gv"],["gre","el"],["grn","gn"],["guj","gu"],["hat","ht"],["hau","ha"],["heb","he"],["her","hz"],["hin","hi"],["hmo","ho"],["hrv","hr"],["hun","hu"],["hye","hy"],["ibo","ig"],["ice",
395
395
  "is"],["ido","io"],["iii","ii"],["iku","iu"],["ile","ie"],["ina","ia"],["ind","id"],["ipk","ik"],["isl","is"],["ita","it"],["jav","jv"],["jpn","ja"],["kal","kl"],["kan","kn"],["kas","ks"],["kat","ka"],["kau","kr"],["kaz","kk"],["khm","km"],["kik","ki"],["kin","rw"],["kir","ky"],["kom","kv"],["kon","kg"],["kor","ko"],["kua","kj"],["kur","ku"],["lao","lo"],["lat","la"],["lav","lv"],["lim","li"],["lin","ln"],["lit","lt"],["ltz","lb"],["lub","lu"],["lug","lg"],["mac","mk"],["mah","mh"],["mal","ml"],["mao",
396
396
  "mi"],["mar","mr"],["may","ms"],["mkd","mk"],["mlg","mg"],["mlt","mt"],["mon","mn"],["mri","mi"],["msa","ms"],["mya","my"],["nau","na"],["nav","nv"],["nbl","nr"],["nde","nd"],["ndo","ng"],["nep","ne"],["nld","nl"],["nno","nn"],["nob","nb"],["nor","no"],["nya","ny"],["oci","oc"],["oji","oj"],["ori","or"],["orm","om"],["oss","os"],["pan","pa"],["per","fa"],["pli","pi"],["pol","pl"],["por","pt"],["pus","ps"],["que","qu"],["roh","rm"],["ron","ro"],["rum","ro"],["run","rn"],["rus","ru"],["sag","sg"],["san",
397
397
  "sa"],["sin","si"],["slk","sk"],["slo","sk"],["slv","sl"],["sme","se"],["smo","sm"],["sna","sn"],["snd","sd"],["som","so"],["sot","st"],["spa","es"],["sqi","sq"],["srd","sc"],["srp","sr"],["ssw","ss"],["sun","su"],["swa","sw"],["swe","sv"],["tah","ty"],["tam","ta"],["tat","tt"],["tel","te"],["tgk","tg"],["tgl","tl"],["tha","th"],["tib","bo"],["tir","ti"],["ton","to"],["tsn","tn"],["tso","ts"],["tuk","tk"],["tur","tr"],["twi","tw"],["uig","ug"],["ukr","uk"],["urd","ur"],["uzb","uz"],["ven","ve"],["vie",
398
- "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);var to,Qn,Tn,Rn;to=class{constructor(a){this.m=a;this.f=a.getNetworkEngine();this.h=Un(this);this.f.Yc(this.h);this.a=null}release(){this.a=null;this.f.se(this.h)}};_.mu="maxSuggestedBitrateKbps";Qn={du:"duress",etp:_.Yd,mb:_.mu,rd:"responseDelay",rtt:"roundTripTime"};Tn={at:"availabilityTime",br:"encodedBitrateKbps",ht:"heldTime",n:"intermediaryIdentifier",nor:"nextObjectResponse",nrr:"nextRangeResponse",d:"objectDuration",ot:"objectType",su:"startup",st:"streamType",sf:"streamingFormat",v:vg};
399
- Rn=new _.S("clpp.net.CmsdManager");var R=class extends _.Tt{constructor(a,b,c){super();zm();this.g=new _.S("clpp.Player");this.g.info("SDK version: 6.29.0");if(!a)throw new _.H(_.C,7,7102);this.ca=new _.Qt;this.f=this.C=b||_.fn();this.l=null;void 0===this.f.license&&(this.f.license=cn,this.g.warn("You are using the embedded demo license!"));if(!this.f.license)throw this.g.error("You provided null or empty string as your license. Please check your license configuration."),new _.H(_.C,7,7101,"No license provided in configuration!");
400
- this.j=new vj(a,c);this.F=this.A=this.a=this.H=null;this.I=new _.Kn;this.h=null;this.Y=[];this.ba=!0;this.K={};this.ha=null;this.R=!0;this.T=this.P=!1;this.L=this.Kc=null;this.Me=!1;this.ia=new du(this);this.B=null;this.on(_.Qf,()=>{this.getState()===_.ys&&(this.a?this.a.unload():Promise.resolve())});this.on(_.rc,()=>{this.Me=!0});this.on(_.qc,()=>{this.Me=!1});this.on(_.eg,()=>Yn(this));$n(this,this.f.license);this.j.getMedia()&&(a=this.j.getMedia(),a.hasAttribute("autoplay")&&(a.removeAttribute("autoplay"),
401
- this.g.debug("Removed autoplay attribute from video element. Auto play will be handled by configuration."),void 0===this.f.autoplay&&(this.f.autoplay=!0,this.g.debug("Setting autoplay in configuration since it was specified in the video element"))));a=[];for(const d of Vn)try{const e=d.create(this.f);e&&a.push(e)}catch(e){this.g.error("Error while creating player plugin",e)}bo(this,a);this.M=_.na;Ph(this)}on(a,b,c){return super.on(a,b,c)}one(a,b,c){return super.one(a,b,c)}off(a,b){return super.off(a,
402
- b)}onError(a){if(null!==this.a)this.a.onError(a);else a=new _.G(_.Xd,{detail:a}),this.trigger(a)}jd(a){a=this.K[a];void 0===a&&(a=null);return a}getSurface(){return this.j}getConfiguration(){return _.dh(this.f)}getDrmInfo(){return this.a?this.a.getDrmInfo():null}detach(){return this.a?this.a.detach():Promise.resolve()}release(){if(null!=this.l)return this.g.info("Player release already in progress"),this.l;this.g.debug("Releasing player");this.l=fo(this);return this.l.finally(()=>{go(this);this.g.debug("Player released");
403
- this.l=null})}destroy(){if(this.P)return this.g.debug("The player is already destroyed. No-op"),new Promise(a=>a());this.P=!0;return this.release().then(()=>{this.g.debug(za);this.trigger(new _.G("destroying"));return _.ao(this,_.Le)}).then(()=>{this.a&&this.a.stopForwardingEventsTo(this);this.gd.clear();this.ia.release();if(this.a)return this.a.destroy()}).then(()=>this.I.destroy()).then(()=>{Sh(this);this.A=this.a=null;this.trigger(new _.G("destroyed"))})}load(a){const b=this;return _.w(function*(){try{_.Fm(df);
404
- b.M=_.na;b.ba=!0;const c=_.mn(a),d=jn(a)?a:{};if(d.license)throw new _.H(_.C,7,7100,"License cannot be passed into the load method.");yield _.oo(b,d,c);yield _.po(b);yield _.ro(b);_.Fm(cf);_.Hm("player.load",df,cf)}catch(c){go(b);if(b.l)throw b.g.info(Na),new _.H(_.C,7,7E3);throw c;}})}preload(a){const b=this;return _.w(function*(){yield _.oo(b,a);if(b.a){var c=b.a;c.preload?yield c.preload(b.f):b.g.warn(ib)}else b.g.warn(eb)})}use(a){(a=Th(a))&&a.playerConstructed(this)}remove(a){return(this.getState()<=
405
- _.Fs||this.R)&&null!==Nh(a)?(Uh(a),this.T=!0):!1}play(){return this.a?!this.h||this.h instanceof Xn||this.a.namespace()===_.gd?this.a.play():this.h.start(this.a):Promise.reject("No player initialized. You need to load content before calling play.")}pause(){return this.a?this.a.pause():Promise.reject("No player initialized. You need to load content before calling pause.")}getTrackManager(){return this.a&&this.a.getTrackManager()}getBufferInfo(a){return this.a?this.a.getBufferInfo(a):new _.Nt}getState(){return this.a?
406
- this.a.getState():_.Fs}getPeriods(){return this.a?this.a.getPeriods():[]}isEnded(){return this.a&&this.a.isEnded()||!1}isPaused(){return this.a&&this.a.isPaused()||!1}getPosition(){return this.a?this.a.getPosition():0}seek(a){return this.getState()===_.ys?Promise.reject("Cannot seek in current state."):this.a?this.a.seek(a):Promise.reject("delegate does not exist")}getPresentationStartTime(){return this.a?this.a.getPresentationStartTime():null}getSeekRange(){return this.a?this.a.getSeekRange():{start:0,
407
- end:0}}vc(){const a=this.a;return a&&a.vc?a.vc():null}getVolume(){return this.a?this.a.getVolume():null}setVolume(a){this.a&&this.a.setVolume(a)}getDuration(){return this.a?this.a.getDuration():-1}getAdsManager(){return this.h}namespace(){return this.a&&this.a.namespace()||"Undefined"}getPlaybackRate(){return this.a?this.a.getPlaybackRate():1}setPlaybackRate(a,b){this.a&&this.a.setPlaybackRate(a,b)}isMuted(){return this.h&&this.h instanceof Xn?this.h.isMuted():this.a&&this.a.isMuted()||!1}setMuted(a){this.a&&
408
- this.a.setMuted(a);this.h&&this.h instanceof Xn&&this.h.setMuted(a)}getNetworkEngine(){return this.I}setNetworkEngine(a){this.I=a}getTextDisplayer(){return this.a&&this.a.getTextDisplayer()}isLive(){return!!this.a&&this.a.isLive()}getStats(){return this.a?this.a.getStats():null}hg(){return Object.freeze(this.ha)}getLoadedSource(){return this.a&&this.a.getLoadedSource()}getTimelineCues(){return this.a?this.a.getTimelineCues():[]}getCueTimeline(){return this.a?this.a.getCueTimeline():null}resetAbr(){this.a&&
409
- this.a.resetAbr()}setDrmCustomDataModifier(a){this.Kc=a;lo(this)}setCdnErrorCallback(a){this.L=a;this.a&&this.a.setCdnErrorCallback(this.L)}};_.x("clpp.Player",R);R.registerPlugin=_.Wn;R.prototype.setCdnErrorCallback=R.prototype.setCdnErrorCallback;R.prototype.setDrmCustomDataModifier=R.prototype.setDrmCustomDataModifier;R.prototype.resetAbr=R.prototype.resetAbr;R.prototype.getTimelineCues=R.prototype.getTimelineCues;R.prototype.getLoadedSource=R.prototype.getLoadedSource;R.prototype.getSources=R.prototype.hg;
410
- R.prototype.getStats=R.prototype.getStats;R.prototype.isLive=R.prototype.isLive;R.prototype.getTextDisplayer=R.prototype.getTextDisplayer;R.prototype.setNetworkEngine=R.prototype.setNetworkEngine;R.prototype.getNetworkEngine=R.prototype.getNetworkEngine;R.prototype.setMuted=R.prototype.setMuted;R.prototype.isMuted=R.prototype.isMuted;R.prototype.setPlaybackRate=R.prototype.setPlaybackRate;R.prototype.getPlaybackRate=R.prototype.getPlaybackRate;R.prototype.namespace=R.prototype.namespace;
411
- R.prototype.getAdsManager=R.prototype.getAdsManager;R.prototype.getDuration=R.prototype.getDuration;R.prototype.setVolume=R.prototype.setVolume;R.prototype.getVolume=R.prototype.getVolume;R.prototype.getTimelineOffset=R.prototype.vc;R.prototype.getSeekRange=R.prototype.getSeekRange;R.prototype.getPresentationStartTime=R.prototype.getPresentationStartTime;R.prototype.seek=R.prototype.seek;R.prototype.getPosition=R.prototype.getPosition;R.prototype.isPaused=R.prototype.isPaused;
412
- R.prototype.isEnded=R.prototype.isEnded;R.prototype.getState=R.prototype.getState;R.prototype.getBufferInfo=R.prototype.getBufferInfo;R.prototype.getTrackManager=R.prototype.getTrackManager;R.prototype.pause=R.prototype.pause;R.prototype.play=R.prototype.play;R.prototype.remove=R.prototype.remove;R.prototype.use=R.prototype.use;R.prototype.load=R.prototype.load;R.prototype.destroy=R.prototype.destroy;R.prototype.release=R.prototype.release;R.prototype.getDrmInfo=R.prototype.getDrmInfo;
413
- R.prototype.getConfiguration=R.prototype.getConfiguration;R.prototype.getSurface=R.prototype.getSurface;R.prototype.getPlugin=R.prototype.jd;R.prototype.off=R.prototype.off;R.prototype.one=R.prototype.one;R.prototype.on=R.prototype.on;_.Fs=0;_.ys=6;_.Es={IDLE:_.Fs,PREPARING:1,BUFFERING:2,PLAYING:3,PAUSED:4,ENDED:5,ERROR:_.ys,UNSET:7};R.State=_.Es;var Vn=[];var nu=class{constructor(){this.zc=null;this.f=[];this.h=[];this.Ra=new _.S(fd);this.a=null;this.j=!1}load(a){const b=this;return _.w(function*(){b.zc?yield xo(b,c=>_.w(function*(){yield c.load(a)})):b.Ra.warn("No main player, cannot load.")})}Li(a){this.j=a;this.Ra.info("Looping set to",a)}jh(a){this.f.push(a)}ih(a){if(this.zc)this.Ra.warn("Main player already set.");else{this.zc=a;var b=this.o.bind(this),c=this.w.bind(this),d=this.l.bind(this);a.on(_.Qf,b);a.on(_.fg,c);a.on(_.Wd,d);this.h.push(()=>
414
- {a.off(_.Qf,b);a.off(_.fg,c);a.on(_.Wd,d)})}}clear(){this.zc=null;this.f=[];this.h.forEach(a=>a());this.h=[]}l(){const a=this;return _.w(function*(){a.j&&(a.Ra.info("Looping playback."),yield xo(a,b=>_.w(function*(){yield b.seek(0);yield b.play()})))})}o(a){this.a||(a=a.detail.currentState,3===a?(this.Ra.info("Mirroring playing."),yo(this,b=>_.w(function*(){yield b.play()}))):[4,2,_.ys].includes(a)&&(this.Ra.info("Mirroring paused/buffering/error."),yo(this,b=>{const c=this;return _.w(function*(){var d=
415
- Math.round(c.zc.getPosition())-.1;yield b.seek(d);yield Ki(.2);d=b.getState();if(3===d||2===d)yield b.pause()})})))}w(){this.a||yo(this,a=>{const b=this;return _.w(function*(){a.isPaused()&&(yield a.play());const c=b.zc.getPosition();var d=a.getPosition();d=c-d;const e=Math.abs(d),f=a.getPlaybackRate();if(!(3!==a.getState()||.05>=e)){var g=Math.abs(d);g=Math.min(Math.max(1+(.05>=g?0:g/(1>g?6:3))*Math.sign(d),.2),5);5<=e?(a.setPlaybackRate(1),yield a.seek(c)):f===g?1!==g&&b.Ra.info(`Delta ${d.toFixed(1)} s.`):
416
- (1===g?b.Ra.info("Secondary caught up."):1>g?b.Ra.info("Secondary slowing down to catch up. "+`Rate: ${g.toFixed(1)}, delta: ${d.toFixed(1)} s`):1<g&&b.Ra.info("Secondary speeding up to catch up. "+`Rate: ${g.toFixed(1)}, delta: ${d.toFixed(1)} s`),a.setPlaybackRate(g))}})})}};_.x(fd,nu);nu.prototype.clear=nu.prototype.clear;nu.prototype.addMainPlayer=nu.prototype.ih;nu.prototype.addSecondaryPlayer=nu.prototype.jh;nu.prototype.setLoop=nu.prototype.Li;nu.prototype.load=nu.prototype.load;var ou=class{constructor(a){this.m=a;this.l=a.getConfiguration().streaming.addMissingTimelineCues||!1;this.j=new _.Qt;this.f=new Set;this.a=new Set;this.h=null;this.g=new _.S("clpp.native.Metadata")}release(){this.j.release();this.a=new Set;this.f.clear();null!=this.h&&(clearInterval(this.h),this.h=null)}destroy(){const a=this;return _.w(function*(){a.release()})}getTimelineCues(){return Array.from(this.a.values()).sort((a,b)=>a.startTime-b.startTime)}};_.vu=class{constructor(a,b,c,d){d=void 0===d?_.pu:d;this.startTime=a;this.endTime=b;this.payload=c;this.payloadType=d;this.positionAlign=this.position=null;this.size=100;this.textAlign=_.qu;this.writingMode=_.ru;this.lineInterpretation=_.su;this.line=null;this.lineAlign=_.tu;this.direction=uu;this.region=null;this.cssClassList=[];this.id=this.backgroundImage="";this.containerRows=null}Lc(a){return this.payload===a.payload&&this.startTime===a.startTime&&this.endTime===a.endTime&&this.payloadType===
417
- a.payloadType}};_.x("clpp.text.Cue",_.vu);_.vu.positionAlign={LEFT:_.me,RIGHT:_.ne,CENTER:_.Wc,AUTO:"auto"};_.pu=_.Yf;_.vu.payloadType={TEXT:_.pu,VTT_XML:_.Eg,TTML_XML:_.ig};_.qu=_.Wc;_.wu={LEFT:_.je,RIGHT:_.Bf,CENTER:_.qu,START:_.Pf,END:_.Vd};_.vu.textAlign=_.wu;var uu="ltr";_.vu.direction={HORIZONTAL_LEFT_TO_RIGHT:uu,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};_.ru="horizontal-tb";_.vu.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.ru,VERTICAL_LEFT_TO_RIGHT:_.wg,VERTICAL_RIGHT_TO_LEFT:_.xg};_.su=0;
418
- _.vu.lineInterpretation={LINE_NUMBER:_.su,PERCENTAGE:1};_.tu=_.Pf;_.xu={CENTER:_.Wc,START:_.tu,END:_.Vd};_.vu.lineAlign=_.xu;_.Au=class{constructor(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=_.yu;this.scroll=zu;this.cssClassList=[];this.writingMode=this.displayAlign=null}};_.x("clpp.text.CueRegion",_.Au);_.yu=1;_.Au.units={PX:0,PERCENTAGE:_.yu,LINES:2};var zu="";
419
- _.Au.scrollMode={NONE:zu,UP:"up"};_.Au.displayAlign={BEFORE:"flex-end",CENTER:_.Wc,AFTER:"flex-start"};_.Au.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.pd,VERTICAL_LEFT_TO_RIGHT:"row-reverse",VERTICAL_RIGHT_TO_LEFT:"row"};var Bu=class{constructor(a){this.m=a;this.l=a.getTextDisplayer();this.f=this.h=null;this.a=new _.Qt;this.j=!1;this.g=new _.S("clpp.native.CueHandler")}destroy(){this.a.release();this.j=!1;this.l=this.a=this.h=this.f=null;return Promise.resolve()}start(a){this.j?this.g.warn("Already started. Ignoring request..."):(this.j=!0,this.h=a,this.f=this.h.textTracks,this.a.on(this.f,_.oc,b=>Qo(this,b)),this.a.on(this.f,Yc,()=>{{const b=this.f;for(let c=0;c<b.length;c++){const d=b[c];d.mode===_.Jf&&(d.mode=
420
- _.ce)}}}))}o(a){const b=new _.vu(a.startTime,a.endTime,a.text,_.Eg);if(_.jh(a.vertical))switch(a.vertical){case "lr":b.writingMode=_.wg;break;case "rl":b.writingMode=_.xg}_.kh(a.size)&&(b.size=a.size);if(_.jh(a.align))switch(a.align){case _.je:case _.Pf:b.textAlign=_.Pf;break;case _.Wc:b.textAlign=_.qu;break;case _.Bf:case _.Vd:b.textAlign=_.Vd}_.kh(a.position)&&(b.position=a.position);if(_.jh(a.positionAlign))switch(a.positionAlign){case _.me:b.positionAlign=_.me;break;case _.Wc:b.positionAlign=
421
- _.Wc;break;case _.ne:b.positionAlign=_.ne}_.kh(a.line)&&(b.line=a.line);if(_.jh(a.lineAlign))switch(a.lineAlign){case _.Pf:b.lineAlign=_.tu;break;case _.Wc:b.lineAlign=_.Wc;break;case _.Vd:b.lineAlign=_.Vd}typeof a.snapToLines===_.Mc&&(b.lineInterpretation=a.snapToLines?_.su:1);return b}};var Cu;Cu={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av0?1/],text:[/^vtt$/,/^wvtt/,/^stpp/]};_.Lr=(a,b)=>{const c=Cu[a];for(let d=0;d<c.length;d++)for(let e=0;e<b.length;e++)if(c[d].test(b[e].trim()))return b[e].trim();return a===_.J?"":null};_.Du={text:{mp4:_.xc,m4s:_.xc,m4i:_.xc,cmft:_.xc,vtt:_.Zf,ttml:_.Ac},video:{mp4:_.zg,m4s:_.zg,m4f:_.zg,m4i:_.zg,m4v:_.zg,cmfv:_.zg,ts:_.yg},audio:{mp4:_.Gc,m4s:_.Gc,m4f:_.Gc,m4i:_.Gc,m4a:_.Gc,cmfa:_.Gc,ts:_.yg,aac:_.Dc,ec3:_.Fc,ac3:_.Ec},image:{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}};_.Or=(a,b,c)=>a.map(d=>{d=_.Xm(d)||"";return d=(d=_.Du[b][d])?d:b===_.J?c&&"vtt"!==c?_.xc:_.Zf:null}).filter(Boolean)[0]||null;_.sr=class{constructor(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}toString(){function a(d){return d.name+"\x3d"+(isNaN(Number(d.value))?'"'+d.value+'"':d.value)}let b="#"+this.name;const c=this.attributes?this.attributes.map(a):[];this.value&&c.unshift(this.value);0<c.length&&(b+=":"+c.join(","));return b}getAttribute(a){const b=this.attributes.filter(c=>c.name===a);return b.length?b[0]:null}hasAttribute(a){return null!=this.getAttribute(a)}};
422
- _.rr=class{constructor(a,b){this.name=a;this.value=b}};var Eu=class{constructor(){this.a=this.f=null;this.g=new _.S("clpp.drm.csl")}release(){this.a=this.f=null}};var To={V1_STAGING:[10,191,2,8,3,18,16,40,112,52,84,192,8,246,54,24,173,231,68,61,182,196,200,24,139,231,249,144,5,34,142,2,48,130,1,10,2,130,1,1,0,181,33,18,184,208,93,2,63,204,93,149,226,194,81,193,198,73,180,23,124,216,210,190,239,53,91,176,103,67,222,102,30,61,42,188,49,130,183,153,70,213,95,220,8,223,233,84,7,129,94,154,98,116,179,34,162,199,245,224,103,187,95,10,192,122,137,212,90,234,148,178,81,111,7,91,102,239,129,29,13,38,225,185,166,184,148,242,185,133,121,98,170,23,28,79,102,99,13,62,76,
398
+ "vi"],["vol","vo"],["wel","cy"],["wln","wa"],["wol","wo"],["xho","xh"],["yid","yi"],["yor","yo"],["zha","za"],["zho","zh"],["zul","zu"]]);var no,Kn,Nn,Ln;no=class{constructor(a){this.m=a;this.f=a.getNetworkEngine();this.h=On(this);this.f.bd(this.h);this.a=null}release(){this.a=null;this.f.we(this.h)}};_.fu="maxSuggestedBitrateKbps";Kn={du:"duress",etp:_.Yd,mb:_.fu,rd:"responseDelay",rtt:"roundTripTime"};Nn={at:"availabilityTime",br:"encodedBitrateKbps",ht:"heldTime",n:"intermediaryIdentifier",nor:"nextObjectResponse",nrr:"nextRangeResponse",d:"objectDuration",ot:"objectType",su:"startup",st:"streamType",sf:"streamingFormat",v:vg};
399
+ Ln=new _.T("clpp.net.CmsdManager");var S=class extends _.Nt{constructor(a,b,c){super();tm();this.g=new _.T("clpp.Player");this.g.info("SDK version: 6.30.0");if(!a)throw new _.I(_.D,7,7102);this.ca=new _.Kt;this.f=this.C=b||_.$m();this.l=null;void 0===this.f.license&&(this.f.license=Xm,this.g.warn("You are using the embedded demo license!"));if(!this.f.license)throw this.g.error("You provided null or empty string as your license. Please check your license configuration."),new _.I(_.D,7,7101,"No license provided in configuration!");
400
+ this.j=new tj(a,c);this.F=this.A=this.a=this.H=null;this.I=new _.En;this.h=null;this.Y=[];this.ba=!0;this.K={};this.ga=null;this.R=!0;this.T=this.P=!1;this.L=this.Nc=null;this.Te=!1;this.ia=new Yt(this);this.B=null;this.on(_.Qf,()=>{this.getState()===_.ps&&(this.a?this.a.unload():Promise.resolve())});this.on(_.sc,()=>{this.Te=!0});this.on(_.qc,()=>{this.Te=!1});this.on(_.eg,()=>Sn(this));Un(this,this.f.license);this.j.getMedia()&&(a=this.j.getMedia(),a.hasAttribute("autoplay")&&(a.removeAttribute("autoplay"),
401
+ this.g.debug("Removed autoplay attribute from video element. Auto play will be handled by configuration."),void 0===this.f.autoplay&&(this.f.autoplay=!0,this.g.debug("Setting autoplay in configuration since it was specified in the video element"))));a=[];for(const d of Pn)try{const e=d.create(this.f);e&&a.push(e)}catch(e){this.g.error("Error while creating player plugin",e)}Wn(this,a);this.M=_.na;Ph(this)}on(a,b,c){return super.on(a,b,c)}one(a,b,c){return super.one(a,b,c)}off(a,b){return super.off(a,
402
+ b)}onError(a){if(null!==this.a)this.a.onError(a);else a=new _.H(_.Xd,{detail:a}),this.trigger(a)}md(a){a=this.K[a];void 0===a&&(a=null);return a}getSurface(){return this.j}getConfiguration(){return _.dh(this.f)}getDrmInfo(){return this.a?this.a.getDrmInfo():null}detach(){return this.a?this.a.detach():Promise.resolve()}release(){if(null!=this.l)return this.g.info("Player release already in progress"),this.l;this.g.debug("Releasing player");this.l=Zn(this);return this.l.finally(()=>{$n(this);this.g.debug("Player released");
403
+ this.l=null})}destroy(){if(this.P)return this.g.debug("The player is already destroyed. No-op"),new Promise(a=>a());this.P=!0;return this.release().then(()=>{this.g.debug(za);this.trigger(new _.H("destroying"));return _.Vn(this,_.Le)}).then(()=>{this.a&&this.a.stopForwardingEventsTo(this);this.kd.clear();this.ia.release();if(this.a)return this.a.destroy()}).then(()=>this.I.destroy()).then(()=>{Sh(this);this.A=this.a=null;this.trigger(new _.H("destroyed"))})}load(a){const b=this;return _.w(function*(){try{_.wm(df);
404
+ b.M=_.na;b.ba=!0;const c=_.fn(a),d=cn(a)?a:{};if(d.license)throw new _.I(_.D,7,7100,"License cannot be passed into the load method.");yield _.io(b,d,c);yield _.jo(b);yield _.lo(b);_.wm(cf);_.ym("player.load",df,cf)}catch(c){$n(b);if(b.l)throw b.g.info(Na),new _.I(_.D,7,7E3);throw c;}})}preload(a){const b=this;return _.w(function*(){yield _.io(b,a);if(b.a){var c=b.a;c.preload?yield c.preload(b.f):b.g.warn(kb)}else b.g.warn(gb)})}use(a){(a=Th(a))&&a.playerConstructed(this)}remove(a){return(this.getState()<=
405
+ _.zs||this.R)&&null!==Nh(a)?(Uh(a),this.T=!0):!1}play(){return this.a?this.h&&!this.h.A()?Promise.resolve():this.a.play():Promise.reject("No player initialized. You need to load content before calling play.")}pause(){return this.a?this.a.pause():Promise.reject("No player initialized. You need to load content before calling pause.")}getTrackManager(){return this.a&&this.a.getTrackManager()}getBufferInfo(a){return this.a?this.a.getBufferInfo(a):new _.Ht}getState(){return this.a?this.a.getState():_.zs}getPeriods(){return this.a?
406
+ this.a.getPeriods():[]}isEnded(){return this.a&&this.a.isEnded()||!1}isPaused(){return this.a&&this.a.isPaused()||!1}getPosition(){return this.a?this.a.getPosition():0}seek(a){return this.getState()===_.ps?Promise.reject("Cannot seek in current state."):this.a?this.a.seek(a):Promise.reject("delegate does not exist")}getPresentationStartTime(){return this.a?this.a.getPresentationStartTime():null}getSeekRange(){return this.a?this.a.getSeekRange():{start:0,end:0}}xc(){const a=this.a;return a&&a.xc?a.xc():
407
+ null}getVolume(){return this.a?this.a.getVolume():null}setVolume(a){this.a&&this.a.setVolume(a)}getDuration(){return this.a?this.a.getDuration():-1}getAdsManager(){return this.h}namespace(){return this.a&&this.a.namespace()||"Undefined"}getPlaybackRate(){return this.a?this.a.getPlaybackRate():1}setPlaybackRate(a,b){this.a&&this.a.setPlaybackRate(a,b)}isMuted(){return this.h&&this.h instanceof Rn?this.h.isMuted():this.a&&this.a.isMuted()||!1}setMuted(a){this.a&&this.a.setMuted(a);this.h&&this.h instanceof
408
+ Rn&&this.h.setMuted(a)}getNetworkEngine(){return this.I}setNetworkEngine(a){this.I=a}getTextDisplayer(){return this.a&&this.a.getTextDisplayer()}isLive(){return!!this.a&&this.a.isLive()}getStats(){return this.a?this.a.getStats():null}pg(){return Object.freeze(this.ga)}getLoadedSource(){return this.a&&this.a.getLoadedSource()}getTimelineCues(){return this.a?this.a.getTimelineCues():[]}getCueTimeline(){return this.a?this.a.getCueTimeline():null}resetAbr(){this.a&&this.a.resetAbr()}setDrmCustomDataModifier(a){this.Nc=
409
+ a;fo(this)}setCdnErrorCallback(a){this.L=a;this.a&&this.a.setCdnErrorCallback(this.L)}};_.x("clpp.Player",S);S.registerPlugin=_.Qn;S.prototype.setCdnErrorCallback=S.prototype.setCdnErrorCallback;S.prototype.setDrmCustomDataModifier=S.prototype.setDrmCustomDataModifier;S.prototype.resetAbr=S.prototype.resetAbr;S.prototype.getTimelineCues=S.prototype.getTimelineCues;S.prototype.getLoadedSource=S.prototype.getLoadedSource;S.prototype.getSources=S.prototype.pg;S.prototype.getStats=S.prototype.getStats;
410
+ S.prototype.isLive=S.prototype.isLive;S.prototype.getTextDisplayer=S.prototype.getTextDisplayer;S.prototype.setNetworkEngine=S.prototype.setNetworkEngine;S.prototype.getNetworkEngine=S.prototype.getNetworkEngine;S.prototype.setMuted=S.prototype.setMuted;S.prototype.isMuted=S.prototype.isMuted;S.prototype.setPlaybackRate=S.prototype.setPlaybackRate;S.prototype.getPlaybackRate=S.prototype.getPlaybackRate;S.prototype.namespace=S.prototype.namespace;S.prototype.getAdsManager=S.prototype.getAdsManager;
411
+ S.prototype.getDuration=S.prototype.getDuration;S.prototype.setVolume=S.prototype.setVolume;S.prototype.getVolume=S.prototype.getVolume;S.prototype.getTimelineOffset=S.prototype.xc;S.prototype.getSeekRange=S.prototype.getSeekRange;S.prototype.getPresentationStartTime=S.prototype.getPresentationStartTime;S.prototype.seek=S.prototype.seek;S.prototype.getPosition=S.prototype.getPosition;S.prototype.isPaused=S.prototype.isPaused;S.prototype.isEnded=S.prototype.isEnded;S.prototype.getState=S.prototype.getState;
412
+ S.prototype.getBufferInfo=S.prototype.getBufferInfo;S.prototype.getTrackManager=S.prototype.getTrackManager;S.prototype.pause=S.prototype.pause;S.prototype.play=S.prototype.play;S.prototype.remove=S.prototype.remove;S.prototype.use=S.prototype.use;S.prototype.load=S.prototype.load;S.prototype.destroy=S.prototype.destroy;S.prototype.release=S.prototype.release;S.prototype.getDrmInfo=S.prototype.getDrmInfo;S.prototype.getConfiguration=S.prototype.getConfiguration;S.prototype.getSurface=S.prototype.getSurface;
413
+ S.prototype.getPlugin=S.prototype.md;S.prototype.off=S.prototype.off;S.prototype.one=S.prototype.one;S.prototype.on=S.prototype.on;_.zs=0;_.ps=6;_.vs={IDLE:_.zs,PREPARING:1,BUFFERING:2,PLAYING:3,PAUSED:4,ENDED:5,ERROR:_.ps,UNSET:7};S.State=_.vs;var Pn=[];var gu=class{constructor(){this.Cc=null;this.f=[];this.h=[];this.Sa=new _.T(gd);this.a=null;this.j=!1}load(a){const b=this;return _.w(function*(){b.Cc?yield ro(b,c=>_.w(function*(){yield c.load(a)})):b.Sa.warn("No main player, cannot load.")})}Ri(a){this.j=a;this.Sa.info("Looping set to",a)}qh(a){this.f.push(a)}ph(a){if(this.Cc)this.Sa.warn("Main player already set.");else{this.Cc=a;var b=this.o.bind(this),c=this.w.bind(this),d=this.l.bind(this);a.on(_.Qf,b);a.on(_.fg,c);a.on(_.Wd,d);this.h.push(()=>
414
+ {a.off(_.Qf,b);a.off(_.fg,c);a.on(_.Wd,d)})}}clear(){this.Cc=null;this.f=[];this.h.forEach(a=>a());this.h=[]}l(){const a=this;return _.w(function*(){a.j&&(a.Sa.info("Looping playback."),yield ro(a,b=>_.w(function*(){yield b.seek(0);yield b.play()})))})}o(a){this.a||(a=a.detail.currentState,3===a?(this.Sa.info("Mirroring playing."),so(this,b=>_.w(function*(){yield b.play()}))):[4,2,_.ps].includes(a)&&(this.Sa.info("Mirroring paused/buffering/error."),so(this,b=>{const c=this;return _.w(function*(){var d=
415
+ Math.round(c.Cc.getPosition())-.1;yield b.seek(d);yield Ii(.2);d=b.getState();if(3===d||2===d)yield b.pause()})})))}w(){this.a||so(this,a=>{const b=this;return _.w(function*(){a.isPaused()&&(yield a.play());const c=b.Cc.getPosition();var d=a.getPosition();d=c-d;const e=Math.abs(d),f=a.getPlaybackRate();if(!(3!==a.getState()||.05>=e)){var g=Math.abs(d);g=Math.min(Math.max(1+(.05>=g?0:g/(1>g?6:3))*Math.sign(d),.2),5);5<=e?(a.setPlaybackRate(1),yield a.seek(c)):f===g?1!==g&&b.Sa.info(`Delta ${d.toFixed(1)} s.`):
416
+ (1===g?b.Sa.info("Secondary caught up."):1>g?b.Sa.info("Secondary slowing down to catch up. "+`Rate: ${g.toFixed(1)}, delta: ${d.toFixed(1)} s`):1<g&&b.Sa.info("Secondary speeding up to catch up. "+`Rate: ${g.toFixed(1)}, delta: ${d.toFixed(1)} s`),a.setPlaybackRate(g))}})})}};_.x(gd,gu);gu.prototype.clear=gu.prototype.clear;gu.prototype.addMainPlayer=gu.prototype.ph;gu.prototype.addSecondaryPlayer=gu.prototype.qh;gu.prototype.setLoop=gu.prototype.Ri;gu.prototype.load=gu.prototype.load;var hu=class{constructor(a){this.m=a;this.l=a.getConfiguration().streaming.addMissingTimelineCues||!1;this.j=new _.Kt;this.f=new Set;this.a=new Set;this.h=null;this.g=new _.T("clpp.native.Metadata")}release(){this.j.release();this.a=new Set;this.f.clear();null!=this.h&&(clearInterval(this.h),this.h=null)}destroy(){const a=this;return _.w(function*(){a.release()})}getTimelineCues(){return Array.from(this.a.values()).sort((a,b)=>a.startTime-b.startTime)}};_.ou=class{constructor(a,b,c,d){d=void 0===d?_.iu:d;this.startTime=a;this.endTime=b;this.payload=c;this.payloadType=d;this.positionAlign=this.position=null;this.size=100;this.textAlign=_.ju;this.writingMode=_.ku;this.lineInterpretation=_.lu;this.line=null;this.lineAlign=_.mu;this.direction=nu;this.region=null;this.cssClassList=[];this.id=this.backgroundImage="";this.containerRows=null}Oc(a){return this.payload===a.payload&&this.startTime===a.startTime&&this.endTime===a.endTime&&this.payloadType===
417
+ a.payloadType}};_.x("clpp.text.Cue",_.ou);_.ou.positionAlign={LEFT:_.me,RIGHT:_.ne,CENTER:_.Xc,AUTO:"auto"};_.iu=_.Yf;_.ou.payloadType={TEXT:_.iu,VTT_XML:_.Eg,TTML_XML:_.ig};_.ju=_.Xc;_.pu={LEFT:_.je,RIGHT:_.Bf,CENTER:_.ju,START:_.Pf,END:_.Vd};_.ou.textAlign=_.pu;var nu="ltr";_.ou.direction={HORIZONTAL_LEFT_TO_RIGHT:nu,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};_.ku="horizontal-tb";_.ou.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.ku,VERTICAL_LEFT_TO_RIGHT:_.wg,VERTICAL_RIGHT_TO_LEFT:_.xg};_.lu=0;
418
+ _.ou.lineInterpretation={LINE_NUMBER:_.lu,PERCENTAGE:1};_.mu=_.Pf;_.qu={CENTER:_.Xc,START:_.mu,END:_.Vd};_.ou.lineAlign=_.qu;_.tu=class{constructor(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=_.ru;this.scroll=su;this.cssClassList=[];this.writingMode=this.displayAlign=null}};_.x("clpp.text.CueRegion",_.tu);_.ru=1;_.tu.units={PX:0,PERCENTAGE:_.ru,LINES:2};var su="";
419
+ _.tu.scrollMode={NONE:su,UP:"up"};_.tu.displayAlign={BEFORE:"flex-end",CENTER:_.Xc,AFTER:"flex-start"};_.tu.writingMode={HORIZONTAL_TOP_TO_BOTTOM:_.qd,VERTICAL_LEFT_TO_RIGHT:"row-reverse",VERTICAL_RIGHT_TO_LEFT:"row"};var uu=class{constructor(a){this.m=a;this.l=a.getTextDisplayer();this.f=this.h=null;this.a=new _.Kt;this.j=!1;this.g=new _.T("clpp.native.CueHandler")}destroy(){this.a.release();this.j=!1;this.l=this.a=this.h=this.f=null;return Promise.resolve()}start(a){this.j?this.g.warn("Already started. Ignoring request..."):(this.j=!0,this.h=a,this.f=this.h.textTracks,this.a.on(this.f,_.oc,b=>Ko(this,b)),this.a.on(this.f,Zc,()=>{{const b=this.f;for(let c=0;c<b.length;c++){const d=b[c];d.mode===_.Jf&&(d.mode=
420
+ _.ce)}}}))}o(a){const b=new _.ou(a.startTime,a.endTime,a.text,_.Eg);if(_.jh(a.vertical))switch(a.vertical){case "lr":b.writingMode=_.wg;break;case "rl":b.writingMode=_.xg}_.kh(a.size)&&(b.size=a.size);if(_.jh(a.align))switch(a.align){case _.je:case _.Pf:b.textAlign=_.Pf;break;case _.Xc:b.textAlign=_.ju;break;case _.Bf:case _.Vd:b.textAlign=_.Vd}_.kh(a.position)&&(b.position=a.position);if(_.jh(a.positionAlign))switch(a.positionAlign){case _.me:b.positionAlign=_.me;break;case _.Xc:b.positionAlign=
421
+ _.Xc;break;case _.ne:b.positionAlign=_.ne}_.kh(a.line)&&(b.line=a.line);if(_.jh(a.lineAlign))switch(a.lineAlign){case _.Pf:b.lineAlign=_.mu;break;case _.Xc:b.lineAlign=_.Xc;break;case _.Vd:b.lineAlign=_.Vd}typeof a.snapToLines===_.Nc&&(b.lineInterpretation=a.snapToLines?_.lu:1);return b}};var vu;vu={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av0?1/],text:[/^vtt$/,/^wvtt/,/^stpp/]};_.Fr=(a,b)=>{const c=vu[a];for(let d=0;d<c.length;d++)for(let e=0;e<b.length;e++)if(c[d].test(b[e].trim()))return b[e].trim();return a===_.K?"":null};_.wu={text:{mp4:_.yc,m4s:_.yc,m4i:_.yc,cmft:_.yc,vtt:_.Zf,ttml:_.Bc},video:{mp4:_.zg,m4s:_.zg,m4f:_.zg,m4i:_.zg,m4v:_.zg,cmfv:_.zg,ts:_.yg},audio:{mp4:_.Hc,m4s:_.Hc,m4f:_.Hc,m4i:_.Hc,m4a:_.Hc,cmfa:_.Hc,ts:_.yg,aac:_.Ec,ec3:_.Gc,ac3:_.Fc},image:{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}};_.Ir=(a,b,c)=>a.map(d=>{d=_.Rm(d)||"";return d=(d=_.wu[b][d])?d:b===_.K?c&&"vtt"!==c?_.yc:_.Zf:null}).filter(Boolean)[0]||null;_.mr=class{constructor(a,b,c,d){this.id=a;this.name=b;this.attributes=c;this.value=void 0===d?null:d}toString(){function a(d){return d.name+"\x3d"+(isNaN(Number(d.value))?'"'+d.value+'"':d.value)}let b="#"+this.name;const c=this.attributes?this.attributes.map(a):[];this.value&&c.unshift(this.value);0<c.length&&(b+=":"+c.join(","));return b}getAttribute(a){const b=this.attributes.filter(c=>c.name===a);return b.length?b[0]:null}hasAttribute(a){return null!=this.getAttribute(a)}};
422
+ _.lr=class{constructor(a,b){this.name=a;this.value=b}};var xu=class{constructor(){this.a=this.f=null;this.g=new _.T("clpp.drm.csl")}release(){this.a=this.f=null}};var No={V1_STAGING:[10,191,2,8,3,18,16,40,112,52,84,192,8,246,54,24,173,231,68,61,182,196,200,24,139,231,249,144,5,34,142,2,48,130,1,10,2,130,1,1,0,181,33,18,184,208,93,2,63,204,93,149,226,194,81,193,198,73,180,23,124,216,210,190,239,53,91,176,103,67,222,102,30,61,42,188,49,130,183,153,70,213,95,220,8,223,233,84,7,129,94,154,98,116,179,34,162,199,245,224,103,187,95,10,192,122,137,212,90,234,148,178,81,111,7,91,102,239,129,29,13,38,225,185,166,184,148,242,185,133,121,98,170,23,28,79,102,99,13,62,76,
423
423
  96,39,24,137,127,94,30,249,182,170,245,173,77,186,42,126,20,23,109,241,52,161,211,24,91,90,33,138,192,90,76,65,240,129,239,255,128,163,160,64,197,11,9,187,199,64,238,220,216,241,77,103,90,145,152,15,146,202,125,220,100,106,6,173,173,81,1,247,74,14,73,140,192,31,0,83,43,172,33,120,80,189,144,94,144,146,54,86,183,223,239,239,66,72,103,103,243,62,246,40,61,79,66,84,171,114,88,147,144,190,229,88,8,241,214,104,8,13,69,216,147,194,188,162,247,77,96,160,192,208,160,153,60,239,1,96,71,3,51,76,54,56,19,148,
424
424
  134,188,157,175,36,253,103,160,127,154,217,67,2,3,1,0,1,58,18,115,116,97,103,105,110,103,46,103,111,111,103,108,101,46,99,111,109,18,128,3,152,62,48,53,38,117,244,11,167,21,252,36,155,218,229,212,172,114,73,162,102,101,33,228,54,85,115,149,41,114,31,248,128,224,170,239,197,226,123,201,128,218,234,218,191,63,195,134,208,132,160,44,130,83,120,72,204,117,63,244,151,176,17,167,218,151,120,138,0,226,170,107,132,205,125,113,192,122,72,235,246,22,2,204,165,163,243,32,48,167,41,92,48,218,145,91,145,220,24,
425
425
  185,188,149,147,184,222,139,181,15,13,237,193,41,56,184,233,224,57,205,222,24,250,130,232,27,176,50,99,15,233,85,216,90,86,108,225,84,48,11,246,212,193,189,18,105,102,53,107,40,125,101,123,24,206,99,208,239,212,95,197,38,158,151,234,177,28,181,99,229,86,67,178,111,244,159,16,156,33,1,175,202,243,91,131,47,40,143,13,157,69,150,14,37,158,133,251,93,36,219,210,207,130,118,76,93,217,191,114,126,251,233,200,97,248,105,50,31,106,222,24,144,95,77,146,249,166,218,101,54,219,132,117,135,29,22,142,135,11,178,
@@ -433,101 +433,101 @@ _.rr=class{constructor(a,b){this.name=a;this.value=b}};var Eu=class{constructor(
433
433
  21,58,231,13,118,215,58,166,74,44,51,103,50,120,198,197,213,64,34,105,66,115,72,235,88,51,28,238,54,93,147,140,187,28,173,50,109,5,234,155,141,29,52,234,135,38,55,103,111,116,98,171,210,13,211,129,249,70,57,64,155,151,38,8,225,188,229,3,247,234,26,46,91,211,250,252,38,87,111,205,37,108,74,168,112,74,116,191,73,170,243,167,54,36,20,23,72,67,35,181,159,241,102,250,221,22,18,92,161,54,236,172,183,214,18,160,199,92,46,171,180,211,90,64,62,144,121,201,77,74,211,17,244,49,124,244,120,116,148,234,184,79,
434
434
  136,12,176,34,231,39,149,87,28,219,2,3,1,0,1,58,12,99,97,115,116,108,97,98,115,46,99,111,109,64,1,18,128,3,50,97,151,165,120,63,210,172,84,187,10,36,166,202,149,32,118,107,37,251,186,217,170,254,4,95,20,85,66,157,43,154,24,66,136,147,101,223,78,204,173,228,175,111,100,168,97,164,222,84,160,51,79,233,227,223,105,252,85,11,242,129,199,206,11,9,236,118,163,118,204,179,159,69,108,223,229,114,176,8,26,36,9,23,103,233,62,55,162,154,209,96,98,102,80,173,114,233,213,36,56,135,65,188,245,176,95,70,189,199,
435
435
  143,81,72,182,124,207,225,238,28,172,144,110,89,44,12,137,51,52,239,130,117,119,15,207,200,229,142,166,8,80,79,111,255,191,70,47,189,108,75,234,184,241,119,21,255,98,167,124,132,30,239,102,113,7,132,96,39,134,123,220,209,255,110,222,35,147,0,77,125,253,129,139,66,158,126,221,13,117,113,163,143,235,9,130,180,3,133,94,152,45,199,69,168,182,95,122,82,25,203,10,99,191,186,193,238,225,224,140,156,142,171,110,26,214,32,240,6,218,138,10,47,114,133,17,1,151,43,213,223,198,210,186,81,18,50,221,84,177,180,
436
- 26,58,164,235,113,177,235,207,22,230,8,119,76,167,166,176,173,209,214,53,116,116,231,227,221,238,174,87,249,19,166,195,81,47,210,172,15,75,251,202,192,80,85,213,23,17,178,104,181,193,115,239,91,72,230,167,55,143,10,250,26,54,8,60,13,213,206,235,3,215,179,205,232,1,144,158,35,48,196,149,117,219,63,196,130,117,40,165,193,65,215,122,44,201,218,67,216,6,131,178,5,168,229,21,137,112,215,254,127,48,160,181,68,49,255,64,46,247,236,85,155,146,208,5,219,252,37,174,31,218,136,135,55,119,112]};_.Fu=class{constructor(a){this.I=a;this.f={}}Xa(a,b){this.f[a]=b}};_.x("clpp.drm.DrmEnvironment",_.Fu);_.Fu.prototype.setDrmSystem=_.Fu.prototype.Xa;_.qp=class{constructor(a,b){b=void 0===b?!1:b;this.f=_.kh(a)?new DataView(new ArrayBuffer(a),0,a):a;this.a=0;this.h=b;this.buffer=this.f.buffer}getPosition(){return this.a}Na(){return this.f.byteLength}seek(a){(0>a||a>=this.f.byteLength)&&_.Wo();this.a=a}};_.gq=class{constructor(a,b){this.f=a;this.h=void 0===b?!0:b;this.a=0}getPosition(){return this.a}Na(){return this.f.byteLength}skip(a){this.a+a>this.f.byteLength&&_.Zo();this.a+=a}seek(a){if(0>a||a>=this.f.byteLength)throw _.Zo();this.a=a}};
437
- _.x("clpp.utils.dataview.DataViewReader",_.gq);_.op=class{constructor(){this.h=[];this.f=[];this.a=!1;this.g=new _.S("clpp.mp4")}N(a,b){a=fp(a);this.h[a]=Gu;this.f[a]=b;return this}ea(a,b){a=fp(a);this.h[a]=Hu;this.f[a]=b;return this}stop(){this.a=!0}parse(a,b){a=_.F(a);a=new _.gq(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);for(this.a=!1;_.Yo(a)&&!this.a;)this.pe(0,a,b)}pe(a,b,c){const d=b.getPosition();let e=_.M(b);var f=_.M(b);let g=!1;this.g.debug("Parsing MP4 box",_.gp(f));switch(e){case 0:e=b.Na()-d;break;case 1:e=_.cp(b),g=!0}const h=
438
- this.f[f];if(h){let m=null;var k=null;this.h[f]===Hu&&(k=_.M(b),m=k>>>24,k&=16777215);f=b.getPosition()-d;var l=d+e;c&&l>b.Na()&&(l=b.Na());l-=b.getPosition();b=0<l?_.ep(b,l):new Uint8Array(0);b=new _.gq(new DataView(b.buffer,b.byteOffset,b.byteLength),!1);h({parser:this,partialOkay:c||!1,version:m,flags:k,reader:b,size:e,start:d+a,headerSize:f,has64BitSize:g})}else a=Math.min(d+e-b.getPosition(),b.Na()-b.getPosition()),b.skip(a)}};_.x("clpp.utils.Mp4Parser",_.op);_.op.typeToString=_.gp;
439
- _.op.allData=_.jp;_.op.sampleDescription=_.ip;_.op.children=_.hp;_.op.prototype.parseNext=_.op.prototype.pe;_.op.prototype.parse=_.op.prototype.parse;_.op.prototype.stop=_.op.prototype.stop;_.op.prototype.fullBox=_.op.prototype.ea;_.op.prototype.box=_.op.prototype.N;_.op.headerSize=_.kp;var Gu=0,Hu=1;var Iu=class{};_.x("clpp.utils.FairplayUtils",Iu);Iu.parseFairPlayResponse=_.tp;Iu.formatFairPlayRequest=_.sp;Iu.createFairplayPayload=rp;Iu.extractContentId=_.np;Iu.extractExtXKeyUri=lp;var Ju=class{};_.x(hd,Ju);var zp=new _.S(hd),Jp="PRODUCTION",Kp="STAGING",Lp="DEMO",Mp="TEST",Ku={PRODUCTION:Jp,STAGING:Kp,DEMO:Lp,TEST:Mp};Ju.Environment=Ku;Ju.WidevineCertificates={V1_PROD:"V1_PROD",V1_STAGING:"V1_STAGING",V2:"V2"};
440
- var vp="/license-proxy-widevine/cenc/",wp="/license-proxy-headerauth/drmtoday/RightsManager.asmx",xp="/license-server-fairplay/",Np={"00000":"Success","01000":"General Internal Error","02000":"General Request Error","03000":"General Request Authentication Error",10001:"Bad Request",3E4:"General DRM error",4E4:"General Widevine Modular error",40001:"Widevine Device Certificate Revocation (wv 127)",40002:"Widevine Device Certificate Revocation - Permanently (wv 175)",41E3:"General Widevine Classic error",
441
- 42E3:"General Playready error",43E3:"General Fairplay error",44E3:"General OMA error",44001:"OMA Device registration failed",45E3:"General CDRM error",45001:"CDRM Device registration failed",6E4:"CSL",60001:"CSL - INVALID",60100:"CSL - Denied by Stream Limiting",7E4:"General Output Protection",70001:"All keys filtered by EOP settings",8E4:"TAKE DOWN",80001:"TAKE DOWN - Denied by Take Down",9E4:"General GBL error",90001:"License delivery prohibited in your region"},Lu=[Fa,Ha,Ga,_.nb,_.mb],Mu=[Fa,Ha,
442
- Ga,_.nb,_.mb],Nu=["3000","2000","150"],Ou=["2000","150"];
443
- for(const a of Object.keys(Ku)){let b=xa;a!==Jp&&(b+=`_${a}`);const c=new _.Fu(b);let d=null;switch(a){case Jp:case Kp:case Lp:d=_.Uo("V2");break;case Mp:d=null}c.Xa(_.vd,{licenseUrl:yp(_.vd,a),videoRobustness:Lu,audioRobustness:Mu,persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:d,modifiers:{licenseRequest:_.Bp,licenseResponse:_.Cp}});c.Xa(_.rd,{licenseUrl:yp(_.rd,a),certificateUrl:up(a)+"/license-server-fairplay/cert/",modifiers:{licenseRequest:_.Ep,licenseResponse:_.Fp,
444
- extractContentId:_.Gp,certificateRequest:_.Hp}});c.Xa(_.td,{licenseUrl:yp(_.td,a),videoRobustness:Nu,audioRobustness:Ou,modifiers:{licenseRequest:Ip}});_.qn(c)};_.Pu=class{constructor(a){this.f=a;this.a=void 0}value(){void 0===this.a&&(this.a=this.f());return this.a}};var Ru=class{constructor(){this.size=0;this.a=void 0;this.g=new _.S("clpp.drm.eme.MediaKeyStatusMap")}getStatus(){return this.a}forEach(a){this.a&&a(this.a,Qu.value())}get(a){if(this.has(a))return this.a}has(a){const b=Qu.value();return this.a&&hi(a,b)?!0:!1}entries(){}keys(){}values(){}},Qu=new _.Pu(()=>ni(new Uint8Array([0])));var Rp=new _.Pu(()=>new Map([[HTMLMediaElement.HAVE_METADATA,_.ue],[HTMLMediaElement.HAVE_CURRENT_DATA,_.te],[HTMLMediaElement.HAVE_FUTURE_DATA,Pc],[HTMLMediaElement.HAVE_ENOUGH_DATA,Qc]]));var Tu=class{constructor(){this.j=this.w=null}l(a){this.w=a}h(a){const b=this.j;b&&b!==a&&Tp(b,null);return(this.j=a)?Tp(a,this.w):Promise.resolve()}o(){return this.j}a(a,b){_.xh("AppleEmeManager.requestMediaKeySystemAccess");try{const c=new Su(a,b);return Promise.resolve(c)}catch(c){return Promise.reject(c)}}f(){return yq}},Su=class{constructor(a,b){this.keySystem=a;if(a.startsWith(_.rd))for(var c of b){a:{a=c;if(a.persistentState===_.zf){a=null;break a}b={audioCapabilities:[],videoCapabilities:[],
436
+ 26,58,164,235,113,177,235,207,22,230,8,119,76,167,166,176,173,209,214,53,116,116,231,227,221,238,174,87,249,19,166,195,81,47,210,172,15,75,251,202,192,80,85,213,23,17,178,104,181,193,115,239,91,72,230,167,55,143,10,250,26,54,8,60,13,213,206,235,3,215,179,205,232,1,144,158,35,48,196,149,117,219,63,196,130,117,40,165,193,65,215,122,44,201,218,67,216,6,131,178,5,168,229,21,137,112,215,254,127,48,160,181,68,49,255,64,46,247,236,85,155,146,208,5,219,252,37,174,31,218,136,135,55,119,112]};_.yu=class{constructor(a){this.I=a;this.f={}}Ya(a,b){this.f[a]=b}};_.x("clpp.drm.DrmEnvironment",_.yu);_.yu.prototype.setDrmSystem=_.yu.prototype.Ya;_.kp=class{constructor(a,b){b=void 0===b?!1:b;this.f=_.kh(a)?new DataView(new ArrayBuffer(a),0,a):a;this.a=0;this.h=b;this.buffer=this.f.buffer}getPosition(){return this.a}Oa(){return this.f.byteLength}seek(a){(0>a||a>=this.f.byteLength)&&_.Qo();this.a=a}};_.aq=class{constructor(a,b){this.f=a;this.h=void 0===b?!0:b;this.a=0}getPosition(){return this.a}Oa(){return this.f.byteLength}skip(a){this.a+a>this.f.byteLength&&_.To();this.a+=a}seek(a){if(0>a||a>=this.f.byteLength)throw _.To();this.a=a}};
437
+ _.x("clpp.utils.dataview.DataViewReader",_.aq);_.ip=class{constructor(){this.h=[];this.f=[];this.a=!1;this.g=new _.T("clpp.mp4")}N(a,b){a=$o(a);this.h[a]=zu;this.f[a]=b;return this}ea(a,b){a=$o(a);this.h[a]=Au;this.f[a]=b;return this}stop(){this.a=!0}parse(a,b){a=_.G(a);a=new _.aq(new DataView(a.buffer,a.byteOffset,a.byteLength),!1);for(this.a=!1;_.So(a)&&!this.a;)this.te(0,a,b)}te(a,b,c){const d=b.getPosition();let e=_.N(b);var f=_.N(b);let g=!1;this.g.debug("Parsing MP4 box",_.ap(f));switch(e){case 0:e=b.Oa()-d;break;case 1:e=_.Xo(b),g=!0}const h=
438
+ this.f[f];if(h){let m=null;var k=null;this.h[f]===Au&&(k=_.N(b),m=k>>>24,k&=16777215);f=b.getPosition()-d;var l=d+e;c&&l>b.Oa()&&(l=b.Oa());l-=b.getPosition();b=0<l?_.Zo(b,l):new Uint8Array(0);b=new _.aq(new DataView(b.buffer,b.byteOffset,b.byteLength),!1);h({parser:this,partialOkay:c||!1,version:m,flags:k,reader:b,size:e,start:d+a,headerSize:f,has64BitSize:g})}else a=Math.min(d+e-b.getPosition(),b.Oa()-b.getPosition()),b.skip(a)}};_.x("clpp.utils.Mp4Parser",_.ip);_.ip.typeToString=_.ap;
439
+ _.ip.allData=_.dp;_.ip.sampleDescription=_.cp;_.ip.children=_.bp;_.ip.prototype.parseNext=_.ip.prototype.te;_.ip.prototype.parse=_.ip.prototype.parse;_.ip.prototype.stop=_.ip.prototype.stop;_.ip.prototype.fullBox=_.ip.prototype.ea;_.ip.prototype.box=_.ip.prototype.N;_.ip.headerSize=_.ep;var zu=0,Au=1;var Bu=class{};_.x("clpp.utils.FairplayUtils",Bu);Bu.parseFairPlayResponse=_.np;Bu.formatFairPlayRequest=_.mp;Bu.createFairplayPayload=lp;Bu.extractContentId=_.hp;Bu.extractExtXKeyUri=fp;var Cu=class{};_.x(id,Cu);var tp=new _.T(id),Dp="PRODUCTION",Ep="STAGING",Fp="DEMO",Gp="TEST",Du={PRODUCTION:Dp,STAGING:Ep,DEMO:Fp,TEST:Gp};Cu.Environment=Du;Cu.WidevineCertificates={V1_PROD:"V1_PROD",V1_STAGING:"V1_STAGING",V2:"V2"};
440
+ var pp="/license-proxy-widevine/cenc/",qp="/license-proxy-headerauth/drmtoday/RightsManager.asmx",rp="/license-server-fairplay/",Hp={"00000":"Success","01000":"General Internal Error","02000":"General Request Error","03000":"General Request Authentication Error",10001:"Bad Request",3E4:"General DRM error",4E4:"General Widevine Modular error",40001:"Widevine Device Certificate Revocation (wv 127)",40002:"Widevine Device Certificate Revocation - Permanently (wv 175)",41E3:"General Widevine Classic error",
441
+ 42E3:"General Playready error",43E3:"General Fairplay error",44E3:"General OMA error",44001:"OMA Device registration failed",45E3:"General CDRM error",45001:"CDRM Device registration failed",6E4:"CSL",60001:"CSL - INVALID",60100:"CSL - Denied by Stream Limiting",7E4:"General Output Protection",70001:"All keys filtered by EOP settings",8E4:"TAKE DOWN",80001:"TAKE DOWN - Denied by Take Down",9E4:"General GBL error",90001:"License delivery prohibited in your region"},Eu=[Fa,Ha,Ga,_.pb,_.ob],Fu=[Fa,Ha,
442
+ Ga,_.pb,_.ob],Gu=["3000","2000","150"],Hu=["2000","150"];
443
+ for(const a of Object.keys(Du)){let b=xa;a!==Dp&&(b+=`_${a}`);const c=new _.yu(b);let d=null;switch(a){case Dp:case Ep:case Fp:d=_.Oo("V2");break;case Gp:d=null}c.Ya(_.wd,{licenseUrl:sp(_.wd,a),videoRobustness:Eu,audioRobustness:Fu,persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:d,modifiers:{licenseRequest:_.vp,licenseResponse:_.wp}});c.Ya(_.sd,{licenseUrl:sp(_.sd,a),certificateUrl:op(a)+"/license-server-fairplay/cert/",modifiers:{licenseRequest:_.yp,licenseResponse:_.zp,
444
+ extractContentId:_.Ap,certificateRequest:_.Bp}});c.Ya(_.ud,{licenseUrl:sp(_.ud,a),videoRobustness:Gu,audioRobustness:Hu,modifiers:{licenseRequest:Cp}});_.kn(c)};_.Iu=class{constructor(a){this.f=a;this.a=void 0}value(){void 0===this.a&&(this.a=this.f());return this.a}};var Ku=class{constructor(){this.size=0;this.a=void 0;this.g=new _.T("clpp.drm.eme.MediaKeyStatusMap")}getStatus(){return this.a}forEach(a){this.a&&a(this.a,Ju.value())}get(a){if(this.has(a))return this.a}has(a){const b=Ju.value();return this.a&&fi(a,b)?!0:!1}entries(){}keys(){}values(){}},Ju=new _.Iu(()=>li(new Uint8Array([0])));var Lp=new _.Iu(()=>new Map([[HTMLMediaElement.HAVE_METADATA,_.ue],[HTMLMediaElement.HAVE_CURRENT_DATA,_.te],[HTMLMediaElement.HAVE_FUTURE_DATA,Qc],[HTMLMediaElement.HAVE_ENOUGH_DATA,Rc]]));var Mu=class{constructor(){this.j=this.w=null}l(a){this.w=a}h(a){const b=this.j;b&&b!==a&&Np(b,null);return(this.j=a)?Np(a,this.w):Promise.resolve()}o(){return this.j}a(a,b){_.xh("AppleEmeManager.requestMediaKeySystemAccess");try{const c=new Lu(a,b);return Promise.resolve(c)}catch(c){return Promise.reject(c)}}f(){return sq}},Lu=class{constructor(a,b){this.keySystem=a;if(a.startsWith(_.sd))for(var c of b){a:{a=c;if(a.persistentState===_.zf){a=null;break a}b={audioCapabilities:[],videoCapabilities:[],
445
445
  persistentState:_.Pe,distinctiveIdentifier:_.Pe,initDataTypes:a.initDataTypes,sessionTypes:[Xf],label:a.label};let d=!1,e=!1;if(a.audioCapabilities)for(const f of a.audioCapabilities)f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.audioCapabilities.push(f),e=!0));if(a.videoCapabilities)for(const f of a.videoCapabilities)f.contentType&&(d=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,f.contentType.split(";")[0])&&(b.videoCapabilities.push(f),
446
- e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,_.zg));a=e?b:null}if(a){this.a=a;return}}c=Error(yb);c.name=ab;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){const a=new Uu(this.keySystem);return Promise.resolve(a)}getConfiguration(){_.xh("AppleEmeManager.MediaKeySystemAccess.getConfiguration");return this.a}},Uu=class{constructor(a){this.f=null;this.h=new WebKitMediaKeys(a);this.a=new _.Qt;this.j=0;this.g=new _.S(jd);this.g.info("Created Media Keys for "+a)}createSession(a){a=
447
- void 0===a?Xf:a;this.g.debug("Creating Apple MediaKeys Session");if(a!==Xf)throw new TypeError("Session type "+a+ba);return new Vu(this.h,`__session_${this.j++}`)}setServerCertificate(){this.g.debug("AppleEmeManager.MediaKeys.setServerCertificate");return Promise.resolve(!1)}},Vu=class extends _.Tt{constructor(a,b){super();this.a=null;this.o=a;this.f=this.h=null;this.j=new _.Qt;this.sessionId=b;this.expiration=NaN;this.closed=new _.Jl;this.l=!1;this.keyStatuses=new Ru;this.g=new _.S(jd)}generateRequest(a,
448
- b){if(this.l)return Promise.reject(ob);this.g.debug("generateRequest");this.h=new _.Jl;try{const c=this.o.createSession(_.zg,_.F(b));this.a=c;this.sessionId=c.sessionId||this.sessionId||"";this.j.on(c,Kg,d=>{{const e=this.keyStatuses.getStatus();this.g.debug(`Received Key Message in ${this.sessionId}`);this.h&&(this.h.resolve(),this.h=null);d=new _.G(_.ze,{messageType:void 0===e||e===Rf?le:ke,message:ni(d.message.buffer)});this.dispatchEvent(d)}});this.j.on(c,Ig,d=>{this.g.debug("onWebkitKeyAdded_",
449
- d);this.f&&(Up(this,"usable"),this.f.resolve(),this.f=null)});this.j.on(c,Jg,()=>{var d=this.keyStatuses.getStatus();if(this.a&&this.a&&this.a.error&&this.a.error.code===WebKitMediaKeyError.MEDIA_KEYERR_DOMAIN&&d===Rf)this.g.warn(`Ignoring webkit key error for session ${this.sessionId}`);else if(this.g.error(`Received key error in session ${this.sessionId} `+`with code ${this.a.error.code}. `+`Session Status ${d}.`),d=Error("EME AppleEmeManager key error"),d.errorCode=this.a.error,null!==this.h)this.h.reject(d),
450
- this.h=null;else if(null!==this.f)this.f.reject(d),this.f=null;else switch(this.a.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Up(this,"output-not-allowed");break;default:Up(this,_.he)}});Up(this,Rf)}catch(c){this.h.reject(c)}return this.h}load(){this.g.debug(_.se);return Promise.reject(Error("MediaKeySession.load not yet supported"))}update(a){if(this.l)return Promise.reject(ob);this.g.debug(pg);this.f=new _.Jl;try{this.a.update(_.F(a))}catch(b){this.f.reject(b)}return this.f}close(){if(this.l)return this.closed;
451
- this.g.info(`Closing Key Session ${this.sessionId}`);this.l=!0;try{this.a.close(),this.closed.resolve(),_.Xh(this.j)}catch(a){this.closed.reject(a)}return this.closed}remove(){this.g.debug("remove");return Promise.reject(Error("MediaKeySession is only applicable for persistent licenses, which are not supported on this platform"))}},Wu=class{a(){return yq}f(){return!!window.WebKitMediaKeys}create(){return new Tu}};var Xu=class{constructor(){this.j=null;this.g=new _.S("clpp.drm.eme.StandardEmeManager")}l(a){this.j=a}h(a){return this.j?this.j.setMediaKeys(a):Promise.reject(Ra)}o(){return this.j&&this.j.mediaKeys}a(a,b){this.g.info("Requesting media key system access for",a,b.map(c=>Object.assign({},c,{drmInfos:c.drmInfos.map(()=>"_anonymous_")})));return navigator.requestMediaKeySystemAccess(a,b).catch(c=>{this.g.info("Failed to request media key system access for "+`${a}.`,c);return Promise.reject(c)})}f(){return br}},
452
- Yu=class{a(){return br}f(){return!!(window.MediaKeys&&navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)}create(){return new Xu}};var av=class{constructor(){this.w=this.j=null;this.A="";HTMLMediaElement.prototype.webkitGenerateKeyRequest&&(this.A="webkit")}l(a){this.j=a}h(a){_.xh("WebkitEmeManager.setMediaKeys");if(!this.j)return Promise.reject(Ra);const b=this.w;b&&b!==a&&Xp(b,null);(this.w=a)&&Xp(a,this.j);return Promise.resolve()}o(){return this.w}a(a,b){_.xh("WebkitEmeManager.requestMediaKeySystemAccess");try{if(this.j)var c=this.j;else{var d=document.getElementsByTagName(_.t);c=d.length?d[0]:document.createElement(_.t)}const e=
453
- new Zu(this.A,c,a,b);return Promise.resolve(e)}catch(e){return Promise.reject(e)}}f(){return $u}},Zu=class{constructor(a,b,c,d){this.h=a;this.a=this.keySystem=c;a=!1;c===_.Qe&&(this.a=Hg,a=!1);let e=!1;for(const g of d){d=[];var f=[];let h=!1;if(g.audioCapabilities)for(const k of g.audioCapabilities)k.contentType&&(h=!0,b.canPlayType(k.contentType.split(";")[0],this.a)&&(d.push(k),e=!0));if(g.videoCapabilities)for(const k of g.videoCapabilities)k.contentType&&(h=!0,b.canPlayType(k.contentType,this.a)&&
454
- (f.push(k),e=!0));h||(e=b.canPlayType(_.zg,this.a)||b.canPlayType("video/webm",this.a));g.persistentState!==_.zf||a||(e=!1);if(e){this.f=g;return}}b=yb;if(c===_.Qe||c===_.vd)b="None of the requested configurations were supported.";c=Error(b);c.name=ab;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){return Promise.resolve(new bv(this.h,this.a))}getConfiguration(){return this.f}},bv=class{constructor(a,b){this.h=a;this.o=b;this.a=null;this.f=new _.Qt;this.j=[];this.l=new Map}createSession(a=
455
- Xf){if(a!==Xf&&a!==_.Ue)throw new TypeError("Session type "+a+ba);if(!this.a)throw a=Error("Media element is missing."),a.name=Ja,a.code=DOMException.INVALID_STATE_ERR,a;this.a.src||(this.a.src="about:blank");a=new cv(this.h,this.a,this.o,a);this.j.push(a);return a}setServerCertificate(){return Promise.resolve(!1)}},cv=class extends _.Tt{constructor(a,b,c,d){super();this.w=a;this.j=b;this.o=!1;this.a=this.f=null;this.h=c;this.l=d;this.sessionId="";this.expiration=NaN;this.closed=new _.Jl;this.keyStatuses=
456
- new Ru}ready(){_.xh("WebkitEmeManager.MediaKeySession.ready");Wp(this,"usable");this.a&&this.a.resolve();this.a=null}generateRequest(a,b){_.xh("WebkitEmeManager.MediaKeySession.generateRequest");return Zp(this,b,null)}load(a){_.xh(Fb);return this.l===_.Ue?Zp(this,null,a):Promise.reject(Error(Ya))}update(a){_.xh(Fb);const b=new _.Jl;$p(this,b,a);return b}close(){_.xh("WebkitEmeManager.MediaKeySession.close");if(this.l!==_.Ue){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),
457
- this.closed;const a=Yp(this,"cancelKeyRequest");try{this.j[a](this.h,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed}remove(){_.xh("WebkitEmeManager.MediaKeySession.remove");return this.l!==_.Ue?Promise.reject(Error(Ya)):this.close()}},dv=class{a(){return $u}f(){return!(!HTMLMediaElement.prototype.webkitGenerateKeyRequest&&!HTMLMediaElement.prototype.generateKeyRequest)}create(){return new av}};var fv=class{l(){}h(a){_.xh("NopEmeManager.setMediaKeys");return null===a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}o(){return null}a(){_.xh("NopEmeManager.requestMediaKeySystemAccess");return Promise.reject(Error("The key system specified is not supported."))}f(){return ev}},gv=class{a(){return ev}f(){return!0}create(){return new fv}};var hv=class{};_.x(kd,hv);var bq=new _.S(kd),aq=[];aq=[new Yu,new Wu,new dv,new gv].filter(a=>a.f());var br="STANDARD",yq="APPLE",$u="WEBKIT",ev="NOP";hv.Apis={STANDARD:br,APPLE:yq,WEBKIT:$u,NOP:ev};_.iv=class{h(a,b){a=this.a(a,b);return 1!==a.length?null:a[0]}a(a,b){return Array.from(a.childNodes).filter(c=>c instanceof Element&&c.tagName===b)}getAttributeNS(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}f(a){return Array.from(a.childNodes).every(b=>b.nodeType===Node.TEXT_NODE||b.nodeType===Node.CDATA_SECTION_NODE)?a.textContent.trim():null}j(a,b){const c=new DOMParser;let d=null;try{d=c.parseFromString(a,_.$f)}catch(e){}if(!d)return null;a=d.documentElement;return b&&a.tagName!==
458
- b||0<d.getElementsByTagName("parsererror").length?null:a}removeChild(a,b){a.removeChild(b)}};_.Sg=_.iv.prototype;_.Sg.Jd=_.Ug(19);_.Sg.re=_.Ug(17);_.Sg.ee=_.Ug(15);_.Sg.fe=_.Ug(13);_.Sg.qe=_.Ug(11);_.Sg.Hc=_.Ug(9);_.Sg.Yd=_.Ug(7);_.Sg.Z=_.Ug(5);_.Sg.tc=_.Ug(3);_.Sg.Mb=_.Ug(1);_.N=new _.iv;_.jv=new _.S("clpp.xml.Parser");_.en="dom";var eq,kv,dq;_.mq=[154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149];eq=[237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237];kv=class{constructor(a,b,c){this.j=new Uint8Array(a);this.a=b;this.f=c}};dq=class extends kv{};_.lq=class extends kv{constructor(a,b,c,d,e,f){f=void 0===f?null:f;super(a,b,d);this.version=e;this.h=c;this.l=f}};var Pq=class{constructor(a){this.f=[];this.h=[];this.a=[];8<=a.byteLength&&(new _.op).ea("pssh",this.j.bind(this)).parse(a.buffer);0===this.a.length&&_.B("No pssh box found!")}j(a){if(1<a.version)_.B("Unrecognized PSSH version found!");else{var b=_.jm(_.ep(a.reader,16)),c=[];if(0<a.version){var d=_.M(a.reader);for(let e=0;e<d;++e){const f=_.jm(_.ep(a.reader,16));c.push(f)}}d=_.M(a.reader);a.reader.skip(d);this.h.push.apply(this.h,c);this.f.push(b);this.a.push({start:a.start,end:a.start+a.size-1});
459
- a.reader.getPosition()!==a.reader.Na()&&_.B("Mismatch between box size and data size!")}}};var Kq,lv;
460
- _.Is=class{constructor(a,b){this.D=a;this.Za=b;this.J=new Set;this.C=this.I=this.l=null;this.T=!1;this.a=null;this.K=lv;this.B=new _.Qt;this.M=new Eu;this.h=new Map;this.L=[];this.H=new _.Jl;this.za=0;this.f=null;this.w=c=>{this.A=!0;this.F=!1;this.H.reject(c);a.onError(c)};this.o=new Map;this.ba=new Map;this.V=new _.Ni(()=>Bq(this));this.j=!1;this.ha=new _.Jl;this.G=!1;this.Y=[];this.ia=!1;this.R=0;this.g=new _.S("clpp.drm.DrmEngine");this.ca=(new _.Ni(()=>{Cq(this)})).zb(1);this.H.catch(()=>{});
461
- this.A=this.F=!1;this.P=null}destroy(){const a=this;return _.w(function*(){a.j?yield a.ha:(a.j=!0,yield Dq(a),a.ha.resolve())})}keySystem(){return this.a?_.qq(this.a.keySystem):""}getDrmInfo(){return this.a}Ua(a){const b=this;return _.w(function*(){b.G&&b.K===Kq||(!b.f.delayLicenseRequestUntilPlayed||b.C&&!b.C.paused||b.ia?yield Uq(b,a):b.Y.push(a))})}Ta(a){const b=a.target;this.g.info("Key status changed for session",b.sessionId);const c=this.h.get(b);let d=!1;b.keyStatuses.forEach((e,f)=>{if(typeof f===
462
- _.Tf){var g=f;f=e;e=g}if(pq(this.a.keySystem)&&16===f.byteLength&&_.Pi()){g=_.mi(f);const k=g.getUint32(0,!0),l=g.getUint16(4,!0),m=g.getUint16(6,!0);g.setUint32(0,k,!1);g.setUint16(4,l,!1);g.setUint16(6,m,!1)}c&&e!==Rf&&(c.loaded=!0);c&&c.fb&&c.fb.resolve();"expired"===e&&(d=!0);f=_.F(f);let h=_.jm(f);"00"===h&&c&&c.keyId?h=c.keyId:this.a.keySystem.startsWith(_.rd)&&16!==f.byteLength&&(h=oi(f));(f=h||"")?this.g.info(`Key status for Key ID '${h}': ${e}`):this.g.info(`Key status global keys: ${e}`);
463
- this.o.set(f,e);c&&!c.keyId&&this.h.forEach((k,l)=>{l===b||k.keyId!==h||k.loaded||(k.loaded=!0)})});c&&c.loaded&&c.jb.forEach(e=>{this.o.get(e)===Rf&&(this.g.warn(`Key status for Key ID '${e}': 'output-restricted'`),this.o.set(e,_.Re))});for(a=0;a<this.a.initData.length;a++){const e=this.a.initData[a];e.keyId&&this.o.get(e.keyId)===Rf&&_.km(e.initData,c.initData)&&(this.g.warn(`Key status for Key ID '${e.keyId}': 'output-restricted'`),this.o.set(e.keyId,_.Re))}a=b.expiration-Date.now();(0>a||d&&1E3>
464
- a)&&c&&!c.ic&&(this.g.debug("Session has expired",b.sessionId),(a=this.h.get(b))&&a.Jc&&a.Jc.stop(),this.h.delete(b),b.close().catch(()=>{}));dr(this)&&(this.H.resolve(),1!==this.h.size||d?this.V.la(.5):Bq(this))}};Kq=0;lv=3;_.mv=new _.S("clpp.hls.Utils");_.qr=class{constructor(a){this.f=a;this.a=0}};var wr;
465
- _.zr=class{constructor(a,b){this.id=a;this.type=b;this.roles=[];this.frameRate=this.label=this.originalLanguage=this.language=this.kind=null;this.trickPlay=!1;this.channelsCount=this.src=this.mimeType=null;this.spatialAudio=!1;this.renditions=[];this.accessibility=[]}Lc(a){return this.type===a.type&&this.channelsCount===a.channelsCount&&this.frameRate===a.frameRate&&this.trickPlay===a.trickPlay&&this.kind===a.kind&&this.label===a.label&&this.language===a.language&&this.mimeType===a.mimeType&&bi(this.roles,
466
- a.roles)&&bi(this.accessibility,a.accessibility,ur)}toString(){return`Track type: ${this.type} id: ${this.id}
467
- renditions size: ${this.renditions.length}`}};_.x("clpp.Track",_.zr);_.zr.prototype.toString=_.zr.prototype.toString;_.Dr=class{constructor(a,b){this.track=b;this.id=a;this.originalId=this.codec=this.Zc=this.bandwidth=this.height=this.width=null;this.a=!1}};_.x("clpp.Rendition",_.Dr);_.yr=1;_.Q=_.t;_.P=_.q;_.O=_.Yf;wr=_.Ae;_.nv={VIDEO:_.Q,AUDIO:_.P,TEXT:_.O,METADATA:wr};_.zr.Type=_.nv;var ov=class{constructor(a){this.f=a;this.g=new _.S("clpp.native.hls.HlsMetadataParser");this.a=Pm(this.h.bind(this),(b,c)=>b[0]===c[0]&&b[1].enableHlsVideoTrackInfo===c[1].enableHlsVideoTrackInfo&&b[1].enableMetadata===c[1].enableMetadata)}h(a,b){const c=this;return _.w(function*(){let d=null;try{d=yield Br(c,a)}catch(f){return c.g.warn("Failed to fetch playlist in order metadata from HLS playlist.",f.message),Promise.resolve({})}const e={};try{if(b.enableHlsVideoTrackInfo){const f=yield Fr(c,d,
468
- a);e.renditions=f.renditions;e.mimeType=f.mimeType}}catch(f){c.g.warn("Failed to parse video metadata from HLS playlist.",f.message)}try{const f=yield Hr(d);e.Bc=f}catch(f){c.g.warn("Failed to parse metadata from HLS playlist.",f.message)}return e})}};_.Pr=[];_.U=class{De(){return!0}Gh(a){return this.getVideoTracks().find(b=>_.lh(b,a,a&&Object.keys(a)))}Ch(a){return this.getAudioTracks().find(b=>_.lh(b,a,a&&Object.keys(a)))}Eh(a){return this.qa().find(b=>_.lh(b,a,a&&Object.keys(a)))}Fh(a){return this.getVideoTracks().flatMap(b=>b.renditions).find(b=>_.lh(b,a,a&&Object.keys(a)))}Bh(a){return this.getAudioTracks().flatMap(b=>b.renditions).find(b=>_.lh(b,a,a&&Object.keys(a)))}Dh(a){return this.qa().flatMap(b=>b.renditions).find(b=>_.lh(b,a,a&&Object.keys(a)))}};
469
- _.x("clpp.TrackManager",_.U);_.U.prototype.isAbrEnabled=_.U.prototype.va;_.U.prototype.addTextTrack=_.U.prototype.addTextTrack;_.U.prototype.findTextRendition=_.U.prototype.Dh;_.U.prototype.findAudioRendition=_.U.prototype.Bh;_.U.prototype.findVideoRendition=_.U.prototype.Fh;_.U.prototype.findTextTrack=_.U.prototype.Eh;_.U.prototype.findAudioTrack=_.U.prototype.Ch;_.U.prototype.findVideoTrack=_.U.prototype.Gh;_.U.prototype.setTextRendition=_.U.prototype.xb;_.U.prototype.setAudioRendition=_.U.prototype.wb;
470
- _.U.prototype.setVideoRendition=_.U.prototype.hb;_.U.prototype.setTextTrack=_.U.prototype.Sa;_.U.prototype.setAudioTrack=_.U.prototype.ya;_.U.prototype.setVideoTrack=_.U.prototype.yb;_.U.prototype.getTextTrack=_.U.prototype.ua;_.U.prototype.getAudioTrack=_.U.prototype.pa;_.U.prototype.getVideoTrack=_.U.prototype.Fa;_.U.prototype.getLoadingTextRendition=_.U.prototype.Fb;_.U.prototype.getLoadingAudioRendition=_.U.prototype.Eb;_.U.prototype.getLoadingVideoRendition=_.U.prototype.pb;
471
- _.U.prototype.getTextRendition=_.U.prototype.Qa;_.U.prototype.getAudioRendition=_.U.prototype.Ma;_.U.prototype.getVideoRendition=_.U.prototype.ra;_.U.prototype.getTextTracks=_.U.prototype.qa;_.U.prototype.getAudioTracks=_.U.prototype.getAudioTracks;_.U.prototype.getVideoTracks=_.U.prototype.getVideoTracks;_.U.prototype.canSelectVideoTracks=_.U.prototype.De;var V=class extends _.U{constructor(){super();this.g=new _.S("clpp.native.TrackManager");this.m=null;this.f=new _.Qt;this.h=[];this.G=0;this.o={};this.I=[];this.a=new Map;this.w=null;this.l=new Map;this.A=!0;this.M=this.B.bind(this,_.O);this.R=this.F.bind(this,_.O);this.P=this.C.bind(this,_.O);this.T=this.B.bind(this,_.Q);this.Y=this.F.bind(this,_.Q);this.V=this.C.bind(this,_.Q);this.J=this.B.bind(this,_.P);this.L=this.F.bind(this,_.P);this.K=this.C.bind(this,_.P);this.j=null}De(){return!_.aj()}B(a,
472
- b){const c=this;return _.w(function*(){if(b){var d=b.track;if(d){var e=a===_.Q,f=a===_.O,g=a===_.P||e,h=b.target,k=c.h.find(n=>Sr(n,d,a));if(k)c.g.warn("Track from event already exists",d,k);else{var l=Ar(a,d),m=Tr(d);if(f){if(d.kind===_.Ae)return;let n;void 0!==d.id?n=c.o[d.id]:n=Object.values(c.o).find(p=>Sr(l,p,a));l.kind&&"captions"===l.kind&&(l.mimeType=_.vc);n&&(l.src=n.url,l.mimeType=n.mimeType)}else if(k=c.h.find(n=>n.type===a&&_.lh(n,l,["kind","label","language"]))){k.id=d.id;m&&(c.g.debug(`Setting native ${a} track active`),
473
- c.a.set(a,k));c.g.debug("Track from event seems to already exists, flipped native track to",d);return}try{l.renditions.push(new _.Dr(l.id,l));c.h.push(l);const n=c.m.getConfiguration().safari;Vr(c,a,n)?yield Wr(c,l,n):Xr(c,a,n)&&(yield Yr(c,l,n));c.g.debug(a+" Track added",l);c.m.trigger(new _.G(_.gg));const p=Zr(c,a).length,u=!(!h||!h.length),v=h&&h.length||0;f=()=>{c.g.debug(`Setting native ${a} track active. `+`Native track active: ${m}. `+`Number of tracks: ${p}`,d);c.a.set(a,l)};m?f():1===p&&
474
- g&&(e?f():u&&1!==v||f())}catch(n){c.g.error("Error while converting track data",n)}}}else c.g.warn(Xa)}else c.g.warn(Ua)})}F(a,b){if(b){var c=b.track;c?a===_.O&&c.kind!==_.Ae&&(b=this.h.find(d=>Sr(d,c,a)))&&(this.h.splice(this.h.indexOf(b),1),(this.a.get(a)||null)===b&&(this.a.set(a,null),$r(this)),this.g.debug(a+" Track removed, id: ",b.id)):this.g.warn(Xa)}else this.g.warn(Ua)}C(a,b){this.g.debug(a+" Track changed",b);a===_.O&&$r(this);const c=bs(this,a);if(c)for(let d=0;d<c.length;++d)if(Tr(c[d])){if(b=
475
- this.h.find(e=>Sr(e,c[d],a)))this.a.set(a,b),this.g.debug("Track change detected, id:",b.id),b===this.l.get(a)&&this.l.set(a,null),a===_.P?this.m.trigger(new _.G(_.Jc)):a===_.O&&this.m.trigger(new _.G(_.ag));break}}initialize(a){this.m=a;this.j=new ov(a.getNetworkEngine())}load(){this.A=!1;var a=as(this,_.O);a&&(this.f.on(a,_.oc,this.M),this.f.on(a,yf,this.R),this.f.on(a,Yc,this.P));if(a=as(this,_.P))this.f.on(a,_.oc,this.J),this.f.on(a,yf,this.L),this.f.on(a,Yc,this.K);if(a=as(this,_.Q))this.f.on(a,
476
- _.oc,this.T),this.f.on(a,yf,this.Y),this.f.on(a,Yc,this.V);this.f.one(this.m,Qc,this.H.bind(this))}release(){this.A=!0;this.h=[];this.o={};this.a.clear();this.l.clear();this.f.release()}destroy(){this.release();this.m=null}getVideoTracks(){return Zr(this,_.Q)}getAudioTracks(){return Zr(this,_.P)}qa(){return Zr(this,_.O)}ra(){const a=this.a.get(_.Q)||null;if(!a)return null;if(this.w){const b=a.renditions.find(c=>c.width===this.w.width&&c.height===this.w.height);if(b)return b}return a.renditions[0]||
477
- null}Ma(){return cs(this,_.P)}Qa(){return cs(this,_.O)}pb(){return ds(this,_.Q)}Eb(){return ds(this,_.P)}Fb(){return ds(this,_.O)}Fa(){return this.a.get(_.Q)||null}pa(){return this.a.get(_.P)||null}ua(){return this.a.get(_.O)||null}yb(a){es(this,_.Q,a)}ya(a){es(this,_.P,a)}Sa(a){es(this,_.O,a)}hb(a){es(this,_.Q,a&&a.track)}wb(a){es(this,_.P,a&&a.track)}xb(a){es(this,_.O,a&&a.track)}addTextTrack(a){const b=this;return _.w(function*(){if(a.mimeType.match(/text\/vtt/)){const c="External_"+`${b.G++}`;
478
- b.o[c]=a;fs(b,a,c)}else yield gs(b,a)})}va(){return 1>=this.getVideoTracks().flatMap(a=>a.renditions).length}H(){const a=this;return _.w(function*(){const b=a.m.getConfiguration();hs(a,_.P,b.preferredAudioLanguage);if(!bs(a,_.O).some(c=>Tr(c))){const c=as(a,_.O);yield new Promise(d=>{a.f.one(c,Yc,d);(new _.Ni(d)).la(1)})}a.A||hs(a,_.O,b.preferredTextLanguage)})}};V.prototype.isAbrEnabled=V.prototype.va;V.prototype.addTextTrack=V.prototype.addTextTrack;V.prototype.setTextRendition=V.prototype.xb;
479
- V.prototype.setAudioRendition=V.prototype.wb;V.prototype.setVideoRendition=V.prototype.hb;V.prototype.setTextTrack=V.prototype.Sa;V.prototype.setAudioTrack=V.prototype.ya;V.prototype.setVideoTrack=V.prototype.yb;V.prototype.getTextTrack=V.prototype.ua;V.prototype.getAudioTrack=V.prototype.pa;V.prototype.getVideoTrack=V.prototype.Fa;V.prototype.getLoadingTextRendition=V.prototype.Fb;V.prototype.getLoadingAudioRendition=V.prototype.Eb;V.prototype.getLoadingVideoRendition=V.prototype.pb;
480
- V.prototype.getTextRendition=V.prototype.Qa;V.prototype.getAudioRendition=V.prototype.Ma;V.prototype.getVideoRendition=V.prototype.ra;V.prototype.getTextTracks=V.prototype.qa;V.prototype.getAudioTracks=V.prototype.getAudioTracks;V.prototype.getVideoTracks=V.prototype.getVideoTracks;V.prototype.canSelectVideoTracks=V.prototype.De;var is=["play() failed because the user didn't interact","The play method is not allowed by the user agent","The request is not allowed by the user agent or the platform"];var pv=["abort",Pc,Qc,Sd,"emptied",Ud,_.Wd,_.Xd,"interruptbegin","interruptend",_.te,_.ue,ve,"mozaudioavailable",_.Se,_.We,_.gf,_.tf,_.vf,_.Hf,_.If,Of,"suspend",_.fg,"volumechange",_.Fg,_.Gg,_.Af,Lg,Kg,Ig,Jg];_.qv=class extends _.Tt{constructor(a){super();this.log=new _.S(a);this.configuration=this.ha=_.fn();this.ga=this.C=null;this.wd=this.af=!1;this.Cf=new _.S("clpp.video.events");this.kc=null;this.be=-1;this.gh=this.dh.bind(this);this.jc=new _.Kn;this.setNetworkEngine(this.jc);this.L=new _.Qt;this.$e=this.Gc=this.Kc=this.M=null}init(a,b){this.configuration=this.ha=b;this.C=a;this.log.info("Initializing Player surface");a=this.C.getMedia();this.log.info("Attaching media element listeners");for(const c of pv)this.L.on(a,
481
- c,this.gh,c!==_.Xd);this.kc||(this.kc=this.Wg());this.kc.initialize(this);this.C.showMediaElement()}release(){this.M&&(this.M.destroy(),this.M=null);return Promise.resolve()}destroy(){this.L.release();return this.jc.release()}canPlay(a,b){return _.zh[this.namespace()].canPlay(a,b)}getTimeline(){return null}setupPlaylist(){return Promise.reject(_.Za)}appendLoad(){return Promise.reject(_.Za)}seekWith(){return Promise.reject(_.Za)}detach(){return Promise.resolve()}setSeekInterceptor(){}setPlaybackSessionId(){}getBandwidthEstimate(){return null}play(){if(!this.ga)return Promise.reject("No sources specified yet. You need to load content before calling play.");
482
- const a=this.C.getMedia().play();return Promise.resolve(a).catch(b=>{this.log.info("Caught play promise exception",b);const c={name:b.name||"",message:b.message||"",stack:b.stack||""};js(c)?(this.trigger(new _.G(_.Kc)),this.log.warn(_.ka)):c.name===$a&&this.log.warn('Unrecognized "NotAllowedError" on play(). '+`${b.name}: ${b.message}`);throw b;})}pause(){return this.ga?new Promise((a,b)=>{const c=this.getState();if(2!==c&&5!==c&&3!==c&&4!==c)b(new _.H(_.C,7,3201,"The player state does not allow pause."));
483
- else if(this.C.getMedia().pause(),3===this.getState())this.L.one(this,_.Qf,()=>{a()});else a()}):Promise.reject(new _.H(_.C,7,3201,"No sources specified yet. You need to load content before calling pause."))}isPaused(){return this.C.getMedia().paused}isEnded(){return this.C.getMedia().ended}getConfiguration(){return this.configuration}setDrmCustomDataModifier(a){this.Kc=a}setCdnErrorCallback(a){this.Gc=a}Nc(){return this.Kc}getSurface(){return this.C}getBufferInfo(a){const b=this.getSurface().getMedia();
484
- return new _.Nt(b?b.buffered:void 0,a)}getPosition(){return this.getMediaPosition()}getMediaPosition(){const a=this.C.getMedia();if(a)return a.currentTime;this.log.warn("No media element available, can not report current time!");return 0}seek(a){const b=this.getMediaPosition();if(void 0===a||null===a||typeof a!==_.r||a===b)return Promise.resolve();const c=this.C.getMedia();if(!c)return this.log.warn("No media element available, can not set current time!"),Promise.reject();const d=a-b;return.1>=Math.abs(d)?
485
- (this.log.info("Skip seek. Delta "+Math.abs(d)+" \x3c 0.1"),Promise.resolve()):new Promise((e,f)=>{const g=()=>{this.trigger(new _.G(_.tg));this.L.on(c,_.Hf,h);this.L.on(c,_.fg,h);this.L.on(c,_.tf,h);this.log.info("Seeking to "+a+". Delta "+d);this.wd=this.af=!0;c.currentTime=a},h=l=>{const m=this.getMediaPosition(),n=.1>=Math.abs(a-m);var p=.25<m-a;const u=c.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA,v=l.type===_.Hf,y=l.type===_.tf,A=l.type===_.fg,D=y&&u;p=v||n&&D||A&&p;this.log.debug("Checking seeking state after "+
486
- l.type+" event. Seek completed:",p,"Current Time:",m,"Target Time:",a,"Native Event:",v,"Time reached",n,"Timeupdate:",A,"Progress:",y,"ReadyState:",u,"Progress Ready:",D);p?(this.wd=this.af=!1,this.L.off(c,_.Hf,h),this.L.off(c,_.fg,h),this.L.off(c,_.tf,h),this.Bf(),this.trigger(new _.G(_.sg)),e()):y&&b===m&&(this.log.debug("Seek seemed to have been ignored. Trying again"),c.currentTime=a)},k=()=>{if(c.readyState>HTMLMediaElement.HAVE_NOTHING)g();else this.L.one(c,_.ue,g)};this.getState()===_.Fs?
446
+ e=!0));d||(e=WebKitMediaKeys.isTypeSupported(this.keySystem,_.zg));a=e?b:null}if(a){this.a=a;return}}c=Error(Ab);c.name=bb;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){const a=new Nu(this.keySystem);return Promise.resolve(a)}getConfiguration(){_.xh("AppleEmeManager.MediaKeySystemAccess.getConfiguration");return this.a}},Nu=class{constructor(a){this.f=null;this.h=new WebKitMediaKeys(a);this.a=new _.Kt;this.j=0;this.g=new _.T(kd);this.g.info("Created Media Keys for "+a)}createSession(a){a=
447
+ void 0===a?Xf:a;this.g.debug("Creating Apple MediaKeys Session");if(a!==Xf)throw new TypeError("Session type "+a+ba);return new Ou(this.h,`__session_${this.j++}`)}setServerCertificate(){this.g.debug("AppleEmeManager.MediaKeys.setServerCertificate");return Promise.resolve(!1)}},Ou=class extends _.Nt{constructor(a,b){super();this.a=null;this.o=a;this.f=this.h=null;this.j=new _.Kt;this.sessionId=b;this.expiration=NaN;this.closed=new _.Hl;this.l=!1;this.keyStatuses=new Ku;this.g=new _.T(kd)}generateRequest(a,
448
+ b){if(this.l)return Promise.reject(qb);this.g.debug("generateRequest");this.h=new _.Hl;try{const c=this.o.createSession(_.zg,_.G(b));this.a=c;this.sessionId=c.sessionId||this.sessionId||"";this.j.on(c,Kg,d=>{{const e=this.keyStatuses.getStatus();this.g.debug(`Received Key Message in ${this.sessionId}`);this.h&&(this.h.resolve(),this.h=null);d=new _.H(_.ze,{messageType:void 0===e||e===Rf?le:ke,message:li(d.message.buffer)});this.dispatchEvent(d)}});this.j.on(c,Ig,d=>{this.g.debug("onWebkitKeyAdded_",
449
+ d);this.f&&(Op(this,"usable"),this.f.resolve(),this.f=null)});this.j.on(c,Jg,()=>{var d=this.keyStatuses.getStatus();if(this.a&&this.a&&this.a.error&&this.a.error.code===WebKitMediaKeyError.MEDIA_KEYERR_DOMAIN&&d===Rf)this.g.warn(`Ignoring webkit key error for session ${this.sessionId}`);else if(this.g.error(`Received key error in session ${this.sessionId} `+`with code ${this.a.error.code}. `+`Session Status ${d}.`),d=Error("EME AppleEmeManager key error"),d.errorCode=this.a.error,null!==this.h)this.h.reject(d),
450
+ this.h=null;else if(null!==this.f)this.f.reject(d),this.f=null;else switch(this.a.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Op(this,"output-not-allowed");break;default:Op(this,_.he)}});Op(this,Rf)}catch(c){this.h.reject(c)}return this.h}load(){this.g.debug(_.pe);return Promise.reject(Error("MediaKeySession.load not yet supported"))}update(a){if(this.l)return Promise.reject(qb);this.g.debug(pg);this.f=new _.Hl;try{this.a.update(_.G(a))}catch(b){this.f.reject(b)}return this.f}close(){if(this.l)return this.closed;
451
+ this.g.info(`Closing Key Session ${this.sessionId}`);this.l=!0;try{this.a.close(),this.closed.resolve(),_.Xh(this.j)}catch(a){this.closed.reject(a)}return this.closed}remove(){this.g.debug("remove");return Promise.reject(Error("MediaKeySession is only applicable for persistent licenses, which are not supported on this platform"))}},Pu=class{a(){return sq}f(){return!!window.WebKitMediaKeys}create(){return new Mu}};var Qu=class{constructor(){this.j=null;this.g=new _.T("clpp.drm.eme.StandardEmeManager")}l(a){this.j=a}h(a){return this.j?this.j.setMediaKeys(a):Promise.reject(Ra)}o(){return this.j&&this.j.mediaKeys}a(a,b){this.g.info("Requesting media key system access for",a,b.map(c=>Object.assign({},c,{drmInfos:c.drmInfos.map(()=>"_anonymous_")})));return navigator.requestMediaKeySystemAccess(a,b).catch(c=>{this.g.info("Failed to request media key system access for "+`${a}.`,c);return Promise.reject(c)})}f(){return Wq}},
452
+ Ru=class{a(){return Wq}f(){return!!(window.MediaKeys&&navigator.requestMediaKeySystemAccess&&window.MediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)}create(){return new Qu}};var Uu=class{constructor(){this.w=this.j=null;this.A="";HTMLMediaElement.prototype.webkitGenerateKeyRequest&&(this.A="webkit")}l(a){this.j=a}h(a){_.xh("WebkitEmeManager.setMediaKeys");if(!this.j)return Promise.reject(Ra);const b=this.w;b&&b!==a&&Rp(b,null);(this.w=a)&&Rp(a,this.j);return Promise.resolve()}o(){return this.w}a(a,b){_.xh("WebkitEmeManager.requestMediaKeySystemAccess");try{if(this.j)var c=this.j;else{var d=document.getElementsByTagName(_.t);c=d.length?d[0]:document.createElement(_.t)}const e=
453
+ new Su(this.A,c,a,b);return Promise.resolve(e)}catch(e){return Promise.reject(e)}}f(){return Tu}},Su=class{constructor(a,b,c,d){this.h=a;this.a=this.keySystem=c;a=!1;c===_.Qe&&(this.a=Hg,a=!1);let e=!1;for(const g of d){d=[];var f=[];let h=!1;if(g.audioCapabilities)for(const k of g.audioCapabilities)k.contentType&&(h=!0,b.canPlayType(k.contentType.split(";")[0],this.a)&&(d.push(k),e=!0));if(g.videoCapabilities)for(const k of g.videoCapabilities)k.contentType&&(h=!0,b.canPlayType(k.contentType,this.a)&&
454
+ (f.push(k),e=!0));h||(e=b.canPlayType(_.zg,this.a)||b.canPlayType("video/webm",this.a));g.persistentState!==_.zf||a||(e=!1);if(e){this.f=g;return}}b=Ab;if(c===_.Qe||c===_.wd)b="None of the requested configurations were supported.";c=Error(b);c.name=bb;c.code=DOMException.NOT_SUPPORTED_ERR;throw c;}createMediaKeys(){return Promise.resolve(new Vu(this.h,this.a))}getConfiguration(){return this.f}},Vu=class{constructor(a,b){this.h=a;this.o=b;this.a=null;this.f=new _.Kt;this.j=[];this.l=new Map}createSession(a=
455
+ Xf){if(a!==Xf&&a!==_.Ue)throw new TypeError("Session type "+a+ba);if(!this.a)throw a=Error("Media element is missing."),a.name=Ja,a.code=DOMException.INVALID_STATE_ERR,a;this.a.src||(this.a.src="about:blank");a=new Wu(this.h,this.a,this.o,a);this.j.push(a);return a}setServerCertificate(){return Promise.resolve(!1)}},Wu=class extends _.Nt{constructor(a,b,c,d){super();this.w=a;this.j=b;this.o=!1;this.a=this.f=null;this.h=c;this.l=d;this.sessionId="";this.expiration=NaN;this.closed=new _.Hl;this.keyStatuses=
456
+ new Ku}ready(){_.xh("WebkitEmeManager.MediaKeySession.ready");Qp(this,"usable");this.a&&this.a.resolve();this.a=null}generateRequest(a,b){_.xh("WebkitEmeManager.MediaKeySession.generateRequest");return Tp(this,b,null)}load(a){_.xh(Hb);return this.l===_.Ue?Tp(this,null,a):Promise.reject(Error(Za))}update(a){_.xh(Hb);const b=new _.Hl;Up(this,b,a);return b}close(){_.xh("WebkitEmeManager.MediaKeySession.close");if(this.l!==_.Ue){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),
457
+ this.closed;const a=Sp(this,"cancelKeyRequest");try{this.j[a](this.h,this.sessionId)}catch(b){}}this.closed.resolve();return this.closed}remove(){_.xh("WebkitEmeManager.MediaKeySession.remove");return this.l!==_.Ue?Promise.reject(Error(Za)):this.close()}},Xu=class{a(){return Tu}f(){return!(!HTMLMediaElement.prototype.webkitGenerateKeyRequest&&!HTMLMediaElement.prototype.generateKeyRequest)}create(){return new Uu}};var Zu=class{l(){}h(a){_.xh("NopEmeManager.setMediaKeys");return null===a?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}o(){return null}a(){_.xh("NopEmeManager.requestMediaKeySystemAccess");return Promise.reject(Error("The key system specified is not supported."))}f(){return Yu}},$u=class{a(){return Yu}f(){return!0}create(){return new Zu}};var av=class{};_.x(ld,av);var Wp=new _.T(ld),Vp=[];Vp=[new Ru,new Pu,new Xu,new $u].filter(a=>a.f());var Wq="STANDARD",sq="APPLE",Tu="WEBKIT",Yu="NOP";av.Apis={STANDARD:Wq,APPLE:sq,WEBKIT:Tu,NOP:Yu};_.bv=class{h(a,b){a=this.a(a,b);return 1!==a.length?null:a[0]}a(a,b){return Array.from(a.childNodes).filter(c=>c instanceof Element&&c.tagName===b)}getAttributeNS(a,b,c){return a.hasAttributeNS(b,c)?a.getAttributeNS(b,c):null}f(a){return Array.from(a.childNodes).every(b=>b.nodeType===Node.TEXT_NODE||b.nodeType===Node.CDATA_SECTION_NODE)?a.textContent.trim():null}j(a,b){const c=new DOMParser;let d=null;try{d=c.parseFromString(a,_.$f)}catch(e){}if(!d)return null;a=d.documentElement;return b&&a.tagName!==
458
+ b||0<d.getElementsByTagName("parsererror").length?null:a}removeChild(a,b){a.removeChild(b)}};_.Sg=_.bv.prototype;_.Sg.Ld=_.Ug(19);_.Sg.ve=_.Ug(17);_.Sg.je=_.Ug(15);_.Sg.ke=_.Ug(13);_.Sg.ue=_.Ug(11);_.Sg.Kc=_.Ug(9);_.Sg.$d=_.Ug(7);_.Sg.$=_.Ug(5);_.Sg.vc=_.Ug(3);_.Sg.Pb=_.Ug(1);_.O=new _.bv;_.cv=new _.T("clpp.xml.Parser");_.Zm="dom";var Zp,dv,Yp;_.gq=[154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149];Zp=[237,239,139,169,121,214,74,206,163,200,39,220,213,29,33,237];dv=class{constructor(a,b,c){this.j=new Uint8Array(a);this.a=b;this.f=c}};Yp=class extends dv{};_.fq=class extends dv{constructor(a,b,c,d,e,f){f=void 0===f?null:f;super(a,b,d);this.version=e;this.h=c;this.l=f}};var Jq=class{constructor(a){this.f=[];this.h=[];this.a=[];8<=a.byteLength&&(new _.ip).ea("pssh",this.j.bind(this)).parse(a.buffer);0===this.a.length&&_.C("No pssh box found!")}j(a){if(1<a.version)_.C("Unrecognized PSSH version found!");else{var b=_.dm(_.Zo(a.reader,16)),c=[];if(0<a.version){var d=_.N(a.reader);for(let e=0;e<d;++e){const f=_.dm(_.Zo(a.reader,16));c.push(f)}}d=_.N(a.reader);a.reader.skip(d);this.h.push.apply(this.h,c);this.f.push(b);this.a.push({start:a.start,end:a.start+a.size-1});
459
+ a.reader.getPosition()!==a.reader.Oa()&&_.C("Mismatch between box size and data size!")}}};var Eq,ev;
460
+ _.Cs=class{constructor(a,b){this.D=a;this.$a=b;this.J=new Set;this.C=this.I=this.l=null;this.T=!1;this.a=null;this.K=ev;this.B=new _.Kt;this.M=new xu;this.h=new Map;this.L=[];this.H=new _.Hl;this.Aa=0;this.f=null;this.w=c=>{this.A=!0;this.F=!1;this.H.reject(c);a.onError(c)};this.o=new Map;this.ba=new Map;this.V=new _.Li(()=>vq(this));this.j=!1;this.ga=new _.Hl;this.G=!1;this.Y=[];this.ia=!1;this.R=0;this.g=new _.T("clpp.drm.DrmEngine");this.ca=(new _.Li(()=>{wq(this)})).Ab(1);this.H.catch(()=>{});
461
+ this.A=this.F=!1;this.P=null}destroy(){const a=this;return _.w(function*(){a.j?yield a.ga:(a.j=!0,yield xq(a),a.ga.resolve())})}keySystem(){return this.a?_.kq(this.a.keySystem):""}getDrmInfo(){return this.a}Va(a){const b=this;return _.w(function*(){b.G&&b.K===Eq||(!b.f.delayLicenseRequestUntilPlayed||b.C&&!b.C.paused||b.ia?yield Oq(b,a):b.Y.push(a))})}Ua(a){const b=a.target;this.g.info("Key status changed for session",b.sessionId);const c=this.h.get(b);let d=!1;b.keyStatuses.forEach((e,f)=>{if(typeof f===
462
+ _.Tf){var g=f;f=e;e=g}if(jq(this.a.keySystem)&&16===f.byteLength&&_.Ni()){g=_.ki(f);const k=g.getUint32(0,!0),l=g.getUint16(4,!0),m=g.getUint16(6,!0);g.setUint32(0,k,!1);g.setUint16(4,l,!1);g.setUint16(6,m,!1)}c&&e!==Rf&&(c.loaded=!0);c&&c.gb&&c.gb.resolve();"expired"===e&&(d=!0);f=_.G(f);let h=_.dm(f);"00"===h&&c&&c.keyId?h=c.keyId:this.a.keySystem.startsWith(_.sd)&&16!==f.byteLength&&(h=mi(f));(f=h||"")?this.g.info(`Key status for Key ID '${h}': ${e}`):this.g.info(`Key status global keys: ${e}`);
463
+ this.o.set(f,e);c&&!c.keyId&&this.h.forEach((k,l)=>{l===b||k.keyId!==h||k.loaded||(k.loaded=!0)})});c&&c.loaded&&c.kb.forEach(e=>{this.o.get(e)===Rf&&(this.g.warn(`Key status for Key ID '${e}': 'output-restricted'`),this.o.set(e,_.Re))});for(a=0;a<this.a.initData.length;a++){const e=this.a.initData[a];e.keyId&&this.o.get(e.keyId)===Rf&&_.em(e.initData,c.initData)&&(this.g.warn(`Key status for Key ID '${e.keyId}': 'output-restricted'`),this.o.set(e.keyId,_.Re))}a=b.expiration-Date.now();(0>a||d&&1E3>
464
+ a)&&c&&!c.mc&&(this.g.debug("Session has expired",b.sessionId),(a=this.h.get(b))&&a.Mc&&a.Mc.stop(),this.h.delete(b),b.close().catch(()=>{}));Yq(this)&&(this.H.resolve(),1!==this.h.size||d?this.V.la(.5):vq(this))}};Eq=0;ev=3;_.fv=new _.T("clpp.hls.Utils");_.kr=class{constructor(a){this.f=a;this.a=0}};var qr;
465
+ _.tr=class{constructor(a,b){this.id=a;this.type=b;this.roles=[];this.frameRate=this.label=this.originalLanguage=this.language=this.kind=null;this.trickPlay=!1;this.channelsCount=this.src=this.mimeType=null;this.spatialAudio=!1;this.renditions=[];this.accessibility=[]}Oc(a){return this.type===a.type&&this.channelsCount===a.channelsCount&&this.frameRate===a.frameRate&&this.trickPlay===a.trickPlay&&this.kind===a.kind&&this.label===a.label&&this.language===a.language&&this.mimeType===a.mimeType&&bi(this.roles,
466
+ a.roles)&&bi(this.accessibility,a.accessibility,or)}toString(){return`Track type: ${this.type} id: ${this.id}
467
+ renditions size: ${this.renditions.length}`}};_.x("clpp.Track",_.tr);_.tr.prototype.toString=_.tr.prototype.toString;_.xr=class{constructor(a,b){this.track=b;this.id=a;this.originalId=this.codec=this.cd=this.bandwidth=this.height=this.width=null;this.a=!1}};_.x("clpp.Rendition",_.xr);_.sr=1;_.R=_.t;_.Q=_.q;_.P=_.Yf;qr=_.Ae;_.gv={VIDEO:_.R,AUDIO:_.Q,TEXT:_.P,METADATA:qr};_.tr.Type=_.gv;var hv=class{constructor(a){this.f=a;this.g=new _.T("clpp.native.hls.HlsMetadataParser");this.a=Jm(this.h.bind(this),(b,c)=>b[0]===c[0]&&b[1].enableHlsVideoTrackInfo===c[1].enableHlsVideoTrackInfo&&b[1].enableMetadata===c[1].enableMetadata)}h(a,b){const c=this;return _.w(function*(){let d=null;try{d=yield vr(c,a)}catch(f){return c.g.warn("Failed to fetch playlist in order metadata from HLS playlist.",f.message),Promise.resolve({})}const e={};try{if(b.enableHlsVideoTrackInfo){const f=yield zr(c,d,
468
+ a);e.renditions=f.renditions;e.mimeType=f.mimeType}}catch(f){c.g.warn("Failed to parse video metadata from HLS playlist.",f.message)}try{const f=yield Br(d);e.Ec=f}catch(f){c.g.warn("Failed to parse metadata from HLS playlist.",f.message)}return e})}};_.Jr=[];_.V=class{He(){return!0}Nh(a){return this.getVideoTracks().find(b=>_.lh(b,a,a&&Object.keys(a)))}Jh(a){return this.getAudioTracks().find(b=>_.lh(b,a,a&&Object.keys(a)))}Lh(a){return this.qa().find(b=>_.lh(b,a,a&&Object.keys(a)))}Mh(a){return this.getVideoTracks().flatMap(b=>b.renditions).find(b=>_.lh(b,a,a&&Object.keys(a)))}Ih(a){return this.getAudioTracks().flatMap(b=>b.renditions).find(b=>_.lh(b,a,a&&Object.keys(a)))}Kh(a){return this.qa().flatMap(b=>b.renditions).find(b=>_.lh(b,a,a&&Object.keys(a)))}};
469
+ _.x("clpp.TrackManager",_.V);_.V.prototype.isAbrEnabled=_.V.prototype.wa;_.V.prototype.addTextTrack=_.V.prototype.addTextTrack;_.V.prototype.findTextRendition=_.V.prototype.Kh;_.V.prototype.findAudioRendition=_.V.prototype.Ih;_.V.prototype.findVideoRendition=_.V.prototype.Mh;_.V.prototype.findTextTrack=_.V.prototype.Lh;_.V.prototype.findAudioTrack=_.V.prototype.Jh;_.V.prototype.findVideoTrack=_.V.prototype.Nh;_.V.prototype.setTextRendition=_.V.prototype.yb;_.V.prototype.setAudioRendition=_.V.prototype.xb;
470
+ _.V.prototype.setVideoRendition=_.V.prototype.ib;_.V.prototype.setTextTrack=_.V.prototype.Ta;_.V.prototype.setAudioTrack=_.V.prototype.za;_.V.prototype.setVideoTrack=_.V.prototype.zb;_.V.prototype.getTextTrack=_.V.prototype.va;_.V.prototype.getAudioTrack=_.V.prototype.pa;_.V.prototype.getVideoTrack=_.V.prototype.Fa;_.V.prototype.getLoadingTextRendition=_.V.prototype.Gb;_.V.prototype.getLoadingAudioRendition=_.V.prototype.Fb;_.V.prototype.getLoadingVideoRendition=_.V.prototype.qb;
471
+ _.V.prototype.getTextRendition=_.V.prototype.Ra;_.V.prototype.getAudioRendition=_.V.prototype.Na;_.V.prototype.getVideoRendition=_.V.prototype.ra;_.V.prototype.getTextTracks=_.V.prototype.qa;_.V.prototype.getAudioTracks=_.V.prototype.getAudioTracks;_.V.prototype.getVideoTracks=_.V.prototype.getVideoTracks;_.V.prototype.canSelectVideoTracks=_.V.prototype.He;var iv=class extends _.V{constructor(){super();this.g=new _.T("clpp.native.TrackManager");this.m=null;this.f=new _.Kt;this.h=[];this.G=0;this.o={};this.I=[];this.a=new Map;this.w=null;this.l=new Map;this.A=!0;this.M=this.B.bind(this,_.P);this.R=this.F.bind(this,_.P);this.P=this.C.bind(this,_.P);this.T=this.B.bind(this,_.R);this.Y=this.F.bind(this,_.R);this.V=this.C.bind(this,_.R);this.J=this.B.bind(this,_.Q);this.L=this.F.bind(this,_.Q);this.K=this.C.bind(this,_.Q);this.j=null}He(){return!_.Zi()}B(a,
472
+ b){const c=this;return _.w(function*(){if(b){var d=b.track;if(d){var e=a===_.R,f=a===_.P,g=a===_.Q||e,h=b.target,k=c.h.find(n=>Mr(n,d,a));if(k)c.g.warn("Track from event already exists",d,k);else{var l=ur(a,d),m=Nr(d);if(f){if(d.kind===_.Ae)return;let n;void 0!==d.id?n=c.o[d.id]:n=Object.values(c.o).find(p=>Mr(l,p,a));l.kind&&"captions"===l.kind&&(l.mimeType=_.wc);n&&(l.src=n.url,l.mimeType=n.mimeType)}else if(k=c.h.find(n=>n.type===a&&_.lh(n,l,["kind","label","language"]))){k.id=d.id;m&&(c.g.debug(`Setting native ${a} track active`),
473
+ c.a.set(a,k));c.g.debug("Track from event seems to already exists, flipped native track to",d);return}try{l.renditions.push(new _.xr(l.id,l));c.h.push(l);const n=c.m.getConfiguration().safari;Pr(c,a,n)?yield Qr(c,l,n):Rr(c,a,n)&&(yield Sr(c,l,n));c.g.debug(a+" Track added",l);c.m.trigger(new _.H(_.gg));const p=Tr(c,a).length,u=!(!h||!h.length),v=h&&h.length||0;f=()=>{c.g.debug(`Setting native ${a} track active. `+`Native track active: ${m}. `+`Number of tracks: ${p}`,d);c.a.set(a,l)};m?f():1===p&&
474
+ g&&(e?f():u&&1!==v||f())}catch(n){c.g.error("Error while converting track data",n)}}}else c.g.warn(Ya)}else c.g.warn(Ua)})}F(a,b){if(b){var c=b.track;c?a===_.P&&c.kind!==_.Ae&&(b=this.h.find(d=>Mr(d,c,a)))&&(this.h.splice(this.h.indexOf(b),1),(this.a.get(a)||null)===b&&(this.a.set(a,null),Ur(this)),this.g.debug(a+" Track removed, id: ",b.id)):this.g.warn(Ya)}else this.g.warn(Ua)}C(a,b){this.g.debug(a+" Track changed",b);a===_.P&&Ur(this);const c=Wr(this,a);if(c)for(let d=0;d<c.length;++d)if(Nr(c[d])){if(b=
475
+ this.h.find(e=>Mr(e,c[d],a)))this.a.set(a,b),this.g.debug("Track change detected, id:",b.id),b===this.l.get(a)&&this.l.set(a,null),a===_.Q?this.m.trigger(new _.H(_.Kc)):a===_.P&&this.m.trigger(new _.H(_.ag));break}}initialize(a){this.m=a;this.j=new hv(a.getNetworkEngine())}load(){this.A=!1;var a=Vr(this,_.P);a&&(this.f.on(a,_.oc,this.M),this.f.on(a,yf,this.R),this.f.on(a,Zc,this.P));if(a=Vr(this,_.Q))this.f.on(a,_.oc,this.J),this.f.on(a,yf,this.L),this.f.on(a,Zc,this.K);if(a=Vr(this,_.R))this.f.on(a,
476
+ _.oc,this.T),this.f.on(a,yf,this.Y),this.f.on(a,Zc,this.V);this.f.one(this.m,Rc,this.H.bind(this))}release(){this.A=!0;this.h=[];this.o={};this.a.clear();this.l.clear();this.f.release()}destroy(){this.release();this.m=null}getVideoTracks(){return Tr(this,_.R)}getAudioTracks(){return Tr(this,_.Q)}qa(){return Tr(this,_.P)}ra(){const a=this.a.get(_.R)||null;if(!a)return null;if(this.w){const b=a.renditions.find(c=>c.width===this.w.width&&c.height===this.w.height);if(b)return b}return a.renditions[0]||
477
+ null}Na(){return Xr(this,_.Q)}Ra(){return Xr(this,_.P)}qb(){return Yr(this,_.R)}Fb(){return Yr(this,_.Q)}Gb(){return Yr(this,_.P)}Fa(){return this.a.get(_.R)||null}pa(){return this.a.get(_.Q)||null}va(){return this.a.get(_.P)||null}zb(a){Zr(this,_.R,a)}za(a){Zr(this,_.Q,a)}Ta(a){Zr(this,_.P,a)}ib(a){Zr(this,_.R,a&&a.track)}xb(a){Zr(this,_.Q,a&&a.track)}yb(a){Zr(this,_.P,a&&a.track)}addTextTrack(a){const b=this;return _.w(function*(){if(a.mimeType.match(/text\/vtt/)){const c="External_"+`${b.G++}`;
478
+ b.o[c]=a;$r(b,a,c)}else yield as(b,a)})}wa(){return 1>=this.getVideoTracks().flatMap(a=>a.renditions).length}H(){const a=this;return _.w(function*(){const b=a.m.getConfiguration();bs(a,_.Q,b.preferredAudioLanguage);if(!Wr(a,_.P).some(c=>Nr(c))){const c=Vr(a,_.P);yield new Promise(d=>{a.f.one(c,Zc,d);(new _.Li(d)).la(1)})}a.A||bs(a,_.P,b.preferredTextLanguage)})}};iv.prototype.isAbrEnabled=iv.prototype.wa;iv.prototype.addTextTrack=iv.prototype.addTextTrack;iv.prototype.setTextRendition=iv.prototype.yb;
479
+ iv.prototype.setAudioRendition=iv.prototype.xb;iv.prototype.setVideoRendition=iv.prototype.ib;iv.prototype.setTextTrack=iv.prototype.Ta;iv.prototype.setAudioTrack=iv.prototype.za;iv.prototype.setVideoTrack=iv.prototype.zb;iv.prototype.getTextTrack=iv.prototype.va;iv.prototype.getAudioTrack=iv.prototype.pa;iv.prototype.getVideoTrack=iv.prototype.Fa;iv.prototype.getLoadingTextRendition=iv.prototype.Gb;iv.prototype.getLoadingAudioRendition=iv.prototype.Fb;iv.prototype.getLoadingVideoRendition=iv.prototype.qb;
480
+ iv.prototype.getTextRendition=iv.prototype.Ra;iv.prototype.getAudioRendition=iv.prototype.Na;iv.prototype.getVideoRendition=iv.prototype.ra;iv.prototype.getTextTracks=iv.prototype.qa;iv.prototype.getAudioTracks=iv.prototype.getAudioTracks;iv.prototype.getVideoTracks=iv.prototype.getVideoTracks;iv.prototype.canSelectVideoTracks=iv.prototype.He;var cs=["play() failed because the user didn't interact","The play method is not allowed by the user agent","The request is not allowed by the user agent or the platform"];var jv=["abort",Qc,Rc,Sd,"emptied",Ud,_.Wd,_.Xd,"interruptbegin","interruptend",_.te,_.ue,ve,"mozaudioavailable",_.Se,_.We,_.gf,_.tf,_.vf,_.Hf,_.If,Of,"suspend",_.fg,"volumechange",_.Fg,_.Gg,_.Af,Lg,Kg,Ig,Jg];_.kv=class extends _.Nt{constructor(a){super();this.log=new _.T(a);this.configuration=this.ga=_.$m();this.ha=this.C=null;this.xd=this.hf=!1;this.Kf=new _.T("clpp.video.events");this.Nb=null;this.de=-1;this.nh=this.kh.bind(this);this.Mb=new _.En;this.setNetworkEngine(this.Mb);this.L=new _.Kt;this.gf=this.Jc=this.Nc=this.M=null}init(a,b){this.configuration=this.ga=b;this.C=a;this.log.info("Initializing Player surface");a=this.C.getMedia();this.log.info("Attaching media element listeners");for(const c of jv)this.L.on(a,
481
+ c,this.nh,c!==_.Xd);this.Nb||(this.Nb=this.dh());this.Nb.initialize(this);this.C.showMediaElement()}release(){this.M&&(this.M.destroy(),this.M=null);return Promise.resolve()}destroy(){this.L.release();return this.Mb.release()}canPlay(a,b){return _.zh[this.namespace()].canPlay(a,b)}getTimeline(){return null}setupPlaylist(){return Promise.reject(_.$a)}appendLoad(){return Promise.reject(_.$a)}seekWith(){return Promise.reject(_.$a)}detach(){return Promise.resolve()}setSeekInterceptor(){}setPlaybackSessionId(){}getBandwidthEstimate(){return null}play(){if(!this.ha)return Promise.reject("No sources specified yet. You need to load content before calling play.");
482
+ const a=this.C.getMedia().play();return Promise.resolve(a).catch(b=>{this.log.info("Caught play promise exception",b);const c={name:b.name||"",message:b.message||"",stack:b.stack||""};ds(c)?(this.trigger(new _.H(_.Lc)),this.log.warn(_.ka)):c.name===ab&&this.log.warn('Unrecognized "NotAllowedError" on play(). '+`${b.name}: ${b.message}`);throw b;})}pause(){return this.ha?new Promise((a,b)=>{const c=this.getState();if(2!==c&&5!==c&&3!==c&&4!==c)b(new _.I(_.D,7,3201,"The player state does not allow pause."));
483
+ else if(this.C.getMedia().pause(),3===this.getState())this.L.one(this,_.Qf,()=>{a()});else a()}):Promise.reject(new _.I(_.D,7,3201,"No sources specified yet. You need to load content before calling pause."))}isPaused(){return this.C.getMedia().paused}isEnded(){return this.C.getMedia().ended}getConfiguration(){return this.configuration}setDrmCustomDataModifier(a){this.Nc=a}setCdnErrorCallback(a){this.Jc=a}Qc(){return this.Nc}getSurface(){return this.C}getBufferInfo(a){const b=this.getSurface().getMedia();
484
+ return new _.Ht(b?b.buffered:void 0,a)}getPosition(){return this.getMediaPosition()}getMediaPosition(){const a=this.C.getMedia();if(a)return a.currentTime;this.log.warn("No media element available, can not report current time!");return 0}seek(a){const b=this.getMediaPosition();if(void 0===a||null===a||typeof a!==_.r||a===b)return Promise.resolve();const c=this.C.getMedia();if(!c)return this.log.warn("No media element available, can not set current time!"),Promise.reject();const d=a-b;return.1>=Math.abs(d)?
485
+ (this.log.info("Skip seek. Delta "+Math.abs(d)+" \x3c 0.1"),Promise.resolve()):new Promise((e,f)=>{const g=()=>{this.trigger(new _.H(_.tg));this.L.on(c,_.Hf,h);this.L.on(c,_.fg,h);this.L.on(c,_.tf,h);this.log.info("Seeking to "+a+". Delta "+d);this.xd=this.hf=!0;c.currentTime=a},h=l=>{const m=this.getMediaPosition(),n=.1>=Math.abs(a-m);var p=.25<m-a;const u=c.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA,v=l.type===_.Hf,y=l.type===_.tf,A=l.type===_.fg,E=y&&u;p=v||n&&E||A&&p;this.log.debug("Checking seeking state after "+
486
+ l.type+" event. Seek completed:",p,"Current Time:",m,"Target Time:",a,"Native Event:",v,"Time reached",n,"Timeupdate:",A,"Progress:",y,"ReadyState:",u,"Progress Ready:",E);p?(this.xd=this.hf=!1,this.L.off(c,_.Hf,h),this.L.off(c,_.fg,h),this.L.off(c,_.tf,h),this.Jf(),this.trigger(new _.H(_.sg)),e()):y&&b===m&&(this.log.debug("Seek seemed to have been ignored. Trying again"),c.currentTime=a)},k=()=>{if(c.readyState>HTMLMediaElement.HAVE_NOTHING)g();else this.L.one(c,_.ue,g)};this.getState()===_.zs?
487
487
  (this.log.debug("Player is in IDLE state. Postpone seek."),this.L.one(this,_.Qf,()=>{switch(this.getState()){case 2:case 3:case 4:this.log.debug("Valid seek state reached.");k();break;default:this.log.warn("Invalid seek target state. Aborting seek"),f()}})):k()})}getVolume(){const a=this.C.getMedia();if(a)return a.volume;this.log.warn("No media element available, can not report volume!");return null}setVolume(a){const b=this.C.getMedia();b?_.kh(a)?0>a||1<a?this.log.warn(`Can not set volume to ${a}.
488
- Value must be between 0 and 1.`):b.volume=a:this.log.warn("Can not set volume to "+a+". Volume must be a number"):this.log.warn("No media element available, can not set volume !")}isMuted(){return this.C.getMedia().muted}setMuted(a){const b=this.C.getMedia();typeof a===_.Mc&&(b.muted=a)}getDuration(){return this.getMediaDuration()}getMediaDuration(){return this.ga?this.C.getMedia().duration:-1}getTrackManager(){return this.kc}getPlaybackRate(){const a=this.C.getMedia();return a&&a.playbackRate||
489
- 1}setPlaybackRate(a){const b=this.C.getMedia();void 0!==a&&b&&(b.playbackRate=a)}setSourceIndex(a){this.be=a}getSourceIndex(){return this.be}getLoadedSource(){return this.ga&&-1!==this.be?this.ga[this.be]:null}getPeriods(){return[]}getNetworkEngine(){return this.jc}setNetworkEngine(a){this.jc=a;sm(this.jc,b=>{this.onError(b)})}setCmsdManager(a){this.$e=a}getTextDisplayer(){return this.M}getTimelineCues(){return[]}getCueTimeline(){return null}resetAbr(){}dh(a){var b=this.getSurface().getMedia();const c=
490
- this.getPosition();let d="Received Video Element Event: '"+a.type+"' with playhead at: "+c;if(a.type===_.fg||a.type===_.tf)this.Cf.debug(d);else{let e="";switch(a.type){case _.vf:e=`Rate: ${this.getPlaybackRate()}`;break;case Sd:e=`Duration: ${this.getDuration()}`;break;case "volumechange":e=`Volume: ${this.getVolume()} Muted: ${this.isMuted()}`;break;case _.We:case _.gf:case "suspend":case _.Fg:case Of:case _.If:case _.Hf:case _.fg:case _.tf:case Pc:case Qc:b=this.getBufferInfo().La(c);e=`State ${this.getSurface().getMedia().readyState} `+
491
- `Buffer: ${b}`;break;case _.Af:null!=b&&(e=`Size: ${b.videoWidth}x${b.videoHeight}`)}e&&(d+=". "+e);this.Cf.info(d)}a.type!==_.Xd&&this.trigger(new _.G(a.type,{detail:a}))}Bf(){}};_.ks=new Map;_.ls=new _.S("clpp.text");var rv=class{constructor(){this.a=null;this.f=[]}};var sv=class{constructor(){this.h=this.f=this.j=null;this.a=[]}};_.uv=class{constructor(){this.h=this.w=this.B=this.C=this.l=this.o=this.j=this.A=NaN;this.a=new rv;this.f=new sv}getStats(){return{width:this.A,height:this.j,streamBandwidth:this.w,decodedFrames:this.l,droppedFrames:this.o,corruptedFrames:this.C,estimatedBandwidth:this.h,loadLatency:this.B,playTime:ps(this.a,3),pauseTime:ps(this.a,4),bufferingTime:ps(this.a,2),stateHistory:qs(this.a),switchHistory:rs(this.f)}}};var vv=class{constructor(a){this.g=new _.S("clpp.StateManager");this.m=a;this.a=new _.Qt;this.f=_.Fs;this.w=7;this.G=0;this.o=-1;this.J=this.l=this.H=this.A=0;this.h=this.fa=this.C=!1;this.F=0;this.j=null;this.I=0;this.K=_.aj();this.B=!1;this.H=Date.now();zs(this)}getState(){return Bs(this,"")}destroy(){this.g.debug("Stop watching for video events for "+this.m.namespace());this.a.release()}};var wv=class extends _.qv{constructor(){super(ld);this.w=this.G=!1;this.l=this.A=this.o=this.a=this.j=null;this.h=new _.Qt;this.F=this.B=this.f=this.H=null}init(a,b){super.init(a,b);this.j=new vv(this);xs(this.j,_.Fs)}namespace(){return ld}unload(){const a=this;return _.w(function*(){if(a.ga){a.log.debug("Releasing player with source",a.ga);a.B&&(a.B.stop(),a.B=null);var b=a.getTrackManager();b&&b.release();a.A&&(a.A.destroy(),a.A=null);a.M&&(a.M.destroy(),a.M=null);a.l&&a.l.release();a.o&&(a.o.destroy(),
492
- a.o=null);_.Xh(a.h);a.f&&(a.f=new _.uv);a.F=null;a.ga=null;a.G=!1;a.a&&(a.a.removeAttribute("src"),a.a.load());if(a.w)throw new _.H(_.C,7,7E3);a.a&&(b=a.a,a.h.off(b,_.Xd),a.h.off(b,_.Af),a.a=null)}})}release(){return super.release().then(()=>this.unload()).then(()=>{this.j&&xs(this.j,_.Fs)})}destroy(){if(this.w)return this.log.warn("Player is already destroyed!"),Promise.resolve();this.w=!0;return super.destroy().then(()=>this.release()).then(()=>{this.log.debug(za);const a=this.getTrackManager();
493
- a&&a.destroy();this.l&&(this.l.destroy().catch(b=>{this.log.warn("Error while disposing metadata handler",b)}),this.l=null);this.j&&(this.j.destroy(),this.j=null);this.f=null})}getDrmInfo(){return this.o?this.o.getDrmInfo():null}getTrackManager(){return this.kc}load(a){const b=this;return _.w(function*(){if(b.w)return Promise.reject(new _.H(_.C,7,7E3));if(!b.getSurface()||!b.getSurface().getMedia())return Promise.reject("No surface or no media element in surface");const c=b.C.getMedia();b.H=Date.now()/
494
- 1E3;b.f=new _.uv;b.h.on(b,_.Qf,()=>{b.f&&_.os(b.f.a,b.getState())});xs(b.j,1);b.ga=_.mn(a);b.configuration=_.hn([b.ha,a]);b.log.debug(_.Oa,b.configuration);b.log.debug(_.gb,b.ga);const d=_.ns(b.configuration,[_.ee,"native"]);b.M=d.create(b);b.M.setTextVisibility(!0);b.configuration.enableHtmlCue&&_.Kh(_.Wf)&&!_.cj()&&(b.A=new Bu(b),b.A.start(c));b.l?b.l.release():b.l=new ou(b);c.textTracks&&Po(b.l,c.textTracks);b.getTrackManager().load();c.loop=!!b.configuration.loop;_.z(b.configuration.volume)||
495
- b.setVolume(b.configuration.volume);_.z(b.configuration.muted)||b.setMuted(b.configuration.muted);b.h.one(c,Pc,()=>{b.trigger(new _.G(_.gg))});null==b.configuration.startTime&&Os(b,c);_.aj()&&Ps(b,c);try{Hs(b,c),yield Ks(b),yield Ns(b).U}catch(e){b.G=!1,b.onError(e)}})}onError(a){this.G||(a.severity===_.C&&null!==this.j&&xs(this.j,_.ys),this.trigger(new _.G(_.Xd,{detail:a})))}Wg(){return new V}getState(){return null!==this.j?this.j.getState().currentState:7}getPresentationStartTime(){if(this.a&&this.a.getStartDate&&
496
- this.isLive()){const a=this.a.getStartDate();return isNaN(a.getTime())?null:a.getTime()/1E3}return null}getSeekRange(){var a=this.getSurface().getMedia();if(a&&a.src){a=a.seekable;if(a.length)return this.F=a={start:a.start(0),end:a.end(a.length-1)};if(this.F)return this.F}return{start:0,end:0}}isLive(){return this.a&&this.a.src?Infinity===this.a.duration:!1}getStats(){if(!this.f||!this.a)return _.ss();this.f&&_.os(this.f.a,this.getState());var a=this.a,b=this.f,c=a.videoHeight;b.A=a.videoWidth;b.j=
497
- c;a.getVideoPlaybackQuality&&(c=a.getVideoPlaybackQuality(),a=this.f,b=Number(c.totalVideoFrames),a.o=Number(c.droppedVideoFrames),a.l=b,this.f.C=Number(c.corruptedVideoFrames));if(a=this.getTrackManager())if(a=a.ra())a.bandwidth&&(this.f.w=a.bandwidth),a.Zc&&(this.f.h=a.Zc);return this.f.getStats()}getTimelineCues(){return this.l?this.l.getTimelineCues():[]}getCueTimeline(){return null}},xv=class{a(){return ld}canPlay(a,b){a=a.type||"";const c=a===_.wc,d=a===_.Bc,e=a===_.wl;var f;_.$i()||c||d||e&&
498
- !_.aj()?f=0:f=""!==Oi().canPlayType(a)?e&&_.aj()&&(window.ManagedMediaSource||window.MediaSource&&MediaSource.isTypeSupported)&&!b.streaming.preferNativeHlsOnSafari?1:2:0;return f}f(a){return a===_.na}create(){return new wv}};var yv=class extends R{constructor(a,b,c){super(a,b,c);a={manifest:{timeline:{version:2},keepTimelineLive:!0},streaming:{preferNativeHlsOnSafari:!1,enableLiveEdgeChasing:!1,startAtSegmentBoundary:!1}};this.C=_.ch(this.C,a);this.f=_.ch(this.f,a);this.G=0;this.o=[];this.V=!1;this.w=null;this.J=[]}open(a,b){const c=this;return _.w(function*(){if(c.w)throw new _.H(_.C,7,7008,`Cannot call open() while ${c.w}() is ongoing!`);if(0!==a)throw new _.H(_.C,7,7007,"The index parameter only supports the value of 0.");
499
- if(0===b.length)throw new _.H(_.C,7,7003,Wa);if(b.some(g=>!g.id||!g.source))throw new _.H(_.C,7,7100,"Some config is missing required properties `id` or `source`!");if((new Set(b.map(g=>g.id))).size!==b.length)throw new _.H(_.C,7,7100,"Some config contains a non-unique property `id`!");const d=b[0].playlist;if(d){var e=d.timeline,f=["flat","basic"];if(e&&!f.includes(e))throw new _.H(_.C,7,7100,"Unsupported `playlist.timeline` config value!");e=d.startTime;if(null!=e&&(typeof e!==_.r||0>e))throw new _.H(_.C,
500
- 7,7100,"Invalid `playlist.startTime` config value!");f=d.endTime;if(null!=f&&(typeof f!==_.r||0>f||null!=e&&f<=e))throw new _.H(_.C,7,7100,"Invalid `playlist.endTime` config value!");if("DVR"===d.content&&!f)throw new _.H(_.C,7,7100,"`playlist.endTime` config value is required for DVR content!");}try{Qs(c),c.w="open",yield Ts(c,b),c.G=0,c.o=b,c.V=!0,Us(c,b[0].playlist||{})}finally{c.w=null}})}hh(a){const b=this;return _.w(function*(){if(b.w)throw new _.H(_.C,7,7008,`Cannot call addItem() while ${b.w}() is ongoing!`);
501
- if(!b.V)throw new _.H(_.C,7,7008,"open() must be called before addItem()!");if(!a.id||!a.source)throw new _.H(_.C,7,7100,"The config is missing required properties `id` or `source`!");if((new Set(b.o.map(c=>c.id))).has(a.id))throw new _.H(_.C,7,7100,"A config with this `id` already exists in the playlist!");try{b.w="addItem",b.o.push(a),yield Vs(b,a)}finally{b.w=null}})}getCurrentItem(){return this.o[this.G]||null}getCurrentItemIndex(){return this.G}Rh(){return[...this.o]}md(){return this.o.length}getTimeline(){return this.a?
502
- this.a.getTimeline():null}seekWith(a){return this.a?this.a.seekWith(a):Promise.resolve()}release(){this.o=[];this.G=0;this.V=!1;return super.release()}destroy(){Qs(this);return super.destroy()}setCdnErrorCallback(){throw new _.H(1,7,7009,"CDN switching is not supported!");}};_.x("clpp.playlist.ScPlaylist",yv);yv.prototype.setCdnErrorCallback=yv.prototype.setCdnErrorCallback;yv.prototype.destroy=yv.prototype.destroy;yv.prototype.release=yv.prototype.release;yv.prototype.seekWith=yv.prototype.seekWith;
503
- yv.prototype.getTimeline=yv.prototype.getTimeline;yv.prototype.getSize=yv.prototype.md;yv.prototype.getPlaylist=yv.prototype.Rh;yv.prototype.getCurrentItemIndex=yv.prototype.getCurrentItemIndex;yv.prototype.getCurrentItem=yv.prototype.getCurrentItem;yv.prototype.addItem=yv.prototype.hh;yv.prototype.open=yv.prototype.open;var zv=class extends _.Tt{constructor(a){super();this.ka=_.ch({transition:_.Se,preloadMedia:!1},a);this.h=[];this.a=0;const b=Ws(a.anchorId,this.ka.config);this.o=new Vt(b);this.f=null;this.j=!1;this.l=new Map;this.w=a.toggleVisible;this.g=new _.S(md);this.o.a.forEach(c=>Xs(this,c.player,!1))}Db(){return this.f}Zd(){return this.f?this.f.player:null}cg(){return this.l.get(this.a+1)||null}eg(){return this.l.get(this.a-1)||null}dg(){return[this.eg(),this.cg()].filter(Boolean)}Ji(a){if(0<this.h.length)throw Error("Cannot re-set items in the playlist");
504
- this.g.info("Set items",a);this.h=a.map((b,c)=>({config:b,index:c,preloadPromise:Promise.resolve(),disposers:[]}))}Ii(a){if(0===this.h.length)throw Error(Va);if(0>a||a>this.h.length-1)throw Error("Index out of bounds");this.a=a}qd(){return this.a<this.h.length-1}jg(){return 0<this.a}si(){const a=this;return _.w(function*(){if(a.j)a.g.warn("Cannot play first item while busy");else if(0===a.h.length)a.g.warn(Va);else{a.j=!0;a.g.info(`First (index: ${a.a})`);var b=a.h[a.a];try{a.g.info(`First loading (index: ${a.a})`),
505
- yield $s(a,b),a.g.info(`First playing (index: ${a.a})`)}catch(c){throw a.g.error(`First failed (index: ${a.a})`),c;}finally{a.j=!1,dt(a)}}})}Dg(){const a=this;return _.w(function*(){if(a.j)a.g.warn("Cannot play next item while busy");else if(a.qd()){a.j=!0;a.a+=1;a.g.info(`Next (index: ${a.a})`);var b=a.f;a.ka.transition===_.Se&&b.player.pause();it(a,a.a+-2);a.l.delete(a.a);var c=a.h[a.a];try{a.g.info(`Next loading (index: ${a.a})`),yield et(a,c),a.g.info(`Next playing (index: ${a.a})`)}catch(d){throw a.g.error(`Next failed (index: ${a.a})`),
506
- d;}finally{a.j=!1,b&&ht(a,b),dt(a)}}else a.g.warn("There are no more items in the playlist")})}vi(){const a=this;return _.w(function*(){if(a.j)a.g.warn("Cannot play previous item while busy");else if(a.jg()){a.j=!0;--a.a;a.g.info(`Previous (index: ${a.a})`);var b=a.f;a.ka.transition===_.Se&&b.player.pause();it(a,a.a+2);a.l.delete(a.a);var c=a.h[a.a];try{a.g.info(`Previous loading (index: ${a.a})`),yield et(a,c),a.g.info(`Previous playing (index: ${a.a})`)}catch(d){throw a.g.error(`Previous failed (index: ${a.a})`),
507
- d;}finally{a.j=!1,b&&ht(a,b),dt(a)}}else a.g.warn("There are no more previous items in the playlist")})}destroy(){const a=this;return _.w(function*(){a.g.info("Destroy");yield Promise.all([jt(a),a.f?ht(a,a.f):Promise.resolve()]);yield kt(a)})}};_.x(md,zv);zv.prototype.destroy=zv.prototype.destroy;zv.prototype.playPrev=zv.prototype.vi;zv.prototype.playNext=zv.prototype.Dg;zv.prototype.playFirst=zv.prototype.si;zv.prototype.hasPrev=zv.prototype.jg;zv.prototype.hasNext=zv.prototype.qd;
508
- zv.prototype.setIndex=zv.prototype.Ii;zv.prototype.setItems=zv.prototype.Ji;zv.prototype.getPreloading=zv.prototype.dg;zv.prototype.getPrev=zv.prototype.eg;zv.prototype.getNext=zv.prototype.cg;zv.prototype.getCurrentPlayer=zv.prototype.Zd;zv.prototype.getCurrent=zv.prototype.Db;var gt="preload",Ys=_.we;var lt=new Map;var Cv=class{constructor(a){this.h=a;this.f={keepOriginalTimestamps:!0,remux:!1};this.a=new muxjs.mp4.Transmuxer(this.f)}destroy(){this.a.dispose();this.a=null}reset(){this.a=new muxjs.mp4.Transmuxer(this.f)}isSupported(a,b){const c="mp2t"===a.toLowerCase().split(";")[0].split("/")[1],d=a.toLowerCase().split(";")[0]===_.Dc;if(!window.muxjs||!c&&!d)return!1;if(d)return _.mt(Hc);if(b)return _.mt(nt(b,a));b=nt(_.q,a);a=nt(_.t,a);return _.mt(b)||_.mt(a)}isMuxed(a,b){return 1<this.demuxMimeTypes(a,b).size}demuxMimeTypes(a,
509
- b){const c=new Map;c.set(a,b);try{const d=_.an(b),e=_.bn(b).split(","),f=new Map,g=Zm(_.q,e),h=Zm(_.t,e);g&&f.set(_.q,this.convertCodecs(_.q,_.$m(d,g)));h&&f.set(_.t,this.convertCodecs(_.t,_.$m(d,h)));return f}catch(d){return c}}convertCodecs(a,b){return b.toLowerCase().split(";")[0]===_.Dc?Hc:"mp2t"===b.toLowerCase().split(";")[0].split("/")[1]?nt(a,b):b}getOriginalMimeType(){return this.h}transmux(a){const b=[],c=[];let d=[],e=null;a=_.F(a);const f=h=>{d=h.captions;const k=new Uint8Array(h.data.byteLength+
510
- h.initSegment.byteLength);k.set(h.initSegment,0);k.set(h.data,h.initSegment.byteLength);h.type===Av?b.push(k):h.type===Bv&&c.push(k)},g=()=>{e={video:_.lm(...b),captions:d,audio:_.lm(...c)}};this.a.on("data",f);this.a.on("done",g);this.a.push(a);this.a.flush();this.a.off("data",f);this.a.off("done",g);if(!e)throw new _.H(_.C,3,3018);return e}},Bv=_.q,Av=_.t;var Dv=class{getCuePoints(){}Ib(){}Hb(){}};_.x("clpp.ads.IAdsTimeline",Dv);Dv.prototype.hasPostroll=Dv.prototype.Hb;Dv.prototype.hasPreroll=Dv.prototype.Ib;Dv.prototype.getCuePoints=Dv.prototype.getCuePoints;_.Ev=class{install(){}uninstall(){}beforeLoad(){}afterLoad(){}playerConstructed(){}playerDestroyed(){}};var Hv=class extends _.Fu{constructor(a,b,c,d,e){super(Ia);this.l=a;this.j=b;this.h=c;this.a=d;this.o=e;this.g=new _.S(id);_.zi(this.l)?this.g.warn(_.Gb):this.Xa(_.vd,{licenseUrl:this.l,videoRobustness:[_.nb,void 0],audioRobustness:[_.mb,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:this.Cd.bind(this)}});_.zi(this.j)?this.g.warn(_.db):this.Xa(_.td,{licenseUrl:this.j,videoRobustness:["3000"],audioRobustness:["2000"],modifiers:{licenseRequest:this.Cd.bind(this)}});
511
- _.zi(this.h)?this.g.warn(_.Da):_.zi(this.a)?this.g.warn(_.Ca):this.Xa(_.rd,{licenseUrl:this.h,certificateUrl:this.a,modifiers:{licenseRequest:this.xg.bind(this),licenseResponse:this.yg.bind(this),certificateRequest:this.Cd.bind(this),extractContentId:this.Yf.bind(this)}})}Cd(a,b){a=a.drm.customData.headers||{};for(const c of Object.keys(a))b.headers[c]=a[c]}Yf(a,b){a=lp(b);switch(this.o){case Fv:return a;case Gv:return(new _.mp(a)).a;default:throw Error("Unknown content ID strategy");}}xg(a,b){b.headers[ta]=
512
- Cc;this.Cd(a,b);a={spc:_.fm(b.body)};b.body=_.vi(_.Um(a,!0))}yg(a,b){a=_.pi(b.data).trim();const c="\x3c/ckc\x3e"===a.substr(-6);"\x3cckc\x3e"===a.substr(0,5)&&c&&(a=a.slice(5,-6));b.data=_.hm(a).buffer}};_.x(id,Hv);Hv.prototype.onFairPlayLicenseResponse=Hv.prototype.yg;Hv.prototype.onFairPlayLicenseRequest=Hv.prototype.xg;Hv.prototype.extractFairPlayContentId=Hv.prototype.Yf;Hv.prototype.onLicenseRequest=Hv.prototype.Cd;Hv.prototype.constructor=Hv.prototype.constructor;Hv.NAME=Ia;
513
- var Gv="hostname",Fv="full-skd";Hv.FairPlayContentIdStrategy={HOSTNAME:Gv,FULL_SKD:Fv};_.x("clpp.drm.HeaderDrmComponent",class extends _.Ev{beforeLoad(a){a=a.getConfiguration();if(a.drm&&a.drm&&a.drm.env===Ia){a=a.drm.customData;if(!a)throw new _.H(_.C,7,7100,_.wd);a=new Hv(a.widevineLicenseUrl,a.playReadyLicenseUrl,a.fairPlayLicenseUrl,a.fairPlayCertificateUrl,a.fairPlayContentIdStrategy||Fv);_.qn(a)}}uninstall(){delete _.pn.HeaderDrm}id(){return"headerdrm"}});var vt;_.Iv=class{constructor(a,b,c){this.h=a;this.j=b;this.f=c||this.h.getMedia();this.a=null}start(){this.a=new ResizeObserver(a=>{a=a[0];this.j(a.contentRect.width,a.contentRect.height,this.h.isFullscreen())});this.f&&this.a.observe(this.f)}stop(){this.a&&(this.a.disconnect(),this.a=null)}};var Jv;_.Kv=class{constructor(){this.a=new Blob([Jv],{type:_.zg})}canPlay(a){var b=document.createElement(_.t);b.setAttribute("playsinline","playsinline");a&&(b.muted=!0,b.setAttribute("muted","muted"));b.src=URL.createObjectURL(this.a);const c=new _.Jl;b=b.play();const d=(new _.Ni(()=>{d.stop();c.resolve(a)})).la(.25);void 0!==b?b.then(()=>{d.stop();c.resolve(!0)}).catch(e=>{e&&e.message&&e.message===ab?(d.stop(),c.resolve(!0)):(d.stop(),c.resolve(!1))}):(d.stop(),c.resolve(!0));return c}};
514
- Jv=new Uint8Array([0,0,0,28,102,116,121,112,105,115,111,109,0,0,2,0,105,115,111,109,105,115,111,50,109,112,52,49,0,0,0,8,102,114,101,101,0,0,2,239,109,100,97,116,33,16,5,32,164,27,255,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
488
+ Value must be between 0 and 1.`):b.volume=a:this.log.warn("Can not set volume to "+a+". Volume must be a number"):this.log.warn("No media element available, can not set volume !")}isMuted(){return this.C.getMedia().muted}setMuted(a){const b=this.C.getMedia();typeof a===_.Nc&&(b.muted=a)}getDuration(){return this.getMediaDuration()}getMediaDuration(){return this.ha?this.C.getMedia().duration:-1}getTrackManager(){return this.Nb}getPlaybackRate(){const a=this.C.getMedia();return a&&a.playbackRate||
489
+ 1}setPlaybackRate(a){const b=this.C.getMedia();void 0!==a&&b&&(b.playbackRate=a)}setSourceIndex(a){this.de=a}getSourceIndex(){return this.de}getLoadedSource(){return this.ha&&-1!==this.de?this.ha[this.de]:null}getPeriods(){return[]}getNetworkEngine(){return this.Mb}setNetworkEngine(a){this.Mb=a;mm(this.Mb,b=>{this.onError(b)})}setCmsdManager(a){this.gf=a}getTextDisplayer(){return this.M}getTimelineCues(){return[]}getCueTimeline(){return null}resetAbr(){}kh(a){var b=this.getSurface().getMedia();const c=
490
+ this.getPosition();let d="Received Video Element Event: '"+a.type+"' with playhead at: "+c;if(a.type===_.fg||a.type===_.tf)this.Kf.debug(d);else{let e="";switch(a.type){case _.vf:e=`Rate: ${this.getPlaybackRate()}`;break;case Sd:e=`Duration: ${this.getDuration()}`;break;case "volumechange":e=`Volume: ${this.getVolume()} Muted: ${this.isMuted()}`;break;case _.We:case _.gf:case "suspend":case _.Fg:case Of:case _.If:case _.Hf:case _.fg:case _.tf:case Qc:case Rc:b=this.getBufferInfo().Ma(c);e=`State ${this.getSurface().getMedia().readyState} `+
491
+ `Buffer: ${b}`;break;case _.Af:null!=b&&(e=`Size: ${b.videoWidth}x${b.videoHeight}`)}e&&(d+=". "+e);this.Kf.info(d)}a.type!==_.Xd&&this.trigger(new _.H(a.type,{detail:a}))}Jf(){}};_.es=new Map;_.fs=new _.T("clpp.text");var lv=class{constructor(){this.a=null;this.f=[]}};var mv=class{constructor(){this.h=this.f=this.j=null;this.a=[]}};_.nv=class{constructor(){this.h=this.w=this.B=this.C=this.l=this.o=this.j=this.A=NaN;this.a=new lv;this.f=new mv}getStats(){return{width:this.A,height:this.j,streamBandwidth:this.w,decodedFrames:this.l,droppedFrames:this.o,corruptedFrames:this.C,estimatedBandwidth:this.h,loadLatency:this.B,playTime:js(this.a,3),pauseTime:js(this.a,4),bufferingTime:js(this.a,2),stateHistory:ks(this.a),switchHistory:ls(this.f)}}};var ov=class{constructor(a){this.g=new _.T("clpp.StateManager");this.m=a;this.a=new _.Kt;this.f=_.zs;this.w=7;this.G=0;this.o=-1;this.J=this.l=this.H=this.A=0;this.h=this.fa=this.C=!1;this.F=0;this.j=null;this.I=0;this.K=_.Zi();this.B=!1;this.H=Date.now();qs(this)}getState(){return ss(this,"")}destroy(){this.g.debug("Stop watching for video events for "+this.m.namespace());this.a.release()}};var pv=class extends _.kv{constructor(){super(md);this.w=this.G=!1;this.l=this.A=this.o=this.a=this.j=null;this.h=new _.Kt;this.F=this.B=this.f=this.H=null}init(a,b){super.init(a,b);this.j=new ov(this);os(this.j,_.zs)}namespace(){return md}unload(){const a=this;return _.w(function*(){if(a.ha){a.log.debug("Releasing player with source",a.ha);a.B&&(a.B.stop(),a.B=null);var b=a.getTrackManager();b&&b.release();a.A&&(a.A.destroy(),a.A=null);a.M&&(a.M.destroy(),a.M=null);a.l&&a.l.release();a.o&&(a.o.destroy(),
492
+ a.o=null);_.Xh(a.h);a.f&&(a.f=new _.nv);a.F=null;a.ha=null;a.G=!1;a.a&&(a.a.removeAttribute("src"),a.a.load());if(a.w)throw new _.I(_.D,7,7E3);a.a&&(b=a.a,a.h.off(b,_.Xd),a.h.off(b,_.Af),a.a=null)}})}release(){return super.release().then(()=>this.unload()).then(()=>{this.j&&os(this.j,_.zs)})}destroy(){if(this.w)return this.log.warn("Player is already destroyed!"),Promise.resolve();this.w=!0;return super.destroy().then(()=>this.release()).then(()=>{this.log.debug(za);const a=this.getTrackManager();
493
+ a&&a.destroy();this.l&&(this.l.destroy().catch(b=>{this.log.warn("Error while disposing metadata handler",b)}),this.l=null);this.j&&(this.j.destroy(),this.j=null);this.f=null})}getDrmInfo(){return this.o?this.o.getDrmInfo():null}getTrackManager(){return this.Nb}load(a){const b=this;return _.w(function*(){if(b.w)return Promise.reject(new _.I(_.D,7,7E3));if(!b.getSurface()||!b.getSurface().getMedia())return Promise.reject("No surface or no media element in surface");const c=b.C.getMedia();b.H=Date.now()/
494
+ 1E3;b.f=new _.nv;b.h.on(b,_.Qf,()=>{b.f&&_.is(b.f.a,b.getState())});os(b.j,1);b.ha=_.fn(a);b.configuration=_.bn([b.ga,a]);b.log.debug(_.Oa,b.configuration);b.log.debug(_.hb,b.ha);const d=_.hs(b.configuration,[_.ee,"native"]);b.M=d.create(b);b.M.setTextVisibility(!0);b.configuration.enableHtmlCue&&_.Kh(_.Wf)&&!_.aj()&&(b.A=new uu(b),b.A.start(c));b.l?b.l.release():b.l=new hu(b);c.textTracks&&Jo(b.l,c.textTracks);b.getTrackManager().load();c.loop=!!b.configuration.loop;_.z(b.configuration.volume)||
495
+ b.setVolume(b.configuration.volume);_.z(b.configuration.muted)||b.setMuted(b.configuration.muted);b.h.one(c,Qc,()=>{b.trigger(new _.H(_.gg))});null==b.configuration.startTime&&Is(b,c);_.Zi()&&Js(b,c);try{Bs(b,c),yield Es(b),yield Hs(b).U}catch(e){b.G=!1,b.onError(e)}})}onError(a){this.G||(a.severity===_.D&&null!==this.j&&os(this.j,_.ps),this.trigger(new _.H(_.Xd,{detail:a})))}dh(){return new iv}getState(){return null!==this.j?this.j.getState().currentState:7}getPresentationStartTime(){if(this.a&&
496
+ this.a.getStartDate&&this.isLive()){const a=this.a.getStartDate();return isNaN(a.getTime())?null:a.getTime()/1E3}return null}getSeekRange(){var a=this.getSurface().getMedia();if(a&&a.src){a=a.seekable;if(a.length)return this.F=a={start:a.start(0),end:a.end(a.length-1)};if(this.F)return this.F}return{start:0,end:0}}isLive(){return this.a&&this.a.src?Infinity===this.a.duration:!1}getStats(){if(!this.f||!this.a)return _.ms();this.f&&_.is(this.f.a,this.getState());var a=this.a,b=this.f,c=a.videoHeight;
497
+ b.A=a.videoWidth;b.j=c;a.getVideoPlaybackQuality&&(c=a.getVideoPlaybackQuality(),a=this.f,b=Number(c.totalVideoFrames),a.o=Number(c.droppedVideoFrames),a.l=b,this.f.C=Number(c.corruptedVideoFrames));if(a=this.getTrackManager())if(a=a.ra())a.bandwidth&&(this.f.w=a.bandwidth),a.cd&&(this.f.h=a.cd);return this.f.getStats()}getTimelineCues(){return this.l?this.l.getTimelineCues():[]}getCueTimeline(){return null}},qv=class{a(){return md}canPlay(a,b){a=a.type||"";const c=a===_.xc,d=a===_.Cc,e=a===_.ul;
498
+ var f;_.Yi()||c||d||e&&!_.Zi()?f=0:f=""!==Mi().canPlayType(a)?e&&_.Zi()&&(window.ManagedMediaSource||window.MediaSource&&MediaSource.isTypeSupported)&&!b.streaming.preferNativeHlsOnSafari?1:2:0;return f}f(a){return a===_.na}create(){return new pv}};var rv=class extends S{constructor(a,b,c){super(a,b,c);a={manifest:{timeline:{version:2},keepTimelineLive:!0},streaming:{preferNativeHlsOnSafari:!1,enableLiveEdgeChasing:!1,startAtSegmentBoundary:!1}};this.C=_.ch(this.C,a);this.f=_.ch(this.f,a);this.G=0;this.o=[];this.V=!1;this.w=null;this.J=[]}open(a,b){const c=this;return _.w(function*(){if(c.w)throw new _.I(_.D,7,7008,`Cannot call open() while ${c.w}() is ongoing!`);if(0!==a)throw new _.I(_.D,7,7007,"The index parameter only supports the value of 0.");
499
+ if(0===b.length)throw new _.I(_.D,7,7003,Wa);if(b.some(g=>!g.id||!g.source))throw new _.I(_.D,7,7100,"Some config is missing required properties `id` or `source`!");if((new Set(b.map(g=>g.id))).size!==b.length)throw new _.I(_.D,7,7100,"Some config contains a non-unique property `id`!");const d=b[0].playlist;if(d){var e=d.timeline,f=["flat","basic"];if(e&&!f.includes(e))throw new _.I(_.D,7,7100,"Unsupported `playlist.timeline` config value!");e=d.startTime;if(null!=e&&(typeof e!==_.r||0>e))throw new _.I(_.D,
500
+ 7,7100,"Invalid `playlist.startTime` config value!");f=d.endTime;if(null!=f&&(typeof f!==_.r||0>f||null!=e&&f<=e))throw new _.I(_.D,7,7100,"Invalid `playlist.endTime` config value!");if("DVR"===d.content&&!f)throw new _.I(_.D,7,7100,"`playlist.endTime` config value is required for DVR content!");}try{Ks(c),c.w="open",yield Ns(c,b),c.G=0,c.o=b,c.V=!0,Os(c,b[0].playlist||{})}finally{c.w=null}})}oh(a){const b=this;return _.w(function*(){if(b.w)throw new _.I(_.D,7,7008,`Cannot call addItem() while ${b.w}() is ongoing!`);
501
+ if(!b.V)throw new _.I(_.D,7,7008,"open() must be called before addItem()!");if(!a.id||!a.source)throw new _.I(_.D,7,7100,"The config is missing required properties `id` or `source`!");if((new Set(b.o.map(c=>c.id))).has(a.id))throw new _.I(_.D,7,7100,"A config with this `id` already exists in the playlist!");try{b.w="addItem",b.o.push(a),yield Ps(b,a)}finally{b.w=null}})}getCurrentItem(){return this.o[this.G]||null}getCurrentItemIndex(){return this.G}Yh(){return[...this.o]}pd(){return this.o.length}getTimeline(){return this.a?
502
+ this.a.getTimeline():null}seekWith(a){return this.a?this.a.seekWith(a):Promise.resolve()}release(){this.o=[];this.G=0;this.V=!1;return super.release()}destroy(){Ks(this);return super.destroy()}setCdnErrorCallback(){throw new _.I(1,7,7009,"CDN switching is not supported!");}};_.x("clpp.playlist.ScPlaylist",rv);rv.prototype.setCdnErrorCallback=rv.prototype.setCdnErrorCallback;rv.prototype.destroy=rv.prototype.destroy;rv.prototype.release=rv.prototype.release;rv.prototype.seekWith=rv.prototype.seekWith;
503
+ rv.prototype.getTimeline=rv.prototype.getTimeline;rv.prototype.getSize=rv.prototype.pd;rv.prototype.getPlaylist=rv.prototype.Yh;rv.prototype.getCurrentItemIndex=rv.prototype.getCurrentItemIndex;rv.prototype.getCurrentItem=rv.prototype.getCurrentItem;rv.prototype.addItem=rv.prototype.oh;rv.prototype.open=rv.prototype.open;var sv=class extends _.Nt{constructor(a){super();this.ka=_.ch({transition:_.Se,preloadMedia:!1},a);this.h=[];this.a=0;const b=Qs(a.anchorId,this.ka.config);this.o=new Pt(b);this.f=null;this.j=!1;this.l=new Map;this.w=a.toggleVisible;this.g=new _.T(nd);this.o.a.forEach(c=>Rs(this,c.player,!1))}Eb(){return this.f}ae(){return this.f?this.f.player:null}kg(){return this.l.get(this.a+1)||null}mg(){return this.l.get(this.a-1)||null}lg(){return[this.mg(),this.kg()].filter(Boolean)}Pi(a){if(0<this.h.length)throw Error("Cannot re-set items in the playlist");
504
+ this.g.info("Set items",a);this.h=a.map((b,c)=>({config:b,index:c,preloadPromise:Promise.resolve(),disposers:[]}))}Oi(a){if(0===this.h.length)throw Error(Va);if(0>a||a>this.h.length-1)throw Error("Index out of bounds");this.a=a}td(){return this.a<this.h.length-1}rg(){return 0<this.a}Bi(){const a=this;return _.w(function*(){if(a.j)a.g.warn("Cannot play first item while busy");else if(0===a.h.length)a.g.warn(Va);else{a.j=!0;a.g.info(`First (index: ${a.a})`);var b=a.h[a.a];try{a.g.info(`First loading (index: ${a.a})`),
505
+ yield Us(a,b),a.g.info(`First playing (index: ${a.a})`)}catch(c){throw a.g.error(`First failed (index: ${a.a})`),c;}finally{a.j=!1,Ys(a)}}})}Kg(){const a=this;return _.w(function*(){if(a.j)a.g.warn("Cannot play next item while busy");else if(a.td()){a.j=!0;a.a+=1;a.g.info(`Next (index: ${a.a})`);var b=a.f;a.ka.transition===_.Se&&b.player.pause();ct(a,a.a+-2);a.l.delete(a.a);var c=a.h[a.a];try{a.g.info(`Next loading (index: ${a.a})`),yield Zs(a,c),a.g.info(`Next playing (index: ${a.a})`)}catch(d){throw a.g.error(`Next failed (index: ${a.a})`),
506
+ d;}finally{a.j=!1,b&&bt(a,b),Ys(a)}}else a.g.warn("There are no more items in the playlist")})}Ci(){const a=this;return _.w(function*(){if(a.j)a.g.warn("Cannot play previous item while busy");else if(a.rg()){a.j=!0;--a.a;a.g.info(`Previous (index: ${a.a})`);var b=a.f;a.ka.transition===_.Se&&b.player.pause();ct(a,a.a+2);a.l.delete(a.a);var c=a.h[a.a];try{a.g.info(`Previous loading (index: ${a.a})`),yield Zs(a,c),a.g.info(`Previous playing (index: ${a.a})`)}catch(d){throw a.g.error(`Previous failed (index: ${a.a})`),
507
+ d;}finally{a.j=!1,b&&bt(a,b),Ys(a)}}else a.g.warn("There are no more previous items in the playlist")})}destroy(){const a=this;return _.w(function*(){a.g.info("Destroy");yield Promise.all([dt(a),a.f?bt(a,a.f):Promise.resolve()]);yield et(a)})}};_.x(nd,sv);sv.prototype.destroy=sv.prototype.destroy;sv.prototype.playPrev=sv.prototype.Ci;sv.prototype.playNext=sv.prototype.Kg;sv.prototype.playFirst=sv.prototype.Bi;sv.prototype.hasPrev=sv.prototype.rg;sv.prototype.hasNext=sv.prototype.td;
508
+ sv.prototype.setIndex=sv.prototype.Oi;sv.prototype.setItems=sv.prototype.Pi;sv.prototype.getPreloading=sv.prototype.lg;sv.prototype.getPrev=sv.prototype.mg;sv.prototype.getNext=sv.prototype.kg;sv.prototype.getCurrentPlayer=sv.prototype.ae;sv.prototype.getCurrent=sv.prototype.Eb;var at="preload",Ss=_.we;var ft=new Map;var wv=class{constructor(a){this.h=a;this.f={keepOriginalTimestamps:!0,remux:!1};this.a=new muxjs.mp4.Transmuxer(this.f)}destroy(){this.a.dispose();this.a=null}reset(){this.a=new muxjs.mp4.Transmuxer(this.f)}isSupported(a,b){const c="mp2t"===a.toLowerCase().split(";")[0].split("/")[1],d=a.toLowerCase().split(";")[0]===_.Ec;if(!window.muxjs||!c&&!d)return!1;if(d)return _.gt(Ic);if(b)return _.gt(ht(b,a));b=ht(_.q,a);a=ht(_.t,a);return _.gt(b)||_.gt(a)}isMuxed(a,b){return 1<this.demuxMimeTypes(a,b).size}demuxMimeTypes(a,
509
+ b){const c=new Map;c.set(a,b);try{const d=_.Vm(b),e=_.Wm(b).split(","),f=new Map,g=Tm(_.q,e),h=Tm(_.t,e);g&&f.set(_.q,this.convertCodecs(_.q,_.Um(d,g)));h&&f.set(_.t,this.convertCodecs(_.t,_.Um(d,h)));return f}catch(d){return c}}convertCodecs(a,b){return b.toLowerCase().split(";")[0]===_.Ec?Ic:"mp2t"===b.toLowerCase().split(";")[0].split("/")[1]?ht(a,b):b}getOriginalMimeType(){return this.h}transmux(a){const b=[],c=[];let d=[],e=null;a=_.G(a);const f=h=>{d=h.captions;const k=new Uint8Array(h.data.byteLength+
510
+ h.initSegment.byteLength);k.set(h.initSegment,0);k.set(h.data,h.initSegment.byteLength);h.type===uv?b.push(k):h.type===vv&&c.push(k)},g=()=>{e={video:_.fm(...b),captions:d,audio:_.fm(...c)}};this.a.on("data",f);this.a.on("done",g);this.a.push(a);this.a.flush();this.a.off("data",f);this.a.off("done",g);if(!e)throw new _.I(_.D,3,3018);return e}},vv=_.q,uv=_.t;var xv=class{getCuePoints(){}Jb(){}Ib(){}};_.x("clpp.ads.IAdsTimeline",xv);xv.prototype.hasPostroll=xv.prototype.Ib;xv.prototype.hasPreroll=xv.prototype.Jb;xv.prototype.getCuePoints=xv.prototype.getCuePoints;_.yv=class{install(){}uninstall(){}beforeLoad(){}afterLoad(){}playerConstructed(){}playerDestroyed(){}};var Bv=class extends _.yu{constructor(a,b,c,d,e){super(Ia);this.l=a;this.j=b;this.h=c;this.a=d;this.o=e;this.g=new _.T(jd);_.xi(this.l)?this.g.warn(_.Ib):this.Ya(_.wd,{licenseUrl:this.l,videoRobustness:[_.pb,void 0],audioRobustness:[_.ob,void 0],persistentStateRequired:!1,distinctiveIdentifierRequired:!1,serverCertificate:null,modifiers:{licenseRequest:this.Ed.bind(this)}});_.xi(this.j)?this.g.warn(_.fb):this.Ya(_.ud,{licenseUrl:this.j,videoRobustness:["3000"],audioRobustness:["2000"],modifiers:{licenseRequest:this.Ed.bind(this)}});
511
+ _.xi(this.h)?this.g.warn(_.Da):_.xi(this.a)?this.g.warn(_.Ca):this.Ya(_.sd,{licenseUrl:this.h,certificateUrl:this.a,modifiers:{licenseRequest:this.Eg.bind(this),licenseResponse:this.Fg.bind(this),certificateRequest:this.Ed.bind(this),extractContentId:this.fg.bind(this)}})}Ed(a,b){a=a.drm.customData.headers||{};for(const c of Object.keys(a))b.headers[c]=a[c]}fg(a,b){a=fp(b);switch(this.o){case zv:return a;case Av:return(new _.gp(a)).a;default:throw Error("Unknown content ID strategy");}}Eg(a,b){b.headers[ta]=
512
+ Dc;this.Ed(a,b);a={spc:_.$l(b.body)};b.body=_.ti(_.Om(a,!0))}Fg(a,b){a=_.ni(b.data).trim();const c="\x3c/ckc\x3e"===a.substr(-6);"\x3cckc\x3e"===a.substr(0,5)&&c&&(a=a.slice(5,-6));b.data=_.bm(a).buffer}};_.x(jd,Bv);Bv.prototype.onFairPlayLicenseResponse=Bv.prototype.Fg;Bv.prototype.onFairPlayLicenseRequest=Bv.prototype.Eg;Bv.prototype.extractFairPlayContentId=Bv.prototype.fg;Bv.prototype.onLicenseRequest=Bv.prototype.Ed;Bv.prototype.constructor=Bv.prototype.constructor;Bv.NAME=Ia;
513
+ var Av="hostname",zv="full-skd";Bv.FairPlayContentIdStrategy={HOSTNAME:Av,FULL_SKD:zv};_.x("clpp.drm.HeaderDrmComponent",class extends _.yv{beforeLoad(a){a=a.getConfiguration();if(a.drm&&a.drm&&a.drm.env===Ia){a=a.drm.customData;if(!a)throw new _.I(_.D,7,7100,_.xd);a=new Bv(a.widevineLicenseUrl,a.playReadyLicenseUrl,a.fairPlayLicenseUrl,a.fairPlayCertificateUrl,a.fairPlayContentIdStrategy||zv);_.kn(a)}}uninstall(){delete _.jn.HeaderDrm}id(){return"headerdrm"}});var pt;_.Cv=class{constructor(a,b,c){this.h=a;this.j=b;this.f=c||this.h.getMedia();this.a=null}start(){this.a=new ResizeObserver(a=>{a=a[0];this.j(a.contentRect.width,a.contentRect.height,this.h.isFullscreen())});this.f&&this.a.observe(this.f)}stop(){this.a&&(this.a.disconnect(),this.a=null)}};var Dv;_.Ev=class{constructor(){this.a=new Blob([Dv],{type:_.zg})}canPlay(a){var b=document.createElement(_.t);b.setAttribute("playsinline","playsinline");a&&(b.muted=!0,b.setAttribute("muted","muted"));b.src=URL.createObjectURL(this.a);const c=new _.Hl;b=b.play();const d=(new _.Li(()=>{d.stop();c.resolve(a)})).la(.25);void 0!==b?b.then(()=>{d.stop();c.resolve(!0)}).catch(e=>{e&&e.message&&e.message===bb?(d.stop(),c.resolve(!0)):(d.stop(),c.resolve(!1))}):(d.stop(),c.resolve(!0));return c}};
514
+ Dv=new Uint8Array([0,0,0,28,102,116,121,112,105,115,111,109,0,0,2,0,105,115,111,109,105,115,111,50,109,112,52,49,0,0,0,8,102,114,101,101,0,0,2,239,109,100,97,116,33,16,5,32,164,27,255,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
515
515
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,167,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,33,16,5,32,164,27,255,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
516
516
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,55,167,128,0,0,0,0,0,0,
517
517
  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,0,0,2,194,109,111,111,118,0,0,0,108,109,118,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,232,0,0,0,47,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,1,236,116,114,97,107,0,0,0,92,116,107,104,100,0,0,0,3,0,0,0,0,0,0,
518
518
  0,0,0,0,0,2,0,0,0,0,0,0,0,47,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,36,101,100,116,115,0,0,0,28,101,108,115,116,0,0,0,0,0,0,0,1,0,0,0,47,0,0,0,0,0,1,0,0,0,0,1,100,109,100,105,97,0,0,0,32,109,100,104,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,172,68,0,0,8,0,85,196,0,0,0,0,0,45,104,100,108,114,0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0,0,0,1,15,109,105,110,102,0,0,
519
519
  0,16,115,109,104,100,0,0,0,0,0,0,0,0,0,0,0,36,100,105,110,102,0,0,0,28,100,114,101,102,0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1,0,0,0,211,115,116,98,108,0,0,0,103,115,116,115,100,0,0,0,0,0,0,0,1,0,0,0,87,109,112,52,97,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,2,0,16,0,0,0,0,172,68,0,0,0,0,0,51,101,115,100,115,0,0,0,0,3,128,128,128,34,0,2,0,4,128,128,128,20,64,21,0,0,0,0,1,244,0,0,1,243,249,5,128,128,128,2,18,16,6,128,128,128,1,2,0,0,0,24,115,116,116,115,0,0,0,0,0,0,0,1,0,0,0,2,0,0,4,0,0,0,0,28,115,
520
- 116,115,99,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,1,0,0,0,28,115,116,115,122,0,0,0,0,0,0,0,0,0,0,0,2,0,0,1,115,0,0,1,116,0,0,0,20,115,116,99,111,0,0,0,0,0,0,0,1,0,0,0,44,0,0,0,98,117,100,116,97,0,0,0,90,109,101,116,97,0,0,0,0,0,0,0,33,104,100,108,114,0,0,0,0,0,0,0,0,109,100,105,114,97,112,112,108,0,0,0,0,0,0,0,0,0,0,0,0,45,105,108,115,116,0,0,0,37,169,116,111,111,0,0,0,29,100,97,116,97,0,0,0,1,0,0,0,0,76,97,118,102,53,54,46,52,48,46,49,48,49]);_.yt={};_.Mv=class{constructor(a){a=a.getConfiguration();a=_.dh(a.textStyle||a.textstyle||{});this.K=typeof a.backgroundColor===_.Tf?a.backgroundColor:null;this.R=typeof a.windowColor===_.Tf?a.windowColor:null;this.M=typeof a.fontColor===_.Tf?a.fontColor:null;this.P=typeof a.fontFamily===_.Tf?a.fontFamily:null;this.I=typeof a.fontSize===_.Tf?a.fontSize:null;this.C=typeof a.fontSizePercent===_.r?a.fontSizePercent:null;this.H=typeof a.edgeColor===_.Tf?a.edgeColor:"rgba(0, 0, 0, 1)";this.w=null;typeof a.edgeType===
521
- _.Tf&&(this.w=a.edgeType)}getBackgroundColor(){return this.K}setBackgroundColor(a){this.K=a;this.h()}getWindowColor(){return this.R}setWindowColor(a){this.R=a;this.h()}getFontFamily(){return this.P}setFontFamily(a){this.P=a;this.h()}getFontColor(){return this.M}setFontColor(a){this.M=a;this.h()}getFontSize(){return this.I}setFontSize(a){this.I=a;this.h()}getFontSizePercent(){return null===this.C?Lv:this.C}setFontSizePercent(a){this.C=a;this.h()}getEdgeColor(){return this.H}setEdgeColor(a){this.H=
522
- a;this.h()}getEdgeType(){return this.w}setEdgeType(a){this.w=a;this.h()}};_.Mv.prototype.setEdgeType=_.Mv.prototype.setEdgeType;_.Mv.prototype.getEdgeType=_.Mv.prototype.getEdgeType;_.Mv.prototype.setEdgeColor=_.Mv.prototype.setEdgeColor;_.Mv.prototype.getEdgeColor=_.Mv.prototype.getEdgeColor;_.Mv.prototype.setFontSizePercent=_.Mv.prototype.setFontSizePercent;_.Mv.prototype.getFontSizePercent=_.Mv.prototype.getFontSizePercent;_.Mv.prototype.setFontSize=_.Mv.prototype.setFontSize;
523
- _.Mv.prototype.getFontSize=_.Mv.prototype.getFontSize;_.Mv.prototype.setFontColor=_.Mv.prototype.setFontColor;_.Mv.prototype.getFontColor=_.Mv.prototype.getFontColor;_.Mv.prototype.setFontFamily=_.Mv.prototype.setFontFamily;_.Mv.prototype.getFontFamily=_.Mv.prototype.getFontFamily;_.Mv.prototype.setWindowColor=_.Mv.prototype.setWindowColor;_.Mv.prototype.getWindowColor=_.Mv.prototype.getWindowColor;_.Mv.prototype.setBackgroundColor=_.Mv.prototype.setBackgroundColor;
524
- _.Mv.prototype.getBackgroundColor=_.Mv.prototype.getBackgroundColor;var Lv=1/15;var Nv;
525
- _.Ov=class extends _.Mv{constructor(a){super(a);this.o=a.getSurface().getMedia();this.f=`clpp-video-${Nv++}`;this.j=document.createElement(_.Vf);this.l=this.A=!1;_.Ei(this.o,this.f);document.head.appendChild(this.j);this.h()}append(){}remove(){return!0}isTextVisible(){return this.A}setTextVisibility(a){this.A=a}h(){if(!this.l){var a={"background-color":this.getBackgroundColor(),color:this.getFontColor(),"font-family":this.getFontFamily(),"font-size":this.getFontSize(),"text-shadow":_.Gt(this)},b=
526
- Object.keys(a).map(c=>null!==a[c]?`${c}:${a[c]};`:"").join("");this.j.textContent=`.${this.f}::cue {${b}}`}}destroy(){this.o.classList.remove(this.f);document.head.removeChild(this.j);this.l=!0;return Promise.resolve()}};Nv=0;var Pv=class{a(){return!0}create(a){return new _.Ov(a)}};var Qv=class{constructor(a){this.f=a;this.a=null;this.g=new _.S("clpp.text.Mp4TextParser")}parseInit(a){let b;try{const c=_.At(_.yc);c?(b=new c(this.f),b.parseInit(a)):this.g.warn("The clpp.ttml.Mp4TtmlParser class is not available. Please register the ttml component first.")}catch(c){b=null}if(b)this.a=b;else{try{const c=_.At(_.zc);c?(b=new c(this.f),b.parseInit(a)):this.g.warn("The clpp.vtt.Mp4VttParser class is not available. Please register the vtt component first.")}catch(c){b=null}if(b)this.a=
527
- b;else throw new _.H(_.C,2,2011);}}parseMedia(a,b){if(!this.a)throw new _.H(_.C,2,2011);return this.a.parseMedia(a,b)}};_.Am(function(){ArrayBuffer.prototype.slice||(ArrayBuffer.prototype.slice=function(a,b){b=void 0!==b?b:this.byteLength;a=Math.floor(a);b=Math.floor(b);0>a&&(a+=this.byteLength);0>b&&(b+=this.byteLength);a=Math.min(Math.max(0,a),this.byteLength);b=Math.min(Math.max(0,b),this.byteLength);if(0>=b-a)return new ArrayBuffer(0);const c=new ArrayBuffer(b-a),d=_.F(c);a=new Uint8Array(this,a,b-a);d.set(a);return c})});
528
- _.Am(function(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitExitFullscreen;$d in document||(Object.defineProperty(document,$d,{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",
529
- {get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",ot);document.addEventListener("webkitfullscreenerror",ot);document.addEventListener("mozfullscreenchange",ot);document.addEventListener("mozfullscreenerror",ot);document.addEventListener("MSFullscreenChange",ot);document.addEventListener("MSFullscreenError",ot)}});
530
- _.Am(function(){_.xh("InputEvent.install");_.Qi("Trident/")&&HTMLInputElement.prototype.addEventListener!==wt&&(_.wh("Patching input event support on IE."),vt=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=wt)});_.Am(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:()=>navigator.language?[navigator.language]:["en"]})});_.Am(function(){_.xh("mathRound.install")});
531
- _.Am(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(_.xh("PiPWebkit.install"),document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=qt,document.exitPictureInPicture=rt,document.addEventListener("webkitpresentationmodechanged",pt,!0))}});
532
- _.Am(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=st)}});_.Am(function(){_.xh("VideoPlayPromise.install");if(window.HTMLMediaElement){const a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){const b=a.apply(this);b&&b.catch(()=>{});return b}}});
533
- _.Am(function(){if(window.VTTCue)_.wh("Using native VTTCue.");else if(window.TextTrackCue){var a=TextTrackCue.length;if(3===a)_.wh(Ab),window.VTTCue=tt;else if(6===a)_.wh("Using VTTCue polyfill from 6 argument TextTrackCue."),window.VTTCue=ut;else{try{var b=!!tt(1,2,"")}catch(c){b=!1}b&&(_.wh(Ab),window.VTTCue=tt)}}else _.yh("VTTCue not available.")});_.Bh(new xv);_.zt(_.xc,Qv);_.ms("native",new Pv);Km(_.Dc,()=>new Cv(_.Dc));Km(_.yg,()=>new Cv(_.yg));_.Rv=class{constructor(a,b,c,d){this.id=a;this.f=b;this.a=c;this.h=d}getDuration(){return this.a}getId(){return this.id}Ob(){return this.f}vd(){return this.h}Lc(a){return this.getId()===a.getId()&&this.Ob()===a.Ob()&&this.getDuration()===a.getDuration()&&this.vd()===a.vd()}};_.x("clpp.media.TimelineWindow",_.Rv);_.Rv.prototype.isDynamic=_.Rv.prototype.vd;_.Rv.prototype.getStart=_.Rv.prototype.Ob;_.Rv.prototype.getId=_.Rv.prototype.getId;_.Rv.prototype.getDuration=_.Rv.prototype.getDuration;_.Sv=new _.S("clpp.media.TimestampParser");_.Tv=class{constructor(){this.a=[];this.f=-1;this.h=null}Th(a){return this.a[a]||null}Uh(){return this.a.length}Vh(){return this.a}bg(){return this.a[this.f]||null}Nh(){return this.f}};_.x("clpp.media.Timeline",_.Tv);_.Tv.prototype.getCurrentWindowIndex=_.Tv.prototype.Nh;_.Tv.prototype.getCurrentWindow=_.Tv.prototype.bg;_.Tv.prototype.getWindows=_.Tv.prototype.Vh;_.Tv.prototype.getWindowCount=_.Tv.prototype.Uh;_.Tv.prototype.getWindow=_.Tv.prototype.Th;_.Jt={};_.Kt={};var Ct="raised",Dt="depressed",Ft="dropshadow",Et="uniform";_.x("clpp.text.EdgeType",{NONE:_.Ge,RAISED:Ct,DEPRESSED:Dt,DROP_SHADOW:Ft,UNIFORM:Et});_.Uv=class{onPlayerCreated(){}onContentWillLoad(){return Promise.resolve()}onContentLoaded(){return Promise.resolve()}onPlayerWillDestroy(){}onPlayerWillRelease(){}};};f.call(g,window);g.clpp._ = _;delete window.clpp; export let clpp = g.clpp; export default clpp;
520
+ 116,115,99,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,1,0,0,0,28,115,116,115,122,0,0,0,0,0,0,0,0,0,0,0,2,0,0,1,115,0,0,1,116,0,0,0,20,115,116,99,111,0,0,0,0,0,0,0,1,0,0,0,44,0,0,0,98,117,100,116,97,0,0,0,90,109,101,116,97,0,0,0,0,0,0,0,33,104,100,108,114,0,0,0,0,0,0,0,0,109,100,105,114,97,112,112,108,0,0,0,0,0,0,0,0,0,0,0,0,45,105,108,115,116,0,0,0,37,169,116,111,111,0,0,0,29,100,97,116,97,0,0,0,1,0,0,0,0,76,97,118,102,53,54,46,52,48,46,49,48,49]);_.st={};_.Gv=class{constructor(a){a=a.getConfiguration();a=_.dh(a.textStyle||a.textstyle||{});this.K=typeof a.backgroundColor===_.Tf?a.backgroundColor:null;this.R=typeof a.windowColor===_.Tf?a.windowColor:null;this.M=typeof a.fontColor===_.Tf?a.fontColor:null;this.P=typeof a.fontFamily===_.Tf?a.fontFamily:null;this.I=typeof a.fontSize===_.Tf?a.fontSize:null;this.C=typeof a.fontSizePercent===_.r?a.fontSizePercent:null;this.H=typeof a.edgeColor===_.Tf?a.edgeColor:"rgba(0, 0, 0, 1)";this.w=null;typeof a.edgeType===
521
+ _.Tf&&(this.w=a.edgeType)}getBackgroundColor(){return this.K}setBackgroundColor(a){this.K=a;this.h()}getWindowColor(){return this.R}setWindowColor(a){this.R=a;this.h()}getFontFamily(){return this.P}setFontFamily(a){this.P=a;this.h()}getFontColor(){return this.M}setFontColor(a){this.M=a;this.h()}getFontSize(){return this.I}setFontSize(a){this.I=a;this.h()}getFontSizePercent(){return null===this.C?Fv:this.C}setFontSizePercent(a){this.C=a;this.h()}getEdgeColor(){return this.H}setEdgeColor(a){this.H=
522
+ a;this.h()}getEdgeType(){return this.w}setEdgeType(a){this.w=a;this.h()}};_.Gv.prototype.setEdgeType=_.Gv.prototype.setEdgeType;_.Gv.prototype.getEdgeType=_.Gv.prototype.getEdgeType;_.Gv.prototype.setEdgeColor=_.Gv.prototype.setEdgeColor;_.Gv.prototype.getEdgeColor=_.Gv.prototype.getEdgeColor;_.Gv.prototype.setFontSizePercent=_.Gv.prototype.setFontSizePercent;_.Gv.prototype.getFontSizePercent=_.Gv.prototype.getFontSizePercent;_.Gv.prototype.setFontSize=_.Gv.prototype.setFontSize;
523
+ _.Gv.prototype.getFontSize=_.Gv.prototype.getFontSize;_.Gv.prototype.setFontColor=_.Gv.prototype.setFontColor;_.Gv.prototype.getFontColor=_.Gv.prototype.getFontColor;_.Gv.prototype.setFontFamily=_.Gv.prototype.setFontFamily;_.Gv.prototype.getFontFamily=_.Gv.prototype.getFontFamily;_.Gv.prototype.setWindowColor=_.Gv.prototype.setWindowColor;_.Gv.prototype.getWindowColor=_.Gv.prototype.getWindowColor;_.Gv.prototype.setBackgroundColor=_.Gv.prototype.setBackgroundColor;
524
+ _.Gv.prototype.getBackgroundColor=_.Gv.prototype.getBackgroundColor;var Fv=1/15;var Hv;
525
+ _.Iv=class extends _.Gv{constructor(a){super(a);this.o=a.getSurface().getMedia();this.f=`clpp-video-${Hv++}`;this.j=document.createElement(_.Vf);this.l=this.A=!1;_.Ci(this.o,this.f);document.head.appendChild(this.j);this.h()}append(){}remove(){return!0}isTextVisible(){return this.A}setTextVisibility(a){this.A=a}h(){if(!this.l){var a={"background-color":this.getBackgroundColor(),color:this.getFontColor(),"font-family":this.getFontFamily(),"font-size":this.getFontSize(),"text-shadow":_.At(this)},b=
526
+ Object.keys(a).map(c=>null!==a[c]?`${c}:${a[c]};`:"").join("");this.j.textContent=`.${this.f}::cue {${b}}`}}destroy(){this.o.classList.remove(this.f);document.head.removeChild(this.j);this.l=!0;return Promise.resolve()}};Hv=0;var Jv=class{a(){return!0}create(a){return new _.Iv(a)}};var Kv=class{constructor(a){this.f=a;this.a=null;this.g=new _.T("clpp.text.Mp4TextParser")}parseInit(a){let b;try{const c=_.ut(_.zc);c?(b=new c(this.f),b.parseInit(a)):this.g.warn("The clpp.ttml.Mp4TtmlParser class is not available. Please register the ttml component first.")}catch(c){b=null}if(b)this.a=b;else{try{const c=_.ut(_.Ac);c?(b=new c(this.f),b.parseInit(a)):this.g.warn("The clpp.vtt.Mp4VttParser class is not available. Please register the vtt component first.")}catch(c){b=null}if(b)this.a=
527
+ b;else throw new _.I(_.D,2,2011);}}parseMedia(a,b){if(!this.a)throw new _.I(_.D,2,2011);return this.a.parseMedia(a,b)}};_.um(function(){ArrayBuffer.prototype.slice||(ArrayBuffer.prototype.slice=function(a,b){b=void 0!==b?b:this.byteLength;a=Math.floor(a);b=Math.floor(b);0>a&&(a+=this.byteLength);0>b&&(b+=this.byteLength);a=Math.min(Math.max(0,a),this.byteLength);b=Math.min(Math.max(0,b),this.byteLength);if(0>=b-a)return new ArrayBuffer(0);const c=new ArrayBuffer(b-a),d=_.G(c);a=new Uint8Array(this,a,b-a);d.set(a);return c})});
528
+ _.um(function(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitExitFullscreen;$d in document||(Object.defineProperty(document,$d,{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",
529
+ {get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitSupportsFullscreen||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",it);document.addEventListener("webkitfullscreenerror",it);document.addEventListener("mozfullscreenchange",it);document.addEventListener("mozfullscreenerror",it);document.addEventListener("MSFullscreenChange",it);document.addEventListener("MSFullscreenError",it)}});
530
+ _.um(function(){_.xh("InputEvent.install");_.Oi("Trident/")&&HTMLInputElement.prototype.addEventListener!==qt&&(_.wh("Patching input event support on IE."),pt=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=qt)});_.um(function(){navigator.languages||Object.defineProperty(navigator,"languages",{get:()=>navigator.language?[navigator.language]:["en"]})});_.um(function(){_.xh("mathRound.install")});
531
+ _.um(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;a.requestPictureInPicture&&document.exitPictureInPicture||!a.webkitSupportsPresentationMode||(_.xh("PiPWebkit.install"),document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,a.requestPictureInPicture=kt,document.exitPictureInPicture=lt,document.addEventListener("webkitpresentationmodechanged",jt,!0))}});
532
+ _.um(function(){if(window.HTMLVideoElement){var a=HTMLVideoElement.prototype;!a.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in a&&(a.getVideoPlaybackQuality=mt)}});_.um(function(){_.xh("VideoPlayPromise.install");if(window.HTMLMediaElement){const a=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){const b=a.apply(this);b&&b.catch(()=>{});return b}}});
533
+ _.um(function(){if(window.VTTCue)_.wh("Using native VTTCue.");else if(window.TextTrackCue){var a=TextTrackCue.length;if(3===a)_.wh(Cb),window.VTTCue=nt;else if(6===a)_.wh("Using VTTCue polyfill from 6 argument TextTrackCue."),window.VTTCue=ot;else{try{var b=!!nt(1,2,"")}catch(c){b=!1}b&&(_.wh(Cb),window.VTTCue=nt)}}else _.yh("VTTCue not available.")});_.Bh(new qv);_.tt(_.yc,Kv);_.gs("native",new Jv);Bm(_.Ec,()=>new wv(_.Ec));Bm(_.yg,()=>new wv(_.yg));_.Lv=class{constructor(a,b,c,d){this.id=a;this.f=b;this.a=c;this.h=d}getDuration(){return this.a}getId(){return this.id}Rb(){return this.f}wd(){return this.h}Oc(a){return this.getId()===a.getId()&&this.Rb()===a.Rb()&&this.getDuration()===a.getDuration()&&this.wd()===a.wd()}};_.x("clpp.media.TimelineWindow",_.Lv);_.Lv.prototype.isDynamic=_.Lv.prototype.wd;_.Lv.prototype.getStart=_.Lv.prototype.Rb;_.Lv.prototype.getId=_.Lv.prototype.getId;_.Lv.prototype.getDuration=_.Lv.prototype.getDuration;_.Mv=new _.T("clpp.media.TimestampParser");_.Nv=class{constructor(){this.a=[];this.f=-1;this.h=null}$h(a){return this.a[a]||null}ai(){return this.a.length}bi(){return this.a}jg(){return this.a[this.f]||null}Uh(){return this.f}};_.x("clpp.media.Timeline",_.Nv);_.Nv.prototype.getCurrentWindowIndex=_.Nv.prototype.Uh;_.Nv.prototype.getCurrentWindow=_.Nv.prototype.jg;_.Nv.prototype.getWindows=_.Nv.prototype.bi;_.Nv.prototype.getWindowCount=_.Nv.prototype.ai;_.Nv.prototype.getWindow=_.Nv.prototype.$h;_.Dt={};_.Et={};var wt="raised",xt="depressed",zt="dropshadow",yt="uniform";_.x("clpp.text.EdgeType",{NONE:_.Ge,RAISED:wt,DEPRESSED:xt,DROP_SHADOW:zt,UNIFORM:yt});_.Ov=class{onPlayerCreated(){}onContentWillLoad(){return Promise.resolve()}onContentLoaded(){return Promise.resolve()}onPlayerWillDestroy(){}onPlayerWillRelease(){}};};f.call(g,window);g.clpp._ = _;delete window.clpp; export let clpp = g.clpp; export default clpp;